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>
127 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
257 (define-public python-xmldiff
259 (name "python-xmldiff")
264 (uri (pypi-uri "xmldiff" version))
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)))
275 (define-public python-janus
277 (name "python-janus")
282 (uri (pypi-uri "janus" version))
284 (base32 "030xvl2vghi5ispfalhvch1rl6i2jsy5bf1dgjafa7vifppy04j7"))))
285 (build-system python-build-system)
288 (modify-phases %standard-phases
290 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
292 (add-installed-pythonpath inputs outputs)
293 (invoke "pytest" "--cov=janus" "--cov=tests")))))))
295 (list python-pytest python-pytest-cov python-pytest-asyncio))
296 (home-page "https://github.com/aio-libs/janus/")
298 "Sync-async queue to interoperate between asyncio tasks and classic threads")
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
310 (license license:asl2.0)))
312 (define-public python-logzero
314 (name "python-logzero")
319 (uri (pypi-uri "logzero" version))
321 (base32 "10nh186vk6hpnpfycym44gja4fja0jyzw7q8dwimfd1rmv9xswvz"))))
322 (build-system python-build-system)
324 (list python-pytest python-pytest-runner))
327 (modify-phases %standard-phases
329 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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")
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)))
340 (define-public python-logbook
342 (name "python-logbook")
347 (uri (pypi-uri "Logbook" version))
349 (base32 "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36"))))
350 (build-system python-build-system)
353 (modify-phases %standard-phases
354 (add-before 'build 'cythonize-sources
356 (with-directory-excursion "logbook"
357 (invoke "cython" "_speedups.pyx"))))
359 (lambda* (#:key tests? #:allow-other-keys)
361 ;; Check cython build also
362 (setenv "CYBUILD" "True")
363 (invoke "pytest" "--cov=logbook" "-r" "s" "tests")))))))
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")
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)))
375 (define-public python-ubelt
377 (name "python-ubelt")
383 (url "https://github.com/Erotemic/ubelt")
384 (commit (string-append "v" version))))
385 (file-name (git-file-name name version))
388 "0hac9nqqvqfbca2s4g0mp1fnj0ah60bg9fb8234ibna3jww8qs33"))))
389 (build-system python-build-system)
392 #~(modify-phases %standard-phases
394 (lambda* (#:key tests? #:allow-other-keys)
396 (setenv "HOME" "/tmp") ;else the test suite hangs
397 (invoke "pytest" "-vv" "-k"
399 ;; The builder user home doesn't match HOME,
400 ;; which causes this test to fail.
402 ;; This one pointlessly tries
403 ;; locating various binaries on
405 "and not find_exe"))))))))
406 (propagated-inputs (list python-ordered-set))
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)))
419 (define-public python-ueberzug
421 (name "python-ueberzug")
426 (uri (pypi-uri "ueberzug" version))
429 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
430 (build-system python-build-system)
432 (list libx11 libxext))
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:
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
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).
448 (license license:gpl3+)))
450 (define-public python-fire
457 (uri (pypi-uri "fire" version))
460 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
461 (build-system python-build-system)
463 (list python-pytest))
466 (modify-phases %standard-phases
468 (lambda* (#:key tests? #:allow-other-keys)
470 (invoke "pytest")))))))
472 (list python-six python-termcolor))
473 (synopsis "Library for automatically generating command line interfaces")
475 "Fire is a library for automatically generating command line interfaces
476 from absolutely any Python object. The following are the advantages:
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.
486 (home-page "https://github.com/google/python-fire")
487 (license license:asl2.0)))
489 (define-public python-twodict
491 (name "python-twodict")
496 (uri (pypi-uri "twodict" version))
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)))
508 (define-public python2-twodict
510 (inherit python-twodict)
511 (name "python2-twodict")
516 (uri (pypi-uri "twodict" version))
518 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
519 (build-system python-build-system)
521 `(#:python ,python-2))))
523 (define-public python-argopt
525 (name "python-argopt")
529 (uri (pypi-uri "argopt" version))
532 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
533 (build-system python-build-system)
535 (list python-coverage python-nose python-setuptools ; Won't build without this.
536 python-setuptools-scm))
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)))
545 (define-public python-cachetools
547 (name "python-cachetools")
551 (uri (pypi-uri "cachetools" version))
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)))
563 (define-public python-colorful
565 (name "python-colorful")
571 (pypi-uri "colorful" version))
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"
580 (list python-coverage python-flake8 python-pytest))
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)))
589 (define-public python-yaspin
591 (name "python-yaspin")
597 (pypi-uri "yaspin" version))
599 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
600 (build-system python-build-system)
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)))
609 (define-public python-lunr
617 (pypi-uri "lunr" version))
619 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
620 (build-system python-build-system)
622 (list python-mock python-pytest))
624 (list python-nltk-3.4))
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)))
633 (define-public python-mrkd
640 (uri (pypi-uri "mrkd" version))
642 (base32 "1bvaqbna1ihb4y2mv9pmvqcq3r9j6lwbbii99dani8lxx4dqqvs5"))))
643 (build-system python-build-system)
645 (list python-jinja2 python-mistune python-pygments))
646 (home-page "https://pypi.org/project/mrkd/")
647 (synopsis "Python Markdown implementation")
649 "@code{mrkd} writes man pages using Markdown, and convert them to Roff or
651 (license license:bsd-3)))
653 (define-public python-mkdocs
655 (name "python-mkdocs")
659 ;; The tests suite appears to be incomplete in the PyPI archive.
662 (url "https://github.com/mkdocs/mkdocs")
664 (file-name (git-file-name name version))
667 "1n5rdllrxvhnxmdrddf55p3s86dakx0rq2gg6bj6pr6jg2pn932b"))))
668 (build-system python-build-system)
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
676 (substitute* "setup.py"
679 (lambda* (#:key tests? #:allow-other-keys)
681 (invoke "python" "-m" "unittest"
682 "discover" "-p" "*tests.py" "mkdocs"
683 "--top-level-directory" ".")))))))
688 python-importlib-metadata
696 python-pyyaml-env-tag
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)))
705 (define-public python-pymdown-extensions
707 (name "python-pymdown-extensions")
713 (pypi-uri "pymdown-extensions" version))
715 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
716 (build-system python-build-system)
717 ;; FIXME: "AssertionError: False is not true"
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)))
728 (define-public python-mdx-gh-links
730 (name "python-mdx-gh-links")
735 (uri (pypi-uri "mdx_gh_links" version))
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
746 (license license:bsd-3)))
748 (define-public python-mkdocs-material
750 (name "python-mkdocs-material")
756 (pypi-uri "mkdocs-material" version))
758 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
759 (build-system python-build-system)
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
768 (substitute* "requirements.txt"
769 (("mkdocs-material-extensions.*$") "")))))))
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
777 (license license:expat)))
779 (define-public python-slixmpp
781 (name "python-slixmpp")
788 (url "https://lab.louiz.org/poezio/slixmpp.git")
790 (string-append "slix-" version))))
792 (git-file-name name version))
794 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
795 (build-system python-build-system)
798 (modify-phases %standard-phases
799 (add-after 'unpack 'patch
801 (substitute* "setup.py"
806 `(("cython" ,python-cython)
808 ("pkg-config" ,pkg-config)))
810 (list python-aiodns python-aiohttp python-pyasn1
811 python-pyasn1-modules))
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
819 (home-page "https://lab.louiz.org/poezio/slixmpp")
820 (license license:expat)))
822 (define-public python-tenacity
824 (name "python-tenacity")
828 (uri (pypi-uri "tenacity" version))
831 "0bwkvjpjfyi9dgszzad9aww2vc00w3bczjnbifi92cp7wch2l923"))))
832 (build-system python-build-system)
834 (list python-setuptools-scm python-tornado python-typeguard
838 #~(modify-phases %standard-phases
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)))
847 (define-public python-pytelegrambotapi
849 (name "python-pytelegrambotapi")
855 (url "https://github.com/eternnoir/pyTelegramBotAPI")
857 (file-name (git-file-name name version))
859 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
860 (build-system python-build-system)
863 (modify-phases %standard-phases
865 (lambda* (#:key tests? #:allow-other-keys)
867 (with-directory-excursion "tests"
871 (list python-requests))
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)))
880 (define-public python-colorlog
882 (name "python-colorlog")
887 (uri (pypi-uri "colorlog" version))
889 (base32 "1s7x0v872h8aks8xp01wmv6hzisxqjrh1svbbcycir0980h76krl"))))
890 (build-system python-build-system)
893 (modify-phases %standard-phases
895 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
897 (add-installed-pythonpath inputs outputs)
898 (invoke "python" "-m" "pytest")))))))
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)))
907 (define-public python-pyprind
909 (name "python-pyprind")
913 (uri (pypi-uri "PyPrind" version))
916 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
917 (build-system python-build-system)
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)))
927 (define-public python-gphoto2
929 (name "python-gphoto2")
933 (uri (pypi-uri "gphoto2" version))
936 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
937 (build-system python-build-system)
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+)))
949 (define-public python-colour
951 (name "python-colour")
955 (uri (pypi-uri "colour" version))
958 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
959 (build-system python-build-system)
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,
966 (license license:expat)))
968 (define-public python-d2to1
970 (name "python-d2to1")
971 (version "0.2.12.post1")
974 (uri (pypi-uri "d2to1" version))
977 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
978 (build-system python-build-system)
981 (home-page "https://github.com/embray/d2to1")
982 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
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)))
989 (define-public python-rawkit
991 (name "python-rawkit")
995 (uri (pypi-uri "rawkit" version))
998 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
999 (build-system python-build-system)
1001 (list python-pytest python-mock))
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)))
1012 (define-public python-easygui
1014 (name "python-easygui")
1018 (uri (pypi-uri "easygui" version))
1021 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
1022 (build-system python-build-system)
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)))
1033 (define-public python-pymd4c
1035 (name "python-pymd4c")
1036 (version "0.4.6.0b1")
1040 (uri (pypi-uri "pymd4c" version))
1042 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
1043 (build-system python-build-system)
1047 (list python-flake8 python-pkgconfig pkg-config))
1048 (home-page "https://github.com/dominickpastore/pymd4c")
1049 (synopsis "Python bindings for MD4C")
1051 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
1053 (license license:expat)))
1055 (define-public python-pymediainfo
1057 (name "python-pymediainfo")
1062 (uri (pypi-uri "pymediainfo" version))
1065 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
1066 (build-system python-build-system)
1068 (list python-setuptools-scm python-pytest))
1070 (list libmediainfo))
1073 (modify-phases %standard-phases
1074 (add-after 'unpack 'patch-libmediainfo
1076 (substitute* "pymediainfo/__init__.py"
1077 (("libmediainfo.so.0")
1078 (search-input-file %build-inputs
1079 "/lib/libmediainfo.so.0")))))
1081 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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")))))))
1088 "https://github.com/sbraz/pymediainfo")
1090 "Python wrapper for the mediainfo library")
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)))
1096 (define-public python-psutil
1098 (name "python-psutil")
1103 (uri (pypi-uri "psutil" version))
1105 (base32 "09fa4vfhansixvxd3lv664xcrbnfdyfn53hm2wr0rf3bsvdl5646"))))
1106 (build-system python-build-system)
1108 ;; FIXME: some tests do not return and time out. Some tests fail because
1109 ;; some processes survive kill().
1111 (home-page "https://github.com/giampaolo/psutil")
1112 (synopsis "Library for retrieving information on running processes")
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)))
1124 (define-public python2-psutil
1125 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
1126 (package/inherit base
1128 `(("python2-enum34" ,python2-enum34) ;optional
1129 ,@(package-propagated-inputs base))))))
1131 (define-public python-shapely
1133 (name "python-shapely")
1138 (uri (pypi-uri "Shapely" version))
1141 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
1142 (modules '((guix build utils)))
1145 (delete-file "shapely/speedups/_speedups.c")
1146 (delete-file "shapely/vectorized/_vectorized.c")
1148 (build-system python-build-system)
1150 (list python-cython python-matplotlib python-pytest
1155 (list python-numpy))
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"))))
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)))
1181 (define-public python-shortuuid
1183 (name "python-shortuuid")
1188 (uri (pypi-uri "shortuuid" version))
1191 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
1192 (build-system python-build-system)
1195 (home-page "https://github.com/skorokithakis/shortuuid")
1196 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
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)))
1203 (define-public python-logwrap
1205 (name "python-logwrap")
1206 (version "8.2.0.post0")
1210 (uri (pypi-uri "logwrap" version))
1213 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
1214 (build-system python-build-system)
1216 `(#:tests? #f ; Tests not included in pypi release.
1218 (modify-phases %standard-phases
1220 (lambda* (#:key tests? #:allow-other-keys)
1225 (list python-cython python-pytest python-setuptools-scm python-toml
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)))
1233 (define-public python-clyent
1235 (name "python-clyent")
1240 (uri (pypi-uri "clyent" version))
1243 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1244 (build-system python-build-system)
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)))
1253 (define-public python2-clyent
1254 (package-with-python2 python-clyent))
1256 (define-public python-babel
1258 (name "python-babel")
1263 (uri (pypi-uri "Babel" version))
1266 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1267 (build-system python-build-system)
1269 (list python-freezegun python-pytest tzdata-for-tests))
1273 `(#:phases (modify-phases %standard-phases
1276 (invoke "pytest" "-vv"))))))
1277 (home-page "https://babel.pocoo.org/")
1279 "Tools for internationalizing Python applications")
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,
1286 (license license:bsd-3)))
1288 (define-public python2-babel
1290 (name "python2-babel")
1295 (uri (pypi-uri "Babel" version))
1298 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1299 (build-system python-build-system)
1301 (list python2-freezegun python2-pytest tzdata-for-tests))
1303 (list python2-pytz))
1305 `(#:python ,python-2
1306 #:phases (modify-phases %standard-phases
1309 (invoke "pytest" "-vv"))))))
1310 (home-page "https://babel.pocoo.org/")
1312 "Tools for internationalizing Python applications")
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,
1319 (license license:bsd-3)))
1321 (define-public python2-backport-ssl-match-hostname
1323 (name "python2-backport-ssl-match-hostname")
1328 (uri (pypi-uri "backports.ssl_match_hostname" version))
1331 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1332 (build-system python-build-system)
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")
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)))
1345 (define-public python-bidict
1347 (name "python-bidict")
1352 (uri (pypi-uri "bidict" version))
1355 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1356 (build-system python-build-system)
1358 (list python-coverage
1363 python-pytest-benchmark
1365 python-setuptools-scm
1366 python-sortedcollections
1367 python-sortedcontainers
1369 python-sphinx-autodoc-typehints
1372 `(#:phases (modify-phases %standard-phases
1373 (add-after 'unpack 'relax-reqs
1375 (substitute* "setup.py"
1376 (("sortedcollections < 2") "sortedcollections"))
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)))
1386 (define-public python-bip39
1388 (name "python-bip39")
1393 (uri (pypi-uri "bip39" version))
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")
1401 "This package provides a self-contained and simple BIP39
1402 implementation written in Python. It includes a @code{bip39.py} executable.
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
1407 (license license:expat)))
1409 (define-public python-bitarray
1411 (name "python-bitarray")
1415 (uri (pypi-uri "bitarray" version))
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)))
1433 (define-public python-boolean.py
1435 (name "python-boolean.py")
1439 ;; There's no source tarball on PyPI.
1442 (url "https://github.com/bastikr/boolean.py")
1443 (commit (string-append "v" version))))
1444 (file-name (git-file-name name version))
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")
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)))
1459 (define-public python-hdf4
1461 (name "python-hdf4")
1466 (uri (pypi-uri name version))
1469 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1470 (build-system python-build-system)
1471 (native-inputs `(("nose" ,python-nose)))
1472 (propagated-inputs `(("numpy" ,python-numpy)))
1475 ("libjpeg" ,libjpeg-turbo)
1479 (modify-phases %standard-phases
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")
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)))
1493 (define-public python-h5py
1495 (name "python-h5py")
1500 (uri (pypi-uri "h5py" version))
1503 "0afv805vqrm5071g7alwv41920nhh8kjv4m5nbia9awj9a0x4ll7"))))
1504 (build-system python-build-system)
1506 `(#:tests? #f ; no test target
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")))))))
1513 (list python-six python-numpy))
1517 (list python-cython python-pkgconfig pkg-config))
1518 (home-page "https://www.h5py.org/")
1519 (synopsis "Read and write HDF5 files from Python")
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
1526 (license license:bsd-3)
1527 (properties `((python2-variant . ,(delay python2-h5py))))))
1529 (define-public python2-h5py
1530 (let ((base (package-with-python2 (strip-python2-variant python-h5py))))
1537 (uri (pypi-uri "h5py" version))
1540 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4")))))))
1542 (define-public python-hnswlib
1544 (name "python-hnswlib")
1549 (uri (pypi-uri "hnswlib" version))
1551 (base32 "0wf1cwmxmdzfqmfhrkqdxb5spf21ylgl2bidswhzjrqhwf35c9qf"))))
1552 (build-system python-build-system)
1555 (modify-phases %standard-phases
1556 (add-after 'unpack 'disable-native-optimization
1558 (substitute* "setup.py"
1559 ((", '-march=native'") "")))))))
1561 (list python-numpy))
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)))
1570 (define-public python-pyls-black
1572 (name "python-pyls-black")
1576 ;; There are no tests in the PyPI tarball.
1579 (url "https://github.com/rupert/pyls-black/")
1580 (commit (string-append "v" version))))
1581 (file-name (git-file-name name version))
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)))
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)
1601 `(#:test-target "pytest"))
1603 (list python-black python-lsp-server python-tomli))
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)))
1612 (define-public python-sh
1619 (uri (pypi-uri "sh" version))
1622 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1623 (build-system python-build-system)
1626 (modify-phases %standard-phases
1629 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1630 (setenv "HOME" "/tmp")
1631 (invoke "python" "sh.py" "test"))))))
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)))
1640 (define-public python-cftime
1642 (name "python-cftime")
1647 (uri (pypi-uri "cftime" version))
1649 (base32 "0l1a22zlhdpgaisibvvm7dhij4vzfm661rnv00y2snpyqxpdgi3d"))))
1650 (build-system python-build-system)
1652 (list python-numpy))
1654 (list python-check-manifest
1662 (home-page "https://unidata.github.io/cftime/")
1663 (synopsis "Library for time handling")
1665 "This package provides time-handling functionality that used to be part
1666 of the netcdf4 package before.")
1667 (license license:expat)))
1669 (define-public python-netcdf4
1671 (name "python-netcdf4")
1676 (uri (pypi-uri "netCDF4" version))
1679 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1680 (build-system python-build-system)
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"))
1689 (list python-cython))
1691 (list python-numpy python-cftime))
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))))
1707 (define-public python-ncclient
1709 (name "python-ncclient")
1713 (method git-fetch) ;no tests in PyPI release
1715 (url "https://github.com/ncclient/ncclient")
1716 (commit (string-append "v" version))))
1717 (file-name (git-file-name name version))
1720 "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
1721 (build-system python-build-system)
1723 `(#:phases (modify-phases %standard-phases
1725 (lambda* (#:key tests? #:allow-other-keys)
1727 (invoke "pytest")))))))
1729 (list python-pytest))
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
1737 (license license:asl2.0)))
1739 (define-public python-license-expression
1741 (name "python-license-expression")
1746 (uri (pypi-uri "license-expression" version))
1748 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1749 (build-system python-build-system)
1751 (list python-boolean.py))
1752 (home-page "https://github.com/nexB/license-expression")
1753 (synopsis "Apply boolean logic to license expressions")
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+)))
1762 (define-public python-wand
1764 (name "python-wand")
1769 (uri (pypi-uri "Wand" version))
1771 (base32 "1nxn7zvbnfgk4kkxajbzglcjpbgr84ilhnxm990nifjxqb61ph7b"))))
1772 (build-system python-build-system)
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"))))))
1781 (list python-pytest))
1784 (home-page "https://docs.wand-py.org/")
1785 (synopsis "MagickWand API binding for Python")
1787 "Wand is a ctypes-based binding for the C API of ImageMagick's MagickWand
1789 (license license:expat)))
1791 (define-public python-lockfile
1793 (name "python-lockfile")
1798 (uri (pypi-uri "lockfile" version))
1801 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1802 (build-system python-build-system)
1803 (arguments '(#:test-target "check"))
1806 (home-page "https://launchpad.net/pylockfile")
1807 (synopsis "Platform-independent file locking module")
1809 "The lockfile package exports a LockFile class which provides a simple
1810 API for locking files.")
1811 (license license:expat)))
1813 (define-public python-fb-re2
1815 (name "python-fb-re2")
1821 (url "https://github.com/facebook/pyre2")
1822 (commit (string-append "v" version))))
1823 (file-name (git-file-name name version))
1826 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1827 (build-system python-build-system)
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)))
1837 (define-public python-filelock
1839 (name "python-filelock")
1844 (uri (pypi-uri "filelock" version))
1847 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1848 (build-system python-build-system)
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)))
1857 (define-public python-semantic-version
1859 (name "python-semantic-version")
1864 (uri (pypi-uri "semantic_version" version))
1867 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1868 (build-system python-build-system)
1869 (home-page "https://github.com/rbarrois/python-semanticversion")
1870 (synopsis "Semantic versioning module for Python")
1872 "The @code{semantic_version} class is a small library for handling
1873 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
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)))
1880 (define-public python2-semantic-version
1881 (package-with-python2 python-semantic-version))
1883 (define-public python-serpent
1885 (name "python-serpent")
1890 (uri (pypi-uri "serpent" version))
1892 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1893 (build-system python-build-system)
1895 (list python-attrs python-pytz))
1896 (home-page "https://github.com/irmen/Serpent")
1897 (synopsis "Serializer for literal Python expressions")
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.
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)))
1909 (define-public python2-serpent
1910 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1911 (package/inherit base
1913 `(("python-enum34" ,python2-enum34)
1914 ,@(package-propagated-inputs base))))))
1916 (define-public python-setuptools
1918 (name "python-setuptools")
1923 (uri (pypi-uri "setuptools" version))
1926 "0sm8n6y6q640cpac9wjyggidbgi4n9la7vs7pwriyvhvgzccp6br"))
1927 (modules '((guix build utils)))
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:
1943 @item Python package and module definitions
1944 @item distribution package metadata
1946 @item project installation
1947 @item platform-specific details.
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
1955 (properties `((python2-variant . ,(delay python2-setuptools))))))
1957 ;; Newer versions of setuptools no longer support Python 2.
1958 (define-public python2-setuptools
1960 (name "python2-setuptools")
1965 (uri (pypi-uri "setuptools" version ".zip"))
1968 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1969 (modules '((guix build utils)))
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$"))
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.
1983 (modify-phases %standard-phases
1984 (add-after 'unpack 'compatibility-fixes
1986 ;; HTMLParser no longer exists.
1987 (substitute* "setuptools/py33compat.py"
1988 (("html_parser.HTMLParser\\(\\).unescape")
1990 ;; This needs distutils.msvc9compiler
1991 (delete-file "setuptools/tests/test_msvc.py"))))))
1994 (home-page "https://pypi.org/project/setuptools/")
1996 "Library designed to facilitate packaging Python projects")
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,
2003 project installation,
2004 platform-specific details,
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
2013 (define-public python-setuptools-declarative-requirements
2015 (name "python-setuptools-declarative-requirements")
2021 "setuptools-declarative-requirements"
2025 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
2026 (build-system python-build-system)
2028 (list python-pytest python-setuptools-scm))
2030 (list python-toml python-wheel))
2032 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
2033 (synopsis "File support for setuptools declarative setup.cfg")
2035 "This package provides file support for setuptools declarative
2037 (license license:asl2.0)))
2039 ;; The setuptools provided by Python 3.9 is too new for Tensorflow.
2040 (define-public python-setuptools-for-tensorflow
2043 (inherit python-setuptools)
2046 (inherit (package-source python-setuptools))
2047 (uri (pypi-uri "setuptools" version ".zip"))
2050 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65"))))
2052 `(#:tests? #f ; tests require vendored resources
2054 (modify-phases %standard-phases
2055 (add-after 'unpack 'compatibility-fixes
2057 ;; Python 3.9 no longer has HTMLParser
2058 (substitute* "setuptools/py33compat.py"
2059 (("html_parser.HTMLParser\\(\\).unescape")
2061 ;; This needs distutils.msvc9compiler
2062 (delete-file "setuptools/tests/test_msvc.py"))))))
2064 (list python-pytest python-mock python-six)))))
2066 (define-public python-uniseg
2068 (name "python-uniseg")
2073 (uri (pypi-uri "uniseg" version ".zip"))
2076 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
2077 (build-system python-build-system)
2079 '(#:tests? #f)) ; The test suite requires network access.
2083 "https://bitbucket.org/emptypage/uniseg-python")
2085 "Python library to determine Unicode text segmentations")
2087 "Uniseg is a Python package used to determine Unicode text segmentations.
2088 Supported segmentations include:
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)
2094 @item Sentence break
2097 (license license:expat)))
2099 (define-public python2-uniseg
2100 (package-with-python2 python-uniseg))
2102 (define-public python-humanfriendly
2104 (name "python-humanfriendly")
2109 (uri (pypi-uri "humanfriendly" version))
2112 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
2113 (build-system python-build-system)
2115 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
2117 (home-page "https://humanfriendly.readthedocs.io")
2118 (synopsis "Human-friendly input and output in Python")
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
2125 (properties `((python2-variant . ,(delay python2-humanfriendly))))
2126 (license license:expat)))
2128 (define-public python2-humanfriendly
2129 (let ((base (package-with-python2
2130 (strip-python2-variant python-humanfriendly))))
2131 (package/inherit base
2133 `(("python2-monotonic" ,python2-monotonic)
2134 ,@(package-propagated-inputs base))))))
2136 (define-public python-textparser
2138 (name "python-textparser")
2143 (uri (pypi-uri "textparser" version))
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)))
2154 (define-public python-aenum
2156 (name "python-aenum")
2161 (uri (pypi-uri "aenum" version))
2163 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
2164 (build-system python-build-system)
2166 `(#:phases (modify-phases %standard-phases
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")
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}
2186 (license license:bsd-3)))
2188 (define-public python-can
2195 (uri (pypi-uri "python-can" version))
2198 "0pcbdgdw94lc2sxd56w6wdsshrs9dd5d3wp0x4sfd0drzx32inar"))))
2199 (build-system python-build-system)
2201 `(#:phases (modify-phases %standard-phases
2202 (add-after 'unpack 'relax-version-requirements
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).
2216 (substitute* "test/test_scripts.py"
2217 (("\"can_logger\\.py --help\"") "")
2218 (("\"can_player\\.py --help\"") ""))))
2220 (lambda* (#:key tests? #:allow-other-keys)
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]
2228 "-k" "not BasicTestUdpMulticastBusIPv")))))))
2230 (list python-msgpack python-typing-extensions python-wrapt))
2232 (list python-codecov
2237 python-parameterized
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+)))
2251 (define-public python-caniusepython3
2253 (name "python-caniusepython3")
2258 (uri (pypi-uri "caniusepython3" version))
2261 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
2262 (build-system python-build-system)
2264 `(#:phases (modify-phases %standard-phases
2265 (add-after 'unpack 'relax-requirements
2267 (substitute* "setup.py"
2268 ;; These are for compatibility with Python 2.
2269 ((".*'argparse', 'backports.functools_lru_cache',.*")
2271 (substitute* "dev_requirements.txt"
2272 ((".*pylint.*") "")) ;not actually required
2276 (invoke "py.test" "-k" "not NetworkTests"))))))
2278 (list python-distlib python-packaging python-requests))
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
2286 (license license:asl2.0)))
2288 (define-public python-diskcache
2290 (name "python-diskcache")
2295 (uri (pypi-uri "diskcache" version))
2298 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
2299 (build-system python-build-system)
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)))
2307 (define-public python-argparse-addons
2309 (name "python-argparse-addons")
2314 (uri (pypi-uri "argparse_addons" version))
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)))
2324 (define-public python-bitstruct
2326 (name "python-bitstruct")
2331 (uri (pypi-uri "bitstruct" version))
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)))
2344 (define-public python-cantools
2346 (name "python-cantools")
2350 ;; We take the sources from the Git repository as the documentation is
2351 ;; not included with the PyPI archive.
2354 (url "https://github.com/eerimoq/cantools")
2356 (file-name (git-file-name name version))
2359 "1qcf1fcwif7w70qmhxw2b8kqh420igbinq60p1chzf98xcb0ansx"))))
2360 (build-system python-build-system)
2364 #~(modify-phases %standard-phases
2365 (add-after 'build 'build-doc
2367 ;; See: https://github.com/eerimoq/cantools/issues/190.
2368 (substitute* "README.rst"
2369 (("https://github.com/eerimoq/cantools/raw/master\
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))
2381 (list python-argparse-addons
2387 python-parameterized
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:
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
2403 (license license:expat)))
2405 (define-public python-capturer
2407 (name "python-capturer")
2412 (uri (pypi-uri "capturer" version))
2415 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2416 (build-system python-build-system)
2420 (list python-humanfriendly))
2421 (home-page "https://capturer.readthedocs.io")
2422 (synopsis "Capture stdout and stderr streams of the current process")
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)))
2430 (define-public python2-capturer
2431 (package-with-python2 python-capturer))
2433 (define-public python-case
2435 (name "python-case")
2440 (uri (pypi-uri "case" version))
2443 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2444 (build-system python-build-system)
2446 (list python-mock python-nose python-six python-unittest2))
2448 (list python-coverage))
2449 (home-page "https://github.com/celery/case")
2450 (synopsis "Unittest utilities and convenience methods")
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)))
2456 (define-public python-verboselogs
2458 (name "python-verboselogs")
2463 (uri (pypi-uri "verboselogs" version))
2466 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2467 (build-system python-build-system)
2470 (modify-phases %standard-phases
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"))))))
2478 (list python-mock python-pytest))
2479 (home-page "https://verboselogs.readthedocs.io")
2480 (synopsis "Verbose logging level for Python's logging module")
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)))
2486 (define-public python2-verboselogs
2487 (package-with-python2 python-verboselogs))
2489 (define-public python-coloredlogs
2491 (name "python-coloredlogs")
2496 (uri (pypi-uri "coloredlogs" version))
2499 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2500 (build-system python-build-system)
2502 `(;Tests require some updated modules
2505 (list python-capturer))
2506 (home-page "https://coloredlogs.readthedocs.io")
2507 (synopsis "Colored stream handler for Python's logging module")
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)))
2515 (define-public python2-coloredlogs
2516 (package-with-python2 python-coloredlogs))
2518 (define-public python-editorconfig
2520 (name "python-editorconfig")
2525 (uri (pypi-uri "EditorConfig" version))
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))))
2539 (define-public dosage
2546 (uri (pypi-uri "dosage" version))
2549 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2550 (build-system python-build-system)
2552 (list python2-backports-functools-lru-cache
2553 python2-backports-shutil-get-terminal-size
2554 python-cached-property
2557 python-importlib-metadata
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)))
2572 (define-public python-et-xmlfile
2574 (name "python-et-xmlfile")
2579 (uri (pypi-uri "et_xmlfile" version))
2582 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2583 (build-system python-build-system)
2585 `(#:phases (modify-phases %standard-phases
2588 (invoke "pytest"))))))
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)))
2598 (define-public python2-et-xmlfile
2599 (package-with-python2 python-et-xmlfile))
2601 (define-public python-openpyxl
2603 (name "python-openpyxl")
2607 ;; We use the upstream repository, as the tests are not included in the
2611 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2612 (changeset version)))
2613 (file-name (string-append name "-" version "-checkout"))
2615 (base32 "1p8xvc2gjw6zyzbd7qdvc3x178sm00ymrbyh9539l4fpzgxh0j9c"))))
2616 (build-system python-build-system)
2618 `(#:phases (modify-phases %standard-phases
2621 (invoke "pytest"))))))
2623 ;; For the test suite.
2624 (list python-lxml python-pillow python-pytest))
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)
2632 (properties `((python2-variant . ,(delay python2-openpyxl))))
2633 (license license:expat)))
2635 (define-public python2-openpyxl
2636 (let ((base (package-with-python2
2637 (strip-python2-variant python-openpyxl))))
2640 ;; This is the latest version that has python2 support
2645 (uri (pypi-uri "openpyxl" version))
2648 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2650 `(#:python ,python-2
2651 #:tests? #f))))) ; No test suite.
2653 (define-public python-eventlet
2655 (name "python-eventlet")
2660 (uri (pypi-uri "eventlet" version))
2663 "07qlyhcm0f28sxdizawvdf3d50m3hnbzz5kg3fjp7chvki44y540"))))
2664 (build-system python-build-system)
2666 (list python-dnspython python-greenlet python-monotonic python-six))
2671 (modify-phases %standard-phases
2672 (add-after 'unpack 'avoid-OSError
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
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
2684 (lambda* (#:key tests? #:allow-other-keys)
2686 (invoke "nosetests" "-v" "tests/")))))))
2687 (home-page "https://eventlet.net")
2688 (synopsis "Concurrent networking library for Python")
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)))
2699 (define-public python-sinfo
2701 (name "python-sinfo")
2705 (uri (pypi-uri "sinfo" version))
2708 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2709 (build-system python-build-system)
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)))
2718 (define-public python-six
2719 (package/inherit python-six-bootstrap
2723 (modify-phases %standard-phases
2726 (invoke "pytest" "-v"))))))
2728 `(("python-pytest" ,python-pytest-bootstrap)))))
2730 (define-public python2-six
2731 (package-with-python2 python-six))
2733 (define-public python-schedule
2735 (name "python-schedule")
2740 (uri (pypi-uri "schedule" version))
2743 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2744 (build-system python-build-system)
2746 (list python-pytest python-mock))
2747 (home-page "https://github.com/dbader/schedule")
2748 (synopsis "Schedule periodic function calls in Python")
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)))
2756 (define-public python2-schedule
2757 (package-with-python2 python-schedule))
2759 (define-public python-scour
2761 (name "python-scour")
2768 (url "https://github.com/scour-project/scour")
2770 (string-append "v" version))))
2771 (file-name (git-file-name name version))
2773 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
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)))
2785 (define-public python-mechanize
2787 (name "python-mechanize")
2792 (uri (pypi-uri "mechanize" version))
2795 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2796 (build-system python-build-system)
2798 (list python-html5lib))
2799 (home-page "https://github.com/python-mechanize/mechanize")
2801 "Stateful programmatic web browsing in Python")
2803 "Mechanize implements stateful programmatic web browsing in Python,
2804 after Andy Lester’s Perl module WWW::Mechanize.")
2805 (license license:bsd-3)))
2807 (define-public python2-mechanize
2808 (package-with-python2 python-mechanize))
2810 (define-public python-simpleaudio
2812 (name "python-simpleaudio")
2817 (uri (pypi-uri "simpleaudio" version))
2820 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2821 (build-system python-build-system)
2827 "https://github.com/hamiltron/py-simple-audio")
2828 (synopsis "Simple, asynchronous audio playback for Python 3")
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
2834 (define-public python-simplejson
2836 (name "python-simplejson")
2841 (uri (pypi-uri "simplejson" version))
2844 "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
2845 (build-system python-build-system)
2848 (home-page "https://simplejson.readthedocs.io/en/latest")
2850 "Json library for Python")
2852 "JSON (JavaScript Object Notation) is a subset of JavaScript
2853 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
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
2862 (license license:x11)))
2864 (define-public python2-simplejson
2865 (package-with-python2 python-simplejson))
2868 (define-public python-pyicu
2870 (name "python-pyicu")
2875 (uri (pypi-uri "PyICU" version))
2878 "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
2879 (build-system python-build-system)
2883 (list python-pytest python-six))
2884 (home-page "https://github.com/ovalhub/pyicu")
2885 (synopsis "Python extension wrapping the ICU C++ API")
2887 "PyICU is a python extension wrapping the ICU C++ API.")
2888 (license license:x11)))
2890 (define-public python2-pyicu
2891 (package-with-python2 python-pyicu))
2893 (define-public python-dogtail
2895 (name "python-dogtail")
2901 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2902 "dogtail-" version ".tar.gz"))
2905 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2906 (build-system python-build-system)
2908 `(#:tests? #f ; TODO Launching dbus for the tests
2911 (modify-phases %standard-phases
2913 (lambda* (#:key tests? #:allow-other-keys)
2915 (system "Xvfb :1 &")
2916 (setenv "DISPLAY" ":1")
2917 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2920 (list python-pygobject python-pycairo python-pyatspi))
2922 `(("python-nose" ,python-nose)
2924 ("xvfb" ,xorg-server)
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")
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+)))
2937 (define-public python2-dogtail
2938 (package-with-python2 python-dogtail))
2940 (define-public python-empy
2942 (name "python-empy")
2946 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2950 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2951 (build-system python-build-system)
2953 `(#:tests? #f)) ; python2 only
2954 (home-page "http://www.alcyone.com/software/empy/")
2955 (synopsis "Templating system for Python")
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
2968 (license license:lgpl2.1+)))
2970 (define-public python2-element-tree
2972 (name "python2-element-tree")
2977 "http://effbot.org/media/downloads/elementtree-"
2978 version "-20050316.tar.gz"))
2981 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2982 (build-system python-build-system)
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")
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\"."))))
2994 (define-public python2-pybugz
2996 (name "python2-pybugz")
3001 "http://bits.liquidx.net/projects/pybugz/pybugz-"
3005 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
3006 (patches (search-patches "pybugz-stty.patch"
3007 "pybugz-encode-error.patch"))))
3008 (build-system python-build-system)
3010 `(#:python ,python-2 ; SyntaxError with Python 3
3011 #:tests? #f)) ; no 'test' sub-command
3013 `(("element-tree" ,python2-element-tree)))
3014 (synopsis "Python and command-line interface to Bugzilla")
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
3019 (home-page "http://www.liquidx.net/pybugz/")
3020 (license license:gpl2)))
3022 (define-public python2-enum
3024 (name "python2-enum")
3028 (uri (pypi-uri "enum" version))
3031 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
3032 (build-system python-build-system)
3034 `(#:python ,python-2))
3035 (home-page "https://pypi.org/project/enum/")
3036 (synopsis "Robust enumerated type support in Python")
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
3041 ;; Choice of either license.
3042 (license (list license:gpl3+ license:psfl))))
3044 (define-public python-enum34
3046 (name "python-enum34")
3051 (uri (pypi-uri "enum34" version))
3054 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
3055 (build-system python-build-system)
3056 (home-page "https://pypi.org/project/enum34/")
3057 (synopsis "Backported Python 3.4 Enum")
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)))
3063 (define-public python2-enum34
3064 (package-with-python2 python-enum34))
3066 (define-public python-parse-type
3068 (name "python-parse-type")
3073 (uri (pypi-uri "parse_type" version))
3076 "07smqnzc9km7sbvxfyx4gdm9njrx58x8grdw6gs4gva81rk3rd10"))))
3077 (build-system python-build-system)
3080 (modify-phases %standard-phases
3082 (lambda* (#:key tests? #:allow-other-keys)
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")
3090 "Parse_type extends the python parse module.")
3092 `((python2-variant . ,(delay python2-parse-type))))
3093 (license license:bsd-3)))
3095 (define-public python2-parse-type
3096 (let ((base (package-with-python2
3097 (strip-python2-variant python-parse-type))))
3098 (package/inherit base
3100 `(("python2-enum34" ,python2-enum34)
3101 ,@(package-propagated-inputs base))))))
3103 (define-public python-parse
3105 (name "python-parse")
3110 (uri (pypi-uri "parse" version))
3113 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
3114 (build-system python-build-system)
3117 (modify-phases %standard-phases
3119 (lambda _ (invoke "python" "test_parse.py"))))))
3120 (home-page "https://github.com/r1chardj0n3s/parse")
3121 (synopsis "Parse strings")
3123 "Parse strings using a specification based on the Python @code{format()}
3125 (license license:x11)))
3127 (define-public python-polib
3129 (name "python-polib")
3133 (uri (pypi-uri "polib" version))
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
3143 (license license:expat)))
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.
3152 (define-public python-polling2
3154 (name "python-polling2")
3159 (uri (pypi-uri "polling2" version))
3161 (base32 "0hp3238fv6k1qk43gv4jwnv1mwlkmx33akbj560b9nvsry1dmdwh"))))
3162 (build-system python-build-system)
3163 (arguments '(#:tests? #false)) ; no tests included
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)))
3172 (define-public python-poyo
3174 (name "python-poyo")
3179 (uri (pypi-uri "poyo" version))
3182 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
3183 (build-system python-build-system)
3184 (home-page "https://github.com/hackebrot/poyo")
3185 (synopsis "Lightweight YAML Parser for Python")
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)))
3193 (define-public scons
3200 (url "https://github.com/SCons/scons")
3202 (file-name (git-file-name name version))
3205 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
3206 (build-system python-build-system)
3208 `(#:use-setuptools? #f ; still relies on distutils
3209 #:tests? #f ; no 'python setup.py test' command
3211 (modify-phases %standard-phases
3212 (add-before 'build 'bootstrap
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")
3223 (home-page "https://scons.org/")
3224 (synopsis "Software construction tool written in Python")
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
3231 (license license:x11)))
3233 (define-public scons-python2
3235 (inherit (package-with-python2 scons))
3236 (name "scons-python2")))
3238 (define-public python-extension-helpers
3240 (name "python-extension-helpers")
3245 (uri (pypi-uri "extension-helpers" version))
3247 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
3248 (build-system python-build-system)
3250 (list python-coverage python-pytest-astropy python-pytest-cov
3251 python-setuptools-scm))
3252 (home-page "https://github.com/astropy/astropy-helpers")
3254 "Utilities for building and installing packages in the Astropy ecosystem")
3256 "The extension-helpers package includes many build, installation, and
3257 documentation-related tools used by the Astropy project.")
3258 (license license:bsd-3)))
3260 (define-public python-extras
3262 (name "python-extras")
3267 (uri (pypi-uri "extras" version))
3270 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
3271 (build-system python-build-system)
3273 ;; FIXME: Circular dependency on testtools.
3275 (home-page "https://github.com/testing-cabal/extras")
3276 (synopsis "Useful extensions to the Python standard library")
3278 "Extras is a set of extensions to the Python standard library.")
3279 (license license:expat)))
3281 (define-public python2-extras
3282 (package-with-python2 python-extras))
3284 (define-public python-mimeparse
3286 (name "python-mimeparse")
3291 (uri (pypi-uri "python-mimeparse" version))
3294 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
3295 (build-system python-build-system)
3298 (modify-phases %standard-phases
3301 (invoke "./mimeparse_test.py"))))))
3303 "https://github.com/dbtsai/python-mimeparse")
3304 (synopsis "Python library for parsing MIME types")
3306 "Mimeparse provides basic functions for parsing MIME type names and
3307 matching them against a list of media-ranges.")
3308 (license license:expat)))
3310 (define-public python2-mimeparse
3311 (package-with-python2 python-mimeparse))
3313 (define-public python-miniboa
3315 (name "python-miniboa")
3320 (uri (pypi-uri "miniboa" version))
3323 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
3324 (build-system python-build-system)
3325 (home-page "https://github.com/shmup/miniboa")
3326 (synopsis "Simple, single-threaded Telnet server")
3328 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
3330 (license license:asl2.0)))
3332 (define-public python2-miniboa
3333 (package-with-python2 python-miniboa))
3335 (define-public python-pafy
3337 (name "python-pafy")
3342 (uri (pypi-uri "pafy" version))
3345 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
3346 (build-system python-build-system)
3348 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
3350 ;; Youtube-dl is a python package which is imported in the file
3351 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
3353 (home-page "https://np1.github.io/pafy/")
3354 (synopsis "Retrieve YouTube content and metadata")
3356 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
3357 (license license:lgpl3+)))
3359 (define-public python-miniupnpc
3361 (name "python-miniupnpc")
3368 (url "https://github.com/miniupnp/miniupnp")
3371 "miniupnpc_" (string-replace-substring version "." "_")))))
3373 (git-file-name name version))
3375 (base32 "03q1rlzvfzm15g1bfw2zqzavlsyaypnaf2k3cz6ha7k5rirkdy0l"))))
3376 (build-system python-build-system)
3380 #~(modify-phases %standard-phases
3381 (add-after 'unpack 'subdir
3382 (lambda* (#:key inputs #:allow-other-keys)
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)))
3394 (define-public python2-funcsigs
3396 (name "python2-funcsigs")
3400 (uri (pypi-uri "funcsigs" version))
3403 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
3404 (build-system python-build-system)
3406 `(#:python ,python-2))
3408 (list python2-unittest2))
3409 (home-page "http://funcsigs.readthedocs.org")
3410 (synopsis "Python function signatures from PEP362")
3412 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
3413 (license license:asl2.0)))
3415 (define-public python2-funcsigs-bootstrap
3417 (inherit python2-funcsigs)
3418 (name "python2-funcsigs-bootstrap")
3422 ,@(package-arguments python2-funcsigs)))))
3424 (define-public python-py
3431 (uri (pypi-uri "py" version))
3434 "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
3435 (build-system python-build-system)
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?"
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")
3447 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3448 code introspection, and logging.")
3449 (license license:expat)))
3451 (define-public python2-py
3452 (package-with-python2 python-py))
3454 ;; Recent versions of python-fixtures and python-testrepository need
3455 ;; python-pbr for packaging, which itself needs these two packages for
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
3466 (name "python-pbr-minimal")
3471 (uri (pypi-uri "pbr" version))
3474 "1j8k5d4rdhy5bw5ai1vkjzln2albah94in3vvyvxa0n42fv81baz"))))
3475 (build-system python-build-system)
3478 (home-page "https://docs.openstack.org/pbr/latest/")
3479 (synopsis "Minimal build of python-pbr used for bootstrapping")
3481 "Used only for bootstrapping python2-pbr, you should not need this.")
3482 (license license:asl2.0)))
3484 (define-public python-pbr
3486 (inherit python-pbr-minimal)
3489 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3491 (list git)) ;; pbr actually uses the "git" binary.
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")
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.
3511 (define-public python-pyrsistent
3513 (name "python-pyrsistent")
3515 (home-page "https://github.com/tobgu/pyrsistent")
3518 (uri (pypi-uri "pyrsistent" version))
3521 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3522 (build-system python-build-system)
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
3529 (substitute* "setup.py"
3530 (("pytest<5") "pytest")
3531 (("hypothesis<5") "hypothesis"))
3534 (list python-hypothesis python-pytest python-pytest-runner))
3537 (synopsis "Persistent data structures for Python")
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.
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)))
3547 (define-public python2-pyrsistent
3548 (package-with-python2 python-pyrsistent))
3550 (define-public python-exif-read
3552 (name "python-exif-read")
3556 (uri (pypi-uri "ExifRead" version))
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")
3565 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3567 (license license:bsd-3)))
3569 (define-public python2-exif-read
3570 (package-with-python2 python-exif-read))
3572 (define-public python-pyld
3574 (name "python-pyld")
3578 (uri (pypi-uri "PyLD" version))
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")
3586 "PyLD is an implementation of the JSON-LD specification.")
3587 (license license:bsd-3)))
3589 (define-public python2-pyld
3590 (package-with-python2 python-pyld))
3592 (define-public python-cli-helpers
3594 (name "python-cli-helpers")
3598 ;; There's no source tarball on PyPI.
3601 (url "https://github.com/dbcli/cli_helpers")
3602 (commit (string-append "v" version))))
3603 (file-name (git-file-name name version))
3605 (base32 "1hzavh9v9lkd1dn9f0nvg80f7v4banxvcrj10zy72przqz51k1sb"))))
3606 (build-system python-build-system)
3608 (list python-pytest))
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")
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
3617 (license license:bsd-3)))
3619 (define-public python-click
3621 (name "python-click")
3626 (uri (pypi-uri "click" version))
3629 "0whs38a2i0561kwbgigs6vic9r0a1887m2v1aw3rmv6r2kz0g5s7"))))
3630 (build-system python-build-system)
3633 (modify-phases %standard-phases
3635 (lambda* (#:key tests? #:allow-other-keys)
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")
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)))
3648 (define-public python-click-5
3649 (package (inherit python-click)
3650 (name "python-click")
3655 (uri (pypi-uri "click" version))
3657 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3660 (define-public python-click-8
3661 (package (inherit python-click)
3662 (name "python-click")
3667 (uri (pypi-uri "click" version))
3669 (base32 "0whs38a2i0561kwbgigs6vic9r0a1887m2v1aw3rmv6r2kz0g5s7"))))
3672 (define-public python-cligj
3674 (name "python-cligj")
3679 (uri (pypi-uri "cligj" version))
3682 "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
3683 (build-system python-build-system)
3685 (list python-click))
3687 (list python-pytest-cov))
3688 (home-page "https://github.com/mapbox/cligj")
3689 (synopsis "Click params for command line interfaces to GeoJSON")
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)))
3696 (define-public python-vcversioner
3698 (name "python-vcversioner")
3699 (version "2.16.0.0")
3703 (uri (pypi-uri "vcversioner" version))
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
3712 (home-page "https://github.com/habnabit/vcversioner")
3713 (license license:isc)))
3715 (define-public python2-vcversioner
3716 (package-with-python2 python-vcversioner))
3718 (define-public python-jdcal
3720 (name "python-jdcal")
3725 (uri (pypi-uri "jdcal" version))
3728 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3729 (build-system python-build-system)
3731 `(#:phases (modify-phases %standard-phases
3734 (invoke "pytest"))))))
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)))
3743 (define-public python2-jdcal
3744 (package-with-python2 python-jdcal))
3746 (define-public python-jsondiff
3748 (name "python-jsondiff")
3753 (uri (pypi-uri "jsondiff" version))
3756 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3757 (build-system python-build-system)
3759 (list python-nose python-nose-random))
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)))
3767 (define-public python-jsonschema
3769 (name "python-jsonschema")
3773 (uri (pypi-uri "jsonschema" version))
3776 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3777 (build-system python-build-system)
3780 (modify-phases %standard-phases
3782 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3784 (setenv "JSON_SCHEMA_TEST_SUITE" "json")
3785 (invoke "trial" "jsonschema")))))))
3787 `(("python-setuptools_scm" ,python-setuptools-scm)
3788 ("python-twisted" ,python-twisted)))
3790 (list python-attrs python-pyrsistent python-six))
3791 (home-page "https://github.com/Julian/jsonschema")
3792 (synopsis "Implementation of JSON Schema for Python")
3794 "Jsonschema is an implementation of JSON Schema for Python.")
3795 (license license:expat)))
3797 (define-public python-schema
3799 (name "python-schema")
3804 (uri (pypi-uri "schema" version))
3807 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3808 (build-system python-build-system)
3810 (list python-pytest))
3811 (home-page "https://github.com/keleshev/schema")
3812 (synopsis "Simple data validation library")
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)))
3820 (define-public python2-schema
3821 (package-with-python2 python-schema))
3823 (define-public python-schema-0.5
3824 (package (inherit python-schema)
3829 (uri (pypi-uri "schema" version))
3832 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3834 (define-public python2-schema-0.5
3835 (package-with-python2 python-schema-0.5))
3837 (define-public python-kitchen
3839 (name "python-kitchen")
3844 (uri (pypi-uri "kitchen" version))
3847 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3848 (build-system python-build-system)
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:
3862 (define-public python2-kitchen
3863 (package-with-python2 python-kitchen))
3865 (define-public python-roman
3867 (name "python-roman")
3872 (uri (pypi-uri "roman" version))
3875 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3876 (build-system python-build-system)
3877 (home-page "https://github.com/zopefoundation/roman")
3878 (synopsis "Integer to Roman numerals converter")
3880 "This package provides a small helper library to convert Arabic Numbers
3881 to Roman Numerals.")
3882 (license license:psfl)))
3884 (define-public python-unidecode
3886 (name "python-unidecode")
3890 (uri (pypi-uri "Unidecode" version))
3893 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3894 (build-system python-build-system)
3895 (home-page "https://pypi.org/project/Unidecode/")
3896 (synopsis "ASCII transliterations of Unicode text")
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+)))
3905 (define-public python2-unidecode
3906 (package-with-python2 python-unidecode))
3908 (define-public python-text-unidecode
3910 (name "python-text-unidecode")
3914 (uri (pypi-uri "text-unidecode" version))
3917 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3918 (build-system python-build-system)
3920 '(#:phases (modify-phases %standard-phases
3923 (invoke "pytest" "-vv"))))))
3925 (list python-pytest))
3926 (home-page "https://github.com/kmike/text-unidecode/")
3927 (synopsis "Decode Unicode data")
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+))))
3936 (define-public python2-text-unidecode
3937 (package-with-python2 python-text-unidecode))
3939 (define-public python-pyjwt
3941 (name "python-pyjwt")
3946 (uri (pypi-uri "PyJWT" version))
3949 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3950 (modules '((guix build utils)))
3953 (for-each delete-file-recursively
3954 (find-files "." "\\.pyc$"))
3956 (build-system python-build-system)
3958 '(#:phases (modify-phases %standard-phases
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.*")
3967 (invoke "pytest" "-vv"))))))
3969 (list python-pytest python-pytest-cov))
3970 (home-page "https://github.com/progrium/pyjwt")
3971 (synopsis "JSON Web Token implementation in Python")
3973 "PyJWT is a JSON Web Token implementation written in Python.")
3974 (license license:expat)))
3976 (define-public python2-pyjwt
3977 (package-with-python2 python-pyjwt))
3979 (define-public python-pymsgbox
3981 (name "python-pymsgbox")
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))
3993 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3995 ;; Circular dependency to run tests:
3996 ;; Tests need pyautogui, which depends on pymsgbox.
3998 (build-system python-build-system)
3999 (home-page "https://github.com/asweigart/PyMsgBox")
4000 (synopsis "Python module for JavaScript-like message boxes")
4002 "PyMsgBox is a simple, cross-platform, pure Python module for
4003 JavaScript-like message boxes. Types of dialog boxes include:
4011 (license license:bsd-3)))
4013 (define-public python-pympler
4015 (name "python-pympler")
4016 (home-page "https://pythonhosted.org/Pympler/")
4020 (uri (pypi-uri "Pympler" version))
4023 "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
4024 (build-system python-build-system)
4026 `(#:phases (modify-phases %standard-phases
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")
4034 "Pympler is a development tool to measure, monitor and analyze
4035 the memory behavior of Python objects in a running Python application.
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
4042 A web profiling frontend exposes process statistics, garbage
4043 visualisation and class tracker statistics.")
4044 (license license:asl2.0)))
4046 (define-public python2-pympler
4047 (package-with-python2 python-pympler))
4049 (define-public python-itsdangerous
4051 (name "python-itsdangerous")
4056 (uri (pypi-uri "itsdangerous" version))
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")
4064 "Itsdangerous provides various helpers to pass trusted data to untrusted
4065 environments and back.")
4066 (license license:bsd-3)))
4068 (define-public python-pyyaml
4070 (name "python-pyyaml")
4075 (uri (pypi-uri "PyYAML" version))
4078 "18imkjacvpxfgg1lbpraqywx3j7hr5dv99d242byqvrh2jf53yv8"))))
4079 (build-system python-build-system)
4081 (list libyaml python-cython))
4082 (home-page "https://pyyaml.org")
4083 (synopsis "YAML parser and emitter for Python")
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))))))
4092 (define-public python-pyyaml-5
4094 (inherit python-pyyaml)
4099 (uri (pypi-uri "PyYAML" version))
4102 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))))
4104 (define-public python2-pyyaml
4105 (let ((base (package-with-python2 (strip-python2-variant python-pyyaml))))
4112 (uri (pypi-uri "PyYAML" version))
4115 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0")))))))
4117 (define-public python-vine
4119 (name "python-vine")
4124 (uri (pypi-uri "vine" version))
4126 (base32 "0zk3pm0g7s4qfn0gk28lfmsyplvisaxi6826cgpq5njkm4j1cfvx"))))
4127 (build-system python-build-system)
4129 (list python-pytest python-case))
4130 (home-page "https://github.com/celery/vine")
4131 (synopsis "Promises for Python")
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)))
4139 (define-public python-virtualenv
4141 (name "python-virtualenv")
4146 (uri (pypi-uri "virtualenv" version))
4149 "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
4150 (build-system python-build-system)
4152 (list python-mock python-pytest python-setuptools-scm))
4154 (list python-appdirs python-distlib python-filelock python-six))
4155 (home-page "https://virtualenv.pypa.io/")
4156 (synopsis "Virtual Python environment builder")
4158 "Virtualenv is a tool to create isolated Python environments.")
4159 (license license:expat)))
4161 (define-public python2-virtualenv
4162 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
4166 (modify-inputs (package-propagated-inputs base)
4167 (prepend python2-contextlib2))))))
4169 (define-public python-markupsafe
4171 (name "python-markupsafe")
4176 (uri (pypi-uri "MarkupSafe" version))
4179 "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
4180 (build-system python-build-system)
4182 `(#:phases (modify-phases %standard-phases
4184 (lambda* (#:key tests? #:allow-other-keys)
4186 (invoke "pytest" "-vv")))))))
4188 (list python-pytest))
4189 (home-page "https://github.com/mitsuhiko/markupsafe")
4190 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
4192 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
4194 (license license:bsd-3)
4195 (properties `((python2-variant . ,(delay python2-markupsafe))))))
4197 ;; Version 1.1.1 is the last to support Python 2.
4198 (define-public python2-markupsafe
4200 (inherit (package-with-python2
4201 (strip-python2-variant python-markupsafe)))
4206 (uri (pypi-uri "MarkupSafe" version))
4209 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))))
4211 (define-public python-jinja2
4213 (name "python-jinja2")
4218 (uri (pypi-uri "Jinja2" version))
4221 "1saawzys14l1p4kafs7hkihmnvqjq8fwxjmkjiqx3jq1nm5ys2v4"))))
4222 (build-system python-build-system)
4224 '(#:phases (modify-phases %standard-phases
4226 (lambda* (#:key tests? #:allow-other-keys)
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")
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))))))
4240 ;; Version 2.11.3 is the last to support Python 2.
4241 (define-public python2-jinja2
4243 (inherit (package-with-python2
4244 (strip-python2-variant python-jinja2)))
4249 (uri (pypi-uri "Jinja2" version))
4252 "1iiklf3wns67y5lfcacxma5vxfpb7h2a67xbghs01s0avqrq9md6"))))))
4254 (define-public python-jinja2-time
4256 (name "python-jinja2-time")
4261 (uri (pypi-uri "jinja2-time" version))
4264 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
4265 (build-system python-build-system)
4267 (list python-arrow python-jinja2))
4269 "https://github.com/hackebrot/jinja2-time")
4270 (synopsis "Jinja2 Extension for Dates and Times")
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)))
4277 (define-public python-pystache
4279 (name "python-pystache")
4283 (uri (pypi-uri "pystache" version))
4286 "03a73ppf5vxnsk6az5ackvc0hp6xqv2f4hi1s5c4nk4s2jr95gwk"))))
4287 (build-system python-build-system)
4289 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
4290 (home-page "http://defunkt.io/pystache/")
4291 (synopsis "Python logic-less template engine")
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))))))
4298 (define-public python2-pystache
4299 (let ((base (package-with-python2
4300 (strip-python2-variant python-pystache))))
4301 (package/inherit base
4303 `(#:python ,python-2
4305 (modify-phases %standard-phases
4308 (invoke "python" "test_pystache.py")))))))))
4310 (define-public python-pystitcher
4312 (name "python-pystitcher")
4319 (url "https://github.com/captn3m0/pystitcher")
4321 (string-append "v" version))))
4323 (git-file-name name version))
4325 (base32 "03yrzqhcsjdj5zprrk3bh5bbyqfy3vfhxra9974vmkir3m121394"))))
4326 (build-system python-build-system)
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")
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)))
4337 (define-public python-joblib
4339 (name "python-joblib")
4343 (uri (pypi-uri "joblib" version))
4346 "0d8ypyhsw1bjr96zan9ms8wbvnzbjqxniq4vcszghcrps7ngqn21"))))
4347 (build-system python-build-system)
4350 (modify-phases %standard-phases
4352 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
4359 (list python-pytest))
4360 (home-page "https://joblib.readthedocs.io/")
4361 (synopsis "Using Python functions as pipeline jobs")
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)))
4369 ;; Newer versions of joblib don't support Python 2.
4370 (define-public python2-joblib
4372 (inherit (package-with-python2 python-joblib))
4376 (uri (pypi-uri "joblib" version))
4379 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))))
4381 (define-public python-daemon
4383 (name "python-daemon")
4388 (uri (pypi-uri "python-daemon" version))
4391 "1bxfn2bq56sd4w0nm9mqy8y0905m7fc8vmhnjxlrf49vcbqr7adx"))))
4392 (build-system python-build-system)
4395 (modify-phases %standard-phases
4396 (add-before 'check 'adjust-tests
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")
4403 ;; FIXME: Determine why test fails
4404 (substitute* "test/test_daemon.py"
4405 (("test_detaches_process_context")
4406 "skip_test_detaches_process_context")))))))
4408 (list python-lockfile))
4410 (list python-coverage
4413 python-testscenarios
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.
4422 This library provides a @code{DaemonContext} class that manages the following
4423 important tasks for becoming a daemon process:
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.
4435 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
4436 (license (list license:asl2.0 license:gpl3+))))
4438 (define-public python-anytree
4440 (name "python-anytree")
4444 (uri (pypi-uri "anytree" version))
4447 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
4448 (build-system python-build-system)
4455 (home-page "https://github.com/c0fec0de/anytree")
4456 (synopsis "Lightweight tree data library")
4458 "@code{anytree} is a simple, lightweight, and extensible tree data
4459 structure for Python.")
4460 (license license:asl2.0)))
4462 (define-public autokey
4469 (url "https://github.com/autokey/autokey")
4470 (commit (string-append "v" version))))
4471 (file-name (git-file-name name version))
4474 "0f0cqfnb49wwdy7zl2f2ypcnd5pc8r8n7z7ssxkq20d4xfxlgamr"))))
4475 (build-system python-build-system)
4478 ;; Tests are deprecated and broken until next version, see
4479 ;; https://github.com/autokey/autokey/issues/327
4482 #~(modify-phases %standard-phases
4483 (add-after 'unpack 'fix-paths
4484 (lambda* (#:key inputs #:allow-other-keys)
4485 (substitute* "lib/autokey/scripting.py"
4487 (string-append "\"" (search-input-file inputs "bin/wmctrl") "\""))
4489 (string-append "\"" (search-input-file inputs "bin/zenity") "\"")))
4490 (substitute* "autokey-shell"
4492 (string-append "'" (search-input-file inputs "bin/ipython3") "'"))
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
4500 (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
4503 (wrap-program program
4504 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
4506 (string-append #$output "/bin/" name))
4508 "autokey-shell")))))))))
4510 (list bash-minimal ; for wrap-program
4518 python-pyqt+qscintilla
4522 (home-page "https://github.com/autokey/autokey")
4524 "Keyboard and GUI automation utility")
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+)))
4533 (define-public python-docutils
4535 (name "python-docutils")
4540 (uri (pypi-uri "docutils" version))
4543 "09gii36lp1bs26cpxqyfd20xahnpbrbjzcnba2xq08y3wk97frb8"))))
4544 (build-system python-build-system)
4546 '(#:phases (modify-phases %standard-phases
4548 (lambda* (#:key tests? #:allow-other-keys)
4550 (invoke "python" "test/alltests.py")
4551 (format #t "test suite not run~%"))
4553 (home-page "http://docutils.sourceforge.net/")
4554 (synopsis "Python Documentation Utilities")
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.
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+))))
4566 (define-public python2-docutils
4567 (package-with-python2 python-docutils))
4569 ;; awscli refuses to be built with docutils < 0.16.
4570 (define-public python-docutils-0.15
4572 (inherit python-docutils)
4576 (uri (pypi-uri "docutils" version))
4579 "0ja8q6mdj6xv62jjw3phv8j5nfqi5x8hnfy4pqfcjcgz4b34k8sl"))))
4580 ;; tests contain Python 2 syntax.
4581 (arguments '(#:tests? #false))))
4583 ;; python2-sphinx fails its test suite with newer versions.
4584 (define-public python2-docutils-0.14
4586 (inherit python2-docutils)
4590 (uri (pypi-uri "docutils" version))
4593 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4595 (define-public python-restructuredtext-lint
4597 (name "python-restructuredtext-lint")
4602 (uri (pypi-uri "restructuredtext-lint" version))
4605 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4606 (build-system python-build-system)
4609 (modify-phases %standard-phases
4611 (add-after 'install 'check
4612 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4614 (add-installed-pythonpath inputs outputs)
4615 (invoke "nosetests" "-v"))
4618 (list python-docutils))
4621 (home-page "https://github.com/twolfson/restructuredtext-lint")
4622 (synopsis "reStructuredText linter")
4623 (description "This package provides a linter for the reStructuredText
4625 (license license:unlicense)))
4627 (define-public python-click-repl
4629 (name "python-click-repl")
4633 (method git-fetch) ; no tests in PyPI release
4635 (url "https://github.com/click-contrib/click-repl")
4637 (file-name (git-file-name name version))
4639 (base32 "16ybsnwlj2jlqcfxflky8jz7i3nhrd3f6mvkpgs95618l8lx994i"))))
4640 (build-system python-build-system)
4643 (modify-phases %standard-phases
4645 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4647 (add-installed-pythonpath inputs outputs)
4648 (invoke "python" "-m" "pytest")))))))
4650 (list python-pytest))
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)))
4658 (define-public python-doc8
4660 (name "python-doc8")
4665 (uri (pypi-uri "doc8" version))
4668 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4669 (build-system python-build-system)
4672 (modify-phases %standard-phases
4674 (add-after 'install 'check
4675 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4677 (add-installed-pythonpath inputs outputs)
4678 (invoke "pytest" "-v"))
4681 (list python-chardet python-docutils python-restructuredtext-lint
4682 python-six python-stevedore))
4684 (list python-testtools python-pytest))
4685 (home-page "https://launchpad.net/doc8")
4687 "Style checker for Sphinx (or other) RST documentation")
4689 "Doc8 is an opinionated style checker for reStructured Text and plain
4690 text styles of documentation.")
4691 (license license:asl2.0)))
4693 (define-public python-pygments
4695 (name "python-pygments")
4700 (uri (pypi-uri "Pygments" version))
4703 "1sr6iqh21xi6p8aba4wa9pqfhjbbpcvn9jcsx0ggy4lniw8idcay"))))
4704 (build-system python-build-system)
4706 ;; FIXME: Tests require sphinx, which depends on this.
4708 (home-page "https://pygments.org/")
4709 (synopsis "Syntax highlighting")
4711 "Pygments is a syntax highlighting package written in Python.")
4712 (license license:bsd-2)
4713 (properties `((python2-variant . ,(delay python2-pygments))))))
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))))
4723 (uri (pypi-uri "Pygments" version))
4726 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4728 (define-public python-pygments-github-lexers
4730 (name "python-pygments-github-lexers")
4735 (uri (pypi-uri "pygments-github-lexers" version))
4738 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4739 (build-system python-build-system)
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)))
4747 (define-public python-bump2version
4749 (name "python-bump2version")
4754 (uri (pypi-uri "bump2version" version))
4756 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4757 (build-system python-build-system)
4759 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4760 ;; required: --new-version".
4762 (home-page "https://github.com/c4urself/bump2version")
4763 (synopsis "Version-bump your software with a single command!")
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)))
4770 (define-public python-bumpversion
4772 (name "python-bumpversion")
4777 (uri (pypi-uri "bumpversion" version))
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)))
4788 (define-public python-deprecated
4790 (name "python-deprecated")
4796 (url "https://github.com/tantale/deprecated")
4797 (commit (string-append "v" version))))
4798 (file-name (git-file-name name version))
4801 "0v4ys9xr8lski2r98da99spsj6hjlnnqgnhhmyhrm66myiix885c"))))
4802 (build-system python-build-system)
4804 `(#:phases (modify-phases %standard-phases
4806 (lambda* (#:key tests? #:allow-other-keys)
4808 (invoke "pytest")))))))
4810 (list python-wrapt))
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)))
4820 (define-public python-pygithub
4822 (name "python-pygithub")
4825 ;; We fetch from the Git repo because there are no tests in the PyPI
4830 (url "https://github.com/PyGithub/PyGithub")
4831 (commit (string-append "v" version))))
4832 (file-name (git-file-name name version))
4834 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4835 (build-system python-build-system)
4838 (modify-phases %standard-phases
4840 (lambda* (#:key tests? #:allow-other-keys)
4845 (list python-cryptography python-deprecated python-pyjwt
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+)))
4856 (define-public python-rellu
4858 (name "python-rellu")
4863 (uri (pypi-uri "rellu" version))
4866 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4867 (build-system python-build-system)
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)))
4878 (define-public python-robotframework
4880 (name "python-robotframework")
4882 ;; There are no tests in the PyPI archive.
4887 (url "https://github.com/robotframework/robotframework")
4888 (commit (string-append "v" version))))
4889 (file-name (git-file-name name version))
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)
4898 #:modules '((guix build python-build-system)
4904 #~(modify-phases %standard-phases
4905 (add-after 'unpack 'delete-problematic-tests
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
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
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
4926 (with-directory-excursion "dist"
4927 (define user-guide-dir
4928 (match (scandir "." (cut string-prefix?
4929 "robotframework-userguide-" <>))
4931 (_ (error "could not find the user guide directory"))))
4932 (copy-recursively user-guide-dir doc)))))
4934 (lambda* (#:key native-inputs inputs tests?
4937 ;; Some tests require timezone data. Otherwise, they
4938 ;; look up /etc/localtime, which doesn't exist, and
4941 ;; OverflowError: mktime argument out of range
4943 (search-input-directory
4944 (or native-inputs inputs) "share/zoneinfo"))
4945 (setenv "TZ" "Europe/Paris")
4947 (format #t "Running unit tests...~%")
4948 (invoke "utest/run.py")
4950 (format #t "Running acceptance tests...~%")
4951 (invoke "xvfb-run" "atest/run.py")))))))
4953 (list python-docutils
4960 `(,python "tk") ;used when building the HTML doc
4962 scrot ;for taking screenshots
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)))
4973 (define-public python-robotframework-datadriver
4975 (name "python-robotframework-datadriver")
4980 (uri (pypi-uri "robotframework-datadriver" version))
4982 (base32 "0qa2vry8jr49k5rbrvmkgggzsmis1wv06dp5dvwmp7afm7vjc51k"))))
4983 (build-system python-build-system)
4986 (modify-phases %standard-phases
4987 (add-before 'check 'skip-problematic-tests
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")))
4994 (lambda* (#:key tests? #:allow-other-keys)
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
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)))
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
5017 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
5020 (name "python-robotframework-lint")
5021 (version (git-version "1.1" ;version taken from 'rflint/version.py'
5027 (url "https://github.com/boakley/robotframework-lint")
5029 (file-name (git-file-name name version))
5032 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
5033 (build-system python-build-system)
5036 (modify-phases %standard-phases
5039 (invoke "python" "-m" "robot" "-A"
5040 "tests/conf/default.args" "tests"))))))
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))))
5049 (define-public python-robotframework-pabot
5051 (name "python-robotframework-pabot")
5055 ;; There are no tests in the PyPI archive.
5058 (url "https://github.com/mkorpela/pabot")
5060 (file-name (git-file-name name version))
5063 "14a8isq1f4lgfwjb84hhzg6jm7ns18dxa9bg6dy8k2ml8zl0qknk"))))
5064 (build-system python-build-system)
5067 #:phases #~(modify-phases %standard-phases
5069 (lambda* (#:key tests? #:allow-other-keys)
5071 (invoke "pytest" "-vv" "tests")))))))
5073 (list python-robotframework python-robotframework-stacktrace))
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)))
5081 (define-public python-robotframework-stacktrace
5083 (name "python-robotframework-stacktrace")
5088 (uri (pypi-uri "robotframework-stacktrace" version))
5090 (base32 "19gnwr7da1zz9clhwsmvqfjf02d195i61lzpq4253dcsgrpb6v79"))))
5091 (build-system python-build-system)
5093 ;; The test suite fails (see:
5094 ;; https://github.com/MarketSquare/robotframework-stacktrace/issues/4).
5097 (modify-phases %standard-phases
5099 (lambda* (#:key tests? #:allow-other-keys)
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)))
5110 (define-public python-robotframework-sshlibrary
5112 (name "python-robotframework-sshlibrary")
5114 ;; There are no tests in the PyPI archive.
5119 (url "https://github.com/robotframework/SSHLibrary")
5120 (commit (string-append "v" version))))
5121 (file-name (git-file-name name version))
5124 "1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw"))
5125 (patches (search-patches
5126 "python-robotframework-sshlibrary-rf5-compat.patch"))))
5127 (build-system python-build-system)
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")
5139 (for-each delete-file (find-files "docs" "\\.rst"))
5140 (copy-recursively "docs" doc))))
5142 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
5149 (list python-robotframework python-paramiko python-scp))
5153 ;; To generate the documentation
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:
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.
5169 (license license:asl2.0)))
5171 (define-public python-robotframework-pythonlibcore
5173 (name "python-robotframework-pythonlibcore")
5177 (method git-fetch) ;no tests in pypi archive
5179 (url "https://github.com/robotframework/PythonLibCore")
5180 (commit (string-append "v" version))))
5181 (file-name (git-file-name name version))
5184 "0v89v8va65l6inh0fb34qgxawx6p29pnrmw4n5941yzdi3804rc4"))))
5185 (build-system python-build-system)
5187 `(#:phases (modify-phases %standard-phases
5189 (lambda* (#:key tests? #:allow-other-keys)
5191 (invoke "utest/run.py")))))))
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
5204 (license license:asl2.0)))
5206 (define-public python-robotframework-seleniumlibrary
5208 (name "python-robotframework-seleniumlibrary")
5213 (uri (pypi-uri "robotframework-seleniumlibrary" version))
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.
5220 (list python-robotframework python-robotframework-pythonlibcore
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)))
5228 (define-public python-robotframework-seleniumscreenshots
5230 (name "python-robotframework-seleniumscreenshots")
5235 (uri (pypi-uri "robotframework-seleniumscreenshots" version))
5237 (base32 "05qv323hvjmy62h33ryrjaa9k1hyvp8hq5qnj8j1x3ap2ci3q3s0"))))
5238 (build-system python-build-system)
5240 ;; XXX: The tests require a relatively complicated setup configured in
5241 ;; their CI with Nix (!).
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)))
5253 (define-public python-rstr
5255 (name "python-rstr")
5260 (uri (pypi-uri "rstr" version))
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)))
5273 (define-public python-scp
5280 (uri (pypi-uri "scp" version))
5282 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
5283 (build-system python-build-system)
5285 '(#:tests? #f)) ;tests require an SSH server
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+)))
5295 (define-public python-rst.linker
5297 (name "python-rst.linker")
5302 (uri (pypi-uri "rst.linker" version))
5304 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
5305 (build-system python-build-system)
5307 (list python-dateutil python-six))
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)))
5320 (define-public python2-rst.linker
5321 (package-with-python2 python-rst.linker))
5323 (define-public python-sshpubkeys
5325 (name "python-sshpubkeys")
5327 (home-page "https://github.com/ojarva/python-sshpubkeys")
5332 (commit (string-append "v" version))))
5333 (file-name (git-file-name name version))
5336 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
5337 (build-system python-build-system)
5339 (list python-cryptography python-ecdsa))
5340 (synopsis "OpenSSH public key parser")
5342 "This package provides a library for parsing and validating OpenSSH
5344 (license license:bsd-3)))
5346 (define-public python-feedgenerator
5348 (name "python-feedgenerator")
5353 (uri (pypi-uri "feedgenerator" version))
5356 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
5357 (modules '((guix build utils)))
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$"))
5365 (build-system python-build-system)
5367 (list python-pytz python-six))
5368 (home-page "https://github.com/getpelican/feedgenerator")
5370 "Standalone version of Django's Atom/RSS feed generator")
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)))
5376 (define-public python2-feedgenerator
5377 (package-with-python2 python-feedgenerator))
5379 (define-public python-lsp-jsonrpc
5381 (name "python-lsp-jsonrpc")
5386 (uri (pypi-uri "python-lsp-jsonrpc" version))
5389 "1gb0fsamxndhplx25v8m0b3k7aknzy454fpa0qsqsqnv6c3igv3v"))))
5390 (build-system python-build-system)
5392 (list python-mock python-pytest))
5394 (list python-ujson))
5395 (home-page "https://github.com/python-lsp/python-lsp-jsonrpc")
5396 (synopsis "JSON RPC 2.0 server library")
5398 "This package provides a JSON RPC 2.0 server library for Python.")
5399 (license license:expat)))
5401 (define-public python-jsonrpc-server
5402 (deprecated-package "python-jsonrpc-server" python-lsp-jsonrpc))
5404 (define-public python-pydantic
5406 (name "python-pydantic")
5412 (url "https://github.com/samuelcolvin/pydantic")
5413 (commit (string-append "v" version))))
5414 (file-name (git-file-name name version))
5416 (base32 "14wj3k9007fpbxk7593w6gdqrr68yzrsw4a41sj5ji4cv3r8z18b"))))
5417 (build-system python-build-system)
5420 (modify-phases %standard-phases
5421 (add-before 'check 'disable-test
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"))
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")
5435 (substitute* "tests/test_schema.py"
5436 (("test_unenforced_constraints_schema")
5437 "_test_unenforced_constraints_schema"))
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")))
5443 (lambda _ (invoke "pytest" "-vv"))))))
5445 (list python-pytest python-pytest-mock))
5447 (list python-typing-extensions))
5448 (home-page "https://github.com/samuelcolvin/pydantic")
5449 (synopsis "Python data validation and settings management")
5451 "Pydantic enforces type hints at runtime, and provides user friendly
5452 errors when data is invalid.")
5453 (license license:expat)))
5455 (define-public python-pydocstyle
5457 (name "python-pydocstyle")
5462 (uri (pypi-uri "pydocstyle" version))
5465 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
5466 (build-system python-build-system)
5468 (list python-six python-snowballstemmer))
5470 "https://github.com/PyCQA/pydocstyle/")
5471 (synopsis "Python docstring style checker")
5473 "This package provides a style checker for the Python Language
5475 (license license:expat)))
5477 (define-public python-lsp-server
5479 (name "python-lsp-server")
5484 (uri (pypi-uri "python-lsp-server" version))
5487 "0h6wxzmm6qjfwkkn3mnzn1fpmcp23fpbk74bi8p540q1nzccqj0v"))))
5488 (build-system python-build-system)
5491 (modify-phases %standard-phases
5492 (add-before 'check 'set-HOME
5493 (lambda _ (setenv "HOME" "/tmp")))
5496 ;; Disable failing test.
5497 (invoke "python" "-m" "pytest" "-k"
5498 "not test_pyqt_completion"))))))
5500 (list python-autopep8
5514 (list python-coverage
5524 (home-page "https://github.com/python-lsp/python-lsp-server")
5525 (synopsis "Python implementation of the Language Server Protocol")
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)))
5533 (define-public python-language-server
5534 (deprecated-package "python-language-server" python-lsp-server))
5536 (define-public python-pathspec
5538 (name "python-pathspec")
5543 (uri (pypi-uri "pathspec" version))
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")
5551 "This package provides a utility library for gitignore style pattern
5552 matching of file paths.")
5553 (license license:mpl2.0)))
5555 (define-public python-black
5557 (name "python-black")
5562 (uri (pypi-uri "black" version))
5565 "0yfahlqc7dsdp1js0cbv706apldnfnlbal9b53cww8n0hs40n0im"))))
5566 (build-system python-build-system)
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)
5580 (lambda* (#:key tests? #:allow-other-keys)
5581 (when tests? (invoke "pytest" "-vv")))))))
5587 python-mypy-extensions
5592 python-typing-extensions))
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)))
5600 (define-public python-black-macchiato
5602 (name "python-black-macchiato")
5607 (uri (pypi-uri "black-macchiato" version))
5610 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
5611 (build-system python-build-system)
5613 (list python-black))
5614 (home-page "https://github.com/wbolster/black-macchiato")
5615 (synopsis "Partial @code{python-black} formatting")
5617 "This package is built on top the @{python-black} code formatter to
5618 enable formatting of partial files.")
5619 (license license:bsd-3)))
5621 (define-public python-blinker
5623 (name "python-blinker")
5628 (uri (pypi-uri "blinker" version))
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")
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)))
5640 (define-public python2-blinker
5641 (package-with-python2 python-blinker))
5643 (define-public pelican
5650 (uri (pypi-uri "pelican" version))
5652 (base32 "0m1kndc98hhnlq0yl05f4lzccw555pkxnrajj6lks18yh491kw8w"))))
5653 (build-system python-build-system)
5655 (list python-blinker
5657 ;; Ignoring `guix lint` warning as python-docutils is used to support
5658 ;; reStructuredText processing at runtime.
5660 python-feedgenerator
5667 (home-page "https://blog.getpelican.com/")
5669 `(;; XXX Requires a lot more packages to do unit tests :P
5671 (synopsis "Python-based static site publishing system")
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+)))
5678 (define-public mallard-ducktype
5680 (name "mallard-ducktype")
5685 ;; git-reference because tests are not included in pypi source tarball
5686 ;; https://issues.guix.gnu.org/issue/36755#2
5688 (url "https://github.com/projectmallard/mallard-ducktype")
5690 (file-name (git-file-name name version))
5693 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
5694 (build-system python-build-system)
5697 (modify-phases %standard-phases
5700 (with-directory-excursion "tests"
5701 (invoke "sh" "runtests")))))))
5702 (home-page "http://projectmallard.org")
5703 (synopsis "Convert Ducktype to Mallard documentation markup")
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)))
5711 (define-public python-cython
5713 (name "python-cython")
5718 (uri (pypi-uri "Cython" version))
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
5728 (modify-phases %standard-phases
5729 (add-before 'check 'set-HOME
5730 ;; some tests require access to "$HOME/.cython"
5731 (lambda _ (setenv "HOME" "/tmp")))
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")
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")
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))))))
5757 (define-public python2-cython
5758 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
5759 (package/inherit base
5760 (name "python2-cython")
5762 `(("python-2" ,python-2))) ;this is not automatically changed
5764 (substitute-keyword-arguments (package-arguments base)
5766 `(modify-phases ,phases
5767 (add-before 'check 'adjust-test_embed
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.
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).
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\\)")
5791 (define-public python-cython-3
5793 (inherit python-cython)
5794 ;; Cython 3 is not officially released yet, so distinguish the name
5796 (name "python-cython-next")
5797 (version "3.0.0a10")
5800 (uri (pypi-uri "Cython" version))
5803 "17fqacrpis05w1rpi7d7sbimrk20xf8h6d3vrz5nf6ix3899abil"))))
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
5811 (name "python-numpy")
5817 "https://github.com/numpy/numpy/releases/download/v"
5818 version "/numpy-" version ".tar.gz"))
5821 "0b0c5y35rd3mvwfk5is1d5ppfw9nl4d2rgx9xkwh1p0w394wdvyl"))))
5822 (build-system python-build-system)
5825 #:modules '((guix build utils)
5826 (guix build python-build-system)
5829 #~(modify-phases %standard-phases
5830 (add-before 'build 'parallelize-build
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"
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"
5850 (format #f "~s" (search-input-file inputs "bin/bash"))))))
5852 (lambda* (#:key tests? outputs inputs #:allow-other-keys)
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))
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"))))))))
5867 python-hypothesis-next
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
5879 (properties `((python2-variant . ,(delay python2-numpy))))
5880 (license license:bsd-3)))
5882 (define-public python-numpy-next
5884 (inherit python-numpy)
5885 (name "python-numpy-next")
5889 (inherit (package-source python-numpy))
5892 "https://github.com/numpy/numpy/releases/download/v"
5893 version "/numpy-" version ".tar.gz"))
5896 "19dw91pqbqcniw2z57kiyqs1qp56g7kqy1bdyv664g8s62sc01m9"))))))
5898 (define-public python-numpy-documentation
5900 (inherit python-numpy)
5901 (name "python-numpy-documentation")
5904 #:tests? #f ;we're only generating the documentation
5906 #~(modify-phases %standard-phases
5907 (add-before 'build 'add-gnu-freefont-to-texmf
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
5915 (mkdir-p "texmf-dist/fonts/opentype/public")
5916 (symlink (string-append
5917 #$(this-package-native-input "font-gnu-freefont")
5918 "/share/fonts/opentype")
5921 "texmf-dist/fonts/opentype/public/gnu-freefont"))
5922 (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":"
5923 (getcwd) "/texmf-dist"))))
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
5933 (number->string (parallel-job-count)))))
5934 (with-directory-excursion "doc"
5935 ;; Do not treat warnings as errors.
5936 (substitute* "Makefile"
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.
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")))))))))
5965 (list font-gnu-freefont
5973 python-pydata-sphinx-theme
5974 python-scipy ;used by matplotlib
5976 python-sphinx-panels
5981 texlive-greek-fontenc
5982 texlive-latex-expdlist
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.")))
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))))
5997 (name "python2-numpy")
6002 "https://github.com/numpy/numpy/releases/download/v"
6003 version "/numpy-" version ".tar.gz"))
6006 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb"))))
6008 (substitute-keyword-arguments (package-arguments numpy)
6010 #~(modify-phases #$phases
6011 (add-after 'unpack 'delete-failing-tests
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")))
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)
6022 (invoke "./runtests.py" "-vv" "--no-build" "--mode=fast"
6023 "-j" (number->string (parallel-job-count))))))))))
6025 (list python2-cython python2-pytest gfortran)))))
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
6030 (define-public python2-numpy-1.8
6032 (inherit python2-numpy)
6038 (url "https://github.com/numpy/numpy")
6039 (commit (string-append "v" version))))
6040 (file-name (git-file-name "numpy" version))
6043 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
6044 (arguments (substitute-keyword-arguments (package-arguments python2-numpy)
6045 ((#:tests? _ #f) #f) ;disable tests
6047 #~(modify-phases #$phases
6048 (delete 'delete-failing-tests)))))
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
6057 (license license:bsd-3)))
6059 (define-public python-munch
6061 (name "python-munch")
6066 (uri (pypi-uri "munch" version))
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
6075 (license license:expat)))
6077 (define-public python2-munch
6078 (package-with-python2 python-munch))
6080 (define-public python-colormath
6082 (name "python-colormath")
6087 (uri (pypi-uri "colormath" version))
6090 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
6091 (build-system python-build-system)
6093 (list python-networkx python-numpy))
6094 (home-page "https://github.com/gtaylor/python-colormath")
6095 (synopsis "Color math and conversion library")
6097 "This is a Python library for color math and conversions.")
6098 (license license:bsd-3)))
6100 (define-public python-sparse
6102 (name "python-sparse")
6107 (uri (pypi-uri "sparse" version))
6110 "05ar1lhq1yy4nb78s7vpb1wz4ac4kj0r4lrd7yrf23kpmaacjpb8"))))
6111 (build-system python-build-system)
6114 (modify-phases %standard-phases
6116 (lambda* (#:key tests? #:allow-other-keys)
6118 (invoke "python" "-m" "pytest" "-v")))))))
6120 (list python-numba python-numpy python-scipy))
6122 (list python-dask python-pytest python-pytest-black
6124 (home-page "https://github.com/pydata/sparse/")
6125 (synopsis "Library for multi-dimensional sparse arrays")
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)))
6141 (define-public python-spectra
6143 (name "python-spectra")
6148 (uri (pypi-uri "spectra" version))
6151 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
6152 (build-system python-build-system)
6155 (modify-phases %standard-phases
6157 (lambda _ (invoke "nosetests" "-v"))))))
6159 (list python-colormath))
6162 (home-page "https://github.com/jsvine/spectra")
6163 (synopsis "Color scales and color conversion")
6165 "This package provides a Python library intended to make color math,
6166 color scales, and color space conversion easy. It has support for:
6171 @item Color blending
6172 @item Brightening/darkening colors
6173 @item Saturating/desaturating colors
6174 @item Conversion to/from multiple color spaces.
6176 (license license:expat)))
6178 (define-public python-pyspnego
6180 (name "python-pyspnego")
6184 (method git-fetch) ;no tests in PyPI release
6186 (url "https://github.com/jborean93/pyspnego")
6187 (commit (string-append "v" version))))
6188 (file-name (git-file-name name version))
6191 "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
6192 (build-system python-build-system)
6194 `(#:phases (modify-phases %standard-phases
6196 (lambda* (#:key tests? #:allow-other-keys)
6198 (invoke "pytest")))))))
6200 (list python-pytest python-pytest-mock))
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
6209 (license license:expat)))
6211 (define-public python-pygit2
6213 (name "python-pygit2")
6218 (uri (pypi-uri "pygit2" version))
6220 (base32 "1jdr6z1il03nifwgpcdf95w6xzzbfzdkcqq5dcqjaa0rnv1pjr7g"))))
6221 (build-system python-build-system)
6223 '(#:tests? #f)) ; tests don't run correctly in our environment
6225 (list python-cached-property python-cffi libgit2))
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)))
6235 (define-public python-patiencediff
6237 (name "python-patiencediff")
6242 (uri (pypi-uri "patiencediff" version))
6245 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
6246 (build-system python-build-system)
6247 (home-page "https://www.breezy-vcs.org/")
6248 (synopsis "Python implementation of the patiencediff algorithm")
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)))
6255 (define-public python-wmctrl
6257 (name "python-wmctrl")
6262 (uri (pypi-uri "wmctrl" version))
6265 "1q0l1sqnj5wma87k3dsgmsyph464syjc6fl8qcpa41nan1rgzjv6"))))
6266 (build-system python-build-system)
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"
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)))
6284 (define-public python-fancycompleter
6286 (name "python-fancycompleter")
6291 (uri (pypi-uri "fancycompleter" version))
6293 (base32 "0wkj4h01pxa8prv59zl09a0i3w26k835bfpjgvyvsai4mswgxq09"))))
6294 (build-system python-build-system)
6296 `(#:phases (modify-phases %standard-phases
6297 (add-after 'unpack 'fix-setup.py
6299 (substitute* "setup.py"
6303 (string-append "version='" ,version "',"))
6304 ((".*pyrepl.*") ;broken on Python 3
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)))
6313 (define-public python-ipdb
6315 (name "python-ipdb")
6320 (uri (pypi-uri "ipdb" version))
6322 (base32 "1ibql99agjf2gj7y0svzd5m0h81hailf4p3sj3yl9i1i8ykdj6wm"))))
6323 (build-system python-build-system)
6325 (list #:phases #~(modify-phases %standard-phases
6327 (lambda* (#:key tests? #:allow-other-keys)
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)))
6339 (define-public python-pdbpp
6341 (name "python-pdbpp")
6346 (uri (pypi-uri "pdbpp" version))
6349 "1xb9yvi30rb1cdpvfdk2kg79vh3anvkz91r8bwvfp3iqv97kzr6r"))))
6350 (build-system python-build-system)
6353 (modify-phases %standard-phases
6355 (lambda* (#:key tests? #:allow-other-keys)
6360 ;; These tests seem to require a real TTY.
6361 "not interaction_restores_previous_sigint_handler "
6362 "and not python_m_pdb_uses_pdbpp"))))))))
6364 (list python-fancycompleter python-pygments python-wmctrl))
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}:
6372 @item auto-completion
6373 @item syntax highlighting of code listings
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.
6379 (license license:bsd-3)))
6381 (define-public python-pdftotext
6383 (name "python-pdftotext")
6388 (uri (pypi-uri "pdftotext" version))
6390 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
6391 (build-system python-build-system)
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)))
6399 (define-public python-pluginbase
6401 (name "python-pluginbase")
6406 (uri (pypi-uri "pluginbase" version))
6409 "11z2vvbp13828y0x3w39f29p9r9xcix7h7c4fff2w8yfiylk6v7z"))))
6410 (build-system python-build-system)
6412 `(#:phases (modify-phases %standard-phases
6414 (lambda* (#:key tests? #:allow-other-keys)
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)))
6424 (define-public python-node-semver
6426 (name "python-node-semver")
6431 (uri (pypi-uri "node-semver" version))
6434 "000ypfns5x72b41w5f9pk6k3jnr35scliqfbvmilyvv0178005i8"))))
6435 (build-system python-build-system)
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)))
6444 (define-public python-patch-ng
6446 (name "python-patch-ng")
6450 (method git-fetch) ;no tests in PyPI archive
6452 (url "https://github.com/conan-io/python-patch-ng")
6454 (file-name (git-file-name name version))
6457 "0qxn4ss2s54qy87xrpcybz26kp2fwlaq41x4k9jcmp6d7p0w569m"))))
6458 (build-system python-build-system)
6460 `(#:phases (modify-phases %standard-phases
6462 (lambda* (#:key tests? #:allow-other-keys)
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:
6470 @item automatic correction of common patch formatting corruption
6471 @item patch format detection (SVN, Hg, Git)
6472 @item nice diffstat histogram.
6474 (license license:expat)))
6476 (define-public python-numpydoc
6478 (name "python-numpydoc")
6483 (uri (pypi-uri "numpydoc" version))
6486 "1xjsli2fqks4iv3524v1d329siad7bbsi4kr174zvhsl1pnjds3w"))))
6487 (build-system python-build-system)
6490 (modify-phases %standard-phases
6491 (add-after 'unpack 'relax-requirements
6493 (substitute* "setup.py"
6494 (("'Jinja2>=2.10,<3.1'")
6495 "'Jinja2>=2.10'"))))
6497 (lambda* (#:key tests? #:allow-other-keys)
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))))))
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
6519 (uri (pypi-uri "numpydoc" version))
6522 "09x6l1a4dcvj7001bvcmcayg1nwqwhaxlwbp6kzj9qrk57lqx3z0"))))
6524 `(("python2-jinja2" ,python2-jinja2)
6525 ,@(package-propagated-inputs base))))))
6527 (define-public python-numexpr
6529 (name "python-numexpr")
6534 (uri (pypi-uri "numexpr" version))
6537 "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
6538 (build-system python-build-system)
6539 (arguments `(#:tests? #f)) ; no tests included
6541 (list python-numpy))
6542 (home-page "https://github.com/pydata/numexpr")
6543 (synopsis "Fast numerical expression evaluator for NumPy")
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)))
6553 (define-public python2-numexpr
6554 (package-with-python2 python-numexpr))
6556 (define-public python-cycler
6558 (name "python-cycler")
6562 (uri (pypi-uri "cycler" version))
6565 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
6566 (build-system python-build-system)
6568 ;; XXX: The current version requires 'coveralls' which we don't have.
6569 ;; Enable this for the next release which uses 'python-pytest'.
6573 (home-page "https://matplotlib.org/cycler/")
6574 (synopsis "Composable keyword argument iterator")
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)))
6583 (define-public python2-cycler
6584 (package-with-python2 python-cycler))
6586 (define-public python-colorspacious
6588 (name "python-colorspacious")
6594 (url "https://github.com/njsmith/colorspacious")
6595 (commit (string-append "v" version))))
6596 (file-name (git-file-name name version))
6598 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
6599 (build-system python-build-system)
6601 (list python-numpy))
6606 (modify-phases %standard-phases
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)))
6616 (define-public python2-colorspacious
6617 (package-with-python2 python-colorspacious))
6619 (define-public python-proto-matcher
6621 (name "python-proto-matcher")
6626 (uri (pypi-uri "proto_matcher" version))
6628 (base32 "1644x0hrl398ji3281n44ymfgc3cspzfagjckhqjn4nja5nlikxg"))))
6629 (build-system python-build-system)
6631 `(#:tests? #f)) ;no test suite
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:
6640 Test the argument equals the given protobuf message.
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
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
6655 (license license:asl2.0)))
6657 (define-public python-matplotlib
6659 (name "python-matplotlib")
6664 (uri (pypi-uri "matplotlib" version))
6666 (base32 "18h78s5ld1i6mz00w258hy29909nfr3ddq6ry9kq18agw468bks8"))))
6667 (build-system python-build-system)
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
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.
6683 (substitute* (append (find-files "lib/matplotlib/tests/"
6685 (find-files "lib/mpl_toolkits/tests"
6687 (("^from matplotlib" match)
6688 (string-append "import pytest\n" match))
6689 (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
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
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"
6723 system_freetype = true
6733 tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk"))))))
6735 (lambda* (#:key tests? #:allow-other-keys)
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.
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"))))))))
6748 (list gobject-introspection
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.
6780 python-pytest-timeout
6782 python-setuptools-scm
6783 python-setuptools-scm-git-archive))
6784 (home-page "https://matplotlib.org/")
6785 (synopsis "2D plotting library for Python")
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
6792 (license license:psfl)
6793 (properties `((python2-variant . ,(delay python2-matplotlib))))))
6795 (define-public python2-matplotlib
6796 (let ((matplotlib (package-with-python2
6797 (strip-python2-variant python-matplotlib))))
6798 (package/inherit matplotlib
6803 (uri (pypi-uri "matplotlib" version))
6806 "1sk05fdai9rw35l983rw2ymvz0nafs7szs7yz4nxrpyr1j27l0x3"))))
6808 (substitute-keyword-arguments (package-arguments matplotlib)
6810 #~(modify-phases #$phases
6811 (add-after 'install 'create-init-file
6813 (with-output-to-file
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.
6821 `(("pkg-config" ,pkg-config)))
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"))))))
6840 (define-public python-matplotlib-documentation
6842 (inherit python-matplotlib)
6843 (name "python-matplotlib-documentation")
6846 #:tests? #f ;we're only generating documentation
6848 #~(modify-phases %standard-phases
6851 (setenv "HOME" "/tmp")
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)))))
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")))
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"))))))))
6879 python-colorspacious
6880 python-mpl-sphinx-theme
6883 python-sphinx-copybutton
6884 python-sphinx-gallery
6885 python-sphinxcontrib-svg2pdfconverter
6893 texlive-unicode-math
6895 texlive-latex-expdlist
6897 texlive-latex-type1cm
6900 (synopsis "Documentation for the @code{python-matplotlib} package")))
6902 (define-public python-matplotlib-inline
6904 (name "python-matplotlib-inline")
6909 (uri (pypi-uri "matplotlib-inline" version))
6911 (base32 "1vilzwj3xp00mxprmmn1hlafm3p23vn56s46kx3ra4qd5signjx0"))))
6912 (build-system python-build-system)
6914 (list python-matplotlib python-traitlets))
6916 ;; Tests disabled because of a circular dependency with ipython.
6918 (home-page "https://github.com/ipython/matplotlib-inline")
6919 (synopsis "Inline Matplotlib backend for Jupyter")
6921 "This package provides a Matplotlib inline back-end for IPython and
6923 (license license:bsd-3)))
6925 (define-public python-matplotlib-venn
6927 (name "python-matplotlib-venn")
6932 (uri (pypi-uri "matplotlib-venn" version ".zip"))
6935 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
6936 (build-system python-build-system)
6937 (arguments '(#:tests? #f)) ; tests are not included
6939 (list python-matplotlib python-numpy python-scipy))
6942 (home-page "https://github.com/konstantint/matplotlib-venn")
6943 (synopsis "Plot area-proportional Venn diagrams")
6945 "This package provides tools for plotting area-proportional two- and
6946 three-way Venn diagrams in @code{matplotlib}.")
6947 (license license:expat)))
6949 (define-public python-pysnptools
6951 (name "python-pysnptools")
6956 (uri (pypi-uri "pysnptools" version))
6959 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
6960 (build-system python-build-system)
6962 `(#:tests? #f ; no test data are included
6964 (modify-phases %standard-phases
6966 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6969 (add-installed-pythonpath inputs outputs)
6970 (invoke "python3" "pysnptools/test.py"))
6980 (list python-cython))
6981 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
6982 (synopsis "Library for reading and manipulating genetic data")
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)))
6990 (define-public python2-pysnptools
6991 (package-with-python2 python-pysnptools))
6993 (define-public python-pykdtree
6995 (name "python-pykdtree")
7000 (uri (pypi-uri "pykdtree" version))
7002 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
7003 (build-system python-build-system)
7007 (list python-numpy))
7008 (home-page "https://github.com/storpipfugl/pykdtree")
7009 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
7011 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
7013 (license license:lgpl3+)))
7015 (define-public python-wurlitzer
7017 (name "python-wurlitzer")
7022 (uri (pypi-uri "wurlitzer" version))
7024 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
7025 (build-system python-build-system)
7028 (modify-phases %standard-phases
7031 (invoke "pytest" "-vv" "test.py"))))))
7033 (list python-mock python-pytest))
7034 (home-page "https://github.com/minrk/wurlitzer")
7035 (synopsis "Capture C-level output in context managers")
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
7040 (license license:expat)))
7042 (define-public python-socksipy-branch
7044 (name "python-socksipy-branch")
7049 (uri (pypi-uri "SocksiPy-branch" version))
7052 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
7053 (build-system python-build-system)
7055 `(#:tests? #f)) ; There are no tests
7056 (home-page "https://code.google.com/archive/p/socksipy-branch/")
7057 (synopsis "Python SOCKS module")
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)))
7067 (define-public python2-socksipy-branch
7068 (package-with-python2 python-socksipy-branch))
7070 (define-public python-socksipychain
7072 (name "python-socksipychain")
7078 (url "https://github.com/pagekite/PySocksipyChain")
7079 (commit (string-append "v" version))))
7080 (file-name (git-file-name name version))
7083 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
7084 (build-system python-build-system)
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")
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)))
7096 (define-public python-pycodestyle
7098 (name "python-pycodestyle")
7103 (uri (pypi-uri "pycodestyle" version))
7106 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
7107 (build-system python-build-system)
7110 (modify-phases %standard-phases
7113 (invoke "pytest" "-vv"))))))
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)))
7123 (define-public python2-pycodestyle
7124 (package-with-python2 python-pycodestyle))
7126 (define-public python-pycodestyle-2.6
7128 (inherit python-pycodestyle)
7132 (uri (pypi-uri "pycodestyle" version))
7135 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
7137 (define-public python-multidict
7139 (name "python-multidict")
7144 (uri (pypi-uri "multidict" version))
7147 "1kjrxav572j45xvr1iy60zb2g8zqvrinzdkl4ax36js4vczckl8d"))))
7148 (build-system python-build-system)
7150 '(#:phases (modify-phases %standard-phases
7152 (lambda* (#:key tests? #:allow-other-keys)
7154 (invoke "pytest" "-vv")
7155 (format #t "test suite not run~%")))))))
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)))
7164 (define-public python-orderedmultidict
7166 (name "python-orderedmultidict")
7171 (uri (pypi-uri "orderedmultidict" version))
7174 "1bc2v0yflsxjyyjx4q9wqx0j3bvzcw9z87d5pz4iqac7bsxhn1q4"))))
7175 (build-system python-build-system)
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)))
7188 (define-public python-autocommand
7190 (name "python-autocommand")
7195 (uri (pypi-uri "autocommand" version))
7197 (base32 "03qp9xx4dq81ljhf56r21gp5j0lpqs1vaw99g0d84i97s3lj1m7y"))))
7198 (build-system python-build-system)
7202 #~(modify-phases %standard-phases
7204 (lambda* (#:key tests? #:allow-other-keys)
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+)))
7218 (define-public python-autopep8
7220 (name "python-autopep8")
7225 (uri (pypi-uri "autopep8" version))
7228 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
7229 (build-system python-build-system)
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")
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
7240 (license (license:non-copyleft
7241 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
7243 (define-public python2-autopep8
7244 (package-with-python2 python-autopep8))
7246 (define-public python-distlib
7248 (name "python-distlib")
7253 (uri (pypi-uri "distlib" version ".zip"))
7256 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
7257 (build-system python-build-system)
7260 (modify-phases %standard-phases
7261 (add-before 'build 'no-/bin/sh
7263 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
7264 (("/bin/sh") (which "sh")))
7266 (add-before 'check 'prepare-test-env
7268 (setenv "HOME" "/tmp")
7269 ;; NOTE: Any value works, the variable just has to be present.
7270 (setenv "SKIP_ONLINE" "1")
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)))
7280 (define-public python-distutils-extra
7282 (name "python-distutils-extra")
7287 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
7288 version "/+download/python-distutils-extra-"
7292 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
7293 (build-system python-build-system)
7294 (home-page "https://launchpad.net/python-distutils-extra/")
7295 (synopsis "Enhancements to Python's distutils")
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)))
7302 (define-public python2-distutils-extra
7303 (package-with-python2 python-distutils-extra))
7305 (define-public python2-elib.intl
7307 (name "python2-elib.intl")
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.
7315 (url "https://github.com/dieterv/elib.intl")
7316 (commit "d09997cfef")))
7317 (file-name (string-append name "-" version "-checkout"))
7320 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
7321 (build-system python-build-system)
7323 ;; incompatible with Python 3 (exception syntax)
7324 `(#:python ,python-2
7326 (home-page "https://github.com/dieterv/elib.intl")
7327 (synopsis "Enhanced internationalization for Python")
7329 "The elib.intl module provides enhanced internationalization (I18N)
7330 services for your Python modules and applications.")
7331 (license license:lgpl3+)))
7333 (define-public python-olefile
7335 (name "python-olefile")
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"))
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")
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)))
7355 (define-public python2-olefile
7356 (package-with-python2 python-olefile))
7358 (define-public python-pypdf3
7360 (name "python-pypdf3")
7365 (uri (pypi-uri "PyPDF3" version))
7367 (base32 "018hlq9q2qa96vw4j7ppq352znykldwy98h2w9qcpkvpi93sjqhc"))))
7368 (build-system python-build-system)
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)))
7379 (define-public python-pikepdf
7381 (name "python-pikepdf")
7386 (uri (pypi-uri "pikepdf" version))
7388 (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
7389 (build-system python-build-system)
7391 `(#:tests? #false)) ;require python-xmp-toolkit
7395 python-setuptools-scm
7396 python-setuptools-scm-git-archive
7402 (list python-lxml python-pillow))
7403 (home-page "https://github.com/pikepdf/pikepdf")
7404 (synopsis "Read and write PDFs with Python")
7406 "pikepdf is a Python library for reading and writing PDF files.")
7407 (license license:mpl2.0)))
7409 (define-public python-pillow
7411 (name "python-pillow")
7416 (uri (pypi-uri "Pillow" version))
7419 "0gjry0yqryd2678sm47jhdnbghzxn5wk8pgyaqwr4qi7x5ijjvpf"))
7420 (modules '((guix build utils)))
7423 (delete-file-recursively "src/thirdparty")))))
7424 (build-system python-build-system)
7426 (list python-pytest))
7436 (list python-olefile))
7439 (modify-phases %standard-phases
7440 (add-after 'unpack 'patch-ldconfig
7442 (substitute* "setup.py"
7443 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
7445 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
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")
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"))))
7467 (define-public python2-pillow
7468 (package-with-python2
7470 (inherit (strip-python2-variant python-pillow))
7471 ;; Version 6 is the last series with Python 2 support.
7476 (uri (pypi-uri "Pillow" version))
7479 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
7481 (substitute-keyword-arguments (package-arguments python-pillow)
7482 ;; FIXME: One of the tests is failing.
7483 ((#:tests? _ #f) #f))))))
7485 (define-public python-pillow-2.9
7487 (inherit python-pillow)
7492 (uri (pypi-uri "Pillow" version))
7495 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
7497 (substitute-keyword-arguments (package-arguments python-pillow)
7498 ((#:tests? _ #f) #f)))
7499 (properties '((hidden? #t)))))
7501 (define-public python-pillow-simd
7503 (inherit python-pillow)
7504 (name "python-pillow-simd")
7505 (version "9.0.0.post1")
7506 ;; The PyPI tarball does not include test files.
7511 (url "https://github.com/uploadcare/pillow-simd")
7512 (commit (string-append "v" version))))
7513 (file-name (git-file-name name version))
7515 (base32 "1dnvsln451aw3qy2cxg2ndd5mcanf5nrhxw9l7mcam730635hdm9"))))
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
7524 (define-public python-imagecodecs
7526 (name "python-imagecodecs")
7527 (version "2021.3.31")
7531 (uri (pypi-uri "imagecodecs" version))
7534 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
7535 (modules '((guix build utils)))
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$"))
7543 (build-system python-build-system)
7545 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
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"
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']
7573 ;; XXX: The installed scripts import packages that depend on
7574 ;; this package; disable import check to avoid the cycle.
7575 (delete 'sanity-check))))
7590 ;; For the Python library.
7591 (list python-numpy))
7595 ;; For testing. Incomplete.
7596 ;("python-numcodecs" ,python-numcodecs)
7597 ;("python-zarr" ,python-zarr)
7598 ;("python-pytest" ,python-pytest)
7600 (home-page "https://www.lfd.uci.edu/~gohlke/")
7602 "Image transformation, compression, and decompression codecs")
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)))
7609 (define-public python-executing
7611 (name "python-executing")
7616 (uri (pypi-uri "executing" version))
7618 (base32 "08q0xh9fd8k41sqpp23q6fb9bf7yj4y2q6sv30pj36vvk8pg8fy2"))))
7619 (build-system python-build-system)
7621 `(#:tests? #f)) ; TODO: tests require python-asttokens
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)))
7630 (define-public python-roifile
7632 (name "python-roifile")
7633 (version "2020.11.28")
7637 (uri (pypi-uri "roifile" version))
7640 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
7641 (build-system python-build-system)
7642 (arguments `(#:tests? #f)) ; there are none
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)))
7652 (define-public python-tifffile
7654 (name "python-tifffile")
7655 (version "2021.4.8")
7659 (uri (pypi-uri "tifffile" version))
7662 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
7663 (build-system python-build-system)
7664 ;; Tests require lfdfiles, which depends on tifffile
7665 (arguments `(#:tests? #f))
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)))
7676 (define-public python-lfdfiles
7678 (name "python-lfdfiles")
7679 (version "2021.2.22")
7683 (uri (pypi-uri "lfdfiles" version))
7686 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
7687 (modules '((guix build utils)))
7690 ;; Delete pre-generated Cython files.
7691 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
7693 (build-system python-build-system)
7695 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
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")
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)))
7707 (define-public python-imageio
7709 (name "python-imageio")
7714 (uri (pypi-uri "imageio" version))
7717 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
7718 (build-system python-build-system)
7720 `(#:tests? #f ; many tests require online data
7722 (modify-phases %standard-phases
7724 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
7727 ;; Make installed package available for running the tests.
7728 (add-installed-pythonpath inputs outputs)
7729 (invoke "pytest" "-vv"))
7732 (list python-numpy python-pillow python-psutil))
7734 (list python-pytest))
7735 (home-page "https://imageio.github.io/")
7736 (synopsis "Library for reading and writing a wide range of image data")
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)))
7743 (define-public python-pyvips
7745 (name "python-pyvips")
7750 (uri (pypi-uri "pyvips" version))
7752 (base32 "0lq71iiic4pc8qhxr60gi141w25pjnn4vsh05d5l0fjkgjsv137b"))))
7753 (build-system python-build-system)
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:
7762 ;; Falling back to ABI mode. Details: unable to find pkg-config package "vips"
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
7769 (substitute* "setup.py"
7770 (("^( +setup_)API\\(\\)\n" _ prefix)
7771 (string-append prefix "ABI()\n")))))
7772 (add-after 'unpack 'fix-paths
7774 (substitute* "pyvips/__init__.py"
7775 (("^( +_vips_libname) = '(libvips.so.42)'"
7777 (format #f "~a = '~a/lib/~a'"
7778 var #$(this-package-input "vips") libname))
7779 (("^( +_gobject_libname) = '(libgobject-2.0.so.0)'"
7781 (format #f "~a = '~a/lib/~a'"
7782 var #$(this-package-input "glib") libname)))))
7784 (lambda* (#:key tests? #:allow-other-keys)
7786 (invoke "python" "setup.py" "test")))))))
7790 python-pytest-flake8
7791 python-pytest-runner))
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)))
7802 (define-public python-pycparser
7804 (name "python-pycparser")
7809 (uri (pypi-uri "pycparser" version))
7812 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
7813 (outputs '("out" "doc"))
7814 (build-system python-build-system)
7819 (modify-phases %standard-phases
7822 (with-directory-excursion "tests"
7823 (invoke "python" "all_tests.py"))
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")))
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)
7837 (home-page "https://github.com/eliben/pycparser")
7838 (synopsis "C parser in Python")
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)))
7845 (define-public python2-pycparser
7846 (package-with-python2 python-pycparser))
7848 (define-public python-xlsxwriter
7850 (name "python-xlsxwriter")
7854 ;; There are no tests in the PyPI tarball.
7857 (url "https://github.com/jmcnamara/XlsxWriter")
7858 (commit (string-append "RELEASE_" version))))
7859 (file-name (git-file-name name version))
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")
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)))
7870 (define-public python-pywavelets
7872 (name "python-pywavelets")
7874 (home-page "https://github.com/PyWavelets/pywt")
7877 (uri (pypi-uri "PyWavelets" version))
7880 "13csbr6ls9q9ww53z2xwwsj0hpsz88rj2iwp623h0kmv8yq6kgbc"))
7883 (use-modules ((guix build utils)))
7884 (for-each delete-file
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)
7893 '(#:modules ((ice-9 ftw)
7897 (guix build python-build-system))
7899 (modify-phases %standard-phases
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"))))))))
7909 python-matplotlib ;for tests
7912 (list python-numpy))
7913 (synopsis "Wavelet transforms in Python")
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)))
7922 (define-public python-pywal
7924 (name "python-pywal")
7930 (url "https://github.com/dylanaraps/pywal")
7932 (file-name (git-file-name name version))
7934 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
7935 (build-system python-build-system)
7938 (modify-phases %standard-phases
7939 (add-before 'check 'fix-home-directory
7941 ;; Tests fail with "Permission denied: '/homeless-shelter'".
7942 (setenv "HOME" "/tmp")
7946 (home-page "https://github.com/dylanaraps/pywal")
7947 (synopsis "Color palette generator and applicator")
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)))
7954 (define-public python-click-didyoumean
7956 (name "python-click-didyoumean")
7961 (uri (pypi-uri "click-didyoumean" version))
7963 (base32 "0dc0xrmqbw0idpx843ahzzvivmvx3fcfsm3k54lnssyra7cg117i"))))
7964 (build-system python-build-system)
7966 `(#:tests? #f)) ; no tests in PyPI and no setup.py in github
7968 (list python-click))
7969 (home-page "https://github.com/timofurrer/click-didyoumean")
7970 (synopsis "Git-like did-you-mean feature in Click")
7972 "This plugin enables git-like did-you-mean feature in Click.")
7973 (license license:expat)))
7975 (define-public python-pywinrm
7977 (name "python-pywinrm")
7982 (uri (pypi-uri "pywinrm" version))
7985 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
7986 (build-system python-build-system)
7988 (list python-six python-requests_ntlm python-xmltodict
7991 (list python-mock python-pytest))
7992 (home-page "https://github.com/diyan/pywinrm/")
7994 "Python library for Windows Remote Management (WinRM)")
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)))
8001 (define-public python-xcffib
8003 (name "python-xcffib")
8008 (uri (pypi-uri "xcffib" version))
8011 "0nkglsm9nbhv238iagmmsjcz6lf1yfdvp5kmspphdj385vz9r50j"))))
8012 (build-system python-build-system)
8016 (list python-cffi ; used at run time
8019 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
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")))
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)))
8035 (copy-file "README.md"
8036 (string-append doc "/README.md"))
8038 (home-page "https://github.com/tych0/xcffib")
8039 (synopsis "XCB Python bindings")
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)))
8045 (define-public python2-xcffib
8046 (package-with-python2 python-xcffib))
8048 (define-public python-cairocffi
8050 (name "python-cairocffi")
8054 ;; The PyPI archive does not include the documentation, so use Git.
8057 (url "https://github.com/Kozea/cairocffi")
8058 (commit (string-append "v" version))))
8059 (file-name (git-file-name name version))
8062 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
8063 (build-system python-build-system)
8064 (outputs '("out" "doc"))
8066 (list glib gtk+ gdk-pixbuf cairo))
8071 python-pytest-runner
8073 python-sphinx-rtd-theme))
8075 (list python-xcffib)) ; used at run time
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\\)")
8085 (("filenames = \\(library_filename,\\) \\+ filenames")
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"))
8097 (search-input-file inputs "/lib/libgdk-3.so.0")))))
8098 (add-after 'unpack 'disable-linters
8099 ;; Their check fails; none of our business.
8101 (substitute* "setup.cfg"
8102 ((".*pytest-flake8.*") "")
8103 ((".*pytest-isort.*") "")
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")
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)
8124 (home-page "https://github.com/Kozea/cairocffi")
8125 (synopsis "Python bindings and object-oriented API for Cairo")
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)))
8133 (define-public python-decorator
8135 (name "python-decorator")
8140 (uri (pypi-uri "decorator" version))
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")
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))))))
8154 ;; Version 5 does not support Python 2
8155 (define-public python2-decorator
8157 (inherit (package-with-python2
8158 (strip-python2-variant python-decorator)))
8163 (uri (pypi-uri "decorator" version))
8165 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))))
8167 (define-public python-drmaa
8169 (name "python-drmaa")
8174 (uri (pypi-uri "drmaa" version))
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.
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")
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)))
8195 (define-public python2-drmaa
8196 (package-with-python2 python-drmaa))
8198 (define-public python-grako
8200 (name "python-grako")
8206 (pypi-uri "grako" version ".zip"))
8209 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
8210 (build-system python-build-system)
8211 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
8213 (list unzip python-pytest python-pytest-runner))
8214 (home-page "https://bitbucket.org/neogeny/grako")
8215 (synopsis "EBNF parser generator")
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)))
8221 (define-public python2-grako
8222 (package-with-python2 python-grako))
8224 (define-public python-grandalf
8226 (name "python-grandalf")
8230 ;; There's no source tarball on PyPI.
8233 (url "https://github.com/bdcht/grandalf")
8234 (commit (string-append "v" version))))
8235 (file-name (git-file-name name version))
8238 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
8239 (build-system python-build-system)
8242 (modify-phases %standard-phases
8245 (invoke "python" "setup.py" "pytest"))))))
8247 (list python-pytest python-pytest-runner))
8249 (list python-numpy python-ply))
8250 (home-page "https://github.com/bdcht/grandalf")
8251 (synopsis "Graph and drawing algorithms framework")
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
8264 Grandalf does only 2 not-so-simple things:
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
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))))
8277 (define-public python-gridmap
8279 (name "python-gridmap")
8285 (url "https://github.com/pygridtools/gridmap")
8286 (commit (string-append "v" version))))
8287 (file-name (git-file-name name version))
8289 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
8290 (build-system python-build-system)
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))))
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")
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+)))
8306 (define-public python-honcho
8308 (name "python-honcho")
8314 (url "https://github.com/nickstenning/honcho")
8315 (commit (string-append "v" version))))
8316 (file-name (git-file-name name version))
8318 (base32 "1y0r8dw4pqcq7r4n58ixjdg1iy60lp0gxsd7d2jmhals16ij71rj"))))
8319 (build-system python-build-system)
8321 (list python-pytest python-mock python-tox which)) ;for tests
8323 (list python-jinja2))
8326 (modify-phases %standard-phases
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")
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
8346 (license license:expat)))
8348 (define-public python-pebble
8350 (name "python-pebble")
8355 (uri (pypi-uri "Pebble" version))
8357 (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
8358 (build-system python-build-system)
8360 (list python-pytest))
8363 (modify-phases %standard-phases
8365 (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
8366 (home-page "https://github.com/noxdafox/pebble")
8367 (synopsis "Threading and multiprocessing for Python")
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+)))
8373 (define-public python-pexpect
8375 (name "python-pexpect")
8380 (uri (pypi-uri "pexpect" version))
8382 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
8383 (build-system python-build-system)
8386 (modify-phases %standard-phases
8387 (add-before 'check 'prepare-tests
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.
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")
8404 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
8406 `(("python-nose" ,python-nose)
8407 ("python-pytest" ,python-pytest)
8410 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
8412 (list python-ptyprocess))
8413 (home-page "http://pexpect.readthedocs.org/")
8414 (synopsis "Controlling interactive console applications")
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)))
8422 (define-public python2-pexpect
8423 (package-with-python2 python-pexpect))
8425 (define-public python-setuptools-scm
8427 (name "python-setuptools-scm")
8431 (uri (pypi-uri "setuptools_scm" version))
8433 (base32 "1wm0i27siyy1yqr9rv7lqvb65agay9051yi8jzmi8dgb3q4ai6m4"))))
8434 (build-system python-build-system)
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")
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))))))
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
8454 (uri (pypi-uri "setuptools_scm" version))
8457 "1j75i8avp9fhrkpbabsa8vyvbi49kmxlq6l10xir9qs96kfwx843"))))
8458 (propagated-inputs '()))))
8460 (define-public python-sexpdata
8462 (name "python-sexpdata")
8467 (uri (pypi-uri "sexpdata" version))
8470 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
8471 (build-system python-build-system)
8472 (home-page "https://github.com/jd-boyd/sexpdata")
8473 (synopsis "S-expression parser for Python")
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)))
8479 (define-public python-pathlib2
8481 (name "python-pathlib2")
8486 (uri (pypi-uri "pathlib2" version))
8489 "0psyg60vk8wca473djrh0v9gb853z8wcawi8im5dyg00amawp2vx"))))
8490 (build-system python-build-system)
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)))
8501 (define-public python-importlib-resources
8503 (name "python-importlib-resources")
8508 (uri (pypi-uri "importlib_resources" version))
8511 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
8512 (build-system python-build-system)
8514 (list python-setuptools-scm python-toml))
8515 (home-page "http://importlib-resources.readthedocs.io/")
8516 (synopsis "Read resources from Python packages")
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)))
8523 (define-public python2-importlib-resources
8525 (name "python2-importlib-resources")
8529 (uri (pypi-uri "importlib_resources" version))
8532 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
8533 (build-system python-build-system)
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
8542 (substitute* "setup.cfg"
8543 (("^[[:blank:]]+wheel")
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")
8551 "This package provides an implementation of @code{importlib.resources}
8552 for older versions of Python.")
8553 (license license:asl2.0)))
8555 ;; For importlib-metadata-bootstrap below.
8556 (define-public python2-importlib-resources-bootstrap
8559 python2-importlib-resources
8560 (name "python2-importlib-resources-bootstrap")
8562 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
8563 ("python-typing" ,python2-typing))))))
8565 (define-public python-importlib-metadata
8567 (name "python-importlib-metadata")
8572 (uri (pypi-uri "importlib_metadata" version))
8575 "0f951zynlh39yicqnhrs3p1qa5p3g6ajjfcggf12y51ppxz5jk7a"))))
8576 (build-system python-build-system)
8580 #~(modify-phases %standard-phases
8581 ;; XXX: PEP 517 manual build/install procedures copied from
8585 ;; ZIP does not support timestamps before 1980.
8586 (setenv "SOURCE_DATE_EPOCH" "315532800")
8587 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
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))))
8594 (lambda* (#:key tests? #:allow-other-keys)
8596 (invoke "pytest" "-vv" "tests")))))))
8597 (propagated-inputs (list python-zipp))
8599 (list python-pypa-build
8602 python-setuptools-scm))
8603 (home-page "https://importlib-metadata.readthedocs.io/")
8604 (synopsis "Read metadata from Python packages")
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)))
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")
8624 (uri (pypi-uri "importlib_metadata" version))
8627 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
8628 (arguments (substitute-keyword-arguments (package-arguments base)
8629 ((#:phases phases) ;reset standard phases
8630 #~%standard-phases)))
8632 `(("python-setuptools-scm" ,python2-setuptools-scm)
8633 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
8634 ("python-packaging" ,python2-packaging-bootstrap)))
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))))))
8642 ;; This package is used by python2-pytest, and thus must not depend on it.
8643 (define-public python2-importlib-metadata-bootstrap
8646 python2-importlib-metadata
8647 (name "python2-importlib-metadata-bootstrap")
8650 ,@(package-arguments python2-importlib-metadata)))
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))))))
8658 (define-public python-importmagic
8660 (name "python-importmagic")
8665 (uri (pypi-uri "importmagic" version))
8668 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
8669 (build-system python-build-system)
8672 #~(modify-phases %standard-phases
8674 (lambda* (#:key tests? #:allow-other-keys)
8676 (invoke "pytest" "-v")))))))
8678 (list python-pytest))
8679 (home-page "https://github.com/alecthomas/importmagic")
8680 (synopsis "Library for adding, removing and managing Python imports")
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)))
8686 (define-public python-inotify-simple
8688 (name "python-inotify-simple")
8694 (url "https://github.com/chrisjbillington/inotify_simple")
8696 (file-name (git-file-name name version))
8698 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
8699 (build-system python-build-system)
8701 "https://github.com/chrisjbillington/inotify_simple")
8702 (synopsis "Simple wrapper around inotify library")
8704 "@code{inotify-simple} is a simple wrapper around inotify library.")
8705 (license license:bsd-3)))
8707 (define-public python-jaraco-classes
8709 (name "python-jaraco-classes")
8714 (uri (pypi-uri "jaraco.classes" version))
8716 (base32 "0d6g7qvfv1jlzbzh6asprqdblqd59grvlvr3nwbdqdqrmwlbfm7d"))))
8717 (build-system python-build-system)
8721 #~(modify-phases %standard-phases
8723 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
8731 python-pytest-checkdocs
8733 python-pytest-enabler-bootstrap ;OK since not propagated
8734 python-pytest-flake8
8736 python-setuptools-scm
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
8743 (license license:expat)))
8745 ;;; Variant used to break a cycle with python-pytest-enabler.
8746 (define-public python-jaraco-context-bootstrap
8749 (name "python-jaraco-context-bootstrap")
8754 (uri (pypi-uri "jaraco.context" version))
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
8764 (license license:expat))))
8766 (define-public python-jaraco-context
8767 (package/inherit python-jaraco-context-bootstrap
8768 (name "python-jaraco-context")
8770 (substitute-keyword-arguments
8771 (package-arguments python-jaraco-context-bootstrap)
8774 ((#:phases phases #~%standard-phases)
8775 #~(modify-phases #$phases
8777 (lambda* (#:key tests? #:allow-other-keys)
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"))))))))
8784 (package-native-inputs python-jaraco-context-bootstrap)
8785 (append python-pytest
8787 python-pytest-checkdocs
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)))))
8795 ;;; Variant used to break a cycle with python-pytest-enabler.
8796 (define-public python-jaraco-functools-bootstrap
8799 (name "python-jaraco-functools-bootstrap")
8804 (uri (pypi-uri "jaraco.functools" version))
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))))
8817 (define-public python-jaraco-functools
8818 (package/inherit python-jaraco-functools-bootstrap
8819 (name "python-jaraco-functools")
8821 (substitute-keyword-arguments
8822 (package-arguments python-jaraco-functools-bootstrap)
8825 ((#:phases phases #~%standard-phases)
8826 #~(modify-phases #$phases
8828 (lambda* (#:key tests? #:allow-other-keys)
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"))))))))
8835 (package-native-inputs python-jaraco-functools-bootstrap)
8836 (append python-jaraco-classes
8839 python-pytest-checkdocs
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)))))
8847 (define-public python-jaraco-packaging
8849 (name "python-jaraco-packaging")
8854 (uri (pypi-uri "jaraco.packaging" version))
8857 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
8858 (build-system python-build-system)
8861 python-pytest-checkdocs
8862 python-pytest-flake8
8865 python-setuptools-scm
8868 (home-page "https://github.com/jaraco/jaraco.packaging")
8869 (synopsis "Tools to supplement packaging Python releases")
8871 "This package provides various tools to supplement packaging Python
8873 (license license:expat)))
8875 (define-public python-simplegeneric
8877 (name "python-simplegeneric")
8882 (uri (pypi-uri "simplegeneric" version ".zip"))
8884 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
8885 (build-system python-build-system)
8888 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
8889 (synopsis "Python module for simple generic functions")
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
8897 (license license:zpl2.1)))
8899 (define-public python2-simplegeneric
8900 (package-with-python2 python-simplegeneric))
8902 (define-public python-ipython-genutils
8903 ;; TODO: This package is retired, check if can be removed, see description.
8905 (name "python-ipython-genutils")
8910 (uri (pypi-uri "ipython_genutils" version))
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")
8918 "This package provides retired utilities from IPython. No packages
8919 outside IPython/Jupyter should depend on it.
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
8925 (license license:bsd-3)))
8927 (define-public python2-ipython-genutils
8928 (package-with-python2 python-ipython-genutils))
8930 ;;; Variant used to break a cycle with python-ipykernel.
8931 (define-public python-ipyparallel-bootstrap
8934 (name "python-ipyparallel-bootstrap")
8939 (uri (pypi-uri "ipyparallel" version))
8942 "0wiwfd7870zbmczzn96jqxxjf2zcbcaxnsl1ddn8hspwa8y4frzj"))))
8943 (build-system python-build-system)
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))))
8952 (list python-dateutil
8956 ;; python-ipykernel is omitted here to break a cycle.
8957 python-jupyter-client-bootstrap
8963 (home-page "https://ipython.org/")
8964 (synopsis "Interactive Parallel Computing with IPython")
8966 "@code{ipyparallel} is a Python package and collection of CLI scripts for
8967 controlling clusters for Jupyter. @code{ipyparallel} contains the following
8970 @item ipcluster - start/stop a cluster
8971 @item ipcontroller - start a scheduler
8972 @item ipengine - start an engine
8974 (license license:bsd-3))))
8976 (define-public python-ipyparallel
8978 (inherit python-ipyparallel-bootstrap)
8979 (name "python-ipyparallel")
8983 #~(modify-phases %standard-phases
8986 (invoke "pytest" "-vv"))))))
8988 (list python-ipython
8990 python-pytest-asyncio
8992 python-pytest-tornado
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)))))
9001 (define-public python-ipython-cluster-helper
9003 (name "python-ipython-cluster-helper")
9008 (uri (pypi-uri "ipython-cluster-helper" version))
9011 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
9012 (modules '((guix build utils)))
9014 '(begin (substitute* "requirements.txt"
9015 (("ipython.*") "ipython\n"))
9017 (build-system python-build-system)
9019 `(#:tests? #f ; Test suite can't find IPython.
9021 (modify-phases %standard-phases
9023 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9026 (setenv "HOME" (getcwd))
9027 (add-installed-pythonpath inputs outputs)
9028 (invoke "python" "example/example.py" "--local"))
9031 (list python-ipyparallel
9037 (home-page "https://github.com/roryk/ipython-cluster-helper")
9039 "Simplify IPython cluster start up and use for multiple schedulers")
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)))
9046 (define-public python-ipython-sql
9048 (name "python-ipython-sql")
9053 (uri (pypi-uri "ipython-sql" version))
9055 (base32 "0v74ayc6vw98f4jljmwy45qpqbcbhlrb4g1qdyypq9sppxcqx21y"))))
9056 (build-system python-build-system)
9059 (modify-phases %standard-phases
9060 (add-after 'unpack 'fix-build
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,")))))))
9069 (list python-ipython
9070 python-ipython-genutils
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)))
9081 (define-public python-traitlets
9083 (name "python-traitlets")
9088 (uri (pypi-uri "traitlets" version))
9091 "1ivhxglsrnhqw4g98ihddn7i5f6976gpk31fijwq473wb9n4b7q5"))))
9092 (build-system python-build-system)
9095 (modify-phases %standard-phases
9096 (replace 'check (lambda* (#:key tests? #:allow-other-keys)
9098 (invoke "pytest" "-vv" "traitlets")))))))
9100 (list python-pytest))
9101 (home-page "https://ipython.org")
9102 (synopsis "Configuration system for Python applications")
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)))
9112 (define-public python-jupyter-core
9114 (name "python-jupyter-core")
9119 (uri (string-append (pypi-uri "jupyter_core" version)))
9122 "1v0s31rmwppdmww135hif03hy164j9kimirh24kxfcbvdfql9pm6"))))
9123 (build-system python-build-system)
9126 (modify-phases %standard-phases
9128 (lambda* (#:key tests? #:allow-other-keys)
9130 ;; Some tests write to $HOME.
9131 (setenv "HOME" "/tmp")
9132 (invoke "pytest" "-vv"
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
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"))
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
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")
9173 "Jupyter core is the base package on which Jupyter projects rely.")
9174 (license license:bsd-3)))
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
9179 (define-public python-jupyter-client-bootstrap
9182 (name "python-jupyter-client-bootstrap")
9187 (uri (pypi-uri "jupyter_client" version))
9190 "12pbp177bfb3710y1a5598mwn8ffhyzmpll67m0nmalb98savnwg"))))
9191 (build-system python-build-system)
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"
9201 (format #f "'~a'" (search-input-file inputs "sbin/ip")))))))))
9202 (inputs (list iproute))
9204 (list python-dateutil
9211 (home-page "https://jupyter.org/")
9212 (synopsis "Jupyter protocol implementation and client libraries")
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))))
9220 (define-public python-jupyter-client
9221 (let ((base python-jupyter-client-bootstrap))
9224 (name "python-jupyter-client")
9226 (substitute-keyword-arguments (package-arguments base)
9229 ((#:phases phases #~%standard-phases)
9230 #~(modify-phases #$phases
9232 (lambda* (#:key tests? #:allow-other-keys)
9234 ;; Some tests try to write to $HOME.
9235 (setenv "HOME" "/tmp")
9236 (invoke "pytest" "-vv"))))))))
9239 python-pytest-asyncio
9240 python-pytest-timeout
9241 python-async-generator
9243 python-ipykernel-bootstrap))
9244 (properties (alist-delete 'hidden? (package-properties base))))))
9246 (define-public python-ipykernel
9248 (name "python-ipykernel")
9253 (uri (pypi-uri "ipykernel" version))
9255 (base32 "0q5yni8h08nadsn53f957p0pjsjhwl2b2lp1hqz3jn0854z2fa0f"))))
9256 (build-system python-build-system)
9259 #:imported-modules `(,@%python-build-system-modules
9260 (guix build syscalls))
9261 #:modules '((guix build python-build-system)
9262 (guix build syscalls)
9266 #~(modify-phases %standard-phases
9268 (lambda* (#:key tests? #:allow-other-keys)
9270 (match (primitive-fork)
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.
9277 ;; TODO: Complete https://issues.guix.gnu.org/30948.
9278 (setenv "HOME" "/tmp")
9279 (execlp "tini" "--" "pytest" "-vv"))
9281 (match (waitpid pid)
9283 (unless (zero? status)
9284 (error "`pytest' exited with 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
9290 (substitute* (string-append #$output "/share/jupyter"
9291 "/kernels/python3/kernel.json")
9293 (format #f "~s" (search-input-file inputs
9294 "/bin/python3")))))))))
9296 (list python-debugpy
9298 python-jupyter-client ;imported at runtime during connect
9299 python-matplotlib-inline
9300 ;;python-nest-asyncio
9305 (inputs (list python)) ;for cross compilation
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
9313 python-pytest-bootstrap
9314 python-pytest-timeout
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)))
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))
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))))
9336 (modify-inputs (package-propagated-inputs parent)
9337 (replace "python-jupyter-client" python-jupyter-client-bootstrap)
9338 (append python-ipyparallel-bootstrap)))))))
9340 (define-public python-pari-jupyter
9342 (name "python-pari-jupyter")
9347 (uri (pypi-uri "pari-jupyter" version))
9350 "1ikqvv335qfrhmlji0iclci6pnm2c3fvnxf031jr1d68j79g6ypd"))))
9351 (build-system python-build-system)
9352 (arguments '(#:tests? #f)) ;no test suite
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+)))
9360 (define-public python-backcall
9362 (name "python-backcall")
9367 (uri (pypi-uri "backcall" version))
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")
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)))
9382 (define-public python-pure-eval
9384 (name "python-pure-eval")
9389 (uri (pypi-uri "pure_eval" version))
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)))
9400 (define-public python-asttokens
9402 (name "python-asttokens")
9407 (uri (pypi-uri "asttokens" version))
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)))
9422 (define-public python-littleutils
9424 (name "python-littleutils")
9429 (uri (pypi-uri "littleutils" version))
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)))
9439 (define-public python-stack-data
9441 (name "python-stack-data")
9446 (uri (pypi-uri "stack_data" version))
9448 (base32 "04lfcj5qrn4qikjw89qbdzqwm0xm4bgm4m8rll1rafk3pm0jssa5"))))
9449 (build-system python-build-system)
9450 (propagated-inputs (list python-asttokens python-executing python-pure-eval))
9456 python-setuptools-scm
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
9463 (license license:expat)))
9465 (define-public python-ipython
9467 (name "python-ipython")
9472 (uri (pypi-uri "ipython" version ".tar.gz"))
9474 (base32 "1hcxa713wh3axa57412iy02rj0494ljvv6gpnls4lndc5h9yprbh"))))
9475 (build-system python-build-system)
9478 (modify-phases %standard-phases
9479 (add-after 'unpack 'make-docs-reproducible
9481 (substitute* "IPython/sphinxext/ipython_directive.py"
9482 ((".*import datetime") "")
9483 ((".*datetime.datetime.now\\(\\)") "")
9484 (("%timeit") "# %timeit"))))
9486 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
9488 (setenv "HOME" "/tmp/") ;required by some tests
9489 (invoke "python" "-m" "pytest" "-vv")))))))
9490 (inputs (list readline which))
9492 (list python-backcall
9498 python-matplotlib-inline
9505 python-prompt-toolkit
9508 python-simplegeneric
9519 (home-page "https://ipython.org")
9520 (synopsis "IPython is a tool for interactive computing in Python")
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
9526 (properties '((cpe-name . "ipython")))
9527 (license license:bsd-3)))
9529 (define-public python-ipython-documentation
9531 (inherit python-ipython)
9532 (name "python-ipython-documentation")
9533 (version (package-version python-ipython))
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))))))
9544 #~(modify-phases %standard-phases
9545 (add-after 'unpack 'set-pythonpath
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
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
9565 (mkdir-p "texmf-dist/fonts/opentype/public")
9566 (symlink (string-append
9567 #$(this-package-native-input "font-gnu-freefont")
9568 "/share/fonts/opentype")
9571 "texmf-dist/fonts/opentype/public/gnu-freefont"))
9572 (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":"
9573 (getcwd) "/texmf-dist"))))
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"))))))))
9596 (list fontconfig ;for XDG_DATA_DIRS to locate fonts
9601 python-sphinx-rtd-theme
9607 (define-public python-urwid
9609 (name "python-urwid")
9614 (uri (pypi-uri "urwid" version))
9617 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
9618 (build-system python-build-system)
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
9627 (delete-file "urwid/tests/test_vterm.py"))))))
9628 (home-page "http://urwid.org")
9629 (synopsis "Console user interface library for Python")
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+)))
9636 (define-public python2-urwid
9637 (let ((base (package-with-python2
9638 (strip-python2-variant python-urwid))))
9645 (uri (pypi-uri "urwid" version))
9648 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
9650 (define-public python-urwid-readline
9652 (name "python-urwid-readline")
9658 (url "https://github.com/rr-/urwid_readline")
9660 (file-name (git-file-name name version))
9663 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
9664 (build-system python-build-system)
9667 (modify-phases %standard-phases
9669 (lambda* (#:key tests? #:allow-other-keys)
9671 (invoke "python" "-m" "pytest"))
9674 (list python-urwid))
9676 (list python-pytest))
9677 (home-page "https://github.com/rr-/urwid_readline")
9678 (synopsis "Text input widget for urwid that supports readline shortcuts")
9680 "This package provides a textbox edit widget for @code{python-urwid} that
9681 supports @code{readline} shortcuts.")
9682 (license license:expat)))
9684 (define-public python-textdistance
9686 (name "python-textdistance")
9690 ;; There are no tests in the PyPI tarball.
9693 (url "https://github.com/life4/textdistance")
9694 (commit (string-append "v." version))))
9695 (file-name (git-file-name name version))
9697 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
9698 (build-system python-build-system)
9700 `(#:test-target "pytest"
9702 (modify-phases %standard-phases
9703 (add-after 'unpack 'delete-external-test
9705 ;; All tests in this file require external libraries.
9706 (delete-file "tests/test_external.py")
9709 (list python-hypothesis
9713 python-pytest-runner
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)))
9721 (define-public python-urwidtrees
9723 (name "python-urwidtrees")
9728 ;; package author intends on distributing via github rather than pypi:
9729 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
9731 (url "https://github.com/pazz/urwidtrees")
9733 (file-name (git-file-name name version))
9736 "1y1vysx7jg0vbrarlsykhf7nmr8fc6k1fva1q3i98xq2m30s6r68"))))
9737 (build-system python-build-system)
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+)))
9748 (define-public python2-urwidtrees
9749 (package-with-python2 python-urwidtrees))
9751 (define-public python-ua-parser
9753 (name "python-ua-parser")
9758 (uri (pypi-uri "ua-parser" version))
9761 "0csh307zfz666kkk5idrw3crj1x8q8vsqgwqil0r1n1hs4p7ica7"))))
9762 (build-system python-build-system)
9764 `(#:tests? #f)) ;no test suite in release
9766 (list python-pyyaml))
9767 (home-page "https://github.com/ua-parser/uap-python")
9768 (synopsis "User agent parser")
9770 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
9771 (license license:asl2.0)))
9773 (define-public python2-ua-parser
9774 (package-with-python2 python-ua-parser))
9776 (define-public python-user-agents
9778 (name "python-user-agents")
9783 (uri (pypi-uri "user-agents" version))
9786 "09mddriffm9rkwr30081fy9n3cn976ms8pwc8p8hhlxnilbjavfk"))))
9787 (build-system python-build-system)
9789 `(#:tests? #f)) ;missing devices.json test file in release
9791 (list python-ua-parser))
9792 (home-page "https://github.com/selwin/python-user-agents")
9793 (synopsis "User Agent strings parsing library")
9795 "A library to identify devices (phones, tablets) and their capabilities by
9796 parsing (browser/HTTP) user agent strings.")
9797 (license license:expat)))
9799 (define-public python2-user-agents
9800 (package-with-python2 python-user-agents))
9802 (define-public python-pydbus
9804 (name "python-pydbus")
9809 (uri (pypi-uri "pydbus" version))
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+)))
9822 (define-public python-dbus
9824 (name "python-dbus")
9829 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
9830 "dbus-python-" version ".tar.gz"))
9832 (base32 "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"))))
9833 (build-system gnu-build-system)
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)))
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))))
9853 `(#:configure-flags '("PYTHON_VERSION=2")))))
9855 (define-public python-dbus-next
9857 (name "python-dbus-next")
9863 (url "https://github.com/altdesktop/python-dbus-next")
9864 (commit (string-append "v" version))))
9865 (file-name (git-file-name name version))
9868 "1ahaz52kny1p9xxv6phvk4iq56rg8li390wywlxf2yslaij1188h"))))
9869 (build-system python-build-system)
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")
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)))
9880 (define-public python-notify2
9882 (name "python-notify2")
9887 (uri (pypi-uri "notify2" version))
9890 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
9891 (build-system python-build-system)
9892 (arguments `(#:tests? #f)) ; tests depend on system state
9895 (home-page "https://bitbucket.org/takluyver/pynotify2")
9896 (synopsis "Python interface to D-Bus notifications")
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+))))
9904 (define-public python2-notify2
9905 (package-with-python2 python-notify2))
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
9911 (name "python-beautifulsoup4")
9916 (uri (pypi-uri "beautifulsoup4" version))
9919 "14c8z4gh9bi38agx9ls8ym5rscc02pc6f6hmliaqk08xa8yd4fn2"))))
9920 (build-system python-build-system)
9922 (list python-soupsieve python-html5lib python-lxml))
9924 "https://www.crummy.com/software/BeautifulSoup/bs4/")
9926 "Python screen-scraping library")
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))))))
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
9944 (uri (pypi-uri "beautifulsoup4" version))
9947 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
9948 (arguments `(#:python ,python-2)))))
9950 (define-public python-soupsieve
9952 (name "python-soupsieve")
9957 (uri (pypi-uri "soupsieve" version))
9960 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
9961 (build-system python-build-system)
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.
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")
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)))
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))))
9991 (uri (pypi-uri "soupsieve" version))
9994 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
9996 (modify-inputs (package-propagated-inputs base)
9997 (prepend python2-backports-functools-lru-cache))))))
9999 (define-public python-netifaces
10001 (name "python-netifaces")
10006 (uri (pypi-uri "netifaces" version))
10009 "0cnajf5rl4w1sa72j921scbigr6zndig56cq8ggpx45jdqa7jfh4"))))
10010 (build-system python-build-system)
10011 (home-page "https://github.com/al45tair/netifaces")
10013 "Python module for portable network interface information")
10015 "Netifaces is a Python module providing information on network
10016 interfaces in an easy and portable manner.")
10017 (license license:expat)))
10019 (define-public python2-netifaces
10020 (package-with-python2 python-netifaces))
10022 (define-public python-networkx
10024 (name "python-networkx")
10029 (uri (pypi-uri "networkx" version))
10031 (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
10032 (build-system python-build-system)
10034 '(#:phases (modify-phases %standard-phases
10036 (lambda* (#:key tests? #:allow-other-keys)
10038 (invoke "pytest" "-vv" "--pyargs" "networkx")
10039 (format #t "test suite not run~%"))
10041 ;; python-decorator is needed at runtime.
10043 (list python-decorator))
10045 (list python-pytest))
10046 (home-page "https://networkx.github.io/")
10047 (synopsis "Python module for creating and manipulating graphs and networks")
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)))
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))))
10062 (uri (pypi-uri "networkx" version ".zip"))
10065 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
10067 `(#:python ,python-2))
10069 (list python2-nose unzip)))))
10071 (define-public python-datrie
10073 (name "python-datrie")
10078 (uri (pypi-uri "datrie" version))
10081 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
10082 (build-system python-build-system)
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")
10089 "This package provides a fast, efficiently stored trie implementation for
10091 (license license:lgpl2.1+)))
10093 (define-public python-amply
10095 (name "python-amply")
10100 (uri (pypi-uri "amply" version))
10103 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
10104 (build-system python-build-system)
10106 (list python-docutils python-pyparsing))
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")
10112 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
10114 (license license:epl1.0)))
10116 (define-public python-pulp
10118 (name "python-pulp")
10123 (uri (pypi-uri "PuLP" version))
10126 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
10127 (build-system python-build-system)
10129 (list python-amply))
10130 (home-page "https://github.com/coin-or/pulp")
10131 (synopsis "Linear Programming modeler")
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)))
10138 (define-public python-py-tes
10140 (name "python-py-tes")
10145 (uri (pypi-uri "py-tes" version))
10147 (base32 "0b272y392v0mnq0f3sm5kgcx8fn4qwfbym89hhvqxz3xkganr4pn"))))
10148 (build-system python-build-system)
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)))
10157 (define-public python-toposort
10159 (name "python-toposort")
10164 (uri (pypi-uri "toposort" version))
10167 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
10168 (build-system python-build-system)
10169 (home-page "https://gitlab.com/ericvsmith/toposort")
10170 (synopsis "Topological sort algorithm")
10172 "This package provides an implementation of a topological sort
10174 (license license:asl2.0)))
10176 (define-public python-three-merge
10178 (name "python-three-merge")
10182 ;; There are no tests in the PyPI tarball.
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))
10189 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
10190 (build-system python-build-system)
10192 `(#:test-target "pytest"))
10194 (list python-diff-match-patch))
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")
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
10205 (license license:expat)))
10207 (define-public snakemake
10214 (uri (pypi-uri "snakemake" version))
10216 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
10217 (build-system python-build-system)
10219 ;; TODO: Package missing test dependencies.
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")))
10234 (list python-appdirs
10235 python-configargparse
10250 (home-page "https://snakemake.readthedocs.io")
10251 (synopsis "Python-based execution environment for make-like workflows")
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)))
10258 (define-public snakemake-6
10260 (inherit snakemake)
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))
10271 (base32 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai"))))
10272 (build-system python-build-system)
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.
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")))))
10289 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
10297 (list python-appdirs
10298 python-configargparse
10299 python-connection-pool
10324 python-requests-mock))))
10326 (define-public snakemake-7
10328 (inherit snakemake-6)
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))
10339 (base32 "1qrqbmx4cbis0wxr6dl2rdjv9v627sbirsz6v5c31vlbqwkvs04q"))))
10340 (build-system python-build-system)
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.
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")))))
10357 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
10368 (list python-appdirs
10369 python-configargparse
10370 python-connection-pool
10397 python-requests-mock))))
10399 (define-public python-pyqrcode
10401 (name "python-pyqrcode")
10406 (uri (pypi-uri "PyQRCode" version))
10409 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
10410 (build-system python-build-system)
10412 "https://github.com/mnooner256/pyqrcode")
10413 (synopsis "QR code generator")
10415 "Pyqrcode is a QR code generator written purely in Python with
10416 SVG, EPS, PNG and terminal output.")
10417 (license license:bsd-3)))
10419 (define-public python-seaborn
10421 (name "python-seaborn")
10426 (uri (pypi-uri "seaborn" version))
10428 (base32 "1xpl3zb945sihsiwm9q1yyx84sakk1phcg0fprj6i0j0dllfjifg"))
10429 (patches (search-patches "python-seaborn-kde-test.patch"
10430 "python-seaborn-2690.patch"))))
10431 (build-system python-build-system)
10434 (modify-phases %standard-phases
10435 (add-after 'unpack 'patch-more-tests
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)")
10442 ;; These three are borked and have been fixed upstream, but
10443 ;; there's no simple patch we could apply here, so we just
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
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")))
10458 (lambda* (#:key tests? #:allow-other-keys)
10460 (invoke "pytest" "seaborn")))))))
10462 (list python-pandas python-matplotlib python-numpy python-scipy))
10464 (list python-pytest xorg-server-for-tests))
10465 (home-page "https://seaborn.pydata.org/")
10466 (synopsis "Statistical data visualization")
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)))
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))))
10483 (uri (pypi-uri "seaborn" version))
10486 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
10488 (define-public python-mpmath
10490 (name "python-mpmath")
10494 (uri (git-reference
10495 (url "https://github.com/fredrik-johansson/mpmath")
10496 (commit "c6a35f9ee7c294bcf4e0517bc76b268843db9499")))
10497 (file-name (git-file-name name version))
10500 "0ifw59fjjls3mas104rh0frilvab2fhk1dkjraxlqni5n9l676im"))))
10501 (build-system python-build-system)
10504 (modify-phases %standard-phases
10505 (add-before 'build 'set-version
10507 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
10508 ;; ZIP does not support timestamps before 1980.
10509 (setenv "SOURCE_DATE_EPOCH" "315532800")))
10511 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10513 (add-installed-pythonpath inputs outputs)
10514 (invoke "pytest" "-vv")))))))
10516 (list python-pytest python-setuptools-scm))
10517 (home-page "https://mpmath.org")
10518 (synopsis "Arbitrary-precision floating-point arithmetic in python")
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)))
10525 (define-public python2-mpmath
10526 (package-with-python2 python-mpmath))
10528 (define-public python-bigfloat
10530 (name "python-bigfloat")
10535 (uri (pypi-uri "bigfloat" version))
10537 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
10538 (build-system python-build-system)
10541 (home-page "https://github.com/mdickinson/bigfloat")
10542 (synopsis "Arbitrary precision floating-point arithmetic for Python")
10544 "This package provides a Python interface to the MPFR library for
10545 multiprecision arithmetic.")
10546 (license license:lgpl3+)))
10548 (define-public python-plac
10550 (name "python-plac")
10555 (uri (pypi-uri "plac" version))
10557 (base32 "1410h6jw1ksi24kb55xzkwqzba2qqjwiga1s354bf3s5s1jdig9q"))))
10558 (build-system python-build-system)
10561 (modify-phases %standard-phases
10562 (add-after 'unpack 'fix-tkinter
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")))))))
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)))
10577 (define-public python-yte
10579 (name "python-yte")
10584 (uri (pypi-uri "yte" version))
10586 (base32 "07hm1warpqi4ifqgkaz5sg887x4a44yhxafmpf835ywnpchg4s03"))))
10587 (build-system python-build-system)
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")
10597 "This package provides a YAML template engine with Python expressions.")
10598 (license license:expat)))
10600 (define-public python-sympy
10602 (name "python-sympy")
10607 (uri (pypi-uri "sympy" version))
10609 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
10610 (build-system python-build-system)
10613 (modify-phases %standard-phases
10615 (lambda* (#:key outputs #:allow-other-keys)
10617 (or (which "python3") (which "python"))
10618 "-c" "import sympy; sympy.test(\"/core\")"))))))
10620 (list python-mpmath))
10621 (home-page "https://www.sympy.org/")
10622 (synopsis "Python library for symbolic mathematics")
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)))
10629 (define-public python2-sympy
10631 (inherit (package-with-python2 python-sympy))
10632 (version "1.5.1") ; last release for python2
10636 (uri (pypi-uri "sympy" version))
10638 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
10640 (define-public python-q
10647 (uri (pypi-uri "q" version))
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")
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)))
10660 (define-public python2-q
10661 (package-with-python2 python-q))
10663 (define-public python-xlib
10665 (name "python-xlib")
10670 (uri (git-reference
10671 (url "https://github.com/python-xlib/python-xlib")
10673 (file-name (git-file-name name version))
10675 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
10676 (build-system python-build-system)
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")
10689 (list python-mock python-setuptools-scm xorg-server))
10692 (home-page "https://github.com/python-xlib/python-xlib")
10693 (synopsis "Python X11 client library")
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+)))
10700 (define-public python2-xlib
10701 (package-with-python2 python-xlib))
10703 (define-public python-singledispatch
10705 (name "python-singledispatch")
10706 (version "3.4.0.3")
10710 (uri (pypi-uri "singledispatch" version))
10713 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
10714 (build-system python-build-system)
10716 (list python-six)) ; required for conversion, not at run-time
10718 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
10719 (synopsis "Backport of singledispatch feature from Python 3.4")
10721 "This library brings functools.singledispatch from Python 3.4 to Python
10723 (license license:expat)))
10725 (define-public python2-singledispatch
10726 (package-with-python2 python-singledispatch))
10728 ;; the python- version can be removed with python-3.5
10729 (define-public python-backports-abc
10731 (name "python-backports-abc")
10736 (uri (pypi-uri "backports_abc" version))
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")
10744 "Python-backports-abc provides a backport of additions to the
10745 @code{collections.abc} module in Python-3.5.")
10746 (license license:psfl)))
10748 (define-public python2-backports-abc
10749 (package-with-python2 python-backports-abc))
10751 (define-public python-backports-csv
10753 (name "python-backports-csv")
10758 (uri (pypi-uri "backports.csv" version))
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")
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)))
10772 (define-public python2-backports-csv
10774 (inherit (package-with-python2 python-backports-csv))
10777 (modify-phases %standard-phases
10778 ;; The sanity-check attempts attempts to import the non-existent
10779 ;; module "backports".
10780 (delete 'sanity-check))))))
10782 (define-public python2-backports-shutil-get-terminal-size
10784 (name "python2-backports-shutil-get-terminal-size")
10789 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
10792 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
10793 (build-system python-build-system)
10795 `(#:python ,python-2
10797 (modify-phases %standard-phases
10800 (invoke "py.test" "-v"))))))
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}")
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)))
10812 (define-public python-waf
10814 (name "python-waf")
10818 (uri (string-append "https://waf.io/"
10819 "waf-" version ".tar.bz2"))
10822 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
10823 (build-system python-build-system)
10826 (modify-phases %standard-phases
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 ","))))))
10837 (invoke "python" "waf" "--version")))
10839 (lambda* (#:key outputs #:allow-other-keys)
10840 (let ((out (assoc-ref outputs "out")))
10841 (install-file "waf" (string-append out "/bin")))
10843 ;; waf breaks when it is wrapped.
10845 (home-page "https://waf.io/")
10846 (synopsis "Python-based build system")
10848 "Waf is a Python-based framework for configuring, compiling and installing
10850 (license license:bsd-3)))
10852 (define-public python2-waf
10853 (package-with-python2 python-waf))
10855 (define-public python-pyzmq
10857 (name "python-pyzmq")
10862 (uri (pypi-uri "pyzmq" version))
10864 (base32 "0737kizh53n4rjq1xbm6nhr0bq65xflg04i1d8fcky0nwwrw1pcf"))))
10865 (build-system python-build-system)
10867 `(#:configure-flags
10868 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
10870 (modify-phases %standard-phases
10871 (add-before 'check 'build-extensions
10873 ;; Cython extensions have to be built before running the tests.
10874 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
10878 (list pkg-config python-cython python-pytest))
10879 (home-page "https://github.com/zeromq/pyzmq")
10880 (synopsis "Python bindings for 0MQ")
10882 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
10883 (license license:bsd-4)))
10885 (define-public python-immutabledict
10887 (name "python-immutabledict")
10892 (uri (pypi-uri "immutabledict" version))
10894 (base32 "0fpc4gbk7inpfbgdypsg6c18bmdjw8gwx47bjw0hvixn3gghxnqx"))))
10895 (build-system python-build-system)
10897 `(#:tests? #f)) ; no tests in PyPI release and no setup.py in GitHub
10899 (list python-pytest))
10900 (home-page "https://github.com/corenting/immutabledict")
10901 (synopsis "Immutable wrapper around dictionaries")
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)))
10908 (define-public python-emoji
10910 (name "python-emoji")
10915 (uri (pypi-uri "emoji" version))
10917 (base32 "0923mpixwq6hdpkgvi4r46alfvf608iq975rb8lnqpq29j71mmjk"))))
10918 (build-system python-build-system)
10921 (modify-phases %standard-phases
10923 (lambda* (#:key tests? #:allow-other-keys)
10925 (invoke "python" "-m" "pytest")))))))
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)))
10935 (define-public python-sarge
10937 (name "python-sarge")
10938 (version "0.1.7.post1") ; post release only to correct errors in metadata
10942 (uri (pypi-uri "sarge" version))
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)))
10952 (define-public python-zipstream-new
10954 (name "python-zipstream-new")
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))
10964 (base32 "14vhgg8mcjqi8cpzrw8qzbij2fr2a63l2a8fhil21k2r8vzv92cv"))))
10965 (build-system python-build-system)
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)))
10979 (define-public python-sentry-sdk
10981 (name "python-sentry-sdk")
10985 (method git-fetch) ; no tests in PyPI release
10986 (uri (git-reference
10987 (url "https://github.com/getsentry/sentry-python")
10989 (file-name (git-file-name name version))
10991 (base32 "128bm136l5zprr3sqqb8j3d6k5i1fhz853mzvh3w8g0w1dw763mx"))))
10992 (build-system python-build-system)
10995 (modify-phases %standard-phases
10997 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10999 (add-installed-pythonpath inputs outputs)
11000 (invoke "python" "-m" "pytest" "-k"
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"))))))))
11022 (list python-django
11030 python-pytest-django
11031 python-pytest-forked
11032 python-pytest-localserver
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)))
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.
11047 (name "python-pep8")
11052 (uri (pypi-uri "pep8" version))
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")
11061 "This tools checks Python code against some of the style conventions in
11063 (license license:expat)))
11065 (define-public python2-pep8
11066 (package-with-python2 python-pep8))
11068 (define-public python-pep8-naming
11070 (name "python-pep8-naming")
11075 (uri (pypi-uri "pep8-naming" version))
11078 "04kyh9hkpyc8jzj16d1kkk29b5n8miqdvbs0zm035n1z5z5kx6hz"))))
11079 (build-system python-build-system)
11081 (list python-flake8 python-flake8-polyfill))
11082 (home-page "https://github.com/PyCQA/pep8-naming")
11083 (synopsis "Check PEP-8 naming conventions")
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)))
11089 (define-public python-pep517
11091 (inherit python-pep517-bootstrap)
11092 (name "python-pep517")
11095 (modify-phases %standard-phases
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")
11105 (list python-mock python-pytest python-testpath))
11106 (properties `((python2-variant . ,(delay python2-pep517))))))
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")
11116 ,@(package-arguments base)))
11117 (native-inputs `()))))
11119 (define-public python-pep621
11121 (name "python-pep621")
11126 (uri (git-reference
11127 (url "https://github.com/FFY00/python-pep621")
11129 (file-name (git-file-name name version))
11132 "0nzig7bmzf0xx5svxlf065mrzihr0ci4p1yaxka9flqjba98flpr"))))
11133 (build-system python-build-system)
11137 #~(modify-phases %standard-phases
11138 ;; XXX: PEP 517 manual build/install procedures copied from
11142 ;; ZIP does not support timestamps before 1980.
11143 (setenv "SOURCE_DATE_EPOCH" "315532800")
11144 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
11146 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11148 (invoke "pytest" "-vv"
11149 ;; Two parameterized test_load tests are currently
11151 ;; https://github.com/FFY00/python-pep621/issues/14).
11152 "-k" "not test_load"))))
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)))
11169 (define-public python-pyflakes
11171 (name "python-pyflakes")
11176 (uri (pypi-uri "pyflakes" version))
11179 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
11180 (build-system python-build-system)
11181 (home-page "https://github.com/PyCQA/pyflakes")
11182 (synopsis "Passive checker of Python programs")
11184 "Pyflakes statically checks Python source code for common errors.")
11185 (license license:expat)))
11187 (define-public python2-pyflakes
11188 (package-with-python2 python-pyflakes))
11190 (define-public python-pyflakes-2.2
11192 (inherit python-pyflakes)
11196 (uri (pypi-uri "pyflakes" version))
11199 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))
11201 (search-patches "python-pyflakes-test-location.patch"))))))
11203 (define-public python-mccabe
11205 (name "python-mccabe")
11210 (uri (pypi-uri "mccabe" version))
11213 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
11214 (build-system python-build-system)
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)))
11223 (define-public python2-mccabe
11224 (package-with-python2 python-mccabe))
11226 (define-public python-flake8
11228 (name "python-flake8")
11232 (uri (pypi-uri "flake8" version))
11235 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
11236 (build-system python-build-system)
11239 (modify-phases %standard-phases
11241 (lambda* (#:key inputs outputs #:allow-other-keys)
11242 (add-installed-pythonpath inputs outputs)
11243 (invoke "pytest" "-v"))))))
11245 (list python-pycodestyle python-entrypoints python-pyflakes
11248 (list python-mock python-pytest))
11249 (home-page "https://gitlab.com/pycqa/flake8")
11251 "The modular source code checker: pep8, pyflakes and co")
11253 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
11254 (properties `((python2-variant . ,(delay python2-flake8))))
11255 (license license:expat)))
11257 (define-public python2-flake8
11258 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
11259 (package/inherit base
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))))))
11267 (define-public python-flake8-3.8
11269 (inherit python-flake8)
11273 (uri (pypi-uri "flake8" version))
11276 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
11278 (list python-pycodestyle-2.6 python-entrypoints python-pyflakes-2.2
11281 (define-public python-flake8-bugbear
11283 (name "python-flake8-bugbear")
11288 (uri (pypi-uri "flake8-bugbear" version))
11291 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
11292 (build-system python-build-system)
11295 (modify-phases %standard-phases
11296 (add-before 'check 'disable-test
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")))))))
11303 (list python-hypothesis python-hypothesmith))
11305 (list python-attrs python-flake8))
11306 (home-page "https://github.com/PyCQA/flake8-bugbear")
11308 "Flake8 plugin for finding likely bugs and design problems in your program")
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)))
11315 (define-public python-flake8-continuation
11317 (name "python-flake8-continuation")
11322 (uri (pypi-uri "flake8-continuation" version))
11325 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
11326 (build-system python-build-system)
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:
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.
11339 (license license:asl2.0)))
11341 (define-public python-flake8-implicit-str-concat
11343 (name "python-flake8-implicit-str-concat")
11348 (uri (pypi-uri "flake8_implicit_str_concat" version))
11350 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
11351 (build-system python-build-system)
11353 '(#:tests? #f ;no tests
11354 #:phases (modify-phases %standard-phases
11355 (add-after 'unpack 'loosen-requirements
11357 ;; Permit newer versions of attrs. Remove for >0.2.
11358 (substitute* "setup.py"
11359 ((", <21") "")))))))
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")
11365 "This is a plugin for the Python code checking tool Flake8 to encourage
11366 correct string literal concatenation.
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)))
11373 (define-public python-flake8-polyfill
11375 (name "python-flake8-polyfill")
11380 (uri (pypi-uri "flake8-polyfill" version))
11383 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
11384 (build-system python-build-system)
11387 (modify-phases %standard-phases
11390 ;; Be compatible with Pytest 4:
11391 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
11392 (substitute* "setup.cfg"
11395 (invoke "py.test" "-v"))))))
11397 (list python-flake8))
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")
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)))
11407 (define-public python2-flake8-polyfill
11408 (package-with-python2 python-flake8-polyfill))
11410 (define-public python-flake8-print
11412 (name "python-flake8-print")
11417 (uri (pypi-uri "flake8-print" version))
11419 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
11420 (build-system python-build-system)
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")
11426 "This plugin for Flake8 checks for @code{print} statements in Python
11428 (license license:expat)))
11430 (define-public python-flake8-pyi
11432 (name "python-flake8-pyi")
11433 (version "20.10.0")
11437 (uri (pypi-uri "flake8-pyi" version))
11440 "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
11441 (build-system python-build-system)
11443 (list python-attrs python-flake8 python-pyflakes))
11444 (home-page "https://github.com/ambv/flake8-pyi")
11446 "Flake8 plugin that provides specializations for type hinting stub files")
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)))
11458 (define-public python-flake8-pie
11460 (name "python-flake8-pie")
11465 (uri (pypi-uri "flake8-pie" version))
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")
11472 "This package provides a flake8 extension that implements miscellaneous
11474 (license license:bsd-2)))
11476 (define-public python-flake8-quotes
11478 (name "python-flake8-quotes")
11483 (uri (pypi-uri "flake8-quotes" version))
11486 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
11487 (build-system python-build-system)
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)))
11495 (define-public python-flake8-todo
11497 (name "python-flake8-todo")
11502 (uri (pypi-uri "flake8-todo" version))
11505 "05arm0sch3r8248035kilmf01z0mxsahw6vpbbz0d343zy8m8k3f"))))
11506 (build-system python-build-system)
11508 (list python-pycodestyle))
11509 (home-page "https://github.com/schlamar/flake8-todo")
11510 (synopsis "TODO notes checker, plugin for flake8")
11512 "This package provides the @code{flake8-todo} Python module, a
11513 TODO notes checker plugin for flake8.")
11514 (license license:expat)))
11516 (define-public python-flake8-isort
11518 (name "python-flake8-isort")
11523 (uri (pypi-uri "flake8-isort" version))
11525 (base32 "05r7z0j9rqgy0a9261bhisairrz6w8hy5hy5kf2mhvhfnx53056q"))))
11526 (build-system python-build-system)
11530 #~(modify-phases %standard-phases
11532 (lambda* (#:key tests? #:allow-other-keys)
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
11542 (license license:gpl2+)))
11544 (define-public python-autoflake
11546 (name "python-autoflake")
11551 (uri (pypi-uri "autoflake" version))
11553 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
11554 (build-system python-build-system)
11556 (list python-pyflakes))
11557 (home-page "https://github.com/myint/autoflake")
11558 (synopsis "Removes unused imports and unused variables")
11560 "@code{autoflake} removes unused imports and unused variables from Python
11561 code as reported by @code{pyflakes}.
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)))
11568 (define-public python-mistune
11570 (name "python-mistune")
11575 (uri (pypi-uri "mistune" version))
11578 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
11579 (build-system python-build-system)
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
11586 (license license:bsd-3)))
11588 (define-public python2-mistune
11589 (package-with-python2 python-mistune))
11591 ;; 2.0 is not released yet, but some packages have started using it.
11592 (define-public python-mistune-next
11594 (inherit python-mistune)
11595 (name "python-mistune-next")
11596 (version "2.0.0rc1")
11599 (uri (pypi-uri "mistune" version))
11602 "1nd7iav1ixh9hlj4hxn6lmpava88d86ys8rqm30wgvr7gjlxnas5"))))
11603 (native-inputs (list python-nose))))
11605 (define-public python-markdown
11607 (name "python-markdown")
11612 (uri (pypi-uri "Markdown" version))
11615 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
11616 (build-system python-build-system)
11618 (list python-nose python-pyyaml))
11619 (home-page "https://python-markdown.github.io/")
11620 (synopsis "Python implementation of Markdown")
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)))
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))))
11637 (uri (pypi-uri "Markdown" version))
11640 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
11642 (define-public python-ptyprocess
11644 (name "python-ptyprocess")
11649 (uri (pypi-uri "ptyprocess" version))
11652 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
11653 (build-system python-build-system)
11655 (list python-nose))
11658 (modify-phases %standard-phases
11660 (lambda _ (invoke "nosetests"))))))
11661 (home-page "https://github.com/pexpect/ptyprocess")
11662 (synopsis "Run a subprocess in a pseudo terminal")
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)))
11668 (define-public python2-ptyprocess
11669 (package-with-python2 python-ptyprocess))
11671 (define-public python-cram
11673 (name "python-cram")
11675 (home-page "https://bitheap.org/cram/")
11678 (uri (list (string-append home-page "cram-"
11680 (pypi-uri "cram" version)))
11683 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
11686 (modify-phases %standard-phases
11687 (add-after 'unpack 'patch-source
11689 (substitute* (find-files "cram" ".*\\.py$")
11690 ;; Replace default shell path.
11691 (("/bin/sh") (which "sh")))
11692 (substitute* (find-files "tests" ".*\\.t$")
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'"))
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"))
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)
11721 (list python-coverage which))
11722 (synopsis "Simple testing framework for command line applications")
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
11728 (license license:gpl2+)))
11730 (define-public python2-cram
11731 (package-with-python2 python-cram))
11733 (define-public python-crccheck
11735 (name "python-crccheck")
11740 (uri (pypi-uri "crccheck" version))
11742 (base32 "15psg7wjfbpmmry54ffwg6pg63mnv7mkwmb0a7884axnr8qj55j5"))))
11743 (build-system python-build-system)
11747 #~(modify-phases %standard-phases
11749 (lambda* (#:key tests? #:allow-other-keys)
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+)))
11759 (define-public python-crashtest
11761 (name "python-crashtest")
11766 (uri (pypi-uri "crashtest" version))
11768 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
11769 (build-system python-build-system)
11770 (home-page "https://github.com/sdispater/crashtest")
11771 (synopsis "Manage Python errors with ease")
11773 "Python library that makes exceptions handling and inspection easier.")
11774 (license license:expat)))
11776 (define-public python-stdlib-list
11778 (name "python-stdlib-list")
11782 (uri (pypi-uri "stdlib-list" version))
11785 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
11786 (build-system python-build-system)
11788 `(#:tests? #f)) ; Tests require more dependencies.
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)))
11796 (define-public python-stopit
11798 (name "python-stopit")
11803 (uri (pypi-uri "stopit" version))
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")
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)))
11815 (define-public python-straight-plugin
11817 (name "python-straight-plugin")
11822 (uri (pypi-uri "straight.plugin" version))
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)))
11834 (define-public python2-straight-plugin
11835 (package-with-python2 python-straight-plugin))
11837 (define-public python-pysendfile
11839 (name "python-pysendfile")
11844 (uri (pypi-uri "pysendfile" version))
11846 (base32 "05qf0m32isflln1zjgxlpw0wf469lj86vdwwqyizp1h94x5l22ji"))))
11847 (build-system python-build-system)
11850 #:phases #~(modify-phases %standard-phases
11852 (lambda* (#:key tests? #:allow-other-keys)
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)))
11862 (define-public python-pyftpdlib
11864 (name "python-pyftpdlib")
11869 (uri (pypi-uri "pyftpdlib" version))
11871 (base32 "0pnv2byzmzg84q5nmmhn1xafvfil85qa5y52bj455br93zc5b9px"))))
11872 (build-system python-build-system)
11876 #~(modify-phases %standard-phases
11878 (lambda* (#:key tests? #:allow-other-keys)
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
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
11906 It is lightweight, fast and scalable.
11908 It uses the @code{sendfile(2)} system call for uploads.
11910 It uses @code{epoll}, @code{kqueue} and @code{select} to handle concurrency
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).
11917 It has a flexible system of @samp{authorizers} able to manage both
11918 @samp{virtual} and @samp{real} users.
11920 (license license:expat)))
11922 (define-public python-fs
11929 (uri (pypi-uri "fs" version))
11931 (base32 "0v5kqzi0vd8ar4j4qf5440nzwa9dcagpxb3q6k0cln4cqlmxqmcm"))))
11932 (build-system python-build-system)
11935 #:phases #~(modify-phases %standard-phases
11937 (lambda* (#:key tests? #:allow-other-keys)
11939 (setenv "HOME" "/tmp")
11940 (invoke "pytest" "-m" "not slow")))))))
11942 (list python-appdirs python-pytz python-six))
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)))
11954 ;;; Tests are left out in the main package to avoid cycles.
11955 (define-public python-fonttools
11958 (name "python-fonttools")
11962 (uri (pypi-uri "fonttools" version ".zip"))
11965 "1jhl5n3rfqq7fznvsh6r80n7ylap1a7ppq1040y8cflhyz80ap2l"))))
11966 (build-system python-build-system)
11969 (arguments '(#:tests? #f))
11970 (home-page "https://github.com/fonttools/fonttools")
11971 (synopsis "Tools to manipulate font files")
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)))))))
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
11986 (substitute-keyword-arguments (package-arguments python-fonttools)
11989 ((#:phases phases '%standard-phases)
11990 `(modify-phases ,phases
11992 (lambda* (#:key tests? #:allow-other-keys)
11994 (invoke "pytest" "-vv"
11996 ;; XXX: These tests need .trm files that are
11997 ;; not shipped with the PyPI release.
11998 (format #f "not ~a"
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 "))))))))))
12007 (modify-inputs (package-native-inputs python-fonttools)
12008 (append python-pytest)))
12010 (list python-brotli
12015 python-unicodedata2
12017 (properties (alist-delete 'hidden? (package-properties python-fonttools)))))
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))))
12027 (uri (pypi-uri "fonttools" version ".zip"))
12030 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
12032 (define-public python-fonttools-next
12034 (inherit python-fonttools-full)
12037 (inherit (package-source python-fonttools-full))
12039 (uri (pypi-uri "fonttools" version ".zip"))
12042 "14nk43z0dmznypm3zp4sdc04x1y608jawlnmwdkk32a947khvaar"))))))
12044 (define-public python-ly
12051 (uri (pypi-uri name version))
12054 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
12055 (build-system python-build-system)
12057 ;; FIXME: Some tests need network access.
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+)))
12066 (define-public python-appdirs
12068 (name "python-appdirs")
12073 (uri (pypi-uri "appdirs" version))
12076 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
12077 (build-system python-build-system)
12078 (home-page "https://github.com/ActiveState/appdirs")
12080 "Determine platform-specific dirs, e.g. a \"user data dir\"")
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)))
12086 (define-public python2-appdirs
12087 (package-with-python2 python-appdirs))
12089 (define-public python-gorilla
12091 (name "python-gorilla")
12095 (uri (pypi-uri "gorilla" version))
12098 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
12099 (build-system python-build-system)
12100 (home-page "https://github.com/christophercrouzet/gorilla")
12101 (synopsis "Convenient monkey patching with Python")
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)))
12109 (define-public python-llfuse
12111 (name "python-llfuse")
12115 (uri (pypi-uri "llfuse" version))
12118 "1jaf790rsxvz3hs9fbr3hrnmg0xzl6a2bqfa10bbbsjsdbcpk762"))))
12119 (build-system python-build-system)
12123 (list pkg-config python-pytest))
12124 (synopsis "Python bindings for FUSE")
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+)))
12130 (define-public python-msgpack
12132 (name "python-msgpack")
12136 (uri (pypi-uri "msgpack" version))
12139 "07m84yisf8m6gr68ip9v6vzxax7kqbn8qxg7ir18clk1jgxwgzai"))))
12140 (build-system python-build-system)
12142 `(#:modules ((guix build utils)
12143 (guix build python-build-system)
12148 (modify-phases %standard-phases
12151 (invoke "pytest" "-v" "test"))))))
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)))
12161 (define-public python-msgpack-1.0.2
12163 (inherit python-msgpack)
12167 (uri (pypi-uri "msgpack" version))
12170 "1109s2yynrahwi64ikax68hx0mbclz8p35afmpphw5dwynb49q7s"))))))
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
12177 (inherit python-msgpack)
12178 (name "python-msgpack-transitional")
12182 (uri (pypi-uri "msgpack" version))
12185 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
12187 (substitute-keyword-arguments (package-arguments python-msgpack)
12189 `(modify-phases ,phases
12190 (add-after 'unpack 'configure-transitional
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("))
12203 (define-public python2-msgpack
12204 (package-with-python2 python-msgpack))
12206 (define-public python-netaddr
12208 (name "python-netaddr")
12213 (uri (pypi-uri "netaddr" version))
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")
12222 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
12223 and MAC network addresses.")
12224 (license license:bsd-3)))
12226 (define-public python2-netaddr
12227 (package-with-python2 python-netaddr))
12229 (define-public python2-pyroute2
12231 (name "python2-pyroute2")
12236 (uri (pypi-uri "pyroute2" version))
12239 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
12240 (build-system python-build-system)
12242 `(#:python ,python-2)) ;Python 3.x is not supported
12243 (home-page "https://github.com/svinota/pyroute2")
12244 (synopsis "Python netlink library")
12246 "Pyroute2 is a pure Python netlink library with minimal dependencies.
12247 Supported netlink families and protocols include:
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
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
12262 (license license:gpl2+)))
12264 (define-public python-wrapt
12266 (name "python-wrapt")
12271 (uri (pypi-uri "wrapt" version))
12274 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
12275 (build-system python-build-system)
12277 ;; Tests are not included in the tarball, they are only available in the
12280 (home-page "https://github.com/GrahamDumpleton/wrapt")
12281 (synopsis "Module for decorators, wrappers and monkey patching")
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)))
12288 (define-public python2-wrapt
12289 (package-with-python2 python-wrapt))
12291 (define-public python-commentjson
12293 (name "python-commentjson")
12296 ;; The PyPI release is missing some test files.
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))
12304 "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
12305 (build-system python-build-system)
12307 `(#:modules ((guix build python-build-system)
12310 (ice-9 textual-ports))
12312 (modify-phases %standard-phases
12313 (add-after 'unpack 'relax-requirements
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;
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)
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)))))))))
12335 (list python-lark-parser))
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)))
12345 (define-public python-resolvelib
12347 (name "python-resolvelib")
12351 ;; Tests are missing from the PyPI release.
12353 (uri (git-reference
12354 (url "https://github.com/sarugaku/resolvelib")
12356 (file-name (git-file-name name version))
12359 "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
12360 (build-system python-build-system)
12363 (modify-phases %standard-phases
12365 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12367 (add-installed-pythonpath inputs outputs)
12368 (invoke "pytest")))))))
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)))
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")
12385 (uri (git-reference
12386 (url "https://github.com/sarugaku/resolvelib")
12388 (file-name (git-file-name name version))
12391 "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
12393 (define-public python-commonmark
12395 (name "python-commonmark")
12400 (uri (pypi-uri "commonmark" version))
12402 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
12403 (build-system python-build-system)
12406 (modify-phases %standard-phases
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")
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
12417 (license license:bsd-3)))
12419 (define-public python-xlrd
12421 (name "python-xlrd")
12424 ;; The tests are not included in the PyPI archive.
12426 (uri (git-reference
12427 (url "https://github.com/python-excel/xlrd")
12429 (file-name (git-file-name name version))
12432 "170asszffvf6rh5w169ic4h5kxgjkmdl3060vw737d4g1qfifvzz"))))
12433 (build-system python-build-system)
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)))
12444 (define-public python2-xlrd
12445 (package-with-python2 python-xlrd))
12447 ;;; Note: this package is unmaintained since 2018 (archived on GitHub).
12448 (define-public python-xlwt
12450 (name "python-xlwt")
12455 (uri (pypi-uri "xlwt" version))
12457 (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
12458 (build-system python-build-system)
12461 (modify-phases %standard-phases
12463 (lambda* (#:key tests? #:allow-other-keys)
12465 (setenv "GUIX_PYTHONPATH"
12466 (string-append (getcwd) "/build/lib:"
12467 (getenv "GUIX_PYTHONPATH")))
12468 (invoke "nosetests" "-v")))))))
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)))
12479 (define-public python-immutables
12481 (name "python-immutables")
12486 (uri (pypi-uri "immutables" version))
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")
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)))
12498 (define-public python-prettytable
12500 (name "python-prettytable")
12505 (uri (pypi-uri "prettytable" version ".tar.bz2"))
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")
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)))
12519 (define-public python2-prettytable
12520 (package-with-python2 python-prettytable))
12522 (define-public python-curio
12524 (name "python-curio")
12529 (uri (pypi-uri "curio" version))
12531 (base32 "045wwg16qadsalhicbv21p14sj8i4w0l57639j7dmdqbb4p2225g"))))
12532 (build-system python-build-system)
12535 (modify-phases %standard-phases
12537 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12539 (add-installed-pythonpath inputs outputs)
12540 (invoke "pytest" "-vv" "-k"
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"))))))))
12548 (list python-pytest))
12549 (home-page "https://github.com/dabeaz/curio")
12550 (synopsis "Coroutine-based library for concurrent Python")
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)))
12557 (define-public python-tables
12559 (name "python-tables")
12564 (uri (pypi-uri "tables" version))
12567 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
12568 (modules '((guix build utils)))
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$"))
12576 (build-system python-build-system)
12578 `(;; FIXME: python-build-system does not pass configure-flags to "build"
12579 ;; or "check", so we must override the build and check phases.
12581 (modify-phases %standard-phases
12582 (add-after 'unpack 'use-gcc
12584 (substitute* "setup.py"
12585 (("^( +)compiler = new_compiler\\(\\)" line indent)
12586 (string-append line
12589 "compiler.set_executables(compiler='gcc',"
12590 "compiler_so='gcc',"
12591 "linker_exe='gcc',"
12592 "linker_so='gcc -shared')")))
12594 (add-after 'unpack 'disable-tuning
12596 (substitute* "setup.py"
12597 (("cpu_flags = .*")
12598 "cpu_flags = ['sse2']\n"))
12601 (lambda* (#:key inputs #:allow-other-keys)
12602 (invoke "python" "setup.py" "build"
12603 (string-append "--hdf5="
12604 (assoc-ref inputs "hdf5")))))
12606 (lambda* (#:key inputs #:allow-other-keys)
12607 (invoke "python" "setup.py" "check"
12608 (string-append "--hdf5="
12609 (assoc-ref inputs "hdf5"))))))))
12611 (list python-numexpr python-numpy))
12613 (list python-cython pkg-config))
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)))
12622 (define-public python-sniffio
12624 (name "python-sniffio")
12629 (uri (pypi-uri "sniffio" version))
12631 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
12632 (build-system python-build-system)
12635 (modify-phases %standard-phases
12638 (invoke "pytest" "-vv"))))))
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
12646 ;; Either license applies.
12647 (license (list license:expat license:asl2.0))))
12649 (define-public python-pytest-black
12651 (name "python-pytest-black")
12656 (uri (pypi-uri "pytest-black" version))
12659 "19bmbcnaq02md8nnj6pywri3vps8sxnhysbfy386qkbn9w09ncqx"))))
12660 (build-system python-build-system)
12662 (list python-pytest python-black python-toml))
12664 (list python-setuptools-scm))
12665 (home-page "https://github.com/shopkeep/pytest-black")
12666 (synopsis "Pytest plugin to enable format checking with black")
12668 "This package provides a pytest plugin to enable format checking with the
12669 Python code formatter \"black\".")
12670 (license license:expat)))
12672 (define-public python-geojson
12674 (name "python-geojson")
12679 (uri (pypi-uri "geojson" version))
12681 (base32 "12k5bzqskvq3gqzkryarhdjl0df47y5k9cf8r3clasi2wjnbfjvf"))))
12682 (build-system python-build-system)
12684 ;; https://github.com/jazzband/geojson/issues/175
12686 (home-page "https://github.com/jazzband/geojson")
12687 (synopsis "Python bindings and utilities for GeoJSON")
12689 "This package provides Python bindings and utilities for
12690 @uref{http://geojson.org/, GeoJSON}, a format for encoding geographic data
12692 (license license:bsd-3)))
12694 (define-public wfetch
12695 (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715")
12699 (version (git-version "0.1-pre" revision commit))
12700 (home-page "https://github.com/Gcat101/Wfetch")
12704 (uri (git-reference (url home-page)
12706 (file-name (git-file-name name version))
12708 (base32 "1dmr85plx8zr6s14ym3r32g6crwxghkval5a24ah90ijx4dbn5q5"))))
12709 (build-system python-build-system)
12711 `(#:use-setuptools? #f ; no setup.py
12712 #:tests? #f ; no test suite
12714 (modify-phases %standard-phases
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")))
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")
12729 "This package provides a tool similar to Neofetch/pfetch, but for
12730 weather: it can display the weather condition, temperature, humidity, etc.
12732 To use it, you must first run:
12735 export WEATHER_CLI_API=@var{your OpenWeatherMap API key}
12737 (license license:gpl3+))))
12739 (define-public python-get-version
12741 (name "python-get-version")
12746 (uri (pypi-uri "get_version" version))
12749 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
12750 (build-system python-build-system)
12752 (list python-pygments
12754 python-pytest-black
12758 (home-page "https://github.com/flying-sheep/get_version")
12759 (synopsis "Version helper in the spirit of versioneer")
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+)))
12768 (define-public python-filetype
12770 (name "python-filetype")
12775 (uri (pypi-uri "filetype" version))
12777 (base32 "05mkinkcn36v1cnb5hzay3zxmv7jmmflckxxp08rgzbkkf3i9pvp"))))
12778 (build-system python-build-system)
12781 (modify-phases %standard-phases
12783 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12785 (add-installed-pythonpath inputs outputs)
12786 (invoke "python" "-m" "pytest" "-k"
12788 ;; Both tests fail with FileNotFoundError.
12789 "not test_infer_zip_from_disk"
12790 " and not test_infer_tar_from_disk"))))))))
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)))
12800 (define-public python-cachelib
12802 (name "python-cachelib")
12807 (uri (pypi-uri "cachelib" version))
12809 (base32 "0p4chkvbvffcllsny5rpzmsq2vyr24ql3kzif4ha0fxp3fp7vqk8"))))
12810 (build-system python-build-system)
12813 (modify-phases %standard-phases
12815 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12817 (add-installed-pythonpath inputs outputs)
12818 (invoke "pytest")))))))
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)))
12827 (define-public python-pylru
12829 (name "python-pylru")
12834 (uri (pypi-uri "pylru" version))
12836 (base32 "15yj46307sw703vjfkgnr04dqvaicmfcj0hc6yrciildp55r6bs9"))))
12837 (build-system python-build-system)
12840 (modify-phases %standard-phases
12842 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
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")
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+)))
12856 (define-public python-legacy-api-wrap
12858 (name "python-legacy-api-wrap")
12863 (uri (pypi-uri "legacy-api-wrap" version))
12866 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
12867 (build-system python-build-system)
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+)))
12877 (define-public python-langdetect
12879 (name "python-langdetect")
12884 (uri (pypi-uri "langdetect" version))
12886 (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
12887 (build-system python-build-system)
12890 (home-page "https://github.com/Mimino666/langdetect")
12891 (synopsis "Language detection library")
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)))
12897 (define-public python-pyasn1
12899 (name "python-pyasn1")
12904 (uri (pypi-uri "pyasn1" version))
12907 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
12908 (build-system python-build-system)
12909 (home-page "http://pyasn1.sourceforge.net/")
12910 (synopsis "ASN.1 types and codecs")
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)))
12916 (define-public python2-pyasn1
12917 (package-with-python2 python-pyasn1))
12919 (define-public python-pyasn1-modules
12921 (name "python-pyasn1-modules")
12926 (uri (pypi-uri "pyasn1-modules" version))
12929 "0pp6dcagd8c2c9qx3lahc1rdwlnmm0y0siqr5icjq2r32b3q8pwh"))))
12930 (build-system python-build-system)
12932 (list python-pyasn1))
12933 (home-page "https://sourceforge.net/projects/pyasn1/")
12934 (synopsis "ASN.1 codec implementations")
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)))
12940 (define-public python2-pyasn1-modules
12941 (package-with-python2 python-pyasn1-modules))
12943 (define-public python-ipaddress
12945 (name "python-ipaddress")
12949 (uri (pypi-uri "ipaddress" version))
12952 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
12953 (build-system python-build-system)
12954 (home-page "https://github.com/phihag/ipaddress")
12955 (synopsis "IP address manipulation library")
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)))
12962 (define-public python2-ipaddress
12963 (package-with-python2 python-ipaddress))
12965 (define-public python-asn1tools
12967 (name "python-asn1tools")
12968 (version "0.158.0")
12972 (uri (pypi-uri "asn1tools" version))
12974 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
12975 (build-system python-build-system)
12977 (list python-bitstruct python-diskcache python-prompt-toolkit
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)))
12987 (define-public python2-ipaddr
12989 (name "python2-ipaddr")
12994 (uri (pypi-uri "ipaddr" version))
12996 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
12997 (build-system python-build-system)
12999 `(#:python ,python-2 ;version 2 only
13001 (modify-phases %standard-phases
13003 (lambda _ (invoke "python" "ipaddr_test.py"))))))
13004 (home-page "https://github.com/google/ipaddr-py")
13005 (synopsis "IP address manipulation library")
13007 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
13008 IPv6 addresses and networks.
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)))
13015 (define-public python-idna
13017 (name "python-idna")
13022 (uri (pypi-uri "idna" version))
13025 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
13026 (build-system python-build-system)
13027 (home-page "https://github.com/kjd/idna")
13028 (synopsis "Internationalized domain names in applications")
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
13037 (license license:bsd-4)))
13039 (define-public python2-idna
13040 (package-with-python2 python-idna))
13042 (define-public python-libsass
13044 (name "python-libsass")
13048 ;; PyPI tarball is missing some test files.
13050 (uri (git-reference
13051 (url "https://github.com/sass/libsass-python")
13053 (file-name (git-file-name name version))
13055 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
13056 (build-system python-build-system)
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")))
13064 (lambda* (#:key tests? #:allow-other-keys)
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
13072 (delete-file (string-append
13073 (assoc-ref outputs "out")
13077 (search-input-file inputs "bin/python"))))
13078 "/site-packages/sasstests.py")))))))
13080 (list python-pytest python-werkzeug))
13085 (home-page "https://sass.github.io/libsass-python/")
13086 (synopsis "Straightforward binding of libsass for Python")
13088 "This package provides a simple Python extension module @code{sass} which
13089 is binding LibSass.")
13090 (license license:expat)))
13092 (define-public python-idna-ssl
13094 (name "python-idna-ssl")
13099 (uri (pypi-uri "idna-ssl" version))
13102 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
13103 (build-system python-build-system)
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)
13111 (license license:expat)))
13113 ;;; Variant used to break a cycle with python-pip-run-bootstrap.
13114 (define-public python-path-bootstrap
13117 (name "python-path-bootstrap")
13122 (uri (pypi-uri "path" version))
13124 (base32 "0lig13gxnfv98v790db1smvsbd3mnj7y8rwyiwhfi6xiqibygwms"))))
13125 (build-system python-build-system)
13130 #~(modify-phases %standard-phases
13131 ;; XXX: PEP 517 manual build/install procedures copied from
13135 ;; ZIP does not support timestamps before 1980.
13136 (setenv "SOURCE_DATE_EPOCH" "315532800")
13137 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
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))))
13151 (define-public python-path
13152 (package/inherit python-path-bootstrap
13153 (name "python-path")
13155 (substitute-keyword-arguments
13156 (package-arguments python-path-bootstrap)
13159 ((#:phases phases #~%standard-phases)
13160 #~(modify-phases #$phases
13162 (lambda* (#:key tests? #:allow-other-keys)
13164 ;; Do not test the myproject.toml build as it tries to pull
13165 ;; dependencies from the Internet.
13166 (invoke "pytest" "-vv" "-k"
13169 ;; This tests assumes a root user exists.
13170 "and not test_get_owner")))))))))
13172 (modify-inputs (package-native-inputs python-path-bootstrap)
13173 (append python-appdirs
13177 python-pytest-black
13178 python-pytest-checkdocs
13180 python-pytest-enabler
13181 python-pytest-flake8
13182 python-pytest-mypy)))
13183 (properties (alist-delete 'hidden?
13184 (package-properties
13185 python-path-bootstrap)))))
13187 (define-public python-pathpy
13188 (deprecated-package "python-pathpy" python-path))
13190 (define-public python-pretend
13192 (name "python-pretend")
13197 (uri (pypi-uri "pretend" version))
13200 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
13201 (build-system python-build-system)
13202 (home-page "https://github.com/alex/pretend")
13203 (synopsis "Library for stubbing in Python")
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)))
13211 (define-public python2-pretend
13212 (package-with-python2 python-pretend))
13214 (define-public python-pip
13216 (name "python-pip")
13221 (uri (pypi-uri "pip" version))
13224 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
13225 (build-system python-build-system)
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")
13231 "Pip is a package manager for Python software, that finds packages on the
13232 Python Package Index (PyPI).")
13233 (license license:expat)))
13235 (define-public python2-pip
13236 (package-with-python2 python-pip))
13238 ;;; Variant used to break a dependency cycle with
13239 ;;; python-pytest-perf-bootstrap.
13240 (define-public python-pip-run-bootstrap
13243 (name "python-pip-run-bootstrap")
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))
13253 "0ycrjj3jgqcr9c2k7y8vprq65iblg0q0hvwz8zwi13gmb0ffds0c"))))
13254 (build-system python-build-system)
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.
13264 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))))))
13265 (native-inputs (list python-setuptools-scm))
13266 (propagated-inputs (list python-autocommand python-path-bootstrap
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
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 ...
13279 (license license:expat))))
13281 (define-public python-pip-run
13282 (package/inherit python-pip-run-bootstrap
13283 (name "python-pip-run")
13285 (substitute-keyword-arguments (package-arguments python-pip-run-bootstrap)
13288 ((#:phases phases #~%standard-phases)
13289 #~(modify-phases #$phases
13291 (lambda* (#:key tests? #:allow-other-keys)
13293 (invoke "pytest" "-k"
13295 ;; Do not test the myproject.toml build as it tries
13296 ;; to pull dependencies from the internet.
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 ")))))))))
13303 (modify-inputs (package-propagated-inputs python-pip-run-bootstrap)
13304 (replace "python-path-bootstrap" python-path)))
13306 (modify-inputs (package-native-inputs python-pip-run-bootstrap)
13307 (append python-nbformat
13310 python-pytest-black
13311 python-pytest-checkdocs
13313 python-pytest-enabler
13314 python-pytest-flake8
13315 python-pytest-mypy)))
13316 (properties (alist-delete 'hidden? (package-properties
13317 python-pip-run-bootstrap)))))
13319 (define-public python-tlsh
13321 (name "python-tlsh")
13323 (home-page "https://github.com/trendmicro/tlsh")
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))
13332 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
13333 (build-system cmake-build-system)
13335 '(#:out-of-source? #f
13336 #:phases (modify-phases %standard-phases
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")
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
13357 (license license:asl2.0)))
13359 (define-public python2-tlsh
13360 (package/inherit python-tlsh
13361 (name "python2-tlsh")
13362 (inputs `(("python" ,python-2)))))
13364 (define-public python-termcolor
13366 (name "python-termcolor")
13371 (uri (pypi-uri "termcolor" version))
13374 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
13375 (build-system python-build-system)
13377 ;; There are no tests.
13379 (home-page "https://pypi.org/project/termcolor/")
13380 (synopsis "ANSII Color formatting for terminal output")
13382 "This package provides ANSII Color formatting for output in terminals.")
13383 (license license:expat)))
13385 (define-public python2-termcolor
13386 (package-with-python2 python-termcolor))
13388 (define-public python-terminaltables
13390 (name "python-terminaltables")
13395 (uri (pypi-uri "terminaltables" version))
13398 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
13399 (build-system python-build-system)
13400 (home-page "https://github.com/Robpol86/terminaltables")
13402 "Generate simple tables in terminals from a nested list of strings")
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)))
13408 (define-public python-libarchive-c
13410 (name "python-libarchive-c")
13414 (uri (pypi-uri "libarchive-c" version))
13417 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
13418 (build-system python-build-system)
13420 '(#:phases (modify-phases %standard-phases
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'"))))))
13431 (lambda _ (invoke "pytest" "-vv"))))))
13433 (list python-mock python-pytest))
13436 (home-page "https://github.com/Changaco/python-libarchive-c")
13437 (synopsis "Python interface to libarchive")
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+)))
13444 (define-public python2-libarchive-c
13445 (package-with-python2 python-libarchive-c))
13447 (define-public python-file
13448 (package/inherit file
13449 (name "python-file")
13450 (build-system python-build-system)
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
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'")))
13466 (inputs `(("file" ,file)))
13467 (native-inputs (if (%current-target-system)
13468 `(("self" ,this-package))
13470 (synopsis "Python bindings to the libmagic file type guesser")
13471 (description "This package provides Python bindings to the libmagic file
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
13479 (define-public python2-file
13480 (package-with-python2 python-file))
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"))
13488 (name "python-pydevd")
13489 (version (git-version "2.8.0" revision commit))
13493 (uri (git-reference
13494 (url "https://github.com/fabioz/PyDev.Debugger")
13496 (modules '((guix build utils)))
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))
13505 "1yd017dh6xgxrqcyf8kk8jrr0a3zw895yfjih0z5jghyf0rck38q"))))
13506 (build-system python-build-system)
13510 #~(modify-phases %standard-phases
13511 (add-after 'unpack 'fix-tests
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"
13521 (format #f "~s" (search-input-file inputs "bin/kill")))
13523 (format #f "~s" (search-input-file inputs "bin/pgrep"))))))
13524 (add-after 'unpack 'generate-sources
13526 (setenv "PYTHONPATH" (getcwd))
13527 (invoke "python" "build_tools/build.py")))
13528 (add-after 'unpack 'adjust-attach-binary-name
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)
13539 "pydevd_attach_to_process/add_code_to_python_process.py"
13541 (format #f "~s," (search-input-file inputs "bin/gdb"))))))
13542 (add-after 'build 'build-attach-linux-binary
13544 (invoke #+(cxx-for-target) "-shared" "-o" "attach.so"
13545 "-fPIC" "-nostartfiles"
13546 "pydevd_attach_to_process/linux_and_mac/attach.cpp")))
13548 (lambda* (#:key tests? #:allow-other-keys)
13550 (setenv "PYDEVD_USE_CYTHON" "YES")
13551 (invoke "pytest" "-vv"
13552 "-n" (number->string (parallel-job-count))
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
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))))
13569 (list python-cython
13573 python-pytest-xdist
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))))
13583 (define-public python-debugpy
13585 (name "python-debugpy")
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
13597 (snippet '(delete-file-recursively "src/debugpy/_vendored"))
13598 (patches (search-patches "python-debugpy-unbundle-pydevd.patch"))
13601 "1dpfzs3p51648i7f3fz8dw5d0vrj39iwn1jhn0226idc02ybyqih"))))
13602 (build-system python-build-system)
13606 #~(modify-phases %standard-phases
13607 (add-after 'unpack 'patch-sh-in-tests
13609 (substitute* "tests/debugpy/test_run.py"
13611 (string-append "#!" (which "sh"))))))
13612 (add-after 'unpack 'fix-version
13613 ;; Versioneer is useless when there is no git metadata.
13615 (substitute* "setup.py"
13616 (("version=versioneer.get_version\\(),")
13617 (format #f "version=~s," #$version)))))
13618 (add-before 'build 'configure
13620 ;; This adjusts the behavior of debugpy to load pydevd from
13621 ;; Python site packages.
13622 (setenv "DEBUGPY_BUNDLING_DISABLED" "1")))
13624 (lambda* (#:key tests? #:allow-other-keys)
13625 (invoke "pytest" "-vv"
13626 "-n" (number->string (parallel-job-count))
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 ")))))))
13637 ;; See: https://raw.githubusercontent.com/microsoft/debugpy/
13638 ;; main/tests/requirements.txt.
13639 (list python-django
13645 python-pytest-timeout
13646 python-pytest-xdist
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
13653 (license license:expat)))
13655 (define-public python-debian
13657 (name "python-debian")
13658 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
13662 ;; Use git-fetch, as pypi doesn't include test suite.
13664 (uri (git-reference
13667 (file-name (git-file-name name version))
13670 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
13671 (build-system python-build-system)
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.
13678 (delete-file "lib/debian/tests/test_deb822.py")
13679 (delete-file "lib/debian/tests/test_debfile.py")
13682 (list python-six python-chardet))
13683 (synopsis "Debian package related modules")
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:
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.
13700 ;; Modules are either GPLv2+ or GPLv3+.
13701 (license license:gpl3+)))
13703 (define-public python-json-spec
13705 (name "python-json-spec")
13710 (uri (pypi-uri "json-spec" version))
13713 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
13714 (build-system python-build-system)
13716 (list python-pathlib python-six))
13718 (list python-pytest))
13719 (home-page "http://py.errorist.io/json-spec")
13721 "JSON Schema, JSON Pointer and JSON Reference for Python")
13723 "This Python library implements several JSON specs, like JSON Schema,
13724 JSON Reference and JSON Pointer.")
13725 (license license:bsd-3)))
13727 (define-public python-fastbencode
13729 (name "python-fastbencode")
13734 (uri (pypi-uri "fastbencode" version))
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")
13741 "The fastbencode Python package implements the bencode serialization
13742 format for storing and transmitting loosely structured data, originally used
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
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
13755 (define-public python-fastjsonschema
13757 (name "python-fastjsonschema")
13762 (uri (pypi-uri "fastjsonschema" version))
13764 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
13765 (build-system python-build-system)
13767 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
13769 (modify-phases %standard-phases
13771 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
13773 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
13775 (list python-colorama
13780 python-pytest-benchmark
13781 python-pytest-cache
13782 python-validictory))
13784 "https://github.com/horejsek/python-fastjsonschema")
13786 "Fast Python implementation of JSON schema")
13788 "This library implements validation of JSON documents by JSON schema for
13789 drafts 04, 06 and 07.")
13790 (license license:bsd-3)))
13792 (define-public python-nbformat
13794 (name "python-nbformat")
13796 ;; The PyPi release tarball lacks some test cases and test data.
13799 (uri (git-reference
13800 (url "https://github.com/jupyter/nbformat")
13804 "114c5c6cvpxhxj8zrw74351gcfzyzjh1jq3py4xf8wk9rahfay9z"))
13805 (file-name (git-file-name name version))))
13806 (build-system python-build-system)
13809 (modify-phases %standard-phases
13811 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
13813 (invoke "pytest" "-vv")))))))
13815 (list python-fastjsonschema python-jsonschema python-jupyter-core
13818 (list python-pytest
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)))
13826 (define-public python-nb-clean
13828 (name "python-nb-clean")
13833 (uri (pypi-uri "nb-clean" version))
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)))
13847 (define-public python-bleach
13849 (name "python-bleach")
13854 (uri (pypi-uri "bleach" version))
13856 (base32 "0rc5avysbsl3w3i2qvb6522263zhwlvf50w0ifs8776w9c2wrmn6"))))
13857 (build-system python-build-system)
13859 '(#:phases (modify-phases %standard-phases
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)))
13870 (define-public python-entrypoints
13872 (name "python-entrypoints")
13877 (uri (pypi-uri "entrypoints" version))
13880 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
13881 (build-system python-build-system)
13882 ;; The package does not come with a setup.py file, so we have to generate
13887 (modify-phases %standard-phases
13888 (add-after 'unpack 'create-setup.py
13890 (call-with-output-file "setup.py"
13893 from setuptools import setup
13894 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
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))))))
13906 (define-public python2-entrypoints
13908 (inherit (package-with-python2
13909 (strip-python2-variant python-entrypoints)))
13911 (list python2-configparser))))
13913 (define-public python-epc
13915 (name "python-epc")
13920 (uri (pypi-uri "epc" version))
13923 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
13924 (build-system python-build-system)
13926 (list python-sexpdata))
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")
13932 "Python-EPC can call elisp functions from Python and Python functions
13934 (license license:gpl3)))
13936 (define-public python-forex-python
13938 (name "python-forex-python")
13943 (uri (pypi-uri "forex-python" version))
13945 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
13946 (build-system python-build-system)
13948 ;; Tests are not included in the PyPI tarball. Also, the tests in the
13949 ;; repository require online data.
13952 (list python-requests python-simplejson))
13953 (home-page "https://github.com/MicroPyramid/forex-python")
13954 (synopsis "Foreign exchange rates and currency conversion")
13956 "@code{python-forex-python} can be used to manipulate foreign
13957 exchange rates and to operate currency conversions.
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.
13970 (license license:expat)))
13972 (define-public python-simpleeval
13974 (name "python-simpleeval")
13979 (uri (pypi-uri "simpleeval" version))
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")
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
13991 (license license:expat)))
13993 (define-public python-nbconvert
13995 (name "python-nbconvert")
14000 (uri (pypi-uri "nbconvert" version))
14003 "17g9xq4za7vvzml6l6d8zrzknhxsvgx02hymmsw9d1dygbi4cgi2"))))
14004 (build-system python-build-system)
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"
14014 (format #f "~s" (search-input-file inputs "bin/pandoc"))))
14016 (substitute* "nbconvert/exporters/pdf.py"
14018 (format #f "~s" (search-input-file inputs "bin/xelatex")))
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"))))))
14027 (lambda* (#:key tests? #:allow-other-keys)
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
14036 (with-directory-excursion "/tmp"
14037 (invoke "pytest" "--pyargs" "nbconvert"
14038 "-vv" "-n" (number->string (parallel-job-count))
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 ")))))))))
14050 (list inkscape pandoc))
14052 (list python-ipykernel
14053 ;; Adding ipywidgets would create a cycle.
14054 ;;python-ipywidgets
14055 ;;python-pyppeteer ;TODO: package me
14057 python-pytest-xdist))
14059 (list python-beautifulsoup4
14064 python-jupyter-core
14068 python-pandocfilters
14070 python-jupyterlab-pygments
14073 ;; Required, even if [serve] is not used.
14075 ;; Required at runtime for `jupyter nbconvert --to=pdf`.
14081 texlive-generic-iftex
14084 texlive-latex-fancyvrb
14085 texlive-latex-float
14086 texlive-latex-geometry
14087 texlive-latex-jknapltx
14089 texlive-latex-parskip
14090 texlive-latex-trimspaces
14091 texlive-latex-upquote
14097 texlive-unicode-math
14099 (texlive-updmap.cfg (list texlive-amsfonts
14103 texlive-latex-amsmath
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:
14121 @item Markdown (md)
14122 @item ReStructured Text (rst)
14123 @item executable script
14125 (license license:bsd-3)))
14127 (define-public python-notebook
14129 (name "python-notebook")
14133 (uri (pypi-uri "notebook" version))
14136 "03p976xq1l9xf4djwk0snmywd0zck3i6gjngxsl874i8qrmsf214"))))
14137 (build-system python-build-system)
14140 (modify-phases %standard-phases
14141 (add-after 'unpack 'use-our-home-for-tests
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))))
14154 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
14155 ;; These tests require a browser.
14156 (delete-file-recursively "notebook/tests/selenium")
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")))))))
14168 (list python-argon2-cffi
14170 python-ipython-genutils
14172 python-jupyter-client
14173 python-jupyter-core
14174 python-nest-asyncio
14177 python-prometheus-client
14184 (list python-coverage
14189 python-requests-unixsocket))
14190 (home-page "https://jupyter.org/")
14191 (synopsis "Web-based notebook environment for interactive computing")
14193 "The Jupyter HTML notebook is a web-based notebook environment for
14194 interactive computing.")
14195 (license license:bsd-3)))
14197 (define-public python-widgetsnbextension
14199 (name "python-widgetsnbextension")
14204 (uri (pypi-uri "widgetsnbextension" version))
14207 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
14208 (build-system python-build-system)
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
14215 (license license:bsd-3)))
14217 (define-public python-ipywidgets
14219 (name "python-ipywidgets")
14224 (uri (pypi-uri "ipywidgets" version))
14227 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
14228 (build-system python-build-system)
14230 (list python-ipykernel
14232 python-jupyterlab-widgets
14235 python-widgetsnbextension))
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
14244 (license license:bsd-3)))
14246 (define-public python-jupyter-console
14248 (name "python-jupyter-console")
14253 (uri (pypi-uri "jupyter_console" version))
14256 "1iqrxhd8hvlyf8cqbc731ssnwm61wrycnbiczy5wsfahd3hlh8i4"))))
14257 (build-system python-build-system)
14259 (list python-ipykernel python-jupyter-client python-prompt-toolkit
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)))
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")
14277 (substitute-keyword-arguments
14278 (package-arguments python-jupyter-console)
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
14286 (delete-file-recursively
14288 (assoc-ref outputs "out") "/bin"))))))))
14289 ;; Remove the python-ipython propagated input, to avoid the cycle
14291 (modify-inputs (package-propagated-inputs python-jupyter-console)
14292 (delete "python-ipython")))))
14294 (define-public python-qtconsole
14296 (name "python-qtconsole")
14301 (uri (pypi-uri "qtconsole" version))
14303 (base32 "09anp8g7vqi8z8wyi2lv21a2frd2dyhyrzvcrk2anijyqzyj0dcf"))))
14304 (build-system python-build-system)
14307 (modify-phases %standard-phases
14308 (add-before 'check 'pre-check
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")))))))
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))
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)))
14327 (define-public python-jsbeautifier
14329 (name "python-jsbeautifier")
14331 (home-page "https://github.com/beautify-web/js-beautify")
14334 (uri (git-reference
14336 (commit (string-append "v" version))))
14337 (file-name (git-file-name name version))
14340 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
14341 (build-system python-build-system)
14343 `(#:phases (modify-phases %standard-phases
14344 (add-after 'unpack 'chdir
14346 ;; The upstream Git repository contains all the code,
14347 ;; but this package only builds the python code.
14350 (add-after 'unpack 'patch-python-six-requirements
14352 (substitute* "python/setup.py"
14357 (list python-editorconfig python-six))
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)))
14365 (define-public jupyter
14372 (uri (pypi-uri "jupyter" version))
14375 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
14376 (build-system python-build-system)
14377 (arguments '(#:tests? #f)) ; there are none.
14379 (list python-ipykernel
14381 python-jupyter-console
14385 (home-page "https://jupyter.org")
14386 (synopsis "Web application for interactive documents")
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)))
14394 (define-public python-chardet
14396 (name "python-chardet")
14401 (uri (pypi-uri "chardet" version))
14404 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
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")
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+)))
14417 (define-public python2-chardet
14418 (package-with-python2 python-chardet))
14420 (define-public python-charset-normalizer
14422 (name "python-charset-normalizer")
14427 (uri (pypi-uri "charset-normalizer" version))
14429 (base32 "0rr3iv2xw4rz5ijnfqk229fw85cq6p6rhqqsilm0ldzncblfg63h"))))
14430 (build-system python-build-system)
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)))
14441 (define-public python-docopt
14443 (name "python-docopt")
14448 ;; The release on PyPI does not include tests.
14449 (uri (git-reference
14450 (url "https://github.com/docopt/docopt")
14452 (file-name (git-file-name name version))
14455 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
14456 (patches (search-patches "python-docopt-pytest6-compat.patch"))))
14457 (build-system python-build-system)
14459 (list python-pytest))
14462 (modify-phases %standard-phases
14464 (lambda* (#:key tests? #:allow-other-keys)
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
14473 (license license:expat)))
14475 (define-public python2-docopt
14476 (package-with-python2 python-docopt))
14478 (define-public python-pythonanywhere
14480 (name "python-pythonanywhere")
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))
14491 "0vzzc1g8pl7cb9yvm3n1j5zlzxf0jd423rzspc2kvpb8yhvydklx"))))
14492 (build-system python-build-system)
14495 (modify-phases %standard-phases
14496 (add-before 'check 'change-home
14498 (setenv "HOME" "/tmp")))
14500 (lambda* (#:key tests? #:allow-other-keys)
14502 ;; Exclude tests marked as slowtest that assume running
14503 ;; inside Git repository on system with virtualenvwrapper
14505 (invoke "pytest" "-m" "not slowtest")))))))
14507 (list python-pytest
14510 python-pytest-mock))
14512 (list python-dateutil
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)))
14526 (define-public python-pythondialog
14528 (name "python-pythondialog")
14533 (uri (pypi-uri "pythondialog" version))
14536 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
14537 (build-system python-build-system)
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\"")))
14550 #:tests? #f)) ; no test suite
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))))))
14561 (define-public python2-pythondialog
14562 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
14565 (version (package-version python-pythondialog))
14568 (uri (pypi-uri "python2-pythondialog" version))
14571 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
14573 (define-public python-configobj
14575 (name "python-configobj")
14579 (uri (pypi-uri "configobj" version))
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)
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
14594 (home-page "https://github.com/DiffSK/configobj")
14595 (license license:bsd-3)))
14597 (define-public python2-configobj
14598 (package-with-python2 python-configobj))
14600 (define-public python-configargparse
14602 (name "python-configargparse")
14606 (uri (pypi-uri "ConfigArgParse" version))
14609 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
14610 (build-system python-build-system)
14612 (list python-pyyaml))
14615 (modify-phases %standard-phases
14618 ;; Bypass setuptools-shim because one test relies on "setup.py"
14619 ;; being the first argument passed to the python call.
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)))
14631 (define-public python-connection-pool
14633 (name "python-connection-pool")
14638 (uri (pypi-uri "connection_pool" version))
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
14646 (license license:expat)))
14648 (define-public python-argparse-manpage
14650 (name "python-argparse-manpage")
14655 (uri (pypi-uri "argparse-manpage" version))
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")
14663 "This package provides tools to build manual pages from Python's
14664 @code{ArgumentParser} object.")
14665 (license license:asl2.0)))
14667 (define-public python-contextlib2
14669 (name "python-contextlib2")
14670 (version "0.6.0.post1")
14674 (uri (pypi-uri "contextlib2" version))
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)))
14689 (define-public python2-contextlib2
14690 (let ((base (package-with-python2
14691 (strip-python2-variant python-contextlib2))))
14692 (package/inherit base
14694 (substitute-keyword-arguments (package-arguments base)
14696 `(modify-phases ,phases
14698 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
14700 `(("python2-unittest2" ,python2-unittest2))))))
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
14707 python2-contextlib2
14708 (name "python2-contextlib2-bootstrap")
14711 ,@(package-arguments python2-contextlib2)))
14712 (native-inputs '()))))
14714 (define-public python-texttable
14716 (name "python-texttable")
14721 (uri (pypi-uri "texttable" version))
14724 "1sbn821394rix6xgj3zqk743pj6nqm1qz81zgis2bcpp2ng7pvj2"))))
14725 (build-system python-build-system)
14728 (modify-phases %standard-phases
14730 (lambda* (#:key tests? #:allow-other-keys)
14731 (when tests? (invoke "pytest" "-vv" "tests.py")))))))
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
14738 (license license:expat)))
14740 (define-public python2-texttable
14741 (package-with-python2 python-texttable))
14743 (define-public python-atomicwrites
14745 (name "python-atomicwrites")
14749 (uri (pypi-uri "atomicwrites" version))
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)))
14761 (define-public python2-atomicwrites
14762 (package-with-python2 python-atomicwrites))
14764 (define-public python-atomicwrites-1.4
14766 (inherit python-atomicwrites)
14770 (uri (pypi-uri "atomicwrites" version))
14773 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))))
14775 (define-public python-qstylizer
14777 (name "python-qstylizer")
14782 (uri (git-reference
14783 (url "https://github.com/blambright/qstylizer")
14785 (file-name (git-file-name name version))
14787 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
14788 (build-system python-build-system)
14790 `(#:test-target "pytest"
14792 (modify-phases %standard-phases
14793 (add-before 'build 'set-pbr-version
14795 (setenv "PBR_VERSION" "3.0.1"))))))
14799 python-pytest-catchlog
14802 python-pytest-runner
14803 python-pytest-xdist))
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)))
14812 (define-public python-click-threading
14814 (name "python-click-threading")
14818 (uri (pypi-uri "click-threading" version))
14821 "0f9lmxwcq0y9lb8w0whbni7gwy12gbv74h1igh85qn9aq0iydkxd"))))
14822 (build-system python-build-system)
14824 (list python-click))
14825 (synopsis "Utilities for multithreading in Click")
14826 (description "This package provides utilities for multithreading in Click
14828 (home-page "https://github.com/click-contrib/click-threading")
14829 (license license:expat)))
14831 (define-public python-click-log
14833 (name "python-click-log")
14837 (uri (pypi-uri "click-log" version))
14840 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
14841 (build-system python-build-system)
14843 (list python-click))
14844 (synopsis "Logging for click applications")
14845 (description "This package provides a Python library for logging Click
14847 (home-page "https://github.com/click-contrib/click-log")
14848 (license license:expat)))
14850 (define-public python-click-default-group
14852 (name "python-click-default-group")
14856 (uri (pypi-uri "click-default-group" version))
14859 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
14860 (build-system python-build-system)
14862 `(#:tests? #f)) ; no target
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)))
14871 (define-public python-structlog
14873 (name "python-structlog")
14878 (uri (pypi-uri "structlog" version))
14881 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
14882 (build-system python-build-system)
14885 (modify-phases %standard-phases
14887 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
14889 (add-installed-pythonpath inputs outputs)
14893 (list python-coverage
14897 python-pytest-asyncio
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))))
14906 (define-public python-apipkg
14908 (name "python-apipkg")
14912 (uri (pypi-uri "apipkg" version))
14915 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
14916 (build-system python-build-system)
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)))
14926 (define-public python-execnet
14928 (name "python-execnet")
14932 (uri (pypi-uri "execnet" version))
14935 "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
14936 (patches (search-patches "python-execnet-read-only-fix.patch"))))
14937 (build-system python-build-system)
14940 (modify-phases %standard-phases
14942 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14944 ;; Unset PYTHONDONTWRITEBYTECODE to match the
14945 ;; expectations of a test in
14946 ;; 'testing/test_gateway.py'.
14947 (unsetenv "PYTHONDONTWRITEBYTECODE")
14949 (add-installed-pythonpath inputs outputs)
14950 (invoke "pytest" "-vv")))))))
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:
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
14963 (home-page "https://codespeak.net/execnet/")
14964 (license license:expat)))
14966 (define-public python2-execnet
14967 (package-with-python2 python-execnet))
14969 (define-public python-icalendar
14971 (name "python-icalendar")
14975 (uri (pypi-uri "icalendar" version))
14978 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
14979 (build-system python-build-system)
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)))
14988 (define-public python-args
14990 (name "python-args")
14994 (uri (pypi-uri "args" version))
14997 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
14998 (build-system python-build-system)
14999 (home-page "https://github.com/kennethreitz/args")
15000 (synopsis "Command-line argument parser")
15002 "This library provides a Python module to parse command-line arguments.")
15003 (license license:bsd-3)))
15005 (define-public python2-args
15006 (package-with-python2 python-args))
15008 (define-public python-clint
15010 (name "python-clint")
15014 (uri (pypi-uri "clint" version))
15017 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
15018 (build-system python-build-system)
15021 (modify-phases %standard-phases
15023 (lambda _ (invoke "py.test" "-v"))))))
15025 (list python-pytest))
15027 (list python-args))
15028 (home-page "https://github.com/kennethreitz/clint")
15029 (synopsis "Command-line interface tools")
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)))
15036 (define-public python2-clint
15037 (package-with-python2 python-clint))
15039 (define-public python-rply
15041 (name "python-rply")
15045 (uri (pypi-uri "rply" version))
15048 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
15049 (build-system python-build-system)
15051 (list python-appdirs))
15052 (home-page "https://github.com/alex/rply")
15053 (synopsis "Parser generator for Python")
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)))
15060 (define-public python2-rply
15061 (package-with-python2 python-rply))
15063 (define-public python-hy
15069 (method git-fetch) ; no tests in PyPI release
15070 (uri (git-reference
15071 (url "https://github.com/hylang/hy")
15073 (file-name (git-file-name name version))
15075 (base32 "1g7djra9z7b0wyqyfrk2n4z3zamp2xkahv00jwdv35xmwwn09hq4"))))
15076 (build-system python-build-system)
15079 (modify-phases %standard-phases
15081 (lambda* (#:key tests? #:allow-other-keys)
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"))))))))
15089 (list python-pytest))
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")
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)))
15100 (define-public python-hissp
15102 (name "python-hissp")
15107 (uri (pypi-uri "hissp" version))
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)))
15119 (define-public python2-functools32
15121 (name "python2-functools32")
15122 (version "3.2.3-2")
15126 (uri (pypi-uri "functools32" version))
15129 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
15130 (build-system python-build-system)
15132 `(#:python ,python-2
15133 #:tests? #f)) ; no test target
15134 (home-page "https://github.com/MiCHiLU/python-functools32")
15136 "Backport of the functools module from Python 3.2.3")
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)))
15142 (define-public python2-subprocess32
15144 (name "python2-subprocess32")
15148 (uri (pypi-uri "subprocess32" version))
15151 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
15153 (search-patches "python2-subprocess32-disable-input-test.patch"))))
15154 (build-system python-build-system)
15156 `(#:python ,python-2
15157 ;; The test suite fails with Python > 2.7.13:
15158 ;; import test.support
15159 ;; ImportError: No module named support
15162 (modify-phases %standard-phases
15163 (add-after 'unpack 'patch-/bin/sh
15165 (substitute* '("subprocess32.py"
15166 "test_subprocess32.py")
15167 (("/bin/sh") (which "sh")))
15169 (home-page "https://github.com/google/python-subprocess32")
15170 (synopsis "Backport of the subprocess module from Python 3.2")
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)))
15179 (define-public python2-futures
15181 (name "python2-futures")
15186 (uri (pypi-uri "futures" version))
15189 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
15190 (build-system python-build-system)
15192 `(#:python ,python-2
15194 (modify-phases %standard-phases
15197 (invoke "python" "test_futures.py")
15199 (home-page "https://github.com/agronholm/pythonfutures")
15201 "Backport of the concurrent.futures package from Python 3.2")
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)))
15208 (define-public python-promise
15210 (name "python-promise")
15215 (uri (pypi-uri "promise" version))
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")
15226 "Promises/A+ implementation for Python")
15227 (license license:expat)))
15229 (define-public python-progressbar2
15231 (name "python-progressbar2")
15236 (uri (pypi-uri "progressbar2" version))
15239 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
15240 (build-system python-build-system)
15242 (list python-six python-utils))
15244 (list python-flake8
15248 python-pytest-cache
15250 python-pytest-flakes
15253 (home-page "https://github.com/WoLpH/python-progressbar")
15254 (synopsis "Text progress bar library for Python")
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)))
15260 (define-public python-progressbar33
15262 (name "python-progressbar33")
15267 (uri (pypi-uri "progressbar33" version))
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")
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))))
15282 (define-public python-colorama
15284 (name "python-colorama")
15289 (uri (pypi-uri "colorama" version))
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
15296 (home-page "https://pypi.org/project/colorama/")
15297 (license license:bsd-3)))
15299 (define-public python2-colorama
15300 (package-with-python2 python-colorama))
15302 ;; awscli and botocore do not accept version 0.4.4
15303 (define-public python-colorama-for-awscli
15305 (inherit python-colorama)
15310 (uri (pypi-uri "colorama" version))
15312 (base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
15314 (define-public python-moto
15316 (name "python-moto")
15320 (uri (pypi-uri "moto" version))
15322 (base32 "0dfnad1f9d5ybabs69dzc7x357z1r4jbhrhgw57gyic1qnmcw864"))))
15323 (build-system python-build-system)
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))))))
15335 (lambda* (#:key tests? #:allow-other-keys)
15337 (invoke "pytest" "-vv" "-m" "not network" "-k"
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"
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"))))))))
15358 python-graphql-core
15362 (list bash-minimal))
15364 (list python-aws-xray-sdk
15368 python-cryptography
15371 python-importlib-metadata
15383 (home-page "https://github.com/spulec/moto")
15384 (synopsis "Mock out the boto library")
15386 "@code{moto} is a library designed to easily mock out the
15387 @code{boto} library.")
15388 (license license:asl2.0)))
15390 (define-public python-rsa
15392 (name "python-rsa")
15397 (uri (pypi-uri "rsa" version))
15400 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
15401 (build-system python-build-system)
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)))
15412 (define-public python2-rsa
15413 (package-with-python2 python-rsa))
15415 (define-public python-pluggy
15417 (name "python-pluggy")
15422 (uri (pypi-uri "pluggy" version))
15425 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
15426 (build-system python-build-system)
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)))
15436 (define-public python2-pluggy
15437 (let ((base (package-with-python2 (strip-python2-variant
15442 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
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
15451 (name "python2-pluggy-bootstrap")
15454 ,@(package-arguments python2-pluggy)))
15456 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
15458 (define-public python-plumbum
15460 (name "python-plumbum")
15465 (uri (pypi-uri "plumbum" version))
15467 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
15468 (build-system python-build-system)
15470 `(#:tests? #f)) ;no tests
15472 ;; XXX: Not actually used since there are no tests but required for
15474 (list python-pytest))
15475 (home-page "https://plumbum.readthedocs.io")
15476 (synopsis "Python shell combinators library")
15478 "Plumbum is a library of tools for replacing shell scripts with Python
15480 (license license:expat)))
15482 (define-public python-deprecation
15484 (name "python-deprecation")
15489 (uri (pypi-uri "deprecation" version))
15492 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
15493 (build-system python-build-system)
15495 (list python-packaging))
15497 (list python-unittest2))
15498 (home-page "https://deprecation.readthedocs.io/")
15499 (synopsis "Python library to handle automated deprecations")
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)))
15508 (define-public python-tox
15510 (name "python-tox")
15515 (uri (pypi-uri "tox" version))
15518 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
15519 (build-system python-build-system)
15521 ;; FIXME: Tests require pytest-timeout, which itself requires
15522 ;; pytest>=2.8.0 for installation.
15525 (list python-filelock
15531 python-virtualenv))
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
15543 (license license:expat)))
15545 (define-public python-jmespath
15547 (name "python-jmespath")
15552 (uri (pypi-uri "jmespath" version))
15555 "0pmzfi230zfgiq2rz896kbb9f7mp0lnrjdl6x1npvxfixn0f5454"))))
15556 (build-system python-build-system)
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
15563 (home-page "https://github.com/jmespath/jmespath.py")
15564 (license license:expat)))
15566 (define-public python-symengine
15568 (name "python-symengine")
15573 (uri (pypi-uri "symengine" version))
15575 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
15576 (build-system python-build-system)
15578 (list cmake python-cython))
15581 (home-page "https://github.com/symengine/symengine.py")
15582 (synopsis "Python library providing wrappers to SymEngine")
15584 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
15585 manipulation library.")
15586 (license license:expat)))
15588 (define-public python-uncertainties
15590 (name "python-uncertainties")
15595 (uri (pypi-uri "uncertainties" version))
15598 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
15599 (build-system python-build-system)
15600 ;; While there are test files, there is no "tests" directory, so the tests
15602 (arguments '(#:tests? #false))
15604 (list python-future))
15606 (list python-nose python-numpy))
15607 (home-page "https://uncertainties-python-package.readthedocs.io/")
15608 (synopsis "Calculations with uncertainties")
15610 "The uncertainties package transparently handles calculations with
15611 numbers with uncertainties. It can also yield the derivatives of any
15613 (license license:bsd-3)))
15615 (define-public python-unicodedata2
15617 (name "python-unicodedata2")
15622 (uri (pypi-uri "unicodedata2" version))
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)))
15632 (define-public python-asteval
15634 (name "python-asteval")
15639 (uri (pypi-uri "asteval" version))
15642 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
15643 (build-system python-build-system)
15645 (list python-pytest))
15646 (home-page "https://github.com/newville/asteval")
15647 (synopsis "Minimalistic evaluator of Python expressions")
15649 "This package provides a minimalistic evaluator of Python expression
15650 using the @code{ast} module")
15651 (license license:expat)))
15653 (define-public python-lmfit
15655 (name "python-lmfit")
15660 (uri (pypi-uri "lmfit" version))
15663 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
15664 (build-system python-build-system)
15666 (list python-asteval python-numpy python-scipy python-uncertainties))
15668 (list python-pytest))
15669 (home-page "https://lmfit.github.io/lmfit-py/")
15670 (synopsis "Least-Squares minimization with bounds and constraints")
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)))
15680 (define-public python-boto
15682 (name "python-boto")
15686 (uri (pypi-uri "boto" version))
15689 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
15690 (build-system python-build-system)
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.
15697 (list python-paramiko python-requests))
15698 (home-page "https://github.com/boto/boto")
15699 (synopsis "Python interfaces for Amazon Web Services")
15701 "This package provides various facilities for interacting with Amazon
15702 Web Services through Python.
15704 This software is unmaintained, and new projects should use @code{boto3} instead.")
15705 (license license:expat)))
15707 (define-public python-botocore
15708 ;; Note: When updating botocore, also make sure that boto3 and awscli
15711 (name "python-botocore")
15712 (version "1.24.35")
15716 (uri (pypi-uri "botocore" version))
15719 "0rv8mvhq5s373zdjs2yb45hzvqcqdh2lp2rbb21jjc8ciwnl5d9n"))))
15720 (build-system python-build-system)
15722 ;; FIXME: Many tests are failing.
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)))
15732 (define-public python2-botocore
15733 (package-with-python2 python-botocore))
15735 (define-public python-boto3
15737 (name "python-boto3")
15738 (version "1.21.35")
15739 (home-page "https://github.com/boto/boto3")
15742 (uri (git-reference (url home-page) (commit version)))
15743 (file-name (git-file-name name version))
15746 "1kdyf238rpfldnpzs0rdh3nhjn6hwfym4faskyhzlgzkf1smmbg1"))))
15749 (modify-phases %standard-phases
15750 (add-after 'unpack 'delete-network-tests
15751 ;; Deleting integration tests because they are trying to connect to AWS.
15753 (delete-file-recursively "tests/integration")))
15755 (lambda* (#:key tests? #:allow-other-keys)
15757 (invoke "pytest" "-v")))))))
15758 (build-system python-build-system)
15760 (list python-nose python-mock python-pytest))
15762 (list python-botocore python-jmespath python-s3transfer))
15763 (synopsis "AWS SDK for Python")
15765 "Boto3 is a Python library for writing programs that interact with
15766 @acronym{AWS,Amazon Web Services}.")
15767 (license license:asl2.0)))
15769 (define-public python-pyfiglet
15771 (name "python-pyfiglet")
15772 (version "0.8.post1")
15776 (uri (pypi-uri "pyfiglet" version))
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
15785 (license license:expat)))
15787 (define-public python-xdo
15789 (name "python-xdo")
15793 (uri (string-append
15794 "http://http.debian.net/debian/pool/main/p/python-xdo/"
15795 "python-xdo_" version ".orig.tar.gz"))
15798 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
15799 (build-system python-build-system)
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")
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)))
15818 #:tests? #f)) ; no tests provided
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)))
15831 (define-public python2-xdo
15832 (package-with-python2 python-xdo))
15834 (define-public python-xdoctest
15836 (name "python-xdoctest")
15841 (uri (pypi-uri "xdoctest" version))
15843 (base32 "0bgbmb9nqv95f9gfxqifqff1qaz5fnanjqy4hv7ygrjp2kksgfvy"))))
15844 (build-system python-build-system)
15847 #~(modify-phases %standard-phases
15849 (lambda* (#:key tests? #:allow-other-keys)
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)))
15864 (define-public python-mako
15866 (name "python-mako")
15871 (uri (pypi-uri "Mako" version))
15874 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
15875 (build-system python-build-system)
15877 `(#:phases (modify-phases %standard-phases
15879 (lambda* (#:key tests? #:allow-other-keys)
15881 (invoke "nosetests" "-v")
15882 (format #t "test suite not run~%"))
15885 (list python-markupsafe))
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)))
15894 (define-public python2-mako
15895 (package-with-python2 python-mako))
15897 (define-public python-waitress
15899 (name "python-waitress")
15904 (uri (pypi-uri "waitress" version))
15905 (patches (search-patches "python-waitress-fix-tests.patch"))
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)))
15916 (define-public python2-waitress
15917 (package-with-python2 python-waitress))
15919 (define-public python-whichcraft
15921 (name "python-whichcraft")
15926 (uri (pypi-uri "whichcraft" version))
15929 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
15930 (build-system python-build-system)
15932 (list python-pytest))
15933 (home-page "https://github.com/pydanny/whichcraft")
15934 (synopsis "Cross-platform cross-python shutil.which functionality")
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)))
15940 (define-public python-cookiecutter
15942 (name "python-cookiecutter")
15947 (uri (pypi-uri "cookiecutter" version))
15949 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
15950 (build-system python-build-system)
15952 (list python-freezegun python-pytest python-pytest-catchlog
15953 python-pytest-cov python-pytest-mock))
15955 (list python-binaryornot
15963 python-text-unidecode
15964 python-whichcraft))
15965 (home-page "https://github.com/cookiecutter/cookiecutter")
15967 "Command-line utility that creates projects from project templates")
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)))
15974 (define-public python-pyquery
15976 (name "python-pyquery")
15981 (uri (pypi-uri "pyquery" version))
15984 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
15985 (build-system python-build-system)
15987 (list python-webob python-webtest))
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)))
15997 (define-public python-anyjson
15999 (name "python-anyjson")
16004 (uri (pypi-uri "anyjson" version))
16007 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
16008 (build-system python-build-system)
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.
16017 (home-page "https://bitbucket.org/runeh/anyjson/")
16019 "Wraps best available JSON implementation in a common interface")
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))))))
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!
16032 ,@(package-arguments anyjson)))
16033 (native-inputs `(("python2-nose" ,python2-nose))))))
16035 (define-public python-amqp
16037 (name "python-amqp")
16042 (uri (pypi-uri "amqp" version))
16044 (base32 "1qmmffiy48nady7is8529vxcyqbq88v5zgawqr3fk4q8rkz166rc"))))
16045 (build-system python-build-system)
16049 #~(modify-phases %standard-phases
16051 (lambda* (#:key tests? #:allow-other-keys)
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)")
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+)))
16067 (define-public python-beniget
16069 (name "python-beniget")
16071 (home-page "https://github.com/serge-sans-paille/beniget")
16075 (uri (pypi-uri "beniget" version))
16077 (base32 "035c4f78yllpw2c5p1w92520rilm7nnpsqh7yvi3qmfhi8xlnmbm"))))
16078 (build-system python-build-system)
16080 (list python-gast))
16081 (synopsis "Extract semantic information about static Python code")
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)))
16088 (define-public python-txamqp
16090 (name "python-txamqp")
16095 (uri (pypi-uri "txAMQP" version))
16098 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
16099 (build-system python-build-system)
16101 (list python-six python-twisted))
16102 (home-page "https://github.com/txamqp/txamqp")
16103 (synopsis "Communicate with AMQP peers and brokers using Twisted")
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
16111 (license license:asl2.0)))
16113 (define-public python-kombu
16115 (name "python-kombu")
16120 (uri (pypi-uri "kombu" version))
16122 (base32 "044ng79gj04668kf5fmy7fjkw8302xyapskkn65ym52zfbpf7kip"))))
16123 (build-system python-build-system)
16127 #~(modify-phases %standard-phases
16129 (lambda* (#:key tests? #:allow-other-keys)
16131 (invoke "pytest" "-vv"
16132 ;; The transport tests attempt to pass messages to
16133 ;; many different databases.
16134 "--ignore" "t/unit/transport")))))))
16136 (list python-case python-pyro4 python-pytest-sugar
16137 python-pytest python-pytz))
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)))
16150 (define-public python-billiard
16152 (name "python-billiard")
16153 (version "3.6.4.0")
16157 (uri (pypi-uri "billiard" version))
16159 (base32 "0ismj2p8c66ykpss94rs0bfra5agxxmljz8r3gaq79r8valfb799"))))
16160 (build-system python-build-system)
16163 (modify-phases %standard-phases
16164 (add-after 'unpack 'remove-win-files
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")))))))
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")
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)))
16183 (define-public python-celery
16185 (name "python-celery")
16190 (uri (pypi-uri "celery" version))
16192 (base32 "109lcqarrbmh95sk1dm4yxayq1h3i27f4w23ndk64mqgyfnqqffi"))))
16193 (build-system python-build-system)
16196 (modify-phases %standard-phases
16197 (add-after 'unpack 'relax-requirements
16199 (substitute* "requirements/default.txt"
16203 (lambda* (#:key tests? #:allow-other-keys)
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"
16213 "-k" "not test_check_privileges_no_fchown ")))))))
16222 python-pytest-celery
16223 python-pytest-subtests
16224 python-pytest-timeout
16227 (list python-billiard
16229 python-click-didyoumean
16230 python-click-plugins
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)))
16245 (define-public python-translitcodec
16247 (name "python-translitcodec")
16252 (uri (pypi-uri "translitcodec" version))
16255 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
16256 (build-system python-build-system)
16258 `(#:tests? #f)) ; no tests provided
16260 "https://github.com/claudep/translitcodec")
16262 "Unicode to 8-bit charset transliteration codec")
16264 "This package contains codecs for transliterating ISO 10646 texts into
16265 best-effort representations using smaller coded character sets (ASCII,
16267 (license license:expat)))
16269 (define-public python2-translitcodec
16270 (package-with-python2 python-translitcodec))
16272 (define-public python-anyqt
16274 (name "python-anyqt")
16279 (uri (pypi-uri "AnyQt" version))
16281 (base32 "0z7myf0mp1qx4gza6ncqyq9whk67vblmh9n3klk19dv4aakjml2f"))))
16282 (build-system python-build-system)
16284 `(#:tests? #f ;there are no tests
16286 (modify-phases %standard-phases
16287 (add-after 'unpack 'delete-files
16288 ;; Delete files related to other operating systems.
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)))
16297 (define-public python-pyqtgraph
16299 (name "python-pyqtgraph")
16304 (uri (pypi-uri "pyqtgraph" version))
16306 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
16307 (build-system python-build-system)
16310 (modify-phases %standard-phases
16311 (add-before 'check 'set-home-and-qpa
16313 (setenv "HOME" "/tmp")
16314 (setenv "QT_QPA_PLATFORM" "offscreen")
16317 (lambda* (#:key inputs outputs #:allow-other-keys)
16318 (add-installed-pythonpath inputs outputs)
16319 (invoke "pytest" "-vv" "-k"
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")))))))
16335 (list python-pytest python-pytest-cov python-pytest-xdist))
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")
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
16347 (license license:expat)))
16349 (define-public python-qasync
16351 (name "python-qasync")
16355 ;; There are no tests in the PyPI tarball.
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))
16362 (base32 "1q9cllrwf94whr0f6mipa0hdq1rcyqvklwx19g35g2dav8f3xkjl"))))
16363 (build-system python-build-system)
16365 `(#:test-target "pytest"
16367 (modify-phases %standard-phases
16368 (add-before 'check 'set-qpa
16370 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
16372 (list python-pytest python-pytest-runner))
16374 (list python-pyqt))
16375 (home-page "https://github.com/CabbageDevelopment/qasync")
16376 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
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)))
16382 (define-public python-editor
16384 (name "python-editor")
16389 (uri (pypi-uri "python-editor" version))
16392 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
16393 (build-system python-build-system)
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")
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)))
16403 (define-public python2-editor
16404 (package-with-python2 python-editor))
16406 (define-public python-multiprocessing-logging
16408 (name "python-multiprocessing-logging")
16410 (home-page "https://github.com/jruere/multiprocessing-logging")
16413 (uri (git-reference
16415 (commit (string-append "v" version))))
16416 (file-name (git-file-name name version))
16419 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
16420 (build-system python-build-system)
16421 (synopsis "Manage logs from multiple processes")
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+)))
16428 (define-public python-vobject
16430 (name "python-vobject")
16431 (version "0.9.6.1")
16434 (uri (pypi-uri "vobject" version))
16437 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
16438 (build-system python-build-system)
16440 '(;; The test suite relies on some non-portable Windows interfaces.
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
16450 (home-page "https://eventable.github.io/vobject/")
16451 (license license:asl2.0)))
16453 (define-public python2-vobject
16454 (package-with-python2 python-vobject))
16456 (define-public python-munkres
16458 (name "python-munkres")
16462 (uri (pypi-uri "munkres" version))
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)))
16475 (define-public python-whoosh
16477 (name "python-whoosh")
16482 (uri (pypi-uri "Whoosh" version))
16485 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
16486 (build-system python-build-system)
16487 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
16489 (list python-pytest))
16490 (home-page "https://bitbucket.org/mchaput/whoosh")
16491 (synopsis "Full text indexing, search, and spell checking library")
16493 "Whoosh is a fast, pure-Python full text indexing, search, and spell
16494 checking library.")
16495 (license license:bsd-2)))
16497 (define-public python2-whoosh
16498 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
16499 (package/inherit whoosh
16501 `(("python2-backport-ssl-match-hostname"
16502 ,python2-backport-ssl-match-hostname)
16503 ,@(package-propagated-inputs whoosh))))))
16505 (define-public python-codespell
16507 (name "python-codespell")
16512 (uri (pypi-uri "codespell" version))
16514 (base32 "1r9y714cz8m894rxp7pyvicr1lw2iid24vz6fxbl5wzy8ibgxlqr"))))
16515 (build-system python-build-system)
16517 (list python-chardet))
16519 (list python-check-manifest python-flake8 python-pytest
16520 python-pytest-cov python-pytest-dependency))
16523 (modify-phases %standard-phases
16525 (lambda* (#:key outputs tests? #:allow-other-keys)
16527 ;; Make installed executable available for running the tests.
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
16544 ; for codespell and codespell_lib
16546 ; for dictionary*.txt
16547 license:cc-by-sa3.0))))
16549 (define-public python-pathlib
16551 (name "python-pathlib")
16555 (uri (pypi-uri "pathlib" version))
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:
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.).
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
16581 (license license:expat)))
16583 (define-public python2-pathlib
16584 (package-with-python2 python-pathlib))
16586 (define-public python2-pathlib2
16588 (name "python2-pathlib2")
16592 (uri (pypi-uri "pathlib2" version))
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.
16601 `(#:python ,python-2))
16603 (list python2-scandir python2-six))
16604 (home-page "https://pypi.org/project/pathlib2/")
16605 (synopsis "Object-oriented file system paths - backport of standard
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.
16611 Pathlib offers a set of classes to handle file system paths. It offers the
16612 following advantages over using string objects:
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.).
16622 (license license:expat)))
16624 (define-public python2-pathlib2-bootstrap
16627 (inherit python2-pathlib2)
16628 (name "python2-pathlib2-bootstrap")
16630 `(("python2-scandir" ,python2-scandir)
16631 ("python2-six" ,python2-six-bootstrap))))))
16633 (define-public python-jellyfish
16635 (name "python-jellyfish")
16639 (uri (pypi-uri "jellyfish" version))
16642 "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
16643 (build-system python-build-system)
16645 `(#:tests? #f ; XXX: Tests cannot find C coded version.
16647 (modify-phases %standard-phases
16649 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16651 (add-installed-pythonpath inputs outputs)
16652 (invoke "pytest" "-vv" "jellyfish/test.py")))))))
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)))
16661 (define-public python2-unicodecsv
16663 (name "python2-unicodecsv")
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")
16672 (file-name (git-file-name name version))
16675 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
16676 (build-system python-build-system)
16678 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
16679 #:python ,python-2))
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)))
16688 (define-public python-pdfminer-six
16690 (name "python-pdfminer-six")
16691 (version "20201018")
16692 ;; There are no tests in the PyPI tarball.
16696 (uri (git-reference
16697 (url "https://github.com/pdfminer/pdfminer.six")
16699 (file-name (git-file-name name version))
16701 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
16702 (build-system python-build-system)
16705 (modify-phases %standard-phases
16706 ;; Tests write to the source tree.
16707 (add-after 'unpack 'make-git-checkout-writable
16709 (for-each make-file-writable (find-files "."))
16713 (invoke "make" "test"))))))
16715 (list python-chardet python-cryptography python-sortedcontainers))
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)))
16727 (define-public python-rarfile
16729 (name "python-rarfile")
16733 (uri (pypi-uri "rarfile" version))
16736 "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
16737 (build-system python-build-system)
16739 `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
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
16749 (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
16752 (lambda* (#:key inputs tests? #:allow-other-keys)
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)))
16763 (define-public python-rich
16765 (name "python-rich")
16769 (uri (pypi-uri "rich" version))
16772 "149vjb4cpf9mz14iig0b6d8065dm8aslp6pc45g9ipmp1wf00ffj"))))
16773 (build-system python-build-system)
16776 (modify-phases %standard-phases
16778 (lambda* (#:key inputs tests? #:allow-other-keys)
16780 (copy-recursively (string-append
16781 (assoc-ref inputs "tests") "/tests")
16783 (invoke "python" "-m" "pytest" "-vv")))))))
16785 (list python-attrs python-colorama python-commonmark python-pygments
16786 python-typing-extensions))
16788 `(("python-pytest" ,python-pytest)
16790 ;; The release on pypi comes without tests. We can't build from this
16791 ;; checkout, though, because installation requires an invocation of
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))
16801 "17c3gljn8zv32xnpsgd3fqgqn4r7cdfqri41hridcpbhssdgkyp9"))))))
16802 (home-page "https://github.com/willmcgugan/rich")
16803 (synopsis "Render rich text and more to the terminal")
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)))
16809 (define-public python-magic
16811 (name "python-magic")
16813 (home-page "https://github.com/ahupp/python-magic")
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"))
16822 "17jalhjbfd600lzfz296m0nvgp6c7vx1mgz82jbzn8hgdzknf4w0"))))
16823 (build-system python-build-system)
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 "'"))))))
16839 (lambda* (#:key tests? #:allow-other-keys)
16840 ;; The test suite mandates this variable.
16841 (setenv "LC_ALL" "en_US.UTF-8")
16843 (with-directory-excursion "test"
16844 (invoke "python" "./test.py")
16845 (invoke "python" "./libmagic_test.py"))
16846 (format #t "test suite not run~%")))))))
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'.
16854 (synopsis "File type identification using libmagic")
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)))
16864 (define-public python2-magic
16865 (package-with-python2 python-magic))
16867 (define-public python2-s3cmd
16869 (name "python2-s3cmd")
16874 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
16875 "s3cmd-" version ".tar.gz"))
16878 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
16879 (build-system python-build-system)
16881 ;; s3cmd is written for python2 only and contains no tests.
16882 `(#:python ,python-2
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
16894 (home-page "https://s3tools.org/s3cmd")
16895 (synopsis "Command line tool for S3-compatible storage services")
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+)))
16904 (define-public python-pkgconfig
16906 (name "python-pkgconfig")
16911 (uri (pypi-uri "pkgconfig" version))
16914 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
16915 (build-system python-build-system)
16917 (list python-nose))
16922 (modify-phases %standard-phases
16923 (add-before 'build 'patch
16924 ;; Hard-code the path to pkg-config.
16926 (substitute* "pkgconfig/pkgconfig.py"
16928 (string-append "'" (which "pkg-config") "'")))))
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)))
16940 (define-public python2-pkgconfig
16941 (package-with-python2 python-pkgconfig))
16943 (define-public python-bz2file
16945 (name "python-bz2file")
16950 (uri (pypi-uri "bz2file" version))
16953 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
16954 (build-system python-build-system)
16956 `(#:tests? #f)) ; Tests use deprecated python modules.
16957 (home-page "https://github.com/nvawda/bz2file")
16958 (synopsis "Read and write bzip2-compressed files")
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)))
16966 (define-public python2-bz2file
16967 (package-with-python2 python-bz2file))
16969 (define-public python-future
16971 (name "python-future")
16976 (uri (pypi-uri "future" version))
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
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"))
16994 (for-each copy-file files backups)
16996 ;; Nobody be usin' winreg on Guix
16997 ;; Also, don't force users to have tkinter when they don't
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")
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)))
17010 (define-public python2-future
17011 (package-with-python2 python-future))
17013 (define-public python-cysignals
17015 (name "python-cysignals")
17020 (uri (pypi-uri "cysignals" version))
17023 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
17024 (build-system python-build-system)
17026 (list python-cython python-sphinx))
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
17038 (modify-phases %standard-phases
17041 (assoc-ref gnu:%standard-phases 'configure)))))
17043 "https://github.com/sagemath/cysignals")
17045 "Handling of interrupts and signals for Cython")
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,
17051 (license license:lgpl3+)))
17053 (define-public python2-cysignals
17054 (package-with-python2 python-cysignals))
17056 (define-public python2-shedskin
17058 (name "python2-shedskin")
17063 (uri (string-append "https://github.com/shedskin/shedskin/"
17064 "releases/download/v" version
17065 "/shedskin-" version ".tgz"))
17068 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
17069 (build-system python-build-system)
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'")))
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))))
17094 (define-public python-rope
17096 (name "python-rope")
17101 (uri (pypi-uri "rope" version))
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+)))
17114 (define-public python-py3status
17116 (name "python-py3status")
17121 (uri (pypi-uri "py3status" version))
17123 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
17124 (build-system python-build-system)
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'")))
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)))
17147 (define-public python-tblib
17149 (name "python-tblib")
17153 (uri (pypi-uri "tblib" version))
17156 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
17157 (build-system python-build-system)
17160 (modify-phases %standard-phases
17163 (invoke "py.test" "-vv" "tests" "README.rst"))))))
17165 (list python-pytest python-six))
17166 (home-page "https://github.com/ionelmc/python-tblib")
17167 (synopsis "Traceback serialization library")
17169 "Traceback serialization allows you to:
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).
17176 @item Parse traceback strings and raise with the parsed tracebacks.
17178 (license license:bsd-3)))
17180 (define-public python2-tblib
17181 (package-with-python2 python-tblib))
17183 (define-public python-tftpy
17185 (name "python-tftpy")
17189 (method git-fetch) ;no tests in PyPI archive
17190 (uri (git-reference
17191 (url "https://github.com/msoulier/tftpy")
17193 (file-name (git-file-name name version))
17196 "1gl04ps8h8r7av3h0zbm8gwmkqs9rkk5vf7n8mv2bzrkwvy9hacc"))))
17197 (build-system python-build-system)
17199 `(#:phases (modify-phases %standard-phases
17201 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17203 ;; The default DEBUG logging level is way too verbose.
17204 (substitute* "t/test.py"
17205 (("logging\\.DEBUG")
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)))
17214 (define-public python-greenlet
17216 (name "python-greenlet")
17220 (uri (pypi-uri "greenlet" version))
17223 "0jkln5bf6rq7dbvpv7ypin3pp9jqd2jr91yyxlnfcii3msj5w3z3"))))
17224 (build-system python-build-system)
17225 (home-page "https://greenlet.readthedocs.io/")
17226 (synopsis "Lightweight in-process concurrent programming")
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))))
17234 (define-public python-objgraph
17236 (name "python-objgraph")
17241 (uri (pypi-uri "objgraph" version))
17244 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
17245 (build-system python-build-system)
17247 (list python-graphviz))
17249 (list python-mock graphviz))
17250 (home-page "https://mg.pov.lt/objgraph/")
17251 (synopsis "Draw Python object reference graphs with graphviz")
17253 "This package provides tools to draw Python object reference graphs with
17255 (license license:expat)))
17257 (define-public python2-objgraph
17258 (package-with-python2 python-objgraph))
17260 (define-public python-gevent
17262 (name "python-gevent")
17263 (version "21.12.0")
17266 (uri (pypi-uri "gevent" version))
17269 "0kh9mmq811mzfgj60n64icybjp4ryjmfmy1vg7x92yrniibn92zl"))
17270 (modules '((guix build utils)))
17273 ;; unbunding libev and c-ares
17274 (delete-file-recursively "deps")))))
17275 (build-system python-build-system)
17277 `(#:modules ((ice-9 ftw)
17281 (guix build python-build-system))
17282 #:phases (modify-phases %standard-phases
17283 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
17285 (substitute* "src/gevent/subprocess.py"
17286 (("/bin/sh") (which "sh")))
17287 (for-each (lambda (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
17294 (setenv "GEVENTSETUP_EMBED" "0")
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")
17305 (match (scandir greenlet
17307 (string-prefix? "python" item)))
17309 (setenv "C_INCLUDE_PATH"
17310 (string-append greenlet "/" python ":"
17311 (or (getenv "C_INCLUDE_PATH")
17313 (add-before 'check 'pretend-to-be-CI
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
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.
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"
17347 "test__execmodules.py")))
17348 (call-with-output-file "skipped_tests.txt"
17350 (format port "~a~%"
17351 (string-join disabled-tests "\n")))))))
17354 ;; Use the build daemons configured number of workers.
17355 (setenv "NWORKERS" (number->string (parallel-job-count)))
17357 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
17358 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
17360 (list python-greenlet python-zope-event python-zope-interface))
17363 (list python-dnspython python-psutil python-objgraph))
17365 (list c-ares libev))
17366 (home-page "https://www.gevent.org/")
17367 (synopsis "Coroutine-based network library")
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)))
17374 (define-public python-fastimport
17376 (name "python-fastimport")
17381 (uri (pypi-uri "fastimport" version))
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}
17390 (license license:gpl2+)))
17392 (define-public python-twisted
17394 (name "python-twisted")
17398 (uri (pypi-uri "Twisted" version ".tar.bz2"))
17401 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
17402 (build-system python-build-system)
17404 '(#:tests? #f ; FIXME: some tests fail
17406 (modify-phases %standard-phases
17407 ;; Remove scripts, because they depend on [conch]
17408 (add-after 'unpack 'remove-entrypoint
17410 (substitute* "src/twisted/python/_setup.py"
17411 (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
17413 (list python-zope-interface
17419 (home-page "https://twistedmatrix.com/")
17420 (synopsis "Asynchronous networking framework written in Python")
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)))
17426 (define-public python-pika
17428 (name "python-pika")
17433 (uri (git-reference
17434 (url "https://github.com/pika/pika")
17436 (file-name (git-file-name name version))
17439 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
17440 (build-system python-build-system)
17442 '(#:phases (modify-phases %standard-phases
17443 (add-before 'check 'disable-live-tests
17445 ;; Disable tests that require RabbitMQ, which is not
17446 ;; yet available in Guix.
17447 (substitute* "setup.cfg"
17448 (("tests/unit,tests/acceptance")
17450 (with-directory-excursion "tests"
17451 (for-each delete-file
17452 '("unit/base_connection_tests.py"
17453 "unit/threaded_test_wrapper_test.py")))))
17456 (invoke "nosetests"))))))
17460 ;; These are optional at runtime, and provided here for tests.
17464 (home-page "https://pika.readthedocs.org")
17465 (synopsis "Pure Python AMQP Client Library")
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)))
17472 (define-public python-ply
17474 (name "python-ply")
17479 (uri (pypi-uri "ply" version))
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)))
17490 (define-public python-tabulate
17492 (name "python-tabulate")
17496 (uri (pypi-uri "tabulate" version))
17499 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
17500 (build-system python-build-system)
17502 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
17503 ;; and the latest release is not tagged in the upstream repository.
17505 (home-page "https://bitbucket.org/astanin/python-tabulate")
17506 (synopsis "Pretty-print tabular data")
17508 "Tabulate is a library and command-line utility to pretty-print tabular
17510 (license license:expat)))
17512 (define-public python2-tabulate
17513 (package-with-python2 python-tabulate))
17515 (define-public python-kazoo
17517 (name "python-kazoo")
17522 (uri (pypi-uri "kazoo" version))
17525 "1zpj5cc8624w6i0pxgcxqkjwbkm4pkrv19d7wh5df3jais32g3jq"))))
17526 (build-system python-build-system)
17527 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
17530 (home-page "https://kazoo.readthedocs.org")
17531 (synopsis "High-level Zookeeper client library")
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)))
17538 (define-public python2-kazoo
17539 (package-with-python2 python-kazoo))
17541 (define-public python-pykafka
17543 (name "python-pykafka")
17547 (uri (pypi-uri "pykafka" version))
17550 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
17551 (build-system python-build-system)
17552 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
17554 (list python-gevent python-kazoo python-tabulate))
17557 (home-page "https://pykafka.readthedocs.io/")
17558 (synopsis "Apache Kafka client for Python")
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)))
17565 (define-public python-wcwidth
17567 (name "python-wcwidth")
17571 (uri (pypi-uri "wcwidth" version))
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)))
17585 (define-public python2-wcwidth
17586 (package-with-python2 python-wcwidth))
17588 (define-public python2-jsonrpclib
17590 (name "python2-jsonrpclib")
17594 (uri (pypi-uri "jsonrpclib" version))
17597 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
17598 (build-system python-build-system)
17601 #:python ,python-2))
17602 (home-page "https://github.com/joshmarshall/jsonrpclib/")
17603 (synopsis "Implementation of JSON-RPC specification for Python")
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,
17609 (license license:asl2.0)))
17611 (define-public python-chai
17613 (name "python-chai")
17617 (uri (pypi-uri "chai" version))
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")
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)))
17630 (define-public python-inflection
17632 (name "python-inflection")
17635 (origin (method url-fetch)
17636 (uri (pypi-uri "inflection" version))
17639 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
17640 (build-system python-build-system)
17642 (list python-pytest))
17643 (home-page "https://github.com/jpvanhal/inflection")
17644 (synopsis "Python string transformation library")
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)))
17651 (define-public python2-inflection
17652 (package-with-python2 python-inflection))
17654 (define-public python-pylev
17656 (name "python-pylev")
17660 (uri (pypi-uri "pylev" version))
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)))
17672 (define-public python2-pylev
17673 (package-with-python2 python-pylev))
17675 (define-public python-cleo
17677 (name "python-cleo")
17681 (uri (pypi-uri "cleo" version))
17684 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
17685 (build-system python-build-system)
17687 (list ;; For testing
17688 python-mock python-pytest-mock python-pytest))
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")
17694 "Cleo allows you to create command-line commands with signature in
17695 docstring and colored output.")
17696 (license license:expat)))
17698 (define-public python2-cleo
17699 (package-with-python2 python-cleo))
17701 (define-public python-tomlkit
17703 (name "python-tomlkit")
17708 (uri (pypi-uri "tomlkit" version))
17710 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
17711 (build-system python-build-system)
17713 (list python-pytest python-pyyaml))
17714 (home-page "https://github.com/sdispater/tomlkit")
17715 (synopsis "Style-preserving TOML library")
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)))
17724 (define-public python-shellingham
17726 (name "python-shellingham")
17731 (uri (pypi-uri "shellingham" version))
17733 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
17734 (build-system python-build-system)
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>
17742 (with-output-to-file "setup.py"
17744 (display "from setuptools import setup\nsetup()\n")))
17746 (home-page "https://github.com/sarugaku/shellingham")
17747 (synopsis "Tool to detect surrounding shell")
17749 "Shellingham detects what shell the current Python executable is
17751 (license license:isc)))
17753 (define-public python-memcached
17755 (name "python-memcached")
17760 (uri (pypi-uri "python-memcached" version))
17763 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
17764 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
17765 (build-system python-build-system)
17766 (propagated-inputs (list python-six))
17768 "https://github.com/linsomniac/python-memcached")
17769 (synopsis "Pure python memcached client")
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)))
17776 (define-public python-mergedeep
17778 (name "python-mergedeep")
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))
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)))
17798 (define-public python-clikit
17800 (name "python-clikit")
17805 (uri (pypi-uri "clikit" version))
17808 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
17809 (build-system python-build-system)
17810 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
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")
17816 "CliKit is a group of utilities to build testable command line
17818 (properties `((python2-variant . ,(delay python2-clikit))))
17819 (license license:expat)))
17821 (define-public python2-clikit
17822 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
17826 `(("python-enum34" ,python2-enum34)
17827 ("python-typing" ,python2-typing)
17828 ,@(package-propagated-inputs base))))))
17830 (define-public python-msgpack-python
17832 (name "python-msgpack-python")
17837 (uri (pypi-uri "msgpack-python" version))
17840 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
17841 (build-system python-build-system)
17842 (home-page "https://msgpack.org/")
17843 (synopsis "Package to deserialize messages in MessagePack binary format")
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)))
17851 (define-public python-cachy
17853 (name "python-cachy")
17858 (uri (pypi-uri "cachy" version))
17861 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
17862 (build-system python-build-system)
17865 (modify-phases %standard-phases
17867 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
17870 (list memcached python-fakeredis python-flexmock python-pifpaf
17873 (list python-memcached python-msgpack-python python-redis))
17874 (home-page "https://github.com/sdispater/cachy")
17875 (synopsis "Simple yet effective caching library")
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)))
17882 (define-public poetry
17889 (uri (pypi-uri "poetry" version))
17892 "0rr54mvcfcv9cv6vw2122y28xvd2pwqpv2x8c8j5ayz3gwsy4rjw"))))
17893 (build-system python-build-system)
17895 `(#:tests? #f ;PyPI does not have tests
17897 (modify-phases %standard-phases
17898 (add-before 'build 'patch-setup-py
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)))))))
17905 (list python-cachecontrol
17912 ; Use of deprecated version of msgpack reported upstream:
17913 ; https://github.com/python-poetry/poetry/issues/3607
17914 python-msgpack-transitional
17921 python-requests-toolbelt
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)))
17932 (define-public python-lark-parser
17934 (name "python-lark-parser")
17938 (uri (pypi-uri "lark-parser" version))
17941 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
17942 (build-system python-build-system)
17943 (home-page "https://github.com/lark-parser/lark")
17944 (synopsis "Multi-language parser for Python")
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)))
17952 (define-public python-libcst
17954 (name "python-libcst")
17958 (uri (pypi-uri "libcst" version))
17961 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
17962 (build-system python-build-system)
17965 (modify-phases %standard-phases
17966 (add-after 'unpack 'remove-failing-tests
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
17977 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
17978 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
17980 (lambda* (#:key tests? #:allow-other-keys)
17982 (invoke "python" "-m" "unittest")))))))
17984 (list python-black python-isort))
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")
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)
18001 ;; libcst/_add_slots.py
18004 (define-public python-libcst-minimal
18007 (inherit python-libcst)
18008 (name "python-libcst-minimal")
18009 (arguments '(#:tests? #f))
18010 (native-inputs '()))))
18012 (define-public python-typing-inspect
18014 (name "python-typing-inspect")
18018 (uri (pypi-uri "typing_inspect" version))
18021 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
18022 (patches (search-patches "python-typing-inspect-fix.patch"))))
18023 (build-system python-build-system)
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")
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)))
18033 (define-public python-lazy-object-proxy
18035 (name "python-lazy-object-proxy")
18039 (uri (pypi-uri "lazy-object-proxy" version))
18042 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
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")
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)))
18053 (define-public python2-lazy-object-proxy
18054 (package-with-python2 python-lazy-object-proxy))
18056 (define-public python-dnspython
18058 (name "python-dnspython")
18062 (uri (pypi-uri "dnspython" version ".zip"))
18065 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
18066 (build-system python-build-system)
18068 `(#:tests? #f ; XXX: requires internet access
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.
18076 (substitute* "dns/rdtypes/IN/WKS.py"
18077 (("socket.getprotobyname\\('tcp'\\)")
18079 (("socket.getprotobyname\\('udp'\\)")
18081 (native-inputs (list unzip))
18082 (home-page "https://www.dnspython.org")
18083 (synopsis "DNS toolkit for Python")
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)))
18090 (define-public python-dnspython-1.16
18092 (inherit python-dnspython)
18096 (uri (string-append "http://www.dnspython.org/kits/"
18097 version "/dnspython-" version ".tar.gz"))
18100 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
18101 (native-inputs '())))
18103 (define-public python2-dnspython-1.16
18104 (package-with-python2 python-dnspython-1.16))
18106 (define-public python-py3dns
18108 (name "python-py3dns")
18113 (uri (pypi-uri "py3dns" version))
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".
18122 (modify-phases %standard-phases
18123 (add-after 'unpack 'patch-source
18125 (substitute* "setup.py"
18126 (("import DNS") "")
18127 (("DNS.__version__") (string-append "\"" ,version "\"")))
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)))
18137 (define-public python-email-validator
18139 (name "python-email-validator")
18142 (origin (method url-fetch)
18143 (uri (pypi-uri "email_validator" version))
18146 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
18147 (build-system python-build-system)
18150 (modify-phases %standard-phases
18151 (add-before 'build 'use-dnspython
18153 (substitute* "setup.py"
18154 (("dnspython3") "dnspython"))
18157 (list python-dnspython python-idna))
18158 (home-page "https://github.com/JoshData/python-email-validator")
18159 (synopsis "Email address validation library for Python")
18161 "This library validates email address syntax and deliverability.")
18162 (license license:cc0)))
18164 (define-public python2-email-validator
18165 (package-with-python2 python-email-validator))
18167 (define-public python-ukpostcodeparser
18169 (name "python-ukpostcodeparser")
18173 (uri (pypi-uri "UkPostcodeParser" version))
18176 "03jkf1ygbwq3akzbcjyjk1akc1hv2sfgx90306pq1nwklbpn80lk"))))
18177 (build-system python-build-system)
18180 (modify-phases %standard-phases
18182 (lambda* (#:key tests? #:allow-other-keys)
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"))))))))
18192 (list python-pytest))
18193 (home-page "https://github.com/hamstah/ukpostcodeparser")
18194 (synopsis "UK Postcode parser for Python")
18196 "This library provides the @code{parse_uk_postcode} function for
18197 parsing UK postcodes.")
18198 (license license:expat)))
18200 (define-public python2-ukpostcodeparser
18201 (package-with-python2 python-ukpostcodeparser))
18203 (define-public python-faker
18205 (name "python-faker")
18209 (uri (pypi-uri "Faker" version))
18212 "04855dqvvi2mr739l5x3qf82rxq0a7spc8gl76k8xixmbw36328q"))))
18213 (build-system python-build-system)
18216 (modify-phases %standard-phases
18218 (lambda* (#:key tests? #:allow-other-keys)
18220 (invoke "python" "-m" "pytest" "-v")))))))
18222 (list python-freezegun
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")
18231 "Faker is a Python package that generates fake data such as names,
18232 addresses, and phone numbers.")
18233 (license license:expat)))
18235 (define-public python-pyaml
18237 (name "python-pyaml")
18238 (version "18.11.0")
18241 (uri (pypi-uri "pyaml" version))
18244 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
18245 (build-system python-build-system)
18247 (list python-unidecode))
18249 (list python-pyyaml))
18250 (home-page "https://github.com/mk-fg/pretty-yaml")
18251 (synopsis "YAML pretty-print library for Python")
18253 "pyaml is a PyYAML based python module to produce pretty and readable
18254 YAML-serialized data.")
18255 (license license:wtfpl2)))
18257 (define-public python2-pyaml
18258 (package-with-python2 python-pyaml))
18260 (define-public python-pyyaml-env-tag
18262 (name "python-pyyaml-env-tag")
18267 (uri (pypi-uri "pyyaml_env_tag" version))
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)))
18278 (define-public python-backpack
18280 (name "python-backpack")
18285 (uri (pypi-uri "backpack" version))
18288 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
18289 (build-system python-build-system)
18291 (list python-pytest python-nose python-toml))
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)))
18300 (define-public python2-backpack
18301 (package-with-python2 python-backpack))
18303 (define-public python-prompt-toolkit
18305 (name "python-prompt-toolkit")
18310 (uri (pypi-uri "prompt_toolkit" version))
18312 (base32 "19vf5cahp3imdpwhgvk55g3dvqmc6ga175r4vkq79kffx1h0yr5x"))))
18313 (build-system python-build-system)
18316 (modify-phases %standard-phases
18318 (lambda* (#:key tests? #:allow-other-keys)
18320 ;; HOME is needed for the test
18321 ;; "test_pathcompleter_can_expanduser".
18322 (setenv "HOME" "/tmp")
18323 (invoke "pytest" "-vv")))))))
18325 (list python-wcwidth))
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")
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))))))
18339 (define-public python-proselint
18341 (name "python-proselint")
18346 (uri (pypi-uri "proselint" version))
18349 "0n1ahnq2mkgvh94g05xhc3l1fs3hh0ycskqlqivhhfdaq8ybdlkx"))))
18350 (build-system python-build-system)
18354 (modify-phases %standard-phases
18355 (add-after 'unpack 'set-home-directory
18357 (setenv "HOME" "/tmp"))))))
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)))
18366 (define-public python-prompt-toolkit-2
18367 (package (inherit python-prompt-toolkit)
18368 (name "python-prompt-toolkit")
18373 (uri (pypi-uri "prompt_toolkit" version))
18376 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
18378 (list python-wcwidth python-six python-pygments))
18381 (define-public python2-prompt-toolkit
18382 (package-with-python2 python-prompt-toolkit-2))
18384 (define-public python-prompt-toolkit-1
18385 (package (inherit python-prompt-toolkit-2)
18390 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
18393 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
18395 (define-public python2-prompt-toolkit-1
18396 (package-with-python2 python-prompt-toolkit-1))
18398 (define-public python-jedi
18400 (name "python-jedi")
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))
18412 "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1"))))
18413 (build-system python-build-system)
18416 (modify-phases %standard-phases
18418 (lambda* (#:key tests? #:allow-other-keys)
18420 (setenv "HOME" "/tmp")
18421 (invoke "python" "-m" "pytest" "-vv"))
18424 (list python-colorama python-docopt python-pytest))
18426 (list python-parso))
18427 (home-page "https://github.com/davidhalter/jedi")
18428 (synopsis "Autocompletion and static analysis library for Python")
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.
18434 Jedi understands docstrings and you can use Jedi autocompletion in your REPL
18436 (license license:expat)))
18438 (define-public ptpython
18444 (uri (pypi-uri "ptpython" version))
18447 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
18448 (build-system python-build-system)
18450 `(#:tests? #f)) ;there are no tests
18452 (list python-appdirs python-black python-jedi python-prompt-toolkit
18454 (home-page "https://github.com/jonathanslenders/ptpython")
18455 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
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
18461 (license license:bsd-3)
18462 (properties `((python2-variant . ,(delay ptpython-2))))))
18464 (define-public ptpython-2
18465 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
18466 (package/inherit base
18467 (name "ptpython2"))))
18469 (define-public python-easyprocess
18471 (name "python-easyprocess")
18476 (uri (pypi-uri "EasyProcess" version))
18478 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
18479 (build-system python-build-system)
18481 ;; Tests require pyvirtualdisplay, which requires this package.
18483 (home-page "https://github.com/ponty/easyprocess")
18484 (synopsis "Python subprocess interface")
18486 "@code{easyprocess} is an easy to use Python subprocess interface.")
18487 (license license:bsd-3)))
18489 (define-public python-entrypoint2
18491 (name "python-entrypoint2")
18496 (uri (pypi-uri "entrypoint2" version))
18498 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
18499 (build-system python-build-system)
18501 `(#:test-target "pytest"))
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")
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)))
18512 (define-public python-pyvirtualdisplay
18514 (name "python-pyvirtualdisplay")
18519 (uri (pypi-uri "PyVirtualDisplay" version))
18521 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
18522 (build-system python-build-system)
18524 ;; Tests fail with:
18525 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
18528 (list python-entrypoint2 python-psutil python-pytest
18529 python-pytest-runner))
18531 (list python-easyprocess python-pillow))
18532 (home-page "https://github.com/ponty/pyvirtualdisplay")
18533 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
18535 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
18536 (license license:bsd-3)))
18538 (define-public python-stem
18540 (name "python-stem")
18545 (uri (pypi-uri "stem" version))
18548 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
18549 (build-system python-build-system)
18552 (modify-phases %standard-phases
18553 (add-after 'unpack 'fix-tests
18554 ;; See https://github.com/torproject/stem/issues/56
18556 (substitute* "run_tests.py"
18557 (("test\\.task\\.MOCK_VERSION,")
18561 (invoke "./run_tests.py" "--unit")
18564 (list python-mock python-pycodestyle python-pyflakes))
18565 (home-page "https://stem.torproject.org/")
18567 "Python controller library that allows applications to interact with Tor")
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)))
18574 (define-public python-pyserial
18576 (name "python-pyserial")
18581 (uri (pypi-uri "pyserial" version))
18584 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
18585 (build-system python-build-system)
18587 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
18589 ;; (modify-phases %standard-phases
18592 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
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)))
18601 (define-public python2-pyserial
18602 (package-with-python2 python-pyserial))
18604 (define-public python-pyserial-asyncio
18606 (name "python-pyserial-asyncio")
18611 (uri (pypi-uri "pyserial-asyncio" version))
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
18620 (license license:bsd-3)))
18622 (define-public python-pymodbus
18624 (name "python-pymodbus")
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))
18635 "0kjjrx7xrlx0pf3y67hhr4xvqrly3xzmvf6ic5as61m6z19m7zd5"))))
18636 (build-system python-build-system)
18638 `(#:phases (modify-phases %standard-phases
18639 (add-after 'unpack 'disable-problematic-tests
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+
18649 ;; https://github.com/riptideio/pymodbus/issues/681).
18650 (delete-file "test/test_server_asyncio.py")))
18652 (lambda* (#:key tests? #:allow-other-keys)
18654 (invoke "python" "-m" "pytest")))))))
18663 (list python-pyserial
18668 python-prompt-toolkit
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:
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).
18684 It also includes the following @emph{server} features:
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).
18692 (license license:bsd-3)))
18694 (define-public python-kivy-garden
18696 (name "python-kivy-garden")
18701 (uri (pypi-uri "kivy-garden" version))
18703 (base32 "0wkcpr2zc1q5jb0bi7v2dgc0vs5h1y7j42mviyh764j2i0kz8mn2"))))
18704 (build-system python-build-system)
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")))
18711 (string-append out "/bin/garden.bat"))))))))
18713 (list python-requests))
18714 (home-page "https://github.com/kivy-garden/garden")
18715 (synopsis "Garden tool for Kivy flowers")
18717 "This package provides the @command{garden} command to install packages
18718 for Kivy, the multitouch application platform.")
18719 (license license:expat)))
18721 (define-public python-kivy
18723 (name "python-kivy")
18728 (uri (pypi-uri "Kivy" version))
18729 (file-name (string-append name "-" version ".tar.gz"))
18732 "1cq4djfn7h8560mvz94dydsldg2jpp5w9rby7nafgmbh7fxg65is"))))
18733 (build-system python-build-system)
18735 `(#:tests? #f ; Tests require many optional packages
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
18744 ;; 'kivy/__init__.py' wants to create $HOME/.kivy.
18745 (setenv "HOME" (getcwd)))))))
18747 (list pkg-config python-cython))
18751 (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
18755 (home-page "https://kivy.org")
18756 (synopsis "Multitouch application framework")
18758 "Kivy is a software library for rapid development of hardware-accelerated
18759 multitouch applications.")
18760 (license license:expat)))
18762 (define-public python-kivymd
18764 (name "python-kivymd")
18765 (version "0.104.2")
18769 (uri (pypi-uri "kivymd" version))
18771 (base32 "04lwy6j0agrdwa4a6dl6qs97nx9ysmscmm8psvdzjpyj8aa1zg4p"))))
18772 (build-system python-build-system)
18774 `(#:tests? #f ;tests require network
18776 (modify-phases %standard-phases
18777 (add-before 'sanity-check 'set-home
18779 ;; 'kivy/__init__.py' wants to create $HOME/.kivy.
18780 (setenv "HOME" (getcwd)))))))
18781 (native-inputs (list python-docutils))
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")
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)))
18791 (define-public python2-kivy
18792 (package-with-python2 python-kivy))
18794 (define-public python-binaryornot
18796 (name "python-binaryornot")
18800 (uri (pypi-uri "binaryornot" version))
18803 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
18804 (build-system python-build-system)
18807 (modify-phases %standard-phases
18808 (add-after 'unpack 'patch-tests
18810 ;; TypeError: binary() got an unexpected keyword argument
18812 (substitute* "tests/test_check.py"
18813 (("average_size=512") ""))
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
18821 (license license:bsd-3)
18822 (properties `((python2-variant . ,(delay python2-binaryornot))))))
18824 (define-public python2-binaryornot
18825 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
18826 (package/inherit base
18828 `(("python2-enum34" ,python2-enum34)
18829 ,@(package-propagated-inputs base))))))
18831 (define-public binwalk
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))
18843 (base32 "01dalxw07c42ka4fqpixcacvy42h04ya909lzpmsblr9s2xdgwcm"))))
18844 (build-system python-build-system)
18847 (modify-phases %standard-phases
18848 (add-before 'check 'set-home
18850 (setenv "HOME" ""))))))
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)))
18859 (define-public python-binwalk
18860 (deprecated-package "python-binwalk" binwalk))
18862 (define-public python-bson
18864 (name "python-bson")
18868 (method git-fetch) ;for tests
18869 (uri (git-reference
18870 (url "https://github.com/py-bson/bson")
18872 (file-name (git-file-name name version))
18875 "1vpy4rsvm3hhawvbg9rbw4j36ck8qylkhm8cjy0q6imvinkd2als"))))
18876 (build-system python-build-system)
18879 (modify-phases %standard-phases
18881 (lambda* (#:key tests? #:allow-other-keys)
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
18889 (license license:asl2.0)))
18891 (define-public python-nltk
18893 (name "python-nltk")
18897 (uri (pypi-uri "nltk" version ".zip"))
18900 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
18901 (build-system python-build-system)
18903 '(;; The tests require some extra resources to be downloaded.
18904 ;; TODO Try packaging these resources.
18907 (list python-click python-joblib python-regex python-tqdm))
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)))
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
18922 (inherit python-nltk)
18927 (uri (pypi-uri "nltk" version ".zip"))
18929 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
18930 (propagated-inputs (list python-six))))
18932 (define-public python-pymongo
18934 (name "python-pymongo")
18938 (uri (pypi-uri "pymongo" version))
18941 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
18942 (build-system python-build-system)
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)))
18950 (define-public python-consul
18952 (name "python-consul")
18957 (uri (pypi-uri "python-consul" version))
18960 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
18961 (build-system python-build-system)
18963 '(#:tests? #f)) ; The tests are not distributed
18965 (list python-requests python-six))
18966 (home-page "https://github.com/cablehead/python-consul")
18967 (synopsis "Python client for Consul")
18969 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
18970 discovery, monitoring and configuration.")
18971 (license license:expat)))
18973 (define-public python2-consul
18974 (package-with-python2 python-consul))
18976 (define-public python-schematics
18978 (name "python-schematics")
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))
18988 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
18989 (build-system python-build-system)
18993 ;; The tests require a bunch of not very nice packages with fixed
18994 ;; version requirements (e.g. python-coveralls).
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)))
19001 (define-public python2-schematics
19002 (package-with-python2 python-schematics))
19004 (define-public python-odfpy
19006 (name "python-odfpy")
19010 (uri (pypi-uri "odfpy" version))
19013 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
19016 (modify-phases %standard-phases
19019 (invoke "pytest" "-vv"))))))
19020 (build-system python-build-system)
19022 (list python-pytest))
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.")
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))))
19034 (define-public python-natsort
19036 (name "python-natsort")
19040 (uri (pypi-uri "natsort" version))
19043 "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
19044 (build-system python-build-system)
19047 (modify-phases %standard-phases
19050 (invoke "pytest" "-v"))))))
19052 (list python-hypothesis python-pytest-cov python-pytest-mock
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")
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)))
19069 (define-public glances
19076 (uri (pypi-uri "Glances" version))
19078 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
19079 (modules '((guix build utils)))
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"
19090 (build-system python-build-system)
19092 (list python-future python-psutil))
19093 (home-page "https://github.com/nicolargo/glances")
19094 (synopsis "Cross-platform curses-based monitoring tool")
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+)))
19101 (define-public python-graphql-core
19103 (name "python-graphql-core")
19108 (uri (pypi-uri "graphql-core" version))
19111 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
19112 (build-system python-build-system)
19114 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
19116 (modify-phases %standard-phases
19117 (add-after 'unpack 'patch-hardcoded-version
19118 (lambda _ (substitute*
19120 (("'gevent==1.1rc1'") "'gevent'"))
19123 (list python-gevent python-mock python-pytest-mock))
19125 (list python-promise python-six))
19126 (home-page "https://github.com/graphql-python/graphql-core")
19127 (synopsis "GraphQL implementation for Python")
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}
19133 (license license:expat)))
19135 (define-public python-graphql-relay
19137 (name "python-graphql-relay")
19142 (uri (pypi-uri "graphql-relay" version))
19145 "1d70vwam9gjhx7fqzsa03x7lc6ivcqki5r9pk8m7rslmb7pagmbh"))))
19146 (build-system python-build-system)
19149 (modify-phases %standard-phases
19151 (lambda* (#:key tests? #:allow-other-keys)
19153 (invoke "pytest" "tests")))))))
19157 python-pytest-asyncio))
19159 (list python-graphql-core))
19160 (home-page "https://github.com/graphql-python/graphql-relay-py")
19161 (synopsis "Relay implementation for Python")
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}
19168 (license license:expat)))
19170 (define-public python-graphene
19172 (name "python-graphene")
19177 (uri (pypi-uri "graphene" version))
19180 "08m1n2ydk48c18cvl8474v3pwwacjl1vgq61m9qs00122mp0cj5g"))))
19181 (build-system python-build-system)
19183 (list python-graphql-core python-graphql-relay python-aniso8601
19184 python-promise python-six))
19186 `(#:tests? #f)) ; no tests/ in the PyPI tarball
19187 (home-page "https://graphene-python.org/")
19188 (synopsis "GraphQL Framework for Python")
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)))
19195 (define-public python-random2
19197 (name "python-random2")
19201 (uri (pypi-uri "random2" version ".zip"))
19204 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
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")
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.
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.
19218 This package closes that gap, allowing stable random number generation
19219 between the different Python versions.")
19220 (license license:psfl)))
19222 (define-public python2-random2
19223 (package-with-python2 python-random2))
19225 (define-public python-snowballstemmer
19227 (name "python-snowballstemmer")
19231 (uri (pypi-uri "snowballstemmer" version))
19234 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
19235 (build-system python-build-system)
19237 `(;; No tests exist
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
19244 (license license:bsd-3)))
19246 (define-public python2-snowballstemmer
19247 (package-with-python2 python-snowballstemmer))
19249 (define-public python-setproctitle
19251 (name "python-setproctitle")
19256 (uri (pypi-uri "setproctitle" version))
19259 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
19260 (build-system python-build-system)
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.
19269 (let ((nose (assoc-ref %build-inputs "python2-nose")))
19271 (substitute* "Makefile"
19272 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
19273 (string-append nose "/bin/nosetests "))))
19277 (setenv "PYTHON" (or (which "python3") (which "python")))
19278 (setenv "PYCONFIG" (if (which "python3-config")
19279 "python3-config --embed"
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"))))))
19286 (list procps)) ; required for tests
19287 (home-page "https://github.com/dvarrazzo/py-setproctitle")
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).
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))))))
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))))))
19307 (define-public python-validictory
19309 (name "python-validictory")
19314 (uri (pypi-uri "validictory" version))
19317 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
19318 (build-system python-build-system)
19321 (modify-phases %standard-phases
19322 (add-after 'unpack 'bootstrap
19323 ;; Move the tests out of the package directory to avoid
19326 (rename-file "validictory/tests" "tests")
19327 (delete-file "tests/__init__.py")))
19330 (invoke "py.test" "-vv" ))))))
19332 (list python-pytest))
19334 "https://github.com/jamesturk/validictory")
19335 (synopsis "General purpose Python data validator")
19336 (description "It allows validation of arbitrary Python data structures.
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)))
19343 (define-public python2-validictory
19344 (package-with-python2 python-validictory))
19346 (define-public python-pyelftools
19348 (name "python-pyelftools")
19350 (home-page "https://github.com/eliben/pyelftools")
19354 (uri (git-reference (url home-page)
19355 (commit (string-append "v" version))))
19356 (file-name (git-file-name name version))
19358 (base32 "1z4fx39c9rds0bd4d2fjjq7n05b1nfxl36pmy523x8knm38l4gpr"))
19360 ;; Delete bundled readelf executable.
19361 '(delete-file "test/external_tools/readelf"))))
19362 (build-system python-build-system)
19364 '(#:phases (modify-phases %standard-phases
19366 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
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)))
19380 (define-public python-pyev
19382 (name "python-pyev")
19387 (uri (pypi-uri "pyev" version))
19390 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
19391 (build-system python-build-system)
19393 `(#:tests? #f ; no test suite
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 "\"")))))))))
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)))
19409 (define-public python2-pyev
19410 (package-with-python2 python-pyev))
19412 (define-public python-imagesize
19414 (name "python-imagesize")
19419 (uri (pypi-uri "imagesize" version))
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")
19427 "This package allows determination of image size from
19428 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
19429 (license license:expat)))
19431 (define-public python2-imagesize
19432 (package-with-python2 python-imagesize))
19434 (define-public python-termstyle
19436 (name "python-termstyle")
19441 (uri (pypi-uri "termstyle" version))
19444 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
19445 (build-system python-build-system)
19448 (modify-phases %standard-phases
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)))
19457 (define-public python-argcomplete
19459 (name "python-argcomplete")
19464 (uri (pypi-uri "argcomplete" version))
19467 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
19468 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
19469 (build-system python-build-system)
19471 (list python-coverage
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
19485 (license license:asl2.0)
19486 (properties `((python2-variant . ,(delay python2-argcomplete))))))
19488 (define-public python2-argcomplete
19489 (let ((variant (package-with-python2
19490 (strip-python2-variant python-argcomplete))))
19491 (package/inherit variant
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")))))))
19499 `(("python2-importlib-metadata" ,python2-importlib-metadata)
19500 ,@(package-native-inputs variant))))))
19502 (define-public python-csscompressor
19504 (name "python-csscompressor")
19509 (uri (pypi-uri "csscompressor" version))
19512 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
19513 (build-system python-build-system)
19516 (modify-phases %standard-phases
19519 (invoke "py.test"))))))
19521 (list python-pytest))
19522 (home-page "https://github.com/sprymix/csscompressor")
19523 (synopsis "Python port of YUI CSS Compressor")
19525 "This package provides a python port of YUI CSS Compressor.")
19526 (license license:bsd-3)))
19528 (define-public python-rcssmin
19530 (name "python-rcssmin")
19535 (uri (pypi-uri "rcssmin" version))
19538 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
19539 (build-system python-build-system)
19542 (modify-phases %standard-phases
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)))
19552 (define-public python-rjsmin
19554 (name "python-rjsmin")
19559 (uri (pypi-uri "rjsmin" version))
19562 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
19563 (modules '((guix build utils)))
19566 (for-each delete-file (find-files "bench" "\\.js$"))
19568 (build-system python-build-system)
19570 '(#:tests? #f ; Not all test files included.
19572 (modify-phases %standard-phases
19574 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
19575 (add-installed-pythonpath inputs outputs)
19577 (invoke "py.test" "-vv" "tests")
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)))
19589 (define-public python-xopen
19591 (name "python-xopen")
19596 (uri (pypi-uri "xopen" version))
19599 "1xrlcnd6fri3w97zzzp6vyk4l21yq1lc8r4wksi06hgpkbh4jdq0"))))
19600 (build-system python-build-system)
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)))
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))))))
19619 (define-public python-cheetah
19621 (name "python-cheetah")
19626 (uri (pypi-uri "Cheetah3" version))
19629 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
19630 (build-system python-build-system)
19632 `(#:phases (modify-phases %standard-phases
19633 (add-after 'unpack 'use-absolute-python
19635 (substitute* "Cheetah/CheetahWrapper.py"
19636 (("#!/usr/bin/env python")
19637 (string-append "#!" (which "python"))))))
19638 (add-after 'unpack 'fix-tests
19640 (substitute* "Cheetah/Tests/ImportHooks.py"
19641 (("os.path.dirname\\(__file__\\)")
19642 (string-append "'" (getcwd) "/Cheetah/Tests'")))))
19645 (setenv "TMPDIR" "/tmp")
19646 (substitute* "Cheetah/Tests/Test.py"
19647 (("unittest.TextTestRunner\\(\\)")
19648 "unittest.TextTestRunner(verbosity=2)"))
19650 (invoke "python" "Cheetah/Tests/Test.py"))))))
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
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.
19665 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
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.
19679 (license (license:x11-style "file://LICENSE"))))
19681 (define-public python2-cheetah
19682 (package-with-python2 python-cheetah))
19684 (define-public python-dulwich
19686 (name "python-dulwich")
19687 (version "0.20.30")
19691 (uri (list (string-append "https://www.dulwich.io/releases/"
19692 "dulwich-" version ".tar.gz")
19693 (pypi-uri "dulwich" version)))
19696 "0hafaff30bmkj30b8pwpwsy3fz5h6c1pn98ihqcvl5zndflr1h22"))))
19697 (build-system python-build-system)
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"))))))
19710 (list python-fastimport python-urllib3))
19712 (list python-mock python-geventhttpclient python-gpg
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+))))
19721 (define-public python-pbkdf2
19723 (name "python-pbkdf2")
19728 (uri (pypi-uri "pbkdf2" version))
19731 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
19732 (build-system python-build-system)
19735 (modify-phases %standard-phases
19738 (invoke "python" "test/test_pbkdf2.py"))))))
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.
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)))
19753 (define-public python2-pbkdf2
19754 (package-with-python2 python-pbkdf2))
19756 (define-public python-qrcode
19758 (name "python-qrcode")
19763 (uri (pypi-uri "qrcode" version))
19765 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
19766 (build-system python-build-system)
19768 ;; FIXME: Tests require packaging 'pymaging'.
19771 (list python-lxml ; for SVG output
19772 python-pillow ; for PNG output
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
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
19783 (license license:bsd-3)))
19785 (define-public python2-qrcode
19786 (package-with-python2 python-qrcode))
19788 (define-public python-rst2ansi
19790 (name "python-rst2ansi")
19795 (uri (pypi-uri "rst2ansi" version))
19798 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
19799 (build-system python-build-system)
19801 (list python-docutils))
19802 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
19803 (synopsis "Convert RST to ANSI-decorated console output")
19805 "Python module dedicated to rendering RST (reStructuredText) documents
19806 to ansi-escaped strings suitable for display in a terminal.")
19807 (license license:expat)))
19809 (define-public python-ansi2html
19811 (name "python-ansi2html")
19816 (uri (pypi-uri "ansi2html" version))
19819 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
19820 (build-system python-build-system)
19822 (list python-mock python-nose))
19825 (home-page "https://github.com/ralphbean/ansi2html")
19826 (synopsis "Convert ANSI-decorated console output to HTML")
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+)))
19832 (define-public python2-ansi2html
19833 (package-with-python2 python-ansi2html))
19835 (define-public python-easy-ansi
19837 (name "python-easy-ansi")
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))
19847 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
19848 (build-system python-build-system)
19849 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
19850 (synopsis "Terminal framework API")
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)))
19859 (define-public python-ddt
19861 (name "python-ddt")
19866 (uri (pypi-uri "ddt" version))
19869 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
19870 (build-system python-build-system)
19872 (list python-pytest))
19874 (list python-pyyaml))
19875 (home-page "https://github.com/datadriventests/ddt")
19876 (synopsis "Data-Driven Tests")
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
19881 (license license:expat)))
19883 (define-public python-pycountry
19885 (name "python-pycountry")
19890 (uri (pypi-uri "pycountry" version))
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.")
19898 "@code{pycountry} provides the ISO databases for the standards:
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)
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+)))
19911 (define-public python2-pycountry
19912 (package-with-python2 python-pycountry))
19914 (define-public python-pycosat
19916 (name "python-pycosat")
19921 (uri (pypi-uri "pycosat" version ".zip"))
19924 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
19925 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
19926 (build-system python-build-system)
19929 (home-page "https://github.com/ContinuumIO/pycosat")
19930 (synopsis "Bindings to picosat (a SAT solver)")
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)))
19938 (define-public python2-pycosat
19939 (package-with-python2 python-pycosat))
19941 (define-public python2-ruamel.ordereddict
19943 (name "python2-ruamel.ordereddict")
19948 (uri (pypi-uri "ruamel.ordereddict" version))
19951 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
19952 (build-system python-build-system)
19954 `(#:python ,python-2
19956 (modify-phases %standard-phases
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")
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)))
19975 (define-public python-pypeg2
19977 (name "python-pypeg2")
19982 (uri (pypi-uri "pyPEG2" version))
19985 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
19986 (build-system python-build-system)
19987 (propagated-inputs (list python-lxml))
19989 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
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)))
19998 (define-public python-incremental
20000 (name "python-incremental")
20005 (uri (pypi-uri "incremental" version))
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
20014 (license license:expat)))
20016 (define-public python2-incremental
20017 (package-with-python2 python-incremental))
20019 (define-public python-invoke
20021 (name "python-invoke")
20022 (home-page "https://www.pyinvoke.org/")
20026 (uri (pypi-uri "invoke" version))
20029 "1lsql9daabfr31c7syva5myc5bka45k57ygs9fliv63qrwp1wk9p"))))
20030 (build-system python-build-system)
20032 ;; XXX: Requires many dependencies that are not yet in Guix.
20035 (modify-phases %standard-phases
20036 (add-after 'unpack 'delete-python2-code
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\"")))))))))
20046 `(("bash" ,bash-minimal)))
20047 (synopsis "Pythonic task execution")
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)))
20055 (define-public python2-invoke
20056 (let ((parent (package-with-python2 python-invoke)))
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
20066 (delete-file-recursively "invoke/vendor/yaml3"))))))))))
20068 (define-public python-automat
20070 (name "python-automat")
20074 (uri (pypi-uri "Automat" version))
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>.
20086 (modify-phases %standard-phases
20087 ;; Remove script, because it depends on python-twisted.
20088 (add-after 'unpack 'remove-entrypoint
20090 (substitute* "setup.py"
20091 (("\"automat-visualize = automat._visualize:tool\"") "")))))))
20093 (list python-m2r python-setuptools-scm python-graphviz))
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
20101 (license license:expat)))
20103 (define-public python2-automat
20104 (package-with-python2 python-automat))
20106 (define-public python-m2r
20108 (name "python-m2r")
20112 (uri (pypi-uri "m2r" version))
20115 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
20116 (build-system python-build-system)
20118 (list python-docutils python-mistune))
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
20125 (license license:expat)))
20127 (define-public python2-m2r
20128 (package-with-python2 python-m2r))
20130 (define-public python-constantly
20132 (name "python-constantly")
20136 (uri (pypi-uri "constantly" version))
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)))
20148 (define-public python2-constantly
20149 (package-with-python2 python-constantly))
20151 (define-public python-attrs
20153 (name "python-attrs")
20157 (uri (pypi-uri "attrs" version))
20160 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
20161 (build-system python-build-system)
20163 `(#:phases (modify-phases %standard-phases
20165 (lambda* (#:key tests? #:allow-other-keys)
20167 (invoke "pytest")))))))
20169 (list python-coverage python-hypothesis python-pympler python-pytest
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
20176 (license license:expat)))
20178 (define-public python2-attrs
20179 (package-with-python2 python-attrs))
20181 (define-public python-attrs-bootstrap
20183 (inherit python-attrs)
20184 (name "python-attrs-bootstrap")
20185 (native-inputs `())
20186 (arguments `(#:tests? #f))))
20188 (define-public python2-attrs-bootstrap
20189 (package-with-python2 python-attrs-bootstrap))
20191 (define-public python-cliapp
20193 (name "python-cliapp")
20194 (version "1.20180812.1")
20198 (uri (string-append
20199 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
20200 version ".tar.gz"))
20203 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
20204 (build-system python-build-system)
20206 `(;; XXX: The tests only do style and coverage checks, which
20207 ;; fails due to deprecation warnings, etc.
20210 (list python-coverage-test-runner python-pep8))
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+)))
20220 (define-public python2-cliapp
20221 (package-with-python2 python-cliapp))
20223 (define-public python-ttystatus
20225 (name "python-ttystatus")
20230 (uri (git-reference
20231 (url "http://git.liw.fi/ttystatus")
20232 ;; There are no tags after ttystatus-0.36.
20233 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
20235 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
20236 (file-name (git-file-name name version))))
20237 (build-system python-build-system)
20239 (list python-coverage-test-runner python-pep8))
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,
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+)))
20258 (define-public python2-ttystatus
20259 (package-with-python2 python-ttystatus))
20261 (define-public python2-tracing
20263 (name "python2-tracing")
20268 (uri (string-append
20269 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
20270 version ".tar.gz"))
20273 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
20274 (build-system python-build-system)
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+)))
20287 (define-public python-astroid
20289 (name "python-astroid")
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))
20299 (base32 "19iiys4233cicpm48fd7lrkm31kk47qiv44wvk952rqbcn4rd2dh"))))
20300 (build-system python-build-system)
20302 (list python-lazy-object-proxy python-typing-extensions python-wrapt))
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+)))
20317 (define-public python-isbnlib
20319 (name "python-isbnlib")
20324 (uri (pypi-uri "isbnlib" version))
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+)))
20338 (define-public python-isort
20340 (name "python-isort")
20345 (uri (git-reference
20346 ;; Tests pass only from the Github sources
20347 (url "https://github.com/timothycrosley/isort")
20349 (file-name (git-file-name name version))
20350 (modules '((guix build utils)))
20351 (snippet '(for-each delete-file (find-files "." "\\.whl$")))
20354 "09spgl2k9xrprr5gbpfc91a8p7mx7a0c64ydgc91b3jhrmnd9jg1"))))
20355 (build-system python-build-system)
20358 (modify-phases %standard-phases
20359 (add-after 'unpack 'loosen-requirements
20361 ;; Permit newer versions of black.
20362 (substitute* "example_isort_formatting_plugin/pyproject.toml"
20365 ;; A foretaste of what our future python-build-system will need to
20369 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
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")
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"
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)))))
20401 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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")))))))
20412 python-hypothesmith
20413 python-libcst-minimal
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
20426 (license license:expat)
20427 (properties `((python2-variant . ,(delay python2-isort))))))
20429 (define-public python2-isort
20430 (let ((base (package-with-python2
20431 (strip-python2-variant python-isort))))
20432 (package/inherit base
20434 `(("python2-futures" ,python2-futures)
20435 ,@(package-native-inputs base))))))
20437 (define-public python2-backports-functools-lru-cache
20439 (name "python2-backports-functools-lru-cache")
20444 ;; only the pypi tarballs contain the necessary metadata
20445 (uri (pypi-uri "backports.functools_lru_cache" version))
20448 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
20449 (build-system python-build-system)
20451 (list python2-setuptools-scm))
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)))
20460 (define-public python-configparser
20462 (name "python-configparser")
20467 (uri (pypi-uri "configparser" version))
20470 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
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)))
20481 (define-public python2-configparser
20482 (package-with-python2 python-configparser))
20484 (define-public python-iniconfig
20486 (name "python-iniconfig")
20491 (uri (pypi-uri "iniconfig" version))
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}
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.
20507 (license license:expat)))
20509 (define-public python-mamba
20511 (name "python-mamba")
20515 (uri (pypi-uri "mamba" version))
20518 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
20519 (build-system python-build-system)
20520 (arguments `(#:tests? #f)) ; No test
20522 (list python-clint python-coverage))
20523 (home-page "https://nestorsalceda.com/mamba/")
20524 (synopsis "Test runner for Python")
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)))
20530 (define-public python-mando
20532 (name "python-mando")
20536 (uri (pypi-uri "mando" version))
20539 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
20540 (build-system python-build-system)
20542 (list python-rst2ansi python-six))
20544 (list python-pytest))
20545 (home-page "https://mando.readthedocs.org/")
20547 "Wrapper around argparse, allowing creation of complete CLI applications")
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)))
20553 (define-public python2-mando
20554 (package-with-python2 python-mando))
20556 (define-public python2-argparse
20558 (name "python2-argparse")
20563 (uri (pypi-uri "argparse" version))
20566 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
20567 (build-system python-build-system)
20569 `(#:python ,python-2))
20570 (home-page "https://github.com/ThomasWaldmann/argparse/")
20571 (synopsis "Python command-line parsing library")
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)))
20577 (define-public python-mwclient
20579 (name "python-mwclient")
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))
20590 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
20591 (build-system python-build-system)
20593 (list python-requests-oauthlib python-six))
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)))
20602 (define-public python-kneed
20604 (name "python-kneed")
20609 (uri (pypi-uri "kneed" version))
20611 (base32 "0vkwi0pr7nfkp3c46hnmx0275yx68v96v10rmspv0wis33x6f39l"))))
20612 (build-system python-build-system)
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)))
20622 (define-public python-utils
20624 (name "python-utils")
20628 (uri (pypi-uri "python-utils" version))
20631 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
20632 (build-system python-build-system)
20635 (modify-phases %standard-phases
20637 (lambda* (#:key inputs outputs #:allow-other-keys)
20638 (add-installed-pythonpath inputs outputs)
20639 (delete-file "pytest.ini")
20640 (invoke "pytest" "-vv"))))))
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")
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)))
20652 (define-public python-diff-match-patch
20654 (name "python-diff-match-patch")
20655 (version "20121119")
20659 (uri (pypi-uri "diff-match-patch" version))
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)))
20670 (define-public python2-diff-match-patch
20671 (package-with-python2 python-diff-match-patch))
20673 (define-public python-dirsync
20675 (name "python-dirsync")
20680 (uri (pypi-uri "dirsync" version))
20683 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
20684 (build-system python-build-system)
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)))
20692 (define-public python2-dirsync
20693 (package-with-python2 python-dirsync))
20695 (define-public python-levenshtein
20697 (name "python-levenshtein")
20702 (uri (pypi-uri "python-Levenshtein" version))
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")
20710 "The Levenshtein Python C extension module contains functions for fast computation of
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
20717 It supports both normal and Unicode strings.")
20718 (license license:gpl2+)))
20720 (define-public python2-levenshtein
20721 (package-with-python2 python-levenshtein))
20723 (define-public python-scandir
20725 (name "python-scandir")
20730 (uri (pypi-uri "scandir" version))
20732 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
20733 (build-system python-build-system)
20735 `(#:phases (modify-phases %standard-phases
20738 (invoke "python" "test/run_tests.py"))))))
20739 (home-page "https://github.com/benhoyt/scandir")
20740 (synopsis "Directory iteration function")
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.
20748 This package is part of the Python standard library since version 3.5.")
20749 (license license:bsd-3)))
20751 (define-public python2-scandir
20752 (package-with-python2 python-scandir))
20754 (define-public python2-stemming
20756 (name "python2-stemming")
20761 (uri (pypi-uri "stemming" version))
20763 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
20764 (build-system python-build-system)
20766 `(#:python ,python-2))
20767 (home-page "https://bitbucket.org/mchaput/stemming/overview")
20768 (synopsis "Python implementations of various stemming algorithms")
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
20775 (license license:public-domain)))
20777 (define-public python-factory-boy
20779 (name "python-factory-boy")
20784 (uri (pypi-uri "factory_boy" version))
20786 (base32 "0pm5lbvnwm0kg5i6z611rg907yw1gy551f2advmpaz041ixjg3d9"))))
20787 (build-system python-build-system)
20789 ;; Tests are not included in the tarball.
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)))
20802 (define-public python-translate-toolkit
20804 (name "python-translate-toolkit")
20809 (uri (pypi-uri "translate-toolkit" version ".tar.gz"))
20811 (base32 "020pp7pbpnavxd41z90vyzzx06ci57mx9drkgbsb89wxxx4gal9v"))))
20812 (build-system python-build-system)
20814 (list python-pytest python-sphinx))
20817 python-beautifulsoup4
20819 python-diff-match-patch
20826 ;; TODO: tests are not run, because they end with
20827 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
20829 ;; during test setup.
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")
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+)))
20843 ;; Required for virtaal, newer versions do not build with python2
20844 (define-public python2-translate-toolkit
20845 (package-with-python2
20847 (inherit python-translate-toolkit)
20852 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
20854 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))))))
20856 (define-public python-packaging
20857 (package/inherit python-packaging-bootstrap
20858 (name "python-packaging")
20860 `(#:phases (modify-phases %standard-phases
20862 (lambda* (#:key tests? #:allow-other-keys)
20864 (invoke "pytest" "-vv")
20865 (format #t "test suite not run~%")))))))
20867 `(("python-pretend" ,python-pretend)
20868 ("python-pytest" ,python-pytest)))
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
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
20881 (license (list license:asl2.0 license:bsd-2))))
20883 (define-public python2-packaging
20884 (package-with-python2 python-packaging))
20886 ;; TODO(staging): merge with python-packaging-bootstrap.
20887 (define-public python-packaging-next
20889 (inherit python-packaging)
20894 (uri (pypi-uri "packaging" version))
20897 "1sygirdrqgv4f1ckh9nhpcw1yfidrh3qjl86wq8vk6nq4wlw8iyx"))))))
20899 (define-public python-relatorio
20901 (name "python-relatorio")
20906 (uri (pypi-uri "relatorio" version))
20909 "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
20910 (build-system python-build-system)
20912 (list python-lxml python-genshi))
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+)))
20922 (define-public python-radon
20924 (name "python-radon")
20929 (uri (pypi-uri "radon" version))
20932 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
20933 (build-system python-build-system)
20935 `(#:phases (modify-phases %standard-phases
20936 (add-after 'unpack 'relax-requirements
20938 (substitute* "setup.py"
20941 (("colorama==0.4.1")
20942 "colorama>=0.4.1"))))
20945 (invoke "python" "radon/tests/run.py"))))))
20947 (list python-colorama python-flake8-polyfill python-mando))
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:
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)
20960 (properties `((python2-variant . ,(delay python2-radon))))
20961 (license license:expat)))
20963 (define-public python2-radon
20964 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
20965 (package/inherit base
20967 `(("python-configparser" ,python2-configparser)
20968 ("python-future" ,python2-future)
20969 ,@(package-propagated-inputs base))))))
20971 (define-public python-sure
20973 (name "python-sure")
20978 (uri (pypi-uri "sure" version))
20981 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
20982 (build-system python-build-system)
20984 (list python-mock python-six))
20986 (list python-nose))
20987 (home-page "https://github.com/gabrielfalcao/sure")
20988 (synopsis "Automated testing library in python for python")
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+)))
20994 (define-public python2-sure
20995 (package-with-python2 python-sure))
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.
21001 (name "python2-couleur")
21006 (uri (pypi-uri "couleur" version))
21009 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
21010 (build-system python-build-system)
21012 `(#:python ,python-2))
21013 (home-page "https://github.com/gabrielfalcao/couleur")
21015 "ANSI terminal tool for python, colored shell and other handy fancy features")
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+)))
21023 (define-public python-misaka
21025 (name "python-misaka")
21030 (uri (pypi-uri "misaka" version))
21033 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
21034 (build-system python-build-system)
21036 `(;; Line 37 of setup.py calls self.run_command('develop')
21037 ;; in the 'check' phase. This command seems to be trying
21039 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
21040 ;; for which it does not have the permission to write.
21043 (list python-cffi))
21044 (home-page "https://github.com/FSX/misaka")
21045 (synopsis "Python binding for Hoedown")
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)))
21052 (define-public python2-misaka
21053 (package-with-python2 python-misaka))
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
21060 (name "python2-steadymark")
21065 (uri (pypi-uri "steadymark" version))
21068 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
21069 (build-system python-build-system)
21071 (list python2-couleur python2-sure python2-misaka))
21073 `(#:python ,python-2
21075 (modify-phases %standard-phases
21076 (add-before 'build 'patch-setup-py
21078 ;; Update requirements from dependency==version
21079 ;; to dependency>=version
21080 (substitute* "setup.py"
21083 (home-page "https://github.com/gabrielfalcao/steadymark")
21084 (synopsis "Markdown-based test runner for python")
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)))
21092 (define-public python-jsonpointer
21094 (name "python-jsonpointer")
21099 (uri (pypi-uri "jsonpointer" version))
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)))
21110 (define-public python2-jsonpointer
21111 (package-with-python2 python-jsonpointer))
21113 (define-public python-jsonpatch
21115 (name "python-jsonpatch")
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))
21127 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
21128 (build-system python-build-system)
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)))
21137 (define-public python2-jsonpatch
21138 (package-with-python2 python-jsonpatch))
21140 (define-public python-jsonpatch-0.4
21141 (package (inherit python-jsonpatch)
21142 (name "python-jsonpatch")
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))
21153 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
21155 (define-public python2-jsonpatch-0.4
21156 (package-with-python2 python-jsonpatch-0.4))
21158 (define-public python-rfc3986
21160 (name "python-rfc3986")
21164 (uri (pypi-uri "rfc3986" version))
21167 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
21168 (build-system python-build-system)
21171 (modify-phases %standard-phases
21174 (invoke "pytest" "-v"))))))
21176 (list python-pytest))
21177 (home-page "https://rfc3986.readthedocs.io/")
21178 (synopsis "Parse and validate URI references")
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)))
21185 (define-public python2-rfc3986
21186 (package-with-python2 python-rfc3986))
21188 (define-public python-rfc3987
21190 (name "python-rfc3987")
21195 (uri (pypi-uri "rfc3987" version))
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+)))
21206 (define-public python2-rfc3987
21207 (package-with-python2 python-rfc3987))
21209 ;; The latest commit contains fixes for building with both python3 and python2.
21210 (define-public python-rfc6555
21211 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
21214 (name "python-rfc6555")
21215 (version (git-version "0.0.0" revision commit))
21218 (uri (git-reference
21219 (url "https://github.com/sethmlarson/rfc6555")
21221 (file-name (git-file-name name version))
21224 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
21225 (build-system python-build-system)
21228 (modify-phases %standard-phases
21230 (lambda* (#:key tests? #:allow-other-keys)
21232 ;; Other tests require network access.
21233 (invoke "pytest" "tests/test_ipv6.py")
21236 (list python-pytest))
21237 (home-page "https://pypi.org/project/rfc6555/")
21238 (synopsis "Python implementation of RFC 6555")
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))))
21245 (define-public python-bagit
21247 (name "python-bagit")
21252 (uri (pypi-uri "bagit" version))
21255 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
21256 (build-system python-build-system)
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
21264 (license license:cc0)))
21266 (define-public python-prov
21268 (name "python-prov")
21273 (uri (pypi-uri "prov" version))
21276 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
21277 (build-system python-build-system)
21279 (list python-dateutil python-lxml python-networkx python-rdflib-5))
21281 (list graphviz python-pydot))
21282 (home-page "https://github.com/trungdong/prov")
21284 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
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)))
21290 (define-public python-arcp
21292 (name "python-arcp")
21297 (uri (pypi-uri "arcp" version))
21300 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
21301 (build-system python-build-system)
21303 (list python-pytest))
21304 (home-page "http://arcp.readthedocs.io/")
21306 "Archive and Package URI parser and generator")
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)))
21322 (define-public python-shellescape
21324 (name "python-shellescape")
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))
21335 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
21336 (build-system python-build-system)
21339 (modify-phases %standard-phases
21341 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
21343 (add-installed-pythonpath inputs outputs)
21344 (invoke "python" "tests/test_shellescape.py"))
21347 (list python-pytest))
21348 (home-page "https://github.com/chrissimpkins/shellescape")
21350 "Shell escape a string to safely use it as a token in a shell command")
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)))
21358 (define-public python-validators
21360 (name "python-validators")
21364 (uri (pypi-uri "validators" version))
21367 "19lypf7hm7p203ay3v8zmckc5rv6889zkfdm16nki1972f99mk9p"))))
21368 (build-system python-build-system)
21370 '(#:phases (modify-phases %standard-phases
21373 (invoke "pytest" "-vv"))))))
21375 (list python-decorator python-six))
21377 (list python-flake8 python-isort python-pytest))
21378 (home-page "https://github.com/kvesteri/validators")
21379 (synopsis "Data validation library")
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
21385 (license license:expat)))
21387 (define-public python-validate-email
21389 (name "python-validate-email")
21394 (uri (pypi-uri "validate_email" version))
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+)))
21405 (define-public python2-validate-email
21406 (package-with-python2 python-validate-email))
21408 (define-public python-flex
21410 (name "python-flex")
21415 (uri (pypi-uri "flex" version))
21418 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
21419 (build-system python-build-system)
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)))
21434 (define-public python2-flex
21435 (package-with-python2 python-flex))
21437 (define-public python-marshmallow
21439 (name "python-marshmallow")
21444 (uri (pypi-uri "marshmallow" version))
21447 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
21448 (build-system python-build-system)
21450 (list python-dateutil python-simplejson))
21452 (list python-pytest python-pytz))
21453 (home-page "https://github.com/marshmallow-code/marshmallow")
21454 (synopsis "Convert complex datatypes to and from native
21456 (description "@code{marshmallow} provides a library for converting
21457 complex datatypes to and from native Python datatypes.")
21458 (license license:expat)))
21460 (define-public python-marshmallow-jsonapi
21462 (name "python-marshmallow-jsonapi")
21467 (uri (pypi-uri "marshmallow-jsonapi" version))
21469 (base32 "1d9pxcgmln4gls99vwj1h24qv0lz7fb2jqmqrsiv1pid1snc125x"))))
21470 (build-system python-build-system)
21472 (list python-marshmallow))
21476 python-flake8-bugbear
21482 (home-page "https://github.com/marshmallow-code/marshmallow-jsonapi")
21483 (synopsis "JSON:API 1.0 formatting with Marshmallow")
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)))
21490 (define-public python-apispec
21492 (name "python-apispec")
21497 (uri (pypi-uri "apispec" version))
21500 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
21501 (build-system python-build-system)
21503 '(#:phases (modify-phases %standard-phases
21506 (invoke "pytest" "-vv"
21507 ;; Disable validation tests since they require
21508 ;; the optional 'prance' library which is not
21510 "-k" "not openapi_tools_validate"))))))
21512 (list python-pyyaml))
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
21520 (license license:expat)))
21522 (define-public python-flasgger
21524 (name "python-flasgger")
21529 (uri (git-reference
21530 (url "https://github.com/rochacbruno/flasgger")
21532 (file-name (git-file-name name version))
21534 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
21535 (build-system python-build-system)
21538 (modify-phases %standard-phases
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"))))))
21546 (list python-flask python-pyyaml python-jsonschema python-mistune
21549 (list python-decorator
21551 python-flask-restful
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)))
21563 (define-public python-swagger-spec-validator
21565 (name "python-swagger-spec-validator")
21570 (uri (pypi-uri "swagger-spec-validator" version))
21573 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
21574 (build-system python-build-system)
21576 (list python-jsonschema python-pyyaml python-six))
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)))
21584 (define-public python-apache-libcloud
21586 (name "python-apache-libcloud")
21591 (uri (pypi-uri "apache-libcloud" version))
21594 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
21595 (build-system python-build-system)
21598 (modify-phases %standard-phases
21599 (add-after 'unpack 'patch-ssh
21600 (lambda* (#:key inputs #:allow-other-keys)
21601 (substitute* "libcloud/compute/ssh.py"
21603 (string-append "'" (search-input-file inputs "/bin/ssh")
21605 (add-after 'unpack 'patch-tests
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
21613 (copy-file "libcloud/test/secrets.py-dist"
21614 "libcloud/test/secrets.py"))))))
21618 (list python-paramiko python-requests))
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)))
21628 (define-public python-smmap
21630 (name "python-smmap")
21635 (uri (pypi-uri "smmap" version))
21637 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
21638 (build-system python-build-system)
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)))
21647 (define-public python2-smmap
21648 (package-with-python2 python-smmap))
21650 (define-public python-regex
21652 (name "python-regex")
21653 (version "2022.1.18")
21656 (uri (pypi-uri "regex" version))
21659 "05ir92d0cmv8wkafn3r05j5q47l6shg7cpdblp2a8m407b02vwwp"))))
21660 (build-system python-build-system)
21663 (modify-phases %standard-phases
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)))
21676 (define-public python2-regex
21677 (package-with-python2 python-regex))
21679 (define-public python-pyopengl
21681 (name "python-pyopengl")
21686 (uri (pypi-uri "PyOpenGL" version))
21689 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
21690 (build-system python-build-system)
21692 (list mesa freeglut glu))
21694 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
21695 ;attribute 'OSMesa'
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")
21704 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
21706 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
21708 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
21710 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
21712 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
21713 ;; Not providing libgle. It seems to be very old.
21715 (home-page "http://pyopengl.sourceforge.net")
21716 (synopsis "Standard OpenGL bindings for Python")
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}
21721 (license license:bsd-3)))
21723 (define-public python-pyopengl-accelerate
21725 (inherit python-pyopengl)
21726 (name "python-pyopengl-accelerate")
21731 (uri (pypi-uri "PyOpenGL-accelerate" version))
21734 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
21736 (list mesa python-numpy)) ; for cython module
21737 ; numpy_formathandler, thus not propagated
21741 (modify-phases %standard-phases
21742 (delete 'fix-paths))))
21743 (synopsis "Acceleration code for PyOpenGL")
21745 "This is the Cython-coded accelerator module for PyOpenGL.")))
21747 (define-public python-rencode
21749 (name "python-rencode")
21754 (uri (pypi-uri "rencode" version))
21757 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
21758 (build-system python-build-system)
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.
21766 (delete-file "rencode/t.py")
21768 (native-inputs (list pkg-config python-cython))
21769 (home-page "https://github.com/aresch/rencode")
21770 (synopsis "Serialization of heterogeneous data structures")
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)))
21780 (define-public python2-rencode
21781 (package-with-python2 python-rencode))
21783 (define-public python-xenon
21785 (name "python-xenon")
21790 (uri (pypi-uri "xenon" version))
21793 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
21794 (build-system python-build-system)
21796 (list python-pyyaml python-radon python-requests python-flake8
21799 `(#:tests? #f ;test suite not shipped with the PyPI archive
21801 (modify-phases %standard-phases
21802 (add-before 'build 'patch-test-requirements
21804 ;; Remove httpretty dependency for tests.
21805 (substitute* "setup.py"
21806 (("httpretty") ""))
21808 (home-page "https://xenon.readthedocs.org/")
21809 (synopsis "Monitor code metrics for Python on your CI server")
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)))
21818 (define-public python-pysocks
21820 (name "python-pysocks")
21825 (uri (pypi-uri "PySocks" version))
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)))
21837 (define-public python2-pysocks
21838 (package-with-python2 python-pysocks))
21840 (define-public python-pydiff
21842 (name "python-pydiff")
21847 (uri (pypi-uri "pydiff" version))
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")
21855 "@code{pydiff} makes it easy to look for actual code changes while
21856 ignoring formatting changes.")
21857 (license license:expat)))
21859 (define-public python2-pydiff
21860 (package-with-python2 python-pydiff))
21862 (define-public python-pydub
21864 (name "python-pydub")
21869 (uri (pypi-uri "pydub" version))
21872 "03ykn2kp6qglsrzqi5h79z5cp3kl9mknasv0d6jv5jj9k77362lq"))))
21873 (build-system python-build-system)
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"))
21889 (home-page "https://pydub.com")
21893 (list python-scipy))
21894 (synopsis "Manipulate audio with a high level interface in Python")
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
21900 (define-public python-tqdm
21902 (name "python-tqdm")
21907 (uri (pypi-uri "tqdm" version))
21910 "03cjj8jl8iybvfjbpvdql5qfslzfv043g7w6nx8rhv2h2xrdwnfk"))))
21911 (build-system python-build-system)
21913 '(#:phases (modify-phases %standard-phases
21916 (invoke "pytest" "-vv"
21917 "-o" "asyncio_mode=auto"
21918 "-k" "not perf"))))))
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")
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))))
21930 (define-public python-pkginfo
21932 (name "python-pkginfo")
21937 (uri (pypi-uri "pkginfo" version))
21939 (base32 "1zrbn2gblb1q1rx0jlbd0vc9h1dm1bj0760p40ff5qjhcw5hsbjl"))))
21940 (build-system python-build-system)
21943 (modify-phases %standard-phases
21944 (add-before 'check 'patch-tests
21946 (substitute* "pkginfo/tests/test_installed.py"
21947 (("test_ctor_w_package_no_PKG_INFO")
21948 "_test_ctor_w_package_no_PKG_INFO")))))))
21950 (list python-wheel))
21951 (home-page "https://code.launchpad.net/~tseaver/pkginfo/trunk")
21952 (synopsis "Query metadatdata from sdists, bdists, and installed packages")
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)))
21961 (define-public python2-pkginfo
21962 (package-with-python2 python-pkginfo))
21964 (define-public python-twine
21966 (name "python-twine")
21971 (uri (pypi-uri "twine" version))
21973 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
21974 (build-system python-build-system)
21979 python-readme-renderer
21981 python-requests-toolbelt))
21982 (home-page "https://github.com/pypa/twine")
21983 (synopsis "Collection of utilities for interacting with PyPI")
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)))
21990 (define-public python-linecache2
21992 (name "python-linecache2")
21997 (uri (pypi-uri "linecache2" version))
22000 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
22001 (build-system python-build-system)
22003 `(;; The tests depend on unittest2, and our version is a bit too old.
22006 `(("python-pbr" ,python-pbr-minimal)))
22008 "https://github.com/testing-cabal/linecache2")
22009 (synopsis "Backports of the linecache module")
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)))
22016 (define-public python2-linecache2
22017 (package-with-python2 python-linecache2))
22019 (define-public python-traceback2
22021 (name "python-traceback2")
22026 (uri (pypi-uri "traceback2" version))
22029 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
22030 (build-system python-build-system)
22032 `(;; python-traceback2 and python-unittest2 depend on one another.
22035 `(("python-pbr" ,python-pbr-minimal)))
22037 (list python-linecache2 python-six))
22039 "https://github.com/testing-cabal/traceback2")
22040 (synopsis "Backports of the traceback module")
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)))
22047 (define-public python2-traceback2
22048 (package-with-python2 python-traceback2))
22050 (define-public python-ratelimiter
22052 (name "python-ratelimiter")
22057 (uri (pypi-uri "ratelimiter" version))
22060 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
22061 (build-system python-build-system)
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")
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)))
22071 (define-public python2-ratelimiter
22072 (package-with-python2 python-ratelimiter))
22074 (define-public python-jsonrpclib-pelix
22076 (name "python-jsonrpclib-pelix")
22081 (uri (pypi-uri "jsonrpclib-pelix" version))
22084 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
22085 (build-system python-build-system)
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")
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
22095 (license license:asl2.0)))
22097 (define-public python2-jsonrpclib-pelix
22098 (package-with-python2 python-jsonrpclib-pelix))
22100 (define-public python-setuptools-scm-git-archive
22102 (name "python-setuptools-scm-git-archive")
22107 (uri (pypi-uri "setuptools_scm_git_archive" version))
22110 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
22111 (build-system python-build-system)
22113 '(#:phases (modify-phases %standard-phases
22114 (add-after 'unpack 'dont-install-defunct-egginfo
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'\\):")
22123 (list python-pytest))
22125 (list python-setuptools-scm))
22126 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
22127 (synopsis "Setuptools_scm plugin for git archives")
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)))
22134 (define-public python2-setuptools-scm-git-archive
22135 (package-with-python2 python-setuptools-scm-git-archive))
22137 (define-public python-setuptools-git
22139 (name "python-setuptools-git")
22144 (uri (pypi-uri "setuptools-git" version))
22147 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
22148 (build-system python-build-system)
22151 (modify-phases %standard-phases
22152 ;; This is needed for tests.
22153 (add-after 'unpack 'configure-git
22155 (setenv "HOME" "/tmp")
22156 (invoke "git" "config" "--global" "user.email" "guix")
22157 (invoke "git" "config" "--global" "user.name" "guix")
22160 `(("git" ,git-minimal)))
22161 (home-page "https://github.com/msabramo/setuptools-git")
22162 (synopsis "Setuptools revision control system plugin for Git")
22164 "This package provides a plugin for Setuptools for revision control with
22166 (license license:bsd-3)))
22168 (define-public python-setuptools-rust
22170 (name "python-setuptools-rust")
22175 (uri (pypi-uri "setuptools-rust" version))
22177 (base32 "1lb57qx1azklgzmalflq960agvwci4bwddw0zvlc9zy00fsvkbd0"))))
22178 (build-system python-build-system)
22179 (arguments '(#:tests? #f)) ;no tests
22181 (list python-setuptools-scm))
22183 (list python-semantic-version python-typing-extensions))
22184 (home-page "https://github.com/PyO3/setuptools-rust")
22185 (synopsis "Setuptools plugin for Rust extensions")
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)))
22191 (define-public python-pyclipper
22193 (name "python-pyclipper")
22194 (version "1.1.0.post3")
22198 (uri (pypi-uri "pyclipper" version ".zip"))
22200 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
22201 (modules '((guix build utils)))
22204 ;; This file is generated by Cython.
22205 (delete-file "pyclipper/pyclipper.cpp") #t))))
22206 (build-system python-build-system)
22209 (modify-phases %standard-phases
22210 (add-before 'build 'cythonize-sources
22212 (with-directory-excursion "pyclipper"
22213 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
22215 (list python-setuptools-scm-git-archive))
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")
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)))
22226 (define-public python2-pyclipper
22227 (package-with-python2 python-pyclipper))
22229 (define-public python2-booleanoperations
22231 (name "python2-booleanoperations")
22236 (uri (pypi-uri "booleanOperations" version ".zip"))
22239 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
22240 (build-system python-build-system)
22242 `(#:python ,python-2))
22244 (list unzip python2-pytest python2-pytest-runner))
22246 (list python2-fonttools python2-pyclipper python2-ufolib))
22247 (home-page "https://github.com/typemytype/booleanOperations")
22248 (synopsis "Boolean operations on paths")
22250 "BooleanOperations provides a Python library that enables
22251 boolean operations on paths.")
22252 (license license:expat)))
22254 (define-public python-tempdir
22256 (name "python-tempdir")
22261 (uri (pypi-uri "tempdir" version))
22264 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
22265 (build-system python-build-system)
22266 (home-page "https://pypi.org/project/tempdir/")
22268 ;; the package has no tests
22270 (synopsis "Python library for managing temporary directories")
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)))
22277 (define-public python2-tempdir
22278 (package-with-python2 python-tempdir))
22280 (define-public python-tempora
22282 (name "python-tempora")
22287 (uri (pypi-uri "tempora" version))
22289 (base32 "09wirlk5vmxlhl9rnxp7g5qz2nsd6b0gnzk5fczbz0s8lsbz386b"))))
22290 (build-system python-build-system)
22294 #~(modify-phases %standard-phases
22295 ;; XXX: PEP 517 manual build copied from python-isort.
22298 (setenv "SOURCE_DATE_EPOCH" "315532800")
22299 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
22302 (let ((whl (car (find-files "dist" "\\.whl$"))))
22303 (invoke "pip" "--no-cache-dir" "--no-input"
22304 "install" "--no-deps" "--prefix" #$output whl))))
22306 (lambda* (#:key tests? #:allow-other-keys)
22308 ;; Do not test the myproject.toml build as it tries to pull
22309 ;; dependencies from the Internet.
22310 (invoke "pytest" "-k" "not project")))))))
22312 (list python-pypa-build
22315 python-pytest-black
22316 python-pytest-checkdocs
22318 python-pytest-enabler
22319 python-pytest-flake8
22320 python-pytest-freezegun
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)))
22334 (define-public python-activepapers
22336 (name "python-activepapers")
22341 (uri (pypi-uri "ActivePapers.Py" version))
22344 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
22345 (build-system python-build-system)
22347 `(#:modules ((ice-9 ftw)
22350 (guix build python-build-system))
22353 (modify-phases %standard-phases
22354 (add-after 'unpack 'delete-python2-code
22356 (for-each delete-file
22357 '("lib/activepapers/builtins2.py"
22358 "lib/activepapers/standardlib2.py"
22359 "lib/activepapers/utility2.py"))))
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)))
22372 (string-suffix? ".py" filename)))))))))
22374 (list python-tempdir python-nose))
22376 (list python-h5py))
22377 (home-page "https://www.activepapers.org/")
22378 (synopsis "Executable papers for scientific computing")
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)))
22387 (define-public python2-activepapers
22388 (let ((base (package-with-python2
22389 (strip-python2-variant python-activepapers))))
22390 (package/inherit base
22392 (substitute-keyword-arguments (package-arguments base)
22394 `(modify-phases ,phases
22395 (delete 'delete-python2-code)
22396 (add-after 'unpack 'delete-python3-code
22398 (for-each delete-file
22399 '("lib/activepapers/builtins3.py"
22400 "lib/activepapers/standardlib3.py"
22401 "lib/activepapers/utility3.py")))))))))))
22403 (define-public python-semver
22405 (name "python-semver")
22410 (uri (pypi-uri "semver" version))
22413 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
22414 (build-system python-build-system)
22416 `(#:phases (modify-phases %standard-phases
22419 (delete-file "setup.cfg")
22420 (invoke "py.test"))))))
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)))
22429 (define-public python2-semver
22430 (package-with-python2 python-semver))
22432 (define-public python-pyro4
22434 (name "python-pyro4")
22439 (uri (pypi-uri "Pyro4" version))
22441 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
22442 (build-system python-build-system)
22444 '(#:tests? #f)) ;FIXME: Some tests require network access.
22446 (list python-cloudpickle python-dill python-msgpack))
22448 (list python-serpent))
22449 (home-page "https://pyro4.readthedocs.io")
22450 (synopsis "Distributed object middleware for Python")
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)))
22457 (define-public python2-pyro
22459 (name "python2-pyro")
22464 (uri (pypi-uri "Pyro" version))
22465 (file-name (string-append "Pyro-" version ".tar.gz"))
22468 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
22469 (build-system python-build-system)
22471 ;; Pyro is not compatible with Python 3
22472 `(#:python ,python-2
22473 ;; Pyro has no test cases for automatic execution
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)))
22486 (define-public python2-scientific
22488 (name "python2-scientific")
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))
22499 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
22500 (build-system python-build-system)
22504 (list python2-numpy-1.8 python2-pyro))
22506 ;; ScientificPython is not compatible with Python 3
22507 `(#:python ,python-2
22508 #:tests? #f ; No test suite
22510 (modify-phases %standard-phases
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)))
22525 (define-public python2-mmtk
22527 (name "python2-mmtk")
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))
22538 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
22539 (build-system python-build-system)
22543 `(("python-scientific" ,python2-scientific)
22544 ("python-tkinter" ,python-2 "tk")))
22546 `(#:python ,python-2
22549 (modify-phases %standard-phases
22550 (add-before 'build 'includes-from-scientific
22551 (lambda* (#:key inputs #:allow-other-keys)
22552 (mkdir-p "Include/Scientific")
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)))
22567 (define-public python-phonenumbers
22569 (name "python-phonenumbers")
22574 (uri (pypi-uri "phonenumbers" version))
22577 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
22578 (build-system python-build-system)
22580 "https://github.com/daviddrysdale/python-phonenumbers")
22582 "Python library for dealing with international phone numbers")
22584 "This package provides a Python port of Google's libphonenumber library.")
22585 (license license:asl2.0)))
22587 (define-public python2-phonenumbers
22588 (package-with-python2 python-phonenumbers))
22590 (define-public python-heapdict
22592 (name "python-heapdict")
22597 (uri (pypi-uri "HeapDict" version))
22600 "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
22601 (build-system python-build-system)
22602 (home-page "http://stutzbachenterprises.com/")
22603 (synopsis "Heap with decrease-key and increase-key operations")
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
22608 (license license:bsd-3)))
22610 (define-public python-zict
22612 (name "python-zict")
22617 (uri (pypi-uri "zict" version))
22620 "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
22621 (build-system python-build-system)
22623 (list python-heapdict))
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)))
22634 (define-public python-send2trash
22636 (name "python-send2trash")
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")
22644 (file-name (git-file-name name version))
22647 "1k7dfypaaq4f36fbciaasv72j6wgjihw8d88axmz9c329bz8v5qx"))))
22648 (build-system python-build-system)
22651 (modify-phases %standard-phases
22652 (add-before 'check 'pre-check
22654 (setenv "HOME" "/tmp")))
22656 (lambda* (#:key tests? #:allow-other-keys)
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)))
22666 (define-public python-pyfavicon
22668 (name "python-pyfavicon")
22673 (uri (pypi-uri "pyfavicon" version))
22675 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
22676 (build-system python-build-system)
22678 ;; There are no tests in the PyPI tarball and the tests from the
22679 ;; repository require online data.
22682 (list python-aiohttp python-beautifulsoup4 python-pillow))
22683 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
22684 (synopsis "Async favicon fetcher")
22686 "@code{pyfavicon} is an async favicon fetcher.")
22687 (license license:expat)))
22689 (define-public python-yamllint
22691 (name "python-yamllint")
22696 (uri (pypi-uri "yamllint" version))
22698 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
22699 (build-system python-build-system)
22701 (list python-pathspec python-pyyaml python-setuptools))
22702 (home-page "https://github.com/adrienverge/yamllint")
22703 (synopsis "Linter for YAML files")
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+)))
22710 (define-public python-yapf
22712 (name "python-yapf")
22717 (uri (pypi-uri "yapf" version))
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)))
22730 (define-public python2-yapf
22731 (package-with-python2 python-yapf))
22733 (define-public python-yq
22740 (uri (pypi-uri "yq" version))
22743 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
22744 (build-system python-build-system)
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")
22754 (assoc-ref inputs "jq")
22758 (list python-argcomplete python-pyyaml python-xmltodict jq))
22760 (list python-coverage python-flake8 python-wheel))
22761 (home-page "https://github.com/kislyuk/yq")
22762 (synopsis "Command-line YAML/XML processor")
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)))
22769 (define-public python-gyp
22770 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
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))
22779 ;; Google does not release tarballs,
22780 ;; git checkout is needed.
22782 (uri (git-reference
22783 (url "https://chromium.googlesource.com/external/gyp")
22785 (file-name (git-file-name name version))
22788 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
22789 (build-system python-build-system)
22790 (home-page "https://gyp.gsrc.io/")
22791 (synopsis "GYP is a Meta-Build system")
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))))
22798 (define-public python2-gyp
22799 (package-with-python2 python-gyp))
22801 (define-public python-whatever
22803 (name "python-whatever")
22808 (uri (git-reference
22809 (url "https://github.com/Suor/whatever")
22811 (file-name (git-file-name name version))
22813 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
22814 (build-system python-build-system)
22817 (modify-phases %standard-phases
22820 (invoke "py.test"))))))
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)))
22829 (define-public python2-whatever
22830 (package-with-python2 python-whatever))
22832 (define-public python-funcy
22834 (name "python-funcy")
22839 (uri (git-reference
22840 (url "https://github.com/Suor/funcy")
22843 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
22844 (file-name (git-file-name name version))))
22845 (build-system python-build-system)
22848 (modify-phases %standard-phases
22851 (invoke "py.test"))))))
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.
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
22878 (license license:bsd-3)))
22880 (define-public python2-funcy
22881 (package-with-python2 python-funcy))
22883 (define-public python-isoweek
22885 (name "python-isoweek")
22890 (uri (pypi-uri "isoweek" version))
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)))
22903 (define-public python2-isoweek
22904 (package-with-python2 python-isoweek))
22906 (define-public python-pyzbar
22908 (name "python-pyzbar")
22912 ;; There's no source tarball on PyPI.
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))
22919 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
22920 (build-system python-build-system)
22923 (modify-phases %standard-phases
22924 (add-after 'unpack 'remove-failing-test
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")
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'")))
22938 (list pkg-config python-numpy python-pillow))
22941 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
22942 (synopsis "Read one-dimensional barcodes and QR codes")
22944 "Read one-dimensional barcodes and QR codes using the zbar library.
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
22954 (license license:expat)))
22956 (define-public python-tokenize-rt
22958 (name "python-tokenize-rt")
22963 (uri (pypi-uri "tokenize-rt" version))
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")
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)))
22977 (define-public python-future-fstrings
22979 (name "python-future-fstrings")
22984 (uri (pypi-uri "future_fstrings" version))
22987 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
22988 (build-system python-build-system)
22990 (list python-tokenize-rt))
22991 (home-page "https://github.com/asottile/future-fstrings")
22992 (synopsis "Backport of fstrings to Python < 3.6")
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)))
23000 (define-public python-typed-ast
23002 (name "python-typed-ast")
23007 (uri (git-reference
23008 (url "https://github.com/python/typed_ast")
23011 (base32 "1xfcs5246c8v5600aaa8zs7ii4sxb62q6r3sb2fgazyjx97wrxd9"))
23012 (file-name (git-file-name name version))))
23013 (build-system python-build-system)
23016 (modify-phases %standard-phases
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
23032 license:expat)))) ;ast27/Parser/spark.py
23034 (define-public python-typer
23036 (name "python-typer")
23040 ;; Building `python-typer` from the git repository requires the `flit-core`
23041 ;; Python package that is not installed by `python-flit`.
23043 (uri (pypi-uri "typer" version))
23045 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
23046 (build-system python-build-system)
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
23054 (substitute* "tests/test_completion/test_completion.py"
23055 (("\"bash\"") (string-append "\"" (which "bash") "\""))
23056 (("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
23058 (lambda* (#:key tests? #:allow-other-keys)
23060 (setenv "HOME" "/tmp") ; some tests need it
23062 ;; This is for completion tests
23063 (with-output-to-file "/tmp/.bashrc" (lambda _ (display "# dummy")))
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/"
23072 (string-append "not "
23073 (string-join disabled-tests
23074 " and not "))))))))))
23076 (list python-click))
23078 (list python-coverage python-pytest python-shellingham))
23079 (home-page "https://github.com/tiangolo/typer")
23081 "Typer builds CLI based on Python type hints")
23083 "Typer is a library for building CLI applications. It's based on
23084 Python 3.6+ type hints.")
23086 (license license:expat)))
23088 (define-public python-typeguard
23090 (name "python-typeguard")
23095 (uri (pypi-uri "typeguard" version))
23097 (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))))
23098 (build-system python-build-system)
23102 #~(modify-phases %standard-phases
23104 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
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")
23115 "@code{typeguard} provides run-time type checking for functions defined
23116 with PEP 484 argument (and return) type annotations.")
23117 (license license:expat)))
23119 (define-public python2-typing
23121 (name "python2-typing")
23122 (version "3.10.0.0")
23126 (uri (pypi-uri "typing" version))
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
23139 (license license:psfl)))
23141 (define-public python-typing-extensions
23143 (name "python-typing-extensions")
23146 ;; The test script is missing from the PyPI archive.
23148 (uri (git-reference
23149 (url "https://github.com/python/typing")
23151 (file-name (git-file-name name version))
23154 "0a35fh5wk9s538x0w3dz95y0avnhd2srzyv9s1a372711n8hdl4p"))))
23155 (build-system python-build-system)
23158 #:tests? #f ;requires Python's test module, not available in Guix
23160 #~(modify-phases %standard-phases
23161 (add-after 'unpack 'enter-source-directory
23163 (chdir "typing_extensions")))
23164 ;; XXX: PEP 517 manual build copied from python-isort.
23167 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
23169 (lambda* (#:key tests? #:allow-other-keys)
23171 (invoke "python" "src/test_typing_extensions.py"))))
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")
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:
23186 @item ContextManager
23197 @item TYPE_CHECKING
23198 @item AsyncGenerator
23200 (license license:psfl)))
23202 (define-public bpython
23209 (uri (pypi-uri "bpython" version))
23211 (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
23212 (build-system python-build-system)
23215 (modify-phases %standard-phases
23216 (add-after 'unpack 'remove-failing-test
23218 ;; Remove failing test. FIXME: make it pass
23219 (delete-file "bpython/test/test_args.py")
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")))
23227 (symlink old (string-append out "/bin/" new)))
23228 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
23229 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
23232 (list python-pygments
23239 ;; optional dependencies
23240 python-urwid ; for bpython-urwid only
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
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
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.
23260 (license license:expat)))
23262 (define-public python-pyinotify
23264 (name "python-pyinotify")
23268 (uri (pypi-uri "pyinotify" version))
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")
23277 "@code{pyinotify} provides a Python interface for monitoring
23278 file system events on Linux.")
23279 (license license:expat)))
23281 (define-public python2-pyinotify
23282 (package-with-python2 python-pyinotify))
23284 ;; Ada parser uses this version.
23285 (define-public python2-quex-0.67.3
23287 (name "python2-quex")
23292 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
23293 (version-major+minor version)
23294 "/quex-" version ".zip"))
23297 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
23298 (build-system python-build-system)
23302 `(#:python ,python-2
23305 (modify-phases %standard-phases
23306 (delete 'configure)
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)
23315 (symlink (string-append share/quex "/quex-exe.py")
23316 (string-append bin "/quex"))
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
23327 (define-public python2-quex
23328 (package (inherit python2-quex-0.67.3)
23329 (name "python2-quex")
23334 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
23337 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
23338 (file-name (string-append name "-" version ".tar.gz"))))))
23340 (define-public python-more-itertools
23342 (name "python-more-itertools")
23347 (uri (pypi-uri "more-itertools" version))
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)))
23361 ;; The 5.x series are the last versions supporting Python 2.7.
23362 (define-public python2-more-itertools
23364 (inherit python-more-itertools)
23365 (name "python2-more-itertools")
23369 (uri (pypi-uri "more-itertools" version))
23372 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
23374 `(#:python ,python-2))
23376 `(("python2-six" ,python2-six-bootstrap)))))
23378 (define-public python-latexcodec
23380 (name "python-latexcodec")
23385 (uri (pypi-uri "latexcodec" version))
23387 (base32 "16pynfnn8y8xp55yp06i721fccv5dlx9ba6k5bzcwq9j6wf5b8ia"))))
23388 (build-system python-build-system)
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)))
23396 (define-public python-pybtex
23398 (name "python-pybtex")
23403 (uri (pypi-uri "pybtex" version))
23405 (base32 "0ma7sc10hk6caq5zghbk865vrlaynz7x5z630z0facqpnqssx3l1"))))
23406 (build-system python-build-system)
23408 (list python-pytest))
23410 (list python-latexcodec python-pyyaml python-six))
23413 #:phases #~(modify-phases %standard-phases
23415 (lambda* (#:key tests? #:allow-other-keys)
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)))
23424 (define-public python-onetimepass
23426 (name "python-onetimepass")
23431 (uri (pypi-uri "onetimepass" version))
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)))
23442 (define-public python-parso
23444 (name "python-parso")
23449 (uri (pypi-uri "parso" version))
23451 (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
23453 (list python-pytest))
23454 (build-system python-build-system)
23456 `(#:phases (modify-phases %standard-phases
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)))
23466 (define-public python2-parso
23467 (package-with-python2 python-parso))
23469 (define-public python-async-generator
23471 (name "python-async-generator")
23476 (uri (pypi-uri "async_generator" version))
23479 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
23480 (build-system python-build-system)
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.")
23488 (license (list license:expat license:asl2.0))))
23490 (define-public python-async-timeout
23492 (name "python-async-timeout")
23497 (uri (pypi-uri "async-timeout" version))
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)))
23508 (define-public python-glob2
23510 (name "python-glob2")
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))
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
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).
23538 Glob2 currently based on the glob code from Python 3.3.1.")
23539 (license license:bsd-2)))
23541 (define-public python2-glob2
23542 (package-with-python2 python-glob2))
23544 (define-public python-gipc
23546 (name "python-gipc")
23551 (uri (pypi-uri "gipc" version ".zip"))
23554 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
23555 (build-system python-build-system)
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)))
23568 (define-public python-beautifultable
23570 (name "python-beautifultable")
23575 (uri (pypi-uri "beautifultable" version))
23578 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
23579 (build-system python-build-system)
23581 (list python-wcwidth))
23584 (modify-phases %standard-phases
23585 (add-after 'unpack 'patch-setup.py
23587 (substitute* "setup.py"
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.
23595 Features include, but are not limited to:
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.
23604 (license license:expat)))
23606 (define-public python-globber
23608 (name "python-globber")
23613 (uri (git-reference
23614 (url "https://github.com/asharov/globber")
23616 (file-name (git-file-name name version))
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")
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
23629 (license license:asl2.0)))
23631 (define-public python-git-hammer
23633 (name "python-git-hammer")
23638 (uri (git-reference
23639 (url "https://github.com/asharov/git-hammer")
23641 (file-name (git-file-name name version))
23644 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
23645 (build-system python-build-system)
23648 (modify-phases %standard-phases
23649 (add-after 'unpack 'patch-setup.py
23651 (substitute* "setup.py"
23653 "setup(\n test_suite=\"test\",")))))))
23655 (list python-beautifultable
23661 python-sqlalchemy-utils))
23662 (home-page "https://github.com/asharov/git-hammer")
23663 (synopsis "Provide statistics for git repositories")
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)))
23670 (define-public python-fusepy
23672 (name "python-fusepy")
23677 (uri (pypi-uri "fusepy" version))
23680 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
23681 (build-system python-build-system)
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'")))
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)))
23700 (define-public python2-fusepy
23701 (package-with-python2 python-fusepy))
23703 (define-public python-fusepyng
23705 (name "python-fusepyng")
23710 (uri (pypi-uri "fusepyng" version))
23713 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
23714 (build-system python-build-system)
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\""))))
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)))
23736 (define-public python-update-checker
23738 (name "python-update-checker")
23743 (uri (pypi-uri "update-checker" version))
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
23753 (license license:bsd-2)))
23755 (define-public python-userspacefs
23757 (name "python-userspacefs")
23762 (uri (pypi-uri "userspacefs" version))
23765 "06f2gsiypas270nqfjir4wwjlpkjp097pm6zchc7k20ggg32gv1k"))))
23766 (build-system python-build-system)
23768 (list python-fusepyng))
23769 (home-page "https://github.com/rianhunter/userspacefs")
23770 (synopsis "User-space file systems for Python")
23772 "@code{userspacefs} is a library that allows you to easily write
23773 user-space file systems in Python.")
23774 (license license:gpl3+)))
23776 (define-public python-stone
23778 (name "python-stone")
23783 (uri (pypi-uri "stone" version))
23786 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
23787 (build-system python-build-system)
23790 (modify-phases %standard-phases
23791 (add-after 'unpack 'change-version-requirements
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"))))
23800 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
23808 (list python-ply python-six))
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")
23814 "Stone is an interface description language (IDL) for APIs.")
23815 (license license:expat)))
23817 (define-public pybind11
23823 (uri (git-reference
23824 (url "https://github.com/pybind/pybind11")
23825 (commit (string-append "v" version))))
23828 "10hrkrh78sk7k0ydw1ghmp7gvpwmkby0l2s0kf2iaj9sz0vijkhs"))
23829 (file-name (git-file-name name version))))
23830 (build-system cmake-build-system)
23832 `(("python" ,python-wrapper)
23834 ;; The following dependencies are used for tests.
23835 ("python-pytest" ,python-pytest)
23836 ("catch" ,catch-framework2-1)
23839 `(#:configure-flags
23840 (list (string-append "-DCATCH_INCLUDE_DIR="
23841 (assoc-ref %build-inputs "catch")
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"
23853 (string-append "--prefix=" out)))))))
23855 #:test-target "check"))
23856 (home-page "https://github.com/pybind/pybind11/")
23857 (synopsis "Seamless operability between C++11 and Python")
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)))
23866 (define-public python-pooch
23868 (name "python-pooch")
23873 (uri (pypi-uri "pooch" version))
23875 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
23876 (build-system python-build-system)
23878 `(#:tests? #f)) ;requires online data
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")
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)))
23889 (define-public python-fasteners
23891 (name "python-fasteners")
23896 (uri (pypi-uri "fasteners" version))
23899 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
23900 (build-system python-build-system)
23902 (list python-monotonic python-six))
23904 (list python-testtools))
23905 (home-page "https://github.com/harlowja/fasteners")
23906 (synopsis "Python package that provides useful locks")
23908 "This package provides a Python program that provides following locks:
23911 @item Locking decorator
23912 @item Reader-writer locks
23913 @item Inter-process locks
23914 @item Generic helpers
23916 (license license:asl2.0)))
23918 (define-public python-requests-file
23920 (name "python-requests-file")
23925 (uri (pypi-uri "requests-file" version))
23928 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
23929 (build-system python-build-system)
23931 (list python-requests python-six))
23933 "https://github.com/dashea/requests-file")
23934 (synopsis "File transport adapter for Requests")
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)))
23940 (define-public python2-requests-file
23941 (package-with-python2 python-requests-file))
23943 (define-public python-identify
23945 (name "python-identify")
23949 ;; There are no tests in the PyPI tarball.
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))
23956 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
23957 (build-system python-build-system)
23960 (modify-phases %standard-phases
23961 ;; system-error "utime" "~A" ("No such file or directory")
23962 (delete 'ensure-no-mtimes-pre-1980)
23964 (lambda* (#:key tests? #:allow-other-keys)
23966 (invoke "pytest" "-vv")))))))
23968 (list python-coverage python-pytest))
23970 (list python-editdistance))
23971 (home-page "https://github.com/chriskuehl/identify")
23972 (synopsis "File identification library for Python")
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)))
23979 (define-public python-tldextract
23981 (name "python-tldextract")
23986 (uri (pypi-uri "tldextract" version))
23989 "1wac4yvcpgqjvls770mfx165amvy7gr00nnd2w24bqqwyamj9kdd"))))
23990 (build-system python-build-system)
23992 (list python-pytest python-responses python-setuptools-scm))
23994 (list python-filelock python-idna python-requests python-requests-file))
23996 "https://github.com/john-kurkowski/tldextract")
23998 "Separate the TLD from the registered domain and subdomains of a URL")
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)))
24006 (define-public python2-tldextract
24007 (package-with-python2 python-tldextract))
24009 (define-public python-tldr
24011 (name "python-tldr")
24015 ;; There's no test in PyPI.
24017 (uri (git-reference
24018 (url "https://github.com/tldr-pages/tldr-python-client")
24020 (file-name (git-file-name name version))
24022 (base32 "1hxmprqg8c4cvs19n7f80f3y7jj74i8sc2dmq2gdjmsdrb54bbzc"))))
24023 (build-system python-build-system)
24026 #~(modify-phases %standard-phases
24027 (add-after 'build 'build-doc
24029 (invoke "make" "-C" "docs")))
24031 (lambda* (#:key tests? #:allow-other-keys)
24033 ;; This test fails. It tries to open a network socket.
24034 (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
24036 (list python-pytest python-pytest-runner python-sphinx-argparse))
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
24046 (define-public python-nodeenv
24048 (name "python-nodeenv")
24052 ;; There's no tarball in PyPI.
24054 (uri (git-reference
24055 (url "https://github.com/ekalinin/nodeenv")
24057 (file-name (git-file-name name version))
24059 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
24060 (build-system python-build-system)
24063 (modify-phases %standard-phases
24066 ;; This test fails. It tries to open a network socket.
24067 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
24069 (list python-coverage python-mock python-pytest))
24070 (home-page "https://ekalinin.github.io/nodeenv/")
24071 (synopsis "Create isolated node.js environments")
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
24077 (license license:bsd-3)))
24079 (define-public python-pynamecheap
24081 (name "python-pynamecheap")
24086 (uri (pypi-uri "PyNamecheap" version))
24089 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
24090 (build-system python-build-system)
24092 (list python-requests))
24094 "https://github.com/Bemmu/PyNamecheap")
24096 "Namecheap API client in Python")
24098 "PyNamecheap is a Namecheap API client in Python.")
24099 (license license:expat)))
24101 (define-public python2-pynamecheap
24102 (package-with-python2 python-pynamecheap))
24104 (define-public python-dns-lexicon
24106 (name "python-dns-lexicon")
24111 (uri (pypi-uri "dns-lexicon" version))
24114 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
24115 (build-system python-build-system)
24117 `(#:tests? #f)) ;requires internet access
24119 (list python-future python-pynamecheap python-requests
24120 python-tldextract python-urllib3))
24121 (home-page "https://github.com/AnalogJ/lexicon")
24123 "Manipulate DNS records on various DNS providers")
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
24129 (license license:expat)))
24131 (define-public python2-dns-lexicon
24132 (package-with-python2 python-dns-lexicon))
24134 (define-public python-cfgv
24136 (name "python-cfgv")
24140 ;; There are no tests in the PyPI tarball.
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))
24147 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
24148 (build-system python-build-system)
24151 (modify-phases %standard-phases
24154 (invoke "pytest" "-vv"))))))
24156 (list python-covdefaults python-coverage python-pytest))
24157 (home-page "https://github.com/asottile/cfgv")
24158 (synopsis "Configuration validation library")
24160 "This library helps to validate configuration files and produce human
24161 readable error messages.")
24162 (license license:expat)))
24164 (define-public python-commandlines
24166 (name "python-commandlines")
24171 (uri (pypi-uri "commandlines" version))
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")
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)))
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
24188 (name "python-numba")
24193 (uri (pypi-uri "numba" version))
24196 "18rf8i32m1045zxglvicpgldvzmqdxqvs3dhjd7wilb64sd0ds83"))))
24197 (build-system python-build-system)
24200 (modify-phases %standard-phases
24201 (add-after 'unpack 'disable-proprietary-features
24203 (setenv "NUMBA_DISABLE_HSA" "1")
24204 (setenv "NUMBA_DISABLE_CUDA" "1")))
24205 (add-after 'unpack 'disable-failing-tests
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"))))
24212 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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"))))))))
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.
24233 Numba works by generating optimized machine code using the LLVM compiler
24234 infrastructure at import time, runtime, or statically (using the included pycc
24236 (license license:bsd-3)))
24238 (define-public python-numcodecs
24240 (name "python-numcodecs")
24245 (uri (pypi-uri "numcodecs" version))
24248 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))
24249 (modules '((guix build utils)))
24252 (delete-file-recursively "c-blosc")
24253 (for-each delete-file '("numcodecs/blosc.c"
24254 "numcodecs/compat_ext.c"
24257 "numcodecs/zstd.c"))))))
24258 (build-system python-build-system)
24260 `(#:tests? #false ; TODO: unclear why numcodecs.* are not found
24262 (modify-phases %standard-phases
24263 (add-after 'unpack 'disable-avx2
24265 (setenv "DISABLE_NUMCODECS_AVX2" "1")))
24266 (add-after 'unpack 'unbundle
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'], "))))
24280 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24282 (add-installed-pythonpath inputs outputs)
24283 (invoke "pytest" "-vv")))))))
24285 (list c-blosc lz4 zlib
24288 (list python-numpy python-msgpack))
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")
24294 "This Python package provides buffer compression and transformation
24295 codecs for use in data storage and communication applications.")
24296 (license license:expat)))
24298 (define-public python-asciitree
24300 (name "python-asciitree")
24305 (uri (pypi-uri "asciitree" version))
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)))
24315 (define-public python-zarr
24317 (name "python-zarr")
24322 (uri (pypi-uri "zarr" version))
24325 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
24326 (build-system python-build-system)
24329 (modify-phases %standard-phases
24330 (add-after 'unpack 'disable-service-tests
24332 (setenv "ZARR_TEST_ABS" "0")
24333 (setenv "ZARR_TEST_MONGO" "0")
24334 (setenv "ZARR_TEST_REDIS" "0")
24338 (invoke "pytest" "-vv" "-k" "not lmdb")
24341 (list python-asciitree python-fasteners python-numcodecs
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")
24348 "This package provides an implementation of chunked, compressed,
24349 N-dimensional arrays for Python.")
24350 (license license:expat)))
24352 (define-public python-anndata
24354 (name "python-anndata")
24358 ;; The tarball from PyPi doesn't include tests.
24360 (uri (git-reference
24361 (url "https://github.com/theislab/anndata")
24363 (file-name (git-file-name name version))
24366 "0v7npqrg1rdm8jzw22a45c0mqrmsv05r3k88i3lhzi0pzzxca1i1"))))
24367 (build-system python-build-system)
24370 (modify-phases %standard-phases
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")))
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$"))))))))
24392 python-importlib-metadata
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)))
24411 (define-public python-dill
24413 (name "python-dill")
24414 (version "0.3.1.1")
24418 (uri (pypi-uri "dill" version))
24420 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
24421 (build-system python-build-system)
24424 (modify-phases %standard-phases
24427 (with-directory-excursion "/tmp"
24428 (invoke "nosetests" "-v"))
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)))
24445 (define-public python-multiprocess
24447 (name "python-multiprocess")
24452 (uri (pypi-uri "multiprocess" version))
24455 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
24456 (build-system python-build-system)
24459 (modify-phases %standard-phases
24460 (add-after 'unpack 'disable-broken-tests
24462 ;; This test is broken as there is no keyboard interrupt.
24463 (substitute* "py3.7/multiprocess/tests/__init__.py"
24464 (("^(.*)def test_wait_result"
24466 (string-append indent
24467 "@unittest.skip(\"Disabled by Guix\")\n"
24470 ;; Tests must be run after installation.
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")
24478 (list python-dill))
24479 (home-page "https://pypi.org/project/multiprocess/")
24480 (synopsis "Multiprocessing and multithreading in Python")
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)))
24487 (define-public python-toolrack
24489 (name "python-toolrack")
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))
24500 "0ych11b7nchnkhqgf7dgivbvn2lzafjsi7nhb1an5zjjyns39gpx"))))
24501 (build-system python-build-system)
24505 #~(modify-phases %standard-phases
24506 (add-after 'unpack 'patch-/bin/sh
24508 (substitute* "toolrack/aio/tests/test_process.py"
24512 (lambda* (#:key tests? #:allow-other-keys)
24514 (invoke "pytest" "-vv" "--pyargs" "toolrack"
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+)))
24530 (define-public python-toolz
24532 (name "python-toolz")
24537 (uri (pypi-uri "toolz" version))
24540 "0cxwlh8dz8gq0l0bzchjnqqwhdp261nfd958ppqm518k2mg2scbb"))))
24541 (build-system python-build-system)
24544 (modify-phases %standard-phases
24546 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24548 (add-installed-pythonpath inputs outputs)
24549 (invoke "python" "-m" "pytest" "--doctest-modules"
24550 "--pyargs" "toolz")))))))
24552 (list python-pytest))
24553 (home-page "https://github.com/pytoolz/toolz/")
24554 (synopsis "List processing tools and functional utilities")
24556 "This package provides a set of utility functions for iterators,
24557 functions, and dictionaries.")
24558 (license license:bsd-3)))
24560 (define-public python-cytoolz
24562 (name "python-cytoolz")
24567 (uri (pypi-uri "cytoolz" version))
24570 "1d12mgaippxxhn24w2hj0my3aqkx80fks5g4wzfdsvl0acqnc8za"))
24571 (modules '((guix build utils)))
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
24577 (arguments '(#:tests? #f))
24579 (list python-toolz))
24581 (list python-cython))
24582 (home-page "https://github.com/pytoolz/cytoolz")
24583 (synopsis "High performance functional utilities")
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)))
24590 (define-public python-sortedcollections
24592 (name "python-sortedcollections")
24597 (uri (pypi-uri "sortedcollections" version))
24600 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
24601 (build-system python-build-system)
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)))
24610 (define-public python-sortedcontainers
24612 (name "python-sortedcontainers")
24617 (uri (pypi-uri "sortedcontainers" version))
24620 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
24621 (build-system python-build-system)
24623 ;; FIXME: Tests require many extra dependencies, and would introduce
24624 ;; a circular dependency on hypothesis, which uses this package.
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")
24634 "This package provides a sorted collections library, written in
24636 (license license:asl2.0)))
24638 (define-public python2-sortedcontainers
24639 (package-with-python2 python-sortedcontainers))
24641 (define python-cloudpickle-testpkg
24643 (name "python-cloudpickle-testpkg")
24647 ;; Archive on pypi does not include test infrastructure.
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))
24655 "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
24656 (build-system python-build-system)
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")
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
24670 (license license:bsd-3)))
24672 (define-public python-cloudpickle
24674 (inherit python-cloudpickle-testpkg)
24675 (name "python-cloudpickle")
24676 (build-system python-build-system)
24679 (modify-phases %standard-phases
24681 (lambda* (#:key tests? #:allow-other-keys)
24683 (invoke "pytest" "-s" "-vv")
24684 (format #t "test suite not run~%")))))))
24686 (list ;; For tests.
24687 python-cloudpickle-testpkg python-psutil python-pytest
24689 (home-page "https://github.com/cloudpipe/cloudpickle")
24690 (synopsis "Extended pickling support for Python objects")
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
24697 (properties `((python2-variant . ,(delay python2-cloudpickle))))
24698 (license license:bsd-3)))
24700 (define-public python2-cloudpickle
24701 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
24702 (package/inherit base
24707 (uri (pypi-uri "cloudpickle" version))
24710 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
24713 ("python-mock" ,python2-mock)
24714 ("python-psutil" ,python2-psutil)
24715 ("python-pytest" ,python2-pytest)
24716 ("python-tornado" ,python2-tornado)))
24718 `(("python-futures" ,python2-futures)
24719 ,@(package-propagated-inputs base))))))
24721 (define-public python-locket
24723 (name "python-locket")
24728 (uri (pypi-uri "locket" version))
24731 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
24732 (build-system python-build-system)
24733 (home-page "https://github.com/mwilliamson/locket.py")
24734 (synopsis "File-based locks for Python")
24736 "Locket implements a lock that can be used by multiple processes provided
24737 they use the same path.")
24738 (license license:bsd-2)))
24740 (define-public python2-locket
24741 (package-with-python2 python-locket))
24743 (define-public python-blosc
24745 (name "python-blosc")
24750 (uri (pypi-uri "blosc" version))
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))
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.
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.
24771 This Python package wraps the Blosc library.")
24772 (license license:bsd-3)))
24774 (define-public python2-blosc
24775 (package-with-python2 python-blosc))
24777 (define-public python-partd
24779 (name "python-partd")
24784 (uri (pypi-uri "partd" version))
24787 "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
24788 (build-system python-build-system)
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)))
24802 (define-public python-fsspec
24804 (name "python-fsspec")
24809 (uri (pypi-uri "fsspec" version))
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)))
24824 ;; Note: Remember to update python-distributed when updating dask.
24825 (define-public python-dask
24827 (name "python-dask")
24828 (version "2021.11.2")
24832 (uri (git-reference
24833 (url "https://github.com/dask/dask/")
24834 (commit "5a8275dd53193b47457cdfadc0e2356ea3eb6ccd")))
24835 (file-name (git-file-name name version))
24837 (base32 "0h8w7c03mn6s2mmwbqd2sqay3k4vaqiwlsbvliziggw28042zfw2"))
24839 ;; Delete generated copy of python-versioneer. We recreate it below.
24840 '(delete-file "versioneer.py"))))
24841 (build-system python-build-system)
24844 (modify-phases %standard-phases
24845 (add-after 'unpack 'versioneer
24847 (invoke "versioneer" "install")))
24849 (lambda* (#:key tests? #:allow-other-keys)
24850 (when tests? (invoke "pytest" "-vv")))))))
24852 (list python-cloudpickle
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")
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)))
24874 (define-public python-ilinkedlist
24876 (name "python-ilinkedlist")
24881 (uri (pypi-uri "ilinkedlist" version))
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")
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+)))
24899 (define-public python-readlike
24901 (name "python-readlike")
24906 (uri (pypi-uri "readlike" version))
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")
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.
24919 Currently, all stateless Readline commands are implemented. Yanking and history
24920 are not supported.")
24921 (license license:expat)))
24923 (define-public python2-readlike
24924 (package-with-python2 python-readlike))
24926 (define-public python-reparser
24928 (name "python-reparser")
24933 (uri (pypi-uri "ReParser" version))
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")
24940 "This Python library provides a simple lexer/parser for inline markup based
24941 on regular expressions.")
24942 (license license:expat)))
24944 (define-public python2-reparser
24945 (let ((reparser (package-with-python2
24946 (strip-python2-variant python-reparser))))
24947 (package/inherit reparser
24949 `(("python2-enum34" ,python2-enum34)
24950 ,@(package-propagated-inputs reparser))))))
24952 (define-public python-retrying
24954 (name "python-retrying")
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))
24965 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
24966 (build-system python-build-system)
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.
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.
24983 (license license:asl2.0)))
24985 (define-public python-pre-commit
24987 (name "python-pre-commit")
24992 (uri (pypi-uri "pre_commit" version))
24994 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
24995 (build-system python-build-system)
24997 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
24998 ;; attribute 'empty_template_setup'".
24999 `(#:tests? #false))
25003 python-importlib-metadata
25004 python-importlib-resources
25008 python-virtualenv))
25009 (home-page "https://github.com/pre-commit/pre-commit")
25010 (synopsis "Framework for managing multi-language pre-commit hooks")
25012 "This package provides a framework for managing and maintaining
25013 multi-language pre-commit hooks.")
25014 (license license:expat)))
25016 (define-public python-precis-i18n
25018 (name "python-precis-i18n")
25023 (uri (pypi-uri "precis_i18n" version))
25026 "1qfb78zpx565vqkg0xhx75pna9sc35m370vpcz82982c8ix3ypyz"))))
25027 (build-system python-build-system)
25028 (home-page "https://github.com/byllyfish/precis_i18n")
25029 (synopsis "Implementation of the PRECIS framework")
25031 "This module implements the PRECIS Framework as described in RFC 8264,
25032 RFC 8265 and RFC 8266.")
25033 (license license:expat)))
25035 (define-public python-absl-py
25037 (name "python-absl-py")
25042 (uri (pypi-uri "absl-py" version))
25045 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
25046 (build-system python-build-system)
25049 (home-page "https://github.com/abseil/abseil-py")
25050 (synopsis "Abseil Python common libraries")
25052 "This package provides the Abseil Python Common Libraries, a collection
25053 of Python libraries for building Python applications.")
25054 (license license:asl2.0)))
25056 (define-public python-astor
25058 (name "python-astor")
25063 (uri (pypi-uri "astor" version))
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)))
25076 (define-public python2-astor
25077 (package-with-python2 python-astor))
25079 (define-public python-astunparse
25081 (name "python-astunparse")
25086 (uri (pypi-uri "astunparse" version))
25088 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
25089 (build-system python-build-system)
25090 (arguments '(#:tests? #f)) ; there are none
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
25098 (license license:bsd-3)))
25100 (define-public python-gast
25102 (name "python-gast")
25107 (uri (pypi-uri "gast" version))
25109 (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
25110 (build-system python-build-system)
25112 (list python-astunparse))
25113 (home-page "https://pypi.org/project/gast/")
25114 (synopsis "Generic Python AST that abstracts the underlying Python version")
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}
25119 (license license:bsd-3)))
25121 (define-public python-wikidata
25123 (name "python-wikidata")
25128 (uri (pypi-uri "Wikidata" version))
25131 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
25132 (build-system python-build-system)
25134 (list python-babel))
25135 (home-page "https://github.com/dahlia/wikidata")
25136 (synopsis "Wikidata client library")
25138 "This package provides a Python interface to
25139 @url{https://www.wikidata.org/, Wikidata}.")
25140 (properties '((upstream-name . "Wikidata")))
25141 (license license:gpl3+)))
25143 (define-public python-doctest-ignore-unicode
25145 (name "python-doctest-ignore-unicode")
25150 (uri (pypi-uri "doctest-ignore-unicode" version))
25153 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
25154 (build-system python-build-system)
25156 (list python-nose))
25157 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
25158 (synopsis "Ignore Unicode literal prefixes in doctests")
25160 "This package adds support for a flag to ignore Unicode literal prefixes
25162 (license license:asl2.0)))
25164 (define-public python-attr
25166 (name "python-attr")
25171 (uri (pypi-uri "attr" version))
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)))
25182 (define-public python-construct
25184 (name "python-construct")
25185 (version "2.10.56")
25189 (uri (pypi-uri "construct" version))
25192 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
25193 (build-system python-build-system)
25195 `(#:tests? #f)) ; No tests exist.
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")
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)))
25209 (define-public python-outcome
25211 (name "python-outcome")
25216 (uri (pypi-uri "outcome" version))
25218 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
25219 (build-system python-build-system)
25222 (modify-phases %standard-phases
25224 (lambda* (#:key inputs outputs #:allow-other-keys)
25225 (add-installed-pythonpath inputs outputs)
25226 (invoke "pytest" "-vv"))))))
25228 (list python-pytest python-pytest-cov python-pytest-asyncio))
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")
25234 "Capture the outcome of Python function calls. Extracted from the Trio
25236 ;; Either license applies.
25237 (license (list license:expat license:asl2.0))))
25239 (define-public python-trio
25241 (name "python-trio")
25246 (uri (pypi-uri "trio" version))
25248 (base32 "0w30cwmdwfa8zq2agqv3h62jzwwsk7ms8f683ag8f3jx279m42k7"))))
25249 (build-system python-build-system)
25252 (modify-phases %standard-phases
25253 (add-after 'unpack 'patch-sleep
25255 (substitute* "trio/tests/test_subprocess.py"
25257 (which "sleep")))))
25258 (add-before 'check 'change-home
25260 ;; Tests require a writable home.
25261 (setenv "HOME" "/tmp")))
25263 (lambda* (#:key tests? #:allow-other-keys)
25265 (invoke "pytest" "-vv"
25266 "-n" (number->string (parallel-job-count))
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"))))))))
25298 python-pytest-xdist
25302 (list python-async-generator
25307 python-sortedcontainers))
25308 (home-page "https://github.com/python-trio/trio")
25309 (synopsis "Friendly Python library for async concurrency and I/O")
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))))
25317 (define-public python-trio-typing
25319 (name "python-trio-typing")
25324 (uri (pypi-uri "trio-typing" version))
25326 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
25327 (build-system python-build-system)
25330 (modify-phases %standard-phases
25333 (invoke "pytest" "-vv"))))))
25335 (list python-attrs python-pytest))
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")
25342 "This package provides:
25345 @item PEP 561 typing stubs packages for the Trio project packages:
25348 @item trio (@code{trio-stubs})
25349 @item outcome (@code{outcome-stubs})
25350 @item async_generator (@code{async_generator-stubs})
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.
25357 ;; Either license applies.
25358 (license (list license:expat license:asl2.0))))
25360 (define-public python-trio-websocket
25362 (name "python-trio-websocket")
25366 (method git-fetch) ;no tests in pypi archive
25367 (uri (git-reference
25368 (url "https://github.com/HyperionGray/trio-websocket")
25370 (file-name (git-file-name name version))
25372 (base32 "1yk2ak991kbl30xg8ldpggack1lwkizd7s5cpr28ir34z8iyjnpi"))))
25373 (build-system python-build-system)
25376 (modify-phases %standard-phases
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)))
25394 (define-public python-humanize
25396 (name "python-humanize")
25401 (uri (pypi-uri "humanize" version))
25404 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
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)))
25415 (define-public python-txaio
25417 (name "python-txaio")
25422 (uri (pypi-uri "txaio" version))
25425 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
25426 (build-system python-build-system)
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)))
25435 (define-public python-toolshed
25437 (name "python-toolshed")
25442 (uri (pypi-uri "toolshed" version))
25445 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
25446 (build-system python-build-system)
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)))
25455 (define-public python-annoy
25457 (name "python-annoy")
25462 (uri (pypi-uri "annoy" version))
25465 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
25466 (build-system python-build-system)
25468 (list python-nose))
25469 (home-page "https://github.com/spotify/annoy/")
25470 (synopsis "Approximate nearest neighbors library")
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)))
25478 (define-public python-croniter
25480 (name "python-croniter")
25484 (uri (pypi-uri "croniter" version))
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")
25493 "@code{croniter} provides iteration for datetime object with cron-like
25495 (license license:expat)))
25497 (define-public python-crontab
25499 (name "python-crontab")
25504 (uri (pypi-uri name version))
25506 (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
25507 (build-system python-build-system)
25509 ;; Comptability tests fail so they are disabled.
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+)))
25519 (define-public python-pylzma
25521 (name "python-pylzma")
25526 (uri (pypi-uri "pylzma" version))
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
25535 (license license:lgpl2.1+)))
25537 (define-public python2-pylzma
25538 (package-with-python2 python-pylzma))
25540 (define-public python-ifaddr
25542 (name "python-ifaddr")
25547 (uri (pypi-uri "ifaddr" version))
25550 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
25551 (build-system python-build-system)
25554 (modify-phases %standard-phases
25556 (lambda _ (invoke "nosetests"))))))
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)))
25565 (define-public python-zeroconf
25567 (name "python-zeroconf")
25571 (method git-fetch) ; no tests in PyPI release
25572 (uri (git-reference
25573 (url "https://github.com/jstasiak/python-zeroconf")
25575 (file-name (git-file-name name version))
25577 (base32 "1p1a0ywlg5sq0ilcphmz9h4kayscz0q1lyfk57j7mwxyx4gl9cpi"))))
25578 (build-system python-build-system)
25581 (modify-phases %standard-phases
25583 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25585 (add-installed-pythonpath inputs outputs)
25586 (invoke "python" "-m" "pytest" "-k"
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"))))))))
25595 (list python-pytest))
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+)))
25604 (define-public python2-zeroconf
25606 (name "python2-zeroconf")
25608 ;; This is the last version that supports Python 2.x.
25613 (uri (pypi-uri "zeroconf" version))
25616 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
25617 (build-system python-build-system)
25619 `(#:python ,python-2
25621 (modify-phases %standard-phases
25622 (add-after 'unpack 'patch-requires
25623 (lambda* (#:key inputs #:allow-other-keys)
25624 (substitute* "setup.py"
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")
25636 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
25638 (license license:lgpl2.1+)))
25640 (define-public python-bsddb3
25642 (name "python-bsddb3")
25647 (uri (pypi-uri "bsddb3" version))
25649 (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
25650 (build-system python-build-system)
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")
25663 (invoke "python3" "test3.py" "-v"))))))
25664 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
25665 (synopsis "Python bindings for Oracle Berkeley DB")
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)))
25676 (define-public python-dbfread
25678 (name "python-dbfread")
25682 (uri (pypi-uri "dbfread" version))
25685 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
25686 (build-system python-build-system)
25688 (list python-pytest))
25689 (home-page "https://dbfread.readthedocs.io")
25690 (synopsis "Read DBF Files with Python")
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
25695 (license license:expat)))
25697 (define-public python-cached-property
25699 (name "python-cached-property")
25704 (uri (pypi-uri "cached-property" version))
25707 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
25708 (build-system python-build-system)
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
25716 (substitute* "tests/test_cached_property.py"
25717 (("def test_threads_ttl_expiry\\(self\\)" m)
25718 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
25722 (list python-freezegun))
25724 "https://github.com/pydanny/cached-property")
25726 "Decorator for caching properties in classes")
25728 "This package provides a decorator which makes caching
25729 time-or-computationally-expensive properties quick and easy and works in Python
25731 (license license:bsd-3)))
25733 (define-public python-folium
25735 (name "python-folium")
25739 ;; PyPI has a ".whl" file but not a proper source release.
25740 ;; Thus, fetch code from Git.
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))
25747 (base32 "1q05pzca3wfwgnbg03l3bagnhh348yx68w4aa91rg3g8zlviwjz1"))))
25748 (build-system python-build-system)
25750 (list python-branca python-jinja2 python-numpy python-requests))
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.
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)))
25765 (define-public python-mercantile
25767 (name "python-mercantile")
25772 (uri (pypi-uri "mercantile" version))
25774 (base32 "0sxmndhzzrvss5irsgzfrk51k6jihwcb7661992mizdgbnqnsg7s"))))
25775 (build-system python-build-system)
25776 (propagated-inputs (list python-click))
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)))
25791 (define-public python-xyzservices
25793 (name "python-xyzservices")
25794 (version "2022.4.0")
25798 (uri (pypi-uri "xyzservices" version))
25800 (base32 "1paxv4i0dws85md7csv7pf80jl3xh792mx8rxnsrk61ks3ivbsyg"))))
25801 (build-system python-build-system)
25804 (modify-phases %standard-phases
25806 (lambda* (#:key tests? #:allow-other-keys)
25808 (invoke "pytest" "-vv")))))))
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)))
25818 (define-public jube
25820 ;; This is a command-line tool, so no "python-" prefix.
25825 (uri (string-append
25826 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
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")
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+)))
25843 (define-public python-pyroutelib3
25845 (name "python-pyroutelib3")
25846 (version "1.3.post1")
25850 (uri (pypi-uri "pyroutelib3" version))
25853 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
25854 (build-system python-build-system)
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+)))
25862 (define-public python-bibtexparser
25864 (name "python-bibtexparser")
25869 (uri (pypi-uri "bibtexparser" version))
25872 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
25873 (build-system python-build-system)
25875 (list python-pyparsing))
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))))
25883 (define-public python-distro
25885 (name "python-distro")
25890 (uri (pypi-uri "distro" version))
25893 "09441261dd3c8b2gv15vhw1cryzg60lmgpkk07v6hpwwkyhfbxc3"))))
25894 (build-system python-build-system)
25896 (list python-pytest))
25897 (home-page "https://github.com/nir0s/distro")
25899 "OS platform information API")
25901 "@code{distro} provides information about the OS distribution it runs on,
25902 such as a reliable machine-readable ID, or version information.
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)))
25910 (define-public python-cairosvg
25912 (name "python-cairosvg")
25917 (uri (pypi-uri "CairoSVG" version))
25919 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
25920 (build-system python-build-system)
25923 (modify-phases %standard-phases
25925 (lambda _ (invoke "pytest"))))))
25927 (list python-cairocffi python-cssselect2 python-defusedxml
25928 python-pillow python-tinycss2))
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+)))
25940 (define-public python-pyphen
25942 (name "python-pyphen")
25947 (uri (pypi-uri "Pyphen" version))
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))))
25959 (define-public python-intelhex
25961 (name "python-intelhex")
25966 (uri (pypi-uri "intelhex" version))
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)))
25982 (define-public python-pykwalify
25984 (name "python-pykwalify")
25989 (uri (pypi-uri "pykwalify" version))
25992 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
25993 (build-system python-build-system)
25994 (arguments '(#:tests? #f)) ;missing dependencies
25996 (list python-dateutil python-docopt python-pyyaml))
25997 (home-page "https://github.com/grokzen/pykwalify")
25999 "Python lib/cli for JSON/YAML schema validation")
26001 "This package provides a parser, schema validator, and data binding tool
26002 for YAML and JSON.")
26003 (license license:expat)))
26005 (define-public python-dbusmock
26007 (name "python-dbusmock")
26012 (uri (pypi-uri "python-dbusmock" version))
26015 "1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
26016 (build-system python-build-system)
26018 `(#:imported-modules (,@%python-build-system-modules
26019 (guix build syscalls))
26020 #:modules ((guix build python-build-system)
26021 (guix build syscalls)
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"
26032 (string-append "'" (assoc-ref inputs "dbus")
26033 "/bin/dbus-daemon'")))))
26035 (lambda* (#:key tests? #:allow-other-keys)
26037 (match (primitive-fork)
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"))
26046 (match (waitpid pid)
26048 (unless (zero? status)
26049 (error "`pytest' exited with status"
26052 (list dbus python-pytest tini which))
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+)))
26066 (define-public python-jsonplus
26068 (name "python-jsonplus")
26070 (home-page "https://github.com/randomir/jsonplus")
26073 (uri (pypi-uri "jsonplus" version))
26076 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
26077 (build-system python-build-system)
26078 ;; XXX: No tests on PyPI, and the repository has no tags.
26079 (arguments '(#:tests? #f))
26081 (list python-dateutil python-simplejson python-sortedcontainers))
26082 (synopsis "Serialize Python types to/from JSON")
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)))
26089 (define-public python-ujson
26091 (name "python-ujson")
26096 (uri (pypi-uri "ujson" version))
26099 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
26100 (modules '((guix build utils)))
26102 '(begin (delete-file-recursively "deps") #t))))
26103 (build-system python-build-system)
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\""))
26114 (string-append "-L" d-c "/lib\","
26115 " \"-ldouble-conversion\","
26119 (lambda* (#:key inputs outputs #:allow-other-keys)
26120 (add-installed-pythonpath inputs outputs)
26121 (invoke "pytest"))))))
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")
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)))
26131 (define-public python-iocapture
26132 ;; The latest release is more than a year older than this commit.
26133 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
26136 (name "python-iocapture")
26141 (uri (git-reference
26142 (url "https://github.com/oinume/iocapture")
26144 (file-name (git-file-name name version))
26147 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
26148 (build-system python-build-system)
26151 (modify-phases %standard-phases
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")
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")
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))))
26167 (define-public python-anyio
26169 (name "python-anyio")
26174 (uri (pypi-uri "anyio" version))
26177 "19m58805wir4i2s45dd5ynwlzb7ky1218isbir53gpqzzgigzbm0"))))
26178 (build-system python-build-system)
26181 (modify-phases %standard-phases
26183 (lambda* (#:key tests? #:allow-other-keys)
26186 "pytest" "-vv" "-p" "no:asyncio"
26190 "not test_is_block_device"
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"))))))))
26222 (list python-contextvars
26226 python-typing-extensions))
26228 (list python-contextlib2
26234 python-setuptools-scm
26238 (home-page "https://github.com/agronholm/anyio")
26239 (synopsis "Compatibility layer for multiple asynchronous event loops")
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
26245 (license license:expat)))
26247 (define-public python-argh
26248 ;; There are 21 commits since the latest release containing important
26250 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
26253 (name "python-argh")
26254 (version (git-version "0.26.2" revision commit))
26258 (uri (git-reference
26259 (url "https://github.com/neithere/argh")
26261 (file-name (git-file-name name version))
26264 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
26265 (build-system python-build-system)
26268 (modify-phases %standard-phases
26269 (add-after 'unpack 'patch-tests
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)")))))
26279 (lambda* (#:key tests? #:allow-other-keys)
26281 (invoke "pytest" "-vv")))))))
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")
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+))))
26295 (define-public python-ppft
26297 (name "python-ppft")
26298 (version "1.6.6.1")
26302 (uri (pypi-uri "ppft" version))
26305 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
26306 (build-system python-build-system)
26307 (arguments '(#:tests? #f)) ; there are none
26310 (home-page "https://pypi.org/project/ppft/")
26311 (synopsis "Fork of Parallel Python")
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
26318 (license license:bsd-3)))
26320 (define-public python-pox
26322 (name "python-pox")
26327 (uri (pypi-uri "pox" version))
26330 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
26331 (build-system python-build-system)
26334 (modify-phases %standard-phases
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")
26344 (list python-pytest which))
26345 (home-page "https://pypi.org/project/pox/")
26346 (synopsis "Python utilities for file system exploration and automated builds")
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)))
26357 (define-public python-pathos
26359 (name "python-pathos")
26364 (uri (pypi-uri "pathos" version))
26367 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
26368 (build-system python-build-system)
26371 (modify-phases %standard-phases
26374 (invoke "python" "./tests/__main__.py"))))))
26376 (list python-dill python-multiprocess python-pox python-ppft))
26378 (list python-pytest))
26379 (home-page "https://pypi.org/project/pathos/")
26381 "Parallel graph management and execution in heterogeneous computing")
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)))
26390 (define-public python-flit
26392 (name "python-flit")
26397 (uri (pypi-uri "flit" version))
26399 (base32 "04152qj46sqbnlrj7ch9p7svjrrlpzbk0qr39g2yr0s4f5vp6frf"))))
26400 (build-system python-build-system)
26404 #~(modify-phases %standard-phases
26405 ;; XXX: PEP 517 manual build copied from python-isort.
26408 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
26410 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26412 (setenv "HOME" "/tmp")
26413 (setenv "FLIT_NO_NETWORK" "1"))))
26416 (let ((whl (car (find-files "dist" "\\.whl$"))))
26417 (invoke "pip" "--no-cache-dir" "--no-input"
26418 "install" "--no-deps" "--prefix" #$output whl)))))))
26420 (list python-pypa-build
26426 (list python-responses
26427 python-pygments-github-lexers
26431 python-sphinxcontrib-github-alt
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)))
26441 (define-public python-pathtools
26443 (name "python-pathtools")
26448 (uri (pypi-uri "pathtools" version))
26451 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
26452 (build-system python-build-system)
26454 "https://github.com/gorakhargosh/pathtools")
26455 (synopsis "Path utilities for Python")
26456 (description "Pattern matching and various utilities for file systems
26458 (license license:expat)))
26460 (define-public python-fastentrypoints
26462 (name "python-fastentrypoints")
26467 (uri (pypi-uri "fastentrypoints" version))
26470 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
26471 (build-system python-build-system)
26473 "https://github.com/ninjaaron/fast-entry_points")
26475 "Makes entry_points specified in setup.py load more quickly")
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)))
26482 (define-public python-funcparserlib
26484 (name "python-funcparserlib")
26489 (uri (pypi-uri "funcparserlib" version))
26491 (base32 "0swbqf53x7lfnczvi566s1g3nkf5mfrxz7sbpyymricz57a3vlvx"))))
26492 (build-system python-build-system)
26494 `(#:tests? #f)) ; no tests in PyPI and no setup.py in GitHub
26495 (home-page "https://github.com/vlasovskikh/funcparserlib")
26497 "Recursive descent parsing library based on functional combinators")
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)))
26504 (define-public python-speg
26506 (name "python-speg")
26511 (uri (pypi-uri "speg" version ".zip"))
26513 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
26515 `(#:tests? #f)) ;FIXME: tests fail, not sure why
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
26523 (license license:expat)))
26525 (define-public python-cson
26527 (name "python-cson")
26532 (uri (pypi-uri "cson" version))
26534 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
26535 (build-system python-build-system)
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
26542 (license license:expat)))
26544 (define-public python-aionotify
26546 (name "python-aionotify")
26550 ;; Source tarball on PyPi lacks tests
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))
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")
26563 "@code{aionotify} is a simple, asyncio-based inotify library.")
26564 (license license:bsd-3)))
26566 (define-public python-forbiddenfruit
26568 (name "python-forbiddenfruit")
26572 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
26574 (uri (git-reference
26575 (url "https://github.com/clarete/forbiddenfruit")
26577 (file-name (git-file-name name version))
26579 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
26580 (build-system python-build-system)
26583 (modify-phases %standard-phases
26586 (invoke "make" "SKIP_DEPS=1"))))))
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))))
26594 (define-public python-k5test
26596 (name "python-k5test")
26601 (uri (pypi-uri "k5test" version))
26604 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
26605 (build-system python-build-system)
26608 ;; `which`, `kadmin.local` binaries called inside library
26610 (native-inputs (list mit-krb5))
26613 (modify-phases %standard-phases
26614 (add-after 'unpack 'apply-upstream-fixes
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")
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
26628 (license license:isc)))
26630 (define-public python-gssapi
26632 (name "python-gssapi")
26637 (uri (pypi-uri "gssapi" version))
26640 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
26641 (build-system python-build-system)
26643 (list python-decorator python-six))
26648 (list python-parameterized python-k5test python-nose))
26649 (home-page "https://github.com/pythongssapi/python-gssapi")
26650 (synopsis "Python GSSAPI Wrapper")
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)))
26657 (define-public python-check-manifest
26659 (name "python-check-manifest")
26664 (uri (pypi-uri "check-manifest" version))
26667 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
26668 (build-system python-build-system)
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)))
26678 (define-public python-android-stringslib
26680 (name "python-android-stringslib")
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))
26691 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
26692 (build-system python-build-system)
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)))
26701 (define-public python-watchdog
26703 (name "python-watchdog")
26708 (uri (pypi-uri "watchdog" version))
26710 (base32 "1rx2nyl0cyj0v4ja795cl3gi26577c5wg48syr3byz3ndkgpavm3"))))
26711 (build-system python-build-system)
26714 (modify-phases %standard-phases
26716 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
26718 (add-installed-pythonpath inputs outputs)
26719 (invoke "python" "-m" "pytest" "-k"
26720 ;; This test failed.
26721 "not test_kill_auto_restart")))))))
26723 (list python-pathtools python-pyyaml))
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,
26731 (license license:asl2.0)))
26733 (define-public python-watchgod
26735 (name "python-watchgod")
26739 ;; There are no tests in the PyPI tarball.
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))
26746 (base32 "1w2xsidwp9n4giqhja0bzw7rwrh01db0kdxf2n54mv3dkx545jpq"))))
26747 (build-system python-build-system)
26750 (modify-phases %standard-phases
26752 (lambda* (#:key tests? #:allow-other-keys)
26754 (invoke "pytest" "-vv"
26755 "-o" "asyncio_mode=auto")))))))
26757 (list python-coverage
26760 python-pytest-asyncio
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")
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)))
26773 (define-public python-wget
26775 (name "python-wget")
26780 (uri (pypi-uri "wget" version ".zip"))
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)))
26792 (define-public offlate
26799 (uri (git-reference
26800 (url "https://framagit.org/tyreunom/offlate")
26802 (file-name (git-file-name name version))
26805 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
26806 (build-system python-build-system)
26811 (list python-android-stringslib
26822 python-translation-finder
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+)))
26836 (define-public python-titlecase
26838 (name "python-titlecase")
26843 (uri (pypi-uri "titlecase" version))
26846 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
26847 (build-system python-build-system)
26849 (list python-nose))
26850 (home-page "https://github.com/ppannuto/python-titlecase")
26851 (synopsis "Capitalize strings similar to book titles")
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
26857 (license license:expat)))
26859 (define-public python-pypng
26861 (name "python-pypng")
26866 (uri (pypi-uri "pypng" version))
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")
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.
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)))
26888 (define-public python-fuzzywuzzy
26890 (name "python-fuzzywuzzy")
26895 (uri (pypi-uri "fuzzywuzzy" version))
26898 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
26899 (build-system python-build-system)
26901 (list python-hypothesis python-pycodestyle python-pytest))
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
26909 (license license:gpl2)))
26911 (define-public python2-fuzzywuzzy
26912 (package-with-python2 python-fuzzywuzzy))
26914 (define-public python-block-tracing
26916 (name "python-block-tracing")
26921 (uri (pypi-uri "block_tracing" version))
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")
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
26933 (license license:expat)))
26935 (define-public python-gcovr
26937 (name "python-gcovr")
26942 (uri (pypi-uri "gcovr" version))
26945 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
26946 (build-system python-build-system)
26948 (list python-lxml python-jinja2))
26949 (home-page "https://gcovr.com/")
26950 (synopsis "Utility for generating code coverage results")
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
26956 (license license:bsd-3)))
26958 (define-public python-owslib
26960 (name "python-owslib")
26965 (uri (pypi-uri "OWSLib" version))
26967 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
26968 (build-system python-build-system)
26970 ;; TODO: package dependencies required for tests.
26972 #:phases (modify-phases %standard-phases
26973 (delete 'sanity-check))))
26974 (synopsis "Interface for Open Geospatial Consortium web service")
26976 "OWSLib is a Python package for client programming with Open Geospatial
26977 Consortium (OGC) web service (hence OWS) interface standards, and their related
26979 (home-page "https://geopython.github.io/OWSLib/")
26980 (license license:bsd-3)))
26982 (define-public python-docusign-esign
26984 (name "python-docusign-esign")
26988 (uri (pypi-uri "docusign_esign" version))
26991 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
26992 (build-system python-build-system)
26993 ;; Testing requires undocumented setup changes, and so testing is disabled here.
26994 (arguments `(#:tests? #f))
26996 (list python-certifi
27001 python-cryptography
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)))
27009 (define-public python-xattr
27011 (name "python-xattr")
27016 (uri (pypi-uri "xattr" version))
27019 "0ipkfblyvp5hylahjkw9zss1ii9xnwjypr3b3ncv989szcg7xjq9"))))
27020 (build-system python-build-system)
27022 (list python-cffi))
27023 (home-page "https://github.com/xattr/xattr")
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)))
27032 (define-public python-json-logger
27034 (name "python-json-logger")
27039 (uri (pypi-uri "python-json-logger" version))
27042 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
27043 (build-system python-build-system)
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)))
27052 (define-public python-daiquiri
27054 (name "python-daiquiri")
27059 (uri (pypi-uri "daiquiri" version))
27062 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
27063 (build-system python-build-system)
27065 (list python-json-logger))
27067 (list python-mock python-pytest python-setuptools-scm python-six))
27068 (home-page "https://github.com/jd/daiquiri")
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)))
27075 (define-public python-pifpaf
27077 (name "python-pifpaf")
27082 (uri (pypi-uri "pifpaf" version))
27085 "19bdmxldc2m570isl7hbqgbb20si4sin7pi5fw8sv9py8dyv2s4n"))))
27086 (build-system python-build-system)
27089 (modify-phases %standard-phases
27092 (invoke "python" "setup.py" "testr" "--slowest"
27093 "--testr-args=until-failure"))))))
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)))
27113 (define-public python-pytest-check-links
27115 (name "python-pytest-check-links")
27120 ;; URI uses underscores
27121 (uri (pypi-uri "pytest_check_links" version))
27124 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
27125 (build-system python-build-system)
27127 (list python-docutils
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)))
27141 (define-public python-json5
27143 (name "python-json5")
27147 ;; sample.json5 is missing from PyPi source tarball
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))
27154 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
27155 (build-system python-build-system)
27156 (home-page "https://github.com/dpranke/pyjson5")
27158 "Python implementation of the JSON5 data format")
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)))
27165 (define-public python-frozendict
27167 (name "python-frozendict")
27172 (uri (pypi-uri "frozendict" version))
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")
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)))
27184 (define-public python-unpaddedbase64
27186 (name "python-unpaddedbase64")
27191 (uri (pypi-uri "unpaddedbase64" version))
27193 (base32 "01ghlmw63fgslwj8j74vkpf1kqvr7a4agm6nyn89vqwx106ccwvj"))))
27194 (build-system python-build-system)
27197 (modify-phases %standard-phases
27199 (lambda* (#:key inputs tests? #:allow-other-keys)
27201 (copy-recursively (string-append
27202 (assoc-ref inputs "tests") "/tests")
27204 (invoke "python" "-m" "pytest" "-vv")))))))
27206 `(("python-pytest" ,python-pytest)
27208 ;; The release on pypi comes without tests. We can't build from this
27209 ;; checkout, though, because installation requires an invocation of
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))
27219 "1n6har8pxv0mqb96lanzihp1xf76aa17jw3977drb1fgz947pnmz"))))))
27220 (home-page "https://github.com/matrix-org/python-unpaddedbase64")
27221 (synopsis "Encode and decode Base64 without “=” padding")
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)))
27228 (define-public python-py-cpuinfo
27230 (name "python-py-cpuinfo")
27235 (uri (pypi-uri "py-cpuinfo" version))
27238 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
27239 (build-system python-build-system)
27240 (home-page "https://github.com/workhorsy/py-cpuinfo")
27241 (synopsis "Get CPU info with Python")
27243 "This Python module returns the CPU info by using the best sources of
27244 information for your operating system.")
27245 (license license:expat)))
27247 (define-public python-canonicaljson
27249 (name "python-canonicaljson")
27254 (uri (pypi-uri "canonicaljson" version))
27256 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
27257 (build-system python-build-system)
27259 (list python-six python-frozendict python-simplejson))
27260 (home-page "https://github.com/matrix-org/python-canonicaljson")
27261 (synopsis "Canonical JSON")
27263 "Deterministically encode JSON.
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.
27275 (license license:asl2.0)))
27277 (define-public python-signedjson
27279 (name "python-signedjson")
27284 (uri (pypi-uri "signedjson" version))
27286 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
27287 (build-system python-build-system)
27289 (list python-canonicaljson python-importlib-metadata python-pynacl
27290 python-typing-extensions python-unpaddedbase64))
27292 (list python-setuptools-scm))
27293 (home-page "https://github.com/matrix-org/python-signedjson")
27294 (synopsis "Sign JSON objects with ED25519 signatures")
27296 "Sign JSON objects with ED25519 signatures.
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
27302 @item ED25519 can be replaced with a different algorithm.
27303 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
27306 (license license:asl2.0)))
27308 (define-public python-daemonize
27310 (name "python-daemonize")
27315 (uri (pypi-uri "daemonize" version))
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)))
27324 (define-public python-pymacaroons
27326 (name "python-pymacaroons")
27331 (uri (pypi-uri "pymacaroons" version))
27333 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
27334 (build-system python-build-system)
27336 (list python-six python-pynacl))
27337 (home-page "https://github.com/ecordell/pymacaroons")
27338 (synopsis "Python Macaroon Library")
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.
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)))
27350 (define-public python-ldap3
27352 (name "python-ldap3")
27354 (home-page "https://github.com/cannatag/ldap3")
27358 (uri (git-reference (url home-page)
27359 (commit (string-append "v" version))))
27360 (file-name (git-file-name name version))
27362 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
27363 (build-system python-build-system)
27365 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
27366 #:phases (modify-phases %standard-phases
27368 (lambda* (#:key tests? #:allow-other-keys)
27370 (invoke "nosetests" "-s" "test"))
27373 (list python-nose))
27375 (list python-gssapi python-pyasn1))
27376 (synopsis "Python LDAP client")
27378 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
27380 (license license:lgpl3+)))
27382 (define-public python-boltons
27384 (name "python-boltons")
27389 (uri (pypi-uri "boltons" version))
27392 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
27393 (build-system python-build-system)
27394 (home-page "https://github.com/mahmoud/boltons")
27395 (synopsis "Extensions to the Python standard library")
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:
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
27408 @item A full-featured TracebackInfo type, for representing stack traces, in
27411 (license license:bsd-3)))
27413 (define-public python-eliot
27415 (name "python-eliot")
27420 (uri (pypi-uri "eliot" version))
27422 (base32 "1xzzhsjrrw430dc84vamf683bwp9i0nr86xf2iav6yla615ijq2p"))))
27423 (build-system python-build-system)
27426 (modify-phases %standard-phases
27427 (add-after 'unpack 'remove-journald-support
27429 (for-each delete-file
27430 '("eliot/tests/test_journald.py"
27431 "eliot/journald.py"))
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.
27437 (delete-file "eliot/tests/test_prettyprint.py")
27439 (add-after 'remove-eliot-prettyprint-tests 'remove-failing-tests
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"))
27450 (list python-boltons python-pyrsistent python-six
27451 python-zope-interface))
27461 python-sphinx-rtd-theme
27465 (home-page "https://github.com/itamarst/eliot/")
27466 (synopsis "Eliot: the logging system that tells you why it happened")
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)))
27474 (define-public python-pem
27476 (name "python-pem")
27481 (uri (pypi-uri "pem" version))
27484 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
27485 (build-system python-build-system)
27487 (list python-certifi
27494 (home-page "https://pem.readthedocs.io/")
27495 (synopsis "Easy PEM file parsing in Python")
27497 "This package provides a Python module for parsing and splitting PEM files.")
27498 (license license:expat)))
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")
27506 (name "python-txsni")
27507 (version (git-version "0.1.9" revision commit))
27508 (home-page "https://github.com/glyph/txsni")
27512 (uri (git-reference (url home-page) (commit commit)))
27513 (file-name (git-file-name name version))
27516 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
27517 (build-system python-build-system)
27519 (list python-pyopenssl python-service-identity python-twisted))
27520 (synopsis "Run TLS servers with Twisted")
27522 "This package provides an easy-to-use SNI endpoint for use
27523 with the Twisted web framework.")
27524 (license license:expat))))
27526 (define-public python-txacme
27528 (name "python-txacme")
27533 (uri (pypi-uri "txacme" version))
27535 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
27536 (build-system python-build-system)
27547 (list python-fixtures
27550 python-service-identity
27551 python-testrepository
27552 python-testscenarios
27554 (home-page "https://github.com/twisted/txacme")
27555 (synopsis "Twisted implexmentation of the ACME protocol")
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.
27562 txacme is an implementation of the protocol for Twisted, the event-driven
27563 networking engine for Python.")
27564 (license license:expat)))
27566 (define-public python-pysaml2
27568 (name "python-pysaml2")
27573 (uri (pypi-uri "pysaml2" version))
27576 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
27577 (build-system python-build-system)
27579 (list python-cryptography
27582 python-importlib-resources
27588 (home-page "https://idpy.org")
27589 (synopsis "Python implementation of SAML Version 2 Standard")
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.
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)))
27599 (define-public python-click-plugins
27601 (name "python-click-plugins")
27606 (uri (pypi-uri "click-plugins" version))
27608 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
27609 (build-system python-build-system)
27611 (list python-pytest))
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)))
27620 (define-public python-diceware
27622 (name "python-diceware")
27627 (uri (pypi-uri "diceware" version))
27630 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
27631 (build-system python-build-system)
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+)))
27642 (define-public python-dictdiffer
27644 (name "python-dictdiffer")
27648 (uri (pypi-uri "dictdiffer" version))
27651 "0y3mk74qm2q9hsm37892i1wzn8bbdrvbs4nmnvqwq4z6pxgwzfhp"))))
27652 (build-system python-build-system)
27654 ;; XXX: The PyPI tarball lacks tests and the git repository
27655 ;; fails to determine version.
27658 (list python-pytest-runner python-setuptools-scm))
27659 (home-page "https://github.com/inveniosoftware/dictdiffer")
27660 (synopsis "Diff and patch Python dictionary objects")
27662 "Dictdiffer is a Python module that helps you to diff and patch
27664 (license license:expat)))
27666 (define-public python-dictpath
27668 (name "python-dictpath")
27673 (uri (pypi-uri "dictpath" version))
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
27683 (license license:asl2.0)))
27685 (define-public pyzo
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))
27698 "0v6rgp52bf9za2spxx9c1yc6wmskvlsj81iw0gipjy7y8vpypgn2"))))
27699 (build-system python-build-system)
27702 (modify-phases %standard-phases
27703 (add-before 'check 'fix-home-directory
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".
27711 (list python-pyqt))
27712 (home-page "https://pyzo.org")
27714 "Python IDE for scientific computing")
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.
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,
27724 (license license:bsd-2)))
27726 (define-public python-osc
27728 (name "python-osc")
27733 (uri (pypi-uri "python-osc" version))
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")
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)))
27746 (define-public python-voluptuous
27748 (name "python-voluptuous")
27753 (uri (pypi-uri "voluptuous" version))
27756 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
27757 (build-system python-build-system)
27759 (list python-nose))
27760 (home-page "https://github.com/alecthomas/voluptuous")
27761 (synopsis "Python data validation library")
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)))
27767 (define-public python-cmd2
27769 (name "python-cmd2")
27774 (uri (pypi-uri "cmd2" version))
27777 "0h1naik558qh48gx2iyy0a0khvw5fz0in69y84mbrhsm9nq7w3bm"))))
27778 (build-system python-build-system)
27781 (modify-phases %standard-phases
27783 (lambda* (#:key tests? #:allow-other-keys)
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~%")))))))
27791 (list python-attrs python-colorama python-pyperclip python-wcwidth))
27793 (list python-invoke
27798 python-setuptools-scm))
27799 (home-page "https://github.com/python-cmd2/cmd2")
27800 (synopsis "Tool for building interactive command line applications")
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)))
27811 (define-public python-pytidylib
27813 (name "python-pytidylib")
27817 (uri (pypi-uri "pytidylib" version))
27820 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
27821 (build-system python-build-system)
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)))
27832 (inputs (list tidy))
27833 (home-page "https://github.com/countergram/pytidylib")
27834 (synopsis "Python wrapper for HTML Tidy library")
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)))
27840 (define-public python2-pytidylib
27841 (package-with-python2 python-pytidylib))
27843 (define-public python-mujson
27845 (name "python-mujson")
27850 (uri (pypi-uri "mujson" version))
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
27859 (license license:expat)))
27861 (define-public python-bashlex
27863 (name "python-bashlex")
27868 (uri (pypi-uri "bashlex" version))
27871 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
27872 (build-system python-build-system)
27875 (modify-phases %standard-phases
27876 (add-before 'build 'pregenerate-yacc-tables
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"))))))
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.
27887 For the most part it's transliterated from C, the major differences are:
27890 @item it does not execute anything
27891 @item it is reentrant
27892 @item it generates a complete AST
27895 (license license:gpl3+)))
27897 (define-public python-jinxed
27899 (name "python-jinxed")
27904 (uri (pypi-uri "jinxed" version))
27907 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
27908 (build-system python-build-system)
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"))
27918 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
27921 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
27922 (synopsis "Jinxed Terminal Library")
27924 "Jinxed is an implementation of a subset of the Python curses library.")
27925 (license license:mpl2.0)))
27927 (define-public python-svgutils
27929 (name "python-svgutils")
27934 (uri (pypi-uri "svgutils" version))
27937 "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
27938 (build-system python-build-system)
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)))
27949 (define-public python-blessed
27951 (name "python-blessed")
27956 (uri (pypi-uri "blessed" version))
27959 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
27960 (modules '((guix build utils)))
27963 ;; Don't get hung up on Windows test failures.
27964 (delete-file "blessed/win_terminal.py") #t))))
27965 (build-system python-build-system)
27967 (list python-jinxed python-six python-wcwidth))
27969 (list python-mock python-pytest))
27970 (home-page "https://github.com/jquast/blessed")
27971 (synopsis "Wrapper around terminal capabilities")
27973 "Blessed is a thin, practical wrapper around terminal styling, screen
27974 positioning, and keyboard input.")
27975 (license license:expat)))
27977 (define-public python-readme-renderer
27979 (name "python-readme-renderer")
27984 (uri (pypi-uri "readme_renderer" version))
27987 "1c75h9znffc2lh4j56yg23l5ifj5l8fbdq3kfigi8vbh45zx3d6z"))))
27988 (build-system python-build-system)
27990 '(#:phases (modify-phases %standard-phases
27991 (add-after 'unpack 'loosen-cmarkgfm-dependency
27993 ;; Permit newer versions of cmarkgfm.
27994 (substitute* "setup.py"
27995 (("cmarkgfm>=0\\.5\\.0,<0\\.7\\.0")
27996 "cmarkgfm>=0.5.0"))))
27998 (lambda* (#:key tests? #:allow-other-keys)
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")))))))
28006 (list python-bleach python-docutils python-pygments
28008 ;; Optional dependencies.
28009 python-cmarkgfm)) ;required by postorius
28011 (list python-mock python-pytest))
28012 (home-page "https://github.com/pypa/readme_renderer")
28013 (synopsis "Render README files in Warehouse")
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,
28019 (license license:asl2.0)))
28021 (define-public python-lazr-delegates
28023 (name "python-lazr-delegates")
28028 (uri (pypi-uri "lazr.delegates" version))
28031 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
28032 (build-system python-build-system)
28035 (modify-phases %standard-phases
28037 (lambda* (#:key tests? #:allow-other-keys)
28038 (when tests? (invoke "nosetests")))))))
28040 (list python-nose))
28042 (list python-zope-interface))
28043 (home-page "https://launchpad.net/lazr.delegates")
28044 (synopsis "Easily write objects that delegate behavior")
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)))
28052 (define-public python-lazr-config
28054 (name "python-lazr-config")
28059 (uri (pypi-uri "lazr.config" version))
28062 "1qdbrzl61q7cjhbnxvw9y3frcr935y7diwy15xrwcv9ynvw76jmp"))))
28063 (build-system python-build-system)
28066 (modify-phases %standard-phases
28069 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
28071 (list python-nose))
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")
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
28083 (license license:lgpl3)))
28085 (define-public python-flufl-bounce
28087 (name "python-flufl-bounce")
28092 (uri (pypi-uri "flufl.bounce" version))
28095 "0c9qc2l47lyqnpwskp6vvi7m3jqh6hx42v6d35dgxh3fjzmlll15"))))
28096 (build-system python-build-system)
28099 #~(modify-phases %standard-phases
28101 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
28103 (with-directory-excursion
28104 (string-append (site-packages inputs outputs) "/flufl")
28105 (invoke "python" "-m" "nose2" "-v"))))))))
28107 (list python-atpublic python-zope-interface))
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
28116 (license (list license:asl2.0
28117 license:lgpl3)))) ; only for setup_headers.py
28119 (define-public python-flufl-i18n
28121 (name "python-flufl-i18n")
28126 (uri (pypi-uri "flufl.i18n" version))
28129 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
28130 (build-system python-build-system)
28132 (list python-atpublic))
28133 (home-page "https://flufli18n.readthedocs.io")
28134 (synopsis "API for Python internationalization")
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
28143 (license license:asl2.0)))
28145 (define-public python-flufl-lock
28147 (name "python-flufl-lock")
28152 (uri (pypi-uri "flufl.lock" version))
28155 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
28156 (build-system python-build-system)
28158 (list python-atpublic python-psutil))
28159 (home-page "https://flufllock.readthedocs.io")
28160 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
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
28169 (define-public python-flufl-testing
28171 (name "python-flufl-testing")
28176 (uri (pypi-uri "flufl.testing" version))
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")
28185 "This package contains a small collection of test tool plugins for
28186 @code{nose2} and @code{flake8}.")
28187 (license license:asl2.0)))
28189 (define-public python-devtools
28191 (name "python-devtools")
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))
28201 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
28202 (build-system python-build-system)
28204 (list python-pytest python-pytest-mock))
28206 (list python-pygments))
28208 `(#:phases (modify-phases %standard-phases
28213 (home-page "https://github.com/samuelcolvin/python-devtools")
28214 (synopsis "Debug command and development tools")
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)))
28220 (define-public python-dateparser
28222 (name "python-dateparser")
28227 (uri (pypi-uri "dateparser" version))
28230 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
28231 (build-system python-build-system)
28233 (list python-dateutil python-pytz python-regex python-ruamel.yaml
28236 (list python-mock python-parameterized tzdata-for-tests))
28238 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
28241 (modify-phases %standard-phases
28242 (add-before 'check 'set-check-environment
28243 (lambda* (#:key inputs #:allow-other-keys)
28244 (setenv "TZ" "UTC")
28246 (search-input-directory inputs
28247 "share/zoneinfo")))))))
28248 (home-page "https://github.com/scrapinghub/dateparser")
28250 "Date parsing library designed to parse dates from HTML pages")
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)))
28256 (define-public python-dparse
28258 (name "python-dparse")
28263 (uri (pypi-uri "dparse" version))
28266 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
28267 (build-system python-build-system)
28269 (list python-pytest))
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)))
28277 (define-public python-dpath
28279 (name "python-dpath")
28284 (uri (pypi-uri "dpath" version))
28287 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
28288 (build-system python-build-system)
28290 (list python-hypothesis python-mock python-nose))
28293 (modify-phases %standard-phases
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")
28302 "@code{python-dpath} is a library for accessing and searching
28303 dictionaries via /slashed/paths ala xpath.
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)))
28311 (define-public python-safety
28313 (name "python-safety")
28318 (uri (pypi-uri "safety" version))
28321 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
28322 (build-system python-build-system)
28325 (modify-phases %standard-phases
28326 (add-after 'unpack 'disable-tests
28328 (substitute* "tests/test_safety.py"
28329 ;; requires network
28330 (("def test_check_live") "def _test_check_live"))
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)))
28340 (define-public python-pypandoc
28342 (name "python-pypandoc")
28347 (uri (pypi-uri "pypandoc" version))
28350 "149basv4pvzg9zm74cjz68x8s2n5fykyj7prgysb0qfmja73r83f"))))
28351 (build-system python-build-system)
28355 `(("wheel" ,python-wheel)))
28357 `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
28359 texlive-generic-iftex
28363 texlive-xcolor)))))
28366 (modify-phases %standard-phases
28367 (add-before 'check 'disable-tests
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"))
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)))
28380 (define-public python-rnc2rng
28382 (name "python-rnc2rng")
28387 (uri (pypi-uri "rnc2rng" version))
28390 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
28391 (build-system python-build-system)
28393 (list python-rply))
28395 `(#:phases (modify-phases %standard-phases
28398 (invoke "python" "test.py"))))))
28399 (home-page "https://github.com/djc/rnc2rng")
28400 (synopsis "Convert RELAX NG Compact to regular syntax")
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)))
28407 (define-public python-telethon
28409 (name "python-telethon")
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))
28419 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
28420 (build-system python-build-system)
28423 (modify-phases %standard-phases
28425 (lambda* (#:key tests? #:allow-other-keys)
28427 (invoke "py.test" "-v"))
28430 (list python-rsa python-pyaes))
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)))
28439 (define-public python-citeproc-py
28441 (name "python-citeproc-py")
28446 (uri (pypi-uri "citeproc-py" version))
28449 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
28450 (build-system python-build-system)
28452 (list python-lxml python-rnc2rng))
28454 "https://github.com/brechtm/citeproc-py")
28455 (synopsis "Citations and bibliography formatter")
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)))
28463 (define-public python-inform
28465 (name "python-inform")
28470 (uri (pypi-uri "inform" version))
28473 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
28474 (build-system python-build-system)
28476 `(#:tests? #f)) ; PyPI tarball lacks tests
28478 (list python-hypothesis python-pytest-cov python-pytest-runner))
28480 (list python-arrow python-six))
28481 (home-page "https://inform.readthedocs.io")
28482 (synopsis "Print & logging utilities for communicating with user")
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+)))
28489 (define-public python-nestedtext
28491 (name "python-nestedtext")
28496 (uri (pypi-uri "nestedtext" version))
28499 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
28500 (build-system python-build-system)
28502 `(#:tests? #f)) ; PyPI tarball lacks tests
28504 (list python-inform))
28505 (home-page "https://nestedtext.org")
28506 (synopsis "Human readable and writable data interchange format")
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
28517 (define-public python-nest-asyncio
28519 (name "python-nest-asyncio")
28524 (uri (pypi-uri "nest_asyncio" version))
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")
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)))
28539 (define-public python-simpervisor
28541 (name "python-simpervisor")
28545 ;; Tests not included in release.
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))
28552 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
28553 (build-system python-build-system)
28555 `(#:tests? #f ; Test suite can't find aiohttp.
28557 (modify-phases %standard-phases
28559 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
28561 (add-installed-pythonpath inputs outputs)
28562 (invoke "pytest" "--maxfail" "3" "--verbose"))
28565 (list python-aiohttp python-pytest python-pytest-asyncio))
28566 (home-page "https://github.com/yuvipanda/simpervisor")
28567 (synopsis "Simple async process supervisor")
28569 "This package provides a simple async process supervisor in Python.")
28570 (license license:bsd-3)))
28572 (define-public python-parallel
28574 (name "python-parallel")
28575 (version "1.6.4.4")
28579 (uri (string-append
28580 "https://www.parallelpython.com/downloads/pp/pp-"
28584 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
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)))
28599 (define-public python2-parallel
28600 (package-with-python2 python-parallel))
28602 (define-public python-djvulibre
28604 (name "python-djvulibre")
28609 (uri (pypi-uri "python-djvulibre" version))
28611 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
28612 (build-system python-build-system)
28614 (list ghostscript pkg-config python-nose))
28616 (list djvulibre python-cython))
28619 (modify-phases %standard-phases
28620 (add-after 'unpack 'fix-tests
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")
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)))
28631 (define-public python2-djvulibre
28632 (package-with-python2 python-djvulibre))
28634 (define-public python-versioneer
28636 (name "python-versioneer")
28641 (uri (pypi-uri "versioneer" version))
28644 "084fglxafbzvf1vbkzfajvs9qwnvjwwn8pxql9nrlpyipv5xpwk4"))
28645 (patches (search-patches "python-versioneer-guix-support.patch"))))
28646 (build-system python-build-system)
28648 "https://github.com/python-versioneer/python-versioneer")
28650 "Version-string management for VCS-controlled trees")
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
28656 (license license:public-domain)))
28658 (define-public python2-gamera
28660 (name "python2-gamera")
28665 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
28666 "gamera-" version ".tar.gz"))
28668 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
28669 (modules '((guix build utils)))
28672 ;; Remove bundled libraries.
28673 (for-each delete-file-recursively
28674 '("src/libpng-1.2.5"
28676 "src/zlib-1.2.8"))))))
28677 (build-system python-build-system)
28679 (list libpng libtiff zlib))
28681 `(#:python ,python-2
28683 (modify-phases %standard-phases
28684 (add-after 'unpack 'disable-wx-support
28686 (substitute* "setup.py"
28688 "no_wx = True")))))))
28689 (synopsis "Framework for building document analysis applications")
28691 "Gamera is a toolkit for building document image recognition systems.")
28692 (home-page "https://gamera.informatik.hsnr.de/")
28693 (license license:gpl2+)))
28695 (define-public python-contextvars
28697 (name "python-contextvars")
28702 (uri (pypi-uri "contextvars" version))
28705 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
28706 (build-system python-build-system)
28708 (list python-immutables))
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)))
28716 (define-public python-aiofiles
28718 (name "python-aiofiles")
28723 (uri (pypi-uri "aiofiles" version))
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)))
28734 (define-public python-pyre-extensions
28736 (name "python-pyre-extensions")
28741 (uri (pypi-uri "pyre-extensions" version))
28744 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
28745 (build-system python-build-system)
28747 (list python-typing-extensions python-typing-inspect))
28748 (home-page "https://pyre-check.org")
28750 "Type system extensions for use with @code{python-pyre}")
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)))
28756 (define-public python-dataclasses
28758 (name "python-dataclasses")
28763 (uri (pypi-uri "dataclasses" version))
28766 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
28767 (build-system python-build-system)
28769 "https://github.com/ericvsmith/dataclasses")
28771 "Backport of the @code{dataclasses} module for Python 3.6")
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)))
28777 (define-public python-pywatchman
28779 (name "python-pywatchman")
28784 (uri (pypi-uri "pywatchman" version))
28787 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
28788 (build-system python-build-system)
28790 `(#:tests? #f)) ;there are none
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)))
28798 (define-public python-roundrobin
28800 (name "python-roundrobin")
28804 (uri (pypi-uri "roundrobin" version))
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")
28812 "This package provides a collection of utilities for round-robin
28813 distribution in Python.")
28814 (license license:expat)))
28816 (define-public python-helpdev
28818 (name "python-helpdev")
28823 (uri (pypi-uri "helpdev" version))
28826 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
28827 (build-system python-build-system)
28830 (modify-phases %standard-phases
28832 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
28834 (add-installed-pythonpath inputs outputs)
28835 (invoke "pytest" "tests"))
28838 (list python-importlib-metadata))
28840 (list python-pytest))
28841 (home-page "https://gitlab.com/dpizetta/helpdev")
28843 "Extract information about the Python environment easily")
28845 "Helpdev is a library to easily extract information about the Python
28847 (license license:expat)))
28849 (define-public python-logutils
28851 (name "python-logutils")
28856 (uri (pypi-uri "logutils" version))
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)))
28870 (define-public python-helper
28872 (name "python-helper")
28876 (uri (pypi-uri "helper" version))
28879 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
28880 (build-system python-build-system)
28882 (list python-mock))
28884 (list python-logutils python-pyyaml))
28885 (home-page "https://github.com/gmr/helper")
28886 (synopsis "Library for writing configurable applications and daemons")
28888 "This package provides procedures for quickly writing configurable
28889 applications and daemons.")
28890 (license license:bsd-3)))
28892 (define-public python-qtsass
28894 (name "python-qtsass")
28898 ;; There are no tests in the PyPI tarball.
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))
28905 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
28906 (build-system python-build-system)
28908 `(#:test-target "pytest"
28910 (modify-phases %standard-phases
28911 ;; Tests need to read and write files.
28912 (add-before 'check 'make-git-checkout-writable
28914 (for-each make-file-writable (find-files "."))
28917 (list python-pytest python-pytest-cov python-pytest-runner))
28919 (list python-libsass))
28920 (home-page "https://github.com/spyder-ide/qtsass")
28921 (synopsis "Compile SCSS files to valid Qt stylesheets")
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.
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)))
28931 (define-public python-qdarkstyle
28933 (name "python-qdarkstyle")
28938 (uri (pypi-uri "QDarkStyle" version))
28941 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
28942 (build-system python-build-system)
28944 `(;; Fails unable to detect valid Qt bindings even when
28945 ;; added as native-inputs.
28948 (list python-helpdev python-qtpy))
28950 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
28952 "Complete dark stylesheet for Python and Qt applications")
28953 (description "QDarkStyle is the most complete dark stylesheet for Python and
28955 (license license:expat)))
28957 (define-public python-bitstring
28959 (name "python-bitstring")
28964 (uri (pypi-uri "bitstring" version))
28967 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
28968 (build-system python-build-system)
28971 (modify-phases %standard-phases
28973 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
28975 (add-installed-pythonpath inputs outputs)
28976 (with-directory-excursion "test"
28977 (invoke "pytest")))
28980 (list python-pytest))
28981 (home-page "https://github.com/scott-griffiths/bitstring")
28983 "Simple construction, analysis and modification of binary data")
28985 "Bitstring is a library for simple construction, analysis and modification
28987 (license license:expat)))
28989 (define-public python-confuse
28991 (name "python-confuse")
28996 (uri (pypi-uri "confuse" version))
28999 "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
29000 (build-system python-build-system)
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)))
29010 (define-public python-reflink
29012 (name "python-reflink")
29017 (uri (pypi-uri "reflink" version))
29020 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
29021 (build-system python-build-system)
29023 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
29025 (list python-cffi))
29027 (list python-pytest python-pytest-runner))
29028 (home-page "https://gitlab.com/rubdos/pyreflink")
29029 (synopsis "Python wrapper around reflink system call")
29031 "Python reflink wraps around platform specific @code{reflink}
29033 (license license:expat)))
29035 (define-public python-retry
29037 (name "python-retry")
29041 (uri (pypi-uri "retry" version))
29043 (base32 "197v6qrh6858bhzzrjgk2zdqrybppymb1lsvdxnm1i39kfwsigzq"))))
29044 (build-system python-build-system)
29047 #~(modify-phases %standard-phases
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")
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)))
29060 (define-public python-pivy
29062 (name "python-pivy")
29067 (uri (git-reference
29068 (url "https://github.com/coin3d/pivy")
29070 (file-name (git-file-name name version))
29072 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
29073 (build-system python-build-system)
29075 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
29078 (modify-phases %standard-phases
29079 (add-after 'unpack 'patch-cmake-include-dirs
29081 ;; Patch buildsystem to respect Coin3D include directory
29082 (substitute* "CMakeLists.txt"
29083 (("\\$\\{SoQt_INCLUDE_DIRS}")
29084 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
29089 (list python-wrapper
29096 (home-page "https://github.com/coin3d/pivy")
29097 (synopsis "Python bindings to Coin3D")
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)))
29103 (define-public python-crayons
29105 (name "python-crayons")
29110 (uri (pypi-uri "crayons" version))
29113 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
29114 (build-system python-build-system)
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)))
29124 (define-public python-sane
29126 (name "python-sane")
29131 (uri (pypi-uri name version))
29134 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
29135 (build-system python-build-system)
29137 (list python-pytest))
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"))))
29148 (define-public python-scikit-build
29150 (name "python-scikit-build")
29155 (uri (pypi-uri "scikit-build" version))
29157 (base32 "1wx1m9vnxnnz59lyaisgyxldp313kciyd4af8lf112vb8vbjy9yk"))))
29158 (build-system python-build-system)
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.
29172 (setenv "SOURCE_DATE_EPOCH" "315532800")
29173 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
29175 (lambda* (#:key tests? #:allow-other-keys)
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
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 ")))))
29202 (let ((whl (car (find-files "dist" "\\.whl$"))))
29203 (invoke "pip" "--no-cache-dir" "--no-input"
29204 "install" "--no-deps" "--prefix" #$output whl)))))))
29206 (list cmake-minimal
29219 python-pytest-virtualenv
29220 python-pytest-xdist
29222 python-setuptools-scm
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
29234 (license license:expat)))
29236 (define-public python-screenkey
29238 (name "python-screenkey")
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))
29249 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
29250 (build-system python-build-system)
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"
29260 (string-append x11 "/lib/libX11.so.6")))
29261 (substitute* "Screenkey/xlib.py"
29263 (string-append xtst "/lib/libXtst.so.6")))
29265 (add-after 'install 'wrap-screenkey
29266 (lambda* (#:key outputs #:allow-other-keys)
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")))))))))
29273 (list python-distutils-extra
29280 python-setuptools-git
29282 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
29284 "Screencast tool to display pressed keys")
29286 "Screenkey is a screencast tool to display your keys inspired by
29288 (license license:gpl3+)))
29290 (define-public python-jinja2-cli
29292 (name "python-jinja2-cli")
29297 (uri (pypi-uri "jinja2-cli" version))
29300 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
29301 (build-system python-build-system)
29303 (list python-jinja2))
29305 (list python-flake8 python-jinja2 python-pytest))
29306 (home-page "https://github.com/mattrobenolt/jinja2-cli")
29307 (synopsis "Command-line interface to Jinja2")
29309 "This package provides a command-line interface (CLI) to the Jinja2
29311 (license license:bsd-3)))
29313 (define-public python-readability
29315 (name "python-readability")
29320 (uri (pypi-uri "readability" version))
29323 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
29324 (build-system python-build-system)
29326 "https://github.com/andreasvc/readability/")
29328 "Measure the readability of a given text using surface
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)))
29337 (define-public python-listparser
29339 (name "python-listparser")
29344 (uri (pypi-uri "listparser" version))
29347 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
29348 (build-system python-build-system)
29350 "https://github.com/kurtmckee/listparser")
29352 "Parse subscription lists in Python")
29354 "This package provides a Python library that can parse OPML, FOAF, and
29355 iGoogle subscription lists.")
29356 (license license:expat)))
29358 (define-public python-smartypants
29360 (name "python-smartypants")
29364 ;; There's no source tarball for 2.0.1 on PyPI.
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))
29371 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
29372 (build-system python-build-system)
29375 (modify-phases %standard-phases
29377 ;; Its `setup.py test` doesn't report failure with exit status, so
29378 ;; we use `nose` instead.
29380 (invoke "nosetests" "-v" "--exclude=^load_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")
29387 "@command{smartpants} can perform the following transformations:
29389 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
29390 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
29392 @item Dashes (-- and ---) into en- and em-dash entities
29393 @item Three consecutive dots (... or . . .) into an ellipsis entity
29395 (license license:bsd-3)))
29397 (define-public python-typogrify
29399 (name "python-typogrify")
29403 (uri (pypi-uri "typogrify" version))
29406 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
29407 (build-system python-build-system)
29410 (modify-phases %standard-phases
29413 (invoke "nosetests" "-v"))))))
29415 (list python-smartypants))
29418 (list python-nose))
29419 (home-page "https://github.com/mintchaos/typogrify")
29420 (synopsis "Filters to transform text into typographically-improved HTML")
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)))
29428 (define-public python-ld
29435 (uri (pypi-uri "ld" version))
29438 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
29439 (build-system python-build-system)
29442 (home-page "https://github.com/nir0s/ld")
29443 (synopsis "OS platform information API")
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)))
29449 (define-public python-quicktions
29451 (name "python-quicktions")
29456 (uri (pypi-uri "quicktions" version))
29459 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
29460 (modules '((guix build utils)))
29463 ;; This file is generated by Cython.
29464 (delete-file "src/quicktions.c") #t))))
29465 (build-system python-build-system)
29468 (modify-phases %standard-phases
29469 (add-before 'build 'cythonize-sources
29471 (with-directory-excursion "src"
29472 (invoke "cython" "quicktions.pyx"))))
29474 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
29476 (add-installed-pythonpath inputs outputs)
29480 (list python-cython python-pytest))
29481 (home-page "https://github.com/scoder/quicktions")
29482 (synopsis "Fast fractions data type for rational numbers")
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)))
29488 (define-public python-pathvalidate
29490 (name "python-pathvalidate")
29495 (uri (pypi-uri "pathvalidate" version))
29497 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
29498 (build-system python-build-system)
29501 ;; Tests disabled because of circular dependencies.
29502 ;; pathvalidate tests depend on pytest-md-report, which
29503 ;; depends on pathvalidate.
29505 (list python-allpairspy python-click python-faker python-pytest))
29506 (home-page "https://github.com/thombashi/pathvalidate")
29507 (synopsis "Sanitize strings representing paths")
29509 "@code{pathvalidate} is a Python library to sanitize/validate strings
29510 representing paths or filenames.")
29511 (license license:expat)))
29513 (define-public python-escapism
29515 (name "python-escapism")
29520 (uri (pypi-uri "escapism" version))
29523 "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
29524 (build-system python-build-system)
29525 (home-page "https://github.com/minrk/escapism")
29526 (synopsis "Simple, generic library for escaping strings")
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
29531 (license license:expat)))
29533 (define-public python-recommonmark
29535 (name "python-recommonmark")
29540 (uri (pypi-uri "recommonmark" version))
29543 "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
29544 (build-system python-build-system)
29546 (list python-commonmark python-docutils python-sphinx))
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")
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)))
29560 (define-public python-pyhull
29562 (name "python-pyhull")
29563 (version "2015.2.1")
29567 (uri (pypi-uri "pyhull" version))
29570 "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
29571 (build-system python-build-system)
29573 (list python-numpy))
29574 (home-page "https://github.com/materialsvirtuallab/pyhull")
29575 (synopsis "Python wrapper to Qhull")
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
29580 (license license:expat)))
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"))
29587 (name "python-opcodes")
29588 (version "0.3.14") ;from 'opcodes/__init__.py'
29589 (home-page "https://github.com/Maratyszcza/Opcodes")
29592 (uri (git-reference (url home-page) (commit commit)))
29593 (file-name (git-file-name name version))
29596 "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
29597 (build-system python-build-system)
29598 (synopsis "Database of processor instructions and opcodes")
29600 "This project documents instruction sets in a format convenient for
29601 tools development. An instruction set is represented by three files:
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
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
29613 (license license:bsd-2))))
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'
29621 (name "python-peachpy")
29622 (version (git-version version revision commit))
29623 (home-page "https://github.com/Maratyszcza/PeachPy")
29626 (uri (git-reference (url home-page) (commit commit)))
29627 (file-name (git-file-name name version))
29630 "1wnqxspxsacw4556q0b9fbw11nhrkgn6gs8g43jdnpa35f3z9kb6"))
29631 (patches (search-patches "python-peachpy-determinism.patch"))))
29632 (build-system python-build-system)
29634 '(#:phases (modify-phases %standard-phases
29636 (lambda* (#:key tests? #:allow-other-keys)
29638 (invoke "nosetests")))))))
29640 (list python-nose python-rednose python-setuptools))
29642 (list python-six python-opcodes))
29643 (synopsis "Efficient assembly code generation in Python")
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.
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))))
29655 (define-public python-sgmllib3k
29656 (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
29659 (name "python-sgmllib3k")
29661 (git-version "1.0.0" revision commit))
29665 (uri (git-reference
29666 (url "https://github.com/hsoft/sgmllib")
29668 (file-name (git-file-name name version))
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))))
29680 (define-public python-cwcwidth
29682 (name "python-cwcwidth")
29687 (uri (pypi-uri "cwcwidth" version))
29690 "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
29691 (build-system python-build-system)
29693 (list python-cython python-pytest python-setuptools-scm python-toml
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)))
29702 (define-public python-pyan3
29704 (name "python-pyan3")
29708 ;; Source tarball on PyPI lacks tests.
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))
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)
29722 (modify-phases %standard-phases
29724 (lambda* (#:key tests? #:allow-other-keys)
29726 ;; Extend PYTHONPATH so the built package will be found.
29727 (setenv "GUIX_PYTHONPATH"
29728 (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
29729 (invoke "pytest")))))))
29731 (list python-pytest python-pytest-cov python-wheel))
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)))
29742 (define-public python-multipledispatch
29744 (name "python-multipledispatch")
29749 (uri (pypi-uri "multipledispatch" version))
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)))
29761 (define-public python-logical-unification
29763 (name "python-logical-unification")
29768 (uri (pypi-uri "logical-unification" version))
29771 "0j57953hi7kg2rl0163vzjzsvzdyjimnklhx6idf5vaqqf1d3p1j"))))
29772 (build-system python-build-system)
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)))
29781 (define-public python-cons
29783 (name "python-cons")
29788 (uri (pypi-uri "cons" version))
29791 "0w9giq196wps7mbm47c4shdzs5yvwvqajqzkim2p92i51sm5qgvm"))))
29792 (build-system python-build-system)
29794 (list python-pytest-6 python-toml))
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")
29800 "This library implements algorithms and data structures for Lisp-style
29801 cons cells in Python.")
29802 (license license:lgpl3+)))
29804 (define-public python-etuples
29806 (name "python-etuples")
29811 (uri (pypi-uri "etuples" version))
29814 "0jhfyp177v37rl0i7wqfx7q6s5qkz027hl283d1x8d0vm3w0zqc8"))))
29815 (build-system python-build-system)
29817 (list python-cons python-multipledispatch))
29818 (home-page "https://github.com/pythological/etuples")
29819 (synopsis "S-expressions in Python")
29821 "This library implements eval'able S-expression in Python using tuple-like objects.")
29822 (license license:asl2.0)))
29824 (define-public python-minikanren
29826 (name "python-minikanren")
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))
29836 (base32 "0g7wfj5hxalwz7k1301nsjqhjpzsif1bj6wjm2x2kavlm2ypv9jc"))))
29837 (build-system python-build-system)
29839 '(#:phases (modify-phases %standard-phases
29841 (lambda* (#:key tests? #:allow-other-keys)
29843 (invoke "python" "-m" "pytest" "-v" "tests/" "kanren/"))
29846 (list python-coveralls
29855 python-pre-commit))
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")
29862 "The minikanren library provides an algorithmic core for computer algebra
29863 systems in Python.")
29864 (license license:bsd-3)))
29866 (define-public python-dotenv
29868 (name "python-dotenv")
29873 (uri (pypi-uri "python-dotenv" version))
29875 (base32 "13s9imfd0k4d7b1qy5wfqzw5vyj6rhmcrccsdz1l4g39b55b1qxp"))))
29876 (build-system python-build-system)
29879 (modify-phases %standard-phases
29881 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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")))))))
29890 (list python-click))
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")
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)))
29900 (define-public python-dotenv-0.13.0
29901 (package (inherit python-dotenv)
29902 (name "python-dotenv")
29907 (uri (pypi-uri "python-dotenv" version))
29910 "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
29912 (define-public date2name
29913 (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
29917 (version (git-version "0.0" revision commit))
29921 (uri (git-reference
29922 (url "https://github.com/novoid/date2name")
29924 (file-name (git-file-name name version))
29927 "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
29928 (build-system python-build-system)
29930 `(#:tests? #f ; no tests
29932 (modify-phases %standard-phases
29935 (lambda* (#:key outputs #:allow-other-keys)
29936 (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
29937 (binary (string-append bindir "/date2name")))
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+))))
29948 (define-public python-braintree
29950 (name "python-braintree")
29955 (uri (pypi-uri "braintree" version))
29957 (base32 "19kli85q18p80nsn8fm4ql6axpr7bllfqg5chv2ywhr8zr8bssll"))))
29958 (build-system python-build-system)
29960 (list python-requests))
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)))
29968 (define-public python-markuppy
29970 (name "python-markuppy")
29975 (uri (pypi-uri "MarkupPy" version))
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
29984 (license license:expat)))
29986 (define-public python-tablib
29988 (name "python-tablib")
29993 (uri (pypi-uri "tablib" version))
29995 (base32 "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q"))))
29996 (build-system python-build-system)
29999 (modify-phases %standard-phases
30001 (lambda* (#:key tests? #:allow-other-keys)
30003 (setenv "GUIX_PYTHONPATH"
30004 (string-append (getcwd) "/build/lib:"
30005 (getenv "GUIX_PYTHONPATH")))
30006 (invoke "pytest")))))))
30008 (list python-pandas ;; required for test-suite
30009 python-pytest python-pytest-cov python-setuptools-scm))
30011 (list python-markuppy
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).
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)))
30030 (define-public python-csb43
30032 (name "python-csb43")
30037 (uri (pypi-uri "csb43" version))
30039 (base32 "0r0csl9npncnkfafg3rg6xr38d1qr0sxvq7wn7mg9bq41hvvh1si"))))
30040 (build-system python-build-system)
30042 (list python-lxml))
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
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.
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)))
30056 (define-public python-febelfin-coda
30058 (name "python-febelfin-coda")
30063 (uri (pypi-uri "febelfin-coda" version))
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)))
30073 (define-public python-ofxparse
30075 (name "python-ofxparse")
30080 (uri (pypi-uri "ofxparse" version))
30082 (base32 "19y4sp5l9jqiqzzlbqdfiab42qx7d84n4xm4s7jfq397666vcyh5"))))
30083 (build-system python-build-system)
30086 (modify-phases %standard-phases
30088 (lambda* (#:key tests? #:allow-other-keys)
30090 (invoke "nosetests" "-v")))))))
30092 (list python-nose))
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
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)))
30105 (define-public python-rfc3339-validator
30107 (name "python-rfc3339-validator")
30112 (uri (pypi-uri "rfc3339_validator" version))
30114 (base32 "0srg0b89aikzinw72s433994k5gv5lfyarq1adhas11kz6yjm2hk"))))
30115 (build-system python-build-system)
30116 (native-inputs (list python-hypothesis
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)))
30126 (define-public python-strict-rfc3339
30128 (name "python-strict-rfc3339")
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))
30139 "0b12bh9v9gwkm89kxbidxw2z81lg8fx1v5fzgs313v1wgx6qb09p"))))
30140 (build-system python-build-system)
30144 #~(modify-phases %standard-phases
30146 (lambda* (#:key tests? #:allow-other-keys)
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:
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.
30166 (license license:gpl3+)))
30168 (define-public python-stripe
30170 (name "python-stripe")
30175 (uri (pypi-uri "stripe" version))
30177 (base32 "0258lzh4qikhinfggnlfh5aklcvg7lrvl8giqrh0yf0l61wvfrl9"))))
30178 (build-system python-build-system)
30180 '(#:tests? #f)) ;; tests require network
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)))
30191 (define-public python-platformdirs
30193 (name "python-platformdirs")
30198 (uri (pypi-uri "platformdirs" version))
30200 (base32 "1njz0h4iky8iglrb85cd07hpa3lp1a2dfr934dj65hxwzvfk61j4"))))
30201 (build-system python-build-system)
30203 '(#:phases (modify-phases %standard-phases
30205 (lambda* (#:key tests? #:allow-other-keys)
30207 (invoke "pytest" "-vv")))))))
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)))
30220 (define-public python-json2html
30222 (name "python-json2html")
30225 ;; There are no tests in the PyPI tarball.
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))
30233 (base32 "1ncypljnl5y8lsxy6ibcqy412kx3mzxl4ajg67568hvq98kv1sb3"))))
30234 (build-system python-build-system)
30237 (modify-phases %standard-phases
30239 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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)))
30249 (define-public python-face
30251 (name "python-face")
30256 (uri (pypi-uri "face" version))
30258 (base32 "0gpd9f0rmbv3rd2szi2na37l29fabkwazikjrxc6wca1lddwlnbx"))))
30259 (build-system python-build-system)
30262 (modify-phases %standard-phases
30264 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
30266 ;; Make installed package available for running the tests.
30267 (add-installed-pythonpath inputs outputs)
30268 (invoke "pytest" "-v")))))))
30270 (list python-pytest))
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.
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
30286 (license license:bsd-3)))
30288 (define-public python-glom
30290 (name "python-glom")
30291 (version "20.11.0")
30295 (uri (pypi-uri "glom" version))
30297 (base32 "04pba09vdr3qjvqvy14g60fscdsi35chbbyqpczdp76cpir101al"))))
30298 (build-system python-build-system)
30301 (modify-phases %standard-phases
30303 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
30305 ;; Make installed executable available for running the tests.
30307 (string-append (assoc-ref outputs "out") "/bin"
30308 ":" (getenv "PATH")))
30309 (invoke "pytest" "-v")))))))
30311 (list python-pytest python-pyyaml))
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:
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
30326 (license license:bsd-3)))
30328 (define-public python-box
30330 (name "python-box")
30335 (uri (pypi-uri "python-box" version))
30338 "0jhrdif57khx2hsw1q6a9x42knwcvq8ijgqyq1jmll6y6ifyzm2f"))))
30339 (build-system python-build-system)
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")
30345 "This package provides the @code{python-box} Python module.
30346 It implements advanced Python dictionaries with dot notation access.")
30347 (license license:expat)))
30349 (define-public python-fields
30351 (name "python-fields")
30356 (uri (pypi-uri "fields" version))
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)))
30365 (define-public python-aspectlib
30367 (name "python-aspectlib")
30372 (uri (pypi-uri "aspectlib" version))
30374 (base32 "1am4ycf292zbmgz791z393v63w7qrynf8q5p9db2wwf2qj1fqxfj"))))
30375 (build-system python-build-system)
30376 (propagated-inputs (list python-fields))
30377 (home-page "https://github.com/ionelmc/python-aspectlib")
30379 "Python monkey-patching and decorators")
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)))
30387 (define-public python-ijson
30389 (name "python-ijson")
30394 (uri (pypi-uri "ijson" version))
30396 (base32 "1sp463ywj4jv5cp6hsv2qwiima30d09xsabxb2dyq5b17jp0640x"))))
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
30405 (lambda* (#:key tests? #:allow-other-keys)
30407 (invoke "pytest" "-vv")))))))
30409 ;; libyajl is optional, but compiling with it makes faster
30410 ;; backends available to ijson:
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")
30418 "Ijson is an iterative JSON parser with standard Python iterator
30420 (license license:bsd-3)))
30422 (define-public python-ordered-set
30424 (name "python-ordered-set")
30429 (uri (pypi-uri "ordered-set" version))
30431 (base32 "1a34fg3r3480nfm6652kyqql3lwixf8jirzdja9camvnr128wjk9"))))
30432 (build-system python-build-system)
30435 #~(modify-phases %standard-phases
30437 (lambda* (#:key tests? #:allow-other-keys)
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)))
30448 (define-public python-orgparse
30450 (name "python-orgparse")
30455 (uri (pypi-uri "orgparse" version))
30457 (base32 "14iv4pg3rma9560plg0w943x04mr2cmrssda43y2d1x9acrd2n71"))))
30458 (build-system python-build-system)
30461 (modify-phases %standard-phases
30463 (lambda* (#:key tests? #:allow-other-keys)
30465 (invoke "pytest" "-vv" "orgparse/tests")))))))
30467 (list python-pytest python-setuptools-scm))
30468 (home-page "https://github.com/karlicoss/orgparse")
30469 (synopsis "Emacs Org mode parser in Python")
30471 "This package is a Python module for reading Emacs Org mode files.")
30472 (license license:bsd-3)))
30474 (define-public dynaconf
30483 (url "https://github.com/rochacbruno/dynaconf")
30485 (file-name (git-file-name name version))
30488 "0pjyjsdzairpn5vq8nzddhxwxmr18grn272nj31wcy2ipwdl3c3h"))
30489 (patches (search-patches "dynaconf-unvendor-deps.patch"))
30490 (modules '((guix build utils)))
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)
30501 (modify-phases %standard-phases
30502 (add-after 'unpack 'patch-for-click-8
30504 (substitute* "dynaconf/cli.py"
30505 (("click.get_os_args\\()") ;deprecated from Click 8.1+
30508 (lambda* (#:key tests? outputs #:allow-other-keys)
30510 ;; These tests depend on hvac and a live Vault process.
30511 (delete-file "tests/test_vault.py")
30512 (invoke "make" "test_only")))))))
30514 (list python-click python-configobj python-dotenv-0.13.0
30515 python-ruamel.yaml python-toml))
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")
30522 "This package provides @code{dynaconf} the dynamic configurator manager for
30523 your Python project. It provides features such as:
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
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}.
30539 (license license:expat)))
30541 (define-public python-pudb
30543 (name "python-pudb")
30544 (version "2022.1.1")
30547 (uri (pypi-uri "pudb" version))
30550 "0gq82hwnibby9qdyv7ri11phvg94nby4jb0w9h3jk79w89kdsfyv"))))
30551 (build-system python-build-system)
30553 `(#:phases (modify-phases %standard-phases
30554 (add-before 'check 'fix-read-only-home
30556 (setenv "HOME" "/tmp")))
30558 (lambda* (#:key tests? #:allow-other-keys)
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")
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)))
30572 (define-public pudb
30573 (deprecated-package "pudb" python-pudb))
30575 (define-public python-iwlib
30577 (name "python-iwlib")
30582 (uri (pypi-uri "iwlib" version))
30584 (base32 "18bd35wn7zclalpqbry42pf7bjrdggxkkw58mc0k1vkhg9czc1d8"))))
30585 (build-system python-build-system)
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")
30592 "This package provides a Python interface to iw wireless tools.")
30593 (license license:gpl2)))
30595 (define-public python-pdoc3
30597 (name "python-pdoc3")
30602 (uri (pypi-uri "pdoc3" version))
30604 (base32 "1dz4hw10ngidzg9cjvflc8nlrwrjbb3ijhmaw4w6f039p6yff8jz"))
30606 (search-patches "python-pdoc3-tests.patch"))))
30607 (build-system python-build-system)
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")
30614 "This package auto-generates API documentation from Python projects
30615 already existing modules and objects docstrings.")
30616 (license license:agpl3+)))
30618 (define-public python-piexif
30620 (name "python-piexif")
30625 (uri (pypi-uri "piexif" version ".zip"))
30627 (base32 "06sz58q4mrw472p8fbnq7wsj8zpi5js5r8phm2hiwfmz0v33bjw3"))
30629 (search-patches "python-piexif-fix-tests-with-pillow-7.2.patch"))))
30630 (build-system python-build-system)
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)))
30640 (define-public python-pyrss2gen
30642 (name "python-pyrss2gen")
30647 (uri (pypi-uri "PyRSS2Gen" version))
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)))
30657 (define-public python-yapsy
30659 (name "python-yapsy")
30664 (uri (pypi-uri "Yapsy" version))
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
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)))
30679 (define-public python-doit
30681 (name "python-doit")
30686 (uri (pypi-uri "doit" version))
30688 (base32 "0bf0m9n0hyjvjpv051zd26725j8jr23gyvc37v3kkadwbh8dxwcf"))))
30689 (build-system python-build-system)
30691 (list python-cloudpickle python-pyinotify))
30693 (list python-pytest))
30694 (home-page "https://pydoit.org")
30695 (synopsis "Automation tool to execute any kind of task in a build-tools
30697 (description "doit is an automation tool that brings the power of
30698 build-tools to execute any kind of task.
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
30706 @item cache task results
30707 @item correct execution order
30708 @item parallel execution
30709 @item powerful dependency system
30711 (license license:expat)))
30713 (define-public python-phpserialize
30715 (name "python-phpserialize")
30720 (uri (pypi-uri "phpserialize" version))
30722 (base32 "19qgkb9z4zjbjxlpwh2w6pxkz2j3iymnydi69jl0jg905lqjsrxz"))))
30723 (build-system python-build-system)
30726 ;; tests missing in pypi archive, anhow they are quite simple and not worth any hassle
30728 (home-page "http://github.com/mitsuhiko/phpserialize")
30729 (synopsis "Python port of the serialize and unserialize functions of PHP")
30731 "This package provides a port of the serialize and unserialize functions of PHP for Python")
30732 (license license:bsd-3)))
30734 (define-public nikola
30741 (uri (pypi-uri "Nikola" version))
30743 (base32 "1vspzvi4039zgjc93bspqjb384r6c9ksvmidbp8csws2pdbc7sh5"))))
30744 (build-system python-build-system)
30751 python-jinja2 ;; for themes
30756 python-notebook ;; for ipynb
30757 python-phpserialize ;; for wordpress import
30763 python-ruamel.yaml ;; for YAML metadata
30767 (list python-coverage
30771 python-pytest-cov))
30775 #~(modify-phases %standard-phases
30777 (lambda* (#:key tests? #:allow-other-keys)
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)))
30789 (define-public nbss-upload
30791 (name "nbss-upload")
30796 (uri (pypi-uri "nbss-upload" version))
30798 (base32 "0jhyfm7w2ssknmh9789fmpnf79xr7sxbdcjwak6hfha6qparvk38"))))
30799 (build-system python-build-system)
30801 (list python-requests))
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")
30807 "Upload notebooks as @code{.ipynb}, @code{.rmd}, and @code{.html} to a
30808 notebooksharing.space instance.")
30809 (license license:bsd-3)))
30811 (define-public python-reedsolo
30813 (name "python-reedsolo")
30818 (uri (pypi-uri "reedsolo" version))
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)))
30830 (define-public python-esprima
30832 (name "python-esprima")
30837 (uri (pypi-uri "esprima" version))
30839 (base32 "1vi32g991lxcxzmncfiszh8m9bwkh4887szskkdi0a9wdn3imnq8"))))
30840 (build-system python-build-system)
30841 (home-page "https://github.com/Kronuz/esprima-python")
30843 "ECMAScript parsing infrastructure for analysis in Python")
30845 "This package provides ECMAScript parsing infrastructure for
30846 multipurpose analysis in Python.")
30847 (license license:bsd-3)))
30849 (define-public python-types-dataclasses
30851 (name "python-types-dataclasses")
30855 (uri (pypi-uri "types-dataclasses" version))
30858 "1mq6qd365m8ml889zl5dxj9kncjv71iq1d1fvgj59y0ixlpm6s35"))))
30859 (build-system python-build-system)
30860 (home-page "https://github.com/python/typeshed")
30861 (synopsis "Typing stubs for dataclasses")
30863 "This package provides a collection of library stubs for Python, with
30865 (license license:asl2.0)))
30867 (define-public python-types-docutils
30869 (name "python-types-docutils")
30874 (uri (pypi-uri "types-docutils" version))
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)))
30884 (define-public python-psycopg2-binary
30886 (name "python-psycopg2-binary")
30890 (uri (pypi-uri "psycopg2-binary" version))
30893 "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn"))))
30894 (build-system python-build-system)
30895 (inputs (list postgresql))
30897 ;; Tests are disable because they need a live instance of PostgreSQL.
30899 (home-page "https://psycopg.org/")
30900 (synopsis "PostgreSQL database adapter for Python")
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.
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
30917 Psycopg 2 is both Unicode and Python 3 friendly.")
30918 (license license:lgpl3+)))
30920 (define-public python-pyfuse3
30922 (name "python-pyfuse3")
30927 (uri (pypi-uri "pyfuse3" version))
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+)))
30940 (define-public python-ansicolors
30942 (name "python-ansicolors")
30947 (uri (pypi-uri "ansicolors" version ".zip"))
30949 (base32 "1q3jqglkq4z0f6nkkn8bswcwqg012i2grrc27kabr8286dg4zycr"))))
30950 (build-system python-build-system)
30955 (home-page "https://github.com/jonathaneunice/colors/")
30956 (synopsis "ANSI colors for Python")
30958 "This package adds ANSI colors and decorations to your strings.")
30959 (license license:isc)))
30961 (define-public python-types-freezegun
30963 (name "python-types-freezegun")
30968 (uri (pypi-uri "types-freezegun" version))
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}
30977 (license license:asl2.0)))
30979 (define-public python-types-pytz
30981 (name "python-types-pytz")
30982 (version "2021.3.6")
30986 (uri (pypi-uri "types-pytz" version))
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}
30995 (license license:asl2.0)))
30997 (define-public python-types-toml
30999 (name "python-types-toml")
31004 (uri (pypi-uri "types-toml" version))
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}
31013 (license license:asl2.0)))
31015 (define-public python-types-ujson
31017 (name "python-types-ujson")
31021 (uri (pypi-uri "types-ujson" version))
31024 "0k9n9hsq4k2zaakdwbkcsvi7m8d3mv2y9yl6f171y58ld4qpcxcy"))))
31025 (build-system python-build-system)
31026 (home-page "https://github.com/python/typeshed")
31027 (synopsis "Typing stubs for ujson")
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
31032 (license license:asl2.0)))
31034 (define-public python-stltools
31036 (name "python-stltools")
31037 (version "2022.01.20")
31040 (uri (git-reference
31041 (url "https://github.com/rsmith-nl/stltools")
31043 (file-name (git-file-name name version))
31046 "1k6dhszza4lpy46qffaqx5zr70ikfqqysbacy7zabnrvz09fd4rs"))))
31047 (build-system python-build-system)
31049 `(#:use-setuptools? #f
31051 (modify-phases %standard-phases
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)
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")))))
31067 (lambda* (#:key tests? #:allow-other-keys)
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)))
31080 (define-public python-multipart
31082 (name "python-multipart")
31086 (uri (pypi-uri "python-multipart" version))
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))
31094 `(#:phases (modify-phases %standard-phases
31095 ;; There is a bug in the test_suit specification.
31096 (add-after 'unpack 'patch-test-suite
31098 ;; Make compatible with PyYAML 6.
31099 (substitute* "multipart/tests/test_multipart.py"
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")
31112 "This package provides a streaming multipart parser for Python.")
31113 (license license:asl2.0)))
31115 (define-public python-aiopg
31117 (name "python-aiopg")
31121 (uri (pypi-uri "aiopg" version))
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")
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)))
31136 (define-public python-verspec
31138 (name "python-verspec")
31142 (uri (pypi-uri "verspec" version))
31145 "07n06wv85fm4vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64"))))
31146 (build-system python-build-system)
31147 (native-inputs (list python-coverage python-flake8 python-mypy
31148 python-pretend python-pytest))
31150 `(#:phases (modify-phases %standard-phases
31152 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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")
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))))
31164 (define-public python-shtab
31166 (name "python-shtab")
31171 (uri (pypi-uri "shtab" version))
31173 (base32 "127mymfm7r0hddk2vknqq34fj6dirj6ip990i3g4isx0lsd7pnsc"))))
31174 (build-system python-build-system)
31179 python-pytest-timeout
31180 python-setuptools-scm
31184 (modify-phases %standard-phases
31187 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
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")
31194 "This package automatically generates shell tab completion scripts for
31196 (license license:asl2.0)))
31198 (define-public python-style
31200 (name "python-style")
31205 (uri (pypi-uri "style" version))
31207 (base32 "1dcfb578v9mrwh92rgms87gql0gp4vgj6l9hpgyfg0wbd3rh3bfh"))))
31208 (build-system python-build-system)
31209 (home-page "https://github.com/lmittmann/style")
31210 (synopsis "Terminal string styling")
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)))
31216 (define-public python-sre-yield
31218 (name "python-sre-yield")
31223 (uri (pypi-uri "sre_yield" version))
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")
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)))
31238 (define-public python-pyperf
31240 (name "python-pyperf")
31245 (uri (pypi-uri "pyperf" version))
31247 (base32 "189qf9wdbig0fk4n3bavx8acgdbay5lllfvw48jvbfaafb7y5hja"))))
31248 (build-system python-build-system)
31251 (modify-phases %standard-phases
31252 (add-after 'unpack 'fix-tests
31254 ;; Some of these tests fail with:
31256 ;; ModuleNotFoundError: No module named 'pyperf'
31258 ;; even when calling ‘add-installed-pythonpath’ in the ‘check’
31260 (delete-file "pyperf/tests/test_examples.py")))
31262 (lambda* (#:key tests? #:allow-other-keys)
31264 ;; From tox.ini's ‘testenv.commands’.
31265 (invoke "python" "-bb" "-Wd"
31266 "-m" "unittest" "discover"
31267 "-s" "pyperf/tests/" "-v")))))))
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:
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.
31283 (license license:expat)))
31285 (define-public python-pydispatcher
31287 (name "python-pydispatcher")
31292 (uri (pypi-uri "PyDispatcher" version))
31294 (base32 "1bswbmhlbqdxlgbxlb6xrlm4k253sg8nvpl1whgsys8p3fg0cw2m"))))
31295 (build-system python-build-system)
31298 (modify-phases %standard-phases
31300 (lambda* (#:key tests? #:allow-other-keys)
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.
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)))
31315 (define-public python-queuelib
31317 (name "python-queuelib")
31322 (uri (pypi-uri "queuelib" version))
31324 (base32 "1lpwq8wx3025i14y5h0hbald2ypbarf081pql6cqcak4y9kp482b"))))
31325 (build-system python-build-system)
31326 (native-inputs (list python-pytest))
31327 (home-page "https://github.com/scrapy/queuelib")
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.
31334 Queuelib provides collections for queues (FIFO), stacks (LIFO), queues
31335 sorted by priority and queues that are emptied in a round-robin
31337 (license license:bsd-3)))
31339 (define-public python-itemadapter
31341 (name "python-itemadapter")
31346 (uri (pypi-uri "itemadapter" version))
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.
31356 Currently supported types are:
31358 @item scrapy.item.Item
31360 @item dataclass-based classes
31361 @item attrs-based classes
31362 @item pydantic-based classes
31365 Additionally, interaction with arbitrary types is supported by
31366 implementing a pre-defined interface.")
31367 (license license:bsd-3)))
31369 (define-public python-itemloaders
31371 (name "python-itemloaders")
31376 (uri (pypi-uri "itemloaders" version))
31378 (base32 "15hc78h90qhwass1bga1c3xar2dd6j8sxg61zg6jvh74lf6csxqj"))))
31379 (build-system python-build-system)
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.
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)))
31393 (define-public python-hypy-utils
31395 (name "python-hypy-utils")
31399 (uri (pypi-uri "hypy_utils" version))
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)))
31410 (define-public python-mike
31412 (name "python-mike")
31416 (uri (pypi-uri "mike" version))
31419 "0yxp816x7s948xsd0fifvq9shg01xdxlifd9rzf5y2rd9iwz3hsn"))))
31420 (build-system python-build-system)
31422 (list python-coverage python-flake8 python-shtab))
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")
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)))
31433 (define-public python-arpeggio
31435 (name "python-arpeggio")
31439 (uri (pypi-uri "Arpeggio" version))
31442 "0ggdsck1wpladd5bh9drhkmm86bblgk2wagrhn3sdf4v04wkic6n"))))
31443 (build-system python-build-system)
31444 (native-inputs (list python-coverage
31450 python-pytest-runner
31453 (home-page "https://github.com/textX/Arpeggio")
31454 (synopsis "Packrat parser interpreter for Python")
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)))
31462 (define-public python-flatten-json
31464 (name "python-flatten-json")
31469 (uri (pypi-uri "flatten_json" version))
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")
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)))
31481 (define-public python-deepmerge
31483 (name "python-deepmerge")
31488 (uri (pypi-uri "deepmerge" version))
31490 (base32 "06hagzg8ccmjzqvszdxb52jgx5il8a1jdz41n4dpkyyjsfg7fi2b"))))
31491 (build-system python-build-system)
31495 #~(modify-phases %standard-phases
31496 (add-before 'build 'set-version
31498 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
31499 ;; ZIP does not support timestamps before 1980.
31500 (setenv "SOURCE_DATE_EPOCH" "315532800")))
31503 (invoke "python" "-m" "build" "--wheel"
31504 "--no-isolation" ".")))
31506 (lambda* (#:key tests? #:allow-other-keys)
31508 (invoke "pytest"))))
31511 (let ((whl (car (find-files "dist" "\\.whl$"))))
31512 (invoke "pip" "--no-cache-dir" "--no-input"
31513 "install" "--no-deps" "--prefix" #$output whl)))))))
31515 (list python-pypa-build
31516 python-setuptools-scm
31519 (home-page "https://deepmerge.readthedocs.io/en/latest/")
31520 (synopsis "Merge nested data structures")
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)))
31526 (define-public python-murmurhash3
31528 (name "python-murmurhash3")
31532 (uri (pypi-uri "murmurhash3" version))
31535 "1gdzys1212dx70byz07ipknbw1awbqskh6aznlkm85js8b8qfczm"))))
31536 (build-system python-build-system)
31537 (native-inputs (list python-cython python-pytest))
31538 (inputs (list python))
31541 '((ice-9 ftw) (ice-9 match)
31543 (guix build python-build-system))
31545 #~(modify-phases %standard-phases
31546 (add-after 'unpack 'set-source-file-times-to-1980
31548 (let ((circa-1980 (* 10 366 24 60 60)))
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)")
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
31558 (license license:public-domain)))
31560 (define-public python-murmurhash
31562 (name "python-murmurhash")
31566 (uri (pypi-uri "murmurhash" version))
31569 "0vwkn98c703nvsigl2nz99rax2pafkx3djjfkgc49jiipmp3j2k3"))))
31570 (build-system python-build-system)
31571 (native-inputs (list python-cython python-pytest))
31572 (inputs (list python python-murmurhash3))
31575 '((ice-9 ftw) (ice-9 match)
31577 (guix build python-build-system))
31579 #~(modify-phases %standard-phases
31580 (add-after 'unpack 'set-source-file-times-to-1980
31582 (let ((circa-1980 (* 10 366 24 60 60)))
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)))
31591 ;; Scooby requires for its test suite a ‘pyvips’ package that is missing its
31592 ;; VIPS dependency.
31593 (define python-pyvips-for-python-scooby
31595 (inherit python-pyvips)
31596 (name "python-pyvips-for-python-scooby")
31598 (substitute-keyword-arguments (package-arguments python-pyvips)
31600 #~(modify-phases #$phases
31601 (delete 'fix-paths)
31602 ;; The checks won't succeed without VIPS.
31604 (delete 'sanity-check)))))
31606 (modify-inputs (package-inputs python-pyvips)
31608 (synopsis "pyvips for Scooby's test suite")))
31610 (define-public python-scooby
31612 (name "python-scooby")
31615 ;; The PyPI tarball does not contain the tests.
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))
31623 (base32 "1gkpmz8wl3jg8ylf1na35308sznw2g9wx33zqlyq5i2gpy2ml9mw"))))
31624 (build-system python-build-system)
31626 (list python-beautifulsoup4
31630 python-pyvips-for-python-scooby
31633 (list python-psutil))
31636 (modify-phases %standard-phases
31637 (add-after 'unpack 'fix-tests
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.*") ""))))
31647 (lambda* (#:key tests? #:allow-other-keys)
31649 (invoke "pytest")))))))
31650 (home-page "https://github.com/banesullivan/scooby")
31651 (synopsis "Report hardware information and Python package versions")
31653 "The Scooby package reports the following information about the currently
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.
31666 It can generate reports as HTML tables or plain text lists.
31668 Scooby has no required dependencies, and only few optional dependencies.")
31669 (license license:expat)))
31671 (define-public python-cymem
31673 (name "python-cymem")
31677 (uri (pypi-uri "cymem" version))
31680 "0pkyy60zk9654sj991w111p1l0m8wvz36nslw96x6nb9h6sjb5qn"))))
31681 (build-system python-build-system)
31683 (list python-cython
31689 #:modules '((ice-9 ftw)
31692 (guix build python-build-system))
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.
31701 (let ((circa-1980 (* 10 366 24 60 60)))
31702 (ftw "." (lambda (file stat flag)
31703 (utime file circa-1980 circa-1980)
31705 (home-page "https://github.com/explosion/cymem")
31706 (synopsis "Cython memory pool for RAII-style memory management")
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)))
31713 (define-public python-preshed
31715 (name "python-preshed")
31719 (uri (pypi-uri "preshed" version))
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))
31728 '((ice-9 ftw) (ice-9 match)
31730 (guix build python-build-system))
31732 #~(modify-phases %standard-phases
31733 (add-after 'unpack 'set-source-file-times-to-1980
31735 (let ((circa-1980 (* 10 366 24 60 60)))
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")
31742 "Simple but high performance Cython hash table mapping pre-randomized keys
31744 (license license:expat)))
31746 (define-public python-catalogue
31748 (name "python-catalogue")
31752 (uri (pypi-uri "catalogue" version))
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")
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)))
31772 (define-public python-wasabi
31774 (name "python-wasabi")
31778 (uri (pypi-uri "wasabi" version))
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")
31787 "This package provides a lightweight console printing and formatting
31788 toolkit for Python.")
31789 (license license:expat)))
31791 (define-public python-srt
31793 (name "python-srt")
31797 (uri (pypi-uri "srt" version))
31800 "0l24710spxarijmv3h7iicvx0lv6m3d4xg77nd9kyv8jwifav93s"))))
31801 (build-system python-build-system)
31802 (home-page "https://github.com/cdown/srt")
31803 (synopsis "SRT parsing library")
31805 "This package provides a Python library for parsing, modifying, and
31806 composing subtitles in the SRT file format.")
31807 (license license:expat)))
31809 (define-public python-gatt
31811 (name "python-gatt")
31815 (uri (pypi-uri "gatt" version))
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:
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
31839 Currently, Linux is the only platform supported by this library.")
31840 (license license:expat)))