38c5fbb80826a10bd42deb63f8341eb295fd9e43
[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-2022 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, 2022 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christine Lemmer-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, 2022 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, 2022 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, 2021 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-2022 Marius Bakke <marius@gnu.org>
30 ;;; Copyright © 2016, 2017, 2021, 2022 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018, 2021 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2022 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, 2021, 2022 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020, 2021 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, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
46 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
47 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
48 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
49 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
50 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
51 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
52 ;;; Copyright © 2018-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
53 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
54 ;;; Copyright © 2018, 2019, 2021 Clément Lassieur <clement@lassieur.org>
55 ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
56 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
57 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
58 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
59 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020, 2021, 2022 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
77 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
78 ;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
79 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
80 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
81 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
82 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
83 ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
84 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
85 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
86 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
87 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
88 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
89 ;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
90 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
91 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
92 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
93 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
94 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
95 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
96 ;;; Copyright © 2021, 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
97 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
98 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
99 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
100 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
101 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
102 ;;; Copyright © 2021 jgart <jgart@dismail.de>
103 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
104 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
105 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
106 ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
107 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
108 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
109 ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
110 ;;; Copyright © 2021, 2022 Pradana Aumars <paumars@courrier.dev>
111 ;;; Copyright © 2021, 2022 Felix Gruber <felgru@posteo.net>
112 ;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
113 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
114 ;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@protonmail.com>
115 ;;; Copyright © 2021 Filip Lajszczak <filip@lajszczak.dev>
116 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
117 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
118 ;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
119 ;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
120 ;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech>
121 ;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
122 ;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
123 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
124 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
125 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
126 ;;;
127 ;;; This file is part of GNU Guix.
128 ;;;
129 ;;; GNU Guix is free software; you can redistribute it and/or modify it
130 ;;; under the terms of the GNU General Public License as published by
131 ;;; the Free Software Foundation; either version 3 of the License, or (at
132 ;;; your option) any later version.
133 ;;;
134 ;;; GNU Guix is distributed in the hope that it will be useful, but
135 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
136 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
137 ;;; GNU General Public License for more details.
138 ;;;
139 ;;; You should have received a copy of the GNU General Public License
140 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
141
142 (define-module (gnu packages python-xyz)
143 #:use-module ((guix licenses) #:prefix license:)
144 #:use-module (gnu packages)
145 #:use-module (gnu packages algebra)
146 #:use-module (gnu packages adns)
147 #:use-module (gnu packages aidc)
148 #:use-module (gnu packages attr)
149 #:use-module (gnu packages backup)
150 #:use-module (gnu packages bash)
151 #:use-module (gnu packages check)
152 #:use-module (gnu packages cmake)
153 #:use-module (gnu packages compression)
154 #:use-module (gnu packages crypto)
155 #:use-module (gnu packages databases)
156 #:use-module (gnu packages dbm)
157 #:use-module (gnu packages django)
158 #:use-module (gnu packages djvu)
159 #:use-module (gnu packages docker)
160 #:use-module (gnu packages documentation)
161 #:use-module (gnu packages enchant)
162 #:use-module (gnu packages file)
163 #:use-module (gnu packages fontutils)
164 #:use-module (gnu packages fonts)
165 #:use-module (gnu packages freedesktop)
166 #:use-module (gnu packages gdb)
167 #:use-module (gnu packages gcc)
168 #:use-module (gnu packages geo)
169 #:use-module (gnu packages ghostscript)
170 #:use-module (gnu packages gl)
171 #:use-module (gnu packages glib)
172 #:use-module (gnu packages gnome)
173 #:use-module (gnu packages gnupg)
174 #:use-module (gnu packages graphviz)
175 #:use-module (gnu packages graphics)
176 #:use-module (gnu packages gsasl)
177 #:use-module (gnu packages gstreamer)
178 #:use-module (gnu packages gtk)
179 #:use-module (gnu packages haskell-xyz)
180 #:use-module (gnu packages icu4c)
181 #:use-module (gnu packages inkscape)
182 #:use-module (gnu packages image)
183 #:use-module (gnu packages image-processing)
184 #:use-module (gnu packages imagemagick)
185 #:use-module (gnu packages jupyter)
186 #:use-module (gnu packages kerberos)
187 #:use-module (gnu packages libevent)
188 #:use-module (gnu packages libffi)
189 #:use-module (gnu packages libidn)
190 #:use-module (gnu packages linux)
191 #:use-module (gnu packages llvm)
192 #:use-module (gnu packages man)
193 #:use-module (gnu packages markup)
194 #:use-module (gnu packages maths)
195 #:use-module (gnu packages monitoring)
196 #:use-module (gnu packages multiprecision)
197 #:use-module (gnu packages networking)
198 #:use-module (gnu packages ncurses)
199 #:use-module (gnu packages ninja)
200 #:use-module (gnu packages openstack)
201 #:use-module (gnu packages pcre)
202 #:use-module (gnu packages pdf)
203 #:use-module (gnu packages perl)
204 #:use-module (gnu packages photo)
205 #:use-module (gnu packages pkg-config)
206 #:use-module (gnu packages protobuf)
207 #:use-module (gnu packages python)
208 #:use-module (gnu packages python-build)
209 #:use-module (gnu packages python-check)
210 #:use-module (gnu packages python-compression)
211 #:use-module (gnu packages python-crypto)
212 #:use-module (gnu packages python-science)
213 #:use-module (gnu packages python-web)
214 #:use-module (gnu packages qt)
215 #:use-module (gnu packages rdf)
216 #:use-module (gnu packages readline)
217 #:use-module (gnu packages regex)
218 #:use-module (gnu packages sdl)
219 #:use-module (gnu packages scanner)
220 #:use-module (gnu packages search)
221 #:use-module (gnu packages serialization)
222 #:use-module (gnu packages shells)
223 #:use-module (gnu packages sphinx)
224 #:use-module (gnu packages ssh)
225 #:use-module (gnu packages swig)
226 #:use-module (gnu packages terminals)
227 #:use-module (gnu packages tex)
228 #:use-module (gnu packages texinfo)
229 #:use-module (gnu packages textutils)
230 #:use-module (gnu packages time)
231 #:use-module (gnu packages tls)
232 #:use-module (gnu packages version-control)
233 #:use-module (gnu packages video)
234 #:use-module (gnu packages web)
235 #:use-module (gnu packages wxwidgets)
236 #:use-module (gnu packages base)
237 #:use-module (gnu packages xml)
238 #:use-module (gnu packages xorg)
239 #:use-module (gnu packages xdisorg)
240 #:use-module (gnu packages tcl)
241 #:use-module (gnu packages bdw-gc)
242 #:use-module (gnu packages serialization)
243 #:use-module (guix packages)
244 #:use-module (guix download)
245 #:use-module (guix gexp)
246 #:use-module (guix git-download)
247 #:use-module (guix hg-download)
248 #:use-module (guix gexp)
249 #:use-module (guix utils)
250 #:use-module (guix build-system gnu)
251 #:use-module (guix build-system cmake)
252 #:use-module (guix build-system python)
253 #:use-module (guix build-system trivial)
254 #:use-module (srfi srfi-1)
255 #:use-module (srfi srfi-26))
256
257 (define-public python-xmldiff
258 (package
259 (name "python-xmldiff")
260 (version "2.4")
261 (source
262 (origin
263 (method url-fetch)
264 (uri (pypi-uri "xmldiff" version))
265 (sha256
266 (base32 "0qygxi3z1jwb0471k7bh5gcqf7wqm4xhrkmwhf36gjgjw46a5gh5"))))
267 (build-system python-build-system)
268 (propagated-inputs (list python-lxml python-six))
269 (home-page "https://github.com/Shoobx/xmldiff")
270 (synopsis "Creates diffs of XML files")
271 (description "This Python tool figures out the differences between two
272 similar XML files, in the same way the @command{diff} utility does it.")
273 (license license:expat)))
274
275 (define-public python-janus
276 (package
277 (name "python-janus")
278 (version "0.6.1")
279 (source
280 (origin
281 (method url-fetch)
282 (uri (pypi-uri "janus" version))
283 (sha256
284 (base32 "030xvl2vghi5ispfalhvch1rl6i2jsy5bf1dgjafa7vifppy04j7"))))
285 (build-system python-build-system)
286 (arguments
287 `(#:phases
288 (modify-phases %standard-phases
289 (replace 'check
290 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
291 (when tests?
292 (add-installed-pythonpath inputs outputs)
293 (invoke "pytest" "--cov=janus" "--cov=tests")))))))
294 (native-inputs
295 (list python-pytest python-pytest-cov python-pytest-asyncio))
296 (home-page "https://github.com/aio-libs/janus/")
297 (synopsis
298 "Sync-async queue to interoperate between asyncio tasks and classic threads")
299 (description
300 "Mixed sync-async queue, supposed to be used for communicating between
301 classic synchronous (threaded) code and asynchronous (in terms of
302 @url{https://docs.python.org/3/library/asyncio.html,asyncio}) one. Like
303 @url{https://en.wikipedia.org/wiki/Janus,Janus god} the queue object from the
304 library has two faces: synchronous and asynchronous interface. Synchronous is
305 fully compatible with
306 @url{https://docs.python.org/3/library/queue.html,standard queue},
307 asynchronous one follows
308 @url{https://docs.python.org/3/library/asyncio-queue.html,asyncio queue
309 design}.")
310 (license license:asl2.0)))
311
312 (define-public python-logzero
313 (package
314 (name "python-logzero")
315 (version "1.7.0")
316 (source
317 (origin
318 (method url-fetch)
319 (uri (pypi-uri "logzero" version))
320 (sha256
321 (base32 "10nh186vk6hpnpfycym44gja4fja0jyzw7q8dwimfd1rmv9xswvz"))))
322 (build-system python-build-system)
323 (native-inputs
324 (list python-pytest python-pytest-runner))
325 (arguments
326 `(#:phases
327 (modify-phases %standard-phases
328 (replace 'check
329 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
330 (when tests?
331 (add-installed-pythonpath inputs outputs)
332 (invoke "pytest")))))))
333 (home-page "https://github.com/metachris/logzero")
334 (synopsis "Robust and effective logging for Python")
335 (description
336 "@code{logzero} provides a fully configured Python logger object for
337 easy logging and rotating to a console or a file.")
338 (license license:expat)))
339
340 (define-public python-logbook
341 (package
342 (name "python-logbook")
343 (version "1.5.3")
344 (source
345 (origin
346 (method url-fetch)
347 (uri (pypi-uri "Logbook" version))
348 (sha256
349 (base32 "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36"))))
350 (build-system python-build-system)
351 (arguments
352 `(#:phases
353 (modify-phases %standard-phases
354 (add-before 'build 'cythonize-sources
355 (lambda _
356 (with-directory-excursion "logbook"
357 (invoke "cython" "_speedups.pyx"))))
358 (replace 'check
359 (lambda* (#:key tests? #:allow-other-keys)
360 (when tests?
361 ;; Check cython build also
362 (setenv "CYBUILD" "True")
363 (invoke "pytest" "--cov=logbook" "-r" "s" "tests")))))))
364 (native-inputs
365 (list python-cython python-mock python-pytest python-pytest-cov
366 python-google-brotli))
367 (home-page "https://github.com/getlogbook/logbook")
368 (synopsis "Logbook is a logging replacement for Python")
369 (description
370 "Logbook is a logging system for Python that replaces the standard
371 library’s logging module. It was designed with both complex and simple
372 applications in mind and the idea to make logging fun.")
373 (license license:bsd-3)))
374
375 (define-public python-ubelt
376 (package
377 (name "python-ubelt")
378 (version "1.0.1")
379 (source
380 (origin
381 (method git-fetch)
382 (uri (git-reference
383 (url "https://github.com/Erotemic/ubelt")
384 (commit (string-append "v" version))))
385 (file-name (git-file-name name version))
386 (sha256
387 (base32
388 "0hac9nqqvqfbca2s4g0mp1fnj0ah60bg9fb8234ibna3jww8qs33"))))
389 (build-system python-build-system)
390 (arguments
391 (list #:phases
392 #~(modify-phases %standard-phases
393 (replace 'check
394 (lambda* (#:key tests? #:allow-other-keys)
395 (when tests?
396 (setenv "HOME" "/tmp") ;else the test suite hangs
397 (invoke "pytest" "-vv" "-k"
398 (string-append
399 ;; The builder user home doesn't match HOME,
400 ;; which causes this test to fail.
401 "not userhome "
402 ;; This one pointlessly tries
403 ;; locating various binaries on
404 ;; the path.
405 "and not find_exe"))))))))
406 (propagated-inputs (list python-ordered-set))
407 (native-inputs
408 (list python-pytest
409 python-requests
410 python-xdoctest))
411 (home-page "https://github.com/Erotemic/ubelt")
412 (synopsis "Python library for hashing, caching, timing and more")
413 (description "Ubelt is a small library of simple functions that extend the
414 Python standard library. It includes an @acronym{API, Application Programming
415 Interface} to simplify common problems such as caching, timing, computing
416 progress, among other things.")
417 (license license:asl2.0)))
418
419 (define-public python-ueberzug
420 (package
421 (name "python-ueberzug")
422 (version "18.1.9")
423 (source
424 (origin
425 (method url-fetch)
426 (uri (pypi-uri "ueberzug" version))
427 (sha256
428 (base32
429 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
430 (build-system python-build-system)
431 (inputs
432 (list libx11 libxext))
433 (propagated-inputs
434 (list python-attrs python-docopt python-pillow python-xlib))
435 (home-page "https://github.com/seebye/ueberzug")
436 (synopsis "Command line util to display images in combination with X11")
437 (description "Überzug is a command line util which draws images on
438 terminals by using child windows. The advantages of using Überzug are:
439 @itemize
440 @item No race conditions as a new window is created to display images.
441 @item Expose events will be processed, so images will be redrawn on switch
442 workspaces.
443 @item Tmux support (excluding multi pane windows).
444 @item Terminals without the WINDOWID environment variable are supported.
445 @item Chars are used as position - and size unit.
446 @item No memory leak (/ unlimited cache).
447 @end itemize")
448 (license license:gpl3+)))
449
450 (define-public python-fire
451 (package
452 (name "python-fire")
453 (version "0.4.0")
454 (source
455 (origin
456 (method url-fetch)
457 (uri (pypi-uri "fire" version))
458 (sha256
459 (base32
460 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
461 (build-system python-build-system)
462 (native-inputs
463 (list python-pytest))
464 (arguments
465 '(#:phases
466 (modify-phases %standard-phases
467 (replace 'check
468 (lambda* (#:key tests? #:allow-other-keys)
469 (when tests?
470 (invoke "pytest")))))))
471 (inputs
472 (list python-six python-termcolor))
473 (synopsis "Library for automatically generating command line interfaces")
474 (description
475 "Fire is a library for automatically generating command line interfaces
476 from absolutely any Python object. The following are the advantages:
477 @itemize
478 @item A simple way to create a CLI in Python.
479 @item A helpful tool for developing and debugging Python code.
480 @item Helps with exploring existing code or turning other people's code into a
481 command line interface.
482 @item Makes transitioning between Bash and Python easier.
483 @item Makes using a Python REPL easier by setting up the REPL with the modules
484 and variables you'll need already imported and created.
485 @end itemize")
486 (home-page "https://github.com/google/python-fire")
487 (license license:asl2.0)))
488
489 (define-public python-twodict
490 (package
491 (name "python-twodict")
492 (version "1.2")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (pypi-uri "twodict" version))
497 (sha256
498 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
499 (build-system python-build-system)
500 (home-page "https://github.com/MrS0m30n3/twodict")
501 (synopsis "Two way ordered dictionary for Python")
502 (description "TwoDict is a custom dictionary in which you can get the
503 key:value relationship but you can also get the value:key relationship. It also
504 remembers the order in which the items were inserted and supports almost all the
505 features of the Python's built-in dict.")
506 (license license:unlicense)))
507
508 (define-public python2-twodict
509 (package
510 (inherit python-twodict)
511 (name "python2-twodict")
512 (version "1.2")
513 (source
514 (origin
515 (method url-fetch)
516 (uri (pypi-uri "twodict" version))
517 (sha256
518 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
519 (build-system python-build-system)
520 (arguments
521 `(#:python ,python-2))))
522
523 (define-public python-argopt
524 (package
525 (name "python-argopt")
526 (version "0.7.0")
527 (source (origin
528 (method url-fetch)
529 (uri (pypi-uri "argopt" version))
530 (sha256
531 (base32
532 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
533 (build-system python-build-system)
534 (native-inputs
535 (list python-coverage python-nose python-setuptools ; Won't build without this.
536 python-setuptools-scm))
537 (propagated-inputs
538 (list python-toml python-flake8))
539 (home-page "https://github.com/casperdcl/argopt")
540 (synopsis "Generate a command-line interface from a docstring")
541 (description "This package provides tools to define a command line interface
542 from a docstring rather than the other way around.")
543 (license license:mpl2.0)))
544
545 (define-public python-cachetools
546 (package
547 (name "python-cachetools")
548 (version "4.2.2")
549 (source (origin
550 (method url-fetch)
551 (uri (pypi-uri "cachetools" version))
552 (sha256
553 (base32
554 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
555 (build-system python-build-system)
556 (home-page "https://github.com/tkem/cachetools/")
557 (synopsis "Extensible memoizing collections and decorators")
558 (description "This module provides various memoizing collections and
559 decorators, including variants of the Python standard library's
560 @code{lru_cache} function decorator.")
561 (license license:expat)))
562
563 (define-public python-colorful
564 (package
565 (name "python-colorful")
566 (version "0.5.4")
567 (source
568 (origin
569 (method url-fetch)
570 (uri
571 (pypi-uri "colorful" version))
572 (sha256
573 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
574 (build-system python-build-system)
575 ;; FIXME: tests cannot be computed:
576 ;; "Can't perform this operation for unregistered loader type"
577 (arguments
578 `(#:tests? #f))
579 (native-inputs
580 (list python-coverage python-flake8 python-pytest))
581 (propagated-inputs
582 (list python-colorama))
583 (home-page "http://github.com/timofurrer/colorful")
584 (synopsis "Terminal string styling")
585 (description "Colorful provides an array of text styles, that can be used
586 as functions or string constants to form colored terminal output.")
587 (license license:expat)))
588
589 (define-public python-yaspin
590 (package
591 (name "python-yaspin")
592 (version "1.5.0")
593 (source
594 (origin
595 (method url-fetch)
596 (uri
597 (pypi-uri "yaspin" version))
598 (sha256
599 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
600 (build-system python-build-system)
601 (native-inputs
602 (list python-pytest))
603 (home-page "https://github.com/pavdmyt/yaspin")
604 (synopsis "Yet Another Terminal Spinner")
605 (description "Yaspin provides a terminal spinner to indicate the progress
606 during long operations.")
607 (license license:expat)))
608
609 (define-public python-lunr
610 (package
611 (name "python-lunr")
612 (version "0.6.0")
613 (source
614 (origin
615 (method url-fetch)
616 (uri
617 (pypi-uri "lunr" version))
618 (sha256
619 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
620 (build-system python-build-system)
621 (native-inputs
622 (list python-mock python-pytest))
623 (propagated-inputs
624 (list python-nltk-3.4))
625 (home-page
626 "https://github.com/yeraydiazdiaz/lunr.py")
627 (synopsis "Full-text search library")
628 (description "This package provides python library for full-text search.
629 It indexes documents and provides a search interface for retrieving documents
630 that best match text queries.")
631 (license license:expat)))
632
633 (define-public python-mrkd
634 (package
635 (name "python-mrkd")
636 (version "0.2.0")
637 (source
638 (origin
639 (method url-fetch)
640 (uri (pypi-uri "mrkd" version))
641 (sha256
642 (base32 "1bvaqbna1ihb4y2mv9pmvqcq3r9j6lwbbii99dani8lxx4dqqvs5"))))
643 (build-system python-build-system)
644 (propagated-inputs
645 (list python-jinja2 python-mistune python-pygments))
646 (home-page "https://pypi.org/project/mrkd/")
647 (synopsis "Python Markdown implementation")
648 (description
649 "@code{mrkd} writes man pages using Markdown, and convert them to Roff or
650 HTML")
651 (license license:bsd-3)))
652
653 (define-public python-mkdocs
654 (package
655 (name "python-mkdocs")
656 (version "1.3.0")
657 (source
658 (origin
659 ;; The tests suite appears to be incomplete in the PyPI archive.
660 (method git-fetch)
661 (uri (git-reference
662 (url "https://github.com/mkdocs/mkdocs")
663 (commit version)))
664 (file-name (git-file-name name version))
665 (sha256
666 (base32
667 "1n5rdllrxvhnxmdrddf55p3s86dakx0rq2gg6bj6pr6jg2pn932b"))))
668 (build-system python-build-system)
669 (arguments
670 `(#:phases
671 (modify-phases %standard-phases
672 ;; Requirements refer to a specific version of dependencies,
673 ;; which are too old. So we patch to refer to any later version.
674 (add-after 'unpack 'patch-requirements
675 (lambda _
676 (substitute* "setup.py"
677 (("==") ">="))))
678 (replace 'check
679 (lambda* (#:key tests? #:allow-other-keys)
680 (when tests?
681 (invoke "python" "-m" "unittest"
682 "discover" "-p" "*tests.py" "mkdocs"
683 "--top-level-directory" ".")))))))
684 (propagated-inputs
685 (list python-babel
686 python-click
687 python-ghp-import
688 python-importlib-metadata
689 python-jinja2
690 python-markdown
691 python-markupsafe
692 python-mdx-gh-links
693 python-mergedeep
694 python-packaging
695 python-pyyaml
696 python-pyyaml-env-tag
697 python-watchdog))
698 (home-page "https://www.mkdocs.org")
699 (synopsis "Project documentation with Markdown")
700 (description "MkDocs is a static site generator geared towards building
701 project documentation. Documentation source files are written in Markdown, and
702 configured with a single YAML configuration file.")
703 (license license:bsd-3)))
704
705 (define-public python-pymdown-extensions
706 (package
707 (name "python-pymdown-extensions")
708 (version "8.1.1")
709 (source
710 (origin
711 (method url-fetch)
712 (uri
713 (pypi-uri "pymdown-extensions" version))
714 (sha256
715 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
716 (build-system python-build-system)
717 ;; FIXME: "AssertionError: False is not true"
718 (arguments
719 `(#:tests? #f))
720 (propagated-inputs
721 (list python-markdown))
722 (home-page "https://github.com/facelessuser/pymdown-extensions")
723 (synopsis "Extension pack for Python Markdown")
724 (description "PyMdown Extensions is a collection of extensions for Python
725 Markdown. All extensions are found under the module namespace of pymdownx.")
726 (license license:expat)))
727
728 (define-public python-mdx-gh-links
729 (package
730 (name "python-mdx-gh-links")
731 (version "0.2")
732 (source
733 (origin
734 (method url-fetch)
735 (uri (pypi-uri "mdx_gh_links" version))
736 (sha256
737 (base32 "167k1jbp3jifxbnlpi6wy0z1skam7gqv2sixb5bhggb2vypqvysr"))))
738 (build-system python-build-system)
739 (arguments (list #:tests? #f)) ;tests connect github
740 (propagated-inputs (list python-markdown))
741 (home-page "https://github.com/Python-Markdown/github-links/")
742 (synopsis "Python-Markdown extension adding support for shorthand links")
743 (description "This package is an extension to Python-Markdown which adds
744 support for shorthand links to GitHub users, repositories, issues and
745 commits.")
746 (license license:bsd-3)))
747
748 (define-public python-mkdocs-material
749 (package
750 (name "python-mkdocs-material")
751 (version "7.1.3")
752 (source
753 (origin
754 (method url-fetch)
755 (uri
756 (pypi-uri "mkdocs-material" version))
757 (sha256
758 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
759 (build-system python-build-system)
760 (arguments
761 `(#:phases
762 (modify-phases %standard-phases
763 ;; Requirement mkdocs-material-extensions
764 ;; in-turn requires mkdocs-material. This causes
765 ;; circular dependency, so we remove this requirement.
766 (add-after 'unpack 'patch-requirements
767 (lambda _
768 (substitute* "requirements.txt"
769 (("mkdocs-material-extensions.*$") "")))))))
770 (propagated-inputs
771 (list python-markdown python-mkdocs python-pygments
772 python-pymdown-extensions))
773 (home-page "https://squidfunk.github.io/mkdocs-material/")
774 (synopsis "Material Design theme for MkDocs")
775 (description "This package provides a theme plugin for the static site
776 generator MkDocs.")
777 (license license:expat)))
778
779 (define-public python-slixmpp
780 (package
781 (name "python-slixmpp")
782 (version "1.5.2")
783 (source
784 (origin
785 (method git-fetch)
786 (uri
787 (git-reference
788 (url "https://lab.louiz.org/poezio/slixmpp.git")
789 (commit
790 (string-append "slix-" version))))
791 (file-name
792 (git-file-name name version))
793 (sha256
794 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
795 (build-system python-build-system)
796 (arguments
797 `(#:phases
798 (modify-phases %standard-phases
799 (add-after 'unpack 'patch
800 (lambda _
801 (substitute* "setup.py"
802 (("'CC', 'cc'")
803 "'CC', 'gcc'"))
804 #t)))))
805 (native-inputs
806 `(("cython" ,python-cython)
807 ("gnupg" ,gnupg)
808 ("pkg-config" ,pkg-config)))
809 (propagated-inputs
810 (list python-aiodns python-aiohttp python-pyasn1
811 python-pyasn1-modules))
812 (inputs
813 (list libidn python)) ; We are building a Python extension.
814 (synopsis "XMPP library without threads")
815 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
816 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
817 socket handling, the timers, the events dispatching) in order to remove all
818 threads.")
819 (home-page "https://lab.louiz.org/poezio/slixmpp")
820 (license license:expat)))
821
822 (define-public python-tenacity
823 (package
824 (name "python-tenacity")
825 (version "8.0.1")
826 (source (origin
827 (method url-fetch)
828 (uri (pypi-uri "tenacity" version))
829 (sha256
830 (base32
831 "0bwkvjpjfyi9dgszzad9aww2vc00w3bczjnbifi92cp7wch2l923"))))
832 (build-system python-build-system)
833 (native-inputs
834 (list python-setuptools-scm python-tornado python-typeguard
835 python-pytest))
836 (arguments
837 (list #:phases
838 #~(modify-phases %standard-phases
839 (replace 'check
840 (lambda _ (invoke "pytest" "-vv"))))))
841 (home-page "https://github.com/jd/tenacity")
842 (synopsis "Retrying library for python")
843 (description "Tenacity is a general-purpose python library to simplify the
844 task of adding retry behavior to just about anything.")
845 (license license:asl2.0)))
846
847 (define-public python-pytelegrambotapi
848 (package
849 (name "python-pytelegrambotapi")
850 (version "3.7.4")
851 (source
852 (origin
853 (method git-fetch)
854 (uri (git-reference
855 (url "https://github.com/eternnoir/pyTelegramBotAPI")
856 (commit version)))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
860 (build-system python-build-system)
861 (arguments
862 `(#:phases
863 (modify-phases %standard-phases
864 (replace 'check
865 (lambda* (#:key tests? #:allow-other-keys)
866 (when tests?
867 (with-directory-excursion "tests"
868 (invoke "py.test")))
869 #t)))))
870 (propagated-inputs
871 (list python-requests))
872 (native-inputs
873 (list python-pytest))
874 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
875 (synopsis "Python Telegram bot api")
876 (description "This package provides a simple, but extensible Python
877 implementation for the Telegram Bot API.")
878 (license license:gpl2)))
879
880 (define-public python-colorlog
881 (package
882 (name "python-colorlog")
883 (version "6.6.0")
884 (source
885 (origin
886 (method url-fetch)
887 (uri (pypi-uri "colorlog" version))
888 (sha256
889 (base32 "1s7x0v872h8aks8xp01wmv6hzisxqjrh1svbbcycir0980h76krl"))))
890 (build-system python-build-system)
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (replace 'check
895 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
896 (when tests?
897 (add-installed-pythonpath inputs outputs)
898 (invoke "python" "-m" "pytest")))))))
899 (native-inputs
900 (list python-pytest))
901 (home-page "https://github.com/borntyping/python-colorlog")
902 (synopsis "Log formatting with colors for python")
903 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
904 with Python's logging module that outputs records using terminal colors.")
905 (license license:expat)))
906
907 (define-public python-pyprind
908 (package
909 (name "python-pyprind")
910 (version "2.11.3")
911 (source (origin
912 (method url-fetch)
913 (uri (pypi-uri "PyPrind" version))
914 (sha256
915 (base32
916 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
917 (build-system python-build-system)
918 (propagated-inputs
919 (list python-psutil))
920 (home-page "https://github.com/rasbt/pyprind")
921 (synopsis "Python Progress Bar and Percent Indicator Utility")
922 (description "The PyPrind (Python Progress Indicator) module provides a
923 progress bar and a percentage indicator object that let you track the progress
924 of a loop structure or other iterative computation.")
925 (license license:bsd-3)))
926
927 (define-public python-gphoto2
928 (package
929 (name "python-gphoto2")
930 (version "2.2.1")
931 (source (origin
932 (method url-fetch)
933 (uri (pypi-uri "gphoto2" version))
934 (sha256
935 (base32
936 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
937 (build-system python-build-system)
938 (native-inputs
939 (list pkg-config))
940 (inputs
941 (list libgphoto2))
942 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
943 (synopsis "Python interface to libgphoto2")
944 (description "@code{python-gphoto2} is a comprehensive Python interface
945 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
946 automatically generate the interface code.")
947 (license license:gpl3+)))
948
949 (define-public python-colour
950 (package
951 (name "python-colour")
952 (version "0.1.5")
953 (source (origin
954 (method url-fetch)
955 (uri (pypi-uri "colour" version))
956 (sha256
957 (base32
958 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
959 (build-system python-build-system)
960 (native-inputs
961 (list python-d2to1))
962 (home-page "https://github.com/vaab/colour")
963 (synopsis "Convert and manipulate various color representations")
964 (description "Pythonic way to manipulate color representations (HSL, RVB,
965 web, X11, ...).")
966 (license license:expat)))
967
968 (define-public python-d2to1
969 (package
970 (name "python-d2to1")
971 (version "0.2.12.post1")
972 (source (origin
973 (method url-fetch)
974 (uri (pypi-uri "d2to1" version))
975 (sha256
976 (base32
977 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
978 (build-system python-build-system)
979 (native-inputs
980 (list python-nose))
981 (home-page "https://github.com/embray/d2to1")
982 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
983 in python")
984 (description "The python package d2to1 (the d is for distutils) allows
985 using distutils2-like setup.cfg files for a package's metadata with a
986 distribute/setuptools setup.py script.")
987 (license license:bsd-2)))
988
989 (define-public python-rawkit
990 (package
991 (name "python-rawkit")
992 (version "0.6.0")
993 (source (origin
994 (method url-fetch)
995 (uri (pypi-uri "rawkit" version))
996 (sha256
997 (base32
998 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
999 (build-system python-build-system)
1000 (native-inputs
1001 (list python-pytest python-mock))
1002 (inputs
1003 (list libraw))
1004 (home-page "https://rawkit.readthedocs.io")
1005 (synopsis "Ctypes-based LibRaw binding for Python")
1006 (description "The rawkit package provides two modules: rawkit and libraw.
1007 The rawkit module provides a high-level Pythonic interface for developing raw
1008 photos, while the libraw module provides a CTypes based interface for
1009 interacting with the low-level LibRaw C APIs.")
1010 (license license:expat)))
1011
1012 (define-public python-easygui
1013 (package
1014 (name "python-easygui")
1015 (version "0.98.1")
1016 (source (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "easygui" version))
1019 (sha256
1020 (base32
1021 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
1022 (build-system python-build-system)
1023 (propagated-inputs
1024 (list `(,python "tk")))
1025 (home-page "https://github.com/robertlugg/easygui")
1026 (synopsis "GUI programming module for Python")
1027 (description "EasyGUI is a module for very simple, very easy GUI
1028 programming in Python. EasyGUI is different from other GUI generators in that
1029 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
1030 simple function calls.")
1031 (license license:bsd-3)))
1032
1033 (define-public python-pymd4c
1034 (package
1035 (name "python-pymd4c")
1036 (version "0.4.6.0b1")
1037 (source
1038 (origin
1039 (method url-fetch)
1040 (uri (pypi-uri "pymd4c" version))
1041 (sha256
1042 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
1043 (build-system python-build-system)
1044 (inputs
1045 (list md4c))
1046 (native-inputs
1047 (list python-flake8 python-pkgconfig pkg-config))
1048 (home-page "https://github.com/dominickpastore/pymd4c")
1049 (synopsis "Python bindings for MD4C")
1050 (description
1051 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
1052 to CommonMark.")
1053 (license license:expat)))
1054
1055 (define-public python-pymediainfo
1056 (package
1057 (name "python-pymediainfo")
1058 (version "4.1")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "pymediainfo" version))
1063 (sha256
1064 (base32
1065 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
1066 (build-system python-build-system)
1067 (native-inputs
1068 (list python-setuptools-scm python-pytest))
1069 (inputs
1070 (list libmediainfo))
1071 (arguments
1072 `(#:phases
1073 (modify-phases %standard-phases
1074 (add-after 'unpack 'patch-libmediainfo
1075 (lambda _
1076 (substitute* "pymediainfo/__init__.py"
1077 (("libmediainfo.so.0")
1078 (search-input-file %build-inputs
1079 "/lib/libmediainfo.so.0")))))
1080 (replace 'check
1081 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
1082 (when tests?
1083 (add-installed-pythonpath inputs outputs)
1084 ;; Skip the only failing test "test_parse_url" because it tries
1085 ;; to access the internet.
1086 (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
1087 (home-page
1088 "https://github.com/sbraz/pymediainfo")
1089 (synopsis
1090 "Python wrapper for the mediainfo library")
1091 (description
1092 "This package provides a Python wrapper for the mediainfo library to
1093 access the technical and tag data for video and audio files.")
1094 (license license:expat)))
1095
1096 (define-public python-psutil
1097 (package
1098 (name "python-psutil")
1099 (version "5.9.0")
1100 (source
1101 (origin
1102 (method url-fetch)
1103 (uri (pypi-uri "psutil" version))
1104 (sha256
1105 (base32 "09fa4vfhansixvxd3lv664xcrbnfdyfn53hm2wr0rf3bsvdl5646"))))
1106 (build-system python-build-system)
1107 (arguments
1108 ;; FIXME: some tests do not return and time out. Some tests fail because
1109 ;; some processes survive kill().
1110 '(#:tests? #f))
1111 (home-page "https://github.com/giampaolo/psutil")
1112 (synopsis "Library for retrieving information on running processes")
1113 (description
1114 "@code{psutil} (Python system and process utilities) is a library for
1115 retrieving information on running processes and system utilization (CPU,
1116 memory, disks, network) in Python. It is useful mainly for system monitoring,
1117 profiling and limiting process resources and management of running processes.
1118 It implements many functionalities offered by command line tools such as: ps,
1119 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
1120 iotop, uptime, pidof, tty, taskset, pmap.")
1121 (properties `((python2-variant . ,(delay python2-psutil))))
1122 (license license:bsd-3)))
1123
1124 (define-public python2-psutil
1125 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
1126 (package/inherit base
1127 (propagated-inputs
1128 `(("python2-enum34" ,python2-enum34) ;optional
1129 ,@(package-propagated-inputs base))))))
1130
1131 (define-public python-shapely
1132 (package
1133 (name "python-shapely")
1134 (version "1.7.1")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "Shapely" version))
1139 (sha256
1140 (base32
1141 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
1142 (modules '((guix build utils)))
1143 (snippet
1144 '(begin
1145 (delete-file "shapely/speedups/_speedups.c")
1146 (delete-file "shapely/vectorized/_vectorized.c")
1147 #t))))
1148 (build-system python-build-system)
1149 (native-inputs
1150 (list python-cython python-matplotlib python-pytest
1151 python-pytest-cov))
1152 (inputs
1153 (list geos))
1154 (propagated-inputs
1155 (list python-numpy))
1156 (arguments
1157 `(#:phases
1158 (modify-phases %standard-phases
1159 (add-after 'unpack 'patch-geos-path
1160 (lambda* (#:key inputs #:allow-other-keys)
1161 (let ((geos (assoc-ref inputs "geos"))
1162 (glibc (assoc-ref inputs ,(if (%current-target-system)
1163 "cross-libc" "libc"))))
1164 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
1165 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
1166 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
1167 geos "/lib/libgeos_c.so'])"))
1168 (("free = load_dll\\('c'\\)\\.free")
1169 (string-append "free = load_dll('c', fallbacks=['"
1170 glibc "/lib/libc.so.6']).free"))
1171 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
1172 (string-append "free = load_dll('c', fallbacks=['"
1173 glibc "/lib/libc.so.6']).free"))))
1174 #t)))))
1175 (home-page "https://github.com/Toblerity/Shapely")
1176 (synopsis "Library for the manipulation and analysis of geometric objects")
1177 (description "Shapely is a Python package for manipulation and analysis of
1178 planar geometric objects. It is based on the @code{GEOS} library.")
1179 (license license:bsd-3)))
1180
1181 (define-public python-shortuuid
1182 (package
1183 (name "python-shortuuid")
1184 (version "0.5.0")
1185 (source
1186 (origin
1187 (method url-fetch)
1188 (uri (pypi-uri "shortuuid" version))
1189 (sha256
1190 (base32
1191 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
1192 (build-system python-build-system)
1193 (native-inputs
1194 (list python-pep8))
1195 (home-page "https://github.com/skorokithakis/shortuuid")
1196 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
1197 (description
1198 "@code{shortuuid} is a Python library for generating concise, unambiguous
1199 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
1200 module and then similar looking characters are removed.")
1201 (license license:bsd-3)))
1202
1203 (define-public python-logwrap
1204 (package
1205 (name "python-logwrap")
1206 (version "8.2.0.post0")
1207 (source
1208 (origin
1209 (method url-fetch)
1210 (uri (pypi-uri "logwrap" version))
1211 (sha256
1212 (base32
1213 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
1214 (build-system python-build-system)
1215 (arguments
1216 `(#:tests? #f ; Tests not included in pypi release.
1217 #:phases
1218 (modify-phases %standard-phases
1219 (replace 'check
1220 (lambda* (#:key tests? #:allow-other-keys)
1221 (when tests?
1222 (invoke "pytest"))
1223 #t)))))
1224 (native-inputs
1225 (list python-cython python-pytest python-setuptools-scm python-toml
1226 python-wheel))
1227 (home-page "https://github.com/python-useful-helpers/logwrap")
1228 (synopsis "Decorator for logging function arguments")
1229 (description "This package provides a decorator to log function arguments
1230 and function call return values in a human-readable way.")
1231 (license license:asl2.0)))
1232
1233 (define-public python-clyent
1234 (package
1235 (name "python-clyent")
1236 (version "1.2.1")
1237 (source
1238 (origin
1239 (method url-fetch)
1240 (uri (pypi-uri "clyent" version))
1241 (sha256
1242 (base32
1243 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1244 (build-system python-build-system)
1245 (native-inputs
1246 (list python-mock))
1247 (home-page "https://github.com/Anaconda-Platform/clyent")
1248 (synopsis "Command line client library")
1249 (description "Clyent is a Python command line utility library. It is used
1250 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1251 (license license:bsd-3)))
1252
1253 (define-public python2-clyent
1254 (package-with-python2 python-clyent))
1255
1256 (define-public python-babel
1257 (package
1258 (name "python-babel")
1259 (version "2.9.0")
1260 (source
1261 (origin
1262 (method url-fetch)
1263 (uri (pypi-uri "Babel" version))
1264 (sha256
1265 (base32
1266 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1267 (build-system python-build-system)
1268 (native-inputs
1269 (list python-freezegun python-pytest tzdata-for-tests))
1270 (propagated-inputs
1271 (list python-pytz))
1272 (arguments
1273 `(#:phases (modify-phases %standard-phases
1274 (replace 'check
1275 (lambda _
1276 (invoke "pytest" "-vv"))))))
1277 (home-page "https://babel.pocoo.org/")
1278 (synopsis
1279 "Tools for internationalizing Python applications")
1280 (description
1281 "Babel is composed of two major parts:
1282 - tools to build and work with gettext message catalogs
1283 - a Python interface to the CLDR (Common Locale Data Repository), providing
1284 access to various locale display names, localized number and date formatting,
1285 etc.")
1286 (license license:bsd-3)))
1287
1288 (define-public python2-babel
1289 (package
1290 (name "python2-babel")
1291 (version "2.9.0")
1292 (source
1293 (origin
1294 (method url-fetch)
1295 (uri (pypi-uri "Babel" version))
1296 (sha256
1297 (base32
1298 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1299 (build-system python-build-system)
1300 (native-inputs
1301 (list python2-freezegun python2-pytest tzdata-for-tests))
1302 (propagated-inputs
1303 (list python2-pytz))
1304 (arguments
1305 `(#:python ,python-2
1306 #:phases (modify-phases %standard-phases
1307 (replace 'check
1308 (lambda _
1309 (invoke "pytest" "-vv"))))))
1310 (home-page "https://babel.pocoo.org/")
1311 (synopsis
1312 "Tools for internationalizing Python applications")
1313 (description
1314 "Babel is composed of two major parts:
1315 - tools to build and work with gettext message catalogs
1316 - a Python interface to the CLDR (Common Locale Data Repository), providing
1317 access to various locale display names, localized number and date formatting,
1318 etc.")
1319 (license license:bsd-3)))
1320
1321 (define-public python2-backport-ssl-match-hostname
1322 (package
1323 (name "python2-backport-ssl-match-hostname")
1324 (version "3.5.0.1")
1325 (source
1326 (origin
1327 (method url-fetch)
1328 (uri (pypi-uri "backports.ssl_match_hostname" version))
1329 (sha256
1330 (base32
1331 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1332 (build-system python-build-system)
1333 (arguments
1334 `(#:python ,python-2
1335 #:tests? #f)) ; no test target
1336 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
1337 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
1338 (description
1339 "This backport brings the ssl.match_hostname() function to users of
1340 earlier versions of Python. The function checks the hostname in the
1341 certificate returned by the server to which a connection has been established,
1342 and verifies that it matches the intended target hostname.")
1343 (license license:psfl)))
1344
1345 (define-public python-bidict
1346 (package
1347 (name "python-bidict")
1348 (version "0.21.2")
1349 (source
1350 (origin
1351 (method url-fetch)
1352 (uri (pypi-uri "bidict" version))
1353 (sha256
1354 (base32
1355 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1356 (build-system python-build-system)
1357 (native-inputs
1358 (list python-coverage
1359 python-hypothesis
1360 python-pre-commit
1361 python-py
1362 python-pytest
1363 python-pytest-benchmark
1364 python-pytest-cov
1365 python-setuptools-scm
1366 python-sortedcollections
1367 python-sortedcontainers
1368 python-sphinx
1369 python-sphinx-autodoc-typehints
1370 python-tox))
1371 (arguments
1372 `(#:phases (modify-phases %standard-phases
1373 (add-after 'unpack 'relax-reqs
1374 (lambda _
1375 (substitute* "setup.py"
1376 (("sortedcollections < 2") "sortedcollections"))
1377 #t))
1378 (replace 'check
1379 (lambda _ (invoke "./run_tests.py"))))))
1380 (home-page "https://bidict.readthedocs.io")
1381 (synopsis "Bidirectional mapping library")
1382 (description "The @code{bidict} library provides several data structures
1383 for working with bidirectional mappings in Python.")
1384 (license license:mpl2.0)))
1385
1386 (define-public python-bip39
1387 (package
1388 (name "python-bip39")
1389 (version "0.0.2")
1390 (source
1391 (origin
1392 (method url-fetch)
1393 (uri (pypi-uri "bip39" version))
1394 (sha256
1395 (base32 "18m7d3gi7vj2zi0bl1z7m0nhcj6i8j9vj4vil276siagnpkv64ry"))))
1396 (build-system python-build-system)
1397 (native-inputs (list python-pytest))
1398 (home-page "https://github.com/de-centralized-systems/python-bip39/")
1399 (synopsis "Self-contained and simple BIP39 implementation in Python")
1400 (description
1401 "This package provides a self-contained and simple BIP39
1402 implementation written in Python. It includes a @code{bip39.py} executable.
1403
1404 BIP39 is a standardized mapping between binary data (the @emph{entropy}),
1405 and a list of words that are easier to remember for humans (the
1406 @emph{mnemonic}).")
1407 (license license:expat)))
1408
1409 (define-public python-bitarray
1410 (package
1411 (name "python-bitarray")
1412 (version "1.4.0")
1413 (source (origin
1414 (method url-fetch)
1415 (uri (pypi-uri "bitarray" version))
1416 (sha256
1417 (base32
1418 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1419 (build-system python-build-system)
1420 (home-page "https://github.com/ilanschnell/bitarray")
1421 (synopsis "Efficient arrays of booleans")
1422 (description "This package provides an object type which efficiently
1423 represents an array of booleans. Bitarrays are sequence types and behave very
1424 much like usual lists. Eight bits are represented by one byte in a contiguous
1425 block of memory. The user can select between two representations:
1426 little-endian and big-endian. All of the functionality is implemented in C.
1427 Methods for accessing the machine representation are provided. This can be
1428 useful when bit level access to binary files is required, such as portable
1429 bitmap image files. Also, when dealing with compressed data which uses
1430 variable bit length encoding, you may find this module useful.")
1431 (license license:psfl)))
1432
1433 (define-public python-boolean.py
1434 (package
1435 (name "python-boolean.py")
1436 (version "3.6")
1437 (source
1438 (origin
1439 ;; There's no source tarball on PyPI.
1440 (method git-fetch)
1441 (uri (git-reference
1442 (url "https://github.com/bastikr/boolean.py")
1443 (commit (string-append "v" version))))
1444 (file-name (git-file-name name version))
1445 (sha256
1446 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1447 (build-system python-build-system)
1448 (home-page "https://github.com/bastikr/boolean.py")
1449 (synopsis "Boolean algebra in one Python module")
1450 (description
1451 "This is a small Python library that implements boolean algebra.
1452 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1453 @code{Symbol} class that can take on one of these two values. Calculations
1454 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1455 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1456 Expressions are constructed from parsed strings or directly in Python.")
1457 (license license:bsd-2)))
1458
1459 (define-public python-hdf4
1460 (package
1461 (name "python-hdf4")
1462 (version "0.9")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (pypi-uri name version))
1467 (sha256
1468 (base32
1469 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1470 (build-system python-build-system)
1471 (native-inputs `(("nose" ,python-nose)))
1472 (propagated-inputs `(("numpy" ,python-numpy)))
1473 (inputs
1474 `(("hdf4" ,hdf4)
1475 ("libjpeg" ,libjpeg-turbo)
1476 ("zlib" ,zlib)))
1477 (arguments
1478 `(#:phases
1479 (modify-phases %standard-phases
1480 (replace 'check
1481 (lambda _
1482 (invoke "./runexamples.sh")
1483 (invoke "nosetests" "-v"))))))
1484 (home-page "https://github.com/fhs/python-hdf4")
1485 (synopsis "Python interface to the NCSA HDF4 library")
1486 (description
1487 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1488 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1489 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1490 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1491 (license license:expat)))
1492
1493 (define-public python-h5py
1494 (package
1495 (name "python-h5py")
1496 (version "3.6.0")
1497 (source
1498 (origin
1499 (method url-fetch)
1500 (uri (pypi-uri "h5py" version))
1501 (sha256
1502 (base32
1503 "0afv805vqrm5071g7alwv41920nhh8kjv4m5nbia9awj9a0x4ll7"))))
1504 (build-system python-build-system)
1505 (arguments
1506 `(#:tests? #f ; no test target
1507 #:phases
1508 (modify-phases %standard-phases
1509 (add-after 'unpack 'fix-hdf5-paths
1510 (lambda* (#:key inputs #:allow-other-keys)
1511 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5")))))))
1512 (propagated-inputs
1513 (list python-six python-numpy))
1514 (inputs
1515 (list hdf5-1.10))
1516 (native-inputs
1517 (list python-cython python-pkgconfig pkg-config))
1518 (home-page "https://www.h5py.org/")
1519 (synopsis "Read and write HDF5 files from Python")
1520 (description
1521 "The h5py package provides both a high- and low-level interface to the
1522 HDF5 library from Python. The low-level interface is intended to be a
1523 complete wrapping of the HDF5 API, while the high-level component supports
1524 access to HDF5 files, datasets and groups using established Python and NumPy
1525 concepts.")
1526 (license license:bsd-3)
1527 (properties `((python2-variant . ,(delay python2-h5py))))))
1528
1529 (define-public python2-h5py
1530 (let ((base (package-with-python2 (strip-python2-variant python-h5py))))
1531 (package
1532 (inherit base)
1533 (version "2.10.0")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri (pypi-uri "h5py" version))
1538 (sha256
1539 (base32
1540 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4")))))))
1541
1542 (define-public python-hnswlib
1543 (package
1544 (name "python-hnswlib")
1545 (version "0.5.2")
1546 (source
1547 (origin
1548 (method url-fetch)
1549 (uri (pypi-uri "hnswlib" version))
1550 (sha256
1551 (base32 "0wf1cwmxmdzfqmfhrkqdxb5spf21ylgl2bidswhzjrqhwf35c9qf"))))
1552 (build-system python-build-system)
1553 (arguments
1554 `(#:phases
1555 (modify-phases %standard-phases
1556 (add-after 'unpack 'disable-native-optimization
1557 (lambda _
1558 (substitute* "setup.py"
1559 ((", '-march=native'") "")))))))
1560 (propagated-inputs
1561 (list python-numpy))
1562 (native-inputs
1563 (list pybind11))
1564 (home-page "https://github.com/nmslib/hnswlib")
1565 (synopsis "Fast approximate nearest neighbor search")
1566 (description "Hnswlib is a header-only C++ implementation of fast
1567 approximate nearest neighbor search with Python bindings.")
1568 (license license:asl2.0)))
1569
1570 (define-public python-pyls-black
1571 (package
1572 (name "python-pyls-black")
1573 (version "0.4.7")
1574 (source
1575 (origin
1576 ;; There are no tests in the PyPI tarball.
1577 (method git-fetch)
1578 (uri (git-reference
1579 (url "https://github.com/rupert/pyls-black/")
1580 (commit (string-append "v" version))))
1581 (file-name (git-file-name name version))
1582 (sha256
1583 (base32 "0bkhfnlik89j3yamr20br4wm8975f20v33wabi2nyxvj10whr5dj"))
1584 ;; Patch to work with python-lsp-server. Taken from
1585 ;; <https://github.com/rupert/pyls-black/pull/37>.
1586 (modules '((guix build utils)))
1587 (snippet
1588 '(begin
1589 (substitute* "setup.cfg"
1590 (("python-language-server")
1591 "python-lsp-server"))
1592 (substitute* '("pyls_black/plugin.py" "tests/test_plugin.py")
1593 (("pyls_format_document")
1594 "pylsp_format_document")
1595 (("pyls_format_range")
1596 "pylsp_format_range")
1597 (("from pyls([ \\.])" _ char)
1598 (string-append "from pylsp" char)))))))
1599 (build-system python-build-system)
1600 (arguments
1601 `(#:test-target "pytest"))
1602 (propagated-inputs
1603 (list python-black python-lsp-server python-tomli))
1604 (native-inputs
1605 (list python-flake8 python-isort python-mypy python-pytest
1606 python-pytest-runner))
1607 (home-page "https://github.com/rupert/pyls-black")
1608 (synopsis "Black plugin for the Python Language Server")
1609 (description "Black plugin for the Python Language Server.")
1610 (license license:expat)))
1611
1612 (define-public python-sh
1613 (package
1614 (name "python-sh")
1615 (version "1.12.14")
1616 (source
1617 (origin
1618 (method url-fetch)
1619 (uri (pypi-uri "sh" version))
1620 (sha256
1621 (base32
1622 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1623 (build-system python-build-system)
1624 (arguments
1625 '(#:phases
1626 (modify-phases %standard-phases
1627 (replace 'check
1628 (lambda _
1629 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1630 (setenv "HOME" "/tmp")
1631 (invoke "python" "sh.py" "test"))))))
1632 (native-inputs
1633 (list python-coverage))
1634 (home-page "https://github.com/amoffat/sh")
1635 (synopsis "Python subprocess replacement")
1636 (description "This package provides a replacement for Python's
1637 @code{subprocess} feature.")
1638 (license license:expat)))
1639
1640 (define-public python-cftime
1641 (package
1642 (name "python-cftime")
1643 (version "1.5.1.1")
1644 (source
1645 (origin
1646 (method url-fetch)
1647 (uri (pypi-uri "cftime" version))
1648 (sha256
1649 (base32 "0l1a22zlhdpgaisibvvm7dhij4vzfm661rnv00y2snpyqxpdgi3d"))))
1650 (build-system python-build-system)
1651 (propagated-inputs
1652 (list python-numpy))
1653 (native-inputs
1654 (list python-check-manifest
1655 python-coverage
1656 python-coveralls
1657 python-cython
1658 python-pytest-cov
1659 python-sphinx
1660 python-twine
1661 python-wheel))
1662 (home-page "https://unidata.github.io/cftime/")
1663 (synopsis "Library for time handling")
1664 (description
1665 "This package provides time-handling functionality that used to be part
1666 of the netcdf4 package before.")
1667 (license license:expat)))
1668
1669 (define-public python-netcdf4
1670 (package
1671 (name "python-netcdf4")
1672 (version "1.5.3")
1673 (source
1674 (origin
1675 (method url-fetch)
1676 (uri (pypi-uri "netCDF4" version))
1677 (sha256
1678 (base32
1679 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1680 (build-system python-build-system)
1681 (arguments
1682 '(#:phases
1683 (modify-phases %standard-phases
1684 (add-after 'unpack 'configure-locations
1685 (lambda* (#:key inputs #:allow-other-keys)
1686 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1687 #t)))))
1688 (native-inputs
1689 (list python-cython))
1690 (propagated-inputs
1691 (list python-numpy python-cftime))
1692 (inputs
1693 (list netcdf hdf4 hdf5))
1694 (home-page "https://github.com/Unidata/netcdf4-python")
1695 (synopsis "Python/numpy interface to the netCDF library")
1696 (description "Netcdf4-python is a Python interface to the netCDF C
1697 library. netCDF version 4 has many features not found in earlier
1698 versions of the library and is implemented on top of HDF5. This module
1699 can read and write files in both the new netCDF 4 and the old netCDF 3
1700 format, and can create files that are readable by HDF5 clients. The
1701 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1702 to users of that module.")
1703 ;; The software is mainly ISC, but includes some files covered
1704 ;; by the Expat license.
1705 (license (list license:isc license:expat))))
1706
1707 (define-public python-ncclient
1708 (package
1709 (name "python-ncclient")
1710 (version "0.6.12")
1711 (source
1712 (origin
1713 (method git-fetch) ;no tests in PyPI release
1714 (uri (git-reference
1715 (url "https://github.com/ncclient/ncclient")
1716 (commit (string-append "v" version))))
1717 (file-name (git-file-name name version))
1718 (sha256
1719 (base32
1720 "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
1721 (build-system python-build-system)
1722 (arguments
1723 `(#:phases (modify-phases %standard-phases
1724 (replace 'check
1725 (lambda* (#:key tests? #:allow-other-keys)
1726 (when tests?
1727 (invoke "pytest")))))))
1728 (native-inputs
1729 (list python-pytest))
1730 (propagated-inputs
1731 (list python-lxml python-paramiko))
1732 (home-page "https://github.com/ncclient/ncclient")
1733 (synopsis "Python library for NETCONF clients")
1734 (description "@code{ncclient} is a Python library that facilitates
1735 client-side scripting and application development around the NETCONF
1736 protocol.")
1737 (license license:asl2.0)))
1738
1739 (define-public python-license-expression
1740 (package
1741 (name "python-license-expression")
1742 (version "1.2")
1743 (source
1744 (origin
1745 (method url-fetch)
1746 (uri (pypi-uri "license-expression" version))
1747 (sha256
1748 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1749 (build-system python-build-system)
1750 (propagated-inputs
1751 (list python-boolean.py))
1752 (home-page "https://github.com/nexB/license-expression")
1753 (synopsis "Apply boolean logic to license expressions")
1754 (description
1755 "This Python module defines a tiny language to evaluate and compare
1756 license expressions using boolean logic. Logical combinations of licenses can
1757 be tested for equality, containment, and equivalence. They can be normalised
1758 and simplified. It supports SPDX license expressions as well as other naming
1759 conventions and aliases in the same expression.")
1760 (license license:gpl2+)))
1761
1762 (define-public python-wand
1763 (package
1764 (name "python-wand")
1765 (version "0.6.7")
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (pypi-uri "Wand" version))
1770 (sha256
1771 (base32 "1nxn7zvbnfgk4kkxajbzglcjpbgr84ilhnxm990nifjxqb61ph7b"))))
1772 (build-system python-build-system)
1773 (arguments
1774 `(#:phases
1775 (modify-phases %standard-phases
1776 (add-after 'unpack 'find-magickwand
1777 (lambda* (#:key inputs #:allow-other-keys)
1778 (setenv "MAGICK_HOME" (assoc-ref inputs "imagemagick"))
1779 (setenv "WAND_MAGICK_LIBRARY_SUFFIX" ".Q16"))))))
1780 (native-inputs
1781 (list python-pytest))
1782 (inputs
1783 (list imagemagick))
1784 (home-page "https://docs.wand-py.org/")
1785 (synopsis "MagickWand API binding for Python")
1786 (description
1787 "Wand is a ctypes-based binding for the C API of ImageMagick's MagickWand
1788 library.")
1789 (license license:expat)))
1790
1791 (define-public python-lockfile
1792 (package
1793 (name "python-lockfile")
1794 (version "0.12.2")
1795 (source
1796 (origin
1797 (method url-fetch)
1798 (uri (pypi-uri "lockfile" version))
1799 (sha256
1800 (base32
1801 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1802 (build-system python-build-system)
1803 (arguments '(#:test-target "check"))
1804 (native-inputs
1805 (list python-pbr))
1806 (home-page "https://launchpad.net/pylockfile")
1807 (synopsis "Platform-independent file locking module")
1808 (description
1809 "The lockfile package exports a LockFile class which provides a simple
1810 API for locking files.")
1811 (license license:expat)))
1812
1813 (define-public python-fb-re2
1814 (package
1815 (name "python-fb-re2")
1816 (version "1.0.7")
1817 (source
1818 (origin
1819 (method git-fetch)
1820 (uri (git-reference
1821 (url "https://github.com/facebook/pyre2")
1822 (commit (string-append "v" version))))
1823 (file-name (git-file-name name version))
1824 (sha256
1825 (base32
1826 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1827 (build-system python-build-system)
1828 (inputs
1829 (list re2))
1830 (home-page "https://github.com/facebook/pyre2")
1831 (synopsis "Python wrapper for RE2")
1832 (description "This package provides a Python extension that wraps Google's
1833 RE2 regular expression library. It implements many of the features of
1834 Python's built-in @code{re} module with compatible interfaces.")
1835 (license license:bsd-3)))
1836
1837 (define-public python-filelock
1838 (package
1839 (name "python-filelock")
1840 (version "3.0.12")
1841 (source
1842 (origin
1843 (method url-fetch)
1844 (uri (pypi-uri "filelock" version))
1845 (sha256
1846 (base32
1847 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1848 (build-system python-build-system)
1849 (home-page
1850 "https://github.com/benediktschmitt/py-filelock")
1851 (synopsis "Platform independent file lock")
1852 (description "@code{filelock} contains a single module implementing
1853 a platform independent file lock in Python, which provides a simple way of
1854 inter-process communication.")
1855 (license license:unlicense)))
1856
1857 (define-public python-semantic-version
1858 (package
1859 (name "python-semantic-version")
1860 (version "2.8.5")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "semantic_version" version))
1865 (sha256
1866 (base32
1867 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1868 (build-system python-build-system)
1869 (home-page "https://github.com/rbarrois/python-semanticversion")
1870 (synopsis "Semantic versioning module for Python")
1871 (description
1872 "The @code{semantic_version} class is a small library for handling
1873 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1874
1875 It can compare versions, generate a new version that represents a bump in one of
1876 the version levels, and check whether any given string is a proper semantic
1877 version identifier.")
1878 (license license:bsd-3)))
1879
1880 (define-public python2-semantic-version
1881 (package-with-python2 python-semantic-version))
1882
1883 (define-public python-serpent
1884 (package
1885 (name "python-serpent")
1886 (version "1.28")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "serpent" version))
1891 (sha256
1892 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1893 (build-system python-build-system)
1894 (native-inputs
1895 (list python-attrs python-pytz))
1896 (home-page "https://github.com/irmen/Serpent")
1897 (synopsis "Serializer for literal Python expressions")
1898 (description
1899 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1900 serialization. It serializes an object tree into bytes (an utf-8 encoded
1901 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1902 to rebuild the original object tree.
1903
1904 Because only safe literals are encoded, it is safe to send serpent data to
1905 other machines, such as over the network.")
1906 (properties `((python2-variant . ,(delay python2-serpent))))
1907 (license license:expat)))
1908
1909 (define-public python2-serpent
1910 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1911 (package/inherit base
1912 (propagated-inputs
1913 `(("python-enum34" ,python2-enum34)
1914 ,@(package-propagated-inputs base))))))
1915
1916 (define-public python-setuptools
1917 (package
1918 (name "python-setuptools")
1919 (version "62.0.0")
1920 (source
1921 (origin
1922 (method url-fetch)
1923 (uri (pypi-uri "setuptools" version))
1924 (sha256
1925 (base32
1926 "0sm8n6y6q640cpac9wjyggidbgi4n9la7vs7pwriyvhvgzccp6br"))
1927 (modules '((guix build utils)))
1928 (snippet
1929 ;; Remove included binaries which are used to build self-extracting
1930 ;; installers for Windows.
1931 ;; TODO: Find some way to build them ourself so we can include them.
1932 '(for-each delete-file (find-files "setuptools"
1933 "^(cli|gui).*\\.exe$")))))
1934 (build-system python-build-system)
1935 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1936 ;; One could bootstrap with an internal untested setuptools.
1937 (arguments (list #:tests? #f))
1938 (home-page "https://pypi.org/project/setuptools/")
1939 (synopsis "Library designed to facilitate packaging Python projects")
1940 (description "Setuptools is a fully-featured, stable library designed to
1941 facilitate packaging Python projects, where packaging includes:
1942 @itemize
1943 @item Python package and module definitions
1944 @item distribution package metadata
1945 @item test hooks
1946 @item project installation
1947 @item platform-specific details.
1948 @end itemize")
1949 ;; TODO: setuptools now bundles the following libraries:
1950 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1951 (license (list license:psfl ;setuptools itself
1952 license:expat ;six, appdirs, pyparsing
1953 license:asl2.0 ;packaging is dual ASL2/BSD-2
1954 license:bsd-2))
1955 (properties `((python2-variant . ,(delay python2-setuptools))))))
1956
1957 ;; Newer versions of setuptools no longer support Python 2.
1958 (define-public python2-setuptools
1959 (package
1960 (name "python2-setuptools")
1961 (version "41.0.1")
1962 (source
1963 (origin
1964 (method url-fetch)
1965 (uri (pypi-uri "setuptools" version ".zip"))
1966 (sha256
1967 (base32
1968 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1969 (modules '((guix build utils)))
1970 (snippet
1971 '(begin
1972 ;; Remove included binaries which are used to build self-extracting
1973 ;; installers for Windows.
1974 ;; TODO: Find some way to build them ourself so we can include them.
1975 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1976 #t))))
1977 (build-system python-build-system)
1978 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1979 ;; One could bootstrap with an internal untested setuptools.
1980 (arguments
1981 `(#:tests? #f
1982 #:phases
1983 (modify-phases %standard-phases
1984 (add-after 'unpack 'compatibility-fixes
1985 (lambda _
1986 ;; HTMLParser no longer exists.
1987 (substitute* "setuptools/py33compat.py"
1988 (("html_parser.HTMLParser\\(\\).unescape")
1989 "html.unescape"))
1990 ;; This needs distutils.msvc9compiler
1991 (delete-file "setuptools/tests/test_msvc.py"))))))
1992 (native-inputs
1993 (list unzip))
1994 (home-page "https://pypi.org/project/setuptools/")
1995 (synopsis
1996 "Library designed to facilitate packaging Python projects")
1997 (description
1998 "Setuptools is a fully-featured, stable library designed to facilitate
1999 packaging Python projects, where packaging includes:
2000 Python package and module definitions,
2001 distribution package metadata,
2002 test hooks,
2003 project installation,
2004 platform-specific details,
2005 Python 3 support.")
2006 ;; TODO: setuptools now bundles the following libraries:
2007 ;; packaging, pyparsing, six and appdirs. How to unbundle?
2008 (license (list license:psfl ; setuptools itself
2009 license:expat ; six, appdirs, pyparsing
2010 license:asl2.0 ; packaging is dual ASL2/BSD-2
2011 license:bsd-2))))
2012
2013 (define-public python-setuptools-declarative-requirements
2014 (package
2015 (name "python-setuptools-declarative-requirements")
2016 (version "1.2.0")
2017 (source
2018 (origin
2019 (method url-fetch)
2020 (uri (pypi-uri
2021 "setuptools-declarative-requirements"
2022 version))
2023 (sha256
2024 (base32
2025 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
2026 (build-system python-build-system)
2027 (native-inputs
2028 (list python-pytest python-setuptools-scm))
2029 (propagated-inputs
2030 (list python-toml python-wheel))
2031 (home-page
2032 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
2033 (synopsis "File support for setuptools declarative setup.cfg")
2034 (description
2035 "This package provides file support for setuptools declarative
2036 @code{setup.cfg}.")
2037 (license license:asl2.0)))
2038
2039 ;; The setuptools provided by Python 3.9 is too new for Tensorflow.
2040 (define-public python-setuptools-for-tensorflow
2041 (hidden-package
2042 (package
2043 (inherit python-setuptools)
2044 (version "39.1.0")
2045 (source (origin
2046 (inherit (package-source python-setuptools))
2047 (uri (pypi-uri "setuptools" version ".zip"))
2048 (sha256
2049 (base32
2050 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65"))))
2051 (arguments
2052 `(#:tests? #f ; tests require vendored resources
2053 #:phases
2054 (modify-phases %standard-phases
2055 (add-after 'unpack 'compatibility-fixes
2056 (lambda _
2057 ;; Python 3.9 no longer has HTMLParser
2058 (substitute* "setuptools/py33compat.py"
2059 (("html_parser.HTMLParser\\(\\).unescape")
2060 "html.unescape"))
2061 ;; This needs distutils.msvc9compiler
2062 (delete-file "setuptools/tests/test_msvc.py"))))))
2063 (native-inputs
2064 (list python-pytest python-mock python-six)))))
2065
2066 (define-public python-uniseg
2067 (package
2068 (name "python-uniseg")
2069 (version "0.7.1")
2070 (source
2071 (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "uniseg" version ".zip"))
2074 (sha256
2075 (base32
2076 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
2077 (build-system python-build-system)
2078 (arguments
2079 '(#:tests? #f)) ; The test suite requires network access.
2080 (native-inputs
2081 (list unzip))
2082 (home-page
2083 "https://bitbucket.org/emptypage/uniseg-python")
2084 (synopsis
2085 "Python library to determine Unicode text segmentations")
2086 (description
2087 "Uniseg is a Python package used to determine Unicode text segmentations.
2088 Supported segmentations include:
2089 @enumerate
2090 @item @dfn{Code point} (any value in the Unicode codespace)
2091 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
2092 multiple Unicode code points, e.g. \"G\" + acute-accent)
2093 @item Word break
2094 @item Sentence break
2095 @item Line break
2096 @end enumerate")
2097 (license license:expat)))
2098
2099 (define-public python2-uniseg
2100 (package-with-python2 python-uniseg))
2101
2102 (define-public python-humanfriendly
2103 (package
2104 (name "python-humanfriendly")
2105 (version "8.2")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (pypi-uri "humanfriendly" version))
2110 (sha256
2111 (base32
2112 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
2113 (build-system python-build-system)
2114 (arguments
2115 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
2116 #:tests? #f))
2117 (home-page "https://humanfriendly.readthedocs.io")
2118 (synopsis "Human-friendly input and output in Python")
2119 (description
2120 "The functions and classes in @code{humanfriendly} can be used to make
2121 text interfaces more user-friendly. It includes tools to parse and format
2122 numbers, file sizes, and timespans, timers for long-running operations, menus
2123 to allow the user to choose from a list of options, and terminal interaction
2124 helpers.")
2125 (properties `((python2-variant . ,(delay python2-humanfriendly))))
2126 (license license:expat)))
2127
2128 (define-public python2-humanfriendly
2129 (let ((base (package-with-python2
2130 (strip-python2-variant python-humanfriendly))))
2131 (package/inherit base
2132 (propagated-inputs
2133 `(("python2-monotonic" ,python2-monotonic)
2134 ,@(package-propagated-inputs base))))))
2135
2136 (define-public python-textparser
2137 (package
2138 (name "python-textparser")
2139 (version "0.23.0")
2140 (source
2141 (origin
2142 (method url-fetch)
2143 (uri (pypi-uri "textparser" version))
2144 (sha256
2145 (base32
2146 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
2147 (build-system python-build-system)
2148 (home-page "https://github.com/eerimoq/textparser")
2149 (synopsis "Fast text parser for Python")
2150 (description "This library provides a text parser written in the Python
2151 language. It aims to be fast.")
2152 (license license:expat)))
2153
2154 (define-public python-aenum
2155 (package
2156 (name "python-aenum")
2157 (version "2.2.4")
2158 (source
2159 (origin
2160 (method url-fetch)
2161 (uri (pypi-uri "aenum" version))
2162 (sha256
2163 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
2164 (build-system python-build-system)
2165 (arguments
2166 `(#:phases (modify-phases %standard-phases
2167 (replace 'check
2168 (lambda _
2169 ;; We must run the test suite module directly, as it
2170 ;; fails to define the 'tempdir' variable in scope for
2171 ;; the tests otherwise
2172 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
2173 ;; issues/32/running-tests-with-python-setuppy-test).
2174 (invoke "python3" "aenum/test.py")
2175 ;; This one fails with "NameError: name
2176 ;; 'test_pickle_dump_load' is not defined" (see:
2177 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
2178 ;; /error-running-the-test_v3py-test-suite).
2179 ;; (invoke "python3" "aenum/test_v3.py")
2180 #t)))))
2181 (home-page "https://bitbucket.org/stoneleaf/aenum")
2182 (synopsis "Advanced enumerations, namedtuples and constants for Python")
2183 (description "The aenum library includes an @code{Enum} base class, a
2184 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
2185 class.")
2186 (license license:bsd-3)))
2187
2188 (define-public python-can
2189 (package
2190 (name "python-can")
2191 (version "4.0.0")
2192 (source
2193 (origin
2194 (method url-fetch)
2195 (uri (pypi-uri "python-can" version))
2196 (sha256
2197 (base32
2198 "0pcbdgdw94lc2sxd56w6wdsshrs9dd5d3wp0x4sfd0drzx32inar"))))
2199 (build-system python-build-system)
2200 (arguments
2201 `(#:phases (modify-phases %standard-phases
2202 (add-after 'unpack 'relax-version-requirements
2203 (lambda _
2204 (substitute* "setup.py"
2205 (("mock~=2\\.0") "mock")
2206 (("coverage<5") "coverage")
2207 (("pytest~=4\\.6") "pytest")
2208 (("pytest-timeout~=1\\.3") "pytest-timeout")
2209 (("pytest-cov.*") "pytest-cov\n")
2210 (("hypothesis~=4\\.56") "hypothesis"))))
2211 (add-after 'unpack 'fix-broken-tests
2212 ;; The tests try to run two scripts it expects should be
2213 ;; in PATH, but they aren't at this time (see:
2214 ;; https://github.com/hardbyte/python-can/issues/805).
2215 (lambda _
2216 (substitute* "test/test_scripts.py"
2217 (("\"can_logger\\.py --help\"") "")
2218 (("\"can_player\\.py --help\"") ""))))
2219 (replace 'check
2220 (lambda* (#:key tests? #:allow-other-keys)
2221 (when tests?
2222 (invoke "pytest" "-vv" "test"
2223 ;; Disable tests which require specific CAN
2224 ;; drivers we have no package for in Guix.
2225 "--ignore" "test/test_interface_canalystii.py"
2226 ;; These tests fail with "OSError: [Errno 19]
2227 ;; No such device".
2228 "-k" "not BasicTestUdpMulticastBusIPv")))))))
2229 (propagated-inputs
2230 (list python-msgpack python-typing-extensions python-wrapt))
2231 (native-inputs
2232 (list python-codecov
2233 python-coverage
2234 python-future
2235 python-hypothesis
2236 python-mock
2237 python-parameterized
2238 python-pyserial
2239 python-pytest
2240 python-pytest-cov
2241 python-pytest-runner
2242 python-pytest-timeout))
2243 (home-page "https://github.com/hardbyte/python-can")
2244 (synopsis "Controller Area Network (CAN) interface module for Python")
2245 (description "This package defines the @code{can} module, which provides
2246 controller area network (CAN) support for Python developers; providing common
2247 abstractions to different hardware devices, and a suite of utilities for
2248 sending and receiving messages on a CAN bus.")
2249 (license license:lgpl3+)))
2250
2251 (define-public python-caniusepython3
2252 (package
2253 (name "python-caniusepython3")
2254 (version "7.2.0")
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri (pypi-uri "caniusepython3" version))
2259 (sha256
2260 (base32
2261 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
2262 (build-system python-build-system)
2263 (arguments
2264 `(#:phases (modify-phases %standard-phases
2265 (add-after 'unpack 'relax-requirements
2266 (lambda _
2267 (substitute* "setup.py"
2268 ;; These are for compatibility with Python 2.
2269 ((".*'argparse', 'backports.functools_lru_cache',.*")
2270 ""))
2271 (substitute* "dev_requirements.txt"
2272 ((".*pylint.*") "")) ;not actually required
2273 #t))
2274 (replace 'check
2275 (lambda _
2276 (invoke "py.test" "-k" "not NetworkTests"))))))
2277 (propagated-inputs
2278 (list python-distlib python-packaging python-requests))
2279 (native-inputs
2280 (list python-mock python-pytest))
2281 (home-page "https://github.com/brettcannon/caniusepython3")
2282 (synopsis "Check for Python 3-incompatible Python libraries")
2283 (description "The @command{caniusepython3} command scans your project and
2284 reports the Python 3-incompatible libraries it found. It can also be used as
2285 a library.")
2286 (license license:asl2.0)))
2287
2288 (define-public python-diskcache
2289 (package
2290 (name "python-diskcache")
2291 (version "4.1.0")
2292 (source
2293 (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "diskcache" version))
2296 (sha256
2297 (base32
2298 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
2299 (build-system python-build-system)
2300 (arguments
2301 `(#:tests? #f)) ;test suite not included in the release
2302 (home-page "http://www.grantjenks.com/docs/diskcache/")
2303 (synopsis "Disk and file backed cache library")
2304 (description "DiskCache is a disk and file backed persistent cache.")
2305 (license license:asl2.0)))
2306
2307 (define-public python-argparse-addons
2308 (package
2309 (name "python-argparse-addons")
2310 (version "0.7.0")
2311 (source
2312 (origin
2313 (method url-fetch)
2314 (uri (pypi-uri "argparse_addons" version))
2315 (sha256
2316 (base32 "1yx54dmnr3xggjcjk6bbdafvzp6cynrakl56wyz3jglmfvk0znpm"))))
2317 (build-system python-build-system)
2318 (home-page "https://github.com/eerimoq/argparse_addons")
2319 (synopsis "Extensions for Python's @code{argparse} library")
2320 (description "This Python library provides additional types and actions
2321 for the standard @code{argparse} library.")
2322 (license license:expat)))
2323
2324 (define-public python-bitstruct
2325 (package
2326 (name "python-bitstruct")
2327 (version "8.14.0")
2328 (source
2329 (origin
2330 (method url-fetch)
2331 (uri (pypi-uri "bitstruct" version))
2332 (sha256
2333 (base32
2334 "149c73yrqbph71bbyf925r2mbh2jdymqxc6d49lnylpiflf1j313"))))
2335 (build-system python-build-system)
2336 (home-page "https://github.com/eerimoq/bitstruct")
2337 (synopsis "Python values to and C bit field structs converter")
2338 (description "This module performs conversions between Python values and C
2339 bit field structs represented as Python byte strings. It is intended to have
2340 a similar interface as the @code{struct} module from Python, but working on
2341 bits instead of primitive data types like @code{char}, @code{int}, etc.")
2342 (license license:expat)))
2343
2344 (define-public python-cantools
2345 (package
2346 (name "python-cantools")
2347 (version "37.0.7")
2348 (source
2349 (origin
2350 ;; We take the sources from the Git repository as the documentation is
2351 ;; not included with the PyPI archive.
2352 (method git-fetch)
2353 (uri (git-reference
2354 (url "https://github.com/eerimoq/cantools")
2355 (commit version)))
2356 (file-name (git-file-name name version))
2357 (sha256
2358 (base32
2359 "1qcf1fcwif7w70qmhxw2b8kqh420igbinq60p1chzf98xcb0ansx"))))
2360 (build-system python-build-system)
2361 (arguments
2362 (list
2363 #:phases
2364 #~(modify-phases %standard-phases
2365 (add-after 'build 'build-doc
2366 (lambda _
2367 ;; See: https://github.com/eerimoq/cantools/issues/190.
2368 (substitute* "README.rst"
2369 (("https://github.com/eerimoq/cantools/raw/master\
2370 /docs/monitor.png")
2371 "monitor.png"))
2372 (invoke "make" "-C" "docs" "man" "info")))
2373 (add-after 'install 'install-doc
2374 (lambda* (#:key outputs #:allow-other-keys)
2375 (let* ((info (string-append #$output "/share/info"))
2376 (man1 (string-append #$output "/share/man/man1")))
2377 (install-file "docs/_build/texinfo/cantools.info" info)
2378 (install-file "docs/_build/man/cantools.1" man1)))))))
2379 (native-inputs (list python-sphinx texinfo))
2380 (propagated-inputs
2381 (list python-argparse-addons
2382 python-bitstruct
2383 python-can
2384 python-crccheck
2385 python-diskcache
2386 python-matplotlib
2387 python-parameterized
2388 python-textparser))
2389 (home-page "https://github.com/eerimoq/cantools")
2390 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
2391 (description "This package includes Controller Area Network (CAN) related
2392 tools that can be used to:
2393 @itemize
2394 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
2395 @item encode and decode CAN messages
2396 @item multiplex simple and extended signals
2397 @item diagnose DID encoding and decoding
2398 @item dump the CAN decoder output
2399 @item test CAN nodes
2400 @item generate C source code
2401 @item monitor the CAN bus
2402 @end itemize")
2403 (license license:expat)))
2404
2405 (define-public python-capturer
2406 (package
2407 (name "python-capturer")
2408 (version "2.4")
2409 (source
2410 (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "capturer" version))
2413 (sha256
2414 (base32
2415 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2416 (build-system python-build-system)
2417 (arguments
2418 `(#:tests? #f))
2419 (propagated-inputs
2420 (list python-humanfriendly))
2421 (home-page "https://capturer.readthedocs.io")
2422 (synopsis "Capture stdout and stderr streams of the current process")
2423 (description
2424 "The capturer package makes it easy to capture the stdout and stderr
2425 streams of the current process and subprocesses. Output can be relayed
2426 to the terminal in real time but is also available to the Python program
2427 for additional processing.")
2428 (license license:expat)))
2429
2430 (define-public python2-capturer
2431 (package-with-python2 python-capturer))
2432
2433 (define-public python-case
2434 (package
2435 (name "python-case")
2436 (version "1.5.3")
2437 (source
2438 (origin
2439 (method url-fetch)
2440 (uri (pypi-uri "case" version))
2441 (sha256
2442 (base32
2443 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2444 (build-system python-build-system)
2445 (propagated-inputs
2446 (list python-mock python-nose python-six python-unittest2))
2447 (native-inputs
2448 (list python-coverage))
2449 (home-page "https://github.com/celery/case")
2450 (synopsis "Unittest utilities and convenience methods")
2451 (description
2452 "The @code{case} package provides utilities on top of unittest, including
2453 some helpful Python 2 compatibility convenience methods.")
2454 (license license:bsd-3)))
2455
2456 (define-public python-verboselogs
2457 (package
2458 (name "python-verboselogs")
2459 (version "1.7")
2460 (source
2461 (origin
2462 (method url-fetch)
2463 (uri (pypi-uri "verboselogs" version))
2464 (sha256
2465 (base32
2466 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2467 (build-system python-build-system)
2468 (arguments
2469 `(#:phases
2470 (modify-phases %standard-phases
2471 (replace 'check
2472 (lambda _
2473 ;; Do not run pylint plugin test, as astroid is an old
2474 ;; unsupported version.
2475 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2476 "verboselogs/tests.py"))))))
2477 (native-inputs
2478 (list python-mock python-pytest))
2479 (home-page "https://verboselogs.readthedocs.io")
2480 (synopsis "Verbose logging level for Python's logging module")
2481 (description
2482 "The @code{verboselogs} package extends Python's @code{logging} module to
2483 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2484 (license license:expat)))
2485
2486 (define-public python2-verboselogs
2487 (package-with-python2 python-verboselogs))
2488
2489 (define-public python-coloredlogs
2490 (package
2491 (name "python-coloredlogs")
2492 (version "10.0")
2493 (source
2494 (origin
2495 (method url-fetch)
2496 (uri (pypi-uri "coloredlogs" version))
2497 (sha256
2498 (base32
2499 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2500 (build-system python-build-system)
2501 (arguments
2502 `(;Tests require some updated modules
2503 #:tests? #f))
2504 (propagated-inputs
2505 (list python-capturer))
2506 (home-page "https://coloredlogs.readthedocs.io")
2507 (synopsis "Colored stream handler for Python's logging module")
2508 (description
2509 "The @code{coloredlogs} package enables colored terminal output for
2510 Python's logging module. The @code{ColoredFormatter} class inherits from
2511 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2512 messages in color.")
2513 (license license:expat)))
2514
2515 (define-public python2-coloredlogs
2516 (package-with-python2 python-coloredlogs))
2517
2518 (define-public python-editorconfig
2519 (package
2520 (name "python-editorconfig")
2521 (version "0.12.2")
2522 (source
2523 (origin
2524 (method url-fetch)
2525 (uri (pypi-uri "EditorConfig" version))
2526 (sha256
2527 (base32
2528 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2529 (build-system python-build-system)
2530 (home-page "https://editorconfig.org/")
2531 (synopsis "EditorConfig bindings for python")
2532 (description "The EditorConfig project consists of a file format for
2533 defining coding styles and a collection of text editor plugins that enable
2534 editors to read the file format and adhere to defined styles. EditorConfig
2535 files are easily readable and they work nicely with version control systems.")
2536 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2537 (license (list license:bsd-2 license:psfl))))
2538
2539 (define-public dosage
2540 (package
2541 (name "dosage")
2542 (version "2.17")
2543 (source
2544 (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "dosage" version))
2547 (sha256
2548 (base32
2549 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2550 (build-system python-build-system)
2551 (propagated-inputs
2552 (list python2-backports-functools-lru-cache
2553 python2-backports-shutil-get-terminal-size
2554 python-cached-property
2555 python-colorama
2556 python-imagesize
2557 python-importlib-metadata
2558 python-lxml
2559 python-requests
2560 python-six))
2561 (native-inputs
2562 (list python-pytest-cov python-pytest-xdist python-responses
2563 python-setuptools-scm))
2564 (home-page "https://github.com/webcomics/dosage")
2565 (synopsis "Comic strip downloader and archiver")
2566 (description "Dosage is designed to keep a local copy of specific webcomics and other
2567 picture-based content such as Picture of the Day sites. With the @command{dosage}
2568 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2569 downloaded, or download a strip for a particular date or index, if possible.")
2570 (license license:expat)))
2571
2572 (define-public python-et-xmlfile
2573 (package
2574 (name "python-et-xmlfile")
2575 (version "1.0.1")
2576 (source
2577 (origin
2578 (method url-fetch)
2579 (uri (pypi-uri "et_xmlfile" version))
2580 (sha256
2581 (base32
2582 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2583 (build-system python-build-system)
2584 (arguments
2585 `(#:phases (modify-phases %standard-phases
2586 (replace 'check
2587 (lambda _
2588 (invoke "pytest"))))))
2589 (native-inputs
2590 (list python-pytest python-lxml)) ;used for the tests
2591 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2592 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2593 (description "This Python library is based upon the @code{xmlfile} module
2594 from @code{lxml}. It aims to provide a low memory, compatible implementation
2595 of @code{xmlfile}.")
2596 (license license:expat)))
2597
2598 (define-public python2-et-xmlfile
2599 (package-with-python2 python-et-xmlfile))
2600
2601 (define-public python-openpyxl
2602 (package
2603 (name "python-openpyxl")
2604 (version "3.0.9")
2605 (source
2606 (origin
2607 ;; We use the upstream repository, as the tests are not included in the
2608 ;; PyPI releases.
2609 (method hg-fetch)
2610 (uri (hg-reference
2611 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2612 (changeset version)))
2613 (file-name (string-append name "-" version "-checkout"))
2614 (sha256
2615 (base32 "1p8xvc2gjw6zyzbd7qdvc3x178sm00ymrbyh9539l4fpzgxh0j9c"))))
2616 (build-system python-build-system)
2617 (arguments
2618 `(#:phases (modify-phases %standard-phases
2619 (replace 'check
2620 (lambda _
2621 (invoke "pytest"))))))
2622 (native-inputs
2623 ;; For the test suite.
2624 (list python-lxml python-pillow python-pytest))
2625 (propagated-inputs
2626 (list python-et-xmlfile python-jdcal))
2627 (home-page "https://openpyxl.readthedocs.io")
2628 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2629 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2630 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2631 standard.")
2632 (properties `((python2-variant . ,(delay python2-openpyxl))))
2633 (license license:expat)))
2634
2635 (define-public python2-openpyxl
2636 (let ((base (package-with-python2
2637 (strip-python2-variant python-openpyxl))))
2638 (package
2639 (inherit base)
2640 ;; This is the latest version that has python2 support
2641 (version "2.6.4")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "openpyxl" version))
2646 (sha256
2647 (base32
2648 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2649 (arguments
2650 `(#:python ,python-2
2651 #:tests? #f))))) ; No test suite.
2652
2653 (define-public python-eventlet
2654 (package
2655 (name "python-eventlet")
2656 (version "0.33.0")
2657 (source
2658 (origin
2659 (method url-fetch)
2660 (uri (pypi-uri "eventlet" version))
2661 (sha256
2662 (base32
2663 "07qlyhcm0f28sxdizawvdf3d50m3hnbzz5kg3fjp7chvki44y540"))))
2664 (build-system python-build-system)
2665 (propagated-inputs
2666 (list python-dnspython python-greenlet python-monotonic python-six))
2667 (native-inputs
2668 (list python-nose))
2669 (arguments
2670 '(#:phases
2671 (modify-phases %standard-phases
2672 (add-after 'unpack 'avoid-OSError
2673 (lambda _
2674 ;; If eventlet tries to load greendns, an OSError is thrown when
2675 ;; getprotobyname is called. Thankfully there is an environment
2676 ;; variable to disable the greendns import, so use it:
2677 (setenv "EVENTLET_NO_GREENDNS" "yes")))
2678 (add-after 'unpack 'delete-broken-tests
2679 (lambda _
2680 (delete-file "tests/greendns_test.py")
2681 (delete-file "tests/socket_test.py")))
2682 ;; See https://github.com/eventlet/eventlet/issues/562#issuecomment-714183009
2683 (replace 'check
2684 (lambda* (#:key tests? #:allow-other-keys)
2685 (when tests?
2686 (invoke "nosetests" "-v" "tests/")))))))
2687 (home-page "https://eventlet.net")
2688 (synopsis "Concurrent networking library for Python")
2689 (description
2690 "Eventlet is a concurrent networking library for Python that
2691 allows you to change how you run your code, not how you write it.
2692 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2693 Coroutines ensure that the developer uses a blocking style of programming
2694 that is similar to threading, but provide the benefits of non-blocking I/O.
2695 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2696 from the Python interpreter, or as a small part of a larger application.")
2697 (license license:expat)))
2698
2699 (define-public python-sinfo
2700 (package
2701 (name "python-sinfo")
2702 (version "0.3.4")
2703 (source (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "sinfo" version))
2706 (sha256
2707 (base32
2708 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2709 (build-system python-build-system)
2710 (propagated-inputs
2711 (list python-stdlib-list))
2712 (home-page "https://gitlab.com/joelostblom/session_info")
2713 (synopsis "Output module version information loaded in a Python session")
2714 (description "This package outputs version information for modules loaded
2715 in the current session, Python, and the OS.")
2716 (license license:bsd-3)))
2717
2718 (define-public python-six
2719 (package/inherit python-six-bootstrap
2720 (name "python-six")
2721 (arguments
2722 `(#:phases
2723 (modify-phases %standard-phases
2724 (replace 'check
2725 (lambda _
2726 (invoke "pytest" "-v"))))))
2727 (native-inputs
2728 `(("python-pytest" ,python-pytest-bootstrap)))))
2729
2730 (define-public python2-six
2731 (package-with-python2 python-six))
2732
2733 (define-public python-schedule
2734 (package
2735 (name "python-schedule")
2736 (version "0.4.3")
2737 (source
2738 (origin
2739 (method url-fetch)
2740 (uri (pypi-uri "schedule" version))
2741 (sha256
2742 (base32
2743 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2744 (build-system python-build-system)
2745 (native-inputs
2746 (list python-pytest python-mock))
2747 (home-page "https://github.com/dbader/schedule")
2748 (synopsis "Schedule periodic function calls in Python")
2749 (description
2750 "Schedule is an in-process scheduler for periodic jobs that uses the
2751 builder pattern for configuration. Schedule lets you run Python functions (or
2752 any other callable) periodically at pre-determined intervals using a simple,
2753 human-friendly syntax.")
2754 (license license:expat)))
2755
2756 (define-public python2-schedule
2757 (package-with-python2 python-schedule))
2758
2759 (define-public python-scour
2760 (package
2761 (name "python-scour")
2762 (version "0.38.2")
2763 (source
2764 (origin
2765 (method git-fetch)
2766 (uri
2767 (git-reference
2768 (url "https://github.com/scour-project/scour")
2769 (commit
2770 (string-append "v" version))))
2771 (file-name (git-file-name name version))
2772 (sha256
2773 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2774 (propagated-inputs
2775 (list python-six))
2776 (build-system python-build-system)
2777 (home-page "https://github.com/scour-project/scour")
2778 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2779 (description "The goal of Scour is to output a file that renders
2780 identically at a fraction of the size by removing a lot of redundant
2781 information created by most SVG editors. Optimization options are typically
2782 lossless but can be tweaked for more aggressive cleaning.")
2783 (license license:asl2.0)))
2784
2785 (define-public python-mechanize
2786 (package
2787 (name "python-mechanize")
2788 (version "0.4.5")
2789 (source
2790 (origin
2791 (method url-fetch)
2792 (uri (pypi-uri "mechanize" version))
2793 (sha256
2794 (base32
2795 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2796 (build-system python-build-system)
2797 (propagated-inputs
2798 (list python-html5lib))
2799 (home-page "https://github.com/python-mechanize/mechanize")
2800 (synopsis
2801 "Stateful programmatic web browsing in Python")
2802 (description
2803 "Mechanize implements stateful programmatic web browsing in Python,
2804 after Andy Lester’s Perl module WWW::Mechanize.")
2805 (license license:bsd-3)))
2806
2807 (define-public python2-mechanize
2808 (package-with-python2 python-mechanize))
2809
2810 (define-public python-simpleaudio
2811 (package
2812 (name "python-simpleaudio")
2813 (version "1.0.4")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (pypi-uri "simpleaudio" version))
2818 (sha256
2819 (base32
2820 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:tests? #f))
2824 (inputs
2825 (list alsa-lib))
2826 (home-page
2827 "https://github.com/hamiltron/py-simple-audio")
2828 (synopsis "Simple, asynchronous audio playback for Python 3")
2829 (description
2830 "The @code{simplaudio} package provides cross-platform, dependency-free
2831 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2832 (license license:expat))) ; MIT license
2833
2834 (define-public python-simplejson
2835 (package
2836 (name "python-simplejson")
2837 (version "3.17.2")
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (pypi-uri "simplejson" version))
2842 (sha256
2843 (base32
2844 "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
2845 (build-system python-build-system)
2846 (native-inputs
2847 (list python-toml))
2848 (home-page "https://simplejson.readthedocs.io/en/latest")
2849 (synopsis
2850 "Json library for Python")
2851 (description
2852 "JSON (JavaScript Object Notation) is a subset of JavaScript
2853 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2854 format.
2855
2856 Simplejson exposes an API familiar to users of the standard library marshal
2857 and pickle modules. It is the externally maintained version of the json
2858 library contained in Python 2.6, but maintains compatibility with Python 2.5
2859 and (currently) has significant performance advantages, even without using
2860 the optional C extension for speedups. Simplejson is also supported on
2861 Python 3.3+.")
2862 (license license:x11)))
2863
2864 (define-public python2-simplejson
2865 (package-with-python2 python-simplejson))
2866
2867
2868 (define-public python-pyicu
2869 (package
2870 (name "python-pyicu")
2871 (version "2.7.4")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (pypi-uri "PyICU" version))
2876 (sha256
2877 (base32
2878 "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
2879 (build-system python-build-system)
2880 (inputs
2881 (list icu4c))
2882 (native-inputs
2883 (list python-pytest python-six))
2884 (home-page "https://github.com/ovalhub/pyicu")
2885 (synopsis "Python extension wrapping the ICU C++ API")
2886 (description
2887 "PyICU is a python extension wrapping the ICU C++ API.")
2888 (license license:x11)))
2889
2890 (define-public python2-pyicu
2891 (package-with-python2 python-pyicu))
2892
2893 (define-public python-dogtail
2894 (package
2895 (name "python-dogtail")
2896 (version "0.9.11")
2897 (source (origin
2898 (method url-fetch)
2899 (uri
2900 (string-append
2901 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2902 "dogtail-" version ".tar.gz"))
2903 (sha256
2904 (base32
2905 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2906 (build-system python-build-system)
2907 (arguments
2908 `(#:tests? #f ; TODO Launching dbus for the tests
2909 ; fails
2910 #:phases
2911 (modify-phases %standard-phases
2912 (replace 'check
2913 (lambda* (#:key tests? #:allow-other-keys)
2914 (when tests?
2915 (system "Xvfb :1 &")
2916 (setenv "DISPLAY" ":1")
2917 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2918 #t)))))
2919 (propagated-inputs
2920 (list python-pygobject python-pycairo python-pyatspi))
2921 (native-inputs
2922 `(("python-nose" ,python-nose)
2923 ("gtk+" ,gtk+)
2924 ("xvfb" ,xorg-server)
2925 ("dbus" ,dbus)
2926 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2927 ("gobject-introspection" ,gobject-introspection)))
2928 (home-page "https://gitlab.com/dogtail/dogtail/")
2929 (synopsis "GUI test tool and automation framework written in Python")
2930 (description
2931 "Dogtail is a GUI test tool and automation framework written in Python.
2932 It uses Accessibility (a11y) technologies to communicate with desktop
2933 applications. dogtail scripts are written in Python and executed like any
2934 other Python program.")
2935 (license license:gpl2+)))
2936
2937 (define-public python2-dogtail
2938 (package-with-python2 python-dogtail))
2939
2940 (define-public python-empy
2941 (package
2942 (name "python-empy")
2943 (version "3.3.3")
2944 (source (origin
2945 (method url-fetch)
2946 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2947 version ".tar.gz"))
2948 (sha256
2949 (base32
2950 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2951 (build-system python-build-system)
2952 (arguments
2953 `(#:tests? #f)) ; python2 only
2954 (home-page "http://www.alcyone.com/software/empy/")
2955 (synopsis "Templating system for Python")
2956 (description
2957 "EmPy is a system for embedding Python expressions and statements in
2958 template text; it takes an EmPy source file, processes it, and produces
2959 output. This is accomplished via expansions, which are special signals to the
2960 EmPy system and are set off by a special prefix (by default the at sign, @@).
2961 EmPy can expand arbitrary Python expressions and statements in this way, as
2962 well as a variety of special forms. Textual data not explicitly delimited in
2963 this way is sent unaffected to the output, allowing Python to be used in
2964 effect as a markup language. Also supported are callbacks via hooks,
2965 recording and playback via diversions, and dynamic, chainable filters. The
2966 system is highly configurable via command line options and embedded
2967 commands.")
2968 (license license:lgpl2.1+)))
2969
2970 (define-public python2-element-tree
2971 (package
2972 (name "python2-element-tree")
2973 (version "1.2.6")
2974 (source (origin
2975 (method url-fetch)
2976 (uri (string-append
2977 "http://effbot.org/media/downloads/elementtree-"
2978 version "-20050316.tar.gz"))
2979 (sha256
2980 (base32
2981 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2982 (build-system python-build-system)
2983 (arguments
2984 `(#:python ,python-2 ; seems to be part of Python 3
2985 #:tests? #f)) ; no 'test' sub-command
2986 (synopsis "Toolkit for XML processing in Python")
2987 (description
2988 "ElementTree is a Python library supporting lightweight XML processing.")
2989 (home-page "https://effbot.org/zone/element-index.htm")
2990 (license (license:x11-style
2991 "http://docs.python.org/2/license.html"
2992 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2993
2994 (define-public python2-pybugz
2995 (package
2996 (name "python2-pybugz")
2997 (version "0.6.11")
2998 (source (origin
2999 (method url-fetch)
3000 (uri (string-append
3001 "http://bits.liquidx.net/projects/pybugz/pybugz-"
3002 version ".tar.gz"))
3003 (sha256
3004 (base32
3005 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
3006 (patches (search-patches "pybugz-stty.patch"
3007 "pybugz-encode-error.patch"))))
3008 (build-system python-build-system)
3009 (arguments
3010 `(#:python ,python-2 ; SyntaxError with Python 3
3011 #:tests? #f)) ; no 'test' sub-command
3012 (propagated-inputs
3013 `(("element-tree" ,python2-element-tree)))
3014 (synopsis "Python and command-line interface to Bugzilla")
3015 (description
3016 "PyBugz is a Python library and command-line tool to query the Bugzilla
3017 bug tracking system. It is meant as an aid to speed up interaction with the
3018 bug tracker.")
3019 (home-page "http://www.liquidx.net/pybugz/")
3020 (license license:gpl2)))
3021
3022 (define-public python2-enum
3023 (package
3024 (name "python2-enum")
3025 (version "0.4.6")
3026 (source (origin
3027 (method url-fetch)
3028 (uri (pypi-uri "enum" version))
3029 (sha256
3030 (base32
3031 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
3032 (build-system python-build-system)
3033 (arguments
3034 `(#:python ,python-2))
3035 (home-page "https://pypi.org/project/enum/")
3036 (synopsis "Robust enumerated type support in Python")
3037 (description
3038 "This provides a module for robust enumerations in Python. It has
3039 been superseded by the Python standard library and is provided only for
3040 compatibility.")
3041 ;; Choice of either license.
3042 (license (list license:gpl3+ license:psfl))))
3043
3044 (define-public python-enum34
3045 (package
3046 (name "python-enum34")
3047 (version "1.1.6")
3048 (source
3049 (origin
3050 (method url-fetch)
3051 (uri (pypi-uri "enum34" version))
3052 (sha256
3053 (base32
3054 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
3055 (build-system python-build-system)
3056 (home-page "https://pypi.org/project/enum34/")
3057 (synopsis "Backported Python 3.4 Enum")
3058 (description
3059 "Enum34 is the new Python stdlib enum module available in Python 3.4
3060 backported for previous versions of Python from 2.4 to 3.3.")
3061 (license license:bsd-3)))
3062
3063 (define-public python2-enum34
3064 (package-with-python2 python-enum34))
3065
3066 (define-public python-parse-type
3067 (package
3068 (name "python-parse-type")
3069 (version "0.6.0")
3070 (source
3071 (origin
3072 (method url-fetch)
3073 (uri (pypi-uri "parse_type" version))
3074 (sha256
3075 (base32
3076 "07smqnzc9km7sbvxfyx4gdm9njrx58x8grdw6gs4gva81rk3rd10"))))
3077 (build-system python-build-system)
3078 (arguments
3079 '(#:phases
3080 (modify-phases %standard-phases
3081 (replace 'check
3082 (lambda* (#:key tests? #:allow-other-keys)
3083 (when tests?
3084 (invoke "pytest" "-vv" "-c" "/dev/null")))))))
3085 (propagated-inputs (list python-six python-parse))
3086 (native-inputs (list python-pytest))
3087 (home-page "https://github.com/jenisys/parse_type")
3088 (synopsis "Extended parse module")
3089 (description
3090 "Parse_type extends the python parse module.")
3091 (properties
3092 `((python2-variant . ,(delay python2-parse-type))))
3093 (license license:bsd-3)))
3094
3095 (define-public python2-parse-type
3096 (let ((base (package-with-python2
3097 (strip-python2-variant python-parse-type))))
3098 (package/inherit base
3099 (propagated-inputs
3100 `(("python2-enum34" ,python2-enum34)
3101 ,@(package-propagated-inputs base))))))
3102
3103 (define-public python-parse
3104 (package
3105 (name "python-parse")
3106 (version "1.18.0")
3107 (source
3108 (origin
3109 (method url-fetch)
3110 (uri (pypi-uri "parse" version))
3111 (sha256
3112 (base32
3113 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
3114 (build-system python-build-system)
3115 (arguments
3116 `(#:phases
3117 (modify-phases %standard-phases
3118 (replace 'check
3119 (lambda _ (invoke "python" "test_parse.py"))))))
3120 (home-page "https://github.com/r1chardj0n3s/parse")
3121 (synopsis "Parse strings")
3122 (description
3123 "Parse strings using a specification based on the Python @code{format()}
3124 syntax.")
3125 (license license:x11)))
3126
3127 (define-public python-polib
3128 (package
3129 (name "python-polib")
3130 (version "1.1.0")
3131 (source (origin
3132 (method url-fetch)
3133 (uri (pypi-uri "polib" version))
3134 (sha256
3135 (base32
3136 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
3137 (build-system python-build-system)
3138 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
3139 (synopsis "Manipulate, create and modify gettext files")
3140 (description "Polib can manipulate any gettext format (po, pot and mo)
3141 files. It can be used to create po files from scratch or to modify
3142 existing ones.")
3143 (license license:expat)))
3144
3145 (define-public python2-polib
3146 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
3147 (package/inherit base
3148 (arguments `(,@(package-arguments base)
3149 ;; Tests don't work with python2.
3150 #:tests? #f)))))
3151
3152 (define-public python-polling2
3153 (package
3154 (name "python-polling2")
3155 (version "0.5.0")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "polling2" version))
3160 (sha256
3161 (base32 "0hp3238fv6k1qk43gv4jwnv1mwlkmx33akbj560b9nvsry1dmdwh"))))
3162 (build-system python-build-system)
3163 (arguments '(#:tests? #false)) ; no tests included
3164 (native-inputs
3165 (list python-mock python-pytest python-pytest-runner))
3166 (home-page "https://github.com/ddmee/polling2")
3167 (synopsis "Polling utility with many configurable options")
3168 (description "Polling2 is a utility used to wait for a function to return
3169 a certain expected condition.")
3170 (license license:expat)))
3171
3172 (define-public python-poyo
3173 (package
3174 (name "python-poyo")
3175 (version "0.5.0")
3176 (source
3177 (origin
3178 (method url-fetch)
3179 (uri (pypi-uri "poyo" version))
3180 (sha256
3181 (base32
3182 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
3183 (build-system python-build-system)
3184 (home-page "https://github.com/hackebrot/poyo")
3185 (synopsis "Lightweight YAML Parser for Python")
3186 (description
3187 "This package provides a lightweight YAML Parser for Python. It supports
3188 only a chosen subset of the YAML format that is required to parse cookiecutter
3189 user configuration files. It does not have support for serializing into YAML
3190 and is not compatible with JSON.")
3191 (license license:expat)))
3192
3193 (define-public scons
3194 (package
3195 (name "scons")
3196 (version "3.0.4")
3197 (source (origin
3198 (method git-fetch)
3199 (uri (git-reference
3200 (url "https://github.com/SCons/scons")
3201 (commit version)))
3202 (file-name (git-file-name name version))
3203 (sha256
3204 (base32
3205 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
3206 (build-system python-build-system)
3207 (arguments
3208 `(#:use-setuptools? #f ; still relies on distutils
3209 #:tests? #f ; no 'python setup.py test' command
3210 #:phases
3211 (modify-phases %standard-phases
3212 (add-before 'build 'bootstrap
3213 (lambda _
3214 (substitute* "src/engine/SCons/compat/__init__.py"
3215 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
3216 "sys.modules[new] = __import__(old)"))
3217 (substitute* "src/engine/SCons/Platform/__init__.py"
3218 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
3219 "mod = __import__(full_name)"))
3220 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
3221 (chdir "build/scons")
3222 #t)))))
3223 (home-page "https://scons.org/")
3224 (synopsis "Software construction tool written in Python")
3225 (description
3226 "SCons is a software construction tool. Think of SCons as an improved,
3227 cross-platform substitute for the classic Make utility with integrated
3228 functionality similar to autoconf/automake and compiler caches such as ccache.
3229 In short, SCons is an easier, more reliable and faster way to build
3230 software.")
3231 (license license:x11)))
3232
3233 (define-public scons-python2
3234 (package
3235 (inherit (package-with-python2 scons))
3236 (name "scons-python2")))
3237
3238 (define-public python-extension-helpers
3239 (package
3240 (name "python-extension-helpers")
3241 (version "0.1")
3242 (source
3243 (origin
3244 (method url-fetch)
3245 (uri (pypi-uri "extension-helpers" version))
3246 (sha256
3247 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
3248 (build-system python-build-system)
3249 (native-inputs
3250 (list python-coverage python-pytest-astropy python-pytest-cov
3251 python-setuptools-scm))
3252 (home-page "https://github.com/astropy/astropy-helpers")
3253 (synopsis
3254 "Utilities for building and installing packages in the Astropy ecosystem")
3255 (description
3256 "The extension-helpers package includes many build, installation, and
3257 documentation-related tools used by the Astropy project.")
3258 (license license:bsd-3)))
3259
3260 (define-public python-extras
3261 (package
3262 (name "python-extras")
3263 (version "1.0.0")
3264 (source
3265 (origin
3266 (method url-fetch)
3267 (uri (pypi-uri "extras" version))
3268 (sha256
3269 (base32
3270 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
3271 (build-system python-build-system)
3272 (arguments
3273 ;; FIXME: Circular dependency on testtools.
3274 '(#:tests? #f))
3275 (home-page "https://github.com/testing-cabal/extras")
3276 (synopsis "Useful extensions to the Python standard library")
3277 (description
3278 "Extras is a set of extensions to the Python standard library.")
3279 (license license:expat)))
3280
3281 (define-public python2-extras
3282 (package-with-python2 python-extras))
3283
3284 (define-public python-mimeparse
3285 (package
3286 (name "python-mimeparse")
3287 (version "1.6.0")
3288 (source
3289 (origin
3290 (method url-fetch)
3291 (uri (pypi-uri "python-mimeparse" version))
3292 (sha256
3293 (base32
3294 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
3295 (build-system python-build-system)
3296 (arguments
3297 '(#:phases
3298 (modify-phases %standard-phases
3299 (replace 'check
3300 (lambda _
3301 (invoke "./mimeparse_test.py"))))))
3302 (home-page
3303 "https://github.com/dbtsai/python-mimeparse")
3304 (synopsis "Python library for parsing MIME types")
3305 (description
3306 "Mimeparse provides basic functions for parsing MIME type names and
3307 matching them against a list of media-ranges.")
3308 (license license:expat)))
3309
3310 (define-public python2-mimeparse
3311 (package-with-python2 python-mimeparse))
3312
3313 (define-public python-miniboa
3314 (package
3315 (name "python-miniboa")
3316 (version "1.0.8")
3317 (source
3318 (origin
3319 (method url-fetch)
3320 (uri (pypi-uri "miniboa" version))
3321 (sha256
3322 (base32
3323 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
3324 (build-system python-build-system)
3325 (home-page "https://github.com/shmup/miniboa")
3326 (synopsis "Simple, single-threaded Telnet server")
3327 (description
3328 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
3329 server.")
3330 (license license:asl2.0)))
3331
3332 (define-public python2-miniboa
3333 (package-with-python2 python-miniboa))
3334
3335 (define-public python-pafy
3336 (package
3337 (name "python-pafy")
3338 (version "0.5.3.1")
3339 (source
3340 (origin
3341 (method url-fetch)
3342 (uri (pypi-uri "pafy" version))
3343 (sha256
3344 (base32
3345 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
3346 (build-system python-build-system)
3347 (arguments
3348 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
3349 (propagated-inputs
3350 ;; Youtube-dl is a python package which is imported in the file
3351 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
3352 (list youtube-dl))
3353 (home-page "https://np1.github.io/pafy/")
3354 (synopsis "Retrieve YouTube content and metadata")
3355 (description
3356 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
3357 (license license:lgpl3+)))
3358
3359 (define-public python-miniupnpc
3360 (package
3361 (name "python-miniupnpc")
3362 (version "2.2.3")
3363 (source
3364 (origin
3365 (method git-fetch)
3366 (uri
3367 (git-reference
3368 (url "https://github.com/miniupnp/miniupnp")
3369 (commit
3370 (string-append
3371 "miniupnpc_" (string-replace-substring version "." "_")))))
3372 (file-name
3373 (git-file-name name version))
3374 (sha256
3375 (base32 "03q1rlzvfzm15g1bfw2zqzavlsyaypnaf2k3cz6ha7k5rirkdy0l"))))
3376 (build-system python-build-system)
3377 (arguments
3378 (list
3379 #:phases
3380 #~(modify-phases %standard-phases
3381 (add-after 'unpack 'subdir
3382 (lambda* (#:key inputs #:allow-other-keys)
3383 (chdir "miniupnpc")
3384 (setenv "CC" #$(cc-for-target))
3385 (substitute* "Makefile"
3386 (("/bin/sh") (search-input-file inputs "/bin/sh"))))))))
3387 (inputs (list python)) ;we are building a Python extension
3388 (synopsis "UPnP client for Python")
3389 (description "Miniupnpc is a client library for Python programs to set up
3390 port forwards using @acronym{UPnP, Universal Plug and Play}.")
3391 (home-page "http://miniupnp.free.fr")
3392 (license license:bsd-3)))
3393
3394 (define-public python2-funcsigs
3395 (package
3396 (name "python2-funcsigs")
3397 (version "1.0.2")
3398 (source (origin
3399 (method url-fetch)
3400 (uri (pypi-uri "funcsigs" version))
3401 (sha256
3402 (base32
3403 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
3404 (build-system python-build-system)
3405 (arguments
3406 `(#:python ,python-2))
3407 (native-inputs
3408 (list python2-unittest2))
3409 (home-page "http://funcsigs.readthedocs.org")
3410 (synopsis "Python function signatures from PEP362")
3411 (description
3412 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
3413 (license license:asl2.0)))
3414
3415 (define-public python2-funcsigs-bootstrap
3416 (package
3417 (inherit python2-funcsigs)
3418 (name "python2-funcsigs-bootstrap")
3419 (native-inputs `())
3420 (arguments
3421 `(#:tests? #f
3422 ,@(package-arguments python2-funcsigs)))))
3423
3424 (define-public python-py
3425 (package
3426 (name "python-py")
3427 (version "1.10.0")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "py" version))
3432 (sha256
3433 (base32
3434 "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
3435 (build-system python-build-system)
3436 (arguments
3437 ;; FIXME: "ImportError: 'test' module incorrectly imported from
3438 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
3439 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
3440 ;; Is this module globally installed?"
3441 '(#:tests? #f))
3442 (native-inputs
3443 (list python-setuptools-scm))
3444 (home-page "https://github.com/pytest-dev/py")
3445 (synopsis "Python library for parsing, I/O, instrospection, and logging")
3446 (description
3447 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3448 code introspection, and logging.")
3449 (license license:expat)))
3450
3451 (define-public python2-py
3452 (package-with-python2 python-py))
3453
3454 ;; Recent versions of python-fixtures and python-testrepository need
3455 ;; python-pbr for packaging, which itself needs these two packages for
3456 ;; testing.
3457 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3458 ;; same source, just without any test dependencies and with tests disabled.
3459 ;; python-pbr-minmal is then used to package python-fixtures and
3460 ;; python-testrepository.
3461 ;; Strictly speaking we currently could remove the test-requirements from the
3462 ;; normal python-pbr package (and save this package) since test are disabled
3463 ;; there anyway. But this may change in future.
3464 (define-public python-pbr-minimal
3465 (package
3466 (name "python-pbr-minimal")
3467 (version "5.5.1")
3468 (source
3469 (origin
3470 (method url-fetch)
3471 (uri (pypi-uri "pbr" version))
3472 (sha256
3473 (base32
3474 "1j8k5d4rdhy5bw5ai1vkjzln2albah94in3vvyvxa0n42fv81baz"))))
3475 (build-system python-build-system)
3476 (arguments
3477 `(#:tests? #f))
3478 (home-page "https://docs.openstack.org/pbr/latest/")
3479 (synopsis "Minimal build of python-pbr used for bootstrapping")
3480 (description
3481 "Used only for bootstrapping python2-pbr, you should not need this.")
3482 (license license:asl2.0)))
3483
3484 (define-public python-pbr
3485 (package
3486 (inherit python-pbr-minimal)
3487 (name "python-pbr")
3488 (arguments
3489 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3490 (propagated-inputs
3491 (list git)) ;; pbr actually uses the "git" binary.
3492 (native-inputs
3493 `(("python-fixtures" ,python-fixtures-bootstrap)
3494 ;; discover, coverage, hacking, subunit
3495 ("python-mock" ,python-mock)
3496 ("python-six" ,python-six)
3497 ("python-sphinx" ,python-sphinx)
3498 ("python-testrepository" ,python-testrepository-bootstrap)
3499 ("python-testresources" ,python-testresources-bootstrap)
3500 ("python-testscenarios" ,python-testscenarios-bootstrap)
3501 ("python-testtools" ,python-testtools-bootstrap)
3502 ("python-virtualenv" ,python-virtualenv)))
3503 (synopsis "Enhance the default behavior of Python’s setuptools")
3504 (description
3505 "Python Build Reasonableness (PBR) is a library that injects some useful
3506 and sensible default behaviors into your setuptools run. It will set
3507 versions, process requirements files and generate AUTHORS and ChangeLog file
3508 from git information.
3509 ")))
3510
3511 (define-public python-pyrsistent
3512 (package
3513 (name "python-pyrsistent")
3514 (version "0.16.0")
3515 (home-page "https://github.com/tobgu/pyrsistent")
3516 (source (origin
3517 (method url-fetch)
3518 (uri (pypi-uri "pyrsistent" version))
3519 (sha256
3520 (base32
3521 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3522 (build-system python-build-system)
3523 (arguments
3524 '(#:phases (modify-phases %standard-phases
3525 ;; The package works fine with newer Pytest and Hypothesis, but
3526 ;; has pinned older versions to stay compatible with Python 2.
3527 (add-before 'check 'loosen-pytest-requirement
3528 (lambda _
3529 (substitute* "setup.py"
3530 (("pytest<5") "pytest")
3531 (("hypothesis<5") "hypothesis"))
3532 #t)))))
3533 (native-inputs
3534 (list python-hypothesis python-pytest python-pytest-runner))
3535 (propagated-inputs
3536 (list python-six))
3537 (synopsis "Persistent data structures for Python")
3538 (description
3539 "Pyrsistent is a number of persistent collections (by some referred to as
3540 functional data structures). Persistent in the sense that they are immutable.
3541
3542 All methods on a data structure that would normally mutate it instead return a
3543 new copy of the structure containing the requested updates. The original
3544 structure is left untouched.")
3545 (license license:expat)))
3546
3547 (define-public python2-pyrsistent
3548 (package-with-python2 python-pyrsistent))
3549
3550 (define-public python-exif-read
3551 (package
3552 (name "python-exif-read")
3553 (version "2.1.2")
3554 (source (origin
3555 (method url-fetch)
3556 (uri (pypi-uri "ExifRead" version))
3557 (sha256
3558 (base32
3559 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3560 (build-system python-build-system)
3561 (arguments `(#:tests? #f)) ; no tests
3562 (home-page "https://github.com/ianare/exif-py")
3563 (synopsis "Python library to extract EXIF data from image files")
3564 (description
3565 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3566 files.")
3567 (license license:bsd-3)))
3568
3569 (define-public python2-exif-read
3570 (package-with-python2 python-exif-read))
3571
3572 (define-public python-pyld
3573 (package
3574 (name "python-pyld")
3575 (version "1.0.5")
3576 (source (origin
3577 (method url-fetch)
3578 (uri (pypi-uri "PyLD" version))
3579 (sha256
3580 (base32
3581 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3582 (build-system python-build-system)
3583 (home-page "https://github.com/digitalbazaar/pyld")
3584 (synopsis "Python implementation of the JSON-LD specification")
3585 (description
3586 "PyLD is an implementation of the JSON-LD specification.")
3587 (license license:bsd-3)))
3588
3589 (define-public python2-pyld
3590 (package-with-python2 python-pyld))
3591
3592 (define-public python-cli-helpers
3593 (package
3594 (name "python-cli-helpers")
3595 (version "2.2.1")
3596 (source
3597 (origin
3598 ;; There's no source tarball on PyPI.
3599 (method git-fetch)
3600 (uri (git-reference
3601 (url "https://github.com/dbcli/cli_helpers")
3602 (commit (string-append "v" version))))
3603 (file-name (git-file-name name version))
3604 (sha256
3605 (base32 "1hzavh9v9lkd1dn9f0nvg80f7v4banxvcrj10zy72przqz51k1sb"))))
3606 (build-system python-build-system)
3607 (native-inputs
3608 (list python-pytest))
3609 (propagated-inputs
3610 (list python-wcwidth python-configobj python-tabulate))
3611 (home-page "https://github.com/dbcli/cli_helpers")
3612 (synopsis "Helpers for building command-line apps")
3613 (description
3614 "CLI Helpers is a Python package that makes it easy to perform common
3615 tasks when building command-line apps. It's a helper library for command-line
3616 interfaces.")
3617 (license license:bsd-3)))
3618
3619 (define-public python-click
3620 (package
3621 (name "python-click")
3622 (version "8.1.2")
3623 (source
3624 (origin
3625 (method url-fetch)
3626 (uri (pypi-uri "click" version))
3627 (sha256
3628 (base32
3629 "0whs38a2i0561kwbgigs6vic9r0a1887m2v1aw3rmv6r2kz0g5s7"))))
3630 (build-system python-build-system)
3631 (arguments
3632 `(#:phases
3633 (modify-phases %standard-phases
3634 (replace 'check
3635 (lambda* (#:key tests? #:allow-other-keys)
3636 (when tests?
3637 (invoke "pytest" "-vv")))))))
3638 (native-inputs (list python-pytest))
3639 (home-page "https://palletsprojects.com/p/click/")
3640 (synopsis "Command line library for Python")
3641 (description
3642 "Click is a Python package for creating command line interfaces in a
3643 composable way with as little code as necessary. Its name stands for
3644 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3645 with sensible defaults out of the box.")
3646 (license license:bsd-3)))
3647
3648 (define-public python-click-5
3649 (package (inherit python-click)
3650 (name "python-click")
3651 (version "5.1")
3652 (source
3653 (origin
3654 (method url-fetch)
3655 (uri (pypi-uri "click" version))
3656 (sha256
3657 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3658 (arguments `())))
3659
3660 (define-public python-click-8
3661 (package (inherit python-click)
3662 (name "python-click")
3663 (version "8.1.2")
3664 (source
3665 (origin
3666 (method url-fetch)
3667 (uri (pypi-uri "click" version))
3668 (sha256
3669 (base32 "0whs38a2i0561kwbgigs6vic9r0a1887m2v1aw3rmv6r2kz0g5s7"))))
3670 (arguments `())))
3671
3672 (define-public python-cligj
3673 (package
3674 (name "python-cligj")
3675 (version "0.7.2")
3676 (source
3677 (origin
3678 (method url-fetch)
3679 (uri (pypi-uri "cligj" version))
3680 (sha256
3681 (base32
3682 "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
3683 (build-system python-build-system)
3684 (propagated-inputs
3685 (list python-click))
3686 (native-inputs
3687 (list python-pytest-cov))
3688 (home-page "https://github.com/mapbox/cligj")
3689 (synopsis "Click params for command line interfaces to GeoJSON")
3690 (description
3691 "cligj is for Python developers who create command line interfaces
3692 for geospatial data. cligj allows you to quickly build consistent,
3693 well-tested and interoperable CLIs for handling GeoJSON.")
3694 (license license:bsd-3)))
3695
3696 (define-public python-vcversioner
3697 (package
3698 (name "python-vcversioner")
3699 (version "2.16.0.0")
3700 (source
3701 (origin
3702 (method url-fetch)
3703 (uri (pypi-uri "vcversioner" version))
3704 (sha256
3705 (base32
3706 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3707 (build-system python-build-system)
3708 (synopsis "Python library for version number discovery")
3709 (description "Vcversioner is a Python library that inspects tagging
3710 information in a variety of version control systems in order to discover
3711 version numbers.")
3712 (home-page "https://github.com/habnabit/vcversioner")
3713 (license license:isc)))
3714
3715 (define-public python2-vcversioner
3716 (package-with-python2 python-vcversioner))
3717
3718 (define-public python-jdcal
3719 (package
3720 (name "python-jdcal")
3721 (version "1.4")
3722 (source
3723 (origin
3724 (method url-fetch)
3725 (uri (pypi-uri "jdcal" version))
3726 (sha256
3727 (base32
3728 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3729 (build-system python-build-system)
3730 (arguments
3731 `(#:phases (modify-phases %standard-phases
3732 (replace 'check
3733 (lambda _
3734 (invoke "pytest"))))))
3735 (native-inputs
3736 (list python-pytest))
3737 (home-page "https://github.com/phn/jdcal")
3738 (synopsis "Functions to convert between Julian dates Gregorian dates")
3739 (description "This Python library provides functions for converting
3740 between Julian dates and Gregorian dates.")
3741 (license license:bsd-2)))
3742
3743 (define-public python2-jdcal
3744 (package-with-python2 python-jdcal))
3745
3746 (define-public python-jsondiff
3747 (package
3748 (name "python-jsondiff")
3749 (version "1.2.0")
3750 (source
3751 (origin
3752 (method url-fetch)
3753 (uri (pypi-uri "jsondiff" version))
3754 (sha256
3755 (base32
3756 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3757 (build-system python-build-system)
3758 (native-inputs
3759 (list python-nose python-nose-random))
3760 (home-page
3761 "https://github.com/fzumstein/jsondiff")
3762 (synopsis "Compare JSON and JSON-like structures in Python")
3763 (description "@code{jsondiff} is a Python library which lets you
3764 compare, diff, and patch JSON and JSON-like structures in Python.")
3765 (license license:expat)))
3766
3767 (define-public python-jsonschema
3768 (package
3769 (name "python-jsonschema")
3770 (version "3.2.0")
3771 (source (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "jsonschema" version))
3774 (sha256
3775 (base32
3776 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3777 (build-system python-build-system)
3778 (arguments
3779 '(#:phases
3780 (modify-phases %standard-phases
3781 (replace 'check
3782 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3783 (when tests?
3784 (setenv "JSON_SCHEMA_TEST_SUITE" "json")
3785 (invoke "trial" "jsonschema")))))))
3786 (native-inputs
3787 `(("python-setuptools_scm" ,python-setuptools-scm)
3788 ("python-twisted" ,python-twisted)))
3789 (propagated-inputs
3790 (list python-attrs python-pyrsistent python-six))
3791 (home-page "https://github.com/Julian/jsonschema")
3792 (synopsis "Implementation of JSON Schema for Python")
3793 (description
3794 "Jsonschema is an implementation of JSON Schema for Python.")
3795 (license license:expat)))
3796
3797 (define-public python-schema
3798 (package
3799 (name "python-schema")
3800 (version "0.6.6")
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (pypi-uri "schema" version))
3805 (sha256
3806 (base32
3807 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3808 (build-system python-build-system)
3809 (native-inputs
3810 (list python-pytest))
3811 (home-page "https://github.com/keleshev/schema")
3812 (synopsis "Simple data validation library")
3813 (description
3814 "@code{python-schema} is a library for validating Python data
3815 structures, such as those obtained from config-files, forms, external
3816 services or command-line parsing, converted from JSON/YAML (or
3817 something else) to Python data-types.")
3818 (license license:psfl)))
3819
3820 (define-public python2-schema
3821 (package-with-python2 python-schema))
3822
3823 (define-public python-schema-0.5
3824 (package (inherit python-schema)
3825 (version "0.5.0")
3826 (source
3827 (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "schema" version))
3830 (sha256
3831 (base32
3832 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3833
3834 (define-public python2-schema-0.5
3835 (package-with-python2 python-schema-0.5))
3836
3837 (define-public python-kitchen
3838 (package
3839 (name "python-kitchen")
3840 (version "1.2.5")
3841 (source
3842 (origin
3843 (method url-fetch)
3844 (uri (pypi-uri "kitchen" version))
3845 (sha256
3846 (base32
3847 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3848 (build-system python-build-system)
3849 (propagated-inputs
3850 (list python-chardet))
3851 (home-page "https://github.com/fedora-infra/kitchen")
3852 (synopsis "Python API for snippets")
3853 (description "@code{kitchen} module provides a python API for all sorts of
3854 little useful snippets of code that everybody ends up writing for their projects
3855 but never seem big enough to build an independent release. Use kitchen and stop
3856 cutting and pasting that code over and over.")
3857 (license (list license:lgpl2.1+
3858 ;; subprocess.py, test_subprocess.py,
3859 ;; kitchen/pycompat25/defaultdict.py:
3860 license:psfl))))
3861
3862 (define-public python2-kitchen
3863 (package-with-python2 python-kitchen))
3864
3865 (define-public python-roman
3866 (package
3867 (name "python-roman")
3868 (version "3.3")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (pypi-uri "roman" version))
3873 (sha256
3874 (base32
3875 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3876 (build-system python-build-system)
3877 (home-page "https://github.com/zopefoundation/roman")
3878 (synopsis "Integer to Roman numerals converter")
3879 (description
3880 "This package provides a small helper library to convert Arabic Numbers
3881 to Roman Numerals.")
3882 (license license:psfl)))
3883
3884 (define-public python-unidecode
3885 (package
3886 (name "python-unidecode")
3887 (version "1.1.1")
3888 (source (origin
3889 (method url-fetch)
3890 (uri (pypi-uri "Unidecode" version))
3891 (sha256
3892 (base32
3893 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3894 (build-system python-build-system)
3895 (home-page "https://pypi.org/project/Unidecode/")
3896 (synopsis "ASCII transliterations of Unicode text")
3897 (description
3898 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3899 useful when integrating with legacy code that doesn't support Unicode, or for
3900 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3901 machine identifiers from human-readable Unicode strings that should still be
3902 somewhat intelligible.")
3903 (license license:gpl2+)))
3904
3905 (define-public python2-unidecode
3906 (package-with-python2 python-unidecode))
3907
3908 (define-public python-text-unidecode
3909 (package
3910 (name "python-text-unidecode")
3911 (version "1.3")
3912 (source (origin
3913 (method url-fetch)
3914 (uri (pypi-uri "text-unidecode" version))
3915 (sha256
3916 (base32
3917 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3918 (build-system python-build-system)
3919 (arguments
3920 '(#:phases (modify-phases %standard-phases
3921 (replace 'check
3922 (lambda _
3923 (invoke "pytest" "-vv"))))))
3924 (native-inputs
3925 (list python-pytest))
3926 (home-page "https://github.com/kmike/text-unidecode/")
3927 (synopsis "Decode Unicode data")
3928 (description
3929 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3930 Perl library. It can create ASCII representations of Unicode data. In general
3931 users should prefer the @code{python-unidecode} package which offers better
3932 memory usage and transliteration quality.")
3933 ;; The user can choose either license.
3934 (license (list license:clarified-artistic license:gpl2+))))
3935
3936 (define-public python2-text-unidecode
3937 (package-with-python2 python-text-unidecode))
3938
3939 (define-public python-pyjwt
3940 (package
3941 (name "python-pyjwt")
3942 (version "1.7.1")
3943 (source
3944 (origin
3945 (method url-fetch)
3946 (uri (pypi-uri "PyJWT" version))
3947 (sha256
3948 (base32
3949 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3950 (modules '((guix build utils)))
3951 (snippet
3952 '(begin
3953 (for-each delete-file-recursively
3954 (find-files "." "\\.pyc$"))
3955 #t))))
3956 (build-system python-build-system)
3957 (arguments
3958 '(#:phases (modify-phases %standard-phases
3959 (replace 'check
3960 (lambda _
3961 ;; Mimic upstream commit 3a20892442b34c7 to get
3962 ;; rid of dependency on pytest-runner < 5.0.
3963 ;; Remove substitution for PyJWT > 1.7.1.
3964 (substitute* "setup.py"
3965 ((".*pytest-runner.*")
3966 ""))
3967 (invoke "pytest" "-vv"))))))
3968 (native-inputs
3969 (list python-pytest python-pytest-cov))
3970 (home-page "https://github.com/progrium/pyjwt")
3971 (synopsis "JSON Web Token implementation in Python")
3972 (description
3973 "PyJWT is a JSON Web Token implementation written in Python.")
3974 (license license:expat)))
3975
3976 (define-public python2-pyjwt
3977 (package-with-python2 python-pyjwt))
3978
3979 (define-public python-pymsgbox
3980 (package
3981 (name "python-pymsgbox")
3982 (version "1.0.6")
3983 (source
3984 (origin
3985 (method git-fetch)
3986 (uri (git-reference
3987 ;; LICENSE.txt is not present on pypi
3988 (url "https://github.com/asweigart/PyMsgBox")
3989 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3990 (file-name (git-file-name name version))
3991 (sha256
3992 (base32
3993 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3994 (arguments
3995 ;; Circular dependency to run tests:
3996 ;; Tests need pyautogui, which depends on pymsgbox.
3997 '(#:tests? #f))
3998 (build-system python-build-system)
3999 (home-page "https://github.com/asweigart/PyMsgBox")
4000 (synopsis "Python module for JavaScript-like message boxes")
4001 (description
4002 "PyMsgBox is a simple, cross-platform, pure Python module for
4003 JavaScript-like message boxes. Types of dialog boxes include:
4004 @enumerate
4005 @item alert
4006 @item confirm
4007 @item prompt
4008 @item password
4009 @end enumerate
4010 ")
4011 (license license:bsd-3)))
4012
4013 (define-public python-pympler
4014 (package
4015 (name "python-pympler")
4016 (home-page "https://pythonhosted.org/Pympler/")
4017 (version "0.9")
4018 (source (origin
4019 (method url-fetch)
4020 (uri (pypi-uri "Pympler" version))
4021 (sha256
4022 (base32
4023 "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
4024 (build-system python-build-system)
4025 (arguments
4026 `(#:phases (modify-phases %standard-phases
4027 (delete 'check)
4028 (add-after 'install 'check
4029 (lambda* (#:key inputs outputs #:allow-other-keys)
4030 (add-installed-pythonpath inputs outputs)
4031 (invoke "python" "setup.py" "test"))))))
4032 (synopsis "Measure, monitor and analyze memory behavior")
4033 (description
4034 "Pympler is a development tool to measure, monitor and analyze
4035 the memory behavior of Python objects in a running Python application.
4036
4037 By pympling a Python application, detailed insight in the size and the
4038 lifetime of Python objects can be obtained. Undesirable or unexpected
4039 runtime behavior like memory bloat and other @samp{pymples} can easily
4040 be identified.
4041
4042 A web profiling frontend exposes process statistics, garbage
4043 visualisation and class tracker statistics.")
4044 (license license:asl2.0)))
4045
4046 (define-public python2-pympler
4047 (package-with-python2 python-pympler))
4048
4049 (define-public python-itsdangerous
4050 (package
4051 (name "python-itsdangerous")
4052 (version "2.0.1")
4053 (source
4054 (origin
4055 (method url-fetch)
4056 (uri (pypi-uri "itsdangerous" version))
4057 (sha256
4058 (base32
4059 "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
4060 (build-system python-build-system)
4061 (home-page "https://palletsprojects.com/p/itsdangerous/")
4062 (synopsis "Python library for passing data to/from untrusted environments")
4063 (description
4064 "Itsdangerous provides various helpers to pass trusted data to untrusted
4065 environments and back.")
4066 (license license:bsd-3)))
4067
4068 (define-public python-pyyaml
4069 (package
4070 (name "python-pyyaml")
4071 (version "6.0")
4072 (source
4073 (origin
4074 (method url-fetch)
4075 (uri (pypi-uri "PyYAML" version))
4076 (sha256
4077 (base32
4078 "18imkjacvpxfgg1lbpraqywx3j7hr5dv99d242byqvrh2jf53yv8"))))
4079 (build-system python-build-system)
4080 (inputs
4081 (list libyaml python-cython))
4082 (home-page "https://pyyaml.org")
4083 (synopsis "YAML parser and emitter for Python")
4084 (description
4085 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
4086 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
4087 API, and sensible error messages. PyYAML supports standard YAML tags and
4088 provides Python-specific tags that represent an arbitrary Python object.")
4089 (license license:expat)
4090 (properties `((python2-variant . ,(delay python2-pyyaml))))))
4091
4092 (define-public python-pyyaml-5
4093 (package
4094 (inherit python-pyyaml)
4095 (version "5.4.1")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "PyYAML" version))
4100 (sha256
4101 (base32
4102 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))))
4103
4104 (define-public python2-pyyaml
4105 (let ((base (package-with-python2 (strip-python2-variant python-pyyaml))))
4106 (package
4107 (inherit base)
4108 (version "5.4.1")
4109 (source
4110 (origin
4111 (method url-fetch)
4112 (uri (pypi-uri "PyYAML" version))
4113 (sha256
4114 (base32
4115 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0")))))))
4116
4117 (define-public python-vine
4118 (package
4119 (name "python-vine")
4120 (version "5.0.0")
4121 (source
4122 (origin
4123 (method url-fetch)
4124 (uri (pypi-uri "vine" version))
4125 (sha256
4126 (base32 "0zk3pm0g7s4qfn0gk28lfmsyplvisaxi6826cgpq5njkm4j1cfvx"))))
4127 (build-system python-build-system)
4128 (native-inputs
4129 (list python-pytest python-case))
4130 (home-page "https://github.com/celery/vine")
4131 (synopsis "Promises for Python")
4132 (description
4133 "@code{vine} provides a special implementation of promises in that it can
4134 be used both for \"promise of a value\" and lazy evaluation. The biggest
4135 upside for this is that everything in a promise can also be a promise,
4136 e.g. filters, callbacks and errbacks can all be promises.")
4137 (license license:bsd-3)))
4138
4139 (define-public python-virtualenv
4140 (package
4141 (name "python-virtualenv")
4142 (version "20.3.1")
4143 (source
4144 (origin
4145 (method url-fetch)
4146 (uri (pypi-uri "virtualenv" version))
4147 (sha256
4148 (base32
4149 "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
4150 (build-system python-build-system)
4151 (native-inputs
4152 (list python-mock python-pytest python-setuptools-scm))
4153 (propagated-inputs
4154 (list python-appdirs python-distlib python-filelock python-six))
4155 (home-page "https://virtualenv.pypa.io/")
4156 (synopsis "Virtual Python environment builder")
4157 (description
4158 "Virtualenv is a tool to create isolated Python environments.")
4159 (license license:expat)))
4160
4161 (define-public python2-virtualenv
4162 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
4163 (package
4164 (inherit base)
4165 (propagated-inputs
4166 (modify-inputs (package-propagated-inputs base)
4167 (prepend python2-contextlib2))))))
4168
4169 (define-public python-markupsafe
4170 (package
4171 (name "python-markupsafe")
4172 (version "2.0.1")
4173 (source
4174 (origin
4175 (method url-fetch)
4176 (uri (pypi-uri "MarkupSafe" version))
4177 (sha256
4178 (base32
4179 "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
4180 (build-system python-build-system)
4181 (arguments
4182 `(#:phases (modify-phases %standard-phases
4183 (replace 'check
4184 (lambda* (#:key tests? #:allow-other-keys)
4185 (when tests?
4186 (invoke "pytest" "-vv")))))))
4187 (native-inputs
4188 (list python-pytest))
4189 (home-page "https://github.com/mitsuhiko/markupsafe")
4190 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
4191 (description
4192 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
4193 for Python.")
4194 (license license:bsd-3)
4195 (properties `((python2-variant . ,(delay python2-markupsafe))))))
4196
4197 ;; Version 1.1.1 is the last to support Python 2.
4198 (define-public python2-markupsafe
4199 (package
4200 (inherit (package-with-python2
4201 (strip-python2-variant python-markupsafe)))
4202 (version "1.1.1")
4203 (source
4204 (origin
4205 (method url-fetch)
4206 (uri (pypi-uri "MarkupSafe" version))
4207 (sha256
4208 (base32
4209 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))))
4210
4211 (define-public python-jinja2
4212 (package
4213 (name "python-jinja2")
4214 (version "3.1.1")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "Jinja2" version))
4219 (sha256
4220 (base32
4221 "1saawzys14l1p4kafs7hkihmnvqjq8fwxjmkjiqx3jq1nm5ys2v4"))))
4222 (build-system python-build-system)
4223 (arguments
4224 '(#:phases (modify-phases %standard-phases
4225 (replace 'check
4226 (lambda* (#:key tests? #:allow-other-keys)
4227 (if tests?
4228 (invoke "pytest" "-vv")
4229 (format #t "test suite not run~%")))))))
4230 (native-inputs (list python-pytest))
4231 (propagated-inputs (list python-markupsafe))
4232 (home-page "https://jinja.palletsprojects.com/")
4233 (synopsis "Python template engine")
4234 (description
4235 "Jinja2 is a small but fast and easy to use stand-alone template engine
4236 written in pure Python.")
4237 (license license:bsd-3)
4238 (properties `((python2-variant . ,(delay python2-jinja2))))))
4239
4240 ;; Version 2.11.3 is the last to support Python 2.
4241 (define-public python2-jinja2
4242 (package
4243 (inherit (package-with-python2
4244 (strip-python2-variant python-jinja2)))
4245 (version "2.11.3")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (pypi-uri "Jinja2" version))
4250 (sha256
4251 (base32
4252 "1iiklf3wns67y5lfcacxma5vxfpb7h2a67xbghs01s0avqrq9md6"))))))
4253
4254 (define-public python-jinja2-time
4255 (package
4256 (name "python-jinja2-time")
4257 (version "0.2.0")
4258 (source
4259 (origin
4260 (method url-fetch)
4261 (uri (pypi-uri "jinja2-time" version))
4262 (sha256
4263 (base32
4264 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
4265 (build-system python-build-system)
4266 (propagated-inputs
4267 (list python-arrow python-jinja2))
4268 (home-page
4269 "https://github.com/hackebrot/jinja2-time")
4270 (synopsis "Jinja2 Extension for Dates and Times")
4271 (description
4272 "This package provides an extension for the template engine Jinja2. It
4273 adds a 'now' tag providing a convenient access to the arrow.now() API from
4274 templates. A format string can be provided to control the output.")
4275 (license license:expat)))
4276
4277 (define-public python-pystache
4278 (package
4279 (name "python-pystache")
4280 (version "0.6.0")
4281 (source (origin
4282 (method url-fetch)
4283 (uri (pypi-uri "pystache" version))
4284 (sha256
4285 (base32
4286 "03a73ppf5vxnsk6az5ackvc0hp6xqv2f4hi1s5c4nk4s2jr95gwk"))))
4287 (build-system python-build-system)
4288 (arguments
4289 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
4290 (home-page "http://defunkt.io/pystache/")
4291 (synopsis "Python logic-less template engine")
4292 (description
4293 "Pystache is a Python implementation of the framework agnostic,
4294 logic-free templating system Mustache.")
4295 (license license:expat)
4296 (properties `((python2-variant . ,(delay python2-pystache))))))
4297
4298 (define-public python2-pystache
4299 (let ((base (package-with-python2
4300 (strip-python2-variant python-pystache))))
4301 (package/inherit base
4302 (arguments
4303 `(#:python ,python-2
4304 #:phases
4305 (modify-phases %standard-phases
4306 (replace 'check
4307 (lambda _
4308 (invoke "python" "test_pystache.py")))))))))
4309
4310 (define-public python-pystitcher
4311 (package
4312 (name "python-pystitcher")
4313 (version "1.0.4")
4314 (source
4315 (origin
4316 (method git-fetch)
4317 (uri
4318 (git-reference
4319 (url "https://github.com/captn3m0/pystitcher")
4320 (commit
4321 (string-append "v" version))))
4322 (file-name
4323 (git-file-name name version))
4324 (sha256
4325 (base32 "03yrzqhcsjdj5zprrk3bh5bbyqfy3vfhxra9974vmkir3m121394"))))
4326 (build-system python-build-system)
4327 (inputs
4328 (list python-html5lib python-importlib-metadata python-markdown
4329 python-pypdf3 python-validators))
4330 (home-page "https://github.com/captn3m0/pystitcher")
4331 (synopsis "Declaratively stitch together a PDF file from multiple sources")
4332 (description
4333 "This package stitches your PDF files together, generating customizable
4334 bookmarks using a declarative input in the form of a markdown file.")
4335 (license license:expat)))
4336
4337 (define-public python-joblib
4338 (package
4339 (name "python-joblib")
4340 (version "1.1.0")
4341 (source (origin
4342 (method url-fetch)
4343 (uri (pypi-uri "joblib" version))
4344 (sha256
4345 (base32
4346 "0d8ypyhsw1bjr96zan9ms8wbvnzbjqxniq4vcszghcrps7ngqn21"))))
4347 (build-system python-build-system)
4348 (arguments
4349 `(#:phases
4350 (modify-phases %standard-phases
4351 (replace 'check
4352 (lambda* (#:key tests? #:allow-other-keys)
4353 (when tests?
4354 (setenv "JOBLIB_MULTIPROCESSING" "0")
4355 (invoke "pytest" "-v" "joblib"
4356 ;; We disable this test to avoid having to depend on ipython/jupyter
4357 "-k" "not test_parallel_call_cached_function_defined_in_jupyter")))))))
4358 (native-inputs
4359 (list python-pytest))
4360 (home-page "https://joblib.readthedocs.io/")
4361 (synopsis "Using Python functions as pipeline jobs")
4362 (description
4363 "Joblib is a set of tools to provide lightweight pipelining in Python.
4364 In particular, joblib offers: transparent disk-caching of the output values
4365 and lazy re-evaluation (memoize pattern), easy simple parallel computing
4366 logging and tracing of the execution.")
4367 (license license:bsd-3)))
4368
4369 ;; Newer versions of joblib don't support Python 2.
4370 (define-public python2-joblib
4371 (package
4372 (inherit (package-with-python2 python-joblib))
4373 (version "0.14.1")
4374 (source (origin
4375 (method url-fetch)
4376 (uri (pypi-uri "joblib" version))
4377 (sha256
4378 (base32
4379 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))))
4380
4381 (define-public python-daemon
4382 (package
4383 (name "python-daemon")
4384 (version "2.3.0")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (pypi-uri "python-daemon" version))
4389 (sha256
4390 (base32
4391 "1bxfn2bq56sd4w0nm9mqy8y0905m7fc8vmhnjxlrf49vcbqr7adx"))))
4392 (build-system python-build-system)
4393 (arguments
4394 `(#:phases
4395 (modify-phases %standard-phases
4396 (add-before 'check 'adjust-tests
4397 (lambda _
4398 ;; Drop use of testtools.helpers.safe_hasattr which has
4399 ;; been removed in favor of hasattr.
4400 (substitute* "test/test_metadata.py"
4401 (("testtools\\.helpers\\.safe_hasattr")
4402 "hasattr"))
4403 ;; FIXME: Determine why test fails
4404 (substitute* "test/test_daemon.py"
4405 (("test_detaches_process_context")
4406 "skip_test_detaches_process_context")))))))
4407 (propagated-inputs
4408 (list python-lockfile))
4409 (native-inputs
4410 (list python-coverage
4411 python-unittest2
4412 python-testtools
4413 python-testscenarios
4414 python-twine
4415 python-mock
4416 python-docutils))
4417 (home-page "https://pagure.io/python-daemon/")
4418 (synopsis "Python library for making a Unix daemon process")
4419 (description "Python-daemon is a library that assists a Python program to
4420 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
4421
4422 This library provides a @code{DaemonContext} class that manages the following
4423 important tasks for becoming a daemon process:
4424 @enumerate
4425 @item Detach the process into its own process group.
4426 @item Set process environment appropriate for running inside a chroot.
4427 @item Renounce suid and sgid privileges.
4428 @item Close all open file descriptors.
4429 @item Change the working directory, uid, gid, and umask.
4430 @item Set appropriate signal handlers.
4431 @item Open new file descriptors for stdin, stdout, and stderr.
4432 @item Manage a specified PID lock file.
4433 @item Register cleanup functions for at-exit processing.
4434 @end enumerate")
4435 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
4436 (license (list license:asl2.0 license:gpl3+))))
4437
4438 (define-public python-anytree
4439 (package
4440 (name "python-anytree")
4441 (version "2.8.0")
4442 (source (origin
4443 (method url-fetch)
4444 (uri (pypi-uri "anytree" version))
4445 (sha256
4446 (base32
4447 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
4448 (build-system python-build-system)
4449 (propagated-inputs
4450 (list python-six))
4451 (native-inputs
4452 (list ;; For tests.
4453 graphviz ;for 'dot'
4454 python-nose))
4455 (home-page "https://github.com/c0fec0de/anytree")
4456 (synopsis "Lightweight tree data library")
4457 (description
4458 "@code{anytree} is a simple, lightweight, and extensible tree data
4459 structure for Python.")
4460 (license license:asl2.0)))
4461
4462 (define-public autokey
4463 (package
4464 (name "autokey")
4465 (version "0.95.10")
4466 (source (origin
4467 (method git-fetch)
4468 (uri (git-reference
4469 (url "https://github.com/autokey/autokey")
4470 (commit (string-append "v" version))))
4471 (file-name (git-file-name name version))
4472 (sha256
4473 (base32
4474 "0f0cqfnb49wwdy7zl2f2ypcnd5pc8r8n7z7ssxkq20d4xfxlgamr"))))
4475 (build-system python-build-system)
4476 (arguments
4477 (list
4478 ;; Tests are deprecated and broken until next version, see
4479 ;; https://github.com/autokey/autokey/issues/327
4480 #:tests? #f
4481 #:phases
4482 #~(modify-phases %standard-phases
4483 (add-after 'unpack 'fix-paths
4484 (lambda* (#:key inputs #:allow-other-keys)
4485 (substitute* "lib/autokey/scripting.py"
4486 (("\"wmctrl\"")
4487 (string-append "\"" (search-input-file inputs "bin/wmctrl") "\""))
4488 (("\"zenity\"")
4489 (string-append "\"" (search-input-file inputs "bin/zenity") "\"")))
4490 (substitute* "autokey-shell"
4491 (("'ipython3'")
4492 (string-append "'" (search-input-file inputs "bin/ipython3") "'"))
4493 (("'python3'")
4494 (string-append "'" (search-input-file inputs "bin/python3") "'")))))
4495 ;; Use 'prefix' instead of '=' to allow the user to use additional
4496 ;; GI paths from their autokey scripts. GUIX_PYTHONPATH is already
4497 ;; wrapped with prefix in python-build-system's wrap.
4498 (add-before 'wrap 'wrap-autokey-gi
4499 (lambda _
4500 (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
4501 (for-each
4502 (lambda (program)
4503 (wrap-program program
4504 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
4505 (map (lambda (name)
4506 (string-append #$output "/bin/" name))
4507 '("autokey-gtk"
4508 "autokey-shell")))))))))
4509 (inputs
4510 (list bash-minimal ; for wrap-program
4511 gtksourceview-3
4512 libappindicator
4513 libnotify
4514 python-dbus
4515 python-ipython
4516 python-pygobject
4517 python-pyinotify
4518 python-pyqt+qscintilla
4519 python-xlib
4520 wmctrl
4521 zenity))
4522 (home-page "https://github.com/autokey/autokey")
4523 (synopsis
4524 "Keyboard and GUI automation utility")
4525 (description
4526 "AutoKey is a desktop automation utility for X11. It allows the automation of
4527 virtually any task by responding to typed abbreviations and hotkeys. It
4528 offers a full-featured GUI (GTK and QT versions) that makes it highly
4529 accessible for novices, as well as a scripting interface offering the full
4530 flexibility and power of the Python language.")
4531 (license license:gpl3+)))
4532
4533 (define-public python-docutils
4534 (package
4535 (name "python-docutils")
4536 (version "0.17.1")
4537 (source
4538 (origin
4539 (method url-fetch)
4540 (uri (pypi-uri "docutils" version))
4541 (sha256
4542 (base32
4543 "09gii36lp1bs26cpxqyfd20xahnpbrbjzcnba2xq08y3wk97frb8"))))
4544 (build-system python-build-system)
4545 (arguments
4546 '(#:phases (modify-phases %standard-phases
4547 (replace 'check
4548 (lambda* (#:key tests? #:allow-other-keys)
4549 (if tests?
4550 (invoke "python" "test/alltests.py")
4551 (format #t "test suite not run~%"))
4552 #t)))))
4553 (home-page "http://docutils.sourceforge.net/")
4554 (synopsis "Python Documentation Utilities")
4555 (description
4556 "Docutils is a modular system for processing documentation into useful
4557 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
4558 easy to use markup language, for input.
4559
4560 This package provides tools for converting @file{.rst} files to other formats
4561 via commands such as @command{rst2man}, as well as supporting Python code.")
4562 ;; Most of the source code is public domain, but some source files are
4563 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
4564 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
4565
4566 (define-public python2-docutils
4567 (package-with-python2 python-docutils))
4568
4569 ;; awscli refuses to be built with docutils < 0.16.
4570 (define-public python-docutils-0.15
4571 (package
4572 (inherit python-docutils)
4573 (version "0.15")
4574 (source (origin
4575 (method url-fetch)
4576 (uri (pypi-uri "docutils" version))
4577 (sha256
4578 (base32
4579 "0ja8q6mdj6xv62jjw3phv8j5nfqi5x8hnfy4pqfcjcgz4b34k8sl"))))
4580 ;; tests contain Python 2 syntax.
4581 (arguments '(#:tests? #false))))
4582
4583 ;; python2-sphinx fails its test suite with newer versions.
4584 (define-public python2-docutils-0.14
4585 (package
4586 (inherit python2-docutils)
4587 (version "0.14")
4588 (source (origin
4589 (method url-fetch)
4590 (uri (pypi-uri "docutils" version))
4591 (sha256
4592 (base32
4593 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4594
4595 (define-public python-restructuredtext-lint
4596 (package
4597 (name "python-restructuredtext-lint")
4598 (version "1.3.0")
4599 (source
4600 (origin
4601 (method url-fetch)
4602 (uri (pypi-uri "restructuredtext-lint" version))
4603 (sha256
4604 (base32
4605 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4606 (build-system python-build-system)
4607 (arguments
4608 `(#:phases
4609 (modify-phases %standard-phases
4610 (delete 'check)
4611 (add-after 'install 'check
4612 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4613 (when tests?
4614 (add-installed-pythonpath inputs outputs)
4615 (invoke "nosetests" "-v"))
4616 #t)))))
4617 (propagated-inputs
4618 (list python-docutils))
4619 (native-inputs
4620 (list python-nose))
4621 (home-page "https://github.com/twolfson/restructuredtext-lint")
4622 (synopsis "reStructuredText linter")
4623 (description "This package provides a linter for the reStructuredText
4624 format.")
4625 (license license:unlicense)))
4626
4627 (define-public python-click-repl
4628 (package
4629 (name "python-click-repl")
4630 (version "0.2.0")
4631 (source
4632 (origin
4633 (method git-fetch) ; no tests in PyPI release
4634 (uri (git-reference
4635 (url "https://github.com/click-contrib/click-repl")
4636 (commit version)))
4637 (file-name (git-file-name name version))
4638 (sha256
4639 (base32 "16ybsnwlj2jlqcfxflky8jz7i3nhrd3f6mvkpgs95618l8lx994i"))))
4640 (build-system python-build-system)
4641 (arguments
4642 `(#:phases
4643 (modify-phases %standard-phases
4644 (replace 'check
4645 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4646 (when tests?
4647 (add-installed-pythonpath inputs outputs)
4648 (invoke "python" "-m" "pytest")))))))
4649 (native-inputs
4650 (list python-pytest))
4651 (propagated-inputs
4652 (list python-click python-prompt-toolkit python-six))
4653 (home-page "https://github.com/untitaker/click-repl")
4654 (synopsis "REPL plugin for Click")
4655 (description "This package provides a REPL plugin for Click.")
4656 (license license:expat)))
4657
4658 (define-public python-doc8
4659 (package
4660 (name "python-doc8")
4661 (version "0.8.0")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "doc8" version))
4666 (sha256
4667 (base32
4668 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4669 (build-system python-build-system)
4670 (arguments
4671 `(#:phases
4672 (modify-phases %standard-phases
4673 (delete 'check)
4674 (add-after 'install 'check
4675 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4676 (when tests?
4677 (add-installed-pythonpath inputs outputs)
4678 (invoke "pytest" "-v"))
4679 #t)))))
4680 (propagated-inputs
4681 (list python-chardet python-docutils python-restructuredtext-lint
4682 python-six python-stevedore))
4683 (native-inputs
4684 (list python-testtools python-pytest))
4685 (home-page "https://launchpad.net/doc8")
4686 (synopsis
4687 "Style checker for Sphinx (or other) RST documentation")
4688 (description
4689 "Doc8 is an opinionated style checker for reStructured Text and plain
4690 text styles of documentation.")
4691 (license license:asl2.0)))
4692
4693 (define-public python-pygments
4694 (package
4695 (name "python-pygments")
4696 (version "2.12.0")
4697 (source
4698 (origin
4699 (method url-fetch)
4700 (uri (pypi-uri "Pygments" version))
4701 (sha256
4702 (base32
4703 "1sr6iqh21xi6p8aba4wa9pqfhjbbpcvn9jcsx0ggy4lniw8idcay"))))
4704 (build-system python-build-system)
4705 (arguments
4706 ;; FIXME: Tests require sphinx, which depends on this.
4707 '(#:tests? #f))
4708 (home-page "https://pygments.org/")
4709 (synopsis "Syntax highlighting")
4710 (description
4711 "Pygments is a syntax highlighting package written in Python.")
4712 (license license:bsd-2)
4713 (properties `((python2-variant . ,(delay python2-pygments))))))
4714
4715 ;; Pygments 2.6 and later does not support Python 2.
4716 (define-public python2-pygments
4717 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4718 (package
4719 (inherit base)
4720 (version "2.5.2")
4721 (source (origin
4722 (method url-fetch)
4723 (uri (pypi-uri "Pygments" version))
4724 (sha256
4725 (base32
4726 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4727
4728 (define-public python-pygments-github-lexers
4729 (package
4730 (name "python-pygments-github-lexers")
4731 (version "0.0.5")
4732 (source
4733 (origin
4734 (method url-fetch)
4735 (uri (pypi-uri "pygments-github-lexers" version))
4736 (sha256
4737 (base32
4738 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4739 (build-system python-build-system)
4740 (propagated-inputs
4741 (list python-pygments))
4742 (home-page "https://github.com/liluo/pygments-github-lexers")
4743 (synopsis "Pygments Github custom lexers")
4744 (description "This package installs Github custom lexers to Pygments.")
4745 (license license:bsd-3)))
4746
4747 (define-public python-bump2version
4748 (package
4749 (name "python-bump2version")
4750 (version "1.0.1")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "bump2version" version))
4755 (sha256
4756 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4757 (build-system python-build-system)
4758 (arguments
4759 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4760 ;; required: --new-version".
4761 `(#:tests? #false))
4762 (home-page "https://github.com/c4urself/bump2version")
4763 (synopsis "Version-bump your software with a single command!")
4764 (description
4765 "This package provides a small command line tool to simplify releasing
4766 software by updating all version strings in your source code by the correct
4767 increment. It also creates commits and tags.")
4768 (license license:expat)))
4769
4770 (define-public python-bumpversion
4771 (package
4772 (name "python-bumpversion")
4773 (version "0.5.3")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "bumpversion" version))
4778 (sha256
4779 (base32
4780 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4781 (build-system python-build-system)
4782 (home-page "https://github.com/peritus/bumpversion")
4783 (synopsis "Tool to bump software version")
4784 (description "This tool provides a command-line interface (CLI) to bump a
4785 software version simply.")
4786 (license license:expat)))
4787
4788 (define-public python-deprecated
4789 (package
4790 (name "python-deprecated")
4791 (version "1.2.13")
4792 (source
4793 (origin
4794 (method git-fetch)
4795 (uri (git-reference
4796 (url "https://github.com/tantale/deprecated")
4797 (commit (string-append "v" version))))
4798 (file-name (git-file-name name version))
4799 (sha256
4800 (base32
4801 "0v4ys9xr8lski2r98da99spsj6hjlnnqgnhhmyhrm66myiix885c"))))
4802 (build-system python-build-system)
4803 (arguments
4804 `(#:phases (modify-phases %standard-phases
4805 (replace 'check
4806 (lambda* (#:key tests? #:allow-other-keys)
4807 (when tests?
4808 (invoke "pytest")))))))
4809 (propagated-inputs
4810 (list python-wrapt))
4811 (native-inputs
4812 (list python-bumpversion python-pytest python-pytest-cov
4813 python-sphinx python-tox))
4814 (home-page "https://github.com/tantale/deprecated")
4815 (synopsis "Python decorator to deprecate classes, functions or methods")
4816 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4817 to deprecate classes, functions or methods.")
4818 (license license:expat)))
4819
4820 (define-public python-pygithub
4821 (package
4822 (name "python-pygithub")
4823 (version "1.54.1")
4824 (source
4825 ;; We fetch from the Git repo because there are no tests in the PyPI
4826 ;; archive.
4827 (origin
4828 (method git-fetch)
4829 (uri (git-reference
4830 (url "https://github.com/PyGithub/PyGithub")
4831 (commit (string-append "v" version))))
4832 (file-name (git-file-name name version))
4833 (sha256
4834 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4835 (build-system python-build-system)
4836 (arguments
4837 `(#:phases
4838 (modify-phases %standard-phases
4839 (replace 'check
4840 (lambda* (#:key tests? #:allow-other-keys)
4841 (when tests?
4842 (invoke "pytest"))
4843 #t)))))
4844 (propagated-inputs
4845 (list python-cryptography python-deprecated python-pyjwt
4846 python-requests))
4847 (native-inputs
4848 (list python-httpretty python-pytest))
4849 (home-page "https://pygithub.readthedocs.io/en/latest/")
4850 (synopsis "Python library for the GitHub API")
4851 (description "This library allows managing GitHub resources such as
4852 repositories, user profiles, and organizations in your Python applications,
4853 using version 3 of the GitHub application programming interface (API).")
4854 (license license:lgpl3+)))
4855
4856 (define-public python-rellu
4857 (package
4858 (name "python-rellu")
4859 (version "0.7")
4860 (source
4861 (origin
4862 (method url-fetch)
4863 (uri (pypi-uri "rellu" version))
4864 (sha256
4865 (base32
4866 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4867 (build-system python-build-system)
4868 (propagated-inputs
4869 (list python-invoke python-pygithub))
4870 (home-page "https://github.com/robotframework/rellu")
4871 (synopsis "Utilities to create PyPI releases")
4872 (description "This collection of utilities contains tooling and templates
4873 to assist in creating releases on GitHub and publishing them on PyPI. It is
4874 designed to be used by Robot Framework and tools and libraries in its
4875 ecosystem, but can naturally be used also by other projects.")
4876 (license license:asl2.0)))
4877
4878 (define-public python-robotframework
4879 (package
4880 (name "python-robotframework")
4881 (version "5.0")
4882 ;; There are no tests in the PyPI archive.
4883 (source
4884 (origin
4885 (method git-fetch)
4886 (uri (git-reference
4887 (url "https://github.com/robotframework/robotframework")
4888 (commit (string-append "v" version))))
4889 (file-name (git-file-name name version))
4890 (sha256
4891 (base32 "0qcm36c8hachbv3bc05ky7cf63i3sj0y8dw3bwjvcln28i543f81"))
4892 (patches (search-patches
4893 "python-robotframework-atest.patch"
4894 "python-robotframework-source-date-epoch.patch"))))
4895 (build-system python-build-system)
4896 (arguments
4897 (list
4898 #:modules '((guix build python-build-system)
4899 (guix build utils)
4900 (ice-9 ftw)
4901 (ice-9 match)
4902 (srfi srfi-26))
4903 #:phases
4904 #~(modify-phases %standard-phases
4905 (add-after 'unpack 'delete-problematic-tests
4906 (lambda _
4907 ;; Tests such as 'Tilde and username in path' rely on HOME and
4908 ;; USER being set, on top of the user's /etc/passwd home
4909 ;; directory not being '/', as is the case in the Guix build
4910 ;; container.
4911 (delete-file "atest/robot/standard_libraries/\
4912 operating_system/path_expansion.robot")
4913 ;; FIXME: The test 'Process.Sending Signal.By default signal
4914 ;; is not sent to process running in shell' fails for unknown
4915 ;; reason (see:
4916 ;; https://github.com/robotframework/robotframework/issues/4292).
4917 (delete-file "atest/robot/standard_libraries/\
4918 process/sending_signal.robot")))
4919 (add-before 'build 'build-and-install-doc
4920 (lambda* (#:key outputs #:allow-other-keys)
4921 (let ((doc (string-append (assoc-ref outputs "doc")
4922 "/share/doc/robotframework")))
4923 (invoke "invoke" "library-docs" "all")
4924 (invoke "doc/userguide/ug2html.py" "dist") ;user guide
4925 (mkdir-p doc)
4926 (with-directory-excursion "dist"
4927 (define user-guide-dir
4928 (match (scandir "." (cut string-prefix?
4929 "robotframework-userguide-" <>))
4930 ((dir) dir)
4931 (_ (error "could not find the user guide directory"))))
4932 (copy-recursively user-guide-dir doc)))))
4933 (replace 'check
4934 (lambda* (#:key native-inputs inputs tests?
4935 #:allow-other-keys)
4936 (when tests?
4937 ;; Some tests require timezone data. Otherwise, they
4938 ;; look up /etc/localtime, which doesn't exist, and
4939 ;; fail with:
4940 ;;
4941 ;; OverflowError: mktime argument out of range
4942 (setenv "TZDIR"
4943 (search-input-directory
4944 (or native-inputs inputs) "share/zoneinfo"))
4945 (setenv "TZ" "Europe/Paris")
4946
4947 (format #t "Running unit tests...~%")
4948 (invoke "utest/run.py")
4949
4950 (format #t "Running acceptance tests...~%")
4951 (invoke "xvfb-run" "atest/run.py")))))))
4952 (native-inputs
4953 (list python-docutils
4954 python-jsonschema
4955 python-invoke
4956 python-lxml
4957 python-pygments
4958 python-pyyaml
4959 python-rellu
4960 `(,python "tk") ;used when building the HTML doc
4961 python-xmlschema
4962 scrot ;for taking screenshots
4963 tzdata-for-tests
4964 xvfb-run))
4965 (outputs '("out" "doc"))
4966 (home-page "https://robotframework.org")
4967 (synopsis "Generic automation framework")
4968 (description "Robot Framework is a generic automation framework for
4969 acceptance testing, acceptance test driven development (ATDD), and robotic
4970 process automation (RPA).")
4971 (license license:asl2.0)))
4972
4973 (define-public python-robotframework-datadriver
4974 (package
4975 (name "python-robotframework-datadriver")
4976 (version "1.6.0")
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "robotframework-datadriver" version))
4981 (sha256
4982 (base32 "0qa2vry8jr49k5rbrvmkgggzsmis1wv06dp5dvwmp7afm7vjc51k"))))
4983 (build-system python-build-system)
4984 (arguments
4985 `(#:phases
4986 (modify-phases %standard-phases
4987 (add-before 'check 'skip-problematic-tests
4988 (lambda _
4989 ;; The test file 'tab-csv-file-name.tsv' contains special
4990 ;; characters for which there is no locale in the build
4991 ;; environment, causing one test to fail.
4992 (delete-file-recursively "atest/TestCases/csv_reader_config")))
4993 (replace 'check
4994 (lambda* (#:key tests? #:allow-other-keys)
4995 (when tests?
4996 (with-directory-excursion "atest"
4997 (invoke "sh" "run_atest.sh"))))))))
4998 (native-inputs (list python-docutils
4999 python-robotframework-stacktrace))
5000 (propagated-inputs (list python-openpyxl
5001 python-pandas
5002 python-pygments
5003 python-robotframework))
5004 (home-page "https://github.com/Snooz82/robotframework-datadriver")
5005 (synopsis "Data-driven test extension for Robot Framework")
5006 (description "DataDriver is a data-driven extension for Robot Framework.
5007 DataDriver uses the Listener Interface of Robot Framework to create new test
5008 cases based on a data file that contains the test data. DataDriver supports
5009 data files in the CSV, XLS or XLSX formats.")
5010 (license license:asl2.0)))
5011
5012 (define-public python-robotframework-lint
5013 ;; There is no properly tagged release; the commit below seems to correspond
5014 ;; to the 0.9 stable release available from PyPI. The tests are not
5015 ;; included in the PyPI archive, so we fetch the sources from the upstream
5016 ;; Git repo.
5017 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
5018 (revision "0"))
5019 (package
5020 (name "python-robotframework-lint")
5021 (version (git-version "1.1" ;version taken from 'rflint/version.py'
5022 revision commit))
5023 (source
5024 (origin
5025 (method git-fetch)
5026 (uri (git-reference
5027 (url "https://github.com/boakley/robotframework-lint")
5028 (commit commit)))
5029 (file-name (git-file-name name version))
5030 (sha256
5031 (base32
5032 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
5033 (build-system python-build-system)
5034 (arguments
5035 `(#:phases
5036 (modify-phases %standard-phases
5037 (replace 'check
5038 (lambda _
5039 (invoke "python" "-m" "robot" "-A"
5040 "tests/conf/default.args" "tests"))))))
5041 (propagated-inputs
5042 (list python-robotframework))
5043 (home-page "https://github.com/boakley/robotframework-lint/")
5044 (synopsis "Static analysis tool (linter) for Robot Framework")
5045 (description "This package provides the @code{rflint} command-line
5046 utility, a static analysis tool (linter) for Robot Framework source files.")
5047 (license license:asl2.0))))
5048
5049 (define-public python-robotframework-pabot
5050 (package
5051 (name "python-robotframework-pabot")
5052 (version "2.5.2")
5053 (source
5054 (origin
5055 ;; There are no tests in the PyPI archive.
5056 (method git-fetch)
5057 (uri (git-reference
5058 (url "https://github.com/mkorpela/pabot")
5059 (commit version)))
5060 (file-name (git-file-name name version))
5061 (sha256
5062 (base32
5063 "14a8isq1f4lgfwjb84hhzg6jm7ns18dxa9bg6dy8k2ml8zl0qknk"))))
5064 (build-system python-build-system)
5065 (arguments
5066 (list
5067 #:phases #~(modify-phases %standard-phases
5068 (replace 'check
5069 (lambda* (#:key tests? #:allow-other-keys)
5070 (when tests?
5071 (invoke "pytest" "-vv" "tests")))))))
5072 (propagated-inputs
5073 (list python-robotframework python-robotframework-stacktrace))
5074 (native-inputs
5075 (list python-pytest))
5076 (home-page "https://pabot.org")
5077 (synopsis "Parallel test runner for Robot Framework")
5078 (description "Pabot is a parallel executor for Robot Framework tests.")
5079 (license license:asl2.0)))
5080
5081 (define-public python-robotframework-stacktrace
5082 (package
5083 (name "python-robotframework-stacktrace")
5084 (version "0.4.1")
5085 (source
5086 (origin
5087 (method url-fetch)
5088 (uri (pypi-uri "robotframework-stacktrace" version))
5089 (sha256
5090 (base32 "19gnwr7da1zz9clhwsmvqfjf02d195i61lzpq4253dcsgrpb6v79"))))
5091 (build-system python-build-system)
5092 (arguments
5093 ;; The test suite fails (see:
5094 ;; https://github.com/MarketSquare/robotframework-stacktrace/issues/4).
5095 `(#:tests? #f
5096 #:phases
5097 (modify-phases %standard-phases
5098 (replace 'check
5099 (lambda* (#:key tests? #:allow-other-keys)
5100 (when tests?
5101 (with-directory-excursion "tests"
5102 (invoke "python" "-m" "robot" "."))))))))
5103 (propagated-inputs (list python-robotframework))
5104 (home-page "https://github.com/MarketSquare/robotframework-stacktrace")
5105 (synopsis "Robot Framework listener to print a stack trace on error")
5106 (description "StackTrace is a Robot Framework listener that prints a stack
5107 trace directly to the terminal to ease debugging.")
5108 (license license:asl2.0)))
5109
5110 (define-public python-robotframework-sshlibrary
5111 (package
5112 (name "python-robotframework-sshlibrary")
5113 (version "3.8.0")
5114 ;; There are no tests in the PyPI archive.
5115 (source
5116 (origin
5117 (method git-fetch)
5118 (uri (git-reference
5119 (url "https://github.com/robotframework/SSHLibrary")
5120 (commit (string-append "v" version))))
5121 (file-name (git-file-name name version))
5122 (sha256
5123 (base32
5124 "1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw"))
5125 (patches (search-patches
5126 "python-robotframework-sshlibrary-rf5-compat.patch"))))
5127 (build-system python-build-system)
5128 (arguments
5129 `(#:phases
5130 (modify-phases %standard-phases
5131 (add-before 'build 'build-and-install-doc
5132 (lambda* (#:key outputs #:allow-other-keys)
5133 (let ((doc (string-append
5134 (assoc-ref outputs "doc")
5135 "/share/doc/robotframework-sshlibrary")))
5136 (invoke "chmod" "-R" "+w" "docs")
5137 (invoke "invoke" "kw-docs" "project-docs")
5138 (mkdir-p doc)
5139 (for-each delete-file (find-files "docs" "\\.rst"))
5140 (copy-recursively "docs" doc))))
5141 (replace 'check
5142 (lambda* (#:key tests? #:allow-other-keys)
5143 (when tests?
5144 ;; Some tests require an SSH server; we remove them.
5145 (delete-file "utest/test_client_api.py")
5146 (delete-file "utest/test_scp.py")
5147 (invoke "python" "utest/run.py")))))))
5148 (propagated-inputs
5149 (list python-robotframework python-paramiko python-scp))
5150 (native-inputs
5151 (list openssh
5152 which
5153 ;; To generate the documentation
5154 python-docutils
5155 python-invoke
5156 python-pygments
5157 python-rellu))
5158 (outputs '("out" "doc"))
5159 (home-page "https://github.com/robotframework/SSHLibrary")
5160 (synopsis "Robot Framework library for SSH and SFTP")
5161 (description "SSHLibrary is a Robot Framework library providing support
5162 for SSH and SFTP. It has the following main usages:
5163 @itemize @bullet
5164 @item Executing commands on the remote machine, either blocking or non-blocking.
5165 @item Writing and reading in an interactive shell.
5166 @item Transferring files and directories over SFTP.
5167 @item Ensuring that files and directories exist on the remote machine.
5168 @end itemize")
5169 (license license:asl2.0)))
5170
5171 (define-public python-robotframework-pythonlibcore
5172 (package
5173 (name "python-robotframework-pythonlibcore")
5174 (version "3.0.0")
5175 (source
5176 (origin
5177 (method git-fetch) ;no tests in pypi archive
5178 (uri (git-reference
5179 (url "https://github.com/robotframework/PythonLibCore")
5180 (commit (string-append "v" version))))
5181 (file-name (git-file-name name version))
5182 (sha256
5183 (base32
5184 "0v89v8va65l6inh0fb34qgxawx6p29pnrmw4n5941yzdi3804rc4"))))
5185 (build-system python-build-system)
5186 (arguments
5187 `(#:phases (modify-phases %standard-phases
5188 (replace 'check
5189 (lambda* (#:key tests? #:allow-other-keys)
5190 (when tests?
5191 (invoke "utest/run.py")))))))
5192 (native-inputs
5193 (list python-pytest python-pytest-cov python-pytest-mockito
5194 python-robotframework))
5195 (home-page "https://github.com/robotframework/PythonLibCore")
5196 (synopsis "Robot Framework Python library tools")
5197 (description "PythonLibCore provides tools for creating larger test
5198 libraries for Robot Framework using Python. The Robot Framework hybrid and
5199 dynamic library APIs give more flexibility for library than the static library
5200 API, but they also set requirements for libraries which need to be implemented
5201 in the library side. PythonLibCore eases the problem by providing a simpler
5202 interface and by handling all the requirements towards the Robot Framework
5203 library APIs.")
5204 (license license:asl2.0)))
5205
5206 (define-public python-robotframework-seleniumlibrary
5207 (package
5208 (name "python-robotframework-seleniumlibrary")
5209 (version "5.1.3")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "robotframework-seleniumlibrary" version))
5214 (sha256
5215 (base32 "1dihrbcid9i7daw2qy6h3xsvwaxzmyip820jw5z11n60qrl006pm"))))
5216 (build-system python-build-system)
5217 ;; XXX: Tests require ungoogled-chromium, but the chromium module would
5218 ;; introduce a cycle if imported here.
5219 (propagated-inputs
5220 (list python-robotframework python-robotframework-pythonlibcore
5221 python-selenium))
5222 (home-page "https://github.com/robotframework/SeleniumLibrary")
5223 (synopsis "Web testing library for Robot Framework")
5224 (description "SeleniumLibrary is a web testing library for Robot Framework
5225 that utilizes the Selenium tool internally.")
5226 (license license:asl2.0)))
5227
5228 (define-public python-robotframework-seleniumscreenshots
5229 (package
5230 (name "python-robotframework-seleniumscreenshots")
5231 (version "0.9.5")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (pypi-uri "robotframework-seleniumscreenshots" version))
5236 (sha256
5237 (base32 "05qv323hvjmy62h33ryrjaa9k1hyvp8hq5qnj8j1x3ap2ci3q3s0"))))
5238 (build-system python-build-system)
5239 (arguments
5240 ;; XXX: The tests require a relatively complicated setup configured in
5241 ;; their CI with Nix (!).
5242 `(#:tests? #f))
5243 (propagated-inputs
5244 (list python-robotframework python-robotframework-seleniumlibrary))
5245 (home-page "https://github.com/MarketSquare/robotframework-seleniumscreenshots")
5246 (synopsis "Robot Framework library for annotating and cropping screenshots")
5247 (description "The SeleniumScreenshots library for Robot Framework provides
5248 keywords for annotating and cropping screenshots taken with SeleniumLibrary.
5249 It is useful for scripting automatically updated screenshots for documentation
5250 or for visual regression testing purposes.")
5251 (license license:bsd-3)))
5252
5253 (define-public python-rstr
5254 (package
5255 (name "python-rstr")
5256 (version "2.2.6")
5257 (source
5258 (origin
5259 (method url-fetch)
5260 (uri (pypi-uri "rstr" version))
5261 (sha256
5262 (base32
5263 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
5264 (build-system python-build-system)
5265 (home-page "https://github.com/leapfrogonline/rstr")
5266 (synopsis "Generate random strings in Python")
5267 (description "This package provides a python module for generating
5268 random strings of various types. It could be useful for fuzz testing,
5269 generating dummy data, or other applications. It has no dependencies
5270 outside the standard library.")
5271 (license license:bsd-3)))
5272
5273 (define-public python-scp
5274 (package
5275 (name "python-scp")
5276 (version "0.13.3")
5277 (source
5278 (origin
5279 (method url-fetch)
5280 (uri (pypi-uri "scp" version))
5281 (sha256
5282 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
5283 (build-system python-build-system)
5284 (arguments
5285 '(#:tests? #f)) ;tests require an SSH server
5286 (propagated-inputs
5287 (list python-paramiko))
5288 (home-page "https://github.com/jbardin/scp.py")
5289 (synopsis "SCP protocol module for Python and Paramiko")
5290 (description "The scp module extends the Paramiko library to send and
5291 receive files via the SCP1 protocol, as implemented by the OpenSSH
5292 @command{scp} program.")
5293 (license license:gpl2+)))
5294
5295 (define-public python-rst.linker
5296 (package
5297 (name "python-rst.linker")
5298 (version "1.11")
5299 (source
5300 (origin
5301 (method url-fetch)
5302 (uri (pypi-uri "rst.linker" version))
5303 (sha256
5304 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
5305 (build-system python-build-system)
5306 (propagated-inputs
5307 (list python-dateutil python-six))
5308 (native-inputs
5309 (list python-setuptools-scm))
5310 ;; Test would require path.py, which would introduce a cyclic dependence.
5311 (arguments `(#:tests? #f))
5312 ;; Note: As of version 1.7 the documentation is not worth building.
5313 (home-page "https://github.com/jaraco/rst.linker")
5314 (synopsis "Sphinx plugin to add links and timestamps")
5315 (description "rst.linker automatically replaces text by a
5316 reStructuredText external reference or timestamps. It's primary purpose is to
5317 augment the changelog, but it can be used for other documents, too.")
5318 (license license:expat)))
5319
5320 (define-public python2-rst.linker
5321 (package-with-python2 python-rst.linker))
5322
5323 (define-public python-sshpubkeys
5324 (package
5325 (name "python-sshpubkeys")
5326 (version "3.1.0")
5327 (home-page "https://github.com/ojarva/python-sshpubkeys")
5328 (source (origin
5329 (method git-fetch)
5330 (uri (git-reference
5331 (url home-page)
5332 (commit (string-append "v" version))))
5333 (file-name (git-file-name name version))
5334 (sha256
5335 (base32
5336 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
5337 (build-system python-build-system)
5338 (propagated-inputs
5339 (list python-cryptography python-ecdsa))
5340 (synopsis "OpenSSH public key parser")
5341 (description
5342 "This package provides a library for parsing and validating OpenSSH
5343 public key files.")
5344 (license license:bsd-3)))
5345
5346 (define-public python-feedgenerator
5347 (package
5348 (name "python-feedgenerator")
5349 (version "1.9")
5350 (source
5351 (origin
5352 (method url-fetch)
5353 (uri (pypi-uri "feedgenerator" version))
5354 (sha256
5355 (base32
5356 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
5357 (modules '((guix build utils)))
5358 (snippet
5359 '(begin
5360 ;; Remove pre-compiled .pyc files from source.
5361 (for-each delete-file-recursively
5362 (find-files "." "__pycache__" #:directories? #t))
5363 (for-each delete-file (find-files "." "\\.pyc$"))
5364 #t))))
5365 (build-system python-build-system)
5366 (propagated-inputs
5367 (list python-pytz python-six))
5368 (home-page "https://github.com/getpelican/feedgenerator")
5369 (synopsis
5370 "Standalone version of Django's Atom/RSS feed generator")
5371 (description
5372 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
5373 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
5374 (license license:bsd-3)))
5375
5376 (define-public python2-feedgenerator
5377 (package-with-python2 python-feedgenerator))
5378
5379 (define-public python-lsp-jsonrpc
5380 (package
5381 (name "python-lsp-jsonrpc")
5382 (version "1.0.0")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "python-lsp-jsonrpc" version))
5387 (sha256
5388 (base32
5389 "1gb0fsamxndhplx25v8m0b3k7aknzy454fpa0qsqsqnv6c3igv3v"))))
5390 (build-system python-build-system)
5391 (native-inputs
5392 (list python-mock python-pytest))
5393 (propagated-inputs
5394 (list python-ujson))
5395 (home-page "https://github.com/python-lsp/python-lsp-jsonrpc")
5396 (synopsis "JSON RPC 2.0 server library")
5397 (description
5398 "This package provides a JSON RPC 2.0 server library for Python.")
5399 (license license:expat)))
5400
5401 (define-public python-jsonrpc-server
5402 (deprecated-package "python-jsonrpc-server" python-lsp-jsonrpc))
5403
5404 (define-public python-pydantic
5405 (package
5406 (name "python-pydantic")
5407 (version "1.9.0")
5408 (source
5409 (origin
5410 (method git-fetch)
5411 (uri (git-reference
5412 (url "https://github.com/samuelcolvin/pydantic")
5413 (commit (string-append "v" version))))
5414 (file-name (git-file-name name version))
5415 (sha256
5416 (base32 "14wj3k9007fpbxk7593w6gdqrr68yzrsw4a41sj5ji4cv3r8z18b"))))
5417 (build-system python-build-system)
5418 (arguments
5419 '(#:phases
5420 (modify-phases %standard-phases
5421 (add-before 'check 'disable-test
5422 (lambda _
5423 ;; Reported upstream:
5424 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
5425 ;; Disable the faulty test as the fix is unclear.
5426 (substitute* "tests/test_validators.py"
5427 (("test_assert_raises_validation_error")
5428 "_test_assert_raises_validation_error"))
5429
5430 ;; These fail because of <https://bugs.python.org/issue40398>.
5431 ;; Remove after Python has been upgraded to >= 3.9.
5432 (substitute* "tests/test_generics.py"
5433 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
5434 ""))
5435 (substitute* "tests/test_schema.py"
5436 (("test_unenforced_constraints_schema")
5437 "_test_unenforced_constraints_schema"))
5438
5439 ;; Disable tests for the Hypothesis plugin because it is tricky
5440 ;; to configure in the build container.
5441 (delete-file "tests/test_hypothesis_plugin.py")))
5442 (replace 'check
5443 (lambda _ (invoke "pytest" "-vv"))))))
5444 (native-inputs
5445 (list python-pytest python-pytest-mock))
5446 (propagated-inputs
5447 (list python-typing-extensions))
5448 (home-page "https://github.com/samuelcolvin/pydantic")
5449 (synopsis "Python data validation and settings management")
5450 (description
5451 "Pydantic enforces type hints at runtime, and provides user friendly
5452 errors when data is invalid.")
5453 (license license:expat)))
5454
5455 (define-public python-pydocstyle
5456 (package
5457 (name "python-pydocstyle")
5458 (version "3.0.0")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "pydocstyle" version))
5463 (sha256
5464 (base32
5465 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
5466 (build-system python-build-system)
5467 (propagated-inputs
5468 (list python-six python-snowballstemmer))
5469 (home-page
5470 "https://github.com/PyCQA/pydocstyle/")
5471 (synopsis "Python docstring style checker")
5472 (description
5473 "This package provides a style checker for the Python Language
5474 Server (PLS).")
5475 (license license:expat)))
5476
5477 (define-public python-lsp-server
5478 (package
5479 (name "python-lsp-server")
5480 (version "1.3.3")
5481 (source
5482 (origin
5483 (method url-fetch)
5484 (uri (pypi-uri "python-lsp-server" version))
5485 (sha256
5486 (base32
5487 "0h6wxzmm6qjfwkkn3mnzn1fpmcp23fpbk74bi8p540q1nzccqj0v"))))
5488 (build-system python-build-system)
5489 (arguments
5490 `(#:phases
5491 (modify-phases %standard-phases
5492 (add-before 'check 'set-HOME
5493 (lambda _ (setenv "HOME" "/tmp")))
5494 (replace 'check
5495 (lambda _
5496 ;; Disable failing test.
5497 (invoke "python" "-m" "pytest" "-k"
5498 "not test_pyqt_completion"))))))
5499 (propagated-inputs
5500 (list python-autopep8
5501 python-configparser
5502 python-pydocstyle
5503 python-flake8
5504 python-future
5505 python-jedi
5506 python-lsp-jsonrpc
5507 python-pluggy
5508 python-pycodestyle
5509 python-pyflakes
5510 python-rope
5511 python-ujson
5512 python-yapf))
5513 (native-inputs
5514 (list python-coverage
5515 python-flaky
5516 python-matplotlib
5517 python-mock
5518 python-numpy
5519 python-pandas
5520 python-pylint
5521 python-pytest
5522 python-pytest-cov
5523 python-versioneer))
5524 (home-page "https://github.com/python-lsp/python-lsp-server")
5525 (synopsis "Python implementation of the Language Server Protocol")
5526 (description
5527 "The Python Language Server @command{pylsp} is an implementation of the
5528 Python 3 language specification for the Language Server Protocol (LSP).
5529 This tool is used in text editing environments to provide a complete
5530 and integrated feature-set for programming Python effectively.")
5531 (license license:expat)))
5532
5533 (define-public python-language-server
5534 (deprecated-package "python-language-server" python-lsp-server))
5535
5536 (define-public python-pathspec
5537 (package
5538 (name "python-pathspec")
5539 (version "0.9.0")
5540 (source
5541 (origin
5542 (method url-fetch)
5543 (uri (pypi-uri "pathspec" version))
5544 (sha256
5545 (base32
5546 "1cdbdb3s6ldnjpwbi0bgl0xlmw4mbfxk08bbdxc3srx26na4jr75"))))
5547 (build-system python-build-system)
5548 (home-page "https://github.com/cpburnz/python-path-specification")
5549 (synopsis "Utility library for gitignore style pattern matching of file paths")
5550 (description
5551 "This package provides a utility library for gitignore style pattern
5552 matching of file paths.")
5553 (license license:mpl2.0)))
5554
5555 (define-public python-black
5556 (package
5557 (name "python-black")
5558 (version "22.3.0")
5559 (source
5560 (origin
5561 (method url-fetch)
5562 (uri (pypi-uri "black" version))
5563 (sha256
5564 (base32
5565 "0yfahlqc7dsdp1js0cbv706apldnfnlbal9b53cww8n0hs40n0im"))))
5566 (build-system python-build-system)
5567 (arguments
5568 `(#:phases
5569 (modify-phases %standard-phases
5570 (add-after 'patch-source-shebangs 'use-absolute-file-names
5571 (lambda* (#:key native-inputs inputs #:allow-other-keys)
5572 (let* ((inpts (or native-inputs inputs))
5573 (python3 (search-input-file inpts "/bin/python3")))
5574 (substitute* (find-files "tests" "\\.py$")
5575 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
5576 (string-append "#!" python3 (if (string? minor-version)
5577 minor-version
5578 "")))))))
5579 (replace 'check
5580 (lambda* (#:key tests? #:allow-other-keys)
5581 (when tests? (invoke "pytest" "-vv")))))))
5582 (propagated-inputs
5583 (list python-click
5584 python-attrs
5585 python-appdirs
5586 python-pathspec
5587 python-mypy-extensions
5588 python-platformdirs
5589 python-regex
5590 python-tomli
5591 python-typed-ast
5592 python-typing-extensions))
5593 (native-inputs
5594 (list python-pytest python-pytest-aiohttp python-setuptools-scm))
5595 (home-page "https://github.com/psf/black")
5596 (synopsis "The uncompromising code formatter")
5597 (description "Black is the uncompromising Python code formatter.")
5598 (license license:expat)))
5599
5600 (define-public python-black-macchiato
5601 (package
5602 (name "python-black-macchiato")
5603 (version "1.3.0")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (pypi-uri "black-macchiato" version))
5608 (sha256
5609 (base32
5610 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
5611 (build-system python-build-system)
5612 (propagated-inputs
5613 (list python-black))
5614 (home-page "https://github.com/wbolster/black-macchiato")
5615 (synopsis "Partial @code{python-black} formatting")
5616 (description
5617 "This package is built on top the @{python-black} code formatter to
5618 enable formatting of partial files.")
5619 (license license:bsd-3)))
5620
5621 (define-public python-blinker
5622 (package
5623 (name "python-blinker")
5624 (version "1.4")
5625 (source
5626 (origin
5627 (method url-fetch)
5628 (uri (pypi-uri "blinker" version))
5629 (sha256
5630 (base32
5631 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
5632 (build-system python-build-system)
5633 (home-page "https://pythonhosted.org/blinker/")
5634 (synopsis "Fast, simple object-to-object and broadcast signaling")
5635 (description
5636 "Blinker provides a fast dispatching system that allows any number of
5637 interested parties to subscribe to events, or \"signals\".")
5638 (license license:expat)))
5639
5640 (define-public python2-blinker
5641 (package-with-python2 python-blinker))
5642
5643 (define-public pelican
5644 (package
5645 (name "pelican")
5646 (version "4.7.2")
5647 (source
5648 (origin
5649 (method url-fetch)
5650 (uri (pypi-uri "pelican" version))
5651 (sha256
5652 (base32 "0m1kndc98hhnlq0yl05f4lzccw555pkxnrajj6lks18yh491kw8w"))))
5653 (build-system python-build-system)
5654 (inputs
5655 (list python-blinker
5656 python-dateutil
5657 ;; Ignoring `guix lint` warning as python-docutils is used to support
5658 ;; reStructuredText processing at runtime.
5659 python-docutils
5660 python-feedgenerator
5661 python-jinja2
5662 python-markdown
5663 python-pygments
5664 python-pytz
5665 python-rich
5666 python-unidecode))
5667 (home-page "https://blog.getpelican.com/")
5668 (arguments
5669 `(;; XXX Requires a lot more packages to do unit tests :P
5670 #:tests? #f))
5671 (synopsis "Python-based static site publishing system")
5672 (description
5673 "Pelican is a tool to generate a static blog from reStructuredText,
5674 Markdown input files, and more. Pelican uses Jinja2 for templating
5675 and is very extensible.")
5676 (license license:agpl3+)))
5677
5678 (define-public mallard-ducktype
5679 (package
5680 (name "mallard-ducktype")
5681 (version "1.0.2")
5682 (source
5683 (origin
5684 (method git-fetch)
5685 ;; git-reference because tests are not included in pypi source tarball
5686 ;; https://issues.guix.gnu.org/issue/36755#2
5687 (uri (git-reference
5688 (url "https://github.com/projectmallard/mallard-ducktype")
5689 (commit version)))
5690 (file-name (git-file-name name version))
5691 (sha256
5692 (base32
5693 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
5694 (build-system python-build-system)
5695 (arguments
5696 '(#:phases
5697 (modify-phases %standard-phases
5698 (replace 'check
5699 (lambda _
5700 (with-directory-excursion "tests"
5701 (invoke "sh" "runtests")))))))
5702 (home-page "http://projectmallard.org")
5703 (synopsis "Convert Ducktype to Mallard documentation markup")
5704 (description
5705 "Ducktype is a lightweight syntax that can represent all the semantics
5706 of the Mallard XML documentation system. Ducktype files can be converted to
5707 Mallard using the @command{ducktype} tool. The yelp-tools package
5708 provides additional functionality on the produced Mallard documents.")
5709 (license license:expat)))
5710
5711 (define-public python-cython
5712 (package
5713 (name "python-cython")
5714 (version "0.29.24")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "Cython" version))
5719 (sha256
5720 (base32 "0hw4gs18rh4slij1fg252argxhraypld9apbqbl60230qc3lvw6d"))))
5721 (build-system python-build-system)
5722 ;; we need the full python package and not just the python-wrapper
5723 ;; because we need libpython3.3m.so
5724 (inputs
5725 (list python))
5726 (arguments
5727 `(#:phases
5728 (modify-phases %standard-phases
5729 (add-before 'check 'set-HOME
5730 ;; some tests require access to "$HOME/.cython"
5731 (lambda _ (setenv "HOME" "/tmp")))
5732 (replace 'check
5733 (lambda* (#:key tests? #:allow-other-keys)
5734 ;; Disable compiler optimizations to greatly reduce the running
5735 ;; time of the test suite.
5736 (setenv "CFLAGS" "-O0")
5737
5738 (when tests?
5739 (invoke "python" "runtests.py" "-vv"
5740 "-j" (number->string (parallel-job-count))
5741 ;; XXX: On 32-bit architectures, running the parallel tests
5742 ;; fails on many-core systems, see
5743 ;; <https://github.com/cython/cython/issues/2807>.
5744 ,@(if (not (target-64bit?))
5745 '("-x" "run.parallel")
5746 '())
5747 ;; This test fails when running on 24 cores.
5748 "-x" "cpp_stl_conversion")))))))
5749 (home-page "https://cython.org/")
5750 (synopsis "C extensions for Python")
5751 (description "Cython is an optimising static compiler for both the Python
5752 programming language and the extended Cython programming language. It makes
5753 writing C extensions for Python as easy as Python itself.")
5754 (license license:asl2.0)
5755 (properties `((python2-variant . ,(delay python2-cython))))))
5756
5757 (define-public python2-cython
5758 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
5759 (package/inherit base
5760 (name "python2-cython")
5761 (inputs
5762 `(("python-2" ,python-2))) ;this is not automatically changed
5763 (arguments
5764 (substitute-keyword-arguments (package-arguments base)
5765 ((#:phases phases)
5766 `(modify-phases ,phases
5767 (add-before 'check 'adjust-test_embed
5768 (lambda _
5769 (substitute* "runtests.py"
5770 ;; test_embed goes great lengths to find the static libpythonX.Y.a
5771 ;; so it can give the right -L flag to GCC when embedding static
5772 ;; builds of Python. It is unaware that the Python "config"
5773 ;; directory (where the static library lives) was renamed in
5774 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
5775 ;; which works fine, because that is where the shared library is.
5776 ;;
5777 ;; It also appears to be unaware that the Makefile in Demos/embed
5778 ;; already unconditionally pass the static library location to GCC,
5779 ;; after checking sysconfig.get_config_var('LIBPL).
5780 ;;
5781 ;; The effect is that the linker is unable to resolve libexpat
5782 ;; symbols when building for Python 2, because neither the Python 2
5783 ;; shared library nor Expat is available. To fix it, we can either
5784 ;; add Expat as an input and make it visible to the linker, or just
5785 ;; prevent it from overriding the Python shared library location.
5786 ;; The end result is identical, so we take the easy route.
5787 ((" or libname not in os\\.listdir\\(libdir\\)")
5788 ""))
5789 #t)))))))))
5790
5791 (define-public python-cython-3
5792 (package
5793 (inherit python-cython)
5794 ;; Cython 3 is not officially released yet, so distinguish the name
5795 ;; for now.
5796 (name "python-cython-next")
5797 (version "3.0.0a10")
5798 (source (origin
5799 (method url-fetch)
5800 (uri (pypi-uri "Cython" version))
5801 (sha256
5802 (base32
5803 "17fqacrpis05w1rpi7d7sbimrk20xf8h6d3vrz5nf6ix3899abil"))))
5804 (properties '())))
5805
5806 ;; NOTE: when upgrading numpy please make sure that python-numba,
5807 ;; python-pandas and python-scipy still build, as these three packages are
5808 ;; often used together.
5809 (define-public python-numpy
5810 (package
5811 (name "python-numpy")
5812 (version "1.21.6")
5813 (source
5814 (origin
5815 (method url-fetch)
5816 (uri (string-append
5817 "https://github.com/numpy/numpy/releases/download/v"
5818 version "/numpy-" version ".tar.gz"))
5819 (sha256
5820 (base32
5821 "0b0c5y35rd3mvwfk5is1d5ppfw9nl4d2rgx9xkwh1p0w394wdvyl"))))
5822 (build-system python-build-system)
5823 (arguments
5824 (list
5825 #:modules '((guix build utils)
5826 (guix build python-build-system)
5827 (ice-9 format))
5828 #:phases
5829 #~(modify-phases %standard-phases
5830 (add-before 'build 'parallelize-build
5831 (lambda _
5832 (setenv "NPY_NUM_BUILD_JOBS"
5833 (number->string (parallel-job-count)))))
5834 (add-before 'build 'configure-blas
5835 (lambda* (#:key inputs #:allow-other-keys)
5836 (call-with-output-file "site.cfg"
5837 (lambda (port)
5838 (format port
5839 "\
5840 [openblas]
5841 libraries = openblas
5842 library_dirs = ~a/lib
5843 include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))
5844 (add-before 'build 'fix-executable-paths
5845 (lambda* (#:key inputs #:allow-other-keys)
5846 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5847 ;; instead of /bin/sh.
5848 (substitute* "numpy/distutils/exec_command.py"
5849 (("'/bin/sh'")
5850 (format #f "~s" (search-input-file inputs "bin/bash"))))))
5851 (replace 'check
5852 (lambda* (#:key tests? outputs inputs #:allow-other-keys)
5853 (when tests?
5854 (invoke "./runtests.py" "-vv" "--no-build" "--mode=fast"
5855 "-j" (number->string (parallel-job-count))
5856 ;; Contrary to scipy, the runtests.py script of numpy
5857 ;; does *not* automatically provide -n when -j is used
5858 ;; (see: https://github.com/numpy/numpy/issues/21359).
5859 "--" "-n" (number->string (parallel-job-count))
5860 "-k" (string-append
5861 ;; These tests may fail on 32-bit systems (see:
5862 ;; https://github.com/numpy/numpy/issues/18387).
5863 "not test_float_remainder_overflow "
5864 "and not test_pareto"))))))))
5865 (native-inputs
5866 (list python-cython
5867 python-hypothesis-next
5868 python-pytest
5869 python-pytest-xdist
5870 gfortran))
5871 (inputs (list bash openblas))
5872 (home-page "https://numpy.org")
5873 (synopsis "Fundamental package for scientific computing with Python")
5874 (description "NumPy is the fundamental package for scientific computing
5875 with Python. It contains among other things: a powerful N-dimensional array
5876 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5877 and Fortran code, useful linear algebra, Fourier transform, and random number
5878 capabilities.")
5879 (properties `((python2-variant . ,(delay python2-numpy))))
5880 (license license:bsd-3)))
5881
5882 (define-public python-numpy-next
5883 (package
5884 (inherit python-numpy)
5885 (name "python-numpy-next")
5886 (version "1.22.3")
5887 (source
5888 (origin
5889 (inherit (package-source python-numpy))
5890 (method url-fetch)
5891 (uri (string-append
5892 "https://github.com/numpy/numpy/releases/download/v"
5893 version "/numpy-" version ".tar.gz"))
5894 (sha256
5895 (base32
5896 "19dw91pqbqcniw2z57kiyqs1qp56g7kqy1bdyv664g8s62sc01m9"))))))
5897
5898 (define-public python-numpy-documentation
5899 (package
5900 (inherit python-numpy)
5901 (name "python-numpy-documentation")
5902 (arguments
5903 (list
5904 #:tests? #f ;we're only generating the documentation
5905 #:phases
5906 #~(modify-phases %standard-phases
5907 (add-before 'build 'add-gnu-freefont-to-texmf
5908 (lambda _
5909 ;; XXX: The Sphinx-generated tex output specifies the GNU
5910 ;; FreeFont font to be searched via its extension, which uses
5911 ;; kpathsea instead of fontconfig and fail (see:
5912 ;; https://github.com/sphinx-doc/sphinx/issues/10347). Create a
5913 ;; symlink to GNU FreeFont and add it to the TEXMF tree via
5914 ;; GUIX_TEXMF.
5915 (mkdir-p "texmf-dist/fonts/opentype/public")
5916 (symlink (string-append
5917 #$(this-package-native-input "font-gnu-freefont")
5918 "/share/fonts/opentype")
5919 (string-append
5920 (getcwd) "/"
5921 "texmf-dist/fonts/opentype/public/gnu-freefont"))
5922 (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":"
5923 (getcwd) "/texmf-dist"))))
5924 (delete 'build)
5925 (replace 'install
5926 (lambda _
5927 (let* ((data (string-append #$output "/share"))
5928 (doc (string-append data "/doc/numpy"))
5929 (html (string-append doc "/html"))
5930 (info (string-append data "/info"))
5931 (sphinxopts (string-append
5932 "SPHINXOPTS=-j"
5933 (number->string (parallel-job-count)))))
5934 (with-directory-excursion "doc"
5935 ;; Do not treat warnings as errors.
5936 (substitute* "Makefile"
5937 ((" -WT ") " -T "))
5938 (setenv "HOME" "/tmp")
5939 ;; Build the PDF documentation.
5940 (invoke "make" "latex-build" sphinxopts)
5941 (invoke "make" "-C" "build/latex" "all-pdf" sphinxopts)
5942 ;; Build the HTML documentation
5943 (invoke "make" "html" sphinxopts)
5944 ;; Build the Info documentation. The issues worked around
5945 ;; below can be tracked at
5946 ;; https://github.com/numpy/numpy/issues/12278.
5947 (substitute* "source/conf.py"
5948 ;; The root document should be "index", not "contents".
5949 (("\"contents\"") "'index'")
5950 ;; Disable Sphinx extensions that produce broken Texinfo.
5951 ((".*'numpydoc'.*") "")
5952 ((".*'sphinx.ext.autosummary'.*") ""))
5953 (invoke "make" "info" sphinxopts)
5954 ;; Install the HTML documentation.
5955 (mkdir-p html)
5956 (copy-recursively "build/html" html)
5957 ;; Install the PDF reference and user manuals.
5958 (install-file "build/latex/numpy-ref.pdf" doc)
5959 (install-file "build/latex/numpy-user.pdf" doc)
5960 ;; Install the info manual.
5961 (install-file "build/texinfo/numpy.info" info)
5962 (symlink (string-append html "/_images")
5963 (string-append info "/numpy-figures")))))))))
5964 (native-inputs
5965 (list font-gnu-freefont
5966 perl
5967 python-breathe
5968 python-ipython
5969 python-matplotlib
5970 python-numpy
5971 python-numpydoc
5972 python-pandas
5973 python-pydata-sphinx-theme
5974 python-scipy ;used by matplotlib
5975 python-sphinx
5976 python-sphinx-panels
5977 texinfo
5978 texlive-bin
5979 texlive-cbfonts
5980 texlive-cm-super
5981 texlive-greek-fontenc
5982 texlive-latex-expdlist
5983 texlive-polyglossia
5984 texlive-xindy))
5985 (inputs '())
5986 (propagated-inputs '())
5987 (synopsis "Documentation for the @code{python-numpy} package")
5988 (description "This package provides the complete NumPy documentation in
5989 the Texinfo, HTML, and PDF formats.")))
5990
5991 ;; Numpy 1.16.x are the last versions that support Python 2.
5992 (define-public python2-numpy
5993 (let ((numpy (package-with-python2
5994 (strip-python2-variant python-numpy))))
5995 (package
5996 (inherit numpy)
5997 (name "python2-numpy")
5998 (version "1.16.5")
5999 (source (origin
6000 (method url-fetch)
6001 (uri (string-append
6002 "https://github.com/numpy/numpy/releases/download/v"
6003 version "/numpy-" version ".tar.gz"))
6004 (sha256
6005 (base32
6006 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb"))))
6007 (arguments
6008 (substitute-keyword-arguments (package-arguments numpy)
6009 ((#:phases phases)
6010 #~(modify-phases #$phases
6011 (add-after 'unpack 'delete-failing-tests
6012 (lambda _
6013 ;; There's just one failing test here.
6014 (delete-file "numpy/linalg/tests/test_linalg.py")
6015 ;; ...and this one depends on the previous one.
6016 (delete-file "numpy/matrixlib/tests/test_matrix_linalg.py")))
6017 (replace 'check
6018 ;; Older versions don't cope well with the extra Pytest
6019 ;; options, so remove them.
6020 (lambda* (#:key tests? outputs inputs #:allow-other-keys)
6021 (when tests?
6022 (invoke "./runtests.py" "-vv" "--no-build" "--mode=fast"
6023 "-j" (number->string (parallel-job-count))))))))))
6024 (native-inputs
6025 (list python2-cython python2-pytest gfortran)))))
6026
6027 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
6028 ;; interest only for legacy code going back to NumPy's predecessor
6029 ;; Numeric.
6030 (define-public python2-numpy-1.8
6031 (package
6032 (inherit python2-numpy)
6033 (version "1.8.2")
6034 (source
6035 (origin
6036 (method git-fetch)
6037 (uri (git-reference
6038 (url "https://github.com/numpy/numpy")
6039 (commit (string-append "v" version))))
6040 (file-name (git-file-name "numpy" version))
6041 (sha256
6042 (base32
6043 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
6044 (arguments (substitute-keyword-arguments (package-arguments python2-numpy)
6045 ((#:tests? _ #f) #f) ;disable tests
6046 ((#:phases phases)
6047 #~(modify-phases #$phases
6048 (delete 'delete-failing-tests)))))
6049 (native-inputs '())
6050 (description "NumPy is the fundamental package for scientific computing
6051 with Python. It contains among other things: a powerful N-dimensional array
6052 object, sophisticated (broadcasting) functions, tools for integrating C/C++
6053 and Fortran code, useful linear algebra, Fourier transform, and random number
6054 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
6055 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
6056 Numeric.")
6057 (license license:bsd-3)))
6058
6059 (define-public python-munch
6060 (package
6061 (name "python-munch")
6062 (version "2.0.4")
6063 (source
6064 (origin
6065 (method url-fetch)
6066 (uri (pypi-uri "munch" version))
6067 (sha256
6068 (base32
6069 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
6070 (build-system python-build-system)
6071 (home-page "https://github.com/Infinidat/munch")
6072 (synopsis "Dot-accessible dictionary")
6073 (description "Munch is a dot-accessible dictionary similar to JavaScript
6074 objects.")
6075 (license license:expat)))
6076
6077 (define-public python2-munch
6078 (package-with-python2 python-munch))
6079
6080 (define-public python-colormath
6081 (package
6082 (name "python-colormath")
6083 (version "3.0.0")
6084 (source
6085 (origin
6086 (method url-fetch)
6087 (uri (pypi-uri "colormath" version))
6088 (sha256
6089 (base32
6090 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
6091 (build-system python-build-system)
6092 (propagated-inputs
6093 (list python-networkx python-numpy))
6094 (home-page "https://github.com/gtaylor/python-colormath")
6095 (synopsis "Color math and conversion library")
6096 (description
6097 "This is a Python library for color math and conversions.")
6098 (license license:bsd-3)))
6099
6100 (define-public python-sparse
6101 (package
6102 (name "python-sparse")
6103 (version "0.13.0")
6104 (source
6105 (origin
6106 (method url-fetch)
6107 (uri (pypi-uri "sparse" version))
6108 (sha256
6109 (base32
6110 "05ar1lhq1yy4nb78s7vpb1wz4ac4kj0r4lrd7yrf23kpmaacjpb8"))))
6111 (build-system python-build-system)
6112 (arguments
6113 `(#:phases
6114 (modify-phases %standard-phases
6115 (replace 'check
6116 (lambda* (#:key tests? #:allow-other-keys)
6117 (when tests?
6118 (invoke "python" "-m" "pytest" "-v")))))))
6119 (propagated-inputs
6120 (list python-numba python-numpy python-scipy))
6121 (native-inputs
6122 (list python-dask python-pytest python-pytest-black
6123 python-pytest-cov))
6124 (home-page "https://github.com/pydata/sparse/")
6125 (synopsis "Library for multi-dimensional sparse arrays")
6126 (description
6127 "This package implements sparse arrays of arbitrary dimension on top of
6128 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
6129 of the elements are zero. @code{python-sparse} generalizes the
6130 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
6131 extends beyond just rows and columns to an arbitrary number of dimensions.
6132 Additionally, this project maintains compatibility with the
6133 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
6134 used in @code{scipy.sparse}. These differences make this project useful in
6135 certain situations where @code{scipy.sparse} matrices are not well suited, but
6136 it should not be considered a full replacement. It lacks layouts that are not
6137 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
6138 depends on @code{scipy.sparse} for some computations.")
6139 (license license:bsd-3)))
6140
6141 (define-public python-spectra
6142 (package
6143 (name "python-spectra")
6144 (version "0.0.11")
6145 (source
6146 (origin
6147 (method url-fetch)
6148 (uri (pypi-uri "spectra" version))
6149 (sha256
6150 (base32
6151 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
6152 (build-system python-build-system)
6153 (arguments
6154 `(#:phases
6155 (modify-phases %standard-phases
6156 (replace 'check
6157 (lambda _ (invoke "nosetests" "-v"))))))
6158 (propagated-inputs
6159 (list python-colormath))
6160 (native-inputs
6161 (list python-nose))
6162 (home-page "https://github.com/jsvine/spectra")
6163 (synopsis "Color scales and color conversion")
6164 (description
6165 "This package provides a Python library intended to make color math,
6166 color scales, and color space conversion easy. It has support for:
6167
6168 @enumerate
6169 @item Color scales
6170 @item Color ranges
6171 @item Color blending
6172 @item Brightening/darkening colors
6173 @item Saturating/desaturating colors
6174 @item Conversion to/from multiple color spaces.
6175 @end enumerate\n")
6176 (license license:expat)))
6177
6178 (define-public python-pyspnego
6179 (package
6180 (name "python-pyspnego")
6181 (version "0.1.6")
6182 (source
6183 (origin
6184 (method git-fetch) ;no tests in PyPI release
6185 (uri (git-reference
6186 (url "https://github.com/jborean93/pyspnego")
6187 (commit (string-append "v" version))))
6188 (file-name (git-file-name name version))
6189 (sha256
6190 (base32
6191 "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
6192 (build-system python-build-system)
6193 (arguments
6194 `(#:phases (modify-phases %standard-phases
6195 (replace 'check
6196 (lambda* (#:key tests? #:allow-other-keys)
6197 (when tests?
6198 (invoke "pytest")))))))
6199 (native-inputs
6200 (list python-pytest python-pytest-mock))
6201 (propagated-inputs
6202 (list python-cryptography python-gssapi python-ruamel.yaml))
6203 (home-page "https://github.com/jborean93/pyspnego")
6204 (synopsis "Python SPNEGO library")
6205 (description "The @code{pyspnego} Python library handles Negotiate, NTLM,
6206 Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet
6207 parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human
6208 readable format.")
6209 (license license:expat)))
6210
6211 (define-public python-pygit2
6212 (package
6213 (name "python-pygit2")
6214 (version "1.9.1")
6215 (source
6216 (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "pygit2" version))
6219 (sha256
6220 (base32 "1jdr6z1il03nifwgpcdf95w6xzzbfzdkcqq5dcqjaa0rnv1pjr7g"))))
6221 (build-system python-build-system)
6222 (arguments
6223 '(#:tests? #f)) ; tests don't run correctly in our environment
6224 (propagated-inputs
6225 (list python-cached-property python-cffi libgit2))
6226 (native-inputs
6227 (list python-pytest))
6228 (home-page "https://github.com/libgit2/pygit2")
6229 (synopsis "Python bindings for libgit2")
6230 (description "Pygit2 is a set of Python bindings to the libgit2 shared
6231 library, libgit2 implements Git plumbing.")
6232 ;; GPL2.0 only, with linking exception.
6233 (license license:gpl2)))
6234
6235 (define-public python-patiencediff
6236 (package
6237 (name "python-patiencediff")
6238 (version "0.2.0")
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (pypi-uri "patiencediff" version))
6243 (sha256
6244 (base32
6245 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
6246 (build-system python-build-system)
6247 (home-page "https://www.breezy-vcs.org/")
6248 (synopsis "Python implementation of the patiencediff algorithm")
6249 (description
6250 "This package contains a Python implementation of the @code{patiencediff}
6251 algorithm. Patiencediff provides a good balance of performance, nice output for
6252 humans, and implementation simplicity.")
6253 (license license:gpl2)))
6254
6255 (define-public python-wmctrl
6256 (package
6257 (name "python-wmctrl")
6258 (version "0.4")
6259 (source
6260 (origin
6261 (method url-fetch)
6262 (uri (pypi-uri "wmctrl" version))
6263 (sha256
6264 (base32
6265 "1q0l1sqnj5wma87k3dsgmsyph464syjc6fl8qcpa41nan1rgzjv6"))))
6266 (build-system python-build-system)
6267 (arguments
6268 `(#:phases (modify-phases %standard-phases
6269 (add-after 'unpack 'patch-paths
6270 (lambda* (#:key inputs #:allow-other-keys)
6271 (let ((wmctrl (assoc-ref inputs "wmctrl")))
6272 (substitute* "wmctrl.py"
6273 (("'wmctrl")
6274 (string-append "'" wmctrl "/bin/wmctrl")))))))))
6275 (inputs (list wmctrl))
6276 (propagated-inputs (list python-attrs))
6277 (home-page "https://github.com/antocuni/wmctrl")
6278 (synopsis "Tool to programmatically control Xorg windows")
6279 (description "This package provides a library for programmatically
6280 controlling Xorg windows using Python. The library relies on the
6281 @command{wmctrl} to do so.")
6282 (license license:expat)))
6283
6284 (define-public python-fancycompleter
6285 (package
6286 (name "python-fancycompleter")
6287 (version "0.9.1")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "fancycompleter" version))
6292 (sha256
6293 (base32 "0wkj4h01pxa8prv59zl09a0i3w26k835bfpjgvyvsai4mswgxq09"))))
6294 (build-system python-build-system)
6295 (arguments
6296 `(#:phases (modify-phases %standard-phases
6297 (add-after 'unpack 'fix-setup.py
6298 (lambda _
6299 (substitute* "setup.py"
6300 ((".*setupmeta.*")
6301 "")
6302 (("versioning=.*")
6303 (string-append "version='" ,version "',"))
6304 ((".*pyrepl.*") ;broken on Python 3
6305 "")))))))
6306 (home-page "https://github.com/pdbpp/fancycompleter")
6307 (synopsis "TAB completion library for Python")
6308 (description "@code{fancycompleter} is a module that adds TAB completion
6309 to the interactive prompt. It is an extension of the @code{rlcompleter}
6310 module from the standard Python library.")
6311 (license license:bsd-3)))
6312
6313 (define-public python-ipdb
6314 (package
6315 (name "python-ipdb")
6316 (version "0.13.9")
6317 (source
6318 (origin
6319 (method url-fetch)
6320 (uri (pypi-uri "ipdb" version))
6321 (sha256
6322 (base32 "1ibql99agjf2gj7y0svzd5m0h81hailf4p3sj3yl9i1i8ykdj6wm"))))
6323 (build-system python-build-system)
6324 (arguments
6325 (list #:phases #~(modify-phases %standard-phases
6326 (replace 'check
6327 (lambda* (#:key tests? #:allow-other-keys)
6328 (when tests?
6329 (invoke "python" "-m" "unittest" "discover")))))))
6330 (propagated-inputs (list python-ipython python-toml python-decorator))
6331 (home-page "https://github.com/gotcha/ipdb")
6332 (synopsis "IPython-enhanced Python debugger (pdb)")
6333 (description "@code{ipdb} exports functions to access the IPython
6334 debugger, which features tab completion, syntax highlighting, better
6335 tracebacks and better introspection than Python's standard @command{pdb}
6336 debugger, with which it shares the same interface.")
6337 (license license:bsd-3)))
6338
6339 (define-public python-pdbpp
6340 (package
6341 (name "python-pdbpp")
6342 (version "0.10.3")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "pdbpp" version))
6347 (sha256
6348 (base32
6349 "1xb9yvi30rb1cdpvfdk2kg79vh3anvkz91r8bwvfp3iqv97kzr6r"))))
6350 (build-system python-build-system)
6351 (arguments
6352 `(#:phases
6353 (modify-phases %standard-phases
6354 (replace 'check
6355 (lambda* (#:key tests? #:allow-other-keys)
6356 (when tests?
6357 (invoke "pytest"
6358 "-k"
6359 (string-append
6360 ;; These tests seem to require a real TTY.
6361 "not interaction_restores_previous_sigint_handler "
6362 "and not python_m_pdb_uses_pdbpp"))))))))
6363 (propagated-inputs
6364 (list python-fancycompleter python-pygments python-wmctrl))
6365 (native-inputs
6366 (list python-pytest python-setuptools-scm))
6367 (home-page "https://github.com/pdbpp/pdbpp")
6368 (synopsis "Drop-in replacement for pdb")
6369 (description "Pdb++ is a drop-in replacement for @code{pdb}. It
6370 includes the following improvements compared to @code{pdb}:
6371 @itemize
6372 @item auto-completion
6373 @item syntax highlighting of code listings
6374 @item sticky mode
6375 @item new commands to be used from the interactive (Pdb++) prompt
6376 @item smart command parsing
6377 @item additional convenience functions in the @code{pdb} module.
6378 @end itemize")
6379 (license license:bsd-3)))
6380
6381 (define-public python-pdftotext
6382 (package
6383 (name "python-pdftotext")
6384 (version "2.1.6")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "pdftotext" version))
6389 (sha256
6390 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
6391 (build-system python-build-system)
6392 (inputs
6393 (list poppler))
6394 (home-page "https://github.com/jalan/pdftotext")
6395 (synopsis "Simple PDF text extraction")
6396 (description "Pdftotext is a Python library of PDF text extraction.")
6397 (license license:expat)))
6398
6399 (define-public python-pluginbase
6400 (package
6401 (name "python-pluginbase")
6402 (version "1.0.1")
6403 (source
6404 (origin
6405 (method url-fetch)
6406 (uri (pypi-uri "pluginbase" version))
6407 (sha256
6408 (base32
6409 "11z2vvbp13828y0x3w39f29p9r9xcix7h7c4fff2w8yfiylk6v7z"))))
6410 (build-system python-build-system)
6411 (arguments
6412 `(#:phases (modify-phases %standard-phases
6413 (replace 'check
6414 (lambda* (#:key tests? #:allow-other-keys)
6415 (when tests?
6416 (invoke "make" "test")))))))
6417 (native-inputs (list python-pytest))
6418 (home-page "https://github.com/mitsuhiko/pluginbase")
6419 (synopsis "Simple but flexible plugin system for Python")
6420 (description "PluginBase is a library useful in the development of
6421 flexible plugin systems in Python.")
6422 (license license:bsd-3)))
6423
6424 (define-public python-node-semver
6425 (package
6426 (name "python-node-semver")
6427 (version "0.8.1")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "node-semver" version))
6432 (sha256
6433 (base32
6434 "000ypfns5x72b41w5f9pk6k3jnr35scliqfbvmilyvv0178005i8"))))
6435 (build-system python-build-system)
6436 (native-inputs
6437 (list python-pytest))
6438 (home-page "https://github.com/podhmo/python-node-semver")
6439 (synopsis "Python port of node-semver")
6440 (description "This module provides a Python version of node-semver, a
6441 semantic version parser for Node.js.")
6442 (license license:expat)))
6443
6444 (define-public python-patch-ng
6445 (package
6446 (name "python-patch-ng")
6447 (version "1.17.4")
6448 (source
6449 (origin
6450 (method git-fetch) ;no tests in PyPI archive
6451 (uri (git-reference
6452 (url "https://github.com/conan-io/python-patch-ng")
6453 (commit version)))
6454 (file-name (git-file-name name version))
6455 (sha256
6456 (base32
6457 "0qxn4ss2s54qy87xrpcybz26kp2fwlaq41x4k9jcmp6d7p0w569m"))))
6458 (build-system python-build-system)
6459 (arguments
6460 `(#:phases (modify-phases %standard-phases
6461 (replace 'check
6462 (lambda* (#:key tests? #:allow-other-keys)
6463 (when tests?
6464 (invoke "tests/run_tests.py" "-v")))))))
6465 (home-page "https://github.com/conan-io/python-patch-ng")
6466 (synopsis "Python library to parse and apply unified diffs")
6467 (description "Patch NG (New Generation) is a command and Python library to
6468 parse and apply unified diffs. It has features such as:
6469 @itemize
6470 @item automatic correction of common patch formatting corruption
6471 @item patch format detection (SVN, Hg, Git)
6472 @item nice diffstat histogram.
6473 @end itemize")
6474 (license license:expat)))
6475
6476 (define-public python-numpydoc
6477 (package
6478 (name "python-numpydoc")
6479 (version "1.2.1")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri (pypi-uri "numpydoc" version))
6484 (sha256
6485 (base32
6486 "1xjsli2fqks4iv3524v1d329siad7bbsi4kr174zvhsl1pnjds3w"))))
6487 (build-system python-build-system)
6488 (arguments
6489 `(#:phases
6490 (modify-phases %standard-phases
6491 (add-after 'unpack 'relax-requirements
6492 (lambda _
6493 (substitute* "setup.py"
6494 (("'Jinja2>=2.10,<3.1'")
6495 "'Jinja2>=2.10'"))))
6496 (replace 'check
6497 (lambda* (#:key tests? #:allow-other-keys)
6498 (when tests?
6499 (invoke "pytest" "-v" "numpydoc/tests"
6500 ;; TODO: unclear why these fail.
6501 "-k" "not test_MyClass and not test_my_function")))))))
6502 (propagated-inputs (list python-jinja2 python-sphinx))
6503 (native-inputs (list python-matplotlib python-pytest python-pytest-cov))
6504 (home-page "https://pypi.org/project/numpydoc/")
6505 (synopsis "Numpy's Sphinx extensions")
6506 (description "Sphinx extension to support docstrings in Numpy format.")
6507 (license license:bsd-2)
6508 (properties `((python2-variant . ,(delay python2-numpydoc))))))
6509
6510 (define-public python2-numpydoc
6511 (let ((base (package-with-python2
6512 (strip-python2-variant python-numpydoc))))
6513 (package/inherit base
6514 ;; This is the last version to support Python 2
6515 (version "0.9.1")
6516 (source
6517 (origin
6518 (method url-fetch)
6519 (uri (pypi-uri "numpydoc" version))
6520 (sha256
6521 (base32
6522 "09x6l1a4dcvj7001bvcmcayg1nwqwhaxlwbp6kzj9qrk57lqx3z0"))))
6523 (propagated-inputs
6524 `(("python2-jinja2" ,python2-jinja2)
6525 ,@(package-propagated-inputs base))))))
6526
6527 (define-public python-numexpr
6528 (package
6529 (name "python-numexpr")
6530 (version "2.7.3")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (pypi-uri "numexpr" version))
6535 (sha256
6536 (base32
6537 "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
6538 (build-system python-build-system)
6539 (arguments `(#:tests? #f)) ; no tests included
6540 (propagated-inputs
6541 (list python-numpy))
6542 (home-page "https://github.com/pydata/numexpr")
6543 (synopsis "Fast numerical expression evaluator for NumPy")
6544 (description
6545 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
6546 expressions that operate on arrays are accelerated and use less memory than
6547 doing the same calculation in Python. In addition, its multi-threaded
6548 capabilities can make use of all your cores, which may accelerate
6549 computations, most specially if they are not memory-bounded (e.g. those using
6550 transcendental functions).")
6551 (license license:expat)))
6552
6553 (define-public python2-numexpr
6554 (package-with-python2 python-numexpr))
6555
6556 (define-public python-cycler
6557 (package
6558 (name "python-cycler")
6559 (version "0.10.0")
6560 (source (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "cycler" version))
6563 (sha256
6564 (base32
6565 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
6566 (build-system python-build-system)
6567 (arguments
6568 ;; XXX: The current version requires 'coveralls' which we don't have.
6569 ;; Enable this for the next release which uses 'python-pytest'.
6570 '(#:tests? #f))
6571 (propagated-inputs
6572 (list python-six))
6573 (home-page "https://matplotlib.org/cycler/")
6574 (synopsis "Composable keyword argument iterator")
6575 (description
6576 "When using @code{matplotlib} and plotting more than one line, it is
6577 common to want to be able to want to be able to cycle over one or more artist
6578 styles; but the plotting logic can quickly become involved.
6579 To address this and enable easy cycling over arbitrary @code{kwargs}, the
6580 @code{Cycler} class was developed.")
6581 (license license:bsd-3)))
6582
6583 (define-public python2-cycler
6584 (package-with-python2 python-cycler))
6585
6586 (define-public python-colorspacious
6587 (package
6588 (name "python-colorspacious")
6589 (version "1.1.2")
6590 (source
6591 (origin
6592 (method git-fetch)
6593 (uri (git-reference
6594 (url "https://github.com/njsmith/colorspacious")
6595 (commit (string-append "v" version))))
6596 (file-name (git-file-name name version))
6597 (sha256
6598 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
6599 (build-system python-build-system)
6600 (propagated-inputs
6601 (list python-numpy))
6602 (native-inputs
6603 (list python-nose))
6604 (arguments
6605 `(#:phases
6606 (modify-phases %standard-phases
6607 (replace 'check
6608 (lambda _
6609 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
6610 (home-page "https://github.com/njsmith/colorspacious")
6611 (synopsis "Python library for colorspace conversions")
6612 (description "@code{colorspacious} is a Python library that lets you
6613 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
6614 (license license:expat)))
6615
6616 (define-public python2-colorspacious
6617 (package-with-python2 python-colorspacious))
6618
6619 (define-public python-proto-matcher
6620 (package
6621 (name "python-proto-matcher")
6622 (version "0.0.3")
6623 (source
6624 (origin
6625 (method url-fetch)
6626 (uri (pypi-uri "proto_matcher" version))
6627 (sha256
6628 (base32 "1644x0hrl398ji3281n44ymfgc3cspzfagjckhqjn4nja5nlikxg"))))
6629 (build-system python-build-system)
6630 (arguments
6631 `(#:tests? #f)) ;no test suite
6632 (propagated-inputs
6633 (list python-protobuf python-pyhamcrest))
6634 (home-page "https://github.com/dayfine/proto-matcher")
6635 (synopsis "PyHamcrest test matchers for protocol buffers")
6636 (description "This package provides the following PyHamcrest test
6637 matchers, that enable matching a protocol buffer message:
6638 @table @code
6639 @item equals_proto
6640 Test the argument equals the given protobuf message.
6641 @item approximately
6642 Test the argument equals the given protobuf message, while comparing any float
6643 field using approximation.
6644 @item ignoring_field_paths
6645 Test the argument equals the given protobuf message, while ignoring those
6646 fields specified in the field paths.
6647 @item ignoring_repeated_field_ordering
6648 Test the argument equals the given protobuf message, ignoring the ordering of
6649 any repeated field.
6650 @item partially
6651 Test the argument partially equals the given protobuf message, i.e. if a field
6652 is in the argument but not in the expected message, it's ignored in the
6653 comparison.
6654 @end table")
6655 (license license:asl2.0)))
6656
6657 (define-public python-matplotlib
6658 (package
6659 (name "python-matplotlib")
6660 (version "3.5.2")
6661 (source
6662 (origin
6663 (method url-fetch)
6664 (uri (pypi-uri "matplotlib" version))
6665 (sha256
6666 (base32 "18h78s5ld1i6mz00w258hy29909nfr3ddq6ry9kq18agw468bks8"))))
6667 (build-system python-build-system)
6668 (arguments
6669 (list
6670 #:phases
6671 #~(modify-phases %standard-phases
6672 (add-before 'build 'pretend-version
6673 ;; The version string is usually derived via setuptools-scm, but
6674 ;; without the git metadata available, the version string is set to
6675 ;; '0.0.0'.
6676 (lambda _
6677 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
6678 (add-after 'unpack 'fix-and-disable-failing-tests
6679 ;; XXX: Disable all image comparison tests because we're using a
6680 ;; newer version of FreeType than matplotlib expects. This leads
6681 ;; to minor differences throughout the tests.
6682 (lambda _
6683 (substitute* (append (find-files "lib/matplotlib/tests/"
6684 "test_.*\\.py$")
6685 (find-files "lib/mpl_toolkits/tests"
6686 "test_.*\\.py$"))
6687 (("^from matplotlib" match)
6688 (string-append "import pytest\n" match))
6689 (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
6690 indent)
6691 (string-append indent "@pytest.mark.skip(\
6692 reason=\"unknown minor image differences\")\n" match)))
6693 (substitute* "lib/matplotlib/tests/test_animation.py"
6694 (("/bin/sh") (which "sh")))
6695 (for-each delete-file
6696 ;; test_normal_axes, test_get_tightbbox_polar
6697 '("lib/matplotlib/tests/test_axes.py"
6698 "lib/matplotlib/tests/test_polar.py"
6699 ;; We don't use the webagg backend and this test
6700 ;; forces it.
6701 "lib/matplotlib/tests/test_backend_webagg.py"
6702 ;; test_outward_ticks
6703 "lib/matplotlib/tests/test_tightlayout.py"
6704 ;; test_hidden_axes fails with minor extent
6705 ;; differences, possibly due to the use of a
6706 ;; different version of FreeType.
6707 "lib/matplotlib/tests/test_constrainedlayout.py"
6708 ;; Fontconfig returns no fonts.
6709 "lib/matplotlib/tests/test_font_manager.py"
6710 ;; The images comparison test fails
6711 ;; non-deterministically when run in parallel (see:
6712 ;; https://github.com/matplotlib/matplotlib/issues/22992).
6713 "lib/matplotlib/tests/test_compare_images.py"))))
6714 (add-before 'build 'configure-environment
6715 (lambda* (#:key inputs #:allow-other-keys)
6716 ;; Fix rounding errors when using the x87 FPU.
6717 (when (string-prefix? "i686" #$(%current-system))
6718 (setenv "CFLAGS" "-ffloat-store"))
6719 (call-with-output-file "mplsetup.cfg"
6720 (lambda (port)
6721 (format port "\
6722 [libs]
6723 system_freetype = true
6724 system_qhull = true
6725
6726 [rc_options]
6727 backend=Agg
6728
6729 [directories]
6730 basedirlist = ~a,~a
6731
6732 [packages]
6733 tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk"))))))
6734 (replace 'check
6735 (lambda* (#:key tests? #:allow-other-keys)
6736 (when tests?
6737 ;; Step out of the source directory to avoid interference.
6738 (with-directory-excursion "/tmp"
6739 ;; Run the installed tests, which is what we want since not
6740 ;; everything gets built in the source directory.
6741 (invoke "pytest"
6742 "-n" (number->string (parallel-job-count))
6743 "-m" "not network" "--pyargs" "matplotlib"
6744 ;; The 'test_lazy_auto_backend_selection' fails
6745 ;; because it would require an X server; skip it.
6746 "-k" "not test_lazy_auto_backend_selection"))))))))
6747 (propagated-inputs
6748 (list gobject-introspection
6749 python-cairocffi
6750 python-certifi
6751 python-cycler
6752 python-dateutil
6753 python-fonttools
6754 python-kiwisolver
6755 python-numpy
6756 python-packaging
6757 python-pillow
6758 ;; ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
6759 ;; ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
6760 ;; ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
6761 ;; ;; object. For this reason we need to import both libraries.
6762 ;; python-pycairo
6763 python-pygobject
6764 python-pyparsing
6765 python-pytz
6766 python-six
6767 `(,python "tk")
6768 python-wxpython))
6769 (inputs
6770 (list cairo
6771 freetype
6772 glib
6773 libpng
6774 qhull
6775 tcl
6776 tk))
6777 (native-inputs
6778 (list pkg-config
6779 python-pytest
6780 python-pytest-timeout
6781 python-pytest-xdist
6782 python-setuptools-scm
6783 python-setuptools-scm-git-archive))
6784 (home-page "https://matplotlib.org/")
6785 (synopsis "2D plotting library for Python")
6786 (description
6787 "Matplotlib is a Python 2D plotting library which produces publication
6788 quality figures in a variety of hardcopy formats and interactive environments
6789 across platforms. Matplotlib can be used in Python scripts, the python and
6790 ipython shell, web application servers, and six graphical user interface
6791 toolkits.")
6792 (license license:psfl)
6793 (properties `((python2-variant . ,(delay python2-matplotlib))))))
6794
6795 (define-public python2-matplotlib
6796 (let ((matplotlib (package-with-python2
6797 (strip-python2-variant python-matplotlib))))
6798 (package/inherit matplotlib
6799 (version "2.2.5")
6800 (source
6801 (origin
6802 (method url-fetch)
6803 (uri (pypi-uri "matplotlib" version))
6804 (sha256
6805 (base32
6806 "1sk05fdai9rw35l983rw2ymvz0nafs7szs7yz4nxrpyr1j27l0x3"))))
6807 (arguments
6808 (substitute-keyword-arguments (package-arguments matplotlib)
6809 ((#:phases phases)
6810 #~(modify-phases #$phases
6811 (add-after 'install 'create-init-file
6812 (lambda _
6813 (with-output-to-file
6814 (string-append
6815 #$output
6816 "/lib/python2.7/site-packages/mpl_toolkits/__init__.py")
6817 (lambda _ (display "")))))
6818 (delete 'fix-and-disable-failing-tests)
6819 (delete 'check))))) ; These tests weren't run the the past.
6820 (native-inputs
6821 `(("pkg-config" ,pkg-config)))
6822 (propagated-inputs
6823 `(("gobject-introspection" ,gobject-introspection)
6824 ("python2-backports-functools-lru-cache" ,python2-backports-functools-lru-cache)
6825 ("python2-certifi" ,python2-certifi)
6826 ("python2-cycler" ,python2-cycler)
6827 ("python2-dateutil" ,python2-dateutil)
6828 ("python2-functools32" ,python2-functools32)
6829 ("python2-kiwisolver" ,python2-kiwisolver)
6830 ("python2-numpy" ,python2-numpy)
6831 ("python2-pillow" ,python2-pillow)
6832 ("python2-pycairo" ,python2-pycairo)
6833 ("python2-pygobject-2" ,python2-pygobject-2)
6834 ("python2-pyparsing" ,python2-pyparsing)
6835 ("python2-pytz" ,python2-pytz)
6836 ("python2-six" ,python2-six)
6837 ("python2-subprocess32" ,python2-subprocess32)
6838 ("python2-tkinter" ,python-2 "tk"))))))
6839
6840 (define-public python-matplotlib-documentation
6841 (package
6842 (inherit python-matplotlib)
6843 (name "python-matplotlib-documentation")
6844 (arguments
6845 (list
6846 #:tests? #f ;we're only generating documentation
6847 #:phases
6848 #~(modify-phases %standard-phases
6849 (replace 'build
6850 (lambda _
6851 (setenv "HOME" "/tmp")
6852 (chdir "doc")
6853 (substitute* "conf.py"
6854 ;; The sphinx_panels extension causes a "TypeError: first
6855 ;; argument must be callable" to be raised when generating the
6856 ;; info target; remove it (see:
6857 ;; https://github.com/executablebooks/sphinx-panels/issues/74).
6858 ((".*'sphinx_panels',.*") ""))
6859 (invoke "make" "html" "info"
6860 ;; Don't abort on warnings; build in parallel.
6861 (format #f "SPHINXOPTS=-j~a" (parallel-job-count)))))
6862 (replace 'install
6863 (lambda _
6864 (let* ((data (string-append #$output "/share"))
6865 (doc (string-append data "/doc/matplotlib"))
6866 (info (string-append data "/info"))
6867 (html (string-append doc "/html")))
6868 (mkdir-p html)
6869 (copy-recursively "build/html" html)
6870 (install-file "build/texinfo/matplotlib.info" info)
6871 ;; The "matplotlib-figures" directory contains are a subset of
6872 ;; the images produced for the html target; simply create a
6873 ;; symlink to it, saving about 11 MiB.
6874 (symlink (string-append html "/_images")
6875 (string-append info "/matplotlib-figures"))))))))
6876 (native-inputs
6877 (list graphviz
6878 inkscape
6879 python-colorspacious
6880 python-mpl-sphinx-theme
6881 python-scipy
6882 python-sphinx
6883 python-sphinx-copybutton
6884 python-sphinx-gallery
6885 python-sphinxcontrib-svg2pdfconverter
6886 python-numpydoc
6887 python-ipython
6888 python-ipywidgets
6889 texlive-amsfonts
6890 texlive-amsmath
6891 texlive-babel
6892 texlive-fontspec
6893 texlive-unicode-math
6894 texlive-etoolbox
6895 texlive-latex-expdlist
6896 texlive-underscore
6897 texlive-latex-type1cm
6898 texlive-times
6899 texinfo))
6900 (synopsis "Documentation for the @code{python-matplotlib} package")))
6901
6902 (define-public python-matplotlib-inline
6903 (package
6904 (name "python-matplotlib-inline")
6905 (version "0.1.3")
6906 (source
6907 (origin
6908 (method url-fetch)
6909 (uri (pypi-uri "matplotlib-inline" version))
6910 (sha256
6911 (base32 "1vilzwj3xp00mxprmmn1hlafm3p23vn56s46kx3ra4qd5signjx0"))))
6912 (build-system python-build-system)
6913 (propagated-inputs
6914 (list python-matplotlib python-traitlets))
6915 (arguments
6916 ;; Tests disabled because of a circular dependency with ipython.
6917 `(#:tests? #f))
6918 (home-page "https://github.com/ipython/matplotlib-inline")
6919 (synopsis "Inline Matplotlib backend for Jupyter")
6920 (description
6921 "This package provides a Matplotlib inline back-end for IPython and
6922 Jupyter.")
6923 (license license:bsd-3)))
6924
6925 (define-public python-matplotlib-venn
6926 (package
6927 (name "python-matplotlib-venn")
6928 (version "0.11.5")
6929 (source
6930 (origin
6931 (method url-fetch)
6932 (uri (pypi-uri "matplotlib-venn" version ".zip"))
6933 (sha256
6934 (base32
6935 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
6936 (build-system python-build-system)
6937 (arguments '(#:tests? #f)) ; tests are not included
6938 (propagated-inputs
6939 (list python-matplotlib python-numpy python-scipy))
6940 (native-inputs
6941 (list unzip))
6942 (home-page "https://github.com/konstantint/matplotlib-venn")
6943 (synopsis "Plot area-proportional Venn diagrams")
6944 (description
6945 "This package provides tools for plotting area-proportional two- and
6946 three-way Venn diagrams in @code{matplotlib}.")
6947 (license license:expat)))
6948
6949 (define-public python-pysnptools
6950 (package
6951 (name "python-pysnptools")
6952 (version "0.4.11")
6953 (source
6954 (origin
6955 (method url-fetch)
6956 (uri (pypi-uri "pysnptools" version))
6957 (sha256
6958 (base32
6959 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
6960 (build-system python-build-system)
6961 (arguments
6962 `(#:tests? #f ; no test data are included
6963 #:phases
6964 (modify-phases %standard-phases
6965 (replace 'check
6966 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6967 (if tests?
6968 (begin
6969 (add-installed-pythonpath inputs outputs)
6970 (invoke "python3" "pysnptools/test.py"))
6971 #t))))))
6972 (propagated-inputs
6973 (list python-dill
6974 python-h5py
6975 python-numpy
6976 python-pandas
6977 python-psutil
6978 python-scipy))
6979 (native-inputs
6980 (list python-cython))
6981 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
6982 (synopsis "Library for reading and manipulating genetic data")
6983 (description
6984 "PySnpTools is a library for reading and manipulating genetic data. It
6985 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
6986 those files. It can also efficiently manipulate ranges of integers using set
6987 operators such as union, intersection, and difference.")
6988 (license license:asl2.0)))
6989
6990 (define-public python2-pysnptools
6991 (package-with-python2 python-pysnptools))
6992
6993 (define-public python-pykdtree
6994 (package
6995 (name "python-pykdtree")
6996 (version "1.3.4")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (pypi-uri "pykdtree" version))
7001 (sha256
7002 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
7003 (build-system python-build-system)
7004 (native-inputs
7005 (list python-nose))
7006 (propagated-inputs
7007 (list python-numpy))
7008 (home-page "https://github.com/storpipfugl/pykdtree")
7009 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
7010 (description
7011 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
7012 search in Python.")
7013 (license license:lgpl3+)))
7014
7015 (define-public python-wurlitzer
7016 (package
7017 (name "python-wurlitzer")
7018 (version "2.0.1")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (pypi-uri "wurlitzer" version))
7023 (sha256
7024 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
7025 (build-system python-build-system)
7026 (arguments
7027 '(#:phases
7028 (modify-phases %standard-phases
7029 (replace 'check
7030 (lambda _
7031 (invoke "pytest" "-vv" "test.py"))))))
7032 (native-inputs
7033 (list python-mock python-pytest))
7034 (home-page "https://github.com/minrk/wurlitzer")
7035 (synopsis "Capture C-level output in context managers")
7036 (description
7037 "This library helps to redirect @code{sys.stdout} to a stream or a file
7038 while executing some piece of code, including C code running within a Python
7039 process.")
7040 (license license:expat)))
7041
7042 (define-public python-socksipy-branch
7043 (package
7044 (name "python-socksipy-branch")
7045 (version "1.01")
7046 (source
7047 (origin
7048 (method url-fetch)
7049 (uri (pypi-uri "SocksiPy-branch" version))
7050 (sha256
7051 (base32
7052 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
7053 (build-system python-build-system)
7054 (arguments
7055 `(#:tests? #f)) ; There are no tests
7056 (home-page "https://code.google.com/archive/p/socksipy-branch/")
7057 (synopsis "Python SOCKS module")
7058 (description
7059 "SocksiPy - A Python SOCKS client module. It provides a
7060 socket-like interface that supports connections to any TCP
7061 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
7062 The original version was developed by Dan Haim, this is a
7063 branch created by Mario Vilas to address some open issues,
7064 as the original project seems to have been abandoned circa 2007.")
7065 (license license:bsd-3)))
7066
7067 (define-public python2-socksipy-branch
7068 (package-with-python2 python-socksipy-branch))
7069
7070 (define-public python-socksipychain
7071 (package
7072 (name "python-socksipychain")
7073 (version "2.1.2")
7074 (source
7075 (origin
7076 (method git-fetch)
7077 (uri (git-reference
7078 (url "https://github.com/pagekite/PySocksipyChain")
7079 (commit (string-append "v" version))))
7080 (file-name (git-file-name name version))
7081 (sha256
7082 (base32
7083 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
7084 (build-system python-build-system)
7085 (arguments
7086 `(#:tests? #f)) ; Tests try to access the network.
7087 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
7088 (synopsis "Python SOCKS module with chained proxies support")
7089 (description
7090 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
7091 adds support for arbitrary chaining of proxy servers and various modes of
7092 TLS/SSL encryption. It was developed for use in PageKite, and also includes
7093 a simple netcat replacement with chaining support.")
7094 (license license:bsd-3)))
7095
7096 (define-public python-pycodestyle
7097 (package
7098 (name "python-pycodestyle")
7099 (version "2.7.0")
7100 (source
7101 (origin
7102 (method url-fetch)
7103 (uri (pypi-uri "pycodestyle" version))
7104 (sha256
7105 (base32
7106 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
7107 (build-system python-build-system)
7108 (arguments
7109 `(#:phases
7110 (modify-phases %standard-phases
7111 (replace 'check
7112 (lambda _
7113 (invoke "pytest" "-vv"))))))
7114 (native-inputs
7115 (list python-pytest))
7116 (home-page "https://pycodestyle.readthedocs.io/")
7117 (synopsis "Python style guide checker")
7118 (description "@code{pycodestyle} (formerly pep8) is a tool to check
7119 Python code against some of the style conventions in
7120 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
7121 (license license:expat)))
7122
7123 (define-public python2-pycodestyle
7124 (package-with-python2 python-pycodestyle))
7125
7126 (define-public python-pycodestyle-2.6
7127 (package
7128 (inherit python-pycodestyle)
7129 (version "2.6.0")
7130 (source (origin
7131 (method url-fetch)
7132 (uri (pypi-uri "pycodestyle" version))
7133 (sha256
7134 (base32
7135 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
7136
7137 (define-public python-multidict
7138 (package
7139 (name "python-multidict")
7140 (version "5.2.0")
7141 (source
7142 (origin
7143 (method url-fetch)
7144 (uri (pypi-uri "multidict" version))
7145 (sha256
7146 (base32
7147 "1kjrxav572j45xvr1iy60zb2g8zqvrinzdkl4ax36js4vczckl8d"))))
7148 (build-system python-build-system)
7149 (arguments
7150 '(#:phases (modify-phases %standard-phases
7151 (replace 'check
7152 (lambda* (#:key tests? #:allow-other-keys)
7153 (if tests?
7154 (invoke "pytest" "-vv")
7155 (format #t "test suite not run~%")))))))
7156 (native-inputs
7157 (list python-pytest python-pytest-cov))
7158 (home-page "https://github.com/aio-libs/multidict/")
7159 (synopsis "Multidict implementation")
7160 (description "Multidict is dict-like collection of key-value pairs
7161 where key might be occurred more than once in the container.")
7162 (license license:asl2.0)))
7163
7164 (define-public python-orderedmultidict
7165 (package
7166 (name "python-orderedmultidict")
7167 (version "1.0.1")
7168 (source
7169 (origin
7170 (method url-fetch)
7171 (uri (pypi-uri "orderedmultidict" version))
7172 (sha256
7173 (base32
7174 "1bc2v0yflsxjyyjx4q9wqx0j3bvzcw9z87d5pz4iqac7bsxhn1q4"))))
7175 (build-system python-build-system)
7176 (propagated-inputs
7177 (list python-six))
7178 (native-inputs
7179 (list python-flake8 python-pycodestyle))
7180 (home-page "https://github.com/gruns/orderedmultidict")
7181 (synopsis "Python Ordered Multivalue Dictionary - omdict")
7182 (description "This package contains a library for ordered multivalue
7183 dictionaries. A multivalue dictionary is a dictionary that can store
7184 multiple values for the same key. An ordered multivalue dictionary is a
7185 multivalue dictionary that retains the order of insertions and deletions.")
7186 (license license:unlicense)))
7187
7188 (define-public python-autocommand
7189 (package
7190 (name "python-autocommand")
7191 (version "2.2.1")
7192 (source
7193 (origin
7194 (method url-fetch)
7195 (uri (pypi-uri "autocommand" version))
7196 (sha256
7197 (base32 "03qp9xx4dq81ljhf56r21gp5j0lpqs1vaw99g0d84i97s3lj1m7y"))))
7198 (build-system python-build-system)
7199 (arguments
7200 (list
7201 #:phases
7202 #~(modify-phases %standard-phases
7203 (replace 'check
7204 (lambda* (#:key tests? #:allow-other-keys)
7205 (when tests?
7206 ;; This test fails with an invalid syntax error on 'task1 =
7207 ;; asyncio.async(coro_1())' (see:
7208 ;; https://github.com/Lucretiel/autocommand/issues/20).
7209 (delete-file "test/test_autoasync.py")
7210 (invoke "pytest" "-vv")))))))
7211 (native-inputs (list python-pytest python-pytest-asyncio))
7212 (home-page "https://github.com/Lucretiel/autocommand")
7213 (synopsis "Python library to build a command-line from a function")
7214 (description "@code{autocommand} is library to automatically generate and
7215 run simple @code{argparse} parsers from function signatures.")
7216 (license license:lgpl3+)))
7217
7218 (define-public python-autopep8
7219 (package
7220 (name "python-autopep8")
7221 (version "1.5.3")
7222 (source
7223 (origin
7224 (method url-fetch)
7225 (uri (pypi-uri "autopep8" version))
7226 (sha256
7227 (base32
7228 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
7229 (build-system python-build-system)
7230 (propagated-inputs
7231 (list python-pycodestyle python-toml))
7232 (home-page "https://github.com/hhatto/autopep8")
7233 (synopsis "Format Python code according to the PEP 8 style guide")
7234 (description
7235 "@code{autopep8} automatically formats Python code to conform to
7236 the PEP 8 style guide. It uses the pycodestyle utility to determine
7237 what parts of the code needs to be formatted. @code{autopep8} is
7238 capable of fixing most of the formatting issues that can be reported
7239 by pycodestyle.")
7240 (license (license:non-copyleft
7241 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
7242
7243 (define-public python2-autopep8
7244 (package-with-python2 python-autopep8))
7245
7246 (define-public python-distlib
7247 (package
7248 (name "python-distlib")
7249 (version "0.3.1")
7250 (source
7251 (origin
7252 (method url-fetch)
7253 (uri (pypi-uri "distlib" version ".zip"))
7254 (sha256
7255 (base32
7256 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
7257 (build-system python-build-system)
7258 (arguments
7259 `(#:phases
7260 (modify-phases %standard-phases
7261 (add-before 'build 'no-/bin/sh
7262 (lambda _
7263 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
7264 (("/bin/sh") (which "sh")))
7265 #t))
7266 (add-before 'check 'prepare-test-env
7267 (lambda _
7268 (setenv "HOME" "/tmp")
7269 ;; NOTE: Any value works, the variable just has to be present.
7270 (setenv "SKIP_ONLINE" "1")
7271 #t)))))
7272 (native-inputs (list unzip))
7273 (home-page "https://bitbucket.org/pypa/distlib")
7274 (synopsis "Distribution utilities")
7275 (description "Distlib is a library which implements low-level functions that
7276 relate to packaging and distribution of Python software. It is intended to be
7277 used as the basis for third-party packaging tools.")
7278 (license license:psfl)))
7279
7280 (define-public python-distutils-extra
7281 (package
7282 (name "python-distutils-extra")
7283 (version "2.38")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
7288 version "/+download/python-distutils-extra-"
7289 version ".tar.gz"))
7290 (sha256
7291 (base32
7292 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
7293 (build-system python-build-system)
7294 (home-page "https://launchpad.net/python-distutils-extra/")
7295 (synopsis "Enhancements to Python's distutils")
7296 (description
7297 "The python-distutils-extra module enables you to easily integrate
7298 gettext support, themed icons, and scrollkeeper-based documentation into
7299 Python's distutils.")
7300 (license license:gpl2)))
7301
7302 (define-public python2-distutils-extra
7303 (package-with-python2 python-distutils-extra))
7304
7305 (define-public python2-elib.intl
7306 (package
7307 (name "python2-elib.intl")
7308 (version "0.0.3")
7309 (source
7310 (origin
7311 ;; This project doesn't tag releases or publish tarballs, so we take
7312 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
7313 (method git-fetch)
7314 (uri (git-reference
7315 (url "https://github.com/dieterv/elib.intl")
7316 (commit "d09997cfef")))
7317 (file-name (string-append name "-" version "-checkout"))
7318 (sha256
7319 (base32
7320 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
7321 (build-system python-build-system)
7322 (arguments
7323 ;; incompatible with Python 3 (exception syntax)
7324 `(#:python ,python-2
7325 #:tests? #f))
7326 (home-page "https://github.com/dieterv/elib.intl")
7327 (synopsis "Enhanced internationalization for Python")
7328 (description
7329 "The elib.intl module provides enhanced internationalization (I18N)
7330 services for your Python modules and applications.")
7331 (license license:lgpl3+)))
7332
7333 (define-public python-olefile
7334 (package
7335 (name "python-olefile")
7336 (version "0.46")
7337 (source
7338 (origin
7339 (method url-fetch)
7340 (uri (string-append "https://github.com/decalage2/olefile/releases/"
7341 "download/v" version "/olefile-" version ".tar.gz"))
7342 (file-name (string-append name "-" version ".tar.gz"))
7343 (sha256
7344 (base32
7345 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
7346 (build-system python-build-system)
7347 (home-page "https://www.decalage.info/python/olefileio")
7348 (synopsis "Read and write Microsoft OLE2 files")
7349 (description
7350 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
7351 Storage or Compound Document, Microsoft Office). It is an improved version of
7352 the OleFileIO module from PIL, the Python Image Library.")
7353 (license license:bsd-3)))
7354
7355 (define-public python2-olefile
7356 (package-with-python2 python-olefile))
7357
7358 (define-public python-pypdf3
7359 (package
7360 (name "python-pypdf3")
7361 (version "1.0.5")
7362 (source
7363 (origin
7364 (method url-fetch)
7365 (uri (pypi-uri "PyPDF3" version))
7366 (sha256
7367 (base32 "018hlq9q2qa96vw4j7ppq352znykldwy98h2w9qcpkvpi93sjqhc"))))
7368 (build-system python-build-system)
7369 (propagated-inputs
7370 (list python-tqdm))
7371 (home-page "https://github.com/sfneal/PyPDF3")
7372 (synopsis "Utility to read and write PDFs with Python")
7373 (description "PyPDF3 is a pure-python PDF library capable of splitting,
7374 merging together, cropping, and transforming the pages of PDF files. It can
7375 also add custom data, viewing options, and passwords to PDF files. It can
7376 retrieve text and metadata from PDFs as well as merge entire files together.")
7377 (license license:bsd-3)))
7378
7379 (define-public python-pikepdf
7380 (package
7381 (name "python-pikepdf")
7382 (version "2.16.1")
7383 (source
7384 (origin
7385 (method url-fetch)
7386 (uri (pypi-uri "pikepdf" version))
7387 (sha256
7388 (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
7389 (build-system python-build-system)
7390 (arguments
7391 `(#:tests? #false)) ;require python-xmp-toolkit
7392 (native-inputs
7393 (list pybind11
7394 python-setuptools
7395 python-setuptools-scm
7396 python-setuptools-scm-git-archive
7397 python-toml
7398 python-wheel))
7399 (inputs
7400 (list qpdf))
7401 (propagated-inputs
7402 (list python-lxml python-pillow))
7403 (home-page "https://github.com/pikepdf/pikepdf")
7404 (synopsis "Read and write PDFs with Python")
7405 (description
7406 "pikepdf is a Python library for reading and writing PDF files.")
7407 (license license:mpl2.0)))
7408
7409 (define-public python-pillow
7410 (package
7411 (name "python-pillow")
7412 (version "9.0.0")
7413 (source
7414 (origin
7415 (method url-fetch)
7416 (uri (pypi-uri "Pillow" version))
7417 (sha256
7418 (base32
7419 "0gjry0yqryd2678sm47jhdnbghzxn5wk8pgyaqwr4qi7x5ijjvpf"))
7420 (modules '((guix build utils)))
7421 (snippet
7422 '(begin
7423 (delete-file-recursively "src/thirdparty")))))
7424 (build-system python-build-system)
7425 (native-inputs
7426 (list python-pytest))
7427 (inputs
7428 (list freetype
7429 lcms
7430 libjpeg-turbo
7431 libtiff
7432 libwebp
7433 openjpeg
7434 zlib))
7435 (propagated-inputs
7436 (list python-olefile))
7437 (arguments
7438 `(#:phases
7439 (modify-phases %standard-phases
7440 (add-after 'unpack 'patch-ldconfig
7441 (lambda _
7442 (substitute* "setup.py"
7443 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
7444 (replace 'check
7445 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
7446 (when tests?
7447 (setenv "HOME" (getcwd))
7448 ;; Make installed package available for running the tests.
7449 (add-installed-pythonpath inputs outputs)
7450 (invoke "python" "selftest.py" "--installed")
7451 (invoke "python" "-m" "pytest" "-vv")))))))
7452 (home-page "https://python-pillow.org")
7453 (synopsis "Fork of the Python Imaging Library")
7454 (description
7455 "The Python Imaging Library adds image processing capabilities to your
7456 Python interpreter. This library provides extensive file format support, an
7457 efficient internal representation, and fairly powerful image processing
7458 capabilities. The core image library is designed for fast access to data
7459 stored in a few basic pixel formats. It should provide a solid foundation for
7460 a general image processing tool.")
7461 (properties `((python2-variant . ,(delay python2-pillow))
7462 (cpe-name . "pillow")))
7463 (license (license:x11-style
7464 "http://www.pythonware.com/products/pil/license.htm"
7465 "The PIL Software License"))))
7466
7467 (define-public python2-pillow
7468 (package-with-python2
7469 (package
7470 (inherit (strip-python2-variant python-pillow))
7471 ;; Version 6 is the last series with Python 2 support.
7472 (version "6.2.2")
7473 (source
7474 (origin
7475 (method url-fetch)
7476 (uri (pypi-uri "Pillow" version))
7477 (sha256
7478 (base32
7479 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
7480 (arguments
7481 (substitute-keyword-arguments (package-arguments python-pillow)
7482 ;; FIXME: One of the tests is failing.
7483 ((#:tests? _ #f) #f))))))
7484
7485 (define-public python-pillow-2.9
7486 (package
7487 (inherit python-pillow)
7488 (version "2.9.0")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "Pillow" version))
7493 (sha256
7494 (base32
7495 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
7496 (arguments
7497 (substitute-keyword-arguments (package-arguments python-pillow)
7498 ((#:tests? _ #f) #f)))
7499 (properties '((hidden? #t)))))
7500
7501 (define-public python-pillow-simd
7502 (package
7503 (inherit python-pillow)
7504 (name "python-pillow-simd")
7505 (version "9.0.0.post1")
7506 ;; The PyPI tarball does not include test files.
7507 (source
7508 (origin
7509 (method git-fetch)
7510 (uri (git-reference
7511 (url "https://github.com/uploadcare/pillow-simd")
7512 (commit (string-append "v" version))))
7513 (file-name (git-file-name name version))
7514 (sha256
7515 (base32 "1dnvsln451aw3qy2cxg2ndd5mcanf5nrhxw9l7mcam730635hdm9"))))
7516 (inputs
7517 (modify-inputs (package-inputs python-pillow)
7518 (prepend libraqm libimagequant)))
7519 (home-page "https://github.com/uploadcare/pillow-simd")
7520 (synopsis "Fork of the Python Imaging Library (Pillow)")
7521 (description "This package is a fork of Pillow which adds support for SIMD
7522 parallelism.")))
7523
7524 (define-public python-imagecodecs
7525 (package
7526 (name "python-imagecodecs")
7527 (version "2021.3.31")
7528 (source
7529 (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "imagecodecs" version))
7532 (sha256
7533 (base32
7534 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
7535 (modules '((guix build utils)))
7536 (snippet
7537 '(begin
7538 ;; Unbundle 3rd party modules.
7539 (delete-file-recursively "3rdparty")
7540 ;; Delete pre-generated Cython files.
7541 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
7542 #t))))
7543 (build-system python-build-system)
7544 (arguments
7545 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
7546 #:phases
7547 (modify-phases %standard-phases
7548 (add-after 'unpack 'create-configuration
7549 (lambda* (#:key inputs #:allow-other-keys)
7550 ;; By default everything is enabled. We can selectively disable
7551 ;; extensions (and thus dependencies) by deleting them from the
7552 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
7553 (call-with-output-file "imagecodecs_distributor_setup.py"
7554 (lambda (port)
7555 (format port "\
7556 def customize_build(EXTENSIONS, OPTIONS):
7557 del EXTENSIONS['aec']
7558 del EXTENSIONS['avif']
7559 del EXTENSIONS['bitshuffle']
7560 del EXTENSIONS['deflate']
7561 del EXTENSIONS['jpeg2k']
7562 del EXTENSIONS['jpeg12']
7563 del EXTENSIONS['jpegls']
7564 del EXTENSIONS['jpegxl']
7565 del EXTENSIONS['jpegxr']
7566 del EXTENSIONS['lerc']
7567 del EXTENSIONS['ljpeg']
7568 del EXTENSIONS['lzf']
7569 del EXTENSIONS['zfp']
7570 del EXTENSIONS['zopfli']
7571 OPTIONS['cythonize']
7572 ")))))
7573 ;; XXX: The installed scripts import packages that depend on
7574 ;; this package; disable import check to avoid the cycle.
7575 (delete 'sanity-check))))
7576 (inputs
7577 (list c-blosc
7578 giflib
7579 brotli
7580 libjpeg-turbo
7581 libpng
7582 libtiff
7583 libwebp
7584 lz4
7585 snappy
7586 xz
7587 zlib
7588 `(,zstd "lib")))
7589 (propagated-inputs
7590 ;; For the Python library.
7591 (list python-numpy))
7592 (native-inputs
7593 ;; For building.
7594 (list python-cython
7595 ;; For testing. Incomplete.
7596 ;("python-numcodecs" ,python-numcodecs)
7597 ;("python-zarr" ,python-zarr)
7598 ;("python-pytest" ,python-pytest)
7599 ))
7600 (home-page "https://www.lfd.uci.edu/~gohlke/")
7601 (synopsis
7602 "Image transformation, compression, and decompression codecs")
7603 (description
7604 "Imagecodecs is a Python library that provides block-oriented, in-memory
7605 buffer transformation, compression, and decompression functions for use in the
7606 tifffile, czifile, and other scientific image input/output modules.")
7607 (license license:bsd-3)))
7608
7609 (define-public python-executing
7610 (package
7611 (name "python-executing")
7612 (version "0.8.2")
7613 (source
7614 (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "executing" version))
7617 (sha256
7618 (base32 "08q0xh9fd8k41sqpp23q6fb9bf7yj4y2q6sv30pj36vvk8pg8fy2"))))
7619 (build-system python-build-system)
7620 (arguments
7621 `(#:tests? #f)) ; TODO: tests require python-asttokens
7622 (native-inputs
7623 (list python-setuptools-scm python-toml))
7624 (home-page "https://github.com/alexmojaki/executing")
7625 (synopsis "Get information about what a Python frame is currently doing")
7626 (description "This package lets you get information about what a frame is
7627 currently doing, particularly the AST node being executed.")
7628 (license license:expat)))
7629
7630 (define-public python-roifile
7631 (package
7632 (name "python-roifile")
7633 (version "2020.11.28")
7634 (source
7635 (origin
7636 (method url-fetch)
7637 (uri (pypi-uri "roifile" version))
7638 (sha256
7639 (base32
7640 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
7641 (build-system python-build-system)
7642 (arguments `(#:tests? #f)) ; there are none
7643 (propagated-inputs
7644 (list python-numpy))
7645 (home-page "https://www.lfd.uci.edu/~gohlke/")
7646 (synopsis "Read and write ImageJ ROI format")
7647 (description "Roifile is a Python library to read, write, create, and plot
7648 ImageJ ROIs, an undocumented and ImageJ application specific format to store
7649 regions of interest, geometric shapes, paths, text, etc for image overlays.")
7650 (license license:bsd-3)))
7651
7652 (define-public python-tifffile
7653 (package
7654 (name "python-tifffile")
7655 (version "2021.4.8")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "tifffile" version))
7660 (sha256
7661 (base32
7662 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
7663 (build-system python-build-system)
7664 ;; Tests require lfdfiles, which depends on tifffile
7665 (arguments `(#:tests? #f))
7666 (propagated-inputs
7667 (list python-numpy python-imagecodecs))
7668 (home-page "https://www.lfd.uci.edu/~gohlke/")
7669 (synopsis "Read and write TIFF(r) files")
7670 (description "This package lets you read image and metadata from many
7671 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
7672 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
7673 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
7674 (license license:bsd-3)))
7675
7676 (define-public python-lfdfiles
7677 (package
7678 (name "python-lfdfiles")
7679 (version "2021.2.22")
7680 (source
7681 (origin
7682 (method url-fetch)
7683 (uri (pypi-uri "lfdfiles" version))
7684 (sha256
7685 (base32
7686 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
7687 (modules '((guix build utils)))
7688 (snippet
7689 '(begin
7690 ;; Delete pre-generated Cython files.
7691 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
7692 #t))))
7693 (build-system python-build-system)
7694 (arguments
7695 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
7696 (propagated-inputs
7697 (list python-click python-numpy python-tifffile))
7698 (native-inputs (list python-cython))
7699 (home-page "https://www.lfd.uci.edu/~gohlke/")
7700 (synopsis "Work with LFD data files")
7701 (description
7702 "Lfdfiles is a Python library and console script for reading, writing,
7703 converting, and viewing many of the proprietary file formats used to store
7704 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
7705 (license license:bsd-3)))
7706
7707 (define-public python-imageio
7708 (package
7709 (name "python-imageio")
7710 (version "2.8.0")
7711 (source
7712 (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "imageio" version))
7715 (sha256
7716 (base32
7717 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
7718 (build-system python-build-system)
7719 (arguments
7720 `(#:tests? #f ; many tests require online data
7721 #:phases
7722 (modify-phases %standard-phases
7723 (replace 'check
7724 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
7725 (if tests?
7726 (begin
7727 ;; Make installed package available for running the tests.
7728 (add-installed-pythonpath inputs outputs)
7729 (invoke "pytest" "-vv"))
7730 #t))))))
7731 (propagated-inputs
7732 (list python-numpy python-pillow python-psutil))
7733 (native-inputs
7734 (list python-pytest))
7735 (home-page "https://imageio.github.io/")
7736 (synopsis "Library for reading and writing a wide range of image data")
7737 (description
7738 "Imageio is a Python library that provides an easy interface to read and
7739 write a wide range of image data, including animated images, video, volumetric
7740 data, and scientific formats.")
7741 (license license:bsd-2)))
7742
7743 (define-public python-pyvips
7744 (package
7745 (name "python-pyvips")
7746 (version "2.2.0")
7747 (source
7748 (origin
7749 (method url-fetch)
7750 (uri (pypi-uri "pyvips" version))
7751 (sha256
7752 (base32 "0lq71iiic4pc8qhxr60gi141w25pjnn4vsh05d5l0fjkgjsv137b"))))
7753 (build-system python-build-system)
7754 (arguments
7755 (list #:phases
7756 #~(modify-phases %standard-phases
7757 ;; Maybe switch to API mode (i.e., build the C extension)?
7758 ;; It is advertised as faster to start up and run.
7759 ;; However, even with ‘pkg-config’ and ‘python-pkgconfig’ in
7760 ;; ‘native-inputs’, the API mode build fails with:
7761 ;;
7762 ;; Falling back to ABI mode. Details: unable to find pkg-config package "vips"
7763 ;;
7764 ;; The build doesn't actually fail without the below
7765 ;; substitution, it's just slower because ‘setup.py’ tries
7766 ;; (unsuccessfully) to download the Python ‘pkgconfig’ module.
7767 (add-after 'unpack 'fix-build
7768 (lambda _
7769 (substitute* "setup.py"
7770 (("^( +setup_)API\\(\\)\n" _ prefix)
7771 (string-append prefix "ABI()\n")))))
7772 (add-after 'unpack 'fix-paths
7773 (lambda _
7774 (substitute* "pyvips/__init__.py"
7775 (("^( +_vips_libname) = '(libvips.so.42)'"
7776 _ var libname)
7777 (format #f "~a = '~a/lib/~a'"
7778 var #$(this-package-input "vips") libname))
7779 (("^( +_gobject_libname) = '(libgobject-2.0.so.0)'"
7780 _ var libname)
7781 (format #f "~a = '~a/lib/~a'"
7782 var #$(this-package-input "glib") libname)))))
7783 (replace 'check
7784 (lambda* (#:key tests? #:allow-other-keys)
7785 (when tests?
7786 (invoke "python" "setup.py" "test")))))))
7787 (native-inputs
7788 (list python-pyperf
7789 python-pytest
7790 python-pytest-flake8
7791 python-pytest-runner))
7792 (inputs
7793 (list glib vips))
7794 (propagated-inputs
7795 (list python-cffi))
7796 (home-page "https://github.com/libvips/pyvips")
7797 (synopsis "Python bindings for VIPS")
7798 (description "The @code{pyvips} package provides Python bindings for VIPS,
7799 a multithreaded image-processing system with low memory needs.")
7800 (license license:expat)))
7801
7802 (define-public python-pycparser
7803 (package
7804 (name "python-pycparser")
7805 (version "2.20")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "pycparser" version))
7810 (sha256
7811 (base32
7812 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
7813 (outputs '("out" "doc"))
7814 (build-system python-build-system)
7815 (native-inputs
7816 (list pkg-config))
7817 (arguments
7818 `(#:phases
7819 (modify-phases %standard-phases
7820 (replace 'check
7821 (lambda _
7822 (with-directory-excursion "tests"
7823 (invoke "python" "all_tests.py"))
7824 #t))
7825 (add-after 'install 'install-doc
7826 (lambda* (#:key outputs #:allow-other-keys)
7827 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7828 (doc (string-append data "/doc/" ,name "-" ,version))
7829 (examples (string-append doc "/examples")))
7830 (mkdir-p examples)
7831 (for-each (lambda (file)
7832 (copy-file (string-append "." file)
7833 (string-append doc file)))
7834 '("/README.rst" "/CHANGES" "/LICENSE"))
7835 (copy-recursively "examples" examples)
7836 #t))))))
7837 (home-page "https://github.com/eliben/pycparser")
7838 (synopsis "C parser in Python")
7839 (description
7840 "Pycparser is a complete parser of the C language, written in pure Python
7841 using the PLY parsing library. It parses C code into an AST and can serve as
7842 a front-end for C compilers or analysis tools.")
7843 (license license:bsd-3)))
7844
7845 (define-public python2-pycparser
7846 (package-with-python2 python-pycparser))
7847
7848 (define-public python-xlsxwriter
7849 (package
7850 (name "python-xlsxwriter")
7851 (version "1.3.9")
7852 (source
7853 (origin
7854 ;; There are no tests in the PyPI tarball.
7855 (method git-fetch)
7856 (uri (git-reference
7857 (url "https://github.com/jmcnamara/XlsxWriter")
7858 (commit (string-append "RELEASE_" version))))
7859 (file-name (git-file-name name version))
7860 (sha256
7861 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
7862 (build-system python-build-system)
7863 (home-page "https://github.com/jmcnamara/XlsxWriter")
7864 (synopsis "Python module for creating Excel XLSX files")
7865 (description
7866 "XlsxWriter is a Python module that can be used to write text, numbers,
7867 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
7868 (license license:bsd-2)))
7869
7870 (define-public python-pywavelets
7871 (package
7872 (name "python-pywavelets")
7873 (version "1.2.0")
7874 (home-page "https://github.com/PyWavelets/pywt")
7875 (source (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "PyWavelets" version))
7878 (sha256
7879 (base32
7880 "13csbr6ls9q9ww53z2xwwsj0hpsz88rj2iwp623h0kmv8yq6kgbc"))
7881 (snippet
7882 #~(begin
7883 (use-modules ((guix build utils)))
7884 (for-each delete-file
7885 (list
7886 "pywt/_extensions/_cwt.c"
7887 "pywt/_extensions/_dwt.c"
7888 "pywt/_extensions/_pywt.c"
7889 "pywt/_extensions/_pywt.h"
7890 "pywt/_extensions/_swt.c"))))))
7891 (build-system python-build-system)
7892 (arguments
7893 '(#:modules ((ice-9 ftw)
7894 (srfi srfi-1)
7895 (srfi srfi-26)
7896 (guix build utils)
7897 (guix build python-build-system))
7898 #:phases
7899 (modify-phases %standard-phases
7900 (replace 'check
7901 (lambda _
7902 (let ((cwd (getcwd))
7903 (libdir (find (cut string-prefix? "lib." <>)
7904 (scandir "build"))))
7905 (with-directory-excursion (string-append cwd "/build/" libdir)
7906 (invoke "pytest" "-vv"))))))))
7907 (native-inputs
7908 (list python-cython
7909 python-matplotlib ;for tests
7910 python-pytest))
7911 (propagated-inputs
7912 (list python-numpy))
7913 (synopsis "Wavelet transforms in Python")
7914 (description
7915 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
7916 mathematical basis functions that are localized in both time and frequency.
7917 Wavelet transforms are time-frequency transforms employing wavelets. They are
7918 similar to Fourier transforms, the difference being that Fourier transforms are
7919 localized only in frequency instead of in time and frequency.")
7920 (license license:expat)))
7921
7922 (define-public python-pywal
7923 (package
7924 (name "python-pywal")
7925 (version "3.3.0")
7926 (source
7927 (origin
7928 (method git-fetch)
7929 (uri (git-reference
7930 (url "https://github.com/dylanaraps/pywal")
7931 (commit version)))
7932 (file-name (git-file-name name version))
7933 (sha256
7934 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
7935 (build-system python-build-system)
7936 (arguments
7937 `(#:phases
7938 (modify-phases %standard-phases
7939 (add-before 'check 'fix-home-directory
7940 (lambda _
7941 ;; Tests fail with "Permission denied: '/homeless-shelter'".
7942 (setenv "HOME" "/tmp")
7943 #t)))))
7944 (inputs
7945 (list imagemagick))
7946 (home-page "https://github.com/dylanaraps/pywal")
7947 (synopsis "Color palette generator and applicator")
7948 (description
7949 "Pywal is a tool that generates a color palette from the dominant colors
7950 in an image. It then applies the colors system-wide and on-the-fly in all of
7951 your favourite programs.")
7952 (license license:expat)))
7953
7954 (define-public python-click-didyoumean
7955 (package
7956 (name "python-click-didyoumean")
7957 (version "0.3.0")
7958 (source
7959 (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "click-didyoumean" version))
7962 (sha256
7963 (base32 "0dc0xrmqbw0idpx843ahzzvivmvx3fcfsm3k54lnssyra7cg117i"))))
7964 (build-system python-build-system)
7965 (arguments
7966 `(#:tests? #f)) ; no tests in PyPI and no setup.py in github
7967 (propagated-inputs
7968 (list python-click))
7969 (home-page "https://github.com/timofurrer/click-didyoumean")
7970 (synopsis "Git-like did-you-mean feature in Click")
7971 (description
7972 "This plugin enables git-like did-you-mean feature in Click.")
7973 (license license:expat)))
7974
7975 (define-public python-pywinrm
7976 (package
7977 (name "python-pywinrm")
7978 (version "0.4.1")
7979 (source
7980 (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "pywinrm" version))
7983 (sha256
7984 (base32
7985 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
7986 (build-system python-build-system)
7987 (propagated-inputs
7988 (list python-six python-requests_ntlm python-xmltodict
7989 python-kerberos))
7990 (native-inputs
7991 (list python-mock python-pytest))
7992 (home-page "https://github.com/diyan/pywinrm/")
7993 (synopsis
7994 "Python library for Windows Remote Management (WinRM)")
7995 (description
7996 "pywinrm is a Python client for the Windows Remote Management (WinRM)
7997 service. It allows you to invoke commands on target Windows machines from
7998 any machine that can run Python.")
7999 (license license:expat)))
8000
8001 (define-public python-xcffib
8002 (package
8003 (name "python-xcffib")
8004 (version "0.11.1")
8005 (source
8006 (origin
8007 (method url-fetch)
8008 (uri (pypi-uri "xcffib" version))
8009 (sha256
8010 (base32
8011 "0nkglsm9nbhv238iagmmsjcz6lf1yfdvp5kmspphdj385vz9r50j"))))
8012 (build-system python-build-system)
8013 (inputs
8014 (list libxcb))
8015 (propagated-inputs
8016 (list python-cffi ; used at run time
8017 python-six))
8018 (arguments
8019 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
8020 #:tests? #f
8021 #:phases
8022 (modify-phases %standard-phases
8023 (add-after 'unpack 'fix-libxcb-path
8024 (lambda* (#:key inputs #:allow-other-keys)
8025 (let ((libxcb (assoc-ref inputs "libxcb")))
8026 (substitute* '("xcffib/__init__.py")
8027 (("soname = ctypes.util.find_library.*xcb.*")
8028 (string-append "soname = \"" libxcb "/lib/libxcb.so\"\n")))
8029 #t)))
8030 (add-after 'install 'install-doc
8031 (lambda* (#:key outputs #:allow-other-keys)
8032 (let ((doc (string-append (assoc-ref outputs "out") "/share"
8033 "/doc/" ,name "-" ,version)))
8034 (mkdir-p doc)
8035 (copy-file "README.md"
8036 (string-append doc "/README.md"))
8037 #t))))))
8038 (home-page "https://github.com/tych0/xcffib")
8039 (synopsis "XCB Python bindings")
8040 (description
8041 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
8042 support for Python 3 and PyPy. It is based on cffi.")
8043 (license license:expat)))
8044
8045 (define-public python2-xcffib
8046 (package-with-python2 python-xcffib))
8047
8048 (define-public python-cairocffi
8049 (package
8050 (name "python-cairocffi")
8051 (version "1.2.0")
8052 (source
8053 (origin
8054 ;; The PyPI archive does not include the documentation, so use Git.
8055 (method git-fetch)
8056 (uri (git-reference
8057 (url "https://github.com/Kozea/cairocffi")
8058 (commit (string-append "v" version))))
8059 (file-name (git-file-name name version))
8060 (sha256
8061 (base32
8062 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
8063 (build-system python-build-system)
8064 (outputs '("out" "doc"))
8065 (inputs
8066 (list glib gtk+ gdk-pixbuf cairo))
8067 (native-inputs
8068 (list python-numpy
8069 python-pytest
8070 python-pytest-cov
8071 python-pytest-runner
8072 python-sphinx
8073 python-sphinx-rtd-theme))
8074 (propagated-inputs
8075 (list python-xcffib)) ; used at run time
8076 (arguments
8077 `(#:phases
8078 (modify-phases %standard-phases
8079 (add-after 'unpack 'patch-paths
8080 (lambda* (#:key inputs #:allow-other-keys)
8081 (substitute* "cairocffi/__init__.py"
8082 ;; Hack the dynamic library loading mechanism.
8083 (("find_library\\(library_name\\)")
8084 "\"found\"")
8085 (("filenames = \\(library_filename,\\) \\+ filenames")
8086 "pass")
8087 (("libcairo.so.2")
8088 (search-input-file inputs "/lib/libcairo.so.2")))
8089 (substitute* "cairocffi/pixbuf.py"
8090 (("libgdk_pixbuf-2.0.so.0")
8091 (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
8092 (("libgobject-2.0.so.0")
8093 (search-input-file inputs "/lib/libgobject-2.0.so.0"))
8094 (("libglib-2.0.so.0")
8095 (search-input-file inputs "/lib/libglib-2.0.so.0"))
8096 (("libgdk-3.so.0")
8097 (search-input-file inputs "/lib/libgdk-3.so.0")))))
8098 (add-after 'unpack 'disable-linters
8099 ;; Their check fails; none of our business.
8100 (lambda _
8101 (substitute* "setup.cfg"
8102 ((".*pytest-flake8.*") "")
8103 ((".*pytest-isort.*") "")
8104 (("--flake8") "")
8105 (("--isort") ""))
8106 #t))
8107 (add-after 'install 'install-doc
8108 (lambda* (#:key inputs outputs #:allow-other-keys)
8109 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
8110 (doc (string-append data "/doc/" ,name "-" ,version))
8111 (html (string-append doc "/html")))
8112 (setenv "LD_LIBRARY_PATH"
8113 (string-append (assoc-ref inputs "cairo") "/lib" ":"
8114 (assoc-ref inputs "gdk-pixbuf") "/lib"))
8115 (setenv "LANG" "en_US.UTF-8")
8116 (mkdir-p html)
8117 (for-each (lambda (file)
8118 (copy-file (string-append "." file)
8119 (string-append doc file)))
8120 '("/README.rst" "/NEWS.rst"))
8121 (system* "python" "setup.py" "build_sphinx")
8122 (copy-recursively "docs/_build/html" html)
8123 #t))))))
8124 (home-page "https://github.com/Kozea/cairocffi")
8125 (synopsis "Python bindings and object-oriented API for Cairo")
8126 (description
8127 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
8128 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
8129 graphics library with support for multiple backends including image buffers,
8130 PNG, PostScript, PDF, and SVG file output.")
8131 (license license:bsd-3)))
8132
8133 (define-public python-decorator
8134 (package
8135 (name "python-decorator")
8136 (version "5.0.9")
8137 (source
8138 (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "decorator" version))
8141 (sha256
8142 (base32 "1mcy64hllgm938v8k1x2a4g0q9swsnrfnsvhz59kr28a6ajgpv3j"))))
8143 (build-system python-build-system)
8144 (home-page "https://pypi.org/project/decorator/")
8145 (synopsis "Python module to simplify usage of decorators")
8146 (description
8147 "The aim of the decorator module is to simplify the usage of decorators
8148 for the average programmer, and to popularize decorators usage giving examples
8149 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
8150 etc. The core of this module is a decorator factory.")
8151 (license license:expat)
8152 (properties `((python2-variant . ,(delay python2-decorator))))))
8153
8154 ;; Version 5 does not support Python 2
8155 (define-public python2-decorator
8156 (package
8157 (inherit (package-with-python2
8158 (strip-python2-variant python-decorator)))
8159 (version "4.3.0")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "decorator" version))
8164 (sha256
8165 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))))
8166
8167 (define-public python-drmaa
8168 (package
8169 (name "python-drmaa")
8170 (version "0.7.7")
8171 (source
8172 (origin
8173 (method url-fetch)
8174 (uri (pypi-uri "drmaa" version))
8175 (sha256
8176 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
8177 (build-system python-build-system)
8178 ;; The test suite requires libdrmaa which is provided by the cluster
8179 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
8180 ;; should be set to the path of the libdrmaa library.
8181 (arguments
8182 '(#:tests? #f
8183 #:phases (modify-phases %standard-phases
8184 ;; Loading the library fails because DRMAA_LIBRARY_PATH
8185 ;; is not configured.
8186 (delete 'sanity-check))))
8187 (home-page "https://pypi.org/project/drmaa/")
8188 (synopsis "Python bindings for the DRMAA library")
8189 (description
8190 "A Python package for Distributed Resource Management (DRM) job
8191 submission and control. This package is an implementation of the DRMAA 1.0
8192 Python language binding specification.")
8193 (license license:bsd-3)))
8194
8195 (define-public python2-drmaa
8196 (package-with-python2 python-drmaa))
8197
8198 (define-public python-grako
8199 (package
8200 (name "python-grako")
8201 (version "3.99.9")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri
8206 (pypi-uri "grako" version ".zip"))
8207 (sha256
8208 (base32
8209 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
8210 (build-system python-build-system)
8211 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
8212 (native-inputs
8213 (list unzip python-pytest python-pytest-runner))
8214 (home-page "https://bitbucket.org/neogeny/grako")
8215 (synopsis "EBNF parser generator")
8216 (description
8217 "Grako takes a grammar in a variation of EBNF as input, and outputs a
8218 memoizing PEG/Packrat parser in Python.")
8219 (license license:bsd-3)))
8220
8221 (define-public python2-grako
8222 (package-with-python2 python-grako))
8223
8224 (define-public python-grandalf
8225 (package
8226 (name "python-grandalf")
8227 (version "0.7")
8228 (source
8229 (origin
8230 ;; There's no source tarball on PyPI.
8231 (method git-fetch)
8232 (uri (git-reference
8233 (url "https://github.com/bdcht/grandalf")
8234 (commit (string-append "v" version))))
8235 (file-name (git-file-name name version))
8236 (sha256
8237 (base32
8238 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
8239 (build-system python-build-system)
8240 (arguments
8241 '(#:phases
8242 (modify-phases %standard-phases
8243 (replace 'check
8244 (lambda _
8245 (invoke "python" "setup.py" "pytest"))))))
8246 (native-inputs
8247 (list python-pytest python-pytest-runner))
8248 (propagated-inputs
8249 (list python-numpy python-ply))
8250 (home-page "https://github.com/bdcht/grandalf")
8251 (synopsis "Graph and drawing algorithms framework")
8252 (description
8253 "Grandalf is a Python package made for experimentations with graphs
8254 drawing algorithms. It is written in pure Python, and currently implements
8255 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
8256 minimization approach. While not as fast or featured as graphviz or other
8257 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
8258 than thousands of nodes, while keeping the source code simple enough to tweak
8259 and hack any part of it for experimental purpose. With a total of about 1500
8260 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
8261 in less than 600 lines. The energy minimization approach is comprised of only
8262 250 lines!
8263
8264 Grandalf does only 2 not-so-simple things:
8265 @itemize
8266 @item computing the nodes (x,y) coordinates (based on provided nodes
8267 dimensions, and a chosen layout)
8268 @item routing the edges with lines or nurbs
8269 @end itemize
8270
8271 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
8272 will help you find where to draw things like nodes and edges, but it’s up to
8273 you to actually draw things with your favorite toolkit.")
8274 ;; The user can choose either license.
8275 (license (list license:gpl2 license:epl1.0))))
8276
8277 (define-public python-gridmap
8278 (package
8279 (name "python-gridmap")
8280 (version "0.14.0")
8281 (source
8282 (origin
8283 (method git-fetch)
8284 (uri (git-reference
8285 (url "https://github.com/pygridtools/gridmap")
8286 (commit (string-append "v" version))))
8287 (file-name (git-file-name name version))
8288 (sha256
8289 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
8290 (build-system python-build-system)
8291 (arguments
8292 '(#:tests? #f ;FIXME: Requires python-cherrypy.
8293 #:phases (modify-phases %standard-phases
8294 ;; Importing the web server module requires cherrypy, too.
8295 (delete 'sanity-check))))
8296 (propagated-inputs
8297 (list python-psutil python-drmaa python-pyzmq))
8298 (home-page "https://github.com/pygridtools/gridmap")
8299 (synopsis "Create jobs on a cluster directly from Python")
8300 (description
8301 "Gridmap is a Python package to allow you to easily create jobs on the
8302 cluster directly from Python. You can directly map Python functions onto the
8303 cluster without needing to write any wrapper code yourself.")
8304 (license license:gpl3+)))
8305
8306 (define-public python-honcho
8307 (package
8308 (name "python-honcho")
8309 (version "1.1.0")
8310 (source
8311 (origin
8312 (method git-fetch)
8313 (uri (git-reference
8314 (url "https://github.com/nickstenning/honcho")
8315 (commit (string-append "v" version))))
8316 (file-name (git-file-name name version))
8317 (sha256
8318 (base32 "1y0r8dw4pqcq7r4n58ixjdg1iy60lp0gxsd7d2jmhals16ij71rj"))))
8319 (build-system python-build-system)
8320 (native-inputs
8321 (list python-pytest python-mock python-tox which)) ;for tests
8322 (propagated-inputs
8323 (list python-jinja2))
8324 (arguments
8325 `(#:phases
8326 (modify-phases %standard-phases
8327 (delete 'check)
8328 (add-after 'install 'check
8329 (lambda* (#:key outputs inputs #:allow-other-keys)
8330 ;; fix honcho path in testsuite
8331 (substitute* "tests/conftest.py"
8332 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
8333 "/bin/honcho" "'")))
8334 ;; It's easier to run tests after install.
8335 ;; Make installed package available for running the tests
8336 (add-installed-pythonpath inputs outputs)
8337 ;; Skip failing test_export
8338 (invoke "py.test" "-v" "-k" "not test_export"))))))
8339 (home-page "https://github.com/nickstenning/honcho")
8340 (synopsis "Manage Procfile-based applications")
8341 (description
8342 "A Procfile is a file which describes how to run an application
8343 consisting of several processes. honcho starts all listed processes.
8344 The output of all running processes is collected by honcho and
8345 displayed.")
8346 (license license:expat)))
8347
8348 (define-public python-pebble
8349 (package
8350 (name "python-pebble")
8351 (version "4.6.1")
8352 (source
8353 (origin
8354 (method url-fetch)
8355 (uri (pypi-uri "Pebble" version))
8356 (sha256
8357 (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
8358 (build-system python-build-system)
8359 (native-inputs
8360 (list python-pytest))
8361 (arguments
8362 `(#:phases
8363 (modify-phases %standard-phases
8364 (replace 'check
8365 (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
8366 (home-page "https://github.com/noxdafox/pebble")
8367 (synopsis "Threading and multiprocessing for Python")
8368 (description
8369 "Pebble aims to help manage threads and processes in an easier way. It
8370 wraps Python's standard library threading and multiprocessing objects.")
8371 (license license:lgpl3+)))
8372
8373 (define-public python-pexpect
8374 (package
8375 (name "python-pexpect")
8376 (version "4.8.0")
8377 (source
8378 (origin
8379 (method url-fetch)
8380 (uri (pypi-uri "pexpect" version))
8381 (sha256
8382 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
8383 (build-system python-build-system)
8384 (arguments
8385 `(#:phases
8386 (modify-phases %standard-phases
8387 (add-before 'check 'prepare-tests
8388 (lambda _
8389 (substitute* (find-files "tests")
8390 (("/bin/ls") (which "ls"))
8391 (("/bin/echo") (which "echo"))
8392 (("/bin/which") (which "which"))
8393 ;; Many tests try to use the /bin directory which
8394 ;; is not present in the build environment.
8395 ;; Use one that's non-empty and unlikely to change.
8396 (("/bin'") "/dev'")
8397 ;; Disable failing test. See upstream bug report
8398 ;; https://github.com/pexpect/pexpect/issues/568
8399 (("def test_bash") "def _test_bash"))
8400 ;; XXX: Socket connection test gets "Connection reset by peer".
8401 ;; Why does it not work? Delete for now.
8402 (delete-file "tests/test_socket.py")
8403 #t))
8404 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
8405 (native-inputs
8406 `(("python-nose" ,python-nose)
8407 ("python-pytest" ,python-pytest)
8408 ("man-db" ,man-db)
8409 ("which" ,which)
8410 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
8411 (propagated-inputs
8412 (list python-ptyprocess))
8413 (home-page "http://pexpect.readthedocs.org/")
8414 (synopsis "Controlling interactive console applications")
8415 (description
8416 "Pexpect is a pure Python module for spawning child applications;
8417 controlling them; and responding to expected patterns in their output.
8418 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
8419 child application and control it as if a human were typing commands.")
8420 (license license:isc)))
8421
8422 (define-public python2-pexpect
8423 (package-with-python2 python-pexpect))
8424
8425 (define-public python-setuptools-scm
8426 (package
8427 (name "python-setuptools-scm")
8428 (version "6.3.2")
8429 (source (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "setuptools_scm" version))
8432 (sha256
8433 (base32 "1wm0i27siyy1yqr9rv7lqvb65agay9051yi8jzmi8dgb3q4ai6m4"))))
8434 (build-system python-build-system)
8435 (propagated-inputs
8436 `(("python-packaging",python-packaging-bootstrap)
8437 ("python-tomli" ,python-tomli)))
8438 (home-page "https://github.com/pypa/setuptools_scm/")
8439 (synopsis "Manage Python package versions in SCM metadata")
8440 (description
8441 "Setuptools_scm handles managing your Python package versions in
8442 @dfn{software configuration management} (SCM) metadata instead of declaring
8443 them as the version argument or in a SCM managed file.")
8444 (license license:expat)
8445 (properties `((python2-variant . ,(delay python2-setuptools-scm))))))
8446
8447 (define-public python2-setuptools-scm
8448 (let ((base (package-with-python2
8449 (strip-python2-variant python-setuptools-scm))))
8450 (package/inherit base
8451 (version "5.0.2") ;no python 2 support in version 6
8452 (source (origin
8453 (method url-fetch)
8454 (uri (pypi-uri "setuptools_scm" version))
8455 (sha256
8456 (base32
8457 "1j75i8avp9fhrkpbabsa8vyvbi49kmxlq6l10xir9qs96kfwx843"))))
8458 (propagated-inputs '()))))
8459
8460 (define-public python-sexpdata
8461 (package
8462 (name "python-sexpdata")
8463 (version "0.0.3")
8464 (source
8465 (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "sexpdata" version))
8468 (sha256
8469 (base32
8470 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
8471 (build-system python-build-system)
8472 (home-page "https://github.com/jd-boyd/sexpdata")
8473 (synopsis "S-expression parser for Python")
8474 (description
8475 "Sexpdata is an S-expression parser/serializer. It has load and dump
8476 functions like pickle, json or PyYAML module.")
8477 (license license:bsd-3)))
8478
8479 (define-public python-pathlib2
8480 (package
8481 (name "python-pathlib2")
8482 (version "2.3.6")
8483 (source
8484 (origin
8485 (method url-fetch)
8486 (uri (pypi-uri "pathlib2" version))
8487 (sha256
8488 (base32
8489 "0psyg60vk8wca473djrh0v9gb853z8wcawi8im5dyg00amawp2vx"))))
8490 (build-system python-build-system)
8491 (propagated-inputs
8492 (list python-scandir python-six))
8493 (home-page "https://pypi.org/project/pathlib2/")
8494 (synopsis "Object-oriented file system paths")
8495 (description "The goal of pathlib2 is to provide a backport of the
8496 standard @code{pathlib} module which tracks the standard library module, so
8497 all the newest features of the standard @code{pathlib} can be used also on
8498 older Python versions.")
8499 (license license:expat)))
8500
8501 (define-public python-importlib-resources
8502 (package
8503 (name "python-importlib-resources")
8504 (version "3.0.0")
8505 (source
8506 (origin
8507 (method url-fetch)
8508 (uri (pypi-uri "importlib_resources" version))
8509 (sha256
8510 (base32
8511 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
8512 (build-system python-build-system)
8513 (native-inputs
8514 (list python-setuptools-scm python-toml))
8515 (home-page "http://importlib-resources.readthedocs.io/")
8516 (synopsis "Read resources from Python packages")
8517 (description
8518 "@code{importlib_resources} is a backport of Python 3's standard library
8519 @code{importlib.resources} module for Python 2.7, and Python 3.")
8520 (properties `((python2-variant . ,(delay python2-importlib-resources))))
8521 (license license:asl2.0)))
8522
8523 (define-public python2-importlib-resources
8524 (package
8525 (name "python2-importlib-resources")
8526 (version "1.0.2")
8527 (source (origin
8528 (method url-fetch)
8529 (uri (pypi-uri "importlib_resources" version))
8530 (sha256
8531 (base32
8532 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
8533 (build-system python-build-system)
8534 (arguments
8535 `(#:python ,python-2
8536 #:phases (modify-phases %standard-phases
8537 ;; The build system tests for python-wheel, but it is
8538 ;; not required for Guix nor the test suite. Just drop
8539 ;; it to make bootstrapping pytest easier.
8540 (add-after 'unpack 'drop-wheel-dependency
8541 (lambda _
8542 (substitute* "setup.cfg"
8543 (("^[[:blank:]]+wheel")
8544 ""))
8545 #t)))))
8546 (propagated-inputs
8547 (list python2-pathlib2 python2-typing))
8548 (home-page "https://gitlab.com/python-devs/importlib_resources")
8549 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
8550 (description
8551 "This package provides an implementation of @code{importlib.resources}
8552 for older versions of Python.")
8553 (license license:asl2.0)))
8554
8555 ;; For importlib-metadata-bootstrap below.
8556 (define-public python2-importlib-resources-bootstrap
8557 (hidden-package
8558 (package/inherit
8559 python2-importlib-resources
8560 (name "python2-importlib-resources-bootstrap")
8561 (propagated-inputs
8562 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
8563 ("python-typing" ,python2-typing))))))
8564
8565 (define-public python-importlib-metadata
8566 (package
8567 (name "python-importlib-metadata")
8568 (version "4.11.3")
8569 (source
8570 (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "importlib_metadata" version))
8573 (sha256
8574 (base32
8575 "0f951zynlh39yicqnhrs3p1qa5p3g6ajjfcggf12y51ppxz5jk7a"))))
8576 (build-system python-build-system)
8577 (arguments
8578 (list
8579 #:phases
8580 #~(modify-phases %standard-phases
8581 ;; XXX: PEP 517 manual build/install procedures copied from
8582 ;; python-isort.
8583 (replace 'build
8584 (lambda _
8585 ;; ZIP does not support timestamps before 1980.
8586 (setenv "SOURCE_DATE_EPOCH" "315532800")
8587 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
8588 (replace 'install
8589 (lambda* (#:key outputs #:allow-other-keys)
8590 (let ((whl (car (find-files "dist" "\\.whl$"))))
8591 (invoke "pip" "--no-cache-dir" "--no-input"
8592 "install" "--no-deps" "--prefix" #$output whl))))
8593 (replace 'check
8594 (lambda* (#:key tests? #:allow-other-keys)
8595 (when tests?
8596 (invoke "pytest" "-vv" "tests")))))))
8597 (propagated-inputs (list python-zipp))
8598 (native-inputs
8599 (list python-pypa-build
8600 python-pyfakefs
8601 python-pytest
8602 python-setuptools-scm))
8603 (home-page "https://importlib-metadata.readthedocs.io/")
8604 (synopsis "Read metadata from Python packages")
8605 (description
8606 "@code{importlib_metadata} is a library which provides an API for
8607 accessing an installed Python package's metadata, such as its entry points or
8608 its top-level name. This functionality intends to replace most uses of
8609 @code{pkg_resources} entry point API and metadata API. Along with
8610 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
8611 need to use the older and less efficient @code{pkg_resources} package.")
8612 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
8613 (license license:asl2.0)))
8614
8615 (define-public python2-importlib-metadata
8616 (let ((base (package-with-python2 (strip-python2-variant
8617 python-importlib-metadata))))
8618 (package/inherit base
8619 (name "python2-importlib-metadata")
8620 (version "1.5.0")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "importlib_metadata" version))
8625 (sha256
8626 (base32
8627 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
8628 (arguments (substitute-keyword-arguments (package-arguments base)
8629 ((#:phases phases) ;reset standard phases
8630 #~%standard-phases)))
8631 (native-inputs
8632 `(("python-setuptools-scm" ,python2-setuptools-scm)
8633 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
8634 ("python-packaging" ,python2-packaging-bootstrap)))
8635 (propagated-inputs
8636 `(("python-configparser" ,python2-configparser)
8637 ("python-contextlib2" ,python2-contextlib2)
8638 ("python-importlib-resources" ,python2-importlib-resources)
8639 ("python-pathlib2" ,python2-pathlib2)
8640 ,@(package-propagated-inputs base))))))
8641
8642 ;; This package is used by python2-pytest, and thus must not depend on it.
8643 (define-public python2-importlib-metadata-bootstrap
8644 (hidden-package
8645 (package/inherit
8646 python2-importlib-metadata
8647 (name "python2-importlib-metadata-bootstrap")
8648 (arguments
8649 `(#:tests? #f
8650 ,@(package-arguments python2-importlib-metadata)))
8651 (propagated-inputs
8652 `(("python-zipp" ,python2-zipp-bootstrap)
8653 ("python-pathlib2" ,python2-pathlib2-bootstrap)
8654 ("python-configparser" ,python2-configparser)
8655 ("python-contextlib2" ,python2-contextlib2-bootstrap)
8656 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
8657
8658 (define-public python-importmagic
8659 (package
8660 (name "python-importmagic")
8661 (version "0.1.7")
8662 (source
8663 (origin
8664 (method url-fetch)
8665 (uri (pypi-uri "importmagic" version))
8666 (sha256
8667 (base32
8668 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
8669 (build-system python-build-system)
8670 (arguments
8671 (list #:phases
8672 #~(modify-phases %standard-phases
8673 (replace 'check
8674 (lambda* (#:key tests? #:allow-other-keys)
8675 (when tests?
8676 (invoke "pytest" "-v")))))))
8677 (native-inputs
8678 (list python-pytest))
8679 (home-page "https://github.com/alecthomas/importmagic")
8680 (synopsis "Library for adding, removing and managing Python imports")
8681 (description
8682 "Importmagic is a Python library for automatically managing imports by
8683 finding unresolved symbols in Python code and their corresponding imports.")
8684 (license license:bsd-3)))
8685
8686 (define-public python-inotify-simple
8687 (package
8688 (name "python-inotify-simple")
8689 (version "1.3.5")
8690 (source
8691 (origin
8692 (method git-fetch)
8693 (uri (git-reference
8694 (url "https://github.com/chrisjbillington/inotify_simple")
8695 (commit version)))
8696 (file-name (git-file-name name version))
8697 (sha256
8698 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
8699 (build-system python-build-system)
8700 (home-page
8701 "https://github.com/chrisjbillington/inotify_simple")
8702 (synopsis "Simple wrapper around inotify library")
8703 (description
8704 "@code{inotify-simple} is a simple wrapper around inotify library.")
8705 (license license:bsd-3)))
8706
8707 (define-public python-jaraco-classes
8708 (package
8709 (name "python-jaraco-classes")
8710 (version "3.2.1")
8711 (source
8712 (origin
8713 (method url-fetch)
8714 (uri (pypi-uri "jaraco.classes" version))
8715 (sha256
8716 (base32 "0d6g7qvfv1jlzbzh6asprqdblqd59grvlvr3nwbdqdqrmwlbfm7d"))))
8717 (build-system python-build-system)
8718 (arguments
8719 (list
8720 #:phases
8721 #~(modify-phases %standard-phases
8722 (replace 'check
8723 (lambda* (#:key tests? #:allow-other-keys)
8724 (when tests?
8725 ;; Do not test the myproject.toml build as it tries to pull
8726 ;; dependencies from the Internet.
8727 (invoke "pytest" "-vv" "-k" "not project")))))))
8728 (native-inputs
8729 (list python-pytest
8730 python-pytest-black
8731 python-pytest-checkdocs
8732 python-pytest-cov
8733 python-pytest-enabler-bootstrap ;OK since not propagated
8734 python-pytest-flake8
8735 python-pytest-mypy
8736 python-setuptools-scm
8737 python-wheel))
8738 (propagated-inputs (list python-more-itertools))
8739 (home-page "https://github.com/jaraco/jaraco.classes")
8740 (synopsis "Utility functions for Python class constructs")
8741 (description "This Python library contains utility functions for Python
8742 class constructs.")
8743 (license license:expat)))
8744
8745 ;;; Variant used to break a cycle with python-pytest-enabler.
8746 (define-public python-jaraco-context-bootstrap
8747 (hidden-package
8748 (package
8749 (name "python-jaraco-context-bootstrap")
8750 (version "4.1.1")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "jaraco.context" version))
8755 (sha256
8756 (base32 "0hbjm1rpxf4pzmbdp9rh3ali4zqnlcr8m97bhh1nizxvzcpxim7h"))))
8757 (build-system python-build-system)
8758 (arguments (list #:tests? #f))
8759 (native-inputs (list python-setuptools-scm))
8760 (home-page "https://github.com/jaraco/jaraco.context")
8761 (synopsis "Context managers Python library")
8762 (description "This Python library provides context managers-related
8763 procedures.")
8764 (license license:expat))))
8765
8766 (define-public python-jaraco-context
8767 (package/inherit python-jaraco-context-bootstrap
8768 (name "python-jaraco-context")
8769 (arguments
8770 (substitute-keyword-arguments
8771 (package-arguments python-jaraco-context-bootstrap)
8772 ((#:tests? _ #f)
8773 #t)
8774 ((#:phases phases #~%standard-phases)
8775 #~(modify-phases #$phases
8776 (replace 'check
8777 (lambda* (#:key tests? #:allow-other-keys)
8778 (when tests?
8779 ;; Do not test the myproject.toml build as it tries to pull
8780 ;; dependencies from the Internet.
8781 (invoke "pytest" "-vv" "-k" "not project"))))))))
8782 (native-inputs
8783 (modify-inputs
8784 (package-native-inputs python-jaraco-context-bootstrap)
8785 (append python-pytest
8786 python-pytest-black
8787 python-pytest-checkdocs
8788 python-pytest-cov
8789 python-pytest-enabler-bootstrap ;OK since not propagated
8790 python-pytest-flake8
8791 python-pytest-mypy)))
8792 (properties (alist-delete 'hidden? (package-properties
8793 python-jaraco-context-bootstrap)))))
8794
8795 ;;; Variant used to break a cycle with python-pytest-enabler.
8796 (define-public python-jaraco-functools-bootstrap
8797 (hidden-package
8798 (package
8799 (name "python-jaraco-functools-bootstrap")
8800 (version "3.5.0")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "jaraco.functools" version))
8805 (sha256
8806 (base32 "186xqzs3bqhjwajnprxy3sc3h0w5vdld8spc1dxjnn9720yykq1i"))))
8807 (build-system python-build-system)
8808 (arguments (list #:tests? #f))
8809 (native-inputs (list python-setuptools-scm))
8810 (propagated-inputs (list python-more-itertools))
8811 (home-page "https://github.com/jaraco/jaraco.functools")
8812 (synopsis "Python library extending Python's @code{functools}")
8813 (description "This library extends the standard @code{functools} Python
8814 module with a few extra procedures.")
8815 (license license:expat))))
8816
8817 (define-public python-jaraco-functools
8818 (package/inherit python-jaraco-functools-bootstrap
8819 (name "python-jaraco-functools")
8820 (arguments
8821 (substitute-keyword-arguments
8822 (package-arguments python-jaraco-functools-bootstrap)
8823 ((#:tests? _ #f)
8824 #t)
8825 ((#:phases phases #~%standard-phases)
8826 #~(modify-phases #$phases
8827 (replace 'check
8828 (lambda* (#:key tests? #:allow-other-keys)
8829 (when tests?
8830 ;; Do not test the myproject.toml build as it tries to pull
8831 ;; dependencies from the Internet.
8832 (invoke "pytest" "-vv" "-k" "not project"))))))))
8833 (native-inputs
8834 (modify-inputs
8835 (package-native-inputs python-jaraco-functools-bootstrap)
8836 (append python-jaraco-classes
8837 python-pytest
8838 python-pytest-black
8839 python-pytest-checkdocs
8840 python-pytest-cov
8841 python-pytest-enabler-bootstrap ;OK since not propagated
8842 python-pytest-flake8
8843 python-pytest-mypy)))
8844 (properties (alist-delete 'hidden? (package-properties
8845 python-jaraco-functools-bootstrap)))))
8846
8847 (define-public python-jaraco-packaging
8848 (package
8849 (name "python-jaraco-packaging")
8850 (version "6.1")
8851 (source
8852 (origin
8853 (method url-fetch)
8854 (uri (pypi-uri "jaraco.packaging" version))
8855 (sha256
8856 (base32
8857 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
8858 (build-system python-build-system)
8859 (propagated-inputs
8860 (list python-pytest
8861 python-pytest-checkdocs
8862 python-pytest-flake8
8863 python-rst.linker
8864 python-setuptools
8865 python-setuptools-scm
8866 python-six
8867 python-sphinx))
8868 (home-page "https://github.com/jaraco/jaraco.packaging")
8869 (synopsis "Tools to supplement packaging Python releases")
8870 (description
8871 "This package provides various tools to supplement packaging Python
8872 releases.")
8873 (license license:expat)))
8874
8875 (define-public python-simplegeneric
8876 (package
8877 (name "python-simplegeneric")
8878 (version "0.8.1")
8879 (source
8880 (origin
8881 (method url-fetch)
8882 (uri (pypi-uri "simplegeneric" version ".zip"))
8883 (sha256
8884 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
8885 (build-system python-build-system)
8886 (native-inputs
8887 (list unzip))
8888 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
8889 (synopsis "Python module for simple generic functions")
8890 (description
8891 "The simplegeneric module lets you define simple single-dispatch generic
8892 functions, akin to Python’s built-in generic functions like @code{len()},
8893 @code{iter()} and so on. However, instead of using specially-named methods,
8894 these generic functions use simple lookup tables, akin to those used by
8895 e.g. @code{pickle.dump()} and other generic functions found in the Python
8896 standard library.")
8897 (license license:zpl2.1)))
8898
8899 (define-public python2-simplegeneric
8900 (package-with-python2 python-simplegeneric))
8901
8902 (define-public python-ipython-genutils
8903 ;; TODO: This package is retired, check if can be removed, see description.
8904 (package
8905 (name "python-ipython-genutils")
8906 (version "0.1.0")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "ipython_genutils" version))
8911 (sha256
8912 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
8913 (build-system python-build-system)
8914 (arguments `(#:tests? #f)) ; no tests
8915 (home-page "https://ipython.org")
8916 (synopsis "Vestigial utilities from IPython")
8917 (description
8918 "This package provides retired utilities from IPython. No packages
8919 outside IPython/Jupyter should depend on it.
8920
8921 This package shouldn't exist. It contains some common utilities shared by
8922 Jupyter and IPython projects during The Big Split. As soon as possible, those
8923 packages will remove their dependency on this, and this package will go
8924 away.")
8925 (license license:bsd-3)))
8926
8927 (define-public python2-ipython-genutils
8928 (package-with-python2 python-ipython-genutils))
8929
8930 ;;; Variant used to break a cycle with python-ipykernel.
8931 (define-public python-ipyparallel-bootstrap
8932 (hidden-package
8933 (package
8934 (name "python-ipyparallel-bootstrap")
8935 (version "8.2.1")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "ipyparallel" version))
8940 (sha256
8941 (base32
8942 "0wiwfd7870zbmczzn96jqxxjf2zcbcaxnsl1ddn8hspwa8y4frzj"))))
8943 (build-system python-build-system)
8944 (arguments
8945 (list
8946 #:tests? #f
8947 #:phases #~(modify-phases %standard-phases
8948 ;; The python-ipykernel is normally propagated but is
8949 ;; removed from this package to break the cycle.
8950 (delete 'sanity-check))))
8951 (propagated-inputs
8952 (list python-dateutil
8953 python-decorator
8954 python-entrypoints
8955 python-ipython
8956 ;; python-ipykernel is omitted here to break a cycle.
8957 python-jupyter-client-bootstrap
8958 python-psutil
8959 python-pyzmq
8960 python-tornado-6
8961 python-tqdm
8962 python-traitlets))
8963 (home-page "https://ipython.org/")
8964 (synopsis "Interactive Parallel Computing with IPython")
8965 (description
8966 "@code{ipyparallel} is a Python package and collection of CLI scripts for
8967 controlling clusters for Jupyter. @code{ipyparallel} contains the following
8968 CLI scripts:
8969 @enumerate
8970 @item ipcluster - start/stop a cluster
8971 @item ipcontroller - start a scheduler
8972 @item ipengine - start an engine
8973 @end enumerate")
8974 (license license:bsd-3))))
8975
8976 (define-public python-ipyparallel
8977 (package
8978 (inherit python-ipyparallel-bootstrap)
8979 (name "python-ipyparallel")
8980 (arguments
8981 (list
8982 #:phases
8983 #~(modify-phases %standard-phases
8984 (replace 'check
8985 (lambda _
8986 (invoke "pytest" "-vv"))))))
8987 (native-inputs
8988 (list python-ipython
8989 python-pytest
8990 python-pytest-asyncio
8991 python-pytest-cov
8992 python-pytest-tornado
8993 python-testpath))
8994 (propagated-inputs
8995 (modify-inputs (package-propagated-inputs python-ipyparallel-bootstrap)
8996 (replace "python-jupyter-client-bootstrap" python-jupyter-client)
8997 (append python-ipykernel)))
8998 (properties (alist-delete 'hidden? (package-properties
8999 python-ipyparallel-bootstrap)))))
9000
9001 (define-public python-ipython-cluster-helper
9002 (package
9003 (name "python-ipython-cluster-helper")
9004 (version "0.6.4")
9005 (source
9006 (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "ipython-cluster-helper" version))
9009 (sha256
9010 (base32
9011 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
9012 (modules '((guix build utils)))
9013 (snippet
9014 '(begin (substitute* "requirements.txt"
9015 (("ipython.*") "ipython\n"))
9016 #t))))
9017 (build-system python-build-system)
9018 (arguments
9019 `(#:tests? #f ; Test suite can't find IPython.
9020 #:phases
9021 (modify-phases %standard-phases
9022 (replace 'check
9023 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9024 (if tests?
9025 (begin
9026 (setenv "HOME" (getcwd))
9027 (add-installed-pythonpath inputs outputs)
9028 (invoke "python" "example/example.py" "--local"))
9029 #t))))))
9030 (propagated-inputs
9031 (list python-ipyparallel
9032 python-ipython
9033 python-netifaces
9034 python-pyzmq
9035 python-setuptools
9036 python-six))
9037 (home-page "https://github.com/roryk/ipython-cluster-helper")
9038 (synopsis
9039 "Simplify IPython cluster start up and use for multiple schedulers")
9040 (description
9041 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
9042 profile, launches a cluster and returns a view. On program exit it shuts the
9043 cluster down and deletes the throwaway profile.")
9044 (license license:expat)))
9045
9046 (define-public python-ipython-sql
9047 (package
9048 (name "python-ipython-sql")
9049 (version "0.4.0")
9050 (source
9051 (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "ipython-sql" version))
9054 (sha256
9055 (base32 "0v74ayc6vw98f4jljmwy45qpqbcbhlrb4g1qdyypq9sppxcqx21y"))))
9056 (build-system python-build-system)
9057 (arguments
9058 `(#:phases
9059 (modify-phases %standard-phases
9060 (add-after 'unpack 'fix-build
9061 (lambda _
9062 ;; The "NEWS.rst" file is missing from the PyPI distribution.
9063 ;; (see: https://github.com/catherinedevlin/ipython-sql/issues/164)
9064 (substitute* "setup.py"
9065 (("NEWS = [^\n]*") "")
9066 (("long_description=README \\+ '\\\\n\\\\n' \\+ NEWS,")
9067 "long_description=README,")))))))
9068 (propagated-inputs
9069 (list python-ipython
9070 python-ipython-genutils
9071 python-prettytable
9072 python-six
9073 python-sqlalchemy
9074 python-sqlparse))
9075 (home-page "https://github.com/catherinedevlin/ipython-sql")
9076 (synopsis "RDBMS access via IPython")
9077 (description "This library connects to a database, using SQLAlchemy URL
9078 connect strings, then issue SQL commands within IPython or IPython Notebook.")
9079 (license license:expat)))
9080
9081 (define-public python-traitlets
9082 (package
9083 (name "python-traitlets")
9084 (version "5.1.1")
9085 (source
9086 (origin
9087 (method url-fetch)
9088 (uri (pypi-uri "traitlets" version))
9089 (sha256
9090 (base32
9091 "1ivhxglsrnhqw4g98ihddn7i5f6976gpk31fijwq473wb9n4b7q5"))))
9092 (build-system python-build-system)
9093 (arguments
9094 `(#:phases
9095 (modify-phases %standard-phases
9096 (replace 'check (lambda* (#:key tests? #:allow-other-keys)
9097 (when tests?
9098 (invoke "pytest" "-vv" "traitlets")))))))
9099 (native-inputs
9100 (list python-pytest))
9101 (home-page "https://ipython.org")
9102 (synopsis "Configuration system for Python applications")
9103 (description
9104 "Traitlets is a framework that lets Python classes have attributes with
9105 type checking, dynamically calculated default values, and ‘on change’
9106 callbacks. The package also includes a mechanism to use traitlets for
9107 configuration, loading values from files or from command line arguments. This
9108 is a distinct layer on top of traitlets, so you can use traitlets in your code
9109 without using the configuration machinery.")
9110 (license license:bsd-3)))
9111
9112 (define-public python-jupyter-core
9113 (package
9114 (name "python-jupyter-core")
9115 (version "4.10.0")
9116 (source
9117 (origin
9118 (method url-fetch)
9119 (uri (string-append (pypi-uri "jupyter_core" version)))
9120 (sha256
9121 (base32
9122 "1v0s31rmwppdmww135hif03hy164j9kimirh24kxfcbvdfql9pm6"))))
9123 (build-system python-build-system)
9124 (arguments
9125 `(#:phases
9126 (modify-phases %standard-phases
9127 (replace 'check
9128 (lambda* (#:key tests? #:allow-other-keys)
9129 (when tests?
9130 ;; Some tests write to $HOME.
9131 (setenv "HOME" "/tmp")
9132 (invoke "pytest" "-vv"
9133 "-k"
9134 (string-append
9135 ;; XXX: These tests fail with "ModuleNotFoundError: No
9136 ;; module named 'jupyter_core'".
9137 "not test_argv0 and not test_path_priority "
9138 "and not test_not_on_path")))))
9139 (add-after 'unpack 'patch-testsuite
9140 (lambda _
9141 ;; test_not_on_path() and test_path_priority() try to run a test
9142 ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
9143 (substitute* "jupyter_core/tests/test_command.py"
9144 (("env = \\{'PATH': ''\\}")
9145 "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
9146 (("env = \\{'PATH': str\\(b\\)\\}")
9147 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))))
9148 ;; Migration is running whenever etc/jupyter exists, but the
9149 ;; Guix-managed directory will never contain any migratable IPython
9150 ;; config files and cannot be written to anyway, so just pretend we
9151 ;; already did that.
9152 (add-after 'install 'disable-migration
9153 (lambda* (#:key outputs #:allow-other-keys)
9154 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
9155 (invoke "touch"
9156 (string-append
9157 (assoc-ref outputs "out")
9158 "/etc/jupyter/migrated")))))))
9159 (propagated-inputs (list python-traitlets))
9160 (native-inputs (list python-pytest))
9161 ;; This package provides the `jupyter` binary and thus also exports the
9162 ;; search paths.
9163 (native-search-paths
9164 (list (search-path-specification
9165 (variable "JUPYTER_CONFIG_PATH")
9166 (files '("etc/jupyter")))
9167 (search-path-specification
9168 (variable "JUPYTER_PATH")
9169 (files '("share/jupyter")))))
9170 (home-page "https://jupyter.org/")
9171 (synopsis "Jupyter base package")
9172 (description
9173 "Jupyter core is the base package on which Jupyter projects rely.")
9174 (license license:bsd-3)))
9175
9176 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
9177 ;; and jupyter-client by removing the former from its native-inputs and
9178 ;; disabling tests.
9179 (define-public python-jupyter-client-bootstrap
9180 (hidden-package
9181 (package
9182 (name "python-jupyter-client-bootstrap")
9183 (version "7.2.2")
9184 (source
9185 (origin
9186 (method url-fetch)
9187 (uri (pypi-uri "jupyter_client" version))
9188 (sha256
9189 (base32
9190 "12pbp177bfb3710y1a5598mwn8ffhyzmpll67m0nmalb98savnwg"))))
9191 (build-system python-build-system)
9192 (arguments
9193 (list
9194 #:tests? #f
9195 #:phases
9196 #~(modify-phases %standard-phases
9197 (add-after 'unpack 'set-tool-file-names
9198 (lambda* (#:key inputs #:allow-other-keys)
9199 (substitute* "jupyter_client/localinterfaces.py"
9200 (("'ip'")
9201 (format #f "'~a'" (search-input-file inputs "sbin/ip")))))))))
9202 (inputs (list iproute))
9203 (propagated-inputs
9204 (list python-dateutil
9205 python-entrypoints
9206 python-jupyter-core
9207 python-nest-asyncio
9208 python-pyzmq
9209 python-tornado-6
9210 python-traitlets))
9211 (home-page "https://jupyter.org/")
9212 (synopsis "Jupyter protocol implementation and client libraries")
9213 (description
9214 "The @code{jupyter_client} package contains the reference implementation
9215 of the Jupyter protocol. It also provides client and kernel management APIs
9216 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
9217 installing @code{kernelspec}s for use with Jupyter frontends.")
9218 (license license:bsd-3))))
9219
9220 (define-public python-jupyter-client
9221 (let ((base python-jupyter-client-bootstrap))
9222 (package
9223 (inherit base)
9224 (name "python-jupyter-client")
9225 (arguments
9226 (substitute-keyword-arguments (package-arguments base)
9227 ((#:tests? _ #f)
9228 #t)
9229 ((#:phases phases #~%standard-phases)
9230 #~(modify-phases #$phases
9231 (replace 'check
9232 (lambda* (#:key tests? #:allow-other-keys)
9233 (when tests?
9234 ;; Some tests try to write to $HOME.
9235 (setenv "HOME" "/tmp")
9236 (invoke "pytest" "-vv"))))))))
9237 (native-inputs
9238 (list python-pytest
9239 python-pytest-asyncio
9240 python-pytest-timeout
9241 python-async-generator
9242 python-ipython
9243 python-ipykernel-bootstrap))
9244 (properties (alist-delete 'hidden? (package-properties base))))))
9245
9246 (define-public python-ipykernel
9247 (package
9248 (name "python-ipykernel")
9249 (version "6.13.0")
9250 (source
9251 (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "ipykernel" version))
9254 (sha256
9255 (base32 "0q5yni8h08nadsn53f957p0pjsjhwl2b2lp1hqz3jn0854z2fa0f"))))
9256 (build-system python-build-system)
9257 (arguments
9258 (list
9259 #:imported-modules `(,@%python-build-system-modules
9260 (guix build syscalls))
9261 #:modules '((guix build python-build-system)
9262 (guix build syscalls)
9263 (guix build utils)
9264 (ice-9 match))
9265 #:phases
9266 #~(modify-phases %standard-phases
9267 (replace 'check
9268 (lambda* (#:key tests? #:allow-other-keys)
9269 (when tests?
9270 (match (primitive-fork)
9271 (0 ;child process
9272 (set-child-subreaper!)
9273 ;; XXX: Tini provides proper PID1-like signal handling that
9274 ;; reaps zombie processes, necessary for the
9275 ;; 'test_shutdown_subprocesses' test to pass.
9276
9277 ;; TODO: Complete https://issues.guix.gnu.org/30948.
9278 (setenv "HOME" "/tmp")
9279 (execlp "tini" "--" "pytest" "-vv"))
9280 (pid
9281 (match (waitpid pid)
9282 ((_ . status)
9283 (unless (zero? status)
9284 (error "`pytest' exited with status"
9285 status)))))))))
9286 (add-after 'install 'set-python-file-name
9287 (lambda* (#:key inputs #:allow-other-keys)
9288 ;; Record the absolute file name of the 'python' executable in
9289 ;; 'kernel.json'.
9290 (substitute* (string-append #$output "/share/jupyter"
9291 "/kernels/python3/kernel.json")
9292 (("\"python\"")
9293 (format #f "~s" (search-input-file inputs
9294 "/bin/python3")))))))))
9295 (propagated-inputs
9296 (list python-debugpy
9297 python-ipython
9298 python-jupyter-client ;imported at runtime during connect
9299 python-matplotlib-inline
9300 ;;python-nest-asyncio
9301 ;;python-packaging
9302 python-psutil
9303 python-tornado-6
9304 python-traitlets))
9305 (inputs (list python)) ;for cross compilation
9306 (native-inputs
9307 (list python-flaky
9308 python-ipyparallel-bootstrap
9309 ;; XXX: Our Pytest package captures its native inputs in its
9310 ;; wrapper script (such as python-nose), which is used in the code
9311 ;; and causes deprecation warnings. Using the bootstrap variant
9312 ;; avoids that.
9313 python-pytest-bootstrap
9314 python-pytest-timeout
9315 tini))
9316 (home-page "https://ipython.org")
9317 (synopsis "IPython Kernel for Jupyter")
9318 (description "This package provides the IPython kernel for Jupyter.")
9319 (license license:bsd-3)))
9320
9321 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
9322 ;; break the cycle between ipykernel and jupyter-client.
9323 (define-public python-ipykernel-bootstrap
9324 (let ((parent python-ipykernel))
9325 (hidden-package
9326 (package
9327 (inherit parent)
9328 (name "python-ipykernel-bootstrap")
9329 (arguments (list #:tests? #f
9330 ;; The package should normally propagate ipykernel,
9331 ;; left out here to break the cycle.
9332 #:phases #~(modify-phases %standard-phases
9333 (delete 'sanity-check))))
9334 (native-inputs '())
9335 (propagated-inputs
9336 (modify-inputs (package-propagated-inputs parent)
9337 (replace "python-jupyter-client" python-jupyter-client-bootstrap)
9338 (append python-ipyparallel-bootstrap)))))))
9339
9340 (define-public python-pari-jupyter
9341 (package
9342 (name "python-pari-jupyter")
9343 (version "1.4.1")
9344 (source
9345 (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "pari-jupyter" version))
9348 (sha256
9349 (base32
9350 "1ikqvv335qfrhmlji0iclci6pnm2c3fvnxf031jr1d68j79g6ypd"))))
9351 (build-system python-build-system)
9352 (arguments '(#:tests? #f)) ;no test suite
9353 (inputs
9354 (list pari-gp readline python-ipykernel))
9355 (home-page "https://github.com/sagemath/pari-jupyter")
9356 (synopsis "Jupyter kernel for PARI/GP")
9357 (description "The package provides a PARI/GP kernel for Jupyter.")
9358 (license license:gpl3+)))
9359
9360 (define-public python-backcall
9361 (package
9362 (name "python-backcall")
9363 (version "0.2.0")
9364 (source
9365 (origin
9366 (method url-fetch)
9367 (uri (pypi-uri "backcall" version))
9368 (sha256
9369 (base32
9370 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
9371 (build-system python-build-system)
9372 (home-page "https://github.com/takluyver/backcall/")
9373 (synopsis "Specifications for callback functions passed in to an API")
9374 (description
9375 "If your code lets other people supply callback functions, it's important
9376 to specify the function signature you expect, and check that functions support
9377 that. Adding extra parameters later would break other peoples code unless
9378 you're careful. The @code{backcall} package provides a way of specifying the
9379 callback signature using a prototype function.")
9380 (license license:bsd-3)))
9381
9382 (define-public python-pure-eval
9383 (package
9384 (name "python-pure-eval")
9385 (version "0.2.2")
9386 (source
9387 (origin
9388 (method url-fetch)
9389 (uri (pypi-uri "pure_eval" version))
9390 (sha256
9391 (base32 "1hwsm85cwqwh6d6x4vzcimla2865s6v19ms3ym81ganzyq534i9b"))))
9392 (build-system python-build-system)
9393 (native-inputs (list python-pytest python-setuptools-scm))
9394 (home-page "https://github.com/alexmojaki/pure_eval")
9395 (synopsis "Python library to evaluate abstract syntax tree nodes")
9396 (description "The @code{pure_eval} Python library can safely evaluate
9397 abstract syntax tree (AST) nodes without side effects.")
9398 (license license:expat)))
9399
9400 (define-public python-asttokens
9401 (package
9402 (name "python-asttokens")
9403 (version "2.0.5")
9404 (source
9405 (origin
9406 (method url-fetch)
9407 (uri (pypi-uri "asttokens" version))
9408 (sha256
9409 (base32 "1mglbkikxvnhrk3inbx0v1qzxwd38qjr6l35sn098yicy0ac2m4s"))))
9410 (build-system python-build-system)
9411 (propagated-inputs (list python-six))
9412 (native-inputs (list python-astroid python-pytest python-setuptools-scm))
9413 (home-page "https://github.com/gristlabs/asttokens")
9414 (synopsis "Python library to annotate abstract syntax trees")
9415 (description "The @code{asttokens} module annotates Python abstract syntax
9416 trees (ASTs) with the positions of tokens and text in the source code that
9417 generated them. It makes it possible for tools that work with logical AST
9418 nodes to find the particular text that resulted in those nodes, for example
9419 for automated refactoring or highlighting.")
9420 (license license:asl2.0)))
9421
9422 (define-public python-littleutils
9423 (package
9424 (name "python-littleutils")
9425 (version "0.2.2")
9426 (source
9427 (origin
9428 (method url-fetch)
9429 (uri (pypi-uri "littleutils" version))
9430 (sha256
9431 (base32 "0vwijrylppmk0nbddqvn527r9cg3zw8d6zk6r58hslry42jf7jp6"))))
9432 (build-system python-build-system)
9433 (home-page "https://github.com/alexmojaki/littleutils")
9434 (synopsis "Python utility function collection")
9435 (description "@code{littleutils} is a small collection of Python utility
9436 functions, useful in the context of writing unit tests among other uses.")
9437 (license license:expat)))
9438
9439 (define-public python-stack-data
9440 (package
9441 (name "python-stack-data")
9442 (version "0.2.0")
9443 (source
9444 (origin
9445 (method url-fetch)
9446 (uri (pypi-uri "stack_data" version))
9447 (sha256
9448 (base32 "04lfcj5qrn4qikjw89qbdzqwm0xm4bgm4m8rll1rafk3pm0jssa5"))))
9449 (build-system python-build-system)
9450 (propagated-inputs (list python-asttokens python-executing python-pure-eval))
9451 (native-inputs
9452 (list python-cython
9453 python-littleutils
9454 python-pygments
9455 python-pytest
9456 python-setuptools-scm
9457 python-typeguard))
9458 (home-page "https://github.com/alexmojaki/stack_data")
9459 (synopsis "Python stack frame and traceback manipulation library")
9460 (description "The @code{stack_data} Python library extracts data from
9461 stack frames and tracebacks. Is can be used to display more useful tracebacks
9462 than the default.")
9463 (license license:expat)))
9464
9465 (define-public python-ipython
9466 (package
9467 (name "python-ipython")
9468 (version "8.2.0")
9469 (source
9470 (origin
9471 (method url-fetch)
9472 (uri (pypi-uri "ipython" version ".tar.gz"))
9473 (sha256
9474 (base32 "1hcxa713wh3axa57412iy02rj0494ljvv6gpnls4lndc5h9yprbh"))))
9475 (build-system python-build-system)
9476 (arguments
9477 `(#:phases
9478 (modify-phases %standard-phases
9479 (add-after 'unpack 'make-docs-reproducible
9480 (lambda _
9481 (substitute* "IPython/sphinxext/ipython_directive.py"
9482 ((".*import datetime") "")
9483 ((".*datetime.datetime.now\\(\\)") "")
9484 (("%timeit") "# %timeit"))))
9485 (replace 'check
9486 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9487 (when tests?
9488 (setenv "HOME" "/tmp/") ;required by some tests
9489 (invoke "python" "-m" "pytest" "-vv")))))))
9490 (inputs (list readline which))
9491 (propagated-inputs
9492 (list python-backcall
9493 python-decorator
9494 python-jedi
9495 python-jinja2
9496 python-jsonschema
9497 python-matplotlib
9498 python-matplotlib-inline
9499 python-mistune
9500 python-nbformat
9501 python-numpy
9502 python-numpydoc
9503 python-pexpect
9504 python-pickleshare
9505 python-prompt-toolkit
9506 python-pygments
9507 python-pyzmq
9508 python-simplegeneric
9509 python-stack-data
9510 python-terminado
9511 python-traitlets))
9512 (native-inputs
9513 (list graphviz
9514 pkg-config
9515 ;; For tests.
9516 python-pytest
9517 python-requests
9518 python-testpath))
9519 (home-page "https://ipython.org")
9520 (synopsis "IPython is a tool for interactive computing in Python")
9521 (description
9522 "IPython provides a rich architecture for interactive computing with:
9523 Powerful interactive shells, a browser-based notebook, support for interactive
9524 data visualization, embeddable interpreters and tools for parallel
9525 computing.")
9526 (properties '((cpe-name . "ipython")))
9527 (license license:bsd-3)))
9528
9529 (define-public python-ipython-documentation
9530 (package
9531 (inherit python-ipython)
9532 (name "python-ipython-documentation")
9533 (version (package-version python-ipython))
9534 (source
9535 (origin
9536 (inherit (package-source python-ipython))
9537 (patches (append (search-patches
9538 "python-ipython-documentation-chars.patch"
9539 "python-ipython-documentation-repro.patch")
9540 (origin-patches (package-source python-ipython))))))
9541 (arguments
9542 (list
9543 #:phases
9544 #~(modify-phases %standard-phases
9545 (add-after 'unpack 'set-pythonpath
9546 (lambda _
9547 ;; Ensure this fixed (via the
9548 ;; "python-ipython-documentation-chars.patch" patch) copy of
9549 ;; IPython gets used.
9550 (setenv "PYTHONPATH" (string-append (getcwd)))))
9551 (add-before 'build 'configure-sphinx-for-xelatex
9552 (lambda _
9553 ;; Use XeLaTeX instead of PDFLaTeX, as it can
9554 ;; cope with the Unicode characters present in the
9555 ;; contributors page, for example.
9556 (substitute* "docs/source/conf.py"
9557 (("project = 'IPython'.*" all)
9558 (string-append all "latex_engine = 'xelatex'\n")))
9559 ;; XXX: The Sphinx-generated ipython.tex specifies the GNU
9560 ;; FreeFont font to be searched via its extension, which uses
9561 ;; kpathsea instead of fontconfig and fail (see:
9562 ;; https://github.com/sphinx-doc/sphinx/issues/10347). Create a
9563 ;; symlink to GNU FreeFont and add it to the TEXMF tree via
9564 ;; GUIX_TEXMF.
9565 (mkdir-p "texmf-dist/fonts/opentype/public")
9566 (symlink (string-append
9567 #$(this-package-native-input "font-gnu-freefont")
9568 "/share/fonts/opentype")
9569 (string-append
9570 (getcwd) "/"
9571 "texmf-dist/fonts/opentype/public/gnu-freefont"))
9572 (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":"
9573 (getcwd) "/texmf-dist"))))
9574 (delete 'build)
9575 (delete 'check)
9576 (replace 'install
9577 (lambda* (#:key outputs #:allow-other-keys)
9578 (let* ((data (string-append #$output "/share"))
9579 (doc (string-append data "/doc/" #$name "-" #$version))
9580 (html (string-append doc "/html"))
9581 (info (string-append data "/info")))
9582 (invoke "make" "-C" "docs" "info" "html" "pdf"
9583 (string-append "SPHINXOPTS=-j"
9584 (number->string (parallel-job-count))))
9585 (install-file "COPYING.rst" doc)
9586 (copy-recursively "examples" (string-append doc "/examples"))
9587 ;; Install HTML documentation.
9588 (copy-recursively "docs/build/html" html)
9589 ;; Likewise for the PDF.
9590 (install-file "docs/build/latex/ipython.pdf" doc)
9591 ;; Likewise for the info manual.
9592 (install-file "docs/build/texinfo/ipython.info" info)
9593 (symlink (string-append html "/_images")
9594 (string-append info "/ipython-figures"))))))))
9595 (native-inputs
9596 (list fontconfig ;for XDG_DATA_DIRS to locate fonts
9597 font-gnu-freefont
9598 graphviz
9599 python-docrepr
9600 python-sphinx
9601 python-sphinx-rtd-theme
9602 texinfo
9603 texlive-bin
9604 texlive-polyglossia
9605 texlive-xindy))))
9606
9607 (define-public python-urwid
9608 (package
9609 (name "python-urwid")
9610 (version "2.1.2")
9611 (source
9612 (origin
9613 (method url-fetch)
9614 (uri (pypi-uri "urwid" version))
9615 (sha256
9616 (base32
9617 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
9618 (build-system python-build-system)
9619 (arguments
9620 (list
9621 #:phases
9622 #~(modify-phases %standard-phases
9623 (add-after 'unpack 'remove-vterm-tests
9624 ;; According to Debian these tests are cursed.
9625 ;; https://salsa.debian.org/python-team/packages/urwid/-/blob/debian/2.1.2-2/debian/changelog#L141
9626 (lambda _
9627 (delete-file "urwid/tests/test_vterm.py"))))))
9628 (home-page "http://urwid.org")
9629 (synopsis "Console user interface library for Python")
9630 (description
9631 "Urwid is a curses-based UI/widget library for Python. It includes many
9632 features useful for text console applications.")
9633 (properties `((python2-variant . ,(delay python2-urwid))))
9634 (license license:lgpl2.1+)))
9635
9636 (define-public python2-urwid
9637 (let ((base (package-with-python2
9638 (strip-python2-variant python-urwid))))
9639 (package
9640 (inherit base)
9641 (version "2.1.0")
9642 (source
9643 (origin
9644 (method url-fetch)
9645 (uri (pypi-uri "urwid" version))
9646 (sha256
9647 (base32
9648 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
9649
9650 (define-public python-urwid-readline
9651 (package
9652 (name "python-urwid-readline")
9653 (version "0.12")
9654 (source
9655 (origin
9656 (method git-fetch)
9657 (uri (git-reference
9658 (url "https://github.com/rr-/urwid_readline")
9659 (commit version)))
9660 (file-name (git-file-name name version))
9661 (sha256
9662 (base32
9663 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
9664 (build-system python-build-system)
9665 (arguments
9666 `(#:phases
9667 (modify-phases %standard-phases
9668 (replace 'check
9669 (lambda* (#:key tests? #:allow-other-keys)
9670 (when tests?
9671 (invoke "python" "-m" "pytest"))
9672 #t)))))
9673 (propagated-inputs
9674 (list python-urwid))
9675 (native-inputs
9676 (list python-pytest))
9677 (home-page "https://github.com/rr-/urwid_readline")
9678 (synopsis "Text input widget for urwid that supports readline shortcuts")
9679 (description
9680 "This package provides a textbox edit widget for @code{python-urwid} that
9681 supports @code{readline} shortcuts.")
9682 (license license:expat)))
9683
9684 (define-public python-textdistance
9685 (package
9686 (name "python-textdistance")
9687 (version "4.2.1")
9688 (source
9689 (origin
9690 ;; There are no tests in the PyPI tarball.
9691 (method git-fetch)
9692 (uri (git-reference
9693 (url "https://github.com/life4/textdistance")
9694 (commit (string-append "v." version))))
9695 (file-name (git-file-name name version))
9696 (sha256
9697 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
9698 (build-system python-build-system)
9699 (arguments
9700 `(#:test-target "pytest"
9701 #:phases
9702 (modify-phases %standard-phases
9703 (add-after 'unpack 'delete-external-test
9704 (lambda _
9705 ;; All tests in this file require external libraries.
9706 (delete-file "tests/test_external.py")
9707 #t)))))
9708 (native-inputs
9709 (list python-hypothesis
9710 python-isort
9711 python-numpy
9712 python-pytest
9713 python-pytest-runner
9714 python-tabulate))
9715 (home-page "https://github.com/life4/textdistance")
9716 (synopsis "Compute distance between the two texts")
9717 (description "@code{textdistance} is a pure Python library for comparing
9718 distance between two or more sequences by many algorithms.")
9719 (license license:expat)))
9720
9721 (define-public python-urwidtrees
9722 (package
9723 (name "python-urwidtrees")
9724 (version "1.0.3")
9725 (source
9726 (origin
9727 (method git-fetch)
9728 ;; package author intends on distributing via github rather than pypi:
9729 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
9730 (uri (git-reference
9731 (url "https://github.com/pazz/urwidtrees")
9732 (commit version)))
9733 (file-name (git-file-name name version))
9734 (sha256
9735 (base32
9736 "1y1vysx7jg0vbrarlsykhf7nmr8fc6k1fva1q3i98xq2m30s6r68"))))
9737 (build-system python-build-system)
9738 (arguments
9739 '(#:tests? #f)) ; no tests
9740 (propagated-inputs (list python-urwid))
9741 (native-inputs (list python-mock))
9742 (home-page "https://github.com/pazz/urwidtrees")
9743 (synopsis "Tree widgets for urwid")
9744 (description "Urwidtrees is a Widget Container API for the @code{urwid}
9745 toolkit. Use it to build trees of widgets.")
9746 (license license:gpl3+)))
9747
9748 (define-public python2-urwidtrees
9749 (package-with-python2 python-urwidtrees))
9750
9751 (define-public python-ua-parser
9752 (package
9753 (name "python-ua-parser")
9754 (version "0.10.0")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "ua-parser" version))
9759 (sha256
9760 (base32
9761 "0csh307zfz666kkk5idrw3crj1x8q8vsqgwqil0r1n1hs4p7ica7"))))
9762 (build-system python-build-system)
9763 (arguments
9764 `(#:tests? #f)) ;no test suite in release
9765 (native-inputs
9766 (list python-pyyaml))
9767 (home-page "https://github.com/ua-parser/uap-python")
9768 (synopsis "User agent parser")
9769 (description
9770 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
9771 (license license:asl2.0)))
9772
9773 (define-public python2-ua-parser
9774 (package-with-python2 python-ua-parser))
9775
9776 (define-public python-user-agents
9777 (package
9778 (name "python-user-agents")
9779 (version "2.2.0")
9780 (source
9781 (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "user-agents" version))
9784 (sha256
9785 (base32
9786 "09mddriffm9rkwr30081fy9n3cn976ms8pwc8p8hhlxnilbjavfk"))))
9787 (build-system python-build-system)
9788 (arguments
9789 `(#:tests? #f)) ;missing devices.json test file in release
9790 (propagated-inputs
9791 (list python-ua-parser))
9792 (home-page "https://github.com/selwin/python-user-agents")
9793 (synopsis "User Agent strings parsing library")
9794 (description
9795 "A library to identify devices (phones, tablets) and their capabilities by
9796 parsing (browser/HTTP) user agent strings.")
9797 (license license:expat)))
9798
9799 (define-public python2-user-agents
9800 (package-with-python2 python-user-agents))
9801
9802 (define-public python-pydbus
9803 (package
9804 (name "python-pydbus")
9805 (version "0.6.0")
9806 (source
9807 (origin
9808 (method url-fetch)
9809 (uri (pypi-uri "pydbus" version))
9810 (sha256
9811 (base32 "0b0gipvz7vcfa9ddmwq2jrx16d4apb0hdnl5q4i3h8jlzwp1c1s2"))))
9812 (build-system python-build-system)
9813 (propagated-inputs (list python-pygobject))
9814 (home-page "https://github.com/LEW21/pydbus")
9815 (synopsis "Pythonic D-Bus library")
9816 (description "Pydbus provides a pythonic interface to the D-Bus
9817 message bus system. Pydbus can be used to access remote objects and
9818 also for object publication. It is based on PyGI, the Python GObject
9819 Introspection bindings, which is the recommended way to use GLib from Python.")
9820 (license license:lgpl2.1+)))
9821
9822 (define-public python-dbus
9823 (package
9824 (name "python-dbus")
9825 (version "1.2.18")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
9830 "dbus-python-" version ".tar.gz"))
9831 (sha256
9832 (base32 "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"))))
9833 (build-system gnu-build-system)
9834 (native-inputs
9835 (list pkg-config))
9836 (inputs
9837 `(("python" ,python-wrapper)
9838 ("dbus-glib" ,dbus-glib)))
9839 (synopsis "Python bindings for D-bus")
9840 (description "python-dbus provides bindings for libdbus, the reference
9841 implementation of D-Bus.")
9842 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
9843 (properties `((python2-variant . ,(delay python2-dbus))))
9844 (license license:expat)))
9845
9846 (define-public python2-dbus
9847 (package/inherit python-dbus
9848 (name "python2-dbus")
9849 (inputs `(("python" ,python-2)
9850 ,@(alist-delete "python"
9851 (package-inputs python-dbus))))
9852 (arguments
9853 `(#:configure-flags '("PYTHON_VERSION=2")))))
9854
9855 (define-public python-dbus-next
9856 (package
9857 (name "python-dbus-next")
9858 (version "0.2.3")
9859 (source
9860 (origin
9861 (method git-fetch)
9862 (uri (git-reference
9863 (url "https://github.com/altdesktop/python-dbus-next")
9864 (commit (string-append "v" version))))
9865 (file-name (git-file-name name version))
9866 (sha256
9867 (base32
9868 "1ahaz52kny1p9xxv6phvk4iq56rg8li390wywlxf2yslaij1188h"))))
9869 (build-system python-build-system)
9870 (native-inputs
9871 (list python-pytest))
9872 (home-page "https://github.com/altdesktop/python-dbus-next")
9873 (synopsis "Zero-dependency DBus library for Python with asyncio support")
9874 (description
9875 "This DBus library for Python aims to be a fully-featured high-level
9876 library primarily geared towards integration of applications into desktop and
9877 mobile environments.")
9878 (license license:expat)))
9879
9880 (define-public python-notify2
9881 (package
9882 (name "python-notify2")
9883 (version "0.3.1")
9884 (source
9885 (origin
9886 (method url-fetch)
9887 (uri (pypi-uri "notify2" version))
9888 (sha256
9889 (base32
9890 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
9891 (build-system python-build-system)
9892 (arguments `(#:tests? #f)) ; tests depend on system state
9893 (propagated-inputs
9894 (list python-dbus))
9895 (home-page "https://bitbucket.org/takluyver/pynotify2")
9896 (synopsis "Python interface to D-Bus notifications")
9897 (description
9898 "Pynotify2 provides a Python interface for sending D-Bus notifications.
9899 It is a reimplementation of pynotify in pure Python, and an alternative to
9900 the GObject Introspection bindings to libnotify for non-GTK applications.")
9901 (license (list license:bsd-2
9902 license:lgpl2.1+))))
9903
9904 (define-public python2-notify2
9905 (package-with-python2 python-notify2))
9906
9907 ;; beautifulsoup4 has a totally different namespace than 3.x,
9908 ;; and pypi seems to put it under its own name, so I guess we should too
9909 (define-public python-beautifulsoup4
9910 (package
9911 (name "python-beautifulsoup4")
9912 (version "4.10.0")
9913 (source
9914 (origin
9915 (method url-fetch)
9916 (uri (pypi-uri "beautifulsoup4" version))
9917 (sha256
9918 (base32
9919 "14c8z4gh9bi38agx9ls8ym5rscc02pc6f6hmliaqk08xa8yd4fn2"))))
9920 (build-system python-build-system)
9921 (propagated-inputs
9922 (list python-soupsieve python-html5lib python-lxml))
9923 (home-page
9924 "https://www.crummy.com/software/BeautifulSoup/bs4/")
9925 (synopsis
9926 "Python screen-scraping library")
9927 (description
9928 "Beautiful Soup is a Python library designed for rapidly setting up
9929 screen-scraping projects. It offers Pythonic idioms for navigating,
9930 searching, and modifying a parse tree, providing a toolkit for
9931 dissecting a document and extracting what you need. It automatically
9932 converts incoming documents to Unicode and outgoing documents to UTF-8.")
9933 (license license:expat)
9934 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
9935
9936 (define-public python2-beautifulsoup4
9937 (let ((base (package-with-python2
9938 (strip-python2-variant python-beautifulsoup4))))
9939 (package/inherit base
9940 (version "4.9.3") ;last version to support Python 2
9941 (source
9942 (origin
9943 (method url-fetch)
9944 (uri (pypi-uri "beautifulsoup4" version))
9945 (sha256
9946 (base32
9947 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
9948 (arguments `(#:python ,python-2)))))
9949
9950 (define-public python-soupsieve
9951 (package
9952 (name "python-soupsieve")
9953 (version "2.2.1")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "soupsieve" version))
9958 (sha256
9959 (base32
9960 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
9961 (build-system python-build-system)
9962 (arguments
9963 ;;XXX: 2 tests fail currently despite claming they were to be
9964 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
9965 ;;don't want to create a circular dependency.
9966 (list #:tests? #f
9967 #:phases
9968 #~(modify-phases %standard-phases
9969 ;; Circular dependency with python-beautifulsoup4.
9970 (delete 'sanity-check))))
9971 (home-page "https://github.com/facelessuser/soupsieve")
9972 (synopsis "CSS selector library")
9973 (description
9974 "Soup Sieve is a CSS selector library designed to be used with Beautiful
9975 Soup 4. It aims to provide selecting, matching, and filtering using modern
9976 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
9977 specifications up through the latest CSS level 4 drafts and beyond (though
9978 some are not yet implemented).")
9979 (properties `((python2-variant . ,(delay python2-soupsieve))))
9980 (license license:expat)))
9981
9982 ;; This is the last version that supports python-2
9983 (define-public python2-soupsieve
9984 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
9985 (package
9986 (inherit base)
9987 (version "1.9.6")
9988 (source
9989 (origin
9990 (method url-fetch)
9991 (uri (pypi-uri "soupsieve" version))
9992 (sha256
9993 (base32
9994 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
9995 (propagated-inputs
9996 (modify-inputs (package-propagated-inputs base)
9997 (prepend python2-backports-functools-lru-cache))))))
9998
9999 (define-public python-netifaces
10000 (package
10001 (name "python-netifaces")
10002 (version "0.11.0")
10003 (source
10004 (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "netifaces" version))
10007 (sha256
10008 (base32
10009 "0cnajf5rl4w1sa72j921scbigr6zndig56cq8ggpx45jdqa7jfh4"))))
10010 (build-system python-build-system)
10011 (home-page "https://github.com/al45tair/netifaces")
10012 (synopsis
10013 "Python module for portable network interface information")
10014 (description
10015 "Netifaces is a Python module providing information on network
10016 interfaces in an easy and portable manner.")
10017 (license license:expat)))
10018
10019 (define-public python2-netifaces
10020 (package-with-python2 python-netifaces))
10021
10022 (define-public python-networkx
10023 (package
10024 (name "python-networkx")
10025 (version "2.6.2")
10026 (source
10027 (origin
10028 (method url-fetch)
10029 (uri (pypi-uri "networkx" version))
10030 (sha256
10031 (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
10032 (build-system python-build-system)
10033 (arguments
10034 '(#:phases (modify-phases %standard-phases
10035 (replace 'check
10036 (lambda* (#:key tests? #:allow-other-keys)
10037 (if tests?
10038 (invoke "pytest" "-vv" "--pyargs" "networkx")
10039 (format #t "test suite not run~%"))
10040 #t)))))
10041 ;; python-decorator is needed at runtime.
10042 (propagated-inputs
10043 (list python-decorator))
10044 (native-inputs
10045 (list python-pytest))
10046 (home-page "https://networkx.github.io/")
10047 (synopsis "Python module for creating and manipulating graphs and networks")
10048 (description
10049 "NetworkX is a Python package for the creation, manipulation, and study
10050 of the structure, dynamics, and functions of complex networks.")
10051 (properties `((python2-variant . ,(delay python2-networkx))))
10052 (license license:bsd-3)))
10053
10054 ;; NetworkX 2.2 is the last version with support for Python 2.
10055 (define-public python2-networkx
10056 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
10057 (package
10058 (inherit base)
10059 (version "2.2")
10060 (source (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "networkx" version ".zip"))
10063 (sha256
10064 (base32
10065 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
10066 (arguments
10067 `(#:python ,python-2))
10068 (native-inputs
10069 (list python2-nose unzip)))))
10070
10071 (define-public python-datrie
10072 (package
10073 (name "python-datrie")
10074 (version "0.8.2")
10075 (source
10076 (origin
10077 (method url-fetch)
10078 (uri (pypi-uri "datrie" version))
10079 (sha256
10080 (base32
10081 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
10082 (build-system python-build-system)
10083 (native-inputs
10084 (list python-cython python-hypothesis python-pytest
10085 python-pytest-runner))
10086 (home-page "https://github.com/kmike/datrie")
10087 (synopsis "Fast, efficiently stored trie for Python")
10088 (description
10089 "This package provides a fast, efficiently stored trie implementation for
10090 Python.")
10091 (license license:lgpl2.1+)))
10092
10093 (define-public python-amply
10094 (package
10095 (name "python-amply")
10096 (version "0.1.4")
10097 (source
10098 (origin
10099 (method url-fetch)
10100 (uri (pypi-uri "amply" version))
10101 (sha256
10102 (base32
10103 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
10104 (build-system python-build-system)
10105 (propagated-inputs
10106 (list python-docutils python-pyparsing))
10107 (native-inputs
10108 (list python-setuptools-scm))
10109 (home-page "https://github.com/willu47/amply")
10110 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
10111 (description
10112 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
10113 structures.")
10114 (license license:epl1.0)))
10115
10116 (define-public python-pulp
10117 (package
10118 (name "python-pulp")
10119 (version "2.4")
10120 (source
10121 (origin
10122 (method url-fetch)
10123 (uri (pypi-uri "PuLP" version))
10124 (sha256
10125 (base32
10126 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
10127 (build-system python-build-system)
10128 (propagated-inputs
10129 (list python-amply))
10130 (home-page "https://github.com/coin-or/pulp")
10131 (synopsis "Linear Programming modeler")
10132 (description
10133 "PuLP is a Linear Programming modeler written in Python. PuLP can
10134 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
10135 solve linear problems.")
10136 (license license:expat)))
10137
10138 (define-public python-py-tes
10139 (package
10140 (name "python-py-tes")
10141 (version "0.4.2")
10142 (source
10143 (origin
10144 (method url-fetch)
10145 (uri (pypi-uri "py-tes" version))
10146 (sha256
10147 (base32 "0b272y392v0mnq0f3sm5kgcx8fn4qwfbym89hhvqxz3xkganr4pn"))))
10148 (build-system python-build-system)
10149 (propagated-inputs
10150 (list python-attrs python-dateutil python-future python-requests))
10151 (home-page "https://github.com/ohsu-comp-bio/py-tes")
10152 (synopsis "Library for communicating with the GA4GH Task Execution API")
10153 (description "This package provides a library for communicating with the
10154 GA4GH Task Execution API.")
10155 (license license:expat)))
10156
10157 (define-public python-toposort
10158 (package
10159 (name "python-toposort")
10160 (version "1.6")
10161 (source
10162 (origin
10163 (method url-fetch)
10164 (uri (pypi-uri "toposort" version))
10165 (sha256
10166 (base32
10167 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
10168 (build-system python-build-system)
10169 (home-page "https://gitlab.com/ericvsmith/toposort")
10170 (synopsis "Topological sort algorithm")
10171 (description
10172 "This package provides an implementation of a topological sort
10173 algorithm.")
10174 (license license:asl2.0)))
10175
10176 (define-public python-three-merge
10177 (package
10178 (name "python-three-merge")
10179 (version "0.1.1")
10180 (source
10181 (origin
10182 ;; There are no tests in the PyPI tarball.
10183 (method git-fetch)
10184 (uri (git-reference
10185 (url "https://github.com/spyder-ide/three-merge")
10186 (commit (string-append "v" version))))
10187 (file-name (git-file-name name version))
10188 (sha256
10189 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
10190 (build-system python-build-system)
10191 (arguments
10192 `(#:test-target "pytest"))
10193 (propagated-inputs
10194 (list python-diff-match-patch))
10195 (native-inputs
10196 (list python-flaky python-pytest python-pytest-cov
10197 python-pytest-runner python-pytest-timeout))
10198 (home-page "https://github.com/spyder-ide/three-merge")
10199 (synopsis "Library for merging two strings with respect to a base one")
10200 (description
10201 "This package provides a Python library to perform a 3-way merge between
10202 strings, based on @code{diff-match-patch}. This library performs merges at a
10203 character level, as opposed to most VCS systems, which opt for a line-based
10204 approach.")
10205 (license license:expat)))
10206
10207 (define-public snakemake
10208 (package
10209 (name "snakemake")
10210 (version "5.32.2")
10211 (source
10212 (origin
10213 (method url-fetch)
10214 (uri (pypi-uri "snakemake" version))
10215 (sha256
10216 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
10217 (build-system python-build-system)
10218 (arguments
10219 ;; TODO: Package missing test dependencies.
10220 '(#:tests? #f
10221 #:phases
10222 (modify-phases %standard-phases
10223 ;; For cluster execution Snakemake will call Python. Since there is
10224 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
10225 ;; this by calling the snakemake wrapper instead.
10226 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
10227 (lambda* (#:key outputs #:allow-other-keys)
10228 (substitute* "snakemake/executors/__init__.py"
10229 (("\\{sys.executable\\} -m snakemake")
10230 (string-append (assoc-ref outputs "out")
10231 "/bin/snakemake")))
10232 #t)))))
10233 (propagated-inputs
10234 (list python-appdirs
10235 python-configargparse
10236 python-datrie
10237 python-docutils
10238 python-gitpython
10239 python-jinja2
10240 python-jsonschema
10241 python-nbformat
10242 python-networkx
10243 python-psutil
10244 python-pulp
10245 python-pyyaml
10246 python-ratelimiter
10247 python-requests
10248 python-toposort
10249 python-wrapt))
10250 (home-page "https://snakemake.readthedocs.io")
10251 (synopsis "Python-based execution environment for make-like workflows")
10252 (description
10253 "Snakemake aims to reduce the complexity of creating workflows by
10254 providing a clean and modern domain specific specification language (DSL) in
10255 Python style, together with a fast and comfortable execution environment.")
10256 (license license:expat)))
10257
10258 (define-public snakemake-6
10259 (package
10260 (inherit snakemake)
10261 (name "snakemake")
10262 (version "6.15.5")
10263 (source
10264 (origin
10265 (method git-fetch)
10266 (uri (git-reference
10267 (url "https://github.com/snakemake/snakemake")
10268 (commit (string-append "v" version))))
10269 (file-name (git-file-name name version))
10270 (sha256
10271 (base32 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai"))))
10272 (build-system python-build-system)
10273 (arguments
10274 '(#:phases
10275 (modify-phases %standard-phases
10276 ;; For cluster execution Snakemake will call Python. Since there is
10277 ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We
10278 ;; fix this by calling the snakemake wrapper instead.
10279
10280 ;; XXX: There is another instance of sys.executable on line 692, but
10281 ;; it is not clear how to patch it.
10282 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
10283 (lambda* (#:key outputs #:allow-other-keys)
10284 (substitute* "snakemake/executors/__init__.py"
10285 (("\\{sys.executable\\} -m snakemake")
10286 (string-append (assoc-ref outputs "out")
10287 "/bin/snakemake")))))
10288 (replace 'check
10289 (lambda* (#:key tests? #:allow-other-keys)
10290 (when tests?
10291 (setenv "HOME" "/tmp")
10292 ;; This test attempts to change S3 buckets on AWS and fails
10293 ;; because there are no AWS credentials.
10294 (delete-file "tests/test_tibanna.py")
10295 (invoke "pytest")))))))
10296 (inputs
10297 (list python-appdirs
10298 python-configargparse
10299 python-connection-pool
10300 python-datrie
10301 python-docutils
10302 python-filelock
10303 python-gitpython
10304 python-jinja2
10305 python-jsonschema
10306 python-nbformat
10307 python-networkx
10308 python-psutil
10309 python-pulp
10310 python-pyyaml
10311 python-py-tes
10312 python-ratelimiter
10313 python-requests
10314 python-smart-open
10315 python-stopit
10316 python-tabulate
10317 python-toposort
10318 python-wrapt))
10319 (native-inputs
10320 (list git-minimal
10321 python-wrapper
10322 python-pytest
10323 python-pandas
10324 python-requests-mock))))
10325
10326 (define-public snakemake-7
10327 (package
10328 (inherit snakemake-6)
10329 (name "snakemake")
10330 (version "7.7.0")
10331 (source
10332 (origin
10333 (method git-fetch)
10334 (uri (git-reference
10335 (url "https://github.com/snakemake/snakemake")
10336 (commit (string-append "v" version))))
10337 (file-name (git-file-name name version))
10338 (sha256
10339 (base32 "1qrqbmx4cbis0wxr6dl2rdjv9v627sbirsz6v5c31vlbqwkvs04q"))))
10340 (build-system python-build-system)
10341 (arguments
10342 '(#:phases
10343 (modify-phases %standard-phases
10344 ;; For cluster execution Snakemake will call Python. Since there is
10345 ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We
10346 ;; fix this by calling the snakemake wrapper instead.
10347
10348 ;; XXX: There is another instance of sys.executable on line 692, but
10349 ;; it is not clear how to patch it.
10350 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
10351 (lambda* (#:key outputs #:allow-other-keys)
10352 (substitute* "snakemake/executors/__init__.py"
10353 (("\\{sys.executable\\} -m snakemake")
10354 (string-append (assoc-ref outputs "out")
10355 "/bin/snakemake")))))
10356 (replace 'check
10357 (lambda* (#:key tests? #:allow-other-keys)
10358 (when tests?
10359 (setenv "HOME" "/tmp")
10360 ;; This test attempts to change S3 buckets on AWS and fails
10361 ;; because there are no AWS credentials.
10362 (delete-file "tests/test_tibanna.py")
10363 ;; It's a similar story with this test, which requires access
10364 ;; to the Google Storage service.
10365 (delete-file "tests/test_google_lifesciences.py")
10366 (invoke "pytest")))))))
10367 (inputs
10368 (list python-appdirs
10369 python-configargparse
10370 python-connection-pool
10371 python-datrie
10372 python-docutils
10373 python-filelock
10374 python-gitpython
10375 python-jinja2
10376 python-jsonschema
10377 python-nbformat
10378 python-networkx
10379 python-psutil
10380 python-pulp
10381 python-pyyaml
10382 python-py-tes
10383 python-ratelimiter
10384 python-requests
10385 python-retry
10386 python-smart-open
10387 python-stopit
10388 python-tabulate
10389 python-toposort
10390 python-wrapt
10391 python-yte))
10392 (native-inputs
10393 (list git-minimal
10394 python-wrapper
10395 python-pytest
10396 python-pandas
10397 python-requests-mock))))
10398
10399 (define-public python-pyqrcode
10400 (package
10401 (name "python-pyqrcode")
10402 (version "1.2.1")
10403 (source
10404 (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "PyQRCode" version))
10407 (sha256
10408 (base32
10409 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
10410 (build-system python-build-system)
10411 (home-page
10412 "https://github.com/mnooner256/pyqrcode")
10413 (synopsis "QR code generator")
10414 (description
10415 "Pyqrcode is a QR code generator written purely in Python with
10416 SVG, EPS, PNG and terminal output.")
10417 (license license:bsd-3)))
10418
10419 (define-public python-seaborn
10420 (package
10421 (name "python-seaborn")
10422 (version "0.11.2")
10423 (source
10424 (origin
10425 (method url-fetch)
10426 (uri (pypi-uri "seaborn" version))
10427 (sha256
10428 (base32 "1xpl3zb945sihsiwm9q1yyx84sakk1phcg0fprj6i0j0dllfjifg"))
10429 (patches (search-patches "python-seaborn-kde-test.patch"
10430 "python-seaborn-2690.patch"))))
10431 (build-system python-build-system)
10432 (arguments
10433 `(#:phases
10434 (modify-phases %standard-phases
10435 (add-after 'unpack 'patch-more-tests
10436 (lambda _
10437 (substitute* "seaborn/tests/test_distributions.py"
10438 (("get_contour_color\\(ax\\.collections\\[0\\]\\)")
10439 "get_contour_color(ax.collections[0])")
10440 (("c\\.get_color\\(\\)") "get_contour_color(c)")
10441
10442 ;; These three are borked and have been fixed upstream, but
10443 ;; there's no simple patch we could apply here, so we just
10444 ;; disable them.
10445 (("def test_hue_ignores_cmap")
10446 "def skip_test_hue_ignores_cmap")
10447 (("def test_fill_artists")
10448 "def skip_test_fill_artists")
10449 (("def test_with_rug")
10450 "def skip_test_with_rug"))))
10451 (add-before 'check 'start-xserver
10452 (lambda _
10453 ;; There must be a running X server and make check doesn't
10454 ;; start one. Therefore we must do it.
10455 (system "Xvfb :1 &")
10456 (setenv "DISPLAY" ":1")))
10457 (replace 'check
10458 (lambda* (#:key tests? #:allow-other-keys)
10459 (when tests?
10460 (invoke "pytest" "seaborn")))))))
10461 (propagated-inputs
10462 (list python-pandas python-matplotlib python-numpy python-scipy))
10463 (native-inputs
10464 (list python-pytest xorg-server-for-tests))
10465 (home-page "https://seaborn.pydata.org/")
10466 (synopsis "Statistical data visualization")
10467 (description
10468 "Seaborn is a library for making attractive and informative statistical
10469 graphics in Python. It is built on top of matplotlib and tightly integrated
10470 with the PyData stack, including support for numpy and pandas data structures
10471 and statistical routines from scipy and statsmodels.")
10472 (properties `((python2-variant . ,(delay python2-seaborn))))
10473 (license license:bsd-3)))
10474
10475 ;; 0.9.1 is the last release with support for Python 2.
10476 (define-public python2-seaborn
10477 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
10478 (package
10479 (inherit base)
10480 (version "0.9.1")
10481 (source (origin
10482 (method url-fetch)
10483 (uri (pypi-uri "seaborn" version))
10484 (sha256
10485 (base32
10486 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
10487
10488 (define-public python-mpmath
10489 (package
10490 (name "python-mpmath")
10491 (version "1.2.1")
10492 (source (origin
10493 (method git-fetch)
10494 (uri (git-reference
10495 (url "https://github.com/fredrik-johansson/mpmath")
10496 (commit "c6a35f9ee7c294bcf4e0517bc76b268843db9499")))
10497 (file-name (git-file-name name version))
10498 (sha256
10499 (base32
10500 "0ifw59fjjls3mas104rh0frilvab2fhk1dkjraxlqni5n9l676im"))))
10501 (build-system python-build-system)
10502 (arguments
10503 `(#:phases
10504 (modify-phases %standard-phases
10505 (add-before 'build 'set-version
10506 (lambda _
10507 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
10508 ;; ZIP does not support timestamps before 1980.
10509 (setenv "SOURCE_DATE_EPOCH" "315532800")))
10510 (replace 'check
10511 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10512 (when tests?
10513 (add-installed-pythonpath inputs outputs)
10514 (invoke "pytest" "-vv")))))))
10515 (native-inputs
10516 (list python-pytest python-setuptools-scm))
10517 (home-page "https://mpmath.org")
10518 (synopsis "Arbitrary-precision floating-point arithmetic in python")
10519 (description
10520 "@code{mpmath} can be used as an arbitrary-precision substitute for
10521 Python's float/complex types and math/cmath modules, but also does much
10522 more advanced mathematics.")
10523 (license license:bsd-3)))
10524
10525 (define-public python2-mpmath
10526 (package-with-python2 python-mpmath))
10527
10528 (define-public python-bigfloat
10529 (package
10530 (name "python-bigfloat")
10531 (version "0.3.0")
10532 (source
10533 (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "bigfloat" version))
10536 (sha256
10537 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
10538 (build-system python-build-system)
10539 (inputs
10540 (list mpfr))
10541 (home-page "https://github.com/mdickinson/bigfloat")
10542 (synopsis "Arbitrary precision floating-point arithmetic for Python")
10543 (description
10544 "This package provides a Python interface to the MPFR library for
10545 multiprecision arithmetic.")
10546 (license license:lgpl3+)))
10547
10548 (define-public python-plac
10549 (package
10550 (name "python-plac")
10551 (version "1.3.5")
10552 (source
10553 (origin
10554 (method url-fetch)
10555 (uri (pypi-uri "plac" version))
10556 (sha256
10557 (base32 "1410h6jw1ksi24kb55xzkwqzba2qqjwiga1s354bf3s5s1jdig9q"))))
10558 (build-system python-build-system)
10559 (arguments
10560 '(#:phases
10561 (modify-phases %standard-phases
10562 (add-after 'unpack 'fix-tkinter
10563 (lambda _
10564 (substitute* "plac_tk.py"
10565 (("from Tkinter import Tk")
10566 "from tkinter import Tk")
10567 (("from ScrolledText import ScrolledText")
10568 "from tkinter.scrolledtext import ScrolledText")))))))
10569 (native-inputs
10570 `(("python-tkinter" ,python "tk")))
10571 (home-page "https://github.com/ialbert/plac")
10572 (synopsis "Command line arguments parser")
10573 (description "This package can generate command line parameters from
10574 function signatures.")
10575 (license license:bsd-3)))
10576
10577 (define-public python-yte
10578 (package
10579 (name "python-yte")
10580 (version "1.2.0")
10581 (source
10582 (origin
10583 (method url-fetch)
10584 (uri (pypi-uri "yte" version))
10585 (sha256
10586 (base32 "07hm1warpqi4ifqgkaz5sg887x4a44yhxafmpf835ywnpchg4s03"))))
10587 (build-system python-build-system)
10588 (arguments
10589 '(#:phases
10590 (modify-phases %standard-phases
10591 (add-after 'unpack 'set-HOME
10592 (lambda _ (setenv "HOME" "/tmp"))))))
10593 (propagated-inputs (list python-plac python-pyyaml))
10594 (home-page "https://github.com/koesterlab/yte")
10595 (synopsis "YAML template engine with Python expressions")
10596 (description
10597 "This package provides a YAML template engine with Python expressions.")
10598 (license license:expat)))
10599
10600 (define-public python-sympy
10601 (package
10602 (name "python-sympy")
10603 (version "1.7.1")
10604 (source
10605 (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "sympy" version))
10608 (sha256
10609 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
10610 (build-system python-build-system)
10611 (arguments
10612 `(#:phases
10613 (modify-phases %standard-phases
10614 (replace 'check
10615 (lambda* (#:key outputs #:allow-other-keys)
10616 (invoke
10617 (or (which "python3") (which "python"))
10618 "-c" "import sympy; sympy.test(\"/core\")"))))))
10619 (propagated-inputs
10620 (list python-mpmath))
10621 (home-page "https://www.sympy.org/")
10622 (synopsis "Python library for symbolic mathematics")
10623 (description
10624 "SymPy is a Python library for symbolic mathematics. It aims to become a
10625 full-featured computer algebra system (CAS) while keeping the code as simple
10626 as possible in order to be comprehensible and easily extensible.")
10627 (license license:bsd-3)))
10628
10629 (define-public python2-sympy
10630 (package
10631 (inherit (package-with-python2 python-sympy))
10632 (version "1.5.1") ; last release for python2
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "sympy" version))
10637 (sha256
10638 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
10639
10640 (define-public python-q
10641 (package
10642 (name "python-q")
10643 (version "2.6")
10644 (source
10645 (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "q" version))
10648 (sha256
10649 (base32
10650 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
10651 (build-system python-build-system)
10652 (home-page "https://github.com/zestyping/q")
10653 (synopsis "Quick-and-dirty debugging output for tired programmers")
10654 (description
10655 "q is a Python module for \"print\" style of debugging Python code. It
10656 provides convenient short API for print out of values, tracebacks, and
10657 falling into the Python interpreter.")
10658 (license license:asl2.0)))
10659
10660 (define-public python2-q
10661 (package-with-python2 python-q))
10662
10663 (define-public python-xlib
10664 (package
10665 (name "python-xlib")
10666 (version "0.29")
10667 (source
10668 (origin
10669 (method git-fetch)
10670 (uri (git-reference
10671 (url "https://github.com/python-xlib/python-xlib")
10672 (commit version)))
10673 (file-name (git-file-name name version))
10674 (sha256
10675 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
10676 (build-system python-build-system)
10677 (arguments
10678 `(#:phases
10679 (modify-phases %standard-phases
10680 (add-before 'check 'start-xserver
10681 (lambda* (#:key inputs #:allow-other-keys)
10682 (let ((xorg-server (assoc-ref inputs "xorg-server")))
10683 ;; There must be a running X server and make check doesn't
10684 ;; start one. Therefore we must do it.
10685 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
10686 (setenv "DISPLAY" ":1")
10687 #t))))))
10688 (native-inputs
10689 (list python-mock python-setuptools-scm xorg-server))
10690 (propagated-inputs
10691 (list python-six))
10692 (home-page "https://github.com/python-xlib/python-xlib")
10693 (synopsis "Python X11 client library")
10694 (description
10695 "The Python X Library is intended to be a fully functional
10696 X client library for Python programs. It is useful to implement
10697 low-level X clients. It is written entirely in Python.")
10698 (license license:gpl2+)))
10699
10700 (define-public python2-xlib
10701 (package-with-python2 python-xlib))
10702
10703 (define-public python-singledispatch
10704 (package
10705 (name "python-singledispatch")
10706 (version "3.4.0.3")
10707 (source
10708 (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "singledispatch" version))
10711 (sha256
10712 (base32
10713 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
10714 (build-system python-build-system)
10715 (native-inputs
10716 (list python-six)) ; required for conversion, not at run-time
10717 (home-page
10718 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
10719 (synopsis "Backport of singledispatch feature from Python 3.4")
10720 (description
10721 "This library brings functools.singledispatch from Python 3.4 to Python
10722 2.6-3.3.")
10723 (license license:expat)))
10724
10725 (define-public python2-singledispatch
10726 (package-with-python2 python-singledispatch))
10727
10728 ;; the python- version can be removed with python-3.5
10729 (define-public python-backports-abc
10730 (package
10731 (name "python-backports-abc")
10732 (version "0.5")
10733 (source
10734 (origin
10735 (method url-fetch)
10736 (uri (pypi-uri "backports_abc" version))
10737 (sha256
10738 (base32
10739 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
10740 (build-system python-build-system)
10741 (home-page "https://github.com/cython/backports_abc")
10742 (synopsis "Backport of additions to the 'collections.abc' module")
10743 (description
10744 "Python-backports-abc provides a backport of additions to the
10745 @code{collections.abc} module in Python-3.5.")
10746 (license license:psfl)))
10747
10748 (define-public python2-backports-abc
10749 (package-with-python2 python-backports-abc))
10750
10751 (define-public python-backports-csv
10752 (package
10753 (name "python-backports-csv")
10754 (version "1.0.7")
10755 (source
10756 (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "backports.csv" version))
10759 (sha256
10760 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
10761 (build-system python-build-system)
10762 (home-page "https://github.com/ryanhiebert/backports.csv")
10763 (synopsis "Backport of Python 3's csv module for Python 2")
10764 (description
10765 "Provides a backport of Python 3's @code{csv} module for parsing
10766 comma separated values. The API of the @code{csv} module in Python 2
10767 is drastically different from the @code{csv} module in Python 3.
10768 This is due, for the most part, to the difference between str in
10769 Python 2 and Python 3.")
10770 (license license:psfl)))
10771
10772 (define-public python2-backports-csv
10773 (package
10774 (inherit (package-with-python2 python-backports-csv))
10775 (arguments
10776 `(#:phases
10777 (modify-phases %standard-phases
10778 ;; The sanity-check attempts attempts to import the non-existent
10779 ;; module "backports".
10780 (delete 'sanity-check))))))
10781
10782 (define-public python2-backports-shutil-get-terminal-size
10783 (package
10784 (name "python2-backports-shutil-get-terminal-size")
10785 (version "1.0.0")
10786 (source
10787 (origin
10788 (method url-fetch)
10789 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
10790 (sha256
10791 (base32
10792 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
10793 (build-system python-build-system)
10794 (arguments
10795 `(#:python ,python-2
10796 #:phases
10797 (modify-phases %standard-phases
10798 (replace 'check
10799 (lambda _
10800 (invoke "py.test" "-v"))))))
10801 (native-inputs
10802 (list python2-pytest))
10803 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
10804 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
10805 (description
10806 "This package provides a backport of the @code{get_terminal_size
10807 function} from Python 3.3's @code{shutil}.
10808 Unlike the original version it is written in pure Python rather than C,
10809 so it might be a tiny bit slower.")
10810 (license license:expat)))
10811
10812 (define-public python-waf
10813 (package
10814 (name "python-waf")
10815 (version "2.0.19")
10816 (source (origin
10817 (method url-fetch)
10818 (uri (string-append "https://waf.io/"
10819 "waf-" version ".tar.bz2"))
10820 (sha256
10821 (base32
10822 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
10823 (build-system python-build-system)
10824 (arguments
10825 '(#:phases
10826 (modify-phases %standard-phases
10827 (replace 'build
10828 (lambda _
10829 ;; XXX: Find a way to add all extra tools.
10830 (let ((tools '("gccdeps"
10831 "clang_compilation_database")))
10832 (invoke "python" "waf-light" "configure" "build"
10833 (string-append "--tools="
10834 (string-join tools ","))))))
10835 (replace 'check
10836 (lambda _
10837 (invoke "python" "waf" "--version")))
10838 (replace 'install
10839 (lambda* (#:key outputs #:allow-other-keys)
10840 (let ((out (assoc-ref outputs "out")))
10841 (install-file "waf" (string-append out "/bin")))
10842 #t))
10843 ;; waf breaks when it is wrapped.
10844 (delete 'wrap))))
10845 (home-page "https://waf.io/")
10846 (synopsis "Python-based build system")
10847 (description
10848 "Waf is a Python-based framework for configuring, compiling and installing
10849 applications.")
10850 (license license:bsd-3)))
10851
10852 (define-public python2-waf
10853 (package-with-python2 python-waf))
10854
10855 (define-public python-pyzmq
10856 (package
10857 (name "python-pyzmq")
10858 (version "22.3.0")
10859 (source
10860 (origin
10861 (method url-fetch)
10862 (uri (pypi-uri "pyzmq" version))
10863 (sha256
10864 (base32 "0737kizh53n4rjq1xbm6nhr0bq65xflg04i1d8fcky0nwwrw1pcf"))))
10865 (build-system python-build-system)
10866 (arguments
10867 `(#:configure-flags
10868 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
10869 #:phases
10870 (modify-phases %standard-phases
10871 (add-before 'check 'build-extensions
10872 (lambda _
10873 ;; Cython extensions have to be built before running the tests.
10874 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
10875 (inputs
10876 (list zeromq))
10877 (native-inputs
10878 (list pkg-config python-cython python-pytest))
10879 (home-page "https://github.com/zeromq/pyzmq")
10880 (synopsis "Python bindings for 0MQ")
10881 (description
10882 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
10883 (license license:bsd-4)))
10884
10885 (define-public python-immutabledict
10886 (package
10887 (name "python-immutabledict")
10888 (version "2.2.1")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "immutabledict" version))
10893 (sha256
10894 (base32 "0fpc4gbk7inpfbgdypsg6c18bmdjw8gwx47bjw0hvixn3gghxnqx"))))
10895 (build-system python-build-system)
10896 (arguments
10897 `(#:tests? #f)) ; no tests in PyPI release and no setup.py in GitHub
10898 (native-inputs
10899 (list python-pytest))
10900 (home-page "https://github.com/corenting/immutabledict")
10901 (synopsis "Immutable wrapper around dictionaries")
10902 (description
10903 "@dfn{immutabledict} is an immutable wrapper around dictionaries.
10904 It implements the complete mapping interface and can be used as a drop-in
10905 replacement for dictionaries where immutability is desired.")
10906 (license license:expat)))
10907
10908 (define-public python-emoji
10909 (package
10910 (name "python-emoji")
10911 (version "1.6.1")
10912 (source
10913 (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "emoji" version))
10916 (sha256
10917 (base32 "0923mpixwq6hdpkgvi4r46alfvf608iq975rb8lnqpq29j71mmjk"))))
10918 (build-system python-build-system)
10919 (arguments
10920 `(#:phases
10921 (modify-phases %standard-phases
10922 (replace 'check
10923 (lambda* (#:key tests? #:allow-other-keys)
10924 (when tests?
10925 (invoke "python" "-m" "pytest")))))))
10926 (native-inputs
10927 (list python-pytest))
10928 (home-page "https://github.com/carpedm20/emoji/")
10929 (synopsis "Emoji terminal output for Python")
10930 (description "This package provides Emoji terminal output for Python. The
10931 entire set of Emoji codes as defined by the Unicode Consortium is supported in
10932 addition to a bunch of aliases.")
10933 (license license:bsd-3)))
10934
10935 (define-public python-sarge
10936 (package
10937 (name "python-sarge")
10938 (version "0.1.7.post1") ; post release only to correct errors in metadata
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "sarge" version))
10943 (sha256
10944 (base32 "0g9a53mfnp96877n1yq2jdk1mcv3xm0d93iisvgcn2prdsp45zv4"))))
10945 (build-system python-build-system)
10946 (home-page "https://docs.red-dove.com/sarge/")
10947 (synopsis "Subprocess wrapper with command pipeline functionality")
10948 (description "@code{sarge} is a wrapper for subprocess which provides
10949 command pipeline functionality.")
10950 (license license:bsd-3)))
10951
10952 (define-public python-zipstream-new
10953 (package
10954 (name "python-zipstream-new")
10955 (version "1.1.8")
10956 (source
10957 (origin
10958 (method git-fetch) ; no tests in PyPI release
10959 (uri (git-reference
10960 (url "https://github.com/arjan-s/python-zipstream")
10961 (commit (string-append "v" version))))
10962 (file-name (git-file-name name version))
10963 (sha256
10964 (base32 "14vhgg8mcjqi8cpzrw8qzbij2fr2a63l2a8fhil21k2r8vzv92cv"))))
10965 (build-system python-build-system)
10966 (native-inputs
10967 (list python-nose))
10968 (home-page "https://github.com/arjan-s/python-zipstream")
10969 (synopsis "Zipfile generator that takes input files as well as streams")
10970 (description "@code{zipstream.py} is a zip archive generator based on
10971 @code{zipfile.py}. It was created to generate a zip file generator for
10972 streaming. This is beneficial for when you want to provide a downloadable
10973 archive of a large collection of regular files, which would be infeasible
10974 to generate the archive prior to downloading or of a very large file that
10975 you do not want to store entirely on disk or on memory.")
10976 ;; No copyright headers in the source. The LICENSE file indicates GPL3.
10977 (license license:gpl3)))
10978
10979 (define-public python-sentry-sdk
10980 (package
10981 (name "python-sentry-sdk")
10982 (version "1.5.1")
10983 (source
10984 (origin
10985 (method git-fetch) ; no tests in PyPI release
10986 (uri (git-reference
10987 (url "https://github.com/getsentry/sentry-python")
10988 (commit version)))
10989 (file-name (git-file-name name version))
10990 (sha256
10991 (base32 "128bm136l5zprr3sqqb8j3d6k5i1fhz853mzvh3w8g0w1dw763mx"))))
10992 (build-system python-build-system)
10993 (arguments
10994 `(#:phases
10995 (modify-phases %standard-phases
10996 (replace 'check
10997 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10998 (when tests?
10999 (add-installed-pythonpath inputs outputs)
11000 (invoke "python" "-m" "pytest" "-k"
11001 (string-append
11002 ;; This test requires extra dependencies.
11003 "not test_auto_enabling_integrations"
11004 "_catches_import_error"
11005 ;; Tests below run pip command.
11006 " and not test_unhandled_exception"
11007 " and not test_timeout_error"
11008 " and not test_performance_no_error"
11009 " and not test_performance_error"
11010 " and not test_traces_sampler_gets_correct"
11011 "_values_in_sampling_context"
11012 " and not test_handled_exception"
11013 ;; Tests below require network.
11014 " and not test_crumb_capture"
11015 " and not test_crumb_capture"
11016 " and not test_crumb_capture_hint"
11017 " and not test_httplib_misuse"
11018 ;; Fails with IndexError.
11019 " and not test_session_mode_defaults_to"
11020 "_request_mode_in_wsgi_handler"))))))))
11021 (native-inputs
11022 (list python-django
11023 python-executing
11024 python-gevent
11025 python-jsonschema
11026 python-mock
11027 python-pyrsistent
11028 python-pytest
11029 python-pytest-cov
11030 python-pytest-django
11031 python-pytest-forked
11032 python-pytest-localserver
11033 python-werkzeug))
11034 (propagated-inputs
11035 (list python-certifi python-urllib3))
11036 (home-page "https://github.com/getsentry/sentry-python")
11037 (synopsis "Python SDK for Sentry")
11038 (description "This package provides a Python SDK for the Sentry
11039 application monitoring and error tracking software.")
11040 (license license:bsd-2)))
11041
11042 (define-public python-pep8
11043 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
11044 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
11045 ;; some dependents' test suites, and nothing more.
11046 (package
11047 (name "python-pep8")
11048 (version "1.7.0")
11049 (source
11050 (origin
11051 (method url-fetch)
11052 (uri (pypi-uri "pep8" version))
11053 (sha256
11054 (base32
11055 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
11056 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
11057 (build-system python-build-system)
11058 (home-page "https://pep8.readthedocs.org/")
11059 (synopsis "Python style guide checker")
11060 (description
11061 "This tools checks Python code against some of the style conventions in
11062 PEP 8.")
11063 (license license:expat)))
11064
11065 (define-public python2-pep8
11066 (package-with-python2 python-pep8))
11067
11068 (define-public python-pep8-naming
11069 (package
11070 (name "python-pep8-naming")
11071 (version "0.12.0")
11072 (source
11073 (origin
11074 (method url-fetch)
11075 (uri (pypi-uri "pep8-naming" version))
11076 (sha256
11077 (base32
11078 "04kyh9hkpyc8jzj16d1kkk29b5n8miqdvbs0zm035n1z5z5kx6hz"))))
11079 (build-system python-build-system)
11080 (propagated-inputs
11081 (list python-flake8 python-flake8-polyfill))
11082 (home-page "https://github.com/PyCQA/pep8-naming")
11083 (synopsis "Check PEP-8 naming conventions")
11084 (description
11085 "This package provides the @code{pep8-naming} Python module, a
11086 plugin for flake8 to check PEP-8 naming conventions.")
11087 (license license:expat)))
11088
11089 (define-public python-pep517
11090 (package
11091 (inherit python-pep517-bootstrap)
11092 (name "python-pep517")
11093 (arguments
11094 '(#:phases
11095 (modify-phases %standard-phases
11096 (replace 'check
11097 (lambda* (#:key tests? #:allow-other-keys)
11098 (delete-file "pytest.ini")
11099 ;; This test tries to connect to the internet
11100 (delete-file "tests/test_meta.py")
11101 (if tests?
11102 (invoke "pytest")
11103 #t))))))
11104 (native-inputs
11105 (list python-mock python-pytest python-testpath))
11106 (properties `((python2-variant . ,(delay python2-pep517))))))
11107
11108 ;; Skip the tests so we don't create a cyclical dependency with pytest.
11109 (define-public python2-pep517
11110 (let ((base (package-with-python2
11111 (strip-python2-variant python-pep517))))
11112 (package/inherit base
11113 (name "python2-pep517")
11114 (arguments
11115 `(#:tests? #f
11116 ,@(package-arguments base)))
11117 (native-inputs `()))))
11118
11119 (define-public python-pep621
11120 (package
11121 (name "python-pep621")
11122 (version "0.4.0")
11123 (source
11124 (origin
11125 (method git-fetch)
11126 (uri (git-reference
11127 (url "https://github.com/FFY00/python-pep621")
11128 (commit version)))
11129 (file-name (git-file-name name version))
11130 (sha256
11131 (base32
11132 "0nzig7bmzf0xx5svxlf065mrzihr0ci4p1yaxka9flqjba98flpr"))))
11133 (build-system python-build-system)
11134 (arguments
11135 (list
11136 #:phases
11137 #~(modify-phases %standard-phases
11138 ;; XXX: PEP 517 manual build/install procedures copied from
11139 ;; python-isort.
11140 (replace 'build
11141 (lambda _
11142 ;; ZIP does not support timestamps before 1980.
11143 (setenv "SOURCE_DATE_EPOCH" "315532800")
11144 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
11145 (replace 'check
11146 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11147 (when tests?
11148 (invoke "pytest" "-vv"
11149 ;; Two parameterized test_load tests are currently
11150 ;; failing (see:
11151 ;; https://github.com/FFY00/python-pep621/issues/14).
11152 "-k" "not test_load"))))
11153 (replace 'install
11154 (lambda* (#:key outputs #:allow-other-keys)
11155 (let ((whl (car (find-files "dist" "\\.whl$"))))
11156 (invoke "pip" "--no-cache-dir" "--no-input"
11157 "install" "--no-deps" "--prefix" #$output whl)))))))
11158 (propagated-inputs (list python-packaging))
11159 (native-inputs (list python-pypa-build python-pytest python-tomli))
11160 (home-page "https://github.com/FFY00/python-pep621")
11161 (synopsis "Dataclass for PEP 621 metadata")
11162 (description "This project does not implement the parsing of
11163 @file{pyproject.toml} containing PEP 621 metadata. Instead, given a Python
11164 data structure representing PEP 621 metadata (already parsed), it will
11165 validate this input and generate a PEP 643-compliant metadata
11166 file (e.g. @file{PKG-INFO}).")
11167 (license license:expat)))
11168
11169 (define-public python-pyflakes
11170 (package
11171 (name "python-pyflakes")
11172 (version "2.3.1")
11173 (source
11174 (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "pyflakes" version))
11177 (sha256
11178 (base32
11179 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
11180 (build-system python-build-system)
11181 (home-page "https://github.com/PyCQA/pyflakes")
11182 (synopsis "Passive checker of Python programs")
11183 (description
11184 "Pyflakes statically checks Python source code for common errors.")
11185 (license license:expat)))
11186
11187 (define-public python2-pyflakes
11188 (package-with-python2 python-pyflakes))
11189
11190 (define-public python-pyflakes-2.2
11191 (package
11192 (inherit python-pyflakes)
11193 (version "2.2.0")
11194 (source (origin
11195 (method url-fetch)
11196 (uri (pypi-uri "pyflakes" version))
11197 (sha256
11198 (base32
11199 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))
11200 (patches
11201 (search-patches "python-pyflakes-test-location.patch"))))))
11202
11203 (define-public python-mccabe
11204 (package
11205 (name "python-mccabe")
11206 (version "0.6.1")
11207 (source
11208 (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "mccabe" version))
11211 (sha256
11212 (base32
11213 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
11214 (build-system python-build-system)
11215 (native-inputs
11216 (list python-toml python-pytest-bootstrap python-pytest-runner))
11217 (home-page "https://github.com/PyCQA/mccabe")
11218 (synopsis "McCabe checker, plugin for flake8")
11219 (description "This package provides a Flake8 plug-in to compute the McCabe
11220 cyclomatic complexity of Python source code.")
11221 (license license:expat)))
11222
11223 (define-public python2-mccabe
11224 (package-with-python2 python-mccabe))
11225
11226 (define-public python-flake8
11227 (package
11228 (name "python-flake8")
11229 (version "3.9.1")
11230 (source (origin
11231 (method url-fetch)
11232 (uri (pypi-uri "flake8" version))
11233 (sha256
11234 (base32
11235 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
11236 (build-system python-build-system)
11237 (arguments
11238 `(#:phases
11239 (modify-phases %standard-phases
11240 (replace 'check
11241 (lambda* (#:key inputs outputs #:allow-other-keys)
11242 (add-installed-pythonpath inputs outputs)
11243 (invoke "pytest" "-v"))))))
11244 (propagated-inputs
11245 (list python-pycodestyle python-entrypoints python-pyflakes
11246 python-mccabe))
11247 (native-inputs
11248 (list python-mock python-pytest))
11249 (home-page "https://gitlab.com/pycqa/flake8")
11250 (synopsis
11251 "The modular source code checker: pep8, pyflakes and co")
11252 (description
11253 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
11254 (properties `((python2-variant . ,(delay python2-flake8))))
11255 (license license:expat)))
11256
11257 (define-public python2-flake8
11258 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
11259 (package/inherit base
11260 (propagated-inputs
11261 `(("python2-configparser" ,python2-configparser)
11262 ("python2-enum34" ,python2-enum34)
11263 ("python2-functools32" ,python2-functools32)
11264 ("python2-typing" ,python2-typing)
11265 ,@(package-propagated-inputs base))))))
11266
11267 (define-public python-flake8-3.8
11268 (package
11269 (inherit python-flake8)
11270 (version "3.8.4")
11271 (source (origin
11272 (method url-fetch)
11273 (uri (pypi-uri "flake8" version))
11274 (sha256
11275 (base32
11276 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
11277 (propagated-inputs
11278 (list python-pycodestyle-2.6 python-entrypoints python-pyflakes-2.2
11279 python-mccabe))))
11280
11281 (define-public python-flake8-bugbear
11282 (package
11283 (name "python-flake8-bugbear")
11284 (version "20.1.4")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "flake8-bugbear" version))
11289 (sha256
11290 (base32
11291 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
11292 (build-system python-build-system)
11293 (arguments
11294 '(#:phases
11295 (modify-phases %standard-phases
11296 (add-before 'check 'disable-test
11297 (lambda _
11298 ;; This test fails on slow computers.
11299 (substitute* "tests/test_bugbear.py"
11300 (("def test_does_not_crash_on_any_valid_code")
11301 "def _test_does_not_crash_on_any_valid_code")))))))
11302 (native-inputs
11303 (list python-hypothesis python-hypothesmith))
11304 (propagated-inputs
11305 (list python-attrs python-flake8))
11306 (home-page "https://github.com/PyCQA/flake8-bugbear")
11307 (synopsis
11308 "Flake8 plugin for finding likely bugs and design problems in your program")
11309 (description
11310 "This package contains a plugin for Flake8 finding likely bugs and
11311 design problems in your program. It contains warnings that don't belong
11312 in pyflakes and pycodestyle.")
11313 (license license:expat)))
11314
11315 (define-public python-flake8-continuation
11316 (package
11317 (name "python-flake8-continuation")
11318 (version "1.0.5")
11319 (source
11320 (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "flake8-continuation" version))
11323 (sha256
11324 (base32
11325 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
11326 (build-system python-build-system)
11327 (propagated-inputs
11328 (list python-flake8 python-pycodestyle python-six))
11329 (home-page "https://github.com/planetlabs/flake8-continuation")
11330 (synopsis "Flake8 Line Continuation Plugin")
11331 (description "A Flake8 plugin that checks for the line continuation
11332 style to be in the preferred method according to PEP-8, specifically:
11333 @quotation
11334 The preferred way of wrapping long lines is by using Python's implied
11335 line continuation inside parentheses, brackets and braces. Long lines
11336 can be broken over multiple lines by wrapping expressions in parentheses.
11337 These should be used in preference to using a backslash for line continuation.
11338 @end quotation")
11339 (license license:asl2.0)))
11340
11341 (define-public python-flake8-implicit-str-concat
11342 (package
11343 (name "python-flake8-implicit-str-concat")
11344 (version "0.2.0")
11345 (source
11346 (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "flake8_implicit_str_concat" version))
11349 (sha256
11350 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
11351 (build-system python-build-system)
11352 (arguments
11353 '(#:tests? #f ;no tests
11354 #:phases (modify-phases %standard-phases
11355 (add-after 'unpack 'loosen-requirements
11356 (lambda _
11357 ;; Permit newer versions of attrs. Remove for >0.2.
11358 (substitute* "setup.py"
11359 ((", <21") "")))))))
11360 (propagated-inputs
11361 (list python-attrs python-more-itertools))
11362 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
11363 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
11364 (description
11365 "This is a plugin for the Python code checking tool Flake8 to encourage
11366 correct string literal concatenation.
11367
11368 It looks for style problems like implicitly concatenated string literals on
11369 the same line (which can be introduced by the code formatting tool Black), or
11370 unnecessary plus operators for explicit string literal concatenation.")
11371 (license license:expat)))
11372
11373 (define-public python-flake8-polyfill
11374 (package
11375 (name "python-flake8-polyfill")
11376 (version "1.0.2")
11377 (source
11378 (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "flake8-polyfill" version))
11381 (sha256
11382 (base32
11383 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
11384 (build-system python-build-system)
11385 (arguments
11386 '(#:phases
11387 (modify-phases %standard-phases
11388 (replace 'check
11389 (lambda _
11390 ;; Be compatible with Pytest 4:
11391 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
11392 (substitute* "setup.cfg"
11393 (("\\[pytest\\]")
11394 "[tool:pytest]"))
11395 (invoke "py.test" "-v"))))))
11396 (propagated-inputs
11397 (list python-flake8))
11398 (native-inputs
11399 (list python-mock python-pep8 python-pycodestyle python-pytest))
11400 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
11401 (synopsis "Polyfill package for Flake8 plugins")
11402 (description
11403 "This package that provides some compatibility helpers for Flake8
11404 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
11405 (license license:expat)))
11406
11407 (define-public python2-flake8-polyfill
11408 (package-with-python2 python-flake8-polyfill))
11409
11410 (define-public python-flake8-print
11411 (package
11412 (name "python-flake8-print")
11413 (version "4.0.0")
11414 (source
11415 (origin
11416 (method url-fetch)
11417 (uri (pypi-uri "flake8-print" version))
11418 (sha256
11419 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
11420 (build-system python-build-system)
11421 (propagated-inputs
11422 (list python-flake8 python-pycodestyle python-six))
11423 (home-page "https://github.com/jbkahn/flake8-print")
11424 (synopsis "Print statement checker plugin for Flake8")
11425 (description
11426 "This plugin for Flake8 checks for @code{print} statements in Python
11427 files.")
11428 (license license:expat)))
11429
11430 (define-public python-flake8-pyi
11431 (package
11432 (name "python-flake8-pyi")
11433 (version "20.10.0")
11434 (source
11435 (origin
11436 (method url-fetch)
11437 (uri (pypi-uri "flake8-pyi" version))
11438 (sha256
11439 (base32
11440 "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
11441 (build-system python-build-system)
11442 (propagated-inputs
11443 (list python-attrs python-flake8 python-pyflakes))
11444 (home-page "https://github.com/ambv/flake8-pyi")
11445 (synopsis
11446 "Flake8 plugin that provides specializations for type hinting stub files")
11447 (description
11448 "This package contains a plugin that provides specializations for
11449 type hinting stub files, especially interesting for linting typeshed. It
11450 adds the @file{.pyi} extension to the default value of the @code{--filename}
11451 command-line argument to Flake8. This means stubs are linted by default with
11452 this plugin enabled, without needing to explicitly list every file. It
11453 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
11454 expressions after the entire file has been read. This enables support for
11455 first-class forward references that stub files use.")
11456 (license license:expat)))
11457
11458 (define-public python-flake8-pie
11459 (package
11460 (name "python-flake8-pie")
11461 (version "0.5.0")
11462 (source
11463 (origin
11464 (method url-fetch)
11465 (uri (pypi-uri "flake8-pie" version))
11466 (sha256
11467 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
11468 (build-system python-build-system)
11469 (home-page "https://github.com/sbdchd/flake8-pie")
11470 (synopsis "Flake8 extension that implements lints")
11471 (description
11472 "This package provides a flake8 extension that implements miscellaneous
11473 lints.")
11474 (license license:bsd-2)))
11475
11476 (define-public python-flake8-quotes
11477 (package
11478 (name "python-flake8-quotes")
11479 (version "3.2.0")
11480 (source
11481 (origin
11482 (method url-fetch)
11483 (uri (pypi-uri "flake8-quotes" version))
11484 (sha256
11485 (base32
11486 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
11487 (build-system python-build-system)
11488 (propagated-inputs
11489 (list python-flake8))
11490 (home-page "https://github.com/zheller/flake8-quotes/")
11491 (synopsis "Flake8 lint for quotes")
11492 (description "This package provides a Flake8 lint for quotes.")
11493 (license license:expat)))
11494
11495 (define-public python-flake8-todo
11496 (package
11497 (name "python-flake8-todo")
11498 (version "0.7")
11499 (source
11500 (origin
11501 (method url-fetch)
11502 (uri (pypi-uri "flake8-todo" version))
11503 (sha256
11504 (base32
11505 "05arm0sch3r8248035kilmf01z0mxsahw6vpbbz0d343zy8m8k3f"))))
11506 (build-system python-build-system)
11507 (propagated-inputs
11508 (list python-pycodestyle))
11509 (home-page "https://github.com/schlamar/flake8-todo")
11510 (synopsis "TODO notes checker, plugin for flake8")
11511 (description
11512 "This package provides the @code{flake8-todo} Python module, a
11513 TODO notes checker plugin for flake8.")
11514 (license license:expat)))
11515
11516 (define-public python-flake8-isort
11517 (package
11518 (name "python-flake8-isort")
11519 (version "4.1.1")
11520 (source
11521 (origin
11522 (method url-fetch)
11523 (uri (pypi-uri "flake8-isort" version))
11524 (sha256
11525 (base32 "05r7z0j9rqgy0a9261bhisairrz6w8hy5hy5kf2mhvhfnx53056q"))))
11526 (build-system python-build-system)
11527 (arguments
11528 (list
11529 #:phases
11530 #~(modify-phases %standard-phases
11531 (replace 'check
11532 (lambda* (#:key tests? #:allow-other-keys)
11533 (when tests?
11534 (invoke "pytest" "-vv")))))))
11535 (propagated-inputs (list python-flake8 python-isort python-testfixtures))
11536 (native-inputs (list python-pytest))
11537 (home-page "https://github.com/gforcada/flake8-isort")
11538 (synopsis "Flake8 plugin integrating isort")
11539 (description "This package provides a flake8 plugin that integrates isort,
11540 extending flake8 so that it can warn about badly sorted Python import
11541 directives.")
11542 (license license:gpl2+)))
11543
11544 (define-public python-autoflake
11545 (package
11546 (name "python-autoflake")
11547 (version "1.3.1")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "autoflake" version))
11552 (sha256
11553 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
11554 (build-system python-build-system)
11555 (propagated-inputs
11556 (list python-pyflakes))
11557 (home-page "https://github.com/myint/autoflake")
11558 (synopsis "Removes unused imports and unused variables")
11559 (description
11560 "@code{autoflake} removes unused imports and unused variables from Python
11561 code as reported by @code{pyflakes}.
11562
11563 By default, it only removes unused imports for modules that are part of the
11564 standard library. Removal of unused variables is also disabled by default.
11565 It also removes useless @code{pass} statements.")
11566 (license license:expat)))
11567
11568 (define-public python-mistune
11569 (package
11570 (name "python-mistune")
11571 (version "0.8.4")
11572 (source
11573 (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "mistune" version))
11576 (sha256
11577 (base32
11578 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
11579 (build-system python-build-system)
11580 (native-inputs
11581 (list python-nose python-cython))
11582 (home-page "https://github.com/lepture/mistune")
11583 (synopsis "Markdown parser in pure Python")
11584 (description "This package provides a fast markdown parser in pure
11585 Python.")
11586 (license license:bsd-3)))
11587
11588 (define-public python2-mistune
11589 (package-with-python2 python-mistune))
11590
11591 ;; 2.0 is not released yet, but some packages have started using it.
11592 (define-public python-mistune-next
11593 (package
11594 (inherit python-mistune)
11595 (name "python-mistune-next")
11596 (version "2.0.0rc1")
11597 (source (origin
11598 (method url-fetch)
11599 (uri (pypi-uri "mistune" version))
11600 (sha256
11601 (base32
11602 "1nd7iav1ixh9hlj4hxn6lmpava88d86ys8rqm30wgvr7gjlxnas5"))))
11603 (native-inputs (list python-nose))))
11604
11605 (define-public python-markdown
11606 (package
11607 (name "python-markdown")
11608 (version "3.3.4")
11609 (source
11610 (origin
11611 (method url-fetch)
11612 (uri (pypi-uri "Markdown" version))
11613 (sha256
11614 (base32
11615 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
11616 (build-system python-build-system)
11617 (native-inputs
11618 (list python-nose python-pyyaml))
11619 (home-page "https://python-markdown.github.io/")
11620 (synopsis "Python implementation of Markdown")
11621 (description
11622 "This package provides a Python implementation of John Gruber's
11623 Markdown. The library features international input, various Markdown
11624 extensions, and several HTML output formats. A command line wrapper
11625 markdown_py is also provided to convert Markdown files to HTML.")
11626 (properties `((python2-variant . ,(delay python2-markdown))))
11627 (license license:bsd-3)))
11628
11629 ;; Markdown 3.2 dropped support for Python 2.
11630 (define-public python2-markdown
11631 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
11632 (package
11633 (inherit base)
11634 (version "3.1.1")
11635 (source (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "Markdown" version))
11638 (sha256
11639 (base32
11640 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
11641
11642 (define-public python-ptyprocess
11643 (package
11644 (name "python-ptyprocess")
11645 (version "0.5.2")
11646 (source
11647 (origin
11648 (method url-fetch)
11649 (uri (pypi-uri "ptyprocess" version))
11650 (sha256
11651 (base32
11652 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
11653 (build-system python-build-system)
11654 (native-inputs
11655 (list python-nose))
11656 (arguments
11657 `(#:phases
11658 (modify-phases %standard-phases
11659 (replace 'check
11660 (lambda _ (invoke "nosetests"))))))
11661 (home-page "https://github.com/pexpect/ptyprocess")
11662 (synopsis "Run a subprocess in a pseudo terminal")
11663 (description
11664 "This package provides a Python library used to launch a subprocess in a
11665 pseudo terminal (pty), and interact with both the process and its pty.")
11666 (license license:isc)))
11667
11668 (define-public python2-ptyprocess
11669 (package-with-python2 python-ptyprocess))
11670
11671 (define-public python-cram
11672 (package
11673 (name "python-cram")
11674 (version "0.7")
11675 (home-page "https://bitheap.org/cram/")
11676 (source (origin
11677 (method url-fetch)
11678 (uri (list (string-append home-page "cram-"
11679 version ".tar.gz")
11680 (pypi-uri "cram" version)))
11681 (sha256
11682 (base32
11683 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
11684 (arguments
11685 '(#:phases
11686 (modify-phases %standard-phases
11687 (add-after 'unpack 'patch-source
11688 (lambda _
11689 (substitute* (find-files "cram" ".*\\.py$")
11690 ;; Replace default shell path.
11691 (("/bin/sh") (which "sh")))
11692 (substitute* (find-files "tests" ".*\\.t$")
11693 (("md5") "md5sum")
11694 (("/bin/bash") (which "bash"))
11695 (("/bin/sh") (which "sh")))
11696 (substitute* "cram/_test.py"
11697 ;; This hack works around a bug triggered by substituting
11698 ;; the /bin/sh paths. "tests/usage.t" compares the output of
11699 ;; "cram -h", which breaks the output at 80 characters. This
11700 ;; causes the line showing the default shell to break into two
11701 ;; lines, but the test expects a single line...
11702 (("env\\['COLUMNS'\\] = '80'")
11703 "env['COLUMNS'] = '160'"))
11704
11705 (substitute* "Makefile"
11706 ;; Recent versions of python-coverage have caused the test
11707 ;; coverage to decrease (as of version 0.7). Allow that.
11708 (("--fail-under=100")
11709 "--fail-under=90"))
11710
11711 #t))
11712 (replace 'check
11713 ;; The test phase uses the built library and executable.
11714 (lambda* (#:key inputs outputs #:allow-other-keys)
11715 (add-installed-pythonpath inputs outputs)
11716 (setenv "PATH" (string-append (getenv "PATH") ":"
11717 (assoc-ref outputs "out") "/bin"))
11718 (invoke "make" "test"))))))
11719 (build-system python-build-system)
11720 (native-inputs
11721 (list python-coverage which))
11722 (synopsis "Simple testing framework for command line applications")
11723 (description
11724 "Cram is a functional testing framework for command line applications.
11725 Cram tests look like snippets of interactive shell sessions. Cram runs each
11726 command and compares the command output in the test with the command’s actual
11727 output.")
11728 (license license:gpl2+)))
11729
11730 (define-public python2-cram
11731 (package-with-python2 python-cram))
11732
11733 (define-public python-crccheck
11734 (package
11735 (name "python-crccheck")
11736 (version "1.1")
11737 (source
11738 (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "crccheck" version))
11741 (sha256
11742 (base32 "15psg7wjfbpmmry54ffwg6pg63mnv7mkwmb0a7884axnr8qj55j5"))))
11743 (build-system python-build-system)
11744 (arguments
11745 (list
11746 #:phases
11747 #~(modify-phases %standard-phases
11748 (replace 'check
11749 (lambda* (#:key tests? #:allow-other-keys)
11750 (when tests?
11751 (invoke "pytest" "-vv")))))))
11752 (native-inputs (list python-pytest))
11753 (home-page "https://sourceforge.net/projects/crccheck/")
11754 (synopsis "Calculation library for CRCs and checksums")
11755 (description "@code{crccheck} is a calculation library for CRCs and
11756 checksums. It implement more than a hundred checksum routines.")
11757 (license license:gpl3+)))
11758
11759 (define-public python-crashtest
11760 (package
11761 (name "python-crashtest")
11762 (version "0.3.1")
11763 (source
11764 (origin
11765 (method url-fetch)
11766 (uri (pypi-uri "crashtest" version))
11767 (sha256
11768 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
11769 (build-system python-build-system)
11770 (home-page "https://github.com/sdispater/crashtest")
11771 (synopsis "Manage Python errors with ease")
11772 (description
11773 "Python library that makes exceptions handling and inspection easier.")
11774 (license license:expat)))
11775
11776 (define-public python-stdlib-list
11777 (package
11778 (name "python-stdlib-list")
11779 (version "0.8.0")
11780 (source (origin
11781 (method url-fetch)
11782 (uri (pypi-uri "stdlib-list" version))
11783 (sha256
11784 (base32
11785 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
11786 (build-system python-build-system)
11787 (arguments
11788 `(#:tests? #f)) ; Tests require more dependencies.
11789 (native-inputs
11790 (list python-sphinx))
11791 (home-page "https://github.com/jackmaney/python-stdlib-list")
11792 (synopsis "Python Standard Libraries")
11793 (description "This package contains a list of Python Standard Libraries.")
11794 (license license:expat)))
11795
11796 (define-public python-stopit
11797 (package
11798 (name "python-stopit")
11799 (version "1.1.2")
11800 (source
11801 (origin
11802 (method url-fetch)
11803 (uri (pypi-uri "stopit" version))
11804 (sha256
11805 (base32 "0vcrcvky249q4rbgmwf18mwmnypfk8jpn4h6knyjf86r7xc9rwzp"))))
11806 (build-system python-build-system)
11807 (arguments '(#:tests? #f)) ;there are none
11808 (home-page "https://pypi.python.org/pypi/stopit")
11809 (synopsis "Timeout control decorator and context managers")
11810 (description
11811 "Raise asynchronous exceptions in other threads, control the timeout of
11812 blocks or callables with two context managers and two decorators.")
11813 (license license:expat)))
11814
11815 (define-public python-straight-plugin
11816 (package
11817 (name "python-straight-plugin")
11818 (version "1.4.1")
11819 (source
11820 (origin
11821 (method url-fetch)
11822 (uri (pypi-uri "straight.plugin" version))
11823 (sha256
11824 (base32
11825 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
11826 (build-system python-build-system)
11827 (home-page "https://github.com/ironfroggy/straight.plugin")
11828 (synopsis "Simple namespaced plugin facility")
11829 (description "Straight Plugin provides a type of plugin you can create from
11830 almost any existing Python modules, and an easy way for outside developers to
11831 add functionality and customization to your projects with their own plugins.")
11832 (license license:expat)))
11833
11834 (define-public python2-straight-plugin
11835 (package-with-python2 python-straight-plugin))
11836
11837 (define-public python-pysendfile
11838 (package
11839 (name "python-pysendfile")
11840 (version "2.0.1")
11841 (source
11842 (origin
11843 (method url-fetch)
11844 (uri (pypi-uri "pysendfile" version))
11845 (sha256
11846 (base32 "05qf0m32isflln1zjgxlpw0wf469lj86vdwwqyizp1h94x5l22ji"))))
11847 (build-system python-build-system)
11848 (arguments
11849 (list
11850 #:phases #~(modify-phases %standard-phases
11851 (replace 'check
11852 (lambda* (#:key tests? #:allow-other-keys)
11853 (when tests?
11854 (setenv "HOME" "/tmp")
11855 (invoke "make" "test")))))))
11856 (home-page "https://github.com/giampaolo/pysendfile")
11857 (synopsis "Python interface to sendfile(2)")
11858 (description "The @{pysendfile} Python library provides an interface to
11859 the @code{sendfile(2)} system call.")
11860 (license license:expat)))
11861
11862 (define-public python-pyftpdlib
11863 (package
11864 (name "python-pyftpdlib")
11865 (version "1.5.6")
11866 (source
11867 (origin
11868 (method url-fetch)
11869 (uri (pypi-uri "pyftpdlib" version))
11870 (sha256
11871 (base32 "0pnv2byzmzg84q5nmmhn1xafvfil85qa5y52bj455br93zc5b9px"))))
11872 (build-system python-build-system)
11873 (arguments
11874 (list
11875 #:phases
11876 #~(modify-phases %standard-phases
11877 (replace 'check
11878 (lambda* (#:key tests? #:allow-other-keys)
11879 (when tests?
11880 (invoke
11881 "pytest"
11882 ;; Deselect failing tests.
11883 "-k" (string-append
11884 ;; Using Pytest instead of the Makefile causes the
11885 ;; command line tests to fail on unknown Pytest
11886 ;; arguments.
11887 "not TestCommandLineParser "
11888 ;; https://github.com/giampaolo/pyftpdlib/issues/478
11889 "and not test_use_gmt_times "
11890 ;; https://github.com/giampaolo/pyftpdlib/issues/550
11891 "and not test_masquerade_address "
11892 ;; https://github.com/giampaolo/pyftpdlib/issues/500
11893 "and not test_rest_on_stor "
11894 "and not test_stor_ascii"))))))))
11895 (native-inputs (list python-psutil python-pytest))
11896 (propagated-inputs (list python-pyopenssl python-pysendfile))
11897 (home-page "https://github.com/giampaolo/pyftpdlib/")
11898 (synopsis "Asynchronous and scalable Python FTP server library")
11899 (description "The Python FTP server library provides a high-level
11900 interface to write efficient, scalable and asynchronous FTP servers with
11901 Python. It is the most complete @url{http://www.faqs.org/rfcs/rfc959.html,
11902 RFC-959} FTP server implementation available for Python, and has the following
11903 traits:
11904 @itemize
11905 @item
11906 It is lightweight, fast and scalable.
11907 @item
11908 It uses the @code{sendfile(2)} system call for uploads.
11909 @item
11910 It uses @code{epoll}, @code{kqueue} and @code{select} to handle concurrency
11911 asynchronously.
11912 @item
11913 It supports FTPS (@url{http://tools.ietf.org/html/rfc4217, RFC-4217}),
11914 IPv6 (RFC-2428), Unicode file names (@url{http://tools.ietf.org/html/rfc2640,
11915 RFC-2640}) and MLSD/MLST commands (RFC-3659).
11916 @item
11917 It has a flexible system of @samp{authorizers} able to manage both
11918 @samp{virtual} and @samp{real} users.
11919 @end itemize")
11920 (license license:expat)))
11921
11922 (define-public python-fs
11923 (package
11924 (name "python-fs")
11925 (version "2.4.14")
11926 (source
11927 (origin
11928 (method url-fetch)
11929 (uri (pypi-uri "fs" version))
11930 (sha256
11931 (base32 "0v5kqzi0vd8ar4j4qf5440nzwa9dcagpxb3q6k0cln4cqlmxqmcm"))))
11932 (build-system python-build-system)
11933 (arguments
11934 (list
11935 #:phases #~(modify-phases %standard-phases
11936 (replace 'check
11937 (lambda* (#:key tests? #:allow-other-keys)
11938 (when tests?
11939 (setenv "HOME" "/tmp")
11940 (invoke "pytest" "-m" "not slow")))))))
11941 (propagated-inputs
11942 (list python-appdirs python-pytz python-six))
11943 (native-inputs
11944 (list python-mock python-parameterized python-pyftpdlib python-pytest))
11945 (home-page "https://github.com/PyFilesystem/pyfilesystem2/")
11946 (synopsis "File system abstraction layer for Python")
11947 (description "PyFilesystem's @code{FS} object is a file system abstraction
11948 sharing similarities with Python's own @code{file} object for single files.
11949 It allows opening all the files under a given directory recursively, as a
11950 single @code{FS} object. This enables, for example, counting the combined
11951 number of lines in the contained files easily.")
11952 (license license:expat)))
11953
11954 ;;; Tests are left out in the main package to avoid cycles.
11955 (define-public python-fonttools
11956 (hidden-package
11957 (package
11958 (name "python-fonttools")
11959 (version "4.28.5")
11960 (source (origin
11961 (method url-fetch)
11962 (uri (pypi-uri "fonttools" version ".zip"))
11963 (sha256
11964 (base32
11965 "1jhl5n3rfqq7fznvsh6r80n7ylap1a7ppq1040y8cflhyz80ap2l"))))
11966 (build-system python-build-system)
11967 (native-inputs
11968 (list unzip))
11969 (arguments '(#:tests? #f))
11970 (home-page "https://github.com/fonttools/fonttools")
11971 (synopsis "Tools to manipulate font files")
11972 (description
11973 "FontTools/TTX is a library to manipulate font files from Python. It
11974 supports reading and writing of TrueType/OpenType fonts, reading and writing
11975 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
11976 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
11977 from an XML-based format.")
11978 (license license:expat)
11979 (properties `((python2-variant . ,(delay python2-fonttools)))))))
11980
11981 ;;; Rename 'python-fonttools' in next cycle, renaming the current
11982 ;;; 'python-fonttools' to 'python-fonttools-minimal'.
11983 (define-public python-fonttools-full
11984 (package/inherit python-fonttools
11985 (arguments
11986 (substitute-keyword-arguments (package-arguments python-fonttools)
11987 ((#:tests? _ #f)
11988 #t)
11989 ((#:phases phases '%standard-phases)
11990 `(modify-phases ,phases
11991 (replace 'check
11992 (lambda* (#:key tests? #:allow-other-keys)
11993 (when tests?
11994 (invoke "pytest" "-vv"
11995 "-k"
11996 ;; XXX: These tests need .trm files that are
11997 ;; not shipped with the PyPI release.
11998 (format #f "not ~a"
11999 (string-join
12000 '("test_read_fontdimens_mathsy"
12001 "test_read_fontdimens_mathex"
12002 "test_read_fontdimens_vanilla"
12003 "test_read_boundary_char"
12004 "fontTools.tfmLib")
12005 " and not "))))))))))
12006 (native-inputs
12007 (modify-inputs (package-native-inputs python-fonttools)
12008 (append python-pytest)))
12009 (propagated-inputs
12010 (list python-brotli
12011 python-fs
12012 python-lxml
12013 python-lz4
12014 python-scipy
12015 python-unicodedata2
12016 python-zopfli))
12017 (properties (alist-delete 'hidden? (package-properties python-fonttools)))))
12018
12019 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
12020 (define-public python2-fonttools
12021 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
12022 (package
12023 (inherit base)
12024 (version "3.44.0")
12025 (source (origin
12026 (method url-fetch)
12027 (uri (pypi-uri "fonttools" version ".zip"))
12028 (sha256
12029 (base32
12030 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
12031
12032 (define-public python-fonttools-next
12033 (package
12034 (inherit python-fonttools-full)
12035 (version "4.32.0")
12036 (source (origin
12037 (inherit (package-source python-fonttools-full))
12038 (method url-fetch)
12039 (uri (pypi-uri "fonttools" version ".zip"))
12040 (sha256
12041 (base32
12042 "14nk43z0dmznypm3zp4sdc04x1y608jawlnmwdkk32a947khvaar"))))))
12043
12044 (define-public python-ly
12045 (package
12046 (name "python-ly")
12047 (version "0.9.5")
12048 (source
12049 (origin
12050 (method url-fetch)
12051 (uri (pypi-uri name version))
12052 (sha256
12053 (base32
12054 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
12055 (build-system python-build-system)
12056 (arguments
12057 ;; FIXME: Some tests need network access.
12058 '(#:tests? #f))
12059 (synopsis "Tool and library for manipulating LilyPond files")
12060 (description "This package provides a Python library to parse, manipulate
12061 or create documents in LilyPond format. A command line program ly is also
12062 provided that can be used to do various manipulations with LilyPond files.")
12063 (home-page "https://pypi.org/project/python-ly/")
12064 (license license:gpl2+)))
12065
12066 (define-public python-appdirs
12067 (package
12068 (name "python-appdirs")
12069 (version "1.4.3")
12070 (source
12071 (origin
12072 (method url-fetch)
12073 (uri (pypi-uri "appdirs" version))
12074 (sha256
12075 (base32
12076 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
12077 (build-system python-build-system)
12078 (home-page "https://github.com/ActiveState/appdirs")
12079 (synopsis
12080 "Determine platform-specific dirs, e.g. a \"user data dir\"")
12081 (description
12082 "This module provides a portable way of finding out where user data
12083 should be stored on various operating systems.")
12084 (license license:expat)))
12085
12086 (define-public python2-appdirs
12087 (package-with-python2 python-appdirs))
12088
12089 (define-public python-gorilla
12090 (package
12091 (name "python-gorilla")
12092 (version "0.3.0")
12093 (source (origin
12094 (method url-fetch)
12095 (uri (pypi-uri "gorilla" version))
12096 (sha256
12097 (base32
12098 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
12099 (build-system python-build-system)
12100 (home-page "https://github.com/christophercrouzet/gorilla")
12101 (synopsis "Convenient monkey patching with Python")
12102 (description
12103 "Gorilla is a Python library that provides a convenient approach to
12104 monkey patching. Monkey patching is the process of modifying module and
12105 class attributes at runtime with the purpose of replacing or extending
12106 third-party code.")
12107 (license license:expat)))
12108
12109 (define-public python-llfuse
12110 (package
12111 (name "python-llfuse")
12112 (version "1.4.1")
12113 (source (origin
12114 (method url-fetch)
12115 (uri (pypi-uri "llfuse" version))
12116 (sha256
12117 (base32
12118 "1jaf790rsxvz3hs9fbr3hrnmg0xzl6a2bqfa10bbbsjsdbcpk762"))))
12119 (build-system python-build-system)
12120 (inputs
12121 (list fuse attr))
12122 (native-inputs
12123 (list pkg-config python-pytest))
12124 (synopsis "Python bindings for FUSE")
12125 (description
12126 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
12127 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
12128 (license license:lgpl2.0+)))
12129
12130 (define-public python-msgpack
12131 (package
12132 (name "python-msgpack")
12133 (version "1.0.3")
12134 (source (origin
12135 (method url-fetch)
12136 (uri (pypi-uri "msgpack" version))
12137 (sha256
12138 (base32
12139 "07m84yisf8m6gr68ip9v6vzxax7kqbn8qxg7ir18clk1jgxwgzai"))))
12140 (build-system python-build-system)
12141 (arguments
12142 `(#:modules ((guix build utils)
12143 (guix build python-build-system)
12144 (ice-9 ftw)
12145 (srfi srfi-1)
12146 (srfi srfi-26))
12147 #:phases
12148 (modify-phases %standard-phases
12149 (replace 'check
12150 (lambda _
12151 (invoke "pytest" "-v" "test"))))))
12152 (native-inputs
12153 (list python-pytest))
12154 (synopsis "MessagePack (de)serializer")
12155 (description "MessagePack is a fast, compact binary serialization format,
12156 suitable for similar data to JSON. This package provides CPython bindings for
12157 reading and writing MessagePack data.")
12158 (home-page "https://pypi.org/project/msgpack/")
12159 (license license:asl2.0)))
12160
12161 (define-public python-msgpack-1.0.2
12162 (package
12163 (inherit python-msgpack)
12164 (version "1.0.2")
12165 (source (origin
12166 (method url-fetch)
12167 (uri (pypi-uri "msgpack" version))
12168 (sha256
12169 (base32
12170 "1109s2yynrahwi64ikax68hx0mbclz8p35afmpphw5dwynb49q7s"))))))
12171
12172 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
12173 ;; release 0.5. Some packages like borg still call it by the old name for now.
12174 ;; <https://bugs.gnu.org/30662>
12175 (define-public python-msgpack-transitional
12176 (package
12177 (inherit python-msgpack)
12178 (name "python-msgpack-transitional")
12179 (version "0.5.6")
12180 (source (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "msgpack" version))
12183 (sha256
12184 (base32
12185 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
12186 (arguments
12187 (substitute-keyword-arguments (package-arguments python-msgpack)
12188 ((#:phases phases)
12189 `(modify-phases ,phases
12190 (add-after 'unpack 'configure-transitional
12191 (lambda _
12192 ;; Keep using the old name.
12193 (substitute* "setup.py"
12194 (("TRANSITIONAL = False")
12195 "TRANSITIONAL = 1"))
12196 ;; This old version is not compatible with Python 3.9
12197 (substitute* '("test/test_buffer.py" "test/test_extension.py")
12198 ((".tostring\\(") ".tobytes("))
12199 (substitute* '("test/test_buffer.py" "test/test_extension.py")
12200 ((".fromstring\\(") ".frombytes("))
12201 #t))))))))
12202
12203 (define-public python2-msgpack
12204 (package-with-python2 python-msgpack))
12205
12206 (define-public python-netaddr
12207 (package
12208 (name "python-netaddr")
12209 (version "0.8.0")
12210 (source
12211 (origin
12212 (method url-fetch)
12213 (uri (pypi-uri "netaddr" version))
12214 (sha256
12215 (base32
12216 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
12217 (build-system python-build-system)
12218 (arguments `(#:tests? #f)) ;; No tests.
12219 (home-page "https://github.com/drkjam/netaddr/")
12220 (synopsis "Pythonic manipulation of network addresses")
12221 (description
12222 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
12223 and MAC network addresses.")
12224 (license license:bsd-3)))
12225
12226 (define-public python2-netaddr
12227 (package-with-python2 python-netaddr))
12228
12229 (define-public python2-pyroute2
12230 (package
12231 (name "python2-pyroute2")
12232 (version "0.5.6")
12233 (source
12234 (origin
12235 (method url-fetch)
12236 (uri (pypi-uri "pyroute2" version))
12237 (sha256
12238 (base32
12239 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
12240 (build-system python-build-system)
12241 (arguments
12242 `(#:python ,python-2)) ;Python 3.x is not supported
12243 (home-page "https://github.com/svinota/pyroute2")
12244 (synopsis "Python netlink library")
12245 (description
12246 "Pyroute2 is a pure Python netlink library with minimal dependencies.
12247 Supported netlink families and protocols include:
12248 @itemize
12249 @item rtnl, network settings - addresses, routes, traffic controls
12250 @item nfnetlink - netfilter API: ipset, nftables, ...
12251 @item ipq - simplest userspace packet filtering, iptables QUEUE target
12252 @item devlink - manage and monitor devlink-enabled hardware
12253 @item generic - generic netlink families
12254 @itemize
12255 @item nl80211 - wireless functions API (basic support)
12256 @item taskstats - extended process statistics
12257 @item acpi_events - ACPI events monitoring
12258 @item thermal_events - thermal events monitoring
12259 @item VFS_DQUOT - disk quota events monitoring
12260 @end itemize
12261 @end itemize")
12262 (license license:gpl2+)))
12263
12264 (define-public python-wrapt
12265 (package
12266 (name "python-wrapt")
12267 (version "1.11.2")
12268 (source
12269 (origin
12270 (method url-fetch)
12271 (uri (pypi-uri "wrapt" version))
12272 (sha256
12273 (base32
12274 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
12275 (build-system python-build-system)
12276 (arguments
12277 ;; Tests are not included in the tarball, they are only available in the
12278 ;; git repository.
12279 `(#:tests? #f))
12280 (home-page "https://github.com/GrahamDumpleton/wrapt")
12281 (synopsis "Module for decorators, wrappers and monkey patching")
12282 (description
12283 "The aim of the wrapt module is to provide a transparent object proxy for
12284 Python, which can be used as the basis for the construction of function
12285 wrappers and decorator functions.")
12286 (license license:bsd-2)))
12287
12288 (define-public python2-wrapt
12289 (package-with-python2 python-wrapt))
12290
12291 (define-public python-commentjson
12292 (package
12293 (name "python-commentjson")
12294 (version "0.9.0")
12295 (source (origin
12296 ;; The PyPI release is missing some test files.
12297 (method git-fetch)
12298 (uri (git-reference
12299 (url "https://github.com/vaidik/commentjson")
12300 (commit (string-append "v" version))))
12301 (file-name (git-file-name name version))
12302 (sha256
12303 (base32
12304 "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
12305 (build-system python-build-system)
12306 (arguments
12307 `(#:modules ((guix build python-build-system)
12308 (guix build utils)
12309 (ice-9 ftw)
12310 (ice-9 textual-ports))
12311 #:phases
12312 (modify-phases %standard-phases
12313 (add-after 'unpack 'relax-requirements
12314 (lambda _
12315 (substitute* "setup.py"
12316 (("lark-parser>=0.7.1,<0.8.0")
12317 "lark-parser>=0.7.1"))))
12318 (add-after 'unpack 'delete-unspported-tests
12319 ;; Some tests rely on the 'test' module of Python itself,
12320 ;; which is not available with the Python package in Guix;
12321 ;; remove them.
12322 (lambda _
12323 ;; XXX: Copied from (guix build dub-build-system).
12324 (define (grep string file-name)
12325 (string-contains (call-with-input-file file-name get-string-all)
12326 string))
12327
12328 (with-directory-excursion "commentjson/tests/test_json"
12329 (let* ((dot? (lambda (x) (member x '("." ".."))))
12330 (test-files (scandir "." (negate dot?))))
12331 (for-each delete-file
12332 (filter (lambda (f) (grep "from test." f))
12333 test-files)))))))))
12334 (propagated-inputs
12335 (list python-lark-parser))
12336 (native-inputs
12337 (list python-six))
12338 (home-page "https://github.com/vaidik/commentjson")
12339 (synopsis "Python library for adding comments to JSON files")
12340 (description "Comment JSON is a Python package that helps you create JSON
12341 files with Python and JavaScript style inline comments. Its API is very
12342 similar to the Python standard library's @code{json} module.")
12343 (license license:expat)))
12344
12345 (define-public python-resolvelib
12346 (package
12347 (name "python-resolvelib")
12348 (version "0.7.1")
12349 (source
12350 (origin
12351 ;; Tests are missing from the PyPI release.
12352 (method git-fetch)
12353 (uri (git-reference
12354 (url "https://github.com/sarugaku/resolvelib")
12355 (commit version)))
12356 (file-name (git-file-name name version))
12357 (sha256
12358 (base32
12359 "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
12360 (build-system python-build-system)
12361 (arguments
12362 `(#:phases
12363 (modify-phases %standard-phases
12364 (replace 'check
12365 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12366 (when tests?
12367 (add-installed-pythonpath inputs outputs)
12368 (invoke "pytest")))))))
12369 (native-inputs
12370 (list python-commentjson python-packaging python-pytest))
12371 (home-page "https://github.com/sarugaku/resolvelib")
12372 (synopsis "Abstract dependencies resolver")
12373 (description "The ResolveLib library provides a @code{Resolver} class that
12374 includes dependency resolution logic.")
12375 (license license:isc)))
12376
12377 ;;; This older version is required by ansible-core.
12378 (define-public python-resolvelib-0.5
12379 (package/inherit python-resolvelib
12380 (name "python-resolvelib")
12381 (version "0.5.4")
12382 (source
12383 (origin
12384 (method git-fetch)
12385 (uri (git-reference
12386 (url "https://github.com/sarugaku/resolvelib")
12387 (commit version)))
12388 (file-name (git-file-name name version))
12389 (sha256
12390 (base32
12391 "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
12392
12393 (define-public python-commonmark
12394 (package
12395 (name "python-commonmark")
12396 (version "0.9.1")
12397 (source
12398 (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "commonmark" version))
12401 (sha256
12402 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
12403 (build-system python-build-system)
12404 (arguments
12405 `(#:phases
12406 (modify-phases %standard-phases
12407 (replace 'check
12408 (lambda* (#:key inputs outputs #:allow-other-keys)
12409 (add-installed-pythonpath inputs outputs)
12410 (invoke "python" "setup.py" "test"))))))
12411 (home-page "https://github.com/readthedocs/commonmark.py")
12412 (synopsis "Python parser for the CommonMark Markdown spec")
12413 (description
12414 "This module is a pure Python port of jgm's @code{commonmark.js}, a
12415 Markdown parser and renderer for the CommonMark specification, using only
12416 native modules.")
12417 (license license:bsd-3)))
12418
12419 (define-public python-xlrd
12420 (package
12421 (name "python-xlrd")
12422 (version "2.0.1")
12423 (source (origin
12424 ;; The tests are not included in the PyPI archive.
12425 (method git-fetch)
12426 (uri (git-reference
12427 (url "https://github.com/python-excel/xlrd")
12428 (commit version)))
12429 (file-name (git-file-name name version))
12430 (sha256
12431 (base32
12432 "170asszffvf6rh5w169ic4h5kxgjkmdl3060vw737d4g1qfifvzz"))))
12433 (build-system python-build-system)
12434 (native-inputs
12435 (list python-pytest))
12436 (home-page "http://www.python-excel.org/")
12437 (synopsis "Library for extracting data from Excel files")
12438 (description "This package provides a library to extract data from
12439 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
12440 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
12441 Unicode-aware. It is not intended as an end-user tool.")
12442 (license license:bsd-3)))
12443
12444 (define-public python2-xlrd
12445 (package-with-python2 python-xlrd))
12446
12447 ;;; Note: this package is unmaintained since 2018 (archived on GitHub).
12448 (define-public python-xlwt
12449 (package
12450 (name "python-xlwt")
12451 (version "1.3.0")
12452 (source
12453 (origin
12454 (method url-fetch)
12455 (uri (pypi-uri "xlwt" version))
12456 (sha256
12457 (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
12458 (build-system python-build-system)
12459 (arguments
12460 `(#:phases
12461 (modify-phases %standard-phases
12462 (replace 'check
12463 (lambda* (#:key tests? #:allow-other-keys)
12464 (when tests?
12465 (setenv "GUIX_PYTHONPATH"
12466 (string-append (getcwd) "/build/lib:"
12467 (getenv "GUIX_PYTHONPATH")))
12468 (invoke "nosetests" "-v")))))))
12469 (native-inputs
12470 `(("nose" ,python-nose)))
12471 (home-page "http://www.python-excel.org/")
12472 (synopsis "Library for creating spreadsheet Excel files")
12473 (description "@code{xlwt} is a library for writing data and formatting
12474 information to older Excel files (i.e. .xls). The package itself is pure
12475 Python with no dependencies on modules or packages outside the standard Python
12476 distribution. It is not intended as an end-user tool.")
12477 (license license:bsd-3)))
12478
12479 (define-public python-immutables
12480 (package
12481 (name "python-immutables")
12482 (version "0.14")
12483 (source
12484 (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "immutables" version))
12487 (sha256
12488 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
12489 (build-system python-build-system)
12490 (home-page "https://github.com/MagicStack/immutables")
12491 (synopsis "High-performance immutable mapping type for Python")
12492 (description
12493 "An immutable mapping type for Python. The underlying datastructure is a
12494 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
12495 functional languages.")
12496 (license license:asl2.0)))
12497
12498 (define-public python-prettytable
12499 (package
12500 (name "python-prettytable")
12501 (version "0.7.2")
12502 (source
12503 (origin
12504 (method url-fetch)
12505 (uri (pypi-uri "prettytable" version ".tar.bz2"))
12506 (sha256
12507 (base32
12508 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
12509 (build-system python-build-system)
12510 (home-page "https://code.google.com/archive/p/prettytable/")
12511 (synopsis "Display tabular data in an ASCII table format")
12512 (description
12513 "A library designed to represent tabular data in visually appealing ASCII
12514 tables. PrettyTable allows for selection of which columns are to be printed,
12515 independent alignment of columns (left or right justified or centred) and
12516 printing of sub-tables by specifying a row range.")
12517 (license license:bsd-3)))
12518
12519 (define-public python2-prettytable
12520 (package-with-python2 python-prettytable))
12521
12522 (define-public python-curio
12523 (package
12524 (name "python-curio")
12525 (version "1.5")
12526 (source
12527 (origin
12528 (method url-fetch)
12529 (uri (pypi-uri "curio" version))
12530 (sha256
12531 (base32 "045wwg16qadsalhicbv21p14sj8i4w0l57639j7dmdqbb4p2225g"))))
12532 (build-system python-build-system)
12533 (arguments
12534 `(#:phases
12535 (modify-phases %standard-phases
12536 (replace 'check
12537 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12538 (when tests?
12539 (add-installed-pythonpath inputs outputs)
12540 (invoke "pytest" "-vv" "-k"
12541 (string-append
12542 ;; Tries to open an outgoing connection.
12543 "not test_ssl_outgoing "
12544 ;; This test fails since Python 3.9.9 (see:
12545 ;; https://github.com/dabeaz/curio/issues/347).
12546 "and not test_timeout"))))))))
12547 (native-inputs
12548 (list python-pytest))
12549 (home-page "https://github.com/dabeaz/curio")
12550 (synopsis "Coroutine-based library for concurrent Python")
12551 (description
12552 "Curio is a coroutine-based library for concurrent Python systems
12553 programming. It provides standard programming abstractions such as as
12554 tasks, sockets, files, locks, and queues.")
12555 (license license:bsd-3)))
12556
12557 (define-public python-tables
12558 (package
12559 (name "python-tables")
12560 (version "3.6.1")
12561 (source
12562 (origin
12563 (method url-fetch)
12564 (uri (pypi-uri "tables" version))
12565 (sha256
12566 (base32
12567 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
12568 (modules '((guix build utils)))
12569 (snippet
12570 '(begin
12571 ;; Remove pre-compiled .pyc files from source.
12572 (for-each delete-file-recursively
12573 (find-files "." "__pycache__" #:directories? #t))
12574 (for-each delete-file (find-files "." "\\.pyc$"))
12575 #t))))
12576 (build-system python-build-system)
12577 (arguments
12578 `(;; FIXME: python-build-system does not pass configure-flags to "build"
12579 ;; or "check", so we must override the build and check phases.
12580 #:phases
12581 (modify-phases %standard-phases
12582 (add-after 'unpack 'use-gcc
12583 (lambda _
12584 (substitute* "setup.py"
12585 (("^( +)compiler = new_compiler\\(\\)" line indent)
12586 (string-append line
12587 "\n"
12588 indent
12589 "compiler.set_executables(compiler='gcc',"
12590 "compiler_so='gcc',"
12591 "linker_exe='gcc',"
12592 "linker_so='gcc -shared')")))
12593 #t))
12594 (add-after 'unpack 'disable-tuning
12595 (lambda _
12596 (substitute* "setup.py"
12597 (("cpu_flags = .*")
12598 "cpu_flags = ['sse2']\n"))
12599 #t))
12600 (replace 'build
12601 (lambda* (#:key inputs #:allow-other-keys)
12602 (invoke "python" "setup.py" "build"
12603 (string-append "--hdf5="
12604 (assoc-ref inputs "hdf5")))))
12605 (replace 'check
12606 (lambda* (#:key inputs #:allow-other-keys)
12607 (invoke "python" "setup.py" "check"
12608 (string-append "--hdf5="
12609 (assoc-ref inputs "hdf5"))))))))
12610 (propagated-inputs
12611 (list python-numexpr python-numpy))
12612 (native-inputs
12613 (list python-cython pkg-config))
12614 (inputs
12615 (list hdf5-1.10 bzip2 zlib))
12616 (home-page "https://www.pytables.org/")
12617 (synopsis "Hierarchical datasets for Python")
12618 (description "PyTables is a package for managing hierarchical datasets and
12619 designed to efficiently cope with extremely large amounts of data.")
12620 (license license:bsd-3)))
12621
12622 (define-public python-sniffio
12623 (package
12624 (name "python-sniffio")
12625 (version "1.2.0")
12626 (source
12627 (origin
12628 (method url-fetch)
12629 (uri (pypi-uri "sniffio" version))
12630 (sha256
12631 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
12632 (build-system python-build-system)
12633 (arguments
12634 `(#:phases
12635 (modify-phases %standard-phases
12636 (replace 'check
12637 (lambda _
12638 (invoke "pytest" "-vv"))))))
12639 (native-inputs
12640 (list python-curio python-pytest python-pytest-cov))
12641 (home-page "https://github.com/python-trio/sniffio")
12642 (synopsis "Detect which async library a program is running under")
12643 (description "This package detects which async library a program is
12644 running under. It supports multiple async I/O packages, like Trio, and
12645 asyncio.")
12646 ;; Either license applies.
12647 (license (list license:expat license:asl2.0))))
12648
12649 (define-public python-pytest-black
12650 (package
12651 (name "python-pytest-black")
12652 (version "0.3.12")
12653 (source
12654 (origin
12655 (method url-fetch)
12656 (uri (pypi-uri "pytest-black" version))
12657 (sha256
12658 (base32
12659 "19bmbcnaq02md8nnj6pywri3vps8sxnhysbfy386qkbn9w09ncqx"))))
12660 (build-system python-build-system)
12661 (propagated-inputs
12662 (list python-pytest python-black python-toml))
12663 (native-inputs
12664 (list python-setuptools-scm))
12665 (home-page "https://github.com/shopkeep/pytest-black")
12666 (synopsis "Pytest plugin to enable format checking with black")
12667 (description
12668 "This package provides a pytest plugin to enable format checking with the
12669 Python code formatter \"black\".")
12670 (license license:expat)))
12671
12672 (define-public python-geojson
12673 (package
12674 (name "python-geojson")
12675 (version "2.5.0")
12676 (source
12677 (origin
12678 (method url-fetch)
12679 (uri (pypi-uri "geojson" version))
12680 (sha256
12681 (base32 "12k5bzqskvq3gqzkryarhdjl0df47y5k9cf8r3clasi2wjnbfjvf"))))
12682 (build-system python-build-system)
12683 (arguments
12684 ;; https://github.com/jazzband/geojson/issues/175
12685 `(#:tests? #f))
12686 (home-page "https://github.com/jazzband/geojson")
12687 (synopsis "Python bindings and utilities for GeoJSON")
12688 (description
12689 "This package provides Python bindings and utilities for
12690 @uref{http://geojson.org/, GeoJSON}, a format for encoding geographic data
12691 structures.")
12692 (license license:bsd-3)))
12693
12694 (define-public wfetch
12695 (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715")
12696 (revision "1"))
12697 (package
12698 (name "wfetch")
12699 (version (git-version "0.1-pre" revision commit))
12700 (home-page "https://github.com/Gcat101/Wfetch")
12701 (source
12702 (origin
12703 (method git-fetch)
12704 (uri (git-reference (url home-page)
12705 (commit commit)))
12706 (file-name (git-file-name name version))
12707 (sha256
12708 (base32 "1dmr85plx8zr6s14ym3r32g6crwxghkval5a24ah90ijx4dbn5q5"))))
12709 (build-system python-build-system)
12710 (arguments
12711 `(#:use-setuptools? #f ; no setup.py
12712 #:tests? #f ; no test suite
12713 #:phases
12714 (modify-phases %standard-phases
12715 (delete 'build)
12716 (replace 'install
12717 (lambda* (#:key outputs #:allow-other-keys)
12718 (let* ((out (assoc-ref outputs "out"))
12719 (bin (string-append out "/bin"))
12720 (share (string-append out "/share")))
12721 (mkdir-p share)
12722 (substitute* "wfetch/wfetch.py"
12723 (("os.sep, 'opt', 'wfetch'") (string-append "'" share "'")))
12724 (install-file "wfetch/wfetch.py" bin)
12725 (copy-recursively "wfetch/icons" share)))))))
12726 (inputs (list python-pyowm python-fire python-termcolor python-requests))
12727 (synopsis "Command-line tool to display weather info")
12728 (description
12729 "This package provides a tool similar to Neofetch/pfetch, but for
12730 weather: it can display the weather condition, temperature, humidity, etc.
12731
12732 To use it, you must first run:
12733
12734 @example
12735 export WEATHER_CLI_API=@var{your OpenWeatherMap API key}
12736 @end example\n")
12737 (license license:gpl3+))))
12738
12739 (define-public python-get-version
12740 (package
12741 (name "python-get-version")
12742 (version "2.1")
12743 (source
12744 (origin
12745 (method url-fetch)
12746 (uri (pypi-uri "get_version" version))
12747 (sha256
12748 (base32
12749 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
12750 (build-system python-build-system)
12751 (propagated-inputs
12752 (list python-pygments
12753 python-pytest
12754 python-pytest-black
12755 python-pytest-cov
12756 python-setuptools
12757 python-testpath))
12758 (home-page "https://github.com/flying-sheep/get_version")
12759 (synopsis "Version helper in the spirit of versioneer")
12760 (description
12761 "This package provides a version helper that lets you automatically use
12762 the latest @code{vX.X.X} Git tag as the version in your Python package. It
12763 also supports getting the version from Python source distributions or, once
12764 your package is installed, via @code{pkg_resources} (part of
12765 @code{setuptools}).")
12766 (license license:gpl3+)))
12767
12768 (define-public python-filetype
12769 (package
12770 (name "python-filetype")
12771 (version "1.0.8")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "filetype" version))
12776 (sha256
12777 (base32 "05mkinkcn36v1cnb5hzay3zxmv7jmmflckxxp08rgzbkkf3i9pvp"))))
12778 (build-system python-build-system)
12779 (arguments
12780 `(#:phases
12781 (modify-phases %standard-phases
12782 (replace 'check
12783 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12784 (when tests?
12785 (add-installed-pythonpath inputs outputs)
12786 (invoke "python" "-m" "pytest" "-k"
12787 (string-append
12788 ;; Both tests fail with FileNotFoundError.
12789 "not test_infer_zip_from_disk"
12790 " and not test_infer_tar_from_disk"))))))))
12791 (native-inputs
12792 (list python-pytest python-pytest-benchmark))
12793 (home-page "https://github.com/h2non/filetype.py")
12794 (synopsis "Infer file type and MIME type of any file/buffer")
12795 (description "@code{filetype} is a small and dependency free Python
12796 package to infer file type and MIME type checking the magic numbers
12797 signature of a file or buffer.")
12798 (license license:expat)))
12799
12800 (define-public python-cachelib
12801 (package
12802 (name "python-cachelib")
12803 (version "0.4.1")
12804 (source
12805 (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "cachelib" version))
12808 (sha256
12809 (base32 "0p4chkvbvffcllsny5rpzmsq2vyr24ql3kzif4ha0fxp3fp7vqk8"))))
12810 (build-system python-build-system)
12811 (arguments
12812 `(#:phases
12813 (modify-phases %standard-phases
12814 (replace 'check
12815 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12816 (when tests?
12817 (add-installed-pythonpath inputs outputs)
12818 (invoke "pytest")))))))
12819 (native-inputs
12820 (list python-pytest python-pytest-xprocess))
12821 (home-page "https://github.com/pallets/cachelib")
12822 (synopsis "Collection of cache libraries")
12823 (description "Cachelib is a library extracted from @code{werkzeug} which
12824 provides a collection of cache libraries in the same API interface.")
12825 (license license:bsd-3)))
12826
12827 (define-public python-pylru
12828 (package
12829 (name "python-pylru")
12830 (version "1.2.0")
12831 (source
12832 (origin
12833 (method url-fetch)
12834 (uri (pypi-uri "pylru" version))
12835 (sha256
12836 (base32 "15yj46307sw703vjfkgnr04dqvaicmfcj0hc6yrciildp55r6bs9"))))
12837 (build-system python-build-system)
12838 (arguments
12839 `(#:phases
12840 (modify-phases %standard-phases
12841 (replace 'check
12842 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12843 (when tests?
12844 (add-installed-pythonpath inputs outputs)
12845 (invoke "python" "test.py")))))))
12846 (home-page "https://github.com/jlhutch/pylru")
12847 (synopsis "Least recently used (LRU) cache implementation")
12848 (description
12849 "Pylru implements a true LRU cache along with several support classes.
12850 Pylru provides a cache class with a simple dict interface. It also provides
12851 classes to wrap any object that has a dict interface with a cache. Both
12852 write-through and write-back semantics are supported. Pylru also provides
12853 classes to wrap functions in a similar way, including a function decorator.")
12854 (license license:gpl2+)))
12855
12856 (define-public python-legacy-api-wrap
12857 (package
12858 (name "python-legacy-api-wrap")
12859 (version "1.2")
12860 (source
12861 (origin
12862 (method url-fetch)
12863 (uri (pypi-uri "legacy-api-wrap" version))
12864 (sha256
12865 (base32
12866 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
12867 (build-system python-build-system)
12868 (propagated-inputs
12869 (list python-get-version python-pytest python-pytest-black
12870 python-pytest-cov python-setuptools))
12871 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
12872 (synopsis "Legacy API wrapper")
12873 (description "This module defines a decorator to wrap legacy APIs. The
12874 primary use case is APIs defined before keyword-only parameters existed.")
12875 (license license:gpl3+)))
12876
12877 (define-public python-langdetect
12878 (package
12879 (name "python-langdetect")
12880 (version "1.0.9")
12881 (source
12882 (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "langdetect" version))
12885 (sha256
12886 (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
12887 (build-system python-build-system)
12888 (propagated-inputs
12889 (list python-six))
12890 (home-page "https://github.com/Mimino666/langdetect")
12891 (synopsis "Language detection library")
12892 (description
12893 "This library is a port of Nakatani Shuyo's language-detection library
12894 (version from 03/03/2014) to Python.")
12895 (license license:expat)))
12896
12897 (define-public python-pyasn1
12898 (package
12899 (name "python-pyasn1")
12900 (version "0.4.8")
12901 (source
12902 (origin
12903 (method url-fetch)
12904 (uri (pypi-uri "pyasn1" version))
12905 (sha256
12906 (base32
12907 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
12908 (build-system python-build-system)
12909 (home-page "http://pyasn1.sourceforge.net/")
12910 (synopsis "ASN.1 types and codecs")
12911 (description
12912 "This is an implementation of ASN.1 types and codecs in Python. It is
12913 suitable for a wide range of protocols based on the ASN.1 specification.")
12914 (license license:bsd-2)))
12915
12916 (define-public python2-pyasn1
12917 (package-with-python2 python-pyasn1))
12918
12919 (define-public python-pyasn1-modules
12920 (package
12921 (name "python-pyasn1-modules")
12922 (version "0.2.8")
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "pyasn1-modules" version))
12927 (sha256
12928 (base32
12929 "0pp6dcagd8c2c9qx3lahc1rdwlnmm0y0siqr5icjq2r32b3q8pwh"))))
12930 (build-system python-build-system)
12931 (propagated-inputs
12932 (list python-pyasn1))
12933 (home-page "https://sourceforge.net/projects/pyasn1/")
12934 (synopsis "ASN.1 codec implementations")
12935 (description
12936 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
12937 implementations of ASN.1-based codecs and protocols.")
12938 (license license:bsd-3)))
12939
12940 (define-public python2-pyasn1-modules
12941 (package-with-python2 python-pyasn1-modules))
12942
12943 (define-public python-ipaddress
12944 (package
12945 (name "python-ipaddress")
12946 (version "1.0.23")
12947 (source (origin
12948 (method url-fetch)
12949 (uri (pypi-uri "ipaddress" version))
12950 (sha256
12951 (base32
12952 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
12953 (build-system python-build-system)
12954 (home-page "https://github.com/phihag/ipaddress")
12955 (synopsis "IP address manipulation library")
12956 (description
12957 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
12958 in Python. This library is used to create, poke at, and manipulate IPv4 and
12959 IPv6 addresses and networks.")
12960 (license license:psfl)))
12961
12962 (define-public python2-ipaddress
12963 (package-with-python2 python-ipaddress))
12964
12965 (define-public python-asn1tools
12966 (package
12967 (name "python-asn1tools")
12968 (version "0.158.0")
12969 (source
12970 (origin
12971 (method url-fetch)
12972 (uri (pypi-uri "asn1tools" version))
12973 (sha256
12974 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
12975 (build-system python-build-system)
12976 (propagated-inputs
12977 (list python-bitstruct python-diskcache python-prompt-toolkit
12978 python-pyparsing))
12979 (home-page "https://github.com/eerimoq/asn1tools")
12980 (synopsis "ASN.1 parsing, encoding and decoding")
12981 (description "This package provides ASN.1 parsing, encoding and decoding
12982 for Python, including constraints checking. It supports several
12983 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
12984 for OER and UPER.")
12985 (license license:expat)))
12986
12987 (define-public python2-ipaddr
12988 (package
12989 (name "python2-ipaddr")
12990 (version "2.1.11")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "ipaddr" version))
12995 (sha256
12996 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
12997 (build-system python-build-system)
12998 (arguments
12999 `(#:python ,python-2 ;version 2 only
13000 #:phases
13001 (modify-phases %standard-phases
13002 (replace 'check
13003 (lambda _ (invoke "python" "ipaddr_test.py"))))))
13004 (home-page "https://github.com/google/ipaddr-py")
13005 (synopsis "IP address manipulation library")
13006 (description
13007 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
13008 IPv6 addresses and networks.
13009
13010 For new implementations you may prefer to use the standard module
13011 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
13012 versions of Python.")
13013 (license license:asl2.0)))
13014
13015 (define-public python-idna
13016 (package
13017 (name "python-idna")
13018 (version "2.10")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "idna" version))
13023 (sha256
13024 (base32
13025 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
13026 (build-system python-build-system)
13027 (home-page "https://github.com/kjd/idna")
13028 (synopsis "Internationalized domain names in applications")
13029 (description
13030 "This is a library to support the Internationalised Domain Names in
13031 Applications (IDNA) protocol as specified in RFC 5891. This version of the
13032 protocol is often referred to as “IDNA2008” and can produce different results
13033 from the earlier standard from 2003. The library is also intended to act as a
13034 suitable drop-in replacement for the “encodings.idna” module that comes with
13035 the Python standard library but currently only supports the older 2003
13036 specification.")
13037 (license license:bsd-4)))
13038
13039 (define-public python2-idna
13040 (package-with-python2 python-idna))
13041
13042 (define-public python-libsass
13043 (package
13044 (name "python-libsass")
13045 (version "0.20.1")
13046 (source
13047 (origin
13048 ;; PyPI tarball is missing some test files.
13049 (method git-fetch)
13050 (uri (git-reference
13051 (url "https://github.com/sass/libsass-python")
13052 (commit version)))
13053 (file-name (git-file-name name version))
13054 (sha256
13055 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
13056 (build-system python-build-system)
13057 (arguments
13058 '(#:phases
13059 (modify-phases %standard-phases
13060 ;; Use Guix package of libsass instead of compiling from a checkout.
13061 (add-before 'build 'set-libsass
13062 (lambda _ (setenv "SYSTEM_SASS" "indeed")))
13063 (replace 'check
13064 (lambda* (#:key tests? #:allow-other-keys)
13065 (when tests?
13066 (invoke "pytest" "sasstests.py"))))
13067 (add-after 'install 'delete-test
13068 (lambda* (#:key inputs outputs #:allow-other-keys)
13069 ;; Delete sasstests.py because it attempts to open a file
13070 ;; that is not installed when loaded, which breaks the sanity
13071 ;; check.
13072 (delete-file (string-append
13073 (assoc-ref outputs "out")
13074 "/lib/python"
13075 (python-version
13076 (dirname (dirname
13077 (search-input-file inputs "bin/python"))))
13078 "/site-packages/sasstests.py")))))))
13079 (native-inputs
13080 (list python-pytest python-werkzeug))
13081 (inputs
13082 (list libsass))
13083 (propagated-inputs
13084 (list python-six))
13085 (home-page "https://sass.github.io/libsass-python/")
13086 (synopsis "Straightforward binding of libsass for Python")
13087 (description
13088 "This package provides a simple Python extension module @code{sass} which
13089 is binding LibSass.")
13090 (license license:expat)))
13091
13092 (define-public python-idna-ssl
13093 (package
13094 (name "python-idna-ssl")
13095 (version "1.0.1")
13096 (source
13097 (origin
13098 (method url-fetch)
13099 (uri (pypi-uri "idna-ssl" version))
13100 (sha256
13101 (base32
13102 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
13103 (build-system python-build-system)
13104 (arguments
13105 `(#:tests? #f)) ;circular dependency with python-aiohttp
13106 (propagated-inputs (list python-idna))
13107 (home-page "https://github.com/aio-libs/idna-ssl")
13108 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
13109 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
13110 domains support.")
13111 (license license:expat)))
13112
13113 ;;; Variant used to break a cycle with python-pip-run-bootstrap.
13114 (define-public python-path-bootstrap
13115 (hidden-package
13116 (package
13117 (name "python-path-bootstrap")
13118 (version "16.4.0")
13119 (source
13120 (origin
13121 (method url-fetch)
13122 (uri (pypi-uri "path" version))
13123 (sha256
13124 (base32 "0lig13gxnfv98v790db1smvsbd3mnj7y8rwyiwhfi6xiqibygwms"))))
13125 (build-system python-build-system)
13126 (arguments
13127 (list
13128 #:tests? #f
13129 #:phases
13130 #~(modify-phases %standard-phases
13131 ;; XXX: PEP 517 manual build/install procedures copied from
13132 ;; python-isort.
13133 (replace 'build
13134 (lambda _
13135 ;; ZIP does not support timestamps before 1980.
13136 (setenv "SOURCE_DATE_EPOCH" "315532800")
13137 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
13138 (replace 'install
13139 (lambda* (#:key outputs #:allow-other-keys)
13140 (let ((whl (car (find-files "dist" "\\.whl$"))))
13141 (invoke "pip" "--no-cache-dir" "--no-input"
13142 "install" "--no-deps" "--prefix" #$output whl)))))))
13143 (native-inputs (list python-pypa-build python-setuptools-scm))
13144 (home-page "https://github.com/jaraco/path")
13145 (synopsis "Object-oriented file system path manipulation library")
13146 (description "@code{path} (formerly @code{path.py}) implements path
13147 objects as first-class entities, allowing common operations on files to be
13148 invoked on those path objects directly.")
13149 (license license:expat))))
13150
13151 (define-public python-path
13152 (package/inherit python-path-bootstrap
13153 (name "python-path")
13154 (arguments
13155 (substitute-keyword-arguments
13156 (package-arguments python-path-bootstrap)
13157 ((#:tests? _ #f)
13158 #t)
13159 ((#:phases phases #~%standard-phases)
13160 #~(modify-phases #$phases
13161 (replace 'check
13162 (lambda* (#:key tests? #:allow-other-keys)
13163 (when tests?
13164 ;; Do not test the myproject.toml build as it tries to pull
13165 ;; dependencies from the Internet.
13166 (invoke "pytest" "-vv" "-k"
13167 (string-append
13168 "not project "
13169 ;; This tests assumes a root user exists.
13170 "and not test_get_owner")))))))))
13171 (native-inputs
13172 (modify-inputs (package-native-inputs python-path-bootstrap)
13173 (append python-appdirs
13174 python-packaging
13175 python-pygments
13176 python-pytest
13177 python-pytest-black
13178 python-pytest-checkdocs
13179 python-pytest-cov
13180 python-pytest-enabler
13181 python-pytest-flake8
13182 python-pytest-mypy)))
13183 (properties (alist-delete 'hidden?
13184 (package-properties
13185 python-path-bootstrap)))))
13186
13187 (define-public python-pathpy
13188 (deprecated-package "python-pathpy" python-path))
13189
13190 (define-public python-pretend
13191 (package
13192 (name "python-pretend")
13193 (version "1.0.9")
13194 (source
13195 (origin
13196 (method url-fetch)
13197 (uri (pypi-uri "pretend" version))
13198 (sha256
13199 (base32
13200 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
13201 (build-system python-build-system)
13202 (home-page "https://github.com/alex/pretend")
13203 (synopsis "Library for stubbing in Python")
13204 (description
13205 "Pretend is a library to make stubbing with Python easier. Stubbing is a
13206 technique for writing tests. You may hear the term mixed up with mocks,
13207 fakes, or doubles. Basically, a stub is an object that returns pre-canned
13208 responses, rather than doing any computation.")
13209 (license license:bsd-3)))
13210
13211 (define-public python2-pretend
13212 (package-with-python2 python-pretend))
13213
13214 (define-public python-pip
13215 (package
13216 (name "python-pip")
13217 (version "20.2.4")
13218 (source
13219 (origin
13220 (method url-fetch)
13221 (uri (pypi-uri "pip" version))
13222 (sha256
13223 (base32
13224 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
13225 (build-system python-build-system)
13226 (arguments
13227 '(#:tests? #f)) ; there are no tests in the pypi archive.
13228 (home-page "https://pip.pypa.io/")
13229 (synopsis "Package manager for Python software")
13230 (description
13231 "Pip is a package manager for Python software, that finds packages on the
13232 Python Package Index (PyPI).")
13233 (license license:expat)))
13234
13235 (define-public python2-pip
13236 (package-with-python2 python-pip))
13237
13238 ;;; Variant used to break a dependency cycle with
13239 ;;; python-pytest-perf-bootstrap.
13240 (define-public python-pip-run-bootstrap
13241 (hidden-package
13242 (package
13243 (name "python-pip-run-bootstrap")
13244 (version "8.8.0")
13245 (source (origin
13246 (method git-fetch)
13247 (uri (git-reference
13248 (url "https://github.com/jaraco/pip-run")
13249 (commit (string-append "v" version))))
13250 (file-name (git-file-name name version))
13251 (sha256
13252 (base32
13253 "0ycrjj3jgqcr9c2k7y8vprq65iblg0q0hvwz8zwi13gmb0ffds0c"))))
13254 (build-system python-build-system)
13255 (arguments
13256 (list
13257 #:tests? #f
13258 #:phases
13259 #~(modify-phases %standard-phases
13260 (add-before 'build 'pretend-version
13261 ;; The version string is usually derived via setuptools-scm, but
13262 ;; without the git metadata available this fails.
13263 (lambda _
13264 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
13265 (native-inputs (list python-setuptools-scm))
13266 (propagated-inputs (list python-autocommand python-path-bootstrap
13267 python-packaging))
13268 (home-page "https://github.com/jaraco/pip-run")
13269 (synopsis "Dynamic dependency loader for Python")
13270 (description "The @command{pip-run} command provides on-demand temporary
13271 package installation for a single interpreter run. It replaces this series of
13272 commands:
13273 @example
13274 $ virtualenv --python pythonX.X --system-site-packages /tmp/env
13275 $ /tmp/env/bin/pip install pkg1 pkg2 -r reqs.txt
13276 $ /tmp/env/bin/python ...
13277 $ rm -rf /tmp/env
13278 @end example")
13279 (license license:expat))))
13280
13281 (define-public python-pip-run
13282 (package/inherit python-pip-run-bootstrap
13283 (name "python-pip-run")
13284 (arguments
13285 (substitute-keyword-arguments (package-arguments python-pip-run-bootstrap)
13286 ((#:tests? _ #f)
13287 #t)
13288 ((#:phases phases #~%standard-phases)
13289 #~(modify-phases #$phases
13290 (replace 'check
13291 (lambda* (#:key tests? #:allow-other-keys)
13292 (when tests?
13293 (invoke "pytest" "-k"
13294 (string-append
13295 ;; Do not test the myproject.toml build as it tries
13296 ;; to pull dependencies from the internet.
13297 "not project "
13298 ;; These tests attempt to install dependencies from
13299 ;; the network and fail.
13300 "and not test_pkg_imported "
13301 "and not test_pkg_loaded_from_alternate_index ")))))))))
13302 (propagated-inputs
13303 (modify-inputs (package-propagated-inputs python-pip-run-bootstrap)
13304 (replace "python-path-bootstrap" python-path)))
13305 (native-inputs
13306 (modify-inputs (package-native-inputs python-pip-run-bootstrap)
13307 (append python-nbformat
13308 python-pygments
13309 python-pytest
13310 python-pytest-black
13311 python-pytest-checkdocs
13312 python-pytest-cov
13313 python-pytest-enabler
13314 python-pytest-flake8
13315 python-pytest-mypy)))
13316 (properties (alist-delete 'hidden? (package-properties
13317 python-pip-run-bootstrap)))))
13318
13319 (define-public python-tlsh
13320 (package
13321 (name "python-tlsh")
13322 (version "3.4.5")
13323 (home-page "https://github.com/trendmicro/tlsh")
13324 (source
13325 (origin
13326 (method git-fetch)
13327 (uri (git-reference
13328 (url "https://github.com/trendmicro/tlsh")
13329 (commit (string-append "v" version))))
13330 (file-name (git-file-name name version))
13331 (sha256
13332 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
13333 (build-system cmake-build-system)
13334 (arguments
13335 '(#:out-of-source? #f
13336 #:phases (modify-phases %standard-phases
13337 (replace
13338 'install
13339 (lambda* (#:key outputs #:allow-other-keys)
13340 ;; Build and install the Python bindings. The underlying
13341 ;; C++ library is apparently not meant to be installed.
13342 (let ((out (assoc-ref outputs "out")))
13343 (with-directory-excursion "py_ext"
13344 (and (system* "python" "setup.py" "build")
13345 (system* "python" "setup.py" "install"
13346 (string-append "--prefix=" out))))))))))
13347 (inputs `(("python" ,python-wrapper))) ;for the bindings
13348 (synopsis "Fuzzy matching library for Python")
13349 (description
13350 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
13351 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
13352 value which can be used for similarity comparisons. Similar objects have
13353 similar hash values, which allows for the detection of similar objects by
13354 comparing their hash values. The byte stream should have a sufficient amount
13355 of complexity; for example, a byte stream of identical bytes will not generate
13356 a hash value.")
13357 (license license:asl2.0)))
13358
13359 (define-public python2-tlsh
13360 (package/inherit python-tlsh
13361 (name "python2-tlsh")
13362 (inputs `(("python" ,python-2)))))
13363
13364 (define-public python-termcolor
13365 (package
13366 (name "python-termcolor")
13367 (version "1.1.0")
13368 (source
13369 (origin
13370 (method url-fetch)
13371 (uri (pypi-uri "termcolor" version))
13372 (sha256
13373 (base32
13374 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
13375 (build-system python-build-system)
13376 (arguments
13377 ;; There are no tests.
13378 `(#:tests? #f))
13379 (home-page "https://pypi.org/project/termcolor/")
13380 (synopsis "ANSII Color formatting for terminal output")
13381 (description
13382 "This package provides ANSII Color formatting for output in terminals.")
13383 (license license:expat)))
13384
13385 (define-public python2-termcolor
13386 (package-with-python2 python-termcolor))
13387
13388 (define-public python-terminaltables
13389 (package
13390 (name "python-terminaltables")
13391 (version "3.1.0")
13392 (source
13393 (origin
13394 (method url-fetch)
13395 (uri (pypi-uri "terminaltables" version))
13396 (sha256
13397 (base32
13398 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
13399 (build-system python-build-system)
13400 (home-page "https://github.com/Robpol86/terminaltables")
13401 (synopsis
13402 "Generate simple tables in terminals from a nested list of strings")
13403 (description
13404 "This package makes it easy to draw tables in terminal/console
13405 applications from a list of lists of strings. It supports multi-line rows.")
13406 (license license:expat)))
13407
13408 (define-public python-libarchive-c
13409 (package
13410 (name "python-libarchive-c")
13411 (version "2.9")
13412 (source (origin
13413 (method url-fetch)
13414 (uri (pypi-uri "libarchive-c" version))
13415 (sha256
13416 (base32
13417 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
13418 (build-system python-build-system)
13419 (arguments
13420 '(#:phases (modify-phases %standard-phases
13421 (add-before
13422 'build 'reference-libarchive
13423 (lambda* (#:key inputs #:allow-other-keys)
13424 ;; Retain the absolute file name of libarchive.so.
13425 (let ((libarchive (assoc-ref inputs "libarchive")))
13426 (substitute* "libarchive/ffi.py"
13427 (("find_library\\('archive'\\)")
13428 (string-append "'" libarchive
13429 "/lib/libarchive.so'"))))))
13430 (replace 'check
13431 (lambda _ (invoke "pytest" "-vv"))))))
13432 (native-inputs
13433 (list python-mock python-pytest))
13434 (inputs
13435 (list libarchive))
13436 (home-page "https://github.com/Changaco/python-libarchive-c")
13437 (synopsis "Python interface to libarchive")
13438 (description
13439 "This package provides Python bindings to libarchive, a C library to
13440 access possibly compressed archives in many different formats. It uses
13441 Python's @code{ctypes} foreign function interface (FFI).")
13442 (license license:lgpl2.0+)))
13443
13444 (define-public python2-libarchive-c
13445 (package-with-python2 python-libarchive-c))
13446
13447 (define-public python-file
13448 (package/inherit file
13449 (name "python-file")
13450 (build-system python-build-system)
13451 (arguments
13452 '(#:tests? #f ;no tests
13453 #:configure-flags '("--single-version-externally-managed" "--root=/")
13454 #:phases (modify-phases %standard-phases
13455 (add-before 'build 'change-directory
13456 (lambda _
13457 (chdir "python")
13458 #t))
13459 (add-before 'build 'set-library-file-name
13460 (lambda* (#:key inputs #:allow-other-keys)
13461 (let ((file (assoc-ref inputs "file")))
13462 (substitute* "magic.py"
13463 (("find_library\\('magic'\\)")
13464 (string-append "'" file "/lib/libmagic.so'")))
13465 #t))))))
13466 (inputs `(("file" ,file)))
13467 (native-inputs (if (%current-target-system)
13468 `(("self" ,this-package))
13469 '()))
13470 (synopsis "Python bindings to the libmagic file type guesser")
13471 (description "This package provides Python bindings to the libmagic file
13472 type guesser.
13473
13474 Note that this module and the @code{python-magic} module both provide a
13475 @file{magic.py} file; these two modules, which are different and were
13476 developed separately, both serve the same purpose: provide Python bindings for
13477 libmagic.")))
13478
13479 (define-public python2-file
13480 (package-with-python2 python-file))
13481
13482 (define-public python-pydevd
13483 ;; Use the latest commit, which includes cleanups that removes Python 2
13484 ;; syntax that would fail to build.
13485 (let ((revision "0")
13486 (commit "47e298499ef19563bb2ef5941a57046a35ae6868"))
13487 (package
13488 (name "python-pydevd")
13489 (version (git-version "2.8.0" revision commit))
13490 (source
13491 (origin
13492 (method git-fetch)
13493 (uri (git-reference
13494 (url "https://github.com/fabioz/PyDev.Debugger")
13495 (commit commit)))
13496 (modules '((guix build utils)))
13497 (snippet '(begin
13498 ;; Delete pre-built binaries.
13499 (for-each delete-file (find-files "." "\\.(so|dylib|dll)"))
13500 ;; This source is generated via Cython.
13501 (delete-file "_pydevd_bundle/pydevd_cython.c")))
13502 (file-name (git-file-name name version))
13503 (sha256
13504 (base32
13505 "1yd017dh6xgxrqcyf8kk8jrr0a3zw895yfjih0z5jghyf0rck38q"))))
13506 (build-system python-build-system)
13507 (arguments
13508 (list
13509 #:phases
13510 #~(modify-phases %standard-phases
13511 (add-after 'unpack 'fix-tests
13512 (lambda _
13513 (substitute* "tests_python/test_convert_utilities.py"
13514 ;; Add missing trailing '/'.
13515 (("'\\\\\\\\usr\\\\\\\\bin\\\\\\\\') == '/usr/bin" all)
13516 (string-append all "/")))))
13517 (add-after 'unpack 'patch-command-paths
13518 (lambda* (#:key inputs #:allow-other-keys)
13519 (substitute* "_pydevd_bundle/pydevd_api.py"
13520 (("'kill'")
13521 (format #f "~s" (search-input-file inputs "bin/kill")))
13522 (("'pgrep'")
13523 (format #f "~s" (search-input-file inputs "bin/pgrep"))))))
13524 (add-after 'unpack 'generate-sources
13525 (lambda _
13526 (setenv "PYTHONPATH" (getcwd))
13527 (invoke "python" "build_tools/build.py")))
13528 (add-after 'unpack 'adjust-attach-binary-name
13529 (lambda _
13530 (substitute*
13531 '("pydevd_tracing.py"
13532 "pydevd_attach_to_process/add_code_to_python_process.py")
13533 (("def get_(target|python_helper_lib)_filename.*" all)
13534 (format #f "~a return ~s~%" all
13535 (string-append #$output "/lib/attach.so"))))))
13536 (add-after 'unpack 'patch-gdb
13537 (lambda* (#:key inputs #:allow-other-keys)
13538 (substitute*
13539 "pydevd_attach_to_process/add_code_to_python_process.py"
13540 (("'gdb',")
13541 (format #f "~s," (search-input-file inputs "bin/gdb"))))))
13542 (add-after 'build 'build-attach-linux-binary
13543 (lambda _
13544 (invoke #+(cxx-for-target) "-shared" "-o" "attach.so"
13545 "-fPIC" "-nostartfiles"
13546 "pydevd_attach_to_process/linux_and_mac/attach.cpp")))
13547 (replace 'check
13548 (lambda* (#:key tests? #:allow-other-keys)
13549 (when tests?
13550 (setenv "PYDEVD_USE_CYTHON" "YES")
13551 (invoke "pytest" "-vv"
13552 "-n" (number->string (parallel-job-count))
13553 "-k"
13554 (string-append
13555 ;; the GUI event loop requires an X server.
13556 "not test_gui_event_loop_custom "
13557 ;; This test validates that 'pydevd' is not in the
13558 ;; exception message, but it is due to being part
13559 ;; of the build file name present in the message.
13560 "and not test_evaluate_exception_trace")))))
13561 (add-after 'install 'install-attach-binary
13562 (lambda _
13563 (install-file "attach.so"
13564 (string-append #$output "/lib"))))
13565 ;; Some modules aren't designed to be loadable by themselves, such
13566 ;; as 'pydev_app_engine_debug_startup' and fail.
13567 (delete 'sanity-check))))
13568 (native-inputs
13569 (list python-cython
13570 python-numpy
13571 python-psutil
13572 python-pytest
13573 python-pytest-xdist
13574 python-trio
13575 python-untangle))
13576 (inputs (list coreutils gdb procps))
13577 (home-page "https://github.com/fabioz/PyDev.Debugger/")
13578 (synopsis "Python debugger")
13579 (description "PyDev.Debugger is a capable Python debugger used in PyDev
13580 and other @acronym{IDEs, Integrated Development Environments}.")
13581 (license license:epl1.0))))
13582
13583 (define-public python-debugpy
13584 (package
13585 (name "python-debugpy")
13586 (version "1.6.0")
13587 (source
13588 (origin
13589 (method git-fetch)
13590 (uri (git-reference ;no tests in PyPI archive
13591 (url "https://github.com/microsoft/debugpy")
13592 (commit (string-append "v" version))))
13593 (file-name (git-file-name name version))
13594 (modules '((guix build utils)))
13595 ;; Remove the bundled PyDev-Debugger copy, including its pre-built
13596 ;; attach binary.
13597 (snippet '(delete-file-recursively "src/debugpy/_vendored"))
13598 (patches (search-patches "python-debugpy-unbundle-pydevd.patch"))
13599 (sha256
13600 (base32
13601 "1dpfzs3p51648i7f3fz8dw5d0vrj39iwn1jhn0226idc02ybyqih"))))
13602 (build-system python-build-system)
13603 (arguments
13604 (list
13605 #:phases
13606 #~(modify-phases %standard-phases
13607 (add-after 'unpack 'patch-sh-in-tests
13608 (lambda _
13609 (substitute* "tests/debugpy/test_run.py"
13610 (("#!/bin/sh")
13611 (string-append "#!" (which "sh"))))))
13612 (add-after 'unpack 'fix-version
13613 ;; Versioneer is useless when there is no git metadata.
13614 (lambda _
13615 (substitute* "setup.py"
13616 (("version=versioneer.get_version\\(),")
13617 (format #f "version=~s," #$version)))))
13618 (add-before 'build 'configure
13619 (lambda _
13620 ;; This adjusts the behavior of debugpy to load pydevd from
13621 ;; Python site packages.
13622 (setenv "DEBUGPY_BUNDLING_DISABLED" "1")))
13623 (replace 'check
13624 (lambda* (#:key tests? #:allow-other-keys)
13625 (invoke "pytest" "-vv"
13626 "-n" (number->string (parallel-job-count))
13627 "-k"
13628 (string-append
13629 ;; These tests cannot be run in parallel because their
13630 ;; test data would not be copied by xdist and lead to
13631 ;; import errors. (see:
13632 ;; https://github.com/microsoft/debugpy/issues/342 and
13633 ;; https://github.com/microsoft/debugpy/issues/880).
13634 "not test_custom_python_args "
13635 "and not test_autokill ")))))))
13636 (native-inputs
13637 ;; See: https://raw.githubusercontent.com/microsoft/debugpy/
13638 ;; main/tests/requirements.txt.
13639 (list python-django
13640 python-gevent
13641 python-flask
13642 python-psutil
13643 python-pytest
13644 python-pytest-cov
13645 python-pytest-timeout
13646 python-pytest-xdist
13647 python-requests))
13648 (propagated-inputs (list python-pydevd))
13649 (home-page "https://aka.ms/debugpy")
13650 (synopsis "Debug Adapter Protocol Python implementation")
13651 (description "An implementation of the Debug Adapter Protocol for
13652 Python.")
13653 (license license:expat)))
13654
13655 (define-public python-debian
13656 (package
13657 (name "python-debian")
13658 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
13659 (version "0.1.36")
13660 (source
13661 (origin
13662 ;; Use git-fetch, as pypi doesn't include test suite.
13663 (method git-fetch)
13664 (uri (git-reference
13665 (url home-page)
13666 (commit version)))
13667 (file-name (git-file-name name version))
13668 (sha256
13669 (base32
13670 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
13671 (build-system python-build-system)
13672 (arguments
13673 `(#:phases (modify-phases %standard-phases
13674 (add-after 'unpack 'remove-debian-specific-tests
13675 ;; python-apt, apt and dpkg are not yet available in guix,
13676 ;; and these tests heavily depend on them.
13677 (lambda _
13678 (delete-file "lib/debian/tests/test_deb822.py")
13679 (delete-file "lib/debian/tests/test_debfile.py")
13680 #t)))))
13681 (propagated-inputs
13682 (list python-six python-chardet))
13683 (synopsis "Debian package related modules")
13684 (description
13685 ;; XXX: Use @enumerate instead of @itemize to work around
13686 ;; <http://bugs.gnu.org/21772>.
13687 "This package provides Python modules that abstract many formats of
13688 Debian-related files, such as:
13689
13690 @enumerate
13691 @item Debtags information;
13692 @item @file{debian/changelog} files;
13693 @item packages files, pdiffs;
13694 @item control files of single or multiple RFC822-style paragraphs---e.g.
13695 @file{debian/control}, @file{.changes}, @file{.dsc};
13696 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
13697 contained files and meta-information.
13698 @end enumerate\n")
13699
13700 ;; Modules are either GPLv2+ or GPLv3+.
13701 (license license:gpl3+)))
13702
13703 (define-public python-json-spec
13704 (package
13705 (name "python-json-spec")
13706 (version "0.10.1")
13707 (source
13708 (origin
13709 (method url-fetch)
13710 (uri (pypi-uri "json-spec" version))
13711 (sha256
13712 (base32
13713 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
13714 (build-system python-build-system)
13715 (propagated-inputs
13716 (list python-pathlib python-six))
13717 (native-inputs
13718 (list python-pytest))
13719 (home-page "http://py.errorist.io/json-spec")
13720 (synopsis
13721 "JSON Schema, JSON Pointer and JSON Reference for Python")
13722 (description
13723 "This Python library implements several JSON specs, like JSON Schema,
13724 JSON Reference and JSON Pointer.")
13725 (license license:bsd-3)))
13726
13727 (define-public python-fastbencode
13728 (package
13729 (name "python-fastbencode")
13730 (version "0.0.7")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "fastbencode" version))
13735 (sha256
13736 (base32 "1r66w3vpmvfmssshjpgqaj2m14c8p94nymr96mwn61idajz9mg5n"))))
13737 (build-system python-build-system)
13738 (home-page "https://github.com/breezy-team/fastbencode")
13739 (synopsis "Python Bencode (de)serializer with optional fast C extensions")
13740 (description
13741 "The fastbencode Python package implements the bencode serialization
13742 format for storing and transmitting loosely structured data, originally used
13743 by BitTorrent.
13744
13745 The format can encode four different types of values: byte strings, integers,
13746 lists, and dictionaries (associative arrays). It's simple and unaffected by
13747 endianness,
13748
13749 This package includes both a pure-Python version and an optional C extension
13750 based on Cython. Both provide the same functionality, but the C version has
13751 significantly better performance.")
13752 (license (list license:expat ; _bencode_py.py
13753 license:gpl2+)))) ; __init__.py
13754
13755 (define-public python-fastjsonschema
13756 (package
13757 (name "python-fastjsonschema")
13758 (version "2.15.1")
13759 (source
13760 (origin
13761 (method url-fetch)
13762 (uri (pypi-uri "fastjsonschema" version))
13763 (sha256
13764 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
13765 (build-system python-build-system)
13766 (arguments
13767 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
13768 #:phases
13769 (modify-phases %standard-phases
13770 (replace 'check
13771 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
13772 (when tests?
13773 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
13774 (native-inputs
13775 (list python-colorama
13776 python-json-spec
13777 python-jsonschema
13778 python-pylint
13779 python-pytest
13780 python-pytest-benchmark
13781 python-pytest-cache
13782 python-validictory))
13783 (home-page
13784 "https://github.com/horejsek/python-fastjsonschema")
13785 (synopsis
13786 "Fast Python implementation of JSON schema")
13787 (description
13788 "This library implements validation of JSON documents by JSON schema for
13789 drafts 04, 06 and 07.")
13790 (license license:bsd-3)))
13791
13792 (define-public python-nbformat
13793 (package
13794 (name "python-nbformat")
13795 (version "5.3.0")
13796 ;; The PyPi release tarball lacks some test cases and test data.
13797 (source (origin
13798 (method git-fetch)
13799 (uri (git-reference
13800 (url "https://github.com/jupyter/nbformat")
13801 (commit version)))
13802 (sha256
13803 (base32
13804 "114c5c6cvpxhxj8zrw74351gcfzyzjh1jq3py4xf8wk9rahfay9z"))
13805 (file-name (git-file-name name version))))
13806 (build-system python-build-system)
13807 (arguments
13808 `(#:phases
13809 (modify-phases %standard-phases
13810 (replace 'check
13811 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
13812 (when tests?
13813 (invoke "pytest" "-vv")))))))
13814 (propagated-inputs
13815 (list python-fastjsonschema python-jsonschema python-jupyter-core
13816 python-traitlets))
13817 (native-inputs
13818 (list python-pytest
13819 python-testpath))
13820 (home-page "https://jupyter.org")
13821 (synopsis "Jupyter Notebook format")
13822 (description "This package provides the reference implementation of the
13823 Jupyter Notebook format and Python APIs for working with notebooks.")
13824 (license license:bsd-3)))
13825
13826 (define-public python-nb-clean
13827 (package
13828 (name "python-nb-clean")
13829 (version "2.1.0")
13830 (source
13831 (origin
13832 (method url-fetch)
13833 (uri (pypi-uri "nb-clean" version))
13834 (sha256
13835 (base32 "01qvk9n7rx15dhc23m8bj9bw5wdyxh6y18c5fm8hllmrd3ndsx14"))))
13836 (build-system python-build-system)
13837 (propagated-inputs (list python-nbformat))
13838 (home-page "https://github.com/srstevenson/nb-clean")
13839 (synopsis "Clean Jupyter notebooks for versioning")
13840 (description "This package cleans Jupyter notebooks of cell execution
13841 counts, metadata, outputs, and empty cells, preparing them for committing to
13842 version control. It provides a Git filter to automatically clean notebooks
13843 before they're staged, and can also be used with other version control
13844 systems, as a command line tool, and as a Python library.")
13845 (license license:isc)))
13846
13847 (define-public python-bleach
13848 (package
13849 (name "python-bleach")
13850 (version "5.0.0")
13851 (source
13852 (origin
13853 (method url-fetch)
13854 (uri (pypi-uri "bleach" version))
13855 (sha256
13856 (base32 "0rc5avysbsl3w3i2qvb6522263zhwlvf50w0ifs8776w9c2wrmn6"))))
13857 (build-system python-build-system)
13858 (arguments
13859 '(#:phases (modify-phases %standard-phases
13860 (replace 'check
13861 (lambda* (#:key tests? #:allow-other-keys)
13862 (when tests? (invoke "pytest" "-vv")))))))
13863 (propagated-inputs (list python-tinycss2 python-webencodings))
13864 (native-inputs (list python-pytest))
13865 (home-page "https://github.com/mozilla/bleach")
13866 (synopsis "Whitelist-based HTML-sanitizing tool")
13867 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
13868 (license license:asl2.0)))
13869
13870 (define-public python-entrypoints
13871 (package
13872 (name "python-entrypoints")
13873 (version "0.3")
13874 (source
13875 (origin
13876 (method url-fetch)
13877 (uri (pypi-uri "entrypoints" version))
13878 (sha256
13879 (base32
13880 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
13881 (build-system python-build-system)
13882 ;; The package does not come with a setup.py file, so we have to generate
13883 ;; one ourselves.
13884 (arguments
13885 `(#:tests? #f
13886 #:phases
13887 (modify-phases %standard-phases
13888 (add-after 'unpack 'create-setup.py
13889 (lambda _
13890 (call-with-output-file "setup.py"
13891 (lambda (port)
13892 (format port "\
13893 from setuptools import setup
13894 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
13895 " ,version))))))))
13896 (home-page "https://github.com/takluyver/entrypoints")
13897 (synopsis "Discover and load entry points from installed Python packages")
13898 (description "Entry points are a way for Python packages to advertise
13899 objects with some common interface. The most common examples are
13900 @code{console_scripts} entry points, which define shell commands by
13901 identifying a Python function to run. The @code{entrypoints} module contains
13902 functions to find and load entry points.")
13903 (license license:expat)
13904 (properties `((python2-variant . ,(delay python2-entrypoints))))))
13905
13906 (define-public python2-entrypoints
13907 (package
13908 (inherit (package-with-python2
13909 (strip-python2-variant python-entrypoints)))
13910 (propagated-inputs
13911 (list python2-configparser))))
13912
13913 (define-public python-epc
13914 (package
13915 (name "python-epc")
13916 (version "0.0.5")
13917 (source
13918 (origin
13919 (method url-fetch)
13920 (uri (pypi-uri "epc" version))
13921 (sha256
13922 (base32
13923 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
13924 (build-system python-build-system)
13925 (propagated-inputs
13926 (list python-sexpdata))
13927 (native-inputs
13928 (list python-nose))
13929 (home-page "https://github.com/tkf/python-epc")
13930 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
13931 (description
13932 "Python-EPC can call elisp functions from Python and Python functions
13933 from elisp.")
13934 (license license:gpl3)))
13935
13936 (define-public python-forex-python
13937 (package
13938 (name "python-forex-python")
13939 (version "1.5")
13940 (source
13941 (origin
13942 (method url-fetch)
13943 (uri (pypi-uri "forex-python" version))
13944 (sha256
13945 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
13946 (build-system python-build-system)
13947 (arguments
13948 ;; Tests are not included in the PyPI tarball. Also, the tests in the
13949 ;; repository require online data.
13950 `(#:tests? #f))
13951 (propagated-inputs
13952 (list python-requests python-simplejson))
13953 (home-page "https://github.com/MicroPyramid/forex-python")
13954 (synopsis "Foreign exchange rates and currency conversion")
13955 (description
13956 "@code{python-forex-python} can be used to manipulate foreign
13957 exchange rates and to operate currency conversions.
13958
13959 Features:
13960 @itemize
13961 @item List all currency rates.
13962 @item BitCoin price for all currencies.
13963 @item Converting amount to BitCoins.
13964 @item Get historical rates for any day since 1999.
13965 @item Conversion rate for one currency(ex; USD to INR).
13966 @item Convert amount from one currency to other.('USD 10$' to INR).
13967 @item Currency symbols.
13968 @item Currency names.
13969 @end itemize")
13970 (license license:expat)))
13971
13972 (define-public python-simpleeval
13973 (package
13974 (name "python-simpleeval")
13975 (version "0.9.12")
13976 (source
13977 (origin
13978 (method url-fetch)
13979 (uri (pypi-uri "simpleeval" version))
13980 (sha256
13981 (base32 "0diysdzvx865yy2rjfah75ha2qfxaxz7r108kp7j2kkd903ya2ry"))))
13982 (build-system python-build-system)
13983 (home-page "https://github.com/danthedeckie/simpleeval")
13984 (synopsis "Simple, safe single expression evaluator library")
13985 (description
13986 "This package provides a quick single file library for easily adding
13987 evaluatable expressions into python projects. Say you want to allow a user
13988 to set an alarm volume, which could depend on the time of day, alarm level,
13989 how many previous alarms had gone off, and if there is music playing at the
13990 time.")
13991 (license license:expat)))
13992
13993 (define-public python-nbconvert
13994 (package
13995 (name "python-nbconvert")
13996 (version "6.5.0")
13997 (source
13998 (origin
13999 (method url-fetch)
14000 (uri (pypi-uri "nbconvert" version))
14001 (sha256
14002 (base32
14003 "17g9xq4za7vvzml6l6d8zrzknhxsvgx02hymmsw9d1dygbi4cgi2"))))
14004 (build-system python-build-system)
14005 (arguments
14006 (list
14007 #:phases
14008 #~(modify-phases %standard-phases
14009 (add-after 'unpack 'fix-paths
14010 (lambda* (#:key inputs #:allow-other-keys)
14011 ;; Use pandoc binary from input.
14012 (substitute* "nbconvert/utils/pandoc.py"
14013 (("'pandoc'")
14014 (format #f "~s" (search-input-file inputs "bin/pandoc"))))
14015 ;; Same for LaTeX.
14016 (substitute* "nbconvert/exporters/pdf.py"
14017 (("\"xelatex\"")
14018 (format #f "~s" (search-input-file inputs "bin/xelatex")))
14019 (("\"bibtex\"")
14020 (format #f "~s" (search-input-file inputs "bin/bibtex"))))
14021 ;; Likewise for Inkscape.
14022 (substitute* "nbconvert/preprocessors/svg2pdf.py"
14023 (("inkscape_path = which\\(\"inkscape\")")
14024 (format #f "inkscape_path = ~s"
14025 (search-input-file inputs "bin/inkscape"))))))
14026 (replace 'check
14027 (lambda* (#:key tests? #:allow-other-keys)
14028 (when tests?
14029 ;; Tests depend on templates installed to output.
14030 (setenv "JUPYTER_PATH"
14031 (string-append #$output "/share/jupyter:"
14032 (getenv "JUPYTER_PATH")))
14033 ;; Step outside of the source directory to avoid having both
14034 ;; the installed package *and* the package from the source on
14035 ;; Python's path.
14036 (with-directory-excursion "/tmp"
14037 (invoke "pytest" "--pyargs" "nbconvert"
14038 "-vv" "-n" (number->string (parallel-job-count))
14039 "-k"
14040 (string-append
14041 ;; These tests require pyppeteer, not yet
14042 ;; available in Guix.
14043 "not test_webpdf_with_chromium "
14044 "and not test_webpdf.py "
14045 ;; These tests require ipywidgets, which would
14046 ;; introduce a dependency cycle.
14047 "and not test_execute_widgets_from_nbconvert "
14048 "and not test_execute_multiple_notebooks ")))))))))
14049 (inputs
14050 (list inkscape pandoc))
14051 (native-inputs
14052 (list python-ipykernel
14053 ;; Adding ipywidgets would create a cycle.
14054 ;;python-ipywidgets
14055 ;;python-pyppeteer ;TODO: package me
14056 python-pytest
14057 python-pytest-xdist))
14058 (propagated-inputs
14059 (list python-beautifulsoup4
14060 python-bleach
14061 python-defusedxml
14062 python-entrypoints
14063 python-jinja2
14064 python-jupyter-core
14065 python-mistune
14066 python-nbclient
14067 python-nbformat
14068 python-pandocfilters
14069 python-pygments
14070 python-jupyterlab-pygments
14071 python-testpath
14072 python-traitlets
14073 ;; Required, even if [serve] is not used.
14074 python-tornado-6
14075 ;; Required at runtime for `jupyter nbconvert --to=pdf`.
14076 texlive-adjustbox
14077 texlive-booktabs
14078 texlive-caption
14079 texlive-enumitem
14080 texlive-fontspec
14081 texlive-generic-iftex
14082 texlive-grffile
14083 texlive-hyperref
14084 texlive-latex-fancyvrb
14085 texlive-latex-float
14086 texlive-latex-geometry
14087 texlive-latex-jknapltx
14088 texlive-latex-ms
14089 texlive-latex-parskip
14090 texlive-latex-trimspaces
14091 texlive-latex-upquote
14092 texlive-stringenc
14093 texlive-tcolorbox
14094 texlive-titling
14095 texlive-tools
14096 texlive-ulem
14097 texlive-unicode-math
14098 texlive-xcolor
14099 (texlive-updmap.cfg (list texlive-amsfonts
14100 texlive-eurosym
14101 texlive-fonts-rsfs
14102 texlive-jknappen
14103 texlive-latex-amsmath
14104 texlive-latex-ucs
14105 texlive-lm
14106 texlive-lm-math
14107 texlive-mathpazo
14108 texlive-oberdiek
14109 texlive-zapfding))))
14110 (home-page "https://jupyter.org")
14111 (synopsis "Converting Jupyter Notebooks")
14112 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
14113 notebooks to various other formats via Jinja templates. It allows you to
14114 convert an @code{.ipynb} notebook file into various static formats including:
14115
14116 @enumerate
14117 @item HTML
14118 @item LaTeX
14119 @item PDF
14120 @item Reveal JS
14121 @item Markdown (md)
14122 @item ReStructured Text (rst)
14123 @item executable script
14124 @end enumerate\n")
14125 (license license:bsd-3)))
14126
14127 (define-public python-notebook
14128 (package
14129 (name "python-notebook")
14130 (version "6.4.10")
14131 (source (origin
14132 (method url-fetch)
14133 (uri (pypi-uri "notebook" version))
14134 (sha256
14135 (base32
14136 "03p976xq1l9xf4djwk0snmywd0zck3i6gjngxsl874i8qrmsf214"))))
14137 (build-system python-build-system)
14138 (arguments
14139 `(#:phases
14140 (modify-phases %standard-phases
14141 (add-after 'unpack 'use-our-home-for-tests
14142 (lambda _
14143 ;; The 'get_patch_env' function in this file reads:
14144 ;; 'HOME': cls.home_dir
14145 ;; but for some reason, that definition of HOME is not what the
14146 ;; GLib/GIO trash mechanism honors, which would cause test
14147 ;; failures. Instead, set 'HOME' here to an existing directory
14148 ;; and let the tests honor it.
14149 (substitute* "notebook/tests/launchnotebook.py"
14150 (("'HOME': .*," all)
14151 (string-append "# " all "\n")))
14152 (setenv "HOME" (getcwd))))
14153 (replace 'check
14154 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
14155 ;; These tests require a browser.
14156 (delete-file-recursively "notebook/tests/selenium")
14157 (when tests?
14158 ;; Interferes with test expectations.
14159 (unsetenv "JUPYTER_CONFIG_PATH")
14160 ;; Some tests do not expect all files to be installed in the
14161 ;; same directory, but JUPYTER_PATH contains multiple entries.
14162 (unsetenv "JUPYTER_PATH")
14163 (invoke "pytest" "-vv"
14164 ;; TODO: This tests fails because nbconvert does not
14165 ;; list "python" as a format.
14166 "-k" "not test_list_formats")))))))
14167 (propagated-inputs
14168 (list python-argon2-cffi
14169 python-ipykernel
14170 python-ipython-genutils
14171 python-jinja2
14172 python-jupyter-client
14173 python-jupyter-core
14174 python-nest-asyncio
14175 python-nbconvert
14176 python-nbformat
14177 python-prometheus-client
14178 python-pyzmq
14179 python-send2trash
14180 python-terminado
14181 python-tornado-6
14182 python-traitlets))
14183 (native-inputs
14184 (list python-coverage
14185 python-nbval
14186 python-pytest
14187 python-pytest-cov
14188 python-requests
14189 python-requests-unixsocket))
14190 (home-page "https://jupyter.org/")
14191 (synopsis "Web-based notebook environment for interactive computing")
14192 (description
14193 "The Jupyter HTML notebook is a web-based notebook environment for
14194 interactive computing.")
14195 (license license:bsd-3)))
14196
14197 (define-public python-widgetsnbextension
14198 (package
14199 (name "python-widgetsnbextension")
14200 (version "3.5.1")
14201 (source
14202 (origin
14203 (method url-fetch)
14204 (uri (pypi-uri "widgetsnbextension" version))
14205 (sha256
14206 (base32
14207 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
14208 (build-system python-build-system)
14209 (propagated-inputs
14210 (list python-notebook))
14211 (home-page "https://ipython.org")
14212 (synopsis "IPython HTML widgets for Jupyter")
14213 (description "This package provides interactive HTML widgets for Jupyter
14214 notebooks.")
14215 (license license:bsd-3)))
14216
14217 (define-public python-ipywidgets
14218 (package
14219 (name "python-ipywidgets")
14220 (version "7.6.3")
14221 (source
14222 (origin
14223 (method url-fetch)
14224 (uri (pypi-uri "ipywidgets" version))
14225 (sha256
14226 (base32
14227 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
14228 (build-system python-build-system)
14229 (propagated-inputs
14230 (list python-ipykernel
14231 python-ipython
14232 python-jupyterlab-widgets
14233 python-nbformat
14234 python-traitlets
14235 python-widgetsnbextension))
14236 (native-inputs
14237 (list python-mock python-pytest python-pytest-cov))
14238 (home-page "https://ipython.org")
14239 (synopsis "IPython HTML widgets for Jupyter")
14240 (description "Ipywidgets are interactive HTML widgets for Jupyter
14241 notebooks and the IPython kernel. Notebooks come alive when interactive
14242 widgets are used. Users gain control of their data and can visualize changes
14243 in the data.")
14244 (license license:bsd-3)))
14245
14246 (define-public python-jupyter-console
14247 (package
14248 (name "python-jupyter-console")
14249 (version "6.4.0")
14250 (source
14251 (origin
14252 (method url-fetch)
14253 (uri (pypi-uri "jupyter_console" version))
14254 (sha256
14255 (base32
14256 "1iqrxhd8hvlyf8cqbc731ssnwm61wrycnbiczy5wsfahd3hlh8i4"))))
14257 (build-system python-build-system)
14258 (propagated-inputs
14259 (list python-ipykernel python-jupyter-client python-prompt-toolkit
14260 python-pygments))
14261 (native-inputs
14262 (list python-nose python-pytest))
14263 (home-page "https://jupyter.org")
14264 (synopsis "Jupyter terminal console")
14265 (description "This package provides a terminal-based console frontend for
14266 Jupyter kernels. It also allows for console-based interaction with non-Python
14267 Jupyter kernels such as IJulia and IRKernel.")
14268 (license license:bsd-3)))
14269
14270 ;; The python-ipython and python-jupyter-console require each other. To get
14271 ;; the functionality in both packages working, strip down the
14272 ;; python-jupyter-console package when using it as an input to python-ipython.
14273 (define python-jupyter-console-minimal
14274 (package/inherit python-jupyter-console
14275 (name "python-jupyter-console-minimal")
14276 (arguments
14277 (substitute-keyword-arguments
14278 (package-arguments python-jupyter-console)
14279 ((#:phases phases)
14280 `(modify-phases ,phases
14281 (add-after 'install 'delete-bin
14282 (lambda* (#:key outputs #:allow-other-keys)
14283 ;; Delete the bin files, to avoid conflicts in profiles
14284 ;; where python-ipython and python-jupyter-console are
14285 ;; both present.
14286 (delete-file-recursively
14287 (string-append
14288 (assoc-ref outputs "out") "/bin"))))))))
14289 ;; Remove the python-ipython propagated input, to avoid the cycle
14290 (propagated-inputs
14291 (modify-inputs (package-propagated-inputs python-jupyter-console)
14292 (delete "python-ipython")))))
14293
14294 (define-public python-qtconsole
14295 (package
14296 (name "python-qtconsole")
14297 (version "5.3.0")
14298 (source
14299 (origin
14300 (method url-fetch)
14301 (uri (pypi-uri "qtconsole" version))
14302 (sha256
14303 (base32 "09anp8g7vqi8z8wyi2lv21a2frd2dyhyrzvcrk2anijyqzyj0dcf"))))
14304 (build-system python-build-system)
14305 (arguments
14306 `(#:phases
14307 (modify-phases %standard-phases
14308 (add-before 'check 'pre-check
14309 (lambda _
14310 (setenv "QT_QPA_PLATFORM" "offscreen")
14311 (setenv "HOME" "/tmp")
14312 ;; FIXME: skip a failing test.
14313 (substitute* "qtconsole/tests/test_jupyter_widget.py"
14314 (("def test_other_output") "def _test_other_output")))))))
14315 (propagated-inputs
14316 (list python-ipykernel python-ipython-genutils python-jupyter-client
14317 python-jupyter-core python-pygments python-pyqt python-pyzmq
14318 python-qtpy python-traitlets))
14319 (native-inputs
14320 (list python-flaky python-pytest python-pytest-qt))
14321 (home-page "https://jupyter.org")
14322 (synopsis "Jupyter Qt console")
14323 (description "This package provides a Qt-based console for Jupyter with
14324 support for rich media output.")
14325 (license license:bsd-3)))
14326
14327 (define-public python-jsbeautifier
14328 (package
14329 (name "python-jsbeautifier")
14330 (version "1.10.2")
14331 (home-page "https://github.com/beautify-web/js-beautify")
14332 (source (origin
14333 (method git-fetch)
14334 (uri (git-reference
14335 (url home-page)
14336 (commit (string-append "v" version))))
14337 (file-name (git-file-name name version))
14338 (sha256
14339 (base32
14340 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
14341 (build-system python-build-system)
14342 (arguments
14343 `(#:phases (modify-phases %standard-phases
14344 (add-after 'unpack 'chdir
14345 (lambda _
14346 ;; The upstream Git repository contains all the code,
14347 ;; but this package only builds the python code.
14348 (chdir "python")
14349 #t))
14350 (add-after 'unpack 'patch-python-six-requirements
14351 (lambda _
14352 (substitute* "python/setup.py"
14353 (("six>=1.12.0")
14354 "six>=1.11.0"))
14355 #t)))))
14356 (propagated-inputs
14357 (list python-editorconfig python-six))
14358 (native-inputs
14359 (list python-pytest))
14360 (synopsis "JavaScript unobfuscator and beautifier")
14361 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
14362 popular online obfuscators.")
14363 (license license:expat)))
14364
14365 (define-public jupyter
14366 (package
14367 (name "jupyter")
14368 (version "1.0.0")
14369 (source
14370 (origin
14371 (method url-fetch)
14372 (uri (pypi-uri "jupyter" version))
14373 (sha256
14374 (base32
14375 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
14376 (build-system python-build-system)
14377 (arguments '(#:tests? #f)) ; there are none.
14378 (propagated-inputs
14379 (list python-ipykernel
14380 python-ipywidgets
14381 python-jupyter-console
14382 python-nbconvert
14383 python-notebook
14384 python-qtconsole))
14385 (home-page "https://jupyter.org")
14386 (synopsis "Web application for interactive documents")
14387 (description
14388 "The Jupyter Notebook is a web application that allows you to create and
14389 share documents that contain live code, equations, visualizations and
14390 explanatory text. Uses include: data cleaning and transformation, numerical
14391 simulation, statistical modeling, machine learning and much more.")
14392 (license license:bsd-3)))
14393
14394 (define-public python-chardet
14395 (package
14396 (name "python-chardet")
14397 (version "3.0.4")
14398 (source
14399 (origin
14400 (method url-fetch)
14401 (uri (pypi-uri "chardet" version))
14402 (sha256
14403 (base32
14404 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
14405 (native-inputs
14406 (list python-hypothesis python-pytest python-pytest-runner))
14407 (build-system python-build-system)
14408 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
14409 (arguments `(#:tests? #f))
14410 (home-page "https://github.com/chardet/chardet")
14411 (synopsis "Universal encoding detector for Python 2 and 3")
14412 (description
14413 "This package provides @code{chardet}, a Python module that can
14414 automatically detect a wide range of file encodings.")
14415 (license license:lgpl2.1+)))
14416
14417 (define-public python2-chardet
14418 (package-with-python2 python-chardet))
14419
14420 (define-public python-charset-normalizer
14421 (package
14422 (name "python-charset-normalizer")
14423 (version "2.0.5")
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "charset-normalizer" version))
14428 (sha256
14429 (base32 "0rr3iv2xw4rz5ijnfqk229fw85cq6p6rhqqsilm0ldzncblfg63h"))))
14430 (build-system python-build-system)
14431 (native-inputs
14432 (list python-pytest))
14433 (home-page "https://github.com/ousret/charset_normalizer")
14434 (synopsis "Universal Charset Detector, alternative to Chardet")
14435 (description "This library helps you read text from an unknown charset
14436 encoding. Motivated by @code{chardet}, it tries to resolve the issue by
14437 taking a new approach. All IANA character set names for which the Python core
14438 library provides codecs are supported.")
14439 (license license:expat)))
14440
14441 (define-public python-docopt
14442 (package
14443 (name "python-docopt")
14444 (version "0.6.2")
14445 (source
14446 (origin
14447 (method git-fetch)
14448 ;; The release on PyPI does not include tests.
14449 (uri (git-reference
14450 (url "https://github.com/docopt/docopt")
14451 (commit version)))
14452 (file-name (git-file-name name version))
14453 (sha256
14454 (base32
14455 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
14456 (patches (search-patches "python-docopt-pytest6-compat.patch"))))
14457 (build-system python-build-system)
14458 (native-inputs
14459 (list python-pytest))
14460 (arguments
14461 `(#:phases
14462 (modify-phases %standard-phases
14463 (replace 'check
14464 (lambda* (#:key tests? #:allow-other-keys)
14465 (when tests?
14466 (invoke "py.test")))))))
14467 (home-page "http://docopt.org")
14468 (synopsis "Command-line interface description language for Python")
14469 (description "This library allows the user to define a command-line
14470 interface from a program's help message rather than specifying it
14471 programmatically with command-line parsers like @code{getopt} and
14472 @code{argparse}.")
14473 (license license:expat)))
14474
14475 (define-public python2-docopt
14476 (package-with-python2 python-docopt))
14477
14478 (define-public python-pythonanywhere
14479 (package
14480 (name "python-pythonanywhere")
14481 (version "0.9.10")
14482 (source
14483 (origin
14484 (method git-fetch)
14485 (uri (git-reference
14486 (url "https://github.com/pythonanywhere/helper_scripts")
14487 (commit (string-append "v" version))))
14488 (file-name (git-file-name name version))
14489 (sha256
14490 (base32
14491 "0vzzc1g8pl7cb9yvm3n1j5zlzxf0jd423rzspc2kvpb8yhvydklx"))))
14492 (build-system python-build-system)
14493 (arguments
14494 `(#:phases
14495 (modify-phases %standard-phases
14496 (add-before 'check 'change-home
14497 (lambda _
14498 (setenv "HOME" "/tmp")))
14499 (replace 'check
14500 (lambda* (#:key tests? #:allow-other-keys)
14501 (when tests?
14502 ;; Exclude tests marked as slowtest that assume running
14503 ;; inside Git repository on system with virtualenvwrapper
14504 ;; installed.
14505 (invoke "pytest" "-m" "not slowtest")))))))
14506 (native-inputs
14507 (list python-pytest
14508 python-psutil
14509 python-responses
14510 python-pytest-mock))
14511 (propagated-inputs
14512 (list python-dateutil
14513 python-docopt
14514 python-packaging
14515 python-requests
14516 python-schema
14517 python-tabulate
14518 python-typer))
14519 (home-page "https://github.com/pythonanywhere/helper_scripts/")
14520 (synopsis "PythonAnywhere helper tools for users")
14521 (description "PythonAnywhere provides a command-line interface and an
14522 application programming interface that allows managing Web apps and scheduled
14523 tasks. It includes single-command deployment for the Django Girls tutorial.")
14524 (license license:expat)))
14525
14526 (define-public python-pythondialog
14527 (package
14528 (name "python-pythondialog")
14529 (version "3.4.0")
14530 (source
14531 (origin
14532 (method url-fetch)
14533 (uri (pypi-uri "pythondialog" version))
14534 (sha256
14535 (base32
14536 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
14537 (build-system python-build-system)
14538 (arguments
14539 `(#:phases
14540 (modify-phases %standard-phases
14541 (add-after 'unpack 'patch-path
14542 (lambda* (#:key inputs #:allow-other-keys)
14543 (let* ((dialog (assoc-ref inputs "dialog")))
14544 ;; Since this library really wants to grovel the search path, we
14545 ;; must hardcode dialog's store path into it.
14546 (substitute* "dialog.py"
14547 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
14548 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
14549 #t))))
14550 #:tests? #f)) ; no test suite
14551 (propagated-inputs
14552 (list dialog))
14553 (home-page "http://pythondialog.sourceforge.net/")
14554 (synopsis "Python interface to the UNIX dialog utility")
14555 (description "A Python wrapper for the dialog utility. Its purpose is to
14556 provide an easy to use, pythonic and comprehensive Python interface to dialog.
14557 This allows one to make simple text-mode user interfaces on Unix-like systems")
14558 (license license:lgpl2.1)
14559 (properties `((python2-variant . ,(delay python2-pythondialog))))))
14560
14561 (define-public python2-pythondialog
14562 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
14563 (package
14564 (inherit base)
14565 (version (package-version python-pythondialog))
14566 (source (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "python2-pythondialog" version))
14569 (sha256
14570 (base32
14571 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
14572
14573 (define-public python-configobj
14574 (package
14575 (name "python-configobj")
14576 (version "5.0.6")
14577 (source (origin
14578 (method url-fetch)
14579 (uri (pypi-uri "configobj" version))
14580 (sha256
14581 (base32
14582 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
14583 ;; Patch setup.py so it looks for python-setuptools, which is
14584 ;; required to parse the keyword 'install_requires' in setup.py.
14585 (patches (search-patches "python-configobj-setuptools.patch"))))
14586 (build-system python-build-system)
14587 (propagated-inputs
14588 (list python-six))
14589 (synopsis "Config file reading, writing and validation")
14590 (description "ConfigObj is a simple but powerful config file reader and
14591 writer: an ini file round tripper. Its main feature is that it is very easy to
14592 use, with a straightforward programmer’s interface and a simple syntax for
14593 config files.")
14594 (home-page "https://github.com/DiffSK/configobj")
14595 (license license:bsd-3)))
14596
14597 (define-public python2-configobj
14598 (package-with-python2 python-configobj))
14599
14600 (define-public python-configargparse
14601 (package
14602 (name "python-configargparse")
14603 (version "1.2.3")
14604 (source (origin
14605 (method url-fetch)
14606 (uri (pypi-uri "ConfigArgParse" version))
14607 (sha256
14608 (base32
14609 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
14610 (build-system python-build-system)
14611 (native-inputs
14612 (list python-pyyaml))
14613 (arguments
14614 `(#:phases
14615 (modify-phases %standard-phases
14616 (replace 'check
14617 (lambda _
14618 ;; Bypass setuptools-shim because one test relies on "setup.py"
14619 ;; being the first argument passed to the python call.
14620 ;;
14621 ;; NOTE: Many tests do not run because they rely on Python's
14622 ;; built-in test.test_argparse, but we remove the unit tests from
14623 ;; our Python installation.
14624 (invoke "python" "setup.py" "test"))))))
14625 (synopsis "Replacement for argparse")
14626 (description "A drop-in replacement for argparse that allows options to also
14627 be set via config files and/or environment variables.")
14628 (home-page "https://github.com/bw2/ConfigArgParse")
14629 (license license:expat)))
14630
14631 (define-public python-connection-pool
14632 (package
14633 (name "python-connection-pool")
14634 (version "0.0.3")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "connection_pool" version))
14639 (sha256
14640 (base32 "1p6hfkcl4n3hhhcgjbaxn21i7b1yipag6j7dnilir4k5xxx9whmz"))))
14641 (build-system python-build-system)
14642 (home-page "https://github.com/zhouyl/ConnectionPool")
14643 (synopsis "Thread-safe connection pool")
14644 (description "This package provides a library implementing a thread-safe
14645 connection pool.")
14646 (license license:expat)))
14647
14648 (define-public python-argparse-manpage
14649 (package
14650 (name "python-argparse-manpage")
14651 (version "1.1")
14652 (source
14653 (origin
14654 (method url-fetch)
14655 (uri (pypi-uri "argparse-manpage" version))
14656 (sha256
14657 (base32
14658 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
14659 (build-system python-build-system)
14660 (home-page "https://github.com/praiskup/argparse-manpage")
14661 (synopsis "Build manual page from Python's ArgumentParser object")
14662 (description
14663 "This package provides tools to build manual pages from Python's
14664 @code{ArgumentParser} object.")
14665 (license license:asl2.0)))
14666
14667 (define-public python-contextlib2
14668 (package
14669 (name "python-contextlib2")
14670 (version "0.6.0.post1")
14671 (source
14672 (origin
14673 (method url-fetch)
14674 (uri (pypi-uri "contextlib2" version))
14675 (sha256
14676 (base32
14677 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
14678 (build-system python-build-system)
14679 (home-page "https://contextlib2.readthedocs.org/")
14680 (synopsis "Tools for decorators and context managers")
14681 (description "This module is primarily a backport of the Python
14682 3.2 contextlib to earlier Python versions. Like contextlib, it
14683 provides utilities for common tasks involving decorators and context
14684 managers. It also contains additional features that are not part of
14685 the standard library.")
14686 (properties `((python2-variant . ,(delay python2-contextlib2))))
14687 (license license:psfl)))
14688
14689 (define-public python2-contextlib2
14690 (let ((base (package-with-python2
14691 (strip-python2-variant python-contextlib2))))
14692 (package/inherit base
14693 (arguments
14694 (substitute-keyword-arguments (package-arguments base)
14695 ((#:phases phases)
14696 `(modify-phases ,phases
14697 (replace 'check
14698 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
14699 (native-inputs
14700 `(("python2-unittest2" ,python2-unittest2))))))
14701
14702 ;; This package is used by python2-pytest via python2-importlib-metadata,
14703 ;; and thus can not depend on python-unittest2 (which depends on pytest).
14704 (define-public python2-contextlib2-bootstrap
14705 (hidden-package
14706 (package/inherit
14707 python2-contextlib2
14708 (name "python2-contextlib2-bootstrap")
14709 (arguments
14710 `(#:tests? #f
14711 ,@(package-arguments python2-contextlib2)))
14712 (native-inputs '()))))
14713
14714 (define-public python-texttable
14715 (package
14716 (name "python-texttable")
14717 (version "1.6.4")
14718 (source
14719 (origin
14720 (method url-fetch)
14721 (uri (pypi-uri "texttable" version))
14722 (sha256
14723 (base32
14724 "1sbn821394rix6xgj3zqk743pj6nqm1qz81zgis2bcpp2ng7pvj2"))))
14725 (build-system python-build-system)
14726 (arguments
14727 `(#:phases
14728 (modify-phases %standard-phases
14729 (replace 'check
14730 (lambda* (#:key tests? #:allow-other-keys)
14731 (when tests? (invoke "pytest" "-vv" "tests.py")))))))
14732 (native-inputs
14733 (list python-pytest))
14734 (home-page "https://github.com/foutaise/texttable/")
14735 (synopsis "Python module for creating simple ASCII tables")
14736 (description "Texttable is a Python module for creating simple ASCII
14737 tables.")
14738 (license license:expat)))
14739
14740 (define-public python2-texttable
14741 (package-with-python2 python-texttable))
14742
14743 (define-public python-atomicwrites
14744 (package
14745 (name "python-atomicwrites")
14746 (version "1.4.0")
14747 (source (origin
14748 (method url-fetch)
14749 (uri (pypi-uri "atomicwrites" version))
14750 (sha256
14751 (base32
14752 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
14753 (build-system python-build-system)
14754 (arguments `(#:tests? #f)) ;avoid circular dependency with pytest
14755 (synopsis "Atomic file writes in Python")
14756 (description "Library for atomic file writes using platform dependent tools
14757 for atomic file system operations.")
14758 (home-page "https://github.com/untitaker/python-atomicwrites")
14759 (license license:expat)))
14760
14761 (define-public python2-atomicwrites
14762 (package-with-python2 python-atomicwrites))
14763
14764 (define-public python-atomicwrites-1.4
14765 (package
14766 (inherit python-atomicwrites)
14767 (version "1.4.0")
14768 (source (origin
14769 (method url-fetch)
14770 (uri (pypi-uri "atomicwrites" version))
14771 (sha256
14772 (base32
14773 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))))
14774
14775 (define-public python-qstylizer
14776 (package
14777 (name "python-qstylizer")
14778 (version "0.1.10")
14779 (source
14780 (origin
14781 (method git-fetch)
14782 (uri (git-reference
14783 (url "https://github.com/blambright/qstylizer")
14784 (commit version)))
14785 (file-name (git-file-name name version))
14786 (sha256
14787 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
14788 (build-system python-build-system)
14789 (arguments
14790 `(#:test-target "pytest"
14791 #:phases
14792 (modify-phases %standard-phases
14793 (add-before 'build 'set-pbr-version
14794 (lambda _
14795 (setenv "PBR_VERSION" "3.0.1"))))))
14796 (native-inputs
14797 (list python-pbr
14798 python-pytest
14799 python-pytest-catchlog
14800 python-pytest-cov
14801 python-pytest-mock
14802 python-pytest-runner
14803 python-pytest-xdist))
14804 (propagated-inputs
14805 (list python-inflection python-tinycss))
14806 (home-page "https://github.com/blambright/qstylizer")
14807 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
14808 (description "@code{qstylizer} is a Python package designed to help with
14809 the construction of PyQt/PySide stylesheets.")
14810 (license license:expat)))
14811
14812 (define-public python-click-threading
14813 (package
14814 (name "python-click-threading")
14815 (version "0.5.0")
14816 (source (origin
14817 (method url-fetch)
14818 (uri (pypi-uri "click-threading" version))
14819 (sha256
14820 (base32
14821 "0f9lmxwcq0y9lb8w0whbni7gwy12gbv74h1igh85qn9aq0iydkxd"))))
14822 (build-system python-build-system)
14823 (propagated-inputs
14824 (list python-click))
14825 (synopsis "Utilities for multithreading in Click")
14826 (description "This package provides utilities for multithreading in Click
14827 applications.")
14828 (home-page "https://github.com/click-contrib/click-threading")
14829 (license license:expat)))
14830
14831 (define-public python-click-log
14832 (package
14833 (name "python-click-log")
14834 (version "0.3.2")
14835 (source (origin
14836 (method url-fetch)
14837 (uri (pypi-uri "click-log" version))
14838 (sha256
14839 (base32
14840 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
14841 (build-system python-build-system)
14842 (propagated-inputs
14843 (list python-click))
14844 (synopsis "Logging for click applications")
14845 (description "This package provides a Python library for logging Click
14846 applications.")
14847 (home-page "https://github.com/click-contrib/click-log")
14848 (license license:expat)))
14849
14850 (define-public python-click-default-group
14851 (package
14852 (name "python-click-default-group")
14853 (version "1.2.2")
14854 (source (origin
14855 (method url-fetch)
14856 (uri (pypi-uri "click-default-group" version))
14857 (sha256
14858 (base32
14859 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
14860 (build-system python-build-system)
14861 (arguments
14862 `(#:tests? #f)) ; no target
14863 (propagated-inputs
14864 (list python-click))
14865 (synopsis "Extends click.Group")
14866 (description "This package extends click.Group to invoke a command without
14867 explicit subcommand name.")
14868 (home-page "https://github.com/click-contrib/click-default-group")
14869 (license license:bsd-3)))
14870
14871 (define-public python-structlog
14872 (package
14873 (name "python-structlog")
14874 (version "20.2.0")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "structlog" version))
14879 (sha256
14880 (base32
14881 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
14882 (build-system python-build-system)
14883 (arguments
14884 `(#:phases
14885 (modify-phases %standard-phases
14886 (replace 'check
14887 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
14888 (when tests?
14889 (add-installed-pythonpath inputs outputs)
14890 (invoke "pytest"))
14891 #t)))))
14892 (native-inputs
14893 (list python-coverage
14894 python-freezegun
14895 python-pretend
14896 python-pytest
14897 python-pytest-asyncio
14898 python-simplejson
14899 python-twisted))
14900 (home-page "https://www.structlog.org/")
14901 (synopsis "Structured Logging for Python")
14902 (description "@code{structlog} changes logging in Python by adding structure
14903 to your log entries.")
14904 (license (list license:asl2.0 license:expat))))
14905
14906 (define-public python-apipkg
14907 (package
14908 (name "python-apipkg")
14909 (version "1.5")
14910 (source (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "apipkg" version))
14913 (sha256
14914 (base32
14915 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
14916 (build-system python-build-system)
14917 (native-inputs
14918 (list python-pytest python-setuptools-scm))
14919 (synopsis "Namespace control and lazy-import mechanism")
14920 (description "With apipkg you can control the exported namespace of a Python
14921 package and greatly reduce the number of imports for your users. It is a small
14922 pure Python module that works on virtually all Python versions.")
14923 (home-page "https://github.com/pytest-dev/apipkg")
14924 (license license:expat)))
14925
14926 (define-public python-execnet
14927 (package
14928 (name "python-execnet")
14929 (version "1.9.0")
14930 (source (origin
14931 (method url-fetch)
14932 (uri (pypi-uri "execnet" version))
14933 (sha256
14934 (base32
14935 "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
14936 (patches (search-patches "python-execnet-read-only-fix.patch"))))
14937 (build-system python-build-system)
14938 (arguments
14939 `(#:phases
14940 (modify-phases %standard-phases
14941 (replace 'check
14942 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14943 (when tests?
14944 ;; Unset PYTHONDONTWRITEBYTECODE to match the
14945 ;; expectations of a test in
14946 ;; 'testing/test_gateway.py'.
14947 (unsetenv "PYTHONDONTWRITEBYTECODE")
14948
14949 (add-installed-pythonpath inputs outputs)
14950 (invoke "pytest" "-vv")))))))
14951 (native-inputs
14952 (list python-pytest python-setuptools-scm))
14953 (synopsis "Rapid multi-Python deployment")
14954 (description "Execnet provides a share-nothing model with
14955 channel-send/receive communication for distributing execution across many
14956 Python interpreters across version, platform and network barriers. It has a
14957 minimal and fast API targeting the following uses:
14958 @enumerate
14959 @item distribute tasks to (many) local or remote CPUs
14960 @item write and deploy hybrid multi-process applications
14961 @item write scripts to administer multiple environments
14962 @end enumerate")
14963 (home-page "https://codespeak.net/execnet/")
14964 (license license:expat)))
14965
14966 (define-public python2-execnet
14967 (package-with-python2 python-execnet))
14968
14969 (define-public python-icalendar
14970 (package
14971 (name "python-icalendar")
14972 (version "4.0.7")
14973 (source (origin
14974 (method url-fetch)
14975 (uri (pypi-uri "icalendar" version))
14976 (sha256
14977 (base32
14978 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
14979 (build-system python-build-system)
14980 (propagated-inputs
14981 (list python-dateutil python-pytz))
14982 (synopsis "Python library for parsing iCalendar files")
14983 (description "The icalendar package is a parser/generator of iCalendar
14984 files for use with Python.")
14985 (home-page "https://github.com/collective/icalendar")
14986 (license license:bsd-2)))
14987
14988 (define-public python-args
14989 (package
14990 (name "python-args")
14991 (version "0.1.0")
14992 (source (origin
14993 (method url-fetch)
14994 (uri (pypi-uri "args" version))
14995 (sha256
14996 (base32
14997 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
14998 (build-system python-build-system)
14999 (home-page "https://github.com/kennethreitz/args")
15000 (synopsis "Command-line argument parser")
15001 (description
15002 "This library provides a Python module to parse command-line arguments.")
15003 (license license:bsd-3)))
15004
15005 (define-public python2-args
15006 (package-with-python2 python-args))
15007
15008 (define-public python-clint
15009 (package
15010 (name "python-clint")
15011 (version "0.5.1")
15012 (source (origin
15013 (method url-fetch)
15014 (uri (pypi-uri "clint" version))
15015 (sha256
15016 (base32
15017 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
15018 (build-system python-build-system)
15019 (arguments
15020 '(#:phases
15021 (modify-phases %standard-phases
15022 (replace 'check
15023 (lambda _ (invoke "py.test" "-v"))))))
15024 (native-inputs
15025 (list python-pytest))
15026 (propagated-inputs
15027 (list python-args))
15028 (home-page "https://github.com/kennethreitz/clint")
15029 (synopsis "Command-line interface tools")
15030 (description
15031 "Clint is a Python module filled with a set of tools for developing
15032 command-line applications, including tools for colored and indented
15033 output, progress bar display, and pipes.")
15034 (license license:isc)))
15035
15036 (define-public python2-clint
15037 (package-with-python2 python-clint))
15038
15039 (define-public python-rply
15040 (package
15041 (name "python-rply")
15042 (version "0.7.8")
15043 (source (origin
15044 (method url-fetch)
15045 (uri (pypi-uri "rply" version))
15046 (sha256
15047 (base32
15048 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
15049 (build-system python-build-system)
15050 (propagated-inputs
15051 (list python-appdirs))
15052 (home-page "https://github.com/alex/rply")
15053 (synopsis "Parser generator for Python")
15054 (description
15055 "This package provides a pure Python based parser generator, that also
15056 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
15057 with a new public API, and RPython support.")
15058 (license license:bsd-3)))
15059
15060 (define-public python2-rply
15061 (package-with-python2 python-rply))
15062
15063 (define-public python-hy
15064 (package
15065 (name "python-hy")
15066 (version "0.20.0")
15067 (source
15068 (origin
15069 (method git-fetch) ; no tests in PyPI release
15070 (uri (git-reference
15071 (url "https://github.com/hylang/hy")
15072 (commit version)))
15073 (file-name (git-file-name name version))
15074 (sha256
15075 (base32 "1g7djra9z7b0wyqyfrk2n4z3zamp2xkahv00jwdv35xmwwn09hq4"))))
15076 (build-system python-build-system)
15077 (arguments
15078 '(#:phases
15079 (modify-phases %standard-phases
15080 (replace 'check
15081 (lambda* (#:key tests? #:allow-other-keys)
15082 (when tests?
15083 (invoke "python" "-m" "pytest" "-k"
15084 (string-append ; skip some failed tests
15085 "not test_bin_hy_sys_executable"
15086 " and not test_bin_hy_circular_macro_require"
15087 " and not test_macro_from_module"))))))))
15088 (native-inputs
15089 (list python-pytest))
15090 (propagated-inputs
15091 (list python-astor python-colorama python-funcparserlib python-rply))
15092 (home-page "https://docs.hylang.org/en/stable/")
15093 (synopsis "Lisp frontend to Python")
15094 (description
15095 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
15096 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
15097 Python at your fingertips, in Lisp form.")
15098 (license license:expat)))
15099
15100 (define-public python-hissp
15101 (package
15102 (name "python-hissp")
15103 (version "0.2.0")
15104 (source
15105 (origin
15106 (method url-fetch)
15107 (uri (pypi-uri "hissp" version))
15108 (sha256
15109 (base32
15110 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
15111 (build-system python-build-system)
15112 (home-page "https://github.com/gilch/hissp")
15113 (synopsis "It's Python with a Lissp")
15114 (description "Hissp is a modular Lisp implementation that compiles to a
15115 functional subset of Python—Syntactic macro metaprogramming with full access
15116 to the Python ecosystem.")
15117 (license license:asl2.0)))
15118
15119 (define-public python2-functools32
15120 (package
15121 (name "python2-functools32")
15122 (version "3.2.3-2")
15123 (source
15124 (origin
15125 (method url-fetch)
15126 (uri (pypi-uri "functools32" version))
15127 (sha256
15128 (base32
15129 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
15130 (build-system python-build-system)
15131 (arguments
15132 `(#:python ,python-2
15133 #:tests? #f)) ; no test target
15134 (home-page "https://github.com/MiCHiLU/python-functools32")
15135 (synopsis
15136 "Backport of the functools module from Python 3.2.3")
15137 (description
15138 "This package is a backport of the @code{functools} module from Python
15139 3.2.3 for use with older versions of Python and PyPy.")
15140 (license license:expat)))
15141
15142 (define-public python2-subprocess32
15143 (package
15144 (name "python2-subprocess32")
15145 (version "3.2.7")
15146 (source (origin
15147 (method url-fetch)
15148 (uri (pypi-uri "subprocess32" version))
15149 (sha256
15150 (base32
15151 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
15152 (patches
15153 (search-patches "python2-subprocess32-disable-input-test.patch"))))
15154 (build-system python-build-system)
15155 (arguments
15156 `(#:python ,python-2
15157 ;; The test suite fails with Python > 2.7.13:
15158 ;; import test.support
15159 ;; ImportError: No module named support
15160 #:tests? #f
15161 #:phases
15162 (modify-phases %standard-phases
15163 (add-after 'unpack 'patch-/bin/sh
15164 (lambda _
15165 (substitute* '("subprocess32.py"
15166 "test_subprocess32.py")
15167 (("/bin/sh") (which "sh")))
15168 #t)))))
15169 (home-page "https://github.com/google/python-subprocess32")
15170 (synopsis "Backport of the subprocess module from Python 3.2")
15171 (description
15172 "This is a backport of the @code{subprocess} standard library module
15173 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
15174 new features. On POSIX systems it is guaranteed to be reliable when used
15175 in threaded applications. It includes timeout support from Python 3.3 but
15176 otherwise matches 3.2’s API.")
15177 (license license:psfl)))
15178
15179 (define-public python2-futures
15180 (package
15181 (name "python2-futures")
15182 (version "3.2.0")
15183 (source
15184 (origin
15185 (method url-fetch)
15186 (uri (pypi-uri "futures" version))
15187 (sha256
15188 (base32
15189 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
15190 (build-system python-build-system)
15191 (arguments
15192 `(#:python ,python-2
15193 #:phases
15194 (modify-phases %standard-phases
15195 (replace 'check
15196 (lambda _
15197 (invoke "python" "test_futures.py")
15198 #t)))))
15199 (home-page "https://github.com/agronholm/pythonfutures")
15200 (synopsis
15201 "Backport of the concurrent.futures package from Python 3.2")
15202 (description
15203 "The concurrent.futures module provides a high-level interface for
15204 asynchronously executing callables. This package backports the
15205 concurrent.futures package from Python 3.2")
15206 (license license:bsd-3)))
15207
15208 (define-public python-promise
15209 (package
15210 (name "python-promise")
15211 (version "0.4.2")
15212 (source
15213 (origin
15214 (method url-fetch)
15215 (uri (pypi-uri "promise" version))
15216 (sha256
15217 (base32
15218 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
15219 (build-system python-build-system)
15220 ;; Tests wants python-futures, which is a python2 only program, and
15221 ;; can't be found by python-promise at test time.
15222 (arguments `(#:tests? #f))
15223 (home-page "https://github.com/syrusakbary/promise")
15224 (synopsis "Promises/A+ implementation for Python")
15225 (description
15226 "Promises/A+ implementation for Python")
15227 (license license:expat)))
15228
15229 (define-public python-progressbar2
15230 (package
15231 (name "python-progressbar2")
15232 (version "3.51.3")
15233 (source
15234 (origin
15235 (method url-fetch)
15236 (uri (pypi-uri "progressbar2" version))
15237 (sha256
15238 (base32
15239 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
15240 (build-system python-build-system)
15241 (propagated-inputs
15242 (list python-six python-utils))
15243 (native-inputs
15244 (list python-flake8
15245 python-freezegun
15246 python-pycodestyle
15247 python-pytest
15248 python-pytest-cache
15249 python-pytest-cov
15250 python-pytest-flakes
15251 python-pytest-pep8
15252 python-sphinx))
15253 (home-page "https://github.com/WoLpH/python-progressbar")
15254 (synopsis "Text progress bar library for Python")
15255 (description
15256 "This package provides a Python progressbar library to provide
15257 visual (yet text based) progress to long running operations.")
15258 (license license:bsd-3)))
15259
15260 (define-public python-progressbar33
15261 (package
15262 (name "python-progressbar33")
15263 (version "2.4")
15264 (source
15265 (origin
15266 (method url-fetch)
15267 (uri (pypi-uri "progressbar33" version))
15268 (sha256
15269 (base32
15270 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
15271 (build-system python-build-system)
15272 (home-page "https://github.com/germangh/python-progressbar")
15273 (synopsis "Text progress bar library for Python")
15274 (description
15275 "This package provides a text progress bar library for Python. This
15276 version only differs from the original @code{progressbar} package in that it
15277 uses relative package imports instead of absolute imports, which is necessary
15278 for the module to work under Python 3.3.")
15279 ;; Either or both of these licenses may be selected.
15280 (license (list license:lgpl2.1+ license:bsd-3))))
15281
15282 (define-public python-colorama
15283 (package
15284 (name "python-colorama")
15285 (version "0.4.4")
15286 (source
15287 (origin
15288 (method url-fetch)
15289 (uri (pypi-uri "colorama" version))
15290 (sha256
15291 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
15292 (build-system python-build-system)
15293 (synopsis "Colored terminal text rendering for Python")
15294 (description "Colorama is a Python library for rendering colored terminal
15295 text.")
15296 (home-page "https://pypi.org/project/colorama/")
15297 (license license:bsd-3)))
15298
15299 (define-public python2-colorama
15300 (package-with-python2 python-colorama))
15301
15302 ;; awscli and botocore do not accept version 0.4.4
15303 (define-public python-colorama-for-awscli
15304 (package
15305 (inherit python-colorama)
15306 (version "0.4.3")
15307 (source
15308 (origin
15309 (method url-fetch)
15310 (uri (pypi-uri "colorama" version))
15311 (sha256
15312 (base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
15313
15314 (define-public python-moto
15315 (package
15316 (name "python-moto")
15317 (version "3.1.4")
15318 (source (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "moto" version))
15321 (sha256
15322 (base32 "0dfnad1f9d5ybabs69dzc7x357z1r4jbhrhgw57gyic1qnmcw864"))))
15323 (build-system python-build-system)
15324 (arguments
15325 `(#:phases
15326 (modify-phases %standard-phases
15327 (add-after 'unpack 'patch-hardcoded-executable-names
15328 (lambda* (#:key inputs #:allow-other-keys)
15329 (let ((bash-exec (search-input-file inputs "/bin/sh")))
15330 (substitute* "moto/batch/models.py"
15331 (("/bin/sh") bash-exec))
15332 (substitute* (find-files "tests" "\\.py$")
15333 (("#!/bin/bash") (string-append "#!" bash-exec))))))
15334 (replace 'check
15335 (lambda* (#:key tests? #:allow-other-keys)
15336 (when tests?
15337 (invoke "pytest" "-vv" "-m" "not network" "-k"
15338 (string-append
15339 ;; XXX: This test is timing sensitive and may
15340 ;; fail non-deterministically.
15341 "not test_cancel_pending_job"
15342 ;; These tests require Docker.
15343 " and not test_terminate_job"
15344 " and not test_invoke_function_from_sqs_exception"
15345 " and not test_create_custom_lambda_resource__verify_cfnresponse_failed"
15346 " and not test_lambda_function"
15347
15348 ;; These tests also require the network.
15349 " and not test_put_record_batch_http_destination"
15350 " and not test_put_record_http_destination"
15351 " and not test_dependencies"
15352 " and not test_cancel_running_job"
15353 " and not test_container_overrides"))))))))
15354 (native-inputs
15355 (list python-flask
15356 python-flask-cors
15357 python-freezegun
15358 python-graphql-core
15359 python-pytest
15360 python-sure))
15361 (inputs
15362 (list bash-minimal))
15363 (propagated-inputs
15364 (list python-aws-xray-sdk
15365 python-boto3
15366 python-botocore
15367 python-cfn-lint
15368 python-cryptography
15369 python-dateutil
15370 python-docker
15371 python-importlib-metadata
15372 python-jinja2
15373 python-jose
15374 python-jsondiff
15375 python-markupsafe
15376 python-pytz
15377 python-pyyaml
15378 python-requests
15379 python-responses
15380 python-sshpubkeys
15381 python-werkzeug
15382 python-xmltodict))
15383 (home-page "https://github.com/spulec/moto")
15384 (synopsis "Mock out the boto library")
15385 (description
15386 "@code{moto} is a library designed to easily mock out the
15387 @code{boto} library.")
15388 (license license:asl2.0)))
15389
15390 (define-public python-rsa
15391 (package
15392 (name "python-rsa")
15393 (version "3.4.2")
15394 (source
15395 (origin
15396 (method url-fetch)
15397 (uri (pypi-uri "rsa" version))
15398 (sha256
15399 (base32
15400 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
15401 (build-system python-build-system)
15402 (propagated-inputs
15403 (list python-pyasn1))
15404 (synopsis "Pure-Python RSA implementation")
15405 (description "Python-RSA is a pure-Python RSA implementation. It supports
15406 encryption and decryption, signing and verifying signatures, and key
15407 generation according to PKCS#1 version 1.5. It can be used as a Python
15408 library as well as on the command line.")
15409 (home-page "https://stuvel.eu/rsa")
15410 (license license:asl2.0)))
15411
15412 (define-public python2-rsa
15413 (package-with-python2 python-rsa))
15414
15415 (define-public python-pluggy
15416 (package
15417 (name "python-pluggy")
15418 (version "0.13.1")
15419 (source
15420 (origin
15421 (method url-fetch)
15422 (uri (pypi-uri "pluggy" version))
15423 (sha256
15424 (base32
15425 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
15426 (build-system python-build-system)
15427 (native-inputs
15428 (list python-setuptools-scm))
15429 (synopsis "Plugin and hook calling mechanism for Python")
15430 (description "Pluggy is an extraction of the plugin manager as used by
15431 Pytest but stripped of Pytest specific details.")
15432 (home-page "https://pypi.org/project/pluggy/")
15433 (properties `((python2-variant . ,(delay python2-pluggy))))
15434 (license license:expat)))
15435
15436 (define-public python2-pluggy
15437 (let ((base (package-with-python2 (strip-python2-variant
15438 python-pluggy))))
15439 (package/inherit
15440 base
15441 (propagated-inputs
15442 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
15443
15444 ;; This package requires python2-importlib-metadata, but that package
15445 ;; ends up needing python2-pluggy via python2-pytest, so we need this
15446 ;; variant to solve the circular dependency.
15447 (define-public python2-pluggy-bootstrap
15448 (hidden-package
15449 (package/inherit
15450 python2-pluggy
15451 (name "python2-pluggy-bootstrap")
15452 (arguments
15453 `(#:tests? #f
15454 ,@(package-arguments python2-pluggy)))
15455 (propagated-inputs
15456 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
15457
15458 (define-public python-plumbum
15459 (package
15460 (name "python-plumbum")
15461 (version "1.7.0")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "plumbum" version))
15466 (sha256
15467 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
15468 (build-system python-build-system)
15469 (arguments
15470 `(#:tests? #f)) ;no tests
15471 (native-inputs
15472 ;; XXX: Not actually used since there are no tests but required for
15473 ;; build.
15474 (list python-pytest))
15475 (home-page "https://plumbum.readthedocs.io")
15476 (synopsis "Python shell combinators library")
15477 (description
15478 "Plumbum is a library of tools for replacing shell scripts with Python
15479 code.")
15480 (license license:expat)))
15481
15482 (define-public python-deprecation
15483 (package
15484 (name "python-deprecation")
15485 (version "2.1.0")
15486 (source
15487 (origin
15488 (method url-fetch)
15489 (uri (pypi-uri "deprecation" version))
15490 (sha256
15491 (base32
15492 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
15493 (build-system python-build-system)
15494 (propagated-inputs
15495 (list python-packaging))
15496 (native-inputs
15497 (list python-unittest2))
15498 (home-page "https://deprecation.readthedocs.io/")
15499 (synopsis "Python library to handle automated deprecations")
15500 (description
15501 "This is a library that enables automated deprecations. It offers the
15502 @code{deprecated()} decorator to wrap functions, providing proper warnings
15503 both in documentation and via Python’s warnings system, as well as the
15504 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
15505 that deprecated code is eventually removed.")
15506 (license license:asl2.0)))
15507
15508 (define-public python-tox
15509 (package
15510 (name "python-tox")
15511 (version "3.20.0")
15512 (source
15513 (origin
15514 (method url-fetch)
15515 (uri (pypi-uri "tox" version))
15516 (sha256
15517 (base32
15518 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
15519 (build-system python-build-system)
15520 (arguments
15521 ;; FIXME: Tests require pytest-timeout, which itself requires
15522 ;; pytest>=2.8.0 for installation.
15523 '(#:tests? #f))
15524 (propagated-inputs
15525 (list python-filelock
15526 python-packaging
15527 python-pluggy
15528 python-py
15529 python-six
15530 python-toml
15531 python-virtualenv))
15532 (native-inputs
15533 (list ; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
15534 python-pytest ; >= 2.3.5
15535 python-setuptools-scm))
15536 (home-page "https://tox.readthedocs.io")
15537 (synopsis "Virtualenv-based automation of test activities")
15538 (description "Tox is a generic virtualenv management and test command line
15539 tool. It can be used to check that a package installs correctly with
15540 different Python versions and interpreters, or run tests in each type of
15541 supported environment, or act as a frontend to continuous integration
15542 servers.")
15543 (license license:expat)))
15544
15545 (define-public python-jmespath
15546 (package
15547 (name "python-jmespath")
15548 (version "1.0.0")
15549 (source
15550 (origin
15551 (method url-fetch)
15552 (uri (pypi-uri "jmespath" version))
15553 (sha256
15554 (base32
15555 "0pmzfi230zfgiq2rz896kbb9f7mp0lnrjdl6x1npvxfixn0f5454"))))
15556 (build-system python-build-system)
15557 (native-inputs
15558 (list python-nose))
15559 (synopsis "JSON Matching Expressions")
15560 (description "JMESPath (pronounced “james path”) is a Python library that
15561 allows one to declaratively specify how to extract elements from a JSON
15562 document.")
15563 (home-page "https://github.com/jmespath/jmespath.py")
15564 (license license:expat)))
15565
15566 (define-public python-symengine
15567 (package
15568 (name "python-symengine")
15569 (version "0.6.1")
15570 (source
15571 (origin
15572 (method url-fetch)
15573 (uri (pypi-uri "symengine" version))
15574 (sha256
15575 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
15576 (build-system python-build-system)
15577 (native-inputs
15578 (list cmake python-cython))
15579 (inputs
15580 (list symengine))
15581 (home-page "https://github.com/symengine/symengine.py")
15582 (synopsis "Python library providing wrappers to SymEngine")
15583 (description
15584 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
15585 manipulation library.")
15586 (license license:expat)))
15587
15588 (define-public python-uncertainties
15589 (package
15590 (name "python-uncertainties")
15591 (version "3.1.5")
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "uncertainties" version))
15596 (sha256
15597 (base32
15598 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
15599 (build-system python-build-system)
15600 ;; While there are test files, there is no "tests" directory, so the tests
15601 ;; fail.
15602 (arguments '(#:tests? #false))
15603 (propagated-inputs
15604 (list python-future))
15605 (native-inputs
15606 (list python-nose python-numpy))
15607 (home-page "https://uncertainties-python-package.readthedocs.io/")
15608 (synopsis "Calculations with uncertainties")
15609 (description
15610 "The uncertainties package transparently handles calculations with
15611 numbers with uncertainties. It can also yield the derivatives of any
15612 expression.")
15613 (license license:bsd-3)))
15614
15615 (define-public python-unicodedata2
15616 (package
15617 (name "python-unicodedata2")
15618 (version "14.0.0")
15619 (source
15620 (origin
15621 (method url-fetch)
15622 (uri (pypi-uri "unicodedata2" version))
15623 (sha256
15624 (base32 "110nnvh02ssp92xbmswy39aa186jrmb7m41x4220wigl8c0dzxs1"))))
15625 (build-system python-build-system)
15626 (home-page "https://github.com/fonttools/unicodedata2")
15627 (synopsis "Python unicodedata backport")
15628 (description "This package corresponds to the latest @code{unicodedata}
15629 standard Python module.")
15630 (license license:asl2.0)))
15631
15632 (define-public python-asteval
15633 (package
15634 (name "python-asteval")
15635 (version "0.9.23")
15636 (source
15637 (origin
15638 (method url-fetch)
15639 (uri (pypi-uri "asteval" version))
15640 (sha256
15641 (base32
15642 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
15643 (build-system python-build-system)
15644 (native-inputs
15645 (list python-pytest))
15646 (home-page "https://github.com/newville/asteval")
15647 (synopsis "Minimalistic evaluator of Python expressions")
15648 (description
15649 "This package provides a minimalistic evaluator of Python expression
15650 using the @code{ast} module")
15651 (license license:expat)))
15652
15653 (define-public python-lmfit
15654 (package
15655 (name "python-lmfit")
15656 (version "1.0.2")
15657 (source
15658 (origin
15659 (method url-fetch)
15660 (uri (pypi-uri "lmfit" version))
15661 (sha256
15662 (base32
15663 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
15664 (build-system python-build-system)
15665 (propagated-inputs
15666 (list python-asteval python-numpy python-scipy python-uncertainties))
15667 (native-inputs
15668 (list python-pytest))
15669 (home-page "https://lmfit.github.io/lmfit-py/")
15670 (synopsis "Least-Squares minimization with bounds and constraints")
15671 (description
15672 "Lmfit provides a high-level interface to non-linear optimization and
15673 curve fitting problems for Python. It builds on and extends many of the
15674 optimization methods of @code{scipy.optimize}. Initially inspired by (and
15675 named for) extending the Levenberg-Marquardt method from
15676 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
15677 enhancements to optimization and data fitting problems.")
15678 (license license:bsd-3)))
15679
15680 (define-public python-boto
15681 (package
15682 (name "python-boto")
15683 (version "2.49.0")
15684 (source (origin
15685 (method url-fetch)
15686 (uri (pypi-uri "boto" version))
15687 (sha256
15688 (base32
15689 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
15690 (build-system python-build-system)
15691 (arguments
15692 ;; XXX: This package is unmaintained and has problems with newer versions
15693 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
15694 ;; subset of this library, so keep it around for now, but disable tests.
15695 '(#:tests? #f))
15696 (propagated-inputs
15697 (list python-paramiko python-requests))
15698 (home-page "https://github.com/boto/boto")
15699 (synopsis "Python interfaces for Amazon Web Services")
15700 (description
15701 "This package provides various facilities for interacting with Amazon
15702 Web Services through Python.
15703
15704 This software is unmaintained, and new projects should use @code{boto3} instead.")
15705 (license license:expat)))
15706
15707 (define-public python-botocore
15708 ;; Note: When updating botocore, also make sure that boto3 and awscli
15709 ;; are compatible.
15710 (package
15711 (name "python-botocore")
15712 (version "1.24.35")
15713 (source
15714 (origin
15715 (method url-fetch)
15716 (uri (pypi-uri "botocore" version))
15717 (sha256
15718 (base32
15719 "0rv8mvhq5s373zdjs2yb45hzvqcqdh2lp2rbb21jjc8ciwnl5d9n"))))
15720 (build-system python-build-system)
15721 (arguments
15722 ;; FIXME: Many tests are failing.
15723 '(#:tests? #f))
15724 (propagated-inputs
15725 (list python-dateutil python-jmespath python-urllib3))
15726 (home-page "https://github.com/boto/botocore")
15727 (synopsis "Low-level interface to AWS")
15728 (description "Botocore is a Python library that provides a low-level
15729 interface to the Amazon Web Services (AWS) API.")
15730 (license license:asl2.0)))
15731
15732 (define-public python2-botocore
15733 (package-with-python2 python-botocore))
15734
15735 (define-public python-boto3
15736 (package
15737 (name "python-boto3")
15738 (version "1.21.35")
15739 (home-page "https://github.com/boto/boto3")
15740 (source (origin
15741 (method git-fetch)
15742 (uri (git-reference (url home-page) (commit version)))
15743 (file-name (git-file-name name version))
15744 (sha256
15745 (base32
15746 "1kdyf238rpfldnpzs0rdh3nhjn6hwfym4faskyhzlgzkf1smmbg1"))))
15747 (arguments
15748 `(#:phases
15749 (modify-phases %standard-phases
15750 (add-after 'unpack 'delete-network-tests
15751 ;; Deleting integration tests because they are trying to connect to AWS.
15752 (lambda _
15753 (delete-file-recursively "tests/integration")))
15754 (replace 'check
15755 (lambda* (#:key tests? #:allow-other-keys)
15756 (when tests?
15757 (invoke "pytest" "-v")))))))
15758 (build-system python-build-system)
15759 (native-inputs
15760 (list python-nose python-mock python-pytest))
15761 (propagated-inputs
15762 (list python-botocore python-jmespath python-s3transfer))
15763 (synopsis "AWS SDK for Python")
15764 (description
15765 "Boto3 is a Python library for writing programs that interact with
15766 @acronym{AWS,Amazon Web Services}.")
15767 (license license:asl2.0)))
15768
15769 (define-public python-pyfiglet
15770 (package
15771 (name "python-pyfiglet")
15772 (version "0.8.post1")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "pyfiglet" version))
15777 (sha256
15778 (base32
15779 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
15780 (build-system python-build-system)
15781 (home-page "https://github.com/pwaller/pyfiglet")
15782 (synopsis "Draw ASCII art big letters in Python")
15783 (description "This module lets you draw large letter from ordinary characters
15784 in pure Python.")
15785 (license license:expat)))
15786
15787 (define-public python-xdo
15788 (package
15789 (name "python-xdo")
15790 (version "0.3")
15791 (source (origin
15792 (method url-fetch)
15793 (uri (string-append
15794 "http://http.debian.net/debian/pool/main/p/python-xdo/"
15795 "python-xdo_" version ".orig.tar.gz"))
15796 (sha256
15797 (base32
15798 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
15799 (build-system python-build-system)
15800 (arguments
15801 '(#:phases
15802 (modify-phases %standard-phases
15803 (add-before 'install 'patch-libxdo-path
15804 ;; Hardcode the path of dynamically loaded libxdo library.
15805 (lambda* (#:key inputs #:allow-other-keys)
15806 (let ((libxdo (string-append
15807 (assoc-ref inputs "xdotool")
15808 "/lib/libxdo.so"))
15809 (libc (string-append
15810 (assoc-ref inputs "libc")
15811 "/lib/libc.so.6")))
15812 (substitute* "xdo/_xdo.py"
15813 (("find_library\\(\"xdo\"\\)")
15814 (simple-format #f "\"~a\"" libxdo))
15815 (("ctypes\\.util\\.find_library\\('libc'\\)")
15816 (simple-format #f "\"~a\"" libc)))
15817 #t))))
15818 #:tests? #f)) ; no tests provided
15819 (propagated-inputs
15820 (list python-six))
15821 (inputs
15822 `(("xdotool" ,xdotool)
15823 ("libX11" ,libx11)))
15824 (home-page "https://tracker.debian.org/pkg/python-xdo")
15825 (synopsis "Python library for simulating X11 keyboard/mouse input")
15826 (description "Provides bindings to libxdo for manipulating X11 via simulated
15827 input. (Note that this is mostly a legacy library; you may wish to look at
15828 python-xdo for newer bindings.)")
15829 (license license:bsd-3)))
15830
15831 (define-public python2-xdo
15832 (package-with-python2 python-xdo))
15833
15834 (define-public python-xdoctest
15835 (package
15836 (name "python-xdoctest")
15837 (version "1.0.0")
15838 (source
15839 (origin
15840 (method url-fetch)
15841 (uri (pypi-uri "xdoctest" version))
15842 (sha256
15843 (base32 "0bgbmb9nqv95f9gfxqifqff1qaz5fnanjqy4hv7ygrjp2kksgfvy"))))
15844 (build-system python-build-system)
15845 (arguments
15846 (list #:phases
15847 #~(modify-phases %standard-phases
15848 (replace 'check
15849 (lambda* (#:key tests? #:allow-other-keys)
15850 (when tests?
15851 ;; A writable HOME is needed by the
15852 ;; 'import_module_from_path' test.
15853 (setenv "HOME" "/tmp")
15854 (invoke "pytest" "-vv")))))))
15855 (propagated-inputs (list python-six))
15856 (native-inputs (list python-pytest which))
15857 (home-page "https://github.com/Erotemic/xdoctest")
15858 (synopsis "Rewrite of the Python builtin doctest module")
15859 (description "This package provides a rewrite of the builtin doctest
15860 module which leverages the Python @acronym{AST, Abstract Syntax Tree} instead
15861 of @acronym{REGEXPs, regular expressions}.")
15862 (license license:asl2.0)))
15863
15864 (define-public python-mako
15865 (package
15866 (name "python-mako")
15867 (version "1.1.3")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (pypi-uri "Mako" version))
15872 (sha256
15873 (base32
15874 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
15875 (build-system python-build-system)
15876 (arguments
15877 `(#:phases (modify-phases %standard-phases
15878 (replace 'check
15879 (lambda* (#:key tests? #:allow-other-keys)
15880 (if tests?
15881 (invoke "nosetests" "-v")
15882 (format #t "test suite not run~%"))
15883 #t)))))
15884 (propagated-inputs
15885 (list python-markupsafe))
15886 (native-inputs
15887 (list python-mock python-nose))
15888 (home-page "https://www.makotemplates.org/")
15889 (synopsis "Templating language for Python")
15890 (description "Mako is a templating language for Python that compiles
15891 templates into Python modules.")
15892 (license license:expat)))
15893
15894 (define-public python2-mako
15895 (package-with-python2 python-mako))
15896
15897 (define-public python-waitress
15898 (package
15899 (name "python-waitress")
15900 (version "1.1.0")
15901 (source
15902 (origin
15903 (method url-fetch)
15904 (uri (pypi-uri "waitress" version))
15905 (patches (search-patches "python-waitress-fix-tests.patch"))
15906 (sha256
15907 (base32
15908 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
15909 (build-system python-build-system)
15910 (home-page "https://github.com/Pylons/waitress")
15911 (synopsis "Waitress WSGI server")
15912 (description "Waitress is meant to be a production-quality pure-Python WSGI
15913 server with very acceptable performance.")
15914 (license license:zpl2.1)))
15915
15916 (define-public python2-waitress
15917 (package-with-python2 python-waitress))
15918
15919 (define-public python-whichcraft
15920 (package
15921 (name "python-whichcraft")
15922 (version "0.6.1")
15923 (source
15924 (origin
15925 (method url-fetch)
15926 (uri (pypi-uri "whichcraft" version))
15927 (sha256
15928 (base32
15929 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
15930 (build-system python-build-system)
15931 (native-inputs
15932 (list python-pytest))
15933 (home-page "https://github.com/pydanny/whichcraft")
15934 (synopsis "Cross-platform cross-python shutil.which functionality")
15935 (description
15936 "This package provides a shim of the shutil.which function that's
15937 designed to work across multiple versions of Python.")
15938 (license license:bsd-3)))
15939
15940 (define-public python-cookiecutter
15941 (package
15942 (name "python-cookiecutter")
15943 (version "1.7.3")
15944 (source
15945 (origin
15946 (method url-fetch)
15947 (uri (pypi-uri "cookiecutter" version))
15948 (sha256
15949 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
15950 (build-system python-build-system)
15951 (native-inputs
15952 (list python-freezegun python-pytest python-pytest-catchlog
15953 python-pytest-cov python-pytest-mock))
15954 (propagated-inputs
15955 (list python-binaryornot
15956 python-click
15957 python-future
15958 python-jinja2
15959 python-jinja2-time
15960 python-poyo
15961 python-requests
15962 python-slugify
15963 python-text-unidecode
15964 python-whichcraft))
15965 (home-page "https://github.com/cookiecutter/cookiecutter")
15966 (synopsis
15967 "Command-line utility that creates projects from project templates")
15968 (description
15969 "This package provides a command-line utility that creates projects from
15970 project templates, e.g. creating a Python package project from a Python package
15971 project template.")
15972 (license license:bsd-3)))
15973
15974 (define-public python-pyquery
15975 (package
15976 (name "python-pyquery")
15977 (version "1.2.17")
15978 (source
15979 (origin
15980 (method url-fetch)
15981 (uri (pypi-uri "pyquery" version))
15982 (sha256
15983 (base32
15984 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
15985 (build-system python-build-system)
15986 (native-inputs
15987 (list python-webob python-webtest))
15988 (propagated-inputs
15989 (list python-lxml python-cssselect))
15990 (home-page "https://github.com/gawel/pyquery")
15991 (synopsis "Make jQuery-like queries on xml documents")
15992 (description "pyquery allows you to make jQuery queries on xml documents.
15993 The API is as much as possible the similar to jQuery. pyquery uses lxml for
15994 fast xml and html manipulation.")
15995 (license license:bsd-3)))
15996
15997 (define-public python-anyjson
15998 (package
15999 (name "python-anyjson")
16000 (version "0.3.3")
16001 (source
16002 (origin
16003 (method url-fetch)
16004 (uri (pypi-uri "anyjson" version))
16005 (sha256
16006 (base32
16007 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
16008 (build-system python-build-system)
16009 (arguments
16010 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
16011 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
16012 ;; whatever) so this transformation needs to be done before the tests
16013 ;; can be run. Maybe we could add a build step to transform beforehand
16014 ;; but it could be annoying/difficult.
16015 ;; We can enable tests for the Python 2 version, though, and do below.
16016 #:tests? #f))
16017 (home-page "https://bitbucket.org/runeh/anyjson/")
16018 (synopsis
16019 "Wraps best available JSON implementation in a common interface")
16020 (description
16021 "Anyjson loads whichever is the fastest JSON module installed
16022 and provides a uniform API regardless of which JSON implementation is used.")
16023 (license license:bsd-3)
16024 (properties `((python2-variant . ,(delay python2-anyjson))))))
16025
16026 (define-public python2-anyjson
16027 (let ((anyjson (package-with-python2
16028 (strip-python2-variant python-anyjson))))
16029 (package/inherit anyjson
16030 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
16031 #:tests? #t
16032 ,@(package-arguments anyjson)))
16033 (native-inputs `(("python2-nose" ,python2-nose))))))
16034
16035 (define-public python-amqp
16036 (package
16037 (name "python-amqp")
16038 (version "5.1.1")
16039 (source
16040 (origin
16041 (method url-fetch)
16042 (uri (pypi-uri "amqp" version))
16043 (sha256
16044 (base32 "1qmmffiy48nady7is8529vxcyqbq88v5zgawqr3fk4q8rkz166rc"))))
16045 (build-system python-build-system)
16046 (arguments
16047 (list
16048 #:phases
16049 #~(modify-phases %standard-phases
16050 (replace 'check
16051 (lambda* (#:key tests? #:allow-other-keys)
16052 (when tests?
16053 (invoke "pytest" "-vv"
16054 "-c" "/dev/null" ;take control over pytest options
16055 ;; Integration tests require network connectivity.
16056 "--ignore" "t/integration")))))))
16057 (native-inputs (list python-pytest))
16058 (propagated-inputs (list python-vine))
16059 (home-page "https://github.com/celery/py-amqp")
16060 (synopsis "Low-level AMQP client for Python (fork of amqplib)")
16061 (description
16062 "This is a fork of amqplib which was originally written by Barry Pederson.
16063 It is maintained by the Celery project, and used by kombu as a pure python
16064 alternative when librabbitmq is not available.")
16065 (license license:lgpl2.1+)))
16066
16067 (define-public python-beniget
16068 (package
16069 (name "python-beniget")
16070 (version "0.4.1")
16071 (home-page "https://github.com/serge-sans-paille/beniget")
16072 (source
16073 (origin
16074 (method url-fetch)
16075 (uri (pypi-uri "beniget" version))
16076 (sha256
16077 (base32 "035c4f78yllpw2c5p1w92520rilm7nnpsqh7yvi3qmfhi8xlnmbm"))))
16078 (build-system python-build-system)
16079 (propagated-inputs
16080 (list python-gast))
16081 (synopsis "Extract semantic information about static Python code")
16082 (description
16083 "Beniget is a collection of analyzers for Python @acronym{AST,
16084 Abstract Syntax Tree}. It is a building block for writing a static analyzer
16085 or compiler for Python.")
16086 (license license:bsd-3)))
16087
16088 (define-public python-txamqp
16089 (package
16090 (name "python-txamqp")
16091 (version "0.8.2")
16092 (source
16093 (origin
16094 (method url-fetch)
16095 (uri (pypi-uri "txAMQP" version))
16096 (sha256
16097 (base32
16098 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
16099 (build-system python-build-system)
16100 (propagated-inputs
16101 (list python-six python-twisted))
16102 (home-page "https://github.com/txamqp/txamqp")
16103 (synopsis "Communicate with AMQP peers and brokers using Twisted")
16104 (description
16105 "This package provides a Python library for communicating with AMQP peers
16106 and brokers using the asynchronous networking framework Twisted. It contains
16107 all the necessary code to connect, send and receive messages to/from an
16108 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
16109 also includes support for using Thrift RPC over AMQP in Twisted
16110 applications.")
16111 (license license:asl2.0)))
16112
16113 (define-public python-kombu
16114 (package
16115 (name "python-kombu")
16116 (version "5.2.4")
16117 (source
16118 (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "kombu" version))
16121 (sha256
16122 (base32 "044ng79gj04668kf5fmy7fjkw8302xyapskkn65ym52zfbpf7kip"))))
16123 (build-system python-build-system)
16124 (arguments
16125 (list
16126 #:phases
16127 #~(modify-phases %standard-phases
16128 (replace 'check
16129 (lambda* (#:key tests? #:allow-other-keys)
16130 (when tests?
16131 (invoke "pytest" "-vv"
16132 ;; The transport tests attempt to pass messages to
16133 ;; many different databases.
16134 "--ignore" "t/unit/transport")))))))
16135 (native-inputs
16136 (list python-case python-pyro4 python-pytest-sugar
16137 python-pytest python-pytz))
16138 (propagated-inputs
16139 (list python-amqp python-cached-property python-vine))
16140 (home-page "https://kombu.readthedocs.io")
16141 (synopsis "Message passing library for Python")
16142 (description "The aim of Kombu is to make messaging in Python as easy as
16143 possible by providing an idiomatic high-level interface for the AMQ protocol,
16144 and also provide proven and tested solutions to common messaging problems.
16145 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
16146 message orientation, queuing, routing, reliability and security, for which the
16147 RabbitMQ messaging server is the most popular implementation.")
16148 (license license:bsd-3)))
16149
16150 (define-public python-billiard
16151 (package
16152 (name "python-billiard")
16153 (version "3.6.4.0")
16154 (source
16155 (origin
16156 (method url-fetch)
16157 (uri (pypi-uri "billiard" version))
16158 (sha256
16159 (base32 "0ismj2p8c66ykpss94rs0bfra5agxxmljz8r3gaq79r8valfb799"))))
16160 (build-system python-build-system)
16161 (arguments
16162 `(#:phases
16163 (modify-phases %standard-phases
16164 (add-after 'unpack 'remove-win-files
16165 (lambda _
16166 (for-each delete-file-recursively
16167 ;; test_multiprocessing seem to be written in Python2.
16168 '("t/integration/tests/test_multiprocessing.py"
16169 "t/unit/test_win32.py"
16170 "billiard/popen_spawn_win32.py"
16171 "billiard/_win.py")))))))
16172 (native-inputs
16173 (list python-case python-psutil python-pytest))
16174 (home-page "https://github.com/celery/billiard")
16175 (synopsis "Python multiprocessing fork with improvements and bugfixes")
16176 (description
16177 "Billiard is a fork of the Python 2.7 multiprocessing package. The
16178 multiprocessing package itself is a renamed and updated version of R Oudkerk's
16179 pyprocessing package. This standalone variant is intended to be compatible with
16180 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
16181 (license license:bsd-3)))
16182
16183 (define-public python-celery
16184 (package
16185 (name "python-celery")
16186 (version "5.2.6")
16187 (source
16188 (origin
16189 (method url-fetch)
16190 (uri (pypi-uri "celery" version))
16191 (sha256
16192 (base32 "109lcqarrbmh95sk1dm4yxayq1h3i27f4w23ndk64mqgyfnqqffi"))))
16193 (build-system python-build-system)
16194 (arguments
16195 '(#:phases
16196 (modify-phases %standard-phases
16197 (add-after 'unpack 'relax-requirements
16198 (lambda _
16199 (substitute* "requirements/default.txt"
16200 (("pytz.*")
16201 "pytz\n"))))
16202 (replace 'check
16203 (lambda* (#:key tests? #:allow-other-keys)
16204 (when tests?
16205 (invoke "python" "-m" "pytest" "t"
16206 "--ignore" "t/integration" ;hangs tests
16207 ;; The MongoDB backend test appears to expect an older
16208 ;; version of MongoDB which provided its own bson
16209 ;; module, fails with " AttributeError: module 'bson'
16210 ;; has no attribute 'encode'".
16211 "--ignore" "t/unit/backends/test_mongodb.py"
16212 ;; AssertionErrors
16213 "-k" "not test_check_privileges_no_fchown ")))))))
16214 (native-inputs
16215 (list python-case
16216 python-dnspython
16217 python-flaky
16218 python-iniconfig
16219 python-moto
16220 python-msgpack
16221 python-pytest
16222 python-pytest-celery
16223 python-pytest-subtests
16224 python-pytest-timeout
16225 python-toml))
16226 (propagated-inputs
16227 (list python-billiard
16228 python-click
16229 python-click-didyoumean
16230 python-click-plugins
16231 python-click-repl
16232 python-kombu
16233 python-pytz
16234 python-vine))
16235 (home-page "https://celeryproject.org")
16236 (synopsis "Distributed Task Queue")
16237 (description "Celery is an asynchronous task queue/job queue based on
16238 distributed message passing. It is focused on real-time operation, but
16239 supports scheduling as well. The execution units, called tasks, are executed
16240 concurrently on a single or more worker servers using multiprocessing,
16241 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
16242 synchronously (wait until ready).")
16243 (license license:bsd-3)))
16244
16245 (define-public python-translitcodec
16246 (package
16247 (name "python-translitcodec")
16248 (version "0.4.0")
16249 (source
16250 (origin
16251 (method url-fetch)
16252 (uri (pypi-uri "translitcodec" version))
16253 (sha256
16254 (base32
16255 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
16256 (build-system python-build-system)
16257 (arguments
16258 `(#:tests? #f)) ; no tests provided
16259 (home-page
16260 "https://github.com/claudep/translitcodec")
16261 (synopsis
16262 "Unicode to 8-bit charset transliteration codec")
16263 (description
16264 "This package contains codecs for transliterating ISO 10646 texts into
16265 best-effort representations using smaller coded character sets (ASCII,
16266 ISO 8859, etc.).")
16267 (license license:expat)))
16268
16269 (define-public python2-translitcodec
16270 (package-with-python2 python-translitcodec))
16271
16272 (define-public python-anyqt
16273 (package
16274 (name "python-anyqt")
16275 (version "0.0.13")
16276 (source
16277 (origin
16278 (method url-fetch)
16279 (uri (pypi-uri "AnyQt" version))
16280 (sha256
16281 (base32 "0z7myf0mp1qx4gza6ncqyq9whk67vblmh9n3klk19dv4aakjml2f"))))
16282 (build-system python-build-system)
16283 (arguments
16284 `(#:tests? #f ;there are no tests
16285 #:phases
16286 (modify-phases %standard-phases
16287 (add-after 'unpack 'delete-files
16288 ;; Delete files related to other operating systems.
16289 (lambda _
16290 (delete-file "AnyQt/QtMacExtras.py")
16291 (delete-file "AnyQt/QtWinExtras.py"))))))
16292 (home-page "https://github.com/ales-erjavec/anyqt")
16293 (synopsis "PyQt4/PyQt5 compatibility layer")
16294 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
16295 (license license:gpl3)))
16296
16297 (define-public python-pyqtgraph
16298 (package
16299 (name "python-pyqtgraph")
16300 (version "0.12.1")
16301 (source
16302 (origin
16303 (method url-fetch)
16304 (uri (pypi-uri "pyqtgraph" version))
16305 (sha256
16306 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
16307 (build-system python-build-system)
16308 (arguments
16309 `(#:phases
16310 (modify-phases %standard-phases
16311 (add-before 'check 'set-home-and-qpa
16312 (lambda _
16313 (setenv "HOME" "/tmp")
16314 (setenv "QT_QPA_PLATFORM" "offscreen")
16315 #t))
16316 (replace 'check
16317 (lambda* (#:key inputs outputs #:allow-other-keys)
16318 (add-installed-pythonpath inputs outputs)
16319 (invoke "pytest" "-vv" "-k"
16320 (string-append
16321 ;; These tests try to download online data.
16322 "not test_PolyLineROI"
16323 " and not test_getArrayRegion_axisorder"
16324 " and not test_getArrayRegion"
16325 " and not test_PlotCurveItem"
16326 " and not test_NonUniformImage_colormap"
16327 " and not test_NonUniformImage_lut"
16328 " and not test_ImageItem_axisorder"
16329 " and not test_ImageItem"
16330 ;; The test_reload test fails and suggests adding
16331 ;; "--assert=plain" to the pytest command, but it
16332 ;; doesn't solve the failure.
16333 " and not test_reload")))))))
16334 (native-inputs
16335 (list python-pytest python-pytest-cov python-pytest-xdist))
16336 (inputs
16337 (list qtbase-5))
16338 (propagated-inputs
16339 (list python-h5py python-numpy python-pyopengl python-scipy
16340 python-pyqt-without-qtwebkit))
16341 (home-page "http://www.pyqtgraph.org")
16342 (synopsis "Scientific graphics and GUI library for Python")
16343 (description
16344 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
16345 and PySide6. It is intended for use in mathematics, scientific or engineering
16346 applications.")
16347 (license license:expat)))
16348
16349 (define-public python-qasync
16350 (package
16351 (name "python-qasync")
16352 (version "0.22.0")
16353 (source
16354 (origin
16355 ;; There are no tests in the PyPI tarball.
16356 (method git-fetch)
16357 (uri (git-reference
16358 (url "https://github.com/CabbageDevelopment/qasync/")
16359 (commit (string-append "v" version))))
16360 (file-name (git-file-name name version))
16361 (sha256
16362 (base32 "1q9cllrwf94whr0f6mipa0hdq1rcyqvklwx19g35g2dav8f3xkjl"))))
16363 (build-system python-build-system)
16364 (arguments
16365 `(#:test-target "pytest"
16366 #:phases
16367 (modify-phases %standard-phases
16368 (add-before 'check 'set-qpa
16369 (lambda _
16370 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
16371 (native-inputs
16372 (list python-pytest python-pytest-runner))
16373 (propagated-inputs
16374 (list python-pyqt))
16375 (home-page "https://github.com/CabbageDevelopment/qasync")
16376 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
16377 (description
16378 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
16379 by providing an implementation of the PEP 3156 event-loop.")
16380 (license license:bsd-2)))
16381
16382 (define-public python-editor
16383 (package
16384 (name "python-editor")
16385 (version "1.0.4")
16386 (source
16387 (origin
16388 (method url-fetch)
16389 (uri (pypi-uri "python-editor" version))
16390 (sha256
16391 (base32
16392 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
16393 (build-system python-build-system)
16394 (arguments
16395 '(#:tests? #f)) ;XXX: needs a TTY and an editor
16396 (home-page "https://github.com/fmoo/python-editor")
16397 (synopsis "Programmatically open an editor, capture the result")
16398 (description
16399 "python-editor is a library that provides the editor module for
16400 programmatically interfacing with your system's $EDITOR.")
16401 (license license:asl2.0)))
16402
16403 (define-public python2-editor
16404 (package-with-python2 python-editor))
16405
16406 (define-public python-multiprocessing-logging
16407 (package
16408 (name "python-multiprocessing-logging")
16409 (version "0.3.1")
16410 (home-page "https://github.com/jruere/multiprocessing-logging")
16411 (source (origin
16412 (method git-fetch)
16413 (uri (git-reference
16414 (url home-page)
16415 (commit (string-append "v" version))))
16416 (file-name (git-file-name name version))
16417 (sha256
16418 (base32
16419 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
16420 (build-system python-build-system)
16421 (synopsis "Manage logs from multiple processes")
16422 (description
16423 "This Python module implements a multiprocessing-aware @code{Handler}
16424 that, when set on the root @code{Logger}, will tunnel log records to the
16425 main process so that they are handled correctly.")
16426 (license license:lgpl3+)))
16427
16428 (define-public python-vobject
16429 (package
16430 (name "python-vobject")
16431 (version "0.9.6.1")
16432 (source (origin
16433 (method url-fetch)
16434 (uri (pypi-uri "vobject" version))
16435 (sha256
16436 (base32
16437 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
16438 (build-system python-build-system)
16439 (arguments
16440 '(;; The test suite relies on some non-portable Windows interfaces.
16441 #:tests? #f))
16442 (propagated-inputs
16443 (list python-dateutil python-pyicu))
16444 (synopsis "Parse and generate vCard and vCalendar files")
16445 (description "Vobject is intended to be a full featured Python package for
16446 parsing and generating vCard and vCalendar files. Currently, iCalendar files
16447 are supported and well tested. vCard 3.0 files are supported, and all data
16448 should be imported, but only a few components are understood in a sophisticated
16449 way.")
16450 (home-page "https://eventable.github.io/vobject/")
16451 (license license:asl2.0)))
16452
16453 (define-public python2-vobject
16454 (package-with-python2 python-vobject))
16455
16456 (define-public python-munkres
16457 (package
16458 (name "python-munkres")
16459 (version "1.1.4")
16460 (source (origin
16461 (method url-fetch)
16462 (uri (pypi-uri "munkres" version))
16463 (sha256
16464 (base32
16465 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w"))))
16466 (build-system python-build-system)
16467 (native-inputs (list python-pytest-6))
16468 (home-page "https://software.clapper.org/munkres/")
16469 (synopsis "Implementation of the Munkres algorithm")
16470 (description "The Munkres module provides an implementation of the Munkres
16471 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
16472 useful for solving the Assignment Problem.")
16473 (license license:bsd-3)))
16474
16475 (define-public python-whoosh
16476 (package
16477 (name "python-whoosh")
16478 (version "2.7.4")
16479 (source
16480 (origin
16481 (method url-fetch)
16482 (uri (pypi-uri "Whoosh" version))
16483 (sha256
16484 (base32
16485 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
16486 (build-system python-build-system)
16487 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
16488 (native-inputs
16489 (list python-pytest))
16490 (home-page "https://bitbucket.org/mchaput/whoosh")
16491 (synopsis "Full text indexing, search, and spell checking library")
16492 (description
16493 "Whoosh is a fast, pure-Python full text indexing, search, and spell
16494 checking library.")
16495 (license license:bsd-2)))
16496
16497 (define-public python2-whoosh
16498 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
16499 (package/inherit whoosh
16500 (propagated-inputs
16501 `(("python2-backport-ssl-match-hostname"
16502 ,python2-backport-ssl-match-hostname)
16503 ,@(package-propagated-inputs whoosh))))))
16504
16505 (define-public python-codespell
16506 (package
16507 (name "python-codespell")
16508 (version "2.1.0")
16509 (source
16510 (origin
16511 (method url-fetch)
16512 (uri (pypi-uri "codespell" version))
16513 (sha256
16514 (base32 "1r9y714cz8m894rxp7pyvicr1lw2iid24vz6fxbl5wzy8ibgxlqr"))))
16515 (build-system python-build-system)
16516 (inputs
16517 (list python-chardet))
16518 (native-inputs
16519 (list python-check-manifest python-flake8 python-pytest
16520 python-pytest-cov python-pytest-dependency))
16521 (arguments
16522 `(#:phases
16523 (modify-phases %standard-phases
16524 (replace 'check
16525 (lambda* (#:key outputs tests? #:allow-other-keys)
16526 (when tests?
16527 ;; Make installed executable available for running the tests.
16528 (setenv "PATH"
16529 (string-append (assoc-ref outputs "out") "/bin"
16530 ":" (getenv "PATH")))
16531 (invoke "pytest" "-vv")))))))
16532 (home-page "https://github.com/codespell-project/codespell/")
16533 (synopsis "Spellchecker for code")
16534 (description "Codespell fixes common misspellings in text files.
16535 It's designed primarily for checking misspelled words in source code,
16536 but it can be used with other files as well. It does not check for word
16537 membership in a complete dictionary, but instead looks for a set of
16538 common misspellings. Therefore it should catch errors like \"adn\", but
16539 it will not catch \"adnasdfasdf\". This also means it shouldn't
16540 generate false-positives when you use a niche term it doesn't know
16541 about.")
16542 (license
16543 (list
16544 ; for codespell and codespell_lib
16545 license:gpl2
16546 ; for dictionary*.txt
16547 license:cc-by-sa3.0))))
16548
16549 (define-public python-pathlib
16550 (package
16551 (name "python-pathlib")
16552 (version "1.0.1")
16553 (source (origin
16554 (method url-fetch)
16555 (uri (pypi-uri "pathlib" version))
16556 (sha256
16557 (base32
16558 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
16559 (build-system python-build-system)
16560 ;; The tests depend on the internal "test" module, which does not provide
16561 ;; a stable interface.
16562 (arguments `(#:tests? #f))
16563 (home-page "https://pathlib.readthedocs.org/")
16564 (synopsis "Object-oriented file system paths")
16565 (description "Pathlib offers a set of classes to handle file system paths.
16566 It offers the following advantages over using string objects:
16567
16568 @enumerate
16569 @item No more cumbersome use of os and os.path functions. Everything can
16570 be done easily through operators, attribute accesses, and method calls.
16571 @item Embodies the semantics of different path types. For example,
16572 comparing Windows paths ignores casing.
16573 @item Well-defined semantics, eliminating any inconsistencies or
16574 ambiguities (forward vs. backward slashes, etc.).
16575 @end enumerate
16576
16577 Note: In Python 3.4, pathlib is now part of the standard library. For other
16578 Python versions please consider python-pathlib2 instead, which tracks the
16579 standard library module. This module (python-pathlib) isn't maintained
16580 anymore.")
16581 (license license:expat)))
16582
16583 (define-public python2-pathlib
16584 (package-with-python2 python-pathlib))
16585
16586 (define-public python2-pathlib2
16587 (package
16588 (name "python2-pathlib2")
16589 (version "2.3.5")
16590 (source (origin
16591 (method url-fetch)
16592 (uri (pypi-uri "pathlib2" version))
16593 (sha256
16594 (base32
16595 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
16596 (build-system python-build-system)
16597 ;; We only need the the Python 2 variant, since for Python 3 our minimum
16598 ;; version is 3.4 which already includes this package as part of the
16599 ;; standard library.
16600 (arguments
16601 `(#:python ,python-2))
16602 (propagated-inputs
16603 (list python2-scandir python2-six))
16604 (home-page "https://pypi.org/project/pathlib2/")
16605 (synopsis "Object-oriented file system paths - backport of standard
16606 pathlib module")
16607 (description "The goal of pathlib2 is to provide a backport of standard
16608 pathlib module which tracks the standard library module, so all the newest
16609 features of the standard pathlib can be used also on older Python versions.
16610
16611 Pathlib offers a set of classes to handle file system paths. It offers the
16612 following advantages over using string objects:
16613
16614 @enumerate
16615 @item No more cumbersome use of os and os.path functions. Everything can
16616 be done easily through operators, attribute accesses, and method calls.
16617 @item Embodies the semantics of different path types. For example,
16618 comparing Windows paths ignores casing.
16619 @item Well-defined semantics, eliminating any inconsistencies or
16620 ambiguities (forward vs. backward slashes, etc.).
16621 @end enumerate")
16622 (license license:expat)))
16623
16624 (define-public python2-pathlib2-bootstrap
16625 (hidden-package
16626 (package
16627 (inherit python2-pathlib2)
16628 (name "python2-pathlib2-bootstrap")
16629 (propagated-inputs
16630 `(("python2-scandir" ,python2-scandir)
16631 ("python2-six" ,python2-six-bootstrap))))))
16632
16633 (define-public python-jellyfish
16634 (package
16635 (name "python-jellyfish")
16636 (version "0.8.8")
16637 (source (origin
16638 (method url-fetch)
16639 (uri (pypi-uri "jellyfish" version))
16640 (sha256
16641 (base32
16642 "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
16643 (build-system python-build-system)
16644 (arguments
16645 `(#:tests? #f ; XXX: Tests cannot find C coded version.
16646 #:phases
16647 (modify-phases %standard-phases
16648 (replace 'check
16649 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16650 (when tests?
16651 (add-installed-pythonpath inputs outputs)
16652 (invoke "pytest" "-vv" "jellyfish/test.py")))))))
16653 (native-inputs
16654 (list python-pytest))
16655 (home-page "https://github.com/jamesturk/jellyfish")
16656 (synopsis "Approximate and phonetic matching of strings")
16657 (description "Jellyfish uses a variety of string comparison and phonetic
16658 encoding algorithms to do fuzzy string matching.")
16659 (license license:bsd-2)))
16660
16661 (define-public python2-unicodecsv
16662 (package
16663 (name "python2-unicodecsv")
16664 (version "0.14.1")
16665 (source (origin
16666 (method git-fetch)
16667 ;; The test suite is not included in the PyPi release.
16668 ;; https://github.com/jdunck/python-unicodecsv/issues/19
16669 (uri (git-reference
16670 (url "https://github.com/jdunck/python-unicodecsv")
16671 (commit version)))
16672 (file-name (git-file-name name version))
16673 (sha256
16674 (base32
16675 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
16676 (build-system python-build-system)
16677 (arguments
16678 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
16679 #:python ,python-2))
16680 (native-inputs
16681 (list python2-unittest2))
16682 (home-page "https://github.com/jdunck/python-unicodecsv")
16683 (synopsis "Unicode CSV module for Python 2")
16684 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
16685 module, adding support for Unicode strings.")
16686 (license license:bsd-2)))
16687
16688 (define-public python-pdfminer-six
16689 (package
16690 (name "python-pdfminer-six")
16691 (version "20201018")
16692 ;; There are no tests in the PyPI tarball.
16693 (source
16694 (origin
16695 (method git-fetch)
16696 (uri (git-reference
16697 (url "https://github.com/pdfminer/pdfminer.six")
16698 (commit version)))
16699 (file-name (git-file-name name version))
16700 (sha256
16701 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
16702 (build-system python-build-system)
16703 (arguments
16704 `(#:phases
16705 (modify-phases %standard-phases
16706 ;; Tests write to the source tree.
16707 (add-after 'unpack 'make-git-checkout-writable
16708 (lambda _
16709 (for-each make-file-writable (find-files "."))
16710 #t))
16711 (replace 'check
16712 (lambda _
16713 (invoke "make" "test"))))))
16714 (propagated-inputs
16715 (list python-chardet python-cryptography python-sortedcontainers))
16716 (native-inputs
16717 (list python-nose python-tox))
16718 (home-page "https://github.com/pdfminer/pdfminer.six")
16719 (synopsis "PDF parser and analyzer")
16720 (description "@code{pdfminer.six} is a community maintained fork of
16721 the original PDFMiner. It is a tool for extracting information from PDF
16722 documents. It focuses on getting and analyzing text data. Pdfminer.six
16723 extracts the text from a page directly from the sourcecode of the PDF. It
16724 can also be used to get the exact location, font or color of the text.")
16725 (license license:expat)))
16726
16727 (define-public python-rarfile
16728 (package
16729 (name "python-rarfile")
16730 (version "4.0")
16731 (source (origin
16732 (method url-fetch)
16733 (uri (pypi-uri "rarfile" version))
16734 (sha256
16735 (base32
16736 "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
16737 (build-system python-build-system)
16738 (arguments
16739 `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
16740 #:phases
16741 (modify-phases %standard-phases
16742 (add-after 'unpack 'patch
16743 (lambda* (#:key inputs #:allow-other-keys)
16744 (substitute* "rarfile.py"
16745 ;; Disable unrar and unar, which are unavailable on Guix.
16746 (("(unrar|unar)=True" all tool) (string-append tool "=False"))
16747 ;; Hardcode path to bsdtar
16748 (("\"bsdtar\"")
16749 (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
16750 #t))
16751 (replace 'check
16752 (lambda* (#:key inputs tests? #:allow-other-keys)
16753 (when tests?
16754 (invoke "pytest" "-vv")))))))
16755 (native-inputs (list python-pytest))
16756 (inputs (list libarchive))
16757 (home-page "https://github.com/markokr/rarfile")
16758 (synopsis "RAR archive reader for Python")
16759 (description "This is Python module for RAR archive reading. The interface
16760 is made as zipfile like as possible.")
16761 (license license:isc)))
16762
16763 (define-public python-rich
16764 (package
16765 (name "python-rich")
16766 (version "12.4.1")
16767 (source (origin
16768 (method url-fetch)
16769 (uri (pypi-uri "rich" version))
16770 (sha256
16771 (base32
16772 "149vjb4cpf9mz14iig0b6d8065dm8aslp6pc45g9ipmp1wf00ffj"))))
16773 (build-system python-build-system)
16774 (arguments
16775 `(#:phases
16776 (modify-phases %standard-phases
16777 (replace 'check
16778 (lambda* (#:key inputs tests? #:allow-other-keys)
16779 (when tests?
16780 (copy-recursively (string-append
16781 (assoc-ref inputs "tests") "/tests")
16782 "tests")
16783 (invoke "python" "-m" "pytest" "-vv")))))))
16784 (propagated-inputs
16785 (list python-attrs python-colorama python-commonmark python-pygments
16786 python-typing-extensions))
16787 (native-inputs
16788 `(("python-pytest" ,python-pytest)
16789 ("tests"
16790 ;; The release on pypi comes without tests. We can't build from this
16791 ;; checkout, though, because installation requires an invocation of
16792 ;; poetry.
16793 ,(origin
16794 (method git-fetch)
16795 (uri (git-reference
16796 (url "https://github.com/willmcgugan/rich")
16797 (commit (string-append "v" version))))
16798 (file-name (git-file-name name version))
16799 (sha256
16800 (base32
16801 "17c3gljn8zv32xnpsgd3fqgqn4r7cdfqri41hridcpbhssdgkyp9"))))))
16802 (home-page "https://github.com/willmcgugan/rich")
16803 (synopsis "Render rich text and more to the terminal")
16804 (description
16805 "This is a Python package for rendering rich text, tables, progress bars,
16806 syntax highlighting, markdown and more to the terminal.")
16807 (license license:expat)))
16808
16809 (define-public python-magic
16810 (package
16811 (name "python-magic")
16812 (version "0.4.24")
16813 (home-page "https://github.com/ahupp/python-magic")
16814 (source
16815 (origin
16816 (method git-fetch)
16817 (uri (git-reference (url home-page) (commit version)))
16818 (file-name (git-file-name name version))
16819 (patches (search-patches "python-magic-python-bytecode.patch"))
16820 (sha256
16821 (base32
16822 "17jalhjbfd600lzfz296m0nvgp6c7vx1mgz82jbzn8hgdzknf4w0"))))
16823 (build-system python-build-system)
16824 (arguments
16825 '(#:phases (modify-phases %standard-phases
16826 ;; Replace a specific method call with a hard-coded
16827 ;; path to the necessary libmagic.so file in the
16828 ;; store. If we don't do this, then the method call
16829 ;; will fail to find the libmagic.so file, which in
16830 ;; turn will cause any application using
16831 ;; python-magic to fail.
16832 (add-before 'build 'hard-code-path-to-libmagic
16833 (lambda* (#:key inputs #:allow-other-keys)
16834 (let ((magic (search-input-file inputs "/lib/libmagic.so")))
16835 (substitute* "magic/loader.py"
16836 (("find_library\\('magic'\\)")
16837 (string-append "'" magic "'"))))))
16838 (replace 'check
16839 (lambda* (#:key tests? #:allow-other-keys)
16840 ;; The test suite mandates this variable.
16841 (setenv "LC_ALL" "en_US.UTF-8")
16842 (if tests?
16843 (with-directory-excursion "test"
16844 (invoke "python" "./test.py")
16845 (invoke "python" "./libmagic_test.py"))
16846 (format #t "test suite not run~%")))))))
16847 (native-inputs
16848 (list which))
16849 (inputs
16850 ;; python-magic needs to be able to find libmagic.so.
16851 ;; Use a newer version because 5.39 returns bogus for some archives
16852 ;; (notably Chromium .crx extensions), which breaks e.g. 'diffoscope'.
16853 (list file-next))
16854 (synopsis "File type identification using libmagic")
16855 (description
16856 "This module uses ctypes to access the libmagic file type
16857 identification library. It makes use of the local magic database and
16858 supports both textual and MIME-type output. Note that this module and
16859 the python-file module both provide a \"magic.py\" file; these two
16860 modules, which are different and were developed separately, both serve
16861 the same purpose: to provide Python bindings for libmagic.")
16862 (license license:expat)))
16863
16864 (define-public python2-magic
16865 (package-with-python2 python-magic))
16866
16867 (define-public python2-s3cmd
16868 (package
16869 (name "python2-s3cmd")
16870 (version "1.6.1")
16871 (source
16872 (origin
16873 (method url-fetch)
16874 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
16875 "s3cmd-" version ".tar.gz"))
16876 (sha256
16877 (base32
16878 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
16879 (build-system python-build-system)
16880 (arguments
16881 ;; s3cmd is written for python2 only and contains no tests.
16882 `(#:python ,python-2
16883 #:tests? #f))
16884 (propagated-inputs
16885 (list python2-dateutil
16886 ;; The python-file package also provides a magic.py module.
16887 ;; This is an unfortunate state of affairs; however, s3cmd
16888 ;; fails to install if it cannot find specifically the
16889 ;; python-magic package. Thus we include it, instead of using
16890 ;; python-file. Ironically, s3cmd sometimes works better
16891 ;; without libmagic bindings at all:
16892 ;; https://github.com/s3tools/s3cmd/issues/198
16893 python2-magic))
16894 (home-page "https://s3tools.org/s3cmd")
16895 (synopsis "Command line tool for S3-compatible storage services")
16896 (description
16897 "S3cmd is a command line tool for uploading, retrieving and managing data
16898 in storage services that are compatible with the Amazon Simple Storage
16899 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
16900 GnuPG encryption, and more. It also supports management of Amazon's
16901 CloudFront content delivery network.")
16902 (license license:gpl2+)))
16903
16904 (define-public python-pkgconfig
16905 (package
16906 (name "python-pkgconfig")
16907 (version "1.3.1")
16908 (source
16909 (origin
16910 (method url-fetch)
16911 (uri (pypi-uri "pkgconfig" version))
16912 (sha256
16913 (base32
16914 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
16915 (build-system python-build-system)
16916 (native-inputs
16917 (list python-nose))
16918 (inputs
16919 (list pkg-config))
16920 (arguments
16921 `(#:phases
16922 (modify-phases %standard-phases
16923 (add-before 'build 'patch
16924 ;; Hard-code the path to pkg-config.
16925 (lambda _
16926 (substitute* "pkgconfig/pkgconfig.py"
16927 (("'pkg-config'")
16928 (string-append "'" (which "pkg-config") "'")))))
16929 (replace 'check
16930 (lambda _
16931 (invoke "nosetests" "test.py"))))))
16932 (home-page "https://github.com/matze/pkgconfig")
16933 (synopsis "Python interface for pkg-config")
16934 (description "This module provides a Python interface to pkg-config. It
16935 can be used to find all pkg-config packages, check if a package exists,
16936 check if a package meets certain version requirements, query CFLAGS and
16937 LDFLAGS and parse the output to build extensions with setup.py.")
16938 (license license:expat)))
16939
16940 (define-public python2-pkgconfig
16941 (package-with-python2 python-pkgconfig))
16942
16943 (define-public python-bz2file
16944 (package
16945 (name "python-bz2file")
16946 (version "0.98")
16947 (source
16948 (origin
16949 (method url-fetch)
16950 (uri (pypi-uri "bz2file" version))
16951 (sha256
16952 (base32
16953 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
16954 (build-system python-build-system)
16955 (arguments
16956 `(#:tests? #f)) ; Tests use deprecated python modules.
16957 (home-page "https://github.com/nvawda/bz2file")
16958 (synopsis "Read and write bzip2-compressed files")
16959 (description
16960 "Bz2file is a Python library for reading and writing bzip2-compressed
16961 files. It contains a drop-in replacement for the I/O interface in the
16962 standard library's @code{bz2} module, including features from the latest
16963 development version of CPython that are not available in older releases.")
16964 (license license:asl2.0)))
16965
16966 (define-public python2-bz2file
16967 (package-with-python2 python-bz2file))
16968
16969 (define-public python-future
16970 (package
16971 (name "python-future")
16972 (version "0.18.2")
16973 (source
16974 (origin
16975 (method url-fetch)
16976 (uri (pypi-uri "future" version))
16977 (sha256
16978 (base32
16979 "0zakvfj87gy6mn1nba06sdha63rn4njm7bhh0wzyrxhcny8avgmi"))))
16980 (build-system python-build-system)
16981 ;; Many tests connect to the network or are otherwise flawed.
16982 ;; https://github.com/PythonCharmers/python-future/issues/210
16983 (arguments
16984 `(#:tests? #f
16985 #:phases
16986 (modify-phases %standard-phases
16987 (replace 'sanity-check
16988 (let ((sanity-check (assoc-ref %standard-phases 'sanity-check)))
16989 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
16990 (let* ((files (find-files (site-packages inputs outputs)
16991 "top_level\\.txt"))
16992 (backups (map (lambda (f) (string-append f ".bak"))
16993 files)))
16994 (for-each copy-file files backups)
16995 (substitute* files
16996 ;; Nobody be usin' winreg on Guix
16997 ;; Also, don't force users to have tkinter when they don't
16998 ;; need it
16999 (("(winreg|tkinter)") ""))
17000 (apply sanity-check args)
17001 (for-each rename-file backups files))))))))
17002 (home-page "https://python-future.org")
17003 (synopsis "Single-source support for Python 3 and 2")
17004 (description
17005 "@code{python-future} is the missing compatibility layer between Python 2 and
17006 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
17007 to support both Python 2 and Python 3 with minimal overhead.")
17008 (license license:expat)))
17009
17010 (define-public python2-future
17011 (package-with-python2 python-future))
17012
17013 (define-public python-cysignals
17014 (package
17015 (name "python-cysignals")
17016 (version "1.9.0")
17017 (source
17018 (origin
17019 (method url-fetch)
17020 (uri (pypi-uri "cysignals" version))
17021 (sha256
17022 (base32
17023 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
17024 (build-system python-build-system)
17025 (native-inputs
17026 (list python-cython python-sphinx))
17027 (inputs
17028 (list pari-gp))
17029 (arguments
17030 `(#:modules ((guix build python-build-system)
17031 ((guix build gnu-build-system) #:prefix gnu:)
17032 (guix build utils))
17033 ;; FIXME: Tests are executed after installation and currently fail
17034 ;; when not installing into standard locations; the author is working
17035 ;; on a fix.
17036 #:tests? #f
17037 #:phases
17038 (modify-phases %standard-phases
17039 (add-before
17040 'build 'configure
17041 (assoc-ref gnu:%standard-phases 'configure)))))
17042 (home-page
17043 "https://github.com/sagemath/cysignals")
17044 (synopsis
17045 "Handling of interrupts and signals for Cython")
17046 (description
17047 "The cysignals package provides mechanisms to handle interrupts (and
17048 other signals and errors) in Cython code, using two related approaches,
17049 for mixed Cython/Python code or external C libraries and pure Cython code,
17050 respectively.")
17051 (license license:lgpl3+)))
17052
17053 (define-public python2-cysignals
17054 (package-with-python2 python-cysignals))
17055
17056 (define-public python2-shedskin
17057 (package
17058 (name "python2-shedskin")
17059 (version "0.9.4")
17060 (source
17061 (origin
17062 (method url-fetch)
17063 (uri (string-append "https://github.com/shedskin/shedskin/"
17064 "releases/download/v" version
17065 "/shedskin-" version ".tgz"))
17066 (sha256
17067 (base32
17068 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
17069 (build-system python-build-system)
17070 (arguments
17071 `(#:python ,python-2
17072 #:phases (modify-phases %standard-phases
17073 (add-after 'unpack 'fix-resulting-include-libs
17074 (lambda* (#:key inputs #:allow-other-keys)
17075 (let ((libgc (assoc-ref inputs "libgc"))
17076 (pcre (assoc-ref inputs "pcre")))
17077 (substitute* "shedskin/makefile.py"
17078 (("variable == 'CCFLAGS':[ ]*")
17079 (string-append "variable == 'CCFLAGS':\n"
17080 " line += ' -I " pcre "/include"
17081 " -I " libgc "/include'"))
17082 (("variable == 'LFLAGS':[ ]*")
17083 (string-append "variable == 'LFLAGS':\n"
17084 " line += ' -L" pcre "/lib"
17085 " -L " libgc "/lib'")))
17086 #t))))))
17087 (inputs (list pcre libgc))
17088 (home-page "https://shedskin.github.io/")
17089 (synopsis "Experimental Python-2 to C++ Compiler")
17090 (description (string-append "This is an experimental compiler for a subset of
17091 Python. It generates C++ code and a Makefile."))
17092 (license (list license:gpl3 license:bsd-3 license:expat))))
17093
17094 (define-public python-rope
17095 (package
17096 (name "python-rope")
17097 (version "0.19.0")
17098 (source
17099 (origin
17100 (method url-fetch)
17101 (uri (pypi-uri "rope" version))
17102 (sha256
17103 (base32
17104 "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4"))))
17105 (build-system python-build-system)
17106 (home-page "https://github.com/python-rope/rope")
17107 (synopsis "Refactoring library for Python")
17108 (description "Rope is a refactoring library for Python. It facilitates
17109 the renaming, moving and extracting of attributes, functions, modules, fields
17110 and parameters in Python 2 source code. These refactorings can also be applied
17111 to occurrences in strings and comments.")
17112 (license license:lgpl3+)))
17113
17114 (define-public python-py3status
17115 (package
17116 (name "python-py3status")
17117 (version "3.21")
17118 (source
17119 (origin
17120 (method url-fetch)
17121 (uri (pypi-uri "py3status" version))
17122 (sha256
17123 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
17124 (build-system python-build-system)
17125 (inputs
17126 (list file))
17127 (arguments
17128 '(#:phases
17129 (modify-phases %standard-phases
17130 ;; 'file' is used for detection of configuration file encoding
17131 ;; let's make link the dependency to particular input
17132 (add-before 'build 'patch-file-path
17133 (lambda* (#:key inputs #:allow-other-keys)
17134 (let ((file-path (assoc-ref inputs "file")))
17135 (substitute* "py3status/parse_config.py"
17136 (("\\[\"file\", \"-b\"")
17137 (string-append "['" file-path "/bin/file', '-b'")))
17138 #t))))
17139 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
17140 (home-page "https://github.com/ultrabug/py3status")
17141 (synopsis "Extensible i3status wrapper written in Python")
17142 (description "py3status is an i3status wrapper which extends i3status
17143 functionality in a modular way, allowing you to extend your panel with your
17144 own code, responding to click events and updating clock every second.")
17145 (license license:bsd-3)))
17146
17147 (define-public python-tblib
17148 (package
17149 (name "python-tblib")
17150 (version "1.6.0")
17151 (source (origin
17152 (method url-fetch)
17153 (uri (pypi-uri "tblib" version))
17154 (sha256
17155 (base32
17156 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
17157 (build-system python-build-system)
17158 (arguments
17159 `(#:phases
17160 (modify-phases %standard-phases
17161 (replace 'check
17162 (lambda _
17163 (invoke "py.test" "-vv" "tests" "README.rst"))))))
17164 (native-inputs
17165 (list python-pytest python-six))
17166 (home-page "https://github.com/ionelmc/python-tblib")
17167 (synopsis "Traceback serialization library")
17168 (description
17169 "Traceback serialization allows you to:
17170
17171 @enumerate
17172 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
17173 different processes. This allows better error handling when running code over
17174 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
17175
17176 @item Parse traceback strings and raise with the parsed tracebacks.
17177 @end enumerate\n")
17178 (license license:bsd-3)))
17179
17180 (define-public python2-tblib
17181 (package-with-python2 python-tblib))
17182
17183 (define-public python-tftpy
17184 (package
17185 (name "python-tftpy")
17186 (version "0.8.2")
17187 (source
17188 (origin
17189 (method git-fetch) ;no tests in PyPI archive
17190 (uri (git-reference
17191 (url "https://github.com/msoulier/tftpy")
17192 (commit version)))
17193 (file-name (git-file-name name version))
17194 (sha256
17195 (base32
17196 "1gl04ps8h8r7av3h0zbm8gwmkqs9rkk5vf7n8mv2bzrkwvy9hacc"))))
17197 (build-system python-build-system)
17198 (arguments
17199 `(#:phases (modify-phases %standard-phases
17200 (replace 'check
17201 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17202 (when tests?
17203 ;; The default DEBUG logging level is way too verbose.
17204 (substitute* "t/test.py"
17205 (("logging\\.DEBUG")
17206 "logging.INFO"))
17207 (invoke "python" "-m" "unittest" "t/test.py")))))))
17208 (home-page "http://tftpy.sourceforge.net/")
17209 (synopsis "Python trivial file transfer protocol (TFTP) library")
17210 (description "TFTPy is a trivial file transfer protocol (TFTP) Python
17211 library. It can be used to act both as a TFTP client or TFTP server.")
17212 (license license:expat)))
17213
17214 (define-public python-greenlet
17215 (package
17216 (name "python-greenlet")
17217 (version "1.1.2")
17218 (source (origin
17219 (method url-fetch)
17220 (uri (pypi-uri "greenlet" version))
17221 (sha256
17222 (base32
17223 "0jkln5bf6rq7dbvpv7ypin3pp9jqd2jr91yyxlnfcii3msj5w3z3"))))
17224 (build-system python-build-system)
17225 (home-page "https://greenlet.readthedocs.io/")
17226 (synopsis "Lightweight in-process concurrent programming")
17227 (description
17228 "Greenlet package is a spin-off of Stackless, a version of CPython
17229 that supports micro-threads called \"tasklets\". Tasklets run
17230 pseudo-concurrently (typically in a single or a few OS-level threads) and
17231 are synchronized with data exchanges on \"channels\".")
17232 (license (list license:psfl license:expat))))
17233
17234 (define-public python-objgraph
17235 (package
17236 (name "python-objgraph")
17237 (version "3.4.1")
17238 (source
17239 (origin
17240 (method url-fetch)
17241 (uri (pypi-uri "objgraph" version))
17242 (sha256
17243 (base32
17244 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
17245 (build-system python-build-system)
17246 (propagated-inputs
17247 (list python-graphviz))
17248 (native-inputs
17249 (list python-mock graphviz))
17250 (home-page "https://mg.pov.lt/objgraph/")
17251 (synopsis "Draw Python object reference graphs with graphviz")
17252 (description
17253 "This package provides tools to draw Python object reference graphs with
17254 graphviz.")
17255 (license license:expat)))
17256
17257 (define-public python2-objgraph
17258 (package-with-python2 python-objgraph))
17259
17260 (define-public python-gevent
17261 (package
17262 (name "python-gevent")
17263 (version "21.12.0")
17264 (source (origin
17265 (method url-fetch)
17266 (uri (pypi-uri "gevent" version))
17267 (sha256
17268 (base32
17269 "0kh9mmq811mzfgj60n64icybjp4ryjmfmy1vg7x92yrniibn92zl"))
17270 (modules '((guix build utils)))
17271 (snippet
17272 '(begin
17273 ;; unbunding libev and c-ares
17274 (delete-file-recursively "deps")))))
17275 (build-system python-build-system)
17276 (arguments
17277 `(#:modules ((ice-9 ftw)
17278 (ice-9 match)
17279 (srfi srfi-26)
17280 (guix build utils)
17281 (guix build python-build-system))
17282 #:phases (modify-phases %standard-phases
17283 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
17284 (lambda _
17285 (substitute* "src/gevent/subprocess.py"
17286 (("/bin/sh") (which "sh")))
17287 (for-each (lambda (file)
17288 (substitute* file
17289 (("/bin/sh") (which "sh"))
17290 (("/bin/true") (which "true"))))
17291 (find-files "src/greentest" "\\.py$"))))
17292 (add-before 'build 'do-not-use-bundled-sources
17293 (lambda _
17294 (setenv "GEVENTSETUP_EMBED" "0")
17295
17296 ;; Prevent building bundled libev.
17297 (substitute* "setup.py"
17298 (("run_make=_BUILDING")
17299 "run_make=False"))))
17300 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
17301 (lambda* (#:key inputs #:allow-other-keys)
17302 (let ((greenlet (string-append
17303 (assoc-ref inputs "python-greenlet")
17304 "/include")))
17305 (match (scandir greenlet
17306 (lambda (item)
17307 (string-prefix? "python" item)))
17308 ((python)
17309 (setenv "C_INCLUDE_PATH"
17310 (string-append greenlet "/" python ":"
17311 (or (getenv "C_INCLUDE_PATH")
17312 ""))))))))
17313 (add-before 'check 'pretend-to-be-CI
17314 (lambda _
17315 ;; A few tests are skipped due to network constraints or
17316 ;; get longer timeouts when running in a CI environment.
17317 ;; Piggy-back on that, as we need the same adjustments.
17318 (setenv "TRAVIS" "1")
17319 (setenv "APPVEYOR" "1")))
17320 (add-before 'check 'adjust-tests
17321 (lambda _
17322 (let ((disabled-tests
17323 '(;; These tests relies on networking which is
17324 ;; not available in the build container.
17325 "test__getaddrinfo_import.py"
17326 "test__server_pywsgi.py"
17327 ;; XXX: These tests borrow functionality from the
17328 ;; Python builtin 'test' module, but it is not
17329 ;; installed with the Guix Python distribution.
17330 "test_smtpd.py"
17331 "test_wsgiref.py"
17332 "test_urllib2.py"
17333 "test_thread.py"
17334 "test_threading.py"
17335 "test__threading_2.py"
17336 ;; These tests rely on KeyboardInterrupts which do not
17337 ;; work inside the build container for some reason
17338 ;; (lack of controlling terminal?).
17339 "test_subprocess.py"
17340 "test__issues461_471.py"
17341 ;; TODO: Patch out the tests that use getprotobyname, etc
17342 ;; instead of disabling all the tests from these files.
17343 "test__resolver_dnspython.py"
17344 "test__doctests.py"
17345 "test__all__.py"
17346 "test___config.py"
17347 "test__execmodules.py")))
17348 (call-with-output-file "skipped_tests.txt"
17349 (lambda (port)
17350 (format port "~a~%"
17351 (string-join disabled-tests "\n")))))))
17352 (replace 'check
17353 (lambda _
17354 ;; Use the build daemons configured number of workers.
17355 (setenv "NWORKERS" (number->string (parallel-job-count)))
17356
17357 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
17358 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
17359 (propagated-inputs
17360 (list python-greenlet python-zope-event python-zope-interface))
17361 (native-inputs
17362 ;; For tests.
17363 (list python-dnspython python-psutil python-objgraph))
17364 (inputs
17365 (list c-ares libev))
17366 (home-page "https://www.gevent.org/")
17367 (synopsis "Coroutine-based network library")
17368 (description
17369 "@code{gevent} is a coroutine-based Python networking library that uses
17370 @code{greenlet} to provide a high-level synchronous API on top of the
17371 @code{libev} event loop.")
17372 (license license:expat)))
17373
17374 (define-public python-fastimport
17375 (package
17376 (name "python-fastimport")
17377 (version "0.9.9")
17378 (source
17379 (origin
17380 (method url-fetch)
17381 (uri (pypi-uri "fastimport" version))
17382 (sha256
17383 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
17384 (build-system python-build-system)
17385 (home-page "https://github.com/jelmer/python-fastimport")
17386 (synopsis "VCS fastimport parser and generator in Python")
17387 (description "This package provides a parser for and generator of the Git
17388 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
17389 format.")
17390 (license license:gpl2+)))
17391
17392 (define-public python-twisted
17393 (package
17394 (name "python-twisted")
17395 (version "19.7.0")
17396 (source (origin
17397 (method url-fetch)
17398 (uri (pypi-uri "Twisted" version ".tar.bz2"))
17399 (sha256
17400 (base32
17401 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
17402 (build-system python-build-system)
17403 (arguments
17404 '(#:tests? #f ; FIXME: some tests fail
17405 #:phases
17406 (modify-phases %standard-phases
17407 ;; Remove scripts, because they depend on [conch]
17408 (add-after 'unpack 'remove-entrypoint
17409 (lambda _
17410 (substitute* "src/twisted/python/_setup.py"
17411 (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
17412 (propagated-inputs
17413 (list python-zope-interface
17414 python-pyhamcrest
17415 python-incremental
17416 python-hyperlink
17417 python-constantly
17418 python-automat))
17419 (home-page "https://twistedmatrix.com/")
17420 (synopsis "Asynchronous networking framework written in Python")
17421 (description
17422 "Twisted is an extensible framework for Python programming, with special
17423 focus on event-based network programming and multiprotocol integration.")
17424 (license license:expat)))
17425
17426 (define-public python-pika
17427 (package
17428 (name "python-pika")
17429 (version "1.2.0")
17430 (source
17431 (origin
17432 (method git-fetch)
17433 (uri (git-reference
17434 (url "https://github.com/pika/pika")
17435 (commit version)))
17436 (file-name (git-file-name name version))
17437 (sha256
17438 (base32
17439 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
17440 (build-system python-build-system)
17441 (arguments
17442 '(#:phases (modify-phases %standard-phases
17443 (add-before 'check 'disable-live-tests
17444 (lambda _
17445 ;; Disable tests that require RabbitMQ, which is not
17446 ;; yet available in Guix.
17447 (substitute* "setup.cfg"
17448 (("tests/unit,tests/acceptance")
17449 "tests/unit"))
17450 (with-directory-excursion "tests"
17451 (for-each delete-file
17452 '("unit/base_connection_tests.py"
17453 "unit/threaded_test_wrapper_test.py")))))
17454 (replace 'check
17455 (lambda _
17456 (invoke "nosetests"))))))
17457 (native-inputs
17458 (list python-mock
17459 python-nose
17460 ;; These are optional at runtime, and provided here for tests.
17461 python-gevent
17462 python-tornado
17463 python-twisted))
17464 (home-page "https://pika.readthedocs.org")
17465 (synopsis "Pure Python AMQP Client Library")
17466 (description
17467 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
17468 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
17469 network support library.")
17470 (license license:bsd-3)))
17471
17472 (define-public python-ply
17473 (package
17474 (name "python-ply")
17475 (version "3.11")
17476 (source
17477 (origin
17478 (method url-fetch)
17479 (uri (pypi-uri "ply" version))
17480 (sha256
17481 (base32
17482 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
17483 (build-system python-build-system)
17484 (home-page "http://www.dabeaz.com/ply/")
17485 (synopsis "Python Lex & Yacc")
17486 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
17487 It uses LR parsing and does extensive error checking.")
17488 (license license:bsd-3)))
17489
17490 (define-public python-tabulate
17491 (package
17492 (name "python-tabulate")
17493 (version "0.8.9")
17494 (source (origin
17495 (method url-fetch)
17496 (uri (pypi-uri "tabulate" version))
17497 (sha256
17498 (base32
17499 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
17500 (build-system python-build-system)
17501 (arguments
17502 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
17503 ;; and the latest release is not tagged in the upstream repository.
17504 '(#:tests? #f))
17505 (home-page "https://bitbucket.org/astanin/python-tabulate")
17506 (synopsis "Pretty-print tabular data")
17507 (description
17508 "Tabulate is a library and command-line utility to pretty-print tabular
17509 data in Python.")
17510 (license license:expat)))
17511
17512 (define-public python2-tabulate
17513 (package-with-python2 python-tabulate))
17514
17515 (define-public python-kazoo
17516 (package
17517 (name "python-kazoo")
17518 (version "2.8.0")
17519 (source
17520 (origin
17521 (method url-fetch)
17522 (uri (pypi-uri "kazoo" version))
17523 (sha256
17524 (base32
17525 "1zpj5cc8624w6i0pxgcxqkjwbkm4pkrv19d7wh5df3jais32g3jq"))))
17526 (build-system python-build-system)
17527 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
17528 (propagated-inputs
17529 (list python-six))
17530 (home-page "https://kazoo.readthedocs.org")
17531 (synopsis "High-level Zookeeper client library")
17532 (description
17533 "Kazoo is a Python client library for the Apache Zookeeper distributed
17534 application service. It is designed to be easy to use and to avoid common
17535 programming errors.")
17536 (license license:asl2.0)))
17537
17538 (define-public python2-kazoo
17539 (package-with-python2 python-kazoo))
17540
17541 (define-public python-pykafka
17542 (package
17543 (name "python-pykafka")
17544 (version "2.4.0")
17545 (source (origin
17546 (method url-fetch)
17547 (uri (pypi-uri "pykafka" version))
17548 (sha256
17549 (base32
17550 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
17551 (build-system python-build-system)
17552 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
17553 (propagated-inputs
17554 (list python-gevent python-kazoo python-tabulate))
17555 (inputs
17556 (list librdkafka))
17557 (home-page "https://pykafka.readthedocs.io/")
17558 (synopsis "Apache Kafka client for Python")
17559 (description
17560 "PyKafka is a client for the Apache Kafka distributed messaging system.
17561 It includes Python implementations of Kafka producers and consumers, which
17562 are optionally backed by a C extension built on librdkafka.")
17563 (license license:asl2.0)))
17564
17565 (define-public python-wcwidth
17566 (package
17567 (name "python-wcwidth")
17568 (version "0.1.8")
17569 (source (origin
17570 (method url-fetch)
17571 (uri (pypi-uri "wcwidth" version))
17572 (sha256
17573 (base32
17574 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
17575 (build-system python-build-system)
17576 (home-page "https://github.com/jquast/wcwidth")
17577 (synopsis "Measure number of terminal column cells of wide-character codes")
17578 (description "Wcwidth measures the number of terminal column cells of
17579 wide-character codes. It is useful for those implementing a terminal emulator,
17580 or programs that carefully produce output to be interpreted by one. It is a
17581 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
17582 specified in POSIX.1-2001 and POSIX.1-2008.")
17583 (license license:expat)))
17584
17585 (define-public python2-wcwidth
17586 (package-with-python2 python-wcwidth))
17587
17588 (define-public python2-jsonrpclib
17589 (package
17590 (name "python2-jsonrpclib")
17591 (version "0.1.7")
17592 (source (origin
17593 (method url-fetch)
17594 (uri (pypi-uri "jsonrpclib" version))
17595 (sha256
17596 (base32
17597 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
17598 (build-system python-build-system)
17599 (arguments
17600 `(#:tests? #f
17601 #:python ,python-2))
17602 (home-page "https://github.com/joshmarshall/jsonrpclib/")
17603 (synopsis "Implementation of JSON-RPC specification for Python")
17604 (description
17605 "This library is an implementation of the JSON-RPC specification.
17606 It supports both the original 1.0 specification, as well as the
17607 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
17608 etc.")
17609 (license license:asl2.0)))
17610
17611 (define-public python-chai
17612 (package
17613 (name "python-chai")
17614 (version "1.1.2")
17615 (source (origin
17616 (method url-fetch)
17617 (uri (pypi-uri "chai" version))
17618 (sha256
17619 (base32
17620 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
17621 (patches (search-patches "python-chai-drop-python2.patch"))))
17622 (build-system python-build-system)
17623 (home-page "https://github.com/agoragames/chai")
17624 (synopsis "Mocking framework for Python")
17625 (description
17626 "Chai provides an api for mocking, stubbing and spying your python
17627 objects, patterned after the Mocha library for Ruby.")
17628 (license license:bsd-3)))
17629
17630 (define-public python-inflection
17631 (package
17632 (name "python-inflection")
17633 (version "0.3.1")
17634 (source
17635 (origin (method url-fetch)
17636 (uri (pypi-uri "inflection" version))
17637 (sha256
17638 (base32
17639 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
17640 (build-system python-build-system)
17641 (native-inputs
17642 (list python-pytest))
17643 (home-page "https://github.com/jpvanhal/inflection")
17644 (synopsis "Python string transformation library")
17645 (description
17646 "Inflection is a string transformation library. It singularizes
17647 and pluralizes English words, and transforms strings from CamelCase to
17648 underscored string.")
17649 (license license:expat)))
17650
17651 (define-public python2-inflection
17652 (package-with-python2 python-inflection))
17653
17654 (define-public python-pylev
17655 (package
17656 (name "python-pylev")
17657 (version "1.3.0")
17658 (source (origin
17659 (method url-fetch)
17660 (uri (pypi-uri "pylev" version))
17661 (sha256
17662 (base32
17663 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
17664 (build-system python-build-system)
17665 (home-page "https://github.com/toastdriven/pylev")
17666 (synopsis "Levenshtein distance implementation in Python")
17667 (description "Pure Python Levenshtein implementation, based off the
17668 Wikipedia code samples at
17669 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
17670 (license license:bsd-3)))
17671
17672 (define-public python2-pylev
17673 (package-with-python2 python-pylev))
17674
17675 (define-public python-cleo
17676 (package
17677 (name "python-cleo")
17678 (version "0.8.1")
17679 (source (origin
17680 (method url-fetch)
17681 (uri (pypi-uri "cleo" version))
17682 (sha256
17683 (base32
17684 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
17685 (build-system python-build-system)
17686 (native-inputs
17687 (list ;; For testing
17688 python-mock python-pytest-mock python-pytest))
17689 (propagated-inputs
17690 (list python-backpack python-clikit python-pastel python-pylev))
17691 (home-page "https://github.com/sdispater/cleo")
17692 (synopsis "Command-line arguments library for Python")
17693 (description
17694 "Cleo allows you to create command-line commands with signature in
17695 docstring and colored output.")
17696 (license license:expat)))
17697
17698 (define-public python2-cleo
17699 (package-with-python2 python-cleo))
17700
17701 (define-public python-tomlkit
17702 (package
17703 (name "python-tomlkit")
17704 (version "0.7.0")
17705 (source
17706 (origin
17707 (method url-fetch)
17708 (uri (pypi-uri "tomlkit" version))
17709 (sha256
17710 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
17711 (build-system python-build-system)
17712 (native-inputs
17713 (list python-pytest python-pyyaml))
17714 (home-page "https://github.com/sdispater/tomlkit")
17715 (synopsis "Style-preserving TOML library")
17716 (description
17717 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
17718 preserves all comments, indentations, whitespace and internal element ordering,
17719 and makes them accessible and editable via an intuitive API. It can also
17720 create new TOML documents from scratch using the provided helpers. Part of the
17721 implementation has been adapted, improved, and fixed from Molten.")
17722 (license license:expat)))
17723
17724 (define-public python-shellingham
17725 (package
17726 (name "python-shellingham")
17727 (version "1.3.2")
17728 (source
17729 (origin
17730 (method url-fetch)
17731 (uri (pypi-uri "shellingham" version))
17732 (sha256
17733 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
17734 (build-system python-build-system)
17735 (arguments
17736 `(#:phases
17737 (modify-phases %standard-phases
17738 (add-after 'unpack 'restore-setup.py
17739 ;; setup.py will return in the next release.
17740 ;; <https://github.com/sarugaku/shellingham/issues/33>
17741 (lambda _
17742 (with-output-to-file "setup.py"
17743 (lambda _
17744 (display "from setuptools import setup\nsetup()\n")))
17745 #t)))))
17746 (home-page "https://github.com/sarugaku/shellingham")
17747 (synopsis "Tool to detect surrounding shell")
17748 (description
17749 "Shellingham detects what shell the current Python executable is
17750 running in.")
17751 (license license:isc)))
17752
17753 (define-public python-memcached
17754 (package
17755 (name "python-memcached")
17756 (version "1.59")
17757 (source
17758 (origin
17759 (method url-fetch)
17760 (uri (pypi-uri "python-memcached" version))
17761 (sha256
17762 (base32
17763 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
17764 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
17765 (build-system python-build-system)
17766 (propagated-inputs (list python-six))
17767 (home-page
17768 "https://github.com/linsomniac/python-memcached")
17769 (synopsis "Pure python memcached client")
17770 (description
17771 "This software is a pure Python interface to the memcached memory cache
17772 daemon. It is the client side software which allows storing values in one or
17773 more, possibly remote, memcached servers.")
17774 (license license:psfl)))
17775
17776 (define-public python-mergedeep
17777 (package
17778 (name "python-mergedeep")
17779 (version "1.3.4")
17780 (source
17781 (origin
17782 (method git-fetch)
17783 (uri (git-reference
17784 (url "https://github.com/clarketm/mergedeep")
17785 (commit (string-append "v" version))))
17786 (file-name (git-file-name name version))
17787 (sha256
17788 (base32
17789 "1msvvdzk33sxzgyvs4fs8dlsrsi7fjj038z83s0yw5h8m8d78469"))))
17790 (build-system python-build-system)
17791 (native-inputs (list python-pytest))
17792 (home-page "https://github.com/clarketm/mergedeep")
17793 (synopsis "Deep merge function for Python")
17794 (description "This package provides a deep merge function for Python,
17795 useful to combine multiple data objects as one.")
17796 (license license:expat)))
17797
17798 (define-public python-clikit
17799 (package
17800 (name "python-clikit")
17801 (version "0.6.2")
17802 (source
17803 (origin
17804 (method url-fetch)
17805 (uri (pypi-uri "clikit" version))
17806 (sha256
17807 (base32
17808 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
17809 (build-system python-build-system)
17810 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
17811 (propagated-inputs
17812 (list python-crashtest python-pastel python-pylev))
17813 (home-page "https://github.com/sdispater/clikit")
17814 (synopsis "Group of utilities to build command line interfaces")
17815 (description
17816 "CliKit is a group of utilities to build testable command line
17817 interfaces.")
17818 (properties `((python2-variant . ,(delay python2-clikit))))
17819 (license license:expat)))
17820
17821 (define-public python2-clikit
17822 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
17823 (package/inherit
17824 base
17825 (propagated-inputs
17826 `(("python-enum34" ,python2-enum34)
17827 ("python-typing" ,python2-typing)
17828 ,@(package-propagated-inputs base))))))
17829
17830 (define-public python-msgpack-python
17831 (package
17832 (name "python-msgpack-python")
17833 (version "0.5.6")
17834 (source
17835 (origin
17836 (method url-fetch)
17837 (uri (pypi-uri "msgpack-python" version))
17838 (sha256
17839 (base32
17840 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
17841 (build-system python-build-system)
17842 (home-page "https://msgpack.org/")
17843 (synopsis "Package to deserialize messages in MessagePack binary format")
17844 (description
17845 "MessagePack is an efficient binary serialization format. It lets you
17846 exchange data among multiple languages like JSON. But it's faster and
17847 smaller. Small integers are encoded into a single byte, and typical short
17848 strings require only one extra byte in addition to the strings themselves.")
17849 (license license:asl2.0)))
17850
17851 (define-public python-cachy
17852 (package
17853 (name "python-cachy")
17854 (version "0.3.0")
17855 (source
17856 (origin
17857 (method url-fetch)
17858 (uri (pypi-uri "cachy" version))
17859 (sha256
17860 (base32
17861 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
17862 (build-system python-build-system)
17863 (arguments
17864 '(#:phases
17865 (modify-phases %standard-phases
17866 (replace 'check
17867 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
17868 "pytest"))))))
17869 (native-inputs
17870 (list memcached python-fakeredis python-flexmock python-pifpaf
17871 python-pytest))
17872 (propagated-inputs
17873 (list python-memcached python-msgpack-python python-redis))
17874 (home-page "https://github.com/sdispater/cachy")
17875 (synopsis "Simple yet effective caching library")
17876 (description
17877 "Cachy provides a simple yet effective caching library. A simple but
17878 powerful API: thread-safety; decorator syntax; support for memcached, redis,
17879 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
17880 (license license:expat)))
17881
17882 (define-public poetry
17883 (package
17884 (name "poetry")
17885 (version "1.1.12")
17886 (source
17887 (origin
17888 (method url-fetch)
17889 (uri (pypi-uri "poetry" version))
17890 (sha256
17891 (base32
17892 "0rr54mvcfcv9cv6vw2122y28xvd2pwqpv2x8c8j5ayz3gwsy4rjw"))))
17893 (build-system python-build-system)
17894 (arguments
17895 `(#:tests? #f ;PyPI does not have tests
17896 #:phases
17897 (modify-phases %standard-phases
17898 (add-before 'build 'patch-setup-py
17899 (lambda _
17900 (substitute* "setup.py"
17901 ;; Relax some of the requirements.
17902 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
17903 (("(packaging>=20.4),<21.0" _ packaging) packaging)))))))
17904 (propagated-inputs
17905 (list python-cachecontrol
17906 python-cachy
17907 python-cleo
17908 python-crashtest
17909 python-entrypoints
17910 python-html5lib
17911 python-keyring
17912 ; Use of deprecated version of msgpack reported upstream:
17913 ; https://github.com/python-poetry/poetry/issues/3607
17914 python-msgpack-transitional
17915 python-packaging
17916 python-pexpect
17917 python-pip
17918 python-pkginfo
17919 python-poetry-core
17920 python-requests
17921 python-requests-toolbelt
17922 python-shellingham
17923 python-tomlkit
17924 python-virtualenv))
17925 (home-page "https://python-poetry.org")
17926 (synopsis "Python dependency management and packaging made easy")
17927 (description "Poetry is a tool for dependency management and packaging
17928 in Python. It allows you to declare the libraries your project depends on and
17929 it will manage (install/update) them for you.")
17930 (license license:expat)))
17931
17932 (define-public python-lark-parser
17933 (package
17934 (name "python-lark-parser")
17935 (version "0.9.0")
17936 (source (origin
17937 (method url-fetch)
17938 (uri (pypi-uri "lark-parser" version))
17939 (sha256
17940 (base32
17941 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
17942 (build-system python-build-system)
17943 (home-page "https://github.com/lark-parser/lark")
17944 (synopsis "Multi-language parser for Python")
17945 (description
17946 "Lark is a parser built with a focus on ergonomics, performance and
17947 resilience. Lark can parse all context-free languages. That means it is
17948 capable of parsing almost any programming language out there, and to
17949 some degree most natural languages too.")
17950 (license license:expat)))
17951
17952 (define-public python-libcst
17953 (package
17954 (name "python-libcst")
17955 (version "0.3.8")
17956 (source (origin
17957 (method url-fetch)
17958 (uri (pypi-uri "libcst" version))
17959 (sha256
17960 (base32
17961 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
17962 (build-system python-build-system)
17963 (arguments
17964 `(#:phases
17965 (modify-phases %standard-phases
17966 (add-after 'unpack 'remove-failing-tests
17967 (lambda _
17968 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
17969 (delete-file "libcst/tests/test_fuzz.py")
17970 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
17971 (delete-file "libcst/tests/test_pyre_integration.py")
17972 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
17973 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
17974 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
17975 (add-before 'check 'generate-test-data
17976 (lambda _
17977 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
17978 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
17979 (replace 'check
17980 (lambda* (#:key tests? #:allow-other-keys)
17981 (when tests?
17982 (invoke "python" "-m" "unittest")))))))
17983 (native-inputs
17984 (list python-black python-isort))
17985 (propagated-inputs
17986 (list python-typing-extensions python-typing-inspect python-pyyaml))
17987 (home-page "https://github.com/Instagram/LibCST")
17988 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
17989 (description
17990 "LibCST parses Python source code as a CST tree that keeps all
17991 formatting details (comments, whitespaces, parentheses, etc). It's useful
17992 for building automated refactoring (codemod) applications and linters.
17993 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
17994 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
17995 naming node types and fields, LibCST creates a lossless CST that looks and
17996 feels like an AST.")
17997 (license (list license:expat
17998 ;; Some files unde libcst/_parser/ are under Python Software
17999 ;; Foundation license (see LICENSE file for details)
18000 license:psfl
18001 ;; libcst/_add_slots.py
18002 license:asl2.0))))
18003
18004 (define-public python-libcst-minimal
18005 (hidden-package
18006 (package
18007 (inherit python-libcst)
18008 (name "python-libcst-minimal")
18009 (arguments '(#:tests? #f))
18010 (native-inputs '()))))
18011
18012 (define-public python-typing-inspect
18013 (package
18014 (name "python-typing-inspect")
18015 (version "0.6.0")
18016 (source (origin
18017 (method url-fetch)
18018 (uri (pypi-uri "typing_inspect" version))
18019 (sha256
18020 (base32
18021 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
18022 (patches (search-patches "python-typing-inspect-fix.patch"))))
18023 (build-system python-build-system)
18024 (propagated-inputs
18025 (list python-mypy-extensions python-typing-extensions))
18026 (home-page "https://github.com/ilevkivskyi/typing_inspect")
18027 (synopsis "API for inspection of types in the Python @code{typing} module")
18028 (description
18029 "The @code{typing_inspect} module defines experimental API for runtime
18030 inspection of types defined in the Python standard typing module.")
18031 (license license:expat)))
18032
18033 (define-public python-lazy-object-proxy
18034 (package
18035 (name "python-lazy-object-proxy")
18036 (version "1.5.1")
18037 (source (origin
18038 (method url-fetch)
18039 (uri (pypi-uri "lazy-object-proxy" version))
18040 (sha256
18041 (base32
18042 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
18043 (native-inputs
18044 (list python-setuptools-scm))
18045 (build-system python-build-system)
18046 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
18047 (synopsis "Lazy object proxy for python")
18048 (description
18049 "Lazy object proxy is an object that wraps a callable but defers the call
18050 until the object is actually required, and caches the result of said call.")
18051 (license license:bsd-2)))
18052
18053 (define-public python2-lazy-object-proxy
18054 (package-with-python2 python-lazy-object-proxy))
18055
18056 (define-public python-dnspython
18057 (package
18058 (name "python-dnspython")
18059 (version "2.1.0")
18060 (source (origin
18061 (method url-fetch)
18062 (uri (pypi-uri "dnspython" version ".zip"))
18063 (sha256
18064 (base32
18065 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
18066 (build-system python-build-system)
18067 (arguments
18068 `(#:tests? #f ; XXX: requires internet access
18069 #:phases
18070 (modify-phases %standard-phases
18071 (add-after 'unpack 'patch-getprotobyname-calls
18072 ;; These calls are problematic in the build environment as there is
18073 ;; no /etc/protocols. This breaks the sanity-check phase of any
18074 ;; package depnding on this one.
18075 (lambda _
18076 (substitute* "dns/rdtypes/IN/WKS.py"
18077 (("socket.getprotobyname\\('tcp'\\)")
18078 "6")
18079 (("socket.getprotobyname\\('udp'\\)")
18080 "17")))))))
18081 (native-inputs (list unzip))
18082 (home-page "https://www.dnspython.org")
18083 (synopsis "DNS toolkit for Python")
18084 (description
18085 "dnspython is a DNS toolkit for Python. It supports almost all record
18086 types. It can be used for queries, zone transfers, and dynamic updates.
18087 It supports TSIG authenticated messages and EDNS0.")
18088 (license license:expat)))
18089
18090 (define-public python-dnspython-1.16
18091 (package
18092 (inherit python-dnspython)
18093 (version "1.16.0")
18094 (source (origin
18095 (method url-fetch)
18096 (uri (string-append "http://www.dnspython.org/kits/"
18097 version "/dnspython-" version ".tar.gz"))
18098 (sha256
18099 (base32
18100 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
18101 (native-inputs '())))
18102
18103 (define-public python2-dnspython-1.16
18104 (package-with-python2 python-dnspython-1.16))
18105
18106 (define-public python-py3dns
18107 (package
18108 (name "python-py3dns")
18109 (version "3.2.1")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "py3dns" version))
18114 (sha256
18115 (base32
18116 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
18117 (build-system python-build-system)
18118 ;; This package wants to read /etc/resolv.conf. We can't patch it without
18119 ;; removing functionality so we copy from Nix and "just don't build it".
18120 (arguments
18121 `(#:phases
18122 (modify-phases %standard-phases
18123 (add-after 'unpack 'patch-source
18124 (lambda _
18125 (substitute* "setup.py"
18126 (("import DNS") "")
18127 (("DNS.__version__") (string-append "\"" ,version "\"")))
18128 #t)))
18129 #:tests? #f)) ; Also skip the tests.
18130 (home-page "https://launchpad.net/py3dns")
18131 (synopsis "Python 3 DNS library")
18132 (description "This Python 3 module provides a DNS API for looking up DNS
18133 entries from within Python 3 modules and applications. This module is a
18134 simple, lightweight implementation.")
18135 (license license:psfl)))
18136
18137 (define-public python-email-validator
18138 (package
18139 (name "python-email-validator")
18140 (version "1.0.2")
18141 (source
18142 (origin (method url-fetch)
18143 (uri (pypi-uri "email_validator" version))
18144 (sha256
18145 (base32
18146 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
18147 (build-system python-build-system)
18148 (arguments
18149 '(#:phases
18150 (modify-phases %standard-phases
18151 (add-before 'build 'use-dnspython
18152 (lambda _
18153 (substitute* "setup.py"
18154 (("dnspython3") "dnspython"))
18155 #t)))))
18156 (propagated-inputs
18157 (list python-dnspython python-idna))
18158 (home-page "https://github.com/JoshData/python-email-validator")
18159 (synopsis "Email address validation library for Python")
18160 (description
18161 "This library validates email address syntax and deliverability.")
18162 (license license:cc0)))
18163
18164 (define-public python2-email-validator
18165 (package-with-python2 python-email-validator))
18166
18167 (define-public python-ukpostcodeparser
18168 (package
18169 (name "python-ukpostcodeparser")
18170 (version "1.1.2")
18171 (source (origin
18172 (method url-fetch)
18173 (uri (pypi-uri "UkPostcodeParser" version))
18174 (sha256
18175 (base32
18176 "03jkf1ygbwq3akzbcjyjk1akc1hv2sfgx90306pq1nwklbpn80lk"))))
18177 (build-system python-build-system)
18178 (arguments
18179 `(#:phases
18180 (modify-phases %standard-phases
18181 (replace 'check
18182 (lambda* (#:key tests? #:allow-other-keys)
18183 (when tests?
18184 ;; Tests for lowercase postcodes fail.
18185 (invoke "pytest" "-vv" "ukpostcodeparser/test/parser.py" "-k"
18186 (string-append "not test_091 "
18187 "and not test_097 "
18188 "and not test_098 "
18189 "and not test_125 "
18190 "and not test_131"))))))))
18191 (native-inputs
18192 (list python-pytest))
18193 (home-page "https://github.com/hamstah/ukpostcodeparser")
18194 (synopsis "UK Postcode parser for Python")
18195 (description
18196 "This library provides the @code{parse_uk_postcode} function for
18197 parsing UK postcodes.")
18198 (license license:expat)))
18199
18200 (define-public python2-ukpostcodeparser
18201 (package-with-python2 python-ukpostcodeparser))
18202
18203 (define-public python-faker
18204 (package
18205 (name "python-faker")
18206 (version "13.3.4")
18207 (source (origin
18208 (method url-fetch)
18209 (uri (pypi-uri "Faker" version))
18210 (sha256
18211 (base32
18212 "04855dqvvi2mr739l5x3qf82rxq0a7spc8gl76k8xixmbw36328q"))))
18213 (build-system python-build-system)
18214 (arguments
18215 '(#:phases
18216 (modify-phases %standard-phases
18217 (replace 'check
18218 (lambda* (#:key tests? #:allow-other-keys)
18219 (when tests?
18220 (invoke "python" "-m" "pytest" "-v")))))))
18221 (native-inputs
18222 (list python-freezegun
18223 python-pytest
18224 python-random2
18225 python-ukpostcodeparser
18226 python-validators))
18227 (propagated-inputs (list python-dateutil))
18228 (home-page "https://github.com/joke2k/faker")
18229 (synopsis "Python package that generates fake data")
18230 (description
18231 "Faker is a Python package that generates fake data such as names,
18232 addresses, and phone numbers.")
18233 (license license:expat)))
18234
18235 (define-public python-pyaml
18236 (package
18237 (name "python-pyaml")
18238 (version "18.11.0")
18239 (source (origin
18240 (method url-fetch)
18241 (uri (pypi-uri "pyaml" version))
18242 (sha256
18243 (base32
18244 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
18245 (build-system python-build-system)
18246 (native-inputs
18247 (list python-unidecode))
18248 (propagated-inputs
18249 (list python-pyyaml))
18250 (home-page "https://github.com/mk-fg/pretty-yaml")
18251 (synopsis "YAML pretty-print library for Python")
18252 (description
18253 "pyaml is a PyYAML based python module to produce pretty and readable
18254 YAML-serialized data.")
18255 (license license:wtfpl2)))
18256
18257 (define-public python2-pyaml
18258 (package-with-python2 python-pyaml))
18259
18260 (define-public python-pyyaml-env-tag
18261 (package
18262 (name "python-pyyaml-env-tag")
18263 (version "0.1")
18264 (source
18265 (origin
18266 (method url-fetch)
18267 (uri (pypi-uri "pyyaml_env_tag" version))
18268 (sha256
18269 (base32 "1nsva88jsmwn0cb9jnrfiz4dvs9xakkpgfii7g1xwkx1pmsjc2bh"))))
18270 (build-system python-build-system)
18271 (propagated-inputs (list python-pyyaml))
18272 (home-page "https://github.com/waylan/pyyaml-env-tag")
18273 (synopsis "Custom YAML tag for environment variables")
18274 (description "This package provides a custom YAML tag for referencing
18275 environment variables in YAML files.")
18276 (license license:expat)))
18277
18278 (define-public python-backpack
18279 (package
18280 (name "python-backpack")
18281 (version "0.1")
18282 (source
18283 (origin
18284 (method url-fetch)
18285 (uri (pypi-uri "backpack" version))
18286 (sha256
18287 (base32
18288 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
18289 (build-system python-build-system)
18290 (native-inputs
18291 (list python-pytest python-nose python-toml))
18292 (propagated-inputs
18293 (list python-simplejson))
18294 (home-page "https://github.com/sdispater/backpack")
18295 (synopsis "Utilities for working with Python collections")
18296 (description "Backpack provides some useful utilities for working with
18297 collections of data.")
18298 (license license:expat)))
18299
18300 (define-public python2-backpack
18301 (package-with-python2 python-backpack))
18302
18303 (define-public python-prompt-toolkit
18304 (package
18305 (name "python-prompt-toolkit")
18306 (version "3.0.29")
18307 (source
18308 (origin
18309 (method url-fetch)
18310 (uri (pypi-uri "prompt_toolkit" version))
18311 (sha256
18312 (base32 "19vf5cahp3imdpwhgvk55g3dvqmc6ga175r4vkq79kffx1h0yr5x"))))
18313 (build-system python-build-system)
18314 (arguments
18315 `(#:phases
18316 (modify-phases %standard-phases
18317 (replace 'check
18318 (lambda* (#:key tests? #:allow-other-keys)
18319 (when tests?
18320 ;; HOME is needed for the test
18321 ;; "test_pathcompleter_can_expanduser".
18322 (setenv "HOME" "/tmp")
18323 (invoke "pytest" "-vv")))))))
18324 (propagated-inputs
18325 (list python-wcwidth))
18326 (native-inputs
18327 (list python-pytest))
18328 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
18329 (synopsis "Library for building command line interfaces in Python")
18330 (description
18331 "Prompt-Toolkit is a library for building interactive command line
18332 interfaces in Python. It's like GNU Readline but it also features syntax
18333 highlighting while typing, out-of-the-box multi-line input editing, advanced
18334 code completion, incremental search, support for Chinese double-width
18335 characters, mouse support, and auto suggestions.")
18336 (license license:bsd-3)
18337 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
18338
18339 (define-public python-proselint
18340 (package
18341 (name "python-proselint")
18342 (version "0.13.0")
18343 (source
18344 (origin
18345 (method url-fetch)
18346 (uri (pypi-uri "proselint" version))
18347 (sha256
18348 (base32
18349 "0n1ahnq2mkgvh94g05xhc3l1fs3hh0ycskqlqivhhfdaq8ybdlkx"))))
18350 (build-system python-build-system)
18351 (arguments
18352 `(#:tests? #f
18353 #:phases
18354 (modify-phases %standard-phases
18355 (add-after 'unpack 'set-home-directory
18356 (lambda _
18357 (setenv "HOME" "/tmp"))))))
18358 (propagated-inputs
18359 (list python-click-8 python-future python-six))
18360 (home-page "https://github.com/amperser/proselint")
18361 (synopsis "Linter for prose")
18362 (description "@code{python-proselint} is a linter for English prose, that
18363 scans through a file and detects issues.")
18364 (license license:bsd-3)))
18365
18366 (define-public python-prompt-toolkit-2
18367 (package (inherit python-prompt-toolkit)
18368 (name "python-prompt-toolkit")
18369 (version "2.0.7")
18370 (source
18371 (origin
18372 (method url-fetch)
18373 (uri (pypi-uri "prompt_toolkit" version))
18374 (sha256
18375 (base32
18376 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
18377 (propagated-inputs
18378 (list python-wcwidth python-six python-pygments))
18379 (properties '())))
18380
18381 (define-public python2-prompt-toolkit
18382 (package-with-python2 python-prompt-toolkit-2))
18383
18384 (define-public python-prompt-toolkit-1
18385 (package (inherit python-prompt-toolkit-2)
18386 (version "1.0.15")
18387 (source
18388 (origin
18389 (method url-fetch)
18390 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
18391 (sha256
18392 (base32
18393 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
18394
18395 (define-public python2-prompt-toolkit-1
18396 (package-with-python2 python-prompt-toolkit-1))
18397
18398 (define-public python-jedi
18399 (package
18400 (name "python-jedi")
18401 (version "0.18.1")
18402 (source
18403 (origin
18404 (method git-fetch)
18405 (uri (git-reference
18406 (url "https://github.com/davidhalter/jedi")
18407 (commit (string-append "v" version))
18408 (recursive? #true)))
18409 (file-name (git-file-name name version))
18410 (sha256
18411 (base32
18412 "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1"))))
18413 (build-system python-build-system)
18414 (arguments
18415 `(#:phases
18416 (modify-phases %standard-phases
18417 (replace 'check
18418 (lambda* (#:key tests? #:allow-other-keys)
18419 (when tests?
18420 (setenv "HOME" "/tmp")
18421 (invoke "python" "-m" "pytest" "-vv"))
18422 #t)))))
18423 (native-inputs
18424 (list python-colorama python-docopt python-pytest))
18425 (propagated-inputs
18426 (list python-parso))
18427 (home-page "https://github.com/davidhalter/jedi")
18428 (synopsis "Autocompletion and static analysis library for Python")
18429 (description
18430 "Jedi is a static analysis tool for Python that can be used in Integrated
18431 Development Environments (@dfn{IDE}s) and text editors. It understands Python
18432 on a deeper level than many other static analysis frameworks for Python.
18433
18434 Jedi understands docstrings and you can use Jedi autocompletion in your REPL
18435 as well.")
18436 (license license:expat)))
18437
18438 (define-public ptpython
18439 (package
18440 (name "ptpython")
18441 (version "3.0.17")
18442 (source (origin
18443 (method url-fetch)
18444 (uri (pypi-uri "ptpython" version))
18445 (sha256
18446 (base32
18447 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
18448 (build-system python-build-system)
18449 (arguments
18450 `(#:tests? #f)) ;there are no tests
18451 (propagated-inputs
18452 (list python-appdirs python-black python-jedi python-prompt-toolkit
18453 python-pygments))
18454 (home-page "https://github.com/jonathanslenders/ptpython")
18455 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
18456 (description
18457 "ptpython is a Python read-eval-print loop with IDE-like features.
18458 It supports syntax highlighting, multiline editing, autocompletion, mouse,
18459 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
18460 etc.")
18461 (license license:bsd-3)
18462 (properties `((python2-variant . ,(delay ptpython-2))))))
18463
18464 (define-public ptpython-2
18465 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
18466 (package/inherit base
18467 (name "ptpython2"))))
18468
18469 (define-public python-easyprocess
18470 (package
18471 (name "python-easyprocess")
18472 (version "0.3")
18473 (source
18474 (origin
18475 (method url-fetch)
18476 (uri (pypi-uri "EasyProcess" version))
18477 (sha256
18478 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
18479 (build-system python-build-system)
18480 (arguments
18481 ;; Tests require pyvirtualdisplay, which requires this package.
18482 `(#:tests? #f))
18483 (home-page "https://github.com/ponty/easyprocess")
18484 (synopsis "Python subprocess interface")
18485 (description
18486 "@code{easyprocess} is an easy to use Python subprocess interface.")
18487 (license license:bsd-3)))
18488
18489 (define-public python-entrypoint2
18490 (package
18491 (name "python-entrypoint2")
18492 (version "0.2.4")
18493 (source
18494 (origin
18495 (method url-fetch)
18496 (uri (pypi-uri "entrypoint2" version))
18497 (sha256
18498 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
18499 (build-system python-build-system)
18500 (arguments
18501 `(#:test-target "pytest"))
18502 (native-inputs
18503 (list python-easyprocess python-pytest python-pytest-runner))
18504 (home-page "https://github.com/ponty/entrypoint2")
18505 (synopsis "Command-line interface for Python modules")
18506 (description
18507 "@code{entrypoint2} is an easy to use command-line interface for Python
18508 modules based on @code{argparse}. It translates function signature and
18509 documentation to argparse configuration.")
18510 (license license:bsd-3)))
18511
18512 (define-public python-pyvirtualdisplay
18513 (package
18514 (name "python-pyvirtualdisplay")
18515 (version "2.1")
18516 (source
18517 (origin
18518 (method url-fetch)
18519 (uri (pypi-uri "PyVirtualDisplay" version))
18520 (sha256
18521 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
18522 (build-system python-build-system)
18523 (arguments
18524 ;; Tests fail with:
18525 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
18526 `(#:tests? #f))
18527 (native-inputs
18528 (list python-entrypoint2 python-psutil python-pytest
18529 python-pytest-runner))
18530 (propagated-inputs
18531 (list python-easyprocess python-pillow))
18532 (home-page "https://github.com/ponty/pyvirtualdisplay")
18533 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
18534 (description
18535 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
18536 (license license:bsd-3)))
18537
18538 (define-public python-stem
18539 (package
18540 (name "python-stem")
18541 (version "1.8.0")
18542 (source
18543 (origin
18544 (method url-fetch)
18545 (uri (pypi-uri "stem" version))
18546 (sha256
18547 (base32
18548 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
18549 (build-system python-build-system)
18550 (arguments
18551 `(#:phases
18552 (modify-phases %standard-phases
18553 (add-after 'unpack 'fix-tests
18554 ;; See https://github.com/torproject/stem/issues/56
18555 (lambda _
18556 (substitute* "run_tests.py"
18557 (("test\\.task\\.MOCK_VERSION,")
18558 ""))))
18559 (replace 'check
18560 (lambda _
18561 (invoke "./run_tests.py" "--unit")
18562 #t)))))
18563 (native-inputs
18564 (list python-mock python-pycodestyle python-pyflakes))
18565 (home-page "https://stem.torproject.org/")
18566 (synopsis
18567 "Python controller library that allows applications to interact with Tor")
18568 (description
18569 "Stem is a Python controller library for Tor. With it you can use Tor's
18570 control protocol to script against the Tor process and read descriptor data
18571 relays publish about themselves.")
18572 (license license:lgpl3)))
18573
18574 (define-public python-pyserial
18575 (package
18576 (name "python-pyserial")
18577 (version "3.5")
18578 (source
18579 (origin
18580 (method url-fetch)
18581 (uri (pypi-uri "pyserial" version))
18582 (sha256
18583 (base32
18584 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
18585 (build-system python-build-system)
18586 (arguments
18587 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
18588 ;; #:phases
18589 ;; (modify-phases %standard-phases
18590 ;; (replace 'check
18591 ;; (lambda _
18592 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
18593 (home-page
18594 "https://github.com/pyserial/pyserial")
18595 (synopsis "Python Serial Port Bindings")
18596 (description "@code{pyserial} provide serial port bindings for Python. It
18597 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
18598 and/or Xon/Xoff. The port is accessed in RAW mode.")
18599 (license license:bsd-3)))
18600
18601 (define-public python2-pyserial
18602 (package-with-python2 python-pyserial))
18603
18604 (define-public python-pyserial-asyncio
18605 (package
18606 (name "python-pyserial-asyncio")
18607 (version "0.5")
18608 (source
18609 (origin
18610 (method url-fetch)
18611 (uri (pypi-uri "pyserial-asyncio" version))
18612 (sha256
18613 (base32 "0cwd2cjz859v6jrm3y6hikfqjyhyfj5vhfjb8vvflvl6791yah8n"))))
18614 (build-system python-build-system)
18615 (propagated-inputs (list python-pyserial))
18616 (home-page "https://github.com/pyserial/pyserial-asyncio")
18617 (synopsis "Pyserial asynchronous I/O extension")
18618 (description "This package extends Pyserial with asynchronous I/O
18619 support.")
18620 (license license:bsd-3)))
18621
18622 (define-public python-pymodbus
18623 (package
18624 (name "python-pymodbus")
18625 (version "2.5.3")
18626 (source
18627 (origin
18628 (method git-fetch)
18629 (uri (git-reference
18630 (url "https://github.com/riptideio/pymodbus")
18631 (commit (string-append "v" version))))
18632 (file-name (git-file-name name version))
18633 (sha256
18634 (base32
18635 "0kjjrx7xrlx0pf3y67hhr4xvqrly3xzmvf6ic5as61m6z19m7zd5"))))
18636 (build-system python-build-system)
18637 (arguments
18638 `(#:phases (modify-phases %standard-phases
18639 (add-after 'unpack 'disable-problematic-tests
18640 (lambda _
18641 ;; The following test modules rely on Python's own
18642 ;; 'test' module, which is not distributed in the Python
18643 ;; package of Guix.
18644 (delete-file "test/test_client_async_asyncio.py")
18645 (delete-file "test/test_client_sync_diag.py")
18646 ;; The following test module requires the asynctest
18647 ;; library, abandoned without support for Python 3.9+
18648 ;; (see:
18649 ;; https://github.com/riptideio/pymodbus/issues/681).
18650 (delete-file "test/test_server_asyncio.py")))
18651 (replace 'check
18652 (lambda* (#:key tests? #:allow-other-keys)
18653 (when tests?
18654 (invoke "python" "-m" "pytest")))))))
18655 (native-inputs
18656 (list python-mock
18657 python-pytest
18658 python-redis
18659 python-sqlalchemy
18660 python-tornado
18661 python-twisted))
18662 (propagated-inputs
18663 (list python-pyserial
18664 python-six
18665 ;; For the REPL.
18666 python-aiohttp
18667 python-click
18668 python-prompt-toolkit
18669 python-pygments
18670 python-pyserial-asyncio))
18671 (home-page "https://github.com/riptideio/pymodbus/")
18672 (synopsis "Modbus protocol stack in Python")
18673 (description "Pymodbus is a full Modbus protocol implementation using
18674 @code{asyncio}, @code{tornado} or @code{twisted} for its asynchronous
18675 communications core. It includes the following @emph{client} features:
18676 @itemize
18677 @item full read/write protocol on discrete and register
18678 @item most of the extended protocol (diagnostic/file/pipe/setting/information)
18679 @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
18680 @item asynchronous and synchronous versions
18681 @item payload builder/decoder utilities
18682 @item pymodbus read eval print loop (REPL).
18683 @end itemize
18684 It also includes the following @emph{server} features:
18685 @itemize
18686 @item can function as a fully implemented Modbus server
18687 @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
18688 @item asynchronous and synchronous versions
18689 @item full server control context (device information, counters, etc)
18690 @item a number of backing contexts (database, redis, sqlite, a slave device).
18691 @end itemize")
18692 (license license:bsd-3)))
18693
18694 (define-public python-kivy-garden
18695 (package
18696 (name "python-kivy-garden")
18697 (version "0.1.4")
18698 (source
18699 (origin
18700 (method url-fetch)
18701 (uri (pypi-uri "kivy-garden" version))
18702 (sha256
18703 (base32 "0wkcpr2zc1q5jb0bi7v2dgc0vs5h1y7j42mviyh764j2i0kz8mn2"))))
18704 (build-system python-build-system)
18705 (arguments
18706 '(#:phases (modify-phases %standard-phases
18707 (add-after 'install 'remove-bat-file
18708 (lambda* (#:key outputs #:allow-other-keys)
18709 (let ((out (assoc-ref outputs "out")))
18710 (delete-file
18711 (string-append out "/bin/garden.bat"))))))))
18712 (propagated-inputs
18713 (list python-requests))
18714 (home-page "https://github.com/kivy-garden/garden")
18715 (synopsis "Garden tool for Kivy flowers")
18716 (description
18717 "This package provides the @command{garden} command to install packages
18718 for Kivy, the multitouch application platform.")
18719 (license license:expat)))
18720
18721 (define-public python-kivy
18722 (package
18723 (name "python-kivy")
18724 (version "2.1.0")
18725 (source
18726 (origin
18727 (method url-fetch)
18728 (uri (pypi-uri "Kivy" version))
18729 (file-name (string-append name "-" version ".tar.gz"))
18730 (sha256
18731 (base32
18732 "1cq4djfn7h8560mvz94dydsldg2jpp5w9rby7nafgmbh7fxg65is"))))
18733 (build-system python-build-system)
18734 (arguments
18735 `(#:tests? #f ; Tests require many optional packages
18736 #:phases
18737 (modify-phases %standard-phases
18738 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
18739 (lambda* (#:key inputs #:allow-other-keys)
18740 (setenv "KIVY_SDL2_PATH"
18741 (search-input-directory inputs "/include/SDL2"))))
18742 (add-before 'build 'set-home
18743 (lambda _
18744 ;; 'kivy/__init__.py' wants to create $HOME/.kivy.
18745 (setenv "HOME" (getcwd)))))))
18746 (native-inputs
18747 (list pkg-config python-cython))
18748 (inputs
18749 (list gstreamer
18750 mesa
18751 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
18752 python-docutils
18753 python-kivy-garden
18754 python-pygments))
18755 (home-page "https://kivy.org")
18756 (synopsis "Multitouch application framework")
18757 (description
18758 "Kivy is a software library for rapid development of hardware-accelerated
18759 multitouch applications.")
18760 (license license:expat)))
18761
18762 (define-public python-kivymd
18763 (package
18764 (name "python-kivymd")
18765 (version "0.104.2")
18766 (source
18767 (origin
18768 (method url-fetch)
18769 (uri (pypi-uri "kivymd" version))
18770 (sha256
18771 (base32 "04lwy6j0agrdwa4a6dl6qs97nx9ysmscmm8psvdzjpyj8aa1zg4p"))))
18772 (build-system python-build-system)
18773 (arguments
18774 `(#:tests? #f ;tests require network
18775 #:phases
18776 (modify-phases %standard-phases
18777 (add-before 'sanity-check 'set-home
18778 (lambda _
18779 ;; 'kivy/__init__.py' wants to create $HOME/.kivy.
18780 (setenv "HOME" (getcwd)))))))
18781 (native-inputs (list python-docutils))
18782 (propagated-inputs
18783 (list python-kivy python-pillow python-pygments python-kivy-garden))
18784 (home-page "https://github.com/kivymd/KivyMD")
18785 (synopsis "Material Design compliant widgets for use with Kivy")
18786 (description
18787 "This package provides Kivy widgets that approximate Google's Material
18788 Design spec without sacrificing ease of use or application performance.")
18789 (license license:expat)))
18790
18791 (define-public python2-kivy
18792 (package-with-python2 python-kivy))
18793
18794 (define-public python-binaryornot
18795 (package
18796 (name "python-binaryornot")
18797 (version "0.4.4")
18798 (source (origin
18799 (method url-fetch)
18800 (uri (pypi-uri "binaryornot" version))
18801 (sha256
18802 (base32
18803 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
18804 (build-system python-build-system)
18805 (arguments
18806 `(#:phases
18807 (modify-phases %standard-phases
18808 (add-after 'unpack 'patch-tests
18809 (lambda _
18810 ;; TypeError: binary() got an unexpected keyword argument
18811 ;; 'average_size'.
18812 (substitute* "tests/test_check.py"
18813 (("average_size=512") ""))
18814 #t)))))
18815 (propagated-inputs
18816 (list python-chardet python-hypothesis))
18817 (home-page "https://github.com/audreyr/binaryornot")
18818 (synopsis "Package to check if a file is binary or text")
18819 (description "Ultra-lightweight pure Python package to check if a file is
18820 binary or text.")
18821 (license license:bsd-3)
18822 (properties `((python2-variant . ,(delay python2-binaryornot))))))
18823
18824 (define-public python2-binaryornot
18825 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
18826 (package/inherit base
18827 (propagated-inputs
18828 `(("python2-enum34" ,python2-enum34)
18829 ,@(package-propagated-inputs base))))))
18830
18831 (define-public binwalk
18832 (package
18833 (name "binwalk")
18834 (version "2.3.2")
18835 (source
18836 (origin
18837 (method git-fetch)
18838 (uri (git-reference
18839 (url "https://github.com/ReFirmLabs/binwalk")
18840 (commit (string-append "v" version))))
18841 (file-name (git-file-name name version))
18842 (sha256
18843 (base32 "01dalxw07c42ka4fqpixcacvy42h04ya909lzpmsblr9s2xdgwcm"))))
18844 (build-system python-build-system)
18845 (arguments
18846 `(#:phases
18847 (modify-phases %standard-phases
18848 (add-before 'check 'set-home
18849 (lambda _
18850 (setenv "HOME" ""))))))
18851 (native-inputs
18852 (list python-coverage python-nose))
18853 (home-page "https://github.com/ReFirmLabs/binwalk")
18854 (synopsis "Firmware analysis tool")
18855 (description "Binwalk is a tool for analyzing, reverse engineering, and
18856 extracting firmware images")
18857 (license license:expat)))
18858
18859 (define-public python-binwalk
18860 (deprecated-package "python-binwalk" binwalk))
18861
18862 (define-public python-bson
18863 (package
18864 (name "python-bson")
18865 (version "0.5.10")
18866 (source
18867 (origin
18868 (method git-fetch) ;for tests
18869 (uri (git-reference
18870 (url "https://github.com/py-bson/bson")
18871 (commit version)))
18872 (file-name (git-file-name name version))
18873 (sha256
18874 (base32
18875 "1vpy4rsvm3hhawvbg9rbw4j36ck8qylkhm8cjy0q6imvinkd2als"))))
18876 (build-system python-build-system)
18877 (arguments
18878 '(#:phases
18879 (modify-phases %standard-phases
18880 (replace 'check
18881 (lambda* (#:key tests? #:allow-other-keys)
18882 (when tests?
18883 (invoke "./test.py")))))))
18884 (propagated-inputs (list python-dateutil python-six))
18885 (home-page "https://github.com/py-bson/bson")
18886 (synopsis "BSON (Binary JSON) codec for Python")
18887 (description "@code{bson} is a Python library implementing a BSON (Binary
18888 JSON) codec.")
18889 (license license:asl2.0)))
18890
18891 (define-public python-nltk
18892 (package
18893 (name "python-nltk")
18894 (version "3.6.2")
18895 (source (origin
18896 (method url-fetch)
18897 (uri (pypi-uri "nltk" version ".zip"))
18898 (sha256
18899 (base32
18900 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
18901 (build-system python-build-system)
18902 (arguments
18903 '(;; The tests require some extra resources to be downloaded.
18904 ;; TODO Try packaging these resources.
18905 #:tests? #f))
18906 (propagated-inputs
18907 (list python-click python-joblib python-regex python-tqdm))
18908 (native-inputs
18909 (list unzip))
18910 (home-page "http://nltk.org/")
18911 (synopsis "Natural Language Toolkit")
18912 (description "It provides interfaces to over 50 corpora and lexical
18913 resources such as WordNet, along with a suite of text processing libraries
18914 for classification, tokenization, stemming, tagging, parsing, and semantic
18915 reasoning, wrappers for natural language processing libraries.")
18916 (license license:asl2.0)))
18917
18918 ;; Versions >=3.5 breaks backward-compatibility,
18919 ;; so we keep version 3.4.x around for a while.
18920 (define-public python-nltk-3.4
18921 (package
18922 (inherit python-nltk)
18923 (version "3.4.5")
18924 (source
18925 (origin
18926 (method url-fetch)
18927 (uri (pypi-uri "nltk" version ".zip"))
18928 (sha256
18929 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
18930 (propagated-inputs (list python-six))))
18931
18932 (define-public python-pymongo
18933 (package
18934 (name "python-pymongo")
18935 (version "3.7.2")
18936 (source (origin
18937 (method url-fetch)
18938 (uri (pypi-uri "pymongo" version))
18939 (sha256
18940 (base32
18941 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
18942 (build-system python-build-system)
18943 (propagated-inputs
18944 (list python-certifi))
18945 (home-page "https://github.com/mongodb/mongo-python-driver")
18946 (synopsis "Python driver for MongoDB")
18947 (description "Python driver for MongoDB.")
18948 (license license:asl2.0)))
18949
18950 (define-public python-consul
18951 (package
18952 (name "python-consul")
18953 (version "0.6.1")
18954 (source
18955 (origin
18956 (method url-fetch)
18957 (uri (pypi-uri "python-consul" version))
18958 (sha256
18959 (base32
18960 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
18961 (build-system python-build-system)
18962 (arguments
18963 '(#:tests? #f)) ; The tests are not distributed
18964 (propagated-inputs
18965 (list python-requests python-six))
18966 (home-page "https://github.com/cablehead/python-consul")
18967 (synopsis "Python client for Consul")
18968 (description
18969 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
18970 discovery, monitoring and configuration.")
18971 (license license:expat)))
18972
18973 (define-public python2-consul
18974 (package-with-python2 python-consul))
18975
18976 (define-public python-schematics
18977 (package
18978 (name "python-schematics")
18979 (version "1.1.1")
18980 (source
18981 (origin
18982 (method git-fetch)
18983 (uri (git-reference
18984 (url "https://github.com/schematics/schematics")
18985 (commit (string-append "v" version))))
18986 (file-name (git-file-name name version))
18987 (sha256
18988 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
18989 (build-system python-build-system)
18990 (propagated-inputs
18991 (list python-six))
18992 (arguments
18993 ;; The tests require a bunch of not very nice packages with fixed
18994 ;; version requirements (e.g. python-coveralls).
18995 `(#:tests? #f))
18996 (home-page "https://github.com/schematics/schematics")
18997 (synopsis "Python Data Structures for Humans")
18998 (description "Python Data Structures for Humans.")
18999 (license license:bsd-3)))
19000
19001 (define-public python2-schematics
19002 (package-with-python2 python-schematics))
19003
19004 (define-public python-odfpy
19005 (package
19006 (name "python-odfpy")
19007 (version "1.4.1")
19008 (source (origin
19009 (method url-fetch)
19010 (uri (pypi-uri "odfpy" version))
19011 (sha256
19012 (base32
19013 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
19014 (arguments
19015 `(#:phases
19016 (modify-phases %standard-phases
19017 (replace 'check
19018 (lambda _
19019 (invoke "pytest" "-vv"))))))
19020 (build-system python-build-system)
19021 (native-inputs
19022 (list python-pytest))
19023 (propagated-inputs
19024 (list python-defusedxml))
19025 (home-page "https://github.com/eea/odfpy")
19026 (synopsis "Python API and tools to manipulate OpenDocument files")
19027 (description "Collection of libraries and utility programs written in
19028 Python to manipulate OpenDocument 1.2 files.")
19029 (license
19030 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
19031 ;; number of files with other licenses.
19032 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
19033
19034 (define-public python-natsort
19035 (package
19036 (name "python-natsort")
19037 (version "7.1.1")
19038 (source (origin
19039 (method url-fetch)
19040 (uri (pypi-uri "natsort" version))
19041 (sha256
19042 (base32
19043 "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
19044 (build-system python-build-system)
19045 (arguments
19046 `(#:phases
19047 (modify-phases %standard-phases
19048 (replace 'check
19049 (lambda _
19050 (invoke "pytest" "-v"))))))
19051 (native-inputs
19052 (list python-hypothesis python-pytest-cov python-pytest-mock
19053 python-pytest))
19054 (propagated-inputs ; TODO: Add python-fastnumbers.
19055 (list python-pyicu))
19056 (home-page "https://github.com/SethMMorton/natsort")
19057 (synopsis "Natural sorting for python and shell")
19058 (description
19059 "Natsort lets you apply natural sorting on lists instead of
19060 lexicographical. If you use the built-in @code{sorted} method in python
19061 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
19062 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
19063 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
19064 identifies numbers and sorts them separately from strings. It can also sort
19065 version numbers, real numbers, mixed types and more, and comes with a shell
19066 command @command{natsort} that exposes this functionality in the command line.")
19067 (license license:expat)))
19068
19069 (define-public glances
19070 (package
19071 (name "glances")
19072 (version "3.1.7")
19073 (source
19074 (origin
19075 (method url-fetch)
19076 (uri (pypi-uri "Glances" version))
19077 (sha256
19078 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
19079 (modules '((guix build utils)))
19080 (snippet
19081 '(begin
19082 ;; Glances phones PyPI for weekly update checks by default.
19083 ;; Disable these. The user can re-enable them if desired.
19084 (substitute* "glances/outdated.py"
19085 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
19086 (string-append indentation
19087 "self.args.disable_check_update = True\n"
19088 line)))
19089 #t))))
19090 (build-system python-build-system)
19091 (propagated-inputs
19092 (list python-future python-psutil))
19093 (home-page "https://github.com/nicolargo/glances")
19094 (synopsis "Cross-platform curses-based monitoring tool")
19095 (description
19096 "Glances is a curses-based monitoring tool for a wide variety of platforms.
19097 Glances uses the PsUtil library to get information from your system. It
19098 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
19099 (license license:lgpl3+)))
19100
19101 (define-public python-graphql-core
19102 (package
19103 (name "python-graphql-core")
19104 (version "3.1.2")
19105 (source
19106 (origin
19107 (method url-fetch)
19108 (uri (pypi-uri "graphql-core" version))
19109 (sha256
19110 (base32
19111 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
19112 (build-system python-build-system)
19113 (arguments
19114 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
19115 #:phases
19116 (modify-phases %standard-phases
19117 (add-after 'unpack 'patch-hardcoded-version
19118 (lambda _ (substitute*
19119 "setup.py"
19120 (("'gevent==1.1rc1'") "'gevent'"))
19121 #t)))))
19122 (native-inputs
19123 (list python-gevent python-mock python-pytest-mock))
19124 (propagated-inputs
19125 (list python-promise python-six))
19126 (home-page "https://github.com/graphql-python/graphql-core")
19127 (synopsis "GraphQL implementation for Python")
19128 (description
19129 "GraphQL implementation for Python. GraphQL is a data query language and
19130 runtime designed and used to request and deliver data to mobile and web apps.
19131 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
19132 to Python.")
19133 (license license:expat)))
19134
19135 (define-public python-graphql-relay
19136 (package
19137 (name "python-graphql-relay")
19138 (version "3.1.0")
19139 (source
19140 (origin
19141 (method url-fetch)
19142 (uri (pypi-uri "graphql-relay" version))
19143 (sha256
19144 (base32
19145 "1d70vwam9gjhx7fqzsa03x7lc6ivcqki5r9pk8m7rslmb7pagmbh"))))
19146 (build-system python-build-system)
19147 (arguments
19148 '(#:phases
19149 (modify-phases %standard-phases
19150 (replace 'check
19151 (lambda* (#:key tests? #:allow-other-keys)
19152 (when tests?
19153 (invoke "pytest" "tests")))))))
19154 (native-inputs
19155 (list
19156 python-pytest
19157 python-pytest-asyncio))
19158 (propagated-inputs
19159 (list python-graphql-core))
19160 (home-page "https://github.com/graphql-python/graphql-relay-py")
19161 (synopsis "Relay implementation for Python")
19162 (description
19163 "This is a library to allow the easy creation of Relay-compliant servers
19164 using the GraphQL Python reference implementation of a GraphQL server. It
19165 should be noted that the code is a exact port of the original
19166 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
19167 from Facebook.")
19168 (license license:expat)))
19169
19170 (define-public python-graphene
19171 (package
19172 (name "python-graphene")
19173 (version "3.0")
19174 (source
19175 (origin
19176 (method url-fetch)
19177 (uri (pypi-uri "graphene" version))
19178 (sha256
19179 (base32
19180 "08m1n2ydk48c18cvl8474v3pwwacjl1vgq61m9qs00122mp0cj5g"))))
19181 (build-system python-build-system)
19182 (propagated-inputs
19183 (list python-graphql-core python-graphql-relay python-aniso8601
19184 python-promise python-six))
19185 (arguments
19186 `(#:tests? #f)) ; no tests/ in the PyPI tarball
19187 (home-page "https://graphene-python.org/")
19188 (synopsis "GraphQL Framework for Python")
19189 (description
19190 "Graphene is a Python library for building GraphQL schemas/types.
19191 A GraphQL schema describes your data model, and provides a GraphQL server
19192 with an associated set of resolve methods that know how to fetch data.")
19193 (license license:expat)))
19194
19195 (define-public python-random2
19196 (package
19197 (name "python-random2")
19198 (version "1.0.1")
19199 (source (origin
19200 (method url-fetch)
19201 (uri (pypi-uri "random2" version ".zip"))
19202 (sha256
19203 (base32
19204 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
19205 (patches
19206 (search-patches "python-random2-getrandbits-test.patch"))))
19207 (build-system python-build-system)
19208 (native-inputs (list unzip))
19209 (home-page "http://pypi.python.org/pypi/random2")
19210 (synopsis "Python 3 version of the Python 2 @code{random} module")
19211 (description
19212 "This package provides a Python 3 ported version of Python 2.7’s
19213 @code{random} module. It has also been back-ported to work in Python 2.6.
19214
19215 In Python 3, the implementation of @code{randrange()} was changed, so that
19216 even with the same seed you get different sequences in Python 2 and 3.
19217
19218 This package closes that gap, allowing stable random number generation
19219 between the different Python versions.")
19220 (license license:psfl)))
19221
19222 (define-public python2-random2
19223 (package-with-python2 python-random2))
19224
19225 (define-public python-snowballstemmer
19226 (package
19227 (name "python-snowballstemmer")
19228 (version "2.0.0")
19229 (source (origin
19230 (method url-fetch)
19231 (uri (pypi-uri "snowballstemmer" version))
19232 (sha256
19233 (base32
19234 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
19235 (build-system python-build-system)
19236 (arguments
19237 `(;; No tests exist
19238 #:tests? #f))
19239 (home-page "https://github.com/shibukawa/snowball_py")
19240 (synopsis "Snowball stemming library collection for Python")
19241 (description "This package provides 16 word stemmer algorithms generated
19242 from Snowball algorithms. It includes the 15 original ones plus the Poerter
19243 English stemmer.")
19244 (license license:bsd-3)))
19245
19246 (define-public python2-snowballstemmer
19247 (package-with-python2 python-snowballstemmer))
19248
19249 (define-public python-setproctitle
19250 (package
19251 (name "python-setproctitle")
19252 (version "1.1.10")
19253 (source
19254 (origin
19255 (method url-fetch)
19256 (uri (pypi-uri "setproctitle" version))
19257 (sha256
19258 (base32
19259 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
19260 (build-system python-build-system)
19261 (arguments
19262 '(#:phases
19263 (modify-phases %standard-phases
19264 (add-before 'check 'patch-Makefile
19265 ;; Stricly this is only required for the python2 variant.
19266 ;; But adding a phase in an inherited package seems to be
19267 ;; cumbersum. So we patch even for python3.
19268 (lambda _
19269 (let ((nose (assoc-ref %build-inputs "python2-nose")))
19270 (when nose
19271 (substitute* "Makefile"
19272 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
19273 (string-append nose "/bin/nosetests "))))
19274 #t)))
19275 (replace 'check
19276 (lambda _
19277 (setenv "PYTHON" (or (which "python3") (which "python")))
19278 (setenv "PYCONFIG" (if (which "python3-config")
19279 "python3-config --embed"
19280 "python-config"))
19281 (setenv "CC" "gcc")
19282 ;; No need to extend PYTHONPATH to find the built package, since
19283 ;; the Makefile will build anyway
19284 (invoke "make" "check"))))))
19285 (native-inputs
19286 (list procps)) ; required for tests
19287 (home-page "https://github.com/dvarrazzo/py-setproctitle")
19288 (synopsis
19289 "Setproctitle implementation for Python to customize the process title")
19290 (description "The library allows a process to change its title (as displayed
19291 by system tools such as ps and top).
19292
19293 Changing the title is mostly useful in multi-process systems, for
19294 example when a master process is forked: changing the children's title
19295 allows identifying the task each process is busy with. The technique
19296 is used by PostgreSQL and the OpenSSH Server for example.")
19297 (license license:bsd-3)
19298 (properties `((python2-variant . ,(delay python2-setproctitle))))))
19299
19300 (define-public python2-setproctitle
19301 (let ((base (package-with-python2
19302 (strip-python2-variant python-setproctitle))))
19303 (package/inherit base
19304 (native-inputs `(("python2-nose" ,python2-nose)
19305 ,@(package-native-inputs base))))))
19306
19307 (define-public python-validictory
19308 (package
19309 (name "python-validictory")
19310 (version "1.0.1")
19311 (source
19312 (origin
19313 (method url-fetch)
19314 (uri (pypi-uri "validictory" version))
19315 (sha256
19316 (base32
19317 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
19318 (build-system python-build-system)
19319 (arguments
19320 '(#:phases
19321 (modify-phases %standard-phases
19322 (add-after 'unpack 'bootstrap
19323 ;; Move the tests out of the package directory to avoid
19324 ;; packaging them.
19325 (lambda* _
19326 (rename-file "validictory/tests" "tests")
19327 (delete-file "tests/__init__.py")))
19328 (replace 'check
19329 (lambda _
19330 (invoke "py.test" "-vv" ))))))
19331 (native-inputs
19332 (list python-pytest))
19333 (home-page
19334 "https://github.com/jamesturk/validictory")
19335 (synopsis "General purpose Python data validator")
19336 (description "It allows validation of arbitrary Python data structures.
19337
19338 The schema format is based on the JSON Schema
19339 proposal (http://json-schema.org), so combined with json the library is also
19340 useful as a validator for JSON data.")
19341 (license license:expat)))
19342
19343 (define-public python2-validictory
19344 (package-with-python2 python-validictory))
19345
19346 (define-public python-pyelftools
19347 (package
19348 (name "python-pyelftools")
19349 (version "0.28")
19350 (home-page "https://github.com/eliben/pyelftools")
19351 (source
19352 (origin
19353 (method git-fetch)
19354 (uri (git-reference (url home-page)
19355 (commit (string-append "v" version))))
19356 (file-name (git-file-name name version))
19357 (sha256
19358 (base32 "1z4fx39c9rds0bd4d2fjjq7n05b1nfxl36pmy523x8knm38l4gpr"))
19359 (snippet
19360 ;; Delete bundled readelf executable.
19361 '(delete-file "test/external_tools/readelf"))))
19362 (build-system python-build-system)
19363 (arguments
19364 '(#:phases (modify-phases %standard-phases
19365 (replace 'check
19366 (lambda* (#:key tests? #:allow-other-keys)
19367 (when tests?
19368 ;; Taken from tox.ini.
19369 (invoke "python" "test/run_all_unittests.py")
19370 (invoke "python" "test/run_examples_test.py")
19371 (invoke "python" "test/run_readelf_tests.py")))))))
19372 (synopsis
19373 "Analyze binary and library file information")
19374 (description "This Python library provides interfaces for parsing and
19375 analyzing two binary and library file formats ; the Executable and Linking
19376 Format (ELF), and debugging information in the Debugging With Attributed
19377 Record Format (DWARF).")
19378 (license license:public-domain)))
19379
19380 (define-public python-pyev
19381 (package
19382 (name "python-pyev")
19383 (version "0.9.0")
19384 (source
19385 (origin
19386 (method url-fetch)
19387 (uri (pypi-uri "pyev" version))
19388 (sha256
19389 (base32
19390 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
19391 (build-system python-build-system)
19392 (arguments
19393 `(#:tests? #f ; no test suite
19394 #:phases
19395 (modify-phases %standard-phases
19396 (add-after 'unpack 'patch
19397 (lambda* (#:key inputs #:allow-other-keys)
19398 (let ((libev (search-input-file inputs "/lib/libev.so.4")))
19399 (substitute* "setup.py"
19400 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
19401 (string-append "libev_dll_name = \"" libev "\"")))))))))
19402 (inputs
19403 (list libev))
19404 (home-page "https://github.com/gabrielfalcao/pyev")
19405 (synopsis "Python libev interface")
19406 (description "Pyev provides a Python interface to libev.")
19407 (license license:gpl3)))
19408
19409 (define-public python2-pyev
19410 (package-with-python2 python-pyev))
19411
19412 (define-public python-imagesize
19413 (package
19414 (name "python-imagesize")
19415 (version "1.2.0")
19416 (source
19417 (origin
19418 (method url-fetch)
19419 (uri (pypi-uri "imagesize" version))
19420 (sha256
19421 (base32
19422 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
19423 (build-system python-build-system)
19424 (home-page "https://github.com/shibukawa/imagesize_py")
19425 (synopsis "Gets image size of files in various formats in Python")
19426 (description
19427 "This package allows determination of image size from
19428 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
19429 (license license:expat)))
19430
19431 (define-public python2-imagesize
19432 (package-with-python2 python-imagesize))
19433
19434 (define-public python-termstyle
19435 (package
19436 (name "python-termstyle")
19437 (version "0.1.11")
19438 (source
19439 (origin
19440 (method url-fetch)
19441 (uri (pypi-uri "termstyle" version))
19442 (sha256
19443 (base32
19444 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
19445 (build-system python-build-system)
19446 (arguments
19447 '(#:phases
19448 (modify-phases %standard-phases
19449 (replace 'check
19450 (lambda _
19451 (invoke "python" "test3.py"))))))
19452 (home-page "https://github.com/gfxmonk/termstyle")
19453 (synopsis "Console text coloring for Python")
19454 (description "This package provides console text coloring for Python.")
19455 (license license:bsd-3)))
19456
19457 (define-public python-argcomplete
19458 (package
19459 (name "python-argcomplete")
19460 (version "1.11.1")
19461 (source
19462 (origin
19463 (method url-fetch)
19464 (uri (pypi-uri "argcomplete" version))
19465 (sha256
19466 (base32
19467 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
19468 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
19469 (build-system python-build-system)
19470 (native-inputs
19471 (list python-coverage
19472 python-flake8
19473 python-pexpect
19474 python-wheel
19475 tcsh
19476 fish
19477 bash)) ;full Bash for 'test_file_completion'
19478 (home-page "https://github.com/kislyuk/argcomplete")
19479 (synopsis "Shell tab completion for Python argparse")
19480 (description "argcomplete provides extensible command line tab completion
19481 of arguments and options for Python scripts using @code{argparse}. It's
19482 particularly useful for programs with many options or sub-parsers that can
19483 dynamically suggest completions ; for example, when browsing resources over the
19484 network.")
19485 (license license:asl2.0)
19486 (properties `((python2-variant . ,(delay python2-argcomplete))))))
19487
19488 (define-public python2-argcomplete
19489 (let ((variant (package-with-python2
19490 (strip-python2-variant python-argcomplete))))
19491 (package/inherit variant
19492 (arguments
19493 (substitute-keyword-arguments (package-arguments variant)
19494 ((#:phases phases '%standard-phases)
19495 `(modify-phases ,phases
19496 (add-after 'unpack 'set-my-HOME
19497 (lambda _ (setenv "HOME" "/tmp")))))))
19498 (native-inputs
19499 `(("python2-importlib-metadata" ,python2-importlib-metadata)
19500 ,@(package-native-inputs variant))))))
19501
19502 (define-public python-csscompressor
19503 (package
19504 (name "python-csscompressor")
19505 (version "0.9.5")
19506 (source
19507 (origin
19508 (method url-fetch)
19509 (uri (pypi-uri "csscompressor" version))
19510 (sha256
19511 (base32
19512 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
19513 (build-system python-build-system)
19514 (arguments
19515 '(#:phases
19516 (modify-phases %standard-phases
19517 (replace 'check
19518 (lambda _
19519 (invoke "py.test"))))))
19520 (native-inputs
19521 (list python-pytest))
19522 (home-page "https://github.com/sprymix/csscompressor")
19523 (synopsis "Python port of YUI CSS Compressor")
19524 (description
19525 "This package provides a python port of YUI CSS Compressor.")
19526 (license license:bsd-3)))
19527
19528 (define-public python-rcssmin
19529 (package
19530 (name "python-rcssmin")
19531 (version "1.0.6")
19532 (source
19533 (origin
19534 (method url-fetch)
19535 (uri (pypi-uri "rcssmin" version))
19536 (sha256
19537 (base32
19538 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
19539 (build-system python-build-system)
19540 (arguments
19541 '(#:phases
19542 (modify-phases %standard-phases
19543 (replace 'check
19544 (lambda _
19545 (invoke "python" "run_tests.py" "tests"))))))
19546 (home-page "http://opensource.perlig.de/rcssmin/")
19547 (synopsis "CSS Minifier")
19548 (description "The minifier is based on the semantics of the YUI compressor,
19549 which itself is based on the rule list by Isaac Schlueter.")
19550 (license license:asl2.0)))
19551
19552 (define-public python-rjsmin
19553 (package
19554 (name "python-rjsmin")
19555 (version "1.1.0")
19556 (source
19557 (origin
19558 (method url-fetch)
19559 (uri (pypi-uri "rjsmin" version))
19560 (sha256
19561 (base32
19562 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
19563 (modules '((guix build utils)))
19564 (snippet
19565 '(begin
19566 (for-each delete-file (find-files "bench" "\\.js$"))
19567 #t))))
19568 (build-system python-build-system)
19569 (arguments
19570 '(#:tests? #f ; Not all test files included.
19571 #:phases
19572 (modify-phases %standard-phases
19573 (replace 'check
19574 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
19575 (add-installed-pythonpath inputs outputs)
19576 (if tests?
19577 (invoke "py.test" "-vv" "tests")
19578 #t))))))
19579 (native-inputs
19580 (list python-pytest))
19581 (home-page "http://opensource.perlig.de/rjsmin/")
19582 (synopsis "Javascript Minifier")
19583 (description "@code{rJSmin} is a javascript minifier written in Python. The
19584 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
19585 is a re-implementation aiming for speed, so it can be used at runtime (rather
19586 than during a preprocessing step).")
19587 (license license:asl2.0)))
19588
19589 (define-public python-xopen
19590 (package
19591 (name "python-xopen")
19592 (version "0.8.2")
19593 (source
19594 (origin
19595 (method url-fetch)
19596 (uri (pypi-uri "xopen" version))
19597 (sha256
19598 (base32
19599 "1xrlcnd6fri3w97zzzp6vyk4l21yq1lc8r4wksi06hgpkbh4jdq0"))))
19600 (build-system python-build-system)
19601 (propagated-inputs
19602 (list python-setuptools-scm))
19603 (home-page "https://github.com/marcelm/xopen/")
19604 (synopsis "Open compressed files transparently")
19605 (description "This module provides an @code{xopen} function that works like
19606 Python's built-in @code{open} function, but can also deal with compressed files.
19607 Supported compression formats are gzip, bzip2 and, xz, and are automatically
19608 recognized by their file extensions. The focus is on being as efficient as
19609 possible on all supported Python versions.")
19610 (license license:expat)))
19611
19612 (define-public python2-xopen
19613 (let ((base (package-with-python2
19614 (strip-python2-variant python-xopen))))
19615 (package/inherit base
19616 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
19617 ,@(package-propagated-inputs base))))))
19618
19619 (define-public python-cheetah
19620 (package
19621 (name "python-cheetah")
19622 (version "3.2.4")
19623 (source
19624 (origin
19625 (method url-fetch)
19626 (uri (pypi-uri "Cheetah3" version))
19627 (sha256
19628 (base32
19629 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
19630 (build-system python-build-system)
19631 (arguments
19632 `(#:phases (modify-phases %standard-phases
19633 (add-after 'unpack 'use-absolute-python
19634 (lambda _
19635 (substitute* "Cheetah/CheetahWrapper.py"
19636 (("#!/usr/bin/env python")
19637 (string-append "#!" (which "python"))))))
19638 (add-after 'unpack 'fix-tests
19639 (lambda _
19640 (substitute* "Cheetah/Tests/ImportHooks.py"
19641 (("os.path.dirname\\(__file__\\)")
19642 (string-append "'" (getcwd) "/Cheetah/Tests'")))))
19643 (replace 'check
19644 (lambda _
19645 (setenv "TMPDIR" "/tmp")
19646 (substitute* "Cheetah/Tests/Test.py"
19647 (("unittest.TextTestRunner\\(\\)")
19648 "unittest.TextTestRunner(verbosity=2)"))
19649
19650 (invoke "python" "Cheetah/Tests/Test.py"))))))
19651 (propagated-inputs
19652 (list python-markdown)) ;optional
19653 (home-page "https://cheetahtemplate.org/")
19654 (synopsis "Template engine")
19655 (description "Cheetah is a text-based template engine and Python code
19656 generator.
19657
19658 Cheetah can be used as a standalone templating utility or referenced as
19659 a library from other Python applications. It has many potential uses,
19660 but web developers looking for a viable alternative to ASP, JSP, PHP and
19661 PSP are expected to be its principle user group.
19662
19663 Features:
19664 @enumerate
19665 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
19666 text-based format.
19667 @item Cleanly separates content, graphic design, and program code.
19668 @item Blends the power and flexibility of Python with a simple template language
19669 that non-programmers can understand.
19670 @item Gives template writers full access to any Python data structure, module,
19671 function, object, or method in their templates.
19672 @item Makes code reuse easy by providing an object-orientated interface to
19673 templates that is accessible from Python code or other Cheetah templates.
19674 One template can subclass another and selectively reimplement sections of it.
19675 @item Provides a simple, yet powerful, caching mechanism that can dramatically
19676 improve the performance of a dynamic website.
19677 @item Compiles templates into optimized, yet readable, Python code.
19678 @end enumerate")
19679 (license (license:x11-style "file://LICENSE"))))
19680
19681 (define-public python2-cheetah
19682 (package-with-python2 python-cheetah))
19683
19684 (define-public python-dulwich
19685 (package
19686 (name "python-dulwich")
19687 (version "0.20.30")
19688 (source
19689 (origin
19690 (method url-fetch)
19691 (uri (list (string-append "https://www.dulwich.io/releases/"
19692 "dulwich-" version ".tar.gz")
19693 (pypi-uri "dulwich" version)))
19694 (sha256
19695 (base32
19696 "0hafaff30bmkj30b8pwpwsy3fz5h6c1pn98ihqcvl5zndflr1h22"))))
19697 (build-system python-build-system)
19698 (arguments
19699 '(#:phases
19700 (modify-phases %standard-phases
19701 (add-before 'check 'fix-tests
19702 (lambda* (#:key inputs #:allow-other-keys)
19703 (substitute* '("dulwich/tests/test_repository.py"
19704 "dulwich/tests/test_porcelain.py"
19705 "dulwich/tests/test_hooks.py")
19706 (("/bin/sh") (search-input-file inputs "/bin/sh")))
19707 (setenv "TEST_RUNNER" "unittest")
19708 (setenv "PYTHONHASHSEED" "random"))))))
19709 (propagated-inputs
19710 (list python-fastimport python-urllib3))
19711 (native-inputs
19712 (list python-mock python-geventhttpclient python-gpg
19713 git gnupg))
19714 (home-page "https://www.dulwich.io/")
19715 (synopsis "Git implementation in Python")
19716 (description "Dulwich is an implementation of the Git file formats and
19717 protocols written in pure Python.")
19718 ;; Can be used with either license.
19719 (license (list license:asl2.0 license:gpl2+))))
19720
19721 (define-public python-pbkdf2
19722 (package
19723 (name "python-pbkdf2")
19724 (version "1.3")
19725 (source
19726 (origin
19727 (method url-fetch)
19728 (uri (pypi-uri "pbkdf2" version))
19729 (sha256
19730 (base32
19731 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
19732 (build-system python-build-system)
19733 (arguments
19734 '(#:phases
19735 (modify-phases %standard-phases
19736 (replace 'check
19737 (lambda _
19738 (invoke "python" "test/test_pbkdf2.py"))))))
19739 (propagated-inputs
19740 (list python-pycrypto)) ; optional
19741 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
19742 (synopsis "Password-based key derivation")
19743 (description "This module implements the password-based key derivation
19744 function, PBKDF2, specified in RSA PKCS#5 v2.0.
19745
19746 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
19747 is part of the RSA Public Key Cryptography Standards series. The provided
19748 implementation takes a password or a passphrase and a salt value (and
19749 optionally a iteration count, a digest module, and a MAC module) and provides
19750 a file-like object from which an arbitrarily-sized key can be read.")
19751 (license license:expat)))
19752
19753 (define-public python2-pbkdf2
19754 (package-with-python2 python-pbkdf2))
19755
19756 (define-public python-qrcode
19757 (package
19758 (name "python-qrcode")
19759 (version "6.1")
19760 (source
19761 (origin
19762 (method url-fetch)
19763 (uri (pypi-uri "qrcode" version))
19764 (sha256
19765 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
19766 (build-system python-build-system)
19767 (arguments
19768 ;; FIXME: Tests require packaging 'pymaging'.
19769 '(#:tests? #f))
19770 (propagated-inputs
19771 (list python-lxml ; for SVG output
19772 python-pillow ; for PNG output
19773 python-six))
19774 (home-page "https://github.com/lincolnloop/python-qrcode")
19775 (synopsis "QR Code image generator")
19776 (description "This package provides a pure Python QR Code generator
19777 module. It uses the Python Imaging Library (PIL) to allow for the generation
19778 of QR Codes.
19779
19780 In addition this package provides a command line tool to generate QR codes and
19781 either write these QR codes to a file or do the output as ascii art at the
19782 console.")
19783 (license license:bsd-3)))
19784
19785 (define-public python2-qrcode
19786 (package-with-python2 python-qrcode))
19787
19788 (define-public python-rst2ansi
19789 (package
19790 (name "python-rst2ansi")
19791 (version "0.1.5")
19792 (source
19793 (origin
19794 (method url-fetch)
19795 (uri (pypi-uri "rst2ansi" version))
19796 (sha256
19797 (base32
19798 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
19799 (build-system python-build-system)
19800 (propagated-inputs
19801 (list python-docutils))
19802 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
19803 (synopsis "Convert RST to ANSI-decorated console output")
19804 (description
19805 "Python module dedicated to rendering RST (reStructuredText) documents
19806 to ansi-escaped strings suitable for display in a terminal.")
19807 (license license:expat)))
19808
19809 (define-public python-ansi2html
19810 (package
19811 (name "python-ansi2html")
19812 (version "1.2.0")
19813 (source
19814 (origin
19815 (method url-fetch)
19816 (uri (pypi-uri "ansi2html" version))
19817 (sha256
19818 (base32
19819 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
19820 (build-system python-build-system)
19821 (native-inputs
19822 (list python-mock python-nose))
19823 (propagated-inputs
19824 (list python-six))
19825 (home-page "https://github.com/ralphbean/ansi2html")
19826 (synopsis "Convert ANSI-decorated console output to HTML")
19827 (description
19828 "@command{ansi2html} is a Python library and command line utility for
19829 converting text with ANSI color codes to HTML or LaTeX.")
19830 (license license:gpl3+)))
19831
19832 (define-public python2-ansi2html
19833 (package-with-python2 python-ansi2html))
19834
19835 (define-public python-easy-ansi
19836 (package
19837 (name "python-easy-ansi")
19838 (version "0.3")
19839 (source
19840 (origin
19841 (method git-fetch)
19842 (uri (git-reference
19843 (url "https://gitlab.com/joeysbytes/easy-ansi")
19844 (commit (string-append "v" version))))
19845 (file-name (git-file-name name version))
19846 (sha256
19847 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
19848 (build-system python-build-system)
19849 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
19850 (synopsis "Terminal framework API")
19851 (description
19852 "Easy ANSI is a terminal framework API to give you an easy way to use
19853 colors, cursor control movements, and line/box drawing. It is not meant as a
19854 replacement to more full-featured frameworks (such as curses or urwid), but as
19855 a tool to quickly create nice-looking screens in your terminal window. You
19856 can even create animations with the cursor controls.")
19857 (license license:expat)))
19858
19859 (define-public python-ddt
19860 (package
19861 (name "python-ddt")
19862 (version "1.4.2")
19863 (source
19864 (origin
19865 (method url-fetch)
19866 (uri (pypi-uri "ddt" version))
19867 (sha256
19868 (base32
19869 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
19870 (build-system python-build-system)
19871 (native-inputs
19872 (list python-pytest))
19873 (propagated-inputs
19874 (list python-pyyaml))
19875 (home-page "https://github.com/datadriventests/ddt")
19876 (synopsis "Data-Driven Tests")
19877 (description
19878 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
19879 running it with different test data, and make it appear as multiple test
19880 cases.")
19881 (license license:expat)))
19882
19883 (define-public python-pycountry
19884 (package
19885 (name "python-pycountry")
19886 (version "22.3.5")
19887 (source
19888 (origin
19889 (method url-fetch)
19890 (uri (pypi-uri "pycountry" version))
19891 (sha256
19892 (base32
19893 "0ihnkh86zz01vi46gcwgq6h71jrpj7hq71zi13c98n2qdhj3l5mj"))))
19894 (build-system python-build-system)
19895 (home-page "https://bitbucket.org/flyingcircus/pycountry")
19896 (synopsis "ISO databases for languages, countries, currencies, etc.")
19897 (description
19898 "@code{pycountry} provides the ISO databases for the standards:
19899 @enumerate
19900 @item 639-3 (Languages)
19901 @item 3166 (Countries)
19902 @item 3166-3 (Deleted Countries)
19903 @item 3166-2 (Subdivisions of countries)
19904 @item 4217 (Currencies)
19905 @item 15924 (Scripts)
19906 @end enumerate
19907 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
19908 through a Python API.")
19909 (license license:lgpl2.1+)))
19910
19911 (define-public python2-pycountry
19912 (package-with-python2 python-pycountry))
19913
19914 (define-public python-pycosat
19915 (package
19916 (name "python-pycosat")
19917 (version "0.6.3")
19918 (source
19919 (origin
19920 (method url-fetch)
19921 (uri (pypi-uri "pycosat" version ".zip"))
19922 (sha256
19923 (base32
19924 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
19925 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
19926 (build-system python-build-system)
19927 (native-inputs
19928 (list unzip))
19929 (home-page "https://github.com/ContinuumIO/pycosat")
19930 (synopsis "Bindings to picosat (a SAT solver)")
19931 (description
19932 "This package provides efficient Python bindings to @code{picosat} on
19933 the C level. When importing pycosat, the @code{picosat} solver becomes part
19934 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
19935 Problem} (SAT) solver.")
19936 (license license:expat)))
19937
19938 (define-public python2-pycosat
19939 (package-with-python2 python-pycosat))
19940
19941 (define-public python2-ruamel.ordereddict
19942 (package
19943 (name "python2-ruamel.ordereddict")
19944 (version "0.4.9")
19945 (source
19946 (origin
19947 (method url-fetch)
19948 (uri (pypi-uri "ruamel.ordereddict" version))
19949 (sha256
19950 (base32
19951 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
19952 (build-system python-build-system)
19953 (arguments
19954 `(#:python ,python-2
19955 #:phases
19956 (modify-phases %standard-phases
19957 (delete 'check)
19958 (add-after 'install 'check
19959 (lambda* (#:key inputs outputs #:allow-other-keys)
19960 (add-installed-pythonpath inputs outputs)
19961 (invoke "python" "test/testordereddict.py"))))))
19962 (home-page "https://bitbucket.org/ruamel/ordereddict")
19963 (synopsis "Version of dict that keeps keys in insertion order")
19964 (description
19965 "This is an implementation of an ordered dictionary with @dfn{Key
19966 Insertion Order} (KIO: updates of values do not affect the position of the
19967 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
19968 removed and put at the back). The standard library module @code{OrderedDict},
19969 implemented later, implements a subset of @code{ordereddict} functionality.
19970 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
19971 Order} (KSO, no sorting function can be specified, but a transform can be
19972 specified to apply on the key before comparison (e.g. @code{string.lower})).")
19973 (license license:expat)))
19974
19975 (define-public python-pypeg2
19976 (package
19977 (name "python-pypeg2")
19978 (version "2.15.2")
19979 (source
19980 (origin
19981 (method url-fetch)
19982 (uri (pypi-uri "pyPEG2" version))
19983 (sha256
19984 (base32
19985 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
19986 (build-system python-build-system)
19987 (propagated-inputs (list python-lxml))
19988 (arguments
19989 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
19990 '(#:tests? #f))
19991 (home-page "https://fdik.org/pyPEG/")
19992 (synopsis "Parsing Expression Grammars in Python")
19993 (description "PyPEG is an intrinsic parser interpreter framework for
19994 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
19995 parse many formal languages.")
19996 (license license:gpl2)))
19997
19998 (define-public python-incremental
19999 (package
20000 (name "python-incremental")
20001 (version "17.5.0")
20002 (source
20003 (origin
20004 (method url-fetch)
20005 (uri (pypi-uri "incremental" version))
20006 (sha256
20007 (base32
20008 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
20009 (build-system python-build-system)
20010 (home-page "https://github.com/hawkowl/incremental")
20011 (synopsis "Library for versioning Python projects")
20012 (description "Incremental is a small library that versions your Python
20013 projects.")
20014 (license license:expat)))
20015
20016 (define-public python2-incremental
20017 (package-with-python2 python-incremental))
20018
20019 (define-public python-invoke
20020 (package
20021 (name "python-invoke")
20022 (home-page "https://www.pyinvoke.org/")
20023 (version "1.6.0")
20024 (source (origin
20025 (method url-fetch)
20026 (uri (pypi-uri "invoke" version))
20027 (sha256
20028 (base32
20029 "1lsql9daabfr31c7syva5myc5bka45k57ygs9fliv63qrwp1wk9p"))))
20030 (build-system python-build-system)
20031 (arguments
20032 ;; XXX: Requires many dependencies that are not yet in Guix.
20033 `(#:tests? #f
20034 #:phases
20035 (modify-phases %standard-phases
20036 (add-after 'unpack 'delete-python2-code
20037 (lambda _
20038 (delete-file-recursively "invoke/vendor/yaml2")))
20039 (add-after 'unpack 'fix-bash-path
20040 (lambda* (#:key inputs #:allow-other-keys)
20041 (let ((bash (assoc-ref inputs "bash")))
20042 (substitute* "invoke/config.py"
20043 (("shell = \"/bin/bash\"")
20044 (string-append "shell = \"" bash "/bin/bash\"")))))))))
20045 (inputs
20046 `(("bash" ,bash-minimal)))
20047 (synopsis "Pythonic task execution")
20048 (description
20049 "Invoke is a Python task execution tool and library, drawing inspiration
20050 from various sources to arrive at a powerful and clean feature set. It is
20051 evolved from the Fabric project, but focuses on local and abstract concerns
20052 instead of servers and network commands.")
20053 (license license:bsd-3)))
20054
20055 (define-public python2-invoke
20056 (let ((parent (package-with-python2 python-invoke)))
20057 (package
20058 (inherit parent)
20059 (arguments
20060 (substitute-keyword-arguments (package-arguments parent)
20061 ((#:phases phases #t)
20062 `(modify-phases ,phases
20063 (delete 'delete-python2-code)
20064 (add-after 'unpack 'delete-python3-code
20065 (lambda _
20066 (delete-file-recursively "invoke/vendor/yaml3"))))))))))
20067
20068 (define-public python-automat
20069 (package
20070 (name "python-automat")
20071 (version "20.2.0")
20072 (source (origin
20073 (method url-fetch)
20074 (uri (pypi-uri "Automat" version))
20075 (sha256
20076 (base32
20077 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
20078 (build-system python-build-system)
20079 ;; We disable the tests because they require python-twisted, while
20080 ;; python-twisted depends on python-automat. Twisted is optional, but the
20081 ;; tests fail if it is not available. Also see
20082 ;; <https://github.com/glyph/automat/issues/71>.
20083 (arguments
20084 `(#:tests? #f
20085 #:phases
20086 (modify-phases %standard-phases
20087 ;; Remove script, because it depends on python-twisted.
20088 (add-after 'unpack 'remove-entrypoint
20089 (lambda _
20090 (substitute* "setup.py"
20091 (("\"automat-visualize = automat._visualize:tool\"") "")))))))
20092 (native-inputs
20093 (list python-m2r python-setuptools-scm python-graphviz))
20094 (propagated-inputs
20095 (list python-six python-attrs))
20096 (home-page "https://github.com/glyph/Automat")
20097 (synopsis "Self-service finite-state machines")
20098 (description "Automat is a library for concise, idiomatic Python
20099 expression of finite-state automata (particularly deterministic finite-state
20100 transducers).")
20101 (license license:expat)))
20102
20103 (define-public python2-automat
20104 (package-with-python2 python-automat))
20105
20106 (define-public python-m2r
20107 (package
20108 (name "python-m2r")
20109 (version "0.2.1")
20110 (source (origin
20111 (method url-fetch)
20112 (uri (pypi-uri "m2r" version))
20113 (sha256
20114 (base32
20115 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
20116 (build-system python-build-system)
20117 (propagated-inputs
20118 (list python-docutils python-mistune))
20119 (native-inputs
20120 (list python-pygments python-mock))
20121 (home-page "https://github.com/miyakogi/m2r")
20122 (synopsis "Markdown to reStructuredText converter")
20123 (description "M2R converts a markdown file including reST markups to valid
20124 reST format.")
20125 (license license:expat)))
20126
20127 (define-public python2-m2r
20128 (package-with-python2 python-m2r))
20129
20130 (define-public python-constantly
20131 (package
20132 (name "python-constantly")
20133 (version "15.1.0")
20134 (source (origin
20135 (method url-fetch)
20136 (uri (pypi-uri "constantly" version))
20137 (sha256
20138 (base32
20139 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
20140 (build-system python-build-system)
20141 (home-page "https://github.com/twisted/constantly")
20142 (synopsis "Symbolic constants in Python")
20143 (description "Constantly is a Python library that provides symbolic
20144 constant support. It includes collections and constants with text, numeric,
20145 and bit flag values.")
20146 (license license:expat)))
20147
20148 (define-public python2-constantly
20149 (package-with-python2 python-constantly))
20150
20151 (define-public python-attrs
20152 (package
20153 (name "python-attrs")
20154 (version "21.2.0")
20155 (source (origin
20156 (method url-fetch)
20157 (uri (pypi-uri "attrs" version))
20158 (sha256
20159 (base32
20160 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
20161 (build-system python-build-system)
20162 (arguments
20163 `(#:phases (modify-phases %standard-phases
20164 (replace 'check
20165 (lambda* (#:key tests? #:allow-other-keys)
20166 (when tests?
20167 (invoke "pytest")))))))
20168 (native-inputs
20169 (list python-coverage python-hypothesis python-pympler python-pytest
20170 python-six))
20171 (home-page "https://github.com/python-attrs/attrs/")
20172 (synopsis "Attributes without boilerplate")
20173 (description "@code{attrs} is a Python package with class decorators that
20174 ease the chores of implementing the most common attribute-related object
20175 protocols.")
20176 (license license:expat)))
20177
20178 (define-public python2-attrs
20179 (package-with-python2 python-attrs))
20180
20181 (define-public python-attrs-bootstrap
20182 (package
20183 (inherit python-attrs)
20184 (name "python-attrs-bootstrap")
20185 (native-inputs `())
20186 (arguments `(#:tests? #f))))
20187
20188 (define-public python2-attrs-bootstrap
20189 (package-with-python2 python-attrs-bootstrap))
20190
20191 (define-public python-cliapp
20192 (package
20193 (name "python-cliapp")
20194 (version "1.20180812.1")
20195 (source
20196 (origin
20197 (method url-fetch)
20198 (uri (string-append
20199 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
20200 version ".tar.gz"))
20201 (sha256
20202 (base32
20203 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
20204 (build-system python-build-system)
20205 (arguments
20206 `(;; XXX: The tests only do style and coverage checks, which
20207 ;; fails due to deprecation warnings, etc.
20208 #:tests? #f))
20209 (native-inputs
20210 (list python-coverage-test-runner python-pep8))
20211 (propagated-inputs
20212 (list python-pyaml))
20213 (home-page "https://liw.fi/cliapp/")
20214 (synopsis "Python framework for command line programs")
20215 (description "@code{cliapp} is a Python framework for command line
20216 programs. It contains the typical stuff such programs need to do, such
20217 as parsing the command line for options, and iterating over input files.")
20218 (license license:gpl2+)))
20219
20220 (define-public python2-cliapp
20221 (package-with-python2 python-cliapp))
20222
20223 (define-public python-ttystatus
20224 (package
20225 (name "python-ttystatus")
20226 (version "0.38")
20227 (source
20228 (origin
20229 (method git-fetch)
20230 (uri (git-reference
20231 (url "http://git.liw.fi/ttystatus")
20232 ;; There are no tags after ttystatus-0.36.
20233 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
20234 (sha256
20235 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
20236 (file-name (git-file-name name version))))
20237 (build-system python-build-system)
20238 (native-inputs
20239 (list python-coverage-test-runner python-pep8))
20240 (arguments
20241 `(#:phases
20242 (modify-phases %standard-phases
20243 ;; check phase needs to be run before the build phase. If not,
20244 ;; coverage-test-runner looks for tests for the built source files,
20245 ;; and fails.
20246 (delete 'check)
20247 (add-before 'build 'check
20248 (lambda _ (invoke "make" "check"))))))
20249 (home-page "https://liw.fi/ttystatus/")
20250 (synopsis "Python library for showing progress reporting and
20251 status updates on terminals")
20252 (description "@code{ttystatus} is a Python library for showing progress
20253 reporting and status updates on terminals, for command line programs.
20254 Output is automatically adapted to the width of the terminal: truncated
20255 if it does not fit, and resized if the terminal size changes.")
20256 (license license:gpl3+)))
20257
20258 (define-public python2-ttystatus
20259 (package-with-python2 python-ttystatus))
20260
20261 (define-public python2-tracing
20262 (package
20263 (name "python2-tracing")
20264 (version "0.10")
20265 (source
20266 (origin
20267 (method url-fetch)
20268 (uri (string-append
20269 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
20270 version ".tar.gz"))
20271 (sha256
20272 (base32
20273 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
20274 (build-system python-build-system)
20275 (arguments
20276 `(#:python ,python-2))
20277 (home-page "https://liw.fi/tracing/")
20278 (synopsis "Python debug logging helper")
20279 (description "@code{python2-tracing} is a python library for
20280 logging debug messages. It provides a way to turn debugging messages
20281 on and off, based on the filename they occur in. It is much faster
20282 than using @code{logging.Filter} to accomplish the same thing, which
20283 matters when code is run in production mode. The actual logging still
20284 happens using the @code{logging} library.")
20285 (license license:gpl3+)))
20286
20287 (define-public python-astroid
20288 (package
20289 (name "python-astroid")
20290 (version "2.9.0")
20291 (source
20292 (origin
20293 (method git-fetch)
20294 (uri (git-reference
20295 (url "https://github.com/PyCQA/astroid")
20296 (commit (string-append "v" version))))
20297 (file-name (git-file-name name version))
20298 (sha256
20299 (base32 "19iiys4233cicpm48fd7lrkm31kk47qiv44wvk952rqbcn4rd2dh"))))
20300 (build-system python-build-system)
20301 (propagated-inputs
20302 (list python-lazy-object-proxy python-typing-extensions python-wrapt))
20303 (native-inputs
20304 (list python-pytest python-pytest-runner))
20305 (home-page "https://github.com/PyCQA/astroid")
20306 (synopsis "Python source code base representation")
20307 (description "@code{python-astroid} provides a common base representation
20308 of Python source code for projects such as pychecker, pyreverse, pylint, etc.
20309 It provides a compatible representation which comes from the _ast module. It
20310 rebuilds the tree generated by the builtin _ast module by recursively walking
20311 down the AST and building an extended ast. The new node classes have
20312 additional methods and attributes for different usages. They include some
20313 support for static inference and local name scopes. Furthermore, astroid
20314 builds partial trees by inspecting living objects.")
20315 (license license:lgpl2.1+)))
20316
20317 (define-public python-isbnlib
20318 (package
20319 (name "python-isbnlib")
20320 (version "3.10.4")
20321 (source
20322 (origin
20323 (method url-fetch)
20324 (uri (pypi-uri "isbnlib" version))
20325 (sha256
20326 (base32
20327 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
20328 (build-system python-build-system)
20329 (arguments '(#:tests? #f)) ; No test
20330 (home-page "https://github.com/xlcnd/isbnlib")
20331 (synopsis "Python library to work with ISBN strings")
20332 (description "@code{python-isbnlib} is a (pure) python library that provides
20333 several useful methods and functions to validate, clean, transform, hyphenate and
20334 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
20335 version, is suitable to be include as a dependency in other projects.")
20336 (license license:lgpl3+)))
20337
20338 (define-public python-isort
20339 (package
20340 (name "python-isort")
20341 (version "5.10.1")
20342 (source
20343 (origin
20344 (method git-fetch)
20345 (uri (git-reference
20346 ;; Tests pass only from the Github sources
20347 (url "https://github.com/timothycrosley/isort")
20348 (commit version)))
20349 (file-name (git-file-name name version))
20350 (modules '((guix build utils)))
20351 (snippet '(for-each delete-file (find-files "." "\\.whl$")))
20352 (sha256
20353 (base32
20354 "09spgl2k9xrprr5gbpfc91a8p7mx7a0c64ydgc91b3jhrmnd9jg1"))))
20355 (build-system python-build-system)
20356 (arguments
20357 `(#:phases
20358 (modify-phases %standard-phases
20359 (add-after 'unpack 'loosen-requirements
20360 (lambda _
20361 ;; Permit newer versions of black.
20362 (substitute* "example_isort_formatting_plugin/pyproject.toml"
20363 (("\\^20\\.08b1")
20364 ">= 20.08b1"))))
20365 ;; A foretaste of what our future python-build-system will need to
20366 ;; do.
20367 (replace 'build
20368 (lambda _
20369 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
20370 (replace 'install
20371 (lambda* (#:key outputs #:allow-other-keys)
20372 (let ((out (assoc-ref outputs "out"))
20373 (whl (car (find-files "dist" "\\.whl$"))))
20374 (invoke "pip" "--no-cache-dir" "--no-input"
20375 "install" "--no-deps" "--prefix" out whl))))
20376 (add-after 'install 'install-example-plugins
20377 (lambda* (#:key outputs #:allow-other-keys)
20378 (let ((out (assoc-ref outputs "out")))
20379 ;; Patch to use the core poetry API.
20380 (substitute* '("example_isort_formatting_plugin/pyproject.toml"
20381 "example_isort_sorting_plugin/pyproject.toml"
20382 "example_shared_isort_profile/pyproject.toml")
20383 (("poetry>=0.12")
20384 "poetry-core>=1.0.0")
20385 (("poetry.masonry.api")
20386 "poetry.core.masonry.api"))
20387 ;; Build the example plugins.
20388 (for-each (lambda (source-directory)
20389 (invoke "python" "-m" "build" "--wheel"
20390 "--no-isolation" "--outdir=dist"
20391 source-directory))
20392 '("example_isort_formatting_plugin"
20393 "example_isort_sorting_plugin"
20394 "example_shared_isort_profile"))
20395 ;; Install them to temporary storage, for the test.
20396 (setenv "HOME" (getcwd))
20397 (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
20398 (apply invoke "pip" "--no-cache-dir" "--no-input"
20399 "install" "--user" "--no-deps" example-whls)))))
20400 (replace 'check
20401 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
20402 (when tests?
20403 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
20404 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
20405 (add-installed-pythonpath inputs outputs)
20406 (invoke "pytest" "-vv" "tests/unit/"
20407 "-k" "not test_gitignore" ;requires git
20408 "--ignore=tests/unit/test_deprecated_finders.py")))))))
20409 (native-inputs
20410 (list python-black
20411 python-colorama
20412 python-hypothesmith
20413 python-libcst-minimal
20414 python-natsort
20415 python-poetry-core
20416 python-pylama
20417 python-pypa-build
20418 python-pytest-mock
20419 python-pytest))
20420 (home-page "https://github.com/PyCQA/isort")
20421 (synopsis "Python utility/library to sort python imports")
20422 (description "@code{python-isort} is a python utility/library to sort
20423 imports alphabetically, and automatically separated into sections. It
20424 provides a command line utility, a python library and plugins for various
20425 editors.")
20426 (license license:expat)
20427 (properties `((python2-variant . ,(delay python2-isort))))))
20428
20429 (define-public python2-isort
20430 (let ((base (package-with-python2
20431 (strip-python2-variant python-isort))))
20432 (package/inherit base
20433 (native-inputs
20434 `(("python2-futures" ,python2-futures)
20435 ,@(package-native-inputs base))))))
20436
20437 (define-public python2-backports-functools-lru-cache
20438 (package
20439 (name "python2-backports-functools-lru-cache")
20440 (version "1.6.1")
20441 (source
20442 (origin
20443 (method url-fetch)
20444 ;; only the pypi tarballs contain the necessary metadata
20445 (uri (pypi-uri "backports.functools_lru_cache" version))
20446 (sha256
20447 (base32
20448 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
20449 (build-system python-build-system)
20450 (native-inputs
20451 (list python2-setuptools-scm))
20452 (arguments
20453 `(#:python ,python-2))
20454 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
20455 (synopsis "Backport of functools.lru_cache from Python 3.3")
20456 (description "@code{python2-backports-functools-lru-cache} is a backport
20457 of @code{functools.lru_cache} from python 3.3.")
20458 (license license:expat)))
20459
20460 (define-public python-configparser
20461 (package
20462 (name "python-configparser")
20463 (version "4.0.2")
20464 (source
20465 (origin
20466 (method url-fetch)
20467 (uri (pypi-uri "configparser" version))
20468 (sha256
20469 (base32
20470 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
20471 (native-inputs
20472 (list python-setuptools-scm))
20473 (build-system python-build-system)
20474 (home-page "https://github.com/jaraco/configparser/")
20475 (synopsis "Backport of configparser from python 3.5")
20476 (description "@code{python-configparser} is a backport of
20477 @code{configparser} from Python 3.5 so that it can be used directly
20478 in other versions.")
20479 (license license:expat)))
20480
20481 (define-public python2-configparser
20482 (package-with-python2 python-configparser))
20483
20484 (define-public python-iniconfig
20485 (package
20486 (name "python-iniconfig")
20487 (version "1.1.1")
20488 (source
20489 (origin
20490 (method url-fetch)
20491 (uri (pypi-uri "iniconfig" version))
20492 (sha256
20493 (base32
20494 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
20495 (build-system python-build-system)
20496 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
20497 (synopsis "Simple INI-file parser")
20498 (description "The @code{iniconfig} package provides a small and simple
20499 INI-file parser module having a unique set of features ; @code{iniconfig}
20500 @itemize
20501 @item maintains the order of sections and entries ;
20502 @item supports multi-line values with or without line-continuations ;
20503 @item supports \"#\" comments everywhere ;
20504 @item raises errors with proper line-numbers ;
20505 @item raises an error when two sections have the same name.
20506 @end itemize")
20507 (license license:expat)))
20508
20509 (define-public python-mamba
20510 (package
20511 (name "python-mamba")
20512 (version "0.11.2")
20513 (source (origin
20514 (method url-fetch)
20515 (uri (pypi-uri "mamba" version))
20516 (sha256
20517 (base32
20518 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
20519 (build-system python-build-system)
20520 (arguments `(#:tests? #f)) ; No test
20521 (propagated-inputs
20522 (list python-clint python-coverage))
20523 (home-page "https://nestorsalceda.com/mamba/")
20524 (synopsis "Test runner for Python")
20525 (description
20526 "Mamba is a Behaviour-Driven Development tool for Python developers.
20527 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
20528 (license license:expat)))
20529
20530 (define-public python-mando
20531 (package
20532 (name "python-mando")
20533 (version "0.6.4")
20534 (source (origin
20535 (method url-fetch)
20536 (uri (pypi-uri "mando" version))
20537 (sha256
20538 (base32
20539 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
20540 (build-system python-build-system)
20541 (propagated-inputs
20542 (list python-rst2ansi python-six))
20543 (native-inputs
20544 (list python-pytest))
20545 (home-page "https://mando.readthedocs.org/")
20546 (synopsis
20547 "Wrapper around argparse, allowing creation of complete CLI applications")
20548 (description
20549 "This package is a wrapper around argparse, allowing you to write complete CLI
20550 applications in seconds while maintaining all the flexibility.")
20551 (license license:expat)))
20552
20553 (define-public python2-mando
20554 (package-with-python2 python-mando))
20555
20556 (define-public python2-argparse
20557 (package
20558 (name "python2-argparse")
20559 (version "1.4.0")
20560 (source
20561 (origin
20562 (method url-fetch)
20563 (uri (pypi-uri "argparse" version))
20564 (sha256
20565 (base32
20566 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
20567 (build-system python-build-system)
20568 (arguments
20569 `(#:python ,python-2))
20570 (home-page "https://github.com/ThomasWaldmann/argparse/")
20571 (synopsis "Python command-line parsing library")
20572 (description
20573 "This package is mostly for people who want to have @code{argparse} on
20574 older Pythons because it was not part of the standard library back then.")
20575 (license license:psfl)))
20576
20577 (define-public python-mwclient
20578 (package
20579 (name "python-mwclient")
20580 (version "0.10.1")
20581 (source
20582 (origin
20583 (method git-fetch)
20584 ;; The PyPI version wouldn't contain tests.
20585 (uri (git-reference
20586 (url "https://github.com/mwclient/mwclient")
20587 (commit (string-append "v" version))))
20588 (file-name (git-file-name name version))
20589 (sha256
20590 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
20591 (build-system python-build-system)
20592 (propagated-inputs
20593 (list python-requests-oauthlib python-six))
20594 (native-inputs
20595 (list python-mock python-pytest python-pytest-cov
20596 python-pytest-runner python-responses))
20597 (home-page "https://github.com/btongminh/mwclient")
20598 (synopsis "MediaWiki API client")
20599 (description "This package provides a MediaWiki API client.")
20600 (license license:expat)))
20601
20602 (define-public python-kneed
20603 (package
20604 (name "python-kneed")
20605 (version "0.7.0")
20606 (source
20607 (origin
20608 (method url-fetch)
20609 (uri (pypi-uri "kneed" version))
20610 (sha256
20611 (base32 "0vkwi0pr7nfkp3c46hnmx0275yx68v96v10rmspv0wis33x6f39l"))))
20612 (build-system python-build-system)
20613 (propagated-inputs
20614 (list python-matplotlib python-numpy python-scipy))
20615 (home-page "https://github.com/arvkevi/kneed")
20616 (synopsis "Knee-point detection in Python")
20617 (description "This package implements the kneedle algorithm. Given a set
20618 of x and y values, kneed will return the knee point of the function. The knee
20619 point is the point of maximum curvature.")
20620 (license license:bsd-3)))
20621
20622 (define-public python-utils
20623 (package
20624 (name "python-utils")
20625 (version "2.4.0")
20626 (source (origin
20627 (method url-fetch)
20628 (uri (pypi-uri "python-utils" version))
20629 (sha256
20630 (base32
20631 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
20632 (build-system python-build-system)
20633 (arguments
20634 `(#:phases
20635 (modify-phases %standard-phases
20636 (replace 'check
20637 (lambda* (#:key inputs outputs #:allow-other-keys)
20638 (add-installed-pythonpath inputs outputs)
20639 (delete-file "pytest.ini")
20640 (invoke "pytest" "-vv"))))))
20641 (native-inputs
20642 `(("pytest-runner" ,python-pytest-runner)
20643 ("pytest" ,python-pytest)
20644 ("six" ,python-six)))
20645 (home-page "https://github.com/WoLpH/python-utils")
20646 (synopsis "Convenient utilities not included with the standard Python install")
20647 (description
20648 "Python Utils is a collection of small Python functions and classes which
20649 make common patterns shorter and easier.")
20650 (license license:bsd-2)))
20651
20652 (define-public python-diff-match-patch
20653 (package
20654 (name "python-diff-match-patch")
20655 (version "20121119")
20656 (source
20657 (origin
20658 (method url-fetch)
20659 (uri (pypi-uri "diff-match-patch" version))
20660 (sha256
20661 (base32
20662 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
20663 (build-system python-build-system)
20664 (home-page "https://code.google.com/p/google-diff-match-patch")
20665 (synopsis "Synchronize plain text")
20666 (description "Diff Match and Patch libraries offer robust algorithms to
20667 perform the operations required for synchronizing plain text.")
20668 (license license:asl2.0)))
20669
20670 (define-public python2-diff-match-patch
20671 (package-with-python2 python-diff-match-patch))
20672
20673 (define-public python-dirsync
20674 (package
20675 (name "python-dirsync")
20676 (version "2.2.5")
20677 (source
20678 (origin
20679 (method url-fetch)
20680 (uri (pypi-uri "dirsync" version))
20681 (sha256
20682 (base32
20683 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
20684 (build-system python-build-system)
20685 (propagated-inputs
20686 (list python-six))
20687 (home-page "https://github.com/tkhyn/dirsync")
20688 (synopsis "Advanced directory tree synchronisation tool")
20689 (description "Advanced directory tree synchronisation tool.")
20690 (license license:expat)))
20691
20692 (define-public python2-dirsync
20693 (package-with-python2 python-dirsync))
20694
20695 (define-public python-levenshtein
20696 (package
20697 (name "python-levenshtein")
20698 (version "0.12.2")
20699 (source
20700 (origin
20701 (method url-fetch)
20702 (uri (pypi-uri "python-Levenshtein" version))
20703 (sha256
20704 (base32
20705 "1xj60gymwx1jl2ra9razx2wk8nb9cv1i7l8d14qsp8a8s7xra8yw"))))
20706 (build-system python-build-system)
20707 (home-page "https://github.com/ztane/python-Levenshtein")
20708 (synopsis "Fast computation of Levenshtein distance and string similarity")
20709 (description
20710 "The Levenshtein Python C extension module contains functions for fast computation of
20711 @enumerate
20712 @item Levenshtein (edit) distance, and edit operations
20713 @item string similarity
20714 @item approximate median strings, and generally string averaging
20715 @item string sequence and set similarity
20716 @end enumerate
20717 It supports both normal and Unicode strings.")
20718 (license license:gpl2+)))
20719
20720 (define-public python2-levenshtein
20721 (package-with-python2 python-levenshtein))
20722
20723 (define-public python-scandir
20724 (package
20725 (name "python-scandir")
20726 (version "1.10.0")
20727 (source
20728 (origin
20729 (method url-fetch)
20730 (uri (pypi-uri "scandir" version))
20731 (sha256
20732 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
20733 (build-system python-build-system)
20734 (arguments
20735 `(#:phases (modify-phases %standard-phases
20736 (replace 'check
20737 (lambda _
20738 (invoke "python" "test/run_tests.py"))))))
20739 (home-page "https://github.com/benhoyt/scandir")
20740 (synopsis "Directory iteration function")
20741 (description
20742 "Directory iteration function like os.listdir(), except that instead of
20743 returning a list of bare filenames, it yields DirEntry objects that include
20744 file type and stat information along with the name. Using scandir() increases
20745 the speed of os.walk() by 2-20 times (depending on the platform and file
20746 system) by avoiding unnecessary calls to os.stat() in most cases.
20747
20748 This package is part of the Python standard library since version 3.5.")
20749 (license license:bsd-3)))
20750
20751 (define-public python2-scandir
20752 (package-with-python2 python-scandir))
20753
20754 (define-public python2-stemming
20755 (package
20756 (name "python2-stemming")
20757 (version "1.0.1")
20758 (source
20759 (origin
20760 (method url-fetch)
20761 (uri (pypi-uri "stemming" version))
20762 (sha256
20763 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
20764 (build-system python-build-system)
20765 (arguments
20766 `(#:python ,python-2))
20767 (home-page "https://bitbucket.org/mchaput/stemming/overview")
20768 (synopsis "Python implementations of various stemming algorithms")
20769 (description
20770 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
20771 stemming algorithms for English. These implementations are straightforward and
20772 efficient, unlike some Python versions of the same algorithms available on the
20773 Web. This package is an extraction of the stemming code included in the Whoosh
20774 search engine.")
20775 (license license:public-domain)))
20776
20777 (define-public python-factory-boy
20778 (package
20779 (name "python-factory-boy")
20780 (version "3.2.1")
20781 (source
20782 (origin
20783 (method url-fetch)
20784 (uri (pypi-uri "factory_boy" version))
20785 (sha256
20786 (base32 "0pm5lbvnwm0kg5i6z611rg907yw1gy551f2advmpaz041ixjg3d9"))))
20787 (build-system python-build-system)
20788 (arguments
20789 ;; Tests are not included in the tarball.
20790 `(#:tests? #f))
20791 (propagated-inputs (list python-faker))
20792 (home-page "https://github.com/benhoyt/scandir")
20793 (synopsis "Versatile test fixtures replacement")
20794 (description "Factory_boy is a fixtures replacement based on thoughtbot’s
20795 factory_girl. As a fixtures replacement tool, it aims to replace static, hard
20796 to maintain fixtures with easy-to-use factories for complex object. Instead
20797 of building an exhaustive test setup with every possible combination of corner
20798 cases, factory_boy allows you to use objects customized for the current test,
20799 while only declaring the test-specific fields.")
20800 (license license:expat)))
20801
20802 (define-public python-translate-toolkit
20803 (package
20804 (name "python-translate-toolkit")
20805 (version "3.5.1")
20806 (source
20807 (origin
20808 (method url-fetch)
20809 (uri (pypi-uri "translate-toolkit" version ".tar.gz"))
20810 (sha256
20811 (base32 "020pp7pbpnavxd41z90vyzzx06ci57mx9drkgbsb89wxxx4gal9v"))))
20812 (build-system python-build-system)
20813 (native-inputs
20814 (list python-pytest python-sphinx))
20815 (propagated-inputs
20816 (list python-babel
20817 python-beautifulsoup4
20818 python-chardet
20819 python-diff-match-patch
20820 python-levenshtein
20821 python-lxml
20822 python-six
20823 python-vobject
20824 python-pyyaml))
20825 (arguments
20826 ;; TODO: tests are not run, because they end with
20827 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
20828 ;; 'parse_funcs'
20829 ;; during test setup.
20830 (list #:tests? #f
20831 #:phases
20832 #~(modify-phases %standard-phases
20833 ;; translate-toolkit has many optional dependencies (see
20834 ;; optional.txt), which the sanity check does not understand.
20835 (delete 'sanity-check))))
20836 (home-page "https://toolkit.translatehouse.org")
20837 (synopsis "Tools and API for translation and localization engineering")
20838 (description
20839 "Tools and API for translation and localization engineering. It contains
20840 several utilities, as well as an API for building localization tools.")
20841 (license license:gpl2+)))
20842
20843 ;; Required for virtaal, newer versions do not build with python2
20844 (define-public python2-translate-toolkit
20845 (package-with-python2
20846 (package
20847 (inherit python-translate-toolkit)
20848 (version "2.1.0")
20849 (source
20850 (origin
20851 (method url-fetch)
20852 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
20853 (sha256
20854 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))))))
20855
20856 (define-public python-packaging
20857 (package/inherit python-packaging-bootstrap
20858 (name "python-packaging")
20859 (arguments
20860 `(#:phases (modify-phases %standard-phases
20861 (replace 'check
20862 (lambda* (#:key tests? #:allow-other-keys)
20863 (if tests?
20864 (invoke "pytest" "-vv")
20865 (format #t "test suite not run~%")))))))
20866 (native-inputs
20867 `(("python-pretend" ,python-pretend)
20868 ("python-pytest" ,python-pytest)))
20869 (propagated-inputs
20870 `(("python-pyparsing" ,python-pyparsing)
20871 ("python-six" ,python-six)))
20872 (home-page "https://github.com/pypa/packaging")
20873 (synopsis "Core utilities for Python packages")
20874 (description "Packaging is a Python module for dealing with Python packages.
20875 It offers an interface for working with package versions, names, and dependency
20876 information.")
20877 ;; From 'LICENSE': This software is made available under the terms of
20878 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
20879 ;; Contributions to this software is made under the terms of *both* these
20880 ;; licenses.
20881 (license (list license:asl2.0 license:bsd-2))))
20882
20883 (define-public python2-packaging
20884 (package-with-python2 python-packaging))
20885
20886 ;; TODO(staging): merge with python-packaging-bootstrap.
20887 (define-public python-packaging-next
20888 (package
20889 (inherit python-packaging)
20890 (version "21.3")
20891 (source
20892 (origin
20893 (method url-fetch)
20894 (uri (pypi-uri "packaging" version))
20895 (sha256
20896 (base32
20897 "1sygirdrqgv4f1ckh9nhpcw1yfidrh3qjl86wq8vk6nq4wlw8iyx"))))))
20898
20899 (define-public python-relatorio
20900 (package
20901 (name "python-relatorio")
20902 (version "0.10.0")
20903 (source
20904 (origin
20905 (method url-fetch)
20906 (uri (pypi-uri "relatorio" version))
20907 (sha256
20908 (base32
20909 "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
20910 (build-system python-build-system)
20911 (propagated-inputs
20912 (list python-lxml python-genshi))
20913 (native-inputs
20914 (list python-magic))
20915 (home-page "https://relatorio.tryton.org/")
20916 (synopsis "Templating library able to output ODT and PDF files")
20917 (description "Relatorio is a templating library which provides a way to
20918 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
20919 for more filetypes can be easily added by creating plugins for them.")
20920 (license license:gpl3+)))
20921
20922 (define-public python-radon
20923 (package
20924 (name "python-radon")
20925 (version "4.1.0")
20926 (source
20927 (origin
20928 (method url-fetch)
20929 (uri (pypi-uri "radon" version))
20930 (sha256
20931 (base32
20932 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
20933 (build-system python-build-system)
20934 (arguments
20935 `(#:phases (modify-phases %standard-phases
20936 (add-after 'unpack 'relax-requirements
20937 (lambda _
20938 (substitute* "setup.py"
20939 ((".*'future'.*")
20940 "")
20941 (("colorama==0.4.1")
20942 "colorama>=0.4.1"))))
20943 (replace 'check
20944 (lambda _
20945 (invoke "python" "radon/tests/run.py"))))))
20946 (propagated-inputs
20947 (list python-colorama python-flake8-polyfill python-mando))
20948 (native-inputs
20949 (list python-pytest python-pytest-mock))
20950 (home-page "https://radon.readthedocs.org/")
20951 (synopsis "Code Metrics in Python")
20952 (description "Radon is a Python tool which computes various code metrics.
20953 Supported metrics are:
20954 @itemize @bullet
20955 @item raw metrics: SLOC, comment lines, blank lines, &c.
20956 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
20957 @item Halstead metrics (all of them)
20958 @item the Maintainability Index (a Visual Studio metric)
20959 @end itemize")
20960 (properties `((python2-variant . ,(delay python2-radon))))
20961 (license license:expat)))
20962
20963 (define-public python2-radon
20964 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
20965 (package/inherit base
20966 (propagated-inputs
20967 `(("python-configparser" ,python2-configparser)
20968 ("python-future" ,python2-future)
20969 ,@(package-propagated-inputs base))))))
20970
20971 (define-public python-sure
20972 (package
20973 (name "python-sure")
20974 (version "1.4.11")
20975 (source
20976 (origin
20977 (method url-fetch)
20978 (uri (pypi-uri "sure" version))
20979 (sha256
20980 (base32
20981 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
20982 (build-system python-build-system)
20983 (propagated-inputs
20984 (list python-mock python-six))
20985 (native-inputs
20986 (list python-nose))
20987 (home-page "https://github.com/gabrielfalcao/sure")
20988 (synopsis "Automated testing library in python for python")
20989 (description
20990 "Sure is a python library that leverages a DSL for writing assertions.
20991 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
20992 (license license:gpl3+)))
20993
20994 (define-public python2-sure
20995 (package-with-python2 python-sure))
20996
20997 (define-public python2-couleur
20998 ;; This package does not seem to support python3 at all, hence,
20999 ;; only the python2 variant definition is provided.
21000 (package
21001 (name "python2-couleur")
21002 (version "0.6.2")
21003 (source
21004 (origin
21005 (method url-fetch)
21006 (uri (pypi-uri "couleur" version))
21007 (sha256
21008 (base32
21009 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
21010 (build-system python-build-system)
21011 (arguments
21012 `(#:python ,python-2))
21013 (home-page "https://github.com/gabrielfalcao/couleur")
21014 (synopsis
21015 "ANSI terminal tool for python, colored shell and other handy fancy features")
21016 (description
21017 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
21018 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
21019 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
21020 ;; https://github.com/gabrielfalcao/couleur/issues/11
21021 (license license:lgpl3+)))
21022
21023 (define-public python-misaka
21024 (package
21025 (name "python-misaka")
21026 (version "2.1.1")
21027 (source
21028 (origin
21029 (method url-fetch)
21030 (uri (pypi-uri "misaka" version))
21031 (sha256
21032 (base32
21033 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
21034 (build-system python-build-system)
21035 (arguments
21036 `(;; Line 37 of setup.py calls self.run_command('develop')
21037 ;; in the 'check' phase. This command seems to be trying
21038 ;; to write to
21039 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
21040 ;; for which it does not have the permission to write.
21041 #:tests? #f))
21042 (propagated-inputs
21043 (list python-cffi))
21044 (home-page "https://github.com/FSX/misaka")
21045 (synopsis "Python binding for Hoedown")
21046 (description
21047 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
21048 library written in C. It features a fast HTML renderer and functionality to make custom
21049 renderers (e.g. man pages or LaTeX).")
21050 (license license:expat)))
21051
21052 (define-public python2-misaka
21053 (package-with-python2 python-misaka))
21054
21055 (define-public python2-steadymark
21056 ;; This is forced into being a python2 only variant
21057 ;; due to its dependence on couleur that has no support
21058 ;; for python3
21059 (package
21060 (name "python2-steadymark")
21061 (version "0.7.3")
21062 (source
21063 (origin
21064 (method url-fetch)
21065 (uri (pypi-uri "steadymark" version))
21066 (sha256
21067 (base32
21068 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
21069 (build-system python-build-system)
21070 (native-inputs
21071 (list python2-couleur python2-sure python2-misaka))
21072 (arguments
21073 `(#:python ,python-2
21074 #:phases
21075 (modify-phases %standard-phases
21076 (add-before 'build 'patch-setup-py
21077 (lambda _
21078 ;; Update requirements from dependency==version
21079 ;; to dependency>=version
21080 (substitute* "setup.py"
21081 (("==") ">="))
21082 #t)))))
21083 (home-page "https://github.com/gabrielfalcao/steadymark")
21084 (synopsis "Markdown-based test runner for python")
21085 (description
21086 "@code{Steadymark} allows documentation to be written in github-flavoured
21087 markdown. The documentation may contain snippets of code surrounded by python
21088 code blocks and @code{Steadymark} will find these snippets and run them, making
21089 sure that there are no old malfunctional examples in the documentation examples.")
21090 (license license:expat)))
21091
21092 (define-public python-jsonpointer
21093 (package
21094 (name "python-jsonpointer")
21095 (version "1.10")
21096 (source
21097 (origin
21098 (method url-fetch)
21099 (uri (pypi-uri "jsonpointer" version))
21100 (sha256
21101 (base32
21102 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
21103 (build-system python-build-system)
21104 (home-page "https://github.com/stefankoegl/python-json-pointer")
21105 (synopsis "Identify specific nodes in a JSON document")
21106 (description "@code{jsonpointer} allows you to access specific nodes
21107 by path in a JSON document (see RFC 6901).")
21108 (license license:bsd-3)))
21109
21110 (define-public python2-jsonpointer
21111 (package-with-python2 python-jsonpointer))
21112
21113 (define-public python-jsonpatch
21114 (package
21115 (name "python-jsonpatch")
21116 (version "1.16")
21117 (source
21118 (origin
21119 (method git-fetch)
21120 ;; pypi version lacks tests.js
21121 (uri (git-reference
21122 (url "https://github.com/stefankoegl/python-json-patch")
21123 (commit (string-append "v" version))))
21124 (file-name (git-file-name name version))
21125 (sha256
21126 (base32
21127 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
21128 (build-system python-build-system)
21129 (propagated-inputs
21130 (list python-jsonpointer))
21131 (home-page "https://github.com/stefankoegl/python-json-patch")
21132 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
21133 (description "@code{jsonpatch} is a library and program that allows
21134 applying JSON Patches according to RFC 6902.")
21135 (license license:bsd-3)))
21136
21137 (define-public python2-jsonpatch
21138 (package-with-python2 python-jsonpatch))
21139
21140 (define-public python-jsonpatch-0.4
21141 (package (inherit python-jsonpatch)
21142 (name "python-jsonpatch")
21143 (version "0.4")
21144 (source
21145 (origin
21146 (method git-fetch)
21147 (uri (git-reference
21148 (url "https://github.com/stefankoegl/python-json-patch")
21149 (commit (string-append "v" version))))
21150 (file-name (git-file-name name version))
21151 (sha256
21152 (base32
21153 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
21154
21155 (define-public python2-jsonpatch-0.4
21156 (package-with-python2 python-jsonpatch-0.4))
21157
21158 (define-public python-rfc3986
21159 (package
21160 (name "python-rfc3986")
21161 (version "1.4.0")
21162 (source (origin
21163 (method url-fetch)
21164 (uri (pypi-uri "rfc3986" version))
21165 (sha256
21166 (base32
21167 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
21168 (build-system python-build-system)
21169 (arguments
21170 `(#:phases
21171 (modify-phases %standard-phases
21172 (replace 'check
21173 (lambda _
21174 (invoke "pytest" "-v"))))))
21175 (native-inputs
21176 (list python-pytest))
21177 (home-page "https://rfc3986.readthedocs.io/")
21178 (synopsis "Parse and validate URI references")
21179 (description
21180 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
21181 validation and authority parsing. This module also supports RFC@tie{}6874
21182 which adds support for zone identifiers to IPv6 addresses.")
21183 (license license:asl2.0)))
21184
21185 (define-public python2-rfc3986
21186 (package-with-python2 python-rfc3986))
21187
21188 (define-public python-rfc3987
21189 (package
21190 (name "python-rfc3987")
21191 (version "1.3.7")
21192 (source
21193 (origin
21194 (method url-fetch)
21195 (uri (pypi-uri "rfc3987" version))
21196 (sha256
21197 (base32
21198 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
21199 (build-system python-build-system)
21200 (home-page "https://pypi.org/project/rfc3987/")
21201 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
21202 (description "@code{rfc3987} provides routines for parsing and
21203 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
21204 (license license:gpl3+)))
21205
21206 (define-public python2-rfc3987
21207 (package-with-python2 python-rfc3987))
21208
21209 ;; The latest commit contains fixes for building with both python3 and python2.
21210 (define-public python-rfc6555
21211 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
21212 (revision "1"))
21213 (package
21214 (name "python-rfc6555")
21215 (version (git-version "0.0.0" revision commit))
21216 (source (origin
21217 (method git-fetch)
21218 (uri (git-reference
21219 (url "https://github.com/sethmlarson/rfc6555")
21220 (commit commit)))
21221 (file-name (git-file-name name version))
21222 (sha256
21223 (base32
21224 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
21225 (build-system python-build-system)
21226 (arguments
21227 '(#:phases
21228 (modify-phases %standard-phases
21229 (replace 'check
21230 (lambda* (#:key tests? #:allow-other-keys)
21231 (if tests?
21232 ;; Other tests require network access.
21233 (invoke "pytest" "tests/test_ipv6.py")
21234 #t))))))
21235 (native-inputs
21236 (list python-pytest))
21237 (home-page "https://pypi.org/project/rfc6555/")
21238 (synopsis "Python implementation of RFC 6555")
21239 (description
21240 "Python implementation of the Happy Eyeballs Algorithm described in RFC
21241 6555. Provided with a single file and dead-simple API to allow easy vendoring
21242 and integration into other projects.")
21243 (license license:asl2.0))))
21244
21245 (define-public python-bagit
21246 (package
21247 (name "python-bagit")
21248 (version "1.7.0")
21249 (source
21250 (origin
21251 (method url-fetch)
21252 (uri (pypi-uri "bagit" version))
21253 (sha256
21254 (base32
21255 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
21256 (build-system python-build-system)
21257 (native-inputs
21258 (list python-setuptools-scm python-coverage python-mock))
21259 (home-page "https://libraryofcongress.github.io/bagit-python/")
21260 (synopsis "Create and validate BagIt packages")
21261 (description "Bagit is a Python library and command line utility for working
21262 with BagIt style packages. BagIt is a minimalist packaging format for digital
21263 preservation.")
21264 (license license:cc0)))
21265
21266 (define-public python-prov
21267 (package
21268 (name "python-prov")
21269 (version "2.0.0")
21270 (source
21271 (origin
21272 (method url-fetch)
21273 (uri (pypi-uri "prov" version))
21274 (sha256
21275 (base32
21276 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
21277 (build-system python-build-system)
21278 (propagated-inputs
21279 (list python-dateutil python-lxml python-networkx python-rdflib-5))
21280 (native-inputs
21281 (list graphviz python-pydot))
21282 (home-page "https://github.com/trungdong/prov")
21283 (synopsis
21284 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
21285 (description
21286 "This package provides a library for W3C Provenance Data Model supporting
21287 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
21288 (license license:expat)))
21289
21290 (define-public python-arcp
21291 (package
21292 (name "python-arcp")
21293 (version "0.2.1")
21294 (source
21295 (origin
21296 (method url-fetch)
21297 (uri (pypi-uri "arcp" version))
21298 (sha256
21299 (base32
21300 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
21301 (build-system python-build-system)
21302 (native-inputs
21303 (list python-pytest))
21304 (home-page "http://arcp.readthedocs.io/")
21305 (synopsis
21306 "Archive and Package URI parser and generator")
21307 (description
21308 "@acronym{arcp, Archive and Package} provides functions for creating
21309 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
21310 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
21311 consume or reference hypermedia resources bundled inside a file archive or an
21312 application package, as well as to resolve URIs for archive resources within a
21313 programmatic framework. This URI scheme provides mechanisms to generate a
21314 unique base URI to represent the root of the archive, so that relative URI
21315 references in a bundled resource can be resolved within the archive without
21316 having to extract the archive content on the local file system. An arcp URI can
21317 be used for purposes of isolation (e.g. when consuming multiple archives),
21318 security constraints (avoiding \"climb out\" from the archive), or for
21319 externally identiyfing sub-resources referenced by hypermedia formats.")
21320 (license license:asl2.0)))
21321
21322 (define-public python-shellescape
21323 (package
21324 (name "python-shellescape")
21325 (version "3.8.1")
21326 (source
21327 (origin
21328 (method git-fetch)
21329 (uri (git-reference
21330 (url "https://github.com/chrissimpkins/shellescape")
21331 (commit (string-append "v" version))))
21332 (file-name (git-file-name name version))
21333 (sha256
21334 (base32
21335 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
21336 (build-system python-build-system)
21337 (arguments
21338 '(#:phases
21339 (modify-phases %standard-phases
21340 (replace 'check
21341 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
21342 (when tests?
21343 (add-installed-pythonpath inputs outputs)
21344 (invoke "python" "tests/test_shellescape.py"))
21345 #t)))))
21346 (native-inputs
21347 (list python-pytest))
21348 (home-page "https://github.com/chrissimpkins/shellescape")
21349 (synopsis
21350 "Shell escape a string to safely use it as a token in a shell command")
21351 (description
21352 "The shellescape Python module defines the @code{shellescape.quote()}
21353 function that returns a shell-escaped version of a Python string. This is a
21354 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
21355 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
21356 (license license:expat)))
21357
21358 (define-public python-validators
21359 (package
21360 (name "python-validators")
21361 (version "0.18.2")
21362 (source (origin
21363 (method url-fetch)
21364 (uri (pypi-uri "validators" version))
21365 (sha256
21366 (base32
21367 "19lypf7hm7p203ay3v8zmckc5rv6889zkfdm16nki1972f99mk9p"))))
21368 (build-system python-build-system)
21369 (arguments
21370 '(#:phases (modify-phases %standard-phases
21371 (replace 'check
21372 (lambda _
21373 (invoke "pytest" "-vv"))))))
21374 (propagated-inputs
21375 (list python-decorator python-six))
21376 (native-inputs
21377 (list python-flake8 python-isort python-pytest))
21378 (home-page "https://github.com/kvesteri/validators")
21379 (synopsis "Data validation library")
21380 (description
21381 "This package contains validators for different things such as email
21382 addresses, IP addresses, URLs, hashes and more. It has been designed to
21383 be easy to use and not require defining a schema or form just to validate
21384 some input.")
21385 (license license:expat)))
21386
21387 (define-public python-validate-email
21388 (package
21389 (name "python-validate-email")
21390 (version "1.3")
21391 (source
21392 (origin
21393 (method url-fetch)
21394 (uri (pypi-uri "validate_email" version))
21395 (sha256
21396 (base32
21397 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
21398 (build-system python-build-system)
21399 (home-page "https://github.com/syrusakbary/validate_email")
21400 (synopsis "Verifies if an email address is valid and really exists")
21401 (description "@code{validate_email} can be used to verify if an email
21402 address is valid and really exists.")
21403 (license license:lgpl3+)))
21404
21405 (define-public python2-validate-email
21406 (package-with-python2 python-validate-email))
21407
21408 (define-public python-flex
21409 (package
21410 (name "python-flex")
21411 (version "6.10.0")
21412 (source
21413 (origin
21414 (method url-fetch)
21415 (uri (pypi-uri "flex" version))
21416 (sha256
21417 (base32
21418 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
21419 (build-system python-build-system)
21420 (propagated-inputs
21421 (list python-click
21422 python-iso8601
21423 python-jsonpointer
21424 python-pyyaml
21425 python-requests
21426 python-rfc3987
21427 python-six
21428 python-validate-email))
21429 (home-page "https://github.com/pipermerriam/flex")
21430 (synopsis "Validates Swagger schemata")
21431 (description "@code{flex} can be used to validate Swagger schemata.")
21432 (license license:bsd-3)))
21433
21434 (define-public python2-flex
21435 (package-with-python2 python-flex))
21436
21437 (define-public python-marshmallow
21438 (package
21439 (name "python-marshmallow")
21440 (version "3.9.1")
21441 (source
21442 (origin
21443 (method url-fetch)
21444 (uri (pypi-uri "marshmallow" version))
21445 (sha256
21446 (base32
21447 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
21448 (build-system python-build-system)
21449 (propagated-inputs
21450 (list python-dateutil python-simplejson))
21451 (native-inputs
21452 (list python-pytest python-pytz))
21453 (home-page "https://github.com/marshmallow-code/marshmallow")
21454 (synopsis "Convert complex datatypes to and from native
21455 Python datatypes")
21456 (description "@code{marshmallow} provides a library for converting
21457 complex datatypes to and from native Python datatypes.")
21458 (license license:expat)))
21459
21460 (define-public python-marshmallow-jsonapi
21461 (package
21462 (name "python-marshmallow-jsonapi")
21463 (version "0.24.0")
21464 (source
21465 (origin
21466 (method url-fetch)
21467 (uri (pypi-uri "marshmallow-jsonapi" version))
21468 (sha256
21469 (base32 "1d9pxcgmln4gls99vwj1h24qv0lz7fb2jqmqrsiv1pid1snc125x"))))
21470 (build-system python-build-system)
21471 (propagated-inputs
21472 (list python-marshmallow))
21473 (native-inputs
21474 (list python-faker
21475 python-flake8
21476 python-flake8-bugbear
21477 python-flask
21478 python-mock
21479 python-pre-commit
21480 python-pytest
21481 python-tox))
21482 (home-page "https://github.com/marshmallow-code/marshmallow-jsonapi")
21483 (synopsis "JSON:API 1.0 formatting with Marshmallow")
21484 (description
21485 "The marshmallow-jsonapi package provides a simple way to produce
21486 @uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web framework.
21487 It includes optional utilities to integrate with Flask.")
21488 (license license:expat)))
21489
21490 (define-public python-apispec
21491 (package
21492 (name "python-apispec")
21493 (version "4.0.0")
21494 (source
21495 (origin
21496 (method url-fetch)
21497 (uri (pypi-uri "apispec" version))
21498 (sha256
21499 (base32
21500 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
21501 (build-system python-build-system)
21502 (arguments
21503 '(#:phases (modify-phases %standard-phases
21504 (replace 'check
21505 (lambda _
21506 (invoke "pytest" "-vv"
21507 ;; Disable validation tests since they require
21508 ;; the optional 'prance' library which is not
21509 ;; yet in Guix.
21510 "-k" "not openapi_tools_validate"))))))
21511 (propagated-inputs
21512 (list python-pyyaml))
21513 (native-inputs
21514 (list python-pytest python-marshmallow))
21515 (home-page "https://github.com/marshmallow-code/apispec")
21516 (synopsis "Swagger/OpenAPI specification generator")
21517 (description "@code{python-apispec} is a pluggable API specification
21518 generator. It currently supports the OpenAPI specification, formerly known
21519 as Swagger.")
21520 (license license:expat)))
21521
21522 (define-public python-flasgger
21523 (package
21524 (name "python-flasgger")
21525 (version "0.6.3")
21526 (source
21527 (origin
21528 (method git-fetch)
21529 (uri (git-reference
21530 (url "https://github.com/rochacbruno/flasgger")
21531 (commit version)))
21532 (file-name (git-file-name name version))
21533 (sha256
21534 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
21535 (build-system python-build-system)
21536 (arguments
21537 `(#:phases
21538 (modify-phases %standard-phases
21539 (replace 'check
21540 (lambda* (#:key inputs outputs #:allow-other-keys)
21541 (substitute* "Makefile"
21542 (("flake8 flasgger --ignore=F403")
21543 "flake8 flasgger --ignore=E731,F403"))
21544 (invoke "py.test"))))))
21545 (propagated-inputs
21546 (list python-flask python-pyyaml python-jsonschema python-mistune
21547 python-six))
21548 (native-inputs
21549 (list python-decorator
21550 python-flake8
21551 python-flask-restful
21552 python-flex
21553 python-pytest
21554 python-pytest-cov
21555 python-marshmallow
21556 python-apispec))
21557 (home-page "https://github.com/rochacbruno/flasgger/")
21558 (synopsis "Extract Swagger specs from your Flask project")
21559 (description "@code{python-flasgger} allows extracting Swagger specs
21560 from your Flask project. It is a fork of Flask-Swagger.")
21561 (license license:expat)))
21562
21563 (define-public python-swagger-spec-validator
21564 (package
21565 (name "python-swagger-spec-validator")
21566 (version "2.4.3")
21567 (source
21568 (origin
21569 (method url-fetch)
21570 (uri (pypi-uri "swagger-spec-validator" version))
21571 (sha256
21572 (base32
21573 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
21574 (build-system python-build-system)
21575 (propagated-inputs
21576 (list python-jsonschema python-pyyaml python-six))
21577 (home-page
21578 "https://github.com/Yelp/swagger_spec_validator")
21579 (synopsis "Validation of Swagger specifications")
21580 (description "@code{swagger_spec_validator} provides a library for
21581 validating Swagger API specifications.")
21582 (license license:asl2.0)))
21583
21584 (define-public python-apache-libcloud
21585 (package
21586 (name "python-apache-libcloud")
21587 (version "3.1.0")
21588 (source
21589 (origin
21590 (method url-fetch)
21591 (uri (pypi-uri "apache-libcloud" version))
21592 (sha256
21593 (base32
21594 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
21595 (build-system python-build-system)
21596 (arguments
21597 '(#:phases
21598 (modify-phases %standard-phases
21599 (add-after 'unpack 'patch-ssh
21600 (lambda* (#:key inputs #:allow-other-keys)
21601 (substitute* "libcloud/compute/ssh.py"
21602 (("'ssh'")
21603 (string-append "'" (search-input-file inputs "/bin/ssh")
21604 "'")))))
21605 (add-after 'unpack 'patch-tests
21606 (lambda _
21607 (substitute* "libcloud/test/compute/test_ssh_client.py"
21608 (("^class ShellOutSSHClientTests")
21609 "@unittest.skip(\"Guix container doesn't have ssh service\")
21610 class ShellOutSSHClientTests"))))
21611 (add-before 'check 'copy-secret
21612 (lambda _
21613 (copy-file "libcloud/test/secrets.py-dist"
21614 "libcloud/test/secrets.py"))))))
21615 (inputs
21616 (list openssh))
21617 (propagated-inputs
21618 (list python-paramiko python-requests))
21619 (native-inputs
21620 (list python-lockfile python-mock python-pytest python-pytest-runner
21621 python-requests-mock))
21622 (home-page "https://libcloud.apache.org/")
21623 (synopsis "Unified Cloud API")
21624 (description "@code{libcloud} is a Python library for interacting with
21625 many of the popular cloud service providers using a unified API.")
21626 (license license:asl2.0)))
21627
21628 (define-public python-smmap
21629 (package
21630 (name "python-smmap")
21631 (version "3.0.1")
21632 (source
21633 (origin
21634 (method url-fetch)
21635 (uri (pypi-uri "smmap" version))
21636 (sha256
21637 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
21638 (build-system python-build-system)
21639 (native-inputs
21640 (list python-nosexcover))
21641 (home-page "https://github.com/Byron/smmap")
21642 (synopsis "Python sliding window memory map manager")
21643 (description "@code{smmap} is a pure Python implementation of a sliding
21644 window memory map manager.")
21645 (license license:bsd-3)))
21646
21647 (define-public python2-smmap
21648 (package-with-python2 python-smmap))
21649
21650 (define-public python-regex
21651 (package
21652 (name "python-regex")
21653 (version "2022.1.18")
21654 (source (origin
21655 (method url-fetch)
21656 (uri (pypi-uri "regex" version))
21657 (sha256
21658 (base32
21659 "05ir92d0cmv8wkafn3r05j5q47l6shg7cpdblp2a8m407b02vwwp"))))
21660 (build-system python-build-system)
21661 (arguments
21662 '(#:phases
21663 (modify-phases %standard-phases
21664 (replace 'check
21665 (lambda* (#:key inputs outputs #:allow-other-keys)
21666 (add-installed-pythonpath inputs outputs)
21667 (invoke "python" "-c"
21668 "from regex.test_regex import test_main ; test_main()"))))))
21669 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
21670 (synopsis "Alternative regular expression module")
21671 (description "This regular expression implementation is backwards-
21672 compatible with the standard @code{re} module, but offers additional
21673 functionality like full case-folding for case-insensitive matches in Unicode.")
21674 (license license:psfl)))
21675
21676 (define-public python2-regex
21677 (package-with-python2 python-regex))
21678
21679 (define-public python-pyopengl
21680 (package
21681 (name "python-pyopengl")
21682 (version "3.1.5")
21683 (source
21684 (origin
21685 (method url-fetch)
21686 (uri (pypi-uri "PyOpenGL" version))
21687 (sha256
21688 (base32
21689 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
21690 (build-system python-build-system)
21691 (inputs
21692 (list mesa freeglut glu))
21693 (arguments
21694 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
21695 ;attribute 'OSMesa'
21696 #:phases
21697 (modify-phases %standard-phases
21698 (add-before 'build 'fix-paths
21699 (lambda* (#:key inputs outputs #:allow-other-keys)
21700 (substitute* '("OpenGL/platform/ctypesloader.py")
21701 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
21702 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
21703 (("'GL'")
21704 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
21705 (("'GLU'")
21706 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
21707 (("'glut',")
21708 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
21709 (("'GLESv1_CM'")
21710 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
21711 (("'GLESv2'")
21712 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
21713 ;; Not providing libgle. It seems to be very old.
21714 #t)))))
21715 (home-page "http://pyopengl.sourceforge.net")
21716 (synopsis "Standard OpenGL bindings for Python")
21717 (description
21718 "PyOpenGL is the most common cross platform Python binding to OpenGL and
21719 related APIs. The binding is created using the standard @code{ctypes}
21720 library.")
21721 (license license:bsd-3)))
21722
21723 (define-public python-pyopengl-accelerate
21724 (package
21725 (inherit python-pyopengl)
21726 (name "python-pyopengl-accelerate")
21727 (version "3.1.5")
21728 (source
21729 (origin
21730 (method url-fetch)
21731 (uri (pypi-uri "PyOpenGL-accelerate" version))
21732 (sha256
21733 (base32
21734 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
21735 (inputs
21736 (list mesa python-numpy)) ; for cython module
21737 ; numpy_formathandler, thus not propagated
21738 (arguments
21739 `(#:tests? #f
21740 #:phases
21741 (modify-phases %standard-phases
21742 (delete 'fix-paths))))
21743 (synopsis "Acceleration code for PyOpenGL")
21744 (description
21745 "This is the Cython-coded accelerator module for PyOpenGL.")))
21746
21747 (define-public python-rencode
21748 (package
21749 (name "python-rencode")
21750 (version "1.0.5")
21751 (source
21752 (origin
21753 (method url-fetch)
21754 (uri (pypi-uri "rencode" version))
21755 (sha256
21756 (base32
21757 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
21758 (build-system python-build-system)
21759 (arguments
21760 `(#:phases
21761 (modify-phases %standard-phases
21762 (add-before 'check 'delete-bogus-test
21763 ;; This test requires /home/aresch/Downloads, which is not provided by
21764 ;; the build environment.
21765 (lambda _
21766 (delete-file "rencode/t.py")
21767 #t)))))
21768 (native-inputs (list pkg-config python-cython))
21769 (home-page "https://github.com/aresch/rencode")
21770 (synopsis "Serialization of heterogeneous data structures")
21771 (description
21772 "The @code{rencode} module is a data structure serialization library,
21773 similar to @code{bencode} from the BitTorrent project. For complex,
21774 heterogeneous data structures with many small elements, r-encoding stake up
21775 significantly less space than b-encodings. This version of rencode is a
21776 complete rewrite in Cython to attempt to increase the performance over the
21777 pure Python module.")
21778 (license license:bsd-3)))
21779
21780 (define-public python2-rencode
21781 (package-with-python2 python-rencode))
21782
21783 (define-public python-xenon
21784 (package
21785 (name "python-xenon")
21786 (version "0.7.0")
21787 (source
21788 (origin
21789 (method url-fetch)
21790 (uri (pypi-uri "xenon" version))
21791 (sha256
21792 (base32
21793 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
21794 (build-system python-build-system)
21795 (native-inputs
21796 (list python-pyyaml python-radon python-requests python-flake8
21797 python-tox))
21798 (arguments
21799 `(#:tests? #f ;test suite not shipped with the PyPI archive
21800 #:phases
21801 (modify-phases %standard-phases
21802 (add-before 'build 'patch-test-requirements
21803 (lambda _
21804 ;; Remove httpretty dependency for tests.
21805 (substitute* "setup.py"
21806 (("httpretty") ""))
21807 #t)))))
21808 (home-page "https://xenon.readthedocs.org/")
21809 (synopsis "Monitor code metrics for Python on your CI server")
21810 (description
21811 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
21812 Ideally, @code{xenon} is run every time code is committed. Through command
21813 line options, various thresholds can be set for the complexity of code. It
21814 will fail (i.e. it will exit with a non-zero exit code) when any of these
21815 requirements is not met.")
21816 (license license:expat)))
21817
21818 (define-public python-pysocks
21819 (package
21820 (name "python-pysocks")
21821 (version "1.7.1")
21822 (source
21823 (origin
21824 (method url-fetch)
21825 (uri (pypi-uri "PySocks" version))
21826 (sha256
21827 (base32
21828 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
21829 (build-system python-build-system)
21830 (arguments `(#:tests? #f))
21831 (home-page "https://github.com/Anorov/PySocks")
21832 (synopsis "SOCKS client module")
21833 (description "@code{pysocks} is an updated and semi-actively maintained
21834 version of @code{SocksiPy} with bug fixes and extra features.")
21835 (license license:bsd-3)))
21836
21837 (define-public python2-pysocks
21838 (package-with-python2 python-pysocks))
21839
21840 (define-public python-pydiff
21841 (package
21842 (name "python-pydiff")
21843 (version "0.2")
21844 (source
21845 (origin
21846 (method url-fetch)
21847 (uri (pypi-uri "pydiff" version))
21848 (sha256
21849 (base32
21850 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
21851 (build-system python-build-system)
21852 (home-page "https://github.com/myint/pydiff")
21853 (synopsis "Library to diff two Python files at the bytecode level")
21854 (description
21855 "@code{pydiff} makes it easy to look for actual code changes while
21856 ignoring formatting changes.")
21857 (license license:expat)))
21858
21859 (define-public python2-pydiff
21860 (package-with-python2 python-pydiff))
21861
21862 (define-public python-pydub
21863 (package
21864 (name "python-pydub")
21865 (version "0.25.1")
21866 (source
21867 (origin
21868 (method url-fetch)
21869 (uri (pypi-uri "pydub" version))
21870 (sha256
21871 (base32
21872 "03ykn2kp6qglsrzqi5h79z5cp3kl9mknasv0d6jv5jj9k77362lq"))))
21873 (build-system python-build-system)
21874 (arguments
21875 `(#:phases
21876 (modify-phases %standard-phases
21877 (add-after 'unpack 'fix-ffmpeg-path
21878 (lambda* (#:key inputs #:allow-other-keys)
21879 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
21880 (substitute* '("pydub/utils.py")
21881 (("return \"ffmpeg\"")
21882 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
21883 (("return \"ffplay\"")
21884 (string-append "return \"" ffmpeg "/bin/ffplay\""))
21885 (("return \"ffprobe\"")
21886 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
21887 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
21888 #t))))))
21889 (home-page "https://pydub.com")
21890 (inputs
21891 (list ffmpeg))
21892 (propagated-inputs
21893 (list python-scipy))
21894 (synopsis "Manipulate audio with a high level interface in Python")
21895 (description
21896 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
21897 @code{ffmpeg} to open various audio formats.")
21898 (license license:expat))) ; MIT license
21899
21900 (define-public python-tqdm
21901 (package
21902 (name "python-tqdm")
21903 (version "4.62.3")
21904 (source
21905 (origin
21906 (method url-fetch)
21907 (uri (pypi-uri "tqdm" version))
21908 (sha256
21909 (base32
21910 "03cjj8jl8iybvfjbpvdql5qfslzfv043g7w6nx8rhv2h2xrdwnfk"))))
21911 (build-system python-build-system)
21912 (arguments
21913 '(#:phases (modify-phases %standard-phases
21914 (replace 'check
21915 (lambda _
21916 (invoke "pytest" "-vv"
21917 "-o" "asyncio_mode=auto"
21918 "-k" "not perf"))))))
21919 (native-inputs
21920 (list python-pytest python-pytest-asyncio python-pytest-timeout
21921 python-setuptools-scm python-toml))
21922 (home-page "https://github.com/tqdm/tqdm")
21923 (synopsis "Fast, extensible progress meter")
21924 (description
21925 "Make loops show a progress bar on the console by just wrapping any
21926 iterable with @code{|tqdm(iterable)|}. Offers many options to define
21927 design and layout.")
21928 (license (list license:mpl2.0 license:expat))))
21929
21930 (define-public python-pkginfo
21931 (package
21932 (name "python-pkginfo")
21933 (version "1.8.2")
21934 (source
21935 (origin
21936 (method url-fetch)
21937 (uri (pypi-uri "pkginfo" version))
21938 (sha256
21939 (base32 "1zrbn2gblb1q1rx0jlbd0vc9h1dm1bj0760p40ff5qjhcw5hsbjl"))))
21940 (build-system python-build-system)
21941 (arguments
21942 `(#:phases
21943 (modify-phases %standard-phases
21944 (add-before 'check 'patch-tests
21945 (lambda _
21946 (substitute* "pkginfo/tests/test_installed.py"
21947 (("test_ctor_w_package_no_PKG_INFO")
21948 "_test_ctor_w_package_no_PKG_INFO")))))))
21949 (native-inputs
21950 (list python-wheel))
21951 (home-page "https://code.launchpad.net/~tseaver/pkginfo/trunk")
21952 (synopsis "Query metadatdata from sdists, bdists, and installed packages")
21953 (description
21954 "API to query the distutils metadata written in @file{PKG-INFO} inside a
21955 source distriubtion (an sdist) or a binary distribution (e.g., created by
21956 running bdist_egg). It can also query the EGG-INFO directory of an installed
21957 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
21958 created by running @code{python setup.py develop}).")
21959 (license license:expat)))
21960
21961 (define-public python2-pkginfo
21962 (package-with-python2 python-pkginfo))
21963
21964 (define-public python-twine
21965 (package
21966 (name "python-twine")
21967 (version "1.15.0")
21968 (source
21969 (origin
21970 (method url-fetch)
21971 (uri (pypi-uri "twine" version))
21972 (sha256
21973 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
21974 (build-system python-build-system)
21975 (propagated-inputs
21976 (list python-tqdm
21977 python-packaging
21978 python-pkginfo
21979 python-readme-renderer
21980 python-requests
21981 python-requests-toolbelt))
21982 (home-page "https://github.com/pypa/twine")
21983 (synopsis "Collection of utilities for interacting with PyPI")
21984 (description
21985 "@code{twine} currently supports registering projects and uploading
21986 distributions. It authenticates the user over HTTPS, allows them to pre-sign
21987 their files and supports any packaging format (including wheels).")
21988 (license license:asl2.0)))
21989
21990 (define-public python-linecache2
21991 (package
21992 (name "python-linecache2")
21993 (version "1.0.0")
21994 (source
21995 (origin
21996 (method url-fetch)
21997 (uri (pypi-uri "linecache2" version))
21998 (sha256
21999 (base32
22000 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
22001 (build-system python-build-system)
22002 (arguments
22003 `(;; The tests depend on unittest2, and our version is a bit too old.
22004 #:tests? #f))
22005 (native-inputs
22006 `(("python-pbr" ,python-pbr-minimal)))
22007 (home-page
22008 "https://github.com/testing-cabal/linecache2")
22009 (synopsis "Backports of the linecache module")
22010 (description
22011 "The linecache module allows one to get any line from any file, while
22012 attempting to optimize internally, using a cache, the common case where many
22013 lines are read from a single file.")
22014 (license license:psfl)))
22015
22016 (define-public python2-linecache2
22017 (package-with-python2 python-linecache2))
22018
22019 (define-public python-traceback2
22020 (package
22021 (name "python-traceback2")
22022 (version "1.4.0")
22023 (source
22024 (origin
22025 (method url-fetch)
22026 (uri (pypi-uri "traceback2" version))
22027 (sha256
22028 (base32
22029 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
22030 (build-system python-build-system)
22031 (arguments
22032 `(;; python-traceback2 and python-unittest2 depend on one another.
22033 #:tests? #f))
22034 (native-inputs
22035 `(("python-pbr" ,python-pbr-minimal)))
22036 (propagated-inputs
22037 (list python-linecache2 python-six))
22038 (home-page
22039 "https://github.com/testing-cabal/traceback2")
22040 (synopsis "Backports of the traceback module")
22041 (description
22042 "This module provides a standard interface to extract, format and print
22043 stack traces of Python programs. It exactly mimics the behavior of the Python
22044 interpreter when it prints a stack trace.")
22045 (license license:psfl)))
22046
22047 (define-public python2-traceback2
22048 (package-with-python2 python-traceback2))
22049
22050 (define-public python-ratelimiter
22051 (package
22052 (name "python-ratelimiter")
22053 (version "1.2.0")
22054 (source
22055 (origin
22056 (method url-fetch)
22057 (uri (pypi-uri "ratelimiter" version))
22058 (sha256
22059 (base32
22060 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
22061 (build-system python-build-system)
22062 (arguments
22063 '(#:tests? #f)) ; There are no tests in the pypi archive.
22064 (home-page "https://github.com/RazerM/ratelimiter")
22065 (synopsis "Simple rate limiting object")
22066 (description
22067 "The @code{ratelimiter} module ensures that an operation will not be
22068 executed more than a given number of times during a given period.")
22069 (license license:asl2.0)))
22070
22071 (define-public python2-ratelimiter
22072 (package-with-python2 python-ratelimiter))
22073
22074 (define-public python-jsonrpclib-pelix
22075 (package
22076 (name "python-jsonrpclib-pelix")
22077 (version "0.3.2")
22078 (source
22079 (origin
22080 (method url-fetch)
22081 (uri (pypi-uri "jsonrpclib-pelix" version))
22082 (sha256
22083 (base32
22084 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
22085 (build-system python-build-system)
22086 (arguments
22087 `(#:tests? #f)) ; no tests in PyPI tarball
22088 (home-page "https://github.com/tcalmant/jsonrpclib/")
22089 (synopsis "JSON-RPC 2.0 client library for Python")
22090 (description
22091 "This library implements the JSON-RPC v2.0
22092 specification (backwards-compatible) as a client library for Python. This
22093 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
22094 services.")
22095 (license license:asl2.0)))
22096
22097 (define-public python2-jsonrpclib-pelix
22098 (package-with-python2 python-jsonrpclib-pelix))
22099
22100 (define-public python-setuptools-scm-git-archive
22101 (package
22102 (name "python-setuptools-scm-git-archive")
22103 (version "1.0")
22104 (source
22105 (origin
22106 (method url-fetch)
22107 (uri (pypi-uri "setuptools_scm_git_archive" version))
22108 (sha256
22109 (base32
22110 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
22111 (build-system python-build-system)
22112 (arguments
22113 '(#:phases (modify-phases %standard-phases
22114 (add-after 'unpack 'dont-install-defunct-egginfo
22115 (lambda _
22116 ;; When a ".git" directory is missing, the setup.py
22117 ;; script invokes setuptools.setup twice, once with
22118 ;; "0" as the version. Prevent that.
22119 (substitute* "setup.py"
22120 (("if not isdir\\('\\.git'\\):")
22121 "if False:")))))))
22122 (native-inputs
22123 (list python-pytest))
22124 (propagated-inputs
22125 (list python-setuptools-scm))
22126 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
22127 (synopsis "Setuptools_scm plugin for git archives")
22128 (description
22129 "The setuptools_scm_git_archive package is a plugin to
22130 setuptools_scm, which supports obtaining versions from git archives that
22131 belong to tagged versions.")
22132 (license license:expat)))
22133
22134 (define-public python2-setuptools-scm-git-archive
22135 (package-with-python2 python-setuptools-scm-git-archive))
22136
22137 (define-public python-setuptools-git
22138 (package
22139 (name "python-setuptools-git")
22140 (version "1.2")
22141 (source
22142 (origin
22143 (method url-fetch)
22144 (uri (pypi-uri "setuptools-git" version))
22145 (sha256
22146 (base32
22147 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
22148 (build-system python-build-system)
22149 (arguments
22150 `(#:phases
22151 (modify-phases %standard-phases
22152 ;; This is needed for tests.
22153 (add-after 'unpack 'configure-git
22154 (lambda _
22155 (setenv "HOME" "/tmp")
22156 (invoke "git" "config" "--global" "user.email" "guix")
22157 (invoke "git" "config" "--global" "user.name" "guix")
22158 #t)))))
22159 (native-inputs
22160 `(("git" ,git-minimal)))
22161 (home-page "https://github.com/msabramo/setuptools-git")
22162 (synopsis "Setuptools revision control system plugin for Git")
22163 (description
22164 "This package provides a plugin for Setuptools for revision control with
22165 Git.")
22166 (license license:bsd-3)))
22167
22168 (define-public python-setuptools-rust
22169 (package
22170 (name "python-setuptools-rust")
22171 (version "1.1.2")
22172 (source
22173 (origin
22174 (method url-fetch)
22175 (uri (pypi-uri "setuptools-rust" version))
22176 (sha256
22177 (base32 "1lb57qx1azklgzmalflq960agvwci4bwddw0zvlc9zy00fsvkbd0"))))
22178 (build-system python-build-system)
22179 (arguments '(#:tests? #f)) ;no tests
22180 (native-inputs
22181 (list python-setuptools-scm))
22182 (propagated-inputs
22183 (list python-semantic-version python-typing-extensions))
22184 (home-page "https://github.com/PyO3/setuptools-rust")
22185 (synopsis "Setuptools plugin for Rust extensions")
22186 (description
22187 "@code{setuptools-rust} is a plugin for @code{setuptools} to build
22188 Rust Python extensions implemented with @code{PyO3} or @code{rust-cpython}.")
22189 (license license:expat)))
22190
22191 (define-public python-pyclipper
22192 (package
22193 (name "python-pyclipper")
22194 (version "1.1.0.post3")
22195 (source
22196 (origin
22197 (method url-fetch)
22198 (uri (pypi-uri "pyclipper" version ".zip"))
22199 (sha256
22200 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
22201 (modules '((guix build utils)))
22202 (snippet
22203 '(begin
22204 ;; This file is generated by Cython.
22205 (delete-file "pyclipper/pyclipper.cpp") #t))))
22206 (build-system python-build-system)
22207 (arguments
22208 `(#:phases
22209 (modify-phases %standard-phases
22210 (add-before 'build 'cythonize-sources
22211 (lambda _
22212 (with-directory-excursion "pyclipper"
22213 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
22214 (propagated-inputs
22215 (list python-setuptools-scm-git-archive))
22216 (native-inputs
22217 (list python-cython python-pytest python-pytest-runner
22218 python-unittest2 unzip))
22219 (home-page "https://github.com/greginvm/pyclipper")
22220 (synopsis "Wrapper for Angus Johnson's Clipper library")
22221 (description
22222 "Pyclipper is a Cython wrapper for the C++ translation of the
22223 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
22224 (license license:expat)))
22225
22226 (define-public python2-pyclipper
22227 (package-with-python2 python-pyclipper))
22228
22229 (define-public python2-booleanoperations
22230 (package
22231 (name "python2-booleanoperations")
22232 (version "0.7.1")
22233 (source
22234 (origin
22235 (method url-fetch)
22236 (uri (pypi-uri "booleanOperations" version ".zip"))
22237 (sha256
22238 (base32
22239 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
22240 (build-system python-build-system)
22241 (arguments
22242 `(#:python ,python-2))
22243 (native-inputs
22244 (list unzip python2-pytest python2-pytest-runner))
22245 (propagated-inputs
22246 (list python2-fonttools python2-pyclipper python2-ufolib))
22247 (home-page "https://github.com/typemytype/booleanOperations")
22248 (synopsis "Boolean operations on paths")
22249 (description
22250 "BooleanOperations provides a Python library that enables
22251 boolean operations on paths.")
22252 (license license:expat)))
22253
22254 (define-public python-tempdir
22255 (package
22256 (name "python-tempdir")
22257 (version "0.7.1")
22258 (source
22259 (origin
22260 (method url-fetch)
22261 (uri (pypi-uri "tempdir" version))
22262 (sha256
22263 (base32
22264 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
22265 (build-system python-build-system)
22266 (home-page "https://pypi.org/project/tempdir/")
22267 (arguments
22268 ;; the package has no tests
22269 '(#:tests? #f))
22270 (synopsis "Python library for managing temporary directories")
22271 (description
22272 "This library manages temporary directories that are automatically
22273 deleted with all their contents when they are no longer needed. It is
22274 particularly convenient for use in tests.")
22275 (license license:expat)))
22276
22277 (define-public python2-tempdir
22278 (package-with-python2 python-tempdir))
22279
22280 (define-public python-tempora
22281 (package
22282 (name "python-tempora")
22283 (version "5.0.1")
22284 (source
22285 (origin
22286 (method url-fetch)
22287 (uri (pypi-uri "tempora" version))
22288 (sha256
22289 (base32 "09wirlk5vmxlhl9rnxp7g5qz2nsd6b0gnzk5fczbz0s8lsbz386b"))))
22290 (build-system python-build-system)
22291 (arguments
22292 (list
22293 #:phases
22294 #~(modify-phases %standard-phases
22295 ;; XXX: PEP 517 manual build copied from python-isort.
22296 (replace 'build
22297 (lambda _
22298 (setenv "SOURCE_DATE_EPOCH" "315532800")
22299 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
22300 (replace 'install
22301 (lambda _
22302 (let ((whl (car (find-files "dist" "\\.whl$"))))
22303 (invoke "pip" "--no-cache-dir" "--no-input"
22304 "install" "--no-deps" "--prefix" #$output whl))))
22305 (replace 'check
22306 (lambda* (#:key tests? #:allow-other-keys)
22307 (when tests?
22308 ;; Do not test the myproject.toml build as it tries to pull
22309 ;; dependencies from the Internet.
22310 (invoke "pytest" "-k" "not project")))))))
22311 (native-inputs
22312 (list python-pypa-build
22313 python-freezegun
22314 python-pytest
22315 python-pytest-black
22316 python-pytest-checkdocs
22317 python-pytest-cov
22318 python-pytest-enabler
22319 python-pytest-flake8
22320 python-pytest-freezegun
22321 python-pytest-mypy
22322 python-setuptools-scm
22323 python-types-freezegun
22324 python-types-pytz))
22325 (propagated-inputs (list python-jaraco-functools python-pytz))
22326 (home-page "https://github.com/jaraco/tempora")
22327 (synopsis "Python date and time objects and routines")
22328 (description "The @code{tempora} Python library contains miscellaneous
22329 date and time related utilities and constants, routines for measuring,
22330 profiling, and getting datetime-aware @acronym{UTC, Coordinated Universal
22331 Time} values as well as an event scheduler.")
22332 (license license:expat)))
22333
22334 (define-public python-activepapers
22335 (package
22336 (name "python-activepapers")
22337 (version "0.2.2")
22338 (source
22339 (origin
22340 (method url-fetch)
22341 (uri (pypi-uri "ActivePapers.Py" version))
22342 (sha256
22343 (base32
22344 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
22345 (build-system python-build-system)
22346 (arguments
22347 `(#:modules ((ice-9 ftw)
22348 (srfi srfi-1)
22349 (guix build utils)
22350 (guix build python-build-system))
22351
22352 #:phases
22353 (modify-phases %standard-phases
22354 (add-after 'unpack 'delete-python2-code
22355 (lambda _
22356 (for-each delete-file
22357 '("lib/activepapers/builtins2.py"
22358 "lib/activepapers/standardlib2.py"
22359 "lib/activepapers/utility2.py"))))
22360 (replace 'check
22361 (lambda _
22362 ;; Deactivate the test cases that download files
22363 (setenv "NO_NETWORK_ACCESS" "1")
22364 ;; For some strange reason, some tests fail if nosetests runs all
22365 ;; test modules in a single execution. They pass if each test
22366 ;; module is run individually.
22367 (for-each (lambda (filename)
22368 (invoke "nosetests"
22369 (string-append "tests/" filename)))
22370 (scandir "tests"
22371 (lambda (filename)
22372 (string-suffix? ".py" filename)))))))))
22373 (native-inputs
22374 (list python-tempdir python-nose))
22375 (propagated-inputs
22376 (list python-h5py))
22377 (home-page "https://www.activepapers.org/")
22378 (synopsis "Executable papers for scientific computing")
22379 (description
22380 "ActivePapers is a tool for working with executable papers, which
22381 combine data, code, and documentation in single-file packages,
22382 suitable for publication as supplementary material or on repositories
22383 such as figshare or Zenodo.")
22384 (properties `((python2-variant . ,(delay python2-activepapers))))
22385 (license license:bsd-3)))
22386
22387 (define-public python2-activepapers
22388 (let ((base (package-with-python2
22389 (strip-python2-variant python-activepapers))))
22390 (package/inherit base
22391 (arguments
22392 (substitute-keyword-arguments (package-arguments base)
22393 ((#:phases phases)
22394 `(modify-phases ,phases
22395 (delete 'delete-python2-code)
22396 (add-after 'unpack 'delete-python3-code
22397 (lambda _
22398 (for-each delete-file
22399 '("lib/activepapers/builtins3.py"
22400 "lib/activepapers/standardlib3.py"
22401 "lib/activepapers/utility3.py")))))))))))
22402
22403 (define-public python-semver
22404 (package
22405 (name "python-semver")
22406 (version "2.9.0")
22407 (source
22408 (origin
22409 (method url-fetch)
22410 (uri (pypi-uri "semver" version))
22411 (sha256
22412 (base32
22413 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
22414 (build-system python-build-system)
22415 (arguments
22416 `(#:phases (modify-phases %standard-phases
22417 (replace 'check
22418 (lambda _
22419 (delete-file "setup.cfg")
22420 (invoke "py.test"))))))
22421 (native-inputs
22422 (list python-pytest))
22423 (home-page "https://github.com/k-bx/python-semver")
22424 (synopsis "Python helper for Semantic Versioning")
22425 (description "This package provides a Python library for
22426 @url{Semantic Versioning, http://semver.org/}.")
22427 (license license:bsd-3)))
22428
22429 (define-public python2-semver
22430 (package-with-python2 python-semver))
22431
22432 (define-public python-pyro4
22433 (package
22434 (name "python-pyro4")
22435 (version "4.77")
22436 (source
22437 (origin
22438 (method url-fetch)
22439 (uri (pypi-uri "Pyro4" version))
22440 (sha256
22441 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
22442 (build-system python-build-system)
22443 (arguments
22444 '(#:tests? #f)) ;FIXME: Some tests require network access.
22445 (native-inputs
22446 (list python-cloudpickle python-dill python-msgpack))
22447 (propagated-inputs
22448 (list python-serpent))
22449 (home-page "https://pyro4.readthedocs.io")
22450 (synopsis "Distributed object middleware for Python")
22451 (description
22452 "Pyro enables you to build applications in which objects can talk to each
22453 other over the network. You can just use normal Python method calls to call
22454 objects on other machines, also known as remote procedure calls (RPC).")
22455 (license license:expat)))
22456
22457 (define-public python2-pyro
22458 (package
22459 (name "python2-pyro")
22460 (version "3.16")
22461 (source
22462 (origin
22463 (method url-fetch)
22464 (uri (pypi-uri "Pyro" version))
22465 (file-name (string-append "Pyro-" version ".tar.gz"))
22466 (sha256
22467 (base32
22468 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
22469 (build-system python-build-system)
22470 (arguments
22471 ;; Pyro is not compatible with Python 3
22472 `(#:python ,python-2
22473 ;; Pyro has no test cases for automatic execution
22474 #:tests? #f))
22475 (home-page "https://pythonhosted.org/Pyro/")
22476 (synopsis "Distributed object manager for Python")
22477 (description "Pyro is a Distributed Object Technology system
22478 written in Python that is designed to be easy to use. It resembles
22479 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
22480 which is a system and language independent Distributed Object Technology
22481 and has much more to offer than Pyro or RMI. Pyro 3.x is no
22482 longer maintained. New projects should use Pyro4 instead, which
22483 is the new Pyro version that is actively developed.")
22484 (license license:expat)))
22485
22486 (define-public python2-scientific
22487 (package
22488 (name "python2-scientific")
22489 (version "2.9.4")
22490 (source
22491 (origin
22492 (method git-fetch)
22493 (uri (git-reference
22494 (url "https://github.com/khinsen/ScientificPython")
22495 (commit (string-append "rel" version))))
22496 (file-name (git-file-name name version))
22497 (sha256
22498 (base32
22499 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
22500 (build-system python-build-system)
22501 (inputs
22502 (list netcdf))
22503 (propagated-inputs
22504 (list python2-numpy-1.8 python2-pyro))
22505 (arguments
22506 ;; ScientificPython is not compatible with Python 3
22507 `(#:python ,python-2
22508 #:tests? #f ; No test suite
22509 #:phases
22510 (modify-phases %standard-phases
22511 (replace 'build
22512 (lambda* (#:key inputs #:allow-other-keys)
22513 (invoke "python" "setup.py" "build"
22514 (string-append "--netcdf_prefix="
22515 (assoc-ref inputs "netcdf"))))))))
22516 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
22517 (synopsis "Python modules for scientific computing")
22518 (description "ScientificPython is a collection of Python modules that are
22519 useful for scientific computing. Most modules are rather general (Geometry,
22520 physical units, automatic derivatives, ...) whereas others are more
22521 domain-specific (e.g. netCDF and PDB support). The library is currently
22522 not actively maintained and works only with Python 2 and NumPy < 1.9.")
22523 (license license:cecill-c)))
22524
22525 (define-public python2-mmtk
22526 (package
22527 (name "python2-mmtk")
22528 (version "2.7.12")
22529 (source
22530 (origin
22531 (method git-fetch)
22532 (uri (git-reference
22533 (url "https://github.com/khinsen/MMTK")
22534 (commit (string-append "rel" version))))
22535 (file-name (git-file-name name version))
22536 (sha256
22537 (base32
22538 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
22539 (build-system python-build-system)
22540 (native-inputs
22541 (list netcdf))
22542 (propagated-inputs
22543 `(("python-scientific" ,python2-scientific)
22544 ("python-tkinter" ,python-2 "tk")))
22545 (arguments
22546 `(#:python ,python-2
22547 #:tests? #f
22548 #:phases
22549 (modify-phases %standard-phases
22550 (add-before 'build 'includes-from-scientific
22551 (lambda* (#:key inputs #:allow-other-keys)
22552 (mkdir-p "Include/Scientific")
22553 (copy-recursively
22554 (string-append
22555 (assoc-ref inputs "python-scientific")
22556 "/include/python2.7/Scientific")
22557 "Include/Scientific"))))))
22558 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
22559 (synopsis "Python library for molecular simulation")
22560 (description "MMTK is a library for molecular simulations with an emphasis
22561 on biomolecules. It provides widely used methods such as Molecular Dynamics
22562 and normal mode analysis, but also basic routines for implementing new methods
22563 for simulation and analysis. The library is currently not actively maintained
22564 and works only with Python 2 and NumPy < 1.9.")
22565 (license license:cecill-c)))
22566
22567 (define-public python-phonenumbers
22568 (package
22569 (name "python-phonenumbers")
22570 (version "8.9.1")
22571 (source
22572 (origin
22573 (method url-fetch)
22574 (uri (pypi-uri "phonenumbers" version))
22575 (sha256
22576 (base32
22577 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
22578 (build-system python-build-system)
22579 (home-page
22580 "https://github.com/daviddrysdale/python-phonenumbers")
22581 (synopsis
22582 "Python library for dealing with international phone numbers")
22583 (description
22584 "This package provides a Python port of Google's libphonenumber library.")
22585 (license license:asl2.0)))
22586
22587 (define-public python2-phonenumbers
22588 (package-with-python2 python-phonenumbers))
22589
22590 (define-public python-heapdict
22591 (package
22592 (name "python-heapdict")
22593 (version "1.0.1")
22594 (source
22595 (origin
22596 (method url-fetch)
22597 (uri (pypi-uri "HeapDict" version))
22598 (sha256
22599 (base32
22600 "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
22601 (build-system python-build-system)
22602 (home-page "http://stutzbachenterprises.com/")
22603 (synopsis "Heap with decrease-key and increase-key operations")
22604 (description
22605 "heapdict implements the MutableMapping ABC, meaning it works pretty much
22606 like a regular Python @code{dict}. It’s designed to be used as a priority
22607 queue.")
22608 (license license:bsd-3)))
22609
22610 (define-public python-zict
22611 (package
22612 (name "python-zict")
22613 (version "2.0.0")
22614 (source
22615 (origin
22616 (method url-fetch)
22617 (uri (pypi-uri "zict" version))
22618 (sha256
22619 (base32
22620 "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
22621 (build-system python-build-system)
22622 (propagated-inputs
22623 (list python-heapdict))
22624 (native-inputs
22625 (list python-pytest))
22626 (home-page "https://zict.readthedocs.io/en/latest/")
22627 (synopsis "Composable mutable mapping tools")
22628 (description "This package provides abstract @code{MutableMapping} classes
22629 that consume and build on other @code{MutableMappings}. Several of these can
22630 be composed with one another to form intuitive interfaces over complex storage
22631 systems policies.")
22632 (license license:bsd-3)))
22633
22634 (define-public python-send2trash
22635 (package
22636 (name "python-send2trash")
22637 (version "1.8.0")
22638 (source
22639 (origin (method git-fetch)
22640 ;; Source tarball on PyPI doesn't include tests.
22641 (uri (git-reference
22642 (url "https://github.com/arsenetar/send2trash")
22643 (commit version)))
22644 (file-name (git-file-name name version))
22645 (sha256
22646 (base32
22647 "1k7dfypaaq4f36fbciaasv72j6wgjihw8d88axmz9c329bz8v5qx"))))
22648 (build-system python-build-system)
22649 (arguments
22650 '(#:phases
22651 (modify-phases %standard-phases
22652 (add-before 'check 'pre-check
22653 (lambda _
22654 (setenv "HOME" "/tmp")))
22655 (replace 'check
22656 (lambda* (#:key tests? #:allow-other-keys)
22657 (when tests?
22658 (invoke "pytest" "-vv")))))))
22659 (native-inputs (list python-pytest))
22660 (home-page "https://github.com/arsenetar/send2trash")
22661 (synopsis "Send files to the user's @file{~/Trash} directory")
22662 (description "This package provides a Python library to send files to the
22663 user's @file{~/Trash} directory.")
22664 (license license:bsd-3)))
22665
22666 (define-public python-pyfavicon
22667 (package
22668 (name "python-pyfavicon")
22669 (version "0.1.1")
22670 (source
22671 (origin
22672 (method url-fetch)
22673 (uri (pypi-uri "pyfavicon" version))
22674 (sha256
22675 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
22676 (build-system python-build-system)
22677 (arguments
22678 ;; There are no tests in the PyPI tarball and the tests from the
22679 ;; repository require online data.
22680 '(#:tests? #f))
22681 (propagated-inputs
22682 (list python-aiohttp python-beautifulsoup4 python-pillow))
22683 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
22684 (synopsis "Async favicon fetcher")
22685 (description
22686 "@code{pyfavicon} is an async favicon fetcher.")
22687 (license license:expat)))
22688
22689 (define-public python-yamllint
22690 (package
22691 (name "python-yamllint")
22692 (version "1.26.1")
22693 (source
22694 (origin
22695 (method url-fetch)
22696 (uri (pypi-uri "yamllint" version))
22697 (sha256
22698 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
22699 (build-system python-build-system)
22700 (propagated-inputs
22701 (list python-pathspec python-pyyaml python-setuptools))
22702 (home-page "https://github.com/adrienverge/yamllint")
22703 (synopsis "Linter for YAML files")
22704 (description
22705 "Yamllint is a linter for YAML files. yamllint does not only check for
22706 syntax validity, but for weirdnesses like key repetition and cosmetic problems
22707 such as lines length, trailing spaces, indentation, etc.")
22708 (license license:gpl3+)))
22709
22710 (define-public python-yapf
22711 (package
22712 (name "python-yapf")
22713 (version "0.29.0")
22714 (source
22715 (origin
22716 (method url-fetch)
22717 (uri (pypi-uri "yapf" version))
22718 (sha256
22719 (base32
22720 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
22721 (build-system python-build-system)
22722 (home-page "https://github.com/google/yapf")
22723 (synopsis "Formatter for Python code")
22724 (description "YAPF is a formatter for Python code. It's based off of
22725 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
22726 takes the code and reformats it to the best formatting that conforms to the
22727 style guide, even if the original code didn't violate the style guide.")
22728 (license license:asl2.0)))
22729
22730 (define-public python2-yapf
22731 (package-with-python2 python-yapf))
22732
22733 (define-public python-yq
22734 (package
22735 (name "python-yq")
22736 (version "2.11.1")
22737 (source
22738 (origin
22739 (method url-fetch)
22740 (uri (pypi-uri "yq" version))
22741 (sha256
22742 (base32
22743 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
22744 (build-system python-build-system)
22745 (arguments
22746 '(#:phases
22747 (modify-phases %standard-phases
22748 (add-after 'unpack 'patch
22749 (lambda* (#:key inputs #:allow-other-keys)
22750 (substitute* "yq/__init__.py"
22751 (("Popen\\(\\[\"jq")
22752 (string-append
22753 "Popen([\""
22754 (assoc-ref inputs "jq")
22755 "/bin/jq")))
22756 #t)))))
22757 (inputs
22758 (list python-argcomplete python-pyyaml python-xmltodict jq))
22759 (native-inputs
22760 (list python-coverage python-flake8 python-wheel))
22761 (home-page "https://github.com/kislyuk/yq")
22762 (synopsis "Command-line YAML/XML processor")
22763 (description
22764 "This package provides @command{yq} and @command{xq} for processing YAML
22765 and XML respectively. The processing is done through @command{jq}, @command{jq}
22766 filters can be used to process the data as it passes through.")
22767 (license license:asl2.0)))
22768
22769 (define-public python-gyp
22770 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
22771 (revision "0"))
22772 (package
22773 (name "python-gyp")
22774 ;; Google does not release versions,
22775 ;; based on second most recent commit date.
22776 (version (git-version "0.0.0" revision commit))
22777 (source
22778 (origin
22779 ;; Google does not release tarballs,
22780 ;; git checkout is needed.
22781 (method git-fetch)
22782 (uri (git-reference
22783 (url "https://chromium.googlesource.com/external/gyp")
22784 (commit commit)))
22785 (file-name (git-file-name name version))
22786 (sha256
22787 (base32
22788 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
22789 (build-system python-build-system)
22790 (home-page "https://gyp.gsrc.io/")
22791 (synopsis "GYP is a Meta-Build system")
22792 (description
22793 "GYP builds build systems for large, cross platform applications.
22794 It can be used to generate XCode projects, Visual Studio projects, Ninja build
22795 files, and Makefiles.")
22796 (license license:bsd-3))))
22797
22798 (define-public python2-gyp
22799 (package-with-python2 python-gyp))
22800
22801 (define-public python-whatever
22802 (package
22803 (name "python-whatever")
22804 (version "0.6")
22805 (source
22806 (origin
22807 (method git-fetch)
22808 (uri (git-reference
22809 (url "https://github.com/Suor/whatever")
22810 (commit version)))
22811 (file-name (git-file-name name version))
22812 (sha256
22813 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
22814 (build-system python-build-system)
22815 (arguments
22816 `(#:phases
22817 (modify-phases %standard-phases
22818 (replace 'check
22819 (lambda _
22820 (invoke "py.test"))))))
22821 (native-inputs
22822 (list python-pytest))
22823 (home-page "https://github.com/Suor/whatever")
22824 (synopsis "Make anonymous functions by partial application of operators")
22825 (description "@code{whatever} provides an easy way to make anonymous
22826 functions by partial application of operators.")
22827 (license license:bsd-3)))
22828
22829 (define-public python2-whatever
22830 (package-with-python2 python-whatever))
22831
22832 (define-public python-funcy
22833 (package
22834 (name "python-funcy")
22835 (version "1.11")
22836 (source
22837 (origin
22838 (method git-fetch)
22839 (uri (git-reference
22840 (url "https://github.com/Suor/funcy")
22841 (commit version)))
22842 (sha256
22843 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
22844 (file-name (git-file-name name version))))
22845 (build-system python-build-system)
22846 (arguments
22847 `(#:phases
22848 (modify-phases %standard-phases
22849 (replace 'check
22850 (lambda _
22851 (invoke "py.test"))))))
22852 (native-inputs
22853 (list python-pytest python-whatever))
22854 (home-page "https://github.com/Suor/funcy")
22855 (synopsis "Functional tools")
22856 (description "@code{funcy} is a library that provides functional tools.
22857 Examples are:
22858 @enumerate
22859 @item merge - Merges collections of the same type
22860 @item walk - Type-preserving map
22861 @item select - Selects a part of a collection
22862 @item take - Takes the first n items of a collection
22863 @item first - Takes the first item of a collection
22864 @item remove - Predicated-removes items of a collection
22865 @item concat - Concatenates two collections
22866 @item flatten - Flattens a collection with subcollections
22867 @item distinct - Returns only distinct items
22868 @item split - Predicated-splits a collection
22869 @item split_at - Splits a collection at a given item
22870 @item group_by - Groups items by group
22871 @item pairwise - Pairs off adjacent items
22872 @item partial - Partially-applies a function
22873 @item curry - Curries a function
22874 @item compose - Composes functions
22875 @item complement - Complements a predicate
22876 @item all_fn - \"all\" with predicate
22877 @end enumerate")
22878 (license license:bsd-3)))
22879
22880 (define-public python2-funcy
22881 (package-with-python2 python-funcy))
22882
22883 (define-public python-isoweek
22884 (package
22885 (name "python-isoweek")
22886 (version "1.3.3")
22887 (source
22888 (origin
22889 (method url-fetch)
22890 (uri (pypi-uri "isoweek" version))
22891 (sha256
22892 (base32
22893 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
22894 (build-system python-build-system)
22895 (home-page "https://github.com/gisle/isoweek")
22896 (synopsis "Objects representing a week")
22897 (description "The @code{isoweek} module provide the class Week that
22898 implements the week definition of ISO 8601. This standard also defines
22899 a notation for identifying weeks; yyyyWww (where the W is a literal).
22900 Week instances stringify to this form.")
22901 (license license:bsd-3)))
22902
22903 (define-public python2-isoweek
22904 (package-with-python2 python-isoweek))
22905
22906 (define-public python-pyzbar
22907 (package
22908 (name "python-pyzbar")
22909 (version "0.1.8")
22910 (source
22911 (origin
22912 ;; There's no source tarball on PyPI.
22913 (method git-fetch)
22914 (uri (git-reference
22915 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
22916 (commit (string-append "v" version))))
22917 (file-name (git-file-name name version))
22918 (sha256
22919 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
22920 (build-system python-build-system)
22921 (arguments
22922 `(#:phases
22923 (modify-phases %standard-phases
22924 (add-after 'unpack 'remove-failing-test
22925 (lambda _
22926 ;; This tests if find_library was called once, but we remove
22927 ;; the call in the stage below to make the library find libzbar.
22928 (delete-file "pyzbar/tests/test_zbar_library.py")
22929 #t))
22930 (add-before 'build 'set-library-file-name
22931 (lambda* (#:key inputs #:allow-other-keys)
22932 (let ((libzbar (assoc-ref inputs "zbar")))
22933 (substitute* "pyzbar/zbar_library.py"
22934 (("find_library\\('zbar'\\)")
22935 (string-append "'" libzbar "/lib/libzbar.so.0'")))
22936 #t))))))
22937 (native-inputs
22938 (list pkg-config python-numpy python-pillow))
22939 (inputs
22940 (list zbar))
22941 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
22942 (synopsis "Read one-dimensional barcodes and QR codes")
22943 (description
22944 "Read one-dimensional barcodes and QR codes using the zbar library.
22945
22946 Features:
22947
22948 @itemize
22949 @item Pure python
22950 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
22951 @item Decodes locations of barcodes
22952 @item No dependencies, other than the zbar library itself
22953 @end itemize")
22954 (license license:expat)))
22955
22956 (define-public python-tokenize-rt
22957 (package
22958 (name "python-tokenize-rt")
22959 (version "2.0.1")
22960 (source
22961 (origin
22962 (method url-fetch)
22963 (uri (pypi-uri "tokenize-rt" version))
22964 (sha256
22965 (base32
22966 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
22967 (build-system python-build-system)
22968 (home-page "https://github.com/asottile/tokenize-rt")
22969 (synopsis "Wrapper around the stdlib tokenize which roundtrips")
22970 (description
22971 "This Python library is a wrapper around @code{tokenize} from the Python
22972 standard library. It provides two additional tokens @code{ESCAPED_NL} and
22973 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
22974 and @code{tokens_to_src} to roundtrip.")
22975 (license license:expat)))
22976
22977 (define-public python-future-fstrings
22978 (package
22979 (name "python-future-fstrings")
22980 (version "0.4.1")
22981 (source
22982 (origin
22983 (method url-fetch)
22984 (uri (pypi-uri "future_fstrings" version))
22985 (sha256
22986 (base32
22987 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
22988 (build-system python-build-system)
22989 (propagated-inputs
22990 (list python-tokenize-rt))
22991 (home-page "https://github.com/asottile/future-fstrings")
22992 (synopsis "Backport of fstrings to Python < 3.6")
22993 (description
22994 "This package provides a UTF-8 compatible encoding
22995 @code{future_fstrings}, which performs source manipulation. It decodes the
22996 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
22997 @code{f} strings.")
22998 (license license:expat)))
22999
23000 (define-public python-typed-ast
23001 (package
23002 (name "python-typed-ast")
23003 (version "1.5.1")
23004 (source
23005 (origin
23006 (method git-fetch)
23007 (uri (git-reference
23008 (url "https://github.com/python/typed_ast")
23009 (commit version)))
23010 (sha256
23011 (base32 "1xfcs5246c8v5600aaa8zs7ii4sxb62q6r3sb2fgazyjx97wrxd9"))
23012 (file-name (git-file-name name version))))
23013 (build-system python-build-system)
23014 (arguments
23015 `(#:phases
23016 (modify-phases %standard-phases
23017 (replace 'check
23018 (lambda _
23019 (invoke "pytest"))))))
23020 (native-inputs (list python-pytest))
23021 (home-page "https://github.com/python/typed_ast")
23022 (synopsis "Fork of Python @code{ast} modules with type comment support")
23023 (description "This package provides a parser similar to the standard
23024 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
23025 include PEP 484 type comments and are independent of the version of Python
23026 under which they are run. The @code{typed_ast} parsers produce the standard
23027 Python AST (plus type comments), and are both fast and correct, as they are
23028 based on the CPython 2.7 and 3.7 parsers.")
23029 ;; See the file "LICENSE" for the details.
23030 (license (list license:psfl
23031 license:asl2.0
23032 license:expat)))) ;ast27/Parser/spark.py
23033
23034 (define-public python-typer
23035 (package
23036 (name "python-typer")
23037 (version "0.3.2")
23038 (source
23039 (origin
23040 ;; Building `python-typer` from the git repository requires the `flit-core`
23041 ;; Python package that is not installed by `python-flit`.
23042 (method url-fetch)
23043 (uri (pypi-uri "typer" version))
23044 (sha256
23045 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
23046 (build-system python-build-system)
23047 (arguments
23048 `(#:phases
23049 (modify-phases %standard-phases
23050 ;; Unfortunately, this doesn't seem to be enough to fix these two
23051 ;; tests, but we'll patch this anyway.
23052 (add-after 'unpack 'patch-shell-reference
23053 (lambda _
23054 (substitute* "tests/test_completion/test_completion.py"
23055 (("\"bash\"") (string-append "\"" (which "bash") "\""))
23056 (("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
23057 (replace 'check
23058 (lambda* (#:key tests? #:allow-other-keys)
23059 (when tests?
23060 (setenv "HOME" "/tmp") ; some tests need it
23061
23062 ;; This is for completion tests
23063 (with-output-to-file "/tmp/.bashrc" (lambda _ (display "# dummy")))
23064
23065 (setenv "GUIX_PYTHONPATH"
23066 (string-append (getcwd) ":"
23067 (getenv "GUIX_PYTHONPATH")))
23068 (let ((disabled-tests (list "test_show_completion"
23069 "test_install_completion")))
23070 (invoke "python" "-m" "pytest" "tests/"
23071 "-k"
23072 (string-append "not "
23073 (string-join disabled-tests
23074 " and not "))))))))))
23075 (propagated-inputs
23076 (list python-click))
23077 (native-inputs
23078 (list python-coverage python-pytest python-shellingham))
23079 (home-page "https://github.com/tiangolo/typer")
23080 (synopsis
23081 "Typer builds CLI based on Python type hints")
23082 (description
23083 "Typer is a library for building CLI applications. It's based on
23084 Python 3.6+ type hints.")
23085 ;; MIT license
23086 (license license:expat)))
23087
23088 (define-public python-typeguard
23089 (package
23090 (name "python-typeguard")
23091 (version "2.13.3")
23092 (source
23093 (origin
23094 (method url-fetch)
23095 (uri (pypi-uri "typeguard" version))
23096 (sha256
23097 (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))))
23098 (build-system python-build-system)
23099 (arguments
23100 (list
23101 #:phases
23102 #~(modify-phases %standard-phases
23103 (replace 'check
23104 (lambda* (#:key tests? #:allow-other-keys)
23105 (when tests?
23106 (invoke "pytest" "-vv" "-k"
23107 ;; XXX: These fail when installed as a library:
23108 ;; https://github.com/agronholm/typeguard/issues/176
23109 "not usefixtures and not test_cached_module")))))))
23110 (native-inputs
23111 (list python-mypy python-pytest python-typing-extensions))
23112 (home-page "https://github.com/agronholm/typeguard")
23113 (synopsis "Run-time type checker for Python")
23114 (description
23115 "@code{typeguard} provides run-time type checking for functions defined
23116 with PEP 484 argument (and return) type annotations.")
23117 (license license:expat)))
23118
23119 (define-public python2-typing
23120 (package
23121 (name "python2-typing")
23122 (version "3.10.0.0")
23123 (source
23124 (origin
23125 (method url-fetch)
23126 (uri (pypi-uri "typing" version))
23127 (sha256
23128 (base32 "0c5il4d68fd4qrm5k3dps70j0xz0n5krj6lhwn9vzpal3whsvd0k"))))
23129 (build-system python-build-system)
23130 (arguments (list #:python python-2))
23131 (home-page "https://docs.python.org/3/library/typing.html")
23132 (synopsis "Type hints for Python")
23133 (description "This is a backport of the standard library @code{typing}
23134 module to Python versions older than 3.5. Typing defines a standard notation
23135 for Python function and variable type annotations. The notation can be used
23136 for documenting code in a concise, standard format, and it has been designed
23137 to also be used by static and runtime type checkers, static analyzers, IDEs
23138 and other tools.")
23139 (license license:psfl)))
23140
23141 (define-public python-typing-extensions
23142 (package
23143 (name "python-typing-extensions")
23144 (version "4.0.1")
23145 (source (origin
23146 ;; The test script is missing from the PyPI archive.
23147 (method git-fetch)
23148 (uri (git-reference
23149 (url "https://github.com/python/typing")
23150 (commit version)))
23151 (file-name (git-file-name name version))
23152 (sha256
23153 (base32
23154 "0a35fh5wk9s538x0w3dz95y0avnhd2srzyv9s1a372711n8hdl4p"))))
23155 (build-system python-build-system)
23156 (arguments
23157 (list
23158 #:tests? #f ;requires Python's test module, not available in Guix
23159 #:phases
23160 #~(modify-phases %standard-phases
23161 (add-after 'unpack 'enter-source-directory
23162 (lambda _
23163 (chdir "typing_extensions")))
23164 ;; XXX: PEP 517 manual build copied from python-isort.
23165 (replace 'build
23166 (lambda _
23167 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
23168 (replace 'check
23169 (lambda* (#:key tests? #:allow-other-keys)
23170 (when tests?
23171 (invoke "python" "src/test_typing_extensions.py"))))
23172 (replace 'install
23173 (lambda _
23174 (let ((whl (car (find-files "dist" "\\.whl$"))))
23175 (invoke "pip" "--no-cache-dir" "--no-input"
23176 "install" "--no-deps" "--prefix" #$output whl)))))))
23177 (native-inputs (list python-pypa-build python-flit-core))
23178 (home-page "https://github.com/python/typing/typing_extensions")
23179 (synopsis "Experimental type hints for Python")
23180 (description
23181 "The typing_extensions module contains additional @code{typing} hints not
23182 yet present in the of the @code{typing} standard library.
23183 Included are implementations of:
23184 @enumerate
23185 @item ClassVar
23186 @item ContextManager
23187 @item Counter
23188 @item DefaultDict
23189 @item Deque
23190 @item NewType
23191 @item NoReturn
23192 @item overload
23193 @item Protocol
23194 @item runtime
23195 @item Text
23196 @item Type
23197 @item TYPE_CHECKING
23198 @item AsyncGenerator
23199 @end enumerate\n")
23200 (license license:psfl)))
23201
23202 (define-public bpython
23203 (package
23204 (name "bpython")
23205 (version "0.21")
23206 (source
23207 (origin
23208 (method url-fetch)
23209 (uri (pypi-uri "bpython" version))
23210 (sha256
23211 (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
23212 (build-system python-build-system)
23213 (arguments
23214 `(#:phases
23215 (modify-phases %standard-phases
23216 (add-after 'unpack 'remove-failing-test
23217 (lambda _
23218 ;; Remove failing test. FIXME: make it pass
23219 (delete-file "bpython/test/test_args.py")
23220 #t))
23221 (add-after 'wrap 'add-aliases
23222 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
23223 (lambda* (#:key outputs #:allow-other-keys)
23224 (let ((out (assoc-ref outputs "out")))
23225 (for-each
23226 (lambda (old new)
23227 (symlink old (string-append out "/bin/" new)))
23228 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
23229 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
23230 #t)))))
23231 (propagated-inputs
23232 (list python-pygments
23233 python-requests
23234 python-curtsies
23235 python-greenlet
23236 python-six
23237 python-cwcwidth
23238 python-pyxdg
23239 ;; optional dependencies
23240 python-urwid ; for bpython-urwid only
23241 python-watchdog
23242 python-jedi))
23243 (native-inputs
23244 (list python-sphinx python-mock python-tox python-wheel))
23245 (home-page "https://bpython-interpreter.org/")
23246 (synopsis "Fancy interface to the Python interpreter")
23247 (description "Bpython is a fancy interface to the Python
23248 interpreter. bpython's main features are
23249
23250 @enumerate
23251 @item in-line syntax highlighting,
23252 @item readline-like autocomplete with suggestions displayed as you type,
23253 @item expected parameter list for any Python function,
23254 @item \"rewind\" function to pop the last line of code from memory and
23255 re-evaluate,
23256 @item send the code you've entered off to a pastebin,
23257 @item save the code you've entered to a file, and
23258 @item auto-indentation.
23259 @end enumerate")
23260 (license license:expat)))
23261
23262 (define-public python-pyinotify
23263 (package
23264 (name "python-pyinotify")
23265 (version "0.9.6")
23266 (source (origin
23267 (method url-fetch)
23268 (uri (pypi-uri "pyinotify" version))
23269 (sha256
23270 (base32
23271 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
23272 (build-system python-build-system)
23273 (arguments `(#:tests? #f)) ;no tests
23274 (home-page "https://github.com/seb-m/pyinotify")
23275 (synopsis "Python library for monitoring inotify events")
23276 (description
23277 "@code{pyinotify} provides a Python interface for monitoring
23278 file system events on Linux.")
23279 (license license:expat)))
23280
23281 (define-public python2-pyinotify
23282 (package-with-python2 python-pyinotify))
23283
23284 ;; Ada parser uses this version.
23285 (define-public python2-quex-0.67.3
23286 (package
23287 (name "python2-quex")
23288 (version "0.67.3")
23289 (source
23290 (origin
23291 (method url-fetch)
23292 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
23293 (version-major+minor version)
23294 "/quex-" version ".zip"))
23295 (sha256
23296 (base32
23297 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
23298 (build-system python-build-system)
23299 (native-inputs
23300 (list unzip))
23301 (arguments
23302 `(#:python ,python-2
23303 #:tests? #f
23304 #:phases
23305 (modify-phases %standard-phases
23306 (delete 'configure)
23307 (delete 'build)
23308 (replace 'install
23309 (lambda* (#:key outputs #:allow-other-keys)
23310 (let* ((out (assoc-ref outputs "out"))
23311 (share/quex (string-append out "/share/quex"))
23312 (bin (string-append out "/bin")))
23313 (copy-recursively "." share/quex)
23314 (mkdir-p bin)
23315 (symlink (string-append share/quex "/quex-exe.py")
23316 (string-append bin "/quex"))
23317 #t))))))
23318 (native-search-paths
23319 (list (search-path-specification
23320 (variable "QUEX_PATH")
23321 (files '("share/quex")))))
23322 (home-page "http://quex.sourceforge.net/")
23323 (synopsis "Lexical analyzer generator in Python")
23324 (description "@code{quex} is a lexical analyzer generator in Python.")
23325 (license license:lgpl2.1+))) ; Non-military
23326
23327 (define-public python2-quex
23328 (package (inherit python2-quex-0.67.3)
23329 (name "python2-quex")
23330 (version "0.68.1")
23331 (source
23332 (origin
23333 (method url-fetch)
23334 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
23335 (sha256
23336 (base32
23337 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
23338 (file-name (string-append name "-" version ".tar.gz"))))))
23339
23340 (define-public python-more-itertools
23341 (package
23342 (name "python-more-itertools")
23343 (version "8.2.0")
23344 (source
23345 (origin
23346 (method url-fetch)
23347 (uri (pypi-uri "more-itertools" version))
23348 (sha256
23349 (base32
23350 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
23351 (build-system python-build-system)
23352 (home-page "https://github.com/erikrose/more-itertools")
23353 (synopsis "More routines for operating on iterables, beyond itertools")
23354 (description "Python's built-in @code{itertools} module implements a
23355 number of iterator building blocks inspired by constructs from APL, Haskell,
23356 and SML. @code{more-itertools} includes additional building blocks for
23357 working with iterables.")
23358 (properties `((python2-variant . ,(delay python2-more-itertools))))
23359 (license license:expat)))
23360
23361 ;; The 5.x series are the last versions supporting Python 2.7.
23362 (define-public python2-more-itertools
23363 (package
23364 (inherit python-more-itertools)
23365 (name "python2-more-itertools")
23366 (version "5.0.0")
23367 (source (origin
23368 (method url-fetch)
23369 (uri (pypi-uri "more-itertools" version))
23370 (sha256
23371 (base32
23372 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
23373 (arguments
23374 `(#:python ,python-2))
23375 (propagated-inputs
23376 `(("python2-six" ,python2-six-bootstrap)))))
23377
23378 (define-public python-latexcodec
23379 (package
23380 (name "python-latexcodec")
23381 (version "2.0.1")
23382 (source
23383 (origin
23384 (method url-fetch)
23385 (uri (pypi-uri "latexcodec" version))
23386 (sha256
23387 (base32 "16pynfnn8y8xp55yp06i721fccv5dlx9ba6k5bzcwq9j6wf5b8ia"))))
23388 (build-system python-build-system)
23389 (propagated-inputs
23390 (list python-six))
23391 (home-page "https://readthedocs.org/projects/latexcodec/")
23392 (synopsis "Work with LaTeX code in Python")
23393 (description "Lexer and codec to work with LaTeX code in Python.")
23394 (license license:expat)))
23395
23396 (define-public python-pybtex
23397 (package
23398 (name "python-pybtex")
23399 (version "0.24.0")
23400 (source
23401 (origin
23402 (method url-fetch)
23403 (uri (pypi-uri "pybtex" version))
23404 (sha256
23405 (base32 "0ma7sc10hk6caq5zghbk865vrlaynz7x5z630z0facqpnqssx3l1"))))
23406 (build-system python-build-system)
23407 (native-inputs
23408 (list python-pytest))
23409 (propagated-inputs
23410 (list python-latexcodec python-pyyaml python-six))
23411 (arguments
23412 (list
23413 #:phases #~(modify-phases %standard-phases
23414 (replace 'check
23415 (lambda* (#:key tests? #:allow-other-keys)
23416 (when tests?
23417 (invoke "pytest")))))))
23418 (home-page "https://pybtex.org/")
23419 (synopsis "BibTeX-compatible bibliography processor")
23420 (description "Pybtex is a BibTeX-compatible bibliography processor written
23421 in Python. You can simply type pybtex instead of bibtex.")
23422 (license license:expat)))
23423
23424 (define-public python-onetimepass
23425 (package
23426 (name "python-onetimepass")
23427 (version "1.0.1")
23428 (source
23429 (origin
23430 (method url-fetch)
23431 (uri (pypi-uri "onetimepass" version))
23432 (sha256
23433 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
23434 (build-system python-build-system)
23435 (propagated-inputs (list python-six))
23436 (home-page "https://github.com/tadeck/onetimepass/")
23437 (synopsis "One-time password library")
23438 (description "Python one-time password library for HMAC-based (HOTP) and
23439 time-based (TOTP) passwords.")
23440 (license license:expat)))
23441
23442 (define-public python-parso
23443 (package
23444 (name "python-parso")
23445 (version "0.8.2")
23446 (source
23447 (origin
23448 (method url-fetch)
23449 (uri (pypi-uri "parso" version))
23450 (sha256
23451 (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
23452 (native-inputs
23453 (list python-pytest))
23454 (build-system python-build-system)
23455 (arguments
23456 `(#:phases (modify-phases %standard-phases
23457 (replace 'check
23458 (lambda _ (invoke "pytest" "-vv"))))))
23459 (home-page "https://github.com/davidhalter/parso")
23460 (synopsis "Python Parser")
23461 (description "Parso is a Python parser that supports error recovery and
23462 round-trip parsing for different Python versions (in multiple Python versions).
23463 Parso is also able to list multiple syntax errors in your Python file.")
23464 (license license:expat)))
23465
23466 (define-public python2-parso
23467 (package-with-python2 python-parso))
23468
23469 (define-public python-async-generator
23470 (package
23471 (name "python-async-generator")
23472 (version "1.10")
23473 (source
23474 (origin
23475 (method url-fetch)
23476 (uri (pypi-uri "async_generator" version))
23477 (sha256
23478 (base32
23479 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
23480 (build-system python-build-system)
23481 (native-inputs
23482 (list python-pytest))
23483 (home-page "https://github.com/python-trio/async_generator")
23484 (synopsis "Async generators and context managers for Python 3.5+")
23485 (description "@code{async_generator} back-ports Python 3.6's native async
23486 generators and Python 3.7's context managers into Python 3.5.")
23487 ;; Dual licensed.
23488 (license (list license:expat license:asl2.0))))
23489
23490 (define-public python-async-timeout
23491 (package
23492 (name "python-async-timeout")
23493 (version "4.0.2")
23494 (source
23495 (origin
23496 (method url-fetch)
23497 (uri (pypi-uri "async-timeout" version))
23498 (sha256
23499 (base32
23500 "05bbjz16n1a7m1s3lmcwri2x5rc7hnh6f2hdr2lbflnv1mjf2qr1"))))
23501 (build-system python-build-system)
23502 (home-page "https://github.com/aio-libs/async-timeout")
23503 (synopsis "Timeout context manager for asyncio programs")
23504 (description "@code{async-timeout} provides a timeout timeout context
23505 manager compatible with @code{asyncio}.")
23506 (license license:asl2.0)))
23507
23508 (define-public python-glob2
23509 (package
23510 (name "python-glob2")
23511 (version "0.7")
23512 (source
23513 (origin
23514 (method git-fetch)
23515 (uri (git-reference
23516 (url "https://github.com/miracle2k/python-glob2")
23517 (commit (string-append "v" version))))
23518 (file-name (git-file-name name version))
23519 (sha256
23520 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
23521 (build-system python-build-system)
23522 (home-page "https://github.com/miracle2k/python-glob2/")
23523 (synopsis "Extended Version of the python buildin glob module")
23524 (description "This is an extended version of the Python
23525 @url{http://docs.python.org/library/glob.html, built-in glob module} which
23526 adds:
23527
23528 @itemize
23529 @item The ability to capture the text matched by glob patterns, and return
23530 those matches alongside the file names.
23531 @item A recursive @code{**} globbing syntax, akin for example to the
23532 @code{globstar} option of Bash.
23533 @item The ability to replace the file system functions used, in order to glob
23534 on virtual file systems.
23535 @item Compatible with Python 2 and Python 3 (tested with 3.3).
23536 @end itemize
23537
23538 Glob2 currently based on the glob code from Python 3.3.1.")
23539 (license license:bsd-2)))
23540
23541 (define-public python2-glob2
23542 (package-with-python2 python-glob2))
23543
23544 (define-public python-gipc
23545 (package
23546 (name "python-gipc")
23547 (version "0.6.0")
23548 (source
23549 (origin
23550 (method url-fetch)
23551 (uri (pypi-uri "gipc" version ".zip"))
23552 (sha256
23553 (base32
23554 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
23555 (build-system python-build-system)
23556 (native-inputs
23557 (list unzip))
23558 (propagated-inputs
23559 (list python-gevent))
23560 (home-page "https://gehrcke.de/gipc/")
23561 (synopsis "Child process management in the context of gevent")
23562 (description "Usage of Python's multiprocessing package in a
23563 gevent-powered application may raise problems. With @code{gipc},
23564 process-based child processes can safely be created anywhere within a
23565 gevent-powered application.")
23566 (license license:expat)))
23567
23568 (define-public python-beautifultable
23569 (package
23570 (name "python-beautifultable")
23571 (version "1.0.0")
23572 (source
23573 (origin
23574 (method url-fetch)
23575 (uri (pypi-uri "beautifultable" version))
23576 (sha256
23577 (base32
23578 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
23579 (build-system python-build-system)
23580 (propagated-inputs
23581 (list python-wcwidth))
23582 (arguments
23583 `(#:phases
23584 (modify-phases %standard-phases
23585 (add-after 'unpack 'patch-setup.py
23586 (lambda _
23587 (substitute* "setup.py"
23588 (("setup\\(")
23589 "setup(\n test_suite=\"test\",")))))))
23590 (home-page "https://github.com/pri22296/beautifultable")
23591 (synopsis "Print ASCII tables for terminals")
23592 (description "@code{python-beautifultable} provides a class for easily
23593 printing tabular data in a visually appealing ASCII format to a terminal.
23594
23595 Features include, but are not limited to:
23596 @itemize
23597 @item Full customization of the look and feel of the table
23598 @item Row and column accessors.
23599 @item Full support for colors using ANSI sequences or any library.
23600 @item Plenty of predefined styles and option to create custom ones.
23601 @item Support for Unicode characters.
23602 @item Supports streaming table when data is slow to retrieve.
23603 @end itemize")
23604 (license license:expat)))
23605
23606 (define-public python-globber
23607 (package
23608 (name "python-globber")
23609 (version "0.2.1")
23610 (source
23611 (origin
23612 (method git-fetch)
23613 (uri (git-reference
23614 (url "https://github.com/asharov/globber")
23615 (commit version)))
23616 (file-name (git-file-name name version))
23617 (sha256
23618 (base32
23619 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
23620 (build-system python-build-system)
23621 (home-page "https://github.com/asharov/globber")
23622 (synopsis "Library for string matching with glob patterns")
23623 (description
23624 "Globber is a Python library for matching file names against glob patterns.
23625 In contrast to other glob-matching libraries, it matches arbitrary strings and
23626 doesn't require the matched names to be existing files. In addition, it
23627 supports the globstar @code{**} operator to match an arbitrary number of
23628 path components.")
23629 (license license:asl2.0)))
23630
23631 (define-public python-git-hammer
23632 (package
23633 (name "python-git-hammer")
23634 (version "0.3.1")
23635 (source
23636 (origin
23637 (method git-fetch)
23638 (uri (git-reference
23639 (url "https://github.com/asharov/git-hammer")
23640 (commit version)))
23641 (file-name (git-file-name name version))
23642 (sha256
23643 (base32
23644 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
23645 (build-system python-build-system)
23646 (arguments
23647 `(#:phases
23648 (modify-phases %standard-phases
23649 (add-after 'unpack 'patch-setup.py
23650 (lambda _
23651 (substitute* "setup.py"
23652 (("setup\\(")
23653 "setup(\n test_suite=\"test\",")))))))
23654 (propagated-inputs
23655 (list python-beautifultable
23656 python-dateutil
23657 python-gitpython
23658 python-globber
23659 python-matplotlib
23660 python-sqlalchemy
23661 python-sqlalchemy-utils))
23662 (home-page "https://github.com/asharov/git-hammer")
23663 (synopsis "Provide statistics for git repositories")
23664 (description
23665 "Git Hammer is a statistics tool for projects in git repositories.
23666 Its major feature is tracking the number of lines authored by each person for every
23667 commit, but it also includes some other useful statistics.")
23668 (license license:asl2.0)))
23669
23670 (define-public python-fusepy
23671 (package
23672 (name "python-fusepy")
23673 (version "2.0.4")
23674 (source
23675 (origin
23676 (method url-fetch)
23677 (uri (pypi-uri "fusepy" version))
23678 (sha256
23679 (base32
23680 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
23681 (build-system python-build-system)
23682 (arguments
23683 `(#:phases
23684 (modify-phases %standard-phases
23685 (add-before 'build 'set-library-file-name
23686 (lambda* (#:key inputs #:allow-other-keys)
23687 (let ((fuse (assoc-ref inputs "fuse")))
23688 (substitute* "fuse.py"
23689 (("find_library\\('fuse'\\)")
23690 (string-append "'" fuse "/lib/libfuse.so'")))
23691 #t))))))
23692 (propagated-inputs
23693 (list fuse))
23694 (home-page "https://github.com/fusepy/fusepy")
23695 (synopsis "Simple ctypes bindings for FUSE")
23696 (description "Python module that provides a simple interface to FUSE and
23697 MacFUSE. The binding is created using the standard @code{ctypes} library.")
23698 (license license:isc)))
23699
23700 (define-public python2-fusepy
23701 (package-with-python2 python-fusepy))
23702
23703 (define-public python-fusepyng
23704 (package
23705 (name "python-fusepyng")
23706 (version "1.0.7")
23707 (source
23708 (origin
23709 (method url-fetch)
23710 (uri (pypi-uri "fusepyng" version))
23711 (sha256
23712 (base32
23713 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
23714 (build-system python-build-system)
23715 (arguments
23716 '(#:phases
23717 (modify-phases %standard-phases
23718 (add-after 'unpack 'set-libfuse-path
23719 (lambda* (#:key inputs #:allow-other-keys)
23720 (let ((fuse (assoc-ref inputs "fuse")))
23721 (substitute* "fusepyng.py"
23722 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
23723 (string-append "\"" fuse "/lib/libfuse.so\""))))
23724 #t)))))
23725 (inputs
23726 (list fuse))
23727 (propagated-inputs
23728 (list python-paramiko))
23729 (home-page "https://github.com/rianhunter/fusepyng")
23730 (synopsis "Simple ctypes bindings for FUSE")
23731 (description "@code{fusepyng} is a Python module that provides a simple
23732 interface to FUSE on various operating systems. It's just one file and is
23733 implemented using @code{ctypes}.")
23734 (license license:isc)))
23735
23736 (define-public python-update-checker
23737 (package
23738 (name "python-update-checker")
23739 (version "0.18.0")
23740 (source
23741 (origin
23742 (method url-fetch)
23743 (uri (pypi-uri "update-checker" version))
23744 (sha256
23745 (base32 "04yb5a9mi45ax50m2m0ih6gdvkk1j7gfmy83dd58i1f59axlabba"))))
23746 (build-system python-build-system)
23747 (propagated-inputs (list python-requests))
23748 (native-inputs (list python-black python-flake8 python-pytest))
23749 (home-page "https://github.com/bboe/update_checker")
23750 (synopsis "Python module that will check for package updates")
23751 (description "This package provides a Python module that will check for
23752 package updates.")
23753 (license license:bsd-2)))
23754
23755 (define-public python-userspacefs
23756 (package
23757 (name "python-userspacefs")
23758 (version "2.0.4")
23759 (source
23760 (origin
23761 (method url-fetch)
23762 (uri (pypi-uri "userspacefs" version))
23763 (sha256
23764 (base32
23765 "06f2gsiypas270nqfjir4wwjlpkjp097pm6zchc7k20ggg32gv1k"))))
23766 (build-system python-build-system)
23767 (propagated-inputs
23768 (list python-fusepyng))
23769 (home-page "https://github.com/rianhunter/userspacefs")
23770 (synopsis "User-space file systems for Python")
23771 (description
23772 "@code{userspacefs} is a library that allows you to easily write
23773 user-space file systems in Python.")
23774 (license license:gpl3+)))
23775
23776 (define-public python-stone
23777 (package
23778 (name "python-stone")
23779 (version "3.2.1")
23780 (source
23781 (origin
23782 (method url-fetch)
23783 (uri (pypi-uri "stone" version))
23784 (sha256
23785 (base32
23786 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
23787 (build-system python-build-system)
23788 (arguments
23789 `(#:phases
23790 (modify-phases %standard-phases
23791 (add-after 'unpack 'change-version-requirements
23792 (lambda _
23793 ;; Match the requirement in test/requirements.txt
23794 (substitute* "setup.py"
23795 (("pytest < 5") "pytest < 7"))
23796 ;; We don't care about a coverage report.
23797 (substitute* "test/requirements.txt"
23798 (("coverage.*") "coverage\n"))))
23799 (replace 'check
23800 (lambda* (#:key tests? #:allow-other-keys)
23801 (when tests?
23802 ;; These tests don't import currectly.
23803 (delete-file "test/test_js_client.py")
23804 (delete-file "test/test_tsd_types.py")
23805 (delete-file "test/test_python_gen.py")
23806 (invoke "pytest")))))))
23807 (propagated-inputs
23808 (list python-ply python-six))
23809 (native-inputs
23810 (list python-coverage python-mock python-pytest python-pytest-runner))
23811 (home-page "https://github.com/dropbox/stone")
23812 (synopsis "Official Api Spec Language for Dropbox")
23813 (description
23814 "Stone is an interface description language (IDL) for APIs.")
23815 (license license:expat)))
23816
23817 (define-public pybind11
23818 (package
23819 (name "pybind11")
23820 (version "2.8.1")
23821 (source (origin
23822 (method git-fetch)
23823 (uri (git-reference
23824 (url "https://github.com/pybind/pybind11")
23825 (commit (string-append "v" version))))
23826 (sha256
23827 (base32
23828 "10hrkrh78sk7k0ydw1ghmp7gvpwmkby0l2s0kf2iaj9sz0vijkhs"))
23829 (file-name (git-file-name name version))))
23830 (build-system cmake-build-system)
23831 (native-inputs
23832 `(("python" ,python-wrapper)
23833
23834 ;; The following dependencies are used for tests.
23835 ("python-pytest" ,python-pytest)
23836 ("catch" ,catch-framework2-1)
23837 ("eigen" ,eigen)))
23838 (arguments
23839 `(#:configure-flags
23840 (list (string-append "-DCATCH_INCLUDE_DIR="
23841 (assoc-ref %build-inputs "catch")
23842 "/include/catch"))
23843
23844 #:phases (modify-phases %standard-phases
23845 (add-after 'install 'install-python
23846 (lambda* (#:key outputs #:allow-other-keys)
23847 (let ((out (assoc-ref outputs "out")))
23848 (with-directory-excursion "../source"
23849 (setenv "PYBIND11_USE_CMAKE" "yes")
23850 (invoke "python" "setup.py" "install"
23851 "--single-version-externally-managed"
23852 "--root=/"
23853 (string-append "--prefix=" out)))))))
23854
23855 #:test-target "check"))
23856 (home-page "https://github.com/pybind/pybind11/")
23857 (synopsis "Seamless operability between C++11 and Python")
23858 (description
23859 "@code{pybind11} is a lightweight header-only library that exposes C++
23860 types in Python and vice versa, mainly to create Python bindings of existing
23861 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
23862 library: to minimize boilerplate code in traditional extension modules by
23863 inferring type information using compile-time introspection.")
23864 (license license:bsd-3)))
23865
23866 (define-public python-pooch
23867 (package
23868 (name "python-pooch")
23869 (version "1.3.0")
23870 (source
23871 (origin
23872 (method url-fetch)
23873 (uri (pypi-uri "pooch" version))
23874 (sha256
23875 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
23876 (build-system python-build-system)
23877 (arguments
23878 `(#:tests? #f)) ;requires online data
23879 (propagated-inputs
23880 (list python-appdirs python-packaging python-requests))
23881 (home-page "https://github.com/fatiando/pooch")
23882 (synopsis "Manage your Python library's sample data files")
23883 (description
23884 "Pooch manages your Python library's sample data files: it automatically
23885 downloads and stores them in a local directory, with support for versioning
23886 and corruption checks.")
23887 (license license:bsd-3)))
23888
23889 (define-public python-fasteners
23890 (package
23891 (name "python-fasteners")
23892 (version "0.15")
23893 (source
23894 (origin
23895 (method url-fetch)
23896 (uri (pypi-uri "fasteners" version))
23897 (sha256
23898 (base32
23899 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
23900 (build-system python-build-system)
23901 (propagated-inputs
23902 (list python-monotonic python-six))
23903 (native-inputs
23904 (list python-testtools))
23905 (home-page "https://github.com/harlowja/fasteners")
23906 (synopsis "Python package that provides useful locks")
23907 (description
23908 "This package provides a Python program that provides following locks:
23909
23910 @itemize
23911 @item Locking decorator
23912 @item Reader-writer locks
23913 @item Inter-process locks
23914 @item Generic helpers
23915 @end itemize\n")
23916 (license license:asl2.0)))
23917
23918 (define-public python-requests-file
23919 (package
23920 (name "python-requests-file")
23921 (version "1.4.3")
23922 (source
23923 (origin
23924 (method url-fetch)
23925 (uri (pypi-uri "requests-file" version))
23926 (sha256
23927 (base32
23928 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
23929 (build-system python-build-system)
23930 (propagated-inputs
23931 (list python-requests python-six))
23932 (home-page
23933 "https://github.com/dashea/requests-file")
23934 (synopsis "File transport adapter for Requests")
23935 (description
23936 "Requests-File is a transport adapter for use with the Requests Python
23937 library to allow local file system access via @code{file://} URLs.")
23938 (license license:asl2.0)))
23939
23940 (define-public python2-requests-file
23941 (package-with-python2 python-requests-file))
23942
23943 (define-public python-identify
23944 (package
23945 (name "python-identify")
23946 (version "1.4.25")
23947 (source
23948 (origin
23949 ;; There are no tests in the PyPI tarball.
23950 (method git-fetch)
23951 (uri (git-reference
23952 (url "https://github.com/chriskuehl/identify")
23953 (commit (string-append "v" version))))
23954 (file-name (git-file-name name version))
23955 (sha256
23956 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
23957 (build-system python-build-system)
23958 (arguments
23959 `(#:phases
23960 (modify-phases %standard-phases
23961 ;; system-error "utime" "~A" ("No such file or directory")
23962 (delete 'ensure-no-mtimes-pre-1980)
23963 (replace 'check
23964 (lambda* (#:key tests? #:allow-other-keys)
23965 (when tests?
23966 (invoke "pytest" "-vv")))))))
23967 (native-inputs
23968 (list python-coverage python-pytest))
23969 (propagated-inputs
23970 (list python-editdistance))
23971 (home-page "https://github.com/chriskuehl/identify")
23972 (synopsis "File identification library for Python")
23973 (description
23974 "@code{identify} is a file identification library for Python. Given
23975 a file (or some information about a file), return a set of standardized tags
23976 identifying what the file is.")
23977 (license license:expat)))
23978
23979 (define-public python-tldextract
23980 (package
23981 (name "python-tldextract")
23982 (version "3.3.0")
23983 (source
23984 (origin
23985 (method url-fetch)
23986 (uri (pypi-uri "tldextract" version))
23987 (sha256
23988 (base32
23989 "1wac4yvcpgqjvls770mfx165amvy7gr00nnd2w24bqqwyamj9kdd"))))
23990 (build-system python-build-system)
23991 (native-inputs
23992 (list python-pytest python-responses python-setuptools-scm))
23993 (propagated-inputs
23994 (list python-filelock python-idna python-requests python-requests-file))
23995 (home-page
23996 "https://github.com/john-kurkowski/tldextract")
23997 (synopsis
23998 "Separate the TLD from the registered domain and subdomains of a URL")
23999 (description
24000 "TLDExtract accurately separates the TLD from the registered domain and
24001 subdomains of a URL, using the Public Suffix List. By default, this includes
24002 the public ICANN TLDs and their exceptions. It can optionally support the
24003 Public Suffix List's private domains as well.")
24004 (license license:bsd-3)))
24005
24006 (define-public python2-tldextract
24007 (package-with-python2 python-tldextract))
24008
24009 (define-public python-tldr
24010 (package
24011 (name "python-tldr")
24012 (version "3.1.0")
24013 (source
24014 (origin
24015 ;; There's no test in PyPI.
24016 (method git-fetch)
24017 (uri (git-reference
24018 (url "https://github.com/tldr-pages/tldr-python-client")
24019 (commit version)))
24020 (file-name (git-file-name name version))
24021 (sha256
24022 (base32 "1hxmprqg8c4cvs19n7f80f3y7jj74i8sc2dmq2gdjmsdrb54bbzc"))))
24023 (build-system python-build-system)
24024 (arguments
24025 (list #:phases
24026 #~(modify-phases %standard-phases
24027 (add-after 'build 'build-doc
24028 (lambda _
24029 (invoke "make" "-C" "docs")))
24030 (replace 'check
24031 (lambda* (#:key tests? #:allow-other-keys)
24032 (when tests?
24033 ;; This test fails. It tries to open a network socket.
24034 (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
24035 (native-inputs
24036 (list python-pytest python-pytest-runner python-sphinx-argparse))
24037 (inputs
24038 (list python-argcomplete python-colorama python-termcolor python-shtab))
24039 (home-page "https://github.com/tldr-pages/tldr-python-client")
24040 (synopsis "Python command-line client for tldr pages")
24041 (description "This package provides the @code{tldr} command allowing users
24042 to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
24043 effort to simplify the man pages with practical examples.")
24044 (license license:expat))) ; MIT license
24045
24046 (define-public python-nodeenv
24047 (package
24048 (name "python-nodeenv")
24049 (version "1.4.0")
24050 (source
24051 (origin
24052 ;; There's no tarball in PyPI.
24053 (method git-fetch)
24054 (uri (git-reference
24055 (url "https://github.com/ekalinin/nodeenv")
24056 (commit version)))
24057 (file-name (git-file-name name version))
24058 (sha256
24059 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
24060 (build-system python-build-system)
24061 (arguments
24062 `(#:phases
24063 (modify-phases %standard-phases
24064 (replace 'check
24065 (lambda _
24066 ;; This test fails. It tries to open a network socket.
24067 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
24068 (native-inputs
24069 (list python-coverage python-mock python-pytest))
24070 (home-page "https://ekalinin.github.io/nodeenv/")
24071 (synopsis "Create isolated node.js environments")
24072 (description
24073 "Nodeenv (node.js virtual environment) is a tool to create isolated
24074 node.js environments. It creates an environment that has its own installation
24075 directories, that doesn't share libraries with other node.js virtual
24076 environments.")
24077 (license license:bsd-3)))
24078
24079 (define-public python-pynamecheap
24080 (package
24081 (name "python-pynamecheap")
24082 (version "0.0.3")
24083 (source
24084 (origin
24085 (method url-fetch)
24086 (uri (pypi-uri "PyNamecheap" version))
24087 (sha256
24088 (base32
24089 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
24090 (build-system python-build-system)
24091 (propagated-inputs
24092 (list python-requests))
24093 (home-page
24094 "https://github.com/Bemmu/PyNamecheap")
24095 (synopsis
24096 "Namecheap API client in Python")
24097 (description
24098 "PyNamecheap is a Namecheap API client in Python.")
24099 (license license:expat)))
24100
24101 (define-public python2-pynamecheap
24102 (package-with-python2 python-pynamecheap))
24103
24104 (define-public python-dns-lexicon
24105 (package
24106 (name "python-dns-lexicon")
24107 (version "2.4.0")
24108 (source
24109 (origin
24110 (method url-fetch)
24111 (uri (pypi-uri "dns-lexicon" version))
24112 (sha256
24113 (base32
24114 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
24115 (build-system python-build-system)
24116 (arguments
24117 `(#:tests? #f)) ;requires internet access
24118 (propagated-inputs
24119 (list python-future python-pynamecheap python-requests
24120 python-tldextract python-urllib3))
24121 (home-page "https://github.com/AnalogJ/lexicon")
24122 (synopsis
24123 "Manipulate DNS records on various DNS providers")
24124 (description
24125 "Lexicon provides a way to manipulate DNS records on multiple DNS
24126 providers in a standardized way. It has a CLI but it can also be used as a
24127 Python library. It was designed to be used in automation, specifically with
24128 Let's Encrypt.")
24129 (license license:expat)))
24130
24131 (define-public python2-dns-lexicon
24132 (package-with-python2 python-dns-lexicon))
24133
24134 (define-public python-cfgv
24135 (package
24136 (name "python-cfgv")
24137 (version "3.1.0")
24138 (source
24139 (origin
24140 ;; There are no tests in the PyPI tarball.
24141 (method git-fetch)
24142 (uri (git-reference
24143 (url "https://github.com/asottile/cfgv")
24144 (commit (string-append "v" version))))
24145 (file-name (git-file-name name version))
24146 (sha256
24147 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
24148 (build-system python-build-system)
24149 (arguments
24150 `(#:phases
24151 (modify-phases %standard-phases
24152 (replace 'check
24153 (lambda _
24154 (invoke "pytest" "-vv"))))))
24155 (native-inputs
24156 (list python-covdefaults python-coverage python-pytest))
24157 (home-page "https://github.com/asottile/cfgv")
24158 (synopsis "Configuration validation library")
24159 (description
24160 "This library helps to validate configuration files and produce human
24161 readable error messages.")
24162 (license license:expat)))
24163
24164 (define-public python-commandlines
24165 (package
24166 (name "python-commandlines")
24167 (version "0.4.1")
24168 (source
24169 (origin
24170 (method url-fetch)
24171 (uri (pypi-uri "commandlines" version))
24172 (sha256
24173 (base32
24174 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
24175 (build-system python-build-system)
24176 (home-page "https://github.com/chrissimpkins/commandlines")
24177 (synopsis "Command line argument to object parsing library")
24178 (description
24179 "@code{Commandlines} is a Python library for command line application
24180 development that supports command line argument parsing, command string
24181 validation testing and application logic.")
24182 (license license:expat)))
24183
24184 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
24185 ;; python-numba. They have a very unflexible relationship.
24186 (define-public python-numba
24187 (package
24188 (name "python-numba")
24189 (version "0.55.1")
24190 (source
24191 (origin
24192 (method url-fetch)
24193 (uri (pypi-uri "numba" version))
24194 (sha256
24195 (base32
24196 "18rf8i32m1045zxglvicpgldvzmqdxqvs3dhjd7wilb64sd0ds83"))))
24197 (build-system python-build-system)
24198 (arguments
24199 `(#:phases
24200 (modify-phases %standard-phases
24201 (add-after 'unpack 'disable-proprietary-features
24202 (lambda _
24203 (setenv "NUMBA_DISABLE_HSA" "1")
24204 (setenv "NUMBA_DISABLE_CUDA" "1")))
24205 (add-after 'unpack 'disable-failing-tests
24206 (lambda _
24207 ;; This one test fails because a deprecation warning is printed.
24208 (substitute* "numba/tests/test_import.py"
24209 (("def test_no_accidental_warnings")
24210 "def disabled_test_no_accidental_warnings"))))
24211 (replace 'check
24212 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24213 (when tests?
24214 (add-installed-pythonpath inputs outputs)
24215 ;; Something is wrong with the PYTHONPATH when running the
24216 ;; tests from the build directory, as it complains about not being
24217 ;; able to import certain modules.
24218 (with-directory-excursion "/tmp"
24219 (setenv "HOME" (getcwd))
24220 (invoke "python3" "-m" "numba.runtests" "-v" "-m"))))))))
24221 (propagated-inputs
24222 (list python-llvmlite python-numpy python-singledispatch))
24223 (native-inputs ;for tests
24224 (list python-jinja2 python-pygments))
24225 (home-page "https://numba.pydata.org")
24226 (synopsis "Compile Python code using LLVM")
24227 (description "Numba gives you the power to speed up your applications with
24228 high performance functions written directly in Python. With a few
24229 annotations, array-oriented and math-heavy Python code can be just-in-time
24230 compiled to native machine instructions, similar in performance to C, C++ and
24231 Fortran, without having to switch languages or Python interpreters.
24232
24233 Numba works by generating optimized machine code using the LLVM compiler
24234 infrastructure at import time, runtime, or statically (using the included pycc
24235 tool).")
24236 (license license:bsd-3)))
24237
24238 (define-public python-numcodecs
24239 (package
24240 (name "python-numcodecs")
24241 (version "0.6.4")
24242 (source
24243 (origin
24244 (method url-fetch)
24245 (uri (pypi-uri "numcodecs" version))
24246 (sha256
24247 (base32
24248 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))
24249 (modules '((guix build utils)))
24250 (snippet
24251 '(begin
24252 (delete-file-recursively "c-blosc")
24253 (for-each delete-file '("numcodecs/blosc.c"
24254 "numcodecs/compat_ext.c"
24255 "numcodecs/lz4.c"
24256 "numcodecs/vlen.c"
24257 "numcodecs/zstd.c"))))))
24258 (build-system python-build-system)
24259 (arguments
24260 `(#:tests? #false ; TODO: unclear why numcodecs.* are not found
24261 #:phases
24262 (modify-phases %standard-phases
24263 (add-after 'unpack 'disable-avx2
24264 (lambda _
24265 (setenv "DISABLE_NUMCODECS_AVX2" "1")))
24266 (add-after 'unpack 'unbundle
24267 (lambda _
24268 (substitute* "setup.py"
24269 (("sources=sources \\+ blosc_sources,")
24270 "sources=sources,")
24271 (("extra_compile_args=extra_compile_args")
24272 "extra_compile_args=list(base_compile_args)")
24273 (("'numcodecs.zstd',")
24274 "'numcodecs.zstd', libraries=['zstd'], ")
24275 (("'numcodecs.lz4',")
24276 "'numcodecs.lz4', libraries=['lz4'], ")
24277 (("'numcodecs.blosc',")
24278 "'numcodecs.blosc', libraries=['blosc'], "))))
24279 (replace 'check
24280 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24281 (when tests?
24282 (add-installed-pythonpath inputs outputs)
24283 (invoke "pytest" "-vv")))))))
24284 (inputs
24285 (list c-blosc lz4 zlib
24286 `(,zstd "lib")))
24287 (propagated-inputs
24288 (list python-numpy python-msgpack))
24289 (native-inputs
24290 (list python-cython python-pytest python-setuptools-scm))
24291 (home-page "https://github.com/zarr-developers/numcodecs")
24292 (synopsis "Buffer compression and transformation codecs")
24293 (description
24294 "This Python package provides buffer compression and transformation
24295 codecs for use in data storage and communication applications.")
24296 (license license:expat)))
24297
24298 (define-public python-asciitree
24299 (package
24300 (name "python-asciitree")
24301 (version "0.3.3")
24302 (source
24303 (origin
24304 (method url-fetch)
24305 (uri (pypi-uri "asciitree" version))
24306 (sha256
24307 (base32
24308 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
24309 (build-system python-build-system)
24310 (home-page "https://github.com/mbr/asciitree")
24311 (synopsis "Draws ASCII trees")
24312 (description "This package draws tree structures using characters.")
24313 (license license:expat)))
24314
24315 (define-public python-zarr
24316 (package
24317 (name "python-zarr")
24318 (version "2.4.0")
24319 (source
24320 (origin
24321 (method url-fetch)
24322 (uri (pypi-uri "zarr" version))
24323 (sha256
24324 (base32
24325 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
24326 (build-system python-build-system)
24327 (arguments
24328 `(#:phases
24329 (modify-phases %standard-phases
24330 (add-after 'unpack 'disable-service-tests
24331 (lambda _
24332 (setenv "ZARR_TEST_ABS" "0")
24333 (setenv "ZARR_TEST_MONGO" "0")
24334 (setenv "ZARR_TEST_REDIS" "0")
24335 #t))
24336 (replace 'check
24337 (lambda _
24338 (invoke "pytest" "-vv" "-k" "not lmdb")
24339 #t)))))
24340 (propagated-inputs
24341 (list python-asciitree python-fasteners python-numcodecs
24342 python-numpy))
24343 (native-inputs
24344 (list python-pytest python-setuptools-scm))
24345 (home-page "https://github.com/zarr-developers/zarr-python")
24346 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
24347 (description
24348 "This package provides an implementation of chunked, compressed,
24349 N-dimensional arrays for Python.")
24350 (license license:expat)))
24351
24352 (define-public python-anndata
24353 (package
24354 (name "python-anndata")
24355 (version "0.8.0")
24356 (source
24357 (origin
24358 ;; The tarball from PyPi doesn't include tests.
24359 (method git-fetch)
24360 (uri (git-reference
24361 (url "https://github.com/theislab/anndata")
24362 (commit version)))
24363 (file-name (git-file-name name version))
24364 (sha256
24365 (base32
24366 "0v7npqrg1rdm8jzw22a45c0mqrmsv05r3k88i3lhzi0pzzxca1i1"))))
24367 (build-system python-build-system)
24368 (arguments
24369 `(#:phases
24370 (modify-phases %standard-phases
24371 (delete 'check)
24372 (replace 'build
24373 (lambda _
24374 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
24375 (substitute* "anndata/_metadata.py"
24376 (("__version__ =.*")
24377 (string-append "__version__ = \"" ,version "\"\n")))
24378 ;; ZIP does not support timestamps before 1980.
24379 (setenv "SOURCE_DATE_EPOCH" "315532800")
24380 (invoke "flit" "build")))
24381 (replace 'install
24382 (lambda* (#:key inputs outputs #:allow-other-keys)
24383 (add-installed-pythonpath inputs outputs)
24384 (let ((out (assoc-ref outputs "out")))
24385 (for-each (lambda (wheel)
24386 (format #true wheel)
24387 (invoke "python" "-m" "pip" "install"
24388 wheel (string-append "--prefix=" out)))
24389 (find-files "dist" "\\.whl$"))))))))
24390 (propagated-inputs
24391 (list python-h5py
24392 python-importlib-metadata
24393 python-natsort
24394 python-numcodecs
24395 python-packaging
24396 python-pandas
24397 python-scipy
24398 python-zarr))
24399 (native-inputs
24400 (list python-joblib python-pytest python-toml python-flit
24401 python-setuptools-scm))
24402 (home-page "https://github.com/theislab/anndata")
24403 (synopsis "Annotated data for data analysis pipelines")
24404 (description "Anndata is a package for simple (functional) high-level APIs
24405 for data analysis pipelines. In this context, it provides an efficient,
24406 scalable way of keeping track of data together with learned annotations and
24407 reduces the code overhead typically encountered when using a mostly
24408 object-oriented library such as @code{scikit-learn}.")
24409 (license license:bsd-3)))
24410
24411 (define-public python-dill
24412 (package
24413 (name "python-dill")
24414 (version "0.3.1.1")
24415 (source
24416 (origin
24417 (method url-fetch)
24418 (uri (pypi-uri "dill" version))
24419 (sha256
24420 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
24421 (build-system python-build-system)
24422 (arguments
24423 `(#:phases
24424 (modify-phases %standard-phases
24425 (replace 'check
24426 (lambda _
24427 (with-directory-excursion "/tmp"
24428 (invoke "nosetests" "-v"))
24429 #t)))))
24430 (native-inputs
24431 (list python-nose))
24432 (home-page "https://pypi.org/project/dill/")
24433 (synopsis "Serialize all of Python")
24434 (description "Dill extends Python's @code{pickle} module for serializing
24435 and de-serializing Python objects to the majority of the built-in Python
24436 types. Dill provides the user the same interface as the @code{pickle} module,
24437 and also includes some additional features. In addition to pickling Python
24438 objects, @code{dill} provides the ability to save the state of an interpreter
24439 session in a single command. Hence, it would be feasible to save a
24440 interpreter session, close the interpreter, ship the pickled file to another
24441 computer, open a new interpreter, unpickle the session and thus continue from
24442 the saved state of the original interpreter session.")
24443 (license license:bsd-3)))
24444
24445 (define-public python-multiprocess
24446 (package
24447 (name "python-multiprocess")
24448 (version "0.70.9")
24449 (source
24450 (origin
24451 (method url-fetch)
24452 (uri (pypi-uri "multiprocess" version))
24453 (sha256
24454 (base32
24455 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
24456 (build-system python-build-system)
24457 (arguments
24458 `(#:phases
24459 (modify-phases %standard-phases
24460 (add-after 'unpack 'disable-broken-tests
24461 (lambda _
24462 ;; This test is broken as there is no keyboard interrupt.
24463 (substitute* "py3.7/multiprocess/tests/__init__.py"
24464 (("^(.*)def test_wait_result"
24465 line indent)
24466 (string-append indent
24467 "@unittest.skip(\"Disabled by Guix\")\n"
24468 line)))
24469 #t))
24470 ;; Tests must be run after installation.
24471 (delete 'check)
24472 (add-after 'install 'check
24473 (lambda* (#:key inputs outputs #:allow-other-keys)
24474 (add-installed-pythonpath inputs outputs)
24475 (invoke "python" "-m" "multiprocess.tests")
24476 #t)))))
24477 (propagated-inputs
24478 (list python-dill))
24479 (home-page "https://pypi.org/project/multiprocess/")
24480 (synopsis "Multiprocessing and multithreading in Python")
24481 (description
24482 "This package is a fork of the multiprocessing Python package, a package
24483 which supports the spawning of processes using the API of the standard
24484 library's @code{threading} module.")
24485 (license license:bsd-3)))
24486
24487 (define-public python-toolrack
24488 (package
24489 (name "python-toolrack")
24490 (version "3.0.1")
24491 (source
24492 (origin
24493 (method git-fetch)
24494 (uri (git-reference
24495 (url "https://github.com/albertodonato/toolrack")
24496 (commit (string-append "v" version))))
24497 (file-name (git-file-name name version))
24498 (sha256
24499 (base32
24500 "0ych11b7nchnkhqgf7dgivbvn2lzafjsi7nhb1an5zjjyns39gpx"))))
24501 (build-system python-build-system)
24502 (arguments
24503 (list
24504 #:phases
24505 #~(modify-phases %standard-phases
24506 (add-after 'unpack 'patch-/bin/sh
24507 (lambda _
24508 (substitute* "toolrack/aio/tests/test_process.py"
24509 (("/bin/sh")
24510 (which "sh")))))
24511 (replace 'check
24512 (lambda* (#:key tests? #:allow-other-keys)
24513 (when tests?
24514 (invoke "pytest" "-vv" "--pyargs" "toolrack"
24515 "-k"
24516 (string-append
24517 ;; These tests fail for unknown reason comparing the
24518 ;; expected output of shell scripts.
24519 "not test_parse_stderr "
24520 "and not test_parse_no_ending_newline "
24521 "and not test_parse_stdout"))))))))
24522 (native-inputs (list python-pytest python-pytest-asyncio
24523 python-pytest-mock))
24524 (home-page "https://github.com/albertodonato/toolrack")
24525 (synopsis "Collection of Python utility functions and classes")
24526 (description "This package provides a collection of miscellaneous utility
24527 functions and classes.")
24528 (license license:lgpl3+)))
24529
24530 (define-public python-toolz
24531 (package
24532 (name "python-toolz")
24533 (version "0.11.2")
24534 (source
24535 (origin
24536 (method url-fetch)
24537 (uri (pypi-uri "toolz" version))
24538 (sha256
24539 (base32
24540 "0cxwlh8dz8gq0l0bzchjnqqwhdp261nfd958ppqm518k2mg2scbb"))))
24541 (build-system python-build-system)
24542 (arguments
24543 `(#:phases
24544 (modify-phases %standard-phases
24545 (replace 'check
24546 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24547 (when tests?
24548 (add-installed-pythonpath inputs outputs)
24549 (invoke "python" "-m" "pytest" "--doctest-modules"
24550 "--pyargs" "toolz")))))))
24551 (native-inputs
24552 (list python-pytest))
24553 (home-page "https://github.com/pytoolz/toolz/")
24554 (synopsis "List processing tools and functional utilities")
24555 (description
24556 "This package provides a set of utility functions for iterators,
24557 functions, and dictionaries.")
24558 (license license:bsd-3)))
24559
24560 (define-public python-cytoolz
24561 (package
24562 (name "python-cytoolz")
24563 (version "0.11.2")
24564 (source
24565 (origin
24566 (method url-fetch)
24567 (uri (pypi-uri "cytoolz" version))
24568 (sha256
24569 (base32
24570 "1d12mgaippxxhn24w2hj0my3aqkx80fks5g4wzfdsvl0acqnc8za"))
24571 (modules '((guix build utils)))
24572 (snippet
24573 '(for-each delete-file (find-files "cytoolz" "\\.c$")))))
24574 (build-system python-build-system)
24575 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
24576 ;; 'exceptions'"
24577 (arguments '(#:tests? #f))
24578 (propagated-inputs
24579 (list python-toolz))
24580 (native-inputs
24581 (list python-cython))
24582 (home-page "https://github.com/pytoolz/cytoolz")
24583 (synopsis "High performance functional utilities")
24584 (description
24585 "The cytoolz package implements the same API as provided by toolz. The
24586 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
24587 that is accessible to other projects developed in Cython.")
24588 (license license:bsd-3)))
24589
24590 (define-public python-sortedcollections
24591 (package
24592 (name "python-sortedcollections")
24593 (version "2.1.0")
24594 (source
24595 (origin
24596 (method url-fetch)
24597 (uri (pypi-uri "sortedcollections" version))
24598 (sha256
24599 (base32
24600 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
24601 (build-system python-build-system)
24602 (propagated-inputs
24603 (list python-sortedcontainers))
24604 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
24605 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
24606 (synopsis "Python Sorted Collections")
24607 (description "Sorted Collections is a Python sorted collections library.")
24608 (license license:asl2.0)))
24609
24610 (define-public python-sortedcontainers
24611 (package
24612 (name "python-sortedcontainers")
24613 (version "2.1.0")
24614 (source
24615 (origin
24616 (method url-fetch)
24617 (uri (pypi-uri "sortedcontainers" version))
24618 (sha256
24619 (base32
24620 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
24621 (build-system python-build-system)
24622 (arguments
24623 ;; FIXME: Tests require many extra dependencies, and would introduce
24624 ;; a circular dependency on hypothesis, which uses this package.
24625 '(#:tests? #f))
24626 (propagated-inputs
24627 `(("python-appdirs" ,python-appdirs)
24628 ("python-distlib" ,python-distlib)
24629 ("python-filelock" ,python-filelock)
24630 ("python-six" ,python-six-bootstrap)))
24631 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
24632 (synopsis "Sorted List, Sorted Dict, Sorted Set")
24633 (description
24634 "This package provides a sorted collections library, written in
24635 pure-Python.")
24636 (license license:asl2.0)))
24637
24638 (define-public python2-sortedcontainers
24639 (package-with-python2 python-sortedcontainers))
24640
24641 (define python-cloudpickle-testpkg
24642 (package
24643 (name "python-cloudpickle-testpkg")
24644 (version "1.6.0")
24645 (source
24646 (origin
24647 ;; Archive on pypi does not include test infrastructure.
24648 (method git-fetch)
24649 (uri (git-reference
24650 (url "https://github.com/cloudpipe/cloudpickle")
24651 (commit (string-append "v" version))))
24652 (file-name (git-file-name name version))
24653 (sha256
24654 (base32
24655 "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
24656 (build-system python-build-system)
24657 (arguments
24658 '(#:phases
24659 (modify-phases %standard-phases
24660 (add-after 'unpack 'chdir
24661 (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
24662 (home-page "https://github.com/cloudpipe/cloudpickle")
24663 (synopsis "Extended pickling support for Python objects")
24664 (description
24665 "Cloudpickle makes it possible to serialize Python constructs not
24666 supported by the default pickle module from the Python standard library. It
24667 is especially useful for cluster computing where Python expressions are
24668 shipped over the network to execute on remote hosts, possibly close to the
24669 data.")
24670 (license license:bsd-3)))
24671
24672 (define-public python-cloudpickle
24673 (package
24674 (inherit python-cloudpickle-testpkg)
24675 (name "python-cloudpickle")
24676 (build-system python-build-system)
24677 (arguments
24678 '(#:phases
24679 (modify-phases %standard-phases
24680 (replace 'check
24681 (lambda* (#:key tests? #:allow-other-keys)
24682 (if tests?
24683 (invoke "pytest" "-s" "-vv")
24684 (format #t "test suite not run~%")))))))
24685 (native-inputs
24686 (list ;; For tests.
24687 python-cloudpickle-testpkg python-psutil python-pytest
24688 python-tornado-6))
24689 (home-page "https://github.com/cloudpipe/cloudpickle")
24690 (synopsis "Extended pickling support for Python objects")
24691 (description
24692 "Cloudpickle makes it possible to serialize Python constructs not
24693 supported by the default pickle module from the Python standard library. It
24694 is especially useful for cluster computing where Python expressions are
24695 shipped over the network to execute on remote hosts, possibly close to the
24696 data.")
24697 (properties `((python2-variant . ,(delay python2-cloudpickle))))
24698 (license license:bsd-3)))
24699
24700 (define-public python2-cloudpickle
24701 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
24702 (package/inherit base
24703 (version "1.3.0")
24704 (source
24705 (origin
24706 (method url-fetch)
24707 (uri (pypi-uri "cloudpickle" version))
24708 (sha256
24709 (base32
24710 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
24711 (native-inputs
24712 `(;; For tests.
24713 ("python-mock" ,python2-mock)
24714 ("python-psutil" ,python2-psutil)
24715 ("python-pytest" ,python2-pytest)
24716 ("python-tornado" ,python2-tornado)))
24717 (propagated-inputs
24718 `(("python-futures" ,python2-futures)
24719 ,@(package-propagated-inputs base))))))
24720
24721 (define-public python-locket
24722 (package
24723 (name "python-locket")
24724 (version "0.2.0")
24725 (source
24726 (origin
24727 (method url-fetch)
24728 (uri (pypi-uri "locket" version))
24729 (sha256
24730 (base32
24731 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
24732 (build-system python-build-system)
24733 (home-page "https://github.com/mwilliamson/locket.py")
24734 (synopsis "File-based locks for Python")
24735 (description
24736 "Locket implements a lock that can be used by multiple processes provided
24737 they use the same path.")
24738 (license license:bsd-2)))
24739
24740 (define-public python2-locket
24741 (package-with-python2 python-locket))
24742
24743 (define-public python-blosc
24744 (package
24745 (name "python-blosc")
24746 (version "1.5.1")
24747 (source
24748 (origin
24749 (method url-fetch)
24750 (uri (pypi-uri "blosc" version))
24751 (sha256
24752 (base32
24753 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
24754 (build-system python-build-system)
24755 ;; FIXME: all tests pass, but then this error is printed:
24756 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
24757 (arguments '(#:tests? #f))
24758 (propagated-inputs
24759 (list python-numpy))
24760 (home-page "https://github.com/blosc/python-blosc")
24761 (synopsis "Python wrapper for the Blosc data compressor library")
24762 (description "Blosc is a high performance compressor optimized for binary
24763 data. It has been designed to transmit data to the processor cache faster
24764 than the traditional, non-compressed, direct memory fetch approach via a
24765 @code{memcpy()} system call.
24766
24767 Blosc works well for compressing numerical arrays that contains data with
24768 relatively low entropy, like sparse data, time series, grids with
24769 regular-spaced values, etc.
24770
24771 This Python package wraps the Blosc library.")
24772 (license license:bsd-3)))
24773
24774 (define-public python2-blosc
24775 (package-with-python2 python-blosc))
24776
24777 (define-public python-partd
24778 (package
24779 (name "python-partd")
24780 (version "1.2.0")
24781 (source
24782 (origin
24783 (method url-fetch)
24784 (uri (pypi-uri "partd" version))
24785 (sha256
24786 (base32
24787 "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
24788 (build-system python-build-system)
24789 (propagated-inputs
24790 (list python-blosc
24791 python-locket
24792 python-numpy
24793 python-pandas
24794 python-pyzmq
24795 python-toolz))
24796 (home-page "https://github.com/dask/partd/")
24797 (synopsis "Appendable key-value storage")
24798 (description "Partd stores key-value pairs. Values are raw bytes. We
24799 append on old values. Partd excels at shuffling operations.")
24800 (license license:bsd-3)))
24801
24802 (define-public python-fsspec
24803 (package
24804 (name "python-fsspec")
24805 (version "0.6.1")
24806 (source
24807 (origin
24808 (method url-fetch)
24809 (uri (pypi-uri "fsspec" version))
24810 (sha256
24811 (base32
24812 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
24813 (build-system python-build-system)
24814 (arguments '(#:tests? #f)) ; there are none
24815 (home-page "https://github.com/intake/filesystem_spec")
24816 (synopsis "File-system specification")
24817 (description "The purpose of this package is to produce a template or
24818 specification for a file-system interface, that specific implementations
24819 should follow, so that applications making use of them can rely on a common
24820 behavior and not have to worry about the specific internal implementation
24821 decisions with any given backend.")
24822 (license license:bsd-3)))
24823
24824 ;; Note: Remember to update python-distributed when updating dask.
24825 (define-public python-dask
24826 (package
24827 (name "python-dask")
24828 (version "2021.11.2")
24829 (source
24830 (origin
24831 (method git-fetch)
24832 (uri (git-reference
24833 (url "https://github.com/dask/dask/")
24834 (commit "5a8275dd53193b47457cdfadc0e2356ea3eb6ccd")))
24835 (file-name (git-file-name name version))
24836 (sha256
24837 (base32 "0h8w7c03mn6s2mmwbqd2sqay3k4vaqiwlsbvliziggw28042zfw2"))
24838 (snippet
24839 ;; Delete generated copy of python-versioneer. We recreate it below.
24840 '(delete-file "versioneer.py"))))
24841 (build-system python-build-system)
24842 (arguments
24843 `(#:phases
24844 (modify-phases %standard-phases
24845 (add-after 'unpack 'versioneer
24846 (lambda _
24847 (invoke "versioneer" "install")))
24848 (replace 'check
24849 (lambda* (#:key tests? #:allow-other-keys)
24850 (when tests? (invoke "pytest" "-vv")))))))
24851 (propagated-inputs
24852 (list python-cloudpickle
24853 python-fsspec
24854 python-numpy
24855 python-packaging
24856 python-pandas
24857 python-partd
24858 python-toolz
24859 python-pyyaml))
24860 (native-inputs
24861 (list python-pytest python-pytest-runner python-pytest-rerunfailures
24862 python-versioneer))
24863 (home-page "https://github.com/dask/dask/")
24864 (synopsis "Parallel computing with task scheduling")
24865 (description
24866 "Dask is a flexible parallel computing library for analytics. It
24867 consists of two components: dynamic task scheduling optimized for computation,
24868 and large data collections like parallel arrays, dataframes, and lists that
24869 extend common interfaces like NumPy, Pandas, or Python iterators to
24870 larger-than-memory or distributed environments. These parallel collections
24871 run on top of the dynamic task schedulers.")
24872 (license license:bsd-3)))
24873
24874 (define-public python-ilinkedlist
24875 (package
24876 (name "python-ilinkedlist")
24877 (version "0.4.0")
24878 (source
24879 (origin
24880 (method url-fetch)
24881 (uri (pypi-uri "ilinkedlist" version))
24882 (sha256
24883 (base32
24884 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
24885 (build-system python-build-system)
24886 (native-inputs (list python-pytest))
24887 (inputs (list python))
24888 (home-page "https://github.com/luther9/ilinkedlist-py")
24889 (synopsis "Immutable linked list library")
24890 (description
24891 "This is a implementation of immutable linked lists for Python. It
24892 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
24893 Since a linked list is treated as immutable, it is hashable, and its length
24894 can be retrieved in constant time. Some of the terminology is inspired by
24895 LISP. It is possible to create an improper list by creating a @code{Pair}
24896 with a non-list @code{cdr}.")
24897 (license license:gpl3+)))
24898
24899 (define-public python-readlike
24900 (package
24901 (name "python-readlike")
24902 (version "0.1.3")
24903 (source
24904 (origin
24905 (method url-fetch)
24906 (uri (pypi-uri "readlike" version))
24907 (sha256
24908 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
24909 (build-system python-build-system)
24910 (home-page "https://github.com/jangler/readlike")
24911 (synopsis "GNU Readline-like line editing module")
24912 (description
24913 "This Python module provides line editing functions similar to the default
24914 Emacs-style ones of GNU Readline. Unlike the Python standard library's
24915 @code{readline} package, this one allows access to those capabilities in settings
24916 outside of a standard command-line interface. It is especially well-suited to
24917 interfacing with Urwid, due to a shared syntax for describing key inputs.
24918
24919 Currently, all stateless Readline commands are implemented. Yanking and history
24920 are not supported.")
24921 (license license:expat)))
24922
24923 (define-public python2-readlike
24924 (package-with-python2 python-readlike))
24925
24926 (define-public python-reparser
24927 (package
24928 (name "python-reparser")
24929 (version "1.4.3")
24930 (source
24931 (origin
24932 (method url-fetch)
24933 (uri (pypi-uri "ReParser" version))
24934 (sha256
24935 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
24936 (build-system python-build-system)
24937 (home-page "https://github.com/xmikos/reparser")
24938 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
24939 (description
24940 "This Python library provides a simple lexer/parser for inline markup based
24941 on regular expressions.")
24942 (license license:expat)))
24943
24944 (define-public python2-reparser
24945 (let ((reparser (package-with-python2
24946 (strip-python2-variant python-reparser))))
24947 (package/inherit reparser
24948 (propagated-inputs
24949 `(("python2-enum34" ,python2-enum34)
24950 ,@(package-propagated-inputs reparser))))))
24951
24952 (define-public python-retrying
24953 (package
24954 (name "python-retrying")
24955 (version "1.3.3")
24956 (source
24957 (origin
24958 (method git-fetch)
24959 (uri (git-reference
24960 (url "https://github.com/rholder/retrying")
24961 (commit (string-append "v" version))))
24962 (file-name (git-file-name name version))
24963 (sha256
24964 (base32
24965 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
24966 (build-system python-build-system)
24967 (propagated-inputs
24968 (list python-six))
24969 (home-page "https://github.com/rholder/retrying")
24970 (synopsis "Library for adding retry behavior")
24971 (description "Retrying is a general-purpose retrying library to simplify
24972 the task of adding retry behavior to just about anything.
24973
24974 Features:
24975
24976 @itemize
24977 @item Generic Decorator API.
24978 @item Specify stop condition (i.e. limit by number of attempts).
24979 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
24980 @item Customize retrying on Exceptions.
24981 @item Customize retrying on expected returned result.
24982 @end itemize")
24983 (license license:asl2.0)))
24984
24985 (define-public python-pre-commit
24986 (package
24987 (name "python-pre-commit")
24988 (version "2.10.0")
24989 (source
24990 (origin
24991 (method url-fetch)
24992 (uri (pypi-uri "pre_commit" version))
24993 (sha256
24994 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
24995 (build-system python-build-system)
24996 (arguments
24997 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
24998 ;; attribute 'empty_template_setup'".
24999 `(#:tests? #false))
25000 (propagated-inputs
25001 (list python-cfgv
25002 python-identify
25003 python-importlib-metadata
25004 python-importlib-resources
25005 python-nodeenv
25006 python-pyyaml
25007 python-toml
25008 python-virtualenv))
25009 (home-page "https://github.com/pre-commit/pre-commit")
25010 (synopsis "Framework for managing multi-language pre-commit hooks")
25011 (description
25012 "This package provides a framework for managing and maintaining
25013 multi-language pre-commit hooks.")
25014 (license license:expat)))
25015
25016 (define-public python-precis-i18n
25017 (package
25018 (name "python-precis-i18n")
25019 (version "1.0.3")
25020 (source
25021 (origin
25022 (method url-fetch)
25023 (uri (pypi-uri "precis_i18n" version))
25024 (sha256
25025 (base32
25026 "1qfb78zpx565vqkg0xhx75pna9sc35m370vpcz82982c8ix3ypyz"))))
25027 (build-system python-build-system)
25028 (home-page "https://github.com/byllyfish/precis_i18n")
25029 (synopsis "Implementation of the PRECIS framework")
25030 (description
25031 "This module implements the PRECIS Framework as described in RFC 8264,
25032 RFC 8265 and RFC 8266.")
25033 (license license:expat)))
25034
25035 (define-public python-absl-py
25036 (package
25037 (name "python-absl-py")
25038 (version "0.6.1")
25039 (source
25040 (origin
25041 (method url-fetch)
25042 (uri (pypi-uri "absl-py" version))
25043 (sha256
25044 (base32
25045 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
25046 (build-system python-build-system)
25047 (propagated-inputs
25048 (list python-six))
25049 (home-page "https://github.com/abseil/abseil-py")
25050 (synopsis "Abseil Python common libraries")
25051 (description
25052 "This package provides the Abseil Python Common Libraries, a collection
25053 of Python libraries for building Python applications.")
25054 (license license:asl2.0)))
25055
25056 (define-public python-astor
25057 (package
25058 (name "python-astor")
25059 (version "0.8.1")
25060 (source
25061 (origin
25062 (method url-fetch)
25063 (uri (pypi-uri "astor" version))
25064 (sha256
25065 (base32
25066 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
25067 (build-system python-build-system)
25068 ;; FIXME: There are two errors and two test failures.
25069 (arguments `(#:tests? #f))
25070 (home-page "https://github.com/berkerpeksag/astor")
25071 (synopsis "Read and write Python ASTs")
25072 (description "Astor is designed to allow easy manipulation of Python
25073 source via the Abstract Syntax Tree.")
25074 (license license:bsd-3)))
25075
25076 (define-public python2-astor
25077 (package-with-python2 python-astor))
25078
25079 (define-public python-astunparse
25080 (package
25081 (name "python-astunparse")
25082 (version "1.6.2")
25083 (source
25084 (origin
25085 (method url-fetch)
25086 (uri (pypi-uri "astunparse" version))
25087 (sha256
25088 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
25089 (build-system python-build-system)
25090 (arguments '(#:tests? #f)) ; there are none
25091 (propagated-inputs
25092 (list python-six python-wheel))
25093 (home-page "https://github.com/simonpercivall/astunparse")
25094 (synopsis "AST unparser for Python")
25095 (description "This package provides an AST unparser for Python. It is a
25096 factored out version of @code{unparse} found in the Python source
25097 distribution.")
25098 (license license:bsd-3)))
25099
25100 (define-public python-gast
25101 (package
25102 (name "python-gast")
25103 (version "0.5.2")
25104 (source
25105 (origin
25106 (method url-fetch)
25107 (uri (pypi-uri "gast" version))
25108 (sha256
25109 (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
25110 (build-system python-build-system)
25111 (propagated-inputs
25112 (list python-astunparse))
25113 (home-page "https://pypi.org/project/gast/")
25114 (synopsis "Generic Python AST that abstracts the underlying Python version")
25115 (description
25116 "GAST provides a compatibility layer between the AST of various Python
25117 versions, as produced by @code{ast.parse} from the standard @code{ast}
25118 module.")
25119 (license license:bsd-3)))
25120
25121 (define-public python-wikidata
25122 (package
25123 (name "python-wikidata")
25124 (version "0.6.1")
25125 (source
25126 (origin
25127 (method url-fetch)
25128 (uri (pypi-uri "Wikidata" version))
25129 (sha256
25130 (base32
25131 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
25132 (build-system python-build-system)
25133 (propagated-inputs
25134 (list python-babel))
25135 (home-page "https://github.com/dahlia/wikidata")
25136 (synopsis "Wikidata client library")
25137 (description
25138 "This package provides a Python interface to
25139 @url{https://www.wikidata.org/, Wikidata}.")
25140 (properties '((upstream-name . "Wikidata")))
25141 (license license:gpl3+)))
25142
25143 (define-public python-doctest-ignore-unicode
25144 (package
25145 (name "python-doctest-ignore-unicode")
25146 (version "0.1.2")
25147 (source
25148 (origin
25149 (method url-fetch)
25150 (uri (pypi-uri "doctest-ignore-unicode" version))
25151 (sha256
25152 (base32
25153 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
25154 (build-system python-build-system)
25155 (native-inputs
25156 (list python-nose))
25157 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
25158 (synopsis "Ignore Unicode literal prefixes in doctests")
25159 (description
25160 "This package adds support for a flag to ignore Unicode literal prefixes
25161 in doctests.")
25162 (license license:asl2.0)))
25163
25164 (define-public python-attr
25165 (package
25166 (name "python-attr")
25167 (version "0.3.1")
25168 (source
25169 (origin
25170 (method url-fetch)
25171 (uri (pypi-uri "attr" version))
25172 (sha256
25173 (base32
25174 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
25175 (build-system python-build-system)
25176 (home-page "https://github.com/denis-ryzhkov/attr")
25177 (synopsis "Decorator for attributes of target function or class")
25178 (description "Simple decorator to set attributes of target function or
25179 class in a @acronym{DRY, Don't Repeat Yourself} way.")
25180 (license license:expat)))
25181
25182 (define-public python-construct
25183 (package
25184 (name "python-construct")
25185 (version "2.10.56")
25186 (source
25187 (origin
25188 (method url-fetch)
25189 (uri (pypi-uri "construct" version))
25190 (sha256
25191 (base32
25192 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
25193 (build-system python-build-system)
25194 (arguments
25195 `(#:tests? #f)) ; No tests exist.
25196 (propagated-inputs
25197 (list python-extras python-arrow python-numpy python-ruamel.yaml))
25198 (home-page "https://construct.readthedocs.io")
25199 (synopsis "Declarative and symmetrical parser and builder for binary data")
25200 (description
25201 "This package provides both simple, atomic constructs (such as
25202 integers of various sizes), as well as composite ones which allow you
25203 form hierarchical and sequential structures of increasing complexity.
25204 It features bit and byte granularity, easy debugging and testing, an
25205 easy-to-extend subclass system, and lots of primitive constructs to
25206 make your work easier.")
25207 (license license:expat)))
25208
25209 (define-public python-outcome
25210 (package
25211 (name "python-outcome")
25212 (version "1.0.1")
25213 (source
25214 (origin
25215 (method url-fetch)
25216 (uri (pypi-uri "outcome" version))
25217 (sha256
25218 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
25219 (build-system python-build-system)
25220 (arguments
25221 `(#:phases
25222 (modify-phases %standard-phases
25223 (replace 'check
25224 (lambda* (#:key inputs outputs #:allow-other-keys)
25225 (add-installed-pythonpath inputs outputs)
25226 (invoke "pytest" "-vv"))))))
25227 (native-inputs
25228 (list python-pytest python-pytest-cov python-pytest-asyncio))
25229 (propagated-inputs
25230 (list python-async-generator python-attrs))
25231 (home-page "https://github.com/python-trio/outcome")
25232 (synopsis "Capture the outcome of Python function calls")
25233 (description
25234 "Capture the outcome of Python function calls. Extracted from the Trio
25235 project.")
25236 ;; Either license applies.
25237 (license (list license:expat license:asl2.0))))
25238
25239 (define-public python-trio
25240 (package
25241 (name "python-trio")
25242 (version "0.20.0")
25243 (source
25244 (origin
25245 (method url-fetch)
25246 (uri (pypi-uri "trio" version))
25247 (sha256
25248 (base32 "0w30cwmdwfa8zq2agqv3h62jzwwsk7ms8f683ag8f3jx279m42k7"))))
25249 (build-system python-build-system)
25250 (arguments
25251 `(#:phases
25252 (modify-phases %standard-phases
25253 (add-after 'unpack 'patch-sleep
25254 (lambda _
25255 (substitute* "trio/tests/test_subprocess.py"
25256 (("/bin/sleep")
25257 (which "sleep")))))
25258 (add-before 'check 'change-home
25259 (lambda _
25260 ;; Tests require a writable home.
25261 (setenv "HOME" "/tmp")))
25262 (replace 'check
25263 (lambda* (#:key tests? #:allow-other-keys)
25264 (when tests?
25265 (invoke "pytest" "-vv"
25266 "-n" (number->string (parallel-job-count))
25267 "-k"
25268 (string-append
25269 ;; This test times out.
25270 "not test_ki_protection_works"
25271 ;; Assertion errors.
25272 " and not test_guest_mode_ki"
25273 " and not test_run_in_trio_thread_ki"
25274 " and not test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage"
25275 " and not test_nursery_cancel_doesnt_create_cyclic_garbage"
25276 " and not test_cancel_scope_exit_doesnt_create_cyclic_garbage"
25277 " and not test_locals_destroyed_promptly_on_cancel"
25278 " and not test_ipython_exc_handler"
25279 " and not test_for_leaking_fds"
25280 ;; These try to raise KeyboardInterrupt which does not work
25281 ;; in the build environment.
25282 " and not test_ki_self"
25283 " and not test_ki_wakes_us_up"
25284 ;; Failure in name resolution.
25285 " and not test_getnameinfo"
25286 " and not test_SocketType_resolve"
25287 ;; OSError: protocol not found.
25288 " and not test_getprotobyname"
25289 ;; EOFError: Ran out of input.
25290 " and not test_static_tool_sees_all_symbols"))))))))
25291 (native-inputs
25292 (list python-astor
25293 python-ipython
25294 python-jedi
25295 python-pylint
25296 python-pyopenssl
25297 python-pytest
25298 python-pytest-xdist
25299 python-pytest-cov
25300 python-trustme))
25301 (propagated-inputs
25302 (list python-async-generator
25303 python-attrs
25304 python-idna
25305 python-outcome
25306 python-sniffio
25307 python-sortedcontainers))
25308 (home-page "https://github.com/python-trio/trio")
25309 (synopsis "Friendly Python library for async concurrency and I/O")
25310 (description
25311 "Trio strives to be a production-quality, async/await-native I/O library
25312 for Python. Like all async libraries, its main purpose is to help you write
25313 programs that do multiple things at the same time with parallelized I/O.")
25314 ;; Either license applies.
25315 (license (list license:expat license:asl2.0))))
25316
25317 (define-public python-trio-typing
25318 (package
25319 (name "python-trio-typing")
25320 (version "0.5.0")
25321 (source
25322 (origin
25323 (method url-fetch)
25324 (uri (pypi-uri "trio-typing" version))
25325 (sha256
25326 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
25327 (build-system python-build-system)
25328 (arguments
25329 `(#:phases
25330 (modify-phases %standard-phases
25331 (replace 'check
25332 (lambda _
25333 (invoke "pytest" "-vv"))))))
25334 (native-inputs
25335 (list python-attrs python-pytest))
25336 (propagated-inputs
25337 (list python-mypy python-mypy-extensions python-trio
25338 python-typing-extensions))
25339 (home-page "https://github.com/python-trio/trio-typing")
25340 (synopsis "Static type checking support for Trio and related projects")
25341 (description
25342 "This package provides:
25343
25344 @itemize
25345 @item PEP 561 typing stubs packages for the Trio project packages:
25346
25347 @itemize
25348 @item trio (@code{trio-stubs})
25349 @item outcome (@code{outcome-stubs})
25350 @item async_generator (@code{async_generator-stubs})
25351 @end itemize
25352
25353 @item A package @code{trio_typing} containing types that Trio programs often
25354 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
25355 a mypy plugin that smooths over some limitations in the basic type hints.
25356 @end itemize")
25357 ;; Either license applies.
25358 (license (list license:expat license:asl2.0))))
25359
25360 (define-public python-trio-websocket
25361 (package
25362 (name "python-trio-websocket")
25363 (version "0.9.2")
25364 (source
25365 (origin
25366 (method git-fetch) ;no tests in pypi archive
25367 (uri (git-reference
25368 (url "https://github.com/HyperionGray/trio-websocket")
25369 (commit version)))
25370 (file-name (git-file-name name version))
25371 (sha256
25372 (base32 "1yk2ak991kbl30xg8ldpggack1lwkizd7s5cpr28ir34z8iyjnpi"))))
25373 (build-system python-build-system)
25374 (arguments
25375 `(#:phases
25376 (modify-phases %standard-phases
25377 (replace 'check
25378 (lambda* (#:key tests? #:allow-other-keys)
25379 (when tests? (invoke "pytest" "-vv")))))))
25380 (native-inputs (list python-pytest python-pytest-trio python-trustme))
25381 (propagated-inputs (list python-async-generator python-trio python-wsproto))
25382 (home-page "https://github.com/HyperionGray/trio-websocket")
25383 (synopsis "WebSocket library for Trio")
25384 (description "This library implements both server and client aspects of
25385 the @url{https://tools.ietf.org/html/rfc6455, the WebSocket protocol},
25386 striving for safety, correctness, and ergonomics. It is based on the
25387 @url{https://wsproto.readthedocs.io/en/latest/, wsproto project}, which is a
25388 @url{https://sans-io.readthedocs.io/, Sans-IO} state machine that implements
25389 the majority of the WebSocket protocol, including framing, codecs, and events.
25390 This library handles I/O using @url{https://trio.readthedocs.io/en/latest/,
25391 the Trio framework}.")
25392 (license license:expat)))
25393
25394 (define-public python-humanize
25395 (package
25396 (name "python-humanize")
25397 (version "0.5.1")
25398 (source
25399 (origin
25400 (method url-fetch)
25401 (uri (pypi-uri "humanize" version))
25402 (sha256
25403 (base32
25404 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
25405 (arguments
25406 '(#:tests? #f)) ; tests not in pypi archive
25407 (build-system python-build-system)
25408 (home-page "https://github.com/jmoiron/humanize")
25409 (synopsis "Print numerical information in a human-readable form")
25410 (description "This package provides a Python module that displays numbers
25411 and dates in \"human readable\" forms. For example, it would display
25412 \"12345591313\" as \"12.3 billion\".")
25413 (license license:expat)))
25414
25415 (define-public python-txaio
25416 (package
25417 (name "python-txaio")
25418 (version "18.8.1")
25419 (source
25420 (origin
25421 (method url-fetch)
25422 (uri (pypi-uri "txaio" version))
25423 (sha256
25424 (base32
25425 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
25426 (build-system python-build-system)
25427 (propagated-inputs
25428 (list python-twisted python-six))
25429 (home-page "https://github.com/crossbario/txaio")
25430 (synopsis "Compatibility layer between Python asyncio and Twisted")
25431 (description "Txaio provides a compatibility layer between the Python
25432 @code{asyncio} module and @code{Twisted}.")
25433 (license license:expat)))
25434
25435 (define-public python-toolshed
25436 (package
25437 (name "python-toolshed")
25438 (version "0.4.6")
25439 (source
25440 (origin
25441 (method url-fetch)
25442 (uri (pypi-uri "toolshed" version))
25443 (sha256
25444 (base32
25445 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
25446 (build-system python-build-system)
25447 (native-inputs
25448 (list python-nose))
25449 (home-page "https://github.com/brentp/toolshed/")
25450 (synopsis "Collection of modules and functions for working with data")
25451 (description "This is a collection of well-tested, simple modules and
25452 functions that aim to reduce boilerplate when working with data.")
25453 (license license:bsd-2)))
25454
25455 (define-public python-annoy
25456 (package
25457 (name "python-annoy")
25458 (version "1.15.1")
25459 (source
25460 (origin
25461 (method url-fetch)
25462 (uri (pypi-uri "annoy" version))
25463 (sha256
25464 (base32
25465 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
25466 (build-system python-build-system)
25467 (native-inputs
25468 (list python-nose))
25469 (home-page "https://github.com/spotify/annoy/")
25470 (synopsis "Approximate nearest neighbors library")
25471 (description
25472 "Annoy is a C++ library with Python bindings to search for points in
25473 space that are close to a given query point. It also creates large read-only
25474 file-based data structures that are @code{mmap}ped into memory so that many
25475 processes may share the same data.")
25476 (license license:asl2.0)))
25477
25478 (define-public python-croniter
25479 (package
25480 (name "python-croniter")
25481 (version "1.3.4")
25482 (source (origin
25483 (method url-fetch)
25484 (uri (pypi-uri "croniter" version))
25485 (sha256
25486 (base32
25487 "1whbm26m9kpn0klgr9dqiqpp83ki9nhpxifaq9afcjw32rckcs9i"))))
25488 (build-system python-build-system)
25489 (propagated-inputs (list python-dateutil))
25490 (home-page "https://github.com/kiorky/croniter")
25491 (synopsis "Iterate datetime objects with cron-like syntax")
25492 (description
25493 "@code{croniter} provides iteration for datetime object with cron-like
25494 format.")
25495 (license license:expat)))
25496
25497 (define-public python-crontab
25498 (package
25499 (name "python-crontab")
25500 (version "2.5.1")
25501 (source
25502 (origin
25503 (method url-fetch)
25504 (uri (pypi-uri name version))
25505 (sha256
25506 (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
25507 (build-system python-build-system)
25508 (arguments
25509 ;; Comptability tests fail so they are disabled.
25510 `(#:tests? #f))
25511 (inputs
25512 (list python-dateutil))
25513 (home-page "https://gitlab.com/doctormo/python-crontab/")
25514 (synopsis "Module for reading and writing crontab files")
25515 (description "This Python module can read, write crontab files, and
25516 access the system cron automatically and simply using a direct API.")
25517 (license license:lgpl3+)))
25518
25519 (define-public python-pylzma
25520 (package
25521 (name "python-pylzma")
25522 (version "0.5.0")
25523 (source
25524 (origin
25525 (method url-fetch)
25526 (uri (pypi-uri "pylzma" version))
25527 (sha256
25528 (base32
25529 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
25530 (build-system python-build-system)
25531 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
25532 (synopsis "Python bindings for the LZMA library by Igor Pavlov")
25533 (description "This package provides Python bindings for the LZMA library
25534 by Igor Pavlov.")
25535 (license license:lgpl2.1+)))
25536
25537 (define-public python2-pylzma
25538 (package-with-python2 python-pylzma))
25539
25540 (define-public python-ifaddr
25541 (package
25542 (name "python-ifaddr")
25543 (version "0.1.7")
25544 (source
25545 (origin
25546 (method url-fetch)
25547 (uri (pypi-uri "ifaddr" version))
25548 (sha256
25549 (base32
25550 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
25551 (build-system python-build-system)
25552 (arguments
25553 `(#:phases
25554 (modify-phases %standard-phases
25555 (replace 'check
25556 (lambda _ (invoke "nosetests"))))))
25557 (native-inputs
25558 (list python-nose))
25559 (home-page "https://github.com/pydron/ifaddr")
25560 (synopsis "Network interface and IP address enumeration library")
25561 (description "This package provides a network interface and IP address
25562 enumeration library in Python.")
25563 (license license:expat)))
25564
25565 (define-public python-zeroconf
25566 (package
25567 (name "python-zeroconf")
25568 (version "0.38.1")
25569 (source
25570 (origin
25571 (method git-fetch) ; no tests in PyPI release
25572 (uri (git-reference
25573 (url "https://github.com/jstasiak/python-zeroconf")
25574 (commit version)))
25575 (file-name (git-file-name name version))
25576 (sha256
25577 (base32 "1p1a0ywlg5sq0ilcphmz9h4kayscz0q1lyfk57j7mwxyx4gl9cpi"))))
25578 (build-system python-build-system)
25579 (arguments
25580 `(#:phases
25581 (modify-phases %standard-phases
25582 (replace 'check
25583 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25584 (when tests?
25585 (add-installed-pythonpath inputs outputs)
25586 (invoke "python" "-m" "pytest" "-k"
25587 (string-append
25588 ;; Networking isn't available for these tests.
25589 "not test_integration_with_listener_ipv6"
25590 " and not test_launch_and_close_v4_v6"
25591 " and not test_launch_and_close_context_manager"
25592 " and not test_launch_and_close"
25593 " and not test_close_multiple_times"))))))))
25594 (native-inputs
25595 (list python-pytest))
25596 (propagated-inputs
25597 (list python-ifaddr))
25598 (home-page "https://github.com/jstasiak/python-zeroconf")
25599 (synopsis "Pure Python mDNS service discovery")
25600 (description "Pure Python multicast DNS (mDNS) service discovery library
25601 (Bonjour/Avahi compatible).")
25602 (license license:lgpl2.1+)))
25603
25604 (define-public python2-zeroconf
25605 (package
25606 (name "python2-zeroconf")
25607
25608 ;; This is the last version that supports Python 2.x.
25609 (version "0.19.1")
25610 (source
25611 (origin
25612 (method url-fetch)
25613 (uri (pypi-uri "zeroconf" version))
25614 (sha256
25615 (base32
25616 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
25617 (build-system python-build-system)
25618 (arguments
25619 `(#:python ,python-2
25620 #:phases
25621 (modify-phases %standard-phases
25622 (add-after 'unpack 'patch-requires
25623 (lambda* (#:key inputs #:allow-other-keys)
25624 (substitute* "setup.py"
25625 (("enum-compat")
25626 "enum34"))
25627 #t)))))
25628 (native-inputs
25629 `(("python2-six" ,python2-six)
25630 ("python2-enum32" ,python2-enum34)
25631 ("python2-netifaces" ,python2-netifaces)
25632 ("python2-typing" ,python2-typing)))
25633 (home-page "https://github.com/jstasiak/python-zeroconf")
25634 (synopsis "Pure Python mDNS service discovery")
25635 (description
25636 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
25637 compatible).")
25638 (license license:lgpl2.1+)))
25639
25640 (define-public python-bsddb3
25641 (package
25642 (name "python-bsddb3")
25643 (version "6.2.9")
25644 (source
25645 (origin
25646 (method url-fetch)
25647 (uri (pypi-uri "bsddb3" version))
25648 (sha256
25649 (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
25650 (build-system python-build-system)
25651 (inputs
25652 (list bdb))
25653 (arguments
25654 '(#:phases
25655 (modify-phases %standard-phases
25656 (add-after 'unpack 'configure-locations
25657 (lambda* (#:key inputs #:allow-other-keys)
25658 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
25659 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
25660 #t))
25661 (replace 'check
25662 (lambda _
25663 (invoke "python3" "test3.py" "-v"))))))
25664 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
25665 (synopsis "Python bindings for Oracle Berkeley DB")
25666 (description
25667 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
25668 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
25669 Transaction objects, and each of these is exposed as a Python type in the
25670 bsddb3.db module. The database objects can use various access methods: btree,
25671 hash, recno, and queue. Complete support of Berkeley DB distributed
25672 transactions. Complete support for Berkeley DB Replication Manager.
25673 Complete support for Berkeley DB Base Replication. Support for RPC.")
25674 (license license:bsd-3)))
25675
25676 (define-public python-dbfread
25677 (package
25678 (name "python-dbfread")
25679 (version "2.0.7")
25680 (source (origin
25681 (method url-fetch)
25682 (uri (pypi-uri "dbfread" version))
25683 (sha256
25684 (base32
25685 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
25686 (build-system python-build-system)
25687 (native-inputs
25688 (list python-pytest))
25689 (home-page "https://dbfread.readthedocs.io")
25690 (synopsis "Read DBF Files with Python")
25691 (description
25692 "This library reads DBF files and returns the data as native Python data
25693 types for further processing. It is primarily intended for batch jobs and
25694 one-off scripts.")
25695 (license license:expat)))
25696
25697 (define-public python-cached-property
25698 (package
25699 (name "python-cached-property")
25700 (version "1.5.2")
25701 (source
25702 (origin
25703 (method url-fetch)
25704 (uri (pypi-uri "cached-property" version))
25705 (sha256
25706 (base32
25707 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
25708 (build-system python-build-system)
25709 (arguments
25710 `(#:phases
25711 (modify-phases %standard-phases
25712 ;; https://github.com/pydanny/cached-property/issues/131
25713 ;; recent versions of freezegun break one test
25714 (add-after 'unpack 'disable-broken-test
25715 (lambda _
25716 (substitute* "tests/test_cached_property.py"
25717 (("def test_threads_ttl_expiry\\(self\\)" m)
25718 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
25719 " " m)))
25720 #t)))))
25721 (native-inputs
25722 (list python-freezegun))
25723 (home-page
25724 "https://github.com/pydanny/cached-property")
25725 (synopsis
25726 "Decorator for caching properties in classes")
25727 (description
25728 "This package provides a decorator which makes caching
25729 time-or-computationally-expensive properties quick and easy and works in Python
25730 2 or 3.")
25731 (license license:bsd-3)))
25732
25733 (define-public python-folium
25734 (package
25735 (name "python-folium")
25736 (version "0.12.1")
25737 (source
25738 (origin
25739 ;; PyPI has a ".whl" file but not a proper source release.
25740 ;; Thus, fetch code from Git.
25741 (method git-fetch)
25742 (uri (git-reference
25743 (url "https://github.com/python-visualization/folium")
25744 (commit (string-append "v" version))))
25745 (file-name (git-file-name name version))
25746 (sha256
25747 (base32 "1q05pzca3wfwgnbg03l3bagnhh348yx68w4aa91rg3g8zlviwjz1"))))
25748 (build-system python-build-system)
25749 (propagated-inputs
25750 (list python-branca python-jinja2 python-numpy python-requests))
25751 (native-inputs
25752 (list python-pytest))
25753 (home-page "https://github.com/python-visualization/folium")
25754 (synopsis "Make beautiful maps with Leaflet.js & Python")
25755 (description "@code{folium} makes it easy to visualize data that’s been
25756 manipulated in Python on an interactive leaflet map. It enables both the
25757 binding of data to a map for @code{choropleth} visualizations as well as
25758 passing rich vector/raster/HTML visualizations as markers on the map.
25759
25760 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
25761 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
25762 supports Image, Video, GeoJSON and TopoJSON overlays.")
25763 (license license:expat)))
25764
25765 (define-public python-mercantile
25766 (package
25767 (name "python-mercantile")
25768 (version "1.2.1")
25769 (source
25770 (origin
25771 (method url-fetch)
25772 (uri (pypi-uri "mercantile" version))
25773 (sha256
25774 (base32 "0sxmndhzzrvss5irsgzfrk51k6jihwcb7661992mizdgbnqnsg7s"))))
25775 (build-system python-build-system)
25776 (propagated-inputs (list python-click))
25777 (native-inputs
25778 (list python-check-manifest python-hypothesis python-pytest))
25779 (home-page "https://github.com/mapbox/mercantile")
25780 (synopsis "Web mercator XYZ tile utilities")
25781 (description "The mercantile module provides @code{ul(xtile, ytile, zoom)}
25782 and @code{bounds(xtile, ytile, zoom)} functions that respectively return the
25783 upper left corner and bounding longitudes and latitudes for XYZ tiles, a
25784 @code{xy(lng, lat)} function that returns spherical mercator x and y
25785 coordinates, a @code{tile(lng, lat, zoom)} function that returns the tile
25786 containing a given point, and quadkey conversion functions
25787 @code{quadkey(xtile, ytile, zoom)} and @code{quadkey_to_tile(quadkey)} for
25788 translating between quadkey and tile coordinates.")
25789 (license license:bsd-3)))
25790
25791 (define-public python-xyzservices
25792 (package
25793 (name "python-xyzservices")
25794 (version "2022.4.0")
25795 (source
25796 (origin
25797 (method url-fetch)
25798 (uri (pypi-uri "xyzservices" version))
25799 (sha256
25800 (base32 "1paxv4i0dws85md7csv7pf80jl3xh792mx8rxnsrk61ks3ivbsyg"))))
25801 (build-system python-build-system)
25802 (arguments
25803 '(#:phases
25804 (modify-phases %standard-phases
25805 (replace 'check
25806 (lambda* (#:key tests? #:allow-other-keys)
25807 (when tests?
25808 (invoke "pytest" "-vv")))))))
25809 (native-inputs
25810 (list python-pytest python-mercantile python-requests))
25811 (home-page "https://github.com/geopandas/xyzservices")
25812 (synopsis "Source of XYZ tiles providers")
25813 (description "@code{xyzservices} is a lightweight library providing a
25814 repository of available XYZ services offering raster basemap tiles. The
25815 repository is provided via Python API and as a compressed JSON file.")
25816 (license license:bsd-3)))
25817
25818 (define-public jube
25819 (package
25820 ;; This is a command-line tool, so no "python-" prefix.
25821 (name "jube")
25822 (version "2.2.2")
25823 (source (origin
25824 (method url-fetch)
25825 (uri (string-append
25826 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
25827 version))
25828 (sha256
25829 (base32
25830 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
25831 (file-name (string-append "jube-" version ".tar.gz"))))
25832 (build-system python-build-system)
25833 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
25834 (synopsis "Benchmarking environment")
25835 (description
25836 "JUBE helps perform and analyze benchmarks in a systematic way. For each
25837 benchmarked application, benchmark data is stored in a format that allows JUBE
25838 to deduct the desired information. This data can be parsed by automatic pre-
25839 and post-processing scripts that draw information and store it more densely
25840 for manual interpretation.")
25841 (license license:gpl3+)))
25842
25843 (define-public python-pyroutelib3
25844 (package
25845 (name "python-pyroutelib3")
25846 (version "1.3.post1")
25847 (source
25848 (origin
25849 (method url-fetch)
25850 (uri (pypi-uri "pyroutelib3" version))
25851 (sha256
25852 (base32
25853 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
25854 (build-system python-build-system)
25855 (propagated-inputs
25856 (list python-dateutil))
25857 (home-page "https://github.com/MKuranowski/pyroutelib3")
25858 (synopsis "Library for simple routing on OSM data")
25859 (description "Library for simple routing on OSM data")
25860 (license license:gpl3+)))
25861
25862 (define-public python-bibtexparser
25863 (package
25864 (name "python-bibtexparser")
25865 (version "1.1.0")
25866 (source
25867 (origin
25868 (method url-fetch)
25869 (uri (pypi-uri "bibtexparser" version))
25870 (sha256
25871 (base32
25872 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
25873 (build-system python-build-system)
25874 (propagated-inputs
25875 (list python-pyparsing))
25876 (native-inputs
25877 (list python-future))
25878 (home-page "https://github.com/sciunto-org/python-bibtexparser")
25879 (synopsis "Python library to parse BibTeX files")
25880 (description "BibtexParser is a Python library to parse BibTeX files.")
25881 (license (list license:bsd-3 license:lgpl3))))
25882
25883 (define-public python-distro
25884 (package
25885 (name "python-distro")
25886 (version "1.6.0")
25887 (source
25888 (origin
25889 (method url-fetch)
25890 (uri (pypi-uri "distro" version))
25891 (sha256
25892 (base32
25893 "09441261dd3c8b2gv15vhw1cryzg60lmgpkk07v6hpwwkyhfbxc3"))))
25894 (build-system python-build-system)
25895 (native-inputs
25896 (list python-pytest))
25897 (home-page "https://github.com/nir0s/distro")
25898 (synopsis
25899 "OS platform information API")
25900 (description
25901 "@code{distro} provides information about the OS distribution it runs on,
25902 such as a reliable machine-readable ID, or version information.
25903
25904 It is the recommended replacement for Python's original
25905 `platform.linux_distribution` function (which will be removed in Python 3.8).
25906 @code{distro} also provides a command-line interface to output the platform
25907 information in various formats.")
25908 (license license:asl2.0)))
25909
25910 (define-public python-cairosvg
25911 (package
25912 (name "python-cairosvg")
25913 (version "2.5.0")
25914 (source
25915 (origin
25916 (method url-fetch)
25917 (uri (pypi-uri "CairoSVG" version))
25918 (sha256
25919 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
25920 (build-system python-build-system)
25921 (arguments
25922 `(#:phases
25923 (modify-phases %standard-phases
25924 (replace 'check
25925 (lambda _ (invoke "pytest"))))))
25926 (propagated-inputs
25927 (list python-cairocffi python-cssselect2 python-defusedxml
25928 python-pillow python-tinycss2))
25929 (native-inputs
25930 (list python-pytest-flake8 python-pytest-isort python-pytest-runner))
25931 (home-page "https://cairosvg.org/")
25932 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
25933 (description "CairoSVG is a SVG converter based on Cairo. It can export
25934 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
25935 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
25936 parsed, the result is drawn to a Cairo surface that can be exported to
25937 qvarious formats: PDF, PostScript, PNG and even SVG.")
25938 (license license:lgpl3+)))
25939
25940 (define-public python-pyphen
25941 (package
25942 (name "python-pyphen")
25943 (version "0.10.0")
25944 (source
25945 (origin
25946 (method url-fetch)
25947 (uri (pypi-uri "Pyphen" version))
25948 (sha256
25949 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
25950 (build-system python-build-system)
25951 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
25952 ;; embedded set provided by upstream - like Debian does.
25953 (home-page "https://github.com/Kozea/Pyphen")
25954 (synopsis "Pure Python module to hyphenate text")
25955 (description "Pyphen is a pure Python module to hyphenate text using
25956 existing Hunspell hyphenation dictionaries.")
25957 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
25958
25959 (define-public python-intelhex
25960 (package
25961 (name "python-intelhex")
25962 (version "2.3.0")
25963 (source
25964 (origin
25965 (method url-fetch)
25966 (uri (pypi-uri "intelhex" version))
25967 (sha256
25968 (base32
25969 "14q04p6qs47ab9w55232ylrdn4wm9rswz36s6x999x0rlxhp6aw9"))))
25970 (build-system python-build-system)
25971 (home-page "https://pypi.org/project/IntelHex/")
25972 (synopsis "Python library for Intel HEX files manipulations")
25973 (description "The Intel HEX file format is widely used in microprocessors
25974 and microcontrollers area (embedded systems etc.) as the de facto standard for
25975 representation of code to be programmed into microelectronic devices. This
25976 package provides an intelhex Python library to read, write, create from
25977 scratch and manipulate data from Intel HEX file format. It also includes
25978 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
25979 converters and more, those based on the library itself.")
25980 (license license:bsd-3)))
25981
25982 (define-public python-pykwalify
25983 (package
25984 (name "python-pykwalify")
25985 (version "1.7.0")
25986 (source
25987 (origin
25988 (method url-fetch)
25989 (uri (pypi-uri "pykwalify" version))
25990 (sha256
25991 (base32
25992 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
25993 (build-system python-build-system)
25994 (arguments '(#:tests? #f)) ;missing dependencies
25995 (propagated-inputs
25996 (list python-dateutil python-docopt python-pyyaml))
25997 (home-page "https://github.com/grokzen/pykwalify")
25998 (synopsis
25999 "Python lib/cli for JSON/YAML schema validation")
26000 (description
26001 "This package provides a parser, schema validator, and data binding tool
26002 for YAML and JSON.")
26003 (license license:expat)))
26004
26005 (define-public python-dbusmock
26006 (package
26007 (name "python-dbusmock")
26008 (version "0.25.0")
26009 (source
26010 (origin
26011 (method url-fetch)
26012 (uri (pypi-uri "python-dbusmock" version))
26013 (sha256
26014 (base32
26015 "1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
26016 (build-system python-build-system)
26017 (arguments
26018 `(#:imported-modules (,@%python-build-system-modules
26019 (guix build syscalls))
26020 #:modules ((guix build python-build-system)
26021 (guix build syscalls)
26022 (guix build utils)
26023 (ice-9 match))
26024 #:phases
26025 (modify-phases %standard-phases
26026 (add-after 'unpack 'patch-paths
26027 (lambda* (#:key inputs #:allow-other-keys)
26028 (substitute* "tests/test_code.py"
26029 (("/bin/bash") (which "bash")))
26030 (substitute* "dbusmock/testcase.py"
26031 (("'dbus-daemon'")
26032 (string-append "'" (assoc-ref inputs "dbus")
26033 "/bin/dbus-daemon'")))))
26034 (replace 'check
26035 (lambda* (#:key tests? #:allow-other-keys)
26036 (when tests?
26037 (match (primitive-fork)
26038 (0 ;child process
26039 (set-child-subreaper!)
26040 ;; Use tini so that signals are properly handled and
26041 ;; doubly-forked processes get reaped; otherwise,
26042 ;; python-dbusmock would waste time polling for the dbus
26043 ;; processes it spawns to be reaped, in vain.
26044 (execlp "tini" "--" "pytest" "-vv"))
26045 (pid
26046 (match (waitpid pid)
26047 ((_ . status)
26048 (unless (zero? status)
26049 (error "`pytest' exited with status"
26050 status))))))))))))
26051 (native-inputs
26052 (list dbus python-pytest tini which))
26053 (inputs
26054 (list dbus))
26055 (propagated-inputs
26056 (list python-dbus python-pygobject))
26057 (home-page "https://github.com/martinpitt/python-dbusmock")
26058 (synopsis "Python library for mock D-Bus objects")
26059 (description "python-dbusmock allows for the easy creation of mock objects on
26060 D-Bus. This is useful for writing tests for software which talks to D-Bus
26061 services such as upower, systemd, logind, gnome-session or others, and it is
26062 hard (or impossible without root privileges) to set the state of the real
26063 services to what you expect in your tests.")
26064 (license license:lgpl3+)))
26065
26066 (define-public python-jsonplus
26067 (package
26068 (name "python-jsonplus")
26069 (version "0.8.0")
26070 (home-page "https://github.com/randomir/jsonplus")
26071 (source (origin
26072 (method url-fetch)
26073 (uri (pypi-uri "jsonplus" version))
26074 (sha256
26075 (base32
26076 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
26077 (build-system python-build-system)
26078 ;; XXX: No tests on PyPI, and the repository has no tags.
26079 (arguments '(#:tests? #f))
26080 (propagated-inputs
26081 (list python-dateutil python-simplejson python-sortedcontainers))
26082 (synopsis "Serialize Python types to/from JSON")
26083 (description
26084 "This package provides functionality to serialize arbitrary data types
26085 to and from JSON. Common data types are implemented and it is easy to
26086 register custom encoders and decoders.")
26087 (license license:expat)))
26088
26089 (define-public python-ujson
26090 (package
26091 (name "python-ujson")
26092 (version "4.0.2")
26093 (source
26094 (origin
26095 (method url-fetch)
26096 (uri (pypi-uri "ujson" version))
26097 (sha256
26098 (base32
26099 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
26100 (modules '((guix build utils)))
26101 (snippet
26102 '(begin (delete-file-recursively "deps") #t))))
26103 (build-system python-build-system)
26104 (arguments
26105 `(#:phases
26106 (modify-phases %standard-phases
26107 (add-after 'unpack 'link-to-system-double-conversion
26108 (lambda* (#:key inputs #:allow-other-keys)
26109 (let ((d-c (assoc-ref inputs "double-conversion")))
26110 (substitute* "setup.py"
26111 (("./deps/double-conversion/double-conversion\"")
26112 (string-append d-c "/include/double-conversion\""))
26113 (("-lstdc++" stdc)
26114 (string-append "-L" d-c "/lib\","
26115 " \"-ldouble-conversion\","
26116 " \"" stdc)))
26117 #t)))
26118 (replace 'check
26119 (lambda* (#:key inputs outputs #:allow-other-keys)
26120 (add-installed-pythonpath inputs outputs)
26121 (invoke "pytest"))))))
26122 (native-inputs
26123 (list double-conversion python-setuptools-scm python-pytest))
26124 (home-page "https://github.com/ultrajson/ultrajson")
26125 (synopsis "Ultra fast JSON encoder and decoder for Python")
26126 (description
26127 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
26128 bindings for Python 3.")
26129 (license license:bsd-3)))
26130
26131 (define-public python-iocapture
26132 ;; The latest release is more than a year older than this commit.
26133 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
26134 (revision "1"))
26135 (package
26136 (name "python-iocapture")
26137 (version "0.1.2")
26138 (source
26139 (origin
26140 (method git-fetch)
26141 (uri (git-reference
26142 (url "https://github.com/oinume/iocapture")
26143 (commit commit)))
26144 (file-name (git-file-name name version))
26145 (sha256
26146 (base32
26147 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
26148 (build-system python-build-system)
26149 (arguments
26150 `(#:phases
26151 (modify-phases %standard-phases
26152 (delete 'check)
26153 (add-after 'install 'check
26154 (lambda* (#:key inputs outputs #:allow-other-keys)
26155 (add-installed-pythonpath inputs outputs)
26156 (invoke "py.test" "-v" "tests")
26157 #t)))))
26158 (propagated-inputs
26159 (list python-flexmock python-pytest python-pytest-cov python-six))
26160 (home-page "https://github.com/oinume/iocapture")
26161 (synopsis "Python capturing tool for stdout and stderr")
26162 (description
26163 "This package helps you to capture the standard out (stdout) and the
26164 standard error channel (stderr) in your program.")
26165 (license license:expat))))
26166
26167 (define-public python-anyio
26168 (package
26169 (name "python-anyio")
26170 (version "3.5.0")
26171 (source
26172 (origin
26173 (method url-fetch)
26174 (uri (pypi-uri "anyio" version))
26175 (sha256
26176 (base32
26177 "19m58805wir4i2s45dd5ynwlzb7ky1218isbir53gpqzzgigzbm0"))))
26178 (build-system python-build-system)
26179 (arguments
26180 `(#:phases
26181 (modify-phases %standard-phases
26182 (replace 'check
26183 (lambda* (#:key tests? #:allow-other-keys)
26184 (when tests?
26185 (invoke
26186 "pytest" "-vv" "-p" "no:asyncio"
26187 "-m" "not network"
26188 "-k"
26189 (string-append
26190 "not test_is_block_device"
26191
26192 ;; These fail because of network (or specifically IPv6
26193 ;; network) access (see:
26194 ;; https://github.com/agronholm/anyio/issues/417).
26195 " and not test_accept"
26196 " and not test_accept_after_close"
26197 " and not test_close_during_receive"
26198 " and not test_close_from_other_task"
26199 " and not test_concurrent_receive"
26200 " and not test_concurrent_send"
26201 " and not test_connect_tcp_with_tls"
26202 " and not test_connect_tcp_with_tls_cert_check_fail"
26203 " and not test_connection_refused"
26204 " and not test_extra_attributes"
26205 " and not test_getaddrinfo"
26206 " and not test_getnameinfo"
26207 " and not test_happy_eyeballs"
26208 " and not test_iterate"
26209 " and not test_receive_after_close"
26210 " and not test_receive_timeout"
26211 " and not test_reuse_port"
26212 " and not test_run_process"
26213 " and not test_send_after_close"
26214 " and not test_send_after_eof"
26215 " and not test_send_after_peer_closed"
26216 " and not test_send_eof"
26217 " and not test_send_large_buffer"
26218 " and not test_send_receive"
26219 " and not test_socket_options"
26220 " and not test_unretrieved_future_exception_server_crash"))))))))
26221 (propagated-inputs
26222 (list python-contextvars
26223 python-dataclasses
26224 python-idna
26225 python-sniffio
26226 python-typing-extensions))
26227 (native-inputs
26228 (list python-contextlib2
26229 python-coverage
26230 python-hypothesis
26231 python-mock
26232 python-pytest
26233 python-pytest-mock
26234 python-setuptools-scm
26235 python-trio
26236 python-trustme
26237 python-uvloop))
26238 (home-page "https://github.com/agronholm/anyio")
26239 (synopsis "Compatibility layer for multiple asynchronous event loops")
26240 (description
26241 "AnyIO is an asynchronous networking and concurrency library that works
26242 on top of either asyncio or trio. It implements trio-like structured
26243 concurrency on top of asyncio, and works in harmony with the native SC of trio
26244 itself.")
26245 (license license:expat)))
26246
26247 (define-public python-argh
26248 ;; There are 21 commits since the latest release containing important
26249 ;; improvements.
26250 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
26251 (revision "1"))
26252 (package
26253 (name "python-argh")
26254 (version (git-version "0.26.2" revision commit))
26255 (source
26256 (origin
26257 (method git-fetch)
26258 (uri (git-reference
26259 (url "https://github.com/neithere/argh")
26260 (commit commit)))
26261 (file-name (git-file-name name version))
26262 (sha256
26263 (base32
26264 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
26265 (build-system python-build-system)
26266 (arguments
26267 '(#:phases
26268 (modify-phases %standard-phases
26269 (add-after 'unpack 'patch-tests
26270 (lambda _
26271 ;; Fix test failures on Python 3.9.9+.
26272 ;; Taken via <https://github.com/neithere/argh/issues/148>.
26273 (substitute* "test/test_integration.py"
26274 (("assert run\\(p, '(bar|orig-name|nest bar)', exit=True\\)\
26275 \\.startswith\\('invalid choice'\\)" _ name)
26276 (string-append "assert 'invalid choice' in \
26277 run(p, '" name "', exit=True)")))))
26278 (replace 'check
26279 (lambda* (#:key tests? #:allow-other-keys)
26280 (when tests?
26281 (invoke "pytest" "-vv")))))))
26282 (propagated-inputs
26283 (list python-iocapture python-mock python-pytest python-pytest-cov
26284 python-pytest-xdist))
26285 (home-page "https://github.com/neithere/argh/")
26286 (synopsis "Argparse wrapper with natural syntax")
26287 (description
26288 "python-argh is a small library that provides several layers of
26289 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
26290 always possible to declare a command with the highest possible (and least
26291 flexible) layer and then tune the behaviour with any of the lower layers
26292 including the native API of @code{python-argparse}.")
26293 (license license:lgpl3+))))
26294
26295 (define-public python-ppft
26296 (package
26297 (name "python-ppft")
26298 (version "1.6.6.1")
26299 (source
26300 (origin
26301 (method url-fetch)
26302 (uri (pypi-uri "ppft" version))
26303 (sha256
26304 (base32
26305 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
26306 (build-system python-build-system)
26307 (arguments '(#:tests? #f)) ; there are none
26308 (propagated-inputs
26309 (list python-six))
26310 (home-page "https://pypi.org/project/ppft/")
26311 (synopsis "Fork of Parallel Python")
26312 (description
26313 "This package is a fork of Parallel Python. The Parallel Python
26314 module (@code{pp}) provides an easy and efficient way to create
26315 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
26316 computers and clusters. It features cross-platform portability and dynamic
26317 load balancing.")
26318 (license license:bsd-3)))
26319
26320 (define-public python-pox
26321 (package
26322 (name "python-pox")
26323 (version "0.2.7")
26324 (source
26325 (origin
26326 (method url-fetch)
26327 (uri (pypi-uri "pox" version))
26328 (sha256
26329 (base32
26330 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
26331 (build-system python-build-system)
26332 (arguments
26333 `(#:phases
26334 (modify-phases %standard-phases
26335 (replace 'check
26336 (lambda _
26337 (mkdir-p "/tmp/guix")
26338 (setenv "SHELL" "bash")
26339 (setenv "USERNAME" "guix")
26340 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
26341 (invoke "py.test" "-vv")
26342 #t)))))
26343 (native-inputs
26344 (list python-pytest which))
26345 (home-page "https://pypi.org/project/pox/")
26346 (synopsis "Python utilities for file system exploration and automated builds")
26347 (description
26348 "Pox provides a collection of utilities for navigating and manipulating
26349 file systems. This module is designed to facilitate some of the low-level
26350 operating system interactions that are useful when exploring a file system on a
26351 remote host. Pox provides Python equivalents of several shell commands such
26352 as @command{which} and @command{find}. These commands allow automated
26353 discovery of what has been installed on an operating system, and where the
26354 essential tools are located.")
26355 (license license:bsd-3)))
26356
26357 (define-public python-pathos
26358 (package
26359 (name "python-pathos")
26360 (version "0.2.5")
26361 (source
26362 (origin
26363 (method url-fetch)
26364 (uri (pypi-uri "pathos" version))
26365 (sha256
26366 (base32
26367 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
26368 (build-system python-build-system)
26369 (arguments
26370 '(#:phases
26371 (modify-phases %standard-phases
26372 (replace 'check
26373 (lambda _
26374 (invoke "python" "./tests/__main__.py"))))))
26375 (propagated-inputs
26376 (list python-dill python-multiprocess python-pox python-ppft))
26377 (native-inputs
26378 (list python-pytest))
26379 (home-page "https://pypi.org/project/pathos/")
26380 (synopsis
26381 "Parallel graph management and execution in heterogeneous computing")
26382 (description
26383 "Python-pathos is a framework for heterogeneous computing. It provides a
26384 consistent high-level interface for configuring and launching parallel
26385 computations across heterogeneous resources. Python-pathos provides configurable
26386 launchers for parallel and distributed computing, where each launcher contains
26387 the syntactic logic to configure and launch jobs in an execution environment.")
26388 (license license:bsd-3)))
26389
26390 (define-public python-flit
26391 (package
26392 (name "python-flit")
26393 (version "3.5.1")
26394 (source
26395 (origin
26396 (method url-fetch)
26397 (uri (pypi-uri "flit" version))
26398 (sha256
26399 (base32 "04152qj46sqbnlrj7ch9p7svjrrlpzbk0qr39g2yr0s4f5vp6frf"))))
26400 (build-system python-build-system)
26401 (arguments
26402 (list
26403 #:phases
26404 #~(modify-phases %standard-phases
26405 ;; XXX: PEP 517 manual build copied from python-isort.
26406 (replace 'build
26407 (lambda _
26408 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
26409 (replace 'check
26410 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26411 (when tests?
26412 (setenv "HOME" "/tmp")
26413 (setenv "FLIT_NO_NETWORK" "1"))))
26414 (replace 'install
26415 (lambda _
26416 (let ((whl (car (find-files "dist" "\\.whl$"))))
26417 (invoke "pip" "--no-cache-dir" "--no-input"
26418 "install" "--no-deps" "--prefix" #$output whl)))))))
26419 (propagated-inputs
26420 (list python-pypa-build
26421 python-tomli-w
26422 python-flit-core
26423 python-docutils
26424 python-requests))
26425 (native-inputs
26426 (list python-responses
26427 python-pygments-github-lexers
26428 python-pytest
26429 python-pytest-cov
26430 python-sphinx
26431 python-sphinxcontrib-github-alt
26432 python-testpath))
26433 (home-page "https://flit.readthedocs.io/")
26434 (synopsis "Simple packaging tool for simple packages")
26435 (description "Flit is a simple way to put Python packages and modules on
26436 PyPI. Flit packages a single importable module or package at a time, using
26437 the import name as the name on PyPI. All subpackages and data files within a
26438 package are included automatically.")
26439 (license license:bsd-3)))
26440
26441 (define-public python-pathtools
26442 (package
26443 (name "python-pathtools")
26444 (version "0.1.2")
26445 (source
26446 (origin
26447 (method url-fetch)
26448 (uri (pypi-uri "pathtools" version))
26449 (sha256
26450 (base32
26451 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
26452 (build-system python-build-system)
26453 (home-page
26454 "https://github.com/gorakhargosh/pathtools")
26455 (synopsis "Path utilities for Python")
26456 (description "Pattern matching and various utilities for file systems
26457 paths.")
26458 (license license:expat)))
26459
26460 (define-public python-fastentrypoints
26461 (package
26462 (name "python-fastentrypoints")
26463 (version "0.12")
26464 (source
26465 (origin
26466 (method url-fetch)
26467 (uri (pypi-uri "fastentrypoints" version))
26468 (sha256
26469 (base32
26470 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
26471 (build-system python-build-system)
26472 (home-page
26473 "https://github.com/ninjaaron/fast-entry_points")
26474 (synopsis
26475 "Makes entry_points specified in setup.py load more quickly")
26476 (description
26477 "Using entry_points in your setup.py makes scripts that start really
26478 slowly because it imports pkg_resources. This package allows such setup
26479 scripts to load entry points more quickly.")
26480 (license license:bsd-3)))
26481
26482 (define-public python-funcparserlib
26483 (package
26484 (name "python-funcparserlib")
26485 (version "1.0.0")
26486 (source
26487 (origin
26488 (method url-fetch)
26489 (uri (pypi-uri "funcparserlib" version))
26490 (sha256
26491 (base32 "0swbqf53x7lfnczvi566s1g3nkf5mfrxz7sbpyymricz57a3vlvx"))))
26492 (build-system python-build-system)
26493 (arguments
26494 `(#:tests? #f)) ; no tests in PyPI and no setup.py in GitHub
26495 (home-page "https://github.com/vlasovskikh/funcparserlib")
26496 (synopsis
26497 "Recursive descent parsing library based on functional combinators")
26498 (description
26499 "This package is a recursive descent parsing library for Python based on
26500 functional combinators. Parser combinators are just higher-order functions
26501 that take parsers as their arguments and return them as result values.")
26502 (license license:expat)))
26503
26504 (define-public python-speg
26505 (package
26506 (name "python-speg")
26507 (version "0.3")
26508 (source
26509 (origin
26510 (method url-fetch)
26511 (uri (pypi-uri "speg" version ".zip"))
26512 (sha256
26513 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
26514 (arguments
26515 `(#:tests? #f)) ;FIXME: tests fail, not sure why
26516 (native-inputs
26517 (list unzip))
26518 (build-system python-build-system)
26519 (home-page "https://github.com/avakar/speg")
26520 (synopsis "PEG-based parser interpreter with memoization")
26521 (description "This package is a PEG-based parser and interpreter with
26522 memoization.")
26523 (license license:expat)))
26524
26525 (define-public python-cson
26526 (package
26527 (name "python-cson")
26528 (version "0.8")
26529 (source
26530 (origin
26531 (method url-fetch)
26532 (uri (pypi-uri "cson" version))
26533 (sha256
26534 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
26535 (build-system python-build-system)
26536 (propagated-inputs
26537 (list python-speg))
26538 (home-page "https://github.com/avakar/pycson")
26539 (synopsis "Parser for Coffeescript Object Notation (CSON)")
26540 (description "This package is a parser for Coffeescript Object
26541 Notation (CSON).")
26542 (license license:expat)))
26543
26544 (define-public python-aionotify
26545 (package
26546 (name "python-aionotify")
26547 (version "0.2.0")
26548 (source
26549 (origin
26550 ;; Source tarball on PyPi lacks tests
26551 (method git-fetch)
26552 (uri (git-reference
26553 (url "https://github.com/rbarrois/aionotify")
26554 (commit (string-append "v" version))))
26555 (file-name (git-file-name name version))
26556 (sha256
26557 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
26558 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
26559 (build-system python-build-system)
26560 (home-page "https://github.com/rbarrois/aionotify")
26561 (synopsis "Asyncio-powered inotify library")
26562 (description
26563 "@code{aionotify} is a simple, asyncio-based inotify library.")
26564 (license license:bsd-3)))
26565
26566 (define-public python-forbiddenfruit
26567 (package
26568 (name "python-forbiddenfruit")
26569 (version "0.1.3")
26570 (source
26571 (origin
26572 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
26573 (method git-fetch)
26574 (uri (git-reference
26575 (url "https://github.com/clarete/forbiddenfruit")
26576 (commit version)))
26577 (file-name (git-file-name name version))
26578 (sha256
26579 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
26580 (build-system python-build-system)
26581 (arguments
26582 '(#:phases
26583 (modify-phases %standard-phases
26584 (replace 'check
26585 (lambda _
26586 (invoke "make" "SKIP_DEPS=1"))))))
26587 (native-inputs
26588 (list python-nose python-coverage))
26589 (home-page "https://github.com/clarete/forbiddenfruit")
26590 (synopsis "Patch python built-in objects")
26591 (description "This project allows Python code to extend built-in types.")
26592 (license (list license:gpl3+ license:expat))))
26593
26594 (define-public python-k5test
26595 (package
26596 (name "python-k5test")
26597 (version "0.9.2")
26598 (source
26599 (origin
26600 (method url-fetch)
26601 (uri (pypi-uri "k5test" version))
26602 (sha256
26603 (base32
26604 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
26605 (build-system python-build-system)
26606 (propagated-inputs
26607 (list python-six
26608 ;; `which`, `kadmin.local` binaries called inside library
26609 which mit-krb5))
26610 (native-inputs (list mit-krb5))
26611 (arguments
26612 '(#:phases
26613 (modify-phases %standard-phases
26614 (add-after 'unpack 'apply-upstream-fixes
26615 (lambda* _
26616 (substitute* "k5test/realm.py"
26617 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
26618 (("'kadmin_local'") "'kadmin.local'")
26619 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
26620 (("\\.stop_daemon") "._stop_daemon")))))))
26621 (home-page "https://github.com/pythongssapi/k5test")
26622 (synopsis "Library for setting up self-contained Kerberos 5 environments")
26623 (description
26624 "@code{k5test} is a library for setting up self-contained Kerberos 5
26625 environments, and running Python unit tests inside those environments. It is
26626 based on the file of the same name found alongside the MIT Kerberos 5 unit
26627 tests.")
26628 (license license:isc)))
26629
26630 (define-public python-gssapi
26631 (package
26632 (name "python-gssapi")
26633 (version "1.6.12")
26634 (source
26635 (origin
26636 (method url-fetch)
26637 (uri (pypi-uri "gssapi" version))
26638 (sha256
26639 (base32
26640 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
26641 (build-system python-build-system)
26642 (propagated-inputs
26643 (list python-decorator python-six))
26644 (inputs
26645 (list mit-krb5))
26646 ;; for tests
26647 (native-inputs
26648 (list python-parameterized python-k5test python-nose))
26649 (home-page "https://github.com/pythongssapi/python-gssapi")
26650 (synopsis "Python GSSAPI Wrapper")
26651 (description
26652 "Python-GSSAPI provides both low-level and high level wrappers around the
26653 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
26654 also be usable with other GSSAPI mechanisms.")
26655 (license license:isc)))
26656
26657 (define-public python-check-manifest
26658 (package
26659 (name "python-check-manifest")
26660 (version "0.37")
26661 (source
26662 (origin
26663 (method url-fetch)
26664 (uri (pypi-uri "check-manifest" version))
26665 (sha256
26666 (base32
26667 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
26668 (build-system python-build-system)
26669 (native-inputs
26670 (list python-mock git))
26671 (home-page "https://github.com/mgedmin/check-manifest")
26672 (synopsis "Check MANIFEST.in in a Python source package for completeness")
26673 (description "Python package can include a MANIFEST.in file to help with
26674 sending package files to the Python Package Index. This package checks that
26675 file to ensure it completely and accurately describes your project.")
26676 (license license:expat)))
26677
26678 (define-public python-android-stringslib
26679 (package
26680 (name "python-android-stringslib")
26681 (version "0.1.2")
26682 (source
26683 (origin
26684 (method git-fetch)
26685 (uri (git-reference
26686 (url "https://framagit.org/tyreunom/python-android-strings-lib")
26687 (commit (string-append "v" version))))
26688 (file-name (git-file-name name version))
26689 (sha256
26690 (base32
26691 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
26692 (build-system python-build-system)
26693 (arguments
26694 `(#:tests? #f))
26695 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
26696 (synopsis "Android strings.xml support")
26697 (description "Android Strings Lib provides support for android's strings.xml
26698 files. These files are used to translate strings in android apps.")
26699 (license license:expat)))
26700
26701 (define-public python-watchdog
26702 (package
26703 (name "python-watchdog")
26704 (version "2.1.6")
26705 (source
26706 (origin
26707 (method url-fetch)
26708 (uri (pypi-uri "watchdog" version))
26709 (sha256
26710 (base32 "1rx2nyl0cyj0v4ja795cl3gi26577c5wg48syr3byz3ndkgpavm3"))))
26711 (build-system python-build-system)
26712 (arguments
26713 `(#:phases
26714 (modify-phases %standard-phases
26715 (replace 'check
26716 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
26717 (when tests?
26718 (add-installed-pythonpath inputs outputs)
26719 (invoke "python" "-m" "pytest" "-k"
26720 ;; This test failed.
26721 "not test_kill_auto_restart")))))))
26722 (propagated-inputs
26723 (list python-pathtools python-pyyaml))
26724 (native-inputs
26725 (list python-pytest-cov python-pytest-timeout))
26726 (home-page "https://github.com/gorakhargosh/watchdog")
26727 (synopsis "File system events monitoring")
26728 (description "This package provides a way to monitor file system events
26729 such as a file modification and trigger an action. This is similar to inotify,
26730 but portable.")
26731 (license license:asl2.0)))
26732
26733 (define-public python-watchgod
26734 (package
26735 (name "python-watchgod")
26736 (version "0.7")
26737 (source
26738 (origin
26739 ;; There are no tests in the PyPI tarball.
26740 (method git-fetch)
26741 (uri (git-reference
26742 (url "https://github.com/samuelcolvin/watchgod")
26743 (commit (string-append "v" version))))
26744 (file-name (git-file-name name version))
26745 (sha256
26746 (base32 "1w2xsidwp9n4giqhja0bzw7rwrh01db0kdxf2n54mv3dkx545jpq"))))
26747 (build-system python-build-system)
26748 (arguments
26749 `(#:phases
26750 (modify-phases %standard-phases
26751 (replace 'check
26752 (lambda* (#:key tests? #:allow-other-keys)
26753 (when tests?
26754 (invoke "pytest" "-vv"
26755 "-o" "asyncio_mode=auto")))))))
26756 (native-inputs
26757 (list python-coverage
26758 python-pygments
26759 python-pytest
26760 python-pytest-asyncio
26761 python-pytest-cov
26762 python-pytest-mock
26763 python-pytest-sugar
26764 python-pytest-toolbox))
26765 (home-page "https://github.com/samuelcolvin/watchgod")
26766 (synopsis "Simple, modern file watching and code reload in Python")
26767 (description
26768 "Simple, modern file watching and code reload in Python inspired by
26769 @code{watchdog}. Among the differences are a unified approach for each
26770 operating systems and an elegant approach to concurrency using threading.")
26771 (license license:expat)))
26772
26773 (define-public python-wget
26774 (package
26775 (name "python-wget")
26776 (version "3.2")
26777 (source
26778 (origin
26779 (method url-fetch)
26780 (uri (pypi-uri "wget" version ".zip"))
26781 (sha256
26782 (base32
26783 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
26784 (build-system python-build-system)
26785 (native-inputs (list unzip))
26786 (home-page "https://bitbucket.org/techtonik/python-wget/")
26787 (synopsis "Pure Python download utility")
26788 (description "The python-wget library provides an API to download files
26789 with features similar to the @command{wget} utility.")
26790 (license license:unlicense)))
26791
26792 (define-public offlate
26793 (package
26794 (name "offlate")
26795 (version "0.5")
26796 (source
26797 (origin
26798 (method git-fetch)
26799 (uri (git-reference
26800 (url "https://framagit.org/tyreunom/offlate")
26801 (commit version)))
26802 (file-name (git-file-name name version))
26803 (sha256
26804 (base32
26805 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
26806 (build-system python-build-system)
26807 (arguments
26808 ;; No tests
26809 `(#:tests? #f))
26810 (propagated-inputs
26811 (list python-android-stringslib
26812 python-dateutil
26813 python-gitlab
26814 python-lxml
26815 python-polib
26816 python-pyenchant
26817 python-pygit2
26818 python-pygithub
26819 python-pyqt
26820 python-requests
26821 python-ruamel.yaml
26822 python-translation-finder
26823 python-watchdog))
26824 (native-inputs
26825 (list qttools))
26826 (home-page "https://framagit.org/tyreunom/offlate")
26827 (synopsis "Offline translation interface for online translation tools")
26828 (description "Offlate offers a unified interface for different translation
26829 file formats, as well as many different online translation platforms. You can
26830 use it to get work from online platforms, specialized such as the Translation
26831 Project, or not such a gitlab instance when your upstream doesn't use any
26832 dedicated platform. The tool proposes a unified interface for any format and
26833 an upload option to send your work back to the platform.")
26834 (license license:gpl3+)))
26835
26836 (define-public python-titlecase
26837 (package
26838 (name "python-titlecase")
26839 (version "0.12.0")
26840 (source
26841 (origin
26842 (method url-fetch)
26843 (uri (pypi-uri "titlecase" version))
26844 (sha256
26845 (base32
26846 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
26847 (build-system python-build-system)
26848 (native-inputs
26849 (list python-nose))
26850 (home-page "https://github.com/ppannuto/python-titlecase")
26851 (synopsis "Capitalize strings similar to book titles")
26852 (description
26853 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
26854 It capitalizes (predominantly English) strings in a way that is similar to
26855 book titles, using the New York Times Manual of Style to leave certain words
26856 lowercase.")
26857 (license license:expat)))
26858
26859 (define-public python-pypng
26860 (package
26861 (name "python-pypng")
26862 (version "0.0.20")
26863 (source
26864 (origin
26865 (method url-fetch)
26866 (uri (pypi-uri "pypng" version))
26867 (sha256
26868 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
26869 (build-system python-build-system)
26870 (home-page "https://github.com/drj11/pypng")
26871 (synopsis "Pure Python PNG image encoder/decoder")
26872 (description
26873 "The PyPNG module implements support for PNG images. It reads and writes
26874 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
26875 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
26876 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
26877 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
26878 A number of optional chunks can be specified (when writing) and
26879 understood (when reading): tRNS, bKGD, gAMA.
26880
26881 PyPNG is not a high level toolkit for image processing (like PIL) and does not
26882 aim at being a replacement or competitor. Its strength lies in fine-grained
26883 extensive support of PNG features. It can also read and write Netpbm PAM
26884 files, with a focus on its use as an intermediate format for implementing
26885 custom PNG processing.")
26886 (license license:expat)))
26887
26888 (define-public python-fuzzywuzzy
26889 (package
26890 (name "python-fuzzywuzzy")
26891 (version "0.18.0")
26892 (source
26893 (origin
26894 (method url-fetch)
26895 (uri (pypi-uri "fuzzywuzzy" version))
26896 (sha256
26897 (base32
26898 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
26899 (build-system python-build-system)
26900 (native-inputs
26901 (list python-hypothesis python-pycodestyle python-pytest))
26902 (propagated-inputs
26903 (list python-levenshtein))
26904 (home-page "https://github.com/seatgeek/fuzzywuzzy")
26905 (synopsis "Fuzzy string matching in Python")
26906 (description "Approximate string matching using
26907 @emph{Levenshtein Distance} to calculate the differences between
26908 sequences.")
26909 (license license:gpl2)))
26910
26911 (define-public python2-fuzzywuzzy
26912 (package-with-python2 python-fuzzywuzzy))
26913
26914 (define-public python-block-tracing
26915 (package
26916 (name "python-block-tracing")
26917 (version "1.0.1")
26918 (source
26919 (origin
26920 (method url-fetch)
26921 (uri (pypi-uri "block_tracing" version))
26922 (sha256
26923 (base32
26924 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
26925 (build-system python-build-system)
26926 (arguments '(#:tests? #f)) ; no tests
26927 (home-page "https://github.com/rianhunter/block_tracing")
26928 (synopsis "Protect process memory")
26929 (description
26930 "@code{block_tracing} is a tiny Python library that can be used to
26931 prevent debuggers and other applications from inspecting the memory within
26932 your process.")
26933 (license license:expat)))
26934
26935 (define-public python-gcovr
26936 (package
26937 (name "python-gcovr")
26938 (version "4.2")
26939 (source
26940 (origin
26941 (method url-fetch)
26942 (uri (pypi-uri "gcovr" version))
26943 (sha256
26944 (base32
26945 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
26946 (build-system python-build-system)
26947 (propagated-inputs
26948 (list python-lxml python-jinja2))
26949 (home-page "https://gcovr.com/")
26950 (synopsis "Utility for generating code coverage results")
26951 (description
26952 "Gcovr provides a utility for managing the use of the GNU gcov
26953 utility and generating summarized code coverage results. It is inspired
26954 by the Python coverage.py package, which provides a similar utility for
26955 Python.")
26956 (license license:bsd-3)))
26957
26958 (define-public python-owslib
26959 (package
26960 (name "python-owslib")
26961 (version "0.19.2")
26962 (source
26963 (origin
26964 (method url-fetch)
26965 (uri (pypi-uri "OWSLib" version))
26966 (sha256
26967 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
26968 (build-system python-build-system)
26969 (arguments
26970 ;; TODO: package dependencies required for tests.
26971 '(#:tests? #f
26972 #:phases (modify-phases %standard-phases
26973 (delete 'sanity-check))))
26974 (synopsis "Interface for Open Geospatial Consortium web service")
26975 (description
26976 "OWSLib is a Python package for client programming with Open Geospatial
26977 Consortium (OGC) web service (hence OWS) interface standards, and their related
26978 content models.")
26979 (home-page "https://geopython.github.io/OWSLib/")
26980 (license license:bsd-3)))
26981
26982 (define-public python-docusign-esign
26983 (package
26984 (name "python-docusign-esign")
26985 (version "3.1.0")
26986 (source (origin
26987 (method url-fetch)
26988 (uri (pypi-uri "docusign_esign" version))
26989 (sha256
26990 (base32
26991 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
26992 (build-system python-build-system)
26993 ;; Testing requires undocumented setup changes, and so testing is disabled here.
26994 (arguments `(#:tests? #f))
26995 (propagated-inputs
26996 (list python-certifi
26997 python-six
26998 python-dateutil
26999 python-urllib3
27000 python-pyjwt
27001 python-cryptography
27002 python-nose))
27003 (synopsis "DocuSign Python Client")
27004 (description "The Official DocuSign Python Client Library used to interact
27005 with the eSign REST API. Send, sign, and approve documents using this client.")
27006 (home-page "https://www.docusign.com/devcenter")
27007 (license license:expat)))
27008
27009 (define-public python-xattr
27010 (package
27011 (name "python-xattr")
27012 (version "0.9.9")
27013 (source
27014 (origin
27015 (method url-fetch)
27016 (uri (pypi-uri "xattr" version))
27017 (sha256
27018 (base32
27019 "0ipkfblyvp5hylahjkw9zss1ii9xnwjypr3b3ncv989szcg7xjq9"))))
27020 (build-system python-build-system)
27021 (propagated-inputs
27022 (list python-cffi))
27023 (home-page "https://github.com/xattr/xattr")
27024 (synopsis
27025 "Python wrapper for extended file system attributes")
27026 (description "This package provides a Python wrapper for using extended
27027 file system attributes. Extended attributes extend the basic attributes of files
27028 and directories in the file system. They are stored as name:data pairs
27029 associated with file system objects (files, directories, symlinks, etc).")
27030 (license license:expat)))
27031
27032 (define-public python-json-logger
27033 (package
27034 (name "python-json-logger")
27035 (version "0.1.11")
27036 (source
27037 (origin
27038 (method url-fetch)
27039 (uri (pypi-uri "python-json-logger" version))
27040 (sha256
27041 (base32
27042 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
27043 (build-system python-build-system)
27044 (home-page
27045 "https://github.com/madzak/python-json-logger")
27046 (synopsis "JSON log formatter in Python")
27047 (description "This library allows standard Python logging to output log data
27048 as JSON objects. With JSON we can make our logs more readable by machines and
27049 we can stop writing custom parsers for syslog-type records.")
27050 (license license:bsd-3)))
27051
27052 (define-public python-daiquiri
27053 (package
27054 (name "python-daiquiri")
27055 (version "2.1.1")
27056 (source
27057 (origin
27058 (method url-fetch)
27059 (uri (pypi-uri "daiquiri" version))
27060 (sha256
27061 (base32
27062 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
27063 (build-system python-build-system)
27064 (propagated-inputs
27065 (list python-json-logger))
27066 (native-inputs
27067 (list python-mock python-pytest python-setuptools-scm python-six))
27068 (home-page "https://github.com/jd/daiquiri")
27069 (synopsis
27070 "Library to configure Python logging easily")
27071 (description "The daiquiri library provides an easy way to configure
27072 logging in Python. It also provides some custom formatters and handlers.")
27073 (license license:asl2.0)))
27074
27075 (define-public python-pifpaf
27076 (package
27077 (name "python-pifpaf")
27078 (version "3.1.5")
27079 (source
27080 (origin
27081 (method url-fetch)
27082 (uri (pypi-uri "pifpaf" version))
27083 (sha256
27084 (base32
27085 "19bdmxldc2m570isl7hbqgbb20si4sin7pi5fw8sv9py8dyv2s4n"))))
27086 (build-system python-build-system)
27087 (arguments
27088 '(#:phases
27089 (modify-phases %standard-phases
27090 (replace 'check
27091 (lambda _
27092 (invoke "python" "setup.py" "testr" "--slowest"
27093 "--testr-args=until-failure"))))))
27094 (propagated-inputs
27095 (list python-click
27096 python-daiquiri
27097 python-fixtures
27098 python-jinja2
27099 python-pbr
27100 python-psutil
27101 python-xattr))
27102 (native-inputs
27103 (list python-mock python-os-testr python-requests
27104 python-testrepository python-testtools))
27105 (home-page "https://github.com/jd/pifpaf")
27106 (synopsis "Tools and fixtures to manage daemons for testing in Python")
27107 (description "Pifpaf is a suite of fixtures and a command-line tool that
27108 starts and stops daemons for a quick throw-away usage. This is typically
27109 useful when needing these daemons to run integration testing. It originally
27110 evolved from its precursor @code{overtest}.")
27111 (license license:asl2.0)))
27112
27113 (define-public python-pytest-check-links
27114 (package
27115 (name "python-pytest-check-links")
27116 (version "0.3.0")
27117 (source
27118 (origin
27119 (method url-fetch)
27120 ;; URI uses underscores
27121 (uri (pypi-uri "pytest_check_links" version))
27122 (sha256
27123 (base32
27124 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
27125 (build-system python-build-system)
27126 (propagated-inputs
27127 (list python-docutils
27128 python-html5lib
27129 python-nbconvert
27130 python-nbformat
27131 python-pytest
27132 python-six))
27133 (native-inputs
27134 (list python-pbr-minimal))
27135 (home-page "https://github.com/minrk/pytest-check-links")
27136 (synopsis "Check links in files")
27137 (description "This package provides a pytest plugin that checks URLs for
27138 HTML-containing files.")
27139 (license license:bsd-3)))
27140
27141 (define-public python-json5
27142 (package
27143 (name "python-json5")
27144 (version "0.8.5")
27145 (source
27146 (origin
27147 ;; sample.json5 is missing from PyPi source tarball
27148 (method git-fetch)
27149 (uri (git-reference
27150 (url "https://github.com/dpranke/pyjson5")
27151 (commit (string-append "v" version))))
27152 (file-name (git-file-name name version))
27153 (sha256
27154 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
27155 (build-system python-build-system)
27156 (home-page "https://github.com/dpranke/pyjson5")
27157 (synopsis
27158 "Python implementation of the JSON5 data format")
27159 (description
27160 "JSON5 extends the JSON data interchange format to make it slightly more
27161 usable as a configuration language. This Python package implements parsing and
27162 dumping of JSON5 data structures.")
27163 (license license:asl2.0)))
27164
27165 (define-public python-frozendict
27166 (package
27167 (name "python-frozendict")
27168 (version "1.2")
27169 (source
27170 (origin
27171 (method url-fetch)
27172 (uri (pypi-uri "frozendict" version))
27173 (sha256
27174 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
27175 (build-system python-build-system)
27176 (home-page "https://github.com/slezica/python-frozendict")
27177 (synopsis "Simple immutable mapping for Python")
27178 (description
27179 "@dfn{frozendict} is an immutable wrapper around dictionaries that
27180 implements the complete mapping interface. It can be used as a drop-in
27181 replacement for dictionaries where immutability is desired.")
27182 (license license:expat)))
27183
27184 (define-public python-unpaddedbase64
27185 (package
27186 (name "python-unpaddedbase64")
27187 (version "2.1.0")
27188 (source
27189 (origin
27190 (method url-fetch)
27191 (uri (pypi-uri "unpaddedbase64" version))
27192 (sha256
27193 (base32 "01ghlmw63fgslwj8j74vkpf1kqvr7a4agm6nyn89vqwx106ccwvj"))))
27194 (build-system python-build-system)
27195 (arguments
27196 `(#:phases
27197 (modify-phases %standard-phases
27198 (replace 'check
27199 (lambda* (#:key inputs tests? #:allow-other-keys)
27200 (when tests?
27201 (copy-recursively (string-append
27202 (assoc-ref inputs "tests") "/tests")
27203 "tests")
27204 (invoke "python" "-m" "pytest" "-vv")))))))
27205 (native-inputs
27206 `(("python-pytest" ,python-pytest)
27207 ("tests"
27208 ;; The release on pypi comes without tests. We can't build from this
27209 ;; checkout, though, because installation requires an invocation of
27210 ;; poetry.
27211 ,(origin
27212 (method git-fetch)
27213 (uri (git-reference
27214 (url "https://github.com/matrix-org/python-unpaddedbase64")
27215 (commit (string-append "v" version))))
27216 (file-name (git-file-name name version))
27217 (sha256
27218 (base32
27219 "1n6har8pxv0mqb96lanzihp1xf76aa17jw3977drb1fgz947pnmz"))))))
27220 (home-page "https://github.com/matrix-org/python-unpaddedbase64")
27221 (synopsis "Encode and decode Base64 without “=” padding")
27222 (description
27223 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
27224 using “=” characters. However this conveys no benefit so many protocols
27225 choose to use Base64 without the “=” padding.")
27226 (license license:asl2.0)))
27227
27228 (define-public python-py-cpuinfo
27229 (package
27230 (name "python-py-cpuinfo")
27231 (version "5.0.0")
27232 (source
27233 (origin
27234 (method url-fetch)
27235 (uri (pypi-uri "py-cpuinfo" version))
27236 (sha256
27237 (base32
27238 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
27239 (build-system python-build-system)
27240 (home-page "https://github.com/workhorsy/py-cpuinfo")
27241 (synopsis "Get CPU info with Python")
27242 (description
27243 "This Python module returns the CPU info by using the best sources of
27244 information for your operating system.")
27245 (license license:expat)))
27246
27247 (define-public python-canonicaljson
27248 (package
27249 (name "python-canonicaljson")
27250 (version "1.4.0")
27251 (source
27252 (origin
27253 (method url-fetch)
27254 (uri (pypi-uri "canonicaljson" version))
27255 (sha256
27256 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
27257 (build-system python-build-system)
27258 (propagated-inputs
27259 (list python-six python-frozendict python-simplejson))
27260 (home-page "https://github.com/matrix-org/python-canonicaljson")
27261 (synopsis "Canonical JSON")
27262 (description
27263 "Deterministically encode JSON.
27264
27265 @itemize
27266 @item Encodes objects and arrays as RFC 7159 JSON.
27267 @item Sorts object keys so that you get the same result each time.
27268 @item Has no insignificant whitespace to make the output as small as possible.
27269 @item Escapes only the characters that must be escaped, U+0000 to
27270 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
27271 @item Uses the shortest escape sequence for each escaped character.
27272 @item Encodes the JSON as UTF-8.
27273 @item Can encode frozendict immutable dictionaries.
27274 @end itemize")
27275 (license license:asl2.0)))
27276
27277 (define-public python-signedjson
27278 (package
27279 (name "python-signedjson")
27280 (version "1.1.1")
27281 (source
27282 (origin
27283 (method url-fetch)
27284 (uri (pypi-uri "signedjson" version))
27285 (sha256
27286 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
27287 (build-system python-build-system)
27288 (propagated-inputs
27289 (list python-canonicaljson python-importlib-metadata python-pynacl
27290 python-typing-extensions python-unpaddedbase64))
27291 (native-inputs
27292 (list python-setuptools-scm))
27293 (home-page "https://github.com/matrix-org/python-signedjson")
27294 (synopsis "Sign JSON objects with ED25519 signatures")
27295 (description
27296 "Sign JSON objects with ED25519 signatures.
27297
27298 @itemize
27299 @item More than one entity can sign the same object.
27300 @item Each entity can sign the object with more than one key making it easier to
27301 rotate keys
27302 @item ED25519 can be replaced with a different algorithm.
27303 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
27304 key.
27305 @end itemize")
27306 (license license:asl2.0)))
27307
27308 (define-public python-daemonize
27309 (package
27310 (name "python-daemonize")
27311 (version "2.5.0")
27312 (source
27313 (origin
27314 (method url-fetch)
27315 (uri (pypi-uri "daemonize" version))
27316 (sha256
27317 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
27318 (build-system python-build-system)
27319 (home-page "https://github.com/thesharp/daemonize")
27320 (synopsis "Library for writing system daemons in Python")
27321 (description "Daemonize is a library for writing system daemons in Python.")
27322 (license license:expat)))
27323
27324 (define-public python-pymacaroons
27325 (package
27326 (name "python-pymacaroons")
27327 (version "0.13.0")
27328 (source
27329 (origin
27330 (method url-fetch)
27331 (uri (pypi-uri "pymacaroons" version))
27332 (sha256
27333 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
27334 (build-system python-build-system)
27335 (propagated-inputs
27336 (list python-six python-pynacl))
27337 (home-page "https://github.com/ecordell/pymacaroons")
27338 (synopsis "Python Macaroon Library")
27339 (description
27340 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
27341 tokens, macaroons embed caveats that define specific authorization
27342 requirements for the target service, the service that issued the root macaroon
27343 and which is capable of verifying the integrity of macaroons it receives.
27344
27345 Macaroons allow for delegation and attenuation of authorization. They are
27346 simple and fast to verify, and decouple authorization policy from the
27347 enforcement of that policy.")
27348 (license license:expat)))
27349
27350 (define-public python-ldap3
27351 (package
27352 (name "python-ldap3")
27353 (version "2.7")
27354 (home-page "https://github.com/cannatag/ldap3")
27355 (source
27356 (origin
27357 (method git-fetch)
27358 (uri (git-reference (url home-page)
27359 (commit (string-append "v" version))))
27360 (file-name (git-file-name name version))
27361 (sha256
27362 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
27363 (build-system python-build-system)
27364 (arguments
27365 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
27366 #:phases (modify-phases %standard-phases
27367 (replace 'check
27368 (lambda* (#:key tests? #:allow-other-keys)
27369 (when tests?
27370 (invoke "nosetests" "-s" "test"))
27371 #t)))))
27372 (native-inputs
27373 (list python-nose))
27374 (propagated-inputs
27375 (list python-gssapi python-pyasn1))
27376 (synopsis "Python LDAP client")
27377 (description
27378 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
27379 library.")
27380 (license license:lgpl3+)))
27381
27382 (define-public python-boltons
27383 (package
27384 (name "python-boltons")
27385 (version "20.0.0")
27386 (source
27387 (origin
27388 (method url-fetch)
27389 (uri (pypi-uri "boltons" version))
27390 (sha256
27391 (base32
27392 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
27393 (build-system python-build-system)
27394 (home-page "https://github.com/mahmoud/boltons")
27395 (synopsis "Extensions to the Python standard library")
27396 (description
27397 "Boltons is a set of over 230 pure-Python utilities in the same spirit
27398 as — and yet conspicuously missing from — the standard library, including:
27399
27400 @itemize
27401 @item Atomic file saving, bolted on with fileutils
27402 @item A highly-optimized OrderedMultiDict, in dictutils
27403 @item Two types of PriorityQueue, in queueutils
27404 @item Chunked and windowed iteration, in iterutils
27405 @item Recursive data structure iteration and merging, with iterutils.remap
27406 @item Exponential backoff functionality, including jitter, through
27407 iterutils.backoff
27408 @item A full-featured TracebackInfo type, for representing stack traces, in
27409 tbutils
27410 @end itemize")
27411 (license license:bsd-3)))
27412
27413 (define-public python-eliot
27414 (package
27415 (name "python-eliot")
27416 (version "1.13.0")
27417 (source
27418 (origin
27419 (method url-fetch)
27420 (uri (pypi-uri "eliot" version))
27421 (sha256
27422 (base32 "1xzzhsjrrw430dc84vamf683bwp9i0nr86xf2iav6yla615ijq2p"))))
27423 (build-system python-build-system)
27424 (arguments
27425 `(#:phases
27426 (modify-phases %standard-phases
27427 (add-after 'unpack 'remove-journald-support
27428 (lambda _
27429 (for-each delete-file
27430 '("eliot/tests/test_journald.py"
27431 "eliot/journald.py"))
27432 #t))
27433 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
27434 ;; remove command-line tool's tests. TODO eliot-prettyprint should
27435 ;; be installed and these tests should pass.
27436 (lambda _
27437 (delete-file "eliot/tests/test_prettyprint.py")
27438 #t))
27439 (add-after 'remove-eliot-prettyprint-tests 'remove-failing-tests
27440 (lambda _
27441 ;; These tests started to fail after updating python-pandas to
27442 ;; 1.3.3 and python-dask to 2021.9.1.
27443 (substitute* "eliot/tests/test_validation.py"
27444 (("test_omitLoggerFromActionType")
27445 "_test_omitLoggerFromActionType")
27446 (("test_logCallsDefaultLoggerWrite")
27447 "_test_logCallsDefaultLoggerWrite"))
27448 #t)))))
27449 (propagated-inputs
27450 (list python-boltons python-pyrsistent python-six
27451 python-zope-interface))
27452 (native-inputs
27453 (list python-black
27454 python-coverage
27455 python-dask
27456 python-flake8
27457 python-hypothesis
27458 python-pytest
27459 python-setuptools
27460 python-sphinx
27461 python-sphinx-rtd-theme
27462 python-testtools
27463 python-twine
27464 python-twisted))
27465 (home-page "https://github.com/itamarst/eliot/")
27466 (synopsis "Eliot: the logging system that tells you why it happened")
27467 (description
27468 "@dfn{eliot} is a Python logging system that outputs causal chains of
27469 actions: actions can spawn other actions, and eventually they either succeed
27470 or fail. The resulting logs tell you the story of what your software did: what
27471 happened, and what caused it.")
27472 (license license:asl2.0)))
27473
27474 (define-public python-pem
27475 (package
27476 (name "python-pem")
27477 (version "20.1.0")
27478 (source
27479 (origin
27480 (method url-fetch)
27481 (uri (pypi-uri "pem" version))
27482 (sha256
27483 (base32
27484 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
27485 (build-system python-build-system)
27486 (native-inputs
27487 (list python-certifi
27488 python-coverage
27489 python-pretend
27490 python-pyopenssl
27491 python-pytest
27492 python-sphinx
27493 python-twisted))
27494 (home-page "https://pem.readthedocs.io/")
27495 (synopsis "Easy PEM file parsing in Python")
27496 (description
27497 "This package provides a Python module for parsing and splitting PEM files.")
27498 (license license:expat)))
27499
27500 (define-public python-txsni
27501 ;; We need a few commits on top of 0.1.9 for compatibility with newer
27502 ;; Python and OpenSSL.
27503 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
27504 (revision "0"))
27505 (package
27506 (name "python-txsni")
27507 (version (git-version "0.1.9" revision commit))
27508 (home-page "https://github.com/glyph/txsni")
27509 (source
27510 (origin
27511 (method git-fetch)
27512 (uri (git-reference (url home-page) (commit commit)))
27513 (file-name (git-file-name name version))
27514 (sha256
27515 (base32
27516 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
27517 (build-system python-build-system)
27518 (propagated-inputs
27519 (list python-pyopenssl python-service-identity python-twisted))
27520 (synopsis "Run TLS servers with Twisted")
27521 (description
27522 "This package provides an easy-to-use SNI endpoint for use
27523 with the Twisted web framework.")
27524 (license license:expat))))
27525
27526 (define-public python-txacme
27527 (package
27528 (name "python-txacme")
27529 (version "0.9.2")
27530 (source
27531 (origin
27532 (method url-fetch)
27533 (uri (pypi-uri "txacme" version))
27534 (sha256
27535 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
27536 (build-system python-build-system)
27537 (propagated-inputs
27538 (list python-acme
27539 python-attrs
27540 python-eliot
27541 python-josepy
27542 python-pem
27543 python-treq
27544 python-twisted
27545 python-txsni))
27546 (native-inputs
27547 (list python-fixtures
27548 python-hypothesis
27549 python-mock
27550 python-service-identity
27551 python-testrepository
27552 python-testscenarios
27553 python-testtools))
27554 (home-page "https://github.com/twisted/txacme")
27555 (synopsis "Twisted implexmentation of the ACME protocol")
27556 (description
27557 "ACME is Automatic Certificate Management Environment, a protocol that
27558 allows clients and certificate authorities to automate verification and
27559 certificate issuance. The ACME protocol is used by the free Let's Encrypt
27560 Certificate Authority.
27561
27562 txacme is an implementation of the protocol for Twisted, the event-driven
27563 networking engine for Python.")
27564 (license license:expat)))
27565
27566 (define-public python-pysaml2
27567 (package
27568 (name "python-pysaml2")
27569 (version "6.5.1")
27570 (source
27571 (origin
27572 (method url-fetch)
27573 (uri (pypi-uri "pysaml2" version))
27574 (sha256
27575 (base32
27576 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
27577 (build-system python-build-system)
27578 (propagated-inputs
27579 (list python-cryptography
27580 python-dateutil
27581 python-defusedxml
27582 python-importlib-resources
27583 python-pyopenssl
27584 python-pytz
27585 python-requests
27586 python-six
27587 python-xmlschema))
27588 (home-page "https://idpy.org")
27589 (synopsis "Python implementation of SAML Version 2 Standard")
27590 (description
27591 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
27592 It contains all necessary pieces for building a SAML2 service provider or
27593 an identity provider. The distribution contains examples of both.
27594
27595 This package was originally written to work in a WSGI environment, but
27596 there are extensions that allow you to use it with other frameworks.")
27597 (license license:asl2.0)))
27598
27599 (define-public python-click-plugins
27600 (package
27601 (name "python-click-plugins")
27602 (version "1.1.1")
27603 (source
27604 (origin
27605 (method url-fetch)
27606 (uri (pypi-uri "click-plugins" version))
27607 (sha256
27608 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
27609 (build-system python-build-system)
27610 (native-inputs
27611 (list python-pytest))
27612 (propagated-inputs
27613 (list python-click))
27614 (synopsis "Extension for Click to register external CLI commands")
27615 (description "This package provides n extension module for Click to
27616 register external CLI commands via setuptools entry-points.")
27617 (home-page "https://github.com/click-contrib/click-plugins")
27618 (license license:bsd-3)))
27619
27620 (define-public python-diceware
27621 (package
27622 (name "python-diceware")
27623 (version "0.9.6")
27624 (source
27625 (origin
27626 (method url-fetch)
27627 (uri (pypi-uri "diceware" version))
27628 (sha256
27629 (base32
27630 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
27631 (build-system python-build-system)
27632 (native-inputs
27633 (list python-coverage python-pytest python-pytest-runner))
27634 (home-page "https://github.com/ulif/diceware/")
27635 (synopsis "Generates memorable passphrases")
27636 (description "This package generates passphrases by concatenating words
27637 randomly picked from wordlists. It supports several sources of
27638 randomness (including real life dice) and different wordlists (including
27639 cryptographically signed ones).")
27640 (license license:gpl3+)))
27641
27642 (define-public python-dictdiffer
27643 (package
27644 (name "python-dictdiffer")
27645 (version "0.9.0")
27646 (source (origin
27647 (method url-fetch)
27648 (uri (pypi-uri "dictdiffer" version))
27649 (sha256
27650 (base32
27651 "0y3mk74qm2q9hsm37892i1wzn8bbdrvbs4nmnvqwq4z6pxgwzfhp"))))
27652 (build-system python-build-system)
27653 (arguments
27654 ;; XXX: The PyPI tarball lacks tests and the git repository
27655 ;; fails to determine version.
27656 '(#:tests? #f))
27657 (native-inputs
27658 (list python-pytest-runner python-setuptools-scm))
27659 (home-page "https://github.com/inveniosoftware/dictdiffer")
27660 (synopsis "Diff and patch Python dictionary objects")
27661 (description
27662 "Dictdiffer is a Python module that helps you to diff and patch
27663 dictionaries.")
27664 (license license:expat)))
27665
27666 (define-public python-dictpath
27667 (package
27668 (name "python-dictpath")
27669 (version "0.1.3")
27670 (source
27671 (origin
27672 (method url-fetch)
27673 (uri (pypi-uri "dictpath" version))
27674 (sha256
27675 (base32 "1n4hq4wbgaw59bbb16nhkgg5wk8sl4iw940vjrgx4xmifqxxw73m"))))
27676 (build-system python-build-system)
27677 (native-inputs (list python-pytest python-pytest-cov python-pytest-flake8))
27678 (home-page "https://github.com/p1c2u/pathable")
27679 (synopsis "Object-oriented path library for Python")
27680 (description "This object-oriented dictionary path Python library enables
27681 traversing resources like paths or accessing resources on demand with separate
27682 accessor layer.")
27683 (license license:asl2.0)))
27684
27685 (define-public pyzo
27686 (package
27687 (name "pyzo")
27688 (version "4.12.3")
27689 (source
27690 (origin
27691 (method git-fetch)
27692 (uri (git-reference
27693 (url "https://github.com/pyzo/pyzo.git")
27694 (commit (string-append "v" version))))
27695 (file-name (git-file-name name version))
27696 (sha256
27697 (base32
27698 "0v6rgp52bf9za2spxx9c1yc6wmskvlsj81iw0gipjy7y8vpypgn2"))))
27699 (build-system python-build-system)
27700 (arguments
27701 `(#:phases
27702 (modify-phases %standard-phases
27703 (add-before 'check 'fix-home-directory
27704 (lambda _
27705 ;; Tests fail with "Permission denied: '/homeless-shelter'".
27706 (setenv "HOME" "/tmp"))))
27707 ;; Tests fail with "Uncaught Python exception: python: undefined
27708 ;; symbol: objc_getClass".
27709 #:tests? #f))
27710 (propagated-inputs
27711 (list python-pyqt))
27712 (home-page "https://pyzo.org")
27713 (synopsis
27714 "Python IDE for scientific computing")
27715 (description
27716 "Pyzo is a Python IDE focused on interactivity and introspection,
27717 which makes it very suitable for scientific computing. Its practical
27718 design is aimed at simplicity and efficiency.
27719
27720 It consists of two main components, the editor and the shell, and uses
27721 a set of pluggable tools to help the programmer in various ways. Some
27722 example tools are source structure, project manager, interactive help,
27723 workspace...")
27724 (license license:bsd-2)))
27725
27726 (define-public python-osc
27727 (package
27728 (name "python-osc")
27729 (version "1.7.4")
27730 (source
27731 (origin
27732 (method url-fetch)
27733 (uri (pypi-uri "python-osc" version))
27734 (sha256
27735 (base32
27736 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
27737 (build-system python-build-system)
27738 (home-page "https://github.com/attwad/python-osc")
27739 (synopsis "Open Sound Control server and client implementations")
27740 (description
27741 "@code{python-osc} is a pure Python library with no external
27742 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
27743 Open Sound Control 1.0} specification.")
27744 (license license:unlicense)))
27745
27746 (define-public python-voluptuous
27747 (package
27748 (name "python-voluptuous")
27749 (version "0.11.7")
27750 (source
27751 (origin
27752 (method url-fetch)
27753 (uri (pypi-uri "voluptuous" version))
27754 (sha256
27755 (base32
27756 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
27757 (build-system python-build-system)
27758 (native-inputs
27759 (list python-nose))
27760 (home-page "https://github.com/alecthomas/voluptuous")
27761 (synopsis "Python data validation library")
27762 (description
27763 "Voluptuous is a Python data validation library. It is primarily
27764 intended for validating data coming into Python as JSON, YAML, etc.")
27765 (license license:bsd-3)))
27766
27767 (define-public python-cmd2
27768 (package
27769 (name "python-cmd2")
27770 (version "2.3.3")
27771 (source
27772 (origin
27773 (method url-fetch)
27774 (uri (pypi-uri "cmd2" version))
27775 (sha256
27776 (base32
27777 "0h1naik558qh48gx2iyy0a0khvw5fz0in69y84mbrhsm9nq7w3bm"))))
27778 (build-system python-build-system)
27779 (arguments
27780 '(#:phases
27781 (modify-phases %standard-phases
27782 (replace 'check
27783 (lambda* (#:key tests? #:allow-other-keys)
27784 (if tests?
27785 (invoke "pytest" "-vv" "-k"
27786 ;; These tests fail because no EDITOR is in PATH.
27787 "not test_find_editor_not_specified \
27788 and not test_transcript")
27789 (format #t "test suite not run~%")))))))
27790 (propagated-inputs
27791 (list python-attrs python-colorama python-pyperclip python-wcwidth))
27792 (native-inputs
27793 (list python-invoke
27794 python-mock
27795 python-pytest
27796 python-pytest-cov
27797 python-pytest-mock
27798 python-setuptools-scm))
27799 (home-page "https://github.com/python-cmd2/cmd2")
27800 (synopsis "Tool for building interactive command line applications")
27801 (description
27802 "Cmd2 is a tool for building interactive command line applications in
27803 Python. Its goal is to make it quick and easy for developers to build
27804 feature-rich and user-friendly interactive command line applications. It
27805 provides a simple API which is an extension of Python's built-in @code{cmd}
27806 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
27807 make your life easier and eliminates much of the boilerplate code which would
27808 be necessary when using @code{cmd}.")
27809 (license license:expat)))
27810
27811 (define-public python-pytidylib
27812 (package
27813 (name "python-pytidylib")
27814 (version "0.3.2")
27815 (source (origin
27816 (method url-fetch)
27817 (uri (pypi-uri "pytidylib" version))
27818 (sha256
27819 (base32
27820 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
27821 (build-system python-build-system)
27822 (arguments
27823 '(#:phases
27824 (modify-phases %standard-phases
27825 (add-before 'build 'qualify-libtidy
27826 (lambda* (#:key inputs #:allow-other-keys)
27827 (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
27828 (substitute* "tidylib/tidy.py"
27829 (("ctypes\\.util\\.find_library\\('tidy'\\)")
27830 (format #f "'~a'" libtidy)))
27831 #t))))))
27832 (inputs (list tidy))
27833 (home-page "https://github.com/countergram/pytidylib")
27834 (synopsis "Python wrapper for HTML Tidy library")
27835 (description
27836 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
27837 allows you, from Python code, to “fix” invalid (X)HTML markup.")
27838 (license license:expat)))
27839
27840 (define-public python2-pytidylib
27841 (package-with-python2 python-pytidylib))
27842
27843 (define-public python-mujson
27844 (package
27845 (name "python-mujson")
27846 (version "1.4")
27847 (source
27848 (origin
27849 (method url-fetch)
27850 (uri (pypi-uri "mujson" version))
27851 (sha256
27852 (base32
27853 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
27854 (build-system python-build-system)
27855 (home-page "https://github.com/mattgiles/mujson")
27856 (synopsis "Use the fastest JSON functions available at import time")
27857 (description "This package selects the fastest JSON functions available
27858 at import time.")
27859 (license license:expat)))
27860
27861 (define-public python-bashlex
27862 (package
27863 (name "python-bashlex")
27864 (version "0.14")
27865 (source
27866 (origin
27867 (method url-fetch)
27868 (uri (pypi-uri "bashlex" version))
27869 (sha256
27870 (base32
27871 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
27872 (build-system python-build-system)
27873 (arguments
27874 `(#:phases
27875 (modify-phases %standard-phases
27876 (add-before 'build 'pregenerate-yacc-tables
27877 (lambda _
27878 ;; parser.py caches tables, which attempts to write to site lib
27879 ;; see https://github.com/idank/bashlex/issues/51
27880 (invoke "python" "-c" "import bashlex"))))))
27881 (home-page
27882 "https://github.com/idank/bashlex")
27883 (synopsis "Python parser for bash")
27884 (description "@code{bashlex} is a Python port of the parser used
27885 internally by GNU bash.
27886
27887 For the most part it's transliterated from C, the major differences are:
27888
27889 @itemize
27890 @item it does not execute anything
27891 @item it is reentrant
27892 @item it generates a complete AST
27893 @end itemize
27894 ")
27895 (license license:gpl3+)))
27896
27897 (define-public python-jinxed
27898 (package
27899 (name "python-jinxed")
27900 (version "1.0.0")
27901 (source
27902 (origin
27903 (method url-fetch)
27904 (uri (pypi-uri "jinxed" version))
27905 (sha256
27906 (base32
27907 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
27908 (build-system python-build-system)
27909 (arguments
27910 '(#:phases
27911 (modify-phases %standard-phases
27912 (add-before 'check 'set-environment-variables
27913 (lambda* (#:key inputs #:allow-other-keys)
27914 (let ((ncurses (assoc-ref inputs "ncurses")))
27915 (setenv "TERM" "LINUX")
27916 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
27917 #t))))
27918 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
27919 (native-inputs
27920 (list ncurses))
27921 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
27922 (synopsis "Jinxed Terminal Library")
27923 (description
27924 "Jinxed is an implementation of a subset of the Python curses library.")
27925 (license license:mpl2.0)))
27926
27927 (define-public python-svgutils
27928 (package
27929 (name "python-svgutils")
27930 (version "0.3.4")
27931 (source
27932 (origin
27933 (method url-fetch)
27934 (uri (pypi-uri "svgutils" version))
27935 (sha256
27936 (base32
27937 "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
27938 (build-system python-build-system)
27939 (propagated-inputs
27940 (list python-lxml))
27941 (home-page "https://svgutils.readthedocs.io")
27942 (synopsis "Python SVG editor")
27943 (description "This is an utility package that helps with editing and
27944 concatenating SVG files. It is especially directed at scientists preparing
27945 final figures for submission to journals. So far it supports arbitrary
27946 placement and scaling of SVG figures and adding markers, such as labels.")
27947 (license license:expat)))
27948
27949 (define-public python-blessed
27950 (package
27951 (name "python-blessed")
27952 (version "1.17.8")
27953 (source
27954 (origin
27955 (method url-fetch)
27956 (uri (pypi-uri "blessed" version))
27957 (sha256
27958 (base32
27959 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
27960 (modules '((guix build utils)))
27961 (snippet
27962 '(begin
27963 ;; Don't get hung up on Windows test failures.
27964 (delete-file "blessed/win_terminal.py") #t))))
27965 (build-system python-build-system)
27966 (propagated-inputs
27967 (list python-jinxed python-six python-wcwidth))
27968 (native-inputs
27969 (list python-mock python-pytest))
27970 (home-page "https://github.com/jquast/blessed")
27971 (synopsis "Wrapper around terminal capabilities")
27972 (description
27973 "Blessed is a thin, practical wrapper around terminal styling, screen
27974 positioning, and keyboard input.")
27975 (license license:expat)))
27976
27977 (define-public python-readme-renderer
27978 (package
27979 (name "python-readme-renderer")
27980 (version "34.0")
27981 (source
27982 (origin
27983 (method url-fetch)
27984 (uri (pypi-uri "readme_renderer" version))
27985 (sha256
27986 (base32
27987 "1c75h9znffc2lh4j56yg23l5ifj5l8fbdq3kfigi8vbh45zx3d6z"))))
27988 (build-system python-build-system)
27989 (arguments
27990 '(#:phases (modify-phases %standard-phases
27991 (add-after 'unpack 'loosen-cmarkgfm-dependency
27992 (lambda _
27993 ;; Permit newer versions of cmarkgfm.
27994 (substitute* "setup.py"
27995 (("cmarkgfm>=0\\.5\\.0,<0\\.7\\.0")
27996 "cmarkgfm>=0.5.0"))))
27997 (replace 'check
27998 (lambda* (#:key tests? #:allow-other-keys)
27999 (when tests?
28000 ;; The GFM tests fail due to slight differences in the
28001 ;; generated vs expected HTML due to using a more
28002 ;; recent bleach version (see:
28003 ;; https://github.com/pypa/readme_renderer/issues/234).
28004 (invoke "pytest" "-vv" "-k" "not GFM")))))))
28005 (propagated-inputs
28006 (list python-bleach python-docutils python-pygments
28007
28008 ;; Optional dependencies.
28009 python-cmarkgfm)) ;required by postorius
28010 (native-inputs
28011 (list python-mock python-pytest))
28012 (home-page "https://github.com/pypa/readme_renderer")
28013 (synopsis "Render README files in Warehouse")
28014 (description
28015 "Readme Renderer is a library that will safely render arbitrary README
28016 files into HTML. It is designed to be used in Warehouse to render the
28017 @code{long_description} for packages. It can handle Markdown, reStructuredText,
28018 and plain text.")
28019 (license license:asl2.0)))
28020
28021 (define-public python-lazr-delegates
28022 (package
28023 (name "python-lazr-delegates")
28024 (version "2.0.4")
28025 (source
28026 (origin
28027 (method url-fetch)
28028 (uri (pypi-uri "lazr.delegates" version))
28029 (sha256
28030 (base32
28031 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
28032 (build-system python-build-system)
28033 (arguments
28034 '(#:phases
28035 (modify-phases %standard-phases
28036 (replace 'check
28037 (lambda* (#:key tests? #:allow-other-keys)
28038 (when tests? (invoke "nosetests")))))))
28039 (native-inputs
28040 (list python-nose))
28041 (propagated-inputs
28042 (list python-zope-interface))
28043 (home-page "https://launchpad.net/lazr.delegates")
28044 (synopsis "Easily write objects that delegate behavior")
28045 (description
28046 "The @code{lazr.delegates} package makes it easy to write objects that
28047 delegate behavior to another object. The new object adds some property or
28048 behavior on to the other object, while still providing the underlying interface,
28049 and delegating behavior.")
28050 (license license:lgpl3)))
28051
28052 (define-public python-lazr-config
28053 (package
28054 (name "python-lazr-config")
28055 (version "2.2.3")
28056 (source
28057 (origin
28058 (method url-fetch)
28059 (uri (pypi-uri "lazr.config" version))
28060 (sha256
28061 (base32
28062 "1qdbrzl61q7cjhbnxvw9y3frcr935y7diwy15xrwcv9ynvw76jmp"))))
28063 (build-system python-build-system)
28064 (arguments
28065 '(#:phases
28066 (modify-phases %standard-phases
28067 (replace 'check
28068 (lambda _
28069 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
28070 (native-inputs
28071 (list python-nose))
28072 (propagated-inputs
28073 (list python-lazr-delegates python-zope-interface))
28074 (home-page "https://launchpad.net/lazr.config")
28075 (synopsis "Create configuration schemas and process and validate configurations")
28076 (description
28077 "The LAZR config system is typically used to manage process configuration.
28078 Process configuration is for saying how things change when we run systems on
28079 different machines, or under different circumstances. This system uses ini-like
28080 file format of section, keys, and values. The config file supports inheritance
28081 to minimize duplication of information across files. The format supports schema
28082 validation.")
28083 (license license:lgpl3)))
28084
28085 (define-public python-flufl-bounce
28086 (package
28087 (name "python-flufl-bounce")
28088 (version "4.0")
28089 (source
28090 (origin
28091 (method url-fetch)
28092 (uri (pypi-uri "flufl.bounce" version))
28093 (sha256
28094 (base32
28095 "0c9qc2l47lyqnpwskp6vvi7m3jqh6hx42v6d35dgxh3fjzmlll15"))))
28096 (build-system python-build-system)
28097 (arguments
28098 (list #:phases
28099 #~(modify-phases %standard-phases
28100 (replace 'check
28101 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
28102 (when tests?
28103 (with-directory-excursion
28104 (string-append (site-packages inputs outputs) "/flufl")
28105 (invoke "python" "-m" "nose2" "-v"))))))))
28106 (propagated-inputs
28107 (list python-atpublic python-zope-interface))
28108 (native-inputs
28109 (list python-flufl-testing python-nose2))
28110 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
28111 (synopsis "Email bounce detectors")
28112 (description "The @code{flufl.bounce} library provides a set of heuristics
28113 and an API for detecting the original bouncing email addresses from a bounce
28114 message. Many formats found in the wild are supported, as are VERP and
28115 RFC 3464.")
28116 (license (list license:asl2.0
28117 license:lgpl3)))) ; only for setup_headers.py
28118
28119 (define-public python-flufl-i18n
28120 (package
28121 (name "python-flufl-i18n")
28122 (version "3.0")
28123 (source
28124 (origin
28125 (method url-fetch)
28126 (uri (pypi-uri "flufl.i18n" version))
28127 (sha256
28128 (base32
28129 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
28130 (build-system python-build-system)
28131 (propagated-inputs
28132 (list python-atpublic))
28133 (home-page "https://flufli18n.readthedocs.io")
28134 (synopsis "API for Python internationalization")
28135 (description
28136 "This package provides a high-level, convenient API for managing
28137 internationalization/translation contexts in Python applications. There is a
28138 simple API for single-context applications, such as command line scripts which
28139 only need to translate into one language during the entire course of their
28140 execution. There is a more flexible, but still convenient API for multi-context
28141 applications, such as servers, which may need to switch language contexts for
28142 different tasks.")
28143 (license license:asl2.0)))
28144
28145 (define-public python-flufl-lock
28146 (package
28147 (name "python-flufl-lock")
28148 (version "4.0")
28149 (source
28150 (origin
28151 (method url-fetch)
28152 (uri (pypi-uri "flufl.lock" version))
28153 (sha256
28154 (base32
28155 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
28156 (build-system python-build-system)
28157 (propagated-inputs
28158 (list python-atpublic python-psutil))
28159 (home-page "https://flufllock.readthedocs.io")
28160 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
28161 (description
28162 "The @dfn{flufl.lock} package provides NFS-safe file locking with
28163 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
28164 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
28165 and have a maximum lifetime built-in.")
28166 (license (list license:asl2.0
28167 license:lgpl3)))) ; only for setup_helpers.py
28168
28169 (define-public python-flufl-testing
28170 (package
28171 (name "python-flufl-testing")
28172 (version "0.8")
28173 (source
28174 (origin
28175 (method url-fetch)
28176 (uri (pypi-uri "flufl.testing" version))
28177 (sha256
28178 (base32
28179 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
28180 (build-system python-build-system)
28181 (arguments '(#:tests? #f)) ;no tests
28182 (home-page "https://gitlab.com/warsaw/flufl.testing")
28183 (synopsis "Collection of test tool plugins")
28184 (description
28185 "This package contains a small collection of test tool plugins for
28186 @code{nose2} and @code{flake8}.")
28187 (license license:asl2.0)))
28188
28189 (define-public python-devtools
28190 (package
28191 (name "python-devtools")
28192 (version "0.6")
28193 (source
28194 (origin
28195 (method git-fetch)
28196 (uri (git-reference
28197 (url "https://github.com/samuelcolvin/python-devtools")
28198 (commit (string-append "v" version))))
28199 (file-name (git-file-name name version))
28200 (sha256
28201 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
28202 (build-system python-build-system)
28203 (native-inputs
28204 (list python-pytest python-pytest-mock))
28205 (propagated-inputs
28206 (list python-pygments))
28207 (arguments
28208 `(#:phases (modify-phases %standard-phases
28209 (replace 'check
28210 (lambda _
28211 (invoke "pytest")
28212 #t)))))
28213 (home-page "https://github.com/samuelcolvin/python-devtools")
28214 (synopsis "Debug command and development tools")
28215 (description
28216 "This package provides a debug print command and other development tools.
28217 It adds a simple and readable way to print stuff during development.")
28218 (license license:expat)))
28219
28220 (define-public python-dateparser
28221 (package
28222 (name "python-dateparser")
28223 (version "0.7.6")
28224 (source
28225 (origin
28226 (method url-fetch)
28227 (uri (pypi-uri "dateparser" version))
28228 (sha256
28229 (base32
28230 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
28231 (build-system python-build-system)
28232 (propagated-inputs
28233 (list python-dateutil python-pytz python-regex python-ruamel.yaml
28234 python-tzlocal))
28235 (native-inputs
28236 (list python-mock python-parameterized tzdata-for-tests))
28237 (arguments
28238 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
28239 #:tests? #f
28240 #:phases
28241 (modify-phases %standard-phases
28242 (add-before 'check 'set-check-environment
28243 (lambda* (#:key inputs #:allow-other-keys)
28244 (setenv "TZ" "UTC")
28245 (setenv "TZDIR"
28246 (search-input-directory inputs
28247 "share/zoneinfo")))))))
28248 (home-page "https://github.com/scrapinghub/dateparser")
28249 (synopsis
28250 "Date parsing library designed to parse dates from HTML pages")
28251 (description
28252 "@code{python-dateparser} provides modules to easily parse localized
28253 dates in almost any string formats commonly found on web pages.")
28254 (license license:bsd-3)))
28255
28256 (define-public python-dparse
28257 (package
28258 (name "python-dparse")
28259 (version "0.5.1")
28260 (source
28261 (origin
28262 (method url-fetch)
28263 (uri (pypi-uri "dparse" version))
28264 (sha256
28265 (base32
28266 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
28267 (build-system python-build-system)
28268 (native-inputs
28269 (list python-pytest))
28270 (propagated-inputs
28271 (list python-packaging python-pyyaml python-toml))
28272 (home-page "https://github.com/pyupio/dparse")
28273 (synopsis "Parser for Python dependency files")
28274 (description "This package provides a parser for Python dependency files.")
28275 (license license:expat)))
28276
28277 (define-public python-dpath
28278 (package
28279 (name "python-dpath")
28280 (version "2.0.1")
28281 (source
28282 (origin
28283 (method url-fetch)
28284 (uri (pypi-uri "dpath" version))
28285 (sha256
28286 (base32
28287 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
28288 (build-system python-build-system)
28289 (native-inputs
28290 (list python-hypothesis python-mock python-nose))
28291 (arguments
28292 '(#:phases
28293 (modify-phases %standard-phases
28294 (replace 'check
28295 (lambda* (#:key inputs outputs #:allow-other-keys)
28296 (add-installed-pythonpath inputs outputs)
28297 ;; This invokation is taken from tox.ini.
28298 (invoke "nosetests" "-d" "-v" "tests/"))))))
28299 (home-page "https://github.com/akesterson/dpath-python")
28300 (synopsis "File-system-like pathing and searching for dictionaries")
28301 (description
28302 "@code{python-dpath} is a library for accessing and searching
28303 dictionaries via /slashed/paths ala xpath.
28304
28305 Basically it lets you glob over a dictionary as if it were a file system. It
28306 allows you to specify globs (ala the bash eglob syntax, through some advanced
28307 fnmatch.fnmatch magic) to access dictionary elements, and provides some
28308 facility for filtering those results.")
28309 (license license:expat)))
28310
28311 (define-public python-safety
28312 (package
28313 (name "python-safety")
28314 (version "1.9.0")
28315 (source
28316 (origin
28317 (method url-fetch)
28318 (uri (pypi-uri "safety" version))
28319 (sha256
28320 (base32
28321 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
28322 (build-system python-build-system)
28323 (arguments
28324 `(#:phases
28325 (modify-phases %standard-phases
28326 (add-after 'unpack 'disable-tests
28327 (lambda _
28328 (substitute* "tests/test_safety.py"
28329 ;; requires network
28330 (("def test_check_live") "def _test_check_live"))
28331 #t)))))
28332 (propagated-inputs
28333 (list python-click python-dparse python-packaging python-requests))
28334 (home-page "https://github.com/pyupio/safety")
28335 (synopsis "Check installed dependencies for known vulnerabilities")
28336 (description "Safety checks installed dependencies for known vulnerabilities.
28337 By default it uses the open Python vulnerability database Safety DB.")
28338 (license license:expat)))
28339
28340 (define-public python-pypandoc
28341 (package
28342 (name "python-pypandoc")
28343 (version "1.6.4")
28344 (source
28345 (origin
28346 (method url-fetch)
28347 (uri (pypi-uri "pypandoc" version))
28348 (sha256
28349 (base32
28350 "149basv4pvzg9zm74cjz68x8s2n5fykyj7prgysb0qfmja73r83f"))))
28351 (build-system python-build-system)
28352 (inputs
28353 (list pandoc))
28354 (propagated-inputs
28355 `(("wheel" ,python-wheel)))
28356 (native-inputs
28357 `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
28358 texlive-fonts-ec
28359 texlive-generic-iftex
28360 texlive-hyperref
28361 texlive-oberdiek
28362 texlive-lm
28363 texlive-xcolor)))))
28364 (arguments
28365 `(#:phases
28366 (modify-phases %standard-phases
28367 (add-before 'check 'disable-tests
28368 (lambda _
28369 ;; Disable test requiring network access
28370 (substitute* "tests.py"
28371 (("test_basic_conversion_from_http_url")
28372 "skip_test_basic_conversion_from_http_url"))
28373 #t)))))
28374 (home-page "https://github.com/bebraw/pypandoc")
28375 (synopsis "Python wrapper for pandoc")
28376 (description "pypandoc is a thin Python wrapper around pandoc
28377 and pandoc-citeproc.")
28378 (license license:expat)))
28379
28380 (define-public python-rnc2rng
28381 (package
28382 (name "python-rnc2rng")
28383 (version "2.6.4")
28384 (source
28385 (origin
28386 (method url-fetch)
28387 (uri (pypi-uri "rnc2rng" version))
28388 (sha256
28389 (base32
28390 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
28391 (build-system python-build-system)
28392 (propagated-inputs
28393 (list python-rply))
28394 (arguments
28395 `(#:phases (modify-phases %standard-phases
28396 (replace 'check
28397 (lambda _
28398 (invoke "python" "test.py"))))))
28399 (home-page "https://github.com/djc/rnc2rng")
28400 (synopsis "Convert RELAX NG Compact to regular syntax")
28401 (description
28402 "This package provides the @command{rnc2rng} command-line tool as well as
28403 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
28404 equivalent schemata in the XML-based default RELAX NG syntax.")
28405 (license license:expat)))
28406
28407 (define-public python-telethon
28408 (package
28409 (name "python-telethon")
28410 (version "1.17.5")
28411 (source
28412 (origin
28413 (method git-fetch)
28414 (uri (git-reference
28415 (url "https://github.com/LonamiWebs/Telethon")
28416 (commit (string-append "v" version))))
28417 (file-name (git-file-name name version))
28418 (sha256
28419 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
28420 (build-system python-build-system)
28421 (arguments
28422 '(#:phases
28423 (modify-phases %standard-phases
28424 (replace 'check
28425 (lambda* (#:key tests? #:allow-other-keys)
28426 (when tests?
28427 (invoke "py.test" "-v"))
28428 #t)))))
28429 (propagated-inputs
28430 (list python-rsa python-pyaes))
28431 (native-inputs
28432 (list python-pytest python-pytest-asyncio python-pytest-trio))
28433 (home-page "https://docs.telethon.dev")
28434 (synopsis "Full-featured Telegram client library for Python 3")
28435 (description "This library is designed to make it easy to write Python
28436 programs that can interact with Telegram.")
28437 (license license:expat)))
28438
28439 (define-public python-citeproc-py
28440 (package
28441 (name "python-citeproc-py")
28442 (version "0.5.1")
28443 (source
28444 (origin
28445 (method url-fetch)
28446 (uri (pypi-uri "citeproc-py" version))
28447 (sha256
28448 (base32
28449 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
28450 (build-system python-build-system)
28451 (propagated-inputs
28452 (list python-lxml python-rnc2rng))
28453 (home-page
28454 "https://github.com/brechtm/citeproc-py")
28455 (synopsis "Citations and bibliography formatter")
28456 (description
28457 "Citeproc-py is a CSL processor for Python. It aims to implement the
28458 CSL 1.0.1 specification. citeproc-py can output styled citations and
28459 bibliographies in a number of different output formats. Currently supported
28460 are plain text, reStructuredText and HTML.")
28461 (license license:bsd-2)))
28462
28463 (define-public python-inform
28464 (package
28465 (name "python-inform")
28466 (version "1.23.0")
28467 (source
28468 (origin
28469 (method url-fetch)
28470 (uri (pypi-uri "inform" version))
28471 (sha256
28472 (base32
28473 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
28474 (build-system python-build-system)
28475 (arguments
28476 `(#:tests? #f)) ; PyPI tarball lacks tests
28477 (native-inputs
28478 (list python-hypothesis python-pytest-cov python-pytest-runner))
28479 (propagated-inputs
28480 (list python-arrow python-six))
28481 (home-page "https://inform.readthedocs.io")
28482 (synopsis "Print & logging utilities for communicating with user")
28483 (description
28484 "Inform is designed to display messages from programs that are typically run from
28485 a console. It provides a collection of ‘print’ functions that allow you to simply and
28486 cleanly print different types of messages.")
28487 (license license:gpl3+)))
28488
28489 (define-public python-nestedtext
28490 (package
28491 (name "python-nestedtext")
28492 (version "1.0.0")
28493 (source
28494 (origin
28495 (method url-fetch)
28496 (uri (pypi-uri "nestedtext" version))
28497 (sha256
28498 (base32
28499 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
28500 (build-system python-build-system)
28501 (arguments
28502 `(#:tests? #f)) ; PyPI tarball lacks tests
28503 (propagated-inputs
28504 (list python-inform))
28505 (home-page "https://nestedtext.org")
28506 (synopsis "Human readable and writable data interchange format")
28507 (description
28508 "NestedText is a file format for holding data that is to be entered, edited, or
28509 viewed by people. It allows data to be organized into a nested collection of
28510 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
28511 without the complexity and risk of YAML and without the syntactic clutter of JSON.
28512 NestedText is both simple and natural. Only a small number of concepts and rules must
28513 be kept in mind when creating it. It is easily created, modified, or viewed with
28514 a text editor and easily understood and used by both programmers and non-programmers.")
28515 (license license:expat))) ; MIT license
28516
28517 (define-public python-nest-asyncio
28518 (package
28519 (name "python-nest-asyncio")
28520 (version "1.5.5")
28521 (source
28522 (origin
28523 (method url-fetch)
28524 (uri (pypi-uri "nest_asyncio" version))
28525 (sha256
28526 (base32
28527 "0rbdw7lry66yj13hh4w63yzflnapdal1ffl237k8nsa2v4f2jhp4"))))
28528 (build-system python-build-system)
28529 (home-page "https://github.com/erdewit/nest_asyncio")
28530 (synopsis "Patch asyncio to allow nested event loops")
28531 (description
28532 "By design @code{asyncio} does not allow its event loop to be nested.
28533 This presents a practical problem: when in an environment where the event loop
28534 is already running it's impossible to run tasks and wait for the result. This
28535 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
28536 @code{loop.run_until_complete}.")
28537 (license license:bsd-3)))
28538
28539 (define-public python-simpervisor
28540 (package
28541 (name "python-simpervisor")
28542 (version "0.4")
28543 (source
28544 (origin
28545 ;; Tests not included in release.
28546 (method git-fetch)
28547 (uri (git-reference
28548 (url "https://github.com/yuvipanda/simpervisor")
28549 (commit (string-append "v" version))))
28550 (file-name (git-file-name name version))
28551 (sha256
28552 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
28553 (build-system python-build-system)
28554 (arguments
28555 `(#:tests? #f ; Test suite can't find aiohttp.
28556 #:phases
28557 (modify-phases %standard-phases
28558 (replace 'check
28559 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
28560 (when tests?
28561 (add-installed-pythonpath inputs outputs)
28562 (invoke "pytest" "--maxfail" "3" "--verbose"))
28563 #t)))))
28564 (native-inputs
28565 (list python-aiohttp python-pytest python-pytest-asyncio))
28566 (home-page "https://github.com/yuvipanda/simpervisor")
28567 (synopsis "Simple async process supervisor")
28568 (description
28569 "This package provides a simple async process supervisor in Python.")
28570 (license license:bsd-3)))
28571
28572 (define-public python-parallel
28573 (package
28574 (name "python-parallel")
28575 (version "1.6.4.4")
28576 (source
28577 (origin
28578 (method url-fetch)
28579 (uri (string-append
28580 "https://www.parallelpython.com/downloads/pp/pp-"
28581 version ".zip"))
28582 (sha256
28583 (base32
28584 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
28585 (native-inputs
28586 (list unzip))
28587 (build-system python-build-system)
28588 (arguments '(#:tests? #f)) ; No test suite.
28589 (home-page "https://www.parallelpython.com")
28590 (synopsis "Parallel and distributed programming for Python")
28591 (description "Parallel Python module (PP) provides an easy and efficient
28592 way to create parallel-enabled applications for SMP computers and clusters.
28593 PP module features cross-platform portability and dynamic load balancing.
28594 Thus applications written with PP will parallelize efficiently even on
28595 heterogeneous and multi-platform clusters (including clusters running other
28596 applications with variable CPU loads).")
28597 (license license:bsd-3)))
28598
28599 (define-public python2-parallel
28600 (package-with-python2 python-parallel))
28601
28602 (define-public python-djvulibre
28603 (package
28604 (name "python-djvulibre")
28605 (version "0.8.6")
28606 (source
28607 (origin
28608 (method url-fetch)
28609 (uri (pypi-uri "python-djvulibre" version))
28610 (sha256
28611 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
28612 (build-system python-build-system)
28613 (native-inputs
28614 (list ghostscript pkg-config python-nose))
28615 (inputs
28616 (list djvulibre python-cython))
28617 (arguments
28618 `(#:phases
28619 (modify-phases %standard-phases
28620 (add-after 'unpack 'fix-tests
28621 (lambda _
28622 ;; Unit tests try to load the 'dllpath.py' and fail, because it
28623 ;; doesn't make sense on GNU/Linux.
28624 (delete-file "djvu/dllpath.py")
28625 #t)))))
28626 (synopsis "Python bindings for DjVuLibre")
28627 (description "This is a set of Python bindings for the DjVuLibre library.")
28628 (home-page "https://jwilk.net/software/python-djvulibre")
28629 (license license:gpl2)))
28630
28631 (define-public python2-djvulibre
28632 (package-with-python2 python-djvulibre))
28633
28634 (define-public python-versioneer
28635 (package
28636 (name "python-versioneer")
28637 (version "0.21")
28638 (source
28639 (origin
28640 (method url-fetch)
28641 (uri (pypi-uri "versioneer" version))
28642 (sha256
28643 (base32
28644 "084fglxafbzvf1vbkzfajvs9qwnvjwwn8pxql9nrlpyipv5xpwk4"))
28645 (patches (search-patches "python-versioneer-guix-support.patch"))))
28646 (build-system python-build-system)
28647 (home-page
28648 "https://github.com/python-versioneer/python-versioneer")
28649 (synopsis
28650 "Version-string management for VCS-controlled trees")
28651 (description
28652 "@code{versioneer} is a tool for managing a recorded version number in
28653 distutils-based python projects. The goal is to remove the tedious and
28654 error-prone \"update the embedded version string\" step from your release
28655 process.")
28656 (license license:public-domain)))
28657
28658 (define-public python2-gamera
28659 (package
28660 (name "python2-gamera")
28661 (version "3.4.4")
28662 (source
28663 (origin
28664 (method url-fetch)
28665 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
28666 "gamera-" version ".tar.gz"))
28667 (sha256
28668 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
28669 (modules '((guix build utils)))
28670 (snippet
28671 '(begin
28672 ;; Remove bundled libraries.
28673 (for-each delete-file-recursively
28674 '("src/libpng-1.2.5"
28675 "src/libtiff"
28676 "src/zlib-1.2.8"))))))
28677 (build-system python-build-system)
28678 (inputs
28679 (list libpng libtiff zlib))
28680 (arguments
28681 `(#:python ,python-2
28682 #:phases
28683 (modify-phases %standard-phases
28684 (add-after 'unpack 'disable-wx-support
28685 (lambda _
28686 (substitute* "setup.py"
28687 (("no_wx = False")
28688 "no_wx = True")))))))
28689 (synopsis "Framework for building document analysis applications")
28690 (description
28691 "Gamera is a toolkit for building document image recognition systems.")
28692 (home-page "https://gamera.informatik.hsnr.de/")
28693 (license license:gpl2+)))
28694
28695 (define-public python-contextvars
28696 (package
28697 (name "python-contextvars")
28698 (version "2.4")
28699 (source
28700 (origin
28701 (method url-fetch)
28702 (uri (pypi-uri "contextvars" version))
28703 (sha256
28704 (base32
28705 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
28706 (build-system python-build-system)
28707 (propagated-inputs
28708 (list python-immutables))
28709 (home-page
28710 "https://github.com/MagicStack/contextvars")
28711 (synopsis "PEP 567 Backport")
28712 (description "This package implements a backport of Python 3.7
28713 @code{contextvars} module (see PEP 567) for Python 3.6.")
28714 (license license:asl2.0)))
28715
28716 (define-public python-aiofiles
28717 (package
28718 (name "python-aiofiles")
28719 (version "0.6.0")
28720 (source
28721 (origin
28722 (method url-fetch)
28723 (uri (pypi-uri "aiofiles" version))
28724 (sha256
28725 (base32
28726 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
28727 (build-system python-build-system)
28728 (home-page "https://github.com/Tinche/aiofiles")
28729 (synopsis "File support for @code{asyncio}")
28730 (description "@code{python-aiofiles} is a library for handling local
28731 disk files in asyncio applications.")
28732 (license license:asl2.0)))
28733
28734 (define-public python-pyre-extensions
28735 (package
28736 (name "python-pyre-extensions")
28737 (version "0.0.18")
28738 (source
28739 (origin
28740 (method url-fetch)
28741 (uri (pypi-uri "pyre-extensions" version))
28742 (sha256
28743 (base32
28744 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
28745 (build-system python-build-system)
28746 (propagated-inputs
28747 (list python-typing-extensions python-typing-inspect))
28748 (home-page "https://pyre-check.org")
28749 (synopsis
28750 "Type system extensions for use with @code{python-pyre}")
28751 (description
28752 "@code{python-pyre-extensions} defines extensions to the standard
28753 @code{typing} module that are supported by the Pyre typechecker.")
28754 (license license:expat)))
28755
28756 (define-public python-dataclasses
28757 (package
28758 (name "python-dataclasses")
28759 (version "0.8")
28760 (source
28761 (origin
28762 (method url-fetch)
28763 (uri (pypi-uri "dataclasses" version))
28764 (sha256
28765 (base32
28766 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
28767 (build-system python-build-system)
28768 (home-page
28769 "https://github.com/ericvsmith/dataclasses")
28770 (synopsis
28771 "Backport of the @code{dataclasses} module for Python 3.6")
28772 (description
28773 "This is an implementation of PEP 557, Data Classes. It is a
28774 backport of the @code{dataclasses} module for Python 3.6.")
28775 (license license:asl2.0)))
28776
28777 (define-public python-pywatchman
28778 (package
28779 (name "python-pywatchman")
28780 (version "1.4.1")
28781 (source
28782 (origin
28783 (method url-fetch)
28784 (uri (pypi-uri "pywatchman" version))
28785 (sha256
28786 (base32
28787 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
28788 (build-system python-build-system)
28789 (arguments
28790 `(#:tests? #f)) ;there are none
28791 (home-page
28792 "https://facebook.github.io/watchman/")
28793 (synopsis "Watchman client for python")
28794 (description "@code{python-pywatchman} is a library to connect and
28795 query Watchman to discover file changes.")
28796 (license license:bsd-3)))
28797
28798 (define-public python-roundrobin
28799 (package
28800 (name "python-roundrobin")
28801 (version "0.0.2")
28802 (source (origin
28803 (method url-fetch)
28804 (uri (pypi-uri "roundrobin" version))
28805 (sha256
28806 (base32 "1akwhvfyi0120zg2xkhfc6jwfkirz5x90yyvw06bndhaaxwcnc5c"))))
28807 (build-system python-build-system)
28808 (arguments '(#:tests? #f)) ;no tests on PyPI and no tags in repo
28809 (home-page "https://github.com/linnik/roundrobin")
28810 (synopsis "Collection of roundrobin utilities")
28811 (description
28812 "This package provides a collection of utilities for round-robin
28813 distribution in Python.")
28814 (license license:expat)))
28815
28816 (define-public python-helpdev
28817 (package
28818 (name "python-helpdev")
28819 (version "0.7.1")
28820 (source
28821 (origin
28822 (method url-fetch)
28823 (uri (pypi-uri "helpdev" version))
28824 (sha256
28825 (base32
28826 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
28827 (build-system python-build-system)
28828 (arguments
28829 `(#:phases
28830 (modify-phases %standard-phases
28831 (replace 'check
28832 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
28833 (when tests?
28834 (add-installed-pythonpath inputs outputs)
28835 (invoke "pytest" "tests"))
28836 #t)))))
28837 (propagated-inputs
28838 (list python-importlib-metadata))
28839 (native-inputs
28840 (list python-pytest))
28841 (home-page "https://gitlab.com/dpizetta/helpdev")
28842 (synopsis
28843 "Extract information about the Python environment easily")
28844 (description
28845 "Helpdev is a library to easily extract information about the Python
28846 environment.")
28847 (license license:expat)))
28848
28849 (define-public python-logutils
28850 (package
28851 (name "python-logutils")
28852 (version "0.3.5")
28853 (source
28854 (origin
28855 (method url-fetch)
28856 (uri (pypi-uri "logutils" version))
28857 (sha256
28858 (base32
28859 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
28860 (build-system python-build-system)
28861 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
28862 (synopsis "Logging utilities")
28863 (description "This package provides a set of handlers for the Python
28864 standard library logging package. Some of these handlers are out-of-scope
28865 for the standard library, and so they are packaged here. Others are updated
28866 versions which have appeared in recent Python releases, but are usable with
28867 older versions of Python and so are packaged here.")
28868 (license license:bsd-3)))
28869
28870 (define-public python-helper
28871 (package
28872 (name "python-helper")
28873 (version "2.5.0")
28874 (source (origin
28875 (method url-fetch)
28876 (uri (pypi-uri "helper" version))
28877 (sha256
28878 (base32
28879 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
28880 (build-system python-build-system)
28881 (native-inputs
28882 (list python-mock))
28883 (propagated-inputs
28884 (list python-logutils python-pyyaml))
28885 (home-page "https://github.com/gmr/helper")
28886 (synopsis "Library for writing configurable applications and daemons")
28887 (description
28888 "This package provides procedures for quickly writing configurable
28889 applications and daemons.")
28890 (license license:bsd-3)))
28891
28892 (define-public python-qtsass
28893 (package
28894 (name "python-qtsass")
28895 (version "0.3.0")
28896 (source
28897 (origin
28898 ;; There are no tests in the PyPI tarball.
28899 (method git-fetch)
28900 (uri (git-reference
28901 (url "https://github.com/spyder-ide/qtsass/")
28902 (commit (string-append "v" version))))
28903 (file-name (git-file-name name version))
28904 (sha256
28905 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
28906 (build-system python-build-system)
28907 (arguments
28908 `(#:test-target "pytest"
28909 #:phases
28910 (modify-phases %standard-phases
28911 ;; Tests need to read and write files.
28912 (add-before 'check 'make-git-checkout-writable
28913 (lambda _
28914 (for-each make-file-writable (find-files "."))
28915 #t)))))
28916 (native-inputs
28917 (list python-pytest python-pytest-cov python-pytest-runner))
28918 (propagated-inputs
28919 (list python-libsass))
28920 (home-page "https://github.com/spyder-ide/qtsass")
28921 (synopsis "Compile SCSS files to valid Qt stylesheets")
28922 (description
28923 "Besides being used in web development, CSS is also the way to stylize
28924 Qt-based desktop applications. However, Qt's CSS has a few variations that
28925 prevent the direct use of SASS compiler.
28926
28927 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
28928 handling those variations.")
28929 (license license:expat)))
28930
28931 (define-public python-qdarkstyle
28932 (package
28933 (name "python-qdarkstyle")
28934 (version "2.8.1")
28935 (source
28936 (origin
28937 (method url-fetch)
28938 (uri (pypi-uri "QDarkStyle" version))
28939 (sha256
28940 (base32
28941 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
28942 (build-system python-build-system)
28943 (arguments
28944 `(;; Fails unable to detect valid Qt bindings even when
28945 ;; added as native-inputs.
28946 #:tests? #f))
28947 (propagated-inputs
28948 (list python-helpdev python-qtpy))
28949 (home-page
28950 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
28951 (synopsis
28952 "Complete dark stylesheet for Python and Qt applications")
28953 (description "QDarkStyle is the most complete dark stylesheet for Python and
28954 Qt applications.")
28955 (license license:expat)))
28956
28957 (define-public python-bitstring
28958 (package
28959 (name "python-bitstring")
28960 (version "3.1.7")
28961 (source
28962 (origin
28963 (method url-fetch)
28964 (uri (pypi-uri "bitstring" version))
28965 (sha256
28966 (base32
28967 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
28968 (build-system python-build-system)
28969 (arguments
28970 `(#:phases
28971 (modify-phases %standard-phases
28972 (replace 'check
28973 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
28974 (when tests?
28975 (add-installed-pythonpath inputs outputs)
28976 (with-directory-excursion "test"
28977 (invoke "pytest")))
28978 #t)))))
28979 (native-inputs
28980 (list python-pytest))
28981 (home-page "https://github.com/scott-griffiths/bitstring")
28982 (synopsis
28983 "Simple construction, analysis and modification of binary data")
28984 (description
28985 "Bitstring is a library for simple construction, analysis and modification
28986 of binary data.")
28987 (license license:expat)))
28988
28989 (define-public python-confuse
28990 (package
28991 (name "python-confuse")
28992 (version "1.5.0")
28993 (source
28994 (origin
28995 (method url-fetch)
28996 (uri (pypi-uri "confuse" version))
28997 (sha256
28998 (base32
28999 "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
29000 (build-system python-build-system)
29001 (propagated-inputs
29002 (list python-pyyaml))
29003 (home-page "https://github.com/beetbox/confuse")
29004 (synopsis "Painless YAML configuration")
29005 (description "Confuse is a configuration library for Python that uses
29006 YAML. It takes care of defaults, overrides, type checking, command-line
29007 integration, human-readable errors, and standard OS-specific locations.")
29008 (license license:expat)))
29009
29010 (define-public python-reflink
29011 (package
29012 (name "python-reflink")
29013 (version "0.2.1")
29014 (source
29015 (origin
29016 (method url-fetch)
29017 (uri (pypi-uri "reflink" version))
29018 (sha256
29019 (base32
29020 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
29021 (build-system python-build-system)
29022 (arguments
29023 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
29024 (propagated-inputs
29025 (list python-cffi))
29026 (native-inputs
29027 (list python-pytest python-pytest-runner))
29028 (home-page "https://gitlab.com/rubdos/pyreflink")
29029 (synopsis "Python wrapper around reflink system call")
29030 (description
29031 "Python reflink wraps around platform specific @code{reflink}
29032 implementations.")
29033 (license license:expat)))
29034
29035 (define-public python-retry
29036 (package
29037 (name "python-retry")
29038 (version "0.9.2")
29039 (source (origin
29040 (method url-fetch)
29041 (uri (pypi-uri "retry" version))
29042 (sha256
29043 (base32 "197v6qrh6858bhzzrjgk2zdqrybppymb1lsvdxnm1i39kfwsigzq"))))
29044 (build-system python-build-system)
29045 (arguments
29046 (list #:phases
29047 #~(modify-phases %standard-phases
29048 (replace 'check
29049 (lambda* (#:key tests? #:allow-other-keys)
29050 (when tests? (invoke "pytest" "-vv")))))))
29051 (native-inputs (list python-pbr python-pytest))
29052 (propagated-inputs (list python-decorator python-py))
29053 (home-page "https://github.com/invl/retry")
29054 (synopsis "Retry decorator")
29055 (description
29056 "@code{retry} is an easy to use retry decorator for Python. It can be
29057 used to retry a function a given number of times.")
29058 (license license:asl2.0)))
29059
29060 (define-public python-pivy
29061 (package
29062 (name "python-pivy")
29063 (version "0.6.5")
29064 (source
29065 (origin
29066 (method git-fetch)
29067 (uri (git-reference
29068 (url "https://github.com/coin3d/pivy")
29069 (commit version)))
29070 (file-name (git-file-name name version))
29071 (sha256
29072 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
29073 (build-system python-build-system)
29074 (arguments
29075 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
29076 #:tests? #f
29077 #:phases
29078 (modify-phases %standard-phases
29079 (add-after 'unpack 'patch-cmake-include-dirs
29080 (lambda _
29081 ;; Patch buildsystem to respect Coin3D include directory
29082 (substitute* "CMakeLists.txt"
29083 (("\\$\\{SoQt_INCLUDE_DIRS}")
29084 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
29085 #t)))))
29086 (native-inputs
29087 (list cmake swig))
29088 (inputs
29089 (list python-wrapper
29090 qtbase-5
29091 libxi
29092 libice
29093 soqt
29094 glew
29095 coin3D-4))
29096 (home-page "https://github.com/coin3d/pivy")
29097 (synopsis "Python bindings to Coin3D")
29098 (description
29099 "Pivy provides python bindings for Coin, a 3D graphics library with an
29100 Application Programming Interface based on the Open Inventor 2.1 API.")
29101 (license license:isc)))
29102
29103 (define-public python-crayons
29104 (package
29105 (name "python-crayons")
29106 (version "0.4.0")
29107 (source
29108 (origin
29109 (method url-fetch)
29110 (uri (pypi-uri "crayons" version))
29111 (sha256
29112 (base32
29113 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
29114 (build-system python-build-system)
29115 (propagated-inputs
29116 (list python-colorama))
29117 (home-page "https://github.com/MasterOdin/crayons")
29118 (synopsis "TextUI colors for Python")
29119 (description "This package gives you colored strings for the terminal.
29120 Crayons automatically wraps a given string in the foreground color and
29121 restores the original state after the string is printed.")
29122 (license license:expat)))
29123
29124 (define-public python-sane
29125 (package
29126 (name "python-sane")
29127 (version "2.9.1")
29128 (source
29129 (origin
29130 (method url-fetch)
29131 (uri (pypi-uri name version))
29132 (sha256
29133 (base32
29134 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
29135 (build-system python-build-system)
29136 (native-inputs
29137 (list python-pytest))
29138 (inputs
29139 (list sane-backends))
29140 (home-page "https://github.com/python-pillow/Sane")
29141 (synopsis "Python interface to the SANE scanner")
29142 (description "This package provides Python interface to the SANE scanner
29143 and frame grabber interface.")
29144 (license (license:non-copyleft
29145 ;; Yet another variant of the X/MIT license.
29146 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
29147
29148 (define-public python-scikit-build
29149 (package
29150 (name "python-scikit-build")
29151 (version "0.14.0")
29152 (source
29153 (origin
29154 (method url-fetch)
29155 (uri (pypi-uri "scikit-build" version))
29156 (sha256
29157 (base32 "1wx1m9vnxnnz59lyaisgyxldp313kciyd4af8lf112vb8vbjy9yk"))))
29158 (build-system python-build-system)
29159 (arguments
29160 (list
29161 #:phases
29162 #~(modify-phases %standard-phases
29163 (add-after 'unpack 'patch-cmake-executable
29164 (lambda* (#:key inputs #:allow-other-keys)
29165 (substitute* "skbuild/constants.py"
29166 (("^(CMAKE_DEFAULT_EXECUTABLE = ).*" _ head)
29167 (format #f "~a ~s~%" head
29168 (search-input-file inputs "bin/cmake"))))))
29169 ;; XXX: PEP 517 manual build copied from python-isort.
29170 (replace 'build
29171 (lambda _
29172 (setenv "SOURCE_DATE_EPOCH" "315532800")
29173 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
29174 (replace 'check
29175 (lambda* (#:key tests? #:allow-other-keys)
29176 (when tests?
29177 ;; These tests attempt to pull dependencies from the Internet.
29178 (delete-file "tests/test_distribution.py")
29179 (delete-file "tests/test_pep518.py")
29180 (invoke "pytest" "-vv"
29181 "-n" (number->string (parallel-job-count))
29182 "-k" (string-append
29183 ;; These tests attempt to write to read-only
29184 ;; Python install directory.
29185 "not test_install_command "
29186 "and not test_test_command "
29187 "and not test_hello_develop "
29188 ;; These sdist-related tests fail for unknown
29189 ;; reasons (see:
29190 ;; https://github.com/scikit-build/scikit-build/issues/689).
29191 "and not test_hello_sdist_with_base "
29192 "and not test_manifest_in_sdist "
29193 "and not test_hello_sdist "
29194 "and not test_sdist_with_symlinks "
29195 ;; These are not parallel safe and fail
29196 ;; nondeterministically (see:
29197 ;; https://github.com/scikit-build/scikit-build/issues/711).
29198 "and not test_generator_cleanup "
29199 "and not test_generator_selection ")))))
29200 (replace 'install
29201 (lambda _
29202 (let ((whl (car (find-files "dist" "\\.whl$"))))
29203 (invoke "pip" "--no-cache-dir" "--no-input"
29204 "install" "--no-deps" "--prefix" #$output whl)))))))
29205 (native-inputs
29206 (list cmake-minimal
29207 gfortran
29208 git-minimal
29209 ninja
29210 python-coverage
29211 python-cython
29212 python-mock
29213 python-packaging
29214 python-path
29215 python-pypa-build
29216 python-pytest
29217 python-pytest-cov
29218 python-pytest-mock
29219 python-pytest-virtualenv
29220 python-pytest-xdist
29221 python-requests
29222 python-setuptools-scm
29223 python-wheel))
29224 (propagated-inputs
29225 (list python-distro python-packaging python-wheel))
29226 (home-page "https://github.com/scikit-build/scikit-build")
29227 (synopsis "Build system generator for Python C/C++/Fortran/Cython extensions")
29228 (description "Scikit-build is an improved build system generator for
29229 CPython C/C++/Fortran/Cython extensions. It has support for additional
29230 compilers, build systems, cross compilation, and locating dependencies and
29231 determining their build requirements. The scikit-build package is
29232 fundamentally just glue between the @code{setuptools} Python module and
29233 CMake.")
29234 (license license:expat)))
29235
29236 (define-public python-screenkey
29237 (package
29238 (name "python-screenkey")
29239 (version "1.4")
29240 (source
29241 (origin
29242 (method git-fetch)
29243 (uri (git-reference
29244 (url "https://gitlab.com/screenkey/screenkey")
29245 (commit (string-append "v" version))))
29246 (file-name (git-file-name name version))
29247 (sha256
29248 (base32
29249 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
29250 (build-system python-build-system)
29251 (arguments
29252 `(#:phases
29253 (modify-phases %standard-phases
29254 (add-after 'unpack 'fix-dlopen-paths
29255 (lambda* (#:key inputs outputs #:allow-other-keys)
29256 (let* ((x11 (assoc-ref inputs "libx11"))
29257 (xtst (assoc-ref inputs "libxtst")))
29258 (substitute* "Screenkey/xlib.py"
29259 (("libX11.so.6")
29260 (string-append x11 "/lib/libX11.so.6")))
29261 (substitute* "Screenkey/xlib.py"
29262 (("libXtst.so.6")
29263 (string-append xtst "/lib/libXtst.so.6")))
29264 #t)))
29265 (add-after 'install 'wrap-screenkey
29266 (lambda* (#:key outputs #:allow-other-keys)
29267 (wrap-program
29268 (string-append (assoc-ref outputs "out") "/bin/screenkey")
29269 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
29270 `("GI_TYPELIB_PATH"
29271 ":" prefix (,(getenv "GI_TYPELIB_PATH")))))))))
29272 (inputs
29273 (list python-distutils-extra
29274 python-tokenize-rt
29275 libx11
29276 libxtst
29277 gtk+
29278 python-pygobject
29279 python-pycairo
29280 python-setuptools-git
29281 python-babel))
29282 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
29283 (synopsis
29284 "Screencast tool to display pressed keys")
29285 (description
29286 "Screenkey is a screencast tool to display your keys inspired by
29287 Screenflick.")
29288 (license license:gpl3+)))
29289
29290 (define-public python-jinja2-cli
29291 (package
29292 (name "python-jinja2-cli")
29293 (version "0.7.0")
29294 (source
29295 (origin
29296 (method url-fetch)
29297 (uri (pypi-uri "jinja2-cli" version))
29298 (sha256
29299 (base32
29300 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
29301 (build-system python-build-system)
29302 (propagated-inputs
29303 (list python-jinja2))
29304 (native-inputs
29305 (list python-flake8 python-jinja2 python-pytest))
29306 (home-page "https://github.com/mattrobenolt/jinja2-cli")
29307 (synopsis "Command-line interface to Jinja2")
29308 (description
29309 "This package provides a command-line interface (CLI) to the Jinja2
29310 template engine.")
29311 (license license:bsd-3)))
29312
29313 (define-public python-readability
29314 (package
29315 (name "python-readability")
29316 (version "0.3.1")
29317 (source
29318 (origin
29319 (method url-fetch)
29320 (uri (pypi-uri "readability" version))
29321 (sha256
29322 (base32
29323 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
29324 (build-system python-build-system)
29325 (home-page
29326 "https://github.com/andreasvc/readability/")
29327 (synopsis
29328 "Measure the readability of a given text using surface
29329 characteristics")
29330 (description
29331 "This package provides a Python library that is an implementation of
29332 traditional readability measures based on simple surface
29333 characteristics. These measures are basically linear regressions based on the
29334 number of words, syllables, and sentences.")
29335 (license license:asl2.0)))
29336
29337 (define-public python-listparser
29338 (package
29339 (name "python-listparser")
29340 (version "0.18")
29341 (source
29342 (origin
29343 (method url-fetch)
29344 (uri (pypi-uri "listparser" version))
29345 (sha256
29346 (base32
29347 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
29348 (build-system python-build-system)
29349 (home-page
29350 "https://github.com/kurtmckee/listparser")
29351 (synopsis
29352 "Parse subscription lists in Python")
29353 (description
29354 "This package provides a Python library that can parse OPML, FOAF, and
29355 iGoogle subscription lists.")
29356 (license license:expat)))
29357
29358 (define-public python-smartypants
29359 (package
29360 (name "python-smartypants")
29361 (version "2.0.1")
29362 (source
29363 (origin
29364 ;; There's no source tarball for 2.0.1 on PyPI.
29365 (method git-fetch)
29366 (uri (git-reference
29367 (url "https://github.com/leohemsted/smartypants.py")
29368 (commit (string-append "v" version))))
29369 (file-name (git-file-name name version))
29370 (sha256
29371 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
29372 (build-system python-build-system)
29373 (arguments
29374 '(#:phases
29375 (modify-phases %standard-phases
29376 (replace 'check
29377 ;; Its `setup.py test` doesn't report failure with exit status, so
29378 ;; we use `nose` instead.
29379 (lambda _
29380 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
29381 (native-inputs
29382 ;; For tests.
29383 (list python-docutils python-nose python-pygments))
29384 (home-page "https://github.com/leohemsted/smartypants.py")
29385 (synopsis "Translate punctuation characters into smart quotes")
29386 (description
29387 "@command{smartpants} can perform the following transformations:
29388 @enumerate
29389 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
29390 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
29391 entities
29392 @item Dashes (-- and ---) into en- and em-dash entities
29393 @item Three consecutive dots (... or . . .) into an ellipsis entity
29394 @end enumerate")
29395 (license license:bsd-3)))
29396
29397 (define-public python-typogrify
29398 (package
29399 (name "python-typogrify")
29400 (version "2.0.7")
29401 (source (origin
29402 (method url-fetch)
29403 (uri (pypi-uri "typogrify" version))
29404 (sha256
29405 (base32
29406 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
29407 (build-system python-build-system)
29408 (arguments
29409 '(#:phases
29410 (modify-phases %standard-phases
29411 (replace 'check
29412 (lambda _
29413 (invoke "nosetests" "-v"))))))
29414 (propagated-inputs
29415 (list python-smartypants))
29416 (native-inputs
29417 ;; For tests.
29418 (list python-nose))
29419 (home-page "https://github.com/mintchaos/typogrify")
29420 (synopsis "Filters to transform text into typographically-improved HTML")
29421 (description
29422 "@code{typogrify} provides a set of custom filters that automatically
29423 apply various transformations to plain text in order to yield
29424 typographically-improved HTML. While often used in conjunction with Jinja and
29425 Django template systems, the filters can be used in any environment.")
29426 (license license:bsd-3)))
29427
29428 (define-public python-ld
29429 (package
29430 (name "python-ld")
29431 (version "0.5.0")
29432 (source
29433 (origin
29434 (method url-fetch)
29435 (uri (pypi-uri "ld" version))
29436 (sha256
29437 (base32
29438 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
29439 (build-system python-build-system)
29440 (propagated-inputs
29441 (list python-six))
29442 (home-page "https://github.com/nir0s/ld")
29443 (synopsis "OS platform information API")
29444 (description
29445 "The ld package provides information about the GNU/Linux distribution it
29446 runs on, such as a reliable machine-readable ID, or version information.")
29447 (license license:asl2.0)))
29448
29449 (define-public python-quicktions
29450 (package
29451 (name "python-quicktions")
29452 (version "1.11")
29453 (source
29454 (origin
29455 (method url-fetch)
29456 (uri (pypi-uri "quicktions" version))
29457 (sha256
29458 (base32
29459 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
29460 (modules '((guix build utils)))
29461 (snippet
29462 '(begin
29463 ;; This file is generated by Cython.
29464 (delete-file "src/quicktions.c") #t))))
29465 (build-system python-build-system)
29466 (arguments
29467 `(#:phases
29468 (modify-phases %standard-phases
29469 (add-before 'build 'cythonize-sources
29470 (lambda _
29471 (with-directory-excursion "src"
29472 (invoke "cython" "quicktions.pyx"))))
29473 (replace 'check
29474 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
29475 (when tests?
29476 (add-installed-pythonpath inputs outputs)
29477 (invoke "pytest"))
29478 #t)))))
29479 (native-inputs
29480 (list python-cython python-pytest))
29481 (home-page "https://github.com/scoder/quicktions")
29482 (synopsis "Fast fractions data type for rational numbers")
29483 (description
29484 "This package provides fast fractions data type for rational numbers. It
29485 is the cythonized version of @code{fractions.Fraction}.")
29486 (license license:psfl)))
29487
29488 (define-public python-pathvalidate
29489 (package
29490 (name "python-pathvalidate")
29491 (version "2.4.1")
29492 (source
29493 (origin
29494 (method url-fetch)
29495 (uri (pypi-uri "pathvalidate" version))
29496 (sha256
29497 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
29498 (build-system python-build-system)
29499 (arguments
29500 '(#:tests? #f))
29501 ;; Tests disabled because of circular dependencies.
29502 ;; pathvalidate tests depend on pytest-md-report, which
29503 ;; depends on pathvalidate.
29504 (native-inputs
29505 (list python-allpairspy python-click python-faker python-pytest))
29506 (home-page "https://github.com/thombashi/pathvalidate")
29507 (synopsis "Sanitize strings representing paths")
29508 (description
29509 "@code{pathvalidate} is a Python library to sanitize/validate strings
29510 representing paths or filenames.")
29511 (license license:expat)))
29512
29513 (define-public python-escapism
29514 (package
29515 (name "python-escapism")
29516 (version "1.0.1")
29517 (source
29518 (origin
29519 (method url-fetch)
29520 (uri (pypi-uri "escapism" version))
29521 (sha256
29522 (base32
29523 "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
29524 (build-system python-build-system)
29525 (home-page "https://github.com/minrk/escapism")
29526 (synopsis "Simple, generic library for escaping strings")
29527 (description
29528 "This Python library provides a programming interface to, given a set of
29529 safe characters and an escape character, escape safe strings and unescape the
29530 result.")
29531 (license license:expat)))
29532
29533 (define-public python-recommonmark
29534 (package
29535 (name "python-recommonmark")
29536 (version "0.7.1")
29537 (source
29538 (origin
29539 (method url-fetch)
29540 (uri (pypi-uri "recommonmark" version))
29541 (sha256
29542 (base32
29543 "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
29544 (build-system python-build-system)
29545 (propagated-inputs
29546 (list python-commonmark python-docutils python-sphinx))
29547 (arguments
29548 '(#:phases (modify-phases %standard-phases
29549 (add-after 'unpack 'delete-test-sphinx
29550 (lambda* (#:key outputs #:allow-other-keys)
29551 (let* ((out (assoc-ref outputs "out")))
29552 (delete-file "tests/test_sphinx.py")))))))
29553 (home-page "https://github.com/readthedocs/recommonmark")
29554 (synopsis "Docutils-compatibility bridge to CommonMark")
29555 (description
29556 "This package provides a docutils-compatibility bridge to CommonMark that
29557 lets you write CommonMark inside of Docutils & Sphinx projects.")
29558 (license license:expat)))
29559
29560 (define-public python-pyhull
29561 (package
29562 (name "python-pyhull")
29563 (version "2015.2.1")
29564 (source
29565 (origin
29566 (method url-fetch)
29567 (uri (pypi-uri "pyhull" version))
29568 (sha256
29569 (base32
29570 "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
29571 (build-system python-build-system)
29572 (propagated-inputs
29573 (list python-numpy))
29574 (home-page "https://github.com/materialsvirtuallab/pyhull")
29575 (synopsis "Python wrapper to Qhull")
29576 (description
29577 "This package provides a Python wrapper to @uref{http://www.qhull.org/,
29578 Qhull} for the computation of the convex hull, Delaunay triangulation, and
29579 Voronoi diagram.")
29580 (license license:expat)))
29581
29582 (define-public python-opcodes
29583 ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
29584 ;; version number, which is what we use here.
29585 (let ((commit "0f7c7d63f5e13ce5a89d9acc3934f1b6e247ec1f"))
29586 (package
29587 (name "python-opcodes")
29588 (version "0.3.14") ;from 'opcodes/__init__.py'
29589 (home-page "https://github.com/Maratyszcza/Opcodes")
29590 (source (origin
29591 (method git-fetch)
29592 (uri (git-reference (url home-page) (commit commit)))
29593 (file-name (git-file-name name version))
29594 (sha256
29595 (base32
29596 "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
29597 (build-system python-build-system)
29598 (synopsis "Database of processor instructions and opcodes")
29599 (description
29600 "This project documents instruction sets in a format convenient for
29601 tools development. An instruction set is represented by three files:
29602
29603 @itemize
29604 @item an XML file that describes instructions;
29605 @item an XSD file that describes the structure of the XML file;
29606 @item a Python module that reads the XML file and represents it as a set of
29607 Python objects;
29608 @end itemize
29609
29610 It currently provides descriptions for most user-mode x86, x86_64, and k1om
29611 instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
29612 and BMI2).")
29613 (license license:bsd-2))))
29614
29615 (define-public python-peachpy
29616 ;; There is no tag in this repo.
29617 (let ((commit "913d74c35a6b1d330e90bfc055208ce5b06b35a0")
29618 (version "0.2.0") ;from 'peachpy/__init__.py'
29619 (revision "2"))
29620 (package
29621 (name "python-peachpy")
29622 (version (git-version version revision commit))
29623 (home-page "https://github.com/Maratyszcza/PeachPy")
29624 (source (origin
29625 (method git-fetch)
29626 (uri (git-reference (url home-page) (commit commit)))
29627 (file-name (git-file-name name version))
29628 (sha256
29629 (base32
29630 "1wnqxspxsacw4556q0b9fbw11nhrkgn6gs8g43jdnpa35f3z9kb6"))
29631 (patches (search-patches "python-peachpy-determinism.patch"))))
29632 (build-system python-build-system)
29633 (arguments
29634 '(#:phases (modify-phases %standard-phases
29635 (replace 'check
29636 (lambda* (#:key tests? #:allow-other-keys)
29637 (when tests?
29638 (invoke "nosetests")))))))
29639 (native-inputs
29640 (list python-nose python-rednose python-setuptools))
29641 (propagated-inputs
29642 (list python-six python-opcodes))
29643 (synopsis "Efficient assembly code generation in Python")
29644 (description
29645 "PeachPy is a Python framework for writing high-performance assembly kernels.
29646 PeachPy aims to simplify writing optimized assembly kernels while preserving
29647 all optimization opportunities of traditional assembly.
29648
29649 PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings
29650 for the Go language tool chain; it adapts to different calling conventions and
29651 application binary interfaces (ABIs); it takes care of register allocation; it
29652 supports x86_64 instructions up to AVX-512 and SHA.")
29653 (license license:bsd-2))))
29654
29655 (define-public python-sgmllib3k
29656 (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
29657 (revision "1"))
29658 (package
29659 (name "python-sgmllib3k")
29660 (version
29661 (git-version "1.0.0" revision commit))
29662 (source
29663 (origin
29664 (method git-fetch)
29665 (uri (git-reference
29666 (url "https://github.com/hsoft/sgmllib")
29667 (commit commit)))
29668 (file-name (git-file-name name version))
29669 (sha256
29670 (base32
29671 "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
29672 (build-system python-build-system)
29673 (home-page "https://github.com/hsoft/sgmllib")
29674 (synopsis "Python 3 port of sgmllib")
29675 (description "This package provides an unmaintained port of sgmllib to
29676 Python 3. It is used to parse text files formatted in @acronym{SGML,Standard
29677 Generalized Mark-up Language}.")
29678 (license license:bsd-3))))
29679
29680 (define-public python-cwcwidth
29681 (package
29682 (name "python-cwcwidth")
29683 (version "0.1.4")
29684 (source
29685 (origin
29686 (method url-fetch)
29687 (uri (pypi-uri "cwcwidth" version))
29688 (sha256
29689 (base32
29690 "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
29691 (build-system python-build-system)
29692 (native-inputs
29693 (list python-cython python-pytest python-setuptools-scm python-toml
29694 python-wheel))
29695 (home-page
29696 "https://github.com/sebastinas/cwcwidth")
29697 (synopsis "Python bindings for wc(s)width")
29698 (description "This package provides bindings for wcwidth and wcswidth
29699 functions defined in POSIX.1-2001 and POSIX.1-2008.")
29700 (license license:expat)))
29701
29702 (define-public python-pyan3
29703 (package
29704 (name "python-pyan3")
29705 (version "1.2.0")
29706 (source
29707 (origin
29708 ;; Source tarball on PyPI lacks tests.
29709 (method git-fetch)
29710 (uri (git-reference
29711 (url "https://github.com/Technologicat/pyan")
29712 (commit (string-append "v" version))))
29713 (file-name (git-file-name name version))
29714 (sha256
29715 (base32
29716 "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
29717 (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
29718 "python-pyan3-fix-absolute-path-bug.patch"))))
29719 (build-system python-build-system)
29720 (arguments
29721 `(#:phases
29722 (modify-phases %standard-phases
29723 (replace 'check
29724 (lambda* (#:key tests? #:allow-other-keys)
29725 (when tests?
29726 ;; Extend PYTHONPATH so the built package will be found.
29727 (setenv "GUIX_PYTHONPATH"
29728 (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
29729 (invoke "pytest")))))))
29730 (native-inputs
29731 (list python-pytest python-pytest-cov python-wheel))
29732 (propagated-inputs
29733 (list python-jinja2))
29734 (home-page "https://github.com/Technologicat/pyan")
29735 (synopsis "Offline call graph generator for Python 3")
29736 (description "Pyan takes one or more Python source files, performs
29737 a (rather superficial) static analysis, and constructs a directed graph of the
29738 objects in the combined source, and how they define or use each other. The
29739 graph can be output for rendering by GraphViz or yEd.")
29740 (license license:gpl2)))
29741
29742 (define-public python-multipledispatch
29743 (package
29744 (name "python-multipledispatch")
29745 (version "0.6.0")
29746 (source
29747 (origin
29748 (method url-fetch)
29749 (uri (pypi-uri "multipledispatch" version))
29750 (sha256
29751 (base32
29752 "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
29753 (build-system python-build-system)
29754 (propagated-inputs (list python-six))
29755 (home-page "https://github.com/mrocklin/multipledispatch/")
29756 (synopsis "Multiple dispatch for Python based on pattern matching")
29757 (description "This library provides an efficient mechanism for overloading
29758 function implementations based on the types of the arguments.")
29759 (license license:bsd-3)))
29760
29761 (define-public python-logical-unification
29762 (package
29763 (name "python-logical-unification")
29764 (version "0.4.3")
29765 (source
29766 (origin
29767 (method url-fetch)
29768 (uri (pypi-uri "logical-unification" version))
29769 (sha256
29770 (base32
29771 "0j57953hi7kg2rl0163vzjzsvzdyjimnklhx6idf5vaqqf1d3p1j"))))
29772 (build-system python-build-system)
29773 (propagated-inputs
29774 (list python-multipledispatch python-toolz))
29775 (home-page "https://github.com/pythological/unification/")
29776 (synopsis "Logical unification in Python for solving symbolic expressions")
29777 (description "This library provides algorithms and data types for solving
29778 symbolic expressions in pure Python using the technique of logical unification.")
29779 (license license:bsd-3)))
29780
29781 (define-public python-cons
29782 (package
29783 (name "python-cons")
29784 (version "0.4.2")
29785 (source
29786 (origin
29787 (method url-fetch)
29788 (uri (pypi-uri "cons" version))
29789 (sha256
29790 (base32
29791 "0w9giq196wps7mbm47c4shdzs5yvwvqajqzkim2p92i51sm5qgvm"))))
29792 (build-system python-build-system)
29793 (native-inputs
29794 (list python-pytest-6 python-toml))
29795 (propagated-inputs
29796 (list python-logical-unification))
29797 (home-page "https://github.com/pythological/python-cons")
29798 (synopsis "Cons cell data structures and related algorithms for Python")
29799 (description
29800 "This library implements algorithms and data structures for Lisp-style
29801 cons cells in Python.")
29802 (license license:lgpl3+)))
29803
29804 (define-public python-etuples
29805 (package
29806 (name "python-etuples")
29807 (version "0.3.3")
29808 (source
29809 (origin
29810 (method url-fetch)
29811 (uri (pypi-uri "etuples" version))
29812 (sha256
29813 (base32
29814 "0jhfyp177v37rl0i7wqfx7q6s5qkz027hl283d1x8d0vm3w0zqc8"))))
29815 (build-system python-build-system)
29816 (propagated-inputs
29817 (list python-cons python-multipledispatch))
29818 (home-page "https://github.com/pythological/etuples")
29819 (synopsis "S-expressions in Python")
29820 (description
29821 "This library implements eval'able S-expression in Python using tuple-like objects.")
29822 (license license:asl2.0)))
29823
29824 (define-public python-minikanren
29825 (package
29826 (name "python-minikanren")
29827 (version "1.0.1")
29828 (source
29829 (origin
29830 (method git-fetch)
29831 (uri (git-reference
29832 (url "https://github.com/pythological/kanren")
29833 (commit (string-append "v" version))))
29834 (file-name (git-file-name name version))
29835 (sha256
29836 (base32 "0g7wfj5hxalwz7k1301nsjqhjpzsif1bj6wjm2x2kavlm2ypv9jc"))))
29837 (build-system python-build-system)
29838 (arguments
29839 '(#:phases (modify-phases %standard-phases
29840 (replace 'check
29841 (lambda* (#:key tests? #:allow-other-keys)
29842 (when tests?
29843 (invoke "python" "-m" "pytest" "-v" "tests/" "kanren/"))
29844 #t)))))
29845 (native-inputs
29846 (list python-coveralls
29847 python-pydocstyle
29848 python-pytest
29849 python-pytest-cov
29850 python-pylint
29851 python-black
29852 python-sympy
29853 python-versioneer
29854 python-coverage
29855 python-pre-commit))
29856 (propagated-inputs
29857 (list python-toolz python-cons python-multipledispatch
29858 python-etuples python-logical-unification))
29859 (home-page "https://github.com/pythological/kanren")
29860 (synopsis "Relational logic programming in pure Python")
29861 (description
29862 "The minikanren library provides an algorithmic core for computer algebra
29863 systems in Python.")
29864 (license license:bsd-3)))
29865
29866 (define-public python-dotenv
29867 (package
29868 (name "python-dotenv")
29869 (version "0.20.0")
29870 (source
29871 (origin
29872 (method url-fetch)
29873 (uri (pypi-uri "python-dotenv" version))
29874 (sha256
29875 (base32 "13s9imfd0k4d7b1qy5wfqzw5vyj6rhmcrccsdz1l4g39b55b1qxp"))))
29876 (build-system python-build-system)
29877 (arguments
29878 `(#:phases
29879 (modify-phases %standard-phases
29880 (replace 'check
29881 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
29882 (when tests?
29883 (add-installed-pythonpath inputs outputs)
29884 (setenv "PATH" (string-append (getenv "PATH") ":"
29885 (assoc-ref outputs "out") "/bin"))
29886 ;; Skip the ipython tests.
29887 (delete-file "tests/test_ipython.py")
29888 (invoke "python" "-m" "pytest")))))))
29889 (propagated-inputs
29890 (list python-click))
29891 (native-inputs
29892 (list python-mock python-pytest python-sh))
29893 (home-page "https://saurabh-kumar.com/python-dotenv/")
29894 (synopsis "Setup environment variables according to .env files")
29895 (description
29896 "This package provides the @code{python-dotenv} Python module to read
29897 key-value pairs from a @code{.env} file and set them as environment variables.")
29898 (license license:bsd-3)))
29899
29900 (define-public python-dotenv-0.13.0
29901 (package (inherit python-dotenv)
29902 (name "python-dotenv")
29903 (version "0.13.0")
29904 (source
29905 (origin
29906 (method url-fetch)
29907 (uri (pypi-uri "python-dotenv" version))
29908 (sha256
29909 (base32
29910 "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
29911
29912 (define-public date2name
29913 (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
29914 (revision "1"))
29915 (package
29916 (name "date2name")
29917 (version (git-version "0.0" revision commit))
29918 (source
29919 (origin
29920 (method git-fetch)
29921 (uri (git-reference
29922 (url "https://github.com/novoid/date2name")
29923 (commit commit)))
29924 (file-name (git-file-name name version))
29925 (sha256
29926 (base32
29927 "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
29928 (build-system python-build-system)
29929 (arguments
29930 `(#:tests? #f ; no tests
29931 #:phases
29932 (modify-phases %standard-phases
29933 (delete 'build)
29934 (replace 'install
29935 (lambda* (#:key outputs #:allow-other-keys)
29936 (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
29937 (binary (string-append bindir "/date2name")))
29938 (mkdir-p bindir)
29939 (copy-file "date2name/__init__.py" binary)
29940 (chmod binary #o555)))))))
29941 (synopsis "Handling time-stamps and date-stamps in file names")
29942 (description "By default, date2name gets the modification time of matching
29943 files and directories and adds a datestamp in standard ISO 8601+ format
29944 YYYY-MM-DD at the beginning of the file or directory name.")
29945 (home-page "https://github.com/novoid/date2name")
29946 (license license:gpl3+))))
29947
29948 (define-public python-braintree
29949 (package
29950 (name "python-braintree")
29951 (version "4.12.0")
29952 (source
29953 (origin
29954 (method url-fetch)
29955 (uri (pypi-uri "braintree" version))
29956 (sha256
29957 (base32 "19kli85q18p80nsn8fm4ql6axpr7bllfqg5chv2ywhr8zr8bssll"))))
29958 (build-system python-build-system)
29959 (propagated-inputs
29960 (list python-requests))
29961 (home-page
29962 "https://developers.braintreepayments.com/python/sdk/server/overview")
29963 (synopsis "Braintree Python Library")
29964 (description "The Braintree Python SDK provides integration access to the
29965 Braintree Gateway. Braintree is a US-based payments service provider.")
29966 (license license:expat)))
29967
29968 (define-public python-markuppy
29969 (package
29970 (name "python-markuppy")
29971 (version "1.14")
29972 (source
29973 (origin
29974 (method url-fetch)
29975 (uri (pypi-uri "MarkupPy" version))
29976 (sha256
29977 (base32 "0pqdmpxbr8iq22b4css2gz5z6s01ddpzyj25x27kgbs2lp0f5phs"))))
29978 (build-system python-build-system)
29979 (home-page "https://github.com/tylerbakke/MarkupPy")
29980 (synopsis "Pythonic HTML/XML generator")
29981 (description "This Python module attempts to make it easier to generate
29982 HTML/XML from a Python program in an intuitive, lightweight, customizable and
29983 pythonic way.")
29984 (license license:expat)))
29985
29986 (define-public python-tablib
29987 (package
29988 (name "python-tablib")
29989 (version "3.0.0")
29990 (source
29991 (origin
29992 (method url-fetch)
29993 (uri (pypi-uri "tablib" version))
29994 (sha256
29995 (base32 "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q"))))
29996 (build-system python-build-system)
29997 (arguments
29998 '(#:phases
29999 (modify-phases %standard-phases
30000 (replace 'check
30001 (lambda* (#:key tests? #:allow-other-keys)
30002 (when tests?
30003 (setenv "GUIX_PYTHONPATH"
30004 (string-append (getcwd) "/build/lib:"
30005 (getenv "GUIX_PYTHONPATH")))
30006 (invoke "pytest")))))))
30007 (native-inputs
30008 (list python-pandas ;; required for test-suite
30009 python-pytest python-pytest-cov python-setuptools-scm))
30010 (propagated-inputs
30011 (list python-markuppy
30012 python-odfpy
30013 python-openpyxl
30014 python-pyyaml
30015 python-tabulate
30016 python-xlrd
30017 python-xlwt))
30018 (home-page "https://tablib.readthedocs.io")
30019 (synopsis "Format agnostic tabular data library")
30020 (description "@code{tablib} is a format-agnostic tabular dataset library,
30021 written in Python. Supported output formats are Excel (Sets + Books),
30022 JSON (Sets + Books), YAML (Sets + Books), HTML (Sets), Jira (Sets),
30023 TSV (Sets), ODS (Sets), CSV (Sets), and DBF (Sets).
30024
30025 @code{tablib} also supports Pandas DataFrames (Sets). Anyhow, since pandas is
30026 quite huge, this Guix package doesn't depend on pandas. In case, just also
30027 install @code{python-pandas}.")
30028 (license license:expat)))
30029
30030 (define-public python-csb43
30031 (package
30032 (name "python-csb43")
30033 (version "0.9.1")
30034 (source
30035 (origin
30036 (method url-fetch)
30037 (uri (pypi-uri "csb43" version))
30038 (sha256
30039 (base32 "0r0csl9npncnkfafg3rg6xr38d1qr0sxvq7wn7mg9bq41hvvh1si"))))
30040 (build-system python-build-system)
30041 (native-inputs
30042 (list python-lxml))
30043 (propagated-inputs
30044 (list python-pycountry python-pyyaml python-tablib))
30045 (home-page "https://bitbucket.org/wmj/csb43")
30046 (synopsis "Tools for converting from the Spanish banks' format CSB norm
30047 43 (CSB43)")
30048 (description "This package provides tools to convert files in the format
30049 used by multiple Spanish banks (standard 43 of the Spanish Banking Council
30050 [CSB43] / Spanish Banking Association [AEB43]) to other formats.
30051
30052 Supported output formats are: OFX, HomeBank CSV, HTML, JSON, ODS (OpenDocument
30053 spreadsheet), CSV, TSV, XLS, XLSX (Microsoft Excel spreadsheet), and YAML.")
30054 (license license:lgpl3)))
30055
30056 (define-public python-febelfin-coda
30057 (package
30058 (name "python-febelfin-coda")
30059 (version "0.2.0")
30060 (source
30061 (origin
30062 (method url-fetch)
30063 (uri (pypi-uri "febelfin-coda" version))
30064 (sha256
30065 (base32 "1isnf87gxlvfbmackv7b2c978vmnj7ij0v4svhyjl8pbb9hwjsvm"))))
30066 (build-system python-build-system)
30067 (home-page "https://coda.b2ck.com/")
30068 (synopsis "Module to parse Belgian CODA files")
30069 (description "This package provides a module to parse Coded statement of
30070 account (CODA) files as defined be the Belgian Febelfin bank standard.")
30071 (license license:bsd-3)))
30072
30073 (define-public python-ofxparse
30074 (package
30075 (name "python-ofxparse")
30076 (version "0.21")
30077 (source
30078 (origin
30079 (method url-fetch)
30080 (uri (pypi-uri "ofxparse" version))
30081 (sha256
30082 (base32 "19y4sp5l9jqiqzzlbqdfiab42qx7d84n4xm4s7jfq397666vcyh5"))))
30083 (build-system python-build-system)
30084 (arguments
30085 '(#:phases
30086 (modify-phases %standard-phases
30087 (replace 'check
30088 (lambda* (#:key tests? #:allow-other-keys)
30089 (when tests?
30090 (invoke "nosetests" "-v")))))))
30091 (native-inputs
30092 (list python-nose))
30093 (propagated-inputs
30094 (list python-beautifulsoup4 python-lxml python-six))
30095 (home-page "http://sites.google.com/site/ofxparse")
30096 (synopsis "Tools for working with the OFX (Open Financial Exchange) file
30097 format")
30098 (description "@code{ofxparse} is a parser for Open Financial
30099 Exchange (.ofx) format files. OFX files are available from almost any online
30100 banking site, so they work well if you want to pull together your finances
30101 from multiple sources. Online trading accounts also often provide account
30102 statements in OFX files.")
30103 (license license:expat)))
30104
30105 (define-public python-rfc3339-validator
30106 (package
30107 (name "python-rfc3339-validator")
30108 (version "0.1.4")
30109 (source
30110 (origin
30111 (method url-fetch)
30112 (uri (pypi-uri "rfc3339_validator" version))
30113 (sha256
30114 (base32 "0srg0b89aikzinw72s433994k5gv5lfyarq1adhas11kz6yjm2hk"))))
30115 (build-system python-build-system)
30116 (native-inputs (list python-hypothesis
30117 python-pytest
30118 python-pytest-runner
30119 python-strict-rfc3339))
30120 (propagated-inputs (list python-six))
30121 (home-page "https://github.com/naimetti/rfc3339-validator")
30122 (synopsis "Python RFC3339 validator")
30123 (description "This package provides a pure Python RFC3339 validator.")
30124 (license license:expat)))
30125
30126 (define-public python-strict-rfc3339
30127 (package
30128 (name "python-strict-rfc3339")
30129 (version "0.7")
30130 (source
30131 (origin
30132 (method git-fetch) ;no tests in pypi release
30133 (uri (git-reference
30134 (url "https://github.com/danielrichman/strict-rfc3339")
30135 (commit (string-append "version-" version))))
30136 (file-name (git-file-name name version))
30137 (sha256
30138 (base32
30139 "0b12bh9v9gwkm89kxbidxw2z81lg8fx1v5fzgs313v1wgx6qb09p"))))
30140 (build-system python-build-system)
30141 (arguments
30142 (list
30143 #:phases
30144 #~(modify-phases %standard-phases
30145 (replace 'check
30146 (lambda* (#:key tests? #:allow-other-keys)
30147 (when tests?
30148 (invoke "pytest" "-vv"
30149 ;; The timestamp to local offset tests fail due to
30150 ;; missing timezone data (see:
30151 ;; https://github.com/danielrichman/strict-rfc3339/issues/9).
30152 "-k" "not LocalOffset")))))))
30153 (native-inputs (list python-pytest))
30154 (home-page "https://github.com/danielrichman/strict-rfc3339")
30155 (synopsis "RFC3339 procedures library")
30156 (description "The @code{strict_rfc3339} Python module provides strict,
30157 simple, lightweight RFC3339 procedures. It enables or aims to:
30158 @itemize
30159 @item Convert UNIX timestamps to and from RFC3339.
30160 @item Produce RFC3339 strings with a UTC offset (Z) or with the offset that
30161 the C time module reports is the local timezone offset.
30162 @item Be simple with minimal dependencies/libraries.
30163 @item Avoid timezones as much as possible.
30164 @item Be very strict and follow RFC3339.
30165 @end itemize")
30166 (license license:gpl3+)))
30167
30168 (define-public python-stripe
30169 (package
30170 (name "python-stripe")
30171 (version "2.60.0")
30172 (source
30173 (origin
30174 (method url-fetch)
30175 (uri (pypi-uri "stripe" version))
30176 (sha256
30177 (base32 "0258lzh4qikhinfggnlfh5aklcvg7lrvl8giqrh0yf0l61wvfrl9"))))
30178 (build-system python-build-system)
30179 (arguments
30180 '(#:tests? #f)) ;; tests require network
30181 (propagated-inputs
30182 (list python-requests))
30183 (home-page "https://github.com/stripe/stripe-python")
30184 (synopsis "Python bindings for the Stripe financial services' API")
30185 (description "This package provides access to the Stripe financial
30186 services' API. It includes a pre-defined set of classes for API resources
30187 that initialize themselves dynamically from API responses which makes it
30188 compatible with a wide range of versions of the Stripe API.")
30189 (license license:expat)))
30190
30191 (define-public python-platformdirs
30192 (package
30193 (name "python-platformdirs")
30194 (version "2.4.1")
30195 (source
30196 (origin
30197 (method url-fetch)
30198 (uri (pypi-uri "platformdirs" version))
30199 (sha256
30200 (base32 "1njz0h4iky8iglrb85cd07hpa3lp1a2dfr934dj65hxwzvfk61j4"))))
30201 (build-system python-build-system)
30202 (arguments
30203 '(#:phases (modify-phases %standard-phases
30204 (replace 'check
30205 (lambda* (#:key tests? #:allow-other-keys)
30206 (when tests?
30207 (invoke "pytest" "-vv")))))))
30208 (native-inputs
30209 (list python-appdirs python-pytest python-pytest-mock
30210 python-setuptools-scm))
30211 (home-page "https://github.com/platformdirs/platformdirs")
30212 (synopsis "Determine the appropriate platform-specific directories")
30213 (description "When writing applications, finding the right location to
30214 store user data and configuration varies per platform. Even for
30215 single-platform apps, there may by plenty of nuances in figuring out the right
30216 location. This small Python module determines the appropriate
30217 platform-specific directories, e.g. the ``user data dir''.")
30218 (license license:expat)))
30219
30220 (define-public python-json2html
30221 (package
30222 (name "python-json2html")
30223 (version "1.3.0")
30224 (source
30225 ;; There are no tests in the PyPI tarball.
30226 (origin
30227 (method git-fetch)
30228 (uri (git-reference
30229 (url "https://github.com/softvar/json2html")
30230 (commit (string-append "v" version))))
30231 (file-name (git-file-name name version))
30232 (sha256
30233 (base32 "1ncypljnl5y8lsxy6ibcqy412kx3mzxl4ajg67568hvq98kv1sb3"))))
30234 (build-system python-build-system)
30235 (arguments
30236 '(#:phases
30237 (modify-phases %standard-phases
30238 (replace 'check
30239 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
30240 (when tests?
30241 (add-installed-pythonpath inputs outputs)
30242 (invoke "python" "test/run_tests.py")))))))
30243 (home-page "https://github.com/softvar/json2html")
30244 (synopsis "Convert JSON to HTML table")
30245 (description "@code{python-json2html} is a python module to convert JSON
30246 into a human readable HTML table representation.")
30247 (license license:expat)))
30248
30249 (define-public python-face
30250 (package
30251 (name "python-face")
30252 (version "20.1.1")
30253 (source
30254 (origin
30255 (method url-fetch)
30256 (uri (pypi-uri "face" version))
30257 (sha256
30258 (base32 "0gpd9f0rmbv3rd2szi2na37l29fabkwazikjrxc6wca1lddwlnbx"))))
30259 (build-system python-build-system)
30260 (arguments
30261 '(#:phases
30262 (modify-phases %standard-phases
30263 (replace 'check
30264 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
30265 (when tests?
30266 ;; Make installed package available for running the tests.
30267 (add-installed-pythonpath inputs outputs)
30268 (invoke "pytest" "-v")))))))
30269 (native-inputs
30270 (list python-pytest))
30271 (propagated-inputs
30272 (list python-boltons))
30273 (home-page "https://github.com/mahmoud/face")
30274 (synopsis "CLI parsing and dispatching microframework")
30275 (description "@code{python-face} is a Pythonic microframework for building
30276 command-line applications.
30277
30278 @itemize
30279 @item First-class subcommand support
30280 @item Powerful middleware architecture
30281 @item Separate parser layer
30282 @item Built-in flagfile support
30283 @item Handy testing utilities
30284 @item Themeable help display
30285 @end itemize")
30286 (license license:bsd-3)))
30287
30288 (define-public python-glom
30289 (package
30290 (name "python-glom")
30291 (version "20.11.0")
30292 (source
30293 (origin
30294 (method url-fetch)
30295 (uri (pypi-uri "glom" version))
30296 (sha256
30297 (base32 "04pba09vdr3qjvqvy14g60fscdsi35chbbyqpczdp76cpir101al"))))
30298 (build-system python-build-system)
30299 (arguments
30300 '(#:phases
30301 (modify-phases %standard-phases
30302 (replace 'check
30303 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
30304 (when tests?
30305 ;; Make installed executable available for running the tests.
30306 (setenv "PATH"
30307 (string-append (assoc-ref outputs "out") "/bin"
30308 ":" (getenv "PATH")))
30309 (invoke "pytest" "-v")))))))
30310 (native-inputs
30311 (list python-pytest python-pyyaml))
30312 (propagated-inputs
30313 (list python-attrs python-boltons python-face))
30314 (home-page "https://github.com/mahmoud/glom")
30315 (synopsis "Declaratively restructure data")
30316 (description "Real applications have real data, and real data
30317 nests---objects inside of objects inside of lists of objects. glom is a new
30318 and powerful way to handle real-world data, featuring:
30319
30320 @itemize
30321 @item Path-based access to nested data structures
30322 @item Readable, meaningful error messages
30323 @item Declarative data transformation, using lightweight, Pythonic specifications
30324 @item Built-in data exploration and debugging features
30325 @end itemize")
30326 (license license:bsd-3)))
30327
30328 (define-public python-box
30329 (package
30330 (name "python-box")
30331 (version "5.3.0")
30332 (source
30333 (origin
30334 (method url-fetch)
30335 (uri (pypi-uri "python-box" version))
30336 (sha256
30337 (base32
30338 "0jhrdif57khx2hsw1q6a9x42knwcvq8ijgqyq1jmll6y6ifyzm2f"))))
30339 (build-system python-build-system)
30340 (propagated-inputs
30341 (list python-msgpack python-ruamel.yaml python-toml))
30342 (home-page "https://github.com/cdgriffith/Box")
30343 (synopsis "Advanced Python dictionaries with dot notation access")
30344 (description
30345 "This package provides the @code{python-box} Python module.
30346 It implements advanced Python dictionaries with dot notation access.")
30347 (license license:expat)))
30348
30349 (define-public python-fields
30350 (package
30351 (name "python-fields")
30352 (version "5.0.0")
30353 (source
30354 (origin
30355 (method url-fetch)
30356 (uri (pypi-uri "fields" version))
30357 (sha256
30358 (base32 "09sppvhhkhkv9zc9g994m53z15v92csxwcf42ggkaknlv01smm1i"))))
30359 (build-system python-build-system)
30360 (home-page "https://python-fields.readthedocs.io/")
30361 (synopsis "Python container class boilerplate killer")
30362 (description "Avoid repetetive boilerplate code in Python classes.")
30363 (license license:bsd-3)))
30364
30365 (define-public python-aspectlib
30366 (package
30367 (name "python-aspectlib")
30368 (version "1.5.2")
30369 (source
30370 (origin
30371 (method url-fetch)
30372 (uri (pypi-uri "aspectlib" version))
30373 (sha256
30374 (base32 "1am4ycf292zbmgz791z393v63w7qrynf8q5p9db2wwf2qj1fqxfj"))))
30375 (build-system python-build-system)
30376 (propagated-inputs (list python-fields))
30377 (home-page "https://github.com/ionelmc/python-aspectlib")
30378 (synopsis
30379 "Python monkey-patching and decorators")
30380 (description
30381 "This package provides an aspect-oriented programming, monkey-patch
30382 and decorators library. It is useful when changing behavior in existing
30383 code is desired. It includes tools for debugging and testing:
30384 simple mock/record and a complete capture/replay framework.")
30385 (license license:bsd-2)))
30386
30387 (define-public python-ijson
30388 (package
30389 (name "python-ijson")
30390 (version "3.1.4")
30391 (source
30392 (origin
30393 (method url-fetch)
30394 (uri (pypi-uri "ijson" version))
30395 (sha256
30396 (base32 "1sp463ywj4jv5cp6hsv2qwiima30d09xsabxb2dyq5b17jp0640x"))))
30397 (arguments
30398 `(#:phases
30399 (modify-phases %standard-phases
30400 ;; the tests run by the default setup.py require yajl 1.x,
30401 ;; but we have 2.x. yajl 1.x support is going to be removed
30402 ;; anyway, so use pytest to avoid running the yajl1-related
30403 ;; tests. See: https://github.com/ICRAR/ijson/issues/55
30404 (replace 'check
30405 (lambda* (#:key tests? #:allow-other-keys)
30406 (when tests?
30407 (invoke "pytest" "-vv")))))))
30408 (inputs
30409 ;; libyajl is optional, but compiling with it makes faster
30410 ;; backends available to ijson:
30411 (list libyajl))
30412 (native-inputs
30413 (list python-pytest))
30414 (build-system python-build-system)
30415 (home-page "https://github.com/ICRAR/ijson")
30416 (synopsis "Iterative JSON parser with Python iterator interfaces")
30417 (description
30418 "Ijson is an iterative JSON parser with standard Python iterator
30419 interfaces.")
30420 (license license:bsd-3)))
30421
30422 (define-public python-ordered-set
30423 (package
30424 (name "python-ordered-set")
30425 (version "4.1.0")
30426 (source
30427 (origin
30428 (method url-fetch)
30429 (uri (pypi-uri "ordered-set" version))
30430 (sha256
30431 (base32 "1a34fg3r3480nfm6652kyqql3lwixf8jirzdja9camvnr128wjk9"))))
30432 (build-system python-build-system)
30433 (arguments
30434 (list #:phases
30435 #~(modify-phases %standard-phases
30436 (replace 'check
30437 (lambda* (#:key tests? #:allow-other-keys)
30438 (when tests?
30439 (invoke "pytest" "-vv")))))))
30440 (native-inputs (list python-cython python-pytest))
30441 (home-page "https://github.com/simonpercivall/orderedset")
30442 (synopsis "Ordered Set implementation in Cython")
30443 (description "This library provides an @code{OrderedSet} data type that
30444 works like a regular set, but remembers insertion order. It supports the full
30445 Python @code{set} interface.")
30446 (license license:asl2.0)))
30447
30448 (define-public python-orgparse
30449 (package
30450 (name "python-orgparse")
30451 (version "0.3.0")
30452 (source
30453 (origin
30454 (method url-fetch)
30455 (uri (pypi-uri "orgparse" version))
30456 (sha256
30457 (base32 "14iv4pg3rma9560plg0w943x04mr2cmrssda43y2d1x9acrd2n71"))))
30458 (build-system python-build-system)
30459 (arguments
30460 `(#:phases
30461 (modify-phases %standard-phases
30462 (replace 'check
30463 (lambda* (#:key tests? #:allow-other-keys)
30464 (when tests?
30465 (invoke "pytest" "-vv" "orgparse/tests")))))))
30466 (native-inputs
30467 (list python-pytest python-setuptools-scm))
30468 (home-page "https://github.com/karlicoss/orgparse")
30469 (synopsis "Emacs Org mode parser in Python")
30470 (description
30471 "This package is a Python module for reading Emacs Org mode files.")
30472 (license license:bsd-3)))
30473
30474 (define-public dynaconf
30475 (package
30476 (name "dynaconf")
30477 (version "3.1.7")
30478 (source
30479 (origin
30480 (method git-fetch)
30481 (uri
30482 (git-reference
30483 (url "https://github.com/rochacbruno/dynaconf")
30484 (commit version)))
30485 (file-name (git-file-name name version))
30486 (sha256
30487 (base32
30488 "0pjyjsdzairpn5vq8nzddhxwxmr18grn272nj31wcy2ipwdl3c3h"))
30489 (patches (search-patches "dynaconf-unvendor-deps.patch"))
30490 (modules '((guix build utils)))
30491 (snippet '(begin
30492 ;; Remove vendored dependencies
30493 (let ((unvendor '("click" "dotenv" "ruamel" "toml")))
30494 (with-directory-excursion "dynaconf/vendor"
30495 (for-each delete-file-recursively unvendor))
30496 (with-directory-excursion "dynaconf/vendor_src"
30497 (for-each delete-file-recursively unvendor)))))))
30498 (build-system python-build-system)
30499 (arguments
30500 `(#:phases
30501 (modify-phases %standard-phases
30502 (add-after 'unpack 'patch-for-click-8
30503 (lambda _
30504 (substitute* "dynaconf/cli.py"
30505 (("click.get_os_args\\()") ;deprecated from Click 8.1+
30506 "sys.argv[1:]"))))
30507 (replace 'check
30508 (lambda* (#:key tests? outputs #:allow-other-keys)
30509 (when tests?
30510 ;; These tests depend on hvac and a live Vault process.
30511 (delete-file "tests/test_vault.py")
30512 (invoke "make" "test_only")))))))
30513 (propagated-inputs
30514 (list python-click python-configobj python-dotenv-0.13.0
30515 python-ruamel.yaml python-toml))
30516 (native-inputs
30517 (list python-django python-flask python-pytest python-pytest-cov
30518 python-pytest-mock))
30519 (home-page "https://www.dynaconf.com/")
30520 (synopsis "The dynamic configurator for your Python project")
30521 (description
30522 "This package provides @code{dynaconf} the dynamic configurator manager for
30523 your Python project. It provides features such as:
30524
30525 @itemize
30526 @item Inspired by the @url{https://12factor.net/config, 12-factor application guide};
30527 @item Settings management (default values, validation, parsing, templating);
30528 @item Protection of sensitive information (passwords/tokens);
30529 @item Multiple file formats @code{toml|yaml|json|ini|py} and also customizable
30530 loaders;
30531 @item Full support for environment variables to override existing settings
30532 (dotenv support included);
30533 @item Optional layered system for multiple environments @code{[default,
30534 development, testing, production]};
30535 @item Built-in support for Hashicorp Vault and Redis as settings and secrets storage;
30536 @item Built-in extensions for Django and Flask web frameworks;
30537 @item CLI for common operations such as @code{init, list, write, validate, export}.
30538 @end itemize")
30539 (license license:expat)))
30540
30541 (define-public python-pudb
30542 (package
30543 (name "python-pudb")
30544 (version "2022.1.1")
30545 (source (origin
30546 (method url-fetch)
30547 (uri (pypi-uri "pudb" version))
30548 (sha256
30549 (base32
30550 "0gq82hwnibby9qdyv7ri11phvg94nby4jb0w9h3jk79w89kdsfyv"))))
30551 (build-system python-build-system)
30552 (arguments
30553 `(#:phases (modify-phases %standard-phases
30554 (add-before 'check 'fix-read-only-home
30555 (lambda _
30556 (setenv "HOME" "/tmp")))
30557 (replace 'check
30558 (lambda* (#:key tests? #:allow-other-keys)
30559 (when tests?
30560 (invoke "pytest" "-vv")))))))
30561 (native-inputs (list python-pytest python-pytest-mock))
30562 (propagated-inputs (list python-jedi python-pygments python-urwid
30563 python-urwid-readline))
30564 (home-page "https://documen.tician.de/pudb/")
30565 (synopsis "Console-based Python debugger")
30566 (description
30567 "@command{pudb} is a full-screen, console-based Python debugger providing
30568 all the niceties of modern GUI-based debuggers in a more lightweight and
30569 keyboard-friendly package.")
30570 (license license:expat)))
30571
30572 (define-public pudb
30573 (deprecated-package "pudb" python-pudb))
30574
30575 (define-public python-iwlib
30576 (package
30577 (name "python-iwlib")
30578 (version "1.7.0")
30579 (source
30580 (origin
30581 (method url-fetch)
30582 (uri (pypi-uri "iwlib" version))
30583 (sha256
30584 (base32 "18bd35wn7zclalpqbry42pf7bjrdggxkkw58mc0k1vkhg9czc1d8"))))
30585 (build-system python-build-system)
30586 (inputs
30587 (list wireless-tools))
30588 (propagated-inputs (list python-cffi))
30589 (home-page "https://github.com/nhoad/python-iwlib")
30590 (synopsis "Python module to interface with iwlib")
30591 (description
30592 "This package provides a Python interface to iw wireless tools.")
30593 (license license:gpl2)))
30594
30595 (define-public python-pdoc3
30596 (package
30597 (name "python-pdoc3")
30598 (version "0.10.0")
30599 (source
30600 (origin
30601 (method url-fetch)
30602 (uri (pypi-uri "pdoc3" version))
30603 (sha256
30604 (base32 "1dz4hw10ngidzg9cjvflc8nlrwrjbb3ijhmaw4w6f039p6yff8jz"))
30605 (patches
30606 (search-patches "python-pdoc3-tests.patch"))))
30607 (build-system python-build-system)
30608 (native-inputs
30609 (list python-setuptools-git python-setuptools-scm))
30610 (propagated-inputs (list python-mako python-markdown))
30611 (home-page "https://pdoc3.github.io/pdoc/")
30612 (synopsis "Auto-generate API documentation for Python projects")
30613 (description
30614 "This package auto-generates API documentation from Python projects
30615 already existing modules and objects docstrings.")
30616 (license license:agpl3+)))
30617
30618 (define-public python-piexif
30619 (package
30620 (name "python-piexif")
30621 (version "1.1.3")
30622 (source
30623 (origin
30624 (method url-fetch)
30625 (uri (pypi-uri "piexif" version ".zip"))
30626 (sha256
30627 (base32 "06sz58q4mrw472p8fbnq7wsj8zpi5js5r8phm2hiwfmz0v33bjw3"))
30628 (patches
30629 (search-patches "python-piexif-fix-tests-with-pillow-7.2.patch"))))
30630 (build-system python-build-system)
30631 (native-inputs
30632 (list unzip python-pillow))
30633 (home-page "https://github.com/hMatoba/Piexif")
30634 (synopsis "Simplify exif manipulations with Python")
30635 (description "Piexif simplifies interacting with EXIF data in
30636 Python. It includes the tools necessary for extracting, creating,
30637 manipulating, converting and writing EXIF data to JPEG, WebP and TIFF files.")
30638 (license license:expat)))
30639
30640 (define-public python-pyrss2gen
30641 (package
30642 (name "python-pyrss2gen")
30643 (version "1.1")
30644 (source
30645 (origin
30646 (method url-fetch)
30647 (uri (pypi-uri "PyRSS2Gen" version))
30648 (sha256
30649 (base32 "1rvf5jw9hknqz02rp1vg8abgb1lpa0bc65l7ylmlillqx7bswq3r"))))
30650 (build-system python-build-system)
30651 (home-page "http://dalkescientific.com/Python/PyRSS2Gen.html")
30652 (synopsis "Generate RSS 2.0 feeds using a Python data structure")
30653 (description "PyRSS2Gen is the interface to generate RSS 2.0 feeds.
30654 PyRSS2Gen builds the feed up by using a XML generator.")
30655 (license license:bsd-3)))
30656
30657 (define-public python-yapsy
30658 (package
30659 (name "python-yapsy")
30660 (version "1.12.2")
30661 (source
30662 (origin
30663 (method url-fetch)
30664 (uri (pypi-uri "Yapsy" version))
30665 (sha256
30666 (base32 "12rznbnswfw0w7qfbvmmffr9r317gl1rqg36nijwzsklkjgks4fq"))))
30667 (build-system python-build-system)
30668 (home-page "http://yapsy.sourceforge.net")
30669 (synopsis "Simple plugin system for Python applications")
30670 (description "Yapsy, or Yet Another Plugin SYstem, is a small library
30671 implementing the core mechanisms needed to build a plugin system into a wider
30672 application.
30673
30674 The main purpose is to depend only on Python's standard libraries and to
30675 implement only the basic functionalities needed to detect, load and keep track
30676 of several plugins.")
30677 (license license:bsd-3)))
30678
30679 (define-public python-doit
30680 (package
30681 (name "python-doit")
30682 (version "0.34.0")
30683 (source
30684 (origin
30685 (method url-fetch)
30686 (uri (pypi-uri "doit" version))
30687 (sha256
30688 (base32 "0bf0m9n0hyjvjpv051zd26725j8jr23gyvc37v3kkadwbh8dxwcf"))))
30689 (build-system python-build-system)
30690 (propagated-inputs
30691 (list python-cloudpickle python-pyinotify))
30692 (native-inputs
30693 (list python-pytest))
30694 (home-page "https://pydoit.org")
30695 (synopsis "Automation tool to execute any kind of task in a build-tools
30696 fashion")
30697 (description "doit is an automation tool that brings the power of
30698 build-tools to execute any kind of task.
30699
30700 A task describes some computation to be done (actions), and contains some
30701 extra meta-data. The actions can be external programs or Python functions. A
30702 single task may define more than one action.doit uses the task’s meta-data
30703 to:
30704
30705 @itemize
30706 @item cache task results
30707 @item correct execution order
30708 @item parallel execution
30709 @item powerful dependency system
30710 @end itemize")
30711 (license license:expat)))
30712
30713 (define-public python-phpserialize
30714 (package
30715 (name "python-phpserialize")
30716 (version "1.3")
30717 (source
30718 (origin
30719 (method url-fetch)
30720 (uri (pypi-uri "phpserialize" version))
30721 (sha256
30722 (base32 "19qgkb9z4zjbjxlpwh2w6pxkz2j3iymnydi69jl0jg905lqjsrxz"))))
30723 (build-system python-build-system)
30724 (arguments
30725 (list
30726 ;; tests missing in pypi archive, anhow they are quite simple and not worth any hassle
30727 #:tests? #f))
30728 (home-page "http://github.com/mitsuhiko/phpserialize")
30729 (synopsis "Python port of the serialize and unserialize functions of PHP")
30730 (description
30731 "This package provides a port of the serialize and unserialize functions of PHP for Python")
30732 (license license:bsd-3)))
30733
30734 (define-public nikola
30735 (package
30736 (name "nikola")
30737 (version "8.1.3")
30738 (source
30739 (origin
30740 (method url-fetch)
30741 (uri (pypi-uri "Nikola" version))
30742 (sha256
30743 (base32 "1vspzvi4039zgjc93bspqjb384r6c9ksvmidbp8csws2pdbc7sh5"))))
30744 (build-system python-build-system)
30745 (propagated-inputs
30746 (list python-babel
30747 python-blinker
30748 python-dateutil
30749 python-docutils
30750 python-doit
30751 python-jinja2 ;; for themes
30752 python-lxml
30753 python-mako
30754 python-markdown
30755 python-natsort
30756 python-notebook ;; for ipynb
30757 python-phpserialize ;; for wordpress import
30758 python-piexif
30759 python-pillow
30760 python-pygments
30761 python-pyrss2gen
30762 python-requests
30763 python-ruamel.yaml ;; for YAML metadata
30764 python-unidecode
30765 python-yapsy))
30766 (native-inputs
30767 (list python-coverage
30768 python-flake8
30769 python-freezegun
30770 python-pytest
30771 python-pytest-cov))
30772 (arguments
30773 (list
30774 #:phases
30775 #~(modify-phases %standard-phases
30776 (replace 'check
30777 (lambda* (#:key tests? #:allow-other-keys)
30778 (when tests?
30779 ;;(add-installed-pythonpath inputs outputs)
30780 (invoke "pytest" "tests" "--no-cov"
30781 "-k" "not test_compiling_markdown[hilite]")))))))
30782 (home-page "https://getnikola.com/")
30783 (synopsis "Modular, fast and simple static website and blog generator")
30784 (description "Nikola generates static websites and blogs. Out of the box,
30785 it supports reStructuredText, Markdown, IPython (Jupyter) Notebooks and HTML,
30786 and has plugins for many other formats.")
30787 (license license:expat)))
30788
30789 (define-public nbss-upload
30790 (package
30791 (name "nbss-upload")
30792 (version "0.1")
30793 (source
30794 (origin
30795 (method url-fetch)
30796 (uri (pypi-uri "nbss-upload" version))
30797 (sha256
30798 (base32 "0jhyfm7w2ssknmh9789fmpnf79xr7sxbdcjwak6hfha6qparvk38"))))
30799 (build-system python-build-system)
30800 (propagated-inputs
30801 (list python-requests))
30802 (arguments
30803 `(#:tests? #f)) ;no tests
30804 (home-page "https://github.com/notebook-sharing-space/nbss-upload")
30805 (synopsis "Upload notebooks to a notebooksharing.space instance")
30806 (description
30807 "Upload notebooks as @code{.ipynb}, @code{.rmd}, and @code{.html} to a
30808 notebooksharing.space instance.")
30809 (license license:bsd-3)))
30810
30811 (define-public python-reedsolo
30812 (package
30813 (name "python-reedsolo")
30814 (version "1.5.4")
30815 (source
30816 (origin
30817 (method url-fetch)
30818 (uri (pypi-uri "reedsolo" version))
30819 (sha256
30820 (base32 "09q15ji9iac3nmmxrcdvz8ynldvvqanqy3hs6q3cp327hgf5rcmq"))))
30821 (build-system python-build-system)
30822 (home-page "https://github.com/tomerfiliba/reedsolomon")
30823 (synopsis "Pure-Python Reed Solomon encoder/decoder")
30824 (description "A pure-python universal errors-and-erasures Reed-Solomon
30825 Codec, based on the tutorial at Wikiversity. This is a burst-type
30826 implementation, so that it supports any Galois field higher than 2^3,
30827 but not binary streams.")
30828 (license license:public-domain)))
30829
30830 (define-public python-esprima
30831 (package
30832 (name "python-esprima")
30833 (version "4.0.1")
30834 (source
30835 (origin
30836 (method url-fetch)
30837 (uri (pypi-uri "esprima" version))
30838 (sha256
30839 (base32 "1vi32g991lxcxzmncfiszh8m9bwkh4887szskkdi0a9wdn3imnq8"))))
30840 (build-system python-build-system)
30841 (home-page "https://github.com/Kronuz/esprima-python")
30842 (synopsis
30843 "ECMAScript parsing infrastructure for analysis in Python")
30844 (description
30845 "This package provides ECMAScript parsing infrastructure for
30846 multipurpose analysis in Python.")
30847 (license license:bsd-3)))
30848
30849 (define-public python-types-dataclasses
30850 (package
30851 (name "python-types-dataclasses")
30852 (version "0.6.1")
30853 (source (origin
30854 (method url-fetch)
30855 (uri (pypi-uri "types-dataclasses" version))
30856 (sha256
30857 (base32
30858 "1mq6qd365m8ml889zl5dxj9kncjv71iq1d1fvgj59y0ixlpm6s35"))))
30859 (build-system python-build-system)
30860 (home-page "https://github.com/python/typeshed")
30861 (synopsis "Typing stubs for dataclasses")
30862 (description
30863 "This package provides a collection of library stubs for Python, with
30864 static types.")
30865 (license license:asl2.0)))
30866
30867 (define-public python-types-docutils
30868 (package
30869 (name "python-types-docutils")
30870 (version "0.18.2")
30871 (source
30872 (origin
30873 (method url-fetch)
30874 (uri (pypi-uri "types-docutils" version))
30875 (sha256
30876 (base32 "14ypv0x6fk1pjw0bvvr1lkb2g6dvq2pwvbd5b5pzjl6182fhmaim"))))
30877 (build-system python-build-system)
30878 (home-page "https://github.com/python/typeshed")
30879 (synopsis "Typing stubs for docutils")
30880 (description "This package provides a collection of library stubs for
30881 Python, with static types.")
30882 (license license:asl2.0)))
30883
30884 (define-public python-psycopg2-binary
30885 (package
30886 (name "python-psycopg2-binary")
30887 (version "2.9.3")
30888 (source (origin
30889 (method url-fetch)
30890 (uri (pypi-uri "psycopg2-binary" version))
30891 (sha256
30892 (base32
30893 "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn"))))
30894 (build-system python-build-system)
30895 (inputs (list postgresql))
30896 (arguments
30897 ;; Tests are disable because they need a live instance of PostgreSQL.
30898 '(#:tests? #f))
30899 (home-page "https://psycopg.org/")
30900 (synopsis "PostgreSQL database adapter for Python")
30901 (description
30902 "Psycopg is a PostgreSQL database adapter for the Python programming
30903 language. Its main features are the complete implementation of the Python DB
30904 API 2.0 specification and the thread safety (several threads can share the
30905 same connection). It was designed for heavily multi-threaded applications
30906 that create and destroy lots of cursors and make a large number of concurrent
30907 @code{INSERT}s or @code{UPDATE}s.
30908
30909 Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in
30910 being both efficient and secure. It features client-side and
30911 server-side cursors, asynchronous communication and notifications,
30912 @code{COPY TO}/@code{COPY FROM} support. Many Python types are supported
30913 out-of-the-box and adapted to matching PostgreSQL data types;
30914 adaptation can be extended and customized thanks to a flexible objects
30915 adaptation system.
30916
30917 Psycopg 2 is both Unicode and Python 3 friendly.")
30918 (license license:lgpl3+)))
30919
30920 (define-public python-pyfuse3
30921 (package
30922 (name "python-pyfuse3")
30923 (version "3.2.1")
30924 (source
30925 (origin
30926 (method url-fetch)
30927 (uri (pypi-uri "pyfuse3" version))
30928 (sha256
30929 (base32 "0cvybynv9igssfa4l13q09gb6m7afmwk34wsbq8jk14sqpd4dl92"))))
30930 (build-system python-build-system)
30931 (native-inputs (list pkg-config))
30932 (inputs (list fuse-3))
30933 (propagated-inputs (list python-pytest-trio))
30934 (home-page "https://github.com/libfuse/pyfuse3")
30935 (synopsis "Python bindings FUSE 3")
30936 (description "This package provides Python 3 bindings for libfuse 3 with
30937 async I/O support.")
30938 (license license:gpl2+)))
30939
30940 (define-public python-ansicolors
30941 (package
30942 (name "python-ansicolors")
30943 (version "1.1.8")
30944 (source
30945 (origin
30946 (method url-fetch)
30947 (uri (pypi-uri "ansicolors" version ".zip"))
30948 (sha256
30949 (base32 "1q3jqglkq4z0f6nkkn8bswcwqg012i2grrc27kabr8286dg4zycr"))))
30950 (build-system python-build-system)
30951 (native-inputs
30952 (list python-tox
30953 python-pytest-cov
30954 unzip))
30955 (home-page "https://github.com/jonathaneunice/colors/")
30956 (synopsis "ANSI colors for Python")
30957 (description
30958 "This package adds ANSI colors and decorations to your strings.")
30959 (license license:isc)))
30960
30961 (define-public python-types-freezegun
30962 (package
30963 (name "python-types-freezegun")
30964 (version "1.1.8")
30965 (source
30966 (origin
30967 (method url-fetch)
30968 (uri (pypi-uri "types-freezegun" version))
30969 (sha256
30970 (base32 "08g926s8343zwq140zcfwly3qfgmahm7lp0vgb3ics549b2hifzl"))))
30971 (build-system python-build-system)
30972 (home-page "https://github.com/python/typeshed")
30973 (synopsis "Typing stubs for @code{freezegun}")
30974 (description "This package contains typing stubs for for @code{freezegun}, a
30975 very small subset the Python stubs contained in the complete @code{typeshed}
30976 collection.")
30977 (license license:asl2.0)))
30978
30979 (define-public python-types-pytz
30980 (package
30981 (name "python-types-pytz")
30982 (version "2021.3.6")
30983 (source
30984 (origin
30985 (method url-fetch)
30986 (uri (pypi-uri "types-pytz" version))
30987 (sha256
30988 (base32 "14yr5hg2ww8s4a0mz2bkd549fv8qgm538fnzxvqv92ld1pcpym3l"))))
30989 (build-system python-build-system)
30990 (home-page "https://github.com/python/typeshed")
30991 (synopsis "Typing stubs for pytz")
30992 (description "This package contains typing stubs for @code{pytz}, a very
30993 small subset the Python stubs contained in the complete @code{typeshed}
30994 collection.")
30995 (license license:asl2.0)))
30996
30997 (define-public python-types-toml
30998 (package
30999 (name "python-types-toml")
31000 (version "0.10.5")
31001 (source
31002 (origin
31003 (method url-fetch)
31004 (uri (pypi-uri "types-toml" version))
31005 (sha256
31006 (base32 "10400bd3yv6rjfnq8galskkbpqz1sfx9sfgr5qwvw04270x4cjgr"))))
31007 (build-system python-build-system)
31008 (home-page "https://github.com/python/typeshed")
31009 (synopsis "Typing stubs for TOML")
31010 (description "This package contains typing stubs for TOML, a very small
31011 subset the Python stubs contained in the complete @code{typeshed}
31012 collection.")
31013 (license license:asl2.0)))
31014
31015 (define-public python-types-ujson
31016 (package
31017 (name "python-types-ujson")
31018 (version "4.2.1")
31019 (source (origin
31020 (method url-fetch)
31021 (uri (pypi-uri "types-ujson" version))
31022 (sha256
31023 (base32
31024 "0k9n9hsq4k2zaakdwbkcsvi7m8d3mv2y9yl6f171y58ld4qpcxcy"))))
31025 (build-system python-build-system)
31026 (home-page "https://github.com/python/typeshed")
31027 (synopsis "Typing stubs for ujson")
31028 (description
31029 "This is a PEP 561 type stub package for the ujson package. It can be
31030 used by type-checking tools like mypy, PyCharm, pytype etc. to check code that
31031 uses ujson.")
31032 (license license:asl2.0)))
31033
31034 (define-public python-stltools
31035 (package
31036 (name "python-stltools")
31037 (version "2022.01.20")
31038 (source (origin
31039 (method git-fetch)
31040 (uri (git-reference
31041 (url "https://github.com/rsmith-nl/stltools")
31042 (commit version)))
31043 (file-name (git-file-name name version))
31044 (sha256
31045 (base32
31046 "1k6dhszza4lpy46qffaqx5zr70ikfqqysbacy7zabnrvz09fd4rs"))))
31047 (build-system python-build-system)
31048 (arguments
31049 `(#:use-setuptools? #f
31050 #:phases
31051 (modify-phases %standard-phases
31052 (delete 'build)
31053 (replace 'install
31054 (lambda* (#:key inputs outputs #:allow-other-keys)
31055 (let ((moddir (string-append (site-packages inputs outputs) "/stltools"))
31056 (bindir (string-append (assoc-ref outputs "out") "/bin")))
31057 (copy-recursively "stltools" moddir)
31058 (mkdir-p bindir)
31059 (for-each
31060 (lambda (script)
31061 (let ((source (string-append script ".py"))
31062 (target (string-append bindir "/" script)))
31063 (copy-file source target)
31064 (chmod target #o555)))
31065 '("stl2pov" "stl2ps" "stl2pdf" "stlinfo")))))
31066 (replace 'check
31067 (lambda* (#:key tests? #:allow-other-keys)
31068 (when tests?
31069 (invoke "py.test" "-v")))))))
31070 (propagated-inputs (list python-pycairo))
31071 (native-inputs (list python-pytest))
31072 (home-page "https://github.com/rsmith-nl/stltools")
31073 (synopsis "Python modules and scripts for handling STL files")
31074 (description "This package consists of Python modules and scripts for
31075 manipulating stereolithography (STL) files. It can convert STL files into
31076 POV-ray meshes, PDF and PostScript. The Python modules allow for reading and
31077 writing STL files. It supports both the text and binary forms of STL.")
31078 (license license:expat)))
31079
31080 (define-public python-multipart
31081 (package
31082 (name "python-multipart")
31083 (version "0.0.5")
31084 (source (origin
31085 (method url-fetch)
31086 (uri (pypi-uri "python-multipart" version))
31087 (sha256
31088 (base32
31089 "0hzshd665rl1bkwvaj9va4j3gs8nmb478fbvligx20663xhmzfzp"))))
31090 (build-system python-build-system)
31091 (propagated-inputs (list python-six))
31092 (native-inputs (list python-pyyaml python-mock python-pytest-cov))
31093 (arguments
31094 `(#:phases (modify-phases %standard-phases
31095 ;; There is a bug in the test_suit specification.
31096 (add-after 'unpack 'patch-test-suite
31097 (lambda _
31098 ;; Make compatible with PyYAML 6.
31099 (substitute* "multipart/tests/test_multipart.py"
31100 (("yaml.load")
31101 "yaml.safe_load"))
31102 (substitute* "setup.py"
31103 (("test_suite = 'multipart.tests.suite'")
31104 "test_suite = 'multipart.tests.test_multipart.suite'"))
31105 ;; Needed by PyYAML 6.0.
31106 (substitute* "multipart/tests/test_multipart.py"
31107 (("yaml_data = yaml.load\\(f\\)")
31108 "yaml_data = yaml.load(f, Loader=yaml.SafeLoader)")))))))
31109 (home-page "https://github.com/andrew-d/python-multipart")
31110 (synopsis "Streaming multipart parser for Python")
31111 (description
31112 "This package provides a streaming multipart parser for Python.")
31113 (license license:asl2.0)))
31114
31115 (define-public python-aiopg
31116 (package
31117 (name "python-aiopg")
31118 (version "1.3.3")
31119 (source (origin
31120 (method url-fetch)
31121 (uri (pypi-uri "aiopg" version))
31122 (sha256
31123 (base32
31124 "1mwmypsfzh8adjbyvf7kqv9h3k1kf5ykhi1g3ahw4wqdxaj6nz2l"))))
31125 (build-system python-build-system)
31126 (native-inputs (list python-sqlalchemy))
31127 (propagated-inputs (list python-async-timeout python-psycopg2-binary))
31128 (home-page "https://aiopg.readthedocs.io")
31129 (synopsis "Postgres integration with asyncio")
31130 (description
31131 "aiopg is a library for accessing a PostgreSQL
31132 database from the asyncio (PEP-3156/tulip) framework. It wraps
31133 asynchronous features of the Psycopg database driver.")
31134 (license license:bsd-3)))
31135
31136 (define-public python-verspec
31137 (package
31138 (name "python-verspec")
31139 (version "0.1.0")
31140 (source (origin
31141 (method url-fetch)
31142 (uri (pypi-uri "verspec" version))
31143 (sha256
31144 (base32
31145 "07n06wv85fm4vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64"))))
31146 (build-system python-build-system)
31147 (native-inputs (list python-coverage python-flake8 python-mypy
31148 python-pretend python-pytest))
31149 (arguments
31150 `(#:phases (modify-phases %standard-phases
31151 (replace 'check
31152 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
31153 (when tests?
31154 (add-installed-pythonpath inputs outputs)
31155 (invoke "touch" "test/__init__.py")
31156 (invoke "pytest")))))))
31157 (home-page "https://github.com/jimporter/verspec")
31158 (synopsis "Flexible version handling for Python")
31159 (description
31160 "This Python library handles software versions and specifiers. It is
31161 adapted from the @code{packaging} package.")
31162 (license (list license:bsd-2 license:asl2.0))))
31163
31164 (define-public python-shtab
31165 (package
31166 (name "python-shtab")
31167 (version "1.5.3")
31168 (source
31169 (origin
31170 (method url-fetch)
31171 (uri (pypi-uri "shtab" version))
31172 (sha256
31173 (base32 "127mymfm7r0hddk2vknqq34fj6dirj6ip990i3g4isx0lsd7pnsc"))))
31174 (build-system python-build-system)
31175 (native-inputs
31176 (list bash
31177 python-pytest
31178 python-pytest-cov
31179 python-pytest-timeout
31180 python-setuptools-scm
31181 python-wheel))
31182 (arguments
31183 `(#:phases
31184 (modify-phases %standard-phases
31185 (replace
31186 'check
31187 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
31188 (when tests?
31189 (add-installed-pythonpath inputs outputs)
31190 (invoke "pytest")))))))
31191 (home-page "https://github.com/iterative/shtab")
31192 (synopsis "Automagic shell tab completion for Python CLI applications")
31193 (description
31194 "This package automatically generates shell tab completion scripts for
31195 Python CLI apps.")
31196 (license license:asl2.0)))
31197
31198 (define-public python-style
31199 (package
31200 (name "python-style")
31201 (version "1.1.6")
31202 (source
31203 (origin
31204 (method url-fetch)
31205 (uri (pypi-uri "style" version))
31206 (sha256
31207 (base32 "1dcfb578v9mrwh92rgms87gql0gp4vgj6l9hpgyfg0wbd3rh3bfh"))))
31208 (build-system python-build-system)
31209 (home-page "https://github.com/lmittmann/style")
31210 (synopsis "Terminal string styling")
31211 (description
31212 "@code{python-style} is a simple terminal string styling package. Its API is
31213 a port of the chalk package for javascript.")
31214 (license license:expat)))
31215
31216 (define-public python-sre-yield
31217 (package
31218 (name "python-sre-yield")
31219 (version "1.2")
31220 (source
31221 (origin
31222 (method url-fetch)
31223 (uri (pypi-uri "sre_yield" version))
31224 (sha256
31225 (base32
31226 "12kv3mvdr22g2v9wfr5aabh1f58s817dbh8mrlfzxzxs7hm1lkz9"))))
31227 (build-system python-build-system)
31228 (native-inputs (list python-nose))
31229 (home-page "https://github.com/google/sre_yield")
31230 (synopsis "Expands a regular expression to its possible matches")
31231 (description
31232 "The goal of sre_yield is to efficiently generate all values that can
31233 match a given regular expression, or count possible matches efficiently. It
31234 uses the parsed regular expression, so you get a much more accurate result
31235 than trying to just split strings.")
31236 (license license:asl2.0)))
31237
31238 (define-public python-pyperf
31239 (package
31240 (name "python-pyperf")
31241 (version "2.3.1")
31242 (source
31243 (origin
31244 (method url-fetch)
31245 (uri (pypi-uri "pyperf" version))
31246 (sha256
31247 (base32 "189qf9wdbig0fk4n3bavx8acgdbay5lllfvw48jvbfaafb7y5hja"))))
31248 (build-system python-build-system)
31249 (arguments
31250 '(#:phases
31251 (modify-phases %standard-phases
31252 (add-after 'unpack 'fix-tests
31253 (lambda _
31254 ;; Some of these tests fail with:
31255 ;;
31256 ;; ModuleNotFoundError: No module named 'pyperf'
31257 ;;
31258 ;; even when calling ‘add-installed-pythonpath’ in the ‘check’
31259 ;; phase.
31260 (delete-file "pyperf/tests/test_examples.py")))
31261 (replace 'check
31262 (lambda* (#:key tests? #:allow-other-keys)
31263 (when tests?
31264 ;; From tox.ini's ‘testenv.commands’.
31265 (invoke "python" "-bb" "-Wd"
31266 "-m" "unittest" "discover"
31267 "-s" "pyperf/tests/" "-v")))))))
31268 (native-inputs
31269 (list python-psutil))
31270 (home-page "https://github.com/psf/pyperf")
31271 (synopsis "Toolkit for running Python benchmarks")
31272 (description "The Python @code{pyperf} module is a toolkit for writing,
31273 running and analyzing benchmarks. It features a simple API that can:
31274
31275 @itemize
31276 @item automatically calibrate a benchmark for a time budget;
31277 @item spawn multiple worker processes;
31278 @item compute the mean and standard deviation;
31279 @item detect if a benchmark result seems unstable;
31280 @item store benchmark results in JSON format;
31281 @item support multiple units: seconds, bytes and integer.
31282 @end itemize")
31283 (license license:expat)))
31284
31285 (define-public python-pydispatcher
31286 (package
31287 (name "python-pydispatcher")
31288 (version "2.0.5")
31289 (source
31290 (origin
31291 (method url-fetch)
31292 (uri (pypi-uri "PyDispatcher" version))
31293 (sha256
31294 (base32 "1bswbmhlbqdxlgbxlb6xrlm4k253sg8nvpl1whgsys8p3fg0cw2m"))))
31295 (build-system python-build-system)
31296 (arguments
31297 `(#:phases
31298 (modify-phases %standard-phases
31299 (replace 'check
31300 (lambda* (#:key tests? #:allow-other-keys)
31301 (when tests?
31302 (invoke "pytest")))))))
31303 (native-inputs (list python-pytest))
31304 (home-page "http://pydispatcher.sourceforge.net")
31305 (synopsis "Multi-producer-multi-consumer signal dispatching mechanism")
31306 (description "PyDispatcher is an enhanced version of Patrick K. O’Brien’s
31307 original @code{dispatcher.py} module. It provides the Python programmer with
31308 a robust mechanism for event routing within various application contexts.
31309
31310 Included in the package are the robustapply and saferef modules, which
31311 provide the ability to selectively apply arguments to callable objects
31312 and to reference instance methods using weak-references.")
31313 (license license:bsd-3)))
31314
31315 (define-public python-queuelib
31316 (package
31317 (name "python-queuelib")
31318 (version "1.6.2")
31319 (source
31320 (origin
31321 (method url-fetch)
31322 (uri (pypi-uri "queuelib" version))
31323 (sha256
31324 (base32 "1lpwq8wx3025i14y5h0hbald2ypbarf081pql6cqcak4y9kp482b"))))
31325 (build-system python-build-system)
31326 (native-inputs (list python-pytest))
31327 (home-page "https://github.com/scrapy/queuelib")
31328 (synopsis
31329 "Collection of persistent (disk-based) and non-persistent (memory-based) queues")
31330 (description "Queuelib is a Python library that implements object
31331 collections which are stored in memory or persisted to disk, provide a
31332 simple API, and run fast.
31333
31334 Queuelib provides collections for queues (FIFO), stacks (LIFO), queues
31335 sorted by priority and queues that are emptied in a round-robin
31336 fashion.")
31337 (license license:bsd-3)))
31338
31339 (define-public python-itemadapter
31340 (package
31341 (name "python-itemadapter")
31342 (version "0.5.0")
31343 (source
31344 (origin
31345 (method url-fetch)
31346 (uri (pypi-uri "itemadapter" version))
31347 (sha256
31348 (base32 "083wp3h2brh8x19jbdr8rz3biqwp3jlqd0rfzcyrjyhssffsgdh5"))))
31349 (build-system python-build-system)
31350 (home-page "https://github.com/scrapy/itemadapter")
31351 (synopsis "Common interface for data container classes")
31352 (description "The ItemAdapter class is a wrapper for data container
31353 objects, providing a common interface to handle objects of different
31354 types in an uniform manner, regardless of their underlying implementation.
31355
31356 Currently supported types are:
31357 @itemize
31358 @item scrapy.item.Item
31359 @item dict
31360 @item dataclass-based classes
31361 @item attrs-based classes
31362 @item pydantic-based classes
31363 @end itemize
31364
31365 Additionally, interaction with arbitrary types is supported by
31366 implementing a pre-defined interface.")
31367 (license license:bsd-3)))
31368
31369 (define-public python-itemloaders
31370 (package
31371 (name "python-itemloaders")
31372 (version "1.0.4")
31373 (source
31374 (origin
31375 (method url-fetch)
31376 (uri (pypi-uri "itemloaders" version))
31377 (sha256
31378 (base32 "15hc78h90qhwass1bga1c3xar2dd6j8sxg61zg6jvh74lf6csxqj"))))
31379 (build-system python-build-system)
31380 (propagated-inputs
31381 (list python-itemadapter python-jmespath python-parsel python-w3lib))
31382 (home-page "https://github.com/scrapy/itemloaders")
31383 (synopsis "Base library for scrapy's ItemLoader")
31384 (description "Itemloaders is a library that helps you collect data
31385 from HTML and XML sources. It comes in handy to extract data from web
31386 pages, as it supports data extraction using CSS and XPath Selectors.
31387
31388 It’s specially useful when you need to standardize the data from many
31389 sources. For example, it allows you to have all your casting and
31390 parsing rules in a single place.")
31391 (license license:bsd-3)))
31392
31393 (define-public python-hypy-utils
31394 (package
31395 (name "python-hypy-utils")
31396 (version "1.0.6")
31397 (source (origin
31398 (method url-fetch)
31399 (uri (pypi-uri "hypy_utils" version))
31400 (sha256
31401 (base32
31402 "05csk0x8ivavq88x457cq5hwjcdirfbkzj7bbg5qgnpnf2dxxhiw"))))
31403 (build-system python-build-system)
31404 (home-page "https://github.com/hykilpikonna/HyPyUtils")
31405 (synopsis "Python utility functions for HyDEV")
31406 (description "This module provides Python utility functions for modifying
31407 and setting the color of terminal output, via HyDEV.")
31408 (license license:expat)))
31409
31410 (define-public python-mike
31411 (package
31412 (name "python-mike")
31413 (version "1.1.2")
31414 (source (origin
31415 (method url-fetch)
31416 (uri (pypi-uri "mike" version))
31417 (sha256
31418 (base32
31419 "0yxp816x7s948xsd0fifvq9shg01xdxlifd9rzf5y2rd9iwz3hsn"))))
31420 (build-system python-build-system)
31421 (native-inputs
31422 (list python-coverage python-flake8 python-shtab))
31423 (propagated-inputs
31424 (list python-jinja2 python-mkdocs python-pyyaml python-verspec))
31425 (home-page "https://github.com/jimporter/mike")
31426 (synopsis "Manage multiple versions of MkDocs-powered documentation")
31427 (description
31428 "This package provides a Python utility to easily deploy multiple
31429 versions of MkDocs-powered docs to a Git branch. It is suitable for deploying
31430 to Github via gh-pages.")
31431 (license license:bsd-3)))
31432
31433 (define-public python-arpeggio
31434 (package
31435 (name "python-arpeggio")
31436 (version "2.0.0")
31437 (source (origin
31438 (method url-fetch)
31439 (uri (pypi-uri "Arpeggio" version))
31440 (sha256
31441 (base32
31442 "0ggdsck1wpladd5bh9drhkmm86bblgk2wagrhn3sdf4v04wkic6n"))))
31443 (build-system python-build-system)
31444 (native-inputs (list python-coverage
31445 python-coveralls
31446 python-flake8
31447 python-mike
31448 python-mkdocs
31449 python-pytest
31450 python-pytest-runner
31451 python-twine
31452 python-wheel))
31453 (home-page "https://github.com/textX/Arpeggio")
31454 (synopsis "Packrat parser interpreter for Python")
31455 (description
31456 "This Python library provides a recursive descent parser with backtracking
31457 and memoization (a.k.a. packrat parser). Arpeggio grammars are based on PEG
31458 formalism. Arpeggio's main use is a foundation for a toolchain for DSL
31459 development but it can be used for all sorts of general purpose parsing.")
31460 (license license:expat)))
31461
31462 (define-public python-flatten-json
31463 (package
31464 (name "python-flatten-json")
31465 (version "0.1.13")
31466 (source
31467 (origin
31468 (method url-fetch)
31469 (uri (pypi-uri "flatten_json" version))
31470 (sha256
31471 (base32 "007m28gfs7pmz2rqqjxpial6skzw26hrfi8vrdy9agi9x0rj6dgf"))))
31472 (build-system python-build-system)
31473 (propagated-inputs (list python-six))
31474 (home-page "https://github.com/amirziai/flatten")
31475 (synopsis "Flatten JSON objects")
31476 (description
31477 "The @code{flatten_json} Python library flattens the hierarchy in your
31478 object, which can be useful if you want to force your objects into a table.")
31479 (license license:expat)))
31480
31481 (define-public python-deepmerge
31482 (package
31483 (name "python-deepmerge")
31484 (version "1.0.1")
31485 (source
31486 (origin
31487 (method url-fetch)
31488 (uri (pypi-uri "deepmerge" version))
31489 (sha256
31490 (base32 "06hagzg8ccmjzqvszdxb52jgx5il8a1jdz41n4dpkyyjsfg7fi2b"))))
31491 (build-system python-build-system)
31492 (arguments
31493 (list
31494 #:phases
31495 #~(modify-phases %standard-phases
31496 (add-before 'build 'set-version
31497 (lambda _
31498 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
31499 ;; ZIP does not support timestamps before 1980.
31500 (setenv "SOURCE_DATE_EPOCH" "315532800")))
31501 (replace 'build
31502 (lambda _
31503 (invoke "python" "-m" "build" "--wheel"
31504 "--no-isolation" ".")))
31505 (replace 'check
31506 (lambda* (#:key tests? #:allow-other-keys)
31507 (when tests?
31508 (invoke "pytest"))))
31509 (replace 'install
31510 (lambda _
31511 (let ((whl (car (find-files "dist" "\\.whl$"))))
31512 (invoke "pip" "--no-cache-dir" "--no-input"
31513 "install" "--no-deps" "--prefix" #$output whl)))))))
31514 (native-inputs
31515 (list python-pypa-build
31516 python-setuptools-scm
31517 python-pytest
31518 python-wheel))
31519 (home-page "https://deepmerge.readthedocs.io/en/latest/")
31520 (synopsis "Merge nested data structures")
31521 (description
31522 "The @code{deep-merge} Python library provides a toolset to deeply merge
31523 nested data structures in Python like lists and dictionaries.")
31524 (license license:expat)))
31525
31526 (define-public python-murmurhash3
31527 (package
31528 (name "python-murmurhash3")
31529 (version "2.3.5")
31530 (source (origin
31531 (method url-fetch)
31532 (uri (pypi-uri "murmurhash3" version))
31533 (sha256
31534 (base32
31535 "1gdzys1212dx70byz07ipknbw1awbqskh6aznlkm85js8b8qfczm"))))
31536 (build-system python-build-system)
31537 (native-inputs (list python-cython python-pytest))
31538 (inputs (list python))
31539 (arguments
31540 (list #:modules
31541 '((ice-9 ftw) (ice-9 match)
31542 (guix build utils)
31543 (guix build python-build-system))
31544 #:phases
31545 #~(modify-phases %standard-phases
31546 (add-after 'unpack 'set-source-file-times-to-1980
31547 (lambda _
31548 (let ((circa-1980 (* 10 366 24 60 60)))
31549 (ftw "."
31550 (lambda (file stat flag)
31551 (utime file circa-1980 circa-1980) #t))))))))
31552 (home-page "https://github.com/veegee/mmh3")
31553 (synopsis "Python wrapper for MurmurHash (MurmurHash3)")
31554 (description
31555 "@code{murmurhash3} is a Python library for MurmurHash (MurmurHash3), a set
31556 of fast and robust hash functions. This library is a Python extension module
31557 written in C.")
31558 (license license:public-domain)))
31559
31560 (define-public python-murmurhash
31561 (package
31562 (name "python-murmurhash")
31563 (version "1.0.7")
31564 (source (origin
31565 (method url-fetch)
31566 (uri (pypi-uri "murmurhash" version))
31567 (sha256
31568 (base32
31569 "0vwkn98c703nvsigl2nz99rax2pafkx3djjfkgc49jiipmp3j2k3"))))
31570 (build-system python-build-system)
31571 (native-inputs (list python-cython python-pytest))
31572 (inputs (list python python-murmurhash3))
31573 (arguments
31574 (list #:modules
31575 '((ice-9 ftw) (ice-9 match)
31576 (guix build utils)
31577 (guix build python-build-system))
31578 #:phases
31579 #~(modify-phases %standard-phases
31580 (add-after 'unpack 'set-source-file-times-to-1980
31581 (lambda _
31582 (let ((circa-1980 (* 10 366 24 60 60)))
31583 (ftw "."
31584 (lambda (file stat flag)
31585 (utime file circa-1980 circa-1980) #t))))))))
31586 (home-page "https://github.com/explosion/murmurhash")
31587 (synopsis "Cython bindings for MurmurHash2")
31588 (description "This package provides Cython bindings for MurmurHash2.")
31589 (license license:expat)))
31590
31591 ;; Scooby requires for its test suite a ‘pyvips’ package that is missing its
31592 ;; VIPS dependency.
31593 (define python-pyvips-for-python-scooby
31594 (package
31595 (inherit python-pyvips)
31596 (name "python-pyvips-for-python-scooby")
31597 (arguments
31598 (substitute-keyword-arguments (package-arguments python-pyvips)
31599 ((#:phases phases)
31600 #~(modify-phases #$phases
31601 (delete 'fix-paths)
31602 ;; The checks won't succeed without VIPS.
31603 (delete 'check)
31604 (delete 'sanity-check)))))
31605 (inputs
31606 (modify-inputs (package-inputs python-pyvips)
31607 (delete "vips")))
31608 (synopsis "pyvips for Scooby's test suite")))
31609
31610 (define-public python-scooby
31611 (package
31612 (name "python-scooby")
31613 (version "0.5.12")
31614 (source
31615 ;; The PyPI tarball does not contain the tests.
31616 (origin
31617 (method git-fetch)
31618 (uri (git-reference
31619 (url "https://github.com/banesullivan/scooby")
31620 (commit (string-append "v" version))))
31621 (file-name (git-file-name name version))
31622 (sha256
31623 (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
31624 (build-system python-build-system)
31625 (native-inputs
31626 (list python-beautifulsoup4
31627 python-numpy
31628 python-pytest
31629 python-pytest-cov
31630 python-pyvips-for-python-scooby
31631 python-scipy))
31632 (propagated-inputs
31633 (list python-psutil))
31634 (arguments
31635 '(#:phases
31636 (modify-phases %standard-phases
31637 (add-after 'unpack 'fix-tests
31638 (lambda _
31639 (substitute* "tests/test_scooby.py"
31640 ;; The test suite uses the no-version PyPI package
31641 ;; (https://pypi.org/project/no-version/),
31642 ;; but it doesn't seem worth packaging in Guix just for this.
31643 (("scooby\\.report\\.VERSION_NOT_FOUND")
31644 "scooby.report.MODULE_NOT_FOUND")
31645 (("^ +import no_version # noqa.*") ""))))
31646 (replace 'check
31647 (lambda* (#:key tests? #:allow-other-keys)
31648 (when tests?
31649 (invoke "pytest")))))))
31650 (home-page "https://github.com/banesullivan/scooby")
31651 (synopsis "Report hardware information and Python package versions")
31652 (description
31653 "The Scooby package reports the following information about the currently
31654 running system:
31655
31656 @itemize
31657 @item operating system name;
31658 @item hardware information including machine type (e.g., @samp{i386},
31659 @samp{x86_64}, etc.), CPU count and total RAM;
31660 @item Python environment (e.g., Python, IPython, etc.);
31661 @item file system name;
31662 @item Python version;
31663 @item versions of specified Python packages.
31664 @end itemize
31665
31666 It can generate reports as HTML tables or plain text lists.
31667
31668 Scooby has no required dependencies, and only few optional dependencies.")
31669 (license license:expat)))
31670
31671 (define-public python-cymem
31672 (package
31673 (name "python-cymem")
31674 (version "2.0.6")
31675 (source (origin
31676 (method url-fetch)
31677 (uri (pypi-uri "cymem" version))
31678 (sha256
31679 (base32
31680 "0pkyy60zk9654sj991w111p1l0m8wvz36nslw96x6nb9h6sjb5qn"))))
31681 (build-system python-build-system)
31682 (native-inputs
31683 (list python-cython
31684 python-pytest))
31685 (inputs
31686 (list python))
31687 (arguments
31688 (list
31689 #:modules '((ice-9 ftw)
31690 (ice-9 match)
31691 (guix build utils)
31692 (guix build python-build-system))
31693 #:phases
31694 #~(modify-phases %standard-phases
31695 (add-after 'unpack 'set-source-file-times-to-1980
31696 ;; XXX One of the tests uses a ZIP library to pack up some of the
31697 ;; source tree, and fails with "ZIP does not support timestamps
31698 ;; before 1980". Work around this by setting the file times in the
31699 ;; source tree to sometime in early 1980.
31700 (lambda _
31701 (let ((circa-1980 (* 10 366 24 60 60)))
31702 (ftw "." (lambda (file stat flag)
31703 (utime file circa-1980 circa-1980)
31704 #t))))))))
31705 (home-page "https://github.com/explosion/cymem")
31706 (synopsis "Cython memory pool for RAII-style memory management")
31707 (description
31708 "Cymem provides two small memory-management helpers for Cython. They make it
31709 easy to tie memory to a Python object's life-cycle, so that the memory is freed
31710 when the object is garbage collected.")
31711 (license license:expat)))
31712
31713 (define-public python-preshed
31714 (package
31715 (name "python-preshed")
31716 (version "3.0.6")
31717 (source (origin
31718 (method url-fetch)
31719 (uri (pypi-uri "preshed" version))
31720 (sha256
31721 (base32
31722 "0akpydd23xqxx9d04drsnw9140rb3cv07r1zpzqz5wm0lf47afzv"))))
31723 (build-system python-build-system)
31724 (native-inputs (list python-cython python-cymem python-pytest))
31725 (inputs (list python python-cymem python-murmurhash))
31726 (arguments
31727 (list #:modules
31728 '((ice-9 ftw) (ice-9 match)
31729 (guix build utils)
31730 (guix build python-build-system))
31731 #:phases
31732 #~(modify-phases %standard-phases
31733 (add-after 'unpack 'set-source-file-times-to-1980
31734 (lambda _
31735 (let ((circa-1980 (* 10 366 24 60 60)))
31736 (ftw "."
31737 (lambda (file stat flag)
31738 (utime file circa-1980 circa-1980) #t))))))))
31739 (home-page "https://github.com/explosion/preshed")
31740 (synopsis "Cython hash tables that assume keys are pre-hashed")
31741 (description
31742 "Simple but high performance Cython hash table mapping pre-randomized keys
31743 to void* values.")
31744 (license license:expat)))
31745
31746 (define-public python-catalogue
31747 (package
31748 (name "python-catalogue")
31749 (version "2.0.7")
31750 (source (origin
31751 (method url-fetch)
31752 (uri (pypi-uri "catalogue" version))
31753 (sha256
31754 (base32
31755 "0srdxiil2xys8q1gpc1nvzhvis3a33d8a7amk2i1rlpbg6p36pak"))))
31756 (build-system python-build-system)
31757 (native-inputs (list python-pytest))
31758 (inputs (list python python-zipp python-typing-extensions python-mypy))
31759 (home-page "https://github.com/explosion/catalogue")
31760 (synopsis "Lightweight function registries for your library")
31761 (description
31762 "\"catalogue\" is a tiny, zero-dependencies library that
31763 makes it easy to add function (or object) registries to your code. Function
31764 registries are helpful when you have objects that need to be both easily
31765 serializable and fully customizable. Instead of passing a function into your
31766 object, you pass in an identifier name, which the object can use to lookup the
31767 function from the registry. This makes the object easy to serialize, because the
31768 name is a simple string. If you instead saved the function, you'd have to use
31769 Pickle for serialization, which has many drawbacks.")
31770 (license license:expat)))
31771
31772 (define-public python-wasabi
31773 (package
31774 (name "python-wasabi")
31775 (version "0.9.1")
31776 (source (origin
31777 (method url-fetch)
31778 (uri (pypi-uri "wasabi" version))
31779 (sha256
31780 (base32
31781 "1kwqfalq7qxs9f7xb2m055g01qpbznyzxl7sjnzjdvvhkczg39md"))))
31782 (build-system python-build-system)
31783 (native-inputs (list python-pytest))
31784 (home-page "https://github.com/ines/wasabi")
31785 (synopsis "Console printing and formatting toolkit")
31786 (description
31787 "This package provides a lightweight console printing and formatting
31788 toolkit for Python.")
31789 (license license:expat)))
31790
31791 (define-public python-srt
31792 (package
31793 (name "python-srt")
31794 (version "3.5.2")
31795 (source (origin
31796 (method url-fetch)
31797 (uri (pypi-uri "srt" version))
31798 (sha256
31799 (base32
31800 "0l24710spxarijmv3h7iicvx0lv6m3d4xg77nd9kyv8jwifav93s"))))
31801 (build-system python-build-system)
31802 (home-page "https://github.com/cdown/srt")
31803 (synopsis "SRT parsing library")
31804 (description
31805 "This package provides a Python library for parsing, modifying, and
31806 composing subtitles in the SRT file format.")
31807 (license license:expat)))
31808
31809 (define-public python-gatt
31810 (package
31811 (name "python-gatt")
31812 (version "0.2.7")
31813 (source (origin
31814 (method url-fetch)
31815 (uri (pypi-uri "gatt" version))
31816 (sha256
31817 (base32
31818 "0fjf066jixk30fr8xwfalwfnhqpr56yv0cccyypnx2qp9bi9svb2"))))
31819 (propagated-inputs (list python-dbus python-pygobject))
31820 (build-system python-build-system)
31821 (home-page "https://github.com/getsenic/gatt-python")
31822 (synopsis "Bluetooth GATT SDK for Python")
31823 (description "The Bluetooth @acronym{GATT, Generic ATTribute Profile}
31824 @acronym{SDK, Software Development Kit} for Python helps you implement and
31825 communicate with any Bluetooth Low Energy device that has a GATT
31826 profile. It supports:
31827
31828 @itemize @bullet
31829 @item Discovering nearby Bluetooth Low Energy devices
31830 @item Connecting and disconnecting devices
31831 @item Implementing your custom GATT profile
31832 @item Accessing all GATT services
31833 @item Accessing all GATT characteristics
31834 @item Reading characteristic values
31835 @item Writing characteristic values
31836 @item Subscribing for characteristic value change notifications
31837 @end itemize
31838
31839 Currently, Linux is the only platform supported by this library.")
31840 (license license:expat)))