fa1fec6b5b1444c60f7b2f5bbef1b8709fabeb39
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 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 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019, 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, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
30 ;;; Copyright © 2016, 2017, 2021 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018, 2021 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019, 2021 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, 2019, 2020, 2021 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 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 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020, 2021 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 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 © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
96 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
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 Pradana Aumars <paumars@courrier.dev>
111 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
112 ;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
113 ;;;
114 ;;; This file is part of GNU Guix.
115 ;;;
116 ;;; GNU Guix is free software; you can redistribute it and/or modify it
117 ;;; under the terms of the GNU General Public License as published by
118 ;;; the Free Software Foundation; either version 3 of the License, or (at
119 ;;; your option) any later version.
120 ;;;
121 ;;; GNU Guix is distributed in the hope that it will be useful, but
122 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
123 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124 ;;; GNU General Public License for more details.
125 ;;;
126 ;;; You should have received a copy of the GNU General Public License
127 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
128
129 (define-module (gnu packages python-xyz)
130 #:use-module ((guix licenses) #:prefix license:)
131 #:use-module (gnu packages)
132 #:use-module (gnu packages algebra)
133 #:use-module (gnu packages adns)
134 #:use-module (gnu packages aidc)
135 #:use-module (gnu packages attr)
136 #:use-module (gnu packages backup)
137 #:use-module (gnu packages bash)
138 #:use-module (gnu packages check)
139 #:use-module (gnu packages cmake)
140 #:use-module (gnu packages compression)
141 #:use-module (gnu packages crypto)
142 #:use-module (gnu packages databases)
143 #:use-module (gnu packages dbm)
144 #:use-module (gnu packages djvu)
145 #:use-module (gnu packages docker)
146 #:use-module (gnu packages enchant)
147 #:use-module (gnu packages file)
148 #:use-module (gnu packages fontutils)
149 #:use-module (gnu packages freedesktop)
150 #:use-module (gnu packages gcc)
151 #:use-module (gnu packages geo)
152 #:use-module (gnu packages ghostscript)
153 #:use-module (gnu packages gl)
154 #:use-module (gnu packages glib)
155 #:use-module (gnu packages gnome)
156 #:use-module (gnu packages gnupg)
157 #:use-module (gnu packages graphviz)
158 #:use-module (gnu packages graphics)
159 #:use-module (gnu packages gsasl)
160 #:use-module (gnu packages gstreamer)
161 #:use-module (gnu packages gtk)
162 #:use-module (gnu packages haskell-xyz)
163 #:use-module (gnu packages icu4c)
164 #:use-module (gnu packages image)
165 #:use-module (gnu packages imagemagick)
166 #:use-module (gnu packages jupyter)
167 #:use-module (gnu packages kerberos)
168 #:use-module (gnu packages libevent)
169 #:use-module (gnu packages libffi)
170 #:use-module (gnu packages libidn)
171 #:use-module (gnu packages linux)
172 #:use-module (gnu packages llvm)
173 #:use-module (gnu packages man)
174 #:use-module (gnu packages markup)
175 #:use-module (gnu packages maths)
176 #:use-module (gnu packages monitoring)
177 #:use-module (gnu packages multiprecision)
178 #:use-module (gnu packages networking)
179 #:use-module (gnu packages ncurses)
180 #:use-module (gnu packages openstack)
181 #:use-module (gnu packages pcre)
182 #:use-module (gnu packages pdf)
183 #:use-module (gnu packages perl)
184 #:use-module (gnu packages photo)
185 #:use-module (gnu packages pkg-config)
186 #:use-module (gnu packages protobuf)
187 #:use-module (gnu packages python)
188 #:use-module (gnu packages python-build)
189 #:use-module (gnu packages python-check)
190 #:use-module (gnu packages python-compression)
191 #:use-module (gnu packages python-crypto)
192 #:use-module (gnu packages python-science)
193 #:use-module (gnu packages python-web)
194 #:use-module (gnu packages qt)
195 #:use-module (gnu packages rdf)
196 #:use-module (gnu packages readline)
197 #:use-module (gnu packages regex)
198 #:use-module (gnu packages sdl)
199 #:use-module (gnu packages scanner)
200 #:use-module (gnu packages search)
201 #:use-module (gnu packages serialization)
202 #:use-module (gnu packages shells)
203 #:use-module (gnu packages sphinx)
204 #:use-module (gnu packages ssh)
205 #:use-module (gnu packages swig)
206 #:use-module (gnu packages terminals)
207 #:use-module (gnu packages tex)
208 #:use-module (gnu packages texinfo)
209 #:use-module (gnu packages textutils)
210 #:use-module (gnu packages time)
211 #:use-module (gnu packages tls)
212 #:use-module (gnu packages version-control)
213 #:use-module (gnu packages video)
214 #:use-module (gnu packages web)
215 #:use-module (gnu packages wxwidgets)
216 #:use-module (gnu packages base)
217 #:use-module (gnu packages xml)
218 #:use-module (gnu packages xorg)
219 #:use-module (gnu packages xdisorg)
220 #:use-module (gnu packages tcl)
221 #:use-module (gnu packages bdw-gc)
222 #:use-module (gnu packages serialization)
223 #:use-module (guix packages)
224 #:use-module (guix download)
225 #:use-module (guix git-download)
226 #:use-module (guix hg-download)
227 #:use-module (guix gexp)
228 #:use-module (guix utils)
229 #:use-module (guix build-system gnu)
230 #:use-module (guix build-system cmake)
231 #:use-module (guix build-system python)
232 #:use-module (guix build-system trivial)
233 #:use-module (srfi srfi-1)
234 #:use-module (srfi srfi-26))
235
236 (define-public python-janus
237 (package
238 (name "python-janus")
239 (version "0.6.1")
240 (source
241 (origin
242 (method url-fetch)
243 (uri (pypi-uri "janus" version))
244 (sha256
245 (base32 "030xvl2vghi5ispfalhvch1rl6i2jsy5bf1dgjafa7vifppy04j7"))))
246 (build-system python-build-system)
247 (arguments
248 `(#:phases
249 (modify-phases %standard-phases
250 (replace 'check
251 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
252 (when tests?
253 (add-installed-pythonpath inputs outputs)
254 (invoke "pytest" "--cov=janus" "--cov=tests")))))))
255 (native-inputs
256 `(("python-pytest" ,python-pytest)
257 ("python-pytest-cov" ,python-pytest-cov)
258 ("python-pytest-asyncio" ,python-pytest-asyncio)))
259 (home-page "https://github.com/aio-libs/janus/")
260 (synopsis
261 "Sync-async queue to interoperate between asyncio tasks and classic threads")
262 (description
263 "Mixed sync-async queue, supposed to be used for communicating between
264 classic synchronous (threaded) code and asynchronous (in terms of
265 @url{https://docs.python.org/3/library/asyncio.html,asyncio}) one. Like
266 @url{https://en.wikipedia.org/wiki/Janus,Janus god} the queue object from the
267 library has two faces: synchronous and asynchronous interface. Synchronous is
268 fully compatible with
269 @url{https://docs.python.org/3/library/queue.html,standard queue},
270 asynchronous one follows
271 @url{https://docs.python.org/3/library/asyncio-queue.html,asyncio queue
272 design}.")
273 (license license:asl2.0)))
274
275 (define-public python-logbook
276 (package
277 (name "python-logbook")
278 (version "1.5.3")
279 (source
280 (origin
281 (method url-fetch)
282 (uri (pypi-uri "Logbook" version))
283 (sha256
284 (base32 "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36"))))
285 (build-system python-build-system)
286 (arguments
287 `(#:phases
288 (modify-phases %standard-phases
289 (add-before 'build 'cythonize-sources
290 (lambda _
291 (with-directory-excursion "logbook"
292 (invoke "cython" "_speedups.pyx"))))
293 (replace 'check
294 (lambda* (#:key tests? #:allow-other-keys)
295 (when tests?
296 ;; Check cython build also
297 (setenv "CYBUILD" "True")
298 (invoke "pytest" "--cov=logbook" "-r" "s" "tests")))))))
299 (native-inputs
300 `(("python-cython" ,python-cython)
301 ("python-mock" ,python-mock)
302 ("python-pytest" ,python-pytest)
303 ("python-pytest-cov" ,python-pytest-cov)
304 ("python-google-brotli" ,python-google-brotli)))
305 (home-page "https://github.com/getlogbook/logbook")
306 (synopsis "Logbook is a logging replacement for Python")
307 (description
308 "Logbook is a logging system for Python that replaces the standard
309 library’s logging module. It was designed with both complex and simple
310 applications in mind and the idea to make logging fun.")
311 (license license:bsd-3)))
312
313 (define-public python-ueberzug
314 (package
315 (name "python-ueberzug")
316 (version "18.1.9")
317 (source
318 (origin
319 (method url-fetch)
320 (uri (pypi-uri "ueberzug" version))
321 (sha256
322 (base32
323 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
324 (build-system python-build-system)
325 (inputs
326 `(("libx11" ,libx11)
327 ("libxext" ,libxext)))
328 (propagated-inputs
329 `(("python-attrs" ,python-attrs)
330 ("python-docopt" ,python-docopt)
331 ("python-pillow" ,python-pillow)
332 ("python-xlib" ,python-xlib)))
333 (home-page "https://github.com/seebye/ueberzug")
334 (synopsis "Command line util to display images in combination with X11")
335 (description "Überzug is a command line util which allows to draw images on
336 terminals by using child windows. The advantages of using Überzug are:
337 @itemize
338 @item No race conditions as a new window is created to display images.
339 @item Expose events will be processed, so images will be redrawn on switch
340 workspaces.
341 @item Tmux support (excluding multi pane windows).
342 @item Terminals without the WINDOWID environment variable are supported.
343 @item Chars are used as position - and size unit.
344 @item No memory leak (/ unlimited cache).
345 @end itemize")
346 (license license:gpl3+)))
347
348 (define-public python-fire
349 (package
350 (name "python-fire")
351 (version "0.4.0")
352 (source
353 (origin
354 (method url-fetch)
355 (uri (pypi-uri "fire" version))
356 (sha256
357 (base32
358 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
359 (build-system python-build-system)
360 (native-inputs
361 `(("python-pytest", python-pytest)))
362 (arguments
363 '(#:phases
364 (modify-phases %standard-phases
365 (replace 'check
366 (lambda* (#:key tests? #:allow-other-keys)
367 (when tests?
368 (invoke "pytest")))))))
369 (inputs
370 `(("python-six", python-six)
371 ("python-termcolor", python-termcolor)))
372 (synopsis "Library for automatically generating command line interfaces")
373 (description
374 "Fire is a library for automatically generating command line interfaces
375 from absolutely any Python object. The following are the advantages:
376 @itemize
377 @item A simple way to create a CLI in Python.
378 @item A helpful tool for developing and debugging Python code.
379 @item Helps with exploring existing code or turning other people's code into a
380 command line interface.
381 @item Makes transitioning between Bash and Python easier.
382 @item Makes using a Python REPL easier by setting up the REPL with the modules
383 and variables you'll need already imported and created.
384 @end itemize")
385 (home-page "https://github.com/google/python-fire")
386 (license license:asl2.0)))
387
388 (define-public python-twodict
389 (package
390 (name "python-twodict")
391 (version "1.2")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (pypi-uri "twodict" version))
396 (sha256
397 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
398 (build-system python-build-system)
399 (home-page "https://github.com/MrS0m30n3/twodict")
400 (synopsis "Two way ordered dictionary for Python")
401 (description "TwoDict is a custom dictionary in which you can get the
402 key:value relationship but you can also get the value:key relationship. It also
403 remembers the order in which the items were inserted and supports almost all the
404 features of the Python's built-in dict.")
405 (license license:unlicense)))
406
407 (define-public python2-twodict
408 (package
409 (inherit python-twodict)
410 (name "python2-twodict")
411 (version "1.2")
412 (source
413 (origin
414 (method url-fetch)
415 (uri (pypi-uri "twodict" version))
416 (sha256
417 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
418 (build-system python-build-system)
419 (arguments
420 `(#:python ,python-2))))
421
422 (define-public python-argopt
423 (package
424 (name "python-argopt")
425 (version "0.7.0")
426 (source (origin
427 (method url-fetch)
428 (uri (pypi-uri "argopt" version))
429 (sha256
430 (base32
431 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
432 (build-system python-build-system)
433 (native-inputs
434 `(("python-coverage" ,python-coverage)
435 ("python-nose" ,python-nose)
436 ("python-setuptools" ,python-setuptools) ; Won't build without this.
437 ("python-setuptools-scm" ,python-setuptools-scm)))
438 (propagated-inputs
439 `(("python-toml" ,python-toml)
440 ("python-flake8" ,python-flake8)))
441 (home-page "https://github.com/casperdcl/argopt")
442 (synopsis "Generate a command-line interface from a docstring")
443 (description "This package provides tools to define a command line interface
444 from a docstring rather than the other way around.")
445 (license license:mpl2.0)))
446
447 (define-public python-cachetools
448 (package
449 (name "python-cachetools")
450 (version "4.2.2")
451 (source (origin
452 (method url-fetch)
453 (uri (pypi-uri "cachetools" version))
454 (sha256
455 (base32
456 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
457 (build-system python-build-system)
458 (home-page "https://github.com/tkem/cachetools/")
459 (synopsis "Extensible memoizing collections and decorators")
460 (description "This module provides various memoizing collections and
461 decorators, including variants of the Python standard library's
462 @code{lru_cache} function decorator.")
463 (license license:expat)))
464
465 (define-public python-colorful
466 (package
467 (name "python-colorful")
468 (version "0.5.4")
469 (source
470 (origin
471 (method url-fetch)
472 (uri
473 (pypi-uri "colorful" version))
474 (sha256
475 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
476 (build-system python-build-system)
477 ;; FIXME: tests cannot be computed:
478 ;; "Can't perform this operation for unregistered loader type"
479 (arguments
480 `(#:tests? #f))
481 (native-inputs
482 `(("python-coverage" ,python-coverage)
483 ("python-flake8" ,python-flake8)
484 ("python-pytest" ,python-pytest)))
485 (propagated-inputs
486 `(("python-colorama" ,python-colorama)))
487 (home-page "http://github.com/timofurrer/colorful")
488 (synopsis "Terminal string styling")
489 (description "Colorful provides an array of text styles, that can be used
490 as functions or string constants to form colored terminal output.")
491 (license license:expat)))
492
493 (define-public python-yaspin
494 (package
495 (name "python-yaspin")
496 (version "1.5.0")
497 (source
498 (origin
499 (method url-fetch)
500 (uri
501 (pypi-uri "yaspin" version))
502 (sha256
503 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
504 (build-system python-build-system)
505 (native-inputs
506 `(("python-pytest" ,python-pytest)))
507 (home-page "https://github.com/pavdmyt/yaspin")
508 (synopsis "Yet Another Terminal Spinner")
509 (description "Yaspin provides a terminal spinner to indicate the progress
510 during long operations.")
511 (license license:expat)))
512
513 (define-public python-lunr
514 (package
515 (name "python-lunr")
516 (version "0.6.0")
517 (source
518 (origin
519 (method url-fetch)
520 (uri
521 (pypi-uri "lunr" version))
522 (sha256
523 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
524 (build-system python-build-system)
525 (native-inputs
526 `(("python-mock" ,python-mock)
527 ("python-pytest" ,python-pytest)))
528 (propagated-inputs
529 `(("python-nltk" ,python-nltk-3.4)))
530 (home-page
531 "https://github.com/yeraydiazdiaz/lunr.py")
532 (synopsis "Full-text search library")
533 (description "This package provides python library for full-text search.
534 It indexes documents and provides a search interface for retrieving documents
535 that best match text queries.")
536 (license license:expat)))
537
538 (define-public python-mkdocs
539 (package
540 (name "python-mkdocs")
541 (version "1.1.2")
542 (source
543 (origin
544 (method url-fetch)
545 (uri
546 (pypi-uri "mkdocs" version))
547 (sha256
548 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
549 (build-system python-build-system)
550 (arguments
551 `(#:phases
552 (modify-phases %standard-phases
553 ;; Requirements refer to a specific version of dependencies,
554 ;; which are too old. So we patch to refer to any later version.
555 (add-after 'unpack 'patch-requirements
556 (lambda _
557 (substitute* "setup.py"
558 (("==") ">=")))))))
559 (propagated-inputs
560 `(("python-click" ,python-click)
561 ("python-jinja2" ,python-jinja2)
562 ("python-livereload" ,python-livereload)
563 ("python-lunr" ,python-lunr)
564 ("python-markdown" ,python-markdown)
565 ("python-pyyaml" ,python-pyyaml)
566 ("python-tornado" ,python-tornado)))
567 (home-page "https://www.mkdocs.org")
568 (synopsis "Project documentation with Markdown")
569 (description "MkDocs is a static site generator geared towards building
570 project documentation. Documentation source files are written in Markdown, and
571 configured with a single YAML configuration file.")
572 (license license:bsd-3)))
573
574 (define-public python-pymdown-extensions
575 (package
576 (name "python-pymdown-extensions")
577 (version "8.1.1")
578 (source
579 (origin
580 (method url-fetch)
581 (uri
582 (pypi-uri "pymdown-extensions" version))
583 (sha256
584 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
585 (build-system python-build-system)
586 ;; FIXME: "AssertionError: False is not true"
587 (arguments
588 `(#:tests? #f))
589 (propagated-inputs
590 `(("python-markdown" ,python-markdown)))
591 (home-page "https://github.com/facelessuser/pymdown-extensions")
592 (synopsis "Extension pack for Python Markdown")
593 (description "PyMdown Extensions is a collection of extensions for Python
594 Markdown. All extensions are found under the module namespace of pymdownx.")
595 (license license:expat)))
596
597 (define-public python-mkdocs-material
598 (package
599 (name "python-mkdocs-material")
600 (version "7.1.3")
601 (source
602 (origin
603 (method url-fetch)
604 (uri
605 (pypi-uri "mkdocs-material" version))
606 (sha256
607 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
608 (build-system python-build-system)
609 (arguments
610 `(#:phases
611 (modify-phases %standard-phases
612 ;; Requirement mkdocs-material-extensions
613 ;; in-turn requires mkdocs-material. This causes
614 ;; circular dependency, so we remove this requirement.
615 (add-after 'unpack 'patch-requirements
616 (lambda _
617 (substitute* "requirements.txt"
618 (("mkdocs-material-extensions.*$") "")))))))
619 (propagated-inputs
620 `(("python-markdown" ,python-markdown)
621 ("python-mkdocs" ,python-mkdocs)
622 ("python-pygments" ,python-pygments)
623 ("python-pymdown-extensions"
624 ,python-pymdown-extensions)))
625 (home-page "https://squidfunk.github.io/mkdocs-material/")
626 (synopsis "Material Design theme for MkDocs")
627 (description "This package provides a theme plugin for the static site
628 generator MkDocs.")
629 (license license:expat)))
630
631 (define-public python-slixmpp
632 (package
633 (name "python-slixmpp")
634 (version "1.5.2")
635 (source
636 (origin
637 (method git-fetch)
638 (uri
639 (git-reference
640 (url "https://lab.louiz.org/poezio/slixmpp.git")
641 (commit
642 (string-append "slix-" version))))
643 (file-name
644 (git-file-name name version))
645 (sha256
646 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
647 (build-system python-build-system)
648 (arguments
649 `(#:phases
650 (modify-phases %standard-phases
651 (add-after 'unpack 'patch
652 (lambda _
653 (substitute* "setup.py"
654 (("'CC', 'cc'")
655 "'CC', 'gcc'"))
656 #t)))))
657 (native-inputs
658 `(("cython" ,python-cython)
659 ("gnupg" ,gnupg)
660 ("pkg-config" ,pkg-config)))
661 (propagated-inputs
662 `(("python-aiodns" ,python-aiodns)
663 ("python-aiohttp" ,python-aiohttp)
664 ("python-pyasn1" ,python-pyasn1)
665 ("python-pyasn1-modules" ,python-pyasn1-modules)))
666 (inputs
667 `(("libidn" ,libidn)
668 ("python" ,python))) ; We are building a Python extension.
669 (synopsis "XMPP library without threads")
670 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
671 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
672 socket handling, the timers, the events dispatching) in order to remove all
673 threads.")
674 (home-page "https://lab.louiz.org/poezio/slixmpp")
675 (license license:expat)))
676
677 (define-public python-tenacity
678 (package
679 (name "python-tenacity")
680 (version "6.1.0")
681 (source (origin
682 (method url-fetch)
683 (uri (pypi-uri "tenacity" version))
684 (sha256
685 (base32
686 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
687 (build-system python-build-system)
688 (native-inputs
689 `(("python-setuptools-scm" ,python-setuptools-scm)
690 ("python-sphinx" ,python-sphinx)
691 ("python-tornado" ,python-tornado)
692 ("python-pytest" ,python-pytest)))
693 (propagated-inputs
694 `(("python-six" ,python-six)))
695 (arguments
696 `(#:phases (modify-phases %standard-phases
697 (replace 'check
698 (lambda _
699 (invoke "pytest")
700 #t)))))
701 (home-page "https://github.com/jd/tenacity")
702 (synopsis "Retrying library for python")
703 (description "Tenacity is a general-purpose python library to simplify the
704 task of adding retry behavior to just about anything.")
705 (license license:asl2.0)))
706
707 (define-public python-pytelegrambotapi
708 (package
709 (name "python-pytelegrambotapi")
710 (version "3.7.4")
711 (source
712 (origin
713 (method git-fetch)
714 (uri (git-reference
715 (url "https://github.com/eternnoir/pyTelegramBotAPI")
716 (commit version)))
717 (file-name (git-file-name name version))
718 (sha256
719 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
720 (build-system python-build-system)
721 (arguments
722 `(#:phases
723 (modify-phases %standard-phases
724 (replace 'check
725 (lambda* (#:key tests? #:allow-other-keys)
726 (when tests?
727 (with-directory-excursion "tests"
728 (invoke "py.test")))
729 #t)))))
730 (propagated-inputs
731 `(("python-requests" ,python-requests)))
732 (native-inputs
733 `(("python-pytest" ,python-pytest)))
734 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
735 (synopsis "Python Telegram bot api")
736 (description "This package provides a simple, but extensible Python
737 implementation for the Telegram Bot API.")
738 (license license:gpl2)))
739
740 (define-public python-colorlog
741 (package
742 (name "python-colorlog")
743 (version "4.1.0")
744 (source (origin
745 (method url-fetch)
746 (uri (pypi-uri "colorlog" version))
747 (sha256
748 (base32
749 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
750 (build-system python-build-system)
751 (native-inputs
752 `(("python-pytest" ,python-pytest)))
753 (arguments
754 `(#:phases (modify-phases %standard-phases
755 (replace 'check
756 (lambda _
757 (invoke "pytest" "-p" "no:logging"))))))
758 (home-page "https://github.com/borntyping/python-colorlog")
759 (synopsis "Log formatting with colors for python")
760 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
761 with Python's logging module that outputs records using terminal colors.")
762 (license license:expat)))
763
764 (define-public python-pyprind
765 (package
766 (name "python-pyprind")
767 (version "2.11.3")
768 (source (origin
769 (method url-fetch)
770 (uri (pypi-uri "PyPrind" version))
771 (sha256
772 (base32
773 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
774 (build-system python-build-system)
775 (propagated-inputs
776 `(("python-psutil" ,python-psutil)))
777 (home-page "https://github.com/rasbt/pyprind")
778 (synopsis "Python Progress Bar and Percent Indicator Utility")
779 (description "The PyPrind (Python Progress Indicator) module provides a
780 progress bar and a percentage indicator object that let you track the progress
781 of a loop structure or other iterative computation.")
782 (license license:bsd-3)))
783
784 (define-public python-gphoto2
785 (package
786 (name "python-gphoto2")
787 (version "2.2.1")
788 (source (origin
789 (method url-fetch)
790 (uri (pypi-uri "gphoto2" version))
791 (sha256
792 (base32
793 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
794 (build-system python-build-system)
795 (native-inputs
796 `(("pkg-config" ,pkg-config)))
797 (inputs
798 `(("libgphoto2" ,libgphoto2)))
799 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
800 (synopsis "Python interface to libgphoto2")
801 (description "@code{python-gphoto2} is a comprehensive Python interface
802 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
803 automatically generate the interface code.")
804 (license license:gpl3+)))
805
806 (define-public python-colour
807 (package
808 (name "python-colour")
809 (version "0.1.5")
810 (source (origin
811 (method url-fetch)
812 (uri (pypi-uri "colour" version))
813 (sha256
814 (base32
815 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
816 (build-system python-build-system)
817 (native-inputs
818 `(("python-d2to1" ,python-d2to1)))
819 (home-page "https://github.com/vaab/colour")
820 (synopsis "Convert and manipulate various color representations")
821 (description "Pythonic way to manipulate color representations (HSL, RVB,
822 web, X11, ...).")
823 (license license:expat)))
824
825 (define-public python-d2to1
826 (package
827 (name "python-d2to1")
828 (version "0.2.12.post1")
829 (source (origin
830 (method url-fetch)
831 (uri (pypi-uri "d2to1" version))
832 (sha256
833 (base32
834 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
835 (build-system python-build-system)
836 (native-inputs
837 `(("python-nose" ,python-nose)))
838 (home-page "https://github.com/embray/d2to1")
839 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
840 in python")
841 (description "The python package d2to1 (the d is for distutils) allows
842 using distutils2-like setup.cfg files for a package's metadata with a
843 distribute/setuptools setup.py script.")
844 (license license:bsd-2)))
845
846 (define-public python-rawkit
847 (package
848 (name "python-rawkit")
849 (version "0.6.0")
850 (source (origin
851 (method url-fetch)
852 (uri (pypi-uri "rawkit" version))
853 (sha256
854 (base32
855 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
856 (build-system python-build-system)
857 (native-inputs
858 `(("python-pytest" ,python-pytest)
859 ("python-mock" ,python-mock)))
860 (inputs
861 `(("libraw" ,libraw)))
862 (home-page "https://rawkit.readthedocs.io")
863 (synopsis "Ctypes-based LibRaw binding for Python")
864 (description "The rawkit package provides two modules: rawkit and libraw.
865 The rawkit module provides a high-level Pythonic interface for developing raw
866 photos, while the libraw module provides a CTypes based interface for
867 interacting with the low-level LibRaw C APIs.")
868 (license license:expat)))
869
870 (define-public python-easygui
871 (package
872 (name "python-easygui")
873 (version "0.98.1")
874 (source (origin
875 (method url-fetch)
876 (uri (pypi-uri "easygui" version))
877 (sha256
878 (base32
879 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
880 (build-system python-build-system)
881 (propagated-inputs
882 `(("python-tkinter" ,python "tk")))
883 (home-page "https://github.com/robertlugg/easygui")
884 (synopsis "GUI programming module for Python")
885 (description "EasyGUI is a module for very simple, very easy GUI
886 programming in Python. EasyGUI is different from other GUI generators in that
887 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
888 simple function calls.")
889 (license license:bsd-3)))
890
891 (define-public python-pymd4c
892 (package
893 (name "python-pymd4c")
894 (version "0.4.6.0b1")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (pypi-uri "pymd4c" version))
899 (sha256
900 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
901 (build-system python-build-system)
902 (inputs
903 `(("md4c" ,md4c)))
904 (native-inputs
905 `(("python-flake8" ,python-flake8)
906 ("python-pkgconfig" ,python-pkgconfig)
907 ("pkg-config" ,pkg-config)))
908 (home-page "https://github.com/dominickpastore/pymd4c")
909 (synopsis "Python bindings for MD4C")
910 (description
911 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
912 to CommonMark.")
913 (license license:expat)))
914
915 (define-public python-pymediainfo
916 (package
917 (name "python-pymediainfo")
918 (version "4.1")
919 (source
920 (origin
921 (method url-fetch)
922 (uri (pypi-uri "pymediainfo" version))
923 (sha256
924 (base32
925 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
926 (build-system python-build-system)
927 (native-inputs
928 `(("python-setuptools-scm" ,python-setuptools-scm)
929 ("python-pytest" ,python-pytest)))
930 (inputs
931 `(("libmediainfo" ,libmediainfo)))
932 (arguments
933 `(#:phases
934 (modify-phases %standard-phases
935 (add-after 'unpack 'patch-libmediainfo
936 (lambda _
937 (substitute* "pymediainfo/__init__.py"
938 (("libmediainfo.so.0")
939 (string-append (assoc-ref %build-inputs "libmediainfo")
940 "/lib/libmediainfo.so.0")))
941 #t))
942 (replace 'check
943 (lambda* (#:key tests? #:allow-other-keys)
944 (when tests?
945 ;; Extend PYTHONPATH so the built package will be found.
946 (setenv "PYTHONPATH"
947 (string-append (getcwd) "/build/lib:"
948 (getenv "PYTHONPATH")))
949 ;; Skip the only failing test "test_parse_url"
950 (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
951 (home-page
952 "https://github.com/sbraz/pymediainfo")
953 (synopsis
954 "Python wrapper for the mediainfo library")
955 (description
956 "Python wrapper for the mediainfo library to access the technical and tag
957 data for video and audio files.")
958 (license license:expat)))
959
960 (define-public python-psutil
961 (package
962 (name "python-psutil")
963 (version "5.8.0")
964 (source
965 (origin
966 (method url-fetch)
967 (uri (pypi-uri "psutil" version))
968 (sha256
969 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
970 (build-system python-build-system)
971 (arguments
972 ;; FIXME: some tests do not return and time out. Some tests fail because
973 ;; some processes survive kill().
974 '(#:tests? #f))
975 (home-page "https://github.com/giampaolo/psutil")
976 (synopsis "Library for retrieving information on running processes")
977 (description
978 "@code{psutil} (Python system and process utilities) is a library for
979 retrieving information on running processes and system utilization (CPU,
980 memory, disks, network) in Python. It is useful mainly for system monitoring,
981 profiling and limiting process resources and management of running processes.
982 It implements many functionalities offered by command line tools such as: ps,
983 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
984 iotop, uptime, pidof, tty, taskset, pmap.")
985 (properties `((python2-variant . ,(delay python2-psutil))))
986 (license license:bsd-3)))
987
988 (define-public python2-psutil
989 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
990 (package/inherit base
991 (propagated-inputs
992 `(("python2-enum34" ,python2-enum34) ;optional
993 ,@(package-propagated-inputs base))))))
994
995 (define-public python-shapely
996 (package
997 (name "python-shapely")
998 (version "1.7.1")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "Shapely" version))
1003 (sha256
1004 (base32
1005 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
1006 (modules '((guix build utils)))
1007 (snippet
1008 '(begin
1009 (delete-file "shapely/speedups/_speedups.c")
1010 (delete-file "shapely/vectorized/_vectorized.c")
1011 #t))))
1012 (build-system python-build-system)
1013 (native-inputs
1014 `(("python-cython" ,python-cython)
1015 ("python-matplotlib" ,python-matplotlib)
1016 ("python-pytest" ,python-pytest)
1017 ("python-pytest-cov" ,python-pytest-cov)))
1018 (inputs
1019 `(("geos" ,geos)))
1020 (propagated-inputs
1021 `(("python-numpy" ,python-numpy)))
1022 (arguments
1023 `(#:phases
1024 (modify-phases %standard-phases
1025 (add-after 'unpack 'patch-geos-path
1026 (lambda* (#:key inputs #:allow-other-keys)
1027 (let ((geos (assoc-ref inputs "geos"))
1028 (glibc (assoc-ref inputs ,(if (%current-target-system)
1029 "cross-libc" "libc"))))
1030 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
1031 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
1032 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
1033 geos "/lib/libgeos_c.so'])"))
1034 (("free = load_dll\\('c'\\)\\.free")
1035 (string-append "free = load_dll('c', fallbacks=['"
1036 glibc "/lib/libc.so.6']).free"))
1037 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
1038 (string-append "free = load_dll('c', fallbacks=['"
1039 glibc "/lib/libc.so.6']).free"))))
1040 #t)))))
1041 (home-page "https://github.com/Toblerity/Shapely")
1042 (synopsis "Library for the manipulation and analysis of geometric objects")
1043 (description "Shapely is a Python package for manipulation and analysis of
1044 planar geometric objects. It is based on the @code{GEOS} library.")
1045 (license license:bsd-3)))
1046
1047 (define-public python-shortuuid
1048 (package
1049 (name "python-shortuuid")
1050 (version "0.5.0")
1051 (source
1052 (origin
1053 (method url-fetch)
1054 (uri (pypi-uri "shortuuid" version))
1055 (sha256
1056 (base32
1057 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
1058 (build-system python-build-system)
1059 (native-inputs
1060 `(("python-pep8" ,python-pep8)))
1061 (home-page "https://github.com/skorokithakis/shortuuid")
1062 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
1063 (description
1064 "@code{shortuuid} is a Python library for generating concise, unambiguous
1065 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
1066 module and then similar looking characters are removed.")
1067 (license license:bsd-3)))
1068
1069 (define-public python-logwrap
1070 (package
1071 (name "python-logwrap")
1072 (version "8.2.0.post0")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (pypi-uri "logwrap" version))
1077 (sha256
1078 (base32
1079 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
1080 (build-system python-build-system)
1081 (arguments
1082 `(#:tests? #f ; Tests not included in pypi release.
1083 #:phases
1084 (modify-phases %standard-phases
1085 (replace 'check
1086 (lambda* (#:key tests? #:allow-other-keys)
1087 (when tests?
1088 (invoke "pytest"))
1089 #t)))))
1090 (native-inputs
1091 `(("python-cython" ,python-cython)
1092 ("python-pytest" ,python-pytest)
1093 ("python-setuptools-scm" ,python-setuptools-scm)
1094 ("python-toml" ,python-toml)
1095 ("python-wheel" ,python-wheel)))
1096 (home-page "https://github.com/python-useful-helpers/logwrap")
1097 (synopsis "Decorator for logging function arguments")
1098 (description "This package provides a decorator to log function arguments
1099 and function call return values in a human-readable way.")
1100 (license license:asl2.0)))
1101
1102 (define-public python-clyent
1103 (package
1104 (name "python-clyent")
1105 (version "1.2.1")
1106 (source
1107 (origin
1108 (method url-fetch)
1109 (uri (pypi-uri "clyent" version))
1110 (sha256
1111 (base32
1112 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1113 (build-system python-build-system)
1114 (native-inputs
1115 `(("python-mock" ,python-mock)))
1116 (home-page "https://github.com/Anaconda-Platform/clyent")
1117 (synopsis "Command line client library")
1118 (description "Clyent is a Python command line utility library. It is used
1119 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1120 (license license:bsd-3)))
1121
1122 (define-public python2-clyent
1123 (package-with-python2 python-clyent))
1124
1125 (define-public python-babel
1126 (package
1127 (name "python-babel")
1128 (version "2.9.0")
1129 (source
1130 (origin
1131 (method url-fetch)
1132 (uri (pypi-uri "Babel" version))
1133 (sha256
1134 (base32
1135 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1136 (build-system python-build-system)
1137 (native-inputs
1138 `(("python-freezegun" ,python-freezegun)
1139 ("python-pytest" ,python-pytest)
1140 ("tzdata" ,tzdata-for-tests)))
1141 (propagated-inputs
1142 `(("python-pytz" ,python-pytz)))
1143 (arguments
1144 `(#:phases (modify-phases %standard-phases
1145 (replace 'check
1146 (lambda _
1147 (invoke "pytest" "-vv"))))))
1148 (home-page "https://babel.pocoo.org/")
1149 (synopsis
1150 "Tools for internationalizing Python applications")
1151 (description
1152 "Babel is composed of two major parts:
1153 - tools to build and work with gettext message catalogs
1154 - a Python interface to the CLDR (Common Locale Data Repository), providing
1155 access to various locale display names, localized number and date formatting,
1156 etc. ")
1157 (license license:bsd-3)))
1158
1159 (define-public python2-babel
1160 (package-with-python2 python-babel))
1161
1162 (define-public python2-backport-ssl-match-hostname
1163 (package
1164 (name "python2-backport-ssl-match-hostname")
1165 (version "3.5.0.1")
1166 (source
1167 (origin
1168 (method url-fetch)
1169 (uri (pypi-uri "backports.ssl_match_hostname" version))
1170 (sha256
1171 (base32
1172 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1173 (build-system python-build-system)
1174 (arguments
1175 `(#:python ,python-2
1176 #:tests? #f)) ; no test target
1177 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
1178 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
1179 (description
1180 "This backport brings the ssl.match_hostname() function to users of
1181 earlier versions of Python. The function checks the hostname in the
1182 certificate returned by the server to which a connection has been established,
1183 and verifies that it matches the intended target hostname.")
1184 (license license:psfl)))
1185
1186 (define-public python-bidict
1187 (package
1188 (name "python-bidict")
1189 (version "0.21.2")
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (pypi-uri "bidict" version))
1194 (sha256
1195 (base32
1196 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1197 (build-system python-build-system)
1198 (native-inputs
1199 `(("python-coverage" ,python-coverage)
1200 ("python-hypothesis" ,python-hypothesis)
1201 ("python-pre-commit" ,python-pre-commit)
1202 ("python-py" ,python-py)
1203 ("python-pytest" ,python-pytest)
1204 ("python-pytest-benchmark" ,python-pytest-benchmark)
1205 ("python-pytest-cov" ,python-pytest-cov)
1206 ("python-setuptools-scm" ,python-setuptools-scm)
1207 ("python-sortedcollections" ,python-sortedcollections)
1208 ("python-sortedcontainers" ,python-sortedcontainers)
1209 ("python-sphinx" ,python-sphinx)
1210 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
1211 ("python-tox" ,python-tox)))
1212 (arguments
1213 `(#:phases (modify-phases %standard-phases
1214 (add-after 'unpack 'relax-reqs
1215 (lambda _
1216 (substitute* "setup.py"
1217 (("sortedcollections < 2") "sortedcollections"))
1218 #t))
1219 (replace 'check
1220 (lambda _ (invoke "./run_tests.py"))))))
1221 (home-page "https://bidict.readthedocs.io")
1222 (synopsis "Bidirectional mapping library")
1223 (description "The @code{bidict} library provides several data structures
1224 for working with bidirectional mappings in Python.")
1225 (license license:mpl2.0)))
1226
1227 (define-public python-bitarray
1228 (package
1229 (name "python-bitarray")
1230 (version "1.4.0")
1231 (source (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "bitarray" version))
1234 (sha256
1235 (base32
1236 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1237 (build-system python-build-system)
1238 (home-page "https://github.com/ilanschnell/bitarray")
1239 (synopsis "Efficient arrays of booleans")
1240 (description "This package provides an object type which efficiently
1241 represents an array of booleans. Bitarrays are sequence types and behave very
1242 much like usual lists. Eight bits are represented by one byte in a contiguous
1243 block of memory. The user can select between two representations:
1244 little-endian and big-endian. All of the functionality is implemented in C.
1245 Methods for accessing the machine representation are provided. This can be
1246 useful when bit level access to binary files is required, such as portable
1247 bitmap image files. Also, when dealing with compressed data which uses
1248 variable bit length encoding, you may find this module useful.")
1249 (license license:psfl)))
1250
1251 (define-public python-boolean.py
1252 (package
1253 (name "python-boolean.py")
1254 (version "3.6")
1255 (source
1256 (origin
1257 ;; There's no source tarball on PyPI.
1258 (method git-fetch)
1259 (uri (git-reference
1260 (url "https://github.com/bastikr/boolean.py")
1261 (commit (string-append "v" version))))
1262 (file-name (git-file-name name version))
1263 (sha256
1264 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1265 (build-system python-build-system)
1266 (home-page "https://github.com/bastikr/boolean.py")
1267 (synopsis "Boolean algebra in one Python module")
1268 (description
1269 "This is a small Python library that implements boolean algebra.
1270 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1271 @code{Symbol} class that can take on one of these two values. Calculations
1272 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1273 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1274 Expressions are constructed from parsed strings or directly in Python.")
1275 (license license:bsd-2)))
1276
1277 (define-public python-hdf4
1278 (package
1279 (name "python-hdf4")
1280 (version "0.9")
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (pypi-uri name version))
1285 (sha256
1286 (base32
1287 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1288 (build-system python-build-system)
1289 (native-inputs `(("nose" ,python-nose)))
1290 (propagated-inputs `(("numpy" ,python-numpy)))
1291 (inputs
1292 `(("hdf4" ,hdf4)
1293 ("libjpeg" ,libjpeg-turbo)
1294 ("zlib" ,zlib)))
1295 (arguments
1296 `(#:phases
1297 (modify-phases %standard-phases
1298 (replace 'check
1299 (lambda _
1300 (invoke "./runexamples.sh")
1301 (invoke "nosetests" "-v"))))))
1302 (home-page "https://github.com/fhs/python-hdf4")
1303 (synopsis "Python interface to the NCSA HDF4 library")
1304 (description
1305 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1306 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1307 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1308 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1309 (license license:expat)))
1310
1311 (define-public python-h5py
1312 (package
1313 (name "python-h5py")
1314 (version "2.10.0")
1315 (source
1316 (origin
1317 (method url-fetch)
1318 (uri (pypi-uri "h5py" version))
1319 (sha256
1320 (base32
1321 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1322 (build-system python-build-system)
1323 (arguments
1324 `(#:tests? #f ; no test target
1325 #:phases
1326 (modify-phases %standard-phases
1327 (add-after 'unpack 'fix-hdf5-paths
1328 (lambda* (#:key inputs #:allow-other-keys)
1329 (let ((prefix (assoc-ref inputs "hdf5")))
1330 (substitute* "setup_build.py"
1331 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1332 (string-append "['" prefix "/lib" "']"))
1333 (("'/opt/local/include', '/usr/local/include'")
1334 (string-append "'" prefix "/include" "'")))
1335 (substitute* "setup_configure.py"
1336 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1337 (string-append "['" prefix "/lib" "']")))
1338 #t))))))
1339 (propagated-inputs
1340 `(("python-six" ,python-six)
1341 ("python-numpy" ,python-numpy)))
1342 (inputs
1343 `(("hdf5" ,hdf5-1.10)))
1344 (native-inputs
1345 `(("python-cython" ,python-cython)
1346 ("python-pkgconfig" ,python-pkgconfig)
1347 ("pkg-config" ,pkg-config)))
1348 (home-page "https://www.h5py.org/")
1349 (synopsis "Read and write HDF5 files from Python")
1350 (description
1351 "The h5py package provides both a high- and low-level interface to the
1352 HDF5 library from Python. The low-level interface is intended to be a
1353 complete wrapping of the HDF5 API, while the high-level component supports
1354 access to HDF5 files, datasets and groups using established Python and NumPy
1355 concepts.")
1356 (license license:bsd-3)))
1357
1358 (define-public python2-h5py
1359 (package-with-python2 python-h5py))
1360
1361 (define-public python-pyls-black
1362 (package
1363 (name "python-pyls-black")
1364 (version "0.4.6")
1365 (source
1366 (origin
1367 ;; There are no tests in the PyPI tarball.
1368 (method git-fetch)
1369 (uri (git-reference
1370 (url "https://github.com/rupert/pyls-black/")
1371 (commit (string-append "v" version))))
1372 (file-name (git-file-name name version))
1373 (sha256
1374 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1375 (build-system python-build-system)
1376 (arguments
1377 `(#:test-target "pytest"))
1378 (propagated-inputs
1379 `(("python-black" ,python-black)
1380 ("python-language-server"
1381 ,python-language-server)
1382 ("python-toml" ,python-toml)))
1383 (native-inputs
1384 `(("python-flake8" ,python-flake8)
1385 ("python-isort" ,python-isort)
1386 ("python-mypy" ,python-mypy)
1387 ("python-pytest" ,python-pytest)
1388 ("python-pytest-runner" ,python-pytest-runner)))
1389 (home-page "https://github.com/rupert/pyls-black")
1390 (synopsis "Black plugin for the Python Language Server")
1391 (description "Black plugin for the Python Language Server.")
1392 (license license:expat)))
1393
1394 (define-public python-sh
1395 (package
1396 (name "python-sh")
1397 (version "1.12.14")
1398 (source
1399 (origin
1400 (method url-fetch)
1401 (uri (pypi-uri "sh" version))
1402 (sha256
1403 (base32
1404 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1405 (build-system python-build-system)
1406 (arguments
1407 '(#:phases
1408 (modify-phases %standard-phases
1409 (replace 'check
1410 (lambda _
1411 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1412 (setenv "HOME" "/tmp")
1413 (invoke "python" "sh.py" "test"))))))
1414 (native-inputs
1415 `(("python-coverage" ,python-coverage)))
1416 (home-page "https://github.com/amoffat/sh")
1417 (synopsis "Python subprocess replacement")
1418 (description "This package provides a replacement for Python's
1419 @code{subprocess} feature.")
1420 (license license:expat)))
1421
1422 (define-public python-cftime
1423 (package
1424 (name "python-cftime")
1425 (version "1.0.4.2")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri (pypi-uri "cftime" version))
1430 (sha256
1431 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1432 (build-system python-build-system)
1433 (propagated-inputs
1434 `(("python-numpy" ,python-numpy)))
1435 (native-inputs
1436 `(("python-coveralls" ,python-coveralls)
1437 ("python-cython" ,python-cython)
1438 ("python-pytest-cov" ,python-pytest-cov)))
1439 (home-page "https://github.com/Unidata/cftime")
1440 (synopsis "Library for time handling")
1441 (description
1442 "This package provides time-handling functionality that used to be part
1443 of the netcdf4 package before.")
1444 ;; This package claims to include code under the GPLv3 but is released
1445 ;; under ISC.
1446 (license (list license:isc license:gpl3+))))
1447
1448 (define-public python-netcdf4
1449 (package
1450 (name "python-netcdf4")
1451 (version "1.5.3")
1452 (source
1453 (origin
1454 (method url-fetch)
1455 (uri (pypi-uri "netCDF4" version))
1456 (sha256
1457 (base32
1458 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1459 (build-system python-build-system)
1460 (arguments
1461 '(#:phases
1462 (modify-phases %standard-phases
1463 (add-after 'unpack 'configure-locations
1464 (lambda* (#:key inputs #:allow-other-keys)
1465 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1466 #t)))))
1467 (native-inputs
1468 `(("python-cython" ,python-cython)))
1469 (propagated-inputs
1470 `(("python-numpy" ,python-numpy)
1471 ("python-cftime" ,python-cftime)))
1472 (inputs
1473 `(("netcdf" ,netcdf)
1474 ("hdf4" ,hdf4)
1475 ("hdf5" ,hdf5)))
1476 (home-page "https://github.com/Unidata/netcdf4-python")
1477 (synopsis "Python/numpy interface to the netCDF library")
1478 (description "Netcdf4-python is a Python interface to the netCDF C
1479 library. netCDF version 4 has many features not found in earlier
1480 versions of the library and is implemented on top of HDF5. This module
1481 can read and write files in both the new netCDF 4 and the old netCDF 3
1482 format, and can create files that are readable by HDF5 clients. The
1483 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1484 to users of that module.")
1485 ;; The software is mainly ISC, but includes some files covered
1486 ;; by the Expat license.
1487 (license (list license:isc license:expat))))
1488
1489 (define-public python-ncclient
1490 (package
1491 (name "python-ncclient")
1492 (version "0.6.12")
1493 (source
1494 (origin
1495 (method git-fetch) ;no tests in PyPI release
1496 (uri (git-reference
1497 (url "https://github.com/ncclient/ncclient")
1498 (commit (string-append "v" version))))
1499 (file-name (git-file-name name version))
1500 (sha256
1501 (base32
1502 "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
1503 (build-system python-build-system)
1504 (arguments
1505 `(#:phases (modify-phases %standard-phases
1506 (replace 'check
1507 (lambda* (#:key tests? #:allow-other-keys)
1508 (when tests?
1509 (invoke "pytest")))))))
1510 (native-inputs
1511 `(("python-pytest" ,python-pytest)))
1512 (propagated-inputs
1513 `(("python-lxml" ,python-lxml)
1514 ("python-paramiko" ,python-paramiko)))
1515 (home-page "https://github.com/ncclient/ncclient")
1516 (synopsis "Python library for NETCONF clients")
1517 (description "@code{ncclient} is a Python library that facilitates
1518 client-side scripting and application development around the NETCONF
1519 protocol.")
1520 (license license:asl2.0)))
1521
1522 (define-public python-license-expression
1523 (package
1524 (name "python-license-expression")
1525 (version "1.2")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (pypi-uri "license-expression" version))
1530 (sha256
1531 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1532 (build-system python-build-system)
1533 (propagated-inputs
1534 `(("python-boolean.py" ,python-boolean.py)))
1535 (home-page "https://github.com/nexB/license-expression")
1536 (synopsis "Apply boolean logic to license expressions")
1537 (description
1538 "This Python module defines a tiny language to evaluate and compare
1539 license expressions using boolean logic. Logical combinations of licenses can
1540 be tested for equality, containment, and equivalence. They can be normalised
1541 and simplified. It supports SPDX license expressions as well as other naming
1542 conventions and aliases in the same expression.")
1543 (license license:gpl2+)))
1544
1545 (define-public python-lockfile
1546 (package
1547 (name "python-lockfile")
1548 (version "0.12.2")
1549 (source
1550 (origin
1551 (method url-fetch)
1552 (uri (pypi-uri "lockfile" version))
1553 (sha256
1554 (base32
1555 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1556 (build-system python-build-system)
1557 (arguments '(#:test-target "check"))
1558 (native-inputs
1559 `(("python-pbr" ,python-pbr)))
1560 (home-page "https://launchpad.net/pylockfile")
1561 (synopsis "Platform-independent file locking module")
1562 (description
1563 "The lockfile package exports a LockFile class which provides a simple
1564 API for locking files.")
1565 (license license:expat)))
1566
1567 (define-public python-fb-re2
1568 (package
1569 (name "python-fb-re2")
1570 (version "1.0.7")
1571 (source
1572 (origin
1573 (method git-fetch)
1574 (uri (git-reference
1575 (url "https://github.com/facebook/pyre2")
1576 (commit (string-append "v" version))))
1577 (file-name (git-file-name name version))
1578 (sha256
1579 (base32
1580 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1581 (build-system python-build-system)
1582 (inputs
1583 `(("re2" ,re2)))
1584 (home-page "https://github.com/facebook/pyre2")
1585 (synopsis "Python wrapper for RE2")
1586 (description "This package provides a Python extension that wraps Google's
1587 RE2 regular expression library. It implements many of the features of
1588 Python's built-in @code{re} module with compatible interfaces.")
1589 (license license:bsd-3)))
1590
1591 (define-public python-filelock
1592 (package
1593 (name "python-filelock")
1594 (version "3.0.12")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (pypi-uri "filelock" version))
1599 (sha256
1600 (base32
1601 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1602 (build-system python-build-system)
1603 (home-page
1604 "https://github.com/benediktschmitt/py-filelock")
1605 (synopsis "Platform independent file lock")
1606 (description "@code{filelock} contains a single module implementing
1607 a platform independent file lock in Python, which provides a simple way of
1608 inter-process communication.")
1609 (license license:unlicense)))
1610
1611 (define-public python-semantic-version
1612 (package
1613 (name "python-semantic-version")
1614 (version "2.8.5")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (pypi-uri "semantic_version" version))
1619 (sha256
1620 (base32
1621 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1622 (build-system python-build-system)
1623 (home-page "https://github.com/rbarrois/python-semanticversion")
1624 (synopsis "Semantic versioning module for Python")
1625 (description
1626 "The @code{semantic_version} class is a small library for handling
1627 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1628
1629 It can compare versions, generate a new version that represents a bump in one of
1630 the version levels, and check whether any given string is a proper semantic
1631 version identifier.")
1632 (license license:bsd-3)))
1633
1634 (define-public python2-semantic-version
1635 (package-with-python2 python-semantic-version))
1636
1637 (define-public python-serpent
1638 (package
1639 (name "python-serpent")
1640 (version "1.28")
1641 (source
1642 (origin
1643 (method url-fetch)
1644 (uri (pypi-uri "serpent" version))
1645 (sha256
1646 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1647 (build-system python-build-system)
1648 (native-inputs
1649 `(("python-attrs" ,python-attrs)
1650 ("python-pytz" ,python-pytz)))
1651 (home-page "https://github.com/irmen/Serpent")
1652 (synopsis "Serializer for literal Python expressions")
1653 (description
1654 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1655 serialization. It serializes an object tree into bytes (an utf-8 encoded
1656 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1657 to rebuild the original object tree.
1658
1659 Because only safe literals are encoded, it is safe to send serpent data to
1660 other machines, such as over the network.")
1661 (properties `((python2-variant . ,(delay python2-serpent))))
1662 (license license:expat)))
1663
1664 (define-public python2-serpent
1665 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1666 (package/inherit base
1667 (propagated-inputs
1668 `(("python-enum34" ,python2-enum34)
1669 ,@(package-propagated-inputs base))))))
1670
1671 (define-public python-setuptools
1672 (package
1673 (name "python-setuptools")
1674 (version "52.0.0")
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "setuptools" version))
1679 (sha256
1680 (base32
1681 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1682 (modules '((guix build utils)))
1683 (snippet
1684 '(begin
1685 ;; Remove included binaries which are used to build self-extracting
1686 ;; installers for Windows.
1687 ;; TODO: Find some way to build them ourself so we can include them.
1688 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1689 #t))))
1690 (build-system python-build-system)
1691 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1692 ;; One could bootstrap with an internal untested setuptools.
1693 (arguments
1694 `(#:tests? #f))
1695 (home-page "https://pypi.org/project/setuptools/")
1696 (synopsis
1697 "Library designed to facilitate packaging Python projects")
1698 (description
1699 "Setuptools is a fully-featured, stable library designed to facilitate
1700 packaging Python projects, where packaging includes:
1701 Python package and module definitions,
1702 distribution package metadata,
1703 test hooks,
1704 project installation,
1705 platform-specific details,
1706 Python 3 support.")
1707 ;; TODO: setuptools now bundles the following libraries:
1708 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1709 (license (list license:psfl ; setuptools itself
1710 license:expat ; six, appdirs, pyparsing
1711 license:asl2.0 ; packaging is dual ASL2/BSD-2
1712 license:bsd-2))
1713 (properties `((python2-variant . ,(delay python2-setuptools))))))
1714
1715 ;; Newer versions of setuptools no longer support Python 2.
1716 (define-public python2-setuptools
1717 (package
1718 (name "python2-setuptools")
1719 (version "41.0.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "setuptools" version ".zip"))
1724 (sha256
1725 (base32
1726 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1727 (modules '((guix build utils)))
1728 (snippet
1729 '(begin
1730 ;; Remove included binaries which are used to build self-extracting
1731 ;; installers for Windows.
1732 ;; TODO: Find some way to build them ourself so we can include them.
1733 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1734 #t))))
1735 (build-system python-build-system)
1736 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1737 ;; One could bootstrap with an internal untested setuptools.
1738 (arguments
1739 `(#:tests? #f))
1740 (native-inputs
1741 `(("unzip" ,unzip)))
1742 (home-page "https://pypi.org/project/setuptools/")
1743 (synopsis
1744 "Library designed to facilitate packaging Python projects")
1745 (description
1746 "Setuptools is a fully-featured, stable library designed to facilitate
1747 packaging Python projects, where packaging includes:
1748 Python package and module definitions,
1749 distribution package metadata,
1750 test hooks,
1751 project installation,
1752 platform-specific details,
1753 Python 3 support.")
1754 ;; TODO: setuptools now bundles the following libraries:
1755 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1756 (license (list license:psfl ; setuptools itself
1757 license:expat ; six, appdirs, pyparsing
1758 license:asl2.0 ; packaging is dual ASL2/BSD-2
1759 license:bsd-2))))
1760
1761 (define-public python-setuptools-declarative-requirements
1762 (package
1763 (name "python-setuptools-declarative-requirements")
1764 (version "1.2.0")
1765 (source
1766 (origin
1767 (method url-fetch)
1768 (uri (pypi-uri
1769 "setuptools-declarative-requirements"
1770 version))
1771 (sha256
1772 (base32
1773 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1774 (build-system python-build-system)
1775 (native-inputs
1776 `(("python-pytest" ,python-pytest)
1777 ("python-setuptools-scm" ,python-setuptools-scm)))
1778 (propagated-inputs
1779 `(("python-toml" ,python-toml)
1780 ("python-wheel" ,python-wheel)))
1781 (home-page
1782 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1783 (synopsis "File support for setuptools declarative setup.cfg")
1784 (description
1785 "This package provides file support for setuptools declarative
1786 @code{setup.cfg}.")
1787 (license license:asl2.0)))
1788
1789 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1790 (define-public python-setuptools-for-tensorflow
1791 (hidden-package
1792 (package
1793 (inherit python-setuptools)
1794 (version "39.1.0")
1795 (source (origin
1796 (inherit (package-source python-setuptools))
1797 (uri (pypi-uri "setuptools" version ".zip"))
1798 (sha256
1799 (base32
1800 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1801
1802 (define-public python-uniseg
1803 (package
1804 (name "python-uniseg")
1805 (version "0.7.1")
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "uniseg" version ".zip"))
1810 (sha256
1811 (base32
1812 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1813 (build-system python-build-system)
1814 (arguments
1815 '(#:tests? #f)) ; The test suite requires network access.
1816 (native-inputs
1817 `(("unzip" ,unzip)))
1818 (home-page
1819 "https://bitbucket.org/emptypage/uniseg-python")
1820 (synopsis
1821 "Python library to determine Unicode text segmentations")
1822 (description
1823 "Uniseg is a Python package used to determine Unicode text segmentations.
1824 Supported segmentations include:
1825 @enumerate
1826 @item @dfn{Code point} (any value in the Unicode codespace)
1827 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1828 multiple Unicode code points, e.g. \"G\" + acute-accent)
1829 @item Word break
1830 @item Sentence break
1831 @item Line break
1832 @end enumerate")
1833 (license license:expat)))
1834
1835 (define-public python2-uniseg
1836 (package-with-python2 python-uniseg))
1837
1838 (define-public python-humanfriendly
1839 (package
1840 (name "python-humanfriendly")
1841 (version "8.2")
1842 (source
1843 (origin
1844 (method url-fetch)
1845 (uri (pypi-uri "humanfriendly" version))
1846 (sha256
1847 (base32
1848 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1849 (build-system python-build-system)
1850 (arguments
1851 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1852 #:tests? #f))
1853 (home-page "https://humanfriendly.readthedocs.io")
1854 (synopsis "Human-friendly input and output in Python")
1855 (description
1856 "The functions and classes in @code{humanfriendly} can be used to make
1857 text interfaces more user-friendly. It includes tools to parse and format
1858 numbers, file sizes, and timespans, timers for long-running operations, menus
1859 to allow the user to choose from a list of options, and terminal interaction
1860 helpers.")
1861 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1862 (license license:expat)))
1863
1864 (define-public python2-humanfriendly
1865 (let ((base (package-with-python2
1866 (strip-python2-variant python-humanfriendly))))
1867 (package/inherit base
1868 (propagated-inputs
1869 `(("python2-monotonic" ,python2-monotonic)
1870 ,@(package-propagated-inputs base))))))
1871
1872 (define-public python-textparser
1873 (package
1874 (name "python-textparser")
1875 (version "0.23.0")
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "textparser" version))
1880 (sha256
1881 (base32
1882 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1883 (build-system python-build-system)
1884 (home-page "https://github.com/eerimoq/textparser")
1885 (synopsis "Fast text parser for Python")
1886 (description "This library provides a text parser written in the Python
1887 language. It aims to be fast.")
1888 (license license:expat)))
1889
1890 (define-public python-aenum
1891 (package
1892 (name "python-aenum")
1893 (version "2.2.4")
1894 (source
1895 (origin
1896 (method url-fetch)
1897 (uri (pypi-uri "aenum" version))
1898 (sha256
1899 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1900 (build-system python-build-system)
1901 (arguments
1902 `(#:phases (modify-phases %standard-phases
1903 (replace 'check
1904 (lambda _
1905 ;; We must run the test suite module directly, as it
1906 ;; fails to define the 'tempdir' variable in scope for
1907 ;; the tests otherwise
1908 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1909 ;; issues/32/running-tests-with-python-setuppy-test).
1910 (invoke "python3" "aenum/test.py")
1911 ;; This one fails with "NameError: name
1912 ;; 'test_pickle_dump_load' is not defined" (see:
1913 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1914 ;; /error-running-the-test_v3py-test-suite).
1915 ;; (invoke "python3" "aenum/test_v3.py")
1916 #t)))))
1917 (home-page "https://bitbucket.org/stoneleaf/aenum")
1918 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1919 (description "The aenum library includes an @code{Enum} base class, a
1920 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1921 class.")
1922 (license license:bsd-3)))
1923
1924 (define-public python-can
1925 (package
1926 (name "python-can")
1927 (version "3.3.3")
1928 (source
1929 (origin
1930 (method url-fetch)
1931 (uri (pypi-uri "python-can" version))
1932 (sha256
1933 (base32
1934 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1935 (build-system python-build-system)
1936 (arguments
1937 `(#:phases (modify-phases %standard-phases
1938 (add-after 'unpack 'relax-version-requirements
1939 (lambda _
1940 (substitute* "setup.py"
1941 (("mock~=2\\.0") "mock")
1942 (("coverage<5") "coverage")
1943 (("pytest~=4\\.3") "pytest")
1944 (("hypothesis~=4\\.56") "hypothesis"))
1945 #t))
1946 (add-after 'unpack 'fix-broken-tests
1947 ;; The tests try to run two scripts it expects should be
1948 ;; in PATH, but they aren't at this time (see:
1949 ;; https://github.com/hardbyte/python-can/issues/805).
1950 (lambda _
1951 (substitute* "test/test_scripts.py"
1952 (("\"can_logger\\.py --help\"") "")
1953 (("\"can_player\\.py --help\"") ""))
1954 #t)))))
1955 (propagated-inputs
1956 `(("python-aenum" ,python-aenum)
1957 ("python-wrapt" ,python-wrapt)))
1958 (native-inputs
1959 `(("python-codecov" ,python-codecov)
1960 ("python-coverage" ,python-coverage)
1961 ("python-future" ,python-future)
1962 ("python-hypothesis" ,python-hypothesis)
1963 ("python-mock" ,python-mock)
1964 ("python-pyserial" ,python-pyserial)
1965 ("python-pytest" ,python-pytest)
1966 ("python-pytest-cov" ,python-pytest-cov)
1967 ("python-pytest-runner" ,python-pytest-runner)
1968 ("python-pytest-timeout" ,python-pytest-timeout)))
1969 (home-page "https://github.com/hardbyte/python-can")
1970 (synopsis "Controller Area Network (CAN) interface module for Python")
1971 (description "This package defines the @code{can} module, which provides
1972 controller area network (CAN) support for Python developers; providing common
1973 abstractions to different hardware devices, and a suite of utilities for
1974 sending and receiving messages on a CAN bus.")
1975 (license license:lgpl3+)))
1976
1977 (define-public python-caniusepython3
1978 (package
1979 (name "python-caniusepython3")
1980 (version "7.2.0")
1981 (source
1982 (origin
1983 (method url-fetch)
1984 (uri (pypi-uri "caniusepython3" version))
1985 (sha256
1986 (base32
1987 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1988 (build-system python-build-system)
1989 (arguments
1990 `(#:phases (modify-phases %standard-phases
1991 (add-after 'unpack 'relax-requirements
1992 (lambda _
1993 (substitute* "setup.py"
1994 ;; These are for compatibility with Python 2.
1995 ((".*'argparse', 'backports.functools_lru_cache',.*")
1996 ""))
1997 (substitute* "dev_requirements.txt"
1998 ((".*pylint.*") "")) ;not actually required
1999 #t))
2000 (replace 'check
2001 (lambda _
2002 (invoke "py.test" "-k" "not NetworkTests"))))))
2003 (propagated-inputs
2004 `(("python-distlib" ,python-distlib)
2005 ("python-packaging" ,python-packaging)
2006 ("python-requests" ,python-requests)))
2007 (native-inputs
2008 `(("python-mock" ,python-mock)
2009 ("python-pytest" ,python-pytest)))
2010 (home-page "https://github.com/brettcannon/caniusepython3")
2011 (synopsis "Check for Python 3-incompatible Python libraries")
2012 (description "The @command{caniusepython3} command scans your project and
2013 reports the Python 3-incompatible libraries it found. It can also be used as
2014 a library.")
2015 (license license:asl2.0)))
2016
2017 (define-public python-diskcache
2018 (package
2019 (name "python-diskcache")
2020 (version "4.1.0")
2021 (source
2022 (origin
2023 (method url-fetch)
2024 (uri (pypi-uri "diskcache" version))
2025 (sha256
2026 (base32
2027 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
2028 (build-system python-build-system)
2029 (arguments
2030 `(#:tests? #f)) ;test suite not included in the release
2031 (home-page "http://www.grantjenks.com/docs/diskcache/")
2032 (synopsis "Disk and file backed cache library")
2033 (description "DiskCache is a disk and file backed persistent cache.")
2034 (license license:asl2.0)))
2035
2036 (define-public python-bitstruct
2037 (package
2038 (name "python-bitstruct")
2039 (version "8.9.0")
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "bitstruct" version))
2044 (sha256
2045 (base32
2046 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
2047 (build-system python-build-system)
2048 (home-page "https://github.com/eerimoq/bitstruct")
2049 (synopsis "Python values to and C bit field structs converter")
2050 (description "This module performs conversions between Python values and C
2051 bit field structs represented as Python byte strings. It is intended to have
2052 a similar interface as the @code{struct} module from Python, but working on
2053 bits instead of primitive data types like @code{char}, @code{int}, etc.")
2054 (license license:expat)))
2055
2056 (define-public python-cantools
2057 (package
2058 (name "python-cantools")
2059 (version "33.1.1")
2060 (source
2061 (origin
2062 ;; We take the sources from the Git repository as the documentation is
2063 ;; not included with the PyPI archive.
2064 (method git-fetch)
2065 (uri (git-reference
2066 (url "https://github.com/eerimoq/cantools")
2067 (commit version)))
2068 (file-name (git-file-name name version))
2069 (sha256
2070 (base32
2071 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
2072 (build-system python-build-system)
2073 (arguments
2074 `(#:phases
2075 (modify-phases %standard-phases
2076 (add-after 'build 'build-doc
2077 (lambda _
2078 ;; See: https://github.com/eerimoq/cantools/issues/190.
2079 (substitute* "README.rst"
2080 (("https://github.com/eerimoq/cantools/raw/master\
2081 /docs/monitor.png")
2082 "monitor.png"))
2083 (with-directory-excursion "docs"
2084 (invoke "make" "man" "info"))))
2085 (add-after 'install 'install-doc
2086 (lambda* (#:key outputs #:allow-other-keys)
2087 (let* ((out (assoc-ref outputs "out"))
2088 (info (string-append out "/share/info"))
2089 (man1 (string-append out "/share/man/man1")))
2090 (format #t "CWD: ~s~%" (getcwd))
2091 (install-file "docs/_build/texinfo/cantools.info" info)
2092 (install-file "docs/_build/man/cantools.1" man1)
2093 #t))))))
2094 (native-inputs
2095 `(("sphinx" ,python-sphinx)
2096 ("texinfo" ,texinfo)))
2097 (propagated-inputs
2098 `(("python-bitstruct" ,python-bitstruct)
2099 ("python-can" ,python-can)
2100 ("python-diskcache" ,python-diskcache)
2101 ("python-textparser" ,python-textparser)))
2102 (home-page "https://github.com/eerimoq/cantools")
2103 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
2104 (description "This package includes Controller Area Network (CAN) related
2105 tools that can be used to:
2106 @itemize
2107 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
2108 @item encode and decode CAN messages
2109 @item multiplex simple and extended signals
2110 @item diagnose DID encoding and decoding
2111 @item dump the CAN decoder output
2112 @item test CAN nodes
2113 @item generate C source code
2114 @item monitor the CAN bus
2115 @end itemize")
2116 (license license:expat)))
2117
2118 (define-public python-capturer
2119 (package
2120 (name "python-capturer")
2121 (version "2.4")
2122 (source
2123 (origin
2124 (method url-fetch)
2125 (uri (pypi-uri "capturer" version))
2126 (sha256
2127 (base32
2128 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2129 (build-system python-build-system)
2130 (arguments
2131 `(#:tests? #f))
2132 (propagated-inputs
2133 `(("python-humanfriendly" ,python-humanfriendly)))
2134 (home-page "https://capturer.readthedocs.io")
2135 (synopsis "Capture stdout and stderr streams of the current process")
2136 (description
2137 "The capturer package makes it easy to capture the stdout and stderr
2138 streams of the current process and subprocesses. Output can be relayed
2139 to the terminal in real time but is also available to the Python program
2140 for additional processing.")
2141 (license license:expat)))
2142
2143 (define-public python2-capturer
2144 (package-with-python2 python-capturer))
2145
2146 (define-public python-case
2147 (package
2148 (name "python-case")
2149 (version "1.5.3")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (pypi-uri "case" version))
2154 (sha256
2155 (base32
2156 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2157 (build-system python-build-system)
2158 (propagated-inputs
2159 `(("python-mock" ,python-mock)
2160 ("python-nose" ,python-nose)
2161 ("python-six" ,python-six)
2162 ("python-unittest2" ,python-unittest2)))
2163 (native-inputs
2164 `(("python-coverage" ,python-coverage)))
2165 (home-page "https://github.com/celery/case")
2166 (synopsis "Unittest utilities and convenience methods")
2167 (description
2168 "The @code{case} package provides utilities on top of unittest, including
2169 some helpful Python 2 compatibility convenience methods.")
2170 (license license:bsd-3)))
2171
2172 (define-public python-verboselogs
2173 (package
2174 (name "python-verboselogs")
2175 (version "1.7")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (pypi-uri "verboselogs" version))
2180 (sha256
2181 (base32
2182 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2183 (build-system python-build-system)
2184 (arguments
2185 `(#:phases
2186 (modify-phases %standard-phases
2187 (replace 'check
2188 (lambda _
2189 ;; Do not run pylint plugin test, as astroid is an old
2190 ;; unsupported version.
2191 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2192 "verboselogs/tests.py"))))))
2193 (native-inputs
2194 `(("python-mock" ,python-mock)
2195 ("python-pytest" ,python-pytest)))
2196 (home-page "https://verboselogs.readthedocs.io")
2197 (synopsis "Verbose logging level for Python's logging module")
2198 (description
2199 "The @code{verboselogs} package extends Python's @code{logging} module to
2200 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2201 (license license:expat)))
2202
2203 (define-public python2-verboselogs
2204 (package-with-python2 python-verboselogs))
2205
2206 (define-public python-coloredlogs
2207 (package
2208 (name "python-coloredlogs")
2209 (version "10.0")
2210 (source
2211 (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "coloredlogs" version))
2214 (sha256
2215 (base32
2216 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2217 (build-system python-build-system)
2218 (arguments
2219 `(;Tests require some updated modules
2220 #:tests? #f))
2221 (propagated-inputs
2222 `(("python-capturer" ,python-capturer)))
2223 (home-page "https://coloredlogs.readthedocs.io")
2224 (synopsis "Colored stream handler for Python's logging module")
2225 (description
2226 "The @code{coloredlogs} package enables colored terminal output for
2227 Python's logging module. The @code{ColoredFormatter} class inherits from
2228 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2229 messages in color.")
2230 (license license:expat)))
2231
2232 (define-public python2-coloredlogs
2233 (package-with-python2 python-coloredlogs))
2234
2235 (define-public python-editorconfig
2236 (package
2237 (name "python-editorconfig")
2238 (version "0.12.2")
2239 (source
2240 (origin
2241 (method url-fetch)
2242 (uri (pypi-uri "EditorConfig" version))
2243 (sha256
2244 (base32
2245 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2246 (build-system python-build-system)
2247 (home-page "https://editorconfig.org/")
2248 (synopsis "EditorConfig bindings for python")
2249 (description "The EditorConfig project consists of a file format for
2250 defining coding styles and a collection of text editor plugins that enable
2251 editors to read the file format and adhere to defined styles. EditorConfig
2252 files are easily readable and they work nicely with version control systems.")
2253 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2254 (license (list license:bsd-2 license:psfl))))
2255
2256 (define-public dosage
2257 (package
2258 (name "dosage")
2259 (version "2.17")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (pypi-uri "dosage" version))
2264 (sha256
2265 (base32
2266 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2267 (build-system python-build-system)
2268 (propagated-inputs
2269 `(("python2-backports-functools-lru-cache"
2270 ,python2-backports-functools-lru-cache)
2271 ("python2-backports-shutil-get-terminal-size"
2272 ,python2-backports-shutil-get-terminal-size)
2273 ("python-cached-property" ,python-cached-property)
2274 ("python-colorama" ,python-colorama)
2275 ("python-imagesize" ,python-imagesize)
2276 ("python-importlib-metadata" ,python-importlib-metadata)
2277 ("python-lxml" ,python-lxml)
2278 ("python-requests" ,python-requests)
2279 ("python-six" ,python-six)))
2280 (native-inputs
2281 `(("python-pytest-cov" ,python-pytest-cov)
2282 ("python-pytest-xdist" ,python-pytest-xdist)
2283 ("python-responses" ,python-responses)
2284 ("python-setuptools-scm" ,python-setuptools-scm)))
2285 (home-page "https://github.com/webcomics/dosage")
2286 (synopsis "Comic strip downloader and archiver")
2287 (description "Dosage is designed to keep a local copy of specific webcomics and other
2288 picture-based content such as Picture of the Day sites. With the @command{dosage}
2289 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2290 downloaded, or download a strip for a particular date or index, if possible.")
2291 (license license:expat)))
2292
2293 (define-public python-et-xmlfile
2294 (package
2295 (name "python-et-xmlfile")
2296 (version "1.0.1")
2297 (source
2298 (origin
2299 (method url-fetch)
2300 (uri (pypi-uri "et_xmlfile" version))
2301 (sha256
2302 (base32
2303 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2304 (build-system python-build-system)
2305 (arguments
2306 `(#:phases (modify-phases %standard-phases
2307 (replace 'check
2308 (lambda _
2309 (invoke "pytest"))))))
2310 (native-inputs
2311 `(("python-pytest" ,python-pytest)
2312 ("python-lxml" ,python-lxml))) ;used for the tests
2313 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2314 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2315 (description "This Python library is based upon the @code{xmlfile} module
2316 from @code{lxml}. It aims to provide a low memory, compatible implementation
2317 of @code{xmlfile}.")
2318 (license license:expat)))
2319
2320 (define-public python2-et-xmlfile
2321 (package-with-python2 python-et-xmlfile))
2322
2323 (define-public python-openpyxl
2324 (package
2325 (name "python-openpyxl")
2326 (version "3.0.5")
2327 (source
2328 (origin
2329 ;; We use the upstream repository, as the tests are not included in the
2330 ;; PyPI releases.
2331 (method hg-fetch)
2332 (uri (hg-reference
2333 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2334 (changeset version)))
2335 (file-name (string-append name "-" version "-checkout"))
2336 (sha256
2337 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2338 (build-system python-build-system)
2339 (arguments
2340 `(#:phases (modify-phases %standard-phases
2341 (replace 'check
2342 (lambda _
2343 (invoke "pytest"))))))
2344 (native-inputs
2345 ;; For the test suite.
2346 `(("python-lxml" ,python-lxml)
2347 ("python-pillow" ,python-pillow)
2348 ("python-pytest" ,python-pytest)))
2349 (propagated-inputs
2350 `(("python-et-xmlfile" ,python-et-xmlfile)
2351 ("python-jdcal" ,python-jdcal)))
2352 (home-page "https://openpyxl.readthedocs.io")
2353 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2354 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2355 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2356 standard.")
2357 (properties `((python2-variant . ,(delay python2-openpyxl))))
2358 (license license:expat)))
2359
2360 (define-public python2-openpyxl
2361 (let ((base (package-with-python2
2362 (strip-python2-variant python-openpyxl))))
2363 (package
2364 (inherit base)
2365 ;; This is the latest version that has python2 support
2366 (version "2.6.4")
2367 (source
2368 (origin
2369 (method url-fetch)
2370 (uri (pypi-uri "openpyxl" version))
2371 (sha256
2372 (base32
2373 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2374 (arguments '(#:tests? #f))))) ; No test suite.
2375
2376 (define-public python-eventlet
2377 (package
2378 (name "python-eventlet")
2379 (version "0.25.1")
2380 (source
2381 (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "eventlet" version))
2384 (sha256
2385 (base32
2386 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2387 (build-system python-build-system)
2388 (propagated-inputs
2389 `(("python-dnspython" ,python-dnspython)
2390 ("python-greenlet" ,python-greenlet)
2391 ("python-monotonic" ,python-monotonic)))
2392 (arguments
2393 ;; TODO: Requires unpackaged 'enum-compat'.
2394 '(#:tests? #f))
2395 (home-page "https://eventlet.net")
2396 (synopsis "Concurrent networking library for Python")
2397 (description
2398 "Eventlet is a concurrent networking library for Python that
2399 allows you to change how you run your code, not how you write it.
2400 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2401 Coroutines ensure that the developer uses a blocking style of programming
2402 that is similar to threading, but provide the benefits of non-blocking I/O.
2403 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2404 from the Python interpreter, or as a small part of a larger application.")
2405 (license license:expat)))
2406
2407 (define-public python-sinfo
2408 (package
2409 (name "python-sinfo")
2410 (version "0.3.4")
2411 (source (origin
2412 (method url-fetch)
2413 (uri (pypi-uri "sinfo" version))
2414 (sha256
2415 (base32
2416 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2417 (build-system python-build-system)
2418 (propagated-inputs
2419 `(("python-stdlib-list" ,python-stdlib-list)))
2420 (home-page "https://gitlab.com/joelostblom/session_info")
2421 (synopsis "Output module version information loaded in a Python session")
2422 (description "This package outputs version information for modules loaded
2423 in the current session, Python, and the OS.")
2424 (license license:bsd-3)))
2425
2426 (define-public python-six
2427 (package
2428 (name "python-six")
2429 (version "1.15.0")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "six" version))
2434 (sha256
2435 (base32
2436 "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh"))))
2437 (build-system python-build-system)
2438 (arguments
2439 `(#:phases
2440 (modify-phases %standard-phases
2441 (replace 'check
2442 (lambda _
2443 (invoke "py.test" "-v"))))))
2444 (native-inputs
2445 `(("python-pytest" ,python-pytest-bootstrap)))
2446 (home-page "https://pypi.org/project/six/")
2447 (synopsis "Python 2 and 3 compatibility utilities")
2448 (description
2449 "Six is a Python 2 and 3 compatibility library. It provides utility
2450 functions for smoothing over the differences between the Python versions with
2451 the goal of writing Python code that is compatible on both Python versions.
2452 Six supports every Python version since 2.5. It is contained in only one
2453 Python file, so it can be easily copied into your project.")
2454 (license license:x11)))
2455
2456 (define-public python2-six
2457 (package-with-python2 python-six))
2458
2459 (define-public python-six-bootstrap
2460 (package
2461 (inherit python-six)
2462 (name "python-six-bootstrap")
2463 (native-inputs `())
2464 (arguments `(#:tests? #f))))
2465
2466 (define-public python2-six-bootstrap
2467 (package-with-python2 python-six-bootstrap))
2468
2469 (define-public python-schedule
2470 (package
2471 (name "python-schedule")
2472 (version "0.4.3")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "schedule" version))
2477 (sha256
2478 (base32
2479 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2480 (build-system python-build-system)
2481 (native-inputs
2482 `(("python-pytest" ,python-pytest)
2483 ("python-mock" ,python-mock)))
2484 (home-page "https://github.com/dbader/schedule")
2485 (synopsis "Schedule periodic function calls in Python")
2486 (description
2487 "Schedule is an in-process scheduler for periodic jobs that uses the
2488 builder pattern for configuration. Schedule lets you run Python functions (or
2489 any other callable) periodically at pre-determined intervals using a simple,
2490 human-friendly syntax.")
2491 (license license:expat)))
2492
2493 (define-public python2-schedule
2494 (package-with-python2 python-schedule))
2495
2496 (define-public python-scour
2497 (package
2498 (name "python-scour")
2499 (version "0.38.2")
2500 (source
2501 (origin
2502 (method git-fetch)
2503 (uri
2504 (git-reference
2505 (url "https://github.com/scour-project/scour")
2506 (commit
2507 (string-append "v" version))))
2508 (file-name (git-file-name name version))
2509 (sha256
2510 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2511 (propagated-inputs
2512 `(("python-six" ,python-six)))
2513 (build-system python-build-system)
2514 (home-page "https://github.com/scour-project/scour")
2515 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2516 (description "The goal of Scour is to output a file that renders
2517 identically at a fraction of the size by removing a lot of redundant
2518 information created by most SVG editors. Optimization options are typically
2519 lossless but can be tweaked for more aggressive cleaning.")
2520 (license license:asl2.0)))
2521
2522 (define-public python-mechanize
2523 (package
2524 (name "python-mechanize")
2525 (version "0.4.5")
2526 (source
2527 (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "mechanize" version))
2530 (sha256
2531 (base32
2532 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2533 (build-system python-build-system)
2534 (propagated-inputs
2535 `(("python-html5lib" ,python-html5lib)))
2536 (home-page "https://github.com/python-mechanize/mechanize")
2537 (synopsis
2538 "Stateful programmatic web browsing in Python")
2539 (description
2540 "Mechanize implements stateful programmatic web browsing in Python,
2541 after Andy Lester’s Perl module WWW::Mechanize.")
2542 (license license:bsd-3)))
2543
2544 (define-public python2-mechanize
2545 (package-with-python2 python-mechanize))
2546
2547 (define-public python-simpleaudio
2548 (package
2549 (name "python-simpleaudio")
2550 (version "1.0.4")
2551 (source
2552 (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "simpleaudio" version))
2555 (sha256
2556 (base32
2557 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2558 (build-system python-build-system)
2559 (arguments
2560 `(#:tests? #f))
2561 (inputs
2562 `(("alsa-lib" ,alsa-lib)))
2563 (home-page
2564 "https://github.com/hamiltron/py-simple-audio")
2565 (synopsis "Simple, asynchronous audio playback for Python 3")
2566 (description
2567 "The @code{simplaudio} package provides cross-platform, dependency-free
2568 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2569 (license license:expat))) ; MIT license
2570
2571 (define-public python-simplejson
2572 (package
2573 (name "python-simplejson")
2574 (version "3.17.2")
2575 (source
2576 (origin
2577 (method url-fetch)
2578 (uri (pypi-uri "simplejson" version))
2579 (sha256
2580 (base32
2581 "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
2582 (build-system python-build-system)
2583 (native-inputs
2584 `(("python-toml" ,python-toml)))
2585 (home-page "https://simplejson.readthedocs.io/en/latest")
2586 (synopsis
2587 "Json library for Python")
2588 (description
2589 "JSON (JavaScript Object Notation) is a subset of JavaScript
2590 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2591 format.
2592
2593 Simplejson exposes an API familiar to users of the standard library marshal
2594 and pickle modules. It is the externally maintained version of the json
2595 library contained in Python 2.6, but maintains compatibility with Python 2.5
2596 and (currently) has significant performance advantages, even without using
2597 the optional C extension for speedups. Simplejson is also supported on
2598 Python 3.3+.")
2599 (license license:x11)))
2600
2601 (define-public python2-simplejson
2602 (package-with-python2 python-simplejson))
2603
2604
2605 (define-public python-pyicu
2606 (package
2607 (name "python-pyicu")
2608 (version "2.7.4")
2609 (source
2610 (origin
2611 (method url-fetch)
2612 (uri (pypi-uri "PyICU" version))
2613 (sha256
2614 (base32
2615 "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
2616 (build-system python-build-system)
2617 (inputs
2618 `(("icu4c" ,icu4c)))
2619 (native-inputs
2620 `(("python-pytest" ,python-pytest)
2621 ("python-six" ,python-six)))
2622 (home-page "https://github.com/ovalhub/pyicu")
2623 (synopsis "Python extension wrapping the ICU C++ API")
2624 (description
2625 "PyICU is a python extension wrapping the ICU C++ API.")
2626 (license license:x11)))
2627
2628 (define-public python2-pyicu
2629 (package-with-python2 python-pyicu))
2630
2631 (define-public python-dogtail
2632 (package
2633 (name "python-dogtail")
2634 (version "0.9.11")
2635 (source (origin
2636 (method url-fetch)
2637 (uri
2638 (string-append
2639 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2640 "dogtail-" version ".tar.gz"))
2641 (sha256
2642 (base32
2643 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2644 (build-system python-build-system)
2645 (arguments
2646 `(#:tests? #f ; TODO Launching dbus for the tests
2647 ; fails
2648 #:phases
2649 (modify-phases %standard-phases
2650 (replace 'check
2651 (lambda* (#:key tests? #:allow-other-keys)
2652 (when tests?
2653 (system "Xvfb :1 &")
2654 (setenv "DISPLAY" ":1")
2655 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2656 #t)))))
2657 (propagated-inputs
2658 `(("python-pygobject" ,python-pygobject)
2659 ("python-pycairo" ,python-pycairo)
2660 ("python-pyatspi" ,python-pyatspi)))
2661 (native-inputs
2662 `(("python-nose" ,python-nose)
2663 ("gtk+" ,gtk+)
2664 ("xvfb" ,xorg-server)
2665 ("dbus" ,dbus)
2666 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2667 ("gobject-introspection" ,gobject-introspection)))
2668 (home-page "https://gitlab.com/dogtail/dogtail/")
2669 (synopsis "GUI test tool and automation framework written in Python")
2670 (description
2671 "Dogtail is a GUI test tool and automation framework written in Python.
2672 It uses Accessibility (a11y) technologies to communicate with desktop
2673 applications. dogtail scripts are written in Python and executed like any
2674 other Python program.")
2675 (license license:gpl2+)))
2676
2677 (define-public python2-dogtail
2678 (package-with-python2 python-dogtail))
2679
2680 (define-public python-empy
2681 (package
2682 (name "python-empy")
2683 (version "3.3.3")
2684 (source (origin
2685 (method url-fetch)
2686 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2687 version ".tar.gz"))
2688 (sha256
2689 (base32
2690 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2691 (build-system python-build-system)
2692 (arguments
2693 `(#:tests? #f)) ; python2 only
2694 (home-page "http://www.alcyone.com/software/empy/")
2695 (synopsis "Templating system for Python")
2696 (description
2697 "EmPy is a system for embedding Python expressions and statements in
2698 template text; it takes an EmPy source file, processes it, and produces
2699 output. This is accomplished via expansions, which are special signals to the
2700 EmPy system and are set off by a special prefix (by default the at sign, @@).
2701 EmPy can expand arbitrary Python expressions and statements in this way, as
2702 well as a variety of special forms. Textual data not explicitly delimited in
2703 this way is sent unaffected to the output, allowing Python to be used in
2704 effect as a markup language. Also supported are callbacks via hooks,
2705 recording and playback via diversions, and dynamic, chainable filters. The
2706 system is highly configurable via command line options and embedded
2707 commands.")
2708 (license license:lgpl2.1+)))
2709
2710 (define-public python2-empy
2711 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2712 (package/inherit base
2713 (arguments `(,@(package-arguments base)
2714 #:tests? #t)))))
2715
2716 (define-public python2-element-tree
2717 (package
2718 (name "python2-element-tree")
2719 (version "1.2.6")
2720 (source (origin
2721 (method url-fetch)
2722 (uri (string-append
2723 "http://effbot.org/media/downloads/elementtree-"
2724 version "-20050316.tar.gz"))
2725 (sha256
2726 (base32
2727 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2728 (build-system python-build-system)
2729 (arguments
2730 `(#:python ,python-2 ; seems to be part of Python 3
2731 #:tests? #f)) ; no 'test' sub-command
2732 (synopsis "Toolkit for XML processing in Python")
2733 (description
2734 "ElementTree is a Python library supporting lightweight XML processing.")
2735 (home-page "https://effbot.org/zone/element-index.htm")
2736 (license (license:x11-style
2737 "http://docs.python.org/2/license.html"
2738 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2739
2740 (define-public python2-pybugz
2741 (package
2742 (name "python2-pybugz")
2743 (version "0.6.11")
2744 (source (origin
2745 (method url-fetch)
2746 (uri (string-append
2747 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2748 version ".tar.gz"))
2749 (sha256
2750 (base32
2751 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2752 (patches (search-patches "pybugz-stty.patch"
2753 "pybugz-encode-error.patch"))))
2754 (build-system python-build-system)
2755 (arguments
2756 `(#:python ,python-2 ; SyntaxError with Python 3
2757 #:tests? #f)) ; no 'test' sub-command
2758 (propagated-inputs
2759 `(("element-tree" ,python2-element-tree)))
2760 (synopsis "Python and command-line interface to Bugzilla")
2761 (description
2762 "PyBugz is a Python library and command-line tool to query the Bugzilla
2763 bug tracking system. It is meant as an aid to speed up interaction with the
2764 bug tracker.")
2765 (home-page "http://www.liquidx.net/pybugz/")
2766 (license license:gpl2)))
2767
2768 (define-public python2-enum
2769 (package
2770 (name "python2-enum")
2771 (version "0.4.6")
2772 (source (origin
2773 (method url-fetch)
2774 (uri (pypi-uri "enum" version))
2775 (sha256
2776 (base32
2777 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2778 (build-system python-build-system)
2779 (arguments
2780 `(#:python ,python-2))
2781 (home-page "https://pypi.org/project/enum/")
2782 (synopsis "Robust enumerated type support in Python")
2783 (description
2784 "This provides a module for robust enumerations in Python. It has
2785 been superseded by the Python standard library and is provided only for
2786 compatibility.")
2787 ;; Choice of either license.
2788 (license (list license:gpl3+ license:psfl))))
2789
2790 (define-public python-enum34
2791 (package
2792 (name "python-enum34")
2793 (version "1.1.6")
2794 (source
2795 (origin
2796 (method url-fetch)
2797 (uri (pypi-uri "enum34" version))
2798 (sha256
2799 (base32
2800 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2801 (build-system python-build-system)
2802 (home-page "https://pypi.org/project/enum34/")
2803 (synopsis "Backported Python 3.4 Enum")
2804 (description
2805 "Enum34 is the new Python stdlib enum module available in Python 3.4
2806 backported for previous versions of Python from 2.4 to 3.3.")
2807 (license license:bsd-3)))
2808
2809 (define-public python2-enum34
2810 (package-with-python2 python-enum34))
2811
2812 (define-public python-parse-type
2813 (package
2814 (name "python-parse-type")
2815 (version "0.4.2")
2816 (source
2817 (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "parse_type" version))
2820 (sha256
2821 (base32
2822 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2823 (build-system python-build-system)
2824 (propagated-inputs
2825 `(("python-six" ,python-six)
2826 ("python-parse" ,python-parse)))
2827 (native-inputs
2828 `(("python-pytest" ,python-pytest)
2829 ("python-pytest-runner" ,python-pytest-runner)))
2830 (home-page "https://github.com/jenisys/parse_type")
2831 (synopsis "Extended parse module")
2832 (description
2833 "Parse_type extends the python parse module.")
2834 (properties
2835 `((python2-variant . ,(delay python2-parse-type))))
2836 (license license:bsd-3)))
2837
2838 (define-public python2-parse-type
2839 (let ((base (package-with-python2
2840 (strip-python2-variant python-parse-type))))
2841 (package/inherit base
2842 (propagated-inputs
2843 `(("python2-enum34" ,python2-enum34)
2844 ,@(package-propagated-inputs base))))))
2845
2846 (define-public python-parse
2847 (package
2848 (name "python-parse")
2849 (version "1.18.0")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (pypi-uri "parse" version))
2854 (sha256
2855 (base32
2856 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2857 (build-system python-build-system)
2858 (arguments
2859 `(#:phases
2860 (modify-phases %standard-phases
2861 (replace 'check
2862 (lambda _ (invoke "python" "test_parse.py"))))))
2863 (home-page "https://github.com/r1chardj0n3s/parse")
2864 (synopsis "Parse strings")
2865 (description
2866 "Parse strings using a specification based on the Python @code{format()}
2867 syntax.")
2868 (license license:x11)))
2869
2870 (define-public python-polib
2871 (package
2872 (name "python-polib")
2873 (version "1.1.0")
2874 (source (origin
2875 (method url-fetch)
2876 (uri (pypi-uri "polib" version))
2877 (sha256
2878 (base32
2879 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2880 (build-system python-build-system)
2881 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2882 (synopsis "Manipulate, create and modify gettext files")
2883 (description "Polib can manipulate any gettext format (po, pot and mo)
2884 files. It can be used to create po files from scratch or to modify
2885 existing ones.")
2886 (license license:expat)))
2887
2888 (define-public python2-polib
2889 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2890 (package/inherit base
2891 (arguments `(,@(package-arguments base)
2892 ;; Tests don't work with python2.
2893 #:tests? #f)))))
2894
2895 (define-public python-poyo
2896 (package
2897 (name "python-poyo")
2898 (version "0.5.0")
2899 (source
2900 (origin
2901 (method url-fetch)
2902 (uri (pypi-uri "poyo" version))
2903 (sha256
2904 (base32
2905 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2906 (build-system python-build-system)
2907 (home-page "https://github.com/hackebrot/poyo")
2908 (synopsis "Lightweight YAML Parser for Python")
2909 (description
2910 "This package provides a lightweight YAML Parser for Python. It supports
2911 only a chosen subset of the YAML format that is required to parse cookiecutter
2912 user configuration files. It does not have support for serializing into YAML
2913 and is not compatible with JSON.")
2914 (license license:expat)))
2915
2916 (define-public scons
2917 (package
2918 (name "scons")
2919 (version "3.0.4")
2920 (source (origin
2921 (method git-fetch)
2922 (uri (git-reference
2923 (url "https://github.com/SCons/scons")
2924 (commit version)))
2925 (file-name (git-file-name name version))
2926 (sha256
2927 (base32
2928 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2929 (build-system python-build-system)
2930 (arguments
2931 `(#:use-setuptools? #f ; still relies on distutils
2932 #:tests? #f ; no 'python setup.py test' command
2933 #:phases
2934 (modify-phases %standard-phases
2935 (add-before 'build 'bootstrap
2936 (lambda _
2937 (substitute* "src/engine/SCons/compat/__init__.py"
2938 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2939 "sys.modules[new] = __import__(old)"))
2940 (substitute* "src/engine/SCons/Platform/__init__.py"
2941 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2942 "mod = __import__(full_name)"))
2943 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2944 (chdir "build/scons")
2945 #t)))))
2946 (home-page "https://scons.org/")
2947 (synopsis "Software construction tool written in Python")
2948 (description
2949 "SCons is a software construction tool. Think of SCons as an improved,
2950 cross-platform substitute for the classic Make utility with integrated
2951 functionality similar to autoconf/automake and compiler caches such as ccache.
2952 In short, SCons is an easier, more reliable and faster way to build
2953 software.")
2954 (license license:x11)))
2955
2956 (define-public scons-python2
2957 (package
2958 (inherit (package-with-python2 scons))
2959 (name "scons-python2")))
2960
2961 (define-public python-extension-helpers
2962 (package
2963 (name "python-extension-helpers")
2964 (version "0.1")
2965 (source
2966 (origin
2967 (method url-fetch)
2968 (uri (pypi-uri "extension-helpers" version))
2969 (sha256
2970 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2971 (build-system python-build-system)
2972 (native-inputs
2973 `(("coverage" ,python-coverage)
2974 ("pytest" ,python-pytest-astropy)
2975 ("pytest-cov" ,python-pytest-cov)
2976 ("setuptools-scm" ,python-setuptools-scm)))
2977 (home-page "https://github.com/astropy/astropy-helpers")
2978 (synopsis
2979 "Utilities for building and installing packages in the Astropy ecosystem")
2980 (description
2981 "The extension-helpers package includes many build, installation, and
2982 documentation-related tools used by the Astropy project.")
2983 (license license:bsd-3)))
2984
2985 (define-public python-extras
2986 (package
2987 (name "python-extras")
2988 (version "1.0.0")
2989 (source
2990 (origin
2991 (method url-fetch)
2992 (uri (pypi-uri "extras" version))
2993 (sha256
2994 (base32
2995 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2996 (build-system python-build-system)
2997 (arguments
2998 ;; FIXME: Circular dependency on testtools.
2999 '(#:tests? #f))
3000 (home-page "https://github.com/testing-cabal/extras")
3001 (synopsis "Useful extensions to the Python standard library")
3002 (description
3003 "Extras is a set of extensions to the Python standard library.")
3004 (license license:expat)))
3005
3006 (define-public python2-extras
3007 (package-with-python2 python-extras))
3008
3009 (define-public python-mimeparse
3010 (package
3011 (name "python-mimeparse")
3012 (version "1.6.0")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (pypi-uri "python-mimeparse" version))
3017 (sha256
3018 (base32
3019 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
3020 (build-system python-build-system)
3021 (arguments
3022 '(#:phases
3023 (modify-phases %standard-phases
3024 (replace 'check
3025 (lambda _
3026 (invoke "./mimeparse_test.py"))))))
3027 (home-page
3028 "https://github.com/dbtsai/python-mimeparse")
3029 (synopsis "Python library for parsing MIME types")
3030 (description
3031 "Mimeparse provides basic functions for parsing MIME type names and
3032 matching them against a list of media-ranges.")
3033 (license license:expat)))
3034
3035 (define-public python2-mimeparse
3036 (package-with-python2 python-mimeparse))
3037
3038 (define-public python-miniboa
3039 (package
3040 (name "python-miniboa")
3041 (version "1.0.8")
3042 (source
3043 (origin
3044 (method url-fetch)
3045 (uri (pypi-uri "miniboa" version))
3046 (sha256
3047 (base32
3048 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
3049 (build-system python-build-system)
3050 (home-page "https://github.com/shmup/miniboa")
3051 (synopsis "Simple, single-threaded Telnet server")
3052 (description
3053 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
3054 server.")
3055 (license license:asl2.0)))
3056
3057 (define-public python2-miniboa
3058 (package-with-python2 python-miniboa))
3059
3060 (define-public python-pafy
3061 (package
3062 (name "python-pafy")
3063 (version "0.5.3.1")
3064 (source
3065 (origin
3066 (method url-fetch)
3067 (uri (pypi-uri "pafy" version))
3068 (sha256
3069 (base32
3070 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
3071 (build-system python-build-system)
3072 (arguments
3073 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
3074 (propagated-inputs
3075 ;; Youtube-dl is a python package which is imported in the file
3076 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
3077 `(("youtube-dl" ,youtube-dl)))
3078 (home-page "https://np1.github.io/pafy/")
3079 (synopsis "Retrieve YouTube content and metadata")
3080 (description
3081 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
3082 (license license:lgpl3+)))
3083
3084 (define-public python2-funcsigs
3085 (package
3086 (name "python2-funcsigs")
3087 (version "1.0.2")
3088 (source (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "funcsigs" version))
3091 (sha256
3092 (base32
3093 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
3094 (build-system python-build-system)
3095 (arguments
3096 `(#:python ,python-2))
3097 (native-inputs
3098 `(("python2-unittest2" ,python2-unittest2)))
3099 (home-page "http://funcsigs.readthedocs.org")
3100 (synopsis "Python function signatures from PEP362")
3101 (description
3102 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
3103 (license license:asl2.0)))
3104
3105 (define-public python2-funcsigs-bootstrap
3106 (package
3107 (inherit python2-funcsigs)
3108 (name "python2-funcsigs-bootstrap")
3109 (native-inputs `())
3110 (arguments
3111 `(#:tests? #f
3112 ,@(package-arguments python2-funcsigs)))))
3113
3114 (define-public python-py
3115 (package
3116 (name "python-py")
3117 (version "1.10.0")
3118 (source
3119 (origin
3120 (method url-fetch)
3121 (uri (pypi-uri "py" version))
3122 (sha256
3123 (base32
3124 "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
3125 (build-system python-build-system)
3126 (arguments
3127 ;; FIXME: "ImportError: 'test' module incorrectly imported from
3128 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
3129 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
3130 ;; Is this module globally installed?"
3131 '(#:tests? #f))
3132 (native-inputs
3133 `(("python-setuptools-scm" ,python-setuptools-scm)))
3134 (home-page "https://github.com/pytest-dev/py")
3135 (synopsis "Python library for parsing, I/O, instrospection, and logging")
3136 (description
3137 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3138 code introspection, and logging.")
3139 (license license:expat)))
3140
3141 (define-public python2-py
3142 (package-with-python2 python-py))
3143
3144 ;; Recent versions of python-fixtures and python-testrepository need
3145 ;; python-pbr for packaging, which itself needs these two packages for
3146 ;; testing.
3147 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3148 ;; same source, just without any test dependencies and with tests disabled.
3149 ;; python-pbr-minmal is then used to package python-fixtures and
3150 ;; python-testrepository.
3151 ;; Strictly speaking we currently could remove the test-requirements from the
3152 ;; normal python-pbr package (and save this package) since test are disabled
3153 ;; there anyway. But this may change in future.
3154 (define-public python-pbr-minimal
3155 (package
3156 (name "python-pbr-minimal")
3157 (version "5.5.1")
3158 (source
3159 (origin
3160 (method url-fetch)
3161 (uri (pypi-uri "pbr" version))
3162 (sha256
3163 (base32
3164 "1j8k5d4rdhy5bw5ai1vkjzln2albah94in3vvyvxa0n42fv81baz"))))
3165 (build-system python-build-system)
3166 (arguments
3167 `(#:tests? #f))
3168 (home-page "https://docs.openstack.org/pbr/latest/")
3169 (synopsis "Minimal build of python-pbr used for bootstrapping")
3170 (description
3171 "Used only for bootstrapping python2-pbr, you should not need this.")
3172 (license license:asl2.0)))
3173
3174 (define-public python-pbr
3175 (package
3176 (inherit python-pbr-minimal)
3177 (name "python-pbr")
3178 (arguments
3179 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3180 (propagated-inputs
3181 `(("git" ,git))) ;; pbr actually uses the "git" binary.
3182 (native-inputs
3183 `(("python-fixtures" ,python-fixtures-bootstrap)
3184 ;; discover, coverage, hacking, subunit
3185 ("python-mock" ,python-mock)
3186 ("python-six" ,python-six)
3187 ("python-sphinx" ,python-sphinx)
3188 ("python-testrepository" ,python-testrepository-bootstrap)
3189 ("python-testresources" ,python-testresources-bootstrap)
3190 ("python-testscenarios" ,python-testscenarios-bootstrap)
3191 ("python-testtools" ,python-testtools-bootstrap)
3192 ("python-virtualenv" ,python-virtualenv)))
3193 (synopsis "Enhance the default behavior of Python’s setuptools")
3194 (description
3195 "Python Build Reasonableness (PBR) is a library that injects some useful
3196 and sensible default behaviors into your setuptools run. It will set
3197 versions, process requirements files and generate AUTHORS and ChangeLog file
3198 from git information.
3199 ")))
3200
3201 (define-public python-pyrsistent
3202 (package
3203 (name "python-pyrsistent")
3204 (version "0.16.0")
3205 (home-page "https://github.com/tobgu/pyrsistent")
3206 (source (origin
3207 (method url-fetch)
3208 (uri (pypi-uri "pyrsistent" version))
3209 (sha256
3210 (base32
3211 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3212 (build-system python-build-system)
3213 (arguments
3214 '(#:phases (modify-phases %standard-phases
3215 ;; The package works fine with newer Pytest and Hypothesis, but
3216 ;; has pinned older versions to stay compatible with Python 2.
3217 (add-before 'check 'loosen-pytest-requirement
3218 (lambda _
3219 (substitute* "setup.py"
3220 (("pytest<5") "pytest")
3221 (("hypothesis<5") "hypothesis"))
3222 #t)))))
3223 (native-inputs
3224 `(("python-hypothesis" ,python-hypothesis)
3225 ("python-pytest" ,python-pytest)
3226 ("python-pytest-runner" ,python-pytest-runner)))
3227 (propagated-inputs
3228 `(("python-six" ,python-six)))
3229 (synopsis "Persistent data structures for Python")
3230 (description
3231 "Pyrsistent is a number of persistent collections (by some referred to as
3232 functional data structures). Persistent in the sense that they are immutable.
3233
3234 All methods on a data structure that would normally mutate it instead return a
3235 new copy of the structure containing the requested updates. The original
3236 structure is left untouched.")
3237 (license license:expat)))
3238
3239 (define-public python2-pyrsistent
3240 (package-with-python2 python-pyrsistent))
3241
3242 (define-public python-exif-read
3243 (package
3244 (name "python-exif-read")
3245 (version "2.1.2")
3246 (source (origin
3247 (method url-fetch)
3248 (uri (pypi-uri "ExifRead" version))
3249 (sha256
3250 (base32
3251 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3252 (build-system python-build-system)
3253 (arguments `(#:tests? #f)) ; no tests
3254 (home-page "https://github.com/ianare/exif-py")
3255 (synopsis "Python library to extract EXIF data from image files")
3256 (description
3257 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3258 files.")
3259 (license license:bsd-3)))
3260
3261 (define-public python2-exif-read
3262 (package-with-python2 python-exif-read))
3263
3264 (define-public python-pyld
3265 (package
3266 (name "python-pyld")
3267 (version "1.0.5")
3268 (source (origin
3269 (method url-fetch)
3270 (uri (pypi-uri "PyLD" version))
3271 (sha256
3272 (base32
3273 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3274 (build-system python-build-system)
3275 (home-page "https://github.com/digitalbazaar/pyld")
3276 (synopsis "Python implementation of the JSON-LD specification")
3277 (description
3278 "PyLD is an implementation of the JSON-LD specification.")
3279 (license license:bsd-3)))
3280
3281 (define-public python2-pyld
3282 (package-with-python2 python-pyld))
3283
3284 (define-public python-cli-helpers
3285 (package
3286 (name "python-cli-helpers")
3287 (version "2.0.1")
3288 (source
3289 (origin
3290 ;; There's no source tarball on PyPI.
3291 (method git-fetch)
3292 (uri (git-reference
3293 (url "https://github.com/dbcli/cli_helpers")
3294 (commit (string-append "v" version))))
3295 (file-name (git-file-name name version))
3296 (sha256
3297 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3298 (build-system python-build-system)
3299 (native-inputs
3300 `(("python-pytest" ,python-pytest)))
3301 (propagated-inputs
3302 `(("python-wcwidth" ,python-wcwidth)
3303 ("python-configobj" ,python-configobj)
3304 ("python-tabulate" ,python-tabulate)
3305 ("python-terminaltables" ,python-terminaltables)))
3306 (home-page "https://github.com/dbcli/cli_helpers")
3307 (synopsis "Helpers for building command-line apps")
3308 (description
3309 "CLI Helpers is a Python package that makes it easy to perform common
3310 tasks when building command-line apps. It's a helper library for command-line
3311 interfaces.")
3312 (license license:bsd-3)))
3313
3314 (define-public python-click
3315 (package
3316 (name "python-click")
3317 (version "7.1.2")
3318 (source
3319 (origin
3320 (method url-fetch)
3321 (uri (pypi-uri "click" version))
3322 (sha256
3323 (base32
3324 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3325 (build-system python-build-system)
3326 (arguments
3327 `(#:phases
3328 (modify-phases %standard-phases
3329 (add-after 'unpack 'fix-paths
3330 (lambda* (#:key inputs #:allow-other-keys)
3331 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3332 "cross-libc" "libc"))))
3333 (substitute* "src/click/_unicodefun.py"
3334 (("'locale'")
3335 (string-append "'" glibc "/bin/locale'"))))))
3336 (replace 'check
3337 (lambda _
3338 (invoke "python" "-m" "pytest"))))))
3339 (native-inputs
3340 `(("python-pytest" ,python-pytest)))
3341 (home-page "https://palletsprojects.com/p/click/")
3342 (synopsis "Command line library for Python")
3343 (description
3344 "Click is a Python package for creating command line interfaces in a
3345 composable way with as little code as necessary. Its name stands for
3346 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3347 with sensible defaults out of the box.")
3348 (license license:bsd-3)))
3349
3350 (define-public python2-click
3351 (package-with-python2 python-click))
3352
3353 (define-public python-click-5
3354 (package (inherit python-click)
3355 (name "python-click")
3356 (version "5.1")
3357 (source
3358 (origin
3359 (method url-fetch)
3360 (uri (pypi-uri "click" version))
3361 (sha256
3362 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3363 (arguments `())))
3364
3365 (define-public python-cligj
3366 (package
3367 (name "python-cligj")
3368 (version "0.7.2")
3369 (source
3370 (origin
3371 (method url-fetch)
3372 (uri (pypi-uri "cligj" version))
3373 (sha256
3374 (base32
3375 "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
3376 (build-system python-build-system)
3377 (propagated-inputs
3378 `(("python-click" ,python-click)))
3379 (native-inputs
3380 `(("python-pytest-cov" ,python-pytest-cov)))
3381 (home-page "https://github.com/mapbox/cligj")
3382 (synopsis "Click params for commmand line interfaces to GeoJSON")
3383 (description
3384 "cligj is for Python developers who create command line interfaces
3385 for geospatial data. cligj allows you to quickly build consistent,
3386 well-tested and interoperable CLIs for handling GeoJSON.")
3387 (license license:bsd-3)))
3388
3389 (define-public python-vcversioner
3390 (package
3391 (name "python-vcversioner")
3392 (version "2.16.0.0")
3393 (source
3394 (origin
3395 (method url-fetch)
3396 (uri (pypi-uri "vcversioner" version))
3397 (sha256
3398 (base32
3399 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3400 (build-system python-build-system)
3401 (synopsis "Python library for version number discovery")
3402 (description "Vcversioner is a Python library that inspects tagging
3403 information in a variety of version control systems in order to discover
3404 version numbers.")
3405 (home-page "https://github.com/habnabit/vcversioner")
3406 (license license:isc)))
3407
3408 (define-public python2-vcversioner
3409 (package-with-python2 python-vcversioner))
3410
3411 (define-public python-jdcal
3412 (package
3413 (name "python-jdcal")
3414 (version "1.4")
3415 (source
3416 (origin
3417 (method url-fetch)
3418 (uri (pypi-uri "jdcal" version))
3419 (sha256
3420 (base32
3421 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3422 (build-system python-build-system)
3423 (arguments
3424 `(#:phases (modify-phases %standard-phases
3425 (replace 'check
3426 (lambda _
3427 (invoke "pytest"))))))
3428 (native-inputs
3429 `(("python-pytest" ,python-pytest)))
3430 (home-page "https://github.com/phn/jdcal")
3431 (synopsis "Functions to convert between Julian dates Gregorian dates")
3432 (description "This Python library provides functions for converting
3433 between Julian dates and Gregorian dates.")
3434 (license license:bsd-2)))
3435
3436 (define-public python2-jdcal
3437 (package-with-python2 python-jdcal))
3438
3439 (define-public python-jsondiff
3440 (package
3441 (name "python-jsondiff")
3442 (version "1.2.0")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "jsondiff" version))
3447 (sha256
3448 (base32
3449 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3450 (build-system python-build-system)
3451 (native-inputs
3452 `(("python-nose" ,python-nose)
3453 ("python-nose-random" ,python-nose-random)))
3454 (home-page
3455 "https://github.com/fzumstein/jsondiff")
3456 (synopsis "Compare JSON and JSON-like structures in Python")
3457 (description "@code{jsondiff} is a Python library which lets you
3458 compare, diff, and patch JSON and JSON-like structures in Python.")
3459 (license license:expat)))
3460
3461 (define-public python-jsonschema
3462 (package
3463 (name "python-jsonschema")
3464 (version "3.2.0")
3465 (source (origin
3466 (method url-fetch)
3467 (uri (pypi-uri "jsonschema" version))
3468 (sha256
3469 (base32
3470 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3471 (build-system python-build-system)
3472 (arguments
3473 '(#:phases
3474 (modify-phases %standard-phases
3475 (replace 'check
3476 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3477 (when tests?
3478 (setenv "JSON_SCHEMA_TEST_SUITE" "json")
3479 (invoke "trial" "jsonschema")))))))
3480 (native-inputs
3481 `(("python-setuptools_scm" ,python-setuptools-scm)
3482 ("python-twisted" ,python-twisted)))
3483 (propagated-inputs
3484 `(("python-attrs" ,python-attrs)
3485 ("python-pyrsistent" ,python-pyrsistent)
3486 ("python-six" ,python-six)))
3487 (home-page "https://github.com/Julian/jsonschema")
3488 (synopsis "Implementation of JSON Schema for Python")
3489 (description
3490 "Jsonschema is an implementation of JSON Schema for Python.")
3491 (license license:expat)))
3492
3493 (define-public python-schema
3494 (package
3495 (name "python-schema")
3496 (version "0.6.6")
3497 (source
3498 (origin
3499 (method url-fetch)
3500 (uri (pypi-uri "schema" version))
3501 (sha256
3502 (base32
3503 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3504 (build-system python-build-system)
3505 (native-inputs
3506 `(("python-pytest" ,python-pytest)))
3507 (home-page "https://github.com/keleshev/schema")
3508 (synopsis "Simple data validation library")
3509 (description
3510 "@code{python-schema} is a library for validating Python data
3511 structures, such as those obtained from config-files, forms, external
3512 services or command-line parsing, converted from JSON/YAML (or
3513 something else) to Python data-types.")
3514 (license license:psfl)))
3515
3516 (define-public python2-schema
3517 (package-with-python2 python-schema))
3518
3519 (define-public python-schema-0.5
3520 (package (inherit python-schema)
3521 (version "0.5.0")
3522 (source
3523 (origin
3524 (method url-fetch)
3525 (uri (pypi-uri "schema" version))
3526 (sha256
3527 (base32
3528 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3529
3530 (define-public python2-schema-0.5
3531 (package-with-python2 python-schema-0.5))
3532
3533 (define-public python-kitchen
3534 (package
3535 (name "python-kitchen")
3536 (version "1.2.5")
3537 (source
3538 (origin
3539 (method url-fetch)
3540 (uri (pypi-uri "kitchen" version))
3541 (sha256
3542 (base32
3543 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3544 (build-system python-build-system)
3545 (propagated-inputs
3546 `(("python-chardet" ,python-chardet)))
3547 (home-page "https://github.com/fedora-infra/kitchen")
3548 (synopsis "Python API for snippets")
3549 (description "@code{kitchen} module provides a python API for all sorts of
3550 little useful snippets of code that everybody ends up writing for their projects
3551 but never seem big enough to build an independent release. Use kitchen and stop
3552 cutting and pasting that code over and over.")
3553 (license (list license:lgpl2.1+
3554 ;; subprocess.py, test_subprocess.py,
3555 ;; kitchen/pycompat25/defaultdict.py:
3556 license:psfl))))
3557
3558 (define-public python2-kitchen
3559 (package-with-python2 python-kitchen))
3560
3561 (define-public python-roman
3562 (package
3563 (name "python-roman")
3564 (version "3.3")
3565 (source
3566 (origin
3567 (method url-fetch)
3568 (uri (pypi-uri "roman" version))
3569 (sha256
3570 (base32
3571 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3572 (build-system python-build-system)
3573 (home-page "https://github.com/zopefoundation/roman")
3574 (synopsis "Integer to Roman numerals converter")
3575 (description
3576 "This package provides a small helper library to convert Arabic Numbers
3577 to Roman Numerals.")
3578 (license license:psfl)))
3579
3580 (define-public python-unidecode
3581 (package
3582 (name "python-unidecode")
3583 (version "1.1.1")
3584 (source (origin
3585 (method url-fetch)
3586 (uri (pypi-uri "Unidecode" version))
3587 (sha256
3588 (base32
3589 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3590 (build-system python-build-system)
3591 (home-page "https://pypi.org/project/Unidecode/")
3592 (synopsis "ASCII transliterations of Unicode text")
3593 (description
3594 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3595 useful when integrating with legacy code that doesn't support Unicode, or for
3596 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3597 machine identifiers from human-readable Unicode strings that should still be
3598 somewhat intelligible.")
3599 (license license:gpl2+)))
3600
3601 (define-public python2-unidecode
3602 (package-with-python2 python-unidecode))
3603
3604 (define-public python-text-unidecode
3605 (package
3606 (name "python-text-unidecode")
3607 (version "1.3")
3608 (source (origin
3609 (method url-fetch)
3610 (uri (pypi-uri "text-unidecode" version))
3611 (sha256
3612 (base32
3613 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3614 (build-system python-build-system)
3615 (arguments
3616 '(#:phases (modify-phases %standard-phases
3617 (replace 'check
3618 (lambda _
3619 (invoke "pytest" "-vv"))))))
3620 (native-inputs
3621 `(("python-pytest" ,python-pytest)))
3622 (home-page "https://github.com/kmike/text-unidecode/")
3623 (synopsis "Decode Unicode data")
3624 (description
3625 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3626 Perl library. It can create ASCII representations of Unicode data. In general
3627 users should prefer the @code{python-unidecode} package which offers better
3628 memory usage and transliteration quality.")
3629 ;; The user can choose either license.
3630 (license (list license:clarified-artistic license:gpl2+))))
3631
3632 (define-public python2-text-unidecode
3633 (package-with-python2 python-text-unidecode))
3634
3635 (define-public python-pyjwt
3636 (package
3637 (name "python-pyjwt")
3638 (version "1.7.1")
3639 (source
3640 (origin
3641 (method url-fetch)
3642 (uri (pypi-uri "PyJWT" version))
3643 (sha256
3644 (base32
3645 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3646 (modules '((guix build utils)))
3647 (snippet
3648 '(begin
3649 (for-each delete-file-recursively
3650 (find-files "." "\\.pyc$"))
3651 #t))))
3652 (build-system python-build-system)
3653 (arguments
3654 '(#:phases (modify-phases %standard-phases
3655 (replace 'check
3656 (lambda _
3657 ;; Mimic upstream commit 3a20892442b34c7 to get
3658 ;; rid of dependency on pytest-runner < 5.0.
3659 ;; Remove substitution for PyJWT > 1.7.1.
3660 (substitute* "setup.py"
3661 ((".*pytest-runner.*")
3662 ""))
3663 (invoke "pytest" "-vv"))))))
3664 (native-inputs
3665 `(("python-pytest" ,python-pytest)
3666 ("python-pytest-cov" ,python-pytest-cov)))
3667 (home-page "https://github.com/progrium/pyjwt")
3668 (synopsis "JSON Web Token implementation in Python")
3669 (description
3670 "PyJWT is a JSON Web Token implementation written in Python.")
3671 (license license:expat)))
3672
3673 (define-public python2-pyjwt
3674 (package-with-python2 python-pyjwt))
3675
3676 (define-public python-pymsgbox
3677 (package
3678 (name "python-pymsgbox")
3679 (version "1.0.6")
3680 (source
3681 (origin
3682 (method git-fetch)
3683 (uri (git-reference
3684 ;; LICENSE.txt is not present on pypi
3685 (url "https://github.com/asweigart/PyMsgBox")
3686 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3687 (file-name (git-file-name name version))
3688 (sha256
3689 (base32
3690 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3691 (arguments
3692 ;; Circular dependency to run tests:
3693 ;; Tests need pyautogui, which depends on pymsgbox.
3694 '(#:tests? #f))
3695 (build-system python-build-system)
3696 (home-page "https://github.com/asweigart/PyMsgBox")
3697 (synopsis "Python module for JavaScript-like message boxes")
3698 (description
3699 "PyMsgBox is a simple, cross-platform, pure Python module for
3700 JavaScript-like message boxes. Types of dialog boxes include:
3701 @enumerate
3702 @item alert
3703 @item confirm
3704 @item prompt
3705 @item password
3706 @end enumerate
3707 ")
3708 (license license:bsd-3)))
3709
3710 (define-public python-pympler
3711 (package
3712 (name "python-pympler")
3713 (home-page "https://pythonhosted.org/Pympler/")
3714 (version "0.9")
3715 (source (origin
3716 (method url-fetch)
3717 (uri (pypi-uri "Pympler" version))
3718 (sha256
3719 (base32
3720 "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
3721 (build-system python-build-system)
3722 (arguments
3723 `(#:phases (modify-phases %standard-phases
3724 (delete 'check)
3725 (add-after 'install 'check
3726 (lambda* (#:key inputs outputs #:allow-other-keys)
3727 (add-installed-pythonpath inputs outputs)
3728 (invoke "python" "setup.py" "test"))))))
3729 (synopsis "Measure, monitor and analyze memory behavior")
3730 (description
3731 "Pympler is a development tool to measure, monitor and analyze
3732 the memory behavior of Python objects in a running Python application.
3733
3734 By pympling a Python application, detailed insight in the size and the
3735 lifetime of Python objects can be obtained. Undesirable or unexpected
3736 runtime behavior like memory bloat and other @samp{pymples} can easily
3737 be identified.
3738
3739 A web profiling frontend exposes process statistics, garbage
3740 visualisation and class tracker statistics.")
3741 (license license:asl2.0)))
3742
3743 (define-public python2-pympler
3744 (package-with-python2 python-pympler))
3745
3746 (define-public python-itsdangerous
3747 (package
3748 (name "python-itsdangerous")
3749 (version "2.0.1")
3750 (source
3751 (origin
3752 (method url-fetch)
3753 (uri (pypi-uri "itsdangerous" version))
3754 (sha256
3755 (base32
3756 "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
3757 (build-system python-build-system)
3758 (home-page "https://palletsprojects.com/p/itsdangerous/")
3759 (synopsis "Python library for passing data to/from untrusted environments")
3760 (description
3761 "Itsdangerous provides various helpers to pass trusted data to untrusted
3762 environments and back.")
3763 (license license:bsd-3)))
3764
3765 (define-public python2-itsdangerous
3766 (package-with-python2 python-itsdangerous))
3767
3768 (define-public python-pyyaml
3769 (package
3770 (name "python-pyyaml")
3771 (version "5.4.1")
3772 (source
3773 (origin
3774 (method url-fetch)
3775 (uri (pypi-uri "PyYAML" version))
3776 (sha256
3777 (base32
3778 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3779 (build-system python-build-system)
3780 (inputs
3781 `(("libyaml" ,libyaml)
3782 ("python-cython" ,python-cython)))
3783 (home-page "https://pyyaml.org")
3784 (synopsis "YAML parser and emitter for Python")
3785 (description
3786 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3787 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3788 API, and sensible error messages. PyYAML supports standard YAML tags and
3789 provides Python-specific tags that represent an arbitrary Python object.")
3790 (license license:expat)))
3791
3792 (define-public python2-pyyaml
3793 (package-with-python2 python-pyyaml))
3794
3795 (define-public python-vine
3796 (package
3797 (name "python-vine")
3798 (version "1.1.4")
3799 (source
3800 (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "vine" version))
3803 (sha256
3804 (base32
3805 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3806 (build-system python-build-system)
3807 (native-inputs
3808 `(("python-pytest" ,python-pytest)
3809 ("python-case" ,python-case)))
3810 (home-page "https://github.com/celery/vine")
3811 (synopsis "Promises for Python")
3812 (description
3813 "@code{vine} provides a special implementation of promises in that it can
3814 be used both for \"promise of a value\" and lazy evaluation. The biggest
3815 upside for this is that everything in a promise can also be a promise,
3816 e.g. filters, callbacks and errbacks can all be promises.")
3817 (license license:bsd-3)))
3818
3819 (define-public python-virtualenv
3820 (package
3821 (name "python-virtualenv")
3822 (version "20.3.1")
3823 (source
3824 (origin
3825 (method url-fetch)
3826 (uri (pypi-uri "virtualenv" version))
3827 (sha256
3828 (base32
3829 "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
3830 (build-system python-build-system)
3831 (native-inputs
3832 `(("python-mock" ,python-mock)
3833 ("python-pytest" ,python-pytest)
3834 ("python-setuptools-scm" ,python-setuptools-scm)))
3835 (propagated-inputs
3836 `(("python-appdirs" ,python-appdirs)
3837 ("python-distlib" ,python-distlib)
3838 ("python-filelock" ,python-filelock)
3839 ("python-six" ,python-six)))
3840 (home-page "https://virtualenv.pypa.io/")
3841 (synopsis "Virtual Python environment builder")
3842 (description
3843 "Virtualenv is a tool to create isolated Python environments.")
3844 (license license:expat)))
3845
3846 (define-public python2-virtualenv
3847 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3848 (package
3849 (inherit base)
3850 (arguments
3851 `(#:python ,python-2
3852 #:phases
3853 (modify-phases %standard-phases
3854 (add-after 'set-paths 'adjust-PYTHONPATH
3855 (lambda* (#:key inputs #:allow-other-keys)
3856 (let* ((python (assoc-ref inputs "python"))
3857 (python-sitedir (string-append python "/lib/python2.7"
3858 "/site-packages")))
3859 ;; XXX: 'python2' always comes first on PYTHONPATH
3860 ;; and shadows the 'setuptools' input. Move python2
3861 ;; last: this should be fixed in python-build-system
3862 ;; in a future rebuild cycle.
3863 (setenv "PYTHONPATH"
3864 (string-append (string-join (delete python-sitedir
3865 (string-split
3866 (getenv "PYTHONPATH")
3867 #\:))
3868 ":")
3869 ":" python-sitedir))
3870 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3871 (getenv "PYTHONPATH"))
3872 #t))))))
3873 (propagated-inputs
3874 `(("python-contextlib2" ,python2-contextlib2)
3875 ,@(package-propagated-inputs base))))))
3876
3877 (define-public python-markupsafe
3878 (package
3879 (name "python-markupsafe")
3880 (version "2.0.1")
3881 (source
3882 (origin
3883 (method url-fetch)
3884 (uri (pypi-uri "MarkupSafe" version))
3885 (sha256
3886 (base32
3887 "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
3888 (build-system python-build-system)
3889 (arguments
3890 `(#:phases (modify-phases %standard-phases
3891 (replace 'check
3892 (lambda* (#:key tests? #:allow-other-keys)
3893 (when tests?
3894 (invoke "pytest" "-vv")))))))
3895 (native-inputs
3896 `(("python-pytest" ,python-pytest)))
3897 (home-page "https://github.com/mitsuhiko/markupsafe")
3898 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3899 (description
3900 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3901 for Python.")
3902 (license license:bsd-3)))
3903
3904 (define-public python2-markupsafe
3905 (package-with-python2 python-markupsafe))
3906
3907 (define-public python-jinja2
3908 (package
3909 (name "python-jinja2")
3910 (version "3.0.1")
3911 (source
3912 (origin
3913 (method url-fetch)
3914 (uri (pypi-uri "Jinja2" version))
3915 (sha256
3916 (base32
3917 "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh"))))
3918 (build-system python-build-system)
3919 (arguments
3920 '(#:phases (modify-phases %standard-phases
3921 (replace 'check
3922 (lambda* (#:key tests? #:allow-other-keys)
3923 (if tests?
3924 (invoke "pytest" "-vv")
3925 (format #t "test suite not run~%")))))))
3926 (native-inputs
3927 `(("python-pytest" ,python-pytest)))
3928 (propagated-inputs
3929 `(("python-markupsafe" ,python-markupsafe)))
3930 (home-page "http://jinja.pocoo.org/")
3931 (synopsis "Python template engine")
3932 (description
3933 "Jinja2 is a small but fast and easy to use stand-alone template engine
3934 written in pure Python.")
3935 (license license:bsd-3)))
3936
3937 (define-public python2-jinja2
3938 (package-with-python2 python-jinja2))
3939
3940 (define-public python-jinja2-time
3941 (package
3942 (name "python-jinja2-time")
3943 (version "0.2.0")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (pypi-uri "jinja2-time" version))
3948 (sha256
3949 (base32
3950 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3951 (build-system python-build-system)
3952 (propagated-inputs
3953 `(("python-arrow" ,python-arrow)
3954 ("python-jinja2" ,python-jinja2)))
3955 (home-page
3956 "https://github.com/hackebrot/jinja2-time")
3957 (synopsis "Jinja2 Extension for Dates and Times")
3958 (description
3959 "This package provides an extension for the template engine Jinja2. It
3960 adds a 'now' tag providing a convenient access to the arrow.now() API from
3961 templates. A format string can be provided to control the output.")
3962 (license license:expat)))
3963
3964 (define-public python-pystache
3965 (package
3966 (name "python-pystache")
3967 (version "0.5.4")
3968 (source (origin
3969 (method url-fetch)
3970 (uri (pypi-uri "pystache" version))
3971 (sha256
3972 (base32
3973 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3974 (build-system python-build-system)
3975 (arguments
3976 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3977 (home-page "http://defunkt.io/pystache/")
3978 (synopsis "Python logic-less template engine")
3979 (description
3980 "Pystache is a Python implementation of the framework agnostic,
3981 logic-free templating system Mustache.")
3982 (license license:expat)
3983 (properties `((python2-variant . ,(delay python2-pystache))))))
3984
3985 (define-public python2-pystache
3986 (let ((base (package-with-python2
3987 (strip-python2-variant python-pystache))))
3988 (package/inherit base
3989 (arguments
3990 `(#:python ,python-2
3991 #:phases
3992 (modify-phases %standard-phases
3993 (replace 'check
3994 (lambda _
3995 (invoke "python" "test_pystache.py")))))))))
3996
3997 (define-public python-joblib
3998 (package
3999 (name "python-joblib")
4000 (version "0.14.1")
4001 (source (origin
4002 (method url-fetch)
4003 (uri (pypi-uri "joblib" version))
4004 (sha256
4005 (base32
4006 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
4007 (build-system python-build-system)
4008 (arguments
4009 `(#:phases
4010 (modify-phases %standard-phases
4011 (replace 'check
4012 (lambda _ (invoke "pytest" "-v" "joblib"))))))
4013 (native-inputs
4014 `(("python-pytest" ,python-pytest)))
4015 (home-page "https://joblib.readthedocs.io/")
4016 (synopsis "Using Python functions as pipeline jobs")
4017 (description
4018 "Joblib is a set of tools to provide lightweight pipelining in Python.
4019 In particular, joblib offers: transparent disk-caching of the output values
4020 and lazy re-evaluation (memoize pattern), easy simple parallel computing
4021 logging and tracing of the execution.")
4022 (license license:bsd-3)))
4023
4024 (define-public python2-joblib
4025 (package-with-python2 python-joblib))
4026
4027 (define-public python-daemon
4028 (package
4029 (name "python-daemon")
4030 (version "2.2.3")
4031 (source
4032 (origin
4033 (method url-fetch)
4034 (uri (pypi-uri "python-daemon" version))
4035 (sha256
4036 (base32
4037 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
4038 (build-system python-build-system)
4039 (arguments
4040 `(#:phases
4041 (modify-phases %standard-phases
4042 (add-before 'check 'disable-tests
4043 (lambda _
4044 ;; FIXME: Determine why test fails
4045 (substitute* "test/test_daemon.py"
4046 (("test_detaches_process_context")
4047 "skip_test_detaches_process_context"))
4048 #t)))))
4049 (propagated-inputs
4050 `(("python-lockfile" ,python-lockfile)))
4051 (native-inputs
4052 `(("python-unittest2" ,python-unittest2)
4053 ("python-testtools" ,python-testtools)
4054 ("python-testscenarios" ,python-testscenarios)
4055 ("python-mock" ,python-mock)
4056 ("python-docutils" ,python-docutils)))
4057 (home-page "https://pagure.io/python-daemon/")
4058 (synopsis "Python library for making a Unix daemon process")
4059 (description "Python-daemon is a library that assists a Python program to
4060 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
4061
4062 This library provides a @code{DaemonContext} class that manages the following
4063 important tasks for becoming a daemon process:
4064 @enumerate
4065 @item Detach the process into its own process group.
4066 @item Set process environment appropriate for running inside a chroot.
4067 @item Renounce suid and sgid privileges.
4068 @item Close all open file descriptors.
4069 @item Change the working directory, uid, gid, and umask.
4070 @item Set appropriate signal handlers.
4071 @item Open new file descriptors for stdin, stdout, and stderr.
4072 @item Manage a specified PID lock file.
4073 @item Register cleanup functions for at-exit processing.
4074 @end enumerate")
4075 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
4076 (license (list license:asl2.0 license:gpl3+))))
4077
4078 (define-public python-anytree
4079 (package
4080 (name "python-anytree")
4081 (version "2.8.0")
4082 (source (origin
4083 (method url-fetch)
4084 (uri (pypi-uri "anytree" version))
4085 (sha256
4086 (base32
4087 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
4088 (build-system python-build-system)
4089 (propagated-inputs
4090 `(("python-six" ,python-six)))
4091 (native-inputs
4092 `(;; For tests.
4093 ("graphviz" ,graphviz) ;for 'dot'
4094 ("python-nose" ,python-nose)))
4095 (home-page "https://github.com/c0fec0de/anytree")
4096 (synopsis "Lightweight tree data library")
4097 (description
4098 "@code{anytree} is a simple, lightweight, and extensible tree data
4099 structure for Python.")
4100 (license license:asl2.0)))
4101
4102 (define-public python-docutils
4103 (package
4104 (name "python-docutils")
4105 (version "0.16")
4106 (source
4107 (origin
4108 (method url-fetch)
4109 (uri (pypi-uri "docutils" version))
4110 (sha256
4111 (base32
4112 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
4113 (build-system python-build-system)
4114 (arguments
4115 '(#:phases (modify-phases %standard-phases
4116 (replace 'check
4117 (lambda* (#:key tests? #:allow-other-keys)
4118 (if tests?
4119 (invoke "python" "test/alltests.py")
4120 (format #t "test suite not run~%"))
4121 #t)))))
4122 (home-page "http://docutils.sourceforge.net/")
4123 (synopsis "Python Documentation Utilities")
4124 (description
4125 "Docutils is a modular system for processing documentation into useful
4126 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
4127 easy to use markup language, for input.
4128
4129 This package provides tools for converting @file{.rst} files to other formats
4130 via commands such as @command{rst2man}, as well as supporting Python code.")
4131 ;; Most of the source code is public domain, but some source files are
4132 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
4133 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
4134
4135 (define-public python2-docutils
4136 (package-with-python2 python-docutils))
4137
4138 ;; awscli refuses to be built with docutils < 0.16.
4139 (define-public python-docutils-0.15
4140 (package
4141 (inherit python-docutils)
4142 (version "0.15")
4143 (source (origin
4144 (method url-fetch)
4145 (uri (pypi-uri "docutils" version))
4146 (sha256
4147 (base32
4148 "0ja8q6mdj6xv62jjw3phv8j5nfqi5x8hnfy4pqfcjcgz4b34k8sl"))))
4149 ;; tests contain Python 2 syntax.
4150 (arguments '(#:tests? #false))))
4151
4152 ;; python2-sphinx fails its test suite with newer versions.
4153 (define-public python2-docutils-0.14
4154 (package
4155 (inherit python2-docutils)
4156 (version "0.14")
4157 (source (origin
4158 (method url-fetch)
4159 (uri (pypi-uri "docutils" version))
4160 (sha256
4161 (base32
4162 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4163
4164 (define-public python-restructuredtext-lint
4165 (package
4166 (name "python-restructuredtext-lint")
4167 (version "1.3.0")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (pypi-uri "restructuredtext-lint" version))
4172 (sha256
4173 (base32
4174 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4175 (build-system python-build-system)
4176 (arguments
4177 `(#:phases
4178 (modify-phases %standard-phases
4179 (delete 'check)
4180 (add-after 'install 'check
4181 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4182 (when tests?
4183 (add-installed-pythonpath inputs outputs)
4184 (invoke "nosetests" "-v"))
4185 #t)))))
4186 (propagated-inputs
4187 `(("python-docutils" ,python-docutils)))
4188 (native-inputs
4189 `(("python-nose" ,python-nose)))
4190 (home-page "https://github.com/twolfson/restructuredtext-lint")
4191 (synopsis "reStructuredText linter")
4192 (description "This package provides a linter for the reStructuredText
4193 format.")
4194 (license license:unlicense)))
4195
4196 (define-public python-doc8
4197 (package
4198 (name "python-doc8")
4199 (version "0.8.0")
4200 (source
4201 (origin
4202 (method url-fetch)
4203 (uri (pypi-uri "doc8" version))
4204 (sha256
4205 (base32
4206 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4207 (build-system python-build-system)
4208 (arguments
4209 `(#:phases
4210 (modify-phases %standard-phases
4211 (delete 'check)
4212 (add-after 'install 'check
4213 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4214 (when tests?
4215 (add-installed-pythonpath inputs outputs)
4216 (invoke "pytest" "-v"))
4217 #t)))))
4218 (propagated-inputs
4219 `(("python-chardet" ,python-chardet)
4220 ("python-docutils" ,python-docutils)
4221 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
4222 ("python-six" ,python-six)
4223 ("python-stevedore" ,python-stevedore)))
4224 (native-inputs
4225 `(("python-testtools" ,python-testtools)
4226 ("python-pytest" ,python-pytest)))
4227 (home-page "https://launchpad.net/doc8")
4228 (synopsis
4229 "Style checker for Sphinx (or other) RST documentation")
4230 (description
4231 "Doc8 is an opinionated style checker for reStructured Text and plain
4232 text styles of documentation.")
4233 (license license:asl2.0)))
4234
4235 (define-public python-pygments
4236 (package
4237 (name "python-pygments")
4238 (version "2.8.1")
4239 (source
4240 (origin
4241 (method url-fetch)
4242 (uri (pypi-uri "Pygments" version))
4243 (sha256
4244 (base32
4245 "153zyxigm879sk2n71lfv03y2pgxb7dl0dlsbwkz9aydxnkf2mi6"))))
4246 (build-system python-build-system)
4247 (arguments
4248 ;; FIXME: Tests require sphinx, which depends on this.
4249 '(#:tests? #f))
4250 (home-page "https://pygments.org/")
4251 (synopsis "Syntax highlighting")
4252 (description
4253 "Pygments is a syntax highlighting package written in Python.")
4254 (license license:bsd-2)
4255 (properties `((python2-variant . ,(delay python2-pygments))))))
4256
4257 ;; Pygments 2.6 and later does not support Python 2.
4258 (define-public python2-pygments
4259 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4260 (package
4261 (inherit base)
4262 (version "2.5.2")
4263 (source (origin
4264 (method url-fetch)
4265 (uri (pypi-uri "Pygments" version))
4266 (sha256
4267 (base32
4268 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4269
4270 (define-public python-pygments-github-lexers
4271 (package
4272 (name "python-pygments-github-lexers")
4273 (version "0.0.5")
4274 (source
4275 (origin
4276 (method url-fetch)
4277 (uri (pypi-uri "pygments-github-lexers" version))
4278 (sha256
4279 (base32
4280 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4281 (build-system python-build-system)
4282 (propagated-inputs
4283 `(("python-pygments" ,python-pygments)))
4284 (home-page "https://github.com/liluo/pygments-github-lexers")
4285 (synopsis "Pygments Github custom lexers")
4286 (description "This package installs Github custom lexers to Pygments.")
4287 (license license:bsd-3)))
4288
4289 (define-public python-bump2version
4290 (package
4291 (name "python-bump2version")
4292 (version "1.0.1")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (pypi-uri "bump2version" version))
4297 (sha256
4298 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4299 (build-system python-build-system)
4300 (arguments
4301 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4302 ;; required: --new-version".
4303 `(#:tests? #false))
4304 (home-page "https://github.com/c4urself/bump2version")
4305 (synopsis "Version-bump your software with a single command!")
4306 (description
4307 "This package provides a small command line tool to simplify releasing
4308 software by updating all version strings in your source code by the correct
4309 increment. It also creates commits and tags.")
4310 (license license:expat)))
4311
4312 (define-public python-bumpversion
4313 (package
4314 (name "python-bumpversion")
4315 (version "0.5.3")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (pypi-uri "bumpversion" version))
4320 (sha256
4321 (base32
4322 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4323 (build-system python-build-system)
4324 (home-page "https://github.com/peritus/bumpversion")
4325 (synopsis "Tool to bump software version")
4326 (description "This tool provides a command-line interface (CLI) to bump a
4327 software version simply.")
4328 (license license:expat)))
4329
4330 (define-public python-deprecated
4331 (package
4332 (name "python-deprecated")
4333 (version "1.2.5")
4334 (source
4335 (origin
4336 (method git-fetch)
4337 (uri (git-reference
4338 (url "https://github.com/tantale/deprecated")
4339 (commit (string-append "v" version))))
4340 (file-name (git-file-name name version))
4341 (sha256
4342 (base32
4343 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4344 (build-system python-build-system)
4345 (arguments
4346 `(#:phases (modify-phases %standard-phases
4347 (replace 'check
4348 (lambda _
4349 (invoke "pytest"))))))
4350 (propagated-inputs
4351 `(("python-wrapt" ,python-wrapt)))
4352 (native-inputs
4353 `(("python-bumpversion" ,python-bumpversion)
4354 ("python-pytest" ,python-pytest)
4355 ("python-pytest-cov" ,python-pytest-cov)
4356 ("python-sphinx" ,python-sphinx)
4357 ("python-tox" ,python-tox)))
4358 (home-page "https://github.com/tantale/deprecated")
4359 (synopsis "Python decorator to deprecate classes, functions or methods")
4360 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4361 to deprecate classes, functions or methods.")
4362 (license license:expat)))
4363
4364 (define-public python-pygithub
4365 (package
4366 (name "python-pygithub")
4367 (version "1.54.1")
4368 (source
4369 ;; We fetch from the Git repo because there are no tests in the PyPI
4370 ;; archive.
4371 (origin
4372 (method git-fetch)
4373 (uri (git-reference
4374 (url "https://github.com/PyGithub/PyGithub")
4375 (commit (string-append "v" version))))
4376 (file-name (git-file-name name version))
4377 (sha256
4378 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4379 (build-system python-build-system)
4380 (arguments
4381 `(#:phases
4382 (modify-phases %standard-phases
4383 (replace 'check
4384 (lambda* (#:key tests? #:allow-other-keys)
4385 (when tests?
4386 (invoke "pytest"))
4387 #t)))))
4388 (propagated-inputs
4389 `(("python-cryptography" ,python-cryptography)
4390 ("python-deprecated" ,python-deprecated)
4391 ("python-pyjwt" ,python-pyjwt)
4392 ("python-requests" ,python-requests)))
4393 (native-inputs
4394 `(("python-httpretty" ,python-httpretty)
4395 ("python-pytest" ,python-pytest)))
4396 (home-page "https://pygithub.readthedocs.io/en/latest/")
4397 (synopsis "Python library for the GitHub API")
4398 (description "This library allows managing GitHub resources such as
4399 repositories, user profiles, and organizations in your Python applications,
4400 using version 3 of the GitHub application programming interface (API).")
4401 (license license:lgpl3+)))
4402
4403 (define-public python-rellu
4404 (package
4405 (name "python-rellu")
4406 (version "0.7")
4407 (source
4408 (origin
4409 (method url-fetch)
4410 (uri (pypi-uri "rellu" version))
4411 (sha256
4412 (base32
4413 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4414 (build-system python-build-system)
4415 (propagated-inputs
4416 `(("python-invoke" ,python-invoke)
4417 ("python-pygithub" ,python-pygithub)))
4418 (home-page "https://github.com/robotframework/rellu")
4419 (synopsis "Utilities to create PyPI releases")
4420 (description "This collection of utilities contains tooling and templates
4421 to assist in creating releases on GitHub and publishing them on PyPI. It is
4422 designed to be used by Robot Framework and tools and libraries in its
4423 ecosystem, but can naturally be used also by other projects.")
4424 (license license:asl2.0)))
4425
4426 (define-public python-robotframework
4427 (package
4428 (name "python-robotframework")
4429 (version "4.1.2")
4430 ;; There are no tests in the PyPI archive.
4431 (source
4432 (origin
4433 (method git-fetch)
4434 (uri (git-reference
4435 (url "https://github.com/robotframework/robotframework")
4436 (commit (string-append "v" version))))
4437 (file-name (git-file-name name version))
4438 (sha256
4439 (base32 "0s6lakbd8h1pa4lfdj18sm13gpywszgpcns4hz026a4kam787kby"))
4440 (patches (search-patches
4441 "python-robotframework-source-date-epoch.patch"))))
4442 (build-system python-build-system)
4443 (arguments
4444 `(#:phases (modify-phases %standard-phases
4445 (add-before 'build 'build-and-install-doc
4446 (lambda* (#:key outputs #:allow-other-keys)
4447 (let* ((doc-output (assoc-ref outputs "doc"))
4448 (doc (string-append doc-output "/share/"
4449 ,name "-" ,version "/")))
4450 (invoke "invoke" "library-docs" "all")
4451 (mkdir-p doc)
4452 (copy-recursively "doc/libraries"
4453 (string-append doc "/libraries")))))
4454 (replace 'check
4455 (lambda* (#:key inputs #:allow-other-keys)
4456 ;; Some tests require timezone data. Otherwise, they
4457 ;; look up /etc/localtime, which doesn't exist, and fail
4458 ;; with:
4459 ;;
4460 ;; OverflowError: mktime argument out of range
4461 (setenv "TZDIR"
4462 (search-input-directory inputs "share/zoneinfo"))
4463 (setenv "TZ" "Europe/Paris")
4464
4465 (invoke "python" "utest/run.py"))))))
4466 (native-inputs
4467 `(("python-docutils" ,python-docutils)
4468 ("python-jsonschema" ,python-jsonschema)
4469 ("python-invoke" ,python-invoke)
4470 ("python-rellu" ,python-rellu)
4471 ("python:tk" ,python "tk") ;used when building the HTML doc
4472 ("tzdata" ,tzdata-for-tests)))
4473 (outputs '("out" "doc"))
4474 (home-page "https://robotframework.org")
4475 (synopsis "Generic automation framework")
4476 (description "Robot Framework is a generic automation framework for
4477 acceptance testing, acceptance test driven development (ATDD), and robotic
4478 process automation (RPA).")
4479 (license license:asl2.0)))
4480
4481 (define-public python-robotframework-lint
4482 ;; There is no properly tagged release; the commit below seems to correspond
4483 ;; to the 0.9 stable release available from PyPI. The tests are not
4484 ;; included in the PyPI archive, so we fetch the sources from the upstream
4485 ;; Git repo.
4486 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4487 (revision "0"))
4488 (package
4489 (name "python-robotframework-lint")
4490 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4491 revision commit))
4492 (source
4493 (origin
4494 (method git-fetch)
4495 (uri (git-reference
4496 (url "https://github.com/boakley/robotframework-lint")
4497 (commit commit)))
4498 (file-name (git-file-name name version))
4499 (sha256
4500 (base32
4501 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4502 (build-system python-build-system)
4503 (arguments
4504 `(#:phases
4505 (modify-phases %standard-phases
4506 (replace 'check
4507 (lambda _
4508 (invoke "python" "-m" "robot" "-A"
4509 "tests/conf/default.args" "tests"))))))
4510 (propagated-inputs
4511 `(("python-robotframework" ,python-robotframework)))
4512 (home-page "https://github.com/boakley/robotframework-lint/")
4513 (synopsis "Static analysis tool (linter) for Robot Framework")
4514 (description "This package provides the @code{rflint} command-line
4515 utility, a static analysis tool (linter) for Robot Framework source files.")
4516 (license license:asl2.0))))
4517
4518 (define-public python-robotframework-sshlibrary
4519 (package
4520 (name "python-robotframework-sshlibrary")
4521 (version "3.7.0")
4522 ;; There are no tests in the PyPI archive.
4523 (source
4524 (origin
4525 (method git-fetch)
4526 (uri (git-reference
4527 (url "https://github.com/robotframework/SSHLibrary")
4528 (commit (string-append "v" version))))
4529 (file-name (git-file-name name version))
4530 (sha256
4531 (base32
4532 "09ak22rh9qa9wlpvhkliyybcp4xafjhxsps28wz0pf0030771xav"))))
4533 (build-system python-build-system)
4534 (arguments
4535 `(#:phases
4536 (modify-phases %standard-phases
4537 (add-before 'build 'build-and-install-doc
4538 (lambda* (#:key outputs #:allow-other-keys)
4539 (let* ((doc-output (assoc-ref outputs "doc"))
4540 (doc (string-append doc-output "/share/"
4541 ,name "-" ,version "/")))
4542 (invoke "chmod" "-R" "+w" "docs")
4543 (invoke "invoke" "kw-docs" "project-docs")
4544 (mkdir-p doc)
4545 (for-each delete-file (find-files "docs" "\\.rst"))
4546 (copy-recursively "docs" doc))))
4547 (replace 'check
4548 (lambda* (#:key tests? #:allow-other-keys)
4549 (when tests?
4550 ;; Some tests require an SSH server; we remove them.
4551 (delete-file "utest/test_client_api.py")
4552 (delete-file "utest/test_scp.py")
4553 (invoke "python" "utest/run.py")))))))
4554 (propagated-inputs
4555 `(("python-robotframework" ,python-robotframework)
4556 ("python-paramiko" ,python-paramiko)
4557 ("python-scp" ,python-scp)))
4558 (native-inputs
4559 `(("openssh" ,openssh)
4560 ("which" ,which)
4561 ;; To generate the documentation
4562 ("python-docutils" ,python-docutils)
4563 ("python-invoke" ,python-invoke)
4564 ("python-pygments" ,python-pygments)
4565 ("python-rellu" ,python-rellu)))
4566 (outputs '("out" "doc"))
4567 (home-page "https://github.com/robotframework/SSHLibrary")
4568 (synopsis "Robot Framework library for SSH and SFTP")
4569 (description "SSHLibrary is a Robot Framework library providing support
4570 for SSH and SFTP. It has the following main usages:
4571 @itemize @bullet
4572 @item Executing commands on the remote machine, either blocking or non-blocking.
4573 @item Writing and reading in an interactive shell.
4574 @item Transferring files and directories over SFTP.
4575 @item Ensuring that files and directories exist on the remote machine.
4576 @end itemize")
4577 (license license:asl2.0)))
4578
4579 (define-public python-robotframework-pythonlibcore
4580 (package
4581 (name "python-robotframework-pythonlibcore")
4582 (version "3.0.0")
4583 (source
4584 (origin
4585 (method git-fetch) ;no tests in pypi archive
4586 (uri (git-reference
4587 (url "https://github.com/robotframework/PythonLibCore")
4588 (commit (string-append "v" version))))
4589 (file-name (git-file-name name version))
4590 (sha256
4591 (base32
4592 "0v89v8va65l6inh0fb34qgxawx6p29pnrmw4n5941yzdi3804rc4"))))
4593 (build-system python-build-system)
4594 (arguments
4595 `(#:phases (modify-phases %standard-phases
4596 (replace 'check
4597 (lambda* (#:key tests? #:allow-other-keys)
4598 (when tests?
4599 (invoke "utest/run.py")))))))
4600 (native-inputs
4601 `(("python-pytest" ,python-pytest)
4602 ("python-pytest-cov" ,python-pytest-cov)
4603 ("python-pytest-mockito" ,python-pytest-mockito)
4604 ("python-robotframework" ,python-robotframework)))
4605 (home-page "https://github.com/robotframework/PythonLibCore")
4606 (synopsis "Robot Framework Python library tools")
4607 (description "PythonLibCore provides tools for creating larger test
4608 libraries for Robot Framework using Python. The Robot Framework hybrid and
4609 dynamic library APIs give more flexibility for library than the static library
4610 API, but they also set requirements for libraries which need to be implemented
4611 in the library side. PythonLibCore eases the problem by providing a simpler
4612 interface and by handling all the requirements towards the Robot Framework
4613 library APIs.")
4614 (license license:asl2.0)))
4615
4616 (define-public python-robotframework-seleniumlibrary
4617 (package
4618 (name "python-robotframework-seleniumlibrary")
4619 (version "5.1.3")
4620 (source
4621 (origin
4622 (method url-fetch)
4623 (uri (pypi-uri "robotframework-seleniumlibrary" version))
4624 (sha256
4625 (base32 "1dihrbcid9i7daw2qy6h3xsvwaxzmyip820jw5z11n60qrl006pm"))))
4626 (build-system python-build-system)
4627 ;; XXX: Tests require ungoogled-chromium, but the chromium module would
4628 ;; introduce a cycle if imported here.
4629 (propagated-inputs
4630 `(("python-robotframework" ,python-robotframework)
4631 ("python-robotframework-pythonlibcore"
4632 ,python-robotframework-pythonlibcore)
4633 ("python-selenium" ,python-selenium)))
4634 (home-page "https://github.com/robotframework/SeleniumLibrary")
4635 (synopsis "Web testing library for Robot Framework")
4636 (description "SeleniumLibrary is a web testing library for Robot Framework
4637 that utilizes the Selenium tool internally.")
4638 (license license:asl2.0)))
4639
4640 (define-public python-robotframework-seleniumscreenshots
4641 (package
4642 (name "python-robotframework-seleniumscreenshots")
4643 (version "0.9.5")
4644 (source
4645 (origin
4646 (method url-fetch)
4647 (uri (pypi-uri "robotframework-seleniumscreenshots" version))
4648 (sha256
4649 (base32 "05qv323hvjmy62h33ryrjaa9k1hyvp8hq5qnj8j1x3ap2ci3q3s0"))))
4650 (build-system python-build-system)
4651 (arguments
4652 ;; XXX: The tests require a relatively complicated setup configured in
4653 ;; their CI with Nix (!).
4654 `(#:tests? #f))
4655 (propagated-inputs
4656 `(("python-robotframework" ,python-robotframework)
4657 ("python-robotframework-seleniumlibrary"
4658 ,python-robotframework-seleniumlibrary)))
4659 (home-page "https://github.com/MarketSquare/robotframework-seleniumscreenshots")
4660 (synopsis "Robot Framework library for annotating and cropping screenshots")
4661 (description "The SeleniumScreenshots library for Robot Framework provides
4662 keywords for annotating and cropping screenshots taken with SeleniumLibrary.
4663 It is useful for scripting automatically updated screenshots for documentation
4664 or for visual regression testing purposes.")
4665 (license license:bsd-3)))
4666
4667 (define-public python-rstr
4668 (package
4669 (name "python-rstr")
4670 (version "2.2.6")
4671 (source
4672 (origin
4673 (method url-fetch)
4674 (uri (pypi-uri "rstr" version))
4675 (sha256
4676 (base32
4677 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4678 (build-system python-build-system)
4679 (home-page "https://github.com/leapfrogonline/rstr")
4680 (synopsis "Generate random strings in Python")
4681 (description "This package provides a python module for generating
4682 random strings of various types. It could be useful for fuzz testing,
4683 generating dummy data, or other applications. It has no dependencies
4684 outside the standard library.")
4685 (license license:bsd-3)))
4686
4687 (define-public python-scp
4688 (package
4689 (name "python-scp")
4690 (version "0.13.3")
4691 (source
4692 (origin
4693 (method url-fetch)
4694 (uri (pypi-uri "scp" version))
4695 (sha256
4696 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4697 (build-system python-build-system)
4698 (arguments
4699 '(#:tests? #f)) ;tests require an SSH server
4700 (propagated-inputs
4701 `(("python-paramiko" ,python-paramiko)))
4702 (home-page "https://github.com/jbardin/scp.py")
4703 (synopsis "SCP protocol module for Python and Paramiko")
4704 (description "The scp module extends the Paramiko library to send and
4705 receive files via the SCP1 protocol, as implemented by the OpenSSH
4706 @command{scp} program.")
4707 (license license:gpl2+)))
4708
4709 (define-public python-rst.linker
4710 (package
4711 (name "python-rst.linker")
4712 (version "1.11")
4713 (source
4714 (origin
4715 (method url-fetch)
4716 (uri (pypi-uri "rst.linker" version))
4717 (sha256
4718 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4719 (build-system python-build-system)
4720 (propagated-inputs
4721 `(("python-dateutil" ,python-dateutil)
4722 ("python-six" ,python-six)))
4723 (native-inputs
4724 `(("python-setuptools-scm" ,python-setuptools-scm)))
4725 ;; Test would require path.py, which would introduce a cyclic dependence.
4726 (arguments `(#:tests? #f))
4727 ;; Note: As of version 1.7 the documentation is not worth building.
4728 (home-page "https://github.com/jaraco/rst.linker")
4729 (synopsis "Sphinx plugin to add links and timestamps")
4730 (description "rst.linker automatically replaces text by a
4731 reStructuredText external reference or timestamps. It's primary purpose is to
4732 augment the changelog, but it can be used for other documents, too.")
4733 (license license:expat)))
4734
4735 (define-public python2-rst.linker
4736 (package-with-python2 python-rst.linker))
4737
4738 (define-public python-sshpubkeys
4739 (package
4740 (name "python-sshpubkeys")
4741 (version "3.1.0")
4742 (home-page "https://github.com/ojarva/python-sshpubkeys")
4743 (source (origin
4744 (method git-fetch)
4745 (uri (git-reference
4746 (url home-page)
4747 (commit (string-append "v" version))))
4748 (file-name (git-file-name name version))
4749 (sha256
4750 (base32
4751 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4752 (build-system python-build-system)
4753 (propagated-inputs
4754 `(("python-cryptography" ,python-cryptography)
4755 ("python-ecdsa" ,python-ecdsa)))
4756 (synopsis "OpenSSH public key parser")
4757 (description
4758 "This package provides a library for parsing and validating OpenSSH
4759 public key files.")
4760 (license license:bsd-3)))
4761
4762 (define-public python-feedgenerator
4763 (package
4764 (name "python-feedgenerator")
4765 (version "1.9")
4766 (source
4767 (origin
4768 (method url-fetch)
4769 (uri (pypi-uri "feedgenerator" version))
4770 (sha256
4771 (base32
4772 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4773 (modules '((guix build utils)))
4774 (snippet
4775 '(begin
4776 ;; Remove pre-compiled .pyc files from source.
4777 (for-each delete-file-recursively
4778 (find-files "." "__pycache__" #:directories? #t))
4779 (for-each delete-file (find-files "." "\\.pyc$"))
4780 #t))))
4781 (build-system python-build-system)
4782 (propagated-inputs
4783 `(("python-pytz" ,python-pytz)
4784 ("python-six" ,python-six)))
4785 (home-page "https://github.com/getpelican/feedgenerator")
4786 (synopsis
4787 "Standalone version of Django's Atom/RSS feed generator")
4788 (description
4789 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4790 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4791 (license license:bsd-3)))
4792
4793 (define-public python2-feedgenerator
4794 (package-with-python2 python-feedgenerator))
4795
4796 (define-public python-jsonrpc-server
4797 (package
4798 (name "python-jsonrpc-server")
4799 (version "0.4.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (pypi-uri "python-jsonrpc-server" version))
4804 (sha256
4805 (base32
4806 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4807 (build-system python-build-system)
4808 (propagated-inputs
4809 `(("python-mock" ,python-mock)
4810 ("python-pytest" ,python-pytest)
4811 ("python-ujson" ,python-ujson)))
4812 (home-page
4813 "https://github.com/palantir/python-jsonrpc-server")
4814 (synopsis "JSON RPC 2.0 server library")
4815 (description
4816 "This package provides a JSON RPC 2.0 server library for Python.")
4817 (license license:expat)))
4818
4819 (define-public python-pydantic
4820 (package
4821 (name "python-pydantic")
4822 (version "1.8.2")
4823 (source
4824 (origin
4825 (method git-fetch)
4826 (uri (git-reference
4827 (url "https://github.com/samuelcolvin/pydantic")
4828 (commit (string-append "v" version))))
4829 (file-name (git-file-name name version))
4830 (sha256
4831 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4832 (build-system python-build-system)
4833 (arguments
4834 '(#:phases
4835 (modify-phases %standard-phases
4836 (add-before 'check 'disable-test
4837 (lambda _
4838 ;; Reported upstream:
4839 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4840 ;; Disable the faulty test as the fix is unclear.
4841 (substitute* "tests/test_validators.py"
4842 (("test_assert_raises_validation_error")
4843 "_test_assert_raises_validation_error"))
4844
4845 ;; These fail because of <https://bugs.python.org/issue40398>.
4846 ;; Remove after Python has been upgraded to >= 3.9.
4847 (substitute* "tests/test_generics.py"
4848 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4849 ""))
4850 (substitute* "tests/test_schema.py"
4851 (("test_unenforced_constraints_schema")
4852 "_test_unenforced_constraints_schema"))
4853
4854 ;; Disable tests for the Hypothesis plugin because it is tricky
4855 ;; to configure in the build container.
4856 (delete-file "tests/test_hypothesis_plugin.py")))
4857 (replace 'check
4858 (lambda _ (invoke "pytest" "-vv"))))))
4859 (native-inputs
4860 `(("python-pytest" ,python-pytest)
4861 ("python-pytest-mock" ,python-pytest-mock)))
4862 (propagated-inputs
4863 `(("python-typing-extensions" ,python-typing-extensions)))
4864 (home-page "https://github.com/samuelcolvin/pydantic")
4865 (synopsis "Python data validation and settings management")
4866 (description
4867 "Pydantic enforces type hints at runtime, and provides user friendly
4868 errors when data is invalid.")
4869 (license license:expat)))
4870
4871 (define-public python-pydocstyle
4872 (package
4873 (name "python-pydocstyle")
4874 (version "3.0.0")
4875 (source
4876 (origin
4877 (method url-fetch)
4878 (uri (pypi-uri "pydocstyle" version))
4879 (sha256
4880 (base32
4881 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4882 (build-system python-build-system)
4883 (propagated-inputs
4884 `(("python-six" ,python-six)
4885 ("python-snowballstemmer" ,python-snowballstemmer)))
4886 (home-page
4887 "https://github.com/PyCQA/pydocstyle/")
4888 (synopsis "Python docstring style checker")
4889 (description
4890 "This package provides a style checker for the Python Language
4891 Server (PLS).")
4892 (license license:expat)))
4893
4894 (define-public python-language-server
4895 (package
4896 (name "python-language-server")
4897 (version "0.36.2")
4898 (source
4899 (origin
4900 (method url-fetch)
4901 (uri (pypi-uri "python-language-server" version))
4902 (sha256
4903 (base32
4904 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4905 (build-system python-build-system)
4906 (arguments
4907 `(#:phases
4908 (modify-phases %standard-phases
4909 (add-after 'unpack 'relax-deps
4910 (lambda _
4911 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4912 "pycodestyle"))
4913 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4914 #t))
4915 (add-before 'check 'set-HOME
4916 (lambda _ (setenv "HOME" "/tmp") #t))
4917 (replace 'check
4918 (lambda _
4919 ;; Disable failing test.
4920 (invoke "python" "-m" "pytest" "-k"
4921 "not test_pyqt_completion"))))))
4922 (propagated-inputs
4923 `(("python-autopep8" ,python-autopep8)
4924 ("python-configparser" ,python-configparser)
4925 ("python-pydocstyle" ,python-pydocstyle)
4926 ("python-flake8" ,python-flake8)
4927 ("python-future" ,python-future)
4928 ("python-jedi" ,python-jedi)
4929 ("python-jsonrpc-server" ,python-jsonrpc-server)
4930 ("python-pluggy" ,python-pluggy)
4931 ("python-pycodestyle" ,python-pycodestyle)
4932 ("python-pyflakes" ,python-pyflakes)
4933 ("python-rope" ,python-rope)
4934 ("python-ujson" ,python-ujson)
4935 ("python-yapf" ,python-yapf)))
4936 (native-inputs
4937 `(("python-coverage" ,python-coverage)
4938 ("python-flaky" ,python-flaky)
4939 ("python-matplotlib" ,python-matplotlib)
4940 ("python-mock" ,python-mock)
4941 ("python-numpy" ,python-numpy)
4942 ("python-pandas" ,python-pandas)
4943 ("python-pylint" ,python-pylint)
4944 ("python-pytest" ,python-pytest)
4945 ("python-pytest-cov" ,python-pytest-cov)
4946 ("python-versioneer" ,python-versioneer)))
4947 (home-page "https://github.com/palantir/python-language-server")
4948 (synopsis "Python implementation of the Language Server Protocol")
4949 (description
4950 "The Python Language Server (pyls) is an implementation of the Python 3
4951 language specification for the Language Server Protocol (LSP). This tool is
4952 used in text editing environments to provide a complete and integrated
4953 feature-set for programming Python effectively.")
4954 (license license:expat)))
4955
4956 (define-public python-pathspec
4957 (package
4958 (name "python-pathspec")
4959 (version "0.7.0")
4960 (source
4961 (origin
4962 (method url-fetch)
4963 (uri (pypi-uri "pathspec" version))
4964 (sha256
4965 (base32
4966 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4967 (build-system python-build-system)
4968 (home-page "https://github.com/cpburnz/python-path-specification")
4969 (synopsis "Utility library for gitignore style pattern matching of file paths")
4970 (description
4971 "This package provides a utility library for gitignore style pattern
4972 matching of file paths.")
4973 (license license:mpl2.0)))
4974
4975 (define-public python-black
4976 (package
4977 (name "python-black")
4978 (version "20.8b1")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "black" version))
4983 (sha256
4984 (base32
4985 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4986 (build-system python-build-system)
4987 (arguments
4988 `(#:phases
4989 (modify-phases %standard-phases
4990 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4991 (lambda _
4992 (let ((python3 (which "python3")))
4993 (substitute* '("tests/data/fmtonoff.py"
4994 "tests/data/string_prefixes.py"
4995 "tests/data/function.py"
4996 "tests/data/python37.py")
4997 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4998 (string-append "#!" python3 (if (string? minor-version)
4999 minor-version
5000 "")))))
5001 #t))
5002 (add-after 'unpack 'disable-broken-tests
5003 (lambda* (#:key outputs inputs #:allow-other-keys)
5004 ;; Make installed package available for running the tests
5005 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5006 ":" (getenv "PATH")))
5007
5008 ;; These tests are supposed to be skipped when the blackd
5009 ;; dependencies are missing, but this doesn't quite work.
5010 (substitute* "tests/test_black.py"
5011 (("( *)class BlackDTestCase.*" match indent)
5012 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
5013 indent "class BlackDTestCase(unittest.TestCase):\n"))
5014 (("web.Application") "False")
5015 (("@unittest_run_loop") ""))
5016
5017 ;; Patching the above file breaks the self test
5018 (substitute* "tests/test_black.py"
5019 (("( *)def test_self" match indent)
5020 (string-append indent "@unittest.skip(\"guix\")\n" match)))
5021
5022 (substitute* "tests/test_black.py"
5023 (("( *)def test_python38" match indent)
5024 (string-append indent "@unittest.skip(\"guix\")\n" match)))
5025 #t))
5026 ;; Remove blackd, because it depends on python-aiohttp and
5027 ;; python-aiohttp-cors.
5028 (add-after 'unpack 'remove-entrypoint
5029 (lambda _
5030 (substitute* "setup.py"
5031 (("\\s*\"blackd=blackd:patched_main \\[d\\]\",\n") "")
5032 (("\"blackd\", ") "")))))))
5033 (propagated-inputs
5034 `(("python-click" ,python-click)
5035 ("python-attrs" ,python-attrs)
5036 ("python-appdirs" ,python-appdirs)
5037 ("python-pathspec" ,python-pathspec)
5038 ("python-mypy-extensions" ,python-mypy-extensions)
5039 ("python-regex" ,python-regex)
5040 ("python-toml" ,python-toml)
5041 ("python-typed-ast" ,python-typed-ast)
5042 ("python-typing-extensions" ,python-typing-extensions)))
5043 (native-inputs
5044 `(("python-setuptools-scm" ,python-setuptools-scm)))
5045 (home-page "https://github.com/ambv/black")
5046 (synopsis "The uncompromising code formatter")
5047 (description "Black is the uncompromising Python code formatter.")
5048 (license license:expat)))
5049
5050 (define-public python-black-macchiato
5051 (package
5052 (name "python-black-macchiato")
5053 (version "1.3.0")
5054 (source
5055 (origin
5056 (method url-fetch)
5057 (uri (pypi-uri "black-macchiato" version))
5058 (sha256
5059 (base32
5060 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
5061 (build-system python-build-system)
5062 (propagated-inputs
5063 `(("python-black" ,python-black)))
5064 (home-page "https://github.com/wbolster/black-macchiato")
5065 (synopsis "Partial @code{python-black} formatting")
5066 (description
5067 "This package is built on top the @{python-black} code formatter to
5068 enable formatting of partial files.")
5069 (license license:bsd-3)))
5070
5071 (define-public python-blinker
5072 (package
5073 (name "python-blinker")
5074 (version "1.4")
5075 (source
5076 (origin
5077 (method url-fetch)
5078 (uri (pypi-uri "blinker" version))
5079 (sha256
5080 (base32
5081 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
5082 (build-system python-build-system)
5083 (home-page "https://pythonhosted.org/blinker/")
5084 (synopsis "Fast, simple object-to-object and broadcast signaling")
5085 (description
5086 "Blinker provides a fast dispatching system that allows any number of
5087 interested parties to subscribe to events, or \"signals\".")
5088 (license license:expat)))
5089
5090 (define-public python2-blinker
5091 (package-with-python2 python-blinker))
5092
5093 (define-public pelican
5094 (package
5095 (name "pelican")
5096 (version "4.7.0")
5097 (source
5098 (origin
5099 (method url-fetch)
5100 (uri (pypi-uri "pelican" version))
5101 (sha256
5102 (base32
5103 "0g1sbzlz5mfc70gwgnj3lz4kf4psdjl96n6ywklv8z817m1khxdd"))))
5104 (build-system python-build-system)
5105 (inputs
5106 `(("python-blinker" ,python-blinker)
5107 ("python-dateutil" ,python-dateutil)
5108 ;; Ignoring `guix lint` warning as python-docutils is used to support
5109 ;; reStructuredText processing at runtime.
5110 ("python-docutils" ,python-docutils)
5111 ("python-feedgenerator" ,python-feedgenerator)
5112 ("python-jinja2" ,python-jinja2)
5113 ("python-markdown" ,python-markdown)
5114 ("python-pygments" ,python-pygments)
5115 ("python-pytz" ,python-pytz)
5116 ("python-rich" ,python-rich)
5117 ("python-unidecode" ,python-unidecode)))
5118 (home-page "https://blog.getpelican.com/")
5119 (arguments
5120 `(;; XXX Requires a lot more packages to do unit tests :P
5121 #:tests? #f))
5122 (synopsis "Python-based static site publishing system")
5123 (description
5124 "Pelican is a tool to generate a static blog from reStructuredText,
5125 Markdown input files, and more. Pelican uses Jinja2 for templating
5126 and is very extensible.")
5127 (license license:agpl3+)))
5128
5129 (define-public mallard-ducktype
5130 (package
5131 (name "mallard-ducktype")
5132 (version "1.0.2")
5133 (source
5134 (origin
5135 (method git-fetch)
5136 ;; git-reference because tests are not included in pypi source tarball
5137 ;; https://issues.guix.gnu.org/issue/36755#2
5138 (uri (git-reference
5139 (url "https://github.com/projectmallard/mallard-ducktype")
5140 (commit version)))
5141 (file-name (git-file-name name version))
5142 (sha256
5143 (base32
5144 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
5145 (build-system python-build-system)
5146 (arguments
5147 '(#:phases
5148 (modify-phases %standard-phases
5149 (replace 'check
5150 (lambda _
5151 (with-directory-excursion "tests"
5152 (invoke "sh" "runtests")))))))
5153 (home-page "http://projectmallard.org")
5154 (synopsis "Convert Ducktype to Mallard documentation markup")
5155 (description
5156 "Ducktype is a lightweight syntax that can represent all the semantics
5157 of the Mallard XML documentation system. Ducktype files can be converted to
5158 Mallard using the @command{ducktype} tool. The yelp-tools package
5159 provides additional functionality on the produced Mallard documents.")
5160 (license license:expat)))
5161
5162 (define-public python-cython
5163 (package
5164 (name "python-cython")
5165 (version "0.29.22")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (pypi-uri "Cython" version))
5170 (sha256
5171 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
5172 (build-system python-build-system)
5173 ;; we need the full python package and not just the python-wrapper
5174 ;; because we need libpython3.3m.so
5175 (inputs
5176 `(("python" ,python)))
5177 (arguments
5178 `(#:phases
5179 (modify-phases %standard-phases
5180 (add-before 'check 'set-HOME
5181 ;; some tests require access to "$HOME/.cython"
5182 (lambda _ (setenv "HOME" "/tmp") #t))
5183 (replace 'check
5184 (lambda _
5185 ;; Disable compiler optimizations to greatly reduce the running
5186 ;; time of the test suite.
5187 (setenv "CFLAGS" "-O0")
5188
5189 (invoke "python" "runtests.py" "-vv"
5190 "-j" (number->string (parallel-job-count))
5191 ;; XXX: On 32-bit architectures, running the parallel tests
5192 ;; fails on many-core systems, see
5193 ;; <https://github.com/cython/cython/issues/2807>.
5194 ,@(if (not (target-64bit?))
5195 '("-x" "run.parallel")
5196 '())))))))
5197 (home-page "https://cython.org/")
5198 (synopsis "C extensions for Python")
5199 (description "Cython is an optimising static compiler for both the Python
5200 programming language and the extended Cython programming language. It makes
5201 writing C extensions for Python as easy as Python itself.")
5202 (license license:asl2.0)
5203 (properties `((python2-variant . ,(delay python2-cython))))))
5204
5205 (define-public python2-cython
5206 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
5207 (package/inherit base
5208 (name "python2-cython")
5209 (inputs
5210 `(("python-2" ,python-2))) ;this is not automatically changed
5211 (arguments
5212 (substitute-keyword-arguments (package-arguments base)
5213 ((#:phases phases)
5214 `(modify-phases ,phases
5215 (add-before 'check 'adjust-test_embed
5216 (lambda _
5217 (substitute* "runtests.py"
5218 ;; test_embed goes great lengths to find the static libpythonX.Y.a
5219 ;; so it can give the right -L flag to GCC when embedding static
5220 ;; builds of Python. It is unaware that the Python "config"
5221 ;; directory (where the static library lives) was renamed in
5222 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
5223 ;; which works fine, because that is where the shared library is.
5224 ;;
5225 ;; It also appears to be unaware that the Makefile in Demos/embed
5226 ;; already unconditionally pass the static library location to GCC,
5227 ;; after checking sysconfig.get_config_var('LIBPL).
5228 ;;
5229 ;; The effect is that the linker is unable to resolve libexpat
5230 ;; symbols when building for Python 2, because neither the Python 2
5231 ;; shared library nor Expat is available. To fix it, we can either
5232 ;; add Expat as an input and make it visible to the linker, or just
5233 ;; prevent it from overriding the Python shared library location.
5234 ;; The end result is identical, so we take the easy route.
5235 ((" or libname not in os\\.listdir\\(libdir\\)")
5236 ""))
5237 #t)))))))))
5238
5239 ;; NOTE: when upgrading numpy please make sure that python-pandas and
5240 ;; python-scipy still build, as these three packages are often used together.
5241 (define-public python-numpy
5242 (package
5243 (name "python-numpy")
5244 (version "1.17.3")
5245 (source
5246 (origin
5247 (method url-fetch)
5248 (uri (string-append
5249 "https://github.com/numpy/numpy/releases/download/v"
5250 version "/numpy-" version ".tar.gz"))
5251 (sha256
5252 (base32
5253 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
5254 (build-system python-build-system)
5255 (inputs
5256 `(("openblas" ,openblas)))
5257 (native-inputs
5258 `(("python-cython" ,python-cython)
5259 ("python-pytest" ,python-pytest)
5260 ("gfortran" ,gfortran)))
5261 (arguments
5262 `(#:phases
5263 (modify-phases %standard-phases
5264 (add-before 'build 'configure-blas-lapack
5265 (lambda* (#:key inputs #:allow-other-keys)
5266 (call-with-output-file "site.cfg"
5267 (lambda (port)
5268 (format port
5269 "[openblas]
5270 libraries = openblas
5271 library_dirs = ~a/lib
5272 include_dirs = ~a/include
5273
5274 # backslash-n to make emacs happy
5275 \n[lapack]
5276 lapack_libs = lapack
5277 library_dirs = ~a/lib
5278 include_dirs = ~a/include
5279 "
5280 (assoc-ref inputs "openblas")
5281 (assoc-ref inputs "openblas")
5282 (assoc-ref inputs "lapack")
5283 (assoc-ref inputs "lapack"))))
5284 #t))
5285 (add-before 'build 'fix-executable-paths
5286 (lambda* (#:key inputs #:allow-other-keys)
5287 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5288 ;; instead of /bin/sh.
5289 (substitute* "numpy/distutils/exec_command.py"
5290 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
5291 (string-append match-start (assoc-ref inputs "bash") match-end)))
5292 ;; Use "gcc" executable, not "cc".
5293 (substitute* "numpy/distutils/system_info.py"
5294 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5295 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
5296 #t))
5297 ;; Tests can only be run after the library has been installed and not
5298 ;; within the source directory.
5299 (delete 'check)
5300 (add-after 'install 'check
5301 (lambda* (#:key outputs inputs #:allow-other-keys)
5302 ;; Make installed package available for running the tests
5303 (add-installed-pythonpath inputs outputs)
5304 ;; Make sure "f2py" etc is found.
5305 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5306 ":" (getenv "PATH")))
5307 (with-directory-excursion "/tmp"
5308 (invoke "python" "-c"
5309 "import numpy; numpy.test(verbose=2)")))))))
5310 (home-page "https://numpy.org")
5311 (synopsis "Fundamental package for scientific computing with Python")
5312 (description "NumPy is the fundamental package for scientific computing
5313 with Python. It contains among other things: a powerful N-dimensional array
5314 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5315 and Fortran code, useful linear algebra, Fourier transform, and random number
5316 capabilities.")
5317 (properties `((python2-variant . ,(delay python2-numpy))))
5318 (license license:bsd-3)))
5319
5320 ;; Numpy 1.16.x are the last versions that support Python 2.
5321 (define-public python2-numpy
5322 (let ((numpy (package-with-python2
5323 (strip-python2-variant python-numpy))))
5324 (package
5325 (inherit numpy)
5326 (version "1.16.5")
5327 (source (origin
5328 (method url-fetch)
5329 (uri (string-append
5330 "https://github.com/numpy/numpy/releases/download/v"
5331 version "/numpy-" version ".tar.gz"))
5332 (sha256
5333 (base32
5334 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5335
5336 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5337 ;; interest only for legacy code going back to NumPy's predecessor
5338 ;; Numeric.
5339 (define-public python2-numpy-1.8
5340 (package (inherit python2-numpy)
5341 (version "1.8.2")
5342 (source
5343 (origin
5344 (method git-fetch)
5345 (uri (git-reference
5346 (url "https://github.com/numpy/numpy")
5347 (commit (string-append "v" version))))
5348 (file-name (git-file-name "numpy" version))
5349 (sha256
5350 (base32
5351 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5352 (arguments
5353 (substitute-keyword-arguments (package-arguments python2-numpy)
5354 ((#:phases phases)
5355 `(modify-phases ,phases
5356 (replace 'configure-blas-lapack
5357 (lambda* (#:key inputs #:allow-other-keys)
5358 (call-with-output-file "site.cfg"
5359 (lambda (port)
5360 (format port
5361 "[openblas]
5362 libraries = openblas,lapack
5363 library_dirs = ~a/lib:~a/lib
5364 include_dirs = ~a/include:~a/include
5365 "
5366 (assoc-ref inputs "openblas")
5367 (assoc-ref inputs "lapack")
5368 (assoc-ref inputs "openblas")
5369 (assoc-ref inputs "lapack"))))
5370 #t))))))
5371 (native-inputs
5372 `(("python2-nose" ,python2-nose)))
5373 (description "NumPy is the fundamental package for scientific computing
5374 with Python. It contains among other things: a powerful N-dimensional array
5375 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5376 and Fortran code, useful linear algebra, Fourier transform, and random number
5377 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5378 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5379 Numeric.")
5380 (license license:bsd-3)))
5381
5382 (define-public python-munch
5383 (package
5384 (name "python-munch")
5385 (version "2.0.4")
5386 (source
5387 (origin
5388 (method url-fetch)
5389 (uri (pypi-uri "munch" version))
5390 (sha256
5391 (base32
5392 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5393 (build-system python-build-system)
5394 (home-page "https://github.com/Infinidat/munch")
5395 (synopsis "Dot-accessible dictionary")
5396 (description "Munch is a dot-accessible dictionary similar to JavaScript
5397 objects.")
5398 (license license:expat)))
5399
5400 (define-public python2-munch
5401 (package-with-python2 python-munch))
5402
5403 (define-public python-colormath
5404 (package
5405 (name "python-colormath")
5406 (version "3.0.0")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "colormath" version))
5411 (sha256
5412 (base32
5413 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5414 (build-system python-build-system)
5415 (propagated-inputs
5416 `(("python-networkx" ,python-networkx)
5417 ("python-numpy" ,python-numpy)))
5418 (home-page "https://github.com/gtaylor/python-colormath")
5419 (synopsis "Color math and conversion library")
5420 (description
5421 "This is a Python library for color math and conversions.")
5422 (license license:bsd-3)))
5423
5424 (define-public python2-colormath
5425 (package-with-python2 python-colormath))
5426
5427 (define-public python-sparse
5428 (package
5429 (name "python-sparse")
5430 (version "0.12.0")
5431 (source
5432 (origin
5433 (method url-fetch)
5434 (uri (pypi-uri "sparse" version))
5435 (sha256
5436 (base32
5437 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5438 (build-system python-build-system)
5439 (arguments
5440 `(#:phases
5441 (modify-phases %standard-phases
5442 (replace 'check
5443 (lambda* (#:key tests? #:allow-other-keys)
5444 (when tests?
5445 (invoke "python" "-m" "pytest" "-v")))))))
5446 (propagated-inputs
5447 `(("python-numba" ,python-numba)
5448 ("python-numpy" ,python-numpy)
5449 ("python-scipy" ,python-scipy)))
5450 (native-inputs
5451 `(("python-dask" ,python-dask)
5452 ("python-pytest" ,python-pytest)
5453 ("python-pytest-black" ,python-pytest-black)
5454 ("python-pytest-cov" ,python-pytest-cov)))
5455 (home-page "https://github.com/pydata/sparse/")
5456 (synopsis "Library for multi-dimensional sparse arrays")
5457 (description
5458 "This package implements sparse arrays of arbitrary dimension on top of
5459 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5460 of the elements are zero. @code{python-sparse} generalizes the
5461 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5462 extends beyond just rows and columns to an arbitrary number of dimensions.
5463 Additionally, this project maintains compatibility with the
5464 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5465 used in @code{scipy.sparse}. These differences make this project useful in
5466 certain situations where @code{scipy.sparse} matrices are not well suited, but
5467 it should not be considered a full replacement. It lacks layouts that are not
5468 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5469 depends on @code{scipy.sparse} for some computations.")
5470 (license license:bsd-3)))
5471
5472 (define-public python-spectra
5473 (package
5474 (name "python-spectra")
5475 (version "0.0.11")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "spectra" version))
5480 (sha256
5481 (base32
5482 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5483 (build-system python-build-system)
5484 (arguments
5485 `(#:phases
5486 (modify-phases %standard-phases
5487 (replace 'check
5488 (lambda _ (invoke "nosetests" "-v"))))))
5489 (propagated-inputs
5490 `(("python-colormath" ,python-colormath)))
5491 (native-inputs
5492 `(("python-nose" ,python-nose)))
5493 (home-page "https://github.com/jsvine/spectra")
5494 (synopsis "Color scales and color conversion")
5495 (description
5496 "This package provides a Python library intended to make color math,
5497 color scales, and color space conversion easy. It has support for:
5498
5499 @enumerate
5500 @item Color scales
5501 @item Color ranges
5502 @item Color blending
5503 @item Brightening/darkening colors
5504 @item Saturating/desaturating colors
5505 @item Conversion to/from multiple color spaces.
5506 @end enumerate\n")
5507 (license license:expat)))
5508
5509 (define-public python2-spectra
5510 (package-with-python2 python-spectra))
5511
5512 (define-public python-pyspnego
5513 (package
5514 (name "python-pyspnego")
5515 (version "0.1.6")
5516 (source
5517 (origin
5518 (method git-fetch) ;no tests in PyPI release
5519 (uri (git-reference
5520 (url "https://github.com/jborean93/pyspnego")
5521 (commit (string-append "v" version))))
5522 (file-name (git-file-name name version))
5523 (sha256
5524 (base32
5525 "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
5526 (build-system python-build-system)
5527 (arguments
5528 `(#:phases (modify-phases %standard-phases
5529 (replace 'check
5530 (lambda* (#:key tests? #:allow-other-keys)
5531 (when tests?
5532 (invoke "pytest")))))))
5533 (native-inputs
5534 `(("python-pytest" ,python-pytest)
5535 ("python-pytest-mock" ,python-pytest-mock)))
5536 (propagated-inputs
5537 `(("python-cryptography" ,python-cryptography)
5538 ("python-gssapi" ,python-gssapi)
5539 ("python-ruamel.yaml" ,python-ruamel.yaml)))
5540 (home-page "https://github.com/jborean93/pyspnego")
5541 (synopsis "Python SPNEGO library")
5542 (description "The @code{pyspnego} Python library handles Negotiate, NTLM,
5543 Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet
5544 parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human
5545 readable format.")
5546 (license license:expat)))
5547
5548 (define-public python-numpy-documentation
5549 (package
5550 (name "python-numpy-documentation")
5551 (version (package-version python-numpy))
5552 (source (package-source python-numpy))
5553 (build-system python-build-system)
5554 (native-inputs
5555 `(("python-matplotlib" ,python-matplotlib)
5556 ("python-numpy" ,python-numpy)
5557 ("pkg-config" ,pkg-config)
5558 ("python-sphinx" ,python-sphinx)
5559 ("python-numpydoc" ,python-numpydoc)
5560 ("texlive" ,(texlive-updmap.cfg (list texlive-cm-super
5561 texlive-fonts-ec
5562 texlive-generic-iftex
5563 texlive-pdftex
5564 texlive-amsfonts
5565 texlive-latex-capt-of
5566 texlive-latex-cmap
5567 texlive-latex-environ
5568 texlive-latex-eqparbox
5569 texlive-etoolbox
5570 texlive-latex-expdlist
5571 texlive-latex-fancyhdr
5572 texlive-latex-fancyvrb
5573 texlive-latex-fncychap
5574 texlive-latex-float
5575 texlive-latex-framed
5576 texlive-latex-geometry
5577 texlive-latex-graphics
5578 texlive-hyperref
5579 texlive-latex-mdwtools
5580 texlive-latex-multirow
5581 texlive-latex-needspace
5582 texlive-oberdiek
5583 texlive-latex-parskip
5584 texlive-latex-preview
5585 texlive-latex-tabulary
5586 texlive-latex-threeparttable
5587 texlive-latex-titlesec
5588 texlive-latex-trimspaces
5589 texlive-latex-ucs
5590 texlive-latex-upquote
5591 texlive-url
5592 texlive-latex-varwidth
5593 texlive-latex-wrapfig)))
5594 ("texinfo" ,texinfo)
5595 ("perl" ,perl)
5596 ("scipy-sphinx-theme"
5597 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5598 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5599 (method git-fetch)
5600 (uri (git-reference
5601 (url "https://github.com/scipy/scipy-sphinx-theme")
5602 (commit commit)))
5603 (file-name (git-file-name "python-scipy-sphinx-theme"
5604 (string-take commit 7)))
5605 (sha256
5606 (base32
5607 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5608 ,@(package-native-inputs python-numpy)))
5609 (arguments
5610 `(#:tests? #f ; we're only generating the documentation
5611 #:phases
5612 (modify-phases %standard-phases
5613 (delete 'build)
5614 (replace 'install
5615 (lambda* (#:key inputs outputs #:allow-other-keys)
5616 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5617 (doc (string-append
5618 data "/doc/" ,name "-"
5619 ,(package-version python-numpy)))
5620 (info-reader (string-append data "/info"))
5621 (html (string-append doc "/html"))
5622 (scipy-sphinx-theme "scipy-sphinx-theme")
5623 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5624 (pyver ,(string-append "PYVER=")))
5625
5626 ;; FIXME: this is needed to for texlive-updmap.cfg to generate
5627 ;; fonts, which are not found.
5628 (setenv "HOME" "/tmp")
5629
5630 (with-directory-excursion "doc"
5631 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5632 (mkdir-p html)
5633 (invoke "make" "html" pyver)
5634 (invoke "make" "latex" "PAPER=a4" pyver)
5635 (invoke "make" "-C" "build/latex"
5636 "all-pdf" "PAPER=a4" pyver)
5637 ;; FIXME: Generation of the info file fails.
5638 ;; (invoke "make" "info" pyver)
5639 ;; (mkdir-p info)
5640 ;; (copy-file "build/texinfo/numpy.info"
5641 ;; (string-append info "/numpy.info"))
5642 (for-each (lambda (file)
5643 (copy-file (string-append "build/latex" file)
5644 (string-append doc file)))
5645 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5646 (with-directory-excursion "build/html"
5647 (for-each (lambda (file)
5648 (let* ((dir (dirname file))
5649 (tgt-dir (string-append html "/" dir)))
5650 (unless (equal? "." dir)
5651 (mkdir-p tgt-dir))
5652 (install-file file html)))
5653 (find-files "." ".*")))))
5654 #t)))))
5655 (home-page (package-home-page python-numpy))
5656 (synopsis "Documentation for the python-numpy package")
5657 (description (package-description python-numpy))
5658 (license (package-license python-numpy))))
5659
5660 (define-public python-pygit2
5661 (package
5662 (name "python-pygit2")
5663 (version "1.6.0")
5664 (source
5665 (origin
5666 (method url-fetch)
5667 (uri (pypi-uri "pygit2" version))
5668 (sha256
5669 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5670 (build-system python-build-system)
5671 (arguments
5672 '(#:tests? #f)) ; tests don't run correctly in our environment
5673 (propagated-inputs
5674 `(("python-cached-property" ,python-cached-property)
5675 ("python-cffi" ,python-cffi)
5676 ("libgit2" ,libgit2)))
5677 (native-inputs
5678 `(("python-pytest" ,python-pytest)))
5679 (home-page "https://github.com/libgit2/pygit2")
5680 (synopsis "Python bindings for libgit2")
5681 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5682 library, libgit2 implements Git plumbing.")
5683 ;; GPL2.0 only, with linking exception.
5684 (license license:gpl2)))
5685
5686 (define-public python-patiencediff
5687 (package
5688 (name "python-patiencediff")
5689 (version "0.2.0")
5690 (source
5691 (origin
5692 (method url-fetch)
5693 (uri (pypi-uri "patiencediff" version))
5694 (sha256
5695 (base32
5696 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5697 (build-system python-build-system)
5698 (home-page "https://www.breezy-vcs.org/")
5699 (synopsis "Python implementation of the patiencediff algorithm")
5700 (description
5701 "This package contains a Python implementation of the @code{patiencediff}
5702 algorithm. Patiencediff provides a good balance of performance, nice output for
5703 humans, and implementation simplicity.")
5704 (license license:gpl2)))
5705
5706 (define-public python-wmctrl
5707 (package
5708 (name "python-wmctrl")
5709 (version "0.4")
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (pypi-uri "wmctrl" version))
5714 (sha256
5715 (base32
5716 "1q0l1sqnj5wma87k3dsgmsyph464syjc6fl8qcpa41nan1rgzjv6"))))
5717 (build-system python-build-system)
5718 (arguments
5719 `(#:phases (modify-phases %standard-phases
5720 (add-after 'unpack 'patch-paths
5721 (lambda* (#:key inputs #:allow-other-keys)
5722 (let ((wmctrl (assoc-ref inputs "wmctrl")))
5723 (substitute* "wmctrl.py"
5724 (("'wmctrl")
5725 (string-append "'" wmctrl "/bin/wmctrl")))))))))
5726 (inputs `(("wmctrl" ,wmctrl)))
5727 (home-page "https://github.com/antocuni/wmctrl")
5728 (synopsis "Tool to programmatically control Xorg windows")
5729 (description "This package provides a library for programmatically
5730 controlling Xorg windows using Python. The library relies on the
5731 @command{wmctrl} to do so.")
5732 (license license:expat)))
5733
5734 (define-public python-fancycompleter
5735 (package
5736 (name "python-fancycompleter")
5737 (version "0.9.1")
5738 (source
5739 (origin
5740 (method url-fetch)
5741 (uri (pypi-uri "fancycompleter" version))
5742 (sha256
5743 (base32 "0wkj4h01pxa8prv59zl09a0i3w26k835bfpjgvyvsai4mswgxq09"))))
5744 (build-system python-build-system)
5745 (arguments
5746 `(#:phases (modify-phases %standard-phases
5747 (add-after 'unpack 'fix-setup.py
5748 (lambda _
5749 (substitute* "setup.py"
5750 ((".*setupmeta.*")
5751 "")
5752 (("versioning=.*")
5753 (string-append "version='" ,version "',"))
5754 ((".*pyrepl.*") ;broken on Python 3
5755 "")))))))
5756 (home-page "https://github.com/pdbpp/fancycompleter")
5757 (synopsis "TAB completion library for Python")
5758 (description "@code{fancycompleter} is a module that adds TAB completion
5759 to the interactive prompt. It is an extension of the @code{rlcompleter}
5760 module from the standard Python library.")
5761 (license license:bsd-3)))
5762
5763 (define-public python-pdbpp
5764 (package
5765 (name "python-pdbpp")
5766 (version "0.10.3")
5767 (source
5768 (origin
5769 (method url-fetch)
5770 (uri (pypi-uri "pdbpp" version))
5771 (sha256
5772 (base32
5773 "1xb9yvi30rb1cdpvfdk2kg79vh3anvkz91r8bwvfp3iqv97kzr6r"))))
5774 (build-system python-build-system)
5775 (arguments
5776 `(#:phases
5777 (modify-phases %standard-phases
5778 (replace 'check
5779 (lambda* (#:key tests? #:allow-other-keys)
5780 (when tests?
5781 (invoke "pytest"
5782 "-k"
5783 (string-append
5784 ;; These tests seem to require a real TTY.
5785 "not interaction_restores_previous_sigint_handler "
5786 "and not python_m_pdb_uses_pdbpp"))))))))
5787 (propagated-inputs
5788 `(("python-fancycompleter" ,python-fancycompleter)
5789 ("python-pygments" ,python-pygments)
5790 ("python-wmctrl" ,python-wmctrl)))
5791 (native-inputs
5792 `(("python-pytest" ,python-pytest)
5793 ("python-setuptools-scm" ,python-setuptools-scm)))
5794 (home-page "https://github.com/pdbpp/pdbpp")
5795 (synopsis "Drop-in replacement for pdb")
5796 (description "Pdb++ is a drop-in replacement for @code{pdb}. It
5797 includes the following improvements compared to @code{pdb}:
5798 @itemize
5799 @item auto-completion
5800 @item syntax highlighting of code listings
5801 @item sticky mode
5802 @item new commands to be used from the interactive (Pdb++) prompt
5803 @item smart command parsing
5804 @item additional convenience functions in the @code{pdb} module.
5805 @end itemize")
5806 (license license:bsd-3)))
5807
5808 (define-public python-pdftotext
5809 (package
5810 (name "python-pdftotext")
5811 (version "2.1.6")
5812 (source
5813 (origin
5814 (method url-fetch)
5815 (uri (pypi-uri "pdftotext" version))
5816 (sha256
5817 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5818 (build-system python-build-system)
5819 (inputs
5820 `(("poppler" ,poppler)))
5821 (home-page "https://github.com/jalan/pdftotext")
5822 (synopsis "Simple PDF text extraction")
5823 (description "Pdftotext is a Python library of PDF text extraction.")
5824 (license license:expat)))
5825
5826 (define-public python-pluginbase
5827 (package
5828 (name "python-pluginbase")
5829 (version "1.0.1")
5830 (source
5831 (origin
5832 (method url-fetch)
5833 (uri (pypi-uri "pluginbase" version))
5834 (sha256
5835 (base32
5836 "11z2vvbp13828y0x3w39f29p9r9xcix7h7c4fff2w8yfiylk6v7z"))))
5837 (build-system python-build-system)
5838 (arguments
5839 `(#:phases (modify-phases %standard-phases
5840 (replace 'check
5841 (lambda* (#:key tests? #:allow-other-keys)
5842 (when tests?
5843 (invoke "make" "test")))))))
5844 (native-inputs `(("python-pytest" ,python-pytest)))
5845 (home-page "https://github.com/mitsuhiko/pluginbase")
5846 (synopsis "Simple but flexible plugin system for Python")
5847 (description "PluginBase is a library useful in the development of
5848 flexible plugin systems in Python.")
5849 (license license:bsd-3)))
5850
5851 (define-public python-node-semver
5852 (package
5853 (name "python-node-semver")
5854 (version "0.8.1")
5855 (source
5856 (origin
5857 (method url-fetch)
5858 (uri (pypi-uri "node-semver" version))
5859 (sha256
5860 (base32
5861 "000ypfns5x72b41w5f9pk6k3jnr35scliqfbvmilyvv0178005i8"))))
5862 (build-system python-build-system)
5863 (native-inputs
5864 `(("python-pytest" ,python-pytest)))
5865 (home-page "https://github.com/podhmo/python-node-semver")
5866 (synopsis "Python port of node-semver")
5867 (description "This module provides a Python version of node-semver, a
5868 semantic version parser for Node.js.")
5869 (license license:expat)))
5870
5871 (define-public python-patch-ng
5872 (package
5873 (name "python-patch-ng")
5874 (version "1.17.4")
5875 (source
5876 (origin
5877 (method git-fetch) ;no tests in PyPI archive
5878 (uri (git-reference
5879 (url "https://github.com/conan-io/python-patch-ng")
5880 (commit version)))
5881 (file-name (git-file-name name version))
5882 (sha256
5883 (base32
5884 "0qxn4ss2s54qy87xrpcybz26kp2fwlaq41x4k9jcmp6d7p0w569m"))))
5885 (build-system python-build-system)
5886 (arguments
5887 `(#:phases (modify-phases %standard-phases
5888 (replace 'check
5889 (lambda* (#:key tests? #:allow-other-keys)
5890 (when tests?
5891 (invoke "tests/run_tests.py" "-v")))))))
5892 (home-page "https://github.com/conan-io/python-patch-ng")
5893 (synopsis "Python library to parse and apply unified diffs")
5894 (description "Patch NG (New Generation) is a command and Python library to
5895 parse and apply unified diffs. It has features such as:
5896 @itemize
5897 @item automatic correction of common patch formatting corruption
5898 @item patch format detection (SVN, Hg, Git)
5899 @item nice diffstat histogram.
5900 @end itemize")
5901 (license license:expat)))
5902
5903 (define-public python-pyparsing
5904 (package
5905 (name "python-pyparsing")
5906 (version "2.4.6")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "pyparsing" version))
5911 (sha256
5912 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5913 (build-system python-build-system)
5914 (outputs '("out" "doc"))
5915 (arguments
5916 `(#:tests? #f ; no test target
5917 #:phases
5918 (modify-phases %standard-phases
5919 (add-after 'install 'install-doc
5920 (lambda* (#:key outputs #:allow-other-keys)
5921 (let* ((doc (string-append (assoc-ref outputs "doc")
5922 "/share/doc/" ,name "-" ,version))
5923 (html-doc (string-append doc "/html"))
5924 (examples (string-append doc "/examples")))
5925 (mkdir-p html-doc)
5926 (mkdir-p examples)
5927 (for-each
5928 (lambda (dir tgt)
5929 (map (lambda (file)
5930 (install-file file tgt))
5931 (find-files dir ".*")))
5932 (list "docs" "htmldoc" "examples")
5933 (list doc html-doc examples))
5934 #t))))))
5935 (home-page "https://github.com/pyparsing/pyparsing")
5936 (synopsis "Python parsing class library")
5937 (description
5938 "The pyparsing module is an alternative approach to creating and
5939 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5940 of regular expressions. The pyparsing module provides a library of classes
5941 that client code uses to construct the grammar directly in Python code.")
5942 (license license:expat)))
5943
5944 (define-public python2-pyparsing
5945 (package-with-python2 python-pyparsing))
5946
5947 (define-public python-pyparsing-2.4.7
5948 (package
5949 (inherit python-pyparsing)
5950 (version "2.4.7")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "pyparsing" version))
5955 (sha256
5956 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5957
5958 (define-public python-numpydoc
5959 (package
5960 (name "python-numpydoc")
5961 (version "0.8.0")
5962 (source
5963 (origin
5964 (method url-fetch)
5965 (uri (pypi-uri "numpydoc" version))
5966 (sha256
5967 (base32
5968 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5969 (build-system python-build-system)
5970 (propagated-inputs
5971 `(("python-sphinx" ,python-sphinx)))
5972 (native-inputs
5973 `(("python-nose" ,python-nose)))
5974 (home-page "https://pypi.org/project/numpydoc/")
5975 (synopsis
5976 "Numpy's Sphinx extensions")
5977 (description
5978 "Sphinx extension to support docstrings in Numpy format.")
5979 (license license:bsd-2)
5980 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5981
5982 (define-public python2-numpydoc
5983 (let ((base (package-with-python2
5984 (strip-python2-variant python-numpydoc))))
5985 (package/inherit base
5986 (propagated-inputs
5987 `(("python2-jinja2" ,python2-jinja2)
5988 ,@(package-propagated-inputs base))))))
5989
5990 (define-public python-numexpr
5991 (package
5992 (name "python-numexpr")
5993 (version "2.7.3")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "numexpr" version))
5998 (sha256
5999 (base32
6000 "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
6001 (build-system python-build-system)
6002 (arguments `(#:tests? #f)) ; no tests included
6003 (propagated-inputs
6004 `(("python-numpy" ,python-numpy)))
6005 (home-page "https://github.com/pydata/numexpr")
6006 (synopsis "Fast numerical expression evaluator for NumPy")
6007 (description
6008 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
6009 expressions that operate on arrays are accelerated and use less memory than
6010 doing the same calculation in Python. In addition, its multi-threaded
6011 capabilities can make use of all your cores, which may accelerate
6012 computations, most specially if they are not memory-bounded (e.g. those using
6013 transcendental functions).")
6014 (license license:expat)))
6015
6016 (define-public python2-numexpr
6017 (package-with-python2 python-numexpr))
6018
6019 (define-public python-cycler
6020 (package
6021 (name "python-cycler")
6022 (version "0.10.0")
6023 (source (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "cycler" version))
6026 (sha256
6027 (base32
6028 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
6029 (build-system python-build-system)
6030 (arguments
6031 ;; XXX: The current version requires 'coveralls' which we don't have.
6032 ;; Enable this for the next release which uses 'python-pytest'.
6033 '(#:tests? #f))
6034 (propagated-inputs
6035 `(("python-six" ,python-six)))
6036 (home-page "https://matplotlib.org/cycler/")
6037 (synopsis "Composable keyword argument iterator")
6038 (description
6039 "When using @code{matplotlib} and plotting more than one line, it is
6040 common to want to be able to want to be able to cycle over one or more artist
6041 styles; but the plotting logic can quickly become involved.
6042 To address this and enable easy cycling over arbitrary @code{kwargs}, the
6043 @code{Cycler} class was developed.")
6044 (license license:bsd-3)))
6045
6046 (define-public python2-cycler
6047 (package-with-python2 python-cycler))
6048
6049 (define-public python-colorspacious
6050 (package
6051 (name "python-colorspacious")
6052 (version "1.1.2")
6053 (source
6054 (origin
6055 (method git-fetch)
6056 (uri (git-reference
6057 (url "https://github.com/njsmith/colorspacious")
6058 (commit (string-append "v" version))))
6059 (file-name (git-file-name name version))
6060 (sha256
6061 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
6062 (build-system python-build-system)
6063 (propagated-inputs
6064 `(("python-numpy" ,python-numpy)))
6065 (native-inputs
6066 `(("python-nose" ,python-nose)))
6067 (arguments
6068 `(#:phases
6069 (modify-phases %standard-phases
6070 (replace 'check
6071 (lambda _
6072 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
6073 (home-page "https://github.com/njsmith/colorspacious")
6074 (synopsis "Python library for colorspace conversions")
6075 (description "@code{colorspacious} is a Python library that lets you
6076 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
6077 (license license:expat)))
6078
6079 (define-public python2-colorspacious
6080 (package-with-python2 python-colorspacious))
6081
6082 (define-public python-proto-matcher
6083 (package
6084 (name "python-proto-matcher")
6085 (version "0.0.3")
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "proto_matcher" version))
6090 (sha256
6091 (base32 "1644x0hrl398ji3281n44ymfgc3cspzfagjckhqjn4nja5nlikxg"))))
6092 (build-system python-build-system)
6093 (arguments
6094 `(#:tests? #f)) ;no test suite
6095 (propagated-inputs
6096 `(("python-protobuf" ,python-protobuf)
6097 ("python-pyhamcrest" ,python-pyhamcrest)))
6098 (home-page "https://github.com/dayfine/proto-matcher")
6099 (synopsis "PyHamcrest test matchers for protocol buffers")
6100 (description "This package provides the following PyHamcrest test
6101 matchers, that enable matching a protocol buffer message:
6102 @table @code
6103 @item equals_proto
6104 Test the argument equals the given protobuf message.
6105 @item approximately
6106 Test the argument equals the given protobuf message, while comparing any float
6107 field using approximation.
6108 @item ignoring_field_paths
6109 Test the argument equals the given protobuf message, while ignoring those
6110 fields specified in the field paths.
6111 @item ignoring_repeated_field_ordering
6112 Test the argument equals the given protobuf message, ignoring the ordering of
6113 any repeated field.
6114 @item partially
6115 Test the argument partially equals the given protobuf message, i.e. if a field
6116 is in the argument but not in the expected message, it's ignored in the
6117 comparison.
6118 @end table")
6119 (license license:asl2.0)))
6120
6121 (define-public python-matplotlib
6122 (package
6123 (name "python-matplotlib")
6124 (version "3.4.3")
6125 (source
6126 (origin
6127 (method url-fetch)
6128 (uri (pypi-uri "matplotlib" version))
6129 (sha256
6130 (base32 "06032j0ccjxldx4z9kf97qps2g36mfgvy1nap3b9n75kzmnm4kzw"))))
6131 (build-system python-build-system)
6132 (propagated-inputs ; the following packages are all needed at run time
6133 `(("python-cycler" ,python-cycler)
6134 ("python-kiwisolver" ,python-kiwisolver)
6135 ("python-pyparsing" ,python-pyparsing)
6136 ("python-pygobject" ,python-pygobject)
6137 ("python-certifi" ,python-certifi)
6138 ("gobject-introspection" ,gobject-introspection)
6139 ("python-tkinter" ,python "tk")
6140 ("python-dateutil" ,python-dateutil)
6141 ("python-numpy" ,python-numpy)
6142 ("python-pillow" ,python-pillow)
6143 ("python-pytz" ,python-pytz)
6144 ("python-six" ,python-six)
6145 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
6146 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
6147 ;; object. For this reason we need to import both libraries.
6148 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
6149 ("python-pycairo" ,python-pycairo)
6150 ("python-cairocffi" ,python-cairocffi)))
6151 (inputs
6152 `(("libpng" ,libpng)
6153 ("freetype" ,freetype)
6154 ("qhull" ,qhull)
6155 ("cairo" ,cairo)
6156 ("glib" ,glib)
6157 ;; FIXME: Add backends when available.
6158 ;("python-wxpython" ,python-wxpython)
6159 ("tcl" ,tcl)
6160 ("tk" ,tk)))
6161 (native-inputs
6162 `(("pkg-config" ,pkg-config)
6163 ("python-pytest" ,python-pytest)
6164 ("python-mock" ,python-mock)
6165 ("python-wheel" ,python-wheel)
6166 ("unzip" ,unzip)
6167 ("jquery-ui"
6168 ,(origin
6169 (method url-fetch)
6170 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
6171 (sha256
6172 (base32
6173 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
6174 (arguments
6175 `(#:phases
6176 (modify-phases %standard-phases
6177 ;; XXX We disable all image comparison tests because we're using a
6178 ;; newer version of FreeType than matplotlib expects. This leads to
6179 ;; minor differences throughout the tests.
6180 (add-after 'unpack 'fix-and-disable-failing-tests
6181 (lambda _
6182 (substitute* (append (find-files "lib/matplotlib/tests/"
6183 "test_.*\\.py$")
6184 (find-files "lib/mpl_toolkits/tests"
6185 "test_.*\\.py$"))
6186 (("^from matplotlib" match)
6187 (string-append "import pytest\n" match))
6188 (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
6189 indent)
6190 (string-append indent
6191 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
6192 match)))
6193 (substitute* "lib/matplotlib/tests/test_animation.py"
6194 (("/bin/sh") (which "sh")))
6195 (for-each delete-file
6196 ;; test_normal_axes, test_get_tightbbox_polar
6197 '("lib/matplotlib/tests/test_axes.py"
6198 "lib/matplotlib/tests/test_polar.py"
6199 ;; We don't use the webagg backend and this test
6200 ;; forces it.
6201 "lib/matplotlib/tests/test_backend_webagg.py"
6202 ;; test_outward_ticks
6203 "lib/matplotlib/tests/test_tightlayout.py"
6204 ;; test_hidden_axes fails with minor extent
6205 ;; differences, possibly due to the use of a
6206 ;; different version of FreeType.
6207 "lib/matplotlib/tests/test_constrainedlayout.py"
6208 ;; Fontconfig returns no fonts.
6209 "lib/matplotlib/tests/test_font_manager.py"))
6210 #t))
6211 (add-before 'install 'install-jquery-ui
6212 (lambda* (#:key outputs inputs #:allow-other-keys)
6213 (let* ((python-version (python-version
6214 (assoc-ref inputs "python")))
6215 (dir
6216 (string-append (assoc-ref outputs "out")
6217 "/lib/python" python-version
6218 "/site-packages"
6219 "/matplotlib/backends/web_backend/")))
6220 (mkdir-p dir)
6221 (invoke "unzip"
6222 (assoc-ref inputs "jquery-ui")
6223 "-d" dir))
6224 #t))
6225 (replace 'check
6226 (lambda* (#:key outputs inputs #:allow-other-keys)
6227 (add-installed-pythonpath inputs outputs)
6228 (invoke "python" "tests.py" "-v"
6229 "-m" "not network and not webagg")))
6230 (add-before 'build 'configure-environment
6231 (lambda* (#:key outputs inputs #:allow-other-keys)
6232 (let ((cairo (assoc-ref inputs "cairo")))
6233 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
6234 ;; has not effect.
6235 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
6236 (setenv "HOME" (getcwd))
6237 ;; Fix rounding errors when using the x87 FPU.
6238 (when (string-prefix? "i686" ,(%current-system))
6239 (setenv "CFLAGS" "-ffloat-store"))
6240 (call-with-output-file "setup.cfg"
6241 (lambda (port)
6242 (format port "[libs]~%
6243 system_freetype = true
6244 system_qhull = true
6245 [directories]~%
6246 basedirlist = ~a,~a~%
6247 [packages]~%
6248 tests = True~%"
6249 (assoc-ref inputs "tcl")
6250 (assoc-ref inputs "tk")))))
6251 #t)))))
6252 (home-page "https://matplotlib.org/")
6253 (synopsis "2D plotting library for Python")
6254 (description
6255 "Matplotlib is a Python 2D plotting library which produces publication
6256 quality figures in a variety of hardcopy formats and interactive environments
6257 across platforms. Matplotlib can be used in Python scripts, the python and
6258 ipython shell, web application servers, and six graphical user interface
6259 toolkits.")
6260 (license license:psfl)
6261 (properties `((python2-variant . ,(delay python2-matplotlib))))))
6262
6263 (define-public python2-matplotlib
6264 (let ((matplotlib (package-with-python2
6265 (strip-python2-variant python-matplotlib))))
6266 (package (inherit matplotlib)
6267 (version "2.2.4")
6268 (source
6269 (origin
6270 (method url-fetch)
6271 (uri (pypi-uri "matplotlib" version))
6272 (sha256
6273 (base32
6274 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
6275 (arguments
6276 (substitute-keyword-arguments (package-arguments matplotlib)
6277 ((#:phases phases)
6278 `(modify-phases ,phases
6279 (replace 'install-jquery-ui
6280 (lambda* (#:key outputs inputs #:allow-other-keys)
6281 (let ((dir (string-append (assoc-ref outputs "out")
6282 "/lib/python2.7/site-packages/"
6283 "matplotlib/backends/web_backend/")))
6284 (mkdir-p dir)
6285 (invoke "unzip"
6286 (assoc-ref inputs "jquery-ui")
6287 "-d" dir))
6288 #t))
6289 (delete 'fix-and-disable-failing-tests)
6290 (delete 'check))))) ; These tests weren't run the the past.
6291 ;; Make sure to use special packages for Python 2 instead
6292 ;; of those automatically rewritten by package-with-python2.
6293 (propagated-inputs
6294 `(("python2-pycairo" ,python2-pycairo)
6295 ("python2-backports-functools-lru-cache"
6296 ,python2-backports-functools-lru-cache)
6297 ("python2-functools32" ,python2-functools32)
6298 ("python2-pygobject-2" ,python2-pygobject-2)
6299 ("python2-subprocess32" ,python2-subprocess32)
6300 ("python2-tkinter" ,python-2 "tk")
6301 ,@(fold alist-delete (package-propagated-inputs matplotlib)
6302 '("python-cairocffi"
6303 "python-pycairo"
6304 "python-pygobject"
6305 "python-tkinter")))))))
6306
6307 (define-public python-matplotlib-documentation
6308 (package
6309 (name "python-matplotlib-documentation")
6310 (version (package-version python-matplotlib))
6311 (source (package-source python-matplotlib))
6312 (build-system python-build-system)
6313 (native-inputs
6314 `(("python-matplotlib" ,python-matplotlib)
6315 ("python-colorspacious" ,python-colorspacious)
6316 ("python-sphinx" ,python-sphinx)
6317 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
6318 ("python-sphinx-gallery" ,python-sphinx-gallery)
6319 ("python-numpydoc" ,python-numpydoc)
6320 ("python-ipython" ,python-ipython)
6321 ("python-ipykernel" ,python-ipykernel)
6322 ("python-mock" ,python-mock)
6323 ("graphviz" ,graphviz)
6324 ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
6325 texlive-latex-amsmath
6326 texlive-latex-enumitem
6327 texlive-latex-expdlist
6328 texlive-latex-geometry
6329 texlive-latex-preview
6330 texlive-latex-type1cm
6331 texlive-latex-ucs
6332
6333 texlive-pdftex
6334
6335 texlive-fonts-ec
6336 texlive-times
6337 texlive-txfonts)))
6338 ("texinfo" ,texinfo)
6339 ,@(package-native-inputs python-matplotlib)))
6340 (arguments
6341 `(#:tests? #f ; we're only generating documentation
6342 #:phases
6343 (modify-phases %standard-phases
6344 ;; The tests in python-matplotlib are run after the install phase, so
6345 ;; we need to delete the extra phase here.
6346 (delete 'check)
6347 (replace 'build
6348 (lambda _
6349 (chdir "doc")
6350 (setenv "PYTHONPATH" "../examples/units")
6351 (substitute* "conf.py"
6352 ;; Don't use git.
6353 (("^SHA = check_output.*")
6354 (string-append "SHA = \"" ,version "\"\n"))
6355 ;; Don't fetch intersphinx files from the Internet
6356 (("^explicit_order_folders" m)
6357 (string-append "intersphinx_mapping = {}\n" m))
6358 (("'sphinx.ext.intersphinx',") "")
6359 ;; Disable URL embedding which requires internet access.
6360 (("'https://docs.scipy.org/doc/numpy'") "None")
6361 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
6362 (invoke "make"
6363 "SPHINXBUILD=sphinx-build"
6364 "SPHINXOPTS=" ; don't abort on warnings
6365 "html" "texinfo")))
6366 (replace 'install
6367 (lambda* (#:key inputs outputs #:allow-other-keys)
6368 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6369 (doc (string-append data "/doc/python-matplotlib-" ,version))
6370 (info (string-append data "/info"))
6371 (html (string-append doc "/html")))
6372 (mkdir-p html)
6373 (mkdir-p info)
6374 (copy-recursively "build/html" html)
6375 (symlink (string-append html "/_images")
6376 (string-append info "/matplotlib-figures"))
6377 (with-directory-excursion "build/texinfo"
6378 (substitute* "matplotlib.texi"
6379 (("@image\\{([^,]*)" all file)
6380 (string-append "@image{matplotlib-figures/" file)))
6381 (symlink (string-append html "/_images")
6382 "./matplotlib-figures")
6383 (invoke "makeinfo" "--no-split"
6384 "-o" "matplotlib.info" "matplotlib.texi"))
6385 (install-file "build/texinfo/matplotlib.info" info)))))))
6386 (home-page (package-home-page python-matplotlib))
6387 (synopsis "Documentation for the python-matplotlib package")
6388 (description (package-description python-matplotlib))
6389 (license (package-license python-matplotlib))))
6390
6391 (define-public python-matplotlib-inline
6392 (package
6393 (name "python-matplotlib-inline")
6394 (version "0.1.3")
6395 (source
6396 (origin
6397 (method url-fetch)
6398 (uri (pypi-uri "matplotlib-inline" version))
6399 (sha256
6400 (base32 "1vilzwj3xp00mxprmmn1hlafm3p23vn56s46kx3ra4qd5signjx0"))))
6401 (build-system python-build-system)
6402 (propagated-inputs
6403 `(("python-matplotlib" ,python-matplotlib)
6404 ("python-traitlets" ,python-traitlets)))
6405 (arguments
6406 ;; Tests disabled because of a circular dependency with ipython.
6407 `(#:tests? #f))
6408 (home-page "https://github.com/ipython/matplotlib-inline")
6409 (synopsis "Inline Matplotlib backend for Jupyter")
6410 (description
6411 "This package provides a Matplotlib inline back-end for IPython and
6412 Jupyter.")
6413 (license license:bsd-3)))
6414
6415 (define-public python-matplotlib-venn
6416 (package
6417 (name "python-matplotlib-venn")
6418 (version "0.11.5")
6419 (source
6420 (origin
6421 (method url-fetch)
6422 (uri (pypi-uri "matplotlib-venn" version ".zip"))
6423 (sha256
6424 (base32
6425 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
6426 (build-system python-build-system)
6427 (arguments '(#:tests? #f)) ; tests are not included
6428 (propagated-inputs
6429 `(("python-matplotlib" ,python-matplotlib)
6430 ("python-numpy" ,python-numpy)
6431 ("python-scipy" ,python-scipy)))
6432 (native-inputs
6433 `(("unzip" ,unzip)))
6434 (home-page "https://github.com/konstantint/matplotlib-venn")
6435 (synopsis "Plot area-proportional Venn diagrams")
6436 (description
6437 "This package provides tools for plotting area-proportional two- and
6438 three-way Venn diagrams in @code{matplotlib}.")
6439 (license license:expat)))
6440
6441 (define-public python-pysnptools
6442 (package
6443 (name "python-pysnptools")
6444 (version "0.4.11")
6445 (source
6446 (origin
6447 (method url-fetch)
6448 (uri (pypi-uri "pysnptools" version))
6449 (sha256
6450 (base32
6451 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
6452 (build-system python-build-system)
6453 (arguments
6454 `(#:tests? #f ; no test data are included
6455 #:phases
6456 (modify-phases %standard-phases
6457 (replace 'check
6458 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6459 (if tests?
6460 (begin
6461 (add-installed-pythonpath inputs outputs)
6462 (invoke "python3" "pysnptools/test.py"))
6463 #t))))))
6464 (propagated-inputs
6465 `(("python-dill" ,python-dill)
6466 ("python-h5py" ,python-h5py)
6467 ("python-numpy" ,python-numpy)
6468 ("python-pandas" ,python-pandas)
6469 ("python-psutil" ,python-psutil)
6470 ("python-scipy" ,python-scipy)))
6471 (native-inputs
6472 `(("python-cython" ,python-cython)))
6473 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
6474 (synopsis "Library for reading and manipulating genetic data")
6475 (description
6476 "PySnpTools is a library for reading and manipulating genetic data. It
6477 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
6478 those files. It can also efficiently manipulate ranges of integers using set
6479 operators such as union, intersection, and difference.")
6480 (license license:asl2.0)))
6481
6482 (define-public python2-pysnptools
6483 (package-with-python2 python-pysnptools))
6484
6485 (define-public python-pykdtree
6486 (package
6487 (name "python-pykdtree")
6488 (version "1.3.4")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "pykdtree" version))
6493 (sha256
6494 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
6495 (build-system python-build-system)
6496 (native-inputs
6497 `(("python-nose" ,python-nose)))
6498 (propagated-inputs
6499 `(("python-numpy" ,python-numpy)))
6500 (home-page "https://github.com/storpipfugl/pykdtree")
6501 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
6502 (description
6503 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
6504 search in Python.")
6505 (license license:lgpl3+)))
6506
6507 (define-public python-wurlitzer
6508 (package
6509 (name "python-wurlitzer")
6510 (version "2.0.1")
6511 (source
6512 (origin
6513 (method url-fetch)
6514 (uri (pypi-uri "wurlitzer" version))
6515 (sha256
6516 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
6517 (build-system python-build-system)
6518 (arguments
6519 '(#:phases
6520 (modify-phases %standard-phases
6521 (replace 'check
6522 (lambda _
6523 (invoke "pytest" "-vv" "test.py"))))))
6524 (native-inputs
6525 `(("python-mock" ,python-mock)
6526 ("python-pytest" ,python-pytest)))
6527 (home-page "https://github.com/minrk/wurlitzer")
6528 (synopsis "Capture C-level output in context managers")
6529 (description
6530 "This library helps to redirect @code{sys.stdout} to a stream or a file
6531 while executing some piece of code, including C code running within a Python
6532 process.")
6533 (license license:expat)))
6534
6535 (define-public python-socksipy-branch
6536 (package
6537 (name "python-socksipy-branch")
6538 (version "1.01")
6539 (source
6540 (origin
6541 (method url-fetch)
6542 (uri (pypi-uri "SocksiPy-branch" version))
6543 (sha256
6544 (base32
6545 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
6546 (build-system python-build-system)
6547 (arguments
6548 `(#:tests? #f)) ; There are no tests
6549 (home-page "https://code.google.com/archive/p/socksipy-branch/")
6550 (synopsis "Python SOCKS module")
6551 (description
6552 "SocksiPy - A Python SOCKS client module. It provides a
6553 socket-like interface that supports connections to any TCP
6554 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
6555 The original version was developed by Dan Haim, this is a
6556 branch created by Mario Vilas to address some open issues,
6557 as the original project seems to have been abandoned circa 2007.")
6558 (license license:bsd-3)))
6559
6560 (define-public python2-socksipy-branch
6561 (package-with-python2 python-socksipy-branch))
6562
6563 (define-public python-socksipychain
6564 (package
6565 (name "python-socksipychain")
6566 (version "2.1.2")
6567 (source
6568 (origin
6569 (method git-fetch)
6570 (uri (git-reference
6571 (url "https://github.com/pagekite/PySocksipyChain")
6572 (commit (string-append "v" version))))
6573 (file-name (git-file-name name version))
6574 (sha256
6575 (base32
6576 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
6577 (build-system python-build-system)
6578 (arguments
6579 `(#:tests? #f)) ; Tests try to access the network.
6580 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
6581 (synopsis "Python SOCKS module with chained proxies support")
6582 (description
6583 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6584 adds support for arbitrary chaining of proxy servers and various modes of
6585 TLS/SSL encryption. It was developed for use in PageKite, and also includes
6586 a simple netcat replacement with chaining support.")
6587 (license license:bsd-3)))
6588
6589 (define-public python-pycodestyle
6590 (package
6591 (name "python-pycodestyle")
6592 (version "2.7.0")
6593 (source
6594 (origin
6595 (method url-fetch)
6596 (uri (pypi-uri "pycodestyle" version))
6597 (sha256
6598 (base32
6599 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
6600 (build-system python-build-system)
6601 (arguments
6602 `(#:phases
6603 (modify-phases %standard-phases
6604 (replace 'check
6605 (lambda _
6606 (invoke "pytest" "-vv"))))))
6607 (native-inputs
6608 `(("python-pytest" ,python-pytest)))
6609 (home-page "https://pycodestyle.readthedocs.io/")
6610 (synopsis "Python style guide checker")
6611 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6612 Python code against some of the style conventions in
6613 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6614 (license license:expat)))
6615
6616 (define-public python2-pycodestyle
6617 (package-with-python2 python-pycodestyle))
6618
6619 (define-public python-pycodestyle-2.6
6620 (package
6621 (inherit python-pycodestyle)
6622 (version "2.6.0")
6623 (source (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "pycodestyle" version))
6626 (sha256
6627 (base32
6628 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6629
6630 (define-public python-multidict
6631 (package
6632 (name "python-multidict")
6633 (version "4.7.5")
6634 (source
6635 (origin
6636 (method url-fetch)
6637 (uri (pypi-uri "multidict" version))
6638 (sha256
6639 (base32
6640 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6641 (build-system python-build-system)
6642 (arguments
6643 '(#:phases (modify-phases %standard-phases
6644 (replace 'check
6645 (lambda* (#:key tests? #:allow-other-keys)
6646 (if tests?
6647 (invoke "pytest" "-vv")
6648 (format #t "test suite not run~%")))))))
6649 (native-inputs
6650 `(("python-pytest" ,python-pytest)
6651 ("python-pytest-cov" ,python-pytest-cov)))
6652 (home-page "https://github.com/aio-libs/multidict/")
6653 (synopsis "Multidict implementation")
6654 (description "Multidict is dict-like collection of key-value pairs
6655 where key might be occurred more than once in the container.")
6656 (license license:asl2.0)))
6657
6658 (define-public python-orderedmultidict
6659 (package
6660 (name "python-orderedmultidict")
6661 (version "1.0")
6662 (source
6663 (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "orderedmultidict" version))
6666 (sha256
6667 (base32
6668 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6669 (build-system python-build-system)
6670 (arguments
6671 `(#:phases
6672 (modify-phases %standard-phases
6673 (add-after 'unpack 'fix-tests
6674 (lambda _
6675 ;; The package uses nosetest for running the tests.
6676 ;; Adding this initfile allows to run the test suite
6677 ;; without requiring nosetest.
6678 (with-output-to-file "tests/__init__.py" newline)
6679 #t)))))
6680 (propagated-inputs
6681 `(("python-six" ,python-six)))
6682 (native-inputs
6683 `(("python-pycodestyle" ,python-pycodestyle)))
6684 (home-page "https://github.com/gruns/orderedmultidict")
6685 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6686 (description "This package contains a library for ordered multivalue
6687 dictionaries. A multivalue dictionary is a dictionary that can store
6688 multiple values for the same key. An ordered multivalue dictionary is a
6689 multivalue dictionary that retains the order of insertions and deletions.")
6690 (license license:unlicense)))
6691
6692 (define-public python2-orderedmultidict
6693 (package-with-python2 python-orderedmultidict))
6694
6695 (define-public python-autopep8
6696 (package
6697 (name "python-autopep8")
6698 (version "1.5.3")
6699 (source
6700 (origin
6701 (method url-fetch)
6702 (uri (pypi-uri "autopep8" version))
6703 (sha256
6704 (base32
6705 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6706 (build-system python-build-system)
6707 (propagated-inputs
6708 `(("python-pycodestyle" ,python-pycodestyle)
6709 ("python-toml" ,python-toml)))
6710 (home-page "https://github.com/hhatto/autopep8")
6711 (synopsis "Format Python code according to the PEP 8 style guide")
6712 (description
6713 "@code{autopep8} automatically formats Python code to conform to
6714 the PEP 8 style guide. It uses the pycodestyle utility to determine
6715 what parts of the code needs to be formatted. @code{autopep8} is
6716 capable of fixing most of the formatting issues that can be reported
6717 by pycodestyle.")
6718 (license (license:non-copyleft
6719 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6720
6721 (define-public python2-autopep8
6722 (package-with-python2 python-autopep8))
6723
6724 (define-public python-distlib
6725 (package
6726 (name "python-distlib")
6727 (version "0.3.1")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (pypi-uri "distlib" version ".zip"))
6732 (sha256
6733 (base32
6734 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
6735 (build-system python-build-system)
6736 (arguments
6737 `(#:phases
6738 (modify-phases %standard-phases
6739 (add-before 'build 'no-/bin/sh
6740 (lambda _
6741 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6742 (("/bin/sh") (which "sh")))
6743 #t))
6744 (add-before 'check 'prepare-test-env
6745 (lambda _
6746 (setenv "HOME" "/tmp")
6747 ;; NOTE: Any value works, the variable just has to be present.
6748 (setenv "SKIP_ONLINE" "1")
6749 #t)))))
6750 (native-inputs `(("unzip" ,unzip)))
6751 (home-page "https://bitbucket.org/pypa/distlib")
6752 (synopsis "Distribution utilities")
6753 (description "Distlib is a library which implements low-level functions that
6754 relate to packaging and distribution of Python software. It is intended to be
6755 used as the basis for third-party packaging tools.")
6756 (license license:psfl)))
6757
6758 (define-public python-distutils-extra
6759 (package
6760 (name "python-distutils-extra")
6761 (version "2.38")
6762 (source
6763 (origin
6764 (method url-fetch)
6765 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6766 version "/+download/python-distutils-extra-"
6767 version ".tar.gz"))
6768 (sha256
6769 (base32
6770 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6771 (build-system python-build-system)
6772 (home-page "https://launchpad.net/python-distutils-extra/")
6773 (synopsis "Enhancements to Python's distutils")
6774 (description
6775 "The python-distutils-extra module enables you to easily integrate
6776 gettext support, themed icons, and scrollkeeper-based documentation into
6777 Python's distutils.")
6778 (license license:gpl2)))
6779
6780 (define-public python2-distutils-extra
6781 (package-with-python2 python-distutils-extra))
6782
6783 (define-public python2-elib.intl
6784 (package
6785 (name "python2-elib.intl")
6786 (version "0.0.3")
6787 (source
6788 (origin
6789 ;; This project doesn't tag releases or publish tarballs, so we take
6790 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6791 (method git-fetch)
6792 (uri (git-reference
6793 (url "https://github.com/dieterv/elib.intl")
6794 (commit "d09997cfef")))
6795 (file-name (string-append name "-" version "-checkout"))
6796 (sha256
6797 (base32
6798 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6799 (build-system python-build-system)
6800 (arguments
6801 ;; incompatible with Python 3 (exception syntax)
6802 `(#:python ,python-2
6803 #:tests? #f))
6804 (home-page "https://github.com/dieterv/elib.intl")
6805 (synopsis "Enhanced internationalization for Python")
6806 (description
6807 "The elib.intl module provides enhanced internationalization (I18N)
6808 services for your Python modules and applications.")
6809 (license license:lgpl3+)))
6810
6811 (define-public python-olefile
6812 (package
6813 (name "python-olefile")
6814 (version "0.46")
6815 (source
6816 (origin
6817 (method url-fetch)
6818 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6819 "download/v" version "/olefile-" version ".tar.gz"))
6820 (file-name (string-append name "-" version ".tar.gz"))
6821 (sha256
6822 (base32
6823 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6824 (build-system python-build-system)
6825 (home-page "https://www.decalage.info/python/olefileio")
6826 (synopsis "Read and write Microsoft OLE2 files.")
6827 (description
6828 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6829 Storage or Compound Document, Microsoft Office). It is an improved version of
6830 the OleFileIO module from PIL, the Python Image Library.")
6831 (license license:bsd-3)))
6832
6833 (define-public python2-olefile
6834 (package-with-python2 python-olefile))
6835
6836 (define-public python-pikepdf
6837 (package
6838 (name "python-pikepdf")
6839 (version "2.16.1")
6840 (source
6841 (origin
6842 (method url-fetch)
6843 (uri (pypi-uri "pikepdf" version))
6844 (sha256
6845 (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
6846 (build-system python-build-system)
6847 (arguments
6848 `(#:tests? #false)) ;require python-xmp-toolkit
6849 (native-inputs
6850 `(("pybind11" ,pybind11)
6851 ("python-setuptools" ,python-setuptools)
6852 ("python-setuptools-scm" ,python-setuptools-scm)
6853 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6854 ("python-toml" ,python-toml)
6855 ("python-wheel" ,python-wheel)))
6856 (inputs
6857 `(("qpdf" ,qpdf)))
6858 (propagated-inputs
6859 `(("python-lxml" ,python-lxml)
6860 ("python-pillow" ,python-pillow)))
6861 (home-page "https://github.com/pikepdf/pikepdf")
6862 (synopsis "Read and write PDFs with Python")
6863 (description
6864 "pikepdf is a Python library for reading and writing PDF files.")
6865 (license license:mpl2.0)))
6866
6867 (define-public python-pillow
6868 (package
6869 (name "python-pillow")
6870 (version "8.1.1")
6871 (source
6872 (origin
6873 (method url-fetch)
6874 (uri (pypi-uri "Pillow" version))
6875 (sha256
6876 (base32
6877 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6878 (build-system python-build-system)
6879 (native-inputs
6880 `(("python-pytest" ,python-pytest)))
6881 (inputs
6882 `(("freetype" ,freetype)
6883 ("lcms" ,lcms)
6884 ("libjpeg" ,libjpeg-turbo)
6885 ("libtiff" ,libtiff)
6886 ("libwebp" ,libwebp)
6887 ("openjpeg" ,openjpeg)
6888 ("zlib" ,zlib)))
6889 (propagated-inputs
6890 `(("python-olefile" ,python-olefile)))
6891 (arguments
6892 `(#:phases
6893 (modify-phases %standard-phases
6894 (add-after 'unpack 'patch-ldconfig
6895 (lambda _
6896 (substitute* "setup.py"
6897 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6898 (replace 'check
6899 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6900 (if tests?
6901 (begin
6902 (setenv "HOME" (getcwd))
6903 ;; Make installed package available for running the tests.
6904 (add-installed-pythonpath inputs outputs)
6905 (invoke "python" "selftest.py" "--installed")
6906 (invoke "python" "-m" "pytest" "-vv"))
6907 #t))))))
6908 (home-page "https://python-pillow.org")
6909 (synopsis "Fork of the Python Imaging Library")
6910 (description
6911 "The Python Imaging Library adds image processing capabilities to your
6912 Python interpreter. This library provides extensive file format support, an
6913 efficient internal representation, and fairly powerful image processing
6914 capabilities. The core image library is designed for fast access to data
6915 stored in a few basic pixel formats. It should provide a solid foundation for
6916 a general image processing tool.")
6917 (properties `((python2-variant . ,(delay python2-pillow))))
6918 (license (license:x11-style
6919 "http://www.pythonware.com/products/pil/license.htm"
6920 "The PIL Software License"))))
6921
6922 (define-public python2-pillow
6923 (package-with-python2
6924 (package
6925 (inherit (strip-python2-variant python-pillow))
6926 ;; Version 6 is the last series with Python 2 support.
6927 (version "6.2.2")
6928 (source
6929 (origin
6930 (method url-fetch)
6931 (uri (pypi-uri "Pillow" version))
6932 (sha256
6933 (base32
6934 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
6935 (arguments
6936 (substitute-keyword-arguments (package-arguments python-pillow)
6937 ;; FIXME: One of the tests is failing.
6938 ((#:tests? _ #f) #f))))))
6939
6940 (define-public python-pillow-2.9
6941 (package
6942 (inherit python-pillow)
6943 (version "2.9.0")
6944 (source
6945 (origin
6946 (method url-fetch)
6947 (uri (pypi-uri "Pillow" version))
6948 (sha256
6949 (base32
6950 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6951 (arguments
6952 (substitute-keyword-arguments (package-arguments python-pillow)
6953 ((#:tests? _ #f) #f)))
6954 (properties '((hidden? #t)))))
6955
6956 (define-public python-pillow-simd
6957 (package
6958 (inherit python-pillow)
6959 (name "python-pillow-simd")
6960 (version "7.1.2")
6961 ;; The PyPI tarball does not include test files.
6962 (source
6963 (origin
6964 (method git-fetch)
6965 (uri (git-reference
6966 (url "https://github.com/uploadcare/pillow-simd")
6967 (commit version)))
6968 (file-name (git-file-name name version))
6969 (sha256
6970 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6971 (arguments
6972 (substitute-keyword-arguments
6973 (package-arguments python-pillow)
6974 ((#:phases phases)
6975 `(modify-phases ,phases
6976 (add-after 'unpack 'make-tests-writable
6977 (lambda _
6978 (for-each make-file-writable (find-files "Tests"))
6979 #t))))))
6980 (inputs
6981 `(("libraqm" ,libraqm)
6982 ("libimagequant" ,libimagequant)
6983 ,@(package-inputs python-pillow)))
6984 (home-page "https://github.com/uploadcare/pillow-simd")
6985 (synopsis "Fork of the Python Imaging Library (Pillow)")
6986 (description "This package is a fork of Pillow which adds support for SIMD
6987 parallelism.")))
6988
6989 (define-public python-imagecodecs
6990 (package
6991 (name "python-imagecodecs")
6992 (version "2021.3.31")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "imagecodecs" version))
6997 (sha256
6998 (base32
6999 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
7000 (modules '((guix build utils)))
7001 (snippet
7002 '(begin
7003 ;; Unbundle 3rd party modules.
7004 (delete-file-recursively "3rdparty")
7005 ;; Delete pre-generated Cython files.
7006 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
7007 #t))))
7008 (build-system python-build-system)
7009 (arguments
7010 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
7011 #:phases
7012 (modify-phases %standard-phases
7013 (add-after 'unpack 'create-configuration
7014 (lambda* (#:key inputs #:allow-other-keys)
7015 ;; By default everything is enabled. We can selectively disable
7016 ;; extensions (and thus dependencies) by deleting them from the
7017 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
7018 (call-with-output-file "imagecodecs_distributor_setup.py"
7019 (lambda (port)
7020 (format port "\
7021 def customize_build(EXTENSIONS, OPTIONS):
7022 del EXTENSIONS['aec']
7023 del EXTENSIONS['avif']
7024 del EXTENSIONS['bitshuffle']
7025 del EXTENSIONS['deflate']
7026 del EXTENSIONS['jpeg2k']
7027 del EXTENSIONS['jpeg12']
7028 del EXTENSIONS['jpegls']
7029 del EXTENSIONS['jpegxl']
7030 del EXTENSIONS['jpegxr']
7031 del EXTENSIONS['lerc']
7032 del EXTENSIONS['ljpeg']
7033 del EXTENSIONS['lzf']
7034 del EXTENSIONS['zfp']
7035 del EXTENSIONS['zopfli']
7036 OPTIONS['cythonize']
7037 ")))
7038 #t)))))
7039 (inputs
7040 `(("c-blosc" ,c-blosc)
7041 ("giflib" ,giflib)
7042 ("brotli" ,brotli)
7043 ("libjpeg-turbo" ,libjpeg-turbo)
7044 ("libpng" ,libpng)
7045 ("libtiff" ,libtiff)
7046 ("libwebp" ,libwebp)
7047 ("lz4" ,lz4)
7048 ("snappy" ,snappy)
7049 ("xz" ,xz)
7050 ("zlib" ,zlib)
7051 ("zstd" ,zstd "lib")))
7052 (propagated-inputs
7053 `(("python-numpy" ,python-numpy)))
7054 (native-inputs
7055 ;; For building.
7056 `(("python-cython" ,python-cython)
7057 ;; For testing. Incomplete.
7058 ;("python-numcodecs" ,python-numcodecs)
7059 ;("python-zarr" ,python-zarr)
7060 ;("python-pytest" ,python-pytest)
7061 ))
7062 (home-page "https://www.lfd.uci.edu/~gohlke/")
7063 (synopsis
7064 "Image transformation, compression, and decompression codecs")
7065 (description
7066 "Imagecodecs is a Python library that provides block-oriented, in-memory
7067 buffer transformation, compression, and decompression functions for use in the
7068 tifffile, czifile, and other scientific image input/output modules.")
7069 (license license:bsd-3)))
7070
7071 (define-public python-roifile
7072 (package
7073 (name "python-roifile")
7074 (version "2020.11.28")
7075 (source
7076 (origin
7077 (method url-fetch)
7078 (uri (pypi-uri "roifile" version))
7079 (sha256
7080 (base32
7081 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
7082 (build-system python-build-system)
7083 (arguments `(#:tests? #f)) ; there are none
7084 (propagated-inputs
7085 `(("python-numpy" ,python-numpy)))
7086 (home-page "https://www.lfd.uci.edu/~gohlke/")
7087 (synopsis "Read and write ImageJ ROI format")
7088 (description "Roifile is a Python library to read, write, create, and plot
7089 ImageJ ROIs, an undocumented and ImageJ application specific format to store
7090 regions of interest, geometric shapes, paths, text, etc for image overlays.")
7091 (license license:bsd-3)))
7092
7093 (define-public python-tifffile
7094 (package
7095 (name "python-tifffile")
7096 (version "2021.4.8")
7097 (source
7098 (origin
7099 (method url-fetch)
7100 (uri (pypi-uri "tifffile" version))
7101 (sha256
7102 (base32
7103 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
7104 (build-system python-build-system)
7105 ;; Tests require lfdfiles, which depends on tifffile
7106 (arguments `(#:tests? #f))
7107 (propagated-inputs
7108 `(("python-numpy" ,python-numpy)
7109 ("python-imagecodecs" ,python-imagecodecs)))
7110 (home-page "https://www.lfd.uci.edu/~gohlke/")
7111 (synopsis "Read and write TIFF(r) files")
7112 (description "This package lets you read image and metadata from many
7113 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
7114 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
7115 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
7116 (license license:bsd-3)))
7117
7118 (define-public python-lfdfiles
7119 (package
7120 (name "python-lfdfiles")
7121 (version "2021.2.22")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "lfdfiles" version))
7126 (sha256
7127 (base32
7128 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
7129 (modules '((guix build utils)))
7130 (snippet
7131 '(begin
7132 ;; Delete pre-generated Cython files.
7133 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
7134 #t))))
7135 (build-system python-build-system)
7136 (arguments
7137 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
7138 (propagated-inputs
7139 `(("python-click" ,python-click)
7140 ("python-numpy" ,python-numpy)
7141 ("python-tifffile" ,python-tifffile)))
7142 (native-inputs `(("python-cython" ,python-cython)))
7143 (home-page "https://www.lfd.uci.edu/~gohlke/")
7144 (synopsis "Work with LFD data files")
7145 (description
7146 "Lfdfiles is a Python library and console script for reading, writing,
7147 converting, and viewing many of the proprietary file formats used to store
7148 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
7149 (license license:bsd-3)))
7150
7151 (define-public python-imageio
7152 (package
7153 (name "python-imageio")
7154 (version "2.8.0")
7155 (source
7156 (origin
7157 (method url-fetch)
7158 (uri (pypi-uri "imageio" version))
7159 (sha256
7160 (base32
7161 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
7162 (build-system python-build-system)
7163 (arguments
7164 `(#:tests? #f ; many tests require online data
7165 #:phases
7166 (modify-phases %standard-phases
7167 (replace 'check
7168 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
7169 (if tests?
7170 (begin
7171 ;; Make installed package available for running the tests.
7172 (add-installed-pythonpath inputs outputs)
7173 (invoke "pytest" "-vv"))
7174 #t))))))
7175 (propagated-inputs
7176 `(("python-numpy" ,python-numpy)
7177 ("python-pillow" ,python-pillow)
7178 ("python-psutil" ,python-psutil)))
7179 (native-inputs
7180 `(("python-pytest" ,python-pytest)))
7181 (home-page "https://imageio.github.io/")
7182 (synopsis "Library for reading and writing a wide range of image data")
7183 (description
7184 "Imageio is a Python library that provides an easy interface to read and
7185 write a wide range of image data, including animated images, video, volumetric
7186 data, and scientific formats.")
7187 (license license:bsd-2)))
7188
7189 (define-public python-pycparser
7190 (package
7191 (name "python-pycparser")
7192 (version "2.20")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "pycparser" version))
7197 (sha256
7198 (base32
7199 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
7200 (outputs '("out" "doc"))
7201 (build-system python-build-system)
7202 (native-inputs
7203 `(("pkg-config" ,pkg-config)))
7204 (arguments
7205 `(#:phases
7206 (modify-phases %standard-phases
7207 (replace 'check
7208 (lambda _
7209 (with-directory-excursion "tests"
7210 (invoke "python" "all_tests.py"))
7211 #t))
7212 (add-after 'install 'install-doc
7213 (lambda* (#:key outputs #:allow-other-keys)
7214 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7215 (doc (string-append data "/doc/" ,name "-" ,version))
7216 (examples (string-append doc "/examples")))
7217 (mkdir-p examples)
7218 (for-each (lambda (file)
7219 (copy-file (string-append "." file)
7220 (string-append doc file)))
7221 '("/README.rst" "/CHANGES" "/LICENSE"))
7222 (copy-recursively "examples" examples)
7223 #t))))))
7224 (home-page "https://github.com/eliben/pycparser")
7225 (synopsis "C parser in Python")
7226 (description
7227 "Pycparser is a complete parser of the C language, written in pure Python
7228 using the PLY parsing library. It parses C code into an AST and can serve as
7229 a front-end for C compilers or analysis tools.")
7230 (license license:bsd-3)))
7231
7232 (define-public python2-pycparser
7233 (package-with-python2 python-pycparser))
7234
7235 (define-public python-xlsxwriter
7236 (package
7237 (name "python-xlsxwriter")
7238 (version "1.3.9")
7239 (source
7240 (origin
7241 ;; There are no tests in the PyPI tarball.
7242 (method git-fetch)
7243 (uri (git-reference
7244 (url "https://github.com/jmcnamara/XlsxWriter")
7245 (commit (string-append "RELEASE_" version))))
7246 (file-name (git-file-name name version))
7247 (sha256
7248 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
7249 (build-system python-build-system)
7250 (home-page "https://github.com/jmcnamara/XlsxWriter")
7251 (synopsis "Python module for creating Excel XLSX files")
7252 (description
7253 "XlsxWriter is a Python module that can be used to write text, numbers,
7254 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
7255 (license license:bsd-2)))
7256
7257 (define-public python-pywavelets
7258 (package
7259 (name "python-pywavelets")
7260 (version "1.1.1")
7261 (home-page "https://github.com/PyWavelets/pywt")
7262 (source (origin
7263 (method url-fetch)
7264 (uri (pypi-uri "PyWavelets" version))
7265 (sha256
7266 (base32
7267 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
7268 (build-system python-build-system)
7269 (arguments
7270 '(#:modules ((ice-9 ftw)
7271 (srfi srfi-1)
7272 (srfi srfi-26)
7273 (guix build utils)
7274 (guix build python-build-system))
7275 #:phases
7276 (modify-phases %standard-phases
7277 (replace 'check
7278 (lambda _
7279 (let ((cwd (getcwd))
7280 (libdir (find (cut string-prefix? "lib." <>)
7281 (scandir "build"))))
7282 (with-directory-excursion (string-append cwd "/build/" libdir)
7283 (invoke "pytest" "-vv"))))))))
7284 (native-inputs
7285 `(("python-matplotlib" ,python-matplotlib) ;for tests
7286 ("python-pytest" ,python-pytest)))
7287 (propagated-inputs
7288 `(("python-numpy" ,python-numpy)))
7289 (synopsis "Wavelet transforms in Python")
7290 (description
7291 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
7292 mathematical basis functions that are localized in both time and frequency.
7293 Wavelet transforms are time-frequency transforms employing wavelets. They are
7294 similar to Fourier transforms, the difference being that Fourier transforms are
7295 localized only in frequency instead of in time and frequency.")
7296 (license license:expat)))
7297
7298 (define-public python-pywal
7299 (package
7300 (name "python-pywal")
7301 (version "3.3.0")
7302 (source
7303 (origin
7304 (method git-fetch)
7305 (uri (git-reference
7306 (url "https://github.com/dylanaraps/pywal")
7307 (commit version)))
7308 (file-name (git-file-name name version))
7309 (sha256
7310 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
7311 (build-system python-build-system)
7312 (arguments
7313 `(#:phases
7314 (modify-phases %standard-phases
7315 (add-before 'check 'fix-home-directory
7316 (lambda _
7317 ;; Tests fail with "Permission denied: '/homeless-shelter'".
7318 (setenv "HOME" "/tmp")
7319 #t)))))
7320 (inputs
7321 `(("imagemagick" ,imagemagick)))
7322 (home-page "https://github.com/dylanaraps/pywal")
7323 (synopsis "Color palette generator and applicator")
7324 (description
7325 "Pywal is a tool that generates a color palette from the dominant colors
7326 in an image. It then applies the colors system-wide and on-the-fly in all of
7327 your favourite programs.")
7328 (license license:expat)))
7329
7330 (define-public python-pywinrm
7331 (package
7332 (name "python-pywinrm")
7333 (version "0.4.1")
7334 (source
7335 (origin
7336 (method url-fetch)
7337 (uri (pypi-uri "pywinrm" version))
7338 (sha256
7339 (base32
7340 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
7341 (build-system python-build-system)
7342 (propagated-inputs
7343 `(("python-six" ,python-six)
7344 ("python-requests_ntlm" ,python-requests_ntlm)
7345 ("python-xmltodict" ,python-xmltodict)
7346 ("python-kerberos" ,python-kerberos)))
7347 (native-inputs
7348 `(("python-mock" ,python-mock)
7349 ("python-pytest" ,python-pytest)))
7350 (home-page "https://github.com/diyan/pywinrm/")
7351 (synopsis
7352 "Python library for Windows Remote Management (WinRM)")
7353 (description
7354 "pywinrm is a Python client for the Windows Remote Management (WinRM)
7355 service. It allows you to invoke commands on target Windows machines from
7356 any machine that can run Python.")
7357 (license license:expat)))
7358
7359 (define-public python-xcffib
7360 (package
7361 (name "python-xcffib")
7362 (version "0.6.0")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "xcffib" version))
7367 (sha256
7368 (base32
7369 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
7370 (build-system python-build-system)
7371 (inputs
7372 `(("libxcb" ,libxcb)))
7373 (propagated-inputs
7374 `(("python-cffi" ,python-cffi) ; used at run time
7375 ("python-six" ,python-six)))
7376 (arguments
7377 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
7378 #:tests? #f
7379 #:phases
7380 (modify-phases %standard-phases
7381 (add-after 'unpack 'fix-libxcb-path
7382 (lambda* (#:key inputs #:allow-other-keys)
7383 (let ((libxcb (assoc-ref inputs "libxcb")))
7384 (substitute* '("xcffib/__init__.py")
7385 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
7386 #t)))
7387 (add-after 'install 'install-doc
7388 (lambda* (#:key outputs #:allow-other-keys)
7389 (let ((doc (string-append (assoc-ref outputs "out") "/share"
7390 "/doc/" ,name "-" ,version)))
7391 (mkdir-p doc)
7392 (copy-file "README.md"
7393 (string-append doc "/README.md"))
7394 #t))))))
7395 (home-page "https://github.com/tych0/xcffib")
7396 (synopsis "XCB Python bindings")
7397 (description
7398 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
7399 support for Python 3 and PyPy. It is based on cffi.")
7400 (license license:expat)))
7401
7402 (define-public python2-xcffib
7403 (package-with-python2 python-xcffib))
7404
7405 (define-public python-cairocffi
7406 (package
7407 (name "python-cairocffi")
7408 (version "1.2.0")
7409 (source
7410 (origin
7411 ;; The PyPI archive does not include the documentation, so use Git.
7412 (method git-fetch)
7413 (uri (git-reference
7414 (url "https://github.com/Kozea/cairocffi")
7415 (commit (string-append "v" version))))
7416 (file-name (git-file-name name version))
7417 (sha256
7418 (base32
7419 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
7420 (build-system python-build-system)
7421 (outputs '("out" "doc"))
7422 (inputs
7423 `(("glib" ,glib)
7424 ("gtk+" ,gtk+)
7425 ("gdk-pixbuf" ,gdk-pixbuf)
7426 ("cairo" ,cairo)))
7427 (native-inputs
7428 `(("python-numpy" ,python-numpy)
7429 ("python-pytest" ,python-pytest)
7430 ("python-pytest-cov" ,python-pytest-cov)
7431 ("python-pytest-runner" ,python-pytest-runner)
7432 ("python-sphinx" ,python-sphinx)
7433 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
7434 (propagated-inputs
7435 `(("python-xcffib" ,python-xcffib))) ; used at run time
7436 (arguments
7437 `(#:phases
7438 (modify-phases %standard-phases
7439 (add-after 'unpack 'patch-paths
7440 (lambda* (#:key inputs #:allow-other-keys)
7441 (substitute* "cairocffi/__init__.py"
7442 ;; Hack the dynamic library loading mechanism.
7443 (("find_library\\(library_name\\)")
7444 "\"found\"")
7445 (("filenames = \\(library_filename,\\) \\+ filenames")
7446 "pass")
7447 (("libcairo.so.2")
7448 (search-input-file inputs "/lib/libcairo.so.2")))
7449 (substitute* "cairocffi/pixbuf.py"
7450 (("libgdk_pixbuf-2.0.so.0")
7451 (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
7452 (("libgobject-2.0.so.0")
7453 (search-input-file inputs "/lib/libgobject-2.0.so.0"))
7454 (("libglib-2.0.so.0")
7455 (search-input-file inputs "/lib/libglib-2.0.so.0"))
7456 (("libgdk-3.so.0")
7457 (search-input-file inputs "/lib/libgdk-3.so.0")))))
7458 (add-after 'unpack 'disable-linters
7459 ;; Their check fails; none of our business.
7460 (lambda _
7461 (substitute* "setup.cfg"
7462 ((".*pytest-flake8.*") "")
7463 ((".*pytest-isort.*") "")
7464 (("--flake8") "")
7465 (("--isort") ""))
7466 #t))
7467 (add-after 'install 'install-doc
7468 (lambda* (#:key inputs outputs #:allow-other-keys)
7469 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7470 (doc (string-append data "/doc/" ,name "-" ,version))
7471 (html (string-append doc "/html")))
7472 (setenv "LD_LIBRARY_PATH"
7473 (string-append (assoc-ref inputs "cairo") "/lib" ":"
7474 (assoc-ref inputs "gdk-pixbuf") "/lib"))
7475 (setenv "LANG" "en_US.UTF-8")
7476 (mkdir-p html)
7477 (for-each (lambda (file)
7478 (copy-file (string-append "." file)
7479 (string-append doc file)))
7480 '("/README.rst" "/NEWS.rst"))
7481 (system* "python" "setup.py" "build_sphinx")
7482 (copy-recursively "docs/_build/html" html)
7483 #t))))))
7484 (home-page "https://github.com/Kozea/cairocffi")
7485 (synopsis "Python bindings and object-oriented API for Cairo")
7486 (description
7487 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
7488 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
7489 graphics library with support for multiple backends including image buffers,
7490 PNG, PostScript, PDF, and SVG file output.")
7491 (license license:bsd-3)))
7492
7493 (define-public python-decorator
7494 (package
7495 (name "python-decorator")
7496 (version "5.0.9")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (pypi-uri "decorator" version))
7501 (sha256
7502 (base32 "1mcy64hllgm938v8k1x2a4g0q9swsnrfnsvhz59kr28a6ajgpv3j"))))
7503 (build-system python-build-system)
7504 (home-page "https://pypi.org/project/decorator/")
7505 (synopsis "Python module to simplify usage of decorators")
7506 (description
7507 "The aim of the decorator module is to simplify the usage of decorators
7508 for the average programmer, and to popularize decorators usage giving examples
7509 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
7510 etc. The core of this module is a decorator factory.")
7511 (license license:expat)))
7512
7513 (define-public python2-decorator
7514 (package-with-python2 python-decorator))
7515
7516 (define-public python-drmaa
7517 (package
7518 (name "python-drmaa")
7519 (version "0.7.7")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "drmaa" version))
7524 (sha256
7525 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
7526 (build-system python-build-system)
7527 ;; The test suite requires libdrmaa which is provided by the cluster
7528 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
7529 ;; should be set to the path of the libdrmaa library.
7530 (arguments '(#:tests? #f))
7531 (native-inputs
7532 `(("python-nose" ,python-nose)))
7533 (home-page "https://pypi.org/project/drmaa/")
7534 (synopsis "Python bindings for the DRMAA library")
7535 (description
7536 "A Python package for Distributed Resource Management (DRM) job
7537 submission and control. This package is an implementation of the DRMAA 1.0
7538 Python language binding specification.")
7539 (license license:bsd-3)))
7540
7541 (define-public python2-drmaa
7542 (package-with-python2 python-drmaa))
7543
7544 (define-public python-grako
7545 (package
7546 (name "python-grako")
7547 (version "3.99.9")
7548 (source
7549 (origin
7550 (method url-fetch)
7551 (uri
7552 (pypi-uri "grako" version ".zip"))
7553 (sha256
7554 (base32
7555 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
7556 (build-system python-build-system)
7557 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
7558 (native-inputs
7559 `(("unzip" ,unzip)
7560 ("python-pytest" ,python-pytest)
7561 ("python-pytest-runner" ,python-pytest-runner)))
7562 (home-page "https://bitbucket.org/neogeny/grako")
7563 (synopsis "EBNF parser generator")
7564 (description
7565 "Grako takes a grammar in a variation of EBNF as input, and outputs a
7566 memoizing PEG/Packrat parser in Python.")
7567 (license license:bsd-3)))
7568
7569 (define-public python2-grako
7570 (package-with-python2 python-grako))
7571
7572 (define-public python-grandalf
7573 (package
7574 (name "python-grandalf")
7575 (version "0.7")
7576 (source
7577 (origin
7578 ;; There's no source tarball on PyPI.
7579 (method git-fetch)
7580 (uri (git-reference
7581 (url "https://github.com/bdcht/grandalf")
7582 (commit (string-append "v" version))))
7583 (file-name (git-file-name name version))
7584 (sha256
7585 (base32
7586 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7587 (build-system python-build-system)
7588 (arguments
7589 '(#:phases
7590 (modify-phases %standard-phases
7591 (replace 'check
7592 (lambda _
7593 (invoke "python" "setup.py" "pytest"))))))
7594 (native-inputs
7595 `(("python-pytest" ,python-pytest)
7596 ("python-pytest-runner" ,python-pytest-runner)))
7597 (propagated-inputs
7598 `(("python-numpy" ,python-numpy)
7599 ("python-ply" ,python-ply)))
7600 (home-page "https://github.com/bdcht/grandalf")
7601 (synopsis "Graph and drawing algorithms framework")
7602 (description
7603 "Grandalf is a Python package made for experimentations with graphs
7604 drawing algorithms. It is written in pure Python, and currently implements
7605 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7606 minimization approach. While not as fast or featured as graphviz or other
7607 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7608 than thousands of nodes, while keeping the source code simple enough to tweak
7609 and hack any part of it for experimental purpose. With a total of about 1500
7610 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7611 in less than 600 lines. The energy minimization approach is comprised of only
7612 250 lines!
7613
7614 Grandalf does only 2 not-so-simple things:
7615 @itemize
7616 @item computing the nodes (x,y) coordinates (based on provided nodes
7617 dimensions, and a chosen layout)
7618 @item routing the edges with lines or nurbs
7619 @end itemize
7620
7621 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7622 will help you find where to draw things like nodes and edges, but it’s up to
7623 you to actually draw things with your favorite toolkit.")
7624 ;; The user can choose either license.
7625 (license (list license:gpl2 license:epl1.0))))
7626
7627 (define-public python-gridmap
7628 (package
7629 (name "python-gridmap")
7630 (version "0.14.0")
7631 (source
7632 (origin
7633 (method git-fetch)
7634 (uri (git-reference
7635 (url "https://github.com/pygridtools/gridmap")
7636 (commit (string-append "v" version))))
7637 (file-name (git-file-name name version))
7638 (sha256
7639 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7640 (build-system python-build-system)
7641 (arguments
7642 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7643 (propagated-inputs
7644 `(("python-psutil" ,python-psutil)
7645 ("python-drmaa" ,python-drmaa)
7646 ("python-pyzmq" ,python-pyzmq)))
7647 (home-page "https://github.com/pygridtools/gridmap")
7648 (synopsis "Create jobs on a cluster directly from Python")
7649 (description
7650 "Gridmap is a Python package to allow you to easily create jobs on the
7651 cluster directly from Python. You can directly map Python functions onto the
7652 cluster without needing to write any wrapper code yourself.")
7653 (license license:gpl3+)))
7654
7655 (define-public python-honcho
7656 (package
7657 (name "python-honcho")
7658 (version "1.0.1")
7659 (source
7660 (origin
7661 (method git-fetch)
7662 (uri (git-reference
7663 (url "https://github.com/nickstenning/honcho")
7664 (commit (string-append "v" version))))
7665 (file-name (git-file-name name version))
7666 (sha256
7667 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7668 (build-system python-build-system)
7669 (native-inputs
7670 `(("python-pytest" ,python-pytest)
7671 ("python-mock" ,python-mock)
7672 ("python-tox" ,python-tox)
7673 ("which" ,which))) ;for tests
7674 (propagated-inputs
7675 `(("python-jinja2" ,python-jinja2)))
7676 (arguments
7677 `(#:phases
7678 (modify-phases %standard-phases
7679 (delete 'check)
7680 (add-after 'install 'check
7681 (lambda* (#:key outputs inputs #:allow-other-keys)
7682 ;; fix honcho path in testsuite
7683 (substitute* "tests/conftest.py"
7684 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7685 "/bin/honcho" "'")))
7686 ;; It's easier to run tests after install.
7687 ;; Make installed package available for running the tests
7688 (add-installed-pythonpath inputs outputs)
7689 (invoke "py.test" "-v"))))))
7690 (home-page "https://github.com/nickstenning/honcho")
7691 (synopsis "Manage Procfile-based applications")
7692 (description
7693 "A Procfile is a file which describes how to run an application
7694 consisting of several processes. honcho starts all listed processes.
7695 The output of all running processes is collected by honcho and
7696 displayed.")
7697 (license license:expat)))
7698
7699 (define-public python-pebble
7700 (package
7701 (name "python-pebble")
7702 (version "4.6.1")
7703 (source
7704 (origin
7705 (method url-fetch)
7706 (uri (pypi-uri "Pebble" version))
7707 (sha256
7708 (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
7709 (build-system python-build-system)
7710 (native-inputs
7711 `(("python-pytest" ,python-pytest)))
7712 (arguments
7713 `(#:phases
7714 (modify-phases %standard-phases
7715 (replace 'check
7716 (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
7717 (home-page "https://github.com/noxdafox/pebble")
7718 (synopsis "Threading and multiprocessing for Python")
7719 (description
7720 "Pebble aims to help manage threads and processes in an easier way. It
7721 wraps Python's standard library threading and multiprocessing objects.")
7722 (license license:lgpl3+)))
7723
7724 (define-public python-pexpect
7725 (package
7726 (name "python-pexpect")
7727 (version "4.8.0")
7728 (source
7729 (origin
7730 (method url-fetch)
7731 (uri (pypi-uri "pexpect" version))
7732 (sha256
7733 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7734 (build-system python-build-system)
7735 (arguments
7736 `(#:phases
7737 (modify-phases %standard-phases
7738 (add-before 'check 'prepare-tests
7739 (lambda _
7740 (substitute* (find-files "tests")
7741 (("/bin/ls") (which "ls"))
7742 (("/bin/echo") (which "echo"))
7743 (("/bin/which") (which "which"))
7744 ;; Many tests try to use the /bin directory which
7745 ;; is not present in the build environment.
7746 ;; Use one that's non-empty and unlikely to change.
7747 (("/bin'") "/dev'")
7748 ;; Disable failing test. See upstream bug report
7749 ;; https://github.com/pexpect/pexpect/issues/568
7750 (("def test_bash") "def _test_bash"))
7751 ;; XXX: Socket connection test gets "Connection reset by peer".
7752 ;; Why does it not work? Delete for now.
7753 (delete-file "tests/test_socket.py")
7754 #t))
7755 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7756 (native-inputs
7757 `(("python-nose" ,python-nose)
7758 ("python-pytest" ,python-pytest)
7759 ("man-db" ,man-db)
7760 ("which" ,which)
7761 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7762 (propagated-inputs
7763 `(("python-ptyprocess" ,python-ptyprocess)))
7764 (home-page "http://pexpect.readthedocs.org/")
7765 (synopsis "Controlling interactive console applications")
7766 (description
7767 "Pexpect is a pure Python module for spawning child applications;
7768 controlling them; and responding to expected patterns in their output.
7769 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7770 child application and control it as if a human were typing commands.")
7771 (license license:isc)))
7772
7773 (define-public python2-pexpect
7774 (package-with-python2 python-pexpect))
7775
7776 (define-public python-setuptools-scm
7777 (package
7778 (name "python-setuptools-scm")
7779 (version "5.0.1")
7780 (source (origin
7781 (method url-fetch)
7782 (uri (pypi-uri "setuptools_scm" version))
7783 (sha256
7784 (base32
7785 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))
7786 (build-system python-build-system)
7787 (home-page "https://github.com/pypa/setuptools_scm/")
7788 (synopsis "Manage Python package versions in SCM metadata")
7789 (description
7790 "Setuptools_scm handles managing your Python package versions in
7791 @dfn{software configuration management} (SCM) metadata instead of declaring
7792 them as the version argument or in a SCM managed file.")
7793 (license license:expat)))
7794
7795 (define-public python2-setuptools-scm
7796 (package-with-python2 python-setuptools-scm))
7797
7798 (define-public python-sexpdata
7799 (package
7800 (name "python-sexpdata")
7801 (version "0.0.3")
7802 (source
7803 (origin
7804 (method url-fetch)
7805 (uri (pypi-uri "sexpdata" version))
7806 (sha256
7807 (base32
7808 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7809 (build-system python-build-system)
7810 (home-page "https://github.com/jd-boyd/sexpdata")
7811 (synopsis "S-expression parser for Python")
7812 (description
7813 "Sexpdata is an S-expression parser/serializer. It has load and dump
7814 functions like pickle, json or PyYAML module.")
7815 (license license:bsd-3)))
7816
7817 (define-public python-pathlib2
7818 (package
7819 (name "python-pathlib2")
7820 (version "2.3.3")
7821 (source
7822 (origin
7823 (method url-fetch)
7824 (uri (pypi-uri "pathlib2" version))
7825 (sha256
7826 (base32
7827 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7828 (build-system python-build-system)
7829 (propagated-inputs
7830 `(("python-scandir" ,python-scandir)
7831 ("python-six" ,python-six)))
7832 (home-page "https://pypi.org/project/pathlib2/")
7833 (synopsis "Object-oriented file system paths")
7834 (description "The goal of pathlib2 is to provide a backport of the
7835 standard @code{pathlib} module which tracks the standard library module, so
7836 all the newest features of the standard @code{pathlib} can be used also on
7837 older Python versions.")
7838 (license license:expat)))
7839
7840 (define-public python-importlib-resources
7841 (package
7842 (name "python-importlib-resources")
7843 (version "3.0.0")
7844 (source
7845 (origin
7846 (method url-fetch)
7847 (uri (pypi-uri "importlib_resources" version))
7848 (sha256
7849 (base32
7850 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7851 (build-system python-build-system)
7852 (native-inputs
7853 `(("python-setuptools-scm" ,python-setuptools-scm)
7854 ("python-toml" ,python-toml)))
7855 (home-page "http://importlib-resources.readthedocs.io/")
7856 (synopsis "Read resources from Python packages")
7857 (description
7858 "@code{importlib_resources} is a backport of Python 3's standard library
7859 @code{importlib.resources} module for Python 2.7, and Python 3.")
7860 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7861 (license license:asl2.0)))
7862
7863 (define-public python2-importlib-resources
7864 (package
7865 (name "python2-importlib-resources")
7866 (version "1.0.2")
7867 (source (origin
7868 (method url-fetch)
7869 (uri (pypi-uri "importlib_resources" version))
7870 (sha256
7871 (base32
7872 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7873 (build-system python-build-system)
7874 (arguments
7875 `(#:python ,python-2
7876 #:phases (modify-phases %standard-phases
7877 ;; The build system tests for python-wheel, but it is
7878 ;; not required for Guix nor the test suite. Just drop
7879 ;; it to make bootstrapping pytest easier.
7880 (add-after 'unpack 'drop-wheel-dependency
7881 (lambda _
7882 (substitute* "setup.cfg"
7883 (("^[[:blank:]]+wheel")
7884 ""))
7885 #t)))))
7886 (propagated-inputs
7887 `(("python-pathlib2" ,python2-pathlib2)
7888 ("python-typing" ,python2-typing)))
7889 (home-page "https://gitlab.com/python-devs/importlib_resources")
7890 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7891 (description
7892 "This package provides an implementation of @code{importlib.resources}
7893 for older versions of Python.")
7894 (license license:asl2.0)))
7895
7896 ;; For importlib-metadata-bootstrap below.
7897 (define-public python2-importlib-resources-bootstrap
7898 (hidden-package
7899 (package/inherit
7900 python2-importlib-resources
7901 (name "python2-importlib-resources-bootstrap")
7902 (propagated-inputs
7903 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7904 ("python-typing" ,python2-typing))))))
7905
7906 (define-public python-importlib-metadata
7907 (package
7908 (name "python-importlib-metadata")
7909 (version "1.5.0")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "importlib_metadata" version))
7914 (sha256
7915 (base32
7916 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7917 (build-system python-build-system)
7918 (propagated-inputs
7919 `(("python-zipp" ,python-zipp)))
7920 (native-inputs
7921 `(("python-setuptools-scm" ,python-setuptools-scm)
7922 ("python-pyfakefs" ,python-pyfakefs)
7923 ("python-packaging" ,python-packaging)))
7924 (home-page "https://importlib-metadata.readthedocs.io/")
7925 (synopsis "Read metadata from Python packages")
7926 (description
7927 "@code{importlib_metadata} is a library which provides an API for
7928 accessing an installed Python package's metadata, such as its entry points or
7929 its top-level name. This functionality intends to replace most uses of
7930 @code{pkg_resources} entry point API and metadata API. Along with
7931 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7932 need to use the older and less efficient @code{pkg_resources} package.")
7933 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7934 (license license:asl2.0)))
7935
7936 (define-public python2-importlib-metadata
7937 (let ((base (package-with-python2 (strip-python2-variant
7938 python-importlib-metadata))))
7939 (package/inherit
7940 base
7941 (name "python2-importlib-metadata")
7942 (native-inputs
7943 `(("python-setuptools-scm" ,python2-setuptools-scm)
7944 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7945 ("python-packaging" ,python2-packaging-bootstrap)))
7946 (propagated-inputs
7947 `(("python-configparser" ,python2-configparser)
7948 ("python-contextlib2" ,python2-contextlib2)
7949 ("python-importlib-resources" ,python2-importlib-resources)
7950 ("python-pathlib2" ,python2-pathlib2)
7951 ,@(package-propagated-inputs base))))))
7952
7953 ;; This package is used by python2-pytest, and thus must not depend on it.
7954 (define-public python2-importlib-metadata-bootstrap
7955 (hidden-package
7956 (package/inherit
7957 python2-importlib-metadata
7958 (name "python2-importlib-metadata-bootstrap")
7959 (arguments
7960 `(#:tests? #f
7961 ,@(package-arguments python2-importlib-metadata)))
7962 (propagated-inputs
7963 `(("python-zipp" ,python2-zipp-bootstrap)
7964 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7965 ("python-configparser" ,python2-configparser)
7966 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7967 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7968
7969 (define-public python-importmagic
7970 (package
7971 (name "python-importmagic")
7972 (version "0.1.7")
7973 (source
7974 (origin
7975 (method url-fetch)
7976 (uri (pypi-uri "importmagic" version))
7977 (sha256
7978 (base32
7979 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7980 (build-system python-build-system)
7981 (home-page "https://github.com/alecthomas/importmagic")
7982 (synopsis "Library for adding, removing and managing Python imports")
7983 (description
7984 "Importmagic is a Python library for automatically managing imports by
7985 finding unresolved symbols in Python code and their corresponding imports.")
7986 (license license:bsd-3)))
7987
7988 (define-public python-inotify-simple
7989 (package
7990 (name "python-inotify-simple")
7991 (version "1.3.5")
7992 (source
7993 (origin
7994 (method git-fetch)
7995 (uri (git-reference
7996 (url "https://github.com/chrisjbillington/inotify_simple")
7997 (commit version)))
7998 (file-name (git-file-name name version))
7999 (sha256
8000 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
8001 (build-system python-build-system)
8002 (home-page
8003 "https://github.com/chrisjbillington/inotify_simple")
8004 (synopsis "Simple wrapper around inotify library")
8005 (description
8006 "@code{inotify-simple} is a simple wrapper around inotify library.")
8007 (license license:bsd-3)))
8008
8009 (define-public python-jaraco-packaging
8010 (package
8011 (name "python-jaraco-packaging")
8012 (version "6.1")
8013 (source
8014 (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "jaraco.packaging" version))
8017 (sha256
8018 (base32
8019 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
8020 (build-system python-build-system)
8021 (propagated-inputs
8022 `(("python-pytest" ,python-pytest)
8023 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
8024 ("python-pytest-flake8" ,python-pytest-flake8)
8025 ("python-rst.linker" ,python-rst.linker)
8026 ("python-setuptools" ,python-setuptools)
8027 ("python-setuptools-scm" ,python-setuptools-scm)
8028 ("python-six" ,python-six)
8029 ("python-sphinx" ,python-sphinx)))
8030 (home-page "https://github.com/jaraco/jaraco.packaging")
8031 (synopsis "Tools to supplement packaging Python releases")
8032 (description
8033 "This package provides various tools to supplement packaging Python
8034 releases.")
8035 (license license:expat)))
8036
8037 (define-public python-pathpy
8038 (package
8039 (name "python-pathpy")
8040 (version "11.5.1")
8041 (source
8042 (origin
8043 (method url-fetch)
8044 (uri (pypi-uri "path.py" version))
8045 (sha256
8046 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
8047 (outputs '("out" "doc"))
8048 (build-system python-build-system)
8049 (propagated-inputs
8050 `(("python-appdirs" ,python-appdirs)
8051 ("python-importlib-metadata" ,python-importlib-metadata)))
8052 (native-inputs
8053 `(("python-setuptools-scm" ,python-setuptools-scm)
8054 ("python-sphinx" ,python-sphinx)
8055 ("python-rst.linker" ,python-rst.linker)
8056 ("python-pytest" ,python-pytest)
8057 ("python-pytest-runner" ,python-pytest-runner)
8058 ("python-jaraco-packaging" ,python-jaraco-packaging)))
8059 (arguments
8060 `(#:phases
8061 (modify-phases %standard-phases
8062 (add-after 'build 'build-doc
8063 (lambda _
8064 (setenv "LANG" "en_US.UTF-8")
8065 (invoke "python" "setup.py" "build_sphinx")))
8066 (add-after 'install 'install-doc
8067 (lambda* (#:key outputs #:allow-other-keys)
8068 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
8069 (doc (string-append data "/doc/" ,name "-" ,version))
8070 (html (string-append doc "/html")))
8071 (mkdir-p html)
8072 (for-each (lambda (file)
8073 (copy-file file (string-append doc "/" file)))
8074 '("README.rst" "CHANGES.rst"))
8075 (copy-recursively "build/sphinx/html" html)
8076 #t)))
8077 (replace 'check
8078 (lambda _
8079 ;; The import time test aborts if an import takes longer than
8080 ;; 100ms. It may very well take a little longer than that.
8081 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
8082 (home-page "https://github.com/jaraco/path.py")
8083 (synopsis "Python module wrapper for built-in os.path")
8084 (description
8085 "@code{path.py} implements path objects as first-class entities, allowing
8086 common operations on files to be invoked on those path objects directly.")
8087 (license license:expat)))
8088
8089 (define-public python-simplegeneric
8090 (package
8091 (name "python-simplegeneric")
8092 (version "0.8.1")
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "simplegeneric" version ".zip"))
8097 (sha256
8098 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
8099 (build-system python-build-system)
8100 (native-inputs
8101 `(("unzip" ,unzip)))
8102 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
8103 (synopsis "Python module for simple generic functions")
8104 (description
8105 "The simplegeneric module lets you define simple single-dispatch generic
8106 functions, akin to Python’s built-in generic functions like @code{len()},
8107 @code{iter()} and so on. However, instead of using specially-named methods,
8108 these generic functions use simple lookup tables, akin to those used by
8109 e.g. @code{pickle.dump()} and other generic functions found in the Python
8110 standard library.")
8111 (license license:zpl2.1)))
8112
8113 (define-public python2-simplegeneric
8114 (package-with-python2 python-simplegeneric))
8115
8116 (define-public python-ipython-genutils
8117 ;; TODO: This package is retired, check if can be removed, see description.
8118 (package
8119 (name "python-ipython-genutils")
8120 (version "0.1.0")
8121 (source
8122 (origin
8123 (method url-fetch)
8124 (uri (pypi-uri "ipython_genutils" version))
8125 (sha256
8126 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
8127 (build-system python-build-system)
8128 (arguments `(#:tests? #f)) ; no tests
8129 (home-page "https://ipython.org")
8130 (synopsis "Vestigial utilities from IPython")
8131 (description
8132 "This package provides retired utilities from IPython. No packages
8133 outside IPython/Jupyter should depend on it.
8134
8135 This package shouldn't exist. It contains some common utilities shared by
8136 Jupyter and IPython projects during The Big Split. As soon as possible, those
8137 packages will remove their dependency on this, and this package will go
8138 away.")
8139 (license license:bsd-3)))
8140
8141 (define-public python2-ipython-genutils
8142 (package-with-python2 python-ipython-genutils))
8143
8144 (define-public python-ipyparallel
8145 (package
8146 (name "python-ipyparallel")
8147 (version "6.2.4")
8148 (source
8149 (origin
8150 (method url-fetch)
8151 (uri (pypi-uri "ipyparallel" version))
8152 (sha256
8153 (base32
8154 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
8155 (build-system python-build-system)
8156 (arguments
8157 `(#:tests? #f ; RuntimeError: IO Loop failed to start
8158 #:phases
8159 (modify-phases %standard-phases
8160 (add-before 'check 'prepare-for-tests
8161 (lambda _
8162 (setenv "HOME" (getcwd))
8163 #t)))))
8164 (propagated-inputs
8165 `(("python-dateutil" ,python-dateutil)
8166 ("python-decorator" ,python-decorator)
8167 ("python-ipykernel" ,python-ipykernel)
8168 ("python-ipython" ,python-ipython)
8169 ("python-ipython-genutils" ,python-ipython-genutils)
8170 ("python-jupyter-client" ,python-jupyter-client)
8171 ("python-pyzmq" ,python-pyzmq)
8172 ("python-tornado" ,python-tornado)
8173 ("python-traitlets" ,python-traitlets)))
8174 (native-inputs
8175 `(("python-ipython" ,python-ipython)
8176 ("python-mock" ,python-mock)
8177 ("python-nose" ,python-nose)
8178 ("python-pytest" ,python-pytest)
8179 ("python-pytest-cov" ,python-pytest-cov)
8180 ("python-testpath" ,python-testpath)))
8181 (home-page "https://ipython.org/")
8182 (synopsis "Interactive Parallel Computing with IPython")
8183 (description
8184 "@code{ipyparallel} is a Python package and collection of CLI scripts for
8185 controlling clusters for Jupyter. @code{ipyparallel} contains the following
8186 CLI scripts:
8187 @enumerate
8188 @item ipcluster - start/stop a cluster
8189 @item ipcontroller - start a scheduler
8190 @item ipengine - start an engine
8191 @end enumerate")
8192 (license license:bsd-3)))
8193
8194 (define-public python-ipython-cluster-helper
8195 (package
8196 (name "python-ipython-cluster-helper")
8197 (version "0.6.4")
8198 (source
8199 (origin
8200 (method url-fetch)
8201 (uri (pypi-uri "ipython-cluster-helper" version))
8202 (sha256
8203 (base32
8204 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
8205 (modules '((guix build utils)))
8206 (snippet
8207 '(begin (substitute* "requirements.txt"
8208 (("ipython.*") "ipython\n"))
8209 #t))))
8210 (build-system python-build-system)
8211 (arguments
8212 `(#:tests? #f ; Test suite can't find IPython.
8213 #:phases
8214 (modify-phases %standard-phases
8215 (replace 'check
8216 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8217 (if tests?
8218 (begin
8219 (setenv "HOME" (getcwd))
8220 (add-installed-pythonpath inputs outputs)
8221 (invoke "python" "example/example.py" "--local"))
8222 #t))))))
8223 (propagated-inputs
8224 `(("python-ipyparallel" ,python-ipyparallel)
8225 ("python-ipython" ,python-ipython)
8226 ("python-netifaces" ,python-netifaces)
8227 ("python-pyzmq" ,python-pyzmq)
8228 ("python-setuptools" ,python-setuptools)
8229 ("python-six" ,python-six)))
8230 (home-page "https://github.com/roryk/ipython-cluster-helper")
8231 (synopsis
8232 "Simplify IPython cluster start up and use for multiple schedulers")
8233 (description
8234 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
8235 profile, launches a cluster and returns a view. On program exit it shuts the
8236 cluster down and deletes the throwaway profile.")
8237 (license license:expat)))
8238
8239 (define-public python-traitlets
8240 (package
8241 (name "python-traitlets")
8242 (version "4.3.3")
8243 (source
8244 (origin
8245 (method url-fetch)
8246 (uri (pypi-uri "traitlets" version))
8247 (sha256
8248 (base32
8249 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
8250 (build-system python-build-system)
8251 (arguments
8252 `(#:phases
8253 (modify-phases %standard-phases
8254 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
8255 (propagated-inputs
8256 `(("python-ipython-genutils" ,python-ipython-genutils)
8257 ("python-decorator" ,python-decorator)
8258 ("python-six" ,python-six)))
8259 (native-inputs
8260 `(("python-pytest" ,python-pytest)))
8261 (properties `((python2-variant . ,(delay python2-traitlets))))
8262 (home-page "https://ipython.org")
8263 (synopsis "Configuration system for Python applications")
8264 (description
8265 "Traitlets is a framework that lets Python classes have attributes with
8266 type checking, dynamically calculated default values, and ‘on change’
8267 callbacks. The package also includes a mechanism to use traitlets for
8268 configuration, loading values from files or from command line arguments. This
8269 is a distinct layer on top of traitlets, so you can use traitlets in your code
8270 without using the configuration machinery.")
8271 (license license:bsd-3)))
8272
8273 (define-public python2-traitlets
8274 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
8275 (package/inherit traitlets
8276 (propagated-inputs
8277 `(("python2-enum34" ,python2-enum34)
8278 ,@(package-propagated-inputs traitlets))))))
8279
8280 (define-public python-jupyter-core
8281 (package
8282 (name "python-jupyter-core")
8283 (version "4.7.1")
8284 (source
8285 (origin
8286 (method url-fetch)
8287 (uri (string-append (pypi-uri "jupyter_core" version)))
8288 (sha256
8289 (base32
8290 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
8291 (build-system python-build-system)
8292 (arguments
8293 `(#:phases
8294 (modify-phases %standard-phases
8295 (replace 'check
8296 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8297 (when tests?
8298 ; Some tests write to $HOME.
8299 (setenv "HOME" "/tmp")
8300 ; Some tests load the installed package.
8301 (add-installed-pythonpath inputs outputs)
8302 (invoke "pytest" "-vv"))))
8303 (add-after 'unpack 'patch-testsuite
8304 (lambda _
8305 ;; test_not_on_path() and test_path_priority() try to run a test
8306 ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
8307 (substitute* "jupyter_core/tests/test_command.py"
8308 (("env = \\{'PATH': ''\\}")
8309 "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
8310 (("env = \\{'PATH': str\\(b\\)\\}")
8311 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))
8312 #t))
8313 ;; Migration is running whenever etc/jupyter exists, but the
8314 ;; Guix-managed directory will never contain any migratable IPython
8315 ;; config files and cannot be written to anyway, so just pretend we
8316 ;; already did that.
8317 (add-after 'install 'disable-migration
8318 (lambda* (#:key outputs #:allow-other-keys)
8319 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
8320 (invoke "touch"
8321 (string-append
8322 (assoc-ref outputs "out")
8323 "/etc/jupyter/migrated")))))))
8324 (propagated-inputs
8325 `(("python-traitlets" ,python-traitlets)))
8326 (native-inputs
8327 `(("python-six" ,python-six)
8328 ("python-pytest" ,python-pytest)))
8329 ;; This package provides the `jupyter` binary and thus also exports the
8330 ;; search paths.
8331 (native-search-paths
8332 (list (search-path-specification
8333 (variable "JUPYTER_CONFIG_DIR")
8334 (files '("etc/jupyter")))
8335 (search-path-specification
8336 (variable "JUPYTER_PATH")
8337 (files '("share/jupyter")))))
8338 (home-page "https://jupyter.org/")
8339 (synopsis "Jupyter base package")
8340 (description
8341 "Jupyter core is the base package on which Jupyter projects rely.")
8342 (license license:bsd-3)))
8343
8344 (define-public python-jupyter-client
8345 (package
8346 (name "python-jupyter-client")
8347 (version "6.1.12")
8348 (source
8349 (origin
8350 (method url-fetch)
8351 (uri (pypi-uri "jupyter_client" version))
8352 (sha256
8353 (base32
8354 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
8355 (build-system python-build-system)
8356 (arguments
8357 `(#:phases
8358 (modify-phases %standard-phases
8359 (add-after 'unpack 'set-tool-file-names
8360 (lambda* (#:key inputs #:allow-other-keys)
8361 (let ((iproute (assoc-ref inputs "iproute")))
8362 (substitute* "jupyter_client/localinterfaces.py"
8363 (("'ip'")
8364 (string-append "'" iproute "/sbin/ip'")))
8365 #t)))
8366 (replace 'check
8367 (lambda* (#:key tests? #:allow-other-keys)
8368 (when tests?
8369 ;; Some tests try to write to $HOME.
8370 (setenv "HOME" "/tmp")
8371 (invoke "pytest" "-vv")))))))
8372 (inputs
8373 `(("iproute" ,iproute)))
8374 (propagated-inputs
8375 `(("python-dateutil" ,python-dateutil)
8376 ("python-jupyter-core" ,python-jupyter-core)
8377 ("python-pyzmq" ,python-pyzmq)
8378 ("python-tornado" ,python-tornado-6)
8379 ("python-traitlets" ,python-traitlets)))
8380 (native-inputs
8381 `(("python-pytest" ,python-pytest)
8382 ("python-pytest-asyncio" ,python-pytest-asyncio)
8383 ("python-pytest-timeout" ,python-pytest-timeout)
8384 ("python-async-generator" ,python-async-generator)
8385 ("python-mock" ,python-mock)
8386 ("python-msgpack" ,python-msgpack)
8387 ("python-ipython" ,python-ipython)
8388 ("python-ipykernel" ,python-ipykernel-bootstrap)))
8389 (home-page "https://jupyter.org/")
8390 (synopsis "Jupyter protocol implementation and client libraries")
8391 (description
8392 "The @code{jupyter_client} package contains the reference implementation
8393 of the Jupyter protocol. It also provides client and kernel management APIs
8394 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
8395 installing @code{kernelspec}s for use with Jupyter frontends.")
8396 (license license:bsd-3)))
8397
8398 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
8399 ;; and jupyter-client by removing the former from its native-inputs and
8400 ;; disabling tests.
8401 (define-public python-jupyter-client-bootstrap
8402 (let ((base python-jupyter-client))
8403 (hidden-package
8404 (package
8405 (inherit base)
8406 (name "python-jupyter-client-bootstrap")
8407 (arguments
8408 `(#:tests? #f
8409 ,@(package-arguments base)))
8410 (native-inputs `())))))
8411
8412 (define-public python-ipykernel
8413 (package
8414 (name "python-ipykernel")
8415 (version "5.5.3")
8416 (source
8417 (origin
8418 (method url-fetch)
8419 (uri (pypi-uri "ipykernel" version))
8420 (sha256
8421 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
8422 (build-system python-build-system)
8423 (arguments
8424 `(#:phases
8425 (modify-phases %standard-phases
8426 (replace 'check
8427 (lambda _
8428 (setenv "HOME" "/tmp")
8429 (invoke "pytest" "-v")
8430 #t))
8431 (add-after 'install 'set-python-file-name
8432 (lambda* (#:key outputs #:allow-other-keys)
8433 ;; Record the absolute file name of the 'python' executable in
8434 ;; 'kernel.json'.
8435 (let ((out (assoc-ref outputs "out")))
8436 (substitute* (string-append out "/share/jupyter"
8437 "/kernels/python3/kernel.json")
8438 (("\"python\"")
8439 (string-append "\"" (which "python") "\"")))
8440 #t))))))
8441 (propagated-inputs
8442 `(("python-ipython" ,python-ipython)
8443 ("python-tornado" ,python-tornado-6)
8444 ("python-traitlets" ,python-traitlets)
8445 ;; imported at runtime during connect
8446 ("python-jupyter-client" ,python-jupyter-client)))
8447 (native-inputs
8448 `(("python-flaky" ,python-flaky)
8449 ("python-nose" ,python-nose)
8450 ("python-pytest" ,python-pytest)))
8451 (home-page "https://ipython.org")
8452 (synopsis "IPython Kernel for Jupyter")
8453 (description
8454 "This package provides the IPython kernel for Jupyter.")
8455 (license license:bsd-3)))
8456
8457 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
8458 ;; break the cycle between ipykernel and jupyter-client.
8459 (define-public python-ipykernel-bootstrap
8460 (let ((parent python-ipykernel))
8461 (hidden-package
8462 (package
8463 (inherit parent)
8464 (name "python-ipykernel-bootstrap")
8465 (propagated-inputs
8466 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
8467 ,@(fold alist-delete (package-propagated-inputs parent)
8468 '("python-jupyter-client"))))))))
8469
8470 (define-public python-pari-jupyter
8471 (package
8472 (name "python-pari-jupyter")
8473 (version "1.3.2")
8474 (source
8475 (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "pari_jupyter" version))
8478 (sha256
8479 (base32
8480 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
8481 (build-system python-build-system)
8482 (propagated-inputs
8483 `(("python-ipykernel" ,python-ipykernel)))
8484 (inputs
8485 `(("pari-gp" ,pari-gp)
8486 ("readline" ,readline)))
8487 (arguments
8488 `(#:tests? #f)) ; no test suite
8489 (home-page
8490 "https://github.com/jdemeyer/pari_jupyter")
8491 (synopsis "A Jupyter kernel for PARI/GP")
8492 (description "The package provides a PARI/GP kernel for Jupyter.")
8493 (license license:gpl3+)))
8494
8495 (define-public python-backcall
8496 (package
8497 (name "python-backcall")
8498 (version "0.2.0")
8499 (source
8500 (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "backcall" version))
8503 (sha256
8504 (base32
8505 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
8506 (build-system python-build-system)
8507 (home-page "https://github.com/takluyver/backcall/")
8508 (synopsis "Specifications for callback functions passed in to an API")
8509 (description
8510 "If your code lets other people supply callback functions, it's important
8511 to specify the function signature you expect, and check that functions support
8512 that. Adding extra parameters later would break other peoples code unless
8513 you're careful. The @code{backcall} package provides a way of specifying the
8514 callback signature using a prototype function.")
8515 (license license:bsd-3)))
8516
8517 (define-public python-ipython
8518 (package
8519 (name "python-ipython")
8520 (version "7.27.0")
8521 (source
8522 (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "ipython" version ".tar.gz"))
8525 (sha256
8526 (base32 "04xgymypnbfgf2q0d5b0hanjbjsp53f055sh1p8xlq52vyzmxdaq"))))
8527 (build-system python-build-system)
8528 (propagated-inputs
8529 `(("python-backcall" ,python-backcall)
8530 ("python-pyzmq" ,python-pyzmq)
8531 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
8532 ("python-terminado" ,python-terminado)
8533 ("python-matplotlib" ,python-matplotlib)
8534 ("python-matplotlib-inline" ,python-matplotlib-inline)
8535 ("python-numpy" ,python-numpy)
8536 ("python-numpydoc" ,python-numpydoc)
8537 ("python-jedi" ,python-jedi)
8538 ("python-jinja2" ,python-jinja2)
8539 ("python-mistune" ,python-mistune)
8540 ("python-pexpect" ,python-pexpect)
8541 ("python-pickleshare" ,python-pickleshare)
8542 ("python-simplegeneric" ,python-simplegeneric)
8543 ("python-jsonschema" ,python-jsonschema)
8544 ("python-traitlets" ,python-traitlets)
8545 ("python-nbformat" ,python-nbformat)
8546 ("python-pygments" ,python-pygments)))
8547 (inputs
8548 `(("readline" ,readline)
8549 ("which" ,which)))
8550 (native-inputs
8551 `(("graphviz" ,graphviz)
8552 ("pkg-config" ,pkg-config)
8553 ("python-requests" ,python-requests) ;; for tests
8554 ("python-testpath" ,python-testpath)
8555 ("python-nose" ,python-nose)))
8556 (arguments
8557 `(#:phases
8558 (modify-phases %standard-phases
8559 (add-after 'unpack 'make-docs-reproducible
8560 (lambda _
8561 (substitute* "IPython/sphinxext/ipython_directive.py"
8562 ((".*import datetime") "")
8563 ((".*datetime.datetime.now\\(\\)") "")
8564 (("%timeit") "# %timeit"))
8565 #t))
8566 ;; Tests can only be run after the library has been installed and not
8567 ;; within the source directory.
8568 (delete 'check)
8569 (add-after 'install 'check
8570 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8571 (if tests?
8572 (begin
8573 ;; Make installed package available for running the tests
8574 (add-installed-pythonpath inputs outputs)
8575 (setenv "HOME" "/tmp/") ;; required by a test
8576 ;; We only test the core because one of the other tests
8577 ;; tries to import ipykernel.
8578 (invoke "python" "IPython/testing/iptest.py"
8579 "-v" "IPython/core/tests"))
8580 #t)))
8581 (add-before 'check 'fix-tests
8582 (lambda* (#:key inputs #:allow-other-keys)
8583 (substitute* "./IPython/utils/_process_posix.py"
8584 (("/usr/bin/env', 'which") (which "which")))
8585 (substitute* "./IPython/core/tests/test_inputtransformer.py"
8586 (("#!/usr/bin/env python")
8587 (string-append "#!" (which "python"))))
8588 ;; This test introduces a circular dependency on ipykernel
8589 ;; (which depends on ipython).
8590 (delete-file "IPython/core/tests/test_display.py")
8591 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
8592 (delete-file "IPython/core/tests/test_interactiveshell.py")
8593 ;; AttributeError: module 'matplotlib_inline' has no
8594 ;; attribute 'backend_inline'
8595 (delete-file "IPython/core/tests/test_pylabtools.py")
8596 #t)))))
8597 (home-page "https://ipython.org")
8598 (synopsis "IPython is a tool for interactive computing in Python")
8599 (description
8600 "IPython provides a rich architecture for interactive computing with:
8601 Powerful interactive shells, a browser-based notebook, support for interactive
8602 data visualization, embeddable interpreters and tools for parallel
8603 computing.")
8604 (license license:bsd-3)))
8605
8606 (define-public python-ipython-documentation
8607 (package
8608 (inherit python-ipython)
8609 (name "python-ipython-documentation")
8610 (version (package-version python-ipython))
8611 (arguments
8612 `(#:phases
8613 (modify-phases %standard-phases
8614 (delete 'build)
8615 (delete 'check)
8616 (replace 'install
8617 (lambda* (#:key outputs #:allow-other-keys)
8618 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8619 (doc (string-append data "/doc/" ,name "-" ,version))
8620 (html (string-append doc "/html"))
8621 (man1 (string-append data "/man/man1"))
8622 (info (string-append data "/info"))
8623 (examples (string-append doc "/examples"))
8624 (python-arg (string-append "PYTHON=" (which "python"))))
8625 (setenv "LANG" "en_US.utf8")
8626 (with-directory-excursion "docs"
8627 ;; FIXME: pdf fails to build
8628 ;;(system* "make" "pdf" "PAPER=a4")
8629 (system* "make" python-arg "html")
8630 ;; FIXME: the generated texi file contains ^@^@, which trips
8631 ;; up the parser.
8632 ;; (system* "make" python-arg "info")
8633 )
8634 (copy-recursively "docs/man" man1)
8635 (copy-recursively "examples" examples)
8636 (copy-recursively "docs/build/html" html)
8637 ;; (copy-file "docs/build/latex/ipython.pdf"
8638 ;; (string-append doc "/ipython.pdf"))
8639 (mkdir-p info)
8640 ;; (copy-file "docs/build/texinfo/ipython.info"
8641 ;; (string-append info "/ipython.info"))
8642 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8643 #t)))))
8644 (inputs
8645 `(("python-ipython" ,python-ipython)
8646 ("python-ipykernel" ,python-ipykernel)))
8647 (native-inputs
8648 `(("python-sphinx" ,python-sphinx)
8649 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8650 ;; FIXME: It's possible that a smaller union would work just as well.
8651 ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
8652 texlive-fonts-ec
8653 texlive-generic-iftex
8654 texlive-pdftex
8655 texlive-latex-capt-of
8656 texlive-latex-cmap
8657 texlive-latex-environ
8658 texlive-latex-eqparbox
8659 texlive-etoolbox
8660 texlive-latex-expdlist
8661 texlive-latex-fancyhdr
8662 texlive-latex-fancyvrb
8663 texlive-latex-fncychap
8664 texlive-latex-float
8665 texlive-latex-framed
8666 texlive-latex-geometry
8667 texlive-latex-graphics
8668 texlive-hyperref
8669 texlive-latex-mdwtools
8670 texlive-latex-multirow
8671 texlive-latex-needspace
8672 texlive-oberdiek
8673 texlive-latex-parskip
8674 texlive-latex-preview
8675 texlive-latex-tabulary
8676 texlive-latex-threeparttable
8677 texlive-latex-titlesec
8678 texlive-latex-trimspaces
8679 texlive-latex-ucs
8680 texlive-latex-upquote
8681 texlive-url
8682 texlive-latex-varwidth
8683 texlive-latex-wrapfig)))
8684 ("texinfo" ,texinfo)))))
8685
8686 (define-public python-urwid
8687 (package
8688 (name "python-urwid")
8689 (version "2.1.2")
8690 (source
8691 (origin
8692 (method url-fetch)
8693 (uri (pypi-uri "urwid" version))
8694 (sha256
8695 (base32
8696 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8697 (build-system python-build-system)
8698 (home-page "http://urwid.org")
8699 (synopsis "Console user interface library for Python")
8700 (description
8701 "Urwid is a curses-based UI/widget library for Python. It includes many
8702 features useful for text console applications.")
8703 (properties `((python2-variant . ,(delay python2-urwid))))
8704 (license license:lgpl2.1+)))
8705
8706 (define-public python2-urwid
8707 (let ((base (package-with-python2
8708 (strip-python2-variant python-urwid))))
8709 (package
8710 (inherit base)
8711 (version "2.1.0")
8712 (source
8713 (origin
8714 (method url-fetch)
8715 (uri (pypi-uri "urwid" version))
8716 (sha256
8717 (base32
8718 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8719
8720 (define-public python-urwid-readline
8721 (package
8722 (name "python-urwid-readline")
8723 (version "0.12")
8724 (source
8725 (origin
8726 (method git-fetch)
8727 (uri (git-reference
8728 (url "https://github.com/rr-/urwid_readline")
8729 (commit version)))
8730 (file-name (git-file-name name version))
8731 (sha256
8732 (base32
8733 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8734 (build-system python-build-system)
8735 (arguments
8736 `(#:phases
8737 (modify-phases %standard-phases
8738 (replace 'check
8739 (lambda* (#:key tests? #:allow-other-keys)
8740 (when tests?
8741 (invoke "python" "-m" "pytest"))
8742 #t)))))
8743 (propagated-inputs
8744 `(("python-urwid" ,python-urwid)))
8745 (native-inputs
8746 `(("python-pytest" ,python-pytest)))
8747 (home-page "https://github.com/rr-/urwid_readline")
8748 (synopsis "Text input widget for urwid that supports readline shortcuts")
8749 (description
8750 "This package provides a textbox edit widget for @code{python-urwid} that
8751 supports @code{readline} shortcuts.")
8752 (license license:expat)))
8753
8754 (define-public python-textdistance
8755 (package
8756 (name "python-textdistance")
8757 (version "4.2.1")
8758 (source
8759 (origin
8760 ;; There are no tests in the PyPI tarball.
8761 (method git-fetch)
8762 (uri (git-reference
8763 (url "https://github.com/life4/textdistance")
8764 (commit (string-append "v." version))))
8765 (file-name (git-file-name name version))
8766 (sha256
8767 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8768 (build-system python-build-system)
8769 (arguments
8770 `(#:test-target "pytest"
8771 #:phases
8772 (modify-phases %standard-phases
8773 (add-after 'unpack 'delete-external-test
8774 (lambda _
8775 ;; All tests in this file require external libraries.
8776 (delete-file "tests/test_external.py")
8777 #t)))))
8778 (native-inputs
8779 `(("python-hypothesis" ,python-hypothesis)
8780 ("python-isort" ,python-isort)
8781 ("python-numpy" ,python-numpy)
8782 ("python-pytest" ,python-pytest)
8783 ("python-pytest-runner" ,python-pytest-runner)
8784 ("python-tabulate" ,python-tabulate)))
8785 (home-page "https://github.com/life4/textdistance")
8786 (synopsis "Compute distance between the two texts")
8787 (description "@code{textdistance} is a pure Python library for comparing
8788 distance between two or more sequences by many algorithms.")
8789 (license license:expat)))
8790
8791 (define-public python-urwidtrees
8792 (package
8793 (name "python-urwidtrees")
8794 (version "1.0.2")
8795 (source
8796 (origin
8797 (method git-fetch)
8798 ;; package author intends on distributing via github rather than pypi:
8799 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8800 (uri (git-reference
8801 (url "https://github.com/pazz/urwidtrees")
8802 (commit version)))
8803 (file-name (git-file-name name version))
8804 (sha256
8805 (base32
8806 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8807 (build-system python-build-system)
8808 (arguments
8809 '(#:use-setuptools? #f
8810 #:tests? #f)) ; no tests
8811 (propagated-inputs `(("python-urwid" ,python-urwid)))
8812 (home-page "https://github.com/pazz/urwidtrees")
8813 (synopsis "Tree widgets for urwid")
8814 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8815 toolkit. Use it to build trees of widgets.")
8816 (license license:gpl3+)))
8817
8818 (define-public python2-urwidtrees
8819 (package-with-python2 python-urwidtrees))
8820
8821 (define-public python-ua-parser
8822 (package
8823 (name "python-ua-parser")
8824 (version "0.8.0")
8825 (source
8826 (origin
8827 (method url-fetch)
8828 (uri (pypi-uri "ua-parser" version))
8829 (sha256
8830 (base32
8831 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8832 (build-system python-build-system)
8833 (arguments
8834 `(#:tests? #f)) ;no test suite in release
8835 (native-inputs
8836 `(("python-pyyaml" ,python-pyyaml)))
8837 (home-page "https://github.com/ua-parser/uap-python")
8838 (synopsis "User agent parser")
8839 (description
8840 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8841 (license license:asl2.0)))
8842
8843 (define-public python2-ua-parser
8844 (package-with-python2 python-ua-parser))
8845
8846 (define-public python-user-agents
8847 (package
8848 (name "python-user-agents")
8849 (version "1.1.0")
8850 (source
8851 (origin
8852 (method url-fetch)
8853 (uri (pypi-uri "user-agents" version))
8854 (sha256
8855 (base32
8856 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8857 (build-system python-build-system)
8858 (arguments
8859 `(#:tests? #f)) ;missing devices.json test file in release
8860 (propagated-inputs
8861 `(("python-ua-parser" ,python-ua-parser)))
8862 (home-page "https://github.com/selwin/python-user-agents")
8863 (synopsis "User Agent strings parsing library")
8864 (description
8865 "A library to identify devices (phones, tablets) and their capabilities by
8866 parsing (browser/HTTP) user agent strings.")
8867 (license license:expat)))
8868
8869 (define-public python2-user-agents
8870 (package-with-python2 python-user-agents))
8871
8872 (define-public python-dbus
8873 (package
8874 (name "python-dbus")
8875 (version "1.2.16")
8876 (source
8877 (origin
8878 (method url-fetch)
8879 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8880 "dbus-python-" version ".tar.gz"))
8881 (sha256
8882 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8883 (build-system gnu-build-system)
8884 (native-inputs
8885 `(("pkg-config" ,pkg-config)))
8886 (inputs
8887 `(("python" ,python-wrapper)
8888 ("dbus-glib" ,dbus-glib)))
8889 (synopsis "Python bindings for D-bus")
8890 (description "python-dbus provides bindings for libdbus, the reference
8891 implementation of D-Bus.")
8892 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8893 (license license:expat)))
8894
8895 (define-public python2-dbus
8896 (package/inherit python-dbus
8897 (name "python2-dbus")
8898 (inputs `(("python" ,python-2)
8899 ,@(alist-delete "python"
8900 (package-inputs python-dbus)
8901 equal?)))))
8902
8903 (define-public python-notify2
8904 (package
8905 (name "python-notify2")
8906 (version "0.3.1")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "notify2" version))
8911 (sha256
8912 (base32
8913 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8914 (build-system python-build-system)
8915 (arguments `(#:tests? #f)) ; tests depend on system state
8916 (native-inputs
8917 `(("python-dbus" ,python-dbus)))
8918 (home-page "https://bitbucket.org/takluyver/pynotify2")
8919 (synopsis "Python interface to D-Bus notifications")
8920 (description
8921 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8922 It is a reimplementation of pynotify in pure Python, and an alternative to
8923 the GObject Introspection bindings to libnotify for non-GTK applications.")
8924 (license (list license:bsd-2
8925 license:lgpl2.1+))))
8926
8927 (define-public python2-notify2
8928 (package-with-python2 python-notify2))
8929
8930 ;; beautifulsoup4 has a totally different namespace than 3.x,
8931 ;; and pypi seems to put it under its own name, so I guess we should too
8932 (define-public python-beautifulsoup4
8933 (package
8934 (name "python-beautifulsoup4")
8935 (version "4.9.3")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "beautifulsoup4" version))
8940 (sha256
8941 (base32
8942 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8943 (build-system python-build-system)
8944 (arguments
8945 `(#:phases
8946 (modify-phases %standard-phases
8947 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8948 ;; must use this conversion script when building with Python 3. The
8949 ;; conversion script also runs the tests.
8950 ;; For more information, see the file 'convert-py3k' in the source
8951 ;; distribution.
8952 (replace 'check
8953 (lambda _ (invoke "./convert-py3k"))))))
8954 (propagated-inputs
8955 `(("python-soupsieve" ,python-soupsieve)))
8956 (home-page
8957 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8958 (synopsis
8959 "Python screen-scraping library")
8960 (description
8961 "Beautiful Soup is a Python library designed for rapidly setting up
8962 screen-scraping projects. It offers Pythonic idioms for navigating,
8963 searching, and modifying a parse tree, providing a toolkit for
8964 dissecting a document and extracting what you need. It automatically
8965 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8966 (license license:expat)
8967 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8968
8969 (define-public python2-beautifulsoup4
8970 (let ((base (package-with-python2
8971 (strip-python2-variant python-beautifulsoup4))))
8972 (package/inherit base
8973 (arguments `(#:python ,python-2)))))
8974
8975 (define-public python-soupsieve
8976 (package
8977 (name "python-soupsieve")
8978 (version "2.2.1")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (pypi-uri "soupsieve" version))
8983 (sha256
8984 (base32
8985 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8986 (build-system python-build-system)
8987 (arguments
8988 ;;XXX: 2 tests fail currently despite claming they were to be
8989 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8990 ;;don't want to create a circular dependency.
8991 (list #:tests? #f
8992 #:phases
8993 #~(modify-phases %standard-phases
8994 ;; Circular dependency with python-beautifulsoup4.
8995 (delete 'sanity-check))))
8996 (home-page "https://github.com/facelessuser/soupsieve")
8997 (synopsis "CSS selector library")
8998 (description
8999 "Soup Sieve is a CSS selector library designed to be used with Beautiful
9000 Soup 4. It aims to provide selecting, matching, and filtering using modern
9001 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
9002 specifications up through the latest CSS level 4 drafts and beyond (though
9003 some are not yet implemented).")
9004 (properties `((python2-variant . ,(delay python2-soupsieve))))
9005 (license license:expat)))
9006
9007 ;; This is the last version that supports python-2
9008 (define-public python2-soupsieve
9009 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
9010 (package
9011 (inherit base)
9012 (version "1.9.6")
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "soupsieve" version))
9017 (sha256
9018 (base32
9019 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
9020 (propagated-inputs
9021 `(("python2-backports-functools-lru-cache"
9022 ,python2-backports-functools-lru-cache)
9023 ,@(package-propagated-inputs base))))))
9024
9025 (define-public python-netifaces
9026 (package
9027 (name "python-netifaces")
9028 (version "0.10.9")
9029 (source
9030 (origin
9031 (method url-fetch)
9032 (uri (pypi-uri "netifaces" version))
9033 (sha256
9034 (base32
9035 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
9036 (build-system python-build-system)
9037 (home-page "https://github.com/al45tair/netifaces")
9038 (synopsis
9039 "Python module for portable network interface information")
9040 (description
9041 "Netifaces is a Python module providing information on network
9042 interfaces in an easy and portable manner.")
9043 (license license:expat)))
9044
9045 (define-public python2-netifaces
9046 (package-with-python2 python-netifaces))
9047
9048 (define-public python-networkx
9049 (package
9050 (name "python-networkx")
9051 (version "2.6.2")
9052 (source
9053 (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "networkx" version))
9056 (sha256
9057 (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
9058 (build-system python-build-system)
9059 (arguments
9060 '(#:phases (modify-phases %standard-phases
9061 (replace 'check
9062 (lambda* (#:key tests? #:allow-other-keys)
9063 (if tests?
9064 (invoke "pytest" "-vv" "--pyargs" "networkx")
9065 (format #t "test suite not run~%"))
9066 #t)))))
9067 ;; python-decorator is needed at runtime.
9068 (propagated-inputs
9069 `(("python-decorator" ,python-decorator)))
9070 (native-inputs
9071 `(("python-pytest" ,python-pytest)))
9072 (home-page "https://networkx.github.io/")
9073 (synopsis "Python module for creating and manipulating graphs and networks")
9074 (description
9075 "NetworkX is a Python package for the creation, manipulation, and study
9076 of the structure, dynamics, and functions of complex networks.")
9077 (properties `((python2-variant . ,(delay python2-networkx))))
9078 (license license:bsd-3)))
9079
9080 ;; NetworkX 2.2 is the last version with support for Python 2.
9081 (define-public python2-networkx
9082 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
9083 (package
9084 (inherit base)
9085 (version "2.2")
9086 (source (origin
9087 (method url-fetch)
9088 (uri (pypi-uri "networkx" version ".zip"))
9089 (sha256
9090 (base32
9091 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
9092 (arguments
9093 `(#:python ,python-2))
9094 (native-inputs
9095 `(("python-nose" ,python2-nose)
9096 ("unzip" ,unzip))))))
9097
9098 (define-public python-datrie
9099 (package
9100 (name "python-datrie")
9101 (version "0.8.2")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "datrie" version))
9106 (sha256
9107 (base32
9108 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
9109 (build-system python-build-system)
9110 (native-inputs
9111 `(("python-cython" ,python-cython)
9112 ("python-hypothesis" ,python-hypothesis)
9113 ("python-pytest" ,python-pytest)
9114 ("python-pytest-runner" ,python-pytest-runner)))
9115 (home-page "https://github.com/kmike/datrie")
9116 (synopsis "Fast, efficiently stored trie for Python")
9117 (description
9118 "This package provides a fast, efficiently stored trie implementation for
9119 Python.")
9120 (license license:lgpl2.1+)))
9121
9122 (define-public python-amply
9123 (package
9124 (name "python-amply")
9125 (version "0.1.4")
9126 (source
9127 (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "amply" version))
9130 (sha256
9131 (base32
9132 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
9133 (build-system python-build-system)
9134 (propagated-inputs
9135 `(("python-docutils" ,python-docutils)
9136 ("python-pyparsing" ,python-pyparsing)))
9137 (native-inputs
9138 `(("python-setuptools-scm" ,python-setuptools-scm)))
9139 (home-page "https://github.com/willu47/amply")
9140 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
9141 (description
9142 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
9143 structures.")
9144 (license license:epl1.0)))
9145
9146 (define-public python-pulp
9147 (package
9148 (name "python-pulp")
9149 (version "2.4")
9150 (source
9151 (origin
9152 (method url-fetch)
9153 (uri (pypi-uri "PuLP" version))
9154 (sha256
9155 (base32
9156 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
9157 (build-system python-build-system)
9158 (propagated-inputs
9159 `(("python-amply" ,python-amply)))
9160 (home-page "https://github.com/coin-or/pulp")
9161 (synopsis "Linear Programming modeler")
9162 (description
9163 "PuLP is a Linear Programming modeler written in Python. PuLP can
9164 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
9165 solve linear problems.")
9166 (license license:expat)))
9167
9168 (define-public python-toposort
9169 (package
9170 (name "python-toposort")
9171 (version "1.6")
9172 (source
9173 (origin
9174 (method url-fetch)
9175 (uri (pypi-uri "toposort" version))
9176 (sha256
9177 (base32
9178 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
9179 (build-system python-build-system)
9180 (home-page "https://gitlab.com/ericvsmith/toposort")
9181 (synopsis "Topological sort algorithm")
9182 (description
9183 "This package provides an implementation of a topological sort
9184 algorithm.")
9185 (license license:asl2.0)))
9186
9187 (define-public python-three-merge
9188 (package
9189 (name "python-three-merge")
9190 (version "0.1.1")
9191 (source
9192 (origin
9193 ;; There are no tests in the PyPI tarball.
9194 (method git-fetch)
9195 (uri (git-reference
9196 (url "https://github.com/spyder-ide/three-merge")
9197 (commit (string-append "v" version))))
9198 (file-name (git-file-name name version))
9199 (sha256
9200 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
9201 (build-system python-build-system)
9202 (arguments
9203 `(#:test-target "pytest"))
9204 (propagated-inputs
9205 `(("python-diff-match-patch" ,python-diff-match-patch)))
9206 (native-inputs
9207 `(("python-flaky" ,python-flaky)
9208 ("python-pytest" ,python-pytest)
9209 ("python-pytest-cov" ,python-pytest-cov)
9210 ("python-pytest-runner" ,python-pytest-runner)
9211 ("python-pytest-timeout" ,python-pytest-timeout)))
9212 (home-page "https://github.com/spyder-ide/three-merge")
9213 (synopsis "Library for merging two strings with respect to a base one")
9214 (description
9215 "This package provides a Python library to perform a 3-way merge between
9216 strings, based on @code{diff-match-patch}. This library performs merges at a
9217 character level, as opposed to most VCS systems, which opt for a line-based
9218 approach.")
9219 (license license:expat)))
9220
9221 (define-public snakemake
9222 (package
9223 (name "snakemake")
9224 (version "5.32.2")
9225 (source
9226 (origin
9227 (method url-fetch)
9228 (uri (pypi-uri "snakemake" version))
9229 (sha256
9230 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
9231 (build-system python-build-system)
9232 (arguments
9233 ;; TODO: Package missing test dependencies.
9234 '(#:tests? #f
9235 #:phases
9236 (modify-phases %standard-phases
9237 ;; For cluster execution Snakemake will call Python. Since there is
9238 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
9239 ;; this by calling the snakemake wrapper instead.
9240 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
9241 (lambda* (#:key outputs #:allow-other-keys)
9242 (substitute* "snakemake/executors/__init__.py"
9243 (("\\{sys.executable\\} -m snakemake")
9244 (string-append (assoc-ref outputs "out")
9245 "/bin/snakemake")))
9246 #t)))))
9247 (propagated-inputs
9248 `(("python-appdirs" ,python-appdirs)
9249 ("python-configargparse" ,python-configargparse)
9250 ("python-datrie" ,python-datrie)
9251 ("python-docutils" ,python-docutils)
9252 ("python-gitpython" ,python-gitpython)
9253 ("python-jinja2" ,python-jinja2)
9254 ("python-jsonschema" ,python-jsonschema)
9255 ("python-nbformat" ,python-nbformat)
9256 ("python-networkx" ,python-networkx)
9257 ("python-psutil" ,python-psutil)
9258 ("python-pulp" ,python-pulp)
9259 ("python-pyyaml" ,python-pyyaml)
9260 ("python-ratelimiter" ,python-ratelimiter)
9261 ("python-requests" ,python-requests)
9262 ("python-toposort" ,python-toposort)
9263 ("python-wrapt" ,python-wrapt)))
9264 (home-page "https://snakemake.readthedocs.io")
9265 (synopsis "Python-based execution environment for make-like workflows")
9266 (description
9267 "Snakemake aims to reduce the complexity of creating workflows by
9268 providing a clean and modern domain specific specification language (DSL) in
9269 Python style, together with a fast and comfortable execution environment.")
9270 (license license:expat)))
9271
9272 (define-public python-pyqrcode
9273 (package
9274 (name "python-pyqrcode")
9275 (version "1.2.1")
9276 (source
9277 (origin
9278 (method url-fetch)
9279 (uri (pypi-uri "PyQRCode" version))
9280 (sha256
9281 (base32
9282 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
9283 (build-system python-build-system)
9284 (home-page
9285 "https://github.com/mnooner256/pyqrcode")
9286 (synopsis "QR code generator")
9287 (description
9288 "Pyqrcode is a QR code generator written purely in Python with
9289 SVG, EPS, PNG and terminal output.")
9290 (license license:bsd-3)))
9291
9292 (define-public python-seaborn
9293 (package
9294 (name "python-seaborn")
9295 (version "0.11.1")
9296 (source
9297 (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "seaborn" version))
9300 (sha256
9301 (base32 "1b81p9s6li3b606ivgbynrh102fclwlw74m8qxzsii9pv6p8xrs4"))
9302 (patches (search-patches "python-seaborn-kde-test.patch"))))
9303 (build-system python-build-system)
9304 (arguments
9305 `(#:phases
9306 (modify-phases %standard-phases
9307 (add-before 'check 'start-xserver
9308 (lambda _
9309 ;; There must be a running X server and make check doesn't
9310 ;; start one. Therefore we must do it.
9311 (system "Xvfb :1 &")
9312 (setenv "DISPLAY" ":1")))
9313 (replace 'check
9314 (lambda* (#:key tests? #:allow-other-keys)
9315 (when tests?
9316 (invoke "pytest" "seaborn")))))))
9317 (propagated-inputs
9318 `(("python-pandas" ,python-pandas)
9319 ("python-matplotlib" ,python-matplotlib)
9320 ("python-numpy" ,python-numpy)
9321 ("python-scipy" ,python-scipy)))
9322 (native-inputs
9323 `(("python-pytest" ,python-pytest)
9324 ("xorg-server" ,xorg-server-for-tests)))
9325 (home-page "https://seaborn.pydata.org/")
9326 (synopsis "Statistical data visualization")
9327 (description
9328 "Seaborn is a library for making attractive and informative statistical
9329 graphics in Python. It is built on top of matplotlib and tightly integrated
9330 with the PyData stack, including support for numpy and pandas data structures
9331 and statistical routines from scipy and statsmodels.")
9332 (properties `((python2-variant . ,(delay python2-seaborn))))
9333 (license license:bsd-3)))
9334
9335 ;; 0.9.1 is the last release with support for Python 2.
9336 (define-public python2-seaborn
9337 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
9338 (package
9339 (inherit base)
9340 (version "0.9.1")
9341 (source (origin
9342 (method url-fetch)
9343 (uri (pypi-uri "seaborn" version))
9344 (sha256
9345 (base32
9346 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
9347
9348 (define-public python-mpmath
9349 (package
9350 (name "python-mpmath")
9351 (version "1.1.0")
9352 (source (origin
9353 (method url-fetch)
9354 (uri (pypi-uri "mpmath" version))
9355 (file-name (git-file-name name version))
9356 (sha256
9357 (base32
9358 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
9359 (build-system python-build-system)
9360 (native-inputs
9361 `(("python-pytest" ,python-pytest)))
9362 (arguments
9363 '(#:phases
9364 (modify-phases %standard-phases
9365 (replace 'check
9366 (lambda _
9367 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
9368 (home-page "https://mpmath.org")
9369 (synopsis "Arbitrary-precision floating-point arithmetic in python")
9370 (description
9371 "@code{mpmath} can be used as an arbitrary-precision substitute for
9372 Python's float/complex types and math/cmath modules, but also does much
9373 more advanced mathematics.")
9374 (license license:bsd-3)))
9375
9376 (define-public python2-mpmath
9377 (package-with-python2 python-mpmath))
9378
9379 (define-public python-bigfloat
9380 (package
9381 (name "python-bigfloat")
9382 (version "0.3.0")
9383 (source
9384 (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "bigfloat" version))
9387 (sha256
9388 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
9389 (build-system python-build-system)
9390 (inputs
9391 `(("mpfr" ,mpfr)))
9392 (home-page "https://github.com/mdickinson/bigfloat")
9393 (synopsis "Arbitrary precision floating-point arithmetic for Python")
9394 (description
9395 "This package provides a Python interface to the MPFR library for
9396 multiprecision arithmetic.")
9397 (license license:lgpl3+)))
9398
9399 (define-public python-sympy
9400 (package
9401 (name "python-sympy")
9402 (version "1.7.1")
9403 (source
9404 (origin
9405 (method url-fetch)
9406 (uri (pypi-uri "sympy" version))
9407 (sha256
9408 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
9409 (build-system python-build-system)
9410 (arguments
9411 `(#:phases
9412 (modify-phases %standard-phases
9413 (replace 'check
9414 (lambda* (#:key outputs #:allow-other-keys)
9415 (invoke
9416 (or (which "python3") (which "python"))
9417 "-c" "import sympy; sympy.test(\"/core\")"))))))
9418 (propagated-inputs
9419 `(("python-mpmath" ,python-mpmath)))
9420 (home-page "https://www.sympy.org/")
9421 (synopsis "Python library for symbolic mathematics")
9422 (description
9423 "SymPy is a Python library for symbolic mathematics. It aims to become a
9424 full-featured computer algebra system (CAS) while keeping the code as simple
9425 as possible in order to be comprehensible and easily extensible.")
9426 (license license:bsd-3)))
9427
9428 (define-public python2-sympy
9429 (package
9430 (inherit (package-with-python2 python-sympy))
9431 (version "1.5.1") ; last release for python2
9432 (source
9433 (origin
9434 (method url-fetch)
9435 (uri (pypi-uri "sympy" version))
9436 (sha256
9437 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
9438
9439 (define-public python-q
9440 (package
9441 (name "python-q")
9442 (version "2.6")
9443 (source
9444 (origin
9445 (method url-fetch)
9446 (uri (pypi-uri "q" version))
9447 (sha256
9448 (base32
9449 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
9450 (build-system python-build-system)
9451 (home-page "https://github.com/zestyping/q")
9452 (synopsis "Quick-and-dirty debugging output for tired programmers")
9453 (description
9454 "q is a Python module for \"print\" style of debugging Python code. It
9455 provides convenient short API for print out of values, tracebacks, and
9456 falling into the Python interpreter.")
9457 (license license:asl2.0)))
9458
9459 (define-public python2-q
9460 (package-with-python2 python-q))
9461
9462 (define-public python-xlib
9463 (package
9464 (name "python-xlib")
9465 (version "0.29")
9466 (source
9467 (origin
9468 (method git-fetch)
9469 (uri (git-reference
9470 (url "https://github.com/python-xlib/python-xlib")
9471 (commit version)))
9472 (file-name (git-file-name name version))
9473 (sha256
9474 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
9475 (build-system python-build-system)
9476 (arguments
9477 `(#:phases
9478 (modify-phases %standard-phases
9479 (add-before 'check 'start-xserver
9480 (lambda* (#:key inputs #:allow-other-keys)
9481 (let ((xorg-server (assoc-ref inputs "xorg-server")))
9482 ;; There must be a running X server and make check doesn't
9483 ;; start one. Therefore we must do it.
9484 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
9485 (setenv "DISPLAY" ":1")
9486 #t))))))
9487 (native-inputs
9488 `(("python-mock" ,python-mock)
9489 ("python-setuptools-scm" ,python-setuptools-scm)
9490 ("xorg-server" ,xorg-server)))
9491 (propagated-inputs
9492 `(("python-six" ,python-six)))
9493 (home-page "https://github.com/python-xlib/python-xlib")
9494 (synopsis "Python X11 client library")
9495 (description
9496 "The Python X Library is intended to be a fully functional
9497 X client library for Python programs. It is useful to implement
9498 low-level X clients. It is written entirely in Python.")
9499 (license license:gpl2+)))
9500
9501 (define-public python2-xlib
9502 (package-with-python2 python-xlib))
9503
9504 (define-public python-singledispatch
9505 (package
9506 (name "python-singledispatch")
9507 (version "3.4.0.3")
9508 (source
9509 (origin
9510 (method url-fetch)
9511 (uri (pypi-uri "singledispatch" version))
9512 (sha256
9513 (base32
9514 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
9515 (build-system python-build-system)
9516 (native-inputs
9517 `(("python-six" ,python-six))) ; required for conversion, not at run-time
9518 (home-page
9519 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
9520 (synopsis "Backport of singledispatch feature from Python 3.4")
9521 (description
9522 "This library brings functools.singledispatch from Python 3.4 to Python
9523 2.6-3.3.")
9524 (license license:expat)))
9525
9526 (define-public python2-singledispatch
9527 (package-with-python2 python-singledispatch))
9528
9529 ;; the python- version can be removed with python-3.5
9530 (define-public python-backports-abc
9531 (package
9532 (name "python-backports-abc")
9533 (version "0.5")
9534 (source
9535 (origin
9536 (method url-fetch)
9537 (uri (pypi-uri "backports_abc" version))
9538 (sha256
9539 (base32
9540 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9541 (build-system python-build-system)
9542 (home-page "https://github.com/cython/backports_abc")
9543 (synopsis "Backport of additions to the 'collections.abc' module")
9544 (description
9545 "Python-backports-abc provides a backport of additions to the
9546 @code{collections.abc} module in Python-3.5.")
9547 (license license:psfl)))
9548
9549 (define-public python2-backports-abc
9550 (package-with-python2 python-backports-abc))
9551
9552 (define-public python-backports-csv
9553 (package
9554 (name "python-backports-csv")
9555 (version "1.0.7")
9556 (source
9557 (origin
9558 (method url-fetch)
9559 (uri (pypi-uri "backports.csv" version))
9560 (sha256
9561 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9562 (build-system python-build-system)
9563 (home-page "https://github.com/ryanhiebert/backports.csv")
9564 (synopsis "Backport of Python 3's csv module for Python 2")
9565 (description
9566 "Provides a backport of Python 3's @code{csv} module for parsing
9567 comma separated values. The API of the @code{csv} module in Python 2
9568 is drastically different from the @code{csv} module in Python 3.
9569 This is due, for the most part, to the difference between str in
9570 Python 2 and Python 3.")
9571 (license license:psfl)))
9572
9573 (define-public python2-backports-csv
9574 (package-with-python2 python-backports-csv))
9575
9576 (define-public python2-backports-shutil-get-terminal-size
9577 (package
9578 (name "python2-backports-shutil-get-terminal-size")
9579 (version "1.0.0")
9580 (source
9581 (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9584 (sha256
9585 (base32
9586 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9587 (build-system python-build-system)
9588 (arguments
9589 `(#:python ,python-2
9590 #:phases
9591 (modify-phases %standard-phases
9592 (replace 'check
9593 (lambda _
9594 (invoke "py.test" "-v"))))))
9595 (native-inputs
9596 `(("python2-pytest" ,python2-pytest)))
9597 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9598 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9599 (description
9600 "This package provides a backport of the @code{get_terminal_size
9601 function} from Python 3.3's @code{shutil}.
9602 Unlike the original version it is written in pure Python rather than C,
9603 so it might be a tiny bit slower.")
9604 (license license:expat)))
9605
9606 (define-public python-waf
9607 (package
9608 (name "python-waf")
9609 (version "2.0.19")
9610 (source (origin
9611 (method url-fetch)
9612 (uri (string-append "https://waf.io/"
9613 "waf-" version ".tar.bz2"))
9614 (sha256
9615 (base32
9616 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9617 (build-system python-build-system)
9618 (arguments
9619 '(#:phases
9620 (modify-phases %standard-phases
9621 (replace 'build
9622 (lambda _
9623 ;; XXX: Find a way to add all extra tools.
9624 (let ((tools '("gccdeps"
9625 "clang_compilation_database")))
9626 (invoke "python" "waf-light" "configure" "build"
9627 (string-append "--tools="
9628 (string-join tools ","))))))
9629 (replace 'check
9630 (lambda _
9631 (invoke "python" "waf" "--version")))
9632 (replace 'install
9633 (lambda* (#:key outputs #:allow-other-keys)
9634 (let ((out (assoc-ref outputs "out")))
9635 (install-file "waf" (string-append out "/bin")))
9636 #t))
9637 ;; waf breaks when it is wrapped.
9638 (delete 'wrap))))
9639 (home-page "https://waf.io/")
9640 (synopsis "Python-based build system")
9641 (description
9642 "Waf is a Python-based framework for configuring, compiling and installing
9643 applications.")
9644 (license license:bsd-3)))
9645
9646 (define-public python2-waf
9647 (package-with-python2 python-waf))
9648
9649 (define-public python-pyzmq
9650 (package
9651 (name "python-pyzmq")
9652 (version "22.1.0")
9653 (source
9654 (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "pyzmq" version))
9657 (sha256
9658 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9659 (build-system python-build-system)
9660 (arguments
9661 `(#:configure-flags
9662 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9663 #:phases
9664 (modify-phases %standard-phases
9665 (add-before 'check 'build-extensions
9666 (lambda _
9667 ;; Cython extensions have to be built before running the tests.
9668 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9669 (inputs
9670 `(("zeromq" ,zeromq)))
9671 (native-inputs
9672 `(("pkg-config" ,pkg-config)
9673 ("python-cython" ,python-cython)
9674 ("python-pytest" ,python-pytest)))
9675 (home-page "https://github.com/zeromq/pyzmq")
9676 (synopsis "Python bindings for 0MQ")
9677 (description
9678 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9679 (license license:bsd-4)))
9680
9681 (define-public python-pep8
9682 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9683 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9684 ;; some dependents' test suites, and nothing more.
9685 (package
9686 (name "python-pep8")
9687 (version "1.7.0")
9688 (source
9689 (origin
9690 (method url-fetch)
9691 (uri (pypi-uri "pep8" version))
9692 (sha256
9693 (base32
9694 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9695 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9696 (build-system python-build-system)
9697 (home-page "https://pep8.readthedocs.org/")
9698 (synopsis "Python style guide checker")
9699 (description
9700 "This tools checks Python code against some of the style conventions in
9701 PEP 8.")
9702 (license license:expat)))
9703
9704 (define-public python2-pep8
9705 (package-with-python2 python-pep8))
9706
9707 (define-public python-pep8-naming
9708 (package
9709 (name "python-pep8-naming")
9710 (version "0.12.0")
9711 (source
9712 (origin
9713 (method url-fetch)
9714 (uri (pypi-uri "pep8-naming" version))
9715 (sha256
9716 (base32
9717 "04kyh9hkpyc8jzj16d1kkk29b5n8miqdvbs0zm035n1z5z5kx6hz"))))
9718 (build-system python-build-system)
9719 (propagated-inputs
9720 `(("python-flake8" ,python-flake8)
9721 ("python-flake8-polyfill" ,python-flake8-polyfill)))
9722 (home-page "https://github.com/PyCQA/pep8-naming")
9723 (synopsis "Check PEP-8 naming conventions")
9724 (description
9725 "This package provides the @code{pep8-naming} Python module, a
9726 plugin for flake8 to check PEP-8 naming conventions.")
9727 (license license:expat)))
9728
9729 (define-public python-pep517
9730 (package
9731 (inherit python-pep517-bootstrap)
9732 (name "python-pep517")
9733 (arguments
9734 '(#:phases
9735 (modify-phases %standard-phases
9736 (replace 'check
9737 (lambda* (#:key tests? #:allow-other-keys)
9738 (delete-file "pytest.ini")
9739 ;; This test tries to connect to the internet
9740 (delete-file "tests/test_meta.py")
9741 (if tests?
9742 (invoke "pytest")
9743 #t))))))
9744 (native-inputs
9745 `(("python-mock" ,python-mock)
9746 ("python-pytest" ,python-pytest)
9747 ("python-testpath" ,python-testpath)))
9748 (properties `((python2-variant . ,(delay python2-pep517))))))
9749
9750 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9751 (define-public python2-pep517
9752 (let ((base (package-with-python2
9753 (strip-python2-variant python-pep517))))
9754 (package/inherit base
9755 (name "python2-pep517")
9756 (arguments
9757 `(#:tests? #f
9758 ,@(package-arguments base)))
9759 (native-inputs `()))))
9760
9761 (define-public python-pyflakes
9762 (package
9763 (name "python-pyflakes")
9764 (version "2.3.1")
9765 (source
9766 (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "pyflakes" version))
9769 (sha256
9770 (base32
9771 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9772 (build-system python-build-system)
9773 (home-page "https://github.com/PyCQA/pyflakes")
9774 (synopsis "Passive checker of Python programs")
9775 (description
9776 "Pyflakes statically checks Python source code for common errors.")
9777 (license license:expat)))
9778
9779 (define-public python2-pyflakes
9780 (package-with-python2 python-pyflakes))
9781
9782 (define-public python-pyflakes-2.2
9783 (package
9784 (inherit python-pyflakes)
9785 (version "2.2.0")
9786 (source (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "pyflakes" version))
9789 (sha256
9790 (base32
9791 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9792
9793 (define-public python-mccabe
9794 (package
9795 (name "python-mccabe")
9796 (version "0.6.1")
9797 (source
9798 (origin
9799 (method url-fetch)
9800 (uri (pypi-uri "mccabe" version))
9801 (sha256
9802 (base32
9803 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9804 (build-system python-build-system)
9805 (native-inputs
9806 `(("python-toml", python-toml)
9807 ("python-pytest" ,python-pytest-bootstrap)
9808 ("python-pytest-runner" ,python-pytest-runner)))
9809 (home-page "https://github.com/PyCQA/mccabe")
9810 (synopsis "McCabe checker, plugin for flake8")
9811 (description "This package provides a Flake8 plug-in to compute the McCabe
9812 cyclomatic complexity of Python source code.")
9813 (license license:expat)))
9814
9815 (define-public python2-mccabe
9816 (package-with-python2 python-mccabe))
9817
9818 (define-public python-flake8
9819 (package
9820 (name "python-flake8")
9821 (version "3.9.1")
9822 (source (origin
9823 (method url-fetch)
9824 (uri (pypi-uri "flake8" version))
9825 (sha256
9826 (base32
9827 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9828 (build-system python-build-system)
9829 (arguments
9830 `(#:phases
9831 (modify-phases %standard-phases
9832 (replace 'check
9833 (lambda* (#:key inputs outputs #:allow-other-keys)
9834 (add-installed-pythonpath inputs outputs)
9835 (invoke "pytest" "-v"))))))
9836 (propagated-inputs
9837 `(("python-pycodestyle" ,python-pycodestyle)
9838 ("python-entrypoints" ,python-entrypoints)
9839 ("python-pyflakes" ,python-pyflakes)
9840 ("python-mccabe" ,python-mccabe)))
9841 (native-inputs
9842 `(("python-mock" ,python-mock)
9843 ("python-pytest" ,python-pytest)))
9844 (home-page "https://gitlab.com/pycqa/flake8")
9845 (synopsis
9846 "The modular source code checker: pep8, pyflakes and co")
9847 (description
9848 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9849 (properties `((python2-variant . ,(delay python2-flake8))))
9850 (license license:expat)))
9851
9852 (define-public python2-flake8
9853 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9854 (package/inherit base
9855 (propagated-inputs
9856 `(("python2-configparser" ,python2-configparser)
9857 ("python2-enum34" ,python2-enum34)
9858 ("python2-functools32" ,python2-functools32)
9859 ("python2-typing" ,python2-typing)
9860 ,@(package-propagated-inputs base))))))
9861
9862 (define-public python-flake8-3.8
9863 (package
9864 (inherit python-flake8)
9865 (version "3.8.4")
9866 (source (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "flake8" version))
9869 (sha256
9870 (base32
9871 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9872 (propagated-inputs
9873 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9874 ("python-entrypoints" ,python-entrypoints)
9875 ("python-pyflakes" ,python-pyflakes-2.2)
9876 ("python-mccabe" ,python-mccabe)))))
9877
9878 (define-public python-flake8-bugbear
9879 (package
9880 (name "python-flake8-bugbear")
9881 (version "20.1.4")
9882 (source
9883 (origin
9884 (method url-fetch)
9885 (uri (pypi-uri "flake8-bugbear" version))
9886 (sha256
9887 (base32
9888 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9889 (build-system python-build-system)
9890 (arguments
9891 '(#:phases
9892 (modify-phases %standard-phases
9893 (add-before 'check 'disable-test
9894 (lambda _
9895 ;; This test fails on slow computers.
9896 (substitute* "tests/test_bugbear.py"
9897 (("def test_does_not_crash_on_any_valid_code")
9898 "def _test_does_not_crash_on_any_valid_code")))))))
9899 (native-inputs
9900 `(("python-hypothesis" ,python-hypothesis)
9901 ("python-hypothesmith" ,python-hypothesmith)))
9902 (propagated-inputs
9903 `(("python-attrs" ,python-attrs)
9904 ("python-flake8" ,python-flake8)))
9905 (home-page "https://github.com/PyCQA/flake8-bugbear")
9906 (synopsis
9907 "Flake8 plugin for finding likely bugs and design problems in your program")
9908 (description
9909 "This package contains a plugin for Flake8 finding likely bugs and
9910 design problems in your program. It contains warnings that don't belong
9911 in pyflakes and pycodestyle.")
9912 (license license:expat)))
9913
9914 (define-public python-flake8-continuation
9915 (package
9916 (name "python-flake8-continuation")
9917 (version "1.0.5")
9918 (source
9919 (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "flake8-continuation" version))
9922 (sha256
9923 (base32
9924 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9925 (build-system python-build-system)
9926 (propagated-inputs
9927 `(("python-flake8" ,python-flake8)
9928 ("python-pycodestyle" ,python-pycodestyle)
9929 ("python-six" ,python-six)))
9930 (home-page "https://github.com/planetlabs/flake8-continuation")
9931 (synopsis "Flake8 Line Continuation Plugin")
9932 (description "A Flake8 plugin that checks for the line continuation
9933 style to be in the preferred method according to PEP-8, specifically:
9934 @quotation
9935 The preferred way of wrapping long lines is by using Python's implied
9936 line continuation inside parentheses, brackets and braces. Long lines
9937 can be broken over multiple lines by wrapping expressions in parentheses.
9938 These should be used in preference to using a backslash for line continuation.
9939 @end quotation")
9940 (license license:asl2.0)))
9941
9942 (define-public python-flake8-implicit-str-concat
9943 (package
9944 (name "python-flake8-implicit-str-concat")
9945 (version "0.2.0")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "flake8_implicit_str_concat" version))
9950 (sha256
9951 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9952 (build-system python-build-system)
9953 (propagated-inputs
9954 `(("python-attrs" ,python-attrs)
9955 ("python-more-itertools" ,python-more-itertools)))
9956 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9957 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9958 (description
9959 "This is a plugin for the Python code checking tool Flake8 to encourage
9960 correct string literal concatenation.
9961
9962 It looks for style problems like implicitly concatenated string literals on
9963 the same line (which can be introduced by the code formatting tool Black), or
9964 unnecessary plus operators for explicit string literal concatenation.")
9965 (license license:expat)))
9966
9967 (define-public python-flake8-polyfill
9968 (package
9969 (name "python-flake8-polyfill")
9970 (version "1.0.2")
9971 (source
9972 (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "flake8-polyfill" version))
9975 (sha256
9976 (base32
9977 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9978 (build-system python-build-system)
9979 (arguments
9980 '(#:phases
9981 (modify-phases %standard-phases
9982 (replace 'check
9983 (lambda _
9984 ;; Be compatible with Pytest 4:
9985 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9986 (substitute* "setup.cfg"
9987 (("\\[pytest\\]")
9988 "[tool:pytest]"))
9989 (invoke "py.test" "-v"))))))
9990 (propagated-inputs
9991 `(("python-flake8" ,python-flake8)))
9992 (native-inputs
9993 `(("python-mock" ,python-mock)
9994 ("python-pep8" ,python-pep8)
9995 ("python-pycodestyle" ,python-pycodestyle)
9996 ("python-pytest" ,python-pytest)))
9997 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9998 (synopsis "Polyfill package for Flake8 plugins")
9999 (description
10000 "This package that provides some compatibility helpers for Flake8
10001 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
10002 (license license:expat)))
10003
10004 (define-public python2-flake8-polyfill
10005 (package-with-python2 python-flake8-polyfill))
10006
10007 (define-public python-flake8-print
10008 (package
10009 (name "python-flake8-print")
10010 (version "4.0.0")
10011 (source
10012 (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "flake8-print" version))
10015 (sha256
10016 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
10017 (build-system python-build-system)
10018 (propagated-inputs
10019 `(("python-flake8" ,python-flake8)
10020 ("python-pycodestyle" ,python-pycodestyle)
10021 ("python-six" ,python-six)))
10022 (home-page "https://github.com/jbkahn/flake8-print")
10023 (synopsis "Print statement checker plugin for Flake8")
10024 (description
10025 "This plugin for Flake8 checks for @code{print} statements in Python
10026 files.")
10027 (license license:expat)))
10028
10029 (define-public python-flake8-pyi
10030 (package
10031 (name "python-flake8-pyi")
10032 (version "20.10.0")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "flake8-pyi" version))
10037 (sha256
10038 (base32
10039 "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
10040 (build-system python-build-system)
10041 (propagated-inputs
10042 `(("python-attrs" ,python-attrs)
10043 ("python-flake8" ,python-flake8)
10044 ("python-pyflakes" ,python-pyflakes)))
10045 (home-page "https://github.com/ambv/flake8-pyi")
10046 (synopsis
10047 "Flake8 plugin that provides specializations for type hinting stub files")
10048 (description
10049 "This package contains a plugin that provides specializations for
10050 type hinting stub files, especially interesting for linting typeshed. It
10051 adds the @file{.pyi} extension to the default value of the @code{--filename}
10052 command-line argument to Flake8. This means stubs are linted by default with
10053 this plugin enabled, without needing to explicitly list every file. It
10054 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
10055 expressions after the entire file has been read. This enables support for
10056 first-class forward references that stub files use.")
10057 (license license:expat)))
10058
10059 (define-public python-flake8-pie
10060 (package
10061 (name "python-flake8-pie")
10062 (version "0.5.0")
10063 (source
10064 (origin
10065 (method url-fetch)
10066 (uri (pypi-uri "flake8-pie" version))
10067 (sha256
10068 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
10069 (build-system python-build-system)
10070 (home-page "https://github.com/sbdchd/flake8-pie")
10071 (synopsis "Flake8 extension that implements lints")
10072 (description
10073 "This package provides a flake8 extension that implements miscellaneous
10074 lints.")
10075 (license license:bsd-2)))
10076
10077 (define-public python-flake8-quotes
10078 (package
10079 (name "python-flake8-quotes")
10080 (version "3.2.0")
10081 (source
10082 (origin
10083 (method url-fetch)
10084 (uri (pypi-uri "flake8-quotes" version))
10085 (sha256
10086 (base32
10087 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
10088 (build-system python-build-system)
10089 (propagated-inputs
10090 `(("python-flake8" ,python-flake8)))
10091 (home-page "https://github.com/zheller/flake8-quotes/")
10092 (synopsis "Flake8 lint for quotes")
10093 (description "This package provides a Flake8 lint for quotes.")
10094 (license license:expat)))
10095
10096 (define-public python-flake8-todo
10097 (package
10098 (name "python-flake8-todo")
10099 (version "0.7")
10100 (source
10101 (origin
10102 (method url-fetch)
10103 (uri (pypi-uri "flake8-todo" version))
10104 (sha256
10105 (base32
10106 "05arm0sch3r8248035kilmf01z0mxsahw6vpbbz0d343zy8m8k3f"))))
10107 (build-system python-build-system)
10108 (propagated-inputs
10109 `(("python-pycodestyle" ,python-pycodestyle)))
10110 (home-page "https://github.com/schlamar/flake8-todo")
10111 (synopsis "TODO notes checker, plugin for flake8")
10112 (description
10113 "This package provides the @code{flake8-todo} Python module, a
10114 TODO notes checker plugin for flake8.")
10115 (license license:expat)))
10116
10117 (define-public python-autoflake
10118 (package
10119 (name "python-autoflake")
10120 (version "1.3.1")
10121 (source
10122 (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "autoflake" version))
10125 (sha256
10126 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
10127 (build-system python-build-system)
10128 (propagated-inputs
10129 `(("python-pyflakes" ,python-pyflakes)))
10130 (home-page "https://github.com/myint/autoflake")
10131 (synopsis "Removes unused imports and unused variables")
10132 (description
10133 "@code{autoflake} removes unused imports and unused variables from Python
10134 code as reported by @code{pyflakes}.
10135
10136 By default, it only removes unused imports for modules that are part of the
10137 standard library. Removal of unused variables is also disabled by default.
10138 It also removes useless @code{pass} statements.")
10139 (license license:expat)))
10140
10141 (define-public python-mistune
10142 (package
10143 (name "python-mistune")
10144 (version "0.8.4")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "mistune" version))
10149 (sha256
10150 (base32
10151 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
10152 (build-system python-build-system)
10153 (native-inputs
10154 `(("python-nose" ,python-nose)
10155 ("python-cython" ,python-cython)))
10156 (home-page "https://github.com/lepture/mistune")
10157 (synopsis "Markdown parser in pure Python")
10158 (description "This package provides a fast markdown parser in pure
10159 Python.")
10160 (license license:bsd-3)))
10161
10162 (define-public python2-mistune
10163 (package-with-python2 python-mistune))
10164
10165 (define-public python-markdown
10166 (package
10167 (name "python-markdown")
10168 (version "3.3.4")
10169 (source
10170 (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "Markdown" version))
10173 (sha256
10174 (base32
10175 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
10176 (build-system python-build-system)
10177 (native-inputs
10178 `(("python-nose" ,python-nose)
10179 ("python-pyyaml" ,python-pyyaml)))
10180 (home-page "https://python-markdown.github.io/")
10181 (synopsis "Python implementation of Markdown")
10182 (description
10183 "This package provides a Python implementation of John Gruber's
10184 Markdown. The library features international input, various Markdown
10185 extensions, and several HTML output formats. A command line wrapper
10186 markdown_py is also provided to convert Markdown files to HTML.")
10187 (properties `((python2-variant . ,(delay python2-markdown))))
10188 (license license:bsd-3)))
10189
10190 ;; Markdown 3.2 dropped support for Python 2.
10191 (define-public python2-markdown
10192 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
10193 (package
10194 (inherit base)
10195 (version "3.1.1")
10196 (source (origin
10197 (method url-fetch)
10198 (uri (pypi-uri "Markdown" version))
10199 (sha256
10200 (base32
10201 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
10202
10203 (define-public python-ptyprocess
10204 (package
10205 (name "python-ptyprocess")
10206 (version "0.5.2")
10207 (source
10208 (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "ptyprocess" version))
10211 (sha256
10212 (base32
10213 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
10214 (build-system python-build-system)
10215 (native-inputs
10216 `(("python-nose" ,python-nose)))
10217 (arguments
10218 `(#:phases
10219 (modify-phases %standard-phases
10220 (replace 'check
10221 (lambda _ (invoke "nosetests"))))))
10222 (home-page "https://github.com/pexpect/ptyprocess")
10223 (synopsis "Run a subprocess in a pseudo terminal")
10224 (description
10225 "This package provides a Python library used to launch a subprocess in a
10226 pseudo terminal (pty), and interact with both the process and its pty.")
10227 (license license:isc)))
10228
10229 (define-public python2-ptyprocess
10230 (package-with-python2 python-ptyprocess))
10231
10232 (define-public python-cram
10233 (package
10234 (name "python-cram")
10235 (version "0.7")
10236 (home-page "https://bitheap.org/cram/")
10237 (source (origin
10238 (method url-fetch)
10239 (uri (list (string-append home-page "cram-"
10240 version ".tar.gz")
10241 (pypi-uri "cram" version)))
10242 (sha256
10243 (base32
10244 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
10245 (arguments
10246 '(#:phases
10247 (modify-phases %standard-phases
10248 (add-after 'unpack 'patch-source
10249 (lambda _
10250 (substitute* (find-files "cram" ".*\\.py$")
10251 ;; Replace default shell path.
10252 (("/bin/sh") (which "sh")))
10253 (substitute* (find-files "tests" ".*\\.t$")
10254 (("md5") "md5sum")
10255 (("/bin/bash") (which "bash"))
10256 (("/bin/sh") (which "sh")))
10257 (substitute* "cram/_test.py"
10258 ;; This hack works around a bug triggered by substituting
10259 ;; the /bin/sh paths. "tests/usage.t" compares the output of
10260 ;; "cram -h", which breaks the output at 80 characters. This
10261 ;; causes the line showing the default shell to break into two
10262 ;; lines, but the test expects a single line...
10263 (("env\\['COLUMNS'\\] = '80'")
10264 "env['COLUMNS'] = '160'"))
10265
10266 (substitute* "Makefile"
10267 ;; Recent versions of python-coverage have caused the test
10268 ;; coverage to decrease (as of version 0.7). Allow that.
10269 (("--fail-under=100")
10270 "--fail-under=90"))
10271
10272 #t))
10273 (replace 'check
10274 ;; The test phase uses the built library and executable.
10275 (lambda* (#:key inputs outputs #:allow-other-keys)
10276 (add-installed-pythonpath inputs outputs)
10277 (setenv "PATH" (string-append (getenv "PATH") ":"
10278 (assoc-ref outputs "out") "/bin"))
10279 (invoke "make" "test"))))))
10280 (build-system python-build-system)
10281 (native-inputs
10282 `(("python-coverage" ,python-coverage)
10283 ("which" ,which)))
10284 (synopsis "Simple testing framework for command line applications")
10285 (description
10286 "Cram is a functional testing framework for command line applications.
10287 Cram tests look like snippets of interactive shell sessions. Cram runs each
10288 command and compares the command output in the test with the command’s actual
10289 output.")
10290 (license license:gpl2+)))
10291
10292 (define-public python2-cram
10293 (package-with-python2 python-cram))
10294
10295 (define-public python-crashtest
10296 (package
10297 (name "python-crashtest")
10298 (version "0.3.1")
10299 (source
10300 (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "crashtest" version))
10303 (sha256
10304 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
10305 (build-system python-build-system)
10306 (home-page "https://github.com/sdispater/crashtest")
10307 (synopsis "Manage Python errors with ease")
10308 (description
10309 "Python library that makes exceptions handling and inspection easier.")
10310 (license license:expat)))
10311
10312 (define-public python-stdlib-list
10313 (package
10314 (name "python-stdlib-list")
10315 (version "0.8.0")
10316 (source (origin
10317 (method url-fetch)
10318 (uri (pypi-uri "stdlib-list" version))
10319 (sha256
10320 (base32
10321 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
10322 (build-system python-build-system)
10323 (arguments
10324 `(#:tests? #f)) ; Tests require more dependencies.
10325 (native-inputs
10326 `(("python-sphinx" ,python-sphinx)))
10327 (home-page "https://github.com/jackmaney/python-stdlib-list")
10328 (synopsis "Python Standard Libraries")
10329 (description "This package contains a list of Python Standard Libraries.")
10330 (license license:expat)))
10331
10332 (define-public python-straight-plugin
10333 (package
10334 (name "python-straight-plugin")
10335 (version "1.4.1")
10336 (source
10337 (origin
10338 (method url-fetch)
10339 (uri (pypi-uri "straight.plugin" version))
10340 (sha256
10341 (base32
10342 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
10343 (build-system python-build-system)
10344 (home-page "https://github.com/ironfroggy/straight.plugin")
10345 (synopsis "Simple namespaced plugin facility")
10346 (description "Straight Plugin provides a type of plugin you can create from
10347 almost any existing Python modules, and an easy way for outside developers to
10348 add functionality and customization to your projects with their own plugins.")
10349 (license license:expat)))
10350
10351 (define-public python2-straight-plugin
10352 (package-with-python2 python-straight-plugin))
10353
10354 (define-public python-fonttools
10355 (package
10356 (name "python-fonttools")
10357 (version "4.6.0")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (pypi-uri "fonttools" version ".zip"))
10361 (sha256
10362 (base32
10363 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
10364 (build-system python-build-system)
10365 (native-inputs
10366 `(("unzip" ,unzip)
10367 ("python-pytest" ,python-pytest)
10368 ("python-pytest-runner" ,python-pytest-runner)))
10369 (home-page "https://github.com/fonttools/fonttools")
10370 (synopsis "Tools to manipulate font files")
10371 (description
10372 "FontTools/TTX is a library to manipulate font files from Python. It
10373 supports reading and writing of TrueType/OpenType fonts, reading and writing
10374 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
10375 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
10376 from an XML-based format.")
10377 (license license:expat)))
10378
10379 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
10380 (define-public python2-fonttools
10381 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
10382 (package
10383 (inherit base)
10384 (version "3.44.0")
10385 (source (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "fonttools" version ".zip"))
10388 (sha256
10389 (base32
10390 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
10391
10392 (define-public python-ly
10393 (package
10394 (name "python-ly")
10395 (version "0.9.5")
10396 (source
10397 (origin
10398 (method url-fetch)
10399 (uri (pypi-uri name version))
10400 (sha256
10401 (base32
10402 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
10403 (build-system python-build-system)
10404 (arguments
10405 ;; FIXME: Some tests need network access.
10406 '(#:tests? #f))
10407 (synopsis "Tool and library for manipulating LilyPond files")
10408 (description "This package provides a Python library to parse, manipulate
10409 or create documents in LilyPond format. A command line program ly is also
10410 provided that can be used to do various manipulations with LilyPond files.")
10411 (home-page "https://pypi.org/project/python-ly/")
10412 (license license:gpl2+)))
10413
10414 (define-public python-appdirs
10415 (package
10416 (name "python-appdirs")
10417 (version "1.4.3")
10418 (source
10419 (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "appdirs" version))
10422 (sha256
10423 (base32
10424 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
10425 (build-system python-build-system)
10426 (home-page "https://github.com/ActiveState/appdirs")
10427 (synopsis
10428 "Determine platform-specific dirs, e.g. a \"user data dir\"")
10429 (description
10430 "This module provides a portable way of finding out where user data
10431 should be stored on various operating systems.")
10432 (license license:expat)))
10433
10434 (define-public python2-appdirs
10435 (package-with-python2 python-appdirs))
10436
10437 (define-public python-gorilla
10438 (package
10439 (name "python-gorilla")
10440 (version "0.3.0")
10441 (source (origin
10442 (method url-fetch)
10443 (uri (pypi-uri "gorilla" version))
10444 (sha256
10445 (base32
10446 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
10447 (build-system python-build-system)
10448 (home-page "https://github.com/christophercrouzet/gorilla")
10449 (synopsis "Convenient monkey patching with Python")
10450 (description
10451 "Gorilla is a Python library that provides a convenient approach to
10452 monkey patching. Monkey patching is the process of modifying module and
10453 class attributes at runtime with the purpose of replacing or extending
10454 third-party code.")
10455 (license license:expat)))
10456
10457 (define-public python-llfuse
10458 (package
10459 (name "python-llfuse")
10460 (version "1.3.8")
10461 (source (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "llfuse" version))
10464 (sha256
10465 (base32
10466 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
10467 (build-system python-build-system)
10468 (inputs
10469 `(("fuse" ,fuse)
10470 ("attr" ,attr)))
10471 (native-inputs
10472 `(("pkg-config" ,pkg-config)))
10473 (synopsis "Python bindings for FUSE")
10474 (description
10475 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
10476 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
10477 (license license:lgpl2.0+)
10478 (properties `((python2-variant . ,(delay python2-llfuse))))))
10479
10480 (define-public python2-llfuse
10481 (let ((base (package-with-python2
10482 (strip-python2-variant python-llfuse))))
10483 (package/inherit base
10484 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
10485
10486 (define-public python-msgpack
10487 (package
10488 (name "python-msgpack")
10489 (version "1.0.0")
10490 (source (origin
10491 (method url-fetch)
10492 (uri (pypi-uri "msgpack" version))
10493 (sha256
10494 (base32
10495 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
10496 (build-system python-build-system)
10497 (arguments
10498 `(#:modules ((guix build utils)
10499 (guix build python-build-system)
10500 (ice-9 ftw)
10501 (srfi srfi-1)
10502 (srfi srfi-26))
10503 #:phases
10504 (modify-phases %standard-phases
10505 (replace 'check
10506 (lambda _
10507 (invoke "pytest" "-v" "test"))))))
10508 (native-inputs
10509 `(("python-pytest" ,python-pytest)))
10510 (synopsis "MessagePack (de)serializer")
10511 (description "MessagePack is a fast, compact binary serialization format,
10512 suitable for similar data to JSON. This package provides CPython bindings for
10513 reading and writing MessagePack data.")
10514 (home-page "https://pypi.org/project/msgpack/")
10515 (license license:asl2.0)))
10516
10517 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
10518 ;; release 0.5. Some packages like borg still call it by the old name for now.
10519 ;; <https://bugs.gnu.org/30662>
10520 (define-public python-msgpack-transitional
10521 (package
10522 (inherit python-msgpack)
10523 (name "python-msgpack-transitional")
10524 (version "0.5.6")
10525 (source (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "msgpack" version))
10528 (sha256
10529 (base32
10530 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
10531 (arguments
10532 (substitute-keyword-arguments (package-arguments python-msgpack)
10533 ((#:phases phases)
10534 `(modify-phases ,phases
10535 (add-after 'unpack 'configure-transitional
10536 (lambda _
10537 ;; Keep using the old name.
10538 (substitute* "setup.py"
10539 (("TRANSITIONAL = False")
10540 "TRANSITIONAL = 1"))
10541 #t))))))))
10542
10543 (define-public python2-msgpack
10544 (package-with-python2 python-msgpack))
10545
10546 (define-public python-netaddr
10547 (package
10548 (name "python-netaddr")
10549 (version "0.8.0")
10550 (source
10551 (origin
10552 (method url-fetch)
10553 (uri (pypi-uri "netaddr" version))
10554 (sha256
10555 (base32
10556 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
10557 (build-system python-build-system)
10558 (arguments `(#:tests? #f)) ;; No tests.
10559 (home-page "https://github.com/drkjam/netaddr/")
10560 (synopsis "Pythonic manipulation of network addresses")
10561 (description
10562 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
10563 and MAC network addresses.")
10564 (license license:bsd-3)))
10565
10566 (define-public python2-netaddr
10567 (package-with-python2 python-netaddr))
10568
10569 (define-public python2-pyroute2
10570 (package
10571 (name "python2-pyroute2")
10572 (version "0.5.6")
10573 (source
10574 (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "pyroute2" version))
10577 (sha256
10578 (base32
10579 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10580 (build-system python-build-system)
10581 (arguments
10582 `(#:python ,python-2)) ;Python 3.x is not supported
10583 (home-page "https://github.com/svinota/pyroute2")
10584 (synopsis "Python netlink library")
10585 (description
10586 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10587 Supported netlink families and protocols include:
10588 @itemize
10589 @item rtnl, network settings - addresses, routes, traffic controls
10590 @item nfnetlink - netfilter API: ipset, nftables, ...
10591 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10592 @item devlink - manage and monitor devlink-enabled hardware
10593 @item generic - generic netlink families
10594 @itemize
10595 @item nl80211 - wireless functions API (basic support)
10596 @item taskstats - extended process statistics
10597 @item acpi_events - ACPI events monitoring
10598 @item thermal_events - thermal events monitoring
10599 @item VFS_DQUOT - disk quota events monitoring
10600 @end itemize
10601 @end itemize")
10602 (license license:gpl2+)))
10603
10604 (define-public python-wrapt
10605 (package
10606 (name "python-wrapt")
10607 (version "1.11.2")
10608 (source
10609 (origin
10610 (method url-fetch)
10611 (uri (pypi-uri "wrapt" version))
10612 (sha256
10613 (base32
10614 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10615 (build-system python-build-system)
10616 (arguments
10617 ;; Tests are not included in the tarball, they are only available in the
10618 ;; git repository.
10619 `(#:tests? #f))
10620 (home-page "https://github.com/GrahamDumpleton/wrapt")
10621 (synopsis "Module for decorators, wrappers and monkey patching")
10622 (description
10623 "The aim of the wrapt module is to provide a transparent object proxy for
10624 Python, which can be used as the basis for the construction of function
10625 wrappers and decorator functions.")
10626 (license license:bsd-2)))
10627
10628 (define-public python2-wrapt
10629 (package-with-python2 python-wrapt))
10630
10631 (define-public python-commentjson
10632 (package
10633 (name "python-commentjson")
10634 (version "0.9.0")
10635 (source (origin
10636 ;; The PyPI release is missing some test files.
10637 (method git-fetch)
10638 (uri (git-reference
10639 (url "https://github.com/vaidik/commentjson")
10640 (commit (string-append "v" version))))
10641 (file-name (git-file-name name version))
10642 (sha256
10643 (base32
10644 "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
10645 (build-system python-build-system)
10646 (arguments
10647 `(#:modules ((guix build python-build-system)
10648 (guix build utils)
10649 (ice-9 ftw)
10650 (ice-9 textual-ports))
10651 #:phases
10652 (modify-phases %standard-phases
10653 (add-after 'unpack 'relax-requirements
10654 (lambda _
10655 (substitute* "setup.py"
10656 (("lark-parser>=0.7.1,<0.8.0")
10657 "lark-parser>=0.7.1"))))
10658 (add-after 'unpack 'delete-unspported-tests
10659 ;; Some tests rely on the 'test' module of Python itself,
10660 ;; which is not available with the Python package in Guix;
10661 ;; remove them.
10662 (lambda _
10663 ;; XXX: Copied from (guix build dub-build-system).
10664 (define (grep string file-name)
10665 (string-contains (call-with-input-file file-name get-string-all)
10666 string))
10667
10668 (with-directory-excursion "commentjson/tests/test_json"
10669 (let* ((dot? (lambda (x) (member x '("." ".."))))
10670 (test-files (scandir "." (negate dot?))))
10671 (for-each delete-file
10672 (filter (lambda (f) (grep "from test." f))
10673 test-files)))))))))
10674 (propagated-inputs
10675 `(("python-lark-parser" ,python-lark-parser)))
10676 (native-inputs
10677 `(("python-six" ,python-six)))
10678 (home-page "https://github.com/vaidik/commentjson")
10679 (synopsis "Python library for adding comments to JSON files")
10680 (description "Comment JSON is a Python package that helps you create JSON
10681 files with Python and JavaScript style inline comments. Its API is very
10682 similar to the Python standard library's @code{json} module.")
10683 (license license:expat)))
10684
10685 (define-public python-resolvelib
10686 (package
10687 (name "python-resolvelib")
10688 (version "0.7.1")
10689 (source
10690 (origin
10691 ;; Tests are missing from the PyPI release.
10692 (method git-fetch)
10693 (uri (git-reference
10694 (url "https://github.com/sarugaku/resolvelib")
10695 (commit version)))
10696 (file-name (git-file-name name version))
10697 (sha256
10698 (base32
10699 "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
10700 (build-system python-build-system)
10701 (arguments
10702 `(#:phases
10703 (modify-phases %standard-phases
10704 (replace 'check
10705 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10706 (when tests?
10707 (add-installed-pythonpath inputs outputs)
10708 (invoke "pytest")))))))
10709 (native-inputs
10710 `(("python-commentjson" ,python-commentjson)
10711 ("python-packaging" ,python-packaging)
10712 ("python-pytest" ,python-pytest)))
10713 (home-page "https://github.com/sarugaku/resolvelib")
10714 (synopsis "Abstract dependencies resolver")
10715 (description "The ResolveLib library provides a @code{Resolver} class that
10716 includes dependency resolution logic.")
10717 (license license:isc)))
10718
10719 ;;; This older version is required by ansible-core.
10720 (define-public python-resolvelib-0.5
10721 (package/inherit python-resolvelib
10722 (name "python-resolvelib")
10723 (version "0.5.4")
10724 (source
10725 (origin
10726 (method git-fetch)
10727 (uri (git-reference
10728 (url "https://github.com/sarugaku/resolvelib")
10729 (commit version)))
10730 (file-name (git-file-name name version))
10731 (sha256
10732 (base32
10733 "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
10734
10735 (define-public python-commonmark
10736 (package
10737 (name "python-commonmark")
10738 (version "0.9.1")
10739 (source
10740 (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "commonmark" version))
10743 (sha256
10744 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10745 (build-system python-build-system)
10746 (arguments
10747 `(#:phases
10748 (modify-phases %standard-phases
10749 (replace 'check
10750 (lambda* (#:key inputs outputs #:allow-other-keys)
10751 (add-installed-pythonpath inputs outputs)
10752 (invoke "python" "setup.py" "test"))))))
10753 (home-page "https://github.com/readthedocs/commonmark.py")
10754 (synopsis "Python parser for the CommonMark Markdown spec")
10755 (description
10756 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10757 Markdown parser and renderer for the CommonMark specification, using only
10758 native modules.")
10759 (license license:bsd-3)))
10760
10761 (define-public python-xlrd
10762 (package
10763 (name "python-xlrd")
10764 (version "1.2.0")
10765 (source (origin
10766 (method url-fetch)
10767 (uri (pypi-uri "xlrd" version))
10768 (sha256
10769 (base32
10770 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10771 (build-system python-build-system)
10772 (arguments
10773 `(#:phases
10774 (modify-phases %standard-phases
10775 ;; Some tests depend on writing a temporary file to the user's home
10776 ;; directory.
10777 (add-after 'unpack 'fix-tests
10778 (lambda _
10779 (delete-file "tests/test_open_workbook.py")
10780 #t)))))
10781 (home-page "http://www.python-excel.org/")
10782 (synopsis "Library for extracting data from Excel files")
10783 (description "This package provides a library to extract data from
10784 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10785 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10786 Unicode-aware. It is not intended as an end-user tool.")
10787 (license license:bsd-3)))
10788
10789 (define-public python2-xlrd
10790 (package-with-python2 python-xlrd))
10791
10792 (define-public python-xlwt
10793 (package
10794 (name "python-xlwt")
10795 (version "1.3.0")
10796 (source
10797 (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "xlwt" version))
10800 (sha256
10801 (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
10802 (build-system python-build-system)
10803 (arguments
10804 `(#:phases
10805 (modify-phases %standard-phases
10806 (replace 'check
10807 (lambda* (#:key tests? #:allow-other-keys)
10808 (when tests?
10809 (setenv "PYTHONPATH"
10810 (string-append (getcwd) "/build/lib:"
10811 (getenv "PYTHONPATH")))
10812 (invoke "nosetests" "-v")))))))
10813 (native-inputs
10814 `(("nose" ,python-nose)))
10815 (home-page "http://www.python-excel.org/")
10816 (synopsis "Library for creating spreadsheet Excel files")
10817 (description "@code{xlwt} is a library for writing data and formatting
10818 information to older Excel files (i.e. .xls). The package itself is pure
10819 Python with no dependencies on modules or packages outside the standard Python
10820 distribution. It is not intended as an end-user tool.")
10821 (license license:bsd-3)))
10822
10823 (define-public python-immutables
10824 (package
10825 (name "python-immutables")
10826 (version "0.14")
10827 (source
10828 (origin
10829 (method url-fetch)
10830 (uri (pypi-uri "immutables" version))
10831 (sha256
10832 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10833 (build-system python-build-system)
10834 (home-page "https://github.com/MagicStack/immutables")
10835 (synopsis "High-performance immutable mapping type for Python")
10836 (description
10837 "An immutable mapping type for Python. The underlying datastructure is a
10838 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10839 functional languages.")
10840 (license license:asl2.0)))
10841
10842 (define-public python-prettytable
10843 (package
10844 (name "python-prettytable")
10845 (version "0.7.2")
10846 (source
10847 (origin
10848 (method url-fetch)
10849 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10850 (sha256
10851 (base32
10852 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10853 (build-system python-build-system)
10854 (home-page "https://code.google.com/archive/p/prettytable/")
10855 (synopsis "Display tabular data in an ASCII table format")
10856 (description
10857 "A library designed to represent tabular data in visually appealing ASCII
10858 tables. PrettyTable allows for selection of which columns are to be printed,
10859 independent alignment of columns (left or right justified or centred) and
10860 printing of sub-tables by specifying a row range.")
10861 (license license:bsd-3)))
10862
10863 (define-public python2-prettytable
10864 (package-with-python2 python-prettytable))
10865
10866 (define-public python-curio
10867 (package
10868 (name "python-curio")
10869 (version "1.5")
10870 (source
10871 (origin
10872 (method url-fetch)
10873 (uri (pypi-uri "curio" version))
10874 (sha256
10875 (base32 "045wwg16qadsalhicbv21p14sj8i4w0l57639j7dmdqbb4p2225g"))))
10876 (build-system python-build-system)
10877 (arguments
10878 `(#:phases
10879 (modify-phases %standard-phases
10880 (replace 'check
10881 (lambda* (#:key inputs outputs #:allow-other-keys)
10882 (add-installed-pythonpath inputs outputs)
10883 (invoke "pytest" "-vv" "-k"
10884 ;; Tries to open an outgoing connection.
10885 "not test_ssl_outgoing"))))))
10886 (native-inputs
10887 `(("python-pytest" ,python-pytest)))
10888 (home-page "https://github.com/dabeaz/curio")
10889 (synopsis "Coroutine-based library for concurrent Python")
10890 (description
10891 "Curio is a coroutine-based library for concurrent Python systems
10892 programming. It provides standard programming abstractions such as as
10893 tasks, sockets, files, locks, and queues.")
10894 (license license:bsd-3)))
10895
10896 (define-public python-tables
10897 (package
10898 (name "python-tables")
10899 (version "3.6.1")
10900 (source
10901 (origin
10902 (method url-fetch)
10903 (uri (pypi-uri "tables" version))
10904 (sha256
10905 (base32
10906 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10907 (modules '((guix build utils)))
10908 (snippet
10909 '(begin
10910 ;; Remove pre-compiled .pyc files from source.
10911 (for-each delete-file-recursively
10912 (find-files "." "__pycache__" #:directories? #t))
10913 (for-each delete-file (find-files "." "\\.pyc$"))
10914 #t))))
10915 (build-system python-build-system)
10916 (arguments
10917 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10918 ;; or "check", so we must override the build and check phases.
10919 #:phases
10920 (modify-phases %standard-phases
10921 (add-after 'unpack 'use-gcc
10922 (lambda _
10923 (substitute* "setup.py"
10924 (("^( +)compiler = new_compiler\\(\\)" line indent)
10925 (string-append line
10926 "\n"
10927 indent
10928 "compiler.set_executables(compiler='gcc',"
10929 "compiler_so='gcc',"
10930 "linker_exe='gcc',"
10931 "linker_so='gcc -shared')")))
10932 #t))
10933 (add-after 'unpack 'disable-tuning
10934 (lambda _
10935 (substitute* "setup.py"
10936 (("cpu_flags = .*")
10937 "cpu_flags = ['sse2']\n"))
10938 #t))
10939 (replace 'build
10940 (lambda* (#:key inputs #:allow-other-keys)
10941 (invoke "python" "setup.py" "build"
10942 (string-append "--hdf5="
10943 (assoc-ref inputs "hdf5")))))
10944 (replace 'check
10945 (lambda* (#:key inputs #:allow-other-keys)
10946 (invoke "python" "setup.py" "check"
10947 (string-append "--hdf5="
10948 (assoc-ref inputs "hdf5"))))))))
10949 (propagated-inputs
10950 `(("python-numexpr" ,python-numexpr)
10951 ("python-numpy" ,python-numpy)))
10952 (native-inputs
10953 `(("python-cython" ,python-cython)
10954 ("pkg-config" ,pkg-config)))
10955 (inputs
10956 `(("hdf5" ,hdf5-1.10)
10957 ("bzip2" ,bzip2)
10958 ("zlib" ,zlib)))
10959 (home-page "https://www.pytables.org/")
10960 (synopsis "Hierarchical datasets for Python")
10961 (description "PyTables is a package for managing hierarchical datasets and
10962 designed to efficiently cope with extremely large amounts of data.")
10963 (license license:bsd-3)))
10964
10965 (define-public python-sniffio
10966 (package
10967 (name "python-sniffio")
10968 (version "1.2.0")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "sniffio" version))
10973 (sha256
10974 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10975 (build-system python-build-system)
10976 (arguments
10977 `(#:phases
10978 (modify-phases %standard-phases
10979 (replace 'check
10980 (lambda _
10981 (invoke "pytest" "-vv"))))))
10982 (native-inputs
10983 `(("python-curio" ,python-curio)
10984 ("python-pytest" ,python-pytest)
10985 ("python-pytest-cov" ,python-pytest-cov)))
10986 (home-page "https://github.com/python-trio/sniffio")
10987 (synopsis "Detect which async library a program is running under")
10988 (description "This package detects which async library a program is
10989 running under. It supports multiple async I/O packages, like Trio, and
10990 asyncio.")
10991 ;; Either license applies.
10992 (license (list license:expat license:asl2.0))))
10993
10994 (define-public python-pytest-black
10995 (package
10996 (name "python-pytest-black")
10997 (version "0.3.8")
10998 (source
10999 (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "pytest-black" version))
11002 (sha256
11003 (base32
11004 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
11005 (build-system python-build-system)
11006 (propagated-inputs
11007 `(("python-pytest" ,python-pytest)
11008 ("python-black" ,python-black)
11009 ("python-toml" ,python-toml)))
11010 (native-inputs
11011 `(("python-setuptools-scm" ,python-setuptools-scm)))
11012 (home-page "https://github.com/shopkeep/pytest-black")
11013 (synopsis "Pytest plugin to enable format checking with black")
11014 (description
11015 "This package provides a pytest plugin to enable format checking with the
11016 Python code formatter \"black\".")
11017 (license license:expat)))
11018
11019 (define-public python-get-version
11020 (package
11021 (name "python-get-version")
11022 (version "2.1")
11023 (source
11024 (origin
11025 (method url-fetch)
11026 (uri (pypi-uri "get_version" version))
11027 (sha256
11028 (base32
11029 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
11030 (build-system python-build-system)
11031 (propagated-inputs
11032 `(("python-pygments" ,python-pygments)
11033 ("python-pytest" ,python-pytest)
11034 ("python-pytest-black" ,python-pytest-black)
11035 ("python-pytest-cov" ,python-pytest-cov)
11036 ("python-setuptools" ,python-setuptools)
11037 ("python-testpath" ,python-testpath)))
11038 (home-page "https://github.com/flying-sheep/get_version")
11039 (synopsis "Version helper in the spirit of versioneer")
11040 (description
11041 "This package provides a version helper that lets you automatically use
11042 the latest @code{vX.X.X} Git tag as the version in your Python package. It
11043 also supports getting the version from Python source distributions or, once
11044 your package is installed, via @code{pkg_resources} (part of
11045 @code{setuptools}).")
11046 (license license:gpl3+)))
11047
11048 (define-public python-legacy-api-wrap
11049 (package
11050 (name "python-legacy-api-wrap")
11051 (version "1.2")
11052 (source
11053 (origin
11054 (method url-fetch)
11055 (uri (pypi-uri "legacy-api-wrap" version))
11056 (sha256
11057 (base32
11058 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
11059 (build-system python-build-system)
11060 (propagated-inputs
11061 `(("python-get-version" ,python-get-version)
11062 ("python-pytest" ,python-pytest)
11063 ("python-pytest-black" ,python-pytest-black)
11064 ("python-pytest-cov" ,python-pytest-cov)
11065 ("python-setuptools" ,python-setuptools)))
11066 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
11067 (synopsis "Legacy API wrapper")
11068 (description "This module defines a decorator to wrap legacy APIs. The
11069 primary use case is APIs defined before keyword-only parameters existed.")
11070 (license license:gpl3+)))
11071
11072 (define-public python-langdetect
11073 (package
11074 (name "python-langdetect")
11075 (version "1.0.9")
11076 (source
11077 (origin
11078 (method url-fetch)
11079 (uri (pypi-uri "langdetect" version))
11080 (sha256
11081 (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
11082 (build-system python-build-system)
11083 (propagated-inputs
11084 `(("python-six" ,python-six)))
11085 (home-page "https://github.com/Mimino666/langdetect")
11086 (synopsis "Language detection library")
11087 (description
11088 "This library is a port of Nakatani Shuyo's language-detection library
11089 (version from 03/03/2014) to Python.")
11090 (license license:expat)))
11091
11092 (define-public python-pyasn1
11093 (package
11094 (name "python-pyasn1")
11095 (version "0.4.8")
11096 (source
11097 (origin
11098 (method url-fetch)
11099 (uri (pypi-uri "pyasn1" version))
11100 (sha256
11101 (base32
11102 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
11103 (build-system python-build-system)
11104 (home-page "http://pyasn1.sourceforge.net/")
11105 (synopsis "ASN.1 types and codecs")
11106 (description
11107 "This is an implementation of ASN.1 types and codecs in Python. It is
11108 suitable for a wide range of protocols based on the ASN.1 specification.")
11109 (license license:bsd-2)))
11110
11111 (define-public python2-pyasn1
11112 (package-with-python2 python-pyasn1))
11113
11114 (define-public python-pyasn1-modules
11115 (package
11116 (name "python-pyasn1-modules")
11117 (version "0.2.2")
11118 (source
11119 (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "pyasn1-modules" version))
11122 (sha256
11123 (base32
11124 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
11125 (build-system python-build-system)
11126 (propagated-inputs
11127 `(("python-pyasn1" ,python-pyasn1)))
11128 (home-page "https://sourceforge.net/projects/pyasn1/")
11129 (synopsis "ASN.1 codec implementations")
11130 (description
11131 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
11132 implementations of ASN.1-based codecs and protocols.")
11133 (license license:bsd-3)))
11134
11135 (define-public python2-pyasn1-modules
11136 (package-with-python2 python-pyasn1-modules))
11137
11138 (define-public python2-ipaddress
11139 (package
11140 (name "python2-ipaddress")
11141 (version "1.0.23")
11142 (source (origin
11143 (method url-fetch)
11144 (uri (pypi-uri "ipaddress" version))
11145 (sha256
11146 (base32
11147 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
11148 (build-system python-build-system)
11149 (arguments
11150 `(#:python ,python-2))
11151 (home-page "https://github.com/phihag/ipaddress")
11152 (synopsis "IP address manipulation library")
11153 (description
11154 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
11155 in Python. This library is used to create, poke at, and manipulate IPv4 and
11156 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
11157 module to older versions of Python.")
11158 (license license:psfl)))
11159
11160 (define-public python-asn1tools
11161 (package
11162 (name "python-asn1tools")
11163 (version "0.158.0")
11164 (source
11165 (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "asn1tools" version))
11168 (sha256
11169 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
11170 (build-system python-build-system)
11171 (propagated-inputs
11172 `(("python-bitstruct" ,python-bitstruct)
11173 ("python-diskcache" ,python-diskcache)
11174 ("python-prompt-toolkit" ,python-prompt-toolkit)
11175 ("python-pyparsing" ,python-pyparsing)))
11176 (home-page "https://github.com/eerimoq/asn1tools")
11177 (synopsis "ASN.1 parsing, encoding and decoding")
11178 (description "This package provides ASN.1 parsing, encoding and decoding
11179 for Python, including constraints checking. It supports several
11180 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
11181 for OER and UPER.")
11182 (license license:expat)))
11183
11184 (define-public python2-ipaddr
11185 (package
11186 (name "python2-ipaddr")
11187 (version "2.1.11")
11188 (source
11189 (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "ipaddr" version))
11192 (sha256
11193 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
11194 (build-system python-build-system)
11195 (arguments
11196 `(#:python ,python-2 ;version 2 only
11197 #:phases
11198 (modify-phases %standard-phases
11199 (replace 'check
11200 (lambda _ (invoke "python" "ipaddr_test.py"))))))
11201 (home-page "https://github.com/google/ipaddr-py")
11202 (synopsis "IP address manipulation library")
11203 (description
11204 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
11205 IPv6 addresses and networks.
11206
11207 For new implementations you may prefer to use the standard module
11208 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
11209 versions of Python.")
11210 (license license:asl2.0)))
11211
11212 (define-public python-idna
11213 (package
11214 (name "python-idna")
11215 (version "2.10")
11216 (source
11217 (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "idna" version))
11220 (sha256
11221 (base32
11222 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
11223 (build-system python-build-system)
11224 (home-page "https://github.com/kjd/idna")
11225 (synopsis "Internationalized domain names in applications")
11226 (description
11227 "This is a library to support the Internationalised Domain Names in
11228 Applications (IDNA) protocol as specified in RFC 5891. This version of the
11229 protocol is often referred to as “IDNA2008” and can produce different results
11230 from the earlier standard from 2003. The library is also intended to act as a
11231 suitable drop-in replacement for the “encodings.idna” module that comes with
11232 the Python standard library but currently only supports the older 2003
11233 specification.")
11234 (license license:bsd-4)))
11235
11236 (define-public python-idna-2.7
11237 (package (inherit python-idna)
11238 (version "2.7")
11239 (source (origin
11240 (method url-fetch)
11241 (uri (pypi-uri "idna" version))
11242 (sha256
11243 (base32
11244 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
11245
11246
11247 (define-public python2-idna
11248 (package-with-python2 python-idna))
11249
11250 (define-public python-libsass
11251 (package
11252 (name "python-libsass")
11253 (version "0.20.1")
11254 (source
11255 (origin
11256 ;; PyPI tarball is missing some test files.
11257 (method git-fetch)
11258 (uri (git-reference
11259 (url "https://github.com/sass/libsass-python")
11260 (commit version)))
11261 (file-name (git-file-name name version))
11262 (sha256
11263 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
11264 (build-system python-build-system)
11265 (arguments
11266 `(#:phases
11267 (modify-phases %standard-phases
11268 ;; Use Guix package of libsass instead of compiling from a checkout.
11269 (add-before 'build 'set-libsass
11270 (lambda _
11271 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
11272 #t))
11273 (replace 'check
11274 (lambda* (#:key inputs outputs #:allow-other-keys)
11275 (add-installed-pythonpath inputs outputs)
11276 (invoke "pytest" "sasstests.py"))))))
11277 (native-inputs
11278 `(("python-pytest" ,python-pytest)
11279 ("python-werkzeug" ,python-werkzeug)))
11280 (inputs
11281 `(("libsass" ,libsass)))
11282 (propagated-inputs
11283 `(("python-six" ,python-six)))
11284 (home-page "https://sass.github.io/libsass-python/")
11285 (synopsis "Straightforward binding of libsass for Python")
11286 (description
11287 "This package provides a simple Python extension module @code{sass} which
11288 is binding LibSass.")
11289 (license license:expat)))
11290
11291 (define-public python-idna-ssl
11292 (package
11293 (name "python-idna-ssl")
11294 (version "1.0.1")
11295 (source
11296 (origin
11297 (method url-fetch)
11298 (uri (pypi-uri "idna-ssl" version))
11299 (sha256
11300 (base32
11301 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
11302 (build-system python-build-system)
11303 (arguments
11304 `(#:tests? #f)) ;circular dependency with python-aiohttp
11305 (propagated-inputs `(("python-idna" ,python-idna)))
11306 (home-page "https://github.com/aio-libs/idna-ssl")
11307 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
11308 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
11309 domains support.")
11310 (license license:expat)))
11311
11312 (define-public python-pretend
11313 (package
11314 (name "python-pretend")
11315 (version "1.0.9")
11316 (source
11317 (origin
11318 (method url-fetch)
11319 (uri (pypi-uri "pretend" version))
11320 (sha256
11321 (base32
11322 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
11323 (build-system python-build-system)
11324 (home-page "https://github.com/alex/pretend")
11325 (synopsis "Library for stubbing in Python")
11326 (description
11327 "Pretend is a library to make stubbing with Python easier. Stubbing is a
11328 technique for writing tests. You may hear the term mixed up with mocks,
11329 fakes, or doubles. Basically, a stub is an object that returns pre-canned
11330 responses, rather than doing any computation.")
11331 (license license:bsd-3)))
11332
11333 (define-public python2-pretend
11334 (package-with-python2 python-pretend))
11335
11336 (define-public python-pip
11337 (package
11338 (name "python-pip")
11339 (version "20.2.4")
11340 (source
11341 (origin
11342 (method url-fetch)
11343 (uri (pypi-uri "pip" version))
11344 (sha256
11345 (base32
11346 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
11347 (build-system python-build-system)
11348 (arguments
11349 '(#:tests? #f)) ; there are no tests in the pypi archive.
11350 (home-page "https://pip.pypa.io/")
11351 (synopsis "Package manager for Python software")
11352 (description
11353 "Pip is a package manager for Python software, that finds packages on the
11354 Python Package Index (PyPI).")
11355 (license license:expat)))
11356
11357 (define-public python2-pip
11358 (package-with-python2 python-pip))
11359
11360 (define-public python-tlsh
11361 (package
11362 (name "python-tlsh")
11363 (version "3.4.5")
11364 (home-page "https://github.com/trendmicro/tlsh")
11365 (source
11366 (origin
11367 (method git-fetch)
11368 (uri (git-reference
11369 (url "https://github.com/trendmicro/tlsh")
11370 (commit (string-append "v" version))))
11371 (file-name (git-file-name name version))
11372 (sha256
11373 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
11374 (build-system cmake-build-system)
11375 (arguments
11376 '(#:out-of-source? #f
11377 #:phases (modify-phases %standard-phases
11378 (replace
11379 'install
11380 (lambda* (#:key outputs #:allow-other-keys)
11381 ;; Build and install the Python bindings. The underlying
11382 ;; C++ library is apparently not meant to be installed.
11383 (let ((out (assoc-ref outputs "out")))
11384 (with-directory-excursion "py_ext"
11385 (and (system* "python" "setup.py" "build")
11386 (system* "python" "setup.py" "install"
11387 (string-append "--prefix=" out))))))))))
11388 (inputs `(("python" ,python-wrapper))) ;for the bindings
11389 (synopsis "Fuzzy matching library for Python")
11390 (description
11391 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
11392 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
11393 value which can be used for similarity comparisons. Similar objects have
11394 similar hash values, which allows for the detection of similar objects by
11395 comparing their hash values. The byte stream should have a sufficient amount
11396 of complexity; for example, a byte stream of identical bytes will not generate
11397 a hash value.")
11398 (license license:asl2.0)))
11399
11400 (define-public python2-tlsh
11401 (package/inherit python-tlsh
11402 (name "python2-tlsh")
11403 (inputs `(("python" ,python-2)))))
11404
11405 (define-public python-termcolor
11406 (package
11407 (name "python-termcolor")
11408 (version "1.1.0")
11409 (source
11410 (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "termcolor" version))
11413 (sha256
11414 (base32
11415 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
11416 (build-system python-build-system)
11417 (arguments
11418 ;; There are no tests.
11419 `(#:tests? #f))
11420 (home-page "https://pypi.org/project/termcolor/")
11421 (synopsis "ANSII Color formatting for terminal output")
11422 (description
11423 "This package provides ANSII Color formatting for output in terminals.")
11424 (license license:expat)))
11425
11426 (define-public python2-termcolor
11427 (package-with-python2 python-termcolor))
11428
11429 (define-public python-terminaltables
11430 (package
11431 (name "python-terminaltables")
11432 (version "3.1.0")
11433 (source
11434 (origin
11435 (method url-fetch)
11436 (uri (pypi-uri "terminaltables" version))
11437 (sha256
11438 (base32
11439 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
11440 (build-system python-build-system)
11441 (home-page "https://github.com/Robpol86/terminaltables")
11442 (synopsis
11443 "Generate simple tables in terminals from a nested list of strings")
11444 (description
11445 "This package makes it easy to draw tables in terminal/console
11446 applications from a list of lists of strings. It supports multi-line rows.")
11447 (license license:expat)))
11448
11449 (define-public python-libarchive-c
11450 (package
11451 (name "python-libarchive-c")
11452 (version "2.9")
11453 (source (origin
11454 (method url-fetch)
11455 (uri (pypi-uri "libarchive-c" version))
11456 (sha256
11457 (base32
11458 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
11459 (build-system python-build-system)
11460 (arguments
11461 '(#:phases (modify-phases %standard-phases
11462 (add-before
11463 'build 'reference-libarchive
11464 (lambda* (#:key inputs #:allow-other-keys)
11465 ;; Retain the absolute file name of libarchive.so.
11466 (let ((libarchive (assoc-ref inputs "libarchive")))
11467 (substitute* "libarchive/ffi.py"
11468 (("find_library\\('archive'\\)")
11469 (string-append "'" libarchive
11470 "/lib/libarchive.so'"))))))
11471 (replace 'check
11472 (lambda _ (invoke "pytest" "-vv"))))))
11473 (native-inputs
11474 `(("python-mock" ,python-mock)
11475 ("python-pytest" ,python-pytest)))
11476 (inputs
11477 `(("libarchive" ,libarchive)))
11478 (home-page "https://github.com/Changaco/python-libarchive-c")
11479 (synopsis "Python interface to libarchive")
11480 (description
11481 "This package provides Python bindings to libarchive, a C library to
11482 access possibly compressed archives in many different formats. It uses
11483 Python's @code{ctypes} foreign function interface (FFI).")
11484 (license license:lgpl2.0+)))
11485
11486 (define-public python2-libarchive-c
11487 (package-with-python2 python-libarchive-c))
11488
11489 (define-public python-file
11490 (package/inherit file
11491 (name "python-file")
11492 (build-system python-build-system)
11493 (arguments
11494 '(#:tests? #f ;no tests
11495 #:configure-flags '("--single-version-externally-managed" "--root=/")
11496 #:phases (modify-phases %standard-phases
11497 (add-before 'build 'change-directory
11498 (lambda _
11499 (chdir "python")
11500 #t))
11501 (add-before 'build 'set-library-file-name
11502 (lambda* (#:key inputs #:allow-other-keys)
11503 (let ((file (assoc-ref inputs "file")))
11504 (substitute* "magic.py"
11505 (("find_library\\('magic'\\)")
11506 (string-append "'" file "/lib/libmagic.so'")))
11507 #t))))))
11508 (inputs `(("file" ,file)))
11509 (native-inputs (if (%current-target-system)
11510 `(("self" ,this-package))
11511 '()))
11512 (synopsis "Python bindings to the libmagic file type guesser")
11513 (description "This package provides Python bindings to the libmagic file
11514 type guesser.
11515
11516 Note that this module and the @code{python-magic} module both provide a
11517 @file{magic.py} file; these two modules, which are different and were
11518 developed separately, both serve the same purpose: provide Python bindings for
11519 libmagic.")))
11520
11521 (define-public python2-file
11522 (package-with-python2 python-file))
11523
11524 (define-public python-debian
11525 (package
11526 (name "python-debian")
11527 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
11528 (version "0.1.36")
11529 (source
11530 (origin
11531 ;; Use git-fetch, as pypi doesn't include test suite.
11532 (method git-fetch)
11533 (uri (git-reference
11534 (url home-page)
11535 (commit version)))
11536 (file-name (git-file-name name version))
11537 (sha256
11538 (base32
11539 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
11540 (build-system python-build-system)
11541 (arguments
11542 `(#:phases (modify-phases %standard-phases
11543 (add-after 'unpack 'remove-debian-specific-tests
11544 ;; python-apt, apt and dpkg are not yet available in guix,
11545 ;; and these tests heavily depend on them.
11546 (lambda _
11547 (delete-file "lib/debian/tests/test_deb822.py")
11548 (delete-file "lib/debian/tests/test_debfile.py")
11549 #t)))))
11550 (propagated-inputs
11551 `(("python-six" ,python-six)
11552 ("python-chardet" ,python-chardet)))
11553 (synopsis "Debian package related modules")
11554 (description
11555 ;; XXX: Use @enumerate instead of @itemize to work around
11556 ;; <http://bugs.gnu.org/21772>.
11557 "This package provides Python modules that abstract many formats of
11558 Debian-related files, such as:
11559
11560 @enumerate
11561 @item Debtags information;
11562 @item @file{debian/changelog} files;
11563 @item packages files, pdiffs;
11564 @item control files of single or multiple RFC822-style paragraphs---e.g.
11565 @file{debian/control}, @file{.changes}, @file{.dsc};
11566 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
11567 contained files and meta-information.
11568 @end enumerate\n")
11569
11570 ;; Modules are either GPLv2+ or GPLv3+.
11571 (license license:gpl3+)))
11572
11573 (define-public python-json-spec
11574 (package
11575 (name "python-json-spec")
11576 (version "0.10.1")
11577 (source
11578 (origin
11579 (method url-fetch)
11580 (uri (pypi-uri "json-spec" version))
11581 (sha256
11582 (base32
11583 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
11584 (build-system python-build-system)
11585 (propagated-inputs
11586 `(("python-pathlib" ,python-pathlib)
11587 ("python-six" ,python-six)))
11588 (native-inputs
11589 `(("python-pytest" ,python-pytest)))
11590 (home-page "http://py.errorist.io/json-spec")
11591 (synopsis
11592 "JSON Schema, JSON Pointer and JSON Reference for Python")
11593 (description
11594 "This Python library implements several JSON specs, like JSON Schema,
11595 JSON Reference and JSON Pointer.")
11596 (license license:bsd-3)))
11597
11598 (define-public python-fastjsonschema
11599 (package
11600 (name "python-fastjsonschema")
11601 (version "2.15.1")
11602 (source
11603 (origin
11604 (method url-fetch)
11605 (uri (pypi-uri "fastjsonschema" version))
11606 (sha256
11607 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
11608 (build-system python-build-system)
11609 (arguments
11610 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
11611 #:phases
11612 (modify-phases %standard-phases
11613 (replace 'check
11614 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11615 (when tests?
11616 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
11617 (native-inputs
11618 `(("python-colorama" ,python-colorama)
11619 ("python-json-spec" ,python-json-spec)
11620 ("python-jsonschema" ,python-jsonschema)
11621 ("python-pylint" ,python-pylint)
11622 ("python-pytest" ,python-pytest)
11623 ("python-pytest-benchmark"
11624 ,python-pytest-benchmark)
11625 ("python-pytest-cache" ,python-pytest-cache)
11626 ("python-validictory" ,python-validictory)))
11627 (home-page
11628 "https://github.com/horejsek/python-fastjsonschema")
11629 (synopsis
11630 "Fast Python implementation of JSON schema")
11631 (description
11632 "This library implements validation of JSON documents by JSON schema for
11633 drafts 04, 06 and 07.")
11634 (license license:bsd-3)))
11635
11636 (define-public python-nbformat
11637 (package
11638 (name "python-nbformat")
11639 (version "5.1.3")
11640 ;; The PyPi release tarball lacks some test cases and test data.
11641 (source (origin
11642 (method git-fetch)
11643 (uri (git-reference
11644 (url "https://github.com/jupyter/nbformat.git")
11645 (commit version)))
11646 (sha256
11647 (base32
11648 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
11649 (file-name (git-file-name name version))))
11650 (build-system python-build-system)
11651 (arguments
11652 `(#:phases
11653 (modify-phases %standard-phases
11654 (replace 'check
11655 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11656 (when tests?
11657 (invoke "pytest" "-vv")))))))
11658 (propagated-inputs
11659 `(("python-ipython-genutils" ,python-ipython-genutils)
11660 ("python-jsonschema" ,python-jsonschema)
11661 ("python-jupyter-core" ,python-jupyter-core)
11662 ("python-traitlets" ,python-traitlets)))
11663 (native-inputs
11664 `(("python-pytest" ,python-pytest)
11665 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
11666 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
11667 ; testing only.
11668 ("python-testpath" ,python-testpath)))
11669 (home-page "https://jupyter.org")
11670 (synopsis "Jupyter Notebook format")
11671 (description "This package provides the reference implementation of the
11672 Jupyter Notebook format and Python APIs for working with notebooks.")
11673 (license license:bsd-3)))
11674
11675 (define-public python-bleach
11676 (package
11677 (name "python-bleach")
11678 (version "3.1.5")
11679 (source
11680 (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "bleach" version))
11683 (sha256
11684 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
11685 (build-system python-build-system)
11686 (propagated-inputs
11687 `(("python-webencodings" ,python-webencodings)
11688 ("python-six" ,python-six)))
11689 (native-inputs
11690 `(("python-datrie" ,python-datrie)
11691 ("python-genshi" ,python-genshi)
11692 ("python-lxml" ,python-lxml)
11693 ("python-pytest" ,python-pytest)))
11694 (home-page "https://github.com/mozilla/bleach")
11695 (synopsis "Whitelist-based HTML-sanitizing tool")
11696 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
11697 (license license:asl2.0)))
11698
11699 (define-public python2-bleach
11700 (package-with-python2 python-bleach))
11701
11702 (define-public python-entrypoints
11703 (package
11704 (name "python-entrypoints")
11705 (version "0.3")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "entrypoints" version))
11710 (sha256
11711 (base32
11712 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11713 (build-system python-build-system)
11714 ;; The package does not come with a setup.py file, so we have to generate
11715 ;; one ourselves.
11716 (arguments
11717 `(#:tests? #f
11718 #:phases
11719 (modify-phases %standard-phases
11720 (add-after 'unpack 'create-setup.py
11721 (lambda _
11722 (call-with-output-file "setup.py"
11723 (lambda (port)
11724 (format port "\
11725 from setuptools import setup
11726 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11727 " ,version))))))))
11728 (home-page "https://github.com/takluyver/entrypoints")
11729 (synopsis "Discover and load entry points from installed Python packages")
11730 (description "Entry points are a way for Python packages to advertise
11731 objects with some common interface. The most common examples are
11732 @code{console_scripts} entry points, which define shell commands by
11733 identifying a Python function to run. The @code{entrypoints} module contains
11734 functions to find and load entry points.")
11735 (license license:expat)))
11736
11737 (define-public python2-entrypoints
11738 (package-with-python2 python-entrypoints))
11739
11740 (define-public python-epc
11741 (package
11742 (name "python-epc")
11743 (version "0.0.5")
11744 (source
11745 (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "epc" version))
11748 (sha256
11749 (base32
11750 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11751 (build-system python-build-system)
11752 (propagated-inputs
11753 `(("python-sexpdata" ,python-sexpdata)))
11754 (native-inputs
11755 `(("python-nose" ,python-nose)))
11756 (home-page "https://github.com/tkf/python-epc")
11757 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11758 (description
11759 "Python-EPC can call elisp functions from Python and Python functions
11760 from elisp.")
11761 (license license:gpl3)))
11762
11763 (define-public python-forex-python
11764 (package
11765 (name "python-forex-python")
11766 (version "1.5")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "forex-python" version))
11771 (sha256
11772 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11773 (build-system python-build-system)
11774 (arguments
11775 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11776 ;; repository require online data.
11777 `(#:tests? #f))
11778 (propagated-inputs
11779 `(("python-requests" ,python-requests)
11780 ("python-simplejson" ,python-simplejson)))
11781 (home-page "https://github.com/MicroPyramid/forex-python")
11782 (synopsis "Foreign exchange rates and currency conversion")
11783 (description
11784 "@code{python-forex-python} can be used to manipulate foreign
11785 exchange rates and to operate currency conversions.
11786
11787 Features:
11788 @itemize
11789 @item List all currency rates.
11790 @item BitCoin price for all currencies.
11791 @item Converting amount to BitCoins.
11792 @item Get historical rates for any day since 1999.
11793 @item Conversion rate for one currency(ex; USD to INR).
11794 @item Convert amount from one currency to other.('USD 10$' to INR).
11795 @item Currency symbols.
11796 @item Currency names.
11797 @end itemize")
11798 (license license:expat)))
11799
11800 (define-public python-simpleeval
11801 (package
11802 (name "python-simpleeval")
11803 (version "0.9.10")
11804 (source
11805 (origin
11806 (method url-fetch)
11807 (uri (pypi-uri "simpleeval" version))
11808 (sha256
11809 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11810 (build-system python-build-system)
11811 (home-page "https://github.com/danthedeckie/simpleeval")
11812 (synopsis "Simple, safe single expression evaluator library")
11813 (description
11814 "This package provides a quick single file library for easily adding
11815 evaluatable expressions into python projects. Say you want to allow a user
11816 to set an alarm volume, which could depend on the time of day, alarm level,
11817 how many previous alarms had gone off, and if there is music playing at the
11818 time.")
11819 (license license:expat)))
11820
11821 (define-public python-nbconvert
11822 (package
11823 (name "python-nbconvert")
11824 (version "6.0.7")
11825 (source
11826 (origin
11827 (method url-fetch)
11828 (uri (pypi-uri "nbconvert" version))
11829 (sha256
11830 (base32
11831 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11832 (build-system python-build-system)
11833 (arguments
11834 `(#:phases
11835 (modify-phases %standard-phases
11836 (add-after 'unpack 'fix-paths-and-tests
11837 (lambda _
11838 ;; Use pandoc binary from input.
11839 (substitute* "nbconvert/utils/pandoc.py"
11840 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11841 ;; Same for LaTeX.
11842 (substitute* "nbconvert/exporters/pdf.py"
11843 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11844 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11845 ;; Make sure tests are not skipped.
11846 (substitute* (find-files "." "test_.+\\.py$")
11847 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11848 ;; Pandoc is never missing, disable test.
11849 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11850 (("import os" all) (string-append all "\nimport pytest"))
11851 (("(.+)(def test_pandoc_available)" all indent def)
11852 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11853 indent def)))
11854 ;; Not installing pyppeteer, delete test.
11855 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11856 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11857 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11858 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11859 indent def)))))
11860 (replace 'check
11861 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11862 (when tests?
11863 ;; Some tests invoke the installed nbconvert binary.
11864 (add-installed-pythonpath inputs outputs)
11865 ;; Tries to write to this path.
11866 (unsetenv "JUPYTER_CONFIG_DIR")
11867 ;; Tests depend on templates installed to output.
11868 (setenv "JUPYTER_PATH"
11869 (string-append
11870 (assoc-ref outputs "out")
11871 "/share/jupyter:"
11872 (getenv "JUPYTER_PATH")))
11873 ;; Some tests need HOME
11874 (setenv "HOME" "/tmp")
11875 (invoke "pytest" "-vv")))))))
11876 (inputs
11877 `(("pandoc" ,pandoc)
11878 ;; XXX: Disabled, needs substitute*.
11879 ;;("inkscape" ,inkscape)
11880 ))
11881 (native-inputs
11882 `(("python-ipykernel" ,python-ipykernel)
11883 ;; XXX: Disabled, not in guix.
11884 ;;("python-pyppeteer" ,python-pyppeteer)
11885 ("python-pytest" ,python-pytest)
11886 ("python-pytest-cov" ,python-pytest-cov)
11887 ("python-pytest-dependency" ,python-pytest-dependency)
11888 ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
11889 texlive-amsfonts
11890 texlive-booktabs
11891 texlive-caption
11892 texlive-eurosym
11893 texlive-fonts-rsfs
11894 texlive-generic-ulem
11895 texlive-generic-iftex
11896 texlive-jknappen
11897 texlive-latex-amsmath
11898 texlive-latex-enumitem
11899 texlive-latex-fancyvrb
11900 texlive-latex-float
11901 texlive-fontspec
11902 texlive-latex-geometry
11903 texlive-hyperref
11904 texlive-latex-jknapltx
11905 texlive-latex-ms
11906 texlive-oberdiek
11907 texlive-latex-parskip
11908 texlive-latex-trimspaces
11909 texlive-latex-upquote
11910 texlive-latex-ucs
11911 texlive-lm
11912 texlive-mathpazo
11913 texlive-tcolorbox
11914 texlive-titling
11915 texlive-tools
11916 texlive-xcolor
11917 texlive-zapfding)))))
11918 (propagated-inputs
11919 `(("python-bleach" ,python-bleach)
11920 ("python-defusedxml" ,python-defusedxml)
11921 ("python-entrypoints" ,python-entrypoints)
11922 ("python-jinja2" ,python-jinja2)
11923 ("python-jupyter-core" ,python-jupyter-core)
11924 ("python-mistune" ,python-mistune)
11925 ("python-nbclient" ,python-nbclient)
11926 ("python-nbformat" ,python-nbformat)
11927 ("python-pandocfilters" ,python-pandocfilters)
11928 ("python-pygments" ,python-pygments)
11929 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11930 ("python-testpath" ,python-testpath)
11931 ("python-traitlets" ,python-traitlets)
11932 ;; Required, even if [serve] is not used.
11933 ("python-tornado" ,python-tornado-6)))
11934 (home-page "https://jupyter.org")
11935 (synopsis "Converting Jupyter Notebooks")
11936 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11937 notebooks to various other formats via Jinja templates. It allows you to
11938 convert an @code{.ipynb} notebook file into various static formats including:
11939
11940 @enumerate
11941 @item HTML
11942 @item LaTeX
11943 @item PDF
11944 @item Reveal JS
11945 @item Markdown (md)
11946 @item ReStructured Text (rst)
11947 @item executable script
11948 @end enumerate\n")
11949 (license license:bsd-3)))
11950
11951 (define-public python-notebook
11952 (package
11953 (name "python-notebook")
11954 (version "6.3.0")
11955 (source (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "notebook" version))
11958 (sha256
11959 (base32
11960 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11961 (build-system python-build-system)
11962 (arguments
11963 `(#:phases
11964 (modify-phases %standard-phases
11965 (replace 'check
11966 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11967 ;; These tests require a browser
11968 (delete-file-recursively "notebook/tests/selenium")
11969 (when tests?
11970 (add-installed-pythonpath inputs outputs)
11971 ;; Some tests do not expect all files to be installed in the
11972 ;; same directory, but JUPYTER_PATH contains multiple entries.
11973 (unsetenv "JUPYTER_PATH")
11974 ;; Some tests need HOME
11975 (setenv "HOME" "/tmp")
11976 (with-directory-excursion "/tmp"
11977 (invoke "pytest" "-vv"
11978 ;; TODO: This tests fails because nbconvert does not
11979 ;; list "python" as a format.
11980 "-k" "not test_list_formats"))))))))
11981 (propagated-inputs
11982 `(("python-argon2-cffi" ,python-argon2-cffi)
11983 ("python-ipykernel" ,python-ipykernel)
11984 ("python-ipython-genutils" ,python-ipython-genutils)
11985 ("python-jinja2" ,python-jinja2)
11986 ("python-jupyter-client" ,python-jupyter-client)
11987 ("python-jupyter-core" ,python-jupyter-core)
11988 ("python-nbconvert" ,python-nbconvert)
11989 ("python-nbformat" ,python-nbformat)
11990 ("python-prometheus-client" ,python-prometheus-client)
11991 ("python-pyzmq" ,python-pyzmq)
11992 ("python-send2trash" ,python-send2trash)
11993 ("python-terminado" ,python-terminado)
11994 ("python-tornado" ,python-tornado-6)
11995 ("python-traitlets" ,python-traitlets)))
11996 (native-inputs
11997 `(("python-coverage" ,python-coverage)
11998 ("python-nbval" ,python-nbval)
11999 ("python-pytest" ,python-pytest)
12000 ("python-pytest-cov" ,python-pytest-cov)
12001 ("python-requests" ,python-requests)
12002 ("python-requests-unixsocket" ,python-requests-unixsocket)))
12003 (home-page "https://jupyter.org/")
12004 (synopsis "Web-based notebook environment for interactive computing")
12005 (description
12006 "The Jupyter HTML notebook is a web-based notebook environment for
12007 interactive computing.")
12008 (license license:bsd-3)))
12009
12010 (define-public python-widgetsnbextension
12011 (package
12012 (name "python-widgetsnbextension")
12013 (version "3.5.1")
12014 (source
12015 (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "widgetsnbextension" version))
12018 (sha256
12019 (base32
12020 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
12021 (build-system python-build-system)
12022 (propagated-inputs
12023 `(("python-notebook" ,python-notebook)))
12024 (home-page "https://ipython.org")
12025 (synopsis "IPython HTML widgets for Jupyter")
12026 (description "This package provides interactive HTML widgets for Jupyter
12027 notebooks.")
12028 (license license:bsd-3)))
12029
12030 (define-public python-ipywidgets
12031 (package
12032 (name "python-ipywidgets")
12033 (version "7.6.3")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "ipywidgets" version))
12038 (sha256
12039 (base32
12040 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
12041 (build-system python-build-system)
12042 (propagated-inputs
12043 `(("python-ipykernel" ,python-ipykernel)
12044 ("python-ipython" ,python-ipython)
12045 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
12046 ("python-nbformat" ,python-nbformat)
12047 ("python-traitlets" ,python-traitlets)
12048 ("python-widgetsnbextension" ,python-widgetsnbextension)))
12049 (native-inputs
12050 `(("python-mock" ,python-mock)
12051 ("python-pytest" ,python-pytest)
12052 ("python-pytest-cov" ,python-pytest-cov)))
12053 (home-page "https://ipython.org")
12054 (synopsis "IPython HTML widgets for Jupyter")
12055 (description "Ipywidgets are interactive HTML widgets for Jupyter
12056 notebooks and the IPython kernel. Notebooks come alive when interactive
12057 widgets are used. Users gain control of their data and can visualize changes
12058 in the data.")
12059 (license license:bsd-3)))
12060
12061 (define-public python-jupyter-console
12062 (package
12063 (name "python-jupyter-console")
12064 (version "6.1.0")
12065 (source
12066 (origin
12067 (method url-fetch)
12068 (uri (pypi-uri "jupyter_console" version))
12069 (sha256
12070 (base32
12071 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
12072 (build-system python-build-system)
12073 (propagated-inputs
12074 `(("python-ipykernel" ,python-ipykernel)
12075 ("python-jupyter-client" ,python-jupyter-client)
12076 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
12077 ("python-pygments" ,python-pygments)))
12078 (native-inputs
12079 `(("python-nose" ,python-nose)))
12080 (home-page "https://jupyter.org")
12081 (synopsis "Jupyter terminal console")
12082 (description "This package provides a terminal-based console frontend for
12083 Jupyter kernels. It also allows for console-based interaction with non-Python
12084 Jupyter kernels such as IJulia and IRKernel.")
12085 (license license:bsd-3)))
12086
12087 ;; The python-ipython and python-jupyter-console require each other. To get
12088 ;; the functionality in both packages working, strip down the
12089 ;; python-jupyter-console package when using it as an input to python-ipython.
12090 (define python-jupyter-console-minimal
12091 (package/inherit python-jupyter-console
12092 (name "python-jupyter-console-minimal")
12093 (arguments
12094 (substitute-keyword-arguments
12095 (package-arguments python-jupyter-console)
12096 ((#:phases phases)
12097 `(modify-phases ,phases
12098 (add-after 'install 'delete-bin
12099 (lambda* (#:key outputs #:allow-other-keys)
12100 ;; Delete the bin files, to avoid conflicts in profiles
12101 ;; where python-ipython and python-jupyter-console are
12102 ;; both present.
12103 (delete-file-recursively
12104 (string-append
12105 (assoc-ref outputs "out") "/bin"))))))))
12106 ;; Remove the python-ipython propagated input, to avoid the cycle
12107 (propagated-inputs
12108 (alist-delete
12109 "python-ipython"
12110 (package-propagated-inputs python-jupyter-console)))))
12111
12112 (define-public python-qtconsole
12113 (package
12114 (name "python-qtconsole")
12115 (version "4.4.3")
12116 (source
12117 (origin
12118 (method url-fetch)
12119 (uri (pypi-uri "qtconsole" version))
12120 (sha256
12121 (base32
12122 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
12123 (build-system python-build-system)
12124 (arguments
12125 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
12126 ;; but we only have the LTS version 5.x. This means that there might be
12127 ;; runtime errors, but since this is a dependency of the Jupyter package,
12128 ;; and Jupyter can be used without the qtconsole we can overlook this for
12129 ;; now.
12130 `(#:tests? #f
12131 #:phases
12132 (modify-phases %standard-phases
12133 (add-before 'check 'pre-check
12134 (lambda _
12135 (setenv "QT_QPA_PLATFORM" "offscreen")
12136 #t)))))
12137 (propagated-inputs
12138 `(("python-ipykernel" ,python-ipykernel)
12139 ("python-ipython" ,python-ipython)))
12140 (native-inputs
12141 `(("python-pytest" ,python-pytest)))
12142 (home-page "https://jupyter.org")
12143 (synopsis "Jupyter Qt console")
12144 (description "This package provides a Qt-based console for Jupyter with
12145 support for rich media output.")
12146 (license license:bsd-3)))
12147
12148 (define-public python-jsbeautifier
12149 (package
12150 (name "python-jsbeautifier")
12151 (version "1.10.2")
12152 (home-page "https://github.com/beautify-web/js-beautify")
12153 (source (origin
12154 (method git-fetch)
12155 (uri (git-reference
12156 (url home-page)
12157 (commit (string-append "v" version))))
12158 (file-name (git-file-name name version))
12159 (sha256
12160 (base32
12161 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
12162 (build-system python-build-system)
12163 (arguments
12164 `(#:phases (modify-phases %standard-phases
12165 (add-after 'unpack 'chdir
12166 (lambda _
12167 ;; The upstream Git repository contains all the code,
12168 ;; but this package only builds the python code.
12169 (chdir "python")
12170 #t))
12171 (add-after 'unpack 'patch-python-six-requirements
12172 (lambda _
12173 (substitute* "python/setup.py"
12174 (("six>=1.12.0")
12175 "six>=1.11.0"))
12176 #t)))))
12177 (propagated-inputs
12178 `(("python-editorconfig" ,python-editorconfig)
12179 ("python-six" ,python-six)))
12180 (native-inputs
12181 `(("python-pytest" ,python-pytest)))
12182 (synopsis "JavaScript unobfuscator and beautifier")
12183 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
12184 popular online obfuscators.")
12185 (license license:expat)))
12186
12187 (define-public jupyter
12188 (package
12189 (name "jupyter")
12190 (version "1.0.0")
12191 (source
12192 (origin
12193 (method url-fetch)
12194 (uri (pypi-uri "jupyter" version))
12195 (sha256
12196 (base32
12197 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
12198 (build-system python-build-system)
12199 (arguments '(#:tests? #f)) ; there are none.
12200 (propagated-inputs
12201 `(("python-ipykernel" ,python-ipykernel)
12202 ("python-ipywidgets" ,python-ipywidgets)
12203 ("python-jupyter-console" ,python-jupyter-console)
12204 ("python-nbconvert" ,python-nbconvert)
12205 ("python-notebook" ,python-notebook)
12206 ("python-qtconsole" ,python-qtconsole)))
12207 (home-page "https://jupyter.org")
12208 (synopsis "Web application for interactive documents")
12209 (description
12210 "The Jupyter Notebook is a web application that allows you to create and
12211 share documents that contain live code, equations, visualizations and
12212 explanatory text. Uses include: data cleaning and transformation, numerical
12213 simulation, statistical modeling, machine learning and much more.")
12214 (license license:bsd-3)))
12215
12216 (define-public python-chardet
12217 (package
12218 (name "python-chardet")
12219 (version "3.0.4")
12220 (source
12221 (origin
12222 (method url-fetch)
12223 (uri (pypi-uri "chardet" version))
12224 (sha256
12225 (base32
12226 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
12227 (native-inputs
12228 `(("python-hypothesis" ,python-hypothesis)
12229 ("python-pytest" ,python-pytest)
12230 ("python-pytest-runner" ,python-pytest-runner)))
12231 (build-system python-build-system)
12232 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
12233 (arguments `(#:tests? #f))
12234 (home-page "https://github.com/chardet/chardet")
12235 (synopsis "Universal encoding detector for Python 2 and 3")
12236 (description
12237 "This package provides @code{chardet}, a Python module that can
12238 automatically detect a wide range of file encodings.")
12239 (license license:lgpl2.1+)))
12240
12241 (define-public python2-chardet
12242 (package-with-python2 python-chardet))
12243
12244 (define-public python-charset-normalizer
12245 (package
12246 (name "python-charset-normalizer")
12247 (version "2.0.5")
12248 (source
12249 (origin
12250 (method url-fetch)
12251 (uri (pypi-uri "charset-normalizer" version))
12252 (sha256
12253 (base32 "0rr3iv2xw4rz5ijnfqk229fw85cq6p6rhqqsilm0ldzncblfg63h"))))
12254 (build-system python-build-system)
12255 (native-inputs
12256 `(("python-pytest" ,python-pytest)))
12257 (home-page "https://github.com/ousret/charset_normalizer")
12258 (synopsis "Universal Charset Detector, alternative to Chardet")
12259 (description "This library helps you read text from an unknown charset
12260 encoding. Motivated by @code{chardet}, it tries to resolve the issue by
12261 taking a new approach. All IANA character set names for which the Python core
12262 library provides codecs are supported.")
12263 (license license:expat)))
12264
12265 (define-public python-docopt
12266 (package
12267 (name "python-docopt")
12268 (version "0.6.2")
12269 (source
12270 (origin
12271 (method git-fetch)
12272 ;; The release on PyPI does not include tests.
12273 (uri (git-reference
12274 (url "https://github.com/docopt/docopt")
12275 (commit version)))
12276 (file-name (git-file-name name version))
12277 (sha256
12278 (base32
12279 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
12280 (patches (search-patches "python-docopt-pytest6-compat.patch"))))
12281 (build-system python-build-system)
12282 (native-inputs
12283 `(("python-pytest" ,python-pytest)))
12284 (arguments
12285 `(#:phases
12286 (modify-phases %standard-phases
12287 (replace 'check
12288 (lambda* (#:key tests? #:allow-other-keys)
12289 (when tests?
12290 (invoke "py.test")))))))
12291 (home-page "http://docopt.org")
12292 (synopsis "Command-line interface description language for Python")
12293 (description "This library allows the user to define a command-line
12294 interface from a program's help message rather than specifying it
12295 programmatically with command-line parsers like @code{getopt} and
12296 @code{argparse}.")
12297 (license license:expat)))
12298
12299 (define-public python2-docopt
12300 (package-with-python2 python-docopt))
12301
12302 (define-public python-pythondialog
12303 (package
12304 (name "python-pythondialog")
12305 (version "3.4.0")
12306 (source
12307 (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "pythondialog" version))
12310 (sha256
12311 (base32
12312 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
12313 (build-system python-build-system)
12314 (arguments
12315 `(#:phases
12316 (modify-phases %standard-phases
12317 (add-after 'unpack 'patch-path
12318 (lambda* (#:key inputs #:allow-other-keys)
12319 (let* ((dialog (assoc-ref inputs "dialog")))
12320 ;; Since this library really wants to grovel the search path, we
12321 ;; must hardcode dialog's store path into it.
12322 (substitute* "dialog.py"
12323 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
12324 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
12325 #t))))
12326 #:tests? #f)) ; no test suite
12327 (propagated-inputs
12328 `(("dialog" ,dialog)))
12329 (home-page "http://pythondialog.sourceforge.net/")
12330 (synopsis "Python interface to the UNIX dialog utility")
12331 (description "A Python wrapper for the dialog utility. Its purpose is to
12332 provide an easy to use, pythonic and comprehensive Python interface to dialog.
12333 This allows one to make simple text-mode user interfaces on Unix-like systems")
12334 (license license:lgpl2.1)
12335 (properties `((python2-variant . ,(delay python2-pythondialog))))))
12336
12337 (define-public python2-pythondialog
12338 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
12339 (package
12340 (inherit base)
12341 (version (package-version python-pythondialog))
12342 (source (origin
12343 (method url-fetch)
12344 (uri (pypi-uri "python2-pythondialog" version))
12345 (sha256
12346 (base32
12347 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
12348
12349 (define-public python-configobj
12350 (package
12351 (name "python-configobj")
12352 (version "5.0.6")
12353 (source (origin
12354 (method url-fetch)
12355 (uri (pypi-uri "configobj" version))
12356 (sha256
12357 (base32
12358 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
12359 ;; Patch setup.py so it looks for python-setuptools, which is
12360 ;; required to parse the keyword 'install_requires' in setup.py.
12361 (patches (search-patches "python-configobj-setuptools.patch"))))
12362 (build-system python-build-system)
12363 (propagated-inputs
12364 `(("python-six" ,python-six)))
12365 (synopsis "Config file reading, writing and validation")
12366 (description "ConfigObj is a simple but powerful config file reader and
12367 writer: an ini file round tripper. Its main feature is that it is very easy to
12368 use, with a straightforward programmer’s interface and a simple syntax for
12369 config files.")
12370 (home-page "https://github.com/DiffSK/configobj")
12371 (license license:bsd-3)))
12372
12373 (define-public python2-configobj
12374 (package-with-python2 python-configobj))
12375
12376 (define-public python-configargparse
12377 (package
12378 (name "python-configargparse")
12379 (version "1.2.3")
12380 (source (origin
12381 (method url-fetch)
12382 (uri (pypi-uri "ConfigArgParse" version))
12383 (sha256
12384 (base32
12385 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
12386 (build-system python-build-system)
12387 (native-inputs
12388 `(("python-pyyaml" ,python-pyyaml)))
12389 (arguments
12390 `(#:phases
12391 (modify-phases %standard-phases
12392 (replace 'check
12393 (lambda _
12394 ;; Bypass setuptools-shim because one test relies on "setup.py"
12395 ;; being the first argument passed to the python call.
12396 ;;
12397 ;; NOTE: Many tests do not run because they rely on Python's
12398 ;; built-in test.test_argparse, but we remove the unit tests from
12399 ;; our Python installation.
12400 (invoke "python" "setup.py" "test"))))))
12401 (synopsis "Replacement for argparse")
12402 (description "A drop-in replacement for argparse that allows options to also
12403 be set via config files and/or environment variables.")
12404 (home-page "https://github.com/bw2/ConfigArgParse")
12405 (license license:expat)))
12406
12407 (define-public python-argparse-manpage
12408 (package
12409 (name "python-argparse-manpage")
12410 (version "1.1")
12411 (source
12412 (origin
12413 (method url-fetch)
12414 (uri (pypi-uri "argparse-manpage" version))
12415 (sha256
12416 (base32
12417 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
12418 (build-system python-build-system)
12419 (home-page "https://github.com/praiskup/argparse-manpage")
12420 (synopsis "Build manual page from Python's ArgumentParser object")
12421 (description
12422 "This package provides tools to build manual pages from Python's
12423 @code{ArgumentParser} object.")
12424 (license license:asl2.0)))
12425
12426 (define-public python-contextlib2
12427 (package
12428 (name "python-contextlib2")
12429 (version "0.6.0.post1")
12430 (source
12431 (origin
12432 (method url-fetch)
12433 (uri (pypi-uri "contextlib2" version))
12434 (sha256
12435 (base32
12436 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
12437 (build-system python-build-system)
12438 (home-page "https://contextlib2.readthedocs.org/")
12439 (synopsis "Tools for decorators and context managers")
12440 (description "This module is primarily a backport of the Python
12441 3.2 contextlib to earlier Python versions. Like contextlib, it
12442 provides utilities for common tasks involving decorators and context
12443 managers. It also contains additional features that are not part of
12444 the standard library.")
12445 (properties `((python2-variant . ,(delay python2-contextlib2))))
12446 (license license:psfl)))
12447
12448 (define-public python2-contextlib2
12449 (let ((base (package-with-python2
12450 (strip-python2-variant python-contextlib2))))
12451 (package/inherit base
12452 (arguments
12453 (substitute-keyword-arguments (package-arguments base)
12454 ((#:phases phases)
12455 `(modify-phases ,phases
12456 (replace 'check
12457 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
12458 (native-inputs
12459 `(("python2-unittest2" ,python2-unittest2))))))
12460
12461 ;; This package is used by python2-pytest via python2-importlib-metadata,
12462 ;; and thus can not depend on python-unittest2 (which depends on pytest).
12463 (define-public python2-contextlib2-bootstrap
12464 (hidden-package
12465 (package/inherit
12466 python2-contextlib2
12467 (name "python2-contextlib2-bootstrap")
12468 (arguments
12469 `(#:tests? #f
12470 ,@(package-arguments python2-contextlib2)))
12471 (native-inputs '()))))
12472
12473 (define-public python-texttable
12474 (package
12475 (name "python-texttable")
12476 (version "1.6.2")
12477 (source
12478 (origin
12479 (method url-fetch)
12480 (uri (pypi-uri "texttable" version))
12481 (sha256
12482 (base32
12483 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
12484 (build-system python-build-system)
12485 (arguments
12486 `(#:phases
12487 (modify-phases %standard-phases
12488 (replace 'check
12489 (lambda _ (invoke "pytest" "tests.py"))))))
12490 (native-inputs
12491 `(("python-pytest" ,python-pytest)))
12492 (home-page "https://github.com/foutaise/texttable/")
12493 (synopsis "Python module for creating simple ASCII tables")
12494 (description "Texttable is a Python module for creating simple ASCII
12495 tables.")
12496 (license license:expat)))
12497
12498 (define-public python2-texttable
12499 (package-with-python2 python-texttable))
12500
12501 (define-public python-atomicwrites
12502 (package
12503 (name "python-atomicwrites")
12504 (version "1.4.0")
12505 (source (origin
12506 (method url-fetch)
12507 (uri (pypi-uri "atomicwrites" version))
12508 (sha256
12509 (base32
12510 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
12511 (build-system python-build-system)
12512 (arguments `(#:tests? #f)) ;avoid circular dependency with pytest
12513 (synopsis "Atomic file writes in Python")
12514 (description "Library for atomic file writes using platform dependent tools
12515 for atomic file system operations.")
12516 (home-page "https://github.com/untitaker/python-atomicwrites")
12517 (license license:expat)))
12518
12519 (define-public python2-atomicwrites
12520 (package-with-python2 python-atomicwrites))
12521
12522 (define-public python-atomicwrites-1.4
12523 (package
12524 (inherit python-atomicwrites)
12525 (version "1.4.0")
12526 (source (origin
12527 (method url-fetch)
12528 (uri (pypi-uri "atomicwrites" version))
12529 (sha256
12530 (base32
12531 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))))
12532
12533 (define-public python-qstylizer
12534 (package
12535 (name "python-qstylizer")
12536 (version "0.1.10")
12537 (source
12538 (origin
12539 (method git-fetch)
12540 (uri (git-reference
12541 (url "https://github.com/blambright/qstylizer")
12542 (commit version)))
12543 (file-name (git-file-name name version))
12544 (sha256
12545 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
12546 (build-system python-build-system)
12547 (arguments
12548 `(#:test-target "pytest"
12549 #:phases
12550 (modify-phases %standard-phases
12551 (add-before 'build 'set-pbr-version
12552 (lambda _
12553 (setenv "PBR_VERSION" "3.0.1"))))))
12554 (native-inputs
12555 `(("python-pbr" ,python-pbr)
12556 ("python-pytest" ,python-pytest)
12557 ("python-pytest-catchlog" ,python-pytest-catchlog)
12558 ("python-pytest-cov" ,python-pytest-cov)
12559 ("python-pytest-mock" ,python-pytest-mock)
12560 ("python-pytest-runner" ,python-pytest-runner)
12561 ("python-pytest-xdist" ,python-pytest-xdist)))
12562 (propagated-inputs
12563 `(("python-inflection" ,python-inflection)
12564 ("python-tinycss" ,python-tinycss)))
12565 (home-page "https://github.com/blambright/qstylizer")
12566 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
12567 (description "@code{qstylizer} is a Python package designed to help with
12568 the construction of PyQt/PySide stylesheets.")
12569 (license license:expat)))
12570
12571 (define-public python-click-threading
12572 (package
12573 (name "python-click-threading")
12574 (version "0.4.4")
12575 (source (origin
12576 (method url-fetch)
12577 (uri (pypi-uri "click-threading" version))
12578 (sha256
12579 (base32
12580 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
12581 (build-system python-build-system)
12582 (propagated-inputs
12583 `(("python-click" ,python-click)))
12584 (synopsis "Utilities for multithreading in Click")
12585 (description "This package provides utilities for multithreading in Click
12586 applications.")
12587 (home-page "https://github.com/click-contrib/click-threading")
12588 (license license:expat)))
12589
12590 (define-public python-click-log
12591 (package
12592 (name "python-click-log")
12593 (version "0.3.2")
12594 (source (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "click-log" version))
12597 (sha256
12598 (base32
12599 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
12600 (build-system python-build-system)
12601 (propagated-inputs
12602 `(("python-click" ,python-click)))
12603 (synopsis "Logging for click applications")
12604 (description "This package provides a Python library for logging Click
12605 applications.")
12606 (home-page "https://github.com/click-contrib/click-log")
12607 (license license:expat)))
12608
12609 (define-public python-click-default-group
12610 (package
12611 (name "python-click-default-group")
12612 (version "1.2.2")
12613 (source (origin
12614 (method url-fetch)
12615 (uri (pypi-uri "click-default-group" version))
12616 (sha256
12617 (base32
12618 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
12619 (build-system python-build-system)
12620 (arguments
12621 `(#:tests? #f)) ; no target
12622 (propagated-inputs
12623 `(("python-click" ,python-click)))
12624 (synopsis "Extends click.Group")
12625 (description "This package extends click.Group to invoke a command without
12626 explicit subcommand name.")
12627 (home-page "https://github.com/click-contrib/click-default-group")
12628 (license license:bsd-3)))
12629
12630 (define-public python-structlog
12631 (package
12632 (name "python-structlog")
12633 (version "20.2.0")
12634 (source
12635 (origin
12636 (method url-fetch)
12637 (uri (pypi-uri "structlog" version))
12638 (sha256
12639 (base32
12640 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
12641 (build-system python-build-system)
12642 (arguments
12643 `(#:phases
12644 (modify-phases %standard-phases
12645 (replace 'check
12646 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12647 (when tests?
12648 (add-installed-pythonpath inputs outputs)
12649 (invoke "pytest"))
12650 #t)))))
12651 (native-inputs
12652 `(("python-coverage" ,python-coverage)
12653 ("python-freezegun" ,python-freezegun)
12654 ("python-pretend" ,python-pretend)
12655 ("python-pytest" ,python-pytest)
12656 ("python-pytest-asyncio" ,python-pytest-asyncio)
12657 ("python-simplejson" ,python-simplejson)
12658 ("python-twisted" ,python-twisted)))
12659 (home-page "https://www.structlog.org/")
12660 (synopsis "Structured Logging for Python")
12661 (description "@code{structlog} changes logging in Python by adding structure
12662 to your log entries.")
12663 (license (list license:asl2.0 license:expat))))
12664
12665 (define-public python-apipkg
12666 (package
12667 (name "python-apipkg")
12668 (version "1.5")
12669 (source (origin
12670 (method url-fetch)
12671 (uri (pypi-uri "apipkg" version))
12672 (sha256
12673 (base32
12674 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
12675 (build-system python-build-system)
12676 (native-inputs
12677 `(("python-pytest" ,python-pytest)
12678 ("python-setuptools-scm" ,python-setuptools-scm)))
12679 (synopsis "Namespace control and lazy-import mechanism")
12680 (description "With apipkg you can control the exported namespace of a Python
12681 package and greatly reduce the number of imports for your users. It is a small
12682 pure Python module that works on virtually all Python versions.")
12683 (home-page "https://github.com/pytest-dev/apipkg")
12684 (license license:expat)))
12685
12686 (define-public python-execnet
12687 (package
12688 (name "python-execnet")
12689 (version "1.9.0")
12690 (source (origin
12691 (method url-fetch)
12692 (uri (pypi-uri "execnet" version))
12693 (sha256
12694 (base32
12695 "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
12696 (patches (search-patches "python-execnet-read-only-fix.patch"))))
12697 (build-system python-build-system)
12698 (arguments
12699 `(#:phases
12700 (modify-phases %standard-phases
12701 (replace 'check
12702 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12703 (when tests?
12704 ;; Unset PYTHONDONTWRITEBYTECODE to match the
12705 ;; expectations of a test in
12706 ;; 'testing/test_gateway.py'.
12707 (unsetenv "PYTHONDONTWRITEBYTECODE")
12708
12709 (add-installed-pythonpath inputs outputs)
12710 (invoke "pytest" "-vv")))))))
12711 (native-inputs
12712 `(("python-pytest" ,python-pytest)
12713 ("python-setuptools-scm" ,python-setuptools-scm)))
12714 (synopsis "Rapid multi-Python deployment")
12715 (description "Execnet provides a share-nothing model with
12716 channel-send/receive communication for distributing execution across many
12717 Python interpreters across version, platform and network barriers. It has a
12718 minimal and fast API targeting the following uses:
12719 @enumerate
12720 @item distribute tasks to (many) local or remote CPUs
12721 @item write and deploy hybrid multi-process applications
12722 @item write scripts to administer multiple environments
12723 @end enumerate")
12724 (home-page "https://codespeak.net/execnet/")
12725 (license license:expat)))
12726
12727 (define-public python2-execnet
12728 (package-with-python2 python-execnet))
12729
12730 (define-public python-icalendar
12731 (package
12732 (name "python-icalendar")
12733 (version "4.0.7")
12734 (source (origin
12735 (method url-fetch)
12736 (uri (pypi-uri "icalendar" version))
12737 (sha256
12738 (base32
12739 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
12740 (build-system python-build-system)
12741 (propagated-inputs
12742 `(("python-dateutil" ,python-dateutil)
12743 ("python-pytz" ,python-pytz)))
12744 (synopsis "Python library for parsing iCalendar files")
12745 (description "The icalendar package is a parser/generator of iCalendar
12746 files for use with Python.")
12747 (home-page "https://github.com/collective/icalendar")
12748 (license license:bsd-2)))
12749
12750 (define-public python-args
12751 (package
12752 (name "python-args")
12753 (version "0.1.0")
12754 (source (origin
12755 (method url-fetch)
12756 (uri (pypi-uri "args" version))
12757 (sha256
12758 (base32
12759 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12760 (build-system python-build-system)
12761 (home-page "https://github.com/kennethreitz/args")
12762 (synopsis "Command-line argument parser")
12763 (description
12764 "This library provides a Python module to parse command-line arguments.")
12765 (license license:bsd-3)))
12766
12767 (define-public python2-args
12768 (package-with-python2 python-args))
12769
12770 (define-public python-clint
12771 (package
12772 (name "python-clint")
12773 (version "0.5.1")
12774 (source (origin
12775 (method url-fetch)
12776 (uri (pypi-uri "clint" version))
12777 (sha256
12778 (base32
12779 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12780 (build-system python-build-system)
12781 (arguments
12782 '(#:phases
12783 (modify-phases %standard-phases
12784 (replace 'check
12785 (lambda _ (invoke "py.test" "-v"))))))
12786 (native-inputs
12787 `(("python-pytest" ,python-pytest)))
12788 (propagated-inputs
12789 `(("python-args" ,python-args)))
12790 (home-page "https://github.com/kennethreitz/clint")
12791 (synopsis "Command-line interface tools")
12792 (description
12793 "Clint is a Python module filled with a set of tools for developing
12794 command-line applications, including tools for colored and indented
12795 output, progress bar display, and pipes.")
12796 (license license:isc)))
12797
12798 (define-public python2-clint
12799 (package-with-python2 python-clint))
12800
12801 (define-public python-rply
12802 (package
12803 (name "python-rply")
12804 (version "0.7.8")
12805 (source (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "rply" version))
12808 (sha256
12809 (base32
12810 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12811 (build-system python-build-system)
12812 (propagated-inputs
12813 `(("python-appdirs" ,python-appdirs)))
12814 (home-page "https://github.com/alex/rply")
12815 (synopsis "Parser generator for Python")
12816 (description
12817 "This package provides a pure Python based parser generator, that also
12818 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12819 with a new public API, and RPython support.")
12820 (license license:bsd-3)))
12821
12822 (define-public python2-rply
12823 (package-with-python2 python-rply))
12824
12825 (define-public python-hy
12826 (package
12827 (name "python-hy")
12828 (version "0.18.0")
12829 (source (origin
12830 (method url-fetch)
12831 (uri (pypi-uri "hy" version))
12832 (sha256
12833 (base32
12834 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12835 (build-system python-build-system)
12836 (arguments
12837 '(#:phases
12838 (modify-phases %standard-phases
12839 (add-before 'install 'set-HOME
12840 (lambda _
12841 (setenv "HOME" "/tmp") #t))
12842 (replace 'check
12843 (lambda _
12844 ;; Tests require write access to HOME.
12845 (setenv "HOME" "/tmp")
12846 (invoke "nosetests"))))))
12847 (native-inputs
12848 `(("python-coverage" ,python-coverage)
12849 ("python-nose" ,python-nose)))
12850 (propagated-inputs
12851 `(("python-astor" ,python-astor)
12852 ("python-colorama" ,python-colorama)
12853 ("python-rply" ,python-rply)
12854 ("python-funcparserlib"
12855 ,python-funcparserlib)))
12856 (home-page "http://hylang.org/")
12857 (synopsis "Lisp frontend to Python")
12858 (description
12859 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12860 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12861 Python at your fingertips, in Lisp form.")
12862 (license license:expat)))
12863
12864 (define-public python-hissp
12865 (package
12866 (name "python-hissp")
12867 (version "0.2.0")
12868 (source
12869 (origin
12870 (method url-fetch)
12871 (uri (pypi-uri "hissp" version))
12872 (sha256
12873 (base32
12874 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12875 (build-system python-build-system)
12876 (home-page "https://github.com/gilch/hissp")
12877 (synopsis "It's Python with a Lissp")
12878 (description "Hissp is a modular Lisp implementation that compiles to a
12879 functional subset of Python—Syntactic macro metaprogramming with full access
12880 to the Python ecosystem.")
12881 (license license:asl2.0)))
12882
12883 (define-public python2-functools32
12884 (package
12885 (name "python2-functools32")
12886 (version "3.2.3-2")
12887 (source
12888 (origin
12889 (method url-fetch)
12890 (uri (pypi-uri "functools32" version))
12891 (sha256
12892 (base32
12893 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12894 (build-system python-build-system)
12895 (arguments
12896 `(#:python ,python-2
12897 #:tests? #f)) ; no test target
12898 (home-page "https://github.com/MiCHiLU/python-functools32")
12899 (synopsis
12900 "Backport of the functools module from Python 3.2.3")
12901 (description
12902 "This package is a backport of the @code{functools} module from Python
12903 3.2.3 for use with older versions of Python and PyPy.")
12904 (license license:expat)))
12905
12906 (define-public python2-subprocess32
12907 (package
12908 (name "python2-subprocess32")
12909 (version "3.2.7")
12910 (source (origin
12911 (method url-fetch)
12912 (uri (pypi-uri "subprocess32" version))
12913 (sha256
12914 (base32
12915 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12916 (patches
12917 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12918 (build-system python-build-system)
12919 (arguments
12920 `(#:python ,python-2
12921 ;; The test suite fails with Python > 2.7.13:
12922 ;; import test.support
12923 ;; ImportError: No module named support
12924 #:tests? #f
12925 #:phases
12926 (modify-phases %standard-phases
12927 (add-after 'unpack 'patch-/bin/sh
12928 (lambda _
12929 (substitute* '("subprocess32.py"
12930 "test_subprocess32.py")
12931 (("/bin/sh") (which "sh")))
12932 #t)))))
12933 (home-page "https://github.com/google/python-subprocess32")
12934 (synopsis "Backport of the subprocess module from Python 3.2")
12935 (description
12936 "This is a backport of the @code{subprocess} standard library module
12937 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12938 new features. On POSIX systems it is guaranteed to be reliable when used
12939 in threaded applications. It includes timeout support from Python 3.3 but
12940 otherwise matches 3.2’s API.")
12941 (license license:psfl)))
12942
12943 (define-public python2-futures
12944 (package
12945 (name "python2-futures")
12946 (version "3.2.0")
12947 (source
12948 (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "futures" version))
12951 (sha256
12952 (base32
12953 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12954 (build-system python-build-system)
12955 (arguments
12956 `(#:python ,python-2
12957 #:phases
12958 (modify-phases %standard-phases
12959 (replace 'check
12960 (lambda _
12961 (invoke "python" "test_futures.py")
12962 #t)))))
12963 (home-page "https://github.com/agronholm/pythonfutures")
12964 (synopsis
12965 "Backport of the concurrent.futures package from Python 3.2")
12966 (description
12967 "The concurrent.futures module provides a high-level interface for
12968 asynchronously executing callables. This package backports the
12969 concurrent.futures package from Python 3.2")
12970 (license license:bsd-3)))
12971
12972 (define-public python-promise
12973 (package
12974 (name "python-promise")
12975 (version "0.4.2")
12976 (source
12977 (origin
12978 (method url-fetch)
12979 (uri (pypi-uri "promise" version))
12980 (sha256
12981 (base32
12982 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12983 (build-system python-build-system)
12984 ;; Tests wants python-futures, which is a python2 only program, and
12985 ;; can't be found by python-promise at test time.
12986 (arguments `(#:tests? #f))
12987 (home-page "https://github.com/syrusakbary/promise")
12988 (synopsis "Promises/A+ implementation for Python")
12989 (description
12990 "Promises/A+ implementation for Python")
12991 (properties `((python2-variant . ,(delay python2-promise))))
12992 (license license:expat)))
12993
12994 (define-public python2-promise
12995 (let ((promise (package-with-python2
12996 (strip-python2-variant python-promise))))
12997 (package/inherit promise
12998 (arguments (substitute-keyword-arguments (package-arguments promise)
12999 ((#:tests? _) #t)))
13000 (native-inputs
13001 `(("python2-futures" ,python2-futures)
13002 ("python2-pytest" ,python2-pytest)
13003 ,@(package-native-inputs promise))))))
13004
13005 (define-public python-progressbar2
13006 (package
13007 (name "python-progressbar2")
13008 (version "3.51.3")
13009 (source
13010 (origin
13011 (method url-fetch)
13012 (uri (pypi-uri "progressbar2" version))
13013 (sha256
13014 (base32
13015 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
13016 (build-system python-build-system)
13017 (propagated-inputs
13018 `(("python-six" ,python-six)
13019 ("python-utils" ,python-utils)))
13020 (native-inputs
13021 `(("python-flake8" ,python-flake8)
13022 ("python-freezegun" ,python-freezegun)
13023 ("python-pycodestyle" ,python-pycodestyle)
13024 ("python-pytest" ,python-pytest)
13025 ("python-pytest-cache" ,python-pytest-cache)
13026 ("python-pytest-cov" ,python-pytest-cov)
13027 ("python-pytest-flakes" ,python-pytest-flakes)
13028 ("python-pytest-pep8" ,python-pytest-pep8)
13029 ("python-sphinx" ,python-sphinx)))
13030 (home-page "https://github.com/WoLpH/python-progressbar")
13031 (synopsis "Text progress bar library for Python")
13032 (description
13033 "This package provides a Python progressbar library to provide
13034 visual (yet text based) progress to long running operations.")
13035 (license license:bsd-3)))
13036
13037 (define-public python-progressbar33
13038 (package
13039 (name "python-progressbar33")
13040 (version "2.4")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "progressbar33" version))
13045 (sha256
13046 (base32
13047 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
13048 (build-system python-build-system)
13049 (home-page "https://github.com/germangh/python-progressbar")
13050 (synopsis "Text progress bar library for Python")
13051 (description
13052 "This package provides a text progress bar library for Python. This
13053 version only differs from the original @code{progressbar} package in that it
13054 uses relative package imports instead of absolute imports, which is necessary
13055 for the module to work under Python 3.3.")
13056 ;; Either or both of these licenses may be selected.
13057 (license (list license:lgpl2.1+ license:bsd-3))))
13058
13059 (define-public python-colorama
13060 (package
13061 (name "python-colorama")
13062 (version "0.4.4")
13063 (source
13064 (origin
13065 (method url-fetch)
13066 (uri (pypi-uri "colorama" version))
13067 (sha256
13068 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
13069 (build-system python-build-system)
13070 (synopsis "Colored terminal text rendering for Python")
13071 (description "Colorama is a Python library for rendering colored terminal
13072 text.")
13073 (home-page "https://pypi.org/project/colorama/")
13074 (license license:bsd-3)))
13075
13076 (define-public python2-colorama
13077 (package-with-python2 python-colorama))
13078
13079 ;; awscli and botocore do not accept version 0.4.4
13080 (define-public python-colorama-for-awscli
13081 (package
13082 (inherit python-colorama)
13083 (version "0.4.3")
13084 (source
13085 (origin
13086 (method url-fetch)
13087 (uri (pypi-uri "colorama" version))
13088 (sha256
13089 (base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
13090
13091 (define-public python-moto
13092 (package
13093 (name "python-moto")
13094 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
13095 (version "1.3.16.dev134")
13096 (source (origin
13097 (method url-fetch)
13098 (uri (pypi-uri "moto" version))
13099 (sha256
13100 (base32
13101 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
13102 (build-system python-build-system)
13103 (arguments
13104 `(#:phases (modify-phases %standard-phases
13105 (add-after 'unpack 'patch-hardcoded-executable-names
13106 (lambda _
13107 (substitute* "moto/batch/models.py"
13108 (("/bin/sh")
13109 (which "sh")))
13110 (substitute* (find-files "tests" "\\.py$")
13111 (("#!/bin/bash")
13112 (string-append "#!" (which "bash"))))
13113 #t))
13114 (replace 'check
13115 (lambda _
13116 (invoke "pytest" "-vv" "-m" "not network"
13117 ;; These tests require Docker.
13118 "-k" "not test_terminate_job \
13119 and not test_invoke_function_from_sqs_exception"))))))
13120 (native-inputs
13121 `(("python-flask" ,python-flask)
13122 ("python-flask-cors" ,python-flask-cors)
13123 ("python-freezegun" ,python-freezegun)
13124 ("python-parameterized" ,python-parameterized)
13125 ("python-pytest" ,python-pytest)
13126 ("python-sure" ,python-sure)))
13127 (propagated-inputs
13128 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
13129 ("python-boto" ,python-boto)
13130 ("python-boto3" ,python-boto3)
13131 ("python-botocore" ,python-botocore)
13132 ("python-cfn-lint" ,python-cfn-lint)
13133 ("python-cryptography" ,python-cryptography)
13134 ("python-dateutil" ,python-dateutil)
13135 ("python-docker" ,python-docker)
13136 ("python-idna" ,python-idna)
13137 ("python-jinja2" ,python-jinja2)
13138 ("python-jose" ,python-jose)
13139 ("python-jsondiff" ,python-jsondiff)
13140 ("python-mock" ,python-mock)
13141 ("python-pytz" ,python-pytz)
13142 ("python-pyyaml" ,python-pyyaml)
13143 ("python-requests" ,python-requests)
13144 ("python-responses" ,python-responses)
13145 ("python-six" ,python-six)
13146 ("python-sshpubkeys" ,python-sshpubkeys)
13147 ("python-werkzeug" ,python-werkzeug)
13148 ("python-xmltodict" ,python-xmltodict)))
13149 (home-page "https://github.com/spulec/moto")
13150 (synopsis "Mock out the boto library")
13151 (description
13152 "@code{moto} is a library designed to easily mock out the
13153 @code{boto} library.")
13154 (license license:asl2.0)))
13155
13156 (define-public python-rsa
13157 (package
13158 (name "python-rsa")
13159 (version "3.4.2")
13160 (source
13161 (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "rsa" version))
13164 (sha256
13165 (base32
13166 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
13167 (build-system python-build-system)
13168 (propagated-inputs
13169 `(("python-pyasn1" ,python-pyasn1)))
13170 (synopsis "Pure-Python RSA implementation")
13171 (description "Python-RSA is a pure-Python RSA implementation. It supports
13172 encryption and decryption, signing and verifying signatures, and key
13173 generation according to PKCS#1 version 1.5. It can be used as a Python
13174 library as well as on the command line.")
13175 (home-page "https://stuvel.eu/rsa")
13176 (license license:asl2.0)))
13177
13178 (define-public python2-rsa
13179 (package-with-python2 python-rsa))
13180
13181 (define-public python-pluggy
13182 (package
13183 (name "python-pluggy")
13184 (version "0.13.1")
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "pluggy" version))
13189 (sha256
13190 (base32
13191 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
13192 (build-system python-build-system)
13193 (native-inputs
13194 `(("python-setuptools-scm" ,python-setuptools-scm)))
13195 (synopsis "Plugin and hook calling mechanism for Python")
13196 (description "Pluggy is an extraction of the plugin manager as used by
13197 Pytest but stripped of Pytest specific details.")
13198 (home-page "https://pypi.org/project/pluggy/")
13199 (properties `((python2-variant . ,(delay python2-pluggy))))
13200 (license license:expat)))
13201
13202 (define-public python2-pluggy
13203 (let ((base (package-with-python2 (strip-python2-variant
13204 python-pluggy))))
13205 (package/inherit
13206 base
13207 (propagated-inputs
13208 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
13209
13210 ;; This package requires python2-importlib-metadata, but that package
13211 ;; ends up needing python2-pluggy via python2-pytest, so we need this
13212 ;; variant to solve the circular dependency.
13213 (define-public python2-pluggy-bootstrap
13214 (hidden-package
13215 (package/inherit
13216 python2-pluggy
13217 (name "python2-pluggy-bootstrap")
13218 (arguments
13219 `(#:tests? #f
13220 ,@(package-arguments python2-pluggy)))
13221 (propagated-inputs
13222 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
13223
13224 (define-public python-plumbum
13225 (package
13226 (name "python-plumbum")
13227 (version "1.7.0")
13228 (source
13229 (origin
13230 (method url-fetch)
13231 (uri (pypi-uri "plumbum" version))
13232 (sha256
13233 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
13234 (build-system python-build-system)
13235 (arguments
13236 `(#:tests? #f)) ;no tests
13237 (native-inputs
13238 ;; XXX: Not actually used since there are no tests but required for
13239 ;; build.
13240 `(("python-pytest" ,python-pytest)))
13241 (home-page "https://plumbum.readthedocs.io")
13242 (synopsis "Python shell combinators library")
13243 (description
13244 "Plumbum is a library of tools for replacing shell scripts with Python
13245 code.")
13246 (license license:expat)))
13247
13248 (define-public python-deprecation
13249 (package
13250 (name "python-deprecation")
13251 (version "2.1.0")
13252 (source
13253 (origin
13254 (method url-fetch)
13255 (uri (pypi-uri "deprecation" version))
13256 (sha256
13257 (base32
13258 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
13259 (build-system python-build-system)
13260 (propagated-inputs
13261 `(("python-packaging" ,python-packaging)))
13262 (native-inputs
13263 `(("python-unittest2" ,python-unittest2)))
13264 (home-page "https://deprecation.readthedocs.io/")
13265 (synopsis "Python library to handle automated deprecations")
13266 (description
13267 "This is a library that enables automated deprecations. It offers the
13268 @code{deprecated()} decorator to wrap functions, providing proper warnings
13269 both in documentation and via Python’s warnings system, as well as the
13270 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
13271 that deprecated code is eventually removed.")
13272 (license license:asl2.0)))
13273
13274 (define-public python-tox
13275 (package
13276 (name "python-tox")
13277 (version "3.20.0")
13278 (source
13279 (origin
13280 (method url-fetch)
13281 (uri (pypi-uri "tox" version))
13282 (sha256
13283 (base32
13284 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
13285 (build-system python-build-system)
13286 (arguments
13287 ;; FIXME: Tests require pytest-timeout, which itself requires
13288 ;; pytest>=2.8.0 for installation.
13289 '(#:tests? #f))
13290 (propagated-inputs
13291 `(("python-filelock" ,python-filelock)
13292 ("python-packaging" ,python-packaging)
13293 ("python-pluggy" ,python-pluggy)
13294 ("python-py" ,python-py)
13295 ("python-six" ,python-six)
13296 ("python-toml" ,python-toml)
13297 ("python-virtualenv" ,python-virtualenv)))
13298 (native-inputs
13299 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
13300 ("python-pytest" ,python-pytest) ; >= 2.3.5
13301 ("python-setuptools-scm" ,python-setuptools-scm)))
13302 (home-page "https://tox.readthedocs.io")
13303 (synopsis "Virtualenv-based automation of test activities")
13304 (description "Tox is a generic virtualenv management and test command line
13305 tool. It can be used to check that a package installs correctly with
13306 different Python versions and interpreters, or run tests in each type of
13307 supported environment, or act as a frontend to continuous integration
13308 servers.")
13309 (license license:expat)))
13310
13311 (define-public python-jmespath
13312 (package
13313 (name "python-jmespath")
13314 (version "0.9.4")
13315 (source
13316 (origin
13317 (method url-fetch)
13318 (uri (pypi-uri "jmespath" version))
13319 (sha256
13320 (base32
13321 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
13322 (build-system python-build-system)
13323 (native-inputs
13324 `(("python-nose" ,python-nose)))
13325 (synopsis "JSON Matching Expressions")
13326 (description "JMESPath (pronounced “james path”) is a Python library that
13327 allows one to declaratively specify how to extract elements from a JSON
13328 document.")
13329 (home-page "https://github.com/jmespath/jmespath.py")
13330 (license license:expat)))
13331
13332 (define-public python2-jmespath
13333 (package-with-python2 python-jmespath))
13334
13335 (define-public python-symengine
13336 (package
13337 (name "python-symengine")
13338 (version "0.6.1")
13339 (source
13340 (origin
13341 (method url-fetch)
13342 (uri (pypi-uri "symengine" version))
13343 (sha256
13344 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
13345 (build-system python-build-system)
13346 (native-inputs
13347 `(("cmake" ,cmake)
13348 ("python-cython" ,python-cython)))
13349 (inputs
13350 `(("symengine" ,symengine)))
13351 (home-page "https://github.com/symengine/symengine.py")
13352 (synopsis "Python library providing wrappers to SymEngine")
13353 (description
13354 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
13355 manipulation library.")
13356 (license license:expat)))
13357
13358 (define-public python-uncertainties
13359 (package
13360 (name "python-uncertainties")
13361 (version "3.1.5")
13362 (source
13363 (origin
13364 (method url-fetch)
13365 (uri (pypi-uri "uncertainties" version))
13366 (sha256
13367 (base32
13368 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
13369 (build-system python-build-system)
13370 ;; While there are test files, there is no "tests" directory, so the tests
13371 ;; fail.
13372 (arguments '(#:tests? #false))
13373 (propagated-inputs
13374 `(("python-future" ,python-future)))
13375 (native-inputs
13376 `(("python-nose" ,python-nose)
13377 ("python-numpy" ,python-numpy)))
13378 (home-page "https://uncertainties-python-package.readthedocs.io/")
13379 (synopsis "Calculations with uncertainties")
13380 (description
13381 "The uncertainties package transparently handles calculations with
13382 numbers with uncertainties. It can also yield the derivatives of any
13383 expression.")
13384 (license license:bsd-3)))
13385
13386 (define-public python-asteval
13387 (package
13388 (name "python-asteval")
13389 (version "0.9.23")
13390 (source
13391 (origin
13392 (method url-fetch)
13393 (uri (pypi-uri "asteval" version))
13394 (sha256
13395 (base32
13396 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
13397 (build-system python-build-system)
13398 (native-inputs
13399 `(("python-pytest" ,python-pytest)))
13400 (home-page "https://github.com/newville/asteval")
13401 (synopsis "Minimalistic evaluator of Python expressions")
13402 (description
13403 "This package provides a minimalistic evaluator of Python expression
13404 using the @code{ast} module")
13405 (license license:expat)))
13406
13407 (define-public python-lmfit
13408 (package
13409 (name "python-lmfit")
13410 (version "1.0.2")
13411 (source
13412 (origin
13413 (method url-fetch)
13414 (uri (pypi-uri "lmfit" version))
13415 (sha256
13416 (base32
13417 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
13418 (build-system python-build-system)
13419 (propagated-inputs
13420 `(("python-asteval" ,python-asteval)
13421 ("python-numpy" ,python-numpy)
13422 ("python-scipy" ,python-scipy)
13423 ("python-uncertainties" ,python-uncertainties)))
13424 (native-inputs
13425 `(("python-pytest" ,python-pytest)))
13426 (home-page "https://lmfit.github.io/lmfit-py/")
13427 (synopsis "Least-Squares minimization with bounds and constraints")
13428 (description
13429 "Lmfit provides a high-level interface to non-linear optimization and
13430 curve fitting problems for Python. It builds on and extends many of the
13431 optimization methods of @code{scipy.optimize}. Initially inspired by (and
13432 named for) extending the Levenberg-Marquardt method from
13433 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
13434 enhancements to optimization and data fitting problems.")
13435 (license license:bsd-3)))
13436
13437 (define-public python-boto
13438 (package
13439 (name "python-boto")
13440 (version "2.49.0")
13441 (source (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "boto" version))
13444 (sha256
13445 (base32
13446 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
13447 (build-system python-build-system)
13448 (arguments
13449 ;; XXX: This package is unmaintained and has problems with newer versions
13450 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
13451 ;; subset of this library, so keep it around for now, but disable tests.
13452 '(#:tests? #f))
13453 (propagated-inputs
13454 `(("python-paramiko" ,python-paramiko)
13455 ("python-requests" ,python-requests)))
13456 (home-page "https://github.com/boto/boto")
13457 (synopsis "Python interfaces for Amazon Web Services")
13458 (description
13459 "This package provides various facilities for interacting with Amazon
13460 Web Services through Python.
13461
13462 This software is unmaintained, and new projects should use @code{boto3} instead.")
13463 (license license:expat)))
13464
13465 (define-public python-botocore
13466 ;; Note: When updating botocore, also make sure that boto3 and awscli
13467 ;; are compatible.
13468 (package
13469 (name "python-botocore")
13470 (version "1.21.64")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "botocore" version))
13475 (sha256
13476 (base32
13477 "0z8cdv3lyr8vw452zqm1r8k4gz4sbzlsqwg6avc3zm6pvajdqc0a"))))
13478 (build-system python-build-system)
13479 (arguments
13480 ;; FIXME: Many tests are failing.
13481 '(#:tests? #f))
13482 (propagated-inputs
13483 `(("python-dateutil" ,python-dateutil)
13484 ("python-jmespath" ,python-jmespath)
13485 ("python-urllib3" ,python-urllib3)))
13486 (home-page "https://github.com/boto/botocore")
13487 (synopsis "Low-level interface to AWS")
13488 (description "Botocore is a Python library that provides a low-level
13489 interface to the Amazon Web Services (AWS) API.")
13490 (license license:asl2.0)))
13491
13492 (define-public python2-botocore
13493 (package-with-python2 python-botocore))
13494
13495 (define-public python-boto3
13496 (package
13497 (name "python-boto3")
13498 (version "1.18.64")
13499 (home-page "https://github.com/boto/boto3")
13500 (source (origin
13501 (method git-fetch)
13502 (uri (git-reference (url home-page) (commit version)))
13503 (file-name (git-file-name name version))
13504 (sha256
13505 (base32
13506 "02hy80xfyxln5yr43cbrmq3kpkdijv8v228alz1x92y4gghnb8cj"))))
13507 (arguments
13508 `(#:phases
13509 (modify-phases %standard-phases
13510 (add-after 'unpack 'delete-network-tests
13511 ;; Deleting integration tests because they are trying to connect to AWS.
13512 (lambda _
13513 (delete-file-recursively "tests/integration"))))))
13514 (build-system python-build-system)
13515 (native-inputs
13516 `(("python-nose" ,python-nose)
13517 ("python-mock" ,python-mock)
13518 ("python-pytest" ,python-pytest)))
13519 (propagated-inputs
13520 `(("python-botocore" ,python-botocore)
13521 ("python-jmespath" ,python-jmespath)
13522 ("python-s3transfer" ,python-s3transfer)))
13523 (synopsis "AWS SDK for Python")
13524 (description
13525 "Boto3 is a Python library for writing programs that interact with
13526 @acronym{AWS,Amazon Web Services}.")
13527 (license license:asl2.0)))
13528
13529 (define-public python-pyfiglet
13530 (package
13531 (name "python-pyfiglet")
13532 (version "0.8.post1")
13533 (source
13534 (origin
13535 (method url-fetch)
13536 (uri (pypi-uri "pyfiglet" version))
13537 (sha256
13538 (base32
13539 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
13540 (build-system python-build-system)
13541 (home-page "https://github.com/pwaller/pyfiglet")
13542 (synopsis "Draw ASCII art big letters in Python")
13543 (description "This module lets you draw large letter from ordinary characters
13544 in pure Python.")
13545 (license license:expat)))
13546
13547 (define-public python-xdo
13548 (package
13549 (name "python-xdo")
13550 (version "0.3")
13551 (source (origin
13552 (method url-fetch)
13553 (uri (string-append
13554 "http://http.debian.net/debian/pool/main/p/python-xdo/"
13555 "python-xdo_" version ".orig.tar.gz"))
13556 (sha256
13557 (base32
13558 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
13559 (build-system python-build-system)
13560 (arguments
13561 '(#:phases
13562 (modify-phases %standard-phases
13563 (add-before 'install 'patch-libxdo-path
13564 ;; Hardcode the path of dynamically loaded libxdo library.
13565 (lambda* (#:key inputs #:allow-other-keys)
13566 (let ((libxdo (string-append
13567 (assoc-ref inputs "xdotool")
13568 "/lib/libxdo.so")))
13569 (substitute* "xdo/_xdo.py"
13570 (("find_library\\(\"xdo\"\\)")
13571 (simple-format #f "\"~a\"" libxdo)))
13572 #t))))
13573 #:tests? #f)) ; no tests provided
13574 (propagated-inputs
13575 `(("python-six" ,python-six)))
13576 (inputs
13577 `(("xdotool" ,xdotool)
13578 ("libX11" ,libx11)))
13579 (home-page "https://tracker.debian.org/pkg/python-xdo")
13580 (synopsis "Python library for simulating X11 keyboard/mouse input")
13581 (description "Provides bindings to libxdo for manipulating X11 via simulated
13582 input. (Note that this is mostly a legacy library; you may wish to look at
13583 python-xdo for newer bindings.)")
13584 (license license:bsd-3)))
13585
13586 (define-public python2-xdo
13587 (package-with-python2 python-xdo))
13588
13589 (define-public python-mako
13590 (package
13591 (name "python-mako")
13592 (version "1.1.3")
13593 (source
13594 (origin
13595 (method url-fetch)
13596 (uri (pypi-uri "Mako" version))
13597 (sha256
13598 (base32
13599 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
13600 (build-system python-build-system)
13601 (arguments
13602 `(#:phases (modify-phases %standard-phases
13603 (replace 'check
13604 (lambda* (#:key tests? #:allow-other-keys)
13605 (if tests?
13606 (invoke "nosetests" "-v")
13607 (format #t "test suite not run~%"))
13608 #t)))))
13609 (propagated-inputs
13610 `(("python-markupsafe" ,python-markupsafe)))
13611 (native-inputs
13612 `(("python-mock" ,python-mock)
13613 ("python-nose" ,python-nose)))
13614 (home-page "https://www.makotemplates.org/")
13615 (synopsis "Templating language for Python")
13616 (description "Mako is a templating language for Python that compiles
13617 templates into Python modules.")
13618 (license license:expat)))
13619
13620 (define-public python2-mako
13621 (package-with-python2 python-mako))
13622
13623 (define-public python-waitress
13624 (package
13625 (name "python-waitress")
13626 (version "1.1.0")
13627 (source
13628 (origin
13629 (method url-fetch)
13630 (uri (pypi-uri "waitress" version))
13631 (patches (search-patches "python-waitress-fix-tests.patch"))
13632 (sha256
13633 (base32
13634 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
13635 (build-system python-build-system)
13636 (home-page "https://github.com/Pylons/waitress")
13637 (synopsis "Waitress WSGI server")
13638 (description "Waitress is meant to be a production-quality pure-Python WSGI
13639 server with very acceptable performance.")
13640 (license license:zpl2.1)))
13641
13642 (define-public python2-waitress
13643 (package-with-python2 python-waitress))
13644
13645 (define-public python-whichcraft
13646 (package
13647 (name "python-whichcraft")
13648 (version "0.6.1")
13649 (source
13650 (origin
13651 (method url-fetch)
13652 (uri (pypi-uri "whichcraft" version))
13653 (sha256
13654 (base32
13655 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
13656 (build-system python-build-system)
13657 (native-inputs
13658 `(("python-pytest" ,python-pytest)))
13659 (home-page "https://github.com/pydanny/whichcraft")
13660 (synopsis "Cross-platform cross-python shutil.which functionality")
13661 (description
13662 "This package provides a shim of the shutil.which function that's
13663 designed to work across multiple versions of Python.")
13664 (license license:bsd-3)))
13665
13666 (define-public python-cookiecutter
13667 (package
13668 (name "python-cookiecutter")
13669 (version "1.7.3")
13670 (source
13671 (origin
13672 (method url-fetch)
13673 (uri (pypi-uri "cookiecutter" version))
13674 (sha256
13675 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
13676 (build-system python-build-system)
13677 (native-inputs
13678 `(("python-freezegun" ,python-freezegun)
13679 ("python-pytest" ,python-pytest)
13680 ("python-pytest-catchlog" ,python-pytest-catchlog)
13681 ("python-pytest-cov" ,python-pytest-cov)
13682 ("python-pytest-mock" ,python-pytest-mock)))
13683 (propagated-inputs
13684 `(("python-binaryornot" ,python-binaryornot)
13685 ("python-click" ,python-click)
13686 ("python-future" ,python-future)
13687 ("python-jinja2" ,python-jinja2)
13688 ("python-jinja2-time" ,python-jinja2-time)
13689 ("python-poyo" ,python-poyo)
13690 ("python-requests" ,python-requests)
13691 ("python-slugify" ,python-slugify)
13692 ("python-text-unidecode" ,python-text-unidecode)
13693 ("python-whichcraft" ,python-whichcraft)))
13694 (home-page "https://github.com/cookiecutter/cookiecutter")
13695 (synopsis
13696 "Command-line utility that creates projects from project templates")
13697 (description
13698 "This package provides a command-line utility that creates projects from
13699 project templates, e.g. creating a Python package project from a Python package
13700 project template.")
13701 (license license:bsd-3)))
13702
13703 (define-public python-pyquery
13704 (package
13705 (name "python-pyquery")
13706 (version "1.2.17")
13707 (source
13708 (origin
13709 (method url-fetch)
13710 (uri (pypi-uri "pyquery" version))
13711 (sha256
13712 (base32
13713 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
13714 (build-system python-build-system)
13715 (native-inputs
13716 `(("python-webob" ,python-webob)
13717 ("python-webtest" ,python-webtest)))
13718 (propagated-inputs
13719 `(("python-lxml" ,python-lxml)
13720 ("python-cssselect" ,python-cssselect)))
13721 (home-page "https://github.com/gawel/pyquery")
13722 (synopsis "Make jQuery-like queries on xml documents")
13723 (description "pyquery allows you to make jQuery queries on xml documents.
13724 The API is as much as possible the similar to jQuery. pyquery uses lxml for
13725 fast xml and html manipulation.")
13726 (license license:bsd-3)))
13727
13728 (define-public python-anyjson
13729 (package
13730 (name "python-anyjson")
13731 (version "0.3.3")
13732 (source
13733 (origin
13734 (method url-fetch)
13735 (uri (pypi-uri "anyjson" version))
13736 (sha256
13737 (base32
13738 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
13739 (build-system python-build-system)
13740 (arguments
13741 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
13742 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
13743 ;; whatever) so this transformation needs to be done before the tests
13744 ;; can be run. Maybe we could add a build step to transform beforehand
13745 ;; but it could be annoying/difficult.
13746 ;; We can enable tests for the Python 2 version, though, and do below.
13747 #:tests? #f))
13748 (home-page "https://bitbucket.org/runeh/anyjson/")
13749 (synopsis
13750 "Wraps best available JSON implementation in a common interface")
13751 (description
13752 "Anyjson loads whichever is the fastest JSON module installed
13753 and provides a uniform API regardless of which JSON implementation is used.")
13754 (license license:bsd-3)
13755 (properties `((python2-variant . ,(delay python2-anyjson))))))
13756
13757 (define-public python2-anyjson
13758 (let ((anyjson (package-with-python2
13759 (strip-python2-variant python-anyjson))))
13760 (package/inherit anyjson
13761 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13762 #:tests? #t
13763 ,@(package-arguments anyjson)))
13764 (native-inputs `(("python2-nose" ,python2-nose))))))
13765
13766 (define-public python-amqp
13767 (package
13768 (name "python-amqp")
13769 (version "2.3.2")
13770 (source
13771 (origin
13772 (method url-fetch)
13773 (uri (pypi-uri "amqp" version))
13774 (sha256
13775 (base32
13776 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13777 (build-system python-build-system)
13778 (native-inputs
13779 `(("python-case" ,python-case)
13780 ("python-pytest-sugar" ,python-pytest-sugar)
13781 ("python-mock" ,python-mock)))
13782 (propagated-inputs
13783 `(("python-vine" ,python-vine)))
13784 (home-page "https://github.com/celery/py-amqp")
13785 (synopsis
13786 "Low-level AMQP client for Python (fork of amqplib)")
13787 (description
13788 "This is a fork of amqplib which was originally written by Barry Pederson.
13789 It is maintained by the Celery project, and used by kombu as a pure python
13790 alternative when librabbitmq is not available.")
13791 (license license:lgpl2.1+)
13792 (properties `((python2-variant . ,(delay python2-amqp))))))
13793
13794 (define-public python2-amqp
13795 (let ((amqp (package-with-python2
13796 (strip-python2-variant python-amqp))))
13797 (package/inherit amqp
13798 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13799 ;; unmaintained. Weirdly, does not do this on the python 3
13800 ;; version?
13801 #:tests? #f
13802 ,@(package-arguments amqp))))))
13803
13804 (define-public python-txamqp
13805 (package
13806 (name "python-txamqp")
13807 (version "0.8.2")
13808 (source
13809 (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "txAMQP" version))
13812 (sha256
13813 (base32
13814 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13815 (build-system python-build-system)
13816 (propagated-inputs
13817 `(("python-six" ,python-six)
13818 ("python-twisted" ,python-twisted)))
13819 (home-page "https://github.com/txamqp/txamqp")
13820 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13821 (description
13822 "This package provides a Python library for communicating with AMQP peers
13823 and brokers using the asynchronous networking framework Twisted. It contains
13824 all the necessary code to connect, send and receive messages to/from an
13825 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13826 also includes support for using Thrift RPC over AMQP in Twisted
13827 applications.")
13828 (license license:asl2.0)))
13829
13830 (define-public python-kombu
13831 (package
13832 (name "python-kombu")
13833 (version "4.2.2")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "kombu" version))
13838 (sha256
13839 (base32
13840 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13841 (build-system python-build-system)
13842 (native-inputs
13843 `(("python-mock" ,python-mock)
13844 ("python-case" ,python-case)
13845 ("python-pyro4" ,python-pyro4)
13846 ("python-pytest-sugar" ,python-pytest-sugar)
13847 ("python-pytz" ,python-pytz)))
13848 (propagated-inputs
13849 `(("python-anyjson" ,python-anyjson)
13850 ("python-amqp" ,python-amqp)
13851 ("python-redis" ,python-redis)))
13852 (home-page "https://kombu.readthedocs.io")
13853 (synopsis "Message passing library for Python")
13854 (description "The aim of Kombu is to make messaging in Python as easy as
13855 possible by providing an idiomatic high-level interface for the AMQ protocol,
13856 and also provide proven and tested solutions to common messaging problems.
13857 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13858 message orientation, queuing, routing, reliability and security, for which the
13859 RabbitMQ messaging server is the most popular implementation.")
13860 (license license:bsd-3)
13861 (properties `((python2-variant . ,(delay python2-kombu))))))
13862
13863 (define-public python2-kombu
13864 (let ((kombu (package-with-python2
13865 (strip-python2-variant python-kombu))))
13866 (package/inherit kombu
13867 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13868 ;; It works fine on the python3 variant.
13869 #:tests? #f
13870 ,@(package-arguments kombu)))
13871 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13872 ,@(package-native-inputs kombu))))))
13873
13874 (define-public python-billiard
13875 (package
13876 (name "python-billiard")
13877 (version "3.5.0.5")
13878 (source
13879 (origin
13880 (method url-fetch)
13881 (uri (pypi-uri "billiard" version))
13882 (sha256
13883 (base32
13884 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13885 (build-system python-build-system)
13886 (native-inputs
13887 `(("python-case" ,python-case)
13888 ("python-pytest" ,python-pytest)))
13889 (home-page "https://github.com/celery/billiard")
13890 (synopsis
13891 "Python multiprocessing fork with improvements and bugfixes")
13892 (description
13893 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13894 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13895 pyprocessing package. This standalone variant is intended to be compatible with
13896 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13897 (license license:bsd-3)
13898 (properties `((python2-variant . ,(delay python2-billiard))))))
13899
13900 (define-public python2-billiard
13901 (let ((billiard (package-with-python2
13902 (strip-python2-variant python-billiard))))
13903 (package/inherit billiard
13904 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13905 ("python2-mock" ,python2-mock)
13906 ,@(package-native-inputs billiard))))))
13907
13908 (define-public python-celery
13909 (package
13910 (name "python-celery")
13911 (version "4.2.1")
13912 (source
13913 (origin
13914 (method url-fetch)
13915 (uri (pypi-uri "celery" version))
13916 (sha256
13917 (base32
13918 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13919 (build-system python-build-system)
13920 (arguments
13921 '(;; TODO The tests fail with Python 3.7
13922 ;; https://github.com/celery/celery/issues/4849
13923 #:tests? #f
13924 #:phases
13925 (modify-phases %standard-phases
13926 (add-after 'unpack 'patch-requirements
13927 (lambda _
13928 (substitute* "requirements/test.txt"
13929 (("pytest>=3\\.0,<3\\.3")
13930 "pytest>=3.0"))
13931 #t)))))
13932 (native-inputs
13933 `(("python-case" ,python-case)
13934 ("python-pytest" ,python-pytest)))
13935 (propagated-inputs
13936 `(("python-pytz" ,python-pytz)
13937 ("python-billiard" ,python-billiard)
13938 ("python-kombu" ,python-kombu)))
13939 (home-page "https://celeryproject.org")
13940 (synopsis "Distributed Task Queue")
13941 (description "Celery is an asynchronous task queue/job queue based on
13942 distributed message passing. It is focused on real-time operation, but
13943 supports scheduling as well. The execution units, called tasks, are executed
13944 concurrently on a single or more worker servers using multiprocessing,
13945 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13946 synchronously (wait until ready).")
13947 (license license:bsd-3)
13948 (properties `((python2-variant . ,(delay python2-celery))))))
13949
13950 (define-public python2-celery
13951 (let ((celery (package-with-python2
13952 (strip-python2-variant python-celery))))
13953 (package/inherit celery
13954 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13955 ("python2-mock" ,python2-mock)
13956 ,@(package-native-inputs celery))))))
13957
13958 (define-public python-translitcodec
13959 (package
13960 (name "python-translitcodec")
13961 (version "0.4.0")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "translitcodec" version))
13966 (sha256
13967 (base32
13968 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13969 (build-system python-build-system)
13970 (arguments
13971 `(#:tests? #f)) ; no tests provided
13972 (home-page
13973 "https://github.com/claudep/translitcodec")
13974 (synopsis
13975 "Unicode to 8-bit charset transliteration codec")
13976 (description
13977 "This package contains codecs for transliterating ISO 10646 texts into
13978 best-effort representations using smaller coded character sets (ASCII,
13979 ISO 8859, etc.).")
13980 (license license:expat)))
13981
13982 (define-public python2-translitcodec
13983 (package-with-python2 python-translitcodec))
13984
13985 (define-public python-anyqt
13986 (package
13987 (name "python-anyqt")
13988 (version "0.0.11")
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (pypi-uri "AnyQt" version))
13993 (sha256
13994 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13995 (build-system python-build-system)
13996 (arguments
13997 `(#:tests? #f ;there are no tests
13998 #:phases
13999 (modify-phases %standard-phases
14000 (add-after 'unpack 'delete-files
14001 ;; Delete files related to other operating systems.
14002 (lambda _
14003 (delete-file "AnyQt/QtMacExtras.py")
14004 (delete-file "AnyQt/QtWinExtras.py")
14005 #t)))))
14006 (home-page "https://github.com/ales-erjavec/anyqt")
14007 (synopsis "PyQt4/PyQt5 compatibility layer")
14008 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
14009 (license license:gpl3)))
14010
14011 (define-public python-pyqtgraph
14012 (package
14013 (name "python-pyqtgraph")
14014 (version "0.12.1")
14015 (source
14016 (origin
14017 (method url-fetch)
14018 (uri (pypi-uri "pyqtgraph" version))
14019 (sha256
14020 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
14021 (build-system python-build-system)
14022 (arguments
14023 `(#:phases
14024 (modify-phases %standard-phases
14025 (add-before 'check 'set-home-and-qpa
14026 (lambda _
14027 (setenv "HOME" "/tmp")
14028 (setenv "QT_QPA_PLATFORM" "offscreen")
14029 #t))
14030 (replace 'check
14031 (lambda* (#:key inputs outputs #:allow-other-keys)
14032 (add-installed-pythonpath inputs outputs)
14033 (invoke "pytest" "-vv" "-k"
14034 ;; These tests try to download online data.
14035 (string-append "not test_PolyLineROI"
14036 " and not test_getArrayRegion_axisorder"
14037 " and not test_getArrayRegion"
14038 " and not test_PlotCurveItem"
14039 " and not test_NonUniformImage_colormap"
14040 " and not test_NonUniformImage_lut"
14041 " and not test_ImageItem_axisorder"
14042 " and not test_ImageItem")))))))
14043 (native-inputs
14044 `(("python-pytest" ,python-pytest)
14045 ("python-pytest-cov" ,python-pytest-cov)
14046 ("python-pytest-xdist" ,python-pytest-xdist)))
14047 (inputs
14048 `(("qtbase" ,qtbase-5)))
14049 (propagated-inputs
14050 `(("python-h5py" ,python-h5py)
14051 ("python-numpy" ,python-numpy)
14052 ("python-pyopengl" ,python-pyopengl)
14053 ("python-scipy" ,python-scipy)
14054 ("python-pyqt" ,python-pyqt)))
14055 (home-page "http://www.pyqtgraph.org")
14056 (synopsis "Scientific graphics and GUI library for Python")
14057 (description
14058 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
14059 and PySide6. It is intended for use in mathematics, scientific or engineering
14060 applications.")
14061 (license license:expat)))
14062
14063 (define-public python-qasync
14064 (package
14065 (name "python-qasync")
14066 (version "0.15.0")
14067 (source
14068 (origin
14069 ;; There are no tests in the PyPI tarball.
14070 (method git-fetch)
14071 (uri (git-reference
14072 (url "https://github.com/CabbageDevelopment/qasync/")
14073 (commit (string-append "v" version))))
14074 (file-name (git-file-name name version))
14075 (sha256
14076 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
14077 (build-system python-build-system)
14078 (arguments
14079 `(#:test-target "pytest"
14080 #:phases
14081 (modify-phases %standard-phases
14082 (add-before 'check 'set-qpa
14083 (lambda _
14084 (setenv "QT_QPA_PLATFORM" "offscreen")
14085 #t)))))
14086 (native-inputs
14087 `(("python-pytest" ,python-pytest)
14088 ("python-pytest-runner" ,python-pytest-runner)))
14089 (propagated-inputs
14090 `(("python-pyqt" ,python-pyqt)))
14091 (home-page "https://github.com/CabbageDevelopment/qasync")
14092 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
14093 (description
14094 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
14095 by providing an implementation of the PEP 3156 event-loop.")
14096 (license license:bsd-2)))
14097
14098 (define-public python-editor
14099 (package
14100 (name "python-editor")
14101 (version "1.0.4")
14102 (source
14103 (origin
14104 (method url-fetch)
14105 (uri (pypi-uri "python-editor" version))
14106 (sha256
14107 (base32
14108 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
14109 (build-system python-build-system)
14110 (arguments
14111 '(#:tests? #f)) ;XXX: needs a TTY and an editor
14112 (home-page "https://github.com/fmoo/python-editor")
14113 (synopsis "Programmatically open an editor, capture the result")
14114 (description
14115 "python-editor is a library that provides the editor module for
14116 programmatically interfacing with your system's $EDITOR.")
14117 (license license:asl2.0)))
14118
14119 (define-public python2-editor
14120 (package-with-python2 python-editor))
14121
14122 (define-public python-multiprocessing-logging
14123 (package
14124 (name "python-multiprocessing-logging")
14125 (version "0.3.1")
14126 (home-page "https://github.com/jruere/multiprocessing-logging")
14127 (source (origin
14128 (method git-fetch)
14129 (uri (git-reference
14130 (url home-page)
14131 (commit (string-append "v" version))))
14132 (file-name (git-file-name name version))
14133 (sha256
14134 (base32
14135 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
14136 (build-system python-build-system)
14137 (synopsis "Manage logs from multiple processes")
14138 (description
14139 "This Python module implements a multiprocessing-aware @code{Handler}
14140 that, when set on the root @code{Logger}, will tunnel log records to the
14141 main process so that they are handled correctly.")
14142 (license license:lgpl3+)))
14143
14144 (define-public python-vobject
14145 (package
14146 (name "python-vobject")
14147 (version "0.9.6.1")
14148 (source (origin
14149 (method url-fetch)
14150 (uri (pypi-uri "vobject" version))
14151 (sha256
14152 (base32
14153 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
14154 (build-system python-build-system)
14155 (arguments
14156 '(;; The test suite relies on some non-portable Windows interfaces.
14157 #:tests? #f))
14158 (propagated-inputs
14159 `(("python-dateutil" ,python-dateutil)
14160 ("python-pyicu" ,python-pyicu)))
14161 (synopsis "Parse and generate vCard and vCalendar files")
14162 (description "Vobject is intended to be a full featured Python package for
14163 parsing and generating vCard and vCalendar files. Currently, iCalendar files
14164 are supported and well tested. vCard 3.0 files are supported, and all data
14165 should be imported, but only a few components are understood in a sophisticated
14166 way.")
14167 (home-page "https://eventable.github.io/vobject/")
14168 (license license:asl2.0)))
14169
14170 (define-public python2-vobject
14171 (package-with-python2 python-vobject))
14172
14173 (define-public python-munkres
14174 (package
14175 (name "python-munkres")
14176 (version "1.1.4")
14177 (source (origin
14178 (method url-fetch)
14179 (uri (pypi-uri "munkres" version))
14180 (sha256
14181 (base32
14182 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w"))))
14183 (build-system python-build-system)
14184 (native-inputs `(("python-pytest" ,python-pytest-6)))
14185 (home-page "https://software.clapper.org/munkres/")
14186 (synopsis "Implementation of the Munkres algorithm")
14187 (description "The Munkres module provides an implementation of the Munkres
14188 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
14189 useful for solving the Assignment Problem.")
14190 (license license:bsd-3)))
14191
14192 (define-public python2-munkres
14193 (package-with-python2 python-munkres))
14194
14195 (define-public python-whoosh
14196 (package
14197 (name "python-whoosh")
14198 (version "2.7.4")
14199 (source
14200 (origin
14201 (method url-fetch)
14202 (uri (pypi-uri "Whoosh" version))
14203 (sha256
14204 (base32
14205 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
14206 (build-system python-build-system)
14207 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
14208 (native-inputs
14209 `(("python-pytest" ,python-pytest)))
14210 (home-page "https://bitbucket.org/mchaput/whoosh")
14211 (synopsis "Full text indexing, search, and spell checking library")
14212 (description
14213 "Whoosh is a fast, pure-Python full text indexing, search, and spell
14214 checking library.")
14215 (license license:bsd-2)))
14216
14217 (define-public python2-whoosh
14218 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
14219 (package/inherit whoosh
14220 (propagated-inputs
14221 `(("python2-backport-ssl-match-hostname"
14222 ,python2-backport-ssl-match-hostname)
14223 ,@(package-propagated-inputs whoosh))))))
14224
14225 (define-public python-pathlib
14226 (package
14227 (name "python-pathlib")
14228 (version "1.0.1")
14229 (source (origin
14230 (method url-fetch)
14231 (uri (pypi-uri "pathlib" version))
14232 (sha256
14233 (base32
14234 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
14235 (build-system python-build-system)
14236 ;; The tests depend on the internal "test" module, which does not provide
14237 ;; a stable interface.
14238 (arguments `(#:tests? #f))
14239 (home-page "https://pathlib.readthedocs.org/")
14240 (synopsis "Object-oriented file system paths")
14241 (description "Pathlib offers a set of classes to handle file system paths.
14242 It offers the following advantages over using string objects:
14243
14244 @enumerate
14245 @item No more cumbersome use of os and os.path functions. Everything can
14246 be done easily through operators, attribute accesses, and method calls.
14247 @item Embodies the semantics of different path types. For example,
14248 comparing Windows paths ignores casing.
14249 @item Well-defined semantics, eliminating any inconsistencies or
14250 ambiguities (forward vs. backward slashes, etc.).
14251 @end enumerate
14252
14253 Note: In Python 3.4, pathlib is now part of the standard library. For other
14254 Python versions please consider python-pathlib2 instead, which tracks the
14255 standard library module. This module (python-pathlib) isn't maintained
14256 anymore.")
14257 (license license:expat)))
14258
14259 (define-public python2-pathlib
14260 (package-with-python2 python-pathlib))
14261
14262 (define-public python2-pathlib2
14263 (package
14264 (name "python2-pathlib2")
14265 (version "2.3.5")
14266 (source (origin
14267 (method url-fetch)
14268 (uri (pypi-uri "pathlib2" version))
14269 (sha256
14270 (base32
14271 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
14272 (build-system python-build-system)
14273 ;; We only need the the Python 2 variant, since for Python 3 our minimum
14274 ;; version is 3.4 which already includes this package as part of the
14275 ;; standard library.
14276 (arguments
14277 `(#:python ,python-2))
14278 (propagated-inputs
14279 `(("python2-scandir" ,python2-scandir)
14280 ("python2-six" ,python2-six)))
14281 (home-page "https://pypi.org/project/pathlib2/")
14282 (synopsis "Object-oriented file system paths - backport of standard
14283 pathlib module")
14284 (description "The goal of pathlib2 is to provide a backport of standard
14285 pathlib module which tracks the standard library module, so all the newest
14286 features of the standard pathlib can be used also on older Python versions.
14287
14288 Pathlib offers a set of classes to handle file system paths. It offers the
14289 following advantages over using string objects:
14290
14291 @enumerate
14292 @item No more cumbersome use of os and os.path functions. Everything can
14293 be done easily through operators, attribute accesses, and method calls.
14294 @item Embodies the semantics of different path types. For example,
14295 comparing Windows paths ignores casing.
14296 @item Well-defined semantics, eliminating any inconsistencies or
14297 ambiguities (forward vs. backward slashes, etc.).
14298 @end enumerate")
14299 (license license:expat)))
14300
14301 (define-public python2-pathlib2-bootstrap
14302 (hidden-package
14303 (package
14304 (inherit python2-pathlib2)
14305 (name "python2-pathlib2-bootstrap")
14306 (propagated-inputs
14307 `(("python2-scandir" ,python2-scandir)
14308 ("python2-six" ,python2-six-bootstrap))))))
14309
14310 (define-public python-jellyfish
14311 (package
14312 (name "python-jellyfish")
14313 (version "0.8.8")
14314 (source (origin
14315 (method url-fetch)
14316 (uri (pypi-uri "jellyfish" version))
14317 (sha256
14318 (base32
14319 "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
14320 (build-system python-build-system)
14321 (arguments
14322 `(#:tests? #f ; XXX: Tests cannot find C coded version.
14323 #:phases
14324 (modify-phases %standard-phases
14325 (replace 'check
14326 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14327 (when tests?
14328 (add-installed-pythonpath inputs outputs)
14329 (invoke "pytest" "-vv" "jellyfish/test.py")))))))
14330 (native-inputs
14331 `(("python-pytest" ,python-pytest)))
14332 (home-page "https://github.com/jamesturk/jellyfish")
14333 (synopsis "Approximate and phonetic matching of strings")
14334 (description "Jellyfish uses a variety of string comparison and phonetic
14335 encoding algorithms to do fuzzy string matching.")
14336 (license license:bsd-2)))
14337
14338 (define-public python2-unicodecsv
14339 (package
14340 (name "python2-unicodecsv")
14341 (version "0.14.1")
14342 (source (origin
14343 (method git-fetch)
14344 ;; The test suite is not included in the PyPi release.
14345 ;; https://github.com/jdunck/python-unicodecsv/issues/19
14346 (uri (git-reference
14347 (url "https://github.com/jdunck/python-unicodecsv")
14348 (commit version)))
14349 (file-name (git-file-name name version))
14350 (sha256
14351 (base32
14352 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
14353 (build-system python-build-system)
14354 (arguments
14355 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
14356 #:python ,python-2))
14357 (native-inputs
14358 `(("python2-unittest2" ,python2-unittest2)))
14359 (home-page "https://github.com/jdunck/python-unicodecsv")
14360 (synopsis "Unicode CSV module for Python 2")
14361 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
14362 module, adding support for Unicode strings.")
14363 (license license:bsd-2)))
14364
14365 (define-public python-pdfminer-six
14366 (package
14367 (name "python-pdfminer-six")
14368 (version "20201018")
14369 ;; There are no tests in the PyPI tarball.
14370 (source
14371 (origin
14372 (method git-fetch)
14373 (uri (git-reference
14374 (url "https://github.com/pdfminer/pdfminer.six")
14375 (commit version)))
14376 (file-name (git-file-name name version))
14377 (sha256
14378 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
14379 (build-system python-build-system)
14380 (arguments
14381 `(#:phases
14382 (modify-phases %standard-phases
14383 ;; Tests write to the source tree.
14384 (add-after 'unpack 'make-git-checkout-writable
14385 (lambda _
14386 (for-each make-file-writable (find-files "."))
14387 #t))
14388 (replace 'check
14389 (lambda _
14390 (invoke "make" "test")))
14391 (add-before 'reset-gzip-timestamps 'make-files-writable
14392 (lambda* (#:key outputs #:allow-other-keys)
14393 (let ((out (assoc-ref outputs "out")))
14394 (for-each make-file-writable
14395 (find-files out "\\.gz$"))
14396 #t))))))
14397 (propagated-inputs
14398 `(("python-chardet" ,python-chardet)
14399 ("python-cryptography" ,python-cryptography)
14400 ("python-sortedcontainers" ,python-sortedcontainers)))
14401 (native-inputs
14402 `(("python-nose" ,python-nose)
14403 ("python-tox" ,python-tox)))
14404 (home-page "https://github.com/pdfminer/pdfminer.six")
14405 (synopsis "PDF parser and analyzer")
14406 (description "@code{pdfminer.six} is a community maintained fork of
14407 the original PDFMiner. It is a tool for extracting information from PDF
14408 documents. It focuses on getting and analyzing text data. Pdfminer.six
14409 extracts the text from a page directly from the sourcecode of the PDF. It
14410 can also be used to get the exact location, font or color of the text.")
14411 (license license:expat)))
14412
14413 (define-public python-rarfile
14414 (package
14415 (name "python-rarfile")
14416 (version "4.0")
14417 (source (origin
14418 (method url-fetch)
14419 (uri (pypi-uri "rarfile" version))
14420 (sha256
14421 (base32
14422 "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
14423 (build-system python-build-system)
14424 (arguments
14425 `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
14426 #:phases
14427 (modify-phases %standard-phases
14428 (add-after 'unpack 'patch
14429 (lambda* (#:key inputs #:allow-other-keys)
14430 (substitute* "rarfile.py"
14431 ;; Disable unrar and unar, which are unavailable on Guix.
14432 (("(unrar|unar)=True" all tool) (string-append tool "=False"))
14433 ;; Hardcode path to bsdtar
14434 (("\"bsdtar\"")
14435 (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
14436 #t))
14437 (replace 'check
14438 (lambda* (#:key inputs tests? #:allow-other-keys)
14439 (when tests?
14440 (invoke "pytest" "-vv")))))))
14441 (native-inputs `(("python-pytest" ,python-pytest)))
14442 (inputs `(("libarchive" ,libarchive)))
14443 (home-page "https://github.com/markokr/rarfile")
14444 (synopsis "RAR archive reader for Python")
14445 (description "This is Python module for RAR archive reading. The interface
14446 is made as zipfile like as possible.")
14447 (license license:isc)))
14448
14449 (define-public python-rich
14450 (package
14451 (name "python-rich")
14452 (version "10.2.2")
14453 (source (origin
14454 (method url-fetch)
14455 (uri (pypi-uri "rich" version))
14456 (sha256
14457 (base32
14458 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
14459 (build-system python-build-system)
14460 (arguments
14461 `(#:phases
14462 (modify-phases %standard-phases
14463 (replace 'check
14464 (lambda* (#:key inputs tests? #:allow-other-keys)
14465 (when tests?
14466 (copy-recursively (string-append
14467 (assoc-ref inputs "tests") "/tests")
14468 "tests")
14469 (invoke "python" "-m" "pytest" "-vv")))))))
14470 (propagated-inputs
14471 `(("python-attrs" ,python-attrs)
14472 ("python-colorama" ,python-colorama)
14473 ("python-commonmark" ,python-commonmark)
14474 ("python-ipywidgets" ,python-ipywidgets)
14475 ("python-pygments" ,python-pygments)
14476 ("python-typing-extensions" ,python-typing-extensions)))
14477 (native-inputs
14478 `(("python-pytest" ,python-pytest)
14479 ("tests"
14480 ;; The release on pypi comes without tests. We can't build from this
14481 ;; checkout, though, because installation requires an invocation of
14482 ;; poetry.
14483 ,(origin
14484 (method git-fetch)
14485 (uri (git-reference
14486 (url "https://github.com/willmcgugan/rich")
14487 (commit (string-append "v" version))))
14488 (file-name (git-file-name name version))
14489 (sha256
14490 (base32
14491 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
14492 (home-page "https://github.com/willmcgugan/rich")
14493 (synopsis "Render rich text and more to the terminal")
14494 (description
14495 "This is a Python package for rendering rich text, tables, progress bars,
14496 syntax highlighting, markdown and more to the terminal.")
14497 (license license:expat)))
14498
14499 (define-public python-magic
14500 (package
14501 (name "python-magic")
14502 (version "0.4.22")
14503 (home-page "https://github.com/ahupp/python-magic")
14504 (source
14505 (origin
14506 (method git-fetch)
14507 (uri (git-reference (url home-page) (commit version)))
14508 (file-name (git-file-name name version))
14509 (sha256
14510 (base32
14511 "0zbdjr5shijs0jayz7gycpx0kn6v2bh83dpanyajk2vmy47jvbd6"))))
14512 (build-system python-build-system)
14513 (arguments
14514 '(#:phases (modify-phases %standard-phases
14515 ;; Replace a specific method call with a hard-coded
14516 ;; path to the necessary libmagic.so file in the
14517 ;; store. If we don't do this, then the method call
14518 ;; will fail to find the libmagic.so file, which in
14519 ;; turn will cause any application using
14520 ;; python-magic to fail.
14521 (add-before 'build 'hard-code-path-to-libmagic
14522 (lambda* (#:key inputs #:allow-other-keys)
14523 (let ((file (assoc-ref inputs "file")))
14524 (substitute* "magic/loader.py"
14525 (("ctypes\\.util\\.find_library\\('magic'\\)")
14526 (string-append "'" file "/lib/libmagic.so'"))))))
14527 (replace 'check
14528 (lambda* (#:key tests? #:allow-other-keys)
14529 ;; The test suite mandates this variable.
14530 (setenv "LC_ALL" "en_US.UTF-8")
14531 (if tests?
14532 (invoke "python" "./test/test.py")
14533 (format #t "test suite not run~%")))))))
14534 (native-inputs
14535 `(("which" ,which)))
14536 (inputs
14537 ;; python-magic needs to be able to find libmagic.so.
14538 `(("file" ,file)))
14539 (synopsis "File type identification using libmagic")
14540 (description
14541 "This module uses ctypes to access the libmagic file type
14542 identification library. It makes use of the local magic database and
14543 supports both textual and MIME-type output. Note that this module and
14544 the python-file module both provide a \"magic.py\" file; these two
14545 modules, which are different and were developed separately, both serve
14546 the same purpose: to provide Python bindings for libmagic.")
14547 (license license:expat)))
14548
14549 (define-public python2-magic
14550 (package-with-python2 python-magic))
14551
14552 (define-public python2-s3cmd
14553 (package
14554 (name "python2-s3cmd")
14555 (version "1.6.1")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
14560 "s3cmd-" version ".tar.gz"))
14561 (sha256
14562 (base32
14563 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
14564 (build-system python-build-system)
14565 (arguments
14566 ;; s3cmd is written for python2 only and contains no tests.
14567 `(#:python ,python-2
14568 #:tests? #f))
14569 (propagated-inputs
14570 `(("python2-dateutil" ,python2-dateutil)
14571 ;; The python-file package also provides a magic.py module.
14572 ;; This is an unfortunate state of affairs; however, s3cmd
14573 ;; fails to install if it cannot find specifically the
14574 ;; python-magic package. Thus we include it, instead of using
14575 ;; python-file. Ironically, s3cmd sometimes works better
14576 ;; without libmagic bindings at all:
14577 ;; https://github.com/s3tools/s3cmd/issues/198
14578 ("python2-magic" ,python2-magic)))
14579 (home-page "https://s3tools.org/s3cmd")
14580 (synopsis "Command line tool for S3-compatible storage services")
14581 (description
14582 "S3cmd is a command line tool for uploading, retrieving and managing data
14583 in storage services that are compatible with the Amazon Simple Storage
14584 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
14585 GnuPG encryption, and more. It also supports management of Amazon's
14586 CloudFront content delivery network.")
14587 (license license:gpl2+)))
14588
14589 (define-public python-pkgconfig
14590 (package
14591 (name "python-pkgconfig")
14592 (version "1.3.1")
14593 (source
14594 (origin
14595 (method url-fetch)
14596 (uri (pypi-uri "pkgconfig" version))
14597 (sha256
14598 (base32
14599 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
14600 (build-system python-build-system)
14601 (native-inputs
14602 `(("python-nose" ,python-nose)))
14603 (inputs
14604 `(("pkg-config" ,pkg-config)))
14605 (arguments
14606 `(#:phases
14607 (modify-phases %standard-phases
14608 (add-before 'build 'patch
14609 ;; Hard-code the path to pkg-config.
14610 (lambda _
14611 (substitute* "pkgconfig/pkgconfig.py"
14612 (("cmd = 'pkg-config")
14613 (string-append "cmd = '" (which "pkg-config"))))
14614 #t))
14615 (replace 'check
14616 (lambda _
14617 (invoke "nosetests" "test.py"))))))
14618 (home-page "https://github.com/matze/pkgconfig")
14619 (synopsis "Python interface for pkg-config")
14620 (description "This module provides a Python interface to pkg-config. It
14621 can be used to find all pkg-config packages, check if a package exists,
14622 check if a package meets certain version requirements, query CFLAGS and
14623 LDFLAGS and parse the output to build extensions with setup.py.")
14624 (license license:expat)))
14625
14626 (define-public python2-pkgconfig
14627 (package-with-python2 python-pkgconfig))
14628
14629 (define-public python-bz2file
14630 (package
14631 (name "python-bz2file")
14632 (version "0.98")
14633 (source
14634 (origin
14635 (method url-fetch)
14636 (uri (pypi-uri "bz2file" version))
14637 (sha256
14638 (base32
14639 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
14640 (build-system python-build-system)
14641 (arguments
14642 `(#:tests? #f)) ; Tests use deprecated python modules.
14643 (home-page "https://github.com/nvawda/bz2file")
14644 (synopsis "Read and write bzip2-compressed files")
14645 (description
14646 "Bz2file is a Python library for reading and writing bzip2-compressed
14647 files. It contains a drop-in replacement for the I/O interface in the
14648 standard library's @code{bz2} module, including features from the latest
14649 development version of CPython that are not available in older releases.")
14650 (license license:asl2.0)))
14651
14652 (define-public python2-bz2file
14653 (package-with-python2 python-bz2file))
14654
14655 (define-public python-future
14656 (package
14657 (name "python-future")
14658 (version "0.18.2")
14659 (source
14660 (origin
14661 (method url-fetch)
14662 (uri (pypi-uri "future" version))
14663 (sha256
14664 (base32
14665 "0zakvfj87gy6mn1nba06sdha63rn4njm7bhh0wzyrxhcny8avgmi"))))
14666 (build-system python-build-system)
14667 ;; Many tests connect to the network or are otherwise flawed.
14668 ;; https://github.com/PythonCharmers/python-future/issues/210
14669 (arguments
14670 `(#:tests? #f))
14671 (home-page "https://python-future.org")
14672 (synopsis "Single-source support for Python 3 and 2")
14673 (description
14674 "@code{python-future} is the missing compatibility layer between Python 2 and
14675 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
14676 to support both Python 2 and Python 3 with minimal overhead.")
14677 (license license:expat)))
14678
14679 (define-public python2-future
14680 (package-with-python2 python-future))
14681
14682 (define-public python-cysignals
14683 (package
14684 (name "python-cysignals")
14685 (version "1.9.0")
14686 (source
14687 (origin
14688 (method url-fetch)
14689 (uri (pypi-uri "cysignals" version))
14690 (sha256
14691 (base32
14692 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
14693 (build-system python-build-system)
14694 (native-inputs
14695 `(("python-cython" ,python-cython)
14696 ("python-sphinx" ,python-sphinx)))
14697 (inputs
14698 `(("pari-gp" ,pari-gp)))
14699 (arguments
14700 `(#:modules ((guix build python-build-system)
14701 ((guix build gnu-build-system) #:prefix gnu:)
14702 (guix build utils))
14703 ;; FIXME: Tests are executed after installation and currently fail
14704 ;; when not installing into standard locations; the author is working
14705 ;; on a fix.
14706 #:tests? #f
14707 #:phases
14708 (modify-phases %standard-phases
14709 (add-before
14710 'build 'configure
14711 (assoc-ref gnu:%standard-phases 'configure)))))
14712 (home-page
14713 "https://github.com/sagemath/cysignals")
14714 (synopsis
14715 "Handling of interrupts and signals for Cython")
14716 (description
14717 "The cysignals package provides mechanisms to handle interrupts (and
14718 other signals and errors) in Cython code, using two related approaches,
14719 for mixed Cython/Python code or external C libraries and pure Cython code,
14720 respectively.")
14721 (license license:lgpl3+)))
14722
14723 (define-public python2-cysignals
14724 (package-with-python2 python-cysignals))
14725
14726 (define-public python2-shedskin
14727 (package
14728 (name "python2-shedskin")
14729 (version "0.9.4")
14730 (source
14731 (origin
14732 (method url-fetch)
14733 (uri (string-append "https://github.com/shedskin/shedskin/"
14734 "releases/download/v" version
14735 "/shedskin-" version ".tgz"))
14736 (sha256
14737 (base32
14738 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
14739 (build-system python-build-system)
14740 (arguments
14741 `(#:python ,python-2
14742 #:phases (modify-phases %standard-phases
14743 (add-after 'unpack 'fix-resulting-include-libs
14744 (lambda* (#:key inputs #:allow-other-keys)
14745 (let ((libgc (assoc-ref inputs "libgc"))
14746 (pcre (assoc-ref inputs "pcre")))
14747 (substitute* "shedskin/makefile.py"
14748 (("variable == 'CCFLAGS':[ ]*")
14749 (string-append "variable == 'CCFLAGS':\n"
14750 " line += ' -I " pcre "/include"
14751 " -I " libgc "/include'"))
14752 (("variable == 'LFLAGS':[ ]*")
14753 (string-append "variable == 'LFLAGS':\n"
14754 " line += ' -L" pcre "/lib"
14755 " -L " libgc "/lib'")))
14756 #t))))))
14757 (inputs `(("pcre" ,pcre)
14758 ("libgc" ,libgc)))
14759 (home-page "https://shedskin.github.io/")
14760 (synopsis "Experimental Python-2 to C++ Compiler")
14761 (description (string-append "This is an experimental compiler for a subset of
14762 Python. It generates C++ code and a Makefile."))
14763 (license (list license:gpl3 license:bsd-3 license:expat))))
14764
14765 (define-public python-rope
14766 (package
14767 (name "python-rope")
14768 (version "0.19.0")
14769 (source
14770 (origin
14771 (method url-fetch)
14772 (uri (pypi-uri "rope" version))
14773 (sha256
14774 (base32
14775 "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4"))))
14776 (build-system python-build-system)
14777 (home-page "https://github.com/python-rope/rope")
14778 (synopsis "Refactoring library for Python")
14779 (description "Rope is a refactoring library for Python. It facilitates
14780 the renaming, moving and extracting of attributes, functions, modules, fields
14781 and parameters in Python 2 source code. These refactorings can also be applied
14782 to occurrences in strings and comments.")
14783 (license license:lgpl3+)))
14784
14785 (define-public python-py3status
14786 (package
14787 (name "python-py3status")
14788 (version "3.21")
14789 (source
14790 (origin
14791 (method url-fetch)
14792 (uri (pypi-uri "py3status" version))
14793 (sha256
14794 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14795 (build-system python-build-system)
14796 (inputs
14797 `(("file" ,file)))
14798 (arguments
14799 '(#:phases
14800 (modify-phases %standard-phases
14801 ;; 'file' is used for detection of configuration file encoding
14802 ;; let's make link the dependency to particular input
14803 (add-before 'build 'patch-file-path
14804 (lambda* (#:key inputs #:allow-other-keys)
14805 (let ((file-path (assoc-ref inputs "file")))
14806 (substitute* "py3status/parse_config.py"
14807 (("\\[\"file\", \"-b\"")
14808 (string-append "['" file-path "/bin/file', '-b'")))
14809 #t))))
14810 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14811 (home-page "https://github.com/ultrabug/py3status")
14812 (synopsis "Extensible i3status wrapper written in Python")
14813 (description "py3status is an i3status wrapper which extends i3status
14814 functionality in a modular way, allowing you to extend your panel with your
14815 own code, responding to click events and updating clock every second.")
14816 (license license:bsd-3)))
14817
14818 (define-public python-tblib
14819 (package
14820 (name "python-tblib")
14821 (version "1.6.0")
14822 (source (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "tblib" version))
14825 (sha256
14826 (base32
14827 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14828 (build-system python-build-system)
14829 (arguments
14830 `(#:phases
14831 (modify-phases %standard-phases
14832 (replace 'check
14833 (lambda _
14834 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14835 (native-inputs
14836 `(("python-pytest" ,python-pytest)
14837 ("python-six" ,python-six)))
14838 (home-page "https://github.com/ionelmc/python-tblib")
14839 (synopsis "Traceback serialization library")
14840 (description
14841 "Traceback serialization allows you to:
14842
14843 @enumerate
14844 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14845 different processes. This allows better error handling when running code over
14846 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14847
14848 @item Parse traceback strings and raise with the parsed tracebacks.
14849 @end enumerate\n")
14850 (license license:bsd-3)))
14851
14852 (define-public python2-tblib
14853 (package-with-python2 python-tblib))
14854
14855 (define-public python-tftpy
14856 (package
14857 (name "python-tftpy")
14858 (version "0.8.2")
14859 (source
14860 (origin
14861 (method git-fetch) ;no tests in PyPI archive
14862 (uri (git-reference
14863 (url "https://github.com/msoulier/tftpy")
14864 (commit version)))
14865 (file-name (git-file-name name version))
14866 (sha256
14867 (base32
14868 "1gl04ps8h8r7av3h0zbm8gwmkqs9rkk5vf7n8mv2bzrkwvy9hacc"))))
14869 (build-system python-build-system)
14870 (arguments
14871 `(#:phases (modify-phases %standard-phases
14872 (replace 'check
14873 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
14874 (when tests?
14875 ;; The default DEBUG logging level is way too verbose.
14876 (substitute* "t/test.py"
14877 (("logging\\.DEBUG")
14878 "logging.INFO"))
14879 (invoke "python" "-m" "unittest" "t/test.py")))))))
14880 (home-page "http://tftpy.sourceforge.net/")
14881 (synopsis "Python trivial file transfer protocol (TFTP) library")
14882 (description "TFTPy is a trivial file transfer protocol (TFTP) Python
14883 library. It can be used to act both as a TFTP client or TFTP server.")
14884 (license license:expat)))
14885
14886 (define-public python-greenlet
14887 (package
14888 (name "python-greenlet")
14889 (version "1.1.1")
14890 (source (origin
14891 (method url-fetch)
14892 (uri (pypi-uri "greenlet" version))
14893 (sha256
14894 (base32
14895 "10gllbrcbazxck84nr7dw3js3gq0rxrsr4kkvy5hg542rms2gwn0"))))
14896 (build-system python-build-system)
14897 (home-page "https://greenlet.readthedocs.io/")
14898 (synopsis "Lightweight in-process concurrent programming")
14899 (description
14900 "Greenlet package is a spin-off of Stackless, a version of CPython
14901 that supports micro-threads called \"tasklets\". Tasklets run
14902 pseudo-concurrently (typically in a single or a few OS-level threads) and
14903 are synchronized with data exchanges on \"channels\".")
14904 (license (list license:psfl license:expat))))
14905
14906 (define-public python-objgraph
14907 (package
14908 (name "python-objgraph")
14909 (version "3.4.1")
14910 (source
14911 (origin
14912 (method url-fetch)
14913 (uri (pypi-uri "objgraph" version))
14914 (sha256
14915 (base32
14916 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14917 (build-system python-build-system)
14918 (propagated-inputs
14919 `(("python-graphviz" ,python-graphviz)))
14920 (native-inputs
14921 `(("python-mock" ,python-mock)
14922 ("graphviz" ,graphviz)))
14923 (home-page "https://mg.pov.lt/objgraph/")
14924 (synopsis "Draw Python object reference graphs with graphviz")
14925 (description
14926 "This package provides tools to draw Python object reference graphs with
14927 graphviz.")
14928 (license license:expat)))
14929
14930 (define-public python2-objgraph
14931 (package-with-python2 python-objgraph))
14932
14933 (define-public python-gevent
14934 (package
14935 (name "python-gevent")
14936 (version "21.1.2")
14937 (source (origin
14938 (method url-fetch)
14939 (uri (pypi-uri "gevent" version))
14940 (sha256
14941 (base32
14942 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14943 (modules '((guix build utils)))
14944 (snippet
14945 '(begin
14946 ;; unbunding libev and c-ares
14947 (delete-file-recursively "deps")))))
14948 (build-system python-build-system)
14949 (arguments
14950 `(#:modules ((ice-9 ftw)
14951 (ice-9 match)
14952 (srfi srfi-26)
14953 (guix build utils)
14954 (guix build python-build-system))
14955 #:phases (modify-phases %standard-phases
14956 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14957 (lambda _
14958 (substitute* "src/gevent/subprocess.py"
14959 (("/bin/sh") (which "sh")))
14960 (for-each (lambda (file)
14961 (substitute* file
14962 (("/bin/sh") (which "sh"))
14963 (("/bin/true") (which "true"))))
14964 (find-files "src/greentest" "\\.py$"))))
14965 (add-before 'build 'do-not-use-bundled-sources
14966 (lambda _
14967 (setenv "GEVENTSETUP_EMBED" "0")
14968
14969 ;; Prevent building bundled libev.
14970 (substitute* "setup.py"
14971 (("run_make=_BUILDING")
14972 "run_make=False"))))
14973 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14974 (lambda* (#:key inputs #:allow-other-keys)
14975 (let ((greenlet (string-append
14976 (assoc-ref inputs "python-greenlet")
14977 "/include")))
14978 (match (scandir greenlet
14979 (lambda (item)
14980 (string-prefix? "python" item)))
14981 ((python)
14982 (setenv "C_INCLUDE_PATH"
14983 (string-append greenlet "/" python ":"
14984 (or (getenv "C_INCLUDE_PATH")
14985 ""))))))))
14986 (add-before 'check 'pretend-to-be-CI
14987 (lambda _
14988 ;; A few tests are skipped due to network constraints or
14989 ;; get longer timeouts when running in a CI environment.
14990 ;; Piggy-back on that, as we need the same adjustments.
14991 (setenv "TRAVIS" "1")
14992 (setenv "APPVEYOR" "1")))
14993 (add-before 'check 'adjust-tests
14994 (lambda _
14995 (let ((disabled-tests
14996 '(;; These tests relies on networking which is
14997 ;; not available in the build container.
14998 "test__getaddrinfo_import.py"
14999 "test__server_pywsgi.py"
15000 ;; XXX: These tests borrow functionality from the
15001 ;; Python builtin 'test' module, but it is not
15002 ;; installed with the Guix Python distribution.
15003 "test_smtpd.py"
15004 "test_wsgiref.py"
15005 "test_urllib2.py"
15006 "test_thread.py"
15007 "test_threading.py"
15008 "test__threading_2.py"
15009 ;; These tests rely on KeyboardInterrupts which do not
15010 ;; work inside the build container for some reason
15011 ;; (lack of controlling terminal?).
15012 "test_subprocess.py"
15013 "test__issues461_471.py"
15014 ;; TODO: Patch out the tests that use getprotobyname, etc
15015 ;; instead of disabling all the tests from these files.
15016 "test__resolver_dnspython.py"
15017 "test__doctests.py"
15018 "test__all__.py"
15019 "test___config.py"
15020 "test__execmodules.py")))
15021 (call-with-output-file "skipped_tests.txt"
15022 (lambda (port)
15023 (format port "~a~%"
15024 (string-join disabled-tests "\n")))))))
15025 (replace 'check
15026 (lambda _
15027 ;; Use the build daemons configured number of workers.
15028 (setenv "NWORKERS" (number->string (parallel-job-count)))
15029
15030 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
15031 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
15032 (propagated-inputs
15033 `(("python-greenlet" ,python-greenlet)
15034 ("python-objgraph" ,python-objgraph)
15035 ("python-zope.event" ,python-zope-event)
15036 ("python-zope.interface" ,python-zope-interface)))
15037 (native-inputs
15038 `(("python-six" ,python-six)
15039
15040 ;; For tests.
15041 ("python-dnspython" ,python-dnspython)
15042 ("python-psutil" ,python-psutil)))
15043 (inputs
15044 `(("c-ares" ,c-ares)
15045 ("libev" ,libev)))
15046 (home-page "https://www.gevent.org/")
15047 (synopsis "Coroutine-based network library")
15048 (description
15049 "@code{gevent} is a coroutine-based Python networking library that uses
15050 @code{greenlet} to provide a high-level synchronous API on top of the
15051 @code{libev} event loop.")
15052 (license license:expat)))
15053
15054 (define-public python-fastimport
15055 (package
15056 (name "python-fastimport")
15057 (version "0.9.9")
15058 (source
15059 (origin
15060 (method url-fetch)
15061 (uri (pypi-uri "fastimport" version))
15062 (sha256
15063 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
15064 (build-system python-build-system)
15065 (home-page "https://github.com/jelmer/python-fastimport")
15066 (synopsis "VCS fastimport parser and generator in Python")
15067 (description "This package provides a parser for and generator of the Git
15068 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
15069 format.")
15070 (license license:gpl2+)))
15071
15072 (define-public python-twisted
15073 (package
15074 (name "python-twisted")
15075 (version "19.7.0")
15076 (source (origin
15077 (method url-fetch)
15078 (uri (pypi-uri "Twisted" version ".tar.bz2"))
15079 (sha256
15080 (base32
15081 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
15082 (build-system python-build-system)
15083 (arguments
15084 '(#:tests? #f ; FIXME: some tests fail
15085 #:phases
15086 (modify-phases %standard-phases
15087 ;; Remove scripts, because they depend on [conch]
15088 (add-after 'unpack 'remove-entrypoint
15089 (lambda _
15090 (substitute* "src/twisted/python/_setup.py"
15091 (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
15092 (propagated-inputs
15093 `(("python-zope-interface" ,python-zope-interface)
15094 ("python-pyhamcrest" ,python-pyhamcrest)
15095 ("python-incremental" ,python-incremental)
15096 ("python-hyperlink" ,python-hyperlink)
15097 ("python-constantly" ,python-constantly)
15098 ("python-automat" ,python-automat)))
15099 (home-page "https://twistedmatrix.com/")
15100 (synopsis "Asynchronous networking framework written in Python")
15101 (description
15102 "Twisted is an extensible framework for Python programming, with special
15103 focus on event-based network programming and multiprotocol integration.")
15104 (license license:expat)))
15105
15106 (define-public python-pika
15107 (package
15108 (name "python-pika")
15109 (version "1.2.0")
15110 (source
15111 (origin
15112 (method git-fetch)
15113 (uri (git-reference
15114 (url "https://github.com/pika/pika")
15115 (commit version)))
15116 (file-name (git-file-name name version))
15117 (sha256
15118 (base32
15119 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
15120 (build-system python-build-system)
15121 (arguments
15122 '(#:phases (modify-phases %standard-phases
15123 (add-before 'check 'disable-live-tests
15124 (lambda _
15125 ;; Disable tests that require RabbitMQ, which is not
15126 ;; yet available in Guix.
15127 (substitute* "setup.cfg"
15128 (("tests/unit,tests/acceptance")
15129 "tests/unit"))
15130 (with-directory-excursion "tests"
15131 (for-each delete-file
15132 '("unit/base_connection_tests.py"
15133 "unit/threaded_test_wrapper_test.py")))))
15134 (replace 'check
15135 (lambda _
15136 (invoke "nosetests"))))))
15137 (native-inputs
15138 `(("python-mock" ,python-mock)
15139 ("python-nose" ,python-nose)
15140
15141 ;; These are optional at runtime, and provided here for tests.
15142 ("python-gevent" ,python-gevent)
15143 ("python-tornado" ,python-tornado)
15144 ("python-twisted" ,python-twisted)))
15145 (home-page "https://pika.readthedocs.org")
15146 (synopsis "Pure Python AMQP Client Library")
15147 (description
15148 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
15149 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
15150 network support library.")
15151 (license license:bsd-3)))
15152
15153 (define-public python-ply
15154 (package
15155 (name "python-ply")
15156 (version "3.11")
15157 (source
15158 (origin
15159 (method url-fetch)
15160 (uri (pypi-uri "ply" version))
15161 (sha256
15162 (base32
15163 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
15164 (build-system python-build-system)
15165 (home-page "http://www.dabeaz.com/ply/")
15166 (synopsis "Python Lex & Yacc")
15167 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
15168 It uses LR parsing and does extensive error checking.")
15169 (license license:bsd-3)))
15170
15171 (define-public python-tabulate
15172 (package
15173 (name "python-tabulate")
15174 (version "0.8.9")
15175 (source (origin
15176 (method url-fetch)
15177 (uri (pypi-uri "tabulate" version))
15178 (sha256
15179 (base32
15180 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
15181 (build-system python-build-system)
15182 (arguments
15183 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
15184 ;; and the latest release is not tagged in the upstream repository.
15185 '(#:tests? #f))
15186 (home-page "https://bitbucket.org/astanin/python-tabulate")
15187 (synopsis "Pretty-print tabular data")
15188 (description
15189 "Tabulate is a library and command-line utility to pretty-print tabular
15190 data in Python.")
15191 (license license:expat)))
15192
15193 (define-public python2-tabulate
15194 (package-with-python2 python-tabulate))
15195
15196 (define-public python-kazoo
15197 (package
15198 (name "python-kazoo")
15199 (version "2.4.0")
15200 (source
15201 (origin
15202 (method url-fetch)
15203 (uri (pypi-uri "kazoo" version))
15204 (sha256
15205 (base32
15206 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
15207 (build-system python-build-system)
15208 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
15209 (propagated-inputs
15210 `(("python-six" ,python-six)))
15211 (home-page "https://kazoo.readthedocs.org")
15212 (synopsis "High-level Zookeeper client library")
15213 (description
15214 "Kazoo is a Python client library for the Apache Zookeeper distributed
15215 application service. It is designed to be easy to use and to avoid common
15216 programming errors.")
15217 (license license:asl2.0)))
15218
15219 (define-public python2-kazoo
15220 (package-with-python2 python-kazoo))
15221
15222 (define-public python-pykafka
15223 (package
15224 (name "python-pykafka")
15225 (version "2.4.0")
15226 (source (origin
15227 (method url-fetch)
15228 (uri (pypi-uri "pykafka" version))
15229 (sha256
15230 (base32
15231 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
15232 (build-system python-build-system)
15233 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
15234 (propagated-inputs
15235 `(("python-gevent" ,python-gevent)
15236 ("python-kazoo" ,python-kazoo)
15237 ("python-tabulate" ,python-tabulate)))
15238 (inputs
15239 `(("librdkafka" ,librdkafka)))
15240 (home-page "https://pykafka.readthedocs.io/")
15241 (synopsis "Apache Kafka client for Python")
15242 (description
15243 "PyKafka is a client for the Apache Kafka distributed messaging system.
15244 It includes Python implementations of Kafka producers and consumers, which
15245 are optionally backed by a C extension built on librdkafka.")
15246 (license license:asl2.0)))
15247
15248 (define-public python-wcwidth
15249 (package
15250 (name "python-wcwidth")
15251 (version "0.1.8")
15252 (source (origin
15253 (method url-fetch)
15254 (uri (pypi-uri "wcwidth" version))
15255 (sha256
15256 (base32
15257 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
15258 (build-system python-build-system)
15259 (home-page "https://github.com/jquast/wcwidth")
15260 (synopsis "Measure number of terminal column cells of wide-character codes")
15261 (description "Wcwidth measures the number of terminal column cells of
15262 wide-character codes. It is useful for those implementing a terminal emulator,
15263 or programs that carefully produce output to be interpreted by one. It is a
15264 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
15265 specified in POSIX.1-2001 and POSIX.1-2008.")
15266 (license license:expat)))
15267
15268 (define-public python2-wcwidth
15269 (package-with-python2 python-wcwidth))
15270
15271 (define-public python2-jsonrpclib
15272 (package
15273 (name "python2-jsonrpclib")
15274 (version "0.1.7")
15275 (source (origin
15276 (method url-fetch)
15277 (uri (pypi-uri "jsonrpclib" version))
15278 (sha256
15279 (base32
15280 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
15281 (build-system python-build-system)
15282 (arguments
15283 `(#:tests? #f
15284 #:python ,python-2))
15285 (home-page "https://github.com/joshmarshall/jsonrpclib/")
15286 (synopsis "Implementation of JSON-RPC specification for Python")
15287 (description
15288 "This library is an implementation of the JSON-RPC specification.
15289 It supports both the original 1.0 specification, as well as the
15290 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
15291 etc.")
15292 (license license:asl2.0)))
15293
15294 (define-public python-chai
15295 (package
15296 (name "python-chai")
15297 (version "1.1.2")
15298 (source (origin
15299 (method url-fetch)
15300 (uri (pypi-uri "chai" version))
15301 (sha256
15302 (base32
15303 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
15304 (patches (search-patches "python-chai-drop-python2.patch"))))
15305 (build-system python-build-system)
15306 (home-page "https://github.com/agoragames/chai")
15307 (synopsis "Mocking framework for Python")
15308 (description
15309 "Chai provides an api for mocking, stubbing and spying your python
15310 objects, patterned after the Mocha library for Ruby.")
15311 (license license:bsd-3)))
15312
15313 (define-public python-inflection
15314 (package
15315 (name "python-inflection")
15316 (version "0.3.1")
15317 (source
15318 (origin (method url-fetch)
15319 (uri (pypi-uri "inflection" version))
15320 (sha256
15321 (base32
15322 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
15323 (build-system python-build-system)
15324 (native-inputs
15325 `(("python-pytest" ,python-pytest)))
15326 (home-page "https://github.com/jpvanhal/inflection")
15327 (synopsis "Python string transformation library")
15328 (description
15329 "Inflection is a string transformation library. It singularizes
15330 and pluralizes English words, and transforms strings from CamelCase to
15331 underscored string.")
15332 (license license:expat)))
15333
15334 (define-public python2-inflection
15335 (package-with-python2 python-inflection))
15336
15337 (define-public python-pylev
15338 (package
15339 (name "python-pylev")
15340 (version "1.3.0")
15341 (source (origin
15342 (method url-fetch)
15343 (uri (pypi-uri "pylev" version))
15344 (sha256
15345 (base32
15346 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
15347 (build-system python-build-system)
15348 (home-page "https://github.com/toastdriven/pylev")
15349 (synopsis "Levenshtein distance implementation in Python")
15350 (description "Pure Python Levenshtein implementation, based off the
15351 Wikipedia code samples at
15352 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
15353 (license license:bsd-3)))
15354
15355 (define-public python2-pylev
15356 (package-with-python2 python-pylev))
15357
15358 (define-public python-cleo
15359 (package
15360 (name "python-cleo")
15361 (version "0.8.1")
15362 (source (origin
15363 (method url-fetch)
15364 (uri (pypi-uri "cleo" version))
15365 (sha256
15366 (base32
15367 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
15368 (build-system python-build-system)
15369 (native-inputs
15370 `( ;; For testing
15371 ("python-mock" ,python-mock)
15372 ("python-pytest-mock" ,python-pytest-mock)
15373 ("python-pytest" ,python-pytest)))
15374 (propagated-inputs
15375 `(("python-backpack" ,python-backpack)
15376 ("python-clikit" ,python-clikit)
15377 ("python-pastel" ,python-pastel)
15378 ("python-pylev" ,python-pylev)))
15379 (home-page "https://github.com/sdispater/cleo")
15380 (synopsis "Command-line arguments library for Python")
15381 (description
15382 "Cleo allows you to create command-line commands with signature in
15383 docstring and colored output.")
15384 (license license:expat)))
15385
15386 (define-public python2-cleo
15387 (package-with-python2 python-cleo))
15388
15389 (define-public python-tomlkit
15390 (package
15391 (name "python-tomlkit")
15392 (version "0.7.0")
15393 (source
15394 (origin
15395 (method url-fetch)
15396 (uri (pypi-uri "tomlkit" version))
15397 (sha256
15398 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
15399 (build-system python-build-system)
15400 (native-inputs
15401 `(("python-pytest" ,python-pytest)
15402 ("python-pyyaml" ,python-pyyaml)))
15403 (home-page "https://github.com/sdispater/tomlkit")
15404 (synopsis "Style-preserving TOML library")
15405 (description
15406 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
15407 preserves all comments, indentations, whitespace and internal element ordering,
15408 and makes them accessible and editable via an intuitive API. It can also
15409 create new TOML documents from scratch using the provided helpers. Part of the
15410 implementation has been adapted, improved, and fixed from Molten.")
15411 (license license:expat)))
15412
15413 (define-public python-shellingham
15414 (package
15415 (name "python-shellingham")
15416 (version "1.3.2")
15417 (source
15418 (origin
15419 (method url-fetch)
15420 (uri (pypi-uri "shellingham" version))
15421 (sha256
15422 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
15423 (build-system python-build-system)
15424 (arguments
15425 `(#:phases
15426 (modify-phases %standard-phases
15427 (add-after 'unpack 'restore-setup.py
15428 ;; setup.py will return in the next release.
15429 ;; <https://github.com/sarugaku/shellingham/issues/33>
15430 (lambda _
15431 (with-output-to-file "setup.py"
15432 (lambda _
15433 (display "from setuptools import setup\nsetup()\n")))
15434 #t)))))
15435 (home-page "https://github.com/sarugaku/shellingham")
15436 (synopsis "Tool to detect surrounding shell")
15437 (description
15438 "Shellingham detects what shell the current Python executable is
15439 running in.")
15440 (license license:isc)))
15441
15442 (define-public python-memcached
15443 (package
15444 (name "python-memcached")
15445 (version "1.59")
15446 (source
15447 (origin
15448 (method url-fetch)
15449 (uri (pypi-uri "python-memcached" version))
15450 (sha256
15451 (base32
15452 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
15453 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
15454 (build-system python-build-system)
15455 (propagated-inputs `(("python-six" ,python-six)))
15456 (home-page
15457 "https://github.com/linsomniac/python-memcached")
15458 (synopsis "Pure python memcached client")
15459 (description
15460 "This software is a pure Python interface to the memcached memory cache
15461 daemon. It is the client side software which allows storing values in one or
15462 more, possibly remote, memcached servers.")
15463 (license license:psfl)))
15464
15465 (define-public python-clikit
15466 (package
15467 (name "python-clikit")
15468 (version "0.6.2")
15469 (source
15470 (origin
15471 (method url-fetch)
15472 (uri (pypi-uri "clikit" version))
15473 (sha256
15474 (base32
15475 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
15476 (build-system python-build-system)
15477 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
15478 (propagated-inputs
15479 `(("python-crashtest" ,python-crashtest)
15480 ("python-pastel" ,python-pastel)
15481 ("python-pylev" ,python-pylev)))
15482 (home-page "https://github.com/sdispater/clikit")
15483 (synopsis "Group of utilities to build command line interfaces")
15484 (description
15485 "CliKit is a group of utilities to build testable command line
15486 interfaces.")
15487 (properties `((python2-variant . ,(delay python2-clikit))))
15488 (license license:expat)))
15489
15490 (define-public python2-clikit
15491 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
15492 (package/inherit
15493 base
15494 (propagated-inputs
15495 `(("python-enum34" ,python2-enum34)
15496 ("python-typing" ,python2-typing)
15497 ,@(package-propagated-inputs base))))))
15498
15499 (define-public python-msgpack-python
15500 (package
15501 (name "python-msgpack-python")
15502 (version "0.5.6")
15503 (source
15504 (origin
15505 (method url-fetch)
15506 (uri (pypi-uri "msgpack-python" version))
15507 (sha256
15508 (base32
15509 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
15510 (build-system python-build-system)
15511 (home-page "https://msgpack.org/")
15512 (synopsis "Package to deserialize messages in MessagePack binary format")
15513 (description
15514 "MessagePack is an efficient binary serialization format. It lets you
15515 exchange data among multiple languages like JSON. But it's faster and
15516 smaller. Small integers are encoded into a single byte, and typical short
15517 strings require only one extra byte in addition to the strings themselves.")
15518 (license license:asl2.0)))
15519
15520 (define-public python-cachy
15521 (package
15522 (name "python-cachy")
15523 (version "0.3.0")
15524 (source
15525 (origin
15526 (method url-fetch)
15527 (uri (pypi-uri "cachy" version))
15528 (sha256
15529 (base32
15530 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
15531 (build-system python-build-system)
15532 (arguments
15533 '(#:phases
15534 (modify-phases %standard-phases
15535 (replace 'check
15536 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
15537 "pytest"))))))
15538 (native-inputs
15539 `(("memcached" ,memcached)
15540 ("python-fakeredis" ,python-fakeredis)
15541 ("python-flexmock" ,python-flexmock)
15542 ("python-pifpaf" ,python-pifpaf)
15543 ("python-pytest" ,python-pytest)))
15544 (propagated-inputs
15545 `(("python-memcached" ,python-memcached)
15546 ("python-msgpack-python" ,python-msgpack-python)
15547 ("python-redis" ,python-redis)))
15548 (home-page "https://github.com/sdispater/cachy")
15549 (synopsis "Simple yet effective caching library")
15550 (description
15551 "Cachy provides a simple yet effective caching library. A simple but
15552 powerful API: thread-safety; decorator syntax; support for memcached, redis,
15553 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
15554 (license license:expat)))
15555
15556 (define-public poetry
15557 (package
15558 (name "poetry")
15559 (version "1.1.5")
15560 ;; Poetry can only be built from source with Poetry.
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (pypi-uri "poetry" version))
15565 (sha256
15566 (base32
15567 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
15568 (build-system python-build-system)
15569 (arguments
15570 `(#:tests? #f ;; Pypi does not have tests.
15571 #:phases
15572 (modify-phases %standard-phases
15573 (add-before 'build 'patch-setup-py
15574 (lambda _
15575 (substitute* "setup.py"
15576 ;; Allow newer versions of python-keyring.
15577 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
15578 ;; TODO: remove after the next release cycle,
15579 ;; when packaging has been updated.
15580 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
15581 #t)))))
15582 (propagated-inputs
15583 `(("python-cachecontrol" ,python-cachecontrol)
15584 ("python-cachy" ,python-cachy)
15585 ("python-cleo" ,python-cleo)
15586 ("python-clikit" ,python-clikit)
15587 ("python-html5lib" ,python-html5lib)
15588 ("python-keyring" ,python-keyring)
15589 ("python-msgpack-transitional" ,python-msgpack-transitional)
15590 ("python-packaging" ,python-packaging)
15591 ("python-pexpect" ,python-pexpect)
15592 ("python-pip" ,python-pip)
15593 ("python-pkginfo" ,python-pkginfo)
15594 ("python-poetry-core" ,python-poetry-core)
15595 ("python-requests" ,python-requests)
15596 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
15597 ("python-shellingham" ,python-shellingham)
15598 ("python-tomlkit" ,python-tomlkit)
15599 ("python-virtualenv" ,python-virtualenv)))
15600 (home-page "https://python-poetry.org")
15601 (synopsis "Python dependency management and packaging made easy")
15602 (description "Poetry is a tool for dependency management and packaging
15603 in Python. It allows you to declare the libraries your project depends on and
15604 it will manage (install/update) them for you.")
15605 (license license:expat)))
15606
15607 (define-public python-lark-parser
15608 (package
15609 (name "python-lark-parser")
15610 (version "0.9.0")
15611 (source (origin
15612 (method url-fetch)
15613 (uri (pypi-uri "lark-parser" version))
15614 (sha256
15615 (base32
15616 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
15617 (build-system python-build-system)
15618 (home-page "https://github.com/lark-parser/lark")
15619 (synopsis "Multi-language parser for Python")
15620 (description
15621 "Lark is a parser built with a focus on ergonomics, performance and
15622 resilience. Lark can parse all context-free languages. That means it is
15623 capable of parsing almost any programming language out there, and to
15624 some degree most natural languages too.")
15625 (license license:expat)))
15626
15627 (define-public python-libcst
15628 (package
15629 (name "python-libcst")
15630 (version "0.3.8")
15631 (source (origin
15632 (method url-fetch)
15633 (uri (pypi-uri "libcst" version))
15634 (sha256
15635 (base32
15636 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
15637 (build-system python-build-system)
15638 (arguments
15639 `(#:phases
15640 (modify-phases %standard-phases
15641 (add-after 'unpack 'remove-failing-tests
15642 (lambda _
15643 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
15644 (delete-file "libcst/tests/test_fuzz.py")
15645 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
15646 (delete-file "libcst/tests/test_pyre_integration.py")
15647 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
15648 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
15649 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
15650 (add-before 'check 'generate-test-data
15651 (lambda _
15652 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
15653 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
15654 (replace 'check
15655 (lambda* (#:key tests? #:allow-other-keys)
15656 (when tests?
15657 (invoke "python" "-m" "unittest")))))))
15658 (native-inputs
15659 `(("python-black" ,python-black)
15660 ("python-isort" ,python-isort)))
15661 (propagated-inputs
15662 `(("python-typing-extensions" ,python-typing-extensions)
15663 ("python-typing-inspect" ,python-typing-inspect)
15664 ("python-pyyaml" ,python-pyyaml)))
15665 (home-page "https://github.com/Instagram/LibCST")
15666 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
15667 (description
15668 "LibCST parses Python source code as a CST tree that keeps all
15669 formatting details (comments, whitespaces, parentheses, etc). It's useful
15670 for building automated refactoring (codemod) applications and linters.
15671 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
15672 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
15673 naming node types and fields, LibCST creates a lossless CST that looks and
15674 feels like an AST.")
15675 (license (list license:expat
15676 ;; Some files unde libcst/_parser/ are under Python Software
15677 ;; Foundation license (see LICENSE file for details)
15678 license:psfl
15679 ;; libcst/_add_slots.py
15680 license:asl2.0))))
15681
15682 (define-public python-libcst-minimal
15683 (hidden-package
15684 (package
15685 (inherit python-libcst)
15686 (name "python-libcst-minimal")
15687 (arguments '(#:tests? #f))
15688 (native-inputs '()))))
15689
15690 (define-public python-typing-inspect
15691 (package
15692 (name "python-typing-inspect")
15693 (version "0.6.0")
15694 (source (origin
15695 (method url-fetch)
15696 (uri (pypi-uri "typing_inspect" version))
15697 (sha256
15698 (base32
15699 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
15700 (patches (search-patches "python-typing-inspect-fix.patch"))))
15701 (build-system python-build-system)
15702 (propagated-inputs
15703 `(("python-mypy-extensions" ,python-mypy-extensions)
15704 ("python-typing-extensions" ,python-typing-extensions)))
15705 (home-page "https://github.com/ilevkivskyi/typing_inspect")
15706 (synopsis "API for inspection of types in the Python @code{typing} module")
15707 (description
15708 "The @code{typing_inspect} module defines experimental API for runtime
15709 inspection of types defined in the Python standard typing module.")
15710 (license license:expat)))
15711
15712 (define-public python-lazy-object-proxy
15713 (package
15714 (name "python-lazy-object-proxy")
15715 (version "1.5.1")
15716 (source (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "lazy-object-proxy" version))
15719 (sha256
15720 (base32
15721 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
15722 (native-inputs
15723 `(("python-setuptools-scm" ,python-setuptools-scm)))
15724 (build-system python-build-system)
15725 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
15726 (synopsis "Lazy object proxy for python")
15727 (description
15728 "Lazy object proxy is an object that wraps a callable but defers the call
15729 until the object is actually required, and caches the result of said call.")
15730 (license license:bsd-2)))
15731
15732 (define-public python2-lazy-object-proxy
15733 (package-with-python2 python-lazy-object-proxy))
15734
15735 (define-public python-dnspython
15736 (package
15737 (name "python-dnspython")
15738 (version "2.1.0")
15739 (source (origin
15740 (method url-fetch)
15741 (uri (pypi-uri "dnspython" version ".zip"))
15742 (sha256
15743 (base32
15744 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15745 (build-system python-build-system)
15746 (native-inputs `(("unzip" ,unzip)))
15747 (arguments '(#:tests? #f)) ; XXX: requires internet access
15748 (home-page "https://www.dnspython.org")
15749 (synopsis "DNS toolkit for Python")
15750 (description
15751 "dnspython is a DNS toolkit for Python. It supports almost all record
15752 types. It can be used for queries, zone transfers, and dynamic updates.
15753 It supports TSIG authenticated messages and EDNS0.")
15754 (license license:expat)))
15755
15756 (define-public python-dnspython-1.16
15757 (package
15758 (inherit python-dnspython)
15759 (version "1.16.0")
15760 (source (origin
15761 (method url-fetch)
15762 (uri (string-append "http://www.dnspython.org/kits/"
15763 version "/dnspython-" version ".tar.gz"))
15764 (sha256
15765 (base32
15766 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15767 (native-inputs '())))
15768
15769 (define-public python2-dnspython-1.16
15770 (package-with-python2 python-dnspython-1.16))
15771
15772 (define-public python-py3dns
15773 (package
15774 (name "python-py3dns")
15775 (version "3.2.1")
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "py3dns" version))
15780 (sha256
15781 (base32
15782 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15783 (build-system python-build-system)
15784 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15785 ;; removing functionality so we copy from Nix and "just don't build it".
15786 (arguments
15787 `(#:phases
15788 (modify-phases %standard-phases
15789 (add-after 'unpack 'patch-source
15790 (lambda _
15791 (substitute* "setup.py"
15792 (("import DNS") "")
15793 (("DNS.__version__") (string-append "\"" ,version "\"")))
15794 #t)))
15795 #:tests? #f)) ; Also skip the tests.
15796 (home-page "https://launchpad.net/py3dns")
15797 (synopsis "Python 3 DNS library")
15798 (description "This Python 3 module provides a DNS API for looking up DNS
15799 entries from within Python 3 modules and applications. This module is a
15800 simple, lightweight implementation.")
15801 (license license:psfl)))
15802
15803 (define-public python-email-validator
15804 (package
15805 (name "python-email-validator")
15806 (version "1.0.2")
15807 (source
15808 (origin (method url-fetch)
15809 (uri (pypi-uri "email_validator" version))
15810 (sha256
15811 (base32
15812 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15813 (build-system python-build-system)
15814 (arguments
15815 '(#:phases
15816 (modify-phases %standard-phases
15817 (add-before 'build 'use-dnspython
15818 (lambda _
15819 (substitute* "setup.py"
15820 (("dnspython3") "dnspython"))
15821 #t)))))
15822 (propagated-inputs
15823 `(("python-dnspython" ,python-dnspython)
15824 ("python-idna" ,python-idna)))
15825 (home-page "https://github.com/JoshData/python-email-validator")
15826 (synopsis "Email address validation library for Python")
15827 (description
15828 "This library validates email address syntax and deliverability.")
15829 (license license:cc0)))
15830
15831 (define-public python2-email-validator
15832 (package-with-python2 python-email-validator))
15833
15834 (define-public python-ukpostcodeparser
15835 (package
15836 (name "python-ukpostcodeparser")
15837 (version "1.1.2")
15838 (source (origin
15839 (method url-fetch)
15840 (uri (pypi-uri "UkPostcodeParser" version))
15841 (sha256
15842 (base32
15843 "03jkf1ygbwq3akzbcjyjk1akc1hv2sfgx90306pq1nwklbpn80lk"))))
15844 (build-system python-build-system)
15845 (arguments
15846 `(#:phases
15847 (modify-phases %standard-phases
15848 (replace 'check
15849 (lambda* (#:key tests? #:allow-other-keys)
15850 (when tests?
15851 ;; Tests for lowercase postcodes fail.
15852 (invoke "pytest" "-vv" "ukpostcodeparser/test/parser.py" "-k"
15853 (string-append "not test_091 "
15854 "and not test_097 "
15855 "and not test_098 "
15856 "and not test_125 "
15857 "and not test_131"))))))))
15858 (native-inputs
15859 `(("python-pytest" ,python-pytest)))
15860 (home-page "https://github.com/hamstah/ukpostcodeparser")
15861 (synopsis "UK Postcode parser for Python")
15862 (description
15863 "This library provides the @code{parse_uk_postcode} function for
15864 parsing UK postcodes.")
15865 (license license:expat)))
15866
15867 (define-public python2-ukpostcodeparser
15868 (package-with-python2 python-ukpostcodeparser))
15869
15870 (define-public python-faker
15871 (package
15872 (name "python-faker")
15873 (version "9.3.1")
15874 (source (origin
15875 (method url-fetch)
15876 (uri (pypi-uri "Faker" version))
15877 (sha256
15878 (base32
15879 "0lpfdc4ndvk7chgqrfd2b1my4n54pccq9b645vp9cp5s5ypyknfd"))))
15880 (build-system python-build-system)
15881 (arguments
15882 '(#:phases
15883 (modify-phases %standard-phases
15884 (replace 'check
15885 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15886 (native-inputs
15887 `( ;; For testing
15888 ("python-freezegun" ,python-freezegun)
15889 ("python-pytest" ,python-pytest-6)
15890 ("python-random2" ,python-random2)
15891 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15892 ("python-validators" ,python-validators)))
15893 (propagated-inputs
15894 `(("python-dateutil" ,python-dateutil)
15895 ("python-text-unidecode" ,python-text-unidecode)))
15896 (home-page "https://github.com/joke2k/faker")
15897 (synopsis "Python package that generates fake data")
15898 (description
15899 "Faker is a Python package that generates fake data such as names,
15900 addresses, and phone numbers.")
15901 (license license:expat)
15902 (properties `((python2-variant . ,(delay python2-faker))))))
15903
15904 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15905 (define-public python2-faker
15906 (let ((base (package-with-python2 (strip-python2-variant
15907 python-faker))))
15908 (package
15909 (inherit base)
15910 (version "3.0.1")
15911 (source (origin
15912 (method url-fetch)
15913 (uri (pypi-uri "Faker" version))
15914 (sha256
15915 (base32
15916 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15917 (native-inputs
15918 `(("python-mock" ,python2-mock)
15919 ,@(package-native-inputs base)))
15920 (propagated-inputs
15921 `(("python2-ipaddress" ,python2-ipaddress)
15922 ("python2-six" ,python2-six)
15923 ,@(package-propagated-inputs base))))))
15924
15925 (define-public python-pyaml
15926 (package
15927 (name "python-pyaml")
15928 (version "18.11.0")
15929 (source (origin
15930 (method url-fetch)
15931 (uri (pypi-uri "pyaml" version))
15932 (sha256
15933 (base32
15934 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15935 (build-system python-build-system)
15936 (native-inputs
15937 `(("python-unidecode" ,python-unidecode)))
15938 (propagated-inputs
15939 `(("python-pyyaml" ,python-pyyaml)))
15940 (home-page "https://github.com/mk-fg/pretty-yaml")
15941 (synopsis "YAML pretty-print library for Python")
15942 (description
15943 "pyaml is a PyYAML based python module to produce pretty and readable
15944 YAML-serialized data.")
15945 (license license:wtfpl2)))
15946
15947 (define-public python2-pyaml
15948 (package-with-python2 python-pyaml))
15949
15950 (define-public python-backpack
15951 (package
15952 (name "python-backpack")
15953 (version "0.1")
15954 (source
15955 (origin
15956 (method url-fetch)
15957 (uri (pypi-uri "backpack" version))
15958 (sha256
15959 (base32
15960 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15961 (build-system python-build-system)
15962 (native-inputs
15963 `(("python-pytest" ,python-pytest)
15964 ("python-nose" ,python-nose)
15965 ("python-toml" ,python-toml)))
15966 (propagated-inputs
15967 `(("python-simplejson" ,python-simplejson)))
15968 (home-page "https://github.com/sdispater/backpack")
15969 (synopsis "Utilities for working with Python collections")
15970 (description "Backpack provides some useful utilities for working with
15971 collections of data.")
15972 (license license:expat)))
15973
15974 (define-public python2-backpack
15975 (package-with-python2 python-backpack))
15976
15977 (define-public python-prompt-toolkit
15978 (package
15979 (name "python-prompt-toolkit")
15980 (version "3.0.18")
15981 (source
15982 (origin
15983 (method url-fetch)
15984 (uri (pypi-uri "prompt_toolkit" version))
15985 (sha256
15986 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15987 (build-system python-build-system)
15988 (arguments
15989 `(#:phases
15990 (modify-phases %standard-phases
15991 (delete 'check)
15992 (add-after 'install 'post-install-check
15993 (lambda* (#:key inputs outputs #:allow-other-keys)
15994 ;; HOME is needed for the test
15995 ;; "test_pathcompleter_can_expanduser".
15996 (setenv "HOME" "/tmp")
15997 (add-installed-pythonpath inputs outputs)
15998 (invoke "py.test"))))))
15999 (propagated-inputs
16000 `(("python-wcwidth" ,python-wcwidth)))
16001 (native-inputs
16002 `(("python-pytest" ,python-pytest)))
16003 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
16004 (synopsis "Library for building command line interfaces in Python")
16005 (description
16006 "Prompt-Toolkit is a library for building interactive command line
16007 interfaces in Python. It's like GNU Readline but it also features syntax
16008 highlighting while typing, out-of-the-box multi-line input editing, advanced
16009 code completion, incremental search, support for Chinese double-width
16010 characters, mouse support, and auto suggestions.")
16011 (license license:bsd-3)
16012 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
16013
16014 (define-public python-prompt-toolkit-2
16015 (package (inherit python-prompt-toolkit)
16016 (name "python-prompt-toolkit")
16017 (version "2.0.7")
16018 (source
16019 (origin
16020 (method url-fetch)
16021 (uri (pypi-uri "prompt_toolkit" version))
16022 (sha256
16023 (base32
16024 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
16025 (propagated-inputs
16026 `(("python-wcwidth" ,python-wcwidth)
16027 ("python-six" ,python-six)
16028 ("python-pygments" ,python-pygments)))
16029 (properties '())))
16030
16031 (define-public python2-prompt-toolkit
16032 (package-with-python2 python-prompt-toolkit-2))
16033
16034 (define-public python-prompt-toolkit-1
16035 (package (inherit python-prompt-toolkit-2)
16036 (version "1.0.15")
16037 (source
16038 (origin
16039 (method url-fetch)
16040 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
16041 (sha256
16042 (base32
16043 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
16044
16045 (define-public python2-prompt-toolkit-1
16046 (package-with-python2 python-prompt-toolkit-1))
16047
16048 (define-public python-jedi
16049 ;; The 0.18.0 release tests do not work with Python 3.9.6. Use a more
16050 ;; recent commit.
16051 (let ((commit "1d944943c311b2d71655432f8870d68b2cf7d44b")
16052 (revision "1"))
16053 (package
16054 (name "python-jedi")
16055 (version
16056 (git-version "0.18.0" revision commit))
16057 (source
16058 (origin
16059 (method git-fetch)
16060 (uri (git-reference
16061 (url "https://github.com/davidhalter/jedi")
16062 (commit commit)))
16063 (file-name (git-file-name name version))
16064 (sha256
16065 (base32
16066 "052szkbv2pf9hy21any6zb4dhx3c5w1v6b9hn5grlc84zfm350vq"))))
16067 (build-system python-build-system)
16068 (arguments
16069 `(#:phases
16070 (modify-phases %standard-phases
16071 (add-after 'unpack 'unpack-submodule-sources
16072 (lambda* (#:key inputs #:allow-other-keys)
16073 (copy-recursively (assoc-ref inputs "python-django-stubs")
16074 "jedi/third_party/django-stubs")
16075 (copy-recursively (assoc-ref inputs "python-typeshed")
16076 "jedi/third_party/typeshed")
16077 #t))
16078 (replace 'check
16079 (lambda* (#:key tests? #:allow-other-keys)
16080 (when tests?
16081 (setenv "HOME" "/tmp")
16082 ;; Disable the pytest tests that fail with pytest 6. See:
16083 ;; https://github.com/davidhalter/jedi/issues/1660.
16084 (invoke "pytest" "-vv" "-k"
16085 "not test_completion[pytest"))
16086 #t)))))
16087 (native-inputs
16088 `(("python-pytest" ,python-pytest)
16089 ("python-docopt" ,python-docopt)
16090 ("python-django-stubs"
16091 ,(origin
16092 (method git-fetch)
16093 (uri (git-reference
16094 (url "https://github.com/davidhalter/django-stubs")
16095 (commit "3d2534ea8d8300c4c9db8f18e300355d5fd5488b")))
16096 (file-name "django-stubs-checkout")
16097 (sha256
16098 (base32 "1fpvn4lcqkd2q18z29rcnwakm649fccw2k6jik5d64j7p6xns08r"))))
16099 ("python-typeshed"
16100 ,(origin
16101 (method git-fetch)
16102 (uri (git-reference
16103 (url "https://github.com/davidhalter/typeshed")
16104 (commit "ae9d4f4b21bb5e1239816c301da7b1ea904b44c3")))
16105 (file-name "typeshed-checkout")
16106 (sha256
16107 (base32 "02xdip4amj0a7z9xph2mj46x1k55bjxl8d0gkpy25575acyx1kjq"))))))
16108 (propagated-inputs
16109 `(("python-parso" ,python-parso)))
16110 (home-page "https://github.com/davidhalter/jedi")
16111 (synopsis "Autocompletion and static analysis library for Python")
16112 (description
16113 "Jedi is a static analysis tool for Python that can be used in Integrated
16114 Development Environments (@dfn{IDE}s) and text editors. It understands Python
16115 on a deeper level than many other static analysis frameworks for Python.
16116
16117 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
16118 well.")
16119 (license license:expat))))
16120
16121 (define-public python2-jedi
16122 (package-with-python2 python-jedi))
16123
16124 (define-public ptpython
16125 (package
16126 (name "ptpython")
16127 (version "3.0.17")
16128 (source (origin
16129 (method url-fetch)
16130 (uri (pypi-uri "ptpython" version))
16131 (sha256
16132 (base32
16133 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
16134 (build-system python-build-system)
16135 (arguments
16136 `(#:tests? #f)) ;there are no tests
16137 (propagated-inputs
16138 `(("python-appdirs" ,python-appdirs)
16139 ("python-black" ,python-black)
16140 ("python-jedi" ,python-jedi)
16141 ("python-prompt-toolkit" ,python-prompt-toolkit)
16142 ("python-pygments" ,python-pygments)))
16143 (home-page "https://github.com/jonathanslenders/ptpython")
16144 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
16145 (description
16146 "ptpython is a Python read-eval-print loop with IDE-like features.
16147 It supports syntax highlighting, multiline editing, autocompletion, mouse,
16148 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
16149 etc.")
16150 (license license:bsd-3)
16151 (properties `((python2-variant . ,(delay ptpython-2))))))
16152
16153 (define-public ptpython-2
16154 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
16155 (package/inherit base
16156 (name "ptpython2"))))
16157
16158 (define-public python-easyprocess
16159 (package
16160 (name "python-easyprocess")
16161 (version "0.3")
16162 (source
16163 (origin
16164 (method url-fetch)
16165 (uri (pypi-uri "EasyProcess" version))
16166 (sha256
16167 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
16168 (build-system python-build-system)
16169 (arguments
16170 ;; Tests require pyvirtualdisplay, which requires this package.
16171 `(#:tests? #f))
16172 (home-page "https://github.com/ponty/easyprocess")
16173 (synopsis "Python subprocess interface")
16174 (description
16175 "@code{easyprocess} is an easy to use Python subprocess interface.")
16176 (license license:bsd-3)))
16177
16178 (define-public python-entrypoint2
16179 (package
16180 (name "python-entrypoint2")
16181 (version "0.2.4")
16182 (source
16183 (origin
16184 (method url-fetch)
16185 (uri (pypi-uri "entrypoint2" version))
16186 (sha256
16187 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
16188 (build-system python-build-system)
16189 (arguments
16190 `(#:test-target "pytest"))
16191 (native-inputs
16192 `(("python-easyprocess" ,python-easyprocess)
16193 ("python-pytest" ,python-pytest)
16194 ("python-pytest-runner" ,python-pytest-runner)))
16195 (home-page "https://github.com/ponty/entrypoint2")
16196 (synopsis "Command-line interface for Python modules")
16197 (description
16198 "@code{entrypoint2} is an easy to use command-line interface for Python
16199 modules based on @code{argparse}. It translates function signature and
16200 documentation to argparse configuration.")
16201 (license license:bsd-3)))
16202
16203 (define-public python-pyvirtualdisplay
16204 (package
16205 (name "python-pyvirtualdisplay")
16206 (version "2.1")
16207 (source
16208 (origin
16209 (method url-fetch)
16210 (uri (pypi-uri "PyVirtualDisplay" version))
16211 (sha256
16212 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
16213 (build-system python-build-system)
16214 (arguments
16215 ;; Tests fail with:
16216 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
16217 `(#:tests? #f))
16218 (native-inputs
16219 `(("python-entrypoint2" ,python-entrypoint2)
16220 ("python-psutil" ,python-psutil)
16221 ("python-pytest" ,python-pytest)
16222 ("python-pytest-runner" ,python-pytest-runner)))
16223 (propagated-inputs
16224 `(("python-easyprocess" ,python-easyprocess)
16225 ("python-pillow" ,python-pillow)))
16226 (home-page "https://github.com/ponty/pyvirtualdisplay")
16227 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
16228 (description
16229 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
16230 (license license:bsd-3)))
16231
16232 (define-public python-stem
16233 (package
16234 (name "python-stem")
16235 (version "1.8.0")
16236 (source
16237 (origin
16238 (method url-fetch)
16239 (uri (pypi-uri "stem" version))
16240 (sha256
16241 (base32
16242 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
16243 (build-system python-build-system)
16244 (arguments
16245 `(#:phases
16246 (modify-phases %standard-phases
16247 (add-after 'unpack 'fix-tests
16248 ;; See https://github.com/torproject/stem/issues/56
16249 (lambda _
16250 (substitute* "run_tests.py"
16251 (("test\\.task\\.MOCK_VERSION,")
16252 ""))))
16253 (replace 'check
16254 (lambda _
16255 (invoke "./run_tests.py" "--unit")
16256 #t)))))
16257 (native-inputs
16258 `(("python-mock" ,python-mock)
16259 ("python-pycodestyle" ,python-pycodestyle)
16260 ("python-pyflakes" ,python-pyflakes)))
16261 (home-page "https://stem.torproject.org/")
16262 (synopsis
16263 "Python controller library that allows applications to interact with Tor")
16264 (description
16265 "Stem is a Python controller library for Tor. With it you can use Tor's
16266 control protocol to script against the Tor process and read descriptor data
16267 relays publish about themselves.")
16268 (license license:lgpl3)))
16269
16270 (define-public python-pyserial
16271 (package
16272 (name "python-pyserial")
16273 (version "3.5")
16274 (source
16275 (origin
16276 (method url-fetch)
16277 (uri (pypi-uri "pyserial" version))
16278 (sha256
16279 (base32
16280 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
16281 (build-system python-build-system)
16282 (arguments
16283 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
16284 ;; #:phases
16285 ;; (modify-phases %standard-phases
16286 ;; (replace 'check
16287 ;; (lambda _
16288 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
16289 (home-page
16290 "https://github.com/pyserial/pyserial")
16291 (synopsis "Python Serial Port Bindings")
16292 (description "@code{pyserial} provide serial port bindings for Python. It
16293 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
16294 and/or Xon/Xoff. The port is accessed in RAW mode.")
16295 (license license:bsd-3)))
16296
16297 (define-public python2-pyserial
16298 (package-with-python2 python-pyserial))
16299
16300 (define-public python-pyserial-asyncio
16301 (package
16302 (name "python-pyserial-asyncio")
16303 (version "0.5")
16304 (source
16305 (origin
16306 (method url-fetch)
16307 (uri (pypi-uri "pyserial-asyncio" version))
16308 (sha256
16309 (base32 "0cwd2cjz859v6jrm3y6hikfqjyhyfj5vhfjb8vvflvl6791yah8n"))))
16310 (build-system python-build-system)
16311 (propagated-inputs `(("python-pyserial" ,python-pyserial)))
16312 (home-page "https://github.com/pyserial/pyserial-asyncio")
16313 (synopsis "Pyserial asynchronous I/O extension")
16314 (description "This package extends Pyserial with asynchronous I/O
16315 support.")
16316 (license license:bsd-3)))
16317
16318 (define-public python-pymodbus
16319 (package
16320 (name "python-pymodbus")
16321 (version "2.5.2")
16322 (source
16323 (origin
16324 (method git-fetch)
16325 (uri (git-reference
16326 (url "https://github.com/riptideio/pymodbus")
16327 (commit (string-append "v" version))))
16328 (file-name (git-file-name name version))
16329 (sha256
16330 (base32
16331 "009blvzi56434f0qfjdg3r8q1flb1jcx2786wi0i0xf81025z9cf"))))
16332 (build-system python-build-system)
16333 (arguments
16334 `(#:phases (modify-phases %standard-phases
16335 (add-after 'unpack 'disable-problematic-tests
16336 (lambda _
16337 ;; The following test module rely on Python's own 'test'
16338 ;; module, which is not distributed in the Python
16339 ;; package of Guix.
16340 (delete-file "test/test_client_async_asyncio.py")
16341 (delete-file "test/test_client_sync_diag.py")))
16342 (replace 'check
16343 (lambda* (#:key tests? #:allow-other-keys)
16344 (when tests?
16345 (invoke "python" "-m" "pytest")))))))
16346 (native-inputs
16347 `(("python-asynctest" ,python-asynctest)
16348 ("python-mock" ,python-mock)
16349 ("python-pytest" ,python-pytest)
16350 ("python-redis" ,python-redis)
16351 ("python-sqlalchemy" ,python-sqlalchemy)
16352 ("python-tornado" ,python-tornado)
16353 ("python-twisted" ,python-twisted)))
16354 (propagated-inputs
16355 `(("python-pyserial" ,python-pyserial)
16356 ("python-six" ,python-six)
16357 ;; For the REPL.
16358 ("python-aiohttp" ,python-aiohttp)
16359 ("python-click" ,python-click)
16360 ("python-prompt-toolkit" ,python-prompt-toolkit)
16361 ("python-pygments" ,python-pygments)
16362 ("python-pyserial-asyncio" ,python-pyserial-asyncio)))
16363 (home-page "https://github.com/riptideio/pymodbus/")
16364 (synopsis "Modbus protocol stack in Python")
16365 (description "Pymodbus is a full Modbus protocol implementation using
16366 @code{asyncio}, @code{tornado} or @code{twisted} for its asynchronous
16367 communications core. It includes the following @emph{client} features:
16368 @itemize
16369 @item full read/write protocol on discrete and register
16370 @item most of the extended protocol (diagnostic/file/pipe/setting/information)
16371 @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
16372 @item asynchronous and synchronous versions
16373 @item payload builder/decoder utilities
16374 @item pymodbus read eval print loop (REPL).
16375 @end itemize
16376 It also includes the following @emph{server} features:
16377 @itemize
16378 @item can function as a fully implemented Modbus server
16379 @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
16380 @item asynchronous and synchronous versions
16381 @item full server control context (device information, counters, etc)
16382 @item a number of backing contexts (database, redis, sqlite, a slave device).
16383 @end itemize")
16384 (license license:bsd-3)))
16385
16386 (define-public python-kivy
16387 (package
16388 (name "python-kivy")
16389 (version "1.10.1")
16390 (source
16391 (origin
16392 (method url-fetch)
16393 (uri (pypi-uri "Kivy" version))
16394 (file-name (string-append name "-" version ".tar.gz"))
16395 (sha256
16396 (base32
16397 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
16398 (build-system python-build-system)
16399 (arguments
16400 `(#:tests? #f ; Tests require many optional packages
16401 #:phases
16402 (modify-phases %standard-phases
16403 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
16404 (lambda* (#:key inputs #:allow-other-keys)
16405 (setenv "KIVY_SDL2_PATH"
16406 (search-input-directory inputs "/include/SDL2")))))))
16407 (native-inputs
16408 `(("pkg-config" ,pkg-config)
16409 ("python-cython" ,python-cython)))
16410 (inputs
16411 `(("gstreamer" ,gstreamer)
16412 ("mesa" ,mesa)
16413 ("sdl-union"
16414 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
16415 (home-page "https://kivy.org")
16416 (synopsis
16417 "Multitouch application framework")
16418 (description
16419 "A software library for rapid development of
16420 hardware-accelerated multitouch applications.")
16421 (license license:expat)))
16422
16423 (define-public python2-kivy
16424 (package-with-python2 python-kivy))
16425
16426 (define-public python-binaryornot
16427 (package
16428 (name "python-binaryornot")
16429 (version "0.4.4")
16430 (source (origin
16431 (method url-fetch)
16432 (uri (pypi-uri "binaryornot" version))
16433 (sha256
16434 (base32
16435 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
16436 (build-system python-build-system)
16437 (arguments
16438 `(#:phases
16439 (modify-phases %standard-phases
16440 (add-after 'unpack 'patch-tests
16441 (lambda _
16442 ;; TypeError: binary() got an unexpected keyword argument
16443 ;; 'average_size'.
16444 (substitute* "tests/test_check.py"
16445 (("average_size=512") ""))
16446 #t)))))
16447 (propagated-inputs
16448 `(("python-chardet" ,python-chardet)
16449 ("python-hypothesis" ,python-hypothesis)))
16450 (home-page "https://github.com/audreyr/binaryornot")
16451 (synopsis "Package to check if a file is binary or text")
16452 (description "Ultra-lightweight pure Python package to check if a file is
16453 binary or text.")
16454 (license license:bsd-3)
16455 (properties `((python2-variant . ,(delay python2-binaryornot))))))
16456
16457 (define-public python2-binaryornot
16458 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
16459 (package/inherit base
16460 (propagated-inputs
16461 `(("python2-enum34" ,python2-enum34)
16462 ,@(package-propagated-inputs base))))))
16463
16464 (define-public python-binwalk
16465 (package
16466 (name "python-binwalk")
16467 (version "2.2.0")
16468 (source
16469 (origin
16470 (method git-fetch)
16471 (uri (git-reference
16472 (url "https://github.com/ReFirmLabs/binwalk")
16473 (commit (string-append "v" version))))
16474 (file-name (git-file-name name version))
16475 (sha256
16476 (base32
16477 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
16478 (build-system python-build-system)
16479 (arguments
16480 `(#:phases
16481 (modify-phases %standard-phases
16482 (add-before 'check 'set-home
16483 (lambda _
16484 (setenv "HOME" ""))))))
16485 (native-inputs
16486 `(("python-coverage" ,python-coverage)
16487 ("python-nose" ,python-nose)))
16488 (home-page "https://github.com/ReFirmLabs/binwalk")
16489 (synopsis "Firmware analysis tool")
16490 (description "Binwalk is a tool for analyzing, reverse engineering, and
16491 extracting firmware images")
16492 (license license:expat)))
16493
16494 (define-public python-nltk
16495 (package
16496 (name "python-nltk")
16497 (version "3.6.2")
16498 (source (origin
16499 (method url-fetch)
16500 (uri (pypi-uri "nltk" version ".zip"))
16501 (sha256
16502 (base32
16503 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
16504 (build-system python-build-system)
16505 (arguments
16506 '(;; The tests require some extra resources to be downloaded.
16507 ;; TODO Try packaging these resources.
16508 #:tests? #f))
16509 (propagated-inputs
16510 `(("python-click" ,python-click)
16511 ("python-joblib" ,python-joblib)
16512 ("python-regex" ,python-regex)
16513 ("python-tqdm" ,python-tqdm)))
16514 (native-inputs
16515 `(("unzip" ,unzip)))
16516 (home-page "http://nltk.org/")
16517 (synopsis "Natural Language Toolkit")
16518 (description "It provides interfaces to over 50 corpora and lexical
16519 resources such as WordNet, along with a suite of text processing libraries
16520 for classification, tokenization, stemming, tagging, parsing, and semantic
16521 reasoning, wrappers for natural language processing libraries.")
16522 (license license:asl2.0)))
16523
16524 ;; Versions >=3.5 breaks backward-compatibility,
16525 ;; so we keep version 3.4.x around for a while.
16526 (define-public python-nltk-3.4
16527 (package
16528 (inherit python-nltk)
16529 (version "3.4.5")
16530 (source
16531 (origin
16532 (method url-fetch)
16533 (uri (pypi-uri "nltk" version ".zip"))
16534 (sha256
16535 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
16536 (propagated-inputs `(("python-six" ,python-six)))))
16537
16538 (define-public python2-nltk
16539 (package-with-python2 python-nltk))
16540
16541 (define-public python-pymongo
16542 (package
16543 (name "python-pymongo")
16544 (version "3.7.2")
16545 (source (origin
16546 (method url-fetch)
16547 (uri (pypi-uri "pymongo" version))
16548 (sha256
16549 (base32
16550 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
16551 (build-system python-build-system)
16552 (propagated-inputs
16553 `(("python-certifi" ,python-certifi)))
16554 (home-page "https://github.com/mongodb/mongo-python-driver")
16555 (synopsis "Python driver for MongoDB")
16556 (description "Python driver for MongoDB.")
16557 (license license:asl2.0)))
16558
16559 (define-public python2-pymongo
16560 (package-with-python2 python-pymongo))
16561
16562 (define-public python-consul
16563 (package
16564 (name "python-consul")
16565 (version "0.6.1")
16566 (source
16567 (origin
16568 (method url-fetch)
16569 (uri (pypi-uri "python-consul" version))
16570 (sha256
16571 (base32
16572 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
16573 (build-system python-build-system)
16574 (arguments
16575 '(#:tests? #f)) ; The tests are not distributed
16576 (propagated-inputs
16577 `(("python-requests" ,python-requests)
16578 ("python-six" ,python-six)))
16579 (home-page "https://github.com/cablehead/python-consul")
16580 (synopsis "Python client for Consul")
16581 (description
16582 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
16583 discovery, monitoring and configuration.")
16584 (license license:expat)))
16585
16586 (define-public python2-consul
16587 (package-with-python2 python-consul))
16588
16589 (define-public python-schematics
16590 (package
16591 (name "python-schematics")
16592 (version "1.1.1")
16593 (source
16594 (origin
16595 (method git-fetch)
16596 (uri (git-reference
16597 (url "https://github.com/schematics/schematics")
16598 (commit (string-append "v" version))))
16599 (file-name (git-file-name name version))
16600 (sha256
16601 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
16602 (build-system python-build-system)
16603 (propagated-inputs
16604 `(("python-six" ,python-six)))
16605 (arguments
16606 ;; The tests require a bunch of not very nice packages with fixed
16607 ;; version requirements (e.g. python-coveralls).
16608 `(#:tests? #f))
16609 (home-page "https://github.com/schematics/schematics")
16610 (synopsis "Python Data Structures for Humans")
16611 (description "Python Data Structures for Humans.")
16612 (license license:bsd-3)))
16613
16614 (define-public python2-schematics
16615 (package-with-python2 python-schematics))
16616
16617 (define-public python-odfpy
16618 (package
16619 (name "python-odfpy")
16620 (version "1.4.1")
16621 (source (origin
16622 (method url-fetch)
16623 (uri (pypi-uri "odfpy" version))
16624 (sha256
16625 (base32
16626 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
16627 (arguments
16628 `(#:phases
16629 (modify-phases %standard-phases
16630 (replace 'check
16631 (lambda _
16632 (invoke "pytest" "-vv"))))))
16633 (build-system python-build-system)
16634 (native-inputs
16635 `(("python-pytest" ,python-pytest)))
16636 (propagated-inputs
16637 `(("python-defusedxml" ,python-defusedxml)))
16638 (home-page "https://github.com/eea/odfpy")
16639 (synopsis "Python API and tools to manipulate OpenDocument files")
16640 (description "Collection of libraries and utility programs written in
16641 Python to manipulate OpenDocument 1.2 files.")
16642 (license
16643 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
16644 ;; number of files with other licenses.
16645 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
16646
16647 (define-public python2-odfpy
16648 (package-with-python2 python-odfpy))
16649
16650 (define-public python-natsort
16651 (package
16652 (name "python-natsort")
16653 (version "7.1.1")
16654 (source (origin
16655 (method url-fetch)
16656 (uri (pypi-uri "natsort" version))
16657 (sha256
16658 (base32
16659 "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
16660 (build-system python-build-system)
16661 (arguments
16662 `(#:phases
16663 (modify-phases %standard-phases
16664 (replace 'check
16665 (lambda _
16666 (invoke "pytest" "-v"))))))
16667 (native-inputs
16668 `(("python-hypothesis" ,python-hypothesis)
16669 ("python-pytest-cov" ,python-pytest-cov)
16670 ("python-pytest-mock" ,python-pytest-mock)
16671 ("python-pytest" ,python-pytest)))
16672 (propagated-inputs ; TODO: Add python-fastnumbers.
16673 `(("python-pyicu" ,python-pyicu)))
16674 (home-page "https://github.com/SethMMorton/natsort")
16675 (synopsis "Natural sorting for python and shell")
16676 (description
16677 "Natsort lets you apply natural sorting on lists instead of
16678 lexicographical. If you use the built-in @code{sorted} method in python
16679 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
16680 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
16681 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
16682 identifies numbers and sorts them separately from strings. It can also sort
16683 version numbers, real numbers, mixed types and more, and comes with a shell
16684 command @command{natsort} that exposes this functionality in the command line.")
16685 (license license:expat)))
16686
16687 (define-public glances
16688 (package
16689 (name "glances")
16690 (version "3.1.7")
16691 (source
16692 (origin
16693 (method url-fetch)
16694 (uri (pypi-uri "Glances" version))
16695 (sha256
16696 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
16697 (modules '((guix build utils)))
16698 (snippet
16699 '(begin
16700 ;; Glances phones PyPI for weekly update checks by default.
16701 ;; Disable these. The user can re-enable them if desired.
16702 (substitute* "glances/outdated.py"
16703 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
16704 (string-append indentation
16705 "self.args.disable_check_update = True\n"
16706 line)))
16707 #t))))
16708 (build-system python-build-system)
16709 (propagated-inputs
16710 `(("python-future" ,python-future)
16711 ("python-psutil" ,python-psutil)))
16712 (home-page "https://github.com/nicolargo/glances")
16713 (synopsis "Cross-platform curses-based monitoring tool")
16714 (description
16715 "Glances is a curses-based monitoring tool for a wide variety of platforms.
16716 Glances uses the PsUtil library to get information from your system. It
16717 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
16718 (license license:lgpl3+)))
16719
16720 (define-public python-glances
16721 (deprecated-package "python-glances" glances))
16722
16723 (define-public python-graphql-core
16724 (package
16725 (name "python-graphql-core")
16726 (version "3.1.2")
16727 (source
16728 (origin
16729 (method url-fetch)
16730 (uri (pypi-uri "graphql-core" version))
16731 (sha256
16732 (base32
16733 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
16734 (build-system python-build-system)
16735 (arguments
16736 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
16737 #:phases
16738 (modify-phases %standard-phases
16739 (add-after 'unpack 'patch-hardcoded-version
16740 (lambda _ (substitute*
16741 "setup.py"
16742 (("'gevent==1.1rc1'") "'gevent'"))
16743 #t)))))
16744 (native-inputs
16745 `(("python-gevent" ,python-gevent)
16746 ("python-mock" ,python-mock)
16747 ("python-pytest-mock" ,python-pytest-mock)))
16748 (propagated-inputs
16749 `(("python-promise" ,python-promise)
16750 ("python-six" ,python-six)))
16751 (home-page "https://github.com/graphql-python/graphql-core")
16752 (synopsis "GraphQL implementation for Python")
16753 (description
16754 "GraphQL implementation for Python. GraphQL is a data query language and
16755 runtime designed and used to request and deliver data to mobile and web apps.
16756 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
16757 to Python.")
16758 (license license:expat)))
16759
16760 (define-public python-graphql-relay
16761 (package
16762 (name "python-graphql-relay")
16763 (version "3.1.0")
16764 (source
16765 (origin
16766 (method url-fetch)
16767 (uri (pypi-uri "graphql-relay" version))
16768 (sha256
16769 (base32
16770 "1d70vwam9gjhx7fqzsa03x7lc6ivcqki5r9pk8m7rslmb7pagmbh"))))
16771 (build-system python-build-system)
16772 (arguments
16773 '(#:phases
16774 (modify-phases %standard-phases
16775 (replace 'check
16776 (lambda* (#:key tests? #:allow-other-keys)
16777 (when tests?
16778 (invoke "pytest" "tests")))))))
16779 (native-inputs
16780 (list
16781 python-pytest
16782 python-pytest-asyncio))
16783 (propagated-inputs
16784 `(("python-graphql-core" ,python-graphql-core)))
16785 (home-page "https://github.com/graphql-python/graphql-relay-py")
16786 (synopsis "Relay implementation for Python")
16787 (description
16788 "This is a library to allow the easy creation of Relay-compliant servers
16789 using the GraphQL Python reference implementation of a GraphQL server. It
16790 should be noted that the code is a exact port of the original
16791 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
16792 from Facebook.")
16793 (license license:expat)))
16794
16795 (define-public python-graphene
16796 (package
16797 (name "python-graphene")
16798 (version "0.10.2")
16799 (source
16800 (origin
16801 (method url-fetch)
16802 (uri (pypi-uri "graphene" version))
16803 (sha256
16804 (base32
16805 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
16806 (build-system python-build-system)
16807 (propagated-inputs
16808 `(("python-graphql-core" ,python-graphql-core)
16809 ("python-graphql-relay" ,python-graphql-relay)
16810 ("python-iso8601" ,python-iso8601)
16811 ("python-promise" ,python-promise)
16812 ("python-six" ,python-six)))
16813 (arguments
16814 `(#:tests? #f)) ; no tests/ in the PyPI tarball
16815 (home-page "https://graphene-python.org/")
16816 (synopsis "GraphQL Framework for Python")
16817 (description
16818 "Graphene is a Python library for building GraphQL schemas/types.
16819 A GraphQL schema describes your data model, and provides a GraphQL server
16820 with an associated set of resolve methods that know how to fetch data.")
16821 (license license:expat)))
16822
16823 (define-public python-nautilus
16824 (package
16825 (name "python-nautilus")
16826 (version "0.4.9")
16827 (source
16828 (origin
16829 (method url-fetch)
16830 (uri (pypi-uri "nautilus" version))
16831 (sha256
16832 (base32
16833 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
16834 (build-system python-build-system)
16835 (arguments `(#:tests? #f)) ; fails to import test modules
16836 (propagated-inputs
16837 `(("python-bcrypt" ,python-bcrypt)
16838 ("python-click" ,python-click)
16839 ("python-consul" ,python-consul)
16840 ("python-graphene" ,python-graphene)
16841 ("python-jinja2" ,python-jinja2)
16842 ("python-peewee" ,python-peewee)
16843 ("python-pika" ,python-pika)
16844 ("python-tornado" ,python-tornado)
16845 ("python-wtforms" ,python-wtforms)))
16846 (native-inputs
16847 `(("python-nose2" ,python-nose2)))
16848 (home-page "https://github.com/AlecAivazis/nautilus")
16849 (synopsis "Library for creating microservice applications")
16850 (description
16851 "Nautilus is a framework for flux based microservices that looks to
16852 provide extendible implementations of common aspects of a cloud so that you can
16853 focus on building massively scalable web applications.")
16854 (license license:expat)))
16855
16856 (define-public python-random2
16857 (package
16858 (name "python-random2")
16859 (version "1.0.1")
16860 (source (origin
16861 (method url-fetch)
16862 (uri (pypi-uri "random2" version ".zip"))
16863 (sha256
16864 (base32
16865 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
16866 (patches
16867 (search-patches "python-random2-getrandbits-test.patch"))))
16868 (build-system python-build-system)
16869 (native-inputs `(("unzip" ,unzip)))
16870 (home-page "http://pypi.python.org/pypi/random2")
16871 (synopsis "Python 3 version of the Python 2 @code{random} module")
16872 (description
16873 "This package provides a Python 3 ported version of Python 2.7’s
16874 @code{random} module. It has also been back-ported to work in Python 2.6.
16875
16876 In Python 3, the implementation of @code{randrange()} was changed, so that
16877 even with the same seed you get different sequences in Python 2 and 3.
16878
16879 This package closes that gap, allowing stable random number generation
16880 between the different Python versions.")
16881 (license license:psfl)))
16882
16883 (define-public python2-random2
16884 (package-with-python2 python-random2))
16885
16886 (define-public python-snowballstemmer
16887 (package
16888 (name "python-snowballstemmer")
16889 (version "2.0.0")
16890 (source (origin
16891 (method url-fetch)
16892 (uri (pypi-uri "snowballstemmer" version))
16893 (sha256
16894 (base32
16895 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16896 (build-system python-build-system)
16897 (arguments
16898 `(;; No tests exist
16899 #:tests? #f))
16900 (home-page "https://github.com/shibukawa/snowball_py")
16901 (synopsis "Snowball stemming library collection for Python")
16902 (description "This package provides 16 word stemmer algorithms generated
16903 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16904 English stemmer.")
16905 (license license:bsd-3)))
16906
16907 (define-public python2-snowballstemmer
16908 (package-with-python2 python-snowballstemmer))
16909
16910 (define-public python-setproctitle
16911 (package
16912 (name "python-setproctitle")
16913 (version "1.1.10")
16914 (source
16915 (origin
16916 (method url-fetch)
16917 (uri (pypi-uri "setproctitle" version))
16918 (sha256
16919 (base32
16920 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16921 (build-system python-build-system)
16922 (arguments
16923 '(#:phases
16924 (modify-phases %standard-phases
16925 (add-before 'check 'patch-Makefile
16926 ;; Stricly this is only required for the python2 variant.
16927 ;; But adding a phase in an inherited package seems to be
16928 ;; cumbersum. So we patch even for python3.
16929 (lambda _
16930 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16931 (when nose
16932 (substitute* "Makefile"
16933 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16934 (string-append nose "/bin/nosetests "))))
16935 #t)))
16936 (replace 'check
16937 (lambda _
16938 (setenv "PYTHON" (or (which "python3") (which "python")))
16939 (setenv "PYCONFIG" (if (which "python3-config")
16940 "python3-config --embed"
16941 "python-config"))
16942 (setenv "CC" "gcc")
16943 ;; No need to extend PYTHONPATH to find the built package, since
16944 ;; the Makefile will build anyway
16945 (invoke "make" "check"))))))
16946 (native-inputs
16947 `(("procps" ,procps))) ; required for tests
16948 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16949 (synopsis
16950 "Setproctitle implementation for Python to customize the process title")
16951 (description "The library allows a process to change its title (as displayed
16952 by system tools such as ps and top).
16953
16954 Changing the title is mostly useful in multi-process systems, for
16955 example when a master process is forked: changing the children's title
16956 allows identifying the task each process is busy with. The technique
16957 is used by PostgreSQL and the OpenSSH Server for example.")
16958 (license license:bsd-3)
16959 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16960
16961 (define-public python2-setproctitle
16962 (let ((base (package-with-python2
16963 (strip-python2-variant python-setproctitle))))
16964 (package/inherit base
16965 (native-inputs `(("python2-nose" ,python2-nose)
16966 ,@(package-native-inputs base))))))
16967
16968 (define-public python-validictory
16969 (package
16970 (name "python-validictory")
16971 (version "1.0.1")
16972 (source
16973 (origin
16974 (method url-fetch)
16975 (uri (pypi-uri "validictory" version))
16976 (sha256
16977 (base32
16978 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16979 (build-system python-build-system)
16980 (arguments
16981 '(#:phases
16982 (modify-phases %standard-phases
16983 (add-after 'unpack 'bootstrap
16984 ;; Move the tests out of the package directory to avoid
16985 ;; packaging them.
16986 (lambda* _
16987 (rename-file "validictory/tests" "tests")
16988 (delete-file "tests/__init__.py")))
16989 (replace 'check
16990 (lambda _
16991 (invoke "py.test" "-vv" ))))))
16992 (native-inputs
16993 `(("python-pytest" ,python-pytest)))
16994 (home-page
16995 "https://github.com/jamesturk/validictory")
16996 (synopsis "General purpose Python data validator")
16997 (description "It allows validation of arbitrary Python data structures.
16998
16999 The schema format is based on the JSON Schema
17000 proposal (http://json-schema.org), so combined with json the library is also
17001 useful as a validator for JSON data.")
17002 (license license:expat)))
17003
17004 (define-public python2-validictory
17005 (package-with-python2 python-validictory))
17006
17007 (define-public python-pyelftools
17008 (package
17009 (name "python-pyelftools")
17010 (version "0.25")
17011 (source
17012 (origin
17013 (method url-fetch)
17014 (uri (pypi-uri "pyelftools" version))
17015 (sha256
17016 (base32
17017 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
17018 (build-system python-build-system)
17019 (home-page
17020 "https://github.com/eliben/pyelftools")
17021 (synopsis
17022 "Analyze binary and library file information")
17023 (description "This Python library provides interfaces for parsing and
17024 analyzing two binary and library file formats; the Executable and Linking
17025 Format (ELF), and debugging information in the Debugging With Attributed
17026 Record Format (DWARF).")
17027 (license license:public-domain)))
17028
17029 (define-public python-pyev
17030 (package
17031 (name "python-pyev")
17032 (version "0.9.0")
17033 (source
17034 (origin
17035 (method url-fetch)
17036 (uri (pypi-uri "pyev" version))
17037 (sha256
17038 (base32
17039 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
17040 (build-system python-build-system)
17041 (arguments
17042 `(#:tests? #f ; no test suite
17043 #:phases
17044 (modify-phases %standard-phases
17045 (add-after 'unpack 'patch
17046 (lambda* (#:key inputs #:allow-other-keys)
17047 (let ((libev (search-input-file inputs "/lib/libev.so.4")))
17048 (substitute* "setup.py"
17049 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
17050 (string-append "libev_dll_name = \"" libev "\"")))))))))
17051 (inputs
17052 `(("libev" ,libev)))
17053 (home-page "https://github.com/gabrielfalcao/pyev")
17054 (synopsis "Python libev interface")
17055 (description "Pyev provides a Python interface to libev.")
17056 (license license:gpl3)))
17057
17058 (define-public python2-pyev
17059 (package-with-python2 python-pyev))
17060
17061 (define-public python-imagesize
17062 (package
17063 (name "python-imagesize")
17064 (version "1.2.0")
17065 (source
17066 (origin
17067 (method url-fetch)
17068 (uri (pypi-uri "imagesize" version))
17069 (sha256
17070 (base32
17071 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
17072 (build-system python-build-system)
17073 (home-page "https://github.com/shibukawa/imagesize_py")
17074 (synopsis "Gets image size of files in various formats in Python")
17075 (description
17076 "This package allows determination of image size from
17077 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
17078 (license license:expat)))
17079
17080 (define-public python2-imagesize
17081 (package-with-python2 python-imagesize))
17082
17083 (define-public python-termstyle
17084 (package
17085 (name "python-termstyle")
17086 (version "0.1.11")
17087 (source
17088 (origin
17089 (method url-fetch)
17090 (uri (pypi-uri "termstyle" version))
17091 (sha256
17092 (base32
17093 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
17094 (build-system python-build-system)
17095 (arguments
17096 '(#:phases
17097 (modify-phases %standard-phases
17098 (replace 'check
17099 (lambda _
17100 (invoke "python" "test3.py"))))))
17101 (home-page "https://github.com/gfxmonk/termstyle")
17102 (synopsis "Console text coloring for Python")
17103 (description "This package provides console text coloring for Python.")
17104 (license license:bsd-3)))
17105
17106 (define-public python-argcomplete
17107 (package
17108 (name "python-argcomplete")
17109 (version "1.11.1")
17110 (source
17111 (origin
17112 (method url-fetch)
17113 (uri (pypi-uri "argcomplete" version))
17114 (sha256
17115 (base32
17116 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
17117 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
17118 (build-system python-build-system)
17119 (native-inputs
17120 `(("python-coverage" ,python-coverage)
17121 ("python-flake8" ,python-flake8)
17122 ("python-pexpect" ,python-pexpect)
17123 ("python-wheel" ,python-wheel)
17124 ("tcsh" ,tcsh)
17125 ("fish" ,fish)
17126 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
17127 (home-page "https://github.com/kislyuk/argcomplete")
17128 (synopsis "Shell tab completion for Python argparse")
17129 (description "argcomplete provides extensible command line tab completion
17130 of arguments and options for Python scripts using @code{argparse}. It's
17131 particularly useful for programs with many options or sub-parsers that can
17132 dynamically suggest completions; for example, when browsing resources over the
17133 network.")
17134 (license license:asl2.0)
17135 (properties `((python2-variant . ,(delay python2-argcomplete))))))
17136
17137 (define-public python2-argcomplete
17138 (let ((variant (package-with-python2
17139 (strip-python2-variant python-argcomplete))))
17140 (package/inherit variant
17141 (arguments
17142 (substitute-keyword-arguments (package-arguments variant)
17143 ((#:phases phases '%standard-phases)
17144 `(modify-phases ,phases
17145 (add-after 'unpack 'set-my-HOME
17146 (lambda _ (setenv "HOME" "/tmp")))))))
17147 (native-inputs
17148 `(("python2-importlib-metadata" ,python2-importlib-metadata)
17149 ,@(package-native-inputs variant))))))
17150
17151 (define-public python-csscompressor
17152 (package
17153 (name "python-csscompressor")
17154 (version "0.9.5")
17155 (source
17156 (origin
17157 (method url-fetch)
17158 (uri (pypi-uri "csscompressor" version))
17159 (sha256
17160 (base32
17161 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
17162 (build-system python-build-system)
17163 (arguments
17164 '(#:phases
17165 (modify-phases %standard-phases
17166 (replace 'check
17167 (lambda _
17168 (invoke "py.test"))))))
17169 (native-inputs
17170 `(("python-pytest" ,python-pytest)))
17171 (home-page "https://github.com/sprymix/csscompressor")
17172 (synopsis "Python port of YUI CSS Compressor")
17173 (description
17174 "This package provides a python port of YUI CSS Compressor.")
17175 (license license:bsd-3)))
17176
17177 (define-public python-rcssmin
17178 (package
17179 (name "python-rcssmin")
17180 (version "1.0.6")
17181 (source
17182 (origin
17183 (method url-fetch)
17184 (uri (pypi-uri "rcssmin" version))
17185 (sha256
17186 (base32
17187 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
17188 (build-system python-build-system)
17189 (arguments
17190 '(#:phases
17191 (modify-phases %standard-phases
17192 (replace 'check
17193 (lambda _
17194 (invoke "python" "run_tests.py" "tests"))))))
17195 (home-page "http://opensource.perlig.de/rcssmin/")
17196 (synopsis "CSS Minifier")
17197 (description "The minifier is based on the semantics of the YUI compressor,
17198 which itself is based on the rule list by Isaac Schlueter.")
17199 (license license:asl2.0)))
17200
17201 (define-public python-rjsmin
17202 (package
17203 (name "python-rjsmin")
17204 (version "1.1.0")
17205 (source
17206 (origin
17207 (method url-fetch)
17208 (uri (pypi-uri "rjsmin" version))
17209 (sha256
17210 (base32
17211 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
17212 (modules '((guix build utils)))
17213 (snippet
17214 '(begin
17215 (for-each delete-file (find-files "bench" "\\.js$"))
17216 #t))))
17217 (build-system python-build-system)
17218 (arguments
17219 '(#:tests? #f ; Not all test files included.
17220 #:phases
17221 (modify-phases %standard-phases
17222 (replace 'check
17223 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
17224 (add-installed-pythonpath inputs outputs)
17225 (if tests?
17226 (invoke "py.test" "-vv" "tests")
17227 #t))))))
17228 (native-inputs
17229 `(("python-pytest" ,python-pytest)))
17230 (home-page "http://opensource.perlig.de/rjsmin/")
17231 (synopsis "Javascript Minifier")
17232 (description "@code{rJSmin} is a javascript minifier written in Python. The
17233 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
17234 is a re-implementation aiming for speed, so it can be used at runtime (rather
17235 than during a preprocessing step).")
17236 (license license:asl2.0)))
17237
17238 (define-public python-xopen
17239 (package
17240 (name "python-xopen")
17241 (version "0.5.0")
17242 (source
17243 (origin
17244 (method url-fetch)
17245 (uri (pypi-uri "xopen" version))
17246 (sha256
17247 (base32
17248 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
17249 (build-system python-build-system)
17250 (propagated-inputs
17251 `(("python-setuptools-scm" ,python-setuptools-scm)))
17252 (home-page "https://github.com/marcelm/xopen/")
17253 (synopsis "Open compressed files transparently")
17254 (description "This module provides an @code{xopen} function that works like
17255 Python's built-in @code{open} function, but can also deal with compressed files.
17256 Supported compression formats are gzip, bzip2 and, xz, and are automatically
17257 recognized by their file extensions. The focus is on being as efficient as
17258 possible on all supported Python versions.")
17259 (license license:expat)))
17260
17261 (define-public python2-xopen
17262 (let ((base (package-with-python2
17263 (strip-python2-variant python-xopen))))
17264 (package/inherit base
17265 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
17266 ,@(package-propagated-inputs base))))))
17267
17268 (define-public python-cheetah
17269 (package
17270 (name "python-cheetah")
17271 (version "3.2.4")
17272 (source
17273 (origin
17274 (method url-fetch)
17275 (uri (pypi-uri "Cheetah3" version))
17276 (sha256
17277 (base32
17278 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
17279 (build-system python-build-system)
17280 (arguments
17281 `(#:phases (modify-phases %standard-phases
17282 (add-after 'unpack 'use-absolute-python
17283 (lambda _
17284 (substitute* "Cheetah/CheetahWrapper.py"
17285 (("#!/usr/bin/env python")
17286 (string-append "#!" (which "python"))))))
17287 (add-after 'unpack 'fix-tests
17288 (lambda _
17289 (substitute* "Cheetah/Tests/ImportHooks.py"
17290 (("os.path.dirname\\(__file__\\)")
17291 (string-append "'" (getcwd) "/Cheetah/Tests'")))))
17292 (replace 'check
17293 (lambda _
17294 (setenv "TMPDIR" "/tmp")
17295 (substitute* "Cheetah/Tests/Test.py"
17296 (("unittest.TextTestRunner\\(\\)")
17297 "unittest.TextTestRunner(verbosity=2)"))
17298
17299 (invoke "python" "Cheetah/Tests/Test.py"))))))
17300 (propagated-inputs
17301 `(("python-markdown" ,python-markdown))) ;optional
17302 (home-page "https://cheetahtemplate.org/")
17303 (synopsis "Template engine")
17304 (description "Cheetah is a text-based template engine and Python code
17305 generator.
17306
17307 Cheetah can be used as a standalone templating utility or referenced as
17308 a library from other Python applications. It has many potential uses,
17309 but web developers looking for a viable alternative to ASP, JSP, PHP and
17310 PSP are expected to be its principle user group.
17311
17312 Features:
17313 @enumerate
17314 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
17315 text-based format.
17316 @item Cleanly separates content, graphic design, and program code.
17317 @item Blends the power and flexibility of Python with a simple template language
17318 that non-programmers can understand.
17319 @item Gives template writers full access to any Python data structure, module,
17320 function, object, or method in their templates.
17321 @item Makes code reuse easy by providing an object-orientated interface to
17322 templates that is accessible from Python code or other Cheetah templates.
17323 One template can subclass another and selectively reimplement sections of it.
17324 @item Provides a simple, yet powerful, caching mechanism that can dramatically
17325 improve the performance of a dynamic website.
17326 @item Compiles templates into optimized, yet readable, Python code.
17327 @end enumerate")
17328 (license (license:x11-style "file://LICENSE"))))
17329
17330 (define-public python2-cheetah
17331 (package-with-python2 python-cheetah))
17332
17333 (define-public python-dulwich
17334 (package
17335 (name "python-dulwich")
17336 (version "0.19.16")
17337 (source
17338 (origin
17339 (method url-fetch)
17340 (uri (list (string-append "https://www.dulwich.io/releases/"
17341 "dulwich-" version ".tar.gz")
17342 (pypi-uri "dulwich" version)))
17343 (sha256
17344 (base32
17345 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
17346 (build-system python-build-system)
17347 (arguments
17348 `(#:phases
17349 (modify-phases %standard-phases
17350 (add-before 'check 'fix-tests
17351 (lambda* (#:key inputs #:allow-other-keys)
17352 ;; The tests use Popen with a custom environment which doesn't
17353 ;; include PATH.
17354 (substitute* "dulwich/tests/compat/utils.py"
17355 (("'git'") (string-append "'"
17356 (which "git")
17357 "'")))
17358 (substitute* '("dulwich/tests/test_repository.py"
17359 "dulwich/tests/test_hooks.py")
17360 (("#!/bin/sh") (string-append "#!" (which "sh"))))
17361 (setenv "TEST_RUNNER" "unittest")
17362 (setenv "PYTHONHASHSEED" "random")
17363 #t)))))
17364 (propagated-inputs
17365 `(("python-fastimport" ,python-fastimport)
17366 ("python-urllib3" ,python-urllib3)))
17367 (native-inputs
17368 `(("python-mock" ,python-mock)
17369 ("python-geventhttpclient" ,python-geventhttpclient)
17370 ("git" ,git)))
17371 (home-page "https://www.dulwich.io/")
17372 (synopsis "Git implementation in Python")
17373 (description "Dulwich is an implementation of the Git file formats and
17374 protocols written in pure Python.")
17375 ;; Can be used with either license.
17376 (license (list license:asl2.0 license:gpl2+))))
17377
17378 (define-public python-pbkdf2
17379 (package
17380 (name "python-pbkdf2")
17381 (version "1.3")
17382 (source
17383 (origin
17384 (method url-fetch)
17385 (uri (pypi-uri "pbkdf2" version))
17386 (sha256
17387 (base32
17388 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
17389 (build-system python-build-system)
17390 (arguments
17391 '(#:phases
17392 (modify-phases %standard-phases
17393 (replace 'check
17394 (lambda _
17395 (invoke "python" "test/test_pbkdf2.py"))))))
17396 (propagated-inputs
17397 `(("python-pycrypto" ,python-pycrypto))) ; optional
17398 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
17399 (synopsis "Password-based key derivation")
17400 (description "This module implements the password-based key derivation
17401 function, PBKDF2, specified in RSA PKCS#5 v2.0.
17402
17403 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
17404 is part of the RSA Public Key Cryptography Standards series. The provided
17405 implementation takes a password or a passphrase and a salt value (and
17406 optionally a iteration count, a digest module, and a MAC module) and provides
17407 a file-like object from which an arbitrarily-sized key can be read.")
17408 (license license:expat)))
17409
17410 (define-public python2-pbkdf2
17411 (package-with-python2 python-pbkdf2))
17412
17413 (define-public python-qrcode
17414 (package
17415 (name "python-qrcode")
17416 (version "6.1")
17417 (source
17418 (origin
17419 (method url-fetch)
17420 (uri (pypi-uri "qrcode" version))
17421 (sha256
17422 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
17423 (build-system python-build-system)
17424 (arguments
17425 ;; FIXME: Tests require packaging 'pymaging'.
17426 '(#:tests? #f))
17427 (propagated-inputs
17428 `(("python-lxml" ,python-lxml) ; for SVG output
17429 ("python-pillow" ,python-pillow) ; for PNG output
17430 ("python-six" ,python-six)))
17431 (home-page "https://github.com/lincolnloop/python-qrcode")
17432 (synopsis "QR Code image generator")
17433 (description "This package provides a pure Python QR Code generator
17434 module. It uses the Python Imaging Library (PIL) to allow for the generation
17435 of QR Codes.
17436
17437 In addition this package provides a command line tool to generate QR codes and
17438 either write these QR codes to a file or do the output as ascii art at the
17439 console.")
17440 (license license:bsd-3)))
17441
17442 (define-public python2-qrcode
17443 (package-with-python2 python-qrcode))
17444
17445 (define-public python-rst2ansi
17446 (package
17447 (name "python-rst2ansi")
17448 (version "0.1.5")
17449 (source
17450 (origin
17451 (method url-fetch)
17452 (uri (pypi-uri "rst2ansi" version))
17453 (sha256
17454 (base32
17455 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
17456 (build-system python-build-system)
17457 (propagated-inputs
17458 `(("python-docutils" ,python-docutils)))
17459 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
17460 (synopsis "Convert RST to ANSI-decorated console output")
17461 (description
17462 "Python module dedicated to rendering RST (reStructuredText) documents
17463 to ansi-escaped strings suitable for display in a terminal.")
17464 (license license:expat)))
17465
17466 (define-public python-ansi2html
17467 (package
17468 (name "python-ansi2html")
17469 (version "1.2.0")
17470 (source
17471 (origin
17472 (method url-fetch)
17473 (uri (pypi-uri "ansi2html" version))
17474 (sha256
17475 (base32
17476 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
17477 (build-system python-build-system)
17478 (native-inputs
17479 `(("python-mock" ,python-mock)
17480 ("python-nose" ,python-nose)))
17481 (propagated-inputs
17482 `(("python-six" ,python-six)))
17483 (home-page "https://github.com/ralphbean/ansi2html")
17484 (synopsis "Convert ANSI-decorated console output to HTML")
17485 (description
17486 "@command{ansi2html} is a Python library and command line utility for
17487 converting text with ANSI color codes to HTML or LaTeX.")
17488 (license license:gpl3+)))
17489
17490 (define-public python2-ansi2html
17491 (package-with-python2 python-ansi2html))
17492
17493 (define-public python-easy-ansi
17494 (package
17495 (name "python-easy-ansi")
17496 (version "0.3")
17497 (source
17498 (origin
17499 (method git-fetch)
17500 (uri (git-reference
17501 (url "https://gitlab.com/joeysbytes/easy-ansi")
17502 (commit (string-append "v" version))))
17503 (file-name (git-file-name name version))
17504 (sha256
17505 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
17506 (build-system python-build-system)
17507 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
17508 (synopsis "Terminal framework API")
17509 (description
17510 "Easy ANSI is a terminal framework API to give you an easy way to use
17511 colors, cursor control movements, and line/box drawing. It is not meant as a
17512 replacement to more full-featured frameworks (such as curses or urwid), but as
17513 a tool to quickly create nice-looking screens in your terminal window. You
17514 can even create animations with the cursor controls.")
17515 (license license:expat)))
17516
17517 (define-public python-ddt
17518 (package
17519 (name "python-ddt")
17520 (version "1.4.2")
17521 (source
17522 (origin
17523 (method url-fetch)
17524 (uri (pypi-uri "ddt" version))
17525 (sha256
17526 (base32
17527 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
17528 (build-system python-build-system)
17529 (native-inputs
17530 `(("python-pytest" ,python-pytest)))
17531 (propagated-inputs
17532 `(("python-pyyaml" ,python-pyyaml)))
17533 (home-page "https://github.com/datadriventests/ddt")
17534 (synopsis "Data-Driven Tests")
17535 (description
17536 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
17537 running it with different test data, and make it appear as multiple test
17538 cases.")
17539 (license license:expat)))
17540
17541 (define-public python-pycountry
17542 (package
17543 (name "python-pycountry")
17544 (version "18.5.26")
17545 (source
17546 (origin
17547 (method url-fetch)
17548 (uri (pypi-uri "pycountry" version))
17549 (sha256
17550 (base32
17551 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
17552 (build-system python-build-system)
17553 (home-page "https://bitbucket.org/flyingcircus/pycountry")
17554 (synopsis "ISO databases for languages, countries, currencies, etc.")
17555 (description
17556 "@code{pycountry} provides the ISO databases for the standards:
17557 @enumerate
17558 @item 639-3 (Languages)
17559 @item 3166 (Countries)
17560 @item 3166-3 (Deleted Countries)
17561 @item 3166-2 (Subdivisions of countries)
17562 @item 4217 (Currencies)
17563 @item 15924 (Scripts)
17564 @end enumerate
17565 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
17566 through a Python API.")
17567 (license license:lgpl2.1+)))
17568
17569 (define-public python2-pycountry
17570 (package-with-python2 python-pycountry))
17571
17572 (define-public python-pycosat
17573 (package
17574 (name "python-pycosat")
17575 (version "0.6.3")
17576 (source
17577 (origin
17578 (method url-fetch)
17579 (uri (pypi-uri "pycosat" version ".zip"))
17580 (sha256
17581 (base32
17582 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
17583 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
17584 (build-system python-build-system)
17585 (native-inputs
17586 `(("unzip" ,unzip)))
17587 (home-page "https://github.com/ContinuumIO/pycosat")
17588 (synopsis "Bindings to picosat (a SAT solver)")
17589 (description
17590 "This package provides efficient Python bindings to @code{picosat} on
17591 the C level. When importing pycosat, the @code{picosat} solver becomes part
17592 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
17593 Problem} (SAT) solver.")
17594 (license license:expat)))
17595
17596 (define-public python2-pycosat
17597 (package-with-python2 python-pycosat))
17598
17599 (define-public python2-ruamel.ordereddict
17600 (package
17601 (name "python2-ruamel.ordereddict")
17602 (version "0.4.9")
17603 (source
17604 (origin
17605 (method url-fetch)
17606 (uri (pypi-uri "ruamel.ordereddict" version))
17607 (sha256
17608 (base32
17609 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
17610 (build-system python-build-system)
17611 (arguments
17612 `(#:python ,python-2
17613 #:phases
17614 (modify-phases %standard-phases
17615 (delete 'check)
17616 (add-after 'install 'check
17617 (lambda* (#:key inputs outputs #:allow-other-keys)
17618 (add-installed-pythonpath inputs outputs)
17619 (invoke "python" "test/testordereddict.py"))))))
17620 (home-page "https://bitbucket.org/ruamel/ordereddict")
17621 (synopsis "Version of dict that keeps keys in insertion order")
17622 (description
17623 "This is an implementation of an ordered dictionary with @dfn{Key
17624 Insertion Order} (KIO: updates of values do not affect the position of the
17625 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
17626 removed and put at the back). The standard library module @code{OrderedDict},
17627 implemented later, implements a subset of @code{ordereddict} functionality.
17628 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
17629 Order} (KSO, no sorting function can be specified, but a transform can be
17630 specified to apply on the key before comparison (e.g. @code{string.lower})).")
17631 (license license:expat)))
17632
17633 (define-public python-pypeg2
17634 (package
17635 (name "python-pypeg2")
17636 (version "2.15.2")
17637 (source
17638 (origin
17639 (method url-fetch)
17640 (uri (pypi-uri "pyPEG2" version))
17641 (sha256
17642 (base32
17643 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
17644 (build-system python-build-system)
17645 (propagated-inputs `(("python-lxml" ,python-lxml)))
17646 (arguments
17647 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
17648 '(#:tests? #f))
17649 (home-page "https://fdik.org/pyPEG/")
17650 (synopsis "Parsing Expression Grammars in Python")
17651 (description "PyPEG is an intrinsic parser interpreter framework for
17652 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
17653 parse many formal languages.")
17654 (license license:gpl2)))
17655
17656 (define-public python-incremental
17657 (package
17658 (name "python-incremental")
17659 (version "17.5.0")
17660 (source
17661 (origin
17662 (method url-fetch)
17663 (uri (pypi-uri "incremental" version))
17664 (sha256
17665 (base32
17666 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
17667 (build-system python-build-system)
17668 (home-page "https://github.com/hawkowl/incremental")
17669 (synopsis "Library for versioning Python projects")
17670 (description "Incremental is a small library that versions your Python
17671 projects.")
17672 (license license:expat)))
17673
17674 (define-public python2-incremental
17675 (package-with-python2 python-incremental))
17676
17677 (define-public python-invoke
17678 (package
17679 (name "python-invoke")
17680 (home-page "https://www.pyinvoke.org/")
17681 (version "1.5.0")
17682 (source (origin
17683 (method url-fetch)
17684 (uri (pypi-uri "invoke" version))
17685 (sha256
17686 (base32
17687 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
17688 (build-system python-build-system)
17689 (arguments
17690 ;; XXX: Requires many dependencies that are not yet in Guix.
17691 `(#:tests? #f
17692 #:phases
17693 (modify-phases %standard-phases
17694 (add-after 'unpack 'fix-bash-path
17695 (lambda* (#:key inputs #:allow-other-keys)
17696 (let ((bash (assoc-ref inputs "bash")))
17697 (substitute* "invoke/config.py"
17698 (("shell = \"/bin/bash\"")
17699 (string-append "shell = \"" bash "/bin/bash\""))
17700 )
17701 #t))))))
17702 (inputs
17703 `(("bash" ,bash-minimal)))
17704 (synopsis "Pythonic task execution")
17705 (description
17706 "Invoke is a Python task execution tool and library, drawing inspiration
17707 from various sources to arrive at a powerful and clean feature set. It is
17708 evolved from the Fabric project, but focuses on local and abstract concerns
17709 instead of servers and network commands.")
17710 (license license:bsd-3)))
17711
17712 (define-public python2-invoke
17713 (package-with-python2 python-invoke))
17714
17715 (define-public python-automat
17716 (package
17717 (name "python-automat")
17718 (version "20.2.0")
17719 (source (origin
17720 (method url-fetch)
17721 (uri (pypi-uri "Automat" version))
17722 (sha256
17723 (base32
17724 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
17725 (build-system python-build-system)
17726 ;; We disable the tests because they require python-twisted, while
17727 ;; python-twisted depends on python-automat. Twisted is optional, but the
17728 ;; tests fail if it is not available. Also see
17729 ;; <https://github.com/glyph/automat/issues/71>.
17730 (arguments
17731 `(#:tests? #f
17732 #:phases
17733 (modify-phases %standard-phases
17734 ;; Remove script, because it depends on python-twisted.
17735 (add-after 'unpack 'remove-entrypoint
17736 (lambda _
17737 (substitute* "setup.py"
17738 (("\"automat-visualize = automat._visualize:tool\"") "")))))))
17739 (native-inputs
17740 `(("python-m2r" ,python-m2r)
17741 ("python-setuptools-scm" ,python-setuptools-scm)
17742 ("python-graphviz" ,python-graphviz)))
17743 (propagated-inputs
17744 `(("python-six" ,python-six)
17745 ("python-attrs" ,python-attrs)))
17746 (home-page "https://github.com/glyph/Automat")
17747 (synopsis "Self-service finite-state machines")
17748 (description "Automat is a library for concise, idiomatic Python
17749 expression of finite-state automata (particularly deterministic finite-state
17750 transducers).")
17751 (license license:expat)))
17752
17753 (define-public python2-automat
17754 (package-with-python2 python-automat))
17755
17756 (define-public python-m2r
17757 (package
17758 (name "python-m2r")
17759 (version "0.2.1")
17760 (source (origin
17761 (method url-fetch)
17762 (uri (pypi-uri "m2r" version))
17763 (sha256
17764 (base32
17765 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
17766 (build-system python-build-system)
17767 (propagated-inputs
17768 `(("python-docutils" ,python-docutils)
17769 ("python-mistune" ,python-mistune)))
17770 (native-inputs
17771 `(("python-pygments" ,python-pygments)
17772 ("python-mock" ,python-mock)))
17773 (home-page "https://github.com/miyakogi/m2r")
17774 (synopsis "Markdown to reStructuredText converter")
17775 (description "M2R converts a markdown file including reST markups to valid
17776 reST format.")
17777 (license license:expat)))
17778
17779 (define-public python2-m2r
17780 (package-with-python2 python-m2r))
17781
17782 (define-public python-constantly
17783 (package
17784 (name "python-constantly")
17785 (version "15.1.0")
17786 (source (origin
17787 (method url-fetch)
17788 (uri (pypi-uri "constantly" version))
17789 (sha256
17790 (base32
17791 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
17792 (build-system python-build-system)
17793 (home-page "https://github.com/twisted/constantly")
17794 (synopsis "Symbolic constants in Python")
17795 (description "Constantly is a Python library that provides symbolic
17796 constant support. It includes collections and constants with text, numeric,
17797 and bit flag values.")
17798 (license license:expat)))
17799
17800 (define-public python2-constantly
17801 (package-with-python2 python-constantly))
17802
17803 (define-public python-attrs
17804 (package
17805 (name "python-attrs")
17806 (version "21.2.0")
17807 (source (origin
17808 (method url-fetch)
17809 (uri (pypi-uri "attrs" version))
17810 (sha256
17811 (base32
17812 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
17813 (build-system python-build-system)
17814 (arguments
17815 `(#:phases (modify-phases %standard-phases
17816 (replace 'check
17817 (lambda* (#:key tests? #:allow-other-keys)
17818 (when tests?
17819 (invoke "pytest")))))))
17820 (native-inputs
17821 `(("python-coverage" ,python-coverage)
17822 ("python-hypothesis" ,python-hypothesis)
17823 ("python-pympler" ,python-pympler)
17824 ("python-pytest" ,python-pytest)
17825 ("python-six" ,python-six)))
17826 (home-page "https://github.com/python-attrs/attrs/")
17827 (synopsis "Attributes without boilerplate")
17828 (description "@code{attrs} is a Python package with class decorators that
17829 ease the chores of implementing the most common attribute-related object
17830 protocols.")
17831 (license license:expat)))
17832
17833 (define-public python2-attrs
17834 (package-with-python2 python-attrs))
17835
17836 (define-public python-attrs-bootstrap
17837 (package
17838 (inherit python-attrs)
17839 (name "python-attrs-bootstrap")
17840 (native-inputs `())
17841 (arguments `(#:tests? #f))))
17842
17843 (define-public python2-attrs-bootstrap
17844 (package-with-python2 python-attrs-bootstrap))
17845
17846 (define-public python-cliapp
17847 (package
17848 (name "python-cliapp")
17849 (version "1.20180812.1")
17850 (source
17851 (origin
17852 (method url-fetch)
17853 (uri (string-append
17854 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17855 version ".tar.gz"))
17856 (sha256
17857 (base32
17858 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17859 (build-system python-build-system)
17860 (arguments
17861 `(;; XXX: The tests only do style and coverage checks, which
17862 ;; fails due to deprecation warnings, etc.
17863 #:tests? #f))
17864 (native-inputs
17865 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17866 ("python-pep8" ,python-pep8)))
17867 (propagated-inputs
17868 `(("python-pyaml" ,python-pyaml)))
17869 (home-page "https://liw.fi/cliapp/")
17870 (synopsis "Python framework for command line programs")
17871 (description "@code{cliapp} is a Python framework for command line
17872 programs. It contains the typical stuff such programs need to do, such
17873 as parsing the command line for options, and iterating over input files.")
17874 (license license:gpl2+)))
17875
17876 (define-public python2-cliapp
17877 (package-with-python2 python-cliapp))
17878
17879 (define-public python-ttystatus
17880 (package
17881 (name "python-ttystatus")
17882 (version "0.38")
17883 (source
17884 (origin
17885 (method git-fetch)
17886 (uri (git-reference
17887 (url "http://git.liw.fi/ttystatus")
17888 ;; There are no tags after ttystatus-0.36.
17889 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17890 (sha256
17891 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17892 (file-name (git-file-name name version))))
17893 (build-system python-build-system)
17894 (native-inputs
17895 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17896 ("python-pep8" ,python-pep8)))
17897 (arguments
17898 `(#:phases
17899 (modify-phases %standard-phases
17900 ;; check phase needs to be run before the build phase. If not,
17901 ;; coverage-test-runner looks for tests for the built source files,
17902 ;; and fails.
17903 (delete 'check)
17904 (add-before 'build 'check
17905 (lambda _ (invoke "make" "check"))))))
17906 (home-page "https://liw.fi/ttystatus/")
17907 (synopsis "Python library for showing progress reporting and
17908 status updates on terminals")
17909 (description "@code{ttystatus} is a Python library for showing progress
17910 reporting and status updates on terminals, for command line programs.
17911 Output is automatically adapted to the width of the terminal: truncated
17912 if it does not fit, and resized if the terminal size changes.")
17913 (license license:gpl3+)))
17914
17915 (define-public python2-ttystatus
17916 (package-with-python2 python-ttystatus))
17917
17918 (define-public python2-tracing
17919 (package
17920 (name "python2-tracing")
17921 (version "0.10")
17922 (source
17923 (origin
17924 (method url-fetch)
17925 (uri (string-append
17926 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17927 version ".tar.gz"))
17928 (sha256
17929 (base32
17930 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17931 (build-system python-build-system)
17932 (arguments
17933 `(#:python ,python-2))
17934 (home-page "https://liw.fi/tracing/")
17935 (synopsis "Python debug logging helper")
17936 (description "@code{python2-tracing} is a python library for
17937 logging debug messages. It provides a way to turn debugging messages
17938 on and off, based on the filename they occur in. It is much faster
17939 than using @code{logging.Filter} to accomplish the same thing, which
17940 matters when code is run in production mode. The actual logging still
17941 happens using the @code{logging} library.")
17942 (license license:gpl3+)))
17943
17944 (define-public python-astroid
17945 (package
17946 (name "python-astroid")
17947 (version "2.6.6")
17948 (source
17949 (origin
17950 (method git-fetch)
17951 (uri (git-reference
17952 (url "https://github.com/PyCQA/astroid")
17953 (commit (string-append "v" version))))
17954 (file-name (git-file-name name version))
17955 (sha256
17956 (base32 "1amzf996inwmh4r3mlpzmch60xs6lrg86vppfnwl1y0l8r0y7zxh"))))
17957 (build-system python-build-system)
17958 (propagated-inputs
17959 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17960 ("python-wrapt" ,python-wrapt)))
17961 (native-inputs
17962 `(("python-pytest" ,python-pytest)
17963 ("python-pytest-runner" ,python-pytest-runner)))
17964 (home-page "https://github.com/PyCQA/astroid")
17965 (synopsis "Common base representation of python source code for pylint and
17966 other projects")
17967 (description "@code{python-astroid} provides a common base representation
17968 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17969
17970 It provides a compatible representation which comes from the _ast module. It
17971 rebuilds the tree generated by the builtin _ast module by recursively walking
17972 down the AST and building an extended ast. The new node classes have
17973 additional methods and attributes for different usages. They include some
17974 support for static inference and local name scopes. Furthermore, astroid
17975 builds partial trees by inspecting living objects.")
17976 (license license:lgpl2.1+)
17977 (properties `((python2-variant . ,(delay python2-astroid))))))
17978
17979 (define-public python2-astroid
17980 (let ((base (package-with-python2
17981 (strip-python2-variant python-astroid))))
17982 (package (inherit base)
17983 ;; Version 2.x removes python2 support.
17984 (version "1.6.5")
17985 (source
17986 (origin
17987 (method url-fetch)
17988 (uri (pypi-uri "astroid" version))
17989 (sha256
17990 (base32
17991 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17992 (arguments
17993 (substitute-keyword-arguments (package-arguments base)
17994 ((#:phases phases)
17995 `(modify-phases ,phases
17996 (add-after 'unpack 'remove-spurious-test
17997 (lambda _
17998 ;; https://github.com/PyCQA/astroid/issues/276
17999 (delete-file "astroid/tests/unittest_brain.py")
18000 #t))
18001 (replace 'check
18002 (lambda _
18003 (invoke"python" "-m" "unittest" "discover"
18004 "-p" "unittest*.py")))))))
18005 (native-inputs `())
18006 (propagated-inputs
18007 `(("python2-backports-functools-lru-cache"
18008 ,python2-backports-functools-lru-cache)
18009 ("python2-enum34" ,python2-enum34)
18010 ("python2-singledispatch" ,python2-singledispatch)
18011 ,@(alist-delete "python-typed-ast"
18012 (package-propagated-inputs base)))))))
18013
18014 (define-public python-isbnlib
18015 (package
18016 (name "python-isbnlib")
18017 (version "3.10.4")
18018 (source
18019 (origin
18020 (method url-fetch)
18021 (uri (pypi-uri "isbnlib" version))
18022 (sha256
18023 (base32
18024 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
18025 (build-system python-build-system)
18026 (arguments '(#:tests? #f)) ; No test
18027 (home-page "https://github.com/xlcnd/isbnlib")
18028 (synopsis "Python library to work with ISBN strings")
18029 (description "@code{python-isbnlib} is a (pure) python library that provides
18030 several useful methods and functions to validate, clean, transform, hyphenate and
18031 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
18032 version, is suitable to be include as a dependency in other projects.")
18033 (license license:lgpl3+)))
18034
18035 (define-public python-isort
18036 (package
18037 (name "python-isort")
18038 (version "5.7.0")
18039 (source
18040 (origin
18041 (method git-fetch)
18042 (uri (git-reference
18043 ;; Tests pass only from the Github sources
18044 (url "https://github.com/timothycrosley/isort")
18045 (commit version)))
18046 (file-name (git-file-name name version))
18047 (modules '((guix build utils)))
18048 (snippet '(for-each delete-file (find-files "." "\\.whl$")))
18049 (sha256
18050 (base32
18051 "0phq4s911mjjdyr5h5siz93jnpkqb2qgphgcfk6axncgxr8i7vi1"))))
18052 (build-system python-build-system)
18053 (arguments
18054 `(#:phases
18055 (modify-phases %standard-phases
18056 ;; A foretaste of what our future python-build-system will need to
18057 ;; do.
18058 (replace 'build
18059 (lambda _
18060 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
18061 (replace 'install
18062 (lambda* (#:key outputs #:allow-other-keys)
18063 (let ((out (assoc-ref outputs "out"))
18064 (whl (car (find-files "dist" "\\.whl$"))))
18065 (invoke "pip" "--no-cache-dir" "--no-input"
18066 "install" "--no-deps" "--prefix" out whl))))
18067 (add-after 'install 'install-example-plugins
18068 (lambda* (#:key outputs #:allow-other-keys)
18069 (let ((out (assoc-ref outputs "out")))
18070 ;; Patch to use the core poetry API.
18071 (substitute* '("example_isort_formatting_plugin/pyproject.toml"
18072 "example_shared_isort_profile/pyproject.toml")
18073 (("poetry>=0.12")
18074 "poetry-core>=1.0.0")
18075 (("poetry.masonry.api")
18076 "poetry.core.masonry.api"))
18077 ;; Build the example plugins.
18078 (for-each (lambda (source-directory)
18079 (invoke "python" "-m" "build" "--wheel"
18080 "--no-isolation" "--outdir=dist"
18081 source-directory))
18082 '("example_isort_formatting_plugin"
18083 "example_shared_isort_profile"))
18084 ;; Install them to temporary storage, for the test.
18085 (setenv "HOME" (getcwd))
18086 (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
18087 (apply invoke "pip" "--no-cache-dir" "--no-input"
18088 "install" "--user" "--no-deps" example-whls)))))
18089 (replace 'check
18090 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18091 (when tests?
18092 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
18093 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
18094 (add-installed-pythonpath inputs outputs)
18095 (invoke "pytest" "-vv" "tests/unit/"
18096 "--ignore=tests/unit/test_deprecated_finders.py")))))))
18097 (native-inputs
18098 `(("git" ,git-minimal)
18099 ("python-black" ,python-black)
18100 ("python-colorama" ,python-colorama)
18101 ("python-hypothesmith" ,python-hypothesmith)
18102 ("python-libcst" ,python-libcst-minimal)
18103 ("python-poetry-core" ,python-poetry-core)
18104 ("python-pylama" ,python-pylama)
18105 ("python-pypa-build" ,python-pypa-build)
18106 ("python-pytest-mock" ,python-pytest-mock)
18107 ("python-pytest" ,python-pytest)))
18108 (home-page "https://github.com/PyCQA/isort")
18109 (synopsis "Python utility/library to sort python imports")
18110 (description "@code{python-isort} is a python utility/library to sort
18111 imports alphabetically, and automatically separated into sections. It
18112 provides a command line utility, a python library and plugins for various
18113 editors.")
18114 (license license:expat)
18115 (properties `((python2-variant . ,(delay python2-isort))))))
18116
18117 (define-public python2-isort
18118 (let ((base (package-with-python2
18119 (strip-python2-variant python-isort))))
18120 (package/inherit base
18121 (native-inputs
18122 `(("python2-futures" ,python2-futures)
18123 ,@(package-native-inputs base))))))
18124
18125 (define-public python2-backports-functools-lru-cache
18126 (package
18127 (name "python2-backports-functools-lru-cache")
18128 (version "1.6.1")
18129 (source
18130 (origin
18131 (method url-fetch)
18132 ;; only the pypi tarballs contain the necessary metadata
18133 (uri (pypi-uri "backports.functools_lru_cache" version))
18134 (sha256
18135 (base32
18136 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
18137 (build-system python-build-system)
18138 (native-inputs
18139 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
18140 (arguments
18141 `(#:python ,python-2))
18142 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
18143 (synopsis "Backport of functools.lru_cache from Python 3.3")
18144 (description "@code{python2-backports-functools-lru-cache} is a backport
18145 of @code{functools.lru_cache} from python 3.3.")
18146 (license license:expat)))
18147
18148 (define-public python-configparser
18149 (package
18150 (name "python-configparser")
18151 (version "4.0.2")
18152 (source
18153 (origin
18154 (method url-fetch)
18155 (uri (pypi-uri "configparser" version))
18156 (sha256
18157 (base32
18158 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
18159 (native-inputs
18160 `(("python-setuptools_scm" ,python-setuptools-scm)))
18161 (build-system python-build-system)
18162 (home-page "https://github.com/jaraco/configparser/")
18163 (synopsis "Backport of configparser from python 3.5")
18164 (description "@code{python-configparser} is a backport of
18165 @code{configparser} from Python 3.5 so that it can be used directly
18166 in other versions.")
18167 (license license:expat)))
18168
18169 (define-public python2-configparser
18170 (package-with-python2 python-configparser))
18171
18172 (define-public python-iniconfig
18173 (package
18174 (name "python-iniconfig")
18175 (version "1.1.1")
18176 (source
18177 (origin
18178 (method url-fetch)
18179 (uri (pypi-uri "iniconfig" version))
18180 (sha256
18181 (base32
18182 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
18183 (build-system python-build-system)
18184 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
18185 (synopsis "Simple INI-file parser")
18186 (description "The @code{iniconfig} package provides a small and simple
18187 INI-file parser module having a unique set of features; @code{iniconfig}
18188 @itemize
18189 @item maintains the order of sections and entries;
18190 @item supports multi-line values with or without line-continuations;
18191 @item supports \"#\" comments everywhere;
18192 @item raises errors with proper line-numbers;
18193 @item raises an error when two sections have the same name.
18194 @end itemize")
18195 (license license:expat)))
18196
18197 (define-public python-mamba
18198 (package
18199 (name "python-mamba")
18200 (version "0.11.2")
18201 (source (origin
18202 (method url-fetch)
18203 (uri (pypi-uri "mamba" version))
18204 (sha256
18205 (base32
18206 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
18207 (build-system python-build-system)
18208 (arguments `(#:tests? #f)) ; No test
18209 (propagated-inputs
18210 `(("python-clint" ,python-clint)
18211 ("python-coverage" ,python-coverage)))
18212 (home-page "https://nestorsalceda.com/mamba/")
18213 (synopsis "Test runner for Python")
18214 (description
18215 "Mamba is a Behaviour-Driven Development tool for Python developers.
18216 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
18217 (license license:expat)))
18218
18219 (define-public python-mando
18220 (package
18221 (name "python-mando")
18222 (version "0.6.4")
18223 (source (origin
18224 (method url-fetch)
18225 (uri (pypi-uri "mando" version))
18226 (sha256
18227 (base32
18228 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
18229 (build-system python-build-system)
18230 (propagated-inputs
18231 `(("python-rst2ansi" ,python-rst2ansi)
18232 ("python-six" ,python-six)))
18233 (native-inputs
18234 `(("python-pytest" ,python-pytest)))
18235 (home-page "https://mando.readthedocs.org/")
18236 (synopsis
18237 "Wrapper around argparse, allowing creation of complete CLI applications")
18238 (description
18239 "This package is a wrapper around argparse, allowing you to write complete CLI
18240 applications in seconds while maintaining all the flexibility.")
18241 (license license:expat)))
18242
18243 (define-public python2-mando
18244 (package-with-python2 python-mando))
18245
18246 (define-public python2-argparse
18247 (package
18248 (name "python2-argparse")
18249 (version "1.4.0")
18250 (source
18251 (origin
18252 (method url-fetch)
18253 (uri (pypi-uri "argparse" version))
18254 (sha256
18255 (base32
18256 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
18257 (build-system python-build-system)
18258 (arguments
18259 `(#:python ,python-2))
18260 (home-page "https://github.com/ThomasWaldmann/argparse/")
18261 (synopsis "Python command-line parsing library")
18262 (description
18263 "This package is mostly for people who want to have @code{argparse} on
18264 older Pythons because it was not part of the standard library back then.")
18265 (license license:psfl)))
18266
18267 (define-public python-mwclient
18268 (package
18269 (name "python-mwclient")
18270 (version "0.10.1")
18271 (source
18272 (origin
18273 (method git-fetch)
18274 ;; The PyPI version wouldn't contain tests.
18275 (uri (git-reference
18276 (url "https://github.com/mwclient/mwclient")
18277 (commit (string-append "v" version))))
18278 (file-name (git-file-name name version))
18279 (sha256
18280 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
18281 (build-system python-build-system)
18282 (propagated-inputs
18283 `(("python-requests-oauthlib" ,python-requests-oauthlib)
18284 ("python-six" ,python-six)))
18285 (native-inputs
18286 `(("python-mock" ,python-mock)
18287 ("python-pytest" ,python-pytest)
18288 ("python-pytest-cov" ,python-pytest-cov)
18289 ("python-pytest-runner" ,python-pytest-runner)
18290 ("python-responses" ,python-responses)))
18291 (home-page "https://github.com/btongminh/mwclient")
18292 (synopsis "MediaWiki API client")
18293 (description "This package provides a MediaWiki API client.")
18294 (license license:expat)))
18295
18296 (define-public python-utils
18297 (package
18298 (name "python-utils")
18299 (version "2.4.0")
18300 (source (origin
18301 (method url-fetch)
18302 (uri (pypi-uri "python-utils" version))
18303 (sha256
18304 (base32
18305 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
18306 (build-system python-build-system)
18307 (arguments
18308 `(#:phases
18309 (modify-phases %standard-phases
18310 (replace 'check
18311 (lambda* (#:key inputs outputs #:allow-other-keys)
18312 (add-installed-pythonpath inputs outputs)
18313 (delete-file "pytest.ini")
18314 (invoke "pytest" "-vv"))))))
18315 (native-inputs
18316 `(("pytest-runner" ,python-pytest-runner)
18317 ("pytest" ,python-pytest)
18318 ("six" ,python-six)))
18319 (home-page "https://github.com/WoLpH/python-utils")
18320 (synopsis "Convenient utilities not included with the standard Python install")
18321 (description
18322 "Python Utils is a collection of small Python functions and classes which
18323 make common patterns shorter and easier.")
18324 (license license:bsd-2)))
18325
18326 (define-public python-diff-match-patch
18327 (package
18328 (name "python-diff-match-patch")
18329 (version "20121119")
18330 (source
18331 (origin
18332 (method url-fetch)
18333 (uri (pypi-uri "diff-match-patch" version))
18334 (sha256
18335 (base32
18336 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
18337 (build-system python-build-system)
18338 (home-page "https://code.google.com/p/google-diff-match-patch")
18339 (synopsis "Synchronize plain text")
18340 (description "Diff Match and Patch libraries offer robust algorithms to
18341 perform the operations required for synchronizing plain text.")
18342 (license license:asl2.0)))
18343
18344 (define-public python2-diff-match-patch
18345 (package-with-python2 python-diff-match-patch))
18346
18347 (define-public python-dirsync
18348 (package
18349 (name "python-dirsync")
18350 (version "2.2.5")
18351 (source
18352 (origin
18353 (method url-fetch)
18354 (uri (pypi-uri "dirsync" version))
18355 (sha256
18356 (base32
18357 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
18358 (build-system python-build-system)
18359 (propagated-inputs
18360 `(("six" ,python-six)))
18361 (home-page "https://github.com/tkhyn/dirsync")
18362 (synopsis "Advanced directory tree synchronisation tool")
18363 (description "Advanced directory tree synchronisation tool.")
18364 (license license:expat)))
18365
18366 (define-public python2-dirsync
18367 (package-with-python2 python-dirsync))
18368
18369 (define-public python-levenshtein
18370 (package
18371 (name "python-levenshtein")
18372 (version "0.12.0")
18373 (source
18374 (origin
18375 (method url-fetch)
18376 (uri (pypi-uri "python-Levenshtein" version))
18377 (sha256
18378 (base32
18379 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
18380 (build-system python-build-system)
18381 (home-page "https://github.com/ztane/python-Levenshtein")
18382 (synopsis "Fast computation of Levenshtein distance and string similarity")
18383 (description
18384 "The Levenshtein Python C extension module contains functions for fast computation of
18385 @enumerate
18386 @item Levenshtein (edit) distance, and edit operations
18387 @item string similarity
18388 @item approximate median strings, and generally string averaging
18389 @item string sequence and set similarity
18390 @end enumerate
18391 It supports both normal and Unicode strings.")
18392 (license license:gpl2+)))
18393
18394 (define-public python2-levenshtein
18395 (package-with-python2 python-levenshtein))
18396
18397 (define-public python-scandir
18398 (package
18399 (name "python-scandir")
18400 (version "1.10.0")
18401 (source
18402 (origin
18403 (method url-fetch)
18404 (uri (pypi-uri "scandir" version))
18405 (sha256
18406 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
18407 (build-system python-build-system)
18408 (arguments
18409 `(#:phases (modify-phases %standard-phases
18410 (replace 'check
18411 (lambda _
18412 (invoke "python" "test/run_tests.py"))))))
18413 (home-page "https://github.com/benhoyt/scandir")
18414 (synopsis "Directory iteration function")
18415 (description
18416 "Directory iteration function like os.listdir(), except that instead of
18417 returning a list of bare filenames, it yields DirEntry objects that include
18418 file type and stat information along with the name. Using scandir() increases
18419 the speed of os.walk() by 2-20 times (depending on the platform and file
18420 system) by avoiding unnecessary calls to os.stat() in most cases.
18421
18422 This package is part of the Python standard library since version 3.5.")
18423 (license license:bsd-3)))
18424
18425 (define-public python2-scandir
18426 (package-with-python2 python-scandir))
18427
18428 (define-public python2-stemming
18429 (package
18430 (name "python2-stemming")
18431 (version "1.0.1")
18432 (source
18433 (origin
18434 (method url-fetch)
18435 (uri (pypi-uri "stemming" version))
18436 (sha256
18437 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
18438 (build-system python-build-system)
18439 (arguments
18440 `(#:python ,python-2))
18441 (home-page "https://bitbucket.org/mchaput/stemming/overview")
18442 (synopsis "Python implementations of various stemming algorithms")
18443 (description
18444 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
18445 stemming algorithms for English. These implementations are straightforward and
18446 efficient, unlike some Python versions of the same algorithms available on the
18447 Web. This package is an extraction of the stemming code included in the Whoosh
18448 search engine.")
18449 (license license:public-domain)))
18450
18451 (define-public python-factory-boy
18452 (package
18453 (name "python-factory-boy")
18454 (version "2.8.1")
18455 (source
18456 (origin
18457 (method url-fetch)
18458 (uri (pypi-uri "factory_boy" version))
18459 (sha256
18460 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
18461 (build-system python-build-system)
18462 (arguments
18463 ;; Tests are not included in the tarball.
18464 `(#:tests? #f))
18465 (propagated-inputs
18466 `(("faker" ,python-faker)))
18467 (home-page "https://github.com/benhoyt/scandir")
18468 (synopsis "Versatile test fixtures replacement")
18469 (description
18470 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
18471
18472 As a fixtures replacement tool, it aims to replace static, hard to maintain
18473 fixtures with easy-to-use factories for complex object.
18474
18475 Instead of building an exhaustive test setup with every possible combination
18476 of corner cases, factory_boy allows you to use objects customized for the
18477 current test, while only declaring the test-specific fields")
18478 (license license:expat)))
18479
18480 (define-public python-translate-toolkit
18481 (package
18482 (name "python-translate-toolkit")
18483 (version "2.1.0")
18484 (source
18485 (origin
18486 (method url-fetch)
18487 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
18488 (sha256
18489 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
18490 (build-system python-build-system)
18491 (native-inputs
18492 `(("python-pytest" ,python-pytest)
18493 ("python-sphinx" ,python-sphinx)))
18494 (propagated-inputs
18495 `(("python-babel" ,python-babel)
18496 ("python-beautifulsoup4" ,python-beautifulsoup4)
18497 ("python-chardet" ,python-chardet)
18498 ("python-diff-match-patch" ,python-diff-match-patch)
18499 ("python-levenshtein" ,python-levenshtein)
18500 ("python-lxml" ,python-lxml)
18501 ("python-six" ,python-six)
18502 ("python-vobject" ,python-vobject)
18503 ("python-pyyaml" ,python-pyyaml)))
18504 (arguments
18505 ;; TODO: tests are not run, because they end with
18506 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
18507 ;; 'parse_funcs'
18508 ;; during test setup.
18509 `(#:tests? #f))
18510 (home-page "https://toolkit.translatehouse.org")
18511 (synopsis "Tools and API for translation and localization engineering")
18512 (description
18513 "Tools and API for translation and localization engineering. It contains
18514 several utilities, as well as an API for building localization tools.")
18515 (license license:gpl2+)))
18516
18517 (define-public python2-translate-toolkit
18518 (package-with-python2 python-translate-toolkit))
18519
18520 (define-public python-packaging
18521 (package
18522 (name "python-packaging")
18523 (version "20.0")
18524 (source
18525 (origin
18526 (method url-fetch)
18527 (uri (pypi-uri "packaging" version))
18528 ;; XXX: The URL in the patch file is wrong, it should be
18529 ;; <https://github.com/pypa/packaging/pull/256>.
18530 (patches (search-patches "python-packaging-test-arch.patch"))
18531 (sha256
18532 (base32
18533 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
18534 (build-system python-build-system)
18535 (arguments
18536 `(#:phases (modify-phases %standard-phases
18537 (replace 'check
18538 (lambda* (#:key tests? #:allow-other-keys)
18539 (if tests?
18540 (invoke "py.test" "-vv")
18541 (format #t "test suite not run~%"))
18542 #t)))))
18543 (native-inputs
18544 `(("python-pretend" ,python-pretend)
18545 ("python-pytest" ,python-pytest)))
18546 (propagated-inputs
18547 `(("python-pyparsing" ,python-pyparsing)
18548 ("python-six" ,python-six)))
18549 (home-page "https://github.com/pypa/packaging")
18550 (synopsis "Core utilities for Python packages")
18551 (description "Packaging is a Python module for dealing with Python packages.
18552 It offers an interface for working with package versions, names, and dependency
18553 information.")
18554 ;; From 'LICENSE': This software is made available under the terms of
18555 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
18556 ;; Contributions to this software is made under the terms of *both* these
18557 ;; licenses.
18558 (license (list license:asl2.0 license:bsd-2))))
18559
18560 (define-public python2-packaging
18561 (package-with-python2 python-packaging))
18562
18563 ;; Variants with minimal dependencies, for bootstrapping Pytest.
18564 (define-public python-packaging-bootstrap
18565 (hidden-package
18566 (package/inherit
18567 python-packaging
18568 (name "python-packaging-bootstrap")
18569 (arguments
18570 (substitute-keyword-arguments (package-arguments python-packaging)
18571 ((#:phases phases)
18572 `(modify-phases ,phases
18573 (add-after 'unpack 'fix-dependencies
18574 (lambda* (#:key tests? #:allow-other-keys)
18575 (substitute* "setup.py" (("\"six\"") ""))))))
18576 ((#:tests? _ #f) #f)))
18577 (native-inputs '())
18578 (propagated-inputs
18579 `(("python-pyparsing" ,python-pyparsing))))))
18580
18581 (define-public python2-packaging-bootstrap
18582 (hidden-package
18583 (package/inherit
18584 python2-packaging
18585 (name "python2-packaging-bootstrap")
18586 (native-inputs '())
18587 (propagated-inputs
18588 `(("python-pyparsing" ,python2-pyparsing)
18589 ("python-six" ,python2-six-bootstrap)))
18590 (arguments
18591 `(#:tests? #f
18592 ,@(package-arguments python2-packaging))))))
18593
18594 (define-public python-relatorio
18595 (package
18596 (name "python-relatorio")
18597 (version "0.10.0")
18598 (source
18599 (origin
18600 (method url-fetch)
18601 (uri (pypi-uri "relatorio" version))
18602 (sha256
18603 (base32
18604 "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
18605 (build-system python-build-system)
18606 (propagated-inputs
18607 `(("python-lxml" ,python-lxml)
18608 ("python-genshi" ,python-genshi)))
18609 (native-inputs
18610 `(("python-magic" ,python-magic)))
18611 (home-page "https://relatorio.tryton.org/")
18612 (synopsis "Templating library able to output ODT and PDF files")
18613 (description "Relatorio is a templating library which provides a way to
18614 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
18615 for more filetypes can be easily added by creating plugins for them.")
18616 (license license:gpl3+)))
18617
18618 (define-public python2-relatorio
18619 (package-with-python2 python-relatorio))
18620
18621 (define-public python-radon
18622 (package
18623 (name "python-radon")
18624 (version "4.1.0")
18625 (source
18626 (origin
18627 (method url-fetch)
18628 (uri (pypi-uri "radon" version))
18629 (sha256
18630 (base32
18631 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
18632 (build-system python-build-system)
18633 (arguments
18634 `(#:phases (modify-phases %standard-phases
18635 (add-after 'unpack 'relax-requirements
18636 (lambda _
18637 (substitute* "setup.py"
18638 ((".*'future'.*")
18639 "")
18640 (("colorama==0.4.1")
18641 "colorama>=0.4.1"))))
18642 (replace 'check
18643 (lambda _
18644 (invoke "python" "radon/tests/run.py"))))))
18645 (propagated-inputs
18646 `(("python-colorama" ,python-colorama)
18647 ("python-flake8-polyfill" ,python-flake8-polyfill)
18648 ("python-mando" ,python-mando)))
18649 (native-inputs
18650 `(("python-pytest" ,python-pytest)
18651 ("python-pytest-mock" ,python-pytest-mock)))
18652 (home-page "https://radon.readthedocs.org/")
18653 (synopsis "Code Metrics in Python")
18654 (description "Radon is a Python tool which computes various code metrics.
18655 Supported metrics are:
18656 @itemize @bullet
18657 @item raw metrics: SLOC, comment lines, blank lines, &c.
18658 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
18659 @item Halstead metrics (all of them)
18660 @item the Maintainability Index (a Visual Studio metric)
18661 @end itemize")
18662 (properties `((python2-variant . ,(delay python2-radon))))
18663 (license license:expat)))
18664
18665 (define-public python2-radon
18666 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
18667 (package/inherit base
18668 (propagated-inputs
18669 `(("python-configparser" ,python2-configparser)
18670 ("python-future" ,python2-future)
18671 ,@(package-propagated-inputs base))))))
18672
18673 (define-public python-sure
18674 (package
18675 (name "python-sure")
18676 (version "1.4.11")
18677 (source
18678 (origin
18679 (method url-fetch)
18680 (uri (pypi-uri "sure" version))
18681 (sha256
18682 (base32
18683 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
18684 (build-system python-build-system)
18685 (propagated-inputs
18686 `(("python-mock" ,python-mock)
18687 ("python-six" ,python-six)))
18688 (native-inputs
18689 `(("python-nose" ,python-nose)))
18690 (home-page "https://github.com/gabrielfalcao/sure")
18691 (synopsis "Automated testing library in python for python")
18692 (description
18693 "Sure is a python library that leverages a DSL for writing assertions.
18694 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
18695 (license license:gpl3+)))
18696
18697 (define-public python2-sure
18698 (package-with-python2 python-sure))
18699
18700 (define-public python2-couleur
18701 ;; This package does not seem to support python3 at all, hence,
18702 ;; only the python2 variant definition is provided.
18703 (package
18704 (name "python2-couleur")
18705 (version "0.6.2")
18706 (source
18707 (origin
18708 (method url-fetch)
18709 (uri (pypi-uri "couleur" version))
18710 (sha256
18711 (base32
18712 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
18713 (build-system python-build-system)
18714 (arguments
18715 `(#:python ,python-2))
18716 (home-page "https://github.com/gabrielfalcao/couleur")
18717 (synopsis
18718 "ANSI terminal tool for python, colored shell and other handy fancy features")
18719 (description
18720 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
18721 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
18722 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
18723 ;; https://github.com/gabrielfalcao/couleur/issues/11
18724 (license license:lgpl3+)))
18725
18726 (define-public python-misaka
18727 (package
18728 (name "python-misaka")
18729 (version "2.1.1")
18730 (source
18731 (origin
18732 (method url-fetch)
18733 (uri (pypi-uri "misaka" version))
18734 (sha256
18735 (base32
18736 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
18737 (build-system python-build-system)
18738 (arguments
18739 `(;; Line 37 of setup.py calls self.run_command('develop')
18740 ;; in the 'check' phase. This command seems to be trying
18741 ;; to write to
18742 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
18743 ;; for which it does not have the permission to write.
18744 #:tests? #f))
18745 (propagated-inputs
18746 `(("python-cffi" ,python-cffi)))
18747 (home-page "https://github.com/FSX/misaka")
18748 (synopsis "Python binding for Hoedown")
18749 (description
18750 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
18751 library written in C. It features a fast HTML renderer and functionality to make custom
18752 renderers (e.g. man pages or LaTeX).")
18753 (license license:expat)))
18754
18755 (define-public python2-misaka
18756 (package-with-python2 python-misaka))
18757
18758 (define-public python2-steadymark
18759 ;; This is forced into being a python2 only variant
18760 ;; due to its dependence on couleur that has no support
18761 ;; for python3
18762 (package
18763 (name "python2-steadymark")
18764 (version "0.7.3")
18765 (source
18766 (origin
18767 (method url-fetch)
18768 (uri (pypi-uri "steadymark" version))
18769 (sha256
18770 (base32
18771 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
18772 (build-system python-build-system)
18773 (native-inputs
18774 `(("python-couleur" ,python2-couleur)
18775 ("python-sure" ,python2-sure)
18776 ("python-misaka" ,python2-misaka)))
18777 (arguments
18778 `(#:python ,python-2
18779 #:phases
18780 (modify-phases %standard-phases
18781 (add-before 'build 'patch-setup-py
18782 (lambda _
18783 ;; Update requirements from dependency==version
18784 ;; to dependency>=version
18785 (substitute* "setup.py"
18786 (("==") ">="))
18787 #t)))))
18788 (home-page "https://github.com/gabrielfalcao/steadymark")
18789 (synopsis "Markdown-based test runner for python")
18790 (description
18791 "@code{Steadymark} allows documentation to be written in github-flavoured
18792 markdown. The documentation may contain snippets of code surrounded by python
18793 code blocks and @code{Steadymark} will find these snippets and run them, making
18794 sure that there are no old malfunctional examples in the documentation examples.")
18795 (license license:expat)))
18796
18797 (define-public python-jsonpointer
18798 (package
18799 (name "python-jsonpointer")
18800 (version "1.10")
18801 (source
18802 (origin
18803 (method url-fetch)
18804 (uri (pypi-uri "jsonpointer" version))
18805 (sha256
18806 (base32
18807 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
18808 (build-system python-build-system)
18809 (home-page "https://github.com/stefankoegl/python-json-pointer")
18810 (synopsis "Identify specific nodes in a JSON document")
18811 (description "@code{jsonpointer} allows you to access specific nodes
18812 by path in a JSON document (see RFC 6901).")
18813 (license license:bsd-3)))
18814
18815 (define-public python2-jsonpointer
18816 (package-with-python2 python-jsonpointer))
18817
18818 (define-public python-jsonpatch
18819 (package
18820 (name "python-jsonpatch")
18821 (version "1.16")
18822 (source
18823 (origin
18824 (method git-fetch)
18825 ;; pypi version lacks tests.js
18826 (uri (git-reference
18827 (url "https://github.com/stefankoegl/python-json-patch")
18828 (commit (string-append "v" version))))
18829 (file-name (git-file-name name version))
18830 (sha256
18831 (base32
18832 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18833 (build-system python-build-system)
18834 (propagated-inputs
18835 `(("python-jsonpointer" ,python-jsonpointer)))
18836 (home-page "https://github.com/stefankoegl/python-json-patch")
18837 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18838 (description "@code{jsonpatch} is a library and program that allows
18839 applying JSON Patches according to RFC 6902.")
18840 (license license:bsd-3)))
18841
18842 (define-public python2-jsonpatch
18843 (package-with-python2 python-jsonpatch))
18844
18845 (define-public python-jsonpatch-0.4
18846 (package (inherit python-jsonpatch)
18847 (name "python-jsonpatch")
18848 (version "0.4")
18849 (source
18850 (origin
18851 (method git-fetch)
18852 (uri (git-reference
18853 (url "https://github.com/stefankoegl/python-json-patch")
18854 (commit (string-append "v" version))))
18855 (file-name (git-file-name name version))
18856 (sha256
18857 (base32
18858 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18859
18860 (define-public python2-jsonpatch-0.4
18861 (package-with-python2 python-jsonpatch-0.4))
18862
18863 (define-public python-rfc3986
18864 (package
18865 (name "python-rfc3986")
18866 (version "1.4.0")
18867 (source (origin
18868 (method url-fetch)
18869 (uri (pypi-uri "rfc3986" version))
18870 (sha256
18871 (base32
18872 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18873 (build-system python-build-system)
18874 (arguments
18875 `(#:phases
18876 (modify-phases %standard-phases
18877 (replace 'check
18878 (lambda _
18879 (invoke "pytest" "-v"))))))
18880 (native-inputs
18881 `(("python-pytest" ,python-pytest)))
18882 (home-page "https://rfc3986.readthedocs.io/")
18883 (synopsis "Parse and validate URI references")
18884 (description
18885 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18886 validation and authority parsing. This module also supports RFC@tie{}6874
18887 which adds support for zone identifiers to IPv6 addresses.")
18888 (license license:asl2.0)))
18889
18890 (define-public python2-rfc3986
18891 (package-with-python2 python-rfc3986))
18892
18893 (define-public python-rfc3987
18894 (package
18895 (name "python-rfc3987")
18896 (version "1.3.7")
18897 (source
18898 (origin
18899 (method url-fetch)
18900 (uri (pypi-uri "rfc3987" version))
18901 (sha256
18902 (base32
18903 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18904 (build-system python-build-system)
18905 (home-page "https://pypi.org/project/rfc3987/")
18906 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18907 (description "@code{rfc3987} provides routines for parsing and
18908 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18909 (license license:gpl3+)))
18910
18911 (define-public python2-rfc3987
18912 (package-with-python2 python-rfc3987))
18913
18914 ;; The latest commit contains fixes for building with both python3 and python2.
18915 (define-public python-rfc6555
18916 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18917 (revision "1"))
18918 (package
18919 (name "python-rfc6555")
18920 (version (git-version "0.0.0" revision commit))
18921 (source (origin
18922 (method git-fetch)
18923 (uri (git-reference
18924 (url "https://github.com/sethmlarson/rfc6555")
18925 (commit commit)))
18926 (file-name (git-file-name name version))
18927 (sha256
18928 (base32
18929 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18930 (build-system python-build-system)
18931 (arguments
18932 '(#:phases
18933 (modify-phases %standard-phases
18934 (replace 'check
18935 (lambda* (#:key tests? #:allow-other-keys)
18936 (if tests?
18937 ;; Other tests require network access.
18938 (invoke "pytest" "tests/test_ipv6.py")
18939 #t))))))
18940 (native-inputs
18941 `(("python-pytest" ,python-pytest)))
18942 (home-page "https://pypi.org/project/rfc6555/")
18943 (synopsis "Python implementation of RFC 6555")
18944 (description
18945 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18946 6555. Provided with a single file and dead-simple API to allow easy vendoring
18947 and integration into other projects.")
18948 (license license:asl2.0))))
18949
18950 (define-public python-bagit
18951 (package
18952 (name "python-bagit")
18953 (version "1.7.0")
18954 (source
18955 (origin
18956 (method url-fetch)
18957 (uri (pypi-uri "bagit" version))
18958 (sha256
18959 (base32
18960 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18961 (build-system python-build-system)
18962 (native-inputs
18963 `(("python-setuptools-scm" ,python-setuptools-scm)
18964 ("python-coverage" ,python-coverage)
18965 ("python-mock" ,python-mock)))
18966 (home-page "https://libraryofcongress.github.io/bagit-python/")
18967 (synopsis "Create and validate BagIt packages")
18968 (description "Bagit is a Python library and command line utility for working
18969 with BagIt style packages. BagIt is a minimalist packaging format for digital
18970 preservation.")
18971 (license license:cc0)))
18972
18973 (define-public python-prov
18974 (package
18975 (name "python-prov")
18976 (version "2.0.0")
18977 (source
18978 (origin
18979 (method url-fetch)
18980 (uri (pypi-uri "prov" version))
18981 (sha256
18982 (base32
18983 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18984 (build-system python-build-system)
18985 (propagated-inputs
18986 `(("python-dateutil" ,python-dateutil)
18987 ("python-lxml" ,python-lxml)
18988 ("python-networkx" ,python-networkx)
18989 ("python-rdflib" ,python-rdflib)))
18990 (native-inputs
18991 `(("graphviz" ,graphviz)
18992 ("python-pydot" ,python-pydot)))
18993 (home-page "https://github.com/trungdong/prov")
18994 (synopsis
18995 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18996 (description
18997 "This package provides a library for W3C Provenance Data Model supporting
18998 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18999 (license license:expat)))
19000
19001 (define-public python-arcp
19002 (package
19003 (name "python-arcp")
19004 (version "0.2.1")
19005 (source
19006 (origin
19007 (method url-fetch)
19008 (uri (pypi-uri "arcp" version))
19009 (sha256
19010 (base32
19011 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
19012 (build-system python-build-system)
19013 (native-inputs
19014 `(("python-pytest" ,python-pytest)))
19015 (home-page "http://arcp.readthedocs.io/")
19016 (synopsis
19017 "Archive and Package URI parser and generator")
19018 (description
19019 "@acronym{arcp, Archive and Package} provides functions for creating
19020 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
19021 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
19022 consume or reference hypermedia resources bundled inside a file archive or an
19023 application package, as well as to resolve URIs for archive resources within a
19024 programmatic framework. This URI scheme provides mechanisms to generate a
19025 unique base URI to represent the root of the archive, so that relative URI
19026 references in a bundled resource can be resolved within the archive without
19027 having to extract the archive content on the local file system. An arcp URI can
19028 be used for purposes of isolation (e.g. when consuming multiple archives),
19029 security constraints (avoiding \"climb out\" from the archive), or for
19030 externally identiyfing sub-resources referenced by hypermedia formats.")
19031 (license license:asl2.0)))
19032
19033 (define-public python-shellescape
19034 (package
19035 (name "python-shellescape")
19036 (version "3.8.1")
19037 (source
19038 (origin
19039 (method git-fetch)
19040 (uri (git-reference
19041 (url "https://github.com/chrissimpkins/shellescape")
19042 (commit (string-append "v" version))))
19043 (file-name (git-file-name name version))
19044 (sha256
19045 (base32
19046 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
19047 (build-system python-build-system)
19048 (arguments
19049 '(#:phases
19050 (modify-phases %standard-phases
19051 (replace 'check
19052 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
19053 (when tests?
19054 (add-installed-pythonpath inputs outputs)
19055 (invoke "python" "tests/test_shellescape.py"))
19056 #t)))))
19057 (native-inputs
19058 `(("python-pytest" ,python-pytest)))
19059 (home-page "https://github.com/chrissimpkins/shellescape")
19060 (synopsis
19061 "Shell escape a string to safely use it as a token in a shell command")
19062 (description
19063 "The shellescape Python module defines the @code{shellescape.quote()}
19064 function that returns a shell-escaped version of a Python string. This is a
19065 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
19066 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
19067 (license license:expat)))
19068
19069 (define-public python-validators
19070 (package
19071 (name "python-validators")
19072 (version "0.14.2")
19073 (source (origin
19074 (method url-fetch)
19075 (uri (pypi-uri "validators" version))
19076 (sha256
19077 (base32
19078 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
19079 (build-system python-build-system)
19080 (arguments
19081 '(#:phases (modify-phases %standard-phases
19082 (replace 'check
19083 (lambda _
19084 (invoke "pytest" "-vv"))))))
19085 (propagated-inputs
19086 `(("python-decorator" ,python-decorator)
19087 ("python-six" ,python-six)))
19088 (native-inputs
19089 `(("python-flake8" ,python-flake8)
19090 ("python-isort" ,python-isort)
19091 ("python-pytest" ,python-pytest)))
19092 (home-page "https://github.com/kvesteri/validators")
19093 (synopsis "Data validation library")
19094 (description
19095 "This package contains validators for different things such as email
19096 addresses, IP addresses, URLs, hashes and more. It has been designed to
19097 be easy to use and not require defining a schema or form just to validate
19098 some input.")
19099 (license license:expat)))
19100
19101 (define-public python2-validators
19102 (package-with-python2 python-validators))
19103
19104 (define-public python-validate-email
19105 (package
19106 (name "python-validate-email")
19107 (version "1.3")
19108 (source
19109 (origin
19110 (method url-fetch)
19111 (uri (pypi-uri "validate_email" version))
19112 (sha256
19113 (base32
19114 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
19115 (build-system python-build-system)
19116 (home-page "https://github.com/syrusakbary/validate_email")
19117 (synopsis "Verifies if an email address is valid and really exists")
19118 (description "@code{validate_email} can be used to verify if an email
19119 address is valid and really exists.")
19120 (license license:lgpl3+)))
19121
19122 (define-public python2-validate-email
19123 (package-with-python2 python-validate-email))
19124
19125 (define-public python-flex
19126 (package
19127 (name "python-flex")
19128 (version "6.10.0")
19129 (source
19130 (origin
19131 (method url-fetch)
19132 (uri (pypi-uri "flex" version))
19133 (sha256
19134 (base32
19135 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
19136 (build-system python-build-system)
19137 (propagated-inputs
19138 `(("python-click" ,python-click)
19139 ("python-iso8601" ,python-iso8601)
19140 ("python-jsonpointer" ,python-jsonpointer)
19141 ("python-pyyaml" ,python-pyyaml)
19142 ("python-requests" ,python-requests)
19143 ("python-rfc3987" ,python-rfc3987)
19144 ("python-six" ,python-six)
19145 ("python-validate-email" ,python-validate-email)))
19146 (home-page "https://github.com/pipermerriam/flex")
19147 (synopsis "Validates Swagger schemata")
19148 (description "@code{flex} can be used to validate Swagger schemata.")
19149 (license license:bsd-3)))
19150
19151 (define-public python2-flex
19152 (package-with-python2 python-flex))
19153
19154 (define-public python-marshmallow
19155 (package
19156 (name "python-marshmallow")
19157 (version "3.9.1")
19158 (source
19159 (origin
19160 (method url-fetch)
19161 (uri (pypi-uri "marshmallow" version))
19162 (sha256
19163 (base32
19164 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
19165 (build-system python-build-system)
19166 (propagated-inputs
19167 `(("python-dateutil" ,python-dateutil)
19168 ("python-simplejson" ,python-simplejson)))
19169 (native-inputs
19170 `(("python-pytest" ,python-pytest)
19171 ("python-pytz" ,python-pytz)))
19172 (home-page "https://github.com/marshmallow-code/marshmallow")
19173 (synopsis "Convert complex datatypes to and from native
19174 Python datatypes.")
19175 (description "@code{marshmallow} provides a library for converting
19176 complex datatypes to and from native Python datatypes.")
19177 (license license:expat)))
19178
19179 (define-public python-apispec
19180 (package
19181 (name "python-apispec")
19182 (version "4.0.0")
19183 (source
19184 (origin
19185 (method url-fetch)
19186 (uri (pypi-uri "apispec" version))
19187 (sha256
19188 (base32
19189 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
19190 (build-system python-build-system)
19191 (arguments
19192 '(#:phases (modify-phases %standard-phases
19193 (replace 'check
19194 (lambda _
19195 (invoke "pytest" "-vv"
19196 ;; Disable validation tests since they require
19197 ;; the optional 'prance' library which is not
19198 ;; yet in Guix.
19199 "-k" "not openapi_tools_validate"))))))
19200 (propagated-inputs
19201 `(("python-pyyaml" ,python-pyyaml)))
19202 (native-inputs
19203 `(("python-pytest" ,python-pytest)
19204 ("python-marshmallow" ,python-marshmallow)))
19205 (home-page "https://github.com/marshmallow-code/apispec")
19206 (synopsis "Swagger/OpenAPI specification generator")
19207 (description "@code{python-apispec} is a pluggable API specification
19208 generator. It currently supports the OpenAPI specification, formerly known
19209 as Swagger.")
19210 (license license:expat)))
19211
19212 (define-public python-flasgger
19213 (package
19214 (name "python-flasgger")
19215 (version "0.6.3")
19216 (source
19217 (origin
19218 (method git-fetch)
19219 (uri (git-reference
19220 (url "https://github.com/rochacbruno/flasgger")
19221 (commit version)))
19222 (file-name (git-file-name name version))
19223 (sha256
19224 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
19225 (build-system python-build-system)
19226 (arguments
19227 `(#:phases
19228 (modify-phases %standard-phases
19229 (replace 'check
19230 (lambda* (#:key inputs outputs #:allow-other-keys)
19231 (substitute* "Makefile"
19232 (("flake8 flasgger --ignore=F403")
19233 "flake8 flasgger --ignore=E731,F403"))
19234 (invoke "py.test"))))))
19235 (propagated-inputs
19236 `(("python-flask" ,python-flask)
19237 ("python-pyyaml" ,python-pyyaml)
19238 ("python-jsonschema" ,python-jsonschema)
19239 ("python-mistune" ,python-mistune)
19240 ("python-six" ,python-six)))
19241 (native-inputs
19242 `(("python-decorator" ,python-decorator)
19243 ("python-flake8" ,python-flake8)
19244 ("python-flask-restful" ,python-flask-restful)
19245 ("python-flex" ,python-flex)
19246 ("python-pytest" ,python-pytest)
19247 ("python-pytest-cov" ,python-pytest-cov)
19248 ("python-marshmallow" ,python-marshmallow)
19249 ("python-apispec" ,python-apispec)))
19250 (home-page "https://github.com/rochacbruno/flasgger/")
19251 (synopsis "Extract Swagger specs from your Flask project")
19252 (description "@code{python-flasgger} allows extracting Swagger specs
19253 from your Flask project. It is a fork of Flask-Swagger.")
19254 (license license:expat)))
19255
19256 (define-public python-swagger-spec-validator
19257 (package
19258 (name "python-swagger-spec-validator")
19259 (version "2.4.3")
19260 (source
19261 (origin
19262 (method url-fetch)
19263 (uri (pypi-uri "swagger-spec-validator" version))
19264 (sha256
19265 (base32
19266 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
19267 (build-system python-build-system)
19268 (propagated-inputs
19269 `(("python-jsonschema" ,python-jsonschema)
19270 ("python-pyyaml" ,python-pyyaml)
19271 ("python-six" ,python-six)))
19272 (home-page
19273 "https://github.com/Yelp/swagger_spec_validator")
19274 (synopsis "Validation of Swagger specifications")
19275 (description "@code{swagger_spec_validator} provides a library for
19276 validating Swagger API specifications.")
19277 (license license:asl2.0)))
19278
19279 (define-public python-apache-libcloud
19280 (package
19281 (name "python-apache-libcloud")
19282 (version "3.1.0")
19283 (source
19284 (origin
19285 (method url-fetch)
19286 (uri (pypi-uri "apache-libcloud" version))
19287 (sha256
19288 (base32
19289 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
19290 (build-system python-build-system)
19291 (arguments
19292 `(#:phases
19293 (modify-phases %standard-phases
19294 (add-after 'unpack 'patch-ssh
19295 (lambda* (#:key inputs #:allow-other-keys)
19296 (substitute* "libcloud/compute/ssh.py"
19297 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
19298 "/bin/ssh" "'")))
19299 #t))
19300 (add-after 'unpack 'patch-tests
19301 (lambda _
19302 (substitute* "libcloud/test/compute/test_ssh_client.py"
19303 (("class ShellOutSSHClientTests")
19304 "@unittest.skip(\"Guix container doesn't have ssh service\")
19305 class ShellOutSSHClientTests"))
19306 #t))
19307 (add-before 'check 'copy-secret
19308 (lambda _
19309 (copy-file "libcloud/test/secrets.py-dist"
19310 "libcloud/test/secrets.py")
19311 #t)))))
19312 (inputs
19313 `(("openssh" ,openssh)))
19314 (propagated-inputs
19315 `(("python-paramiko" ,python-paramiko)
19316 ("python-requests" ,python-requests)))
19317 (native-inputs
19318 `(("python-lockfile" ,python-lockfile)
19319 ("python-mock" ,python-mock)
19320 ("python-pytest" ,python-pytest)
19321 ("python-pytest-runner" ,python-pytest-runner)
19322 ("python-requests-mock" ,python-requests-mock)))
19323 (home-page "https://libcloud.apache.org/")
19324 (synopsis "Unified Cloud API")
19325 (description "@code{libcloud} is a Python library for interacting with
19326 many of the popular cloud service providers using a unified API.")
19327 (license license:asl2.0)))
19328
19329 (define-public python-smmap
19330 (package
19331 (name "python-smmap")
19332 (version "3.0.1")
19333 (source
19334 (origin
19335 (method url-fetch)
19336 (uri (pypi-uri "smmap" version))
19337 (sha256
19338 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
19339 (build-system python-build-system)
19340 (native-inputs
19341 `(("python-nosexcover" ,python-nosexcover)))
19342 (home-page "https://github.com/Byron/smmap")
19343 (synopsis "Python sliding window memory map manager")
19344 (description "@code{smmap} is a pure Python implementation of a sliding
19345 window memory map manager.")
19346 (license license:bsd-3)))
19347
19348 (define-public python-smmap2
19349 (deprecated-package "python-smmap2" python-smmap))
19350
19351 (define-public python2-smmap
19352 (package-with-python2 python-smmap))
19353
19354 (define-public python2-smmap2
19355 (deprecated-package "python2-smmap2" python2-smmap))
19356
19357 (define-public python-regex
19358 (package
19359 (name "python-regex")
19360 (version "2020.6.8")
19361 (source (origin
19362 (method url-fetch)
19363 (uri (pypi-uri "regex" version))
19364 (sha256
19365 (base32
19366 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
19367 (build-system python-build-system)
19368 (arguments
19369 '(#:phases
19370 (modify-phases %standard-phases
19371 (replace 'check
19372 (lambda* (#:key inputs outputs #:allow-other-keys)
19373 (add-installed-pythonpath inputs outputs)
19374 (invoke "python" "-c"
19375 "from regex.test_regex import test_main; test_main()"))))))
19376 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
19377 (synopsis "Alternative regular expression module")
19378 (description "This regular expression implementation is backwards-
19379 compatible with the standard @code{re} module, but offers additional
19380 functionality like full case-folding for case-insensitive matches in Unicode.")
19381 (license license:psfl)))
19382
19383 (define-public python2-regex
19384 (package-with-python2 python-regex))
19385
19386 (define-public python-pyopengl
19387 (package
19388 (name "python-pyopengl")
19389 (version "3.1.5")
19390 (source
19391 (origin
19392 (method url-fetch)
19393 (uri (pypi-uri "PyOpenGL" version))
19394 (sha256
19395 (base32
19396 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
19397 (build-system python-build-system)
19398 (inputs
19399 `(("mesa" ,mesa)
19400 ("freeglut" ,freeglut)
19401 ("glu" ,glu)))
19402 (arguments
19403 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
19404 ;attribute 'OSMesa'
19405 #:phases
19406 (modify-phases %standard-phases
19407 (add-before 'build 'fix-paths
19408 (lambda* (#:key inputs outputs #:allow-other-keys)
19409 (substitute* '("OpenGL/platform/ctypesloader.py")
19410 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
19411 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
19412 (("'GL'")
19413 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
19414 (("'GLU'")
19415 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
19416 (("'glut',")
19417 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
19418 (("'GLESv1_CM'")
19419 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
19420 (("'GLESv2'")
19421 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
19422 ;; Not providing libgle. It seems to be very old.
19423 #t)))))
19424 (home-page "http://pyopengl.sourceforge.net")
19425 (synopsis "Standard OpenGL bindings for Python")
19426 (description
19427 "PyOpenGL is the most common cross platform Python binding to OpenGL and
19428 related APIs. The binding is created using the standard @code{ctypes}
19429 library.")
19430 (license license:bsd-3)))
19431
19432 (define-public python-pyopengl-accelerate
19433 (package
19434 (inherit python-pyopengl)
19435 (name "python-pyopengl-accelerate")
19436 (version "3.1.5")
19437 (source
19438 (origin
19439 (method url-fetch)
19440 (uri (pypi-uri "PyOpenGL-accelerate" version))
19441 (sha256
19442 (base32
19443 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
19444 (inputs
19445 `(("mesa" ,mesa)
19446 ("python-numpy" ,python-numpy))) ; for cython module
19447 ; numpy_formathandler, thus not propagated
19448 (arguments
19449 `(#:tests? #f
19450 #:phases
19451 (modify-phases %standard-phases
19452 (delete 'fix-paths))))
19453 (synopsis "Acceleration code for PyOpenGL")
19454 (description
19455 "This is the Cython-coded accelerator module for PyOpenGL.")))
19456
19457 (define-public python-rencode
19458 (package
19459 (name "python-rencode")
19460 (version "1.0.5")
19461 (source
19462 (origin
19463 (method url-fetch)
19464 (uri (pypi-uri "rencode" version))
19465 (sha256
19466 (base32
19467 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
19468 (build-system python-build-system)
19469 (arguments
19470 `(#:phases
19471 (modify-phases %standard-phases
19472 (add-before 'check 'delete-bogus-test
19473 ;; This test requires /home/aresch/Downloads, which is not provided by
19474 ;; the build environment.
19475 (lambda _
19476 (delete-file "rencode/t.py")
19477 #t)))))
19478 (native-inputs `(("pkg-config" ,pkg-config)
19479 ("python-cython" ,python-cython)))
19480 (home-page "https://github.com/aresch/rencode")
19481 (synopsis "Serialization of heterogeneous data structures")
19482 (description
19483 "The @code{rencode} module is a data structure serialization library,
19484 similar to @code{bencode} from the BitTorrent project. For complex,
19485 heterogeneous data structures with many small elements, r-encoding stake up
19486 significantly less space than b-encodings. This version of rencode is a
19487 complete rewrite in Cython to attempt to increase the performance over the
19488 pure Python module.")
19489 (license license:bsd-3)))
19490
19491 (define-public python2-rencode
19492 (package-with-python2 python-rencode))
19493
19494 (define-public python-xenon
19495 (package
19496 (name "python-xenon")
19497 (version "0.7.0")
19498 (source
19499 (origin
19500 (method url-fetch)
19501 (uri (pypi-uri "xenon" version))
19502 (sha256
19503 (base32
19504 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
19505 (build-system python-build-system)
19506 (native-inputs
19507 `(("python-pyyaml" ,python-pyyaml)
19508 ("python-radon" ,python-radon)
19509 ("python-requests" ,python-requests)
19510 ("python-flake8" ,python-flake8)
19511 ("python-tox" ,python-tox)))
19512 (arguments
19513 `(#:tests? #f ;test suite not shipped with the PyPI archive
19514 #:phases
19515 (modify-phases %standard-phases
19516 (add-before 'build 'patch-test-requirements
19517 (lambda _
19518 ;; Remove httpretty dependency for tests.
19519 (substitute* "setup.py"
19520 (("httpretty") ""))
19521 #t)))))
19522 (home-page "https://xenon.readthedocs.org/")
19523 (synopsis "Monitor code metrics for Python on your CI server")
19524 (description
19525 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
19526 Ideally, @code{xenon} is run every time code is committed. Through command
19527 line options, various thresholds can be set for the complexity of code. It
19528 will fail (i.e. it will exit with a non-zero exit code) when any of these
19529 requirements is not met.")
19530 (license license:expat)))
19531
19532 (define-public python-pysocks
19533 (package
19534 (name "python-pysocks")
19535 (version "1.7.1")
19536 (source
19537 (origin
19538 (method url-fetch)
19539 (uri (pypi-uri "PySocks" version))
19540 (sha256
19541 (base32
19542 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
19543 (build-system python-build-system)
19544 (arguments `(#:tests? #f))
19545 (home-page "https://github.com/Anorov/PySocks")
19546 (synopsis "SOCKS client module")
19547 (description "@code{pysocks} is an updated and semi-actively maintained
19548 version of @code{SocksiPy} with bug fixes and extra features.")
19549 (license license:bsd-3)))
19550
19551 (define-public python2-pysocks
19552 (package-with-python2 python-pysocks))
19553
19554 (define-public python-pydiff
19555 (package
19556 (name "python-pydiff")
19557 (version "0.2")
19558 (source
19559 (origin
19560 (method url-fetch)
19561 (uri (pypi-uri "pydiff" version))
19562 (sha256
19563 (base32
19564 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
19565 (build-system python-build-system)
19566 (home-page "https://github.com/myint/pydiff")
19567 (synopsis "Library to diff two Python files at the bytecode level")
19568 (description
19569 "@code{pydiff} makes it easy to look for actual code changes while
19570 ignoring formatting changes.")
19571 (license license:expat)))
19572
19573 (define-public python2-pydiff
19574 (package-with-python2 python-pydiff))
19575
19576 (define-public python-pydub
19577 (package
19578 (name "python-pydub")
19579 (version "0.24.1")
19580 (source
19581 (origin
19582 (method url-fetch)
19583 (uri (pypi-uri "pydub" version))
19584 (sha256
19585 (base32
19586 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
19587 (build-system python-build-system)
19588 (arguments
19589 `(#:phases
19590 (modify-phases %standard-phases
19591 (add-after 'unpack 'fix-ffmpeg-path
19592 (lambda* (#:key inputs #:allow-other-keys)
19593 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
19594 (substitute* '("pydub/utils.py")
19595 (("return \"ffmpeg\"")
19596 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
19597 (("return \"ffplay\"")
19598 (string-append "return \"" ffmpeg "/bin/ffplay\""))
19599 (("return \"ffprobe\"")
19600 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
19601 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
19602 #t))))))
19603 (home-page "https://pydub.com")
19604 (inputs
19605 `(("ffmpeg" ,ffmpeg)))
19606 (propagated-inputs
19607 `(("python-scipy" ,python-scipy)))
19608 (synopsis "Manipulate audio with a high level interface in Python")
19609 (description
19610 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
19611 @code{ffmpeg} to open various audio formats.")
19612 (license license:expat))) ; MIT license
19613
19614 (define-public python-tqdm
19615 (package
19616 (name "python-tqdm")
19617 (version "4.60.0")
19618 (source
19619 (origin
19620 (method url-fetch)
19621 (uri (pypi-uri "tqdm" version))
19622 (sha256
19623 (base32
19624 "1bjpy4mjg6ryp0ijvqi77vgs76l5hh3zrv3x4vmcwxrlbswvvppb"))))
19625 (build-system python-build-system)
19626 (arguments
19627 '(#:phases (modify-phases %standard-phases
19628 (replace 'check
19629 (lambda _
19630 (invoke "pytest" "-vv" "-k" "not perf"))))))
19631 (native-inputs
19632 `(("python-pytest" ,python-pytest)
19633 ("python-pytest-asyncio" ,python-pytest-asyncio)
19634 ("python-pytest-timeout" ,python-pytest-timeout)
19635 ("python-setuptools-scm" ,python-setuptools-scm)
19636 ("python-toml" ,python-toml)))
19637 (home-page "https://github.com/tqdm/tqdm")
19638 (synopsis "Fast, extensible progress meter")
19639 (description
19640 "Make loops show a progress bar on the console by just wrapping any
19641 iterable with @code{|tqdm(iterable)|}. Offers many options to define
19642 design and layout.")
19643 (license (list license:mpl2.0 license:expat))))
19644
19645 (define-public python2-tqdm
19646 (package-with-python2 python-tqdm))
19647
19648 (define-public python-pkginfo
19649 (package
19650 (name "python-pkginfo")
19651 (version "1.7.0")
19652 (source
19653 (origin
19654 (method url-fetch)
19655 (uri (pypi-uri "pkginfo" version))
19656 (sha256
19657 (base32
19658 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
19659 (build-system python-build-system)
19660 (arguments
19661 `(#:phases
19662 (modify-phases %standard-phases
19663 (add-before 'check 'patch-tests
19664 (lambda _
19665 (substitute* "pkginfo/tests/test_installed.py"
19666 (("test_ctor_w_package_no_PKG_INFO")
19667 "_test_ctor_w_package_no_PKG_INFO"))
19668 #t)))))
19669 (home-page
19670 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
19671 (synopsis
19672 "Query metadatdata from sdists, bdists, and installed packages")
19673 (description
19674 "API to query the distutils metadata written in @file{PKG-INFO} inside a
19675 source distriubtion (an sdist) or a binary distribution (e.g., created by
19676 running bdist_egg). It can also query the EGG-INFO directory of an installed
19677 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
19678 created by running @code{python setup.py develop}).")
19679 (license license:expat)))
19680
19681 (define-public python2-pkginfo
19682 (package-with-python2 python-pkginfo))
19683
19684 (define-public python-twine
19685 (package
19686 (name "python-twine")
19687 (version "1.15.0")
19688 (source
19689 (origin
19690 (method url-fetch)
19691 (uri (pypi-uri "twine" version))
19692 (sha256
19693 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
19694 (build-system python-build-system)
19695 (propagated-inputs
19696 `(("python-tqdm" ,python-tqdm)
19697 ("python-packaging" ,python-packaging)
19698 ("python-pkginfo" ,python-pkginfo)
19699 ("python-readme-renderer" ,python-readme-renderer)
19700 ("python-requests" ,python-requests)
19701 ("python-requests-toolbelt" ,python-requests-toolbelt)))
19702 (home-page "https://github.com/pypa/twine")
19703 (synopsis "Collection of utilities for interacting with PyPI")
19704 (description
19705 "@code{twine} currently supports registering projects and uploading
19706 distributions. It authenticates the user over HTTPS, allows them to pre-sign
19707 their files and supports any packaging format (including wheels).")
19708 (license license:asl2.0)))
19709
19710 (define-public python2-twine
19711 (package-with-python2 python-twine))
19712
19713 (define-public python-linecache2
19714 (package
19715 (name "python-linecache2")
19716 (version "1.0.0")
19717 (source
19718 (origin
19719 (method url-fetch)
19720 (uri (pypi-uri "linecache2" version))
19721 (sha256
19722 (base32
19723 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
19724 (build-system python-build-system)
19725 (arguments
19726 `(;; The tests depend on unittest2, and our version is a bit too old.
19727 #:tests? #f))
19728 (native-inputs
19729 `(("python-pbr" ,python-pbr-minimal)))
19730 (home-page
19731 "https://github.com/testing-cabal/linecache2")
19732 (synopsis "Backports of the linecache module")
19733 (description
19734 "The linecache module allows one to get any line from any file, while
19735 attempting to optimize internally, using a cache, the common case where many
19736 lines are read from a single file.")
19737 (license license:psfl)))
19738
19739 (define-public python2-linecache2
19740 (package-with-python2 python-linecache2))
19741
19742 (define-public python-traceback2
19743 (package
19744 (name "python-traceback2")
19745 (version "1.4.0")
19746 (source
19747 (origin
19748 (method url-fetch)
19749 (uri (pypi-uri "traceback2" version))
19750 (sha256
19751 (base32
19752 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
19753 (build-system python-build-system)
19754 (arguments
19755 `(;; python-traceback2 and python-unittest2 depend on one another.
19756 #:tests? #f))
19757 (native-inputs
19758 `(("python-pbr" ,python-pbr-minimal)))
19759 (propagated-inputs
19760 `(("python-linecache2" ,python-linecache2)
19761 ("python-six" ,python-six)))
19762 (home-page
19763 "https://github.com/testing-cabal/traceback2")
19764 (synopsis "Backports of the traceback module")
19765 (description
19766 "This module provides a standard interface to extract, format and print
19767 stack traces of Python programs. It exactly mimics the behavior of the Python
19768 interpreter when it prints a stack trace.")
19769 (license license:psfl)))
19770
19771 (define-public python2-traceback2
19772 (package-with-python2 python-traceback2))
19773
19774 (define-public python-ratelimiter
19775 (package
19776 (name "python-ratelimiter")
19777 (version "1.2.0")
19778 (source
19779 (origin
19780 (method url-fetch)
19781 (uri (pypi-uri "ratelimiter" version))
19782 (sha256
19783 (base32
19784 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
19785 (build-system python-build-system)
19786 (arguments
19787 '(#:tests? #f)) ; There are no tests in the pypi archive.
19788 (home-page "https://github.com/RazerM/ratelimiter")
19789 (synopsis "Simple rate limiting object")
19790 (description
19791 "The @code{ratelimiter} module ensures that an operation will not be
19792 executed more than a given number of times during a given period.")
19793 (license license:asl2.0)))
19794
19795 (define-public python2-ratelimiter
19796 (package-with-python2 python-ratelimiter))
19797
19798 (define-public python-dukpy
19799 (package
19800 (name "python-dukpy")
19801 (version "0.3")
19802 (source
19803 (origin
19804 (method git-fetch)
19805 (uri (git-reference
19806 (url "https://github.com/kovidgoyal/dukpy")
19807 (commit (string-append "v" version))))
19808 (file-name (git-file-name name version))
19809 (sha256
19810 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19811 (build-system python-build-system)
19812 (home-page "https://github.com/kovidgoyal/dukpy")
19813 (synopsis "Run JavaScript in python")
19814 (description
19815 "dukpy is a JavaScript runtime environment for Python using the duktape
19816 embeddable JavaScript engine.")
19817 ;; Dukpy is licensed under MIT like the embedded duktape library,
19818 ;; with 'errors.c' as GPL3.
19819 (license (list license:expat license:gpl3))))
19820
19821 (define-public python2-dukpy
19822 (package-with-python2 python-dukpy))
19823
19824 (define-public python-jsonrpclib-pelix
19825 (package
19826 (name "python-jsonrpclib-pelix")
19827 (version "0.3.2")
19828 (source
19829 (origin
19830 (method url-fetch)
19831 (uri (pypi-uri "jsonrpclib-pelix" version))
19832 (sha256
19833 (base32
19834 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19835 (build-system python-build-system)
19836 (arguments
19837 `(#:tests? #f)) ; no tests in PyPI tarball
19838 (home-page "https://github.com/tcalmant/jsonrpclib/")
19839 (synopsis "JSON-RPC 2.0 client library for Python")
19840 (description
19841 "This library implements the JSON-RPC v2.0
19842 specification (backwards-compatible) as a client library for Python. This
19843 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19844 services.")
19845 (license license:asl2.0)))
19846
19847 (define-public python2-jsonrpclib-pelix
19848 (package-with-python2 python-jsonrpclib-pelix))
19849
19850 (define-public python-setuptools-scm-git-archive
19851 (package
19852 (name "python-setuptools-scm-git-archive")
19853 (version "1.0")
19854 (source
19855 (origin
19856 (method url-fetch)
19857 (uri (pypi-uri "setuptools_scm_git_archive" version))
19858 (sha256
19859 (base32
19860 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19861 (build-system python-build-system)
19862 (native-inputs
19863 `(("python-pytest" ,python-pytest)))
19864 (propagated-inputs
19865 `(("python-setuptools-scm" ,python-setuptools-scm)))
19866 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19867 (synopsis "Setuptools_scm plugin for git archives")
19868 (description
19869 "The setuptools_scm_git_archive package is a plugin to
19870 setuptools_scm, which supports obtaining versions from git archives that
19871 belong to tagged versions.")
19872 (license license:expat)))
19873
19874 (define-public python2-setuptools-scm-git-archive
19875 (package-with-python2 python-setuptools-scm-git-archive))
19876
19877 (define-public python-setuptools-git
19878 (package
19879 (name "python-setuptools-git")
19880 (version "1.2")
19881 (source
19882 (origin
19883 (method url-fetch)
19884 (uri (pypi-uri "setuptools-git" version))
19885 (sha256
19886 (base32
19887 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19888 (build-system python-build-system)
19889 (arguments
19890 `(#:phases
19891 (modify-phases %standard-phases
19892 ;; This is needed for tests.
19893 (add-after 'unpack 'configure-git
19894 (lambda _
19895 (setenv "HOME" "/tmp")
19896 (invoke "git" "config" "--global" "user.email" "guix")
19897 (invoke "git" "config" "--global" "user.name" "guix")
19898 #t)))))
19899 (native-inputs
19900 `(("git" ,git-minimal)))
19901 (home-page "https://github.com/msabramo/setuptools-git")
19902 (synopsis "Setuptools revision control system plugin for Git")
19903 (description
19904 "This package provides a plugin for Setuptools for revision control with
19905 Git.")
19906 (license license:bsd-3)))
19907
19908 (define-public python-pyclipper
19909 (package
19910 (name "python-pyclipper")
19911 (version "1.1.0.post3")
19912 (source
19913 (origin
19914 (method url-fetch)
19915 (uri (pypi-uri "pyclipper" version ".zip"))
19916 (sha256
19917 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19918 (modules '((guix build utils)))
19919 (snippet
19920 '(begin
19921 ;; This file is generated by Cython.
19922 (delete-file "pyclipper/pyclipper.cpp") #t))))
19923 (build-system python-build-system)
19924 (arguments
19925 `(#:phases
19926 (modify-phases %standard-phases
19927 (add-before 'build 'cythonize-sources
19928 (lambda _
19929 (with-directory-excursion "pyclipper"
19930 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19931 (propagated-inputs
19932 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19933 (native-inputs
19934 `(("python-cython" ,python-cython)
19935 ("python-pytest" ,python-pytest)
19936 ("python-pytest-runner" ,python-pytest-runner)
19937 ("python-unittest2" ,python-unittest2)
19938 ("unzip" ,unzip)))
19939 (home-page "https://github.com/greginvm/pyclipper")
19940 (synopsis "Wrapper for Angus Johnson's Clipper library")
19941 (description
19942 "Pyclipper is a Cython wrapper for the C++ translation of the
19943 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19944 (license license:expat)))
19945
19946 (define-public python2-pyclipper
19947 (package-with-python2 python-pyclipper))
19948
19949 (define-public python2-booleanoperations
19950 (package
19951 (name "python2-booleanoperations")
19952 (version "0.7.1")
19953 (source
19954 (origin
19955 (method url-fetch)
19956 (uri (pypi-uri "booleanOperations" version ".zip"))
19957 (sha256
19958 (base32
19959 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19960 (build-system python-build-system)
19961 (arguments
19962 `(#:python ,python-2))
19963 (native-inputs
19964 `(("unzip" ,unzip)
19965 ("python2-pytest" ,python2-pytest)
19966 ("python2-pytest-runner" ,python2-pytest-runner)))
19967 (propagated-inputs
19968 `(("python-fonttools" ,python2-fonttools)
19969 ("python-pyclipper" ,python2-pyclipper)
19970 ("python-ufolib" ,python2-ufolib)))
19971 (home-page "https://github.com/typemytype/booleanOperations")
19972 (synopsis "Boolean operations on paths")
19973 (description
19974 "BooleanOperations provides a Python library that enables
19975 boolean operations on paths.")
19976 (license license:expat)))
19977
19978 (define-public python-tempdir
19979 (package
19980 (name "python-tempdir")
19981 (version "0.7.1")
19982 (source
19983 (origin
19984 (method url-fetch)
19985 (uri (pypi-uri "tempdir" version))
19986 (sha256
19987 (base32
19988 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19989 (build-system python-build-system)
19990 (home-page "https://pypi.org/project/tempdir/")
19991 (arguments
19992 ;; the package has no tests
19993 '(#:tests? #f))
19994 (synopsis "Python library for managing temporary directories")
19995 (description
19996 "This library manages temporary directories that are automatically
19997 deleted with all their contents when they are no longer needed. It is
19998 particularly convenient for use in tests.")
19999 (license license:expat)))
20000
20001 (define-public python2-tempdir
20002 (package-with-python2 python-tempdir))
20003
20004 (define-public python-activepapers
20005 (package
20006 (name "python-activepapers")
20007 (version "0.2.2")
20008 (source
20009 (origin
20010 (method url-fetch)
20011 (uri (pypi-uri "ActivePapers.Py" version))
20012 (sha256
20013 (base32
20014 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
20015 (build-system python-build-system)
20016 (arguments
20017 `(#:modules ((ice-9 ftw)
20018 (srfi srfi-1)
20019 (guix build utils)
20020 (guix build python-build-system))
20021
20022 #:phases
20023 (modify-phases %standard-phases
20024 (add-after 'unpack 'delete-python2-code
20025 (lambda _
20026 (for-each delete-file
20027 '("lib/activepapers/builtins2.py"
20028 "lib/activepapers/standardlib2.py"
20029 "lib/activepapers/utility2.py"))))
20030 (replace 'check
20031 (lambda _
20032 ;; Deactivate the test cases that download files
20033 (setenv "NO_NETWORK_ACCESS" "1")
20034 ;; For some strange reason, some tests fail if nosetests runs all
20035 ;; test modules in a single execution. They pass if each test
20036 ;; module is run individually.
20037 (for-each (lambda (filename)
20038 (invoke "nosetests"
20039 (string-append "tests/" filename)))
20040 (scandir "tests"
20041 (lambda (filename)
20042 (string-suffix? ".py" filename)))))))))
20043 (native-inputs
20044 `(("python-tempdir" ,python-tempdir)
20045 ("python-nose" ,python-nose)))
20046 (propagated-inputs
20047 `(("python-h5py" ,python-h5py)))
20048 (home-page "https://www.activepapers.org/")
20049 (synopsis "Executable papers for scientific computing")
20050 (description
20051 "ActivePapers is a tool for working with executable papers, which
20052 combine data, code, and documentation in single-file packages,
20053 suitable for publication as supplementary material or on repositories
20054 such as figshare or Zenodo.")
20055 (properties `((python2-variant . ,(delay python2-activepapers))))
20056 (license license:bsd-3)))
20057
20058 (define-public python2-activepapers
20059 (let ((base (package-with-python2
20060 (strip-python2-variant python-activepapers))))
20061 (package/inherit base
20062 (arguments
20063 (substitute-keyword-arguments (package-arguments base)
20064 ((#:phases phases)
20065 `(modify-phases ,phases
20066 (delete 'delete-python2-code)
20067 (add-after 'unpack 'delete-python3-code
20068 (lambda _
20069 (for-each delete-file
20070 '("lib/activepapers/builtins3.py"
20071 "lib/activepapers/standardlib3.py"
20072 "lib/activepapers/utility3.py")))))))))))
20073
20074 (define-public python-semver
20075 (package
20076 (name "python-semver")
20077 (version "2.9.0")
20078 (source
20079 (origin
20080 (method url-fetch)
20081 (uri (pypi-uri "semver" version))
20082 (sha256
20083 (base32
20084 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
20085 (build-system python-build-system)
20086 (arguments
20087 `(#:phases (modify-phases %standard-phases
20088 (replace 'check
20089 (lambda _
20090 (delete-file "setup.cfg")
20091 (invoke "py.test"))))))
20092 (native-inputs
20093 `(("python-pytest" ,python-pytest)))
20094 (home-page "https://github.com/k-bx/python-semver")
20095 (synopsis "Python helper for Semantic Versioning")
20096 (description "This package provides a Python library for
20097 @url{Semantic Versioning, http://semver.org/}.")
20098 (license license:bsd-3)))
20099
20100 (define-public python2-semver
20101 (package-with-python2 python-semver))
20102
20103 (define-public python-pyro4
20104 (package
20105 (name "python-pyro4")
20106 (version "4.77")
20107 (source
20108 (origin
20109 (method url-fetch)
20110 (uri (pypi-uri "Pyro4" version))
20111 (sha256
20112 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
20113 (build-system python-build-system)
20114 (arguments
20115 '(#:tests? #f)) ;FIXME: Some tests require network access.
20116 (native-inputs
20117 `(("python-cloudpickle" ,python-cloudpickle)
20118 ("python-dill" ,python-dill)
20119 ("python-msgpack" ,python-msgpack)))
20120 (propagated-inputs
20121 `(("python-serpent" ,python-serpent)))
20122 (home-page "https://pyro4.readthedocs.io")
20123 (synopsis "Distributed object middleware for Python")
20124 (description
20125 "Pyro enables you to build applications in which objects can talk to each
20126 other over the network. You can just use normal Python method calls to call
20127 objects on other machines, also known as remote procedure calls (RPC).")
20128 (license license:expat)))
20129
20130 (define-public python2-pyro
20131 (package
20132 (name "python2-pyro")
20133 (version "3.16")
20134 (source
20135 (origin
20136 (method url-fetch)
20137 (uri (pypi-uri "Pyro" version))
20138 (file-name (string-append "Pyro-" version ".tar.gz"))
20139 (sha256
20140 (base32
20141 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
20142 (build-system python-build-system)
20143 (arguments
20144 ;; Pyro is not compatible with Python 3
20145 `(#:python ,python-2
20146 ;; Pyro has no test cases for automatic execution
20147 #:tests? #f))
20148 (home-page "https://pythonhosted.org/Pyro/")
20149 (synopsis "Distributed object manager for Python")
20150 (description "Pyro is a Distributed Object Technology system
20151 written in Python that is designed to be easy to use. It resembles
20152 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
20153 which is a system and language independent Distributed Object Technology
20154 and has much more to offer than Pyro or RMI. Pyro 3.x is no
20155 longer maintained. New projects should use Pyro4 instead, which
20156 is the new Pyro version that is actively developed.")
20157 (license license:expat)))
20158
20159 (define-public python2-scientific
20160 (package
20161 (name "python2-scientific")
20162 (version "2.9.4")
20163 (source
20164 (origin
20165 (method git-fetch)
20166 (uri (git-reference
20167 (url "https://github.com/khinsen/ScientificPython")
20168 (commit (string-append "rel" version))))
20169 (file-name (git-file-name name version))
20170 (sha256
20171 (base32
20172 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
20173 (build-system python-build-system)
20174 (inputs
20175 `(("netcdf" ,netcdf)))
20176 (propagated-inputs
20177 `(("python-numpy" ,python2-numpy-1.8)
20178 ("python-pyro" ,python2-pyro)))
20179 (arguments
20180 ;; ScientificPython is not compatible with Python 3
20181 `(#:python ,python-2
20182 #:tests? #f ; No test suite
20183 #:phases
20184 (modify-phases %standard-phases
20185 (replace 'build
20186 (lambda* (#:key inputs #:allow-other-keys)
20187 (invoke "python" "setup.py" "build"
20188 (string-append "--netcdf_prefix="
20189 (assoc-ref inputs "netcdf"))))))))
20190 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
20191 (synopsis "Python modules for scientific computing")
20192 (description "ScientificPython is a collection of Python modules that are
20193 useful for scientific computing. Most modules are rather general (Geometry,
20194 physical units, automatic derivatives, ...) whereas others are more
20195 domain-specific (e.g. netCDF and PDB support). The library is currently
20196 not actively maintained and works only with Python 2 and NumPy < 1.9.")
20197 (license license:cecill-c)))
20198
20199 (define-public python2-mmtk
20200 (package
20201 (name "python2-mmtk")
20202 (version "2.7.12")
20203 (source
20204 (origin
20205 (method git-fetch)
20206 (uri (git-reference
20207 (url "https://github.com/khinsen/MMTK")
20208 (commit (string-append "rel" version))))
20209 (file-name (git-file-name name version))
20210 (sha256
20211 (base32
20212 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
20213 (build-system python-build-system)
20214 (native-inputs
20215 `(("netcdf" ,netcdf)))
20216 (propagated-inputs
20217 `(("python-scientific" ,python2-scientific)
20218 ("python-tkinter" ,python-2 "tk")))
20219 (arguments
20220 `(#:python ,python-2
20221 #:tests? #f
20222 #:phases
20223 (modify-phases %standard-phases
20224 (add-before 'build 'includes-from-scientific
20225 (lambda* (#:key inputs #:allow-other-keys)
20226 (mkdir-p "Include/Scientific")
20227 (copy-recursively
20228 (string-append
20229 (assoc-ref inputs "python-scientific")
20230 "/include/python2.7/Scientific")
20231 "Include/Scientific"))))))
20232 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
20233 (synopsis "Python library for molecular simulation")
20234 (description "MMTK is a library for molecular simulations with an emphasis
20235 on biomolecules. It provides widely used methods such as Molecular Dynamics
20236 and normal mode analysis, but also basic routines for implementing new methods
20237 for simulation and analysis. The library is currently not actively maintained
20238 and works only with Python 2 and NumPy < 1.9.")
20239 (license license:cecill-c)))
20240
20241 (define-public python-phonenumbers
20242 (package
20243 (name "python-phonenumbers")
20244 (version "8.9.1")
20245 (source
20246 (origin
20247 (method url-fetch)
20248 (uri (pypi-uri "phonenumbers" version))
20249 (sha256
20250 (base32
20251 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
20252 (build-system python-build-system)
20253 (home-page
20254 "https://github.com/daviddrysdale/python-phonenumbers")
20255 (synopsis
20256 "Python library for dealing with international phone numbers")
20257 (description
20258 "This package provides a Python port of Google's libphonenumber library.")
20259 (license license:asl2.0)))
20260
20261 (define-public python2-phonenumbers
20262 (package-with-python2 python-phonenumbers))
20263
20264 (define-public python-heapdict
20265 (package
20266 (name "python-heapdict")
20267 (version "1.0.1")
20268 (source
20269 (origin
20270 (method url-fetch)
20271 (uri (pypi-uri "HeapDict" version))
20272 (sha256
20273 (base32
20274 "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
20275 (build-system python-build-system)
20276 (home-page "http://stutzbachenterprises.com/")
20277 (synopsis "Heap with decrease-key and increase-key operations")
20278 (description
20279 "heapdict implements the MutableMapping ABC, meaning it works pretty much
20280 like a regular Python @code{dict}. It’s designed to be used as a priority
20281 queue.")
20282 (license license:bsd-3)))
20283
20284 (define-public python-zict
20285 (package
20286 (name "python-zict")
20287 (version "2.0.0")
20288 (source
20289 (origin
20290 (method url-fetch)
20291 (uri (pypi-uri "zict" version))
20292 (sha256
20293 (base32
20294 "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
20295 (build-system python-build-system)
20296 (propagated-inputs
20297 `(("python-heapdict" ,python-heapdict)))
20298 (native-inputs
20299 `(("python-pytest" ,python-pytest)))
20300 (home-page "https://zict.readthedocs.io/en/latest/")
20301 (synopsis "Composable mutable mapping tools")
20302 (description "This package provides abstract @code{MutableMapping} classes
20303 that consume and build on other @code{MutableMappings}. Several of these can
20304 be composed with one another to form intuitive interfaces over complex storage
20305 systems policies.")
20306 (license license:bsd-3)))
20307
20308 (define-public python-send2trash
20309 (package
20310 (name "python-send2trash")
20311 (version "1.5.0")
20312 (source
20313 (origin (method git-fetch)
20314 ;; Source tarball on PyPI doesn't include tests.
20315 (uri (git-reference
20316 (url "https://github.com/hsoft/send2trash")
20317 (commit version)))
20318 (file-name (git-file-name name version))
20319 (sha256
20320 (base32
20321 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
20322 (build-system python-build-system)
20323 (arguments
20324 '(#:phases
20325 (modify-phases %standard-phases
20326 (add-before 'check 'pre-check
20327 (lambda _
20328 (mkdir-p "/tmp/foo")
20329 (setenv "HOME" "/tmp/foo")
20330 #t)))))
20331 (home-page "https://github.com/hsoft/send2trash")
20332 (synopsis "Send files to the user's @file{~/Trash} directory")
20333 (description "This package provides a Python library to send files to the
20334 user's @file{~/Trash} directory.")
20335 (properties `((python2-variant . ,(delay python2-send2trash))))
20336 (license license:bsd-3)))
20337
20338 (define-public python2-send2trash
20339 (let ((base (package-with-python2
20340 (strip-python2-variant python-send2trash))))
20341 (package/inherit base
20342 (arguments
20343 (substitute-keyword-arguments (package-arguments python-send2trash)
20344 ((#:phases phases)
20345 `(modify-phases ,phases
20346 (add-before 'check 'setenv
20347 (lambda _
20348 (setenv "PYTHONPATH"
20349 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20350 #t)))))))))
20351
20352 (define-public python-pyfavicon
20353 (package
20354 (name "python-pyfavicon")
20355 (version "0.1.1")
20356 (source
20357 (origin
20358 (method url-fetch)
20359 (uri (pypi-uri "pyfavicon" version))
20360 (sha256
20361 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
20362 (build-system python-build-system)
20363 (arguments
20364 ;; There are no tests in the PyPI tarball and the tests from the
20365 ;; repository require online data.
20366 '(#:tests? #f))
20367 (propagated-inputs
20368 `(("python-aiohttp" ,python-aiohttp)
20369 ("python-beautifulsoup4" ,python-beautifulsoup4)
20370 ("python-pillow" ,python-pillow)))
20371 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
20372 (synopsis "Async favicon fetcher")
20373 (description
20374 "@code{pyfavicon} is an async favicon fetcher.")
20375 (license license:expat)))
20376
20377 (define-public python-yamllint
20378 (package
20379 (name "python-yamllint")
20380 (version "1.26.1")
20381 (source
20382 (origin
20383 (method url-fetch)
20384 (uri (pypi-uri "yamllint" version))
20385 (sha256
20386 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
20387 (build-system python-build-system)
20388 (propagated-inputs
20389 `(("python-pathspec" ,python-pathspec)
20390 ("python-pyyaml" ,python-pyyaml)
20391 ("python-setuptools" ,python-setuptools)))
20392 (home-page "https://github.com/adrienverge/yamllint")
20393 (synopsis "Linter for YAML files")
20394 (description
20395 "Yamllint is a linter for YAML files. yamllint does not only check for
20396 syntax validity, but for weirdnesses like key repetition and cosmetic problems
20397 such as lines length, trailing spaces, indentation, etc.")
20398 (license license:gpl3+)))
20399
20400 (define-public python-yapf
20401 (package
20402 (name "python-yapf")
20403 (version "0.29.0")
20404 (source
20405 (origin
20406 (method url-fetch)
20407 (uri (pypi-uri "yapf" version))
20408 (sha256
20409 (base32
20410 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
20411 (build-system python-build-system)
20412 (home-page "https://github.com/google/yapf")
20413 (synopsis "Formatter for Python code")
20414 (description "YAPF is a formatter for Python code. It's based off of
20415 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
20416 takes the code and reformats it to the best formatting that conforms to the
20417 style guide, even if the original code didn't violate the style guide.")
20418 (license license:asl2.0)))
20419
20420 (define-public python2-yapf
20421 (package-with-python2 python-yapf))
20422
20423 (define-public python-yq
20424 (package
20425 (name "python-yq")
20426 (version "2.11.1")
20427 (source
20428 (origin
20429 (method url-fetch)
20430 (uri (pypi-uri "yq" version))
20431 (sha256
20432 (base32
20433 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
20434 (build-system python-build-system)
20435 (arguments
20436 '(#:phases
20437 (modify-phases %standard-phases
20438 (add-after 'unpack 'patch
20439 (lambda* (#:key inputs #:allow-other-keys)
20440 (substitute* "yq/__init__.py"
20441 (("Popen\\(\\[\"jq")
20442 (string-append
20443 "Popen([\""
20444 (assoc-ref inputs "jq")
20445 "/bin/jq")))
20446 #t)))))
20447 (inputs
20448 `(("python-argcomplete" ,python-argcomplete)
20449 ("python-pyyaml" ,python-pyyaml)
20450 ("python-xmltodict" ,python-xmltodict)
20451 ("jq" ,jq)))
20452 (native-inputs
20453 `(("python-coverage" ,python-coverage)
20454 ("python-flake8" ,python-flake8)
20455 ("python-wheel" ,python-wheel)))
20456 (home-page "https://github.com/kislyuk/yq")
20457 (synopsis "Command-line YAML/XML processor")
20458 (description
20459 "This package provides @command{yq} and @command{xq} for processing YAML
20460 and XML respectively. The processing is done through @command{jq}, @command{jq}
20461 filters can be used to process the data as it passes through.")
20462 (license license:asl2.0)))
20463
20464 (define-public python-gyp
20465 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
20466 (revision "0"))
20467 (package
20468 (name "python-gyp")
20469 ;; Google does not release versions,
20470 ;; based on second most recent commit date.
20471 (version (git-version "0.0.0" revision commit))
20472 (source
20473 (origin
20474 ;; Google does not release tarballs,
20475 ;; git checkout is needed.
20476 (method git-fetch)
20477 (uri (git-reference
20478 (url "https://chromium.googlesource.com/external/gyp")
20479 (commit commit)))
20480 (file-name (git-file-name name version))
20481 (sha256
20482 (base32
20483 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
20484 (build-system python-build-system)
20485 (home-page "https://gyp.gsrc.io/")
20486 (synopsis "GYP is a Meta-Build system")
20487 (description
20488 "GYP builds build systems for large, cross platform applications.
20489 It can be used to generate XCode projects, Visual Studio projects, Ninja build
20490 files, and Makefiles.")
20491 (license license:bsd-3))))
20492
20493 (define-public python2-gyp
20494 (package-with-python2 python-gyp))
20495
20496 (define-public python-whatever
20497 (package
20498 (name "python-whatever")
20499 (version "0.6")
20500 (source
20501 (origin
20502 (method git-fetch)
20503 (uri (git-reference
20504 (url "https://github.com/Suor/whatever")
20505 (commit version)))
20506 (file-name (git-file-name name version))
20507 (sha256
20508 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
20509 (build-system python-build-system)
20510 (arguments
20511 `(#:phases
20512 (modify-phases %standard-phases
20513 (replace 'check
20514 (lambda _
20515 (invoke "py.test"))))))
20516 (native-inputs
20517 `(("python-pytest" ,python-pytest)))
20518 (home-page "https://github.com/Suor/whatever")
20519 (synopsis "Make anonymous functions by partial application of operators")
20520 (description "@code{whatever} provides an easy way to make anonymous
20521 functions by partial application of operators.")
20522 (license license:bsd-3)))
20523
20524 (define-public python2-whatever
20525 (package-with-python2 python-whatever))
20526
20527 (define-public python-funcy
20528 (package
20529 (name "python-funcy")
20530 (version "1.11")
20531 (source
20532 (origin
20533 (method git-fetch)
20534 (uri (git-reference
20535 (url "https://github.com/Suor/funcy")
20536 (commit version)))
20537 (sha256
20538 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
20539 (file-name (git-file-name name version))))
20540 (build-system python-build-system)
20541 (arguments
20542 `(#:phases
20543 (modify-phases %standard-phases
20544 (replace 'check
20545 (lambda _
20546 (invoke "py.test"))))))
20547 (native-inputs
20548 `(("python-pytest" ,python-pytest)
20549 ("python-whatever" ,python-whatever)))
20550 (home-page "https://github.com/Suor/funcy")
20551 (synopsis "Functional tools")
20552 (description "@code{funcy} is a library that provides functional tools.
20553 Examples are:
20554 @enumerate
20555 @item merge - Merges collections of the same type
20556 @item walk - Type-preserving map
20557 @item select - Selects a part of a collection
20558 @item take - Takes the first n items of a collection
20559 @item first - Takes the first item of a collection
20560 @item remove - Predicated-removes items of a collection
20561 @item concat - Concatenates two collections
20562 @item flatten - Flattens a collection with subcollections
20563 @item distinct - Returns only distinct items
20564 @item split - Predicated-splits a collection
20565 @item split_at - Splits a collection at a given item
20566 @item group_by - Groups items by group
20567 @item pairwise - Pairs off adjacent items
20568 @item partial - Partially-applies a function
20569 @item curry - Curries a function
20570 @item compose - Composes functions
20571 @item complement - Complements a predicate
20572 @item all_fn - \"all\" with predicate
20573 @end enumerate")
20574 (license license:bsd-3)))
20575
20576 (define-public python2-funcy
20577 (package-with-python2 python-funcy))
20578
20579 (define-public python-isoweek
20580 (package
20581 (name "python-isoweek")
20582 (version "1.3.3")
20583 (source
20584 (origin
20585 (method url-fetch)
20586 (uri (pypi-uri "isoweek" version))
20587 (sha256
20588 (base32
20589 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
20590 (build-system python-build-system)
20591 (home-page "https://github.com/gisle/isoweek")
20592 (synopsis "Objects representing a week")
20593 (description "The @code{isoweek} module provide the class Week that
20594 implements the week definition of ISO 8601. This standard also defines
20595 a notation for identifying weeks; yyyyWww (where the W is a literal).
20596 Week instances stringify to this form.")
20597 (license license:bsd-3)))
20598
20599 (define-public python2-isoweek
20600 (package-with-python2 python-isoweek))
20601
20602 (define-public python-pyzbar
20603 (package
20604 (name "python-pyzbar")
20605 (version "0.1.8")
20606 (source
20607 (origin
20608 ;; There's no source tarball on PyPI.
20609 (method git-fetch)
20610 (uri (git-reference
20611 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
20612 (commit (string-append "v" version))))
20613 (file-name (git-file-name name version))
20614 (sha256
20615 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
20616 (build-system python-build-system)
20617 (arguments
20618 `(#:phases
20619 (modify-phases %standard-phases
20620 (add-after 'unpack 'remove-failing-test
20621 (lambda _
20622 ;; This tests if find_library was called once, but we remove
20623 ;; the call in the stage below to make the library find libzbar.
20624 (delete-file "pyzbar/tests/test_zbar_library.py")
20625 #t))
20626 (add-before 'build 'set-library-file-name
20627 (lambda* (#:key inputs #:allow-other-keys)
20628 (let ((libzbar (assoc-ref inputs "zbar")))
20629 (substitute* "pyzbar/zbar_library.py"
20630 (("find_library\\('zbar'\\)")
20631 (string-append "'" libzbar "/lib/libzbar.so.0'")))
20632 #t))))))
20633 (native-inputs
20634 `(("pkg-config" ,pkg-config)
20635 ("python-numpy" ,python-numpy)
20636 ("python-pillow" ,python-pillow)))
20637 (inputs
20638 `(("zbar" ,zbar)))
20639 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
20640 (synopsis "Read one-dimensional barcodes and QR codes")
20641 (description
20642 "Read one-dimensional barcodes and QR codes using the zbar library.
20643
20644 Features:
20645
20646 @itemize
20647 @item Pure python
20648 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
20649 @item Decodes locations of barcodes
20650 @item No dependencies, other than the zbar library itself
20651 @end itemize")
20652 (license license:expat)))
20653
20654 (define-public python-tokenize-rt
20655 (package
20656 (name "python-tokenize-rt")
20657 (version "2.0.1")
20658 (source
20659 (origin
20660 (method url-fetch)
20661 (uri (pypi-uri "tokenize-rt" version))
20662 (sha256
20663 (base32
20664 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
20665 (build-system python-build-system)
20666 (home-page "https://github.com/asottile/tokenize-rt")
20667 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
20668 (description
20669 "This Python library is a wrapper around @code{tokenize} from the Python
20670 standard library. It provides two additional tokens @code{ESCAPED_NL} and
20671 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
20672 and @code{tokens_to_src} to roundtrip.")
20673 (license license:expat)))
20674
20675 (define-public python-future-fstrings
20676 (package
20677 (name "python-future-fstrings")
20678 (version "0.4.1")
20679 (source
20680 (origin
20681 (method url-fetch)
20682 (uri (pypi-uri "future_fstrings" version))
20683 (sha256
20684 (base32
20685 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
20686 (build-system python-build-system)
20687 (propagated-inputs
20688 `(("python-tokenize-rt" ,python-tokenize-rt)))
20689 (home-page "https://github.com/asottile/future-fstrings")
20690 (synopsis "Backport of fstrings to Python < 3.6")
20691 (description
20692 "This package provides a UTF-8 compatible encoding
20693 @code{future_fstrings}, which performs source manipulation. It decodes the
20694 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
20695 @code{f} strings.")
20696 (license license:expat)))
20697
20698 (define-public python-typed-ast
20699 (package
20700 (name "python-typed-ast")
20701 (version "1.4.2")
20702 (source
20703 (origin
20704 (method git-fetch)
20705 (uri (git-reference
20706 (url "https://github.com/python/typed_ast")
20707 (commit version)))
20708 (sha256
20709 (base32 "1wr6pkvvrq6rzjjw88pd5xy8fy06msam4hlxbkglvdmwh4c083l0"))
20710 (file-name (git-file-name name version))))
20711 (build-system python-build-system)
20712 (arguments
20713 `(#:phases
20714 (modify-phases %standard-phases
20715 (replace 'check
20716 (lambda _
20717 (invoke "pytest"))))))
20718 (native-inputs `(("python-pytest" ,python-pytest)))
20719 (home-page "https://github.com/python/typed_ast")
20720 (synopsis "Fork of Python @code{ast} modules with type comment support")
20721 (description "This package provides a parser similar to the standard
20722 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
20723 include PEP 484 type comments and are independent of the version of Python
20724 under which they are run. The @code{typed_ast} parsers produce the standard
20725 Python AST (plus type comments), and are both fast and correct, as they are
20726 based on the CPython 2.7 and 3.7 parsers.")
20727 ;; See the file "LICENSE" for the details.
20728 (license (list license:psfl
20729 license:asl2.0
20730 license:expat)))) ;ast27/Parser/spark.py
20731
20732 (define-public python-typer
20733 (package
20734 (name "python-typer")
20735 (version "0.3.2")
20736 (source
20737 (origin
20738 ;; Building `python-typer` from the git repository requires the `flit-core`
20739 ;; Python package that is not installed by `python-flit`.
20740 (method url-fetch)
20741 (uri (pypi-uri "typer" version))
20742 (sha256
20743 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
20744 (build-system python-build-system)
20745 (arguments
20746 `(#:phases
20747 (modify-phases %standard-phases
20748 (add-before 'check 'disable-failing-tests
20749 (lambda _
20750 (substitute* "tests/test_completion/test_completion.py"
20751 (("def test_show_completion")
20752 "def _test_show_completion")
20753 (("def test_install_completion")
20754 "def _test_install_completion"))
20755 (substitute* "tests/test_completion/test_completion_install.py"
20756 (("def test_completion_install_bash")
20757 "def _test_completion_install_bash")
20758 (("def test_completion_install_zsh")
20759 "def _test_completion_install_zsh")
20760 (("def test_completion_install_fish")
20761 "def _test_completion_install_fish")
20762 (("def test_completion_install_powershell")
20763 "def _test_completion_install_powershell"))
20764 #t))
20765 (replace 'check
20766 (lambda _
20767 (setenv "PYTHONPATH"
20768 (string-append (getcwd) ":"
20769 (getenv "PYTHONPATH")))
20770 (invoke "python" "-m" "pytest" "tests/")
20771 #t)))))
20772 (propagated-inputs
20773 `(("python-click" ,python-click)))
20774 (native-inputs
20775 `(("python-coverage" ,python-coverage)
20776 ("python-pytest" ,python-pytest)
20777 ("python-shellingham" ,python-shellingham)))
20778 (home-page "https://github.com/tiangolo/typer")
20779 (synopsis
20780 "Typer builds CLI based on Python type hints")
20781 (description
20782 "Typer is a library for building CLI applications. It's based on
20783 Python 3.6+ type hints.")
20784 ;; MIT license
20785 (license license:expat)))
20786
20787 (define-public python-typing
20788 (package
20789 (name "python-typing")
20790 (version "3.7.4.3")
20791 (source
20792 (origin
20793 (method url-fetch)
20794 (uri (pypi-uri "typing" version))
20795 (sha256
20796 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
20797 (build-system python-build-system)
20798 (home-page "https://docs.python.org/3/library/typing.html")
20799 (synopsis "Type hints for Python")
20800 (description "This is a backport of the standard library @code{typing}
20801 module to Python versions older than 3.5. Typing defines a standard notation
20802 for Python function and variable type annotations. The notation can be used
20803 for documenting code in a concise, standard format, and it has been designed
20804 to also be used by static and runtime type checkers, static analyzers, IDEs
20805 and other tools.")
20806 (license license:psfl)))
20807
20808 (define-public python2-typing
20809 (package-with-python2 python-typing))
20810
20811 (define-public python-typing-extensions
20812 (package
20813 (name "python-typing-extensions")
20814 (version "3.7.4.3")
20815 (source
20816 (origin
20817 (method url-fetch)
20818 (uri (pypi-uri "typing_extensions" version))
20819 (sha256
20820 (base32
20821 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20822 (build-system python-build-system)
20823 (home-page
20824 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20825 (synopsis "Experimental type hints for Python")
20826 (description
20827 "The typing_extensions module contains additional @code{typing} hints not
20828 yet present in the of the @code{typing} standard library.
20829 Included are implementations of:
20830 @enumerate
20831 @item ClassVar
20832 @item ContextManager
20833 @item Counter
20834 @item DefaultDict
20835 @item Deque
20836 @item NewType
20837 @item NoReturn
20838 @item overload
20839 @item Protocol
20840 @item runtime
20841 @item Text
20842 @item Type
20843 @item TYPE_CHECKING
20844 @item AsyncGenerator
20845 @end enumerate\n")
20846 (license license:psfl)))
20847
20848 (define-public bpython
20849 (package
20850 (name "bpython")
20851 (version "0.21")
20852 (source
20853 (origin
20854 (method url-fetch)
20855 (uri (pypi-uri "bpython" version))
20856 (sha256
20857 (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
20858 (build-system python-build-system)
20859 (arguments
20860 `(#:phases
20861 (modify-phases %standard-phases
20862 (add-after 'unpack 'remove-failing-test
20863 (lambda _
20864 ;; Remove failing test. FIXME: make it pass
20865 (delete-file "bpython/test/test_args.py")
20866 #t))
20867 (add-after 'wrap 'add-aliases
20868 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20869 (lambda* (#:key outputs #:allow-other-keys)
20870 (let ((out (assoc-ref outputs "out")))
20871 (for-each
20872 (lambda (old new)
20873 (symlink old (string-append out "/bin/" new)))
20874 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20875 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20876 #t)))))
20877 (propagated-inputs
20878 `(("python-pygments" ,python-pygments)
20879 ("python-requests" ,python-requests)
20880 ("python-curtsies" ,python-curtsies)
20881 ("python-greenlet" ,python-greenlet)
20882 ("python-six" ,python-six)
20883 ("python-cwcwidth" ,python-cwcwidth)
20884 ("python-pyxdg" ,python-pyxdg)
20885 ;; optional dependencies
20886 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20887 ("python-watchdog" ,python-watchdog)
20888 ("python-jedi" ,python-jedi)))
20889 (native-inputs
20890 `(("python-sphinx" ,python-sphinx)
20891 ("python-mock" ,python-mock)
20892 ("python-tox" ,python-tox)
20893 ("python-wheel" ,python-wheel)))
20894 (home-page "https://bpython-interpreter.org/")
20895 (synopsis "Fancy interface to the Python interpreter")
20896 (description "Bpython is a fancy interface to the Python
20897 interpreter. bpython's main features are
20898
20899 @enumerate
20900 @item in-line syntax highlighting,
20901 @item readline-like autocomplete with suggestions displayed as you type,
20902 @item expected parameter list for any Python function,
20903 @item \"rewind\" function to pop the last line of code from memory and
20904 re-evaluate,
20905 @item send the code you've entered off to a pastebin,
20906 @item save the code you've entered to a file, and
20907 @item auto-indentation.
20908 @end enumerate")
20909 (license license:expat)))
20910
20911 (define-public python-pyinotify
20912 (package
20913 (name "python-pyinotify")
20914 (version "0.9.6")
20915 (source (origin
20916 (method url-fetch)
20917 (uri (pypi-uri "pyinotify" version))
20918 (sha256
20919 (base32
20920 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20921 (build-system python-build-system)
20922 (arguments `(#:tests? #f)) ;no tests
20923 (home-page "https://github.com/seb-m/pyinotify")
20924 (synopsis "Python library for monitoring inotify events")
20925 (description
20926 "@code{pyinotify} provides a Python interface for monitoring
20927 file system events on Linux.")
20928 (license license:expat)))
20929
20930 (define-public python2-pyinotify
20931 (package-with-python2 python-pyinotify))
20932
20933 ;; Ada parser uses this version.
20934 (define-public python2-quex-0.67.3
20935 (package
20936 (name "python2-quex")
20937 (version "0.67.3")
20938 (source
20939 (origin
20940 (method url-fetch)
20941 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20942 (version-major+minor version)
20943 "/quex-" version ".zip"))
20944 (sha256
20945 (base32
20946 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20947 (build-system python-build-system)
20948 (native-inputs
20949 `(("unzip" ,unzip)))
20950 (arguments
20951 `(#:python ,python-2
20952 #:tests? #f
20953 #:phases
20954 (modify-phases %standard-phases
20955 (delete 'configure)
20956 (delete 'build)
20957 (replace 'install
20958 (lambda* (#:key outputs #:allow-other-keys)
20959 (let* ((out (assoc-ref outputs "out"))
20960 (share/quex (string-append out "/share/quex"))
20961 (bin (string-append out "/bin")))
20962 (copy-recursively "." share/quex)
20963 (mkdir-p bin)
20964 (symlink (string-append share/quex "/quex-exe.py")
20965 (string-append bin "/quex"))
20966 #t))))))
20967 (native-search-paths
20968 (list (search-path-specification
20969 (variable "QUEX_PATH")
20970 (files '("share/quex")))))
20971 (home-page "http://quex.sourceforge.net/")
20972 (synopsis "Lexical analyzer generator in Python")
20973 (description "@code{quex} is a lexical analyzer generator in Python.")
20974 (license license:lgpl2.1+))) ; Non-military
20975
20976 (define-public python2-quex
20977 (package (inherit python2-quex-0.67.3)
20978 (name "python2-quex")
20979 (version "0.68.1")
20980 (source
20981 (origin
20982 (method url-fetch)
20983 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20984 (sha256
20985 (base32
20986 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20987 (file-name (string-append name "-" version ".tar.gz"))))))
20988
20989 (define-public python-more-itertools
20990 (package
20991 (name "python-more-itertools")
20992 (version "8.2.0")
20993 (source
20994 (origin
20995 (method url-fetch)
20996 (uri (pypi-uri "more-itertools" version))
20997 (sha256
20998 (base32
20999 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
21000 (build-system python-build-system)
21001 (home-page "https://github.com/erikrose/more-itertools")
21002 (synopsis "More routines for operating on iterables, beyond itertools")
21003 (description "Python's built-in @code{itertools} module implements a
21004 number of iterator building blocks inspired by constructs from APL, Haskell,
21005 and SML. @code{more-itertools} includes additional building blocks for
21006 working with iterables.")
21007 (properties `((python2-variant . ,(delay python2-more-itertools))))
21008 (license license:expat)))
21009
21010 ;; The 5.x series are the last versions supporting Python 2.7.
21011 (define-public python2-more-itertools
21012 (package
21013 (inherit python-more-itertools)
21014 (name "python2-more-itertools")
21015 (version "5.0.0")
21016 (source (origin
21017 (method url-fetch)
21018 (uri (pypi-uri "more-itertools" version))
21019 (sha256
21020 (base32
21021 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
21022 (arguments
21023 `(#:python ,python-2))
21024 (propagated-inputs
21025 `(("python2-six" ,python2-six-bootstrap)))))
21026
21027 (define-public python-latexcodec
21028 (package
21029 (name "python-latexcodec")
21030 (version "1.0.7")
21031 (source
21032 (origin
21033 (method url-fetch)
21034 (uri (pypi-uri "latexcodec" version))
21035 (sha256
21036 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
21037 (build-system python-build-system)
21038 (inputs
21039 `(("python-six" ,python-six)))
21040 (home-page "https://readthedocs.org/projects/latexcodec/")
21041 (synopsis "Work with LaTeX code in Python")
21042 (description "Lexer and codec to work with LaTeX code in Python.")
21043 (license license:expat)))
21044
21045 (define-public python-pybtex
21046 (package
21047 (name "python-pybtex")
21048 (version "0.22.2")
21049 (source
21050 (origin
21051 (method url-fetch)
21052 (uri (pypi-uri "pybtex" version))
21053 (sha256
21054 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
21055 (build-system python-build-system)
21056 (native-inputs
21057 `(("python-nose" ,python-nose)))
21058 (inputs
21059 `(("python-latexcodec" ,python-latexcodec)
21060 ("python-pyyaml" ,python-pyyaml)
21061 ("python-six" ,python-six)))
21062 (arguments
21063 `(#:test-target "nosetests"))
21064 (home-page "https://pybtex.org/")
21065 (synopsis "BibTeX-compatible bibliography processor")
21066 (description "Pybtex is a BibTeX-compatible bibliography processor written
21067 in Python. You can simply type pybtex instead of bibtex.")
21068 (license license:expat)))
21069
21070 (define-public python-onetimepass
21071 (package
21072 (name "python-onetimepass")
21073 (version "1.0.1")
21074 (source
21075 (origin
21076 (method url-fetch)
21077 (uri (pypi-uri "onetimepass" version))
21078 (sha256
21079 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
21080 (build-system python-build-system)
21081 (propagated-inputs `(("python-six" ,python-six)))
21082 (home-page "https://github.com/tadeck/onetimepass/")
21083 (synopsis "One-time password library")
21084 (description "Python one-time password library for HMAC-based (HOTP) and
21085 time-based (TOTP) passwords.")
21086 (license license:expat)))
21087
21088 (define-public python-parso
21089 (package
21090 (name "python-parso")
21091 (version "0.8.2")
21092 (source
21093 (origin
21094 (method url-fetch)
21095 (uri (pypi-uri "parso" version))
21096 (sha256
21097 (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
21098 (native-inputs
21099 `(("python-pytest" ,python-pytest)))
21100 (build-system python-build-system)
21101 (arguments
21102 `(#:phases (modify-phases %standard-phases
21103 (replace 'check
21104 (lambda _ (invoke "pytest" "-vv"))))))
21105 (home-page "https://github.com/davidhalter/parso")
21106 (synopsis "Python Parser")
21107 (description "Parso is a Python parser that supports error recovery and
21108 round-trip parsing for different Python versions (in multiple Python versions).
21109 Parso is also able to list multiple syntax errors in your Python file.")
21110 (license license:expat)))
21111
21112 (define-public python2-parso
21113 (package-with-python2 python-parso))
21114
21115 (define-public python-async-generator
21116 (package
21117 (name "python-async-generator")
21118 (version "1.10")
21119 (source
21120 (origin
21121 (method url-fetch)
21122 (uri (pypi-uri "async_generator" version))
21123 (sha256
21124 (base32
21125 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
21126 (build-system python-build-system)
21127 (native-inputs
21128 `(("python-pytest" ,python-pytest)))
21129 (home-page "https://github.com/python-trio/async_generator")
21130 (synopsis "Async generators and context managers for Python 3.5+")
21131 (description "@code{async_generator} back-ports Python 3.6's native async
21132 generators and Python 3.7's context managers into Python 3.5.")
21133 ;; Dual licensed.
21134 (license (list license:expat license:asl2.0))))
21135
21136 (define-public python-async-timeout
21137 (package
21138 (name "python-async-timeout")
21139 (version "3.0.1")
21140 (source
21141 (origin
21142 (method url-fetch)
21143 (uri (pypi-uri "async-timeout" version))
21144 (sha256
21145 (base32
21146 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
21147 (build-system python-build-system)
21148 (home-page "https://github.com/aio-libs/async_timeout/")
21149 (synopsis "Timeout context manager for asyncio programs")
21150 (description "@code{async-timeout} provides a timeout timeout context
21151 manager compatible with @code{asyncio}.")
21152 (license license:asl2.0)))
21153
21154 (define-public python-glob2
21155 (package
21156 (name "python-glob2")
21157 (version "0.7")
21158 (source
21159 (origin
21160 (method git-fetch)
21161 (uri (git-reference
21162 (url "https://github.com/miracle2k/python-glob2")
21163 (commit (string-append "v" version))))
21164 (file-name (git-file-name name version))
21165 (sha256
21166 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
21167 (build-system python-build-system)
21168 (home-page "https://github.com/miracle2k/python-glob2/")
21169 (synopsis "Extended Version of the python buildin glob module")
21170 (description "This is an extended version of the Python
21171 @url{http://docs.python.org/library/glob.html, built-in glob module} which
21172 adds:
21173
21174 @itemize
21175 @item The ability to capture the text matched by glob patterns, and return
21176 those matches alongside the file names.
21177 @item A recursive @code{**} globbing syntax, akin for example to the
21178 @code{globstar} option of Bash.
21179 @item The ability to replace the file system functions used, in order to glob
21180 on virtual file systems.
21181 @item Compatible with Python 2 and Python 3 (tested with 3.3).
21182 @end itemize
21183
21184 Glob2 currently based on the glob code from Python 3.3.1.")
21185 (license license:bsd-2)))
21186
21187 (define-public python2-glob2
21188 (package-with-python2 python-glob2))
21189
21190 (define-public python-gipc
21191 (package
21192 (name "python-gipc")
21193 (version "0.6.0")
21194 (source
21195 (origin
21196 (method url-fetch)
21197 (uri (pypi-uri "gipc" version ".zip"))
21198 (sha256
21199 (base32
21200 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
21201 (build-system python-build-system)
21202 (native-inputs
21203 `(("unzip" ,unzip)))
21204 (propagated-inputs
21205 `(("python-gevent" ,python-gevent)))
21206 (home-page "https://gehrcke.de/gipc/")
21207 (synopsis "Child process management in the context of gevent")
21208 (description "Usage of Python's multiprocessing package in a
21209 gevent-powered application may raise problems. With @code{gipc},
21210 process-based child processes can safely be created anywhere within a
21211 gevent-powered application.")
21212 (license license:expat)))
21213
21214 (define-public python-beautifultable
21215 (package
21216 (name "python-beautifultable")
21217 (version "1.0.0")
21218 (source
21219 (origin
21220 (method url-fetch)
21221 (uri (pypi-uri "beautifultable" version))
21222 (sha256
21223 (base32
21224 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
21225 (build-system python-build-system)
21226 (propagated-inputs
21227 `(("python-wcwidth" ,python-wcwidth)))
21228 (arguments
21229 `(#:phases
21230 (modify-phases %standard-phases
21231 (add-after 'unpack 'patch-setup.py
21232 (lambda _
21233 (substitute* "setup.py"
21234 (("setup\\(")
21235 "setup(\n test_suite=\"test\",")))))))
21236 (home-page "https://github.com/pri22296/beautifultable")
21237 (synopsis "Print ASCII tables for terminals")
21238 (description "@code{python-beautifultable} provides a class for easily
21239 printing tabular data in a visually appealing ASCII format to a terminal.
21240
21241 Features include, but are not limited to:
21242 @itemize
21243 @item Full customization of the look and feel of the table
21244 @item Row and column accessors.
21245 @item Full support for colors using ANSI sequences or any library.
21246 @item Plenty of predefined styles and option to create custom ones.
21247 @item Support for Unicode characters.
21248 @item Supports streaming table when data is slow to retrieve.
21249 @end itemize")
21250 (license license:expat)))
21251
21252 (define-public python-globber
21253 (package
21254 (name "python-globber")
21255 (version "0.2.1")
21256 (source
21257 (origin
21258 (method git-fetch)
21259 (uri (git-reference
21260 (url "https://github.com/asharov/globber")
21261 (commit version)))
21262 (file-name (git-file-name name version))
21263 (sha256
21264 (base32
21265 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
21266 (build-system python-build-system)
21267 (home-page "https://github.com/asharov/globber")
21268 (synopsis "Library for string matching with glob patterns")
21269 (description
21270 "Globber is a Python library for matching file names against glob patterns.
21271 In contrast to other glob-matching libraries, it matches arbitrary strings and
21272 doesn't require the matched names to be existing files. In addition, it
21273 supports the globstar @code{**} operator to match an arbitrary number of
21274 path components.")
21275 (license license:asl2.0)))
21276
21277 (define-public python-git-hammer
21278 (package
21279 (name "python-git-hammer")
21280 (version "0.3.1")
21281 (source
21282 (origin
21283 (method git-fetch)
21284 (uri (git-reference
21285 (url "https://github.com/asharov/git-hammer")
21286 (commit version)))
21287 (file-name (git-file-name name version))
21288 (sha256
21289 (base32
21290 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
21291 (build-system python-build-system)
21292 (arguments
21293 `(#:phases
21294 (modify-phases %standard-phases
21295 (add-after 'unpack 'patch-setup.py
21296 (lambda _
21297 (substitute* "setup.py"
21298 (("setup\\(")
21299 "setup(\n test_suite=\"test\",")))))))
21300 (propagated-inputs
21301 `(("python-beautifultable" ,python-beautifultable)
21302 ("python-dateutil" ,python-dateutil)
21303 ("python-gitpython" ,python-gitpython)
21304 ("python-globber" ,python-globber)
21305 ("python-matplotlib" ,python-matplotlib)
21306 ("python-sqlalchemy" ,python-sqlalchemy)
21307 ("python-sqlalchemy-utils"
21308 ,python-sqlalchemy-utils)))
21309 (home-page "https://github.com/asharov/git-hammer")
21310 (synopsis "Provide statistics for git repositories")
21311 (description
21312 "Git Hammer is a statistics tool for projects in git repositories.
21313 Its major feature is tracking the number of lines authored by each person for every
21314 commit, but it also includes some other useful statistics.")
21315 (license license:asl2.0)))
21316
21317 (define-public python-fusepy
21318 (package
21319 (name "python-fusepy")
21320 (version "2.0.4")
21321 (source
21322 (origin
21323 (method url-fetch)
21324 (uri (pypi-uri "fusepy" version))
21325 (sha256
21326 (base32
21327 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
21328 (build-system python-build-system)
21329 (arguments
21330 `(#:phases
21331 (modify-phases %standard-phases
21332 (add-before 'build 'set-library-file-name
21333 (lambda* (#:key inputs #:allow-other-keys)
21334 (let ((fuse (assoc-ref inputs "fuse")))
21335 (substitute* "fuse.py"
21336 (("find_library\\('fuse'\\)")
21337 (string-append "'" fuse "/lib/libfuse.so'")))
21338 #t))))))
21339 (propagated-inputs
21340 `(("fuse" ,fuse)))
21341 (home-page "https://github.com/fusepy/fusepy")
21342 (synopsis "Simple ctypes bindings for FUSE")
21343 (description "Python module that provides a simple interface to FUSE and
21344 MacFUSE. The binding is created using the standard @code{ctypes} library.")
21345 (license license:isc)))
21346
21347 (define-public python2-fusepy
21348 (package-with-python2 python-fusepy))
21349
21350 (define-public python-fusepyng
21351 (package
21352 (name "python-fusepyng")
21353 (version "1.0.7")
21354 (source
21355 (origin
21356 (method url-fetch)
21357 (uri (pypi-uri "fusepyng" version))
21358 (sha256
21359 (base32
21360 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
21361 (build-system python-build-system)
21362 (arguments
21363 '(#:phases
21364 (modify-phases %standard-phases
21365 (add-after 'unpack 'set-libfuse-path
21366 (lambda* (#:key inputs #:allow-other-keys)
21367 (let ((fuse (assoc-ref inputs "fuse")))
21368 (substitute* "fusepyng.py"
21369 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
21370 (string-append "\"" fuse "/lib/libfuse.so\""))))
21371 #t)))))
21372 (inputs
21373 `(("fuse" ,fuse)))
21374 (propagated-inputs
21375 `(("python-paramiko" ,python-paramiko)))
21376 (home-page "https://github.com/rianhunter/fusepyng")
21377 (synopsis "Simple ctypes bindings for FUSE")
21378 (description "@code{fusepyng} is a Python module that provides a simple
21379 interface to FUSE on various operating systems. It's just one file and is
21380 implemented using @code{ctypes}.")
21381 (license license:isc)))
21382
21383 (define-public python-userspacefs
21384 (package
21385 (name "python-userspacefs")
21386 (version "2.0.3")
21387 (source
21388 (origin
21389 (method url-fetch)
21390 (uri (pypi-uri "userspacefs" version))
21391 (sha256
21392 (base32
21393 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
21394 (build-system python-build-system)
21395 (propagated-inputs
21396 `(("python-fusepyng" ,python-fusepyng)))
21397 (home-page "https://github.com/rianhunter/userspacefs")
21398 (synopsis "User-space file systems for Python")
21399 (description
21400 "@code{userspacefs} is a library that allows you to easily write
21401 user-space file systems in Python.")
21402 (license license:gpl3+)))
21403
21404 (define-public python-stone
21405 (package
21406 (name "python-stone")
21407 (version "3.2.1")
21408 (source
21409 (origin
21410 (method url-fetch)
21411 (uri (pypi-uri "stone" version))
21412 (sha256
21413 (base32
21414 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
21415 (build-system python-build-system)
21416 (arguments
21417 `(#:phases
21418 (modify-phases %standard-phases
21419 (add-after 'unpack 'change-version-requirements
21420 (lambda _
21421 ;; Match the requirement in test/requirements.txt
21422 (substitute* "setup.py"
21423 (("pytest < 5") "pytest < 7"))
21424 ;; We don't care about a coverage report.
21425 (substitute* "test/requirements.txt"
21426 (("coverage.*") "coverage\n"))))
21427 (replace 'check
21428 (lambda* (#:key tests? #:allow-other-keys)
21429 (when tests?
21430 ;; These tests don't import currectly.
21431 (delete-file "test/test_js_client.py")
21432 (delete-file "test/test_tsd_types.py")
21433 (delete-file "test/test_python_gen.py")
21434 (invoke "pytest")))))))
21435 (propagated-inputs
21436 `(("python-ply" ,python-ply)
21437 ("python-six" ,python-six)))
21438 (native-inputs
21439 `(("python-coverage" ,python-coverage)
21440 ("python-mock" ,python-mock)
21441 ("python-pytest" ,python-pytest)
21442 ("python-pytest-runner" ,python-pytest-runner)))
21443 (home-page "https://github.com/dropbox/stone")
21444 (synopsis "Official Api Spec Language for Dropbox")
21445 (description
21446 "Stone is an interface description language (IDL) for APIs.")
21447 (license license:expat)))
21448
21449 (define-public pybind11
21450 (package
21451 (name "pybind11")
21452 (version "2.6.2")
21453 (source (origin
21454 (method git-fetch)
21455 (uri (git-reference
21456 (url "https://github.com/pybind/pybind11")
21457 (commit (string-append "v" version))))
21458 (sha256
21459 (base32
21460 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
21461 (file-name (git-file-name name version))))
21462 (build-system cmake-build-system)
21463 (native-inputs
21464 `(("python" ,python-wrapper)
21465
21466 ;; The following dependencies are used for tests.
21467 ("python-pytest" ,python-pytest)
21468 ("catch" ,catch-framework2-1)
21469 ("eigen" ,eigen)))
21470 (arguments
21471 `(#:configure-flags
21472 (list (string-append "-DCATCH_INCLUDE_DIR="
21473 (assoc-ref %build-inputs "catch")
21474 "/include/catch"))
21475
21476 #:phases (modify-phases %standard-phases
21477 (add-after 'install 'install-python
21478 (lambda* (#:key outputs #:allow-other-keys)
21479 (let ((out (assoc-ref outputs "out")))
21480 (with-directory-excursion "../source"
21481 (setenv "PYBIND11_USE_CMAKE" "yes")
21482 (invoke "python" "setup.py" "install"
21483 "--single-version-externally-managed"
21484 "--root=/"
21485 (string-append "--prefix=" out)))))))
21486
21487 #:test-target "check"))
21488 (home-page "https://github.com/pybind/pybind11/")
21489 (synopsis "Seamless operability between C++11 and Python")
21490 (description
21491 "@code{pybind11} is a lightweight header-only library that exposes C++
21492 types in Python and vice versa, mainly to create Python bindings of existing
21493 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
21494 library: to minimize boilerplate code in traditional extension modules by
21495 inferring type information using compile-time introspection.")
21496 (license license:bsd-3)))
21497
21498 (define-public python-pooch
21499 (package
21500 (name "python-pooch")
21501 (version "1.3.0")
21502 (source
21503 (origin
21504 (method url-fetch)
21505 (uri (pypi-uri "pooch" version))
21506 (sha256
21507 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
21508 (build-system python-build-system)
21509 (arguments
21510 `(#:tests? #f)) ;requires online data
21511 (propagated-inputs
21512 `(("python-appdirs" ,python-appdirs)
21513 ("python-packaging" ,python-packaging)
21514 ("python-requests" ,python-requests)))
21515 (home-page "https://github.com/fatiando/pooch")
21516 (synopsis "Manage your Python library's sample data files")
21517 (description
21518 "Pooch manages your Python library's sample data files: it automatically
21519 downloads and stores them in a local directory, with support for versioning
21520 and corruption checks.")
21521 (license license:bsd-3)))
21522
21523 (define-public python-fasteners
21524 (package
21525 (name "python-fasteners")
21526 (version "0.15")
21527 (source
21528 (origin
21529 (method url-fetch)
21530 (uri (pypi-uri "fasteners" version))
21531 (sha256
21532 (base32
21533 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
21534 (build-system python-build-system)
21535 (propagated-inputs
21536 `(("python-monotonic" ,python-monotonic)
21537 ("python-six" ,python-six)))
21538 (native-inputs
21539 `(("python-testtools" ,python-testtools)))
21540 (home-page "https://github.com/harlowja/fasteners")
21541 (synopsis "Python package that provides useful locks")
21542 (description
21543 "This package provides a Python program that provides following locks:
21544
21545 @itemize
21546 @item Locking decorator
21547 @item Reader-writer locks
21548 @item Inter-process locks
21549 @item Generic helpers
21550 @end itemize\n")
21551 (license license:asl2.0)))
21552
21553 (define-public python-requests-file
21554 (package
21555 (name "python-requests-file")
21556 (version "1.4.3")
21557 (source
21558 (origin
21559 (method url-fetch)
21560 (uri (pypi-uri "requests-file" version))
21561 (sha256
21562 (base32
21563 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
21564 (build-system python-build-system)
21565 (propagated-inputs
21566 `(("python-requests" ,python-requests)
21567 ("python-six" ,python-six)))
21568 (home-page
21569 "https://github.com/dashea/requests-file")
21570 (synopsis "File transport adapter for Requests")
21571 (description
21572 "Requests-File is a transport adapter for use with the Requests Python
21573 library to allow local file system access via @code{file://} URLs.")
21574 (license license:asl2.0)))
21575
21576 (define-public python2-requests-file
21577 (package-with-python2 python-requests-file))
21578
21579 (define-public python-identify
21580 (package
21581 (name "python-identify")
21582 (version "1.4.25")
21583 (source
21584 (origin
21585 ;; There are no tests in the PyPI tarball.
21586 (method git-fetch)
21587 (uri (git-reference
21588 (url "https://github.com/chriskuehl/identify")
21589 (commit (string-append "v" version))))
21590 (file-name (git-file-name name version))
21591 (sha256
21592 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
21593 (build-system python-build-system)
21594 (arguments
21595 `(#:phases
21596 (modify-phases %standard-phases
21597 ;; system-error "utime" "~A" ("No such file or directory")
21598 (delete 'ensure-no-mtimes-pre-1980)
21599 (replace 'check
21600 (lambda* (#:key tests? #:allow-other-keys)
21601 (when tests?
21602 (invoke "pytest" "-vv")))))))
21603 (native-inputs
21604 `(("python-coverage" ,python-coverage)
21605 ("python-pytest" ,python-pytest)))
21606 (propagated-inputs
21607 `(("python-editdistance" ,python-editdistance)))
21608 (home-page "https://github.com/chriskuehl/identify")
21609 (synopsis "File identification library for Python")
21610 (description
21611 "@code{identify} is a file identification library for Python. Given
21612 a file (or some information about a file), return a set of standardized tags
21613 identifying what the file is.")
21614 (license license:expat)))
21615
21616 (define-public python-tldextract
21617 (package
21618 (name "python-tldextract")
21619 (version "2.2.0")
21620 (source
21621 (origin
21622 (method url-fetch)
21623 (uri (pypi-uri "tldextract" version))
21624 (sha256
21625 (base32
21626 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
21627 (build-system python-build-system)
21628 (native-inputs
21629 `(("python-pytest" ,python-pytest)
21630 ("python-responses" ,python-responses)))
21631 (propagated-inputs
21632 `(("python-idna" ,python-idna)
21633 ("python-requests" ,python-requests)
21634 ("python-requests-file" ,python-requests-file)))
21635 (home-page
21636 "https://github.com/john-kurkowski/tldextract")
21637 (synopsis
21638 "Separate the TLD from the registered domain and subdomains of a URL")
21639 (description
21640 "TLDExtract accurately separates the TLD from the registered domain and
21641 subdomains of a URL, using the Public Suffix List. By default, this includes
21642 the public ICANN TLDs and their exceptions. It can optionally support the
21643 Public Suffix List's private domains as well.")
21644 (license license:bsd-3)))
21645
21646 (define-public python2-tldextract
21647 (package-with-python2 python-tldextract))
21648
21649 (define-public python-tldr
21650 (package
21651 (name "python-tldr")
21652 (version "1.2.1")
21653 (source
21654 (origin
21655 ;; There's no test in PyPI.
21656 (method git-fetch)
21657 (uri (git-reference
21658 (url "https://github.com/tldr-pages/tldr-python-client")
21659 (commit version)))
21660 (file-name (git-file-name name version))
21661 (sha256
21662 (base32 "0n9wqvjxspm18vlxf9j9slrcydshk4rkv5nwkrqhfq606n6zvks4"))))
21663 (build-system python-build-system)
21664 (arguments
21665 `(#:phases
21666 (modify-phases %standard-phases
21667 (replace 'check
21668 (lambda* (#:key tests? #:allow-other-keys)
21669 (when tests?
21670 ;; This test fails. It tries to open a network socket.
21671 (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
21672 (native-inputs
21673 `(("python-pytest" ,python-pytest)
21674 ("python-pytest-runner" ,python-pytest-runner)))
21675 (inputs
21676 `(("python-argcomplete" ,python-argcomplete)
21677 ("python-colorama" ,python-colorama)
21678 ("python-termcolor" ,python-termcolor)))
21679 (home-page "https://github.com/tldr-pages/tldr-python-client")
21680 (synopsis "Python command-line client for tldr pages")
21681 (description "This package provides the @code{tldr} command allowing users
21682 to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
21683 effort to simplify the man pages with practical examples.")
21684 (license license:expat))) ; MIT license
21685
21686 (define-public python-nodeenv
21687 (package
21688 (name "python-nodeenv")
21689 (version "1.4.0")
21690 (source
21691 (origin
21692 ;; There's no tarball in PyPI.
21693 (method git-fetch)
21694 (uri (git-reference
21695 (url "https://github.com/ekalinin/nodeenv")
21696 (commit version)))
21697 (file-name (git-file-name name version))
21698 (sha256
21699 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
21700 (build-system python-build-system)
21701 (arguments
21702 `(#:phases
21703 (modify-phases %standard-phases
21704 (replace 'check
21705 (lambda _
21706 ;; This test fails. It tries to open a network socket.
21707 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
21708 (native-inputs
21709 `(("python-coverage" ,python-coverage)
21710 ("python-mock" ,python-mock)
21711 ("python-pytest" ,python-pytest)))
21712 (home-page "https://ekalinin.github.io/nodeenv/")
21713 (synopsis "Create isolated node.js environments")
21714 (description
21715 "Nodeenv (node.js virtual environment) is a tool to create isolated
21716 node.js environments. It creates an environment that has its own installation
21717 directories, that doesn't share libraries with other node.js virtual
21718 environments.")
21719 (license license:bsd-3)))
21720
21721 (define-public python-pynamecheap
21722 (package
21723 (name "python-pynamecheap")
21724 (version "0.0.3")
21725 (source
21726 (origin
21727 (method url-fetch)
21728 (uri (pypi-uri "PyNamecheap" version))
21729 (sha256
21730 (base32
21731 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
21732 (build-system python-build-system)
21733 (propagated-inputs
21734 `(("python-requests" ,python-requests)))
21735 (home-page
21736 "https://github.com/Bemmu/PyNamecheap")
21737 (synopsis
21738 "Namecheap API client in Python")
21739 (description
21740 "PyNamecheap is a Namecheap API client in Python.")
21741 (license license:expat)))
21742
21743 (define-public python2-pynamecheap
21744 (package-with-python2 python-pynamecheap))
21745
21746 (define-public python-dns-lexicon
21747 (package
21748 (name "python-dns-lexicon")
21749 (version "2.4.0")
21750 (source
21751 (origin
21752 (method url-fetch)
21753 (uri (pypi-uri "dns-lexicon" version))
21754 (sha256
21755 (base32
21756 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
21757 (build-system python-build-system)
21758 (arguments
21759 `(#:tests? #f)) ;requires internet access
21760 (propagated-inputs
21761 `(("python-future" ,python-future)
21762 ("python-pynamecheap" ,python-pynamecheap)
21763 ("python-requests" ,python-requests)
21764 ("python-tldextract" ,python-tldextract)
21765 ("python-urllib3" ,python-urllib3)))
21766 (home-page "https://github.com/AnalogJ/lexicon")
21767 (synopsis
21768 "Manipulate DNS records on various DNS providers")
21769 (description
21770 "Lexicon provides a way to manipulate DNS records on multiple DNS
21771 providers in a standardized way. It has a CLI but it can also be used as a
21772 Python library. It was designed to be used in automation, specifically with
21773 Let's Encrypt.")
21774 (license license:expat)))
21775
21776 (define-public python2-dns-lexicon
21777 (package-with-python2 python-dns-lexicon))
21778
21779 (define-public python-cfgv
21780 (package
21781 (name "python-cfgv")
21782 (version "3.1.0")
21783 (source
21784 (origin
21785 ;; There are no tests in the PyPI tarball.
21786 (method git-fetch)
21787 (uri (git-reference
21788 (url "https://github.com/asottile/cfgv")
21789 (commit (string-append "v" version))))
21790 (file-name (git-file-name name version))
21791 (sha256
21792 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
21793 (build-system python-build-system)
21794 (arguments
21795 `(#:phases
21796 (modify-phases %standard-phases
21797 (replace 'check
21798 (lambda _
21799 (invoke "pytest" "-vv"))))))
21800 (native-inputs
21801 `(("python-covdefaults" ,python-covdefaults)
21802 ("python-coverage" ,python-coverage)
21803 ("python-pytest" ,python-pytest)))
21804 (home-page "https://github.com/asottile/cfgv")
21805 (synopsis "Configuration validation library")
21806 (description
21807 "This library helps to validate configuration files and produce human
21808 readable error messages.")
21809 (license license:expat)))
21810
21811 (define-public python-commandlines
21812 (package
21813 (name "python-commandlines")
21814 (version "0.4.1")
21815 (source
21816 (origin
21817 (method url-fetch)
21818 (uri (pypi-uri "commandlines" version))
21819 (sha256
21820 (base32
21821 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
21822 (build-system python-build-system)
21823 (home-page "https://github.com/chrissimpkins/commandlines")
21824 (synopsis "Command line argument to object parsing library")
21825 (description
21826 "@code{Commandlines} is a Python library for command line application
21827 development that supports command line argument parsing, command string
21828 validation testing and application logic.")
21829 (license license:expat)))
21830
21831 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
21832 ;; python-numba. They have a very unflexible relationship.
21833 (define-public python-numba
21834 (package
21835 (name "python-numba")
21836 (version "0.51.2")
21837 (source
21838 (origin
21839 (method url-fetch)
21840 (uri (pypi-uri "numba" version))
21841 (sha256
21842 (base32
21843 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
21844 (build-system python-build-system)
21845 (arguments
21846 `(#:phases
21847 (modify-phases %standard-phases
21848 (add-after 'unpack 'disable-proprietary-features
21849 (lambda _
21850 (setenv "NUMBA_DISABLE_HSA" "1")
21851 (setenv "NUMBA_DISABLE_CUDA" "1")
21852 #t))
21853 (replace 'check
21854 (lambda* (#:key inputs outputs #:allow-other-keys)
21855 (add-installed-pythonpath inputs outputs)
21856 ;; Something is wrong with the PYTHONPATH when running the
21857 ;; tests from the build directory, as it complains about not being
21858 ;; able to import certain modules.
21859 (with-directory-excursion "/tmp"
21860 (setenv "HOME" (getcwd))
21861 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21862 (propagated-inputs
21863 `(("python-llvmlite" ,python-llvmlite)
21864 ("python-numpy" ,python-numpy)
21865 ("python-singledispatch" ,python-singledispatch)))
21866 (native-inputs ;for tests
21867 `(("python-jinja2" ,python-jinja2)
21868 ("python-pygments" ,python-pygments)))
21869 (home-page "https://numba.pydata.org")
21870 (synopsis "Compile Python code using LLVM")
21871 (description "Numba gives you the power to speed up your applications with
21872 high performance functions written directly in Python. With a few
21873 annotations, array-oriented and math-heavy Python code can be just-in-time
21874 compiled to native machine instructions, similar in performance to C, C++ and
21875 Fortran, without having to switch languages or Python interpreters.
21876
21877 Numba works by generating optimized machine code using the LLVM compiler
21878 infrastructure at import time, runtime, or statically (using the included pycc
21879 tool).")
21880 (license license:bsd-3)))
21881
21882 (define-public python-numcodecs
21883 (package
21884 (name "python-numcodecs")
21885 (version "0.6.4")
21886 (source
21887 (origin
21888 (method url-fetch)
21889 (uri (pypi-uri "numcodecs" version))
21890 (sha256
21891 (base32
21892 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21893 (build-system python-build-system)
21894 (propagated-inputs
21895 `(("python-numpy" ,python-numpy)
21896 ("python-msgpack" ,python-msgpack)))
21897 (native-inputs
21898 `(("python-pytest" ,python-pytest)
21899 ("python-setuptools-scm" ,python-setuptools-scm)))
21900 (home-page "https://github.com/zarr-developers/numcodecs")
21901 (synopsis "Buffer compression and transformation codecs")
21902 (description
21903 "This Python package provides buffer compression and transformation
21904 codecs for use in data storage and communication applications.")
21905 (license license:expat)))
21906
21907 (define-public python-asciitree
21908 (package
21909 (name "python-asciitree")
21910 (version "0.3.3")
21911 (source
21912 (origin
21913 (method url-fetch)
21914 (uri (pypi-uri "asciitree" version))
21915 (sha256
21916 (base32
21917 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21918 (build-system python-build-system)
21919 (home-page "https://github.com/mbr/asciitree")
21920 (synopsis "Draws ASCII trees")
21921 (description "This package draws tree structures using characters.")
21922 (license license:expat)))
21923
21924 (define-public python-zarr
21925 (package
21926 (name "python-zarr")
21927 (version "2.4.0")
21928 (source
21929 (origin
21930 (method url-fetch)
21931 (uri (pypi-uri "zarr" version))
21932 (sha256
21933 (base32
21934 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21935 (build-system python-build-system)
21936 (arguments
21937 `(#:phases
21938 (modify-phases %standard-phases
21939 (add-after 'unpack 'disable-service-tests
21940 (lambda _
21941 (setenv "ZARR_TEST_ABS" "0")
21942 (setenv "ZARR_TEST_MONGO" "0")
21943 (setenv "ZARR_TEST_REDIS" "0")
21944 #t))
21945 (replace 'check
21946 (lambda _
21947 (invoke "pytest" "-vv" "-k" "not lmdb")
21948 #t)))))
21949 (propagated-inputs
21950 `(("python-asciitree" ,python-asciitree)
21951 ("python-fasteners" ,python-fasteners)
21952 ("python-numcodecs" ,python-numcodecs)
21953 ("python-numpy" ,python-numpy)))
21954 (native-inputs
21955 `(("python-pytest" ,python-pytest)
21956 ("python-setuptools-scm" ,python-setuptools-scm)))
21957 (home-page "https://github.com/zarr-developers/zarr-python")
21958 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21959 (description
21960 "This package provides an implementation of chunked, compressed,
21961 N-dimensional arrays for Python.")
21962 (license license:expat)))
21963
21964 (define-public python-anndata
21965 (package
21966 (name "python-anndata")
21967 (version "0.7.6")
21968 (source
21969 (origin
21970 ;; The tarball from PyPi doesn't include tests.
21971 (method git-fetch)
21972 (uri (git-reference
21973 (url "https://github.com/theislab/anndata")
21974 (commit version)))
21975 (file-name (git-file-name name version))
21976 (sha256
21977 (base32
21978 "1q30bsfsq9xfqm8nmabg3bjh9gix3yng0170xiiyw1lin4xncf0q"))))
21979 (build-system python-build-system)
21980 (arguments
21981 `(#:phases
21982 (modify-phases %standard-phases
21983 (delete 'check)
21984 (add-before 'build 'relax-dependency-requirements
21985 (lambda _
21986 ;; We need to upgrade python-pandas to avoid
21987 ;; https://github.com/pandas-dev/pandas/issues/35446
21988 (substitute* "pyproject.toml"
21989 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21990 (replace 'build
21991 (lambda _
21992 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
21993 ;; ZIP does not support timestamps before 1980.
21994 (setenv "SOURCE_DATE_EPOCH" "315532800")
21995 (invoke "flit" "build")))
21996 (replace 'install
21997 (lambda* (#:key inputs outputs #:allow-other-keys)
21998 (add-installed-pythonpath inputs outputs)
21999 (let ((out (assoc-ref outputs "out")))
22000 (for-each (lambda (wheel)
22001 (format #true wheel)
22002 (invoke "python" "-m" "pip" "install"
22003 wheel (string-append "--prefix=" out)))
22004 (find-files "dist" "\\.whl$")))
22005 #t)))))
22006 (propagated-inputs
22007 `(("python-h5py" ,python-h5py)
22008 ("python-importlib-metadata" ,python-importlib-metadata)
22009 ("python-natsort" ,python-natsort)
22010 ("python-numcodecs" ,python-numcodecs)
22011 ("python-packaging" ,python-packaging)
22012 ("python-pandas" ,python-pandas)
22013 ("python-scipy" ,python-scipy)
22014 ("python-zarr" ,python-zarr)))
22015 (native-inputs
22016 `(("python-joblib" ,python-joblib)
22017 ("python-pytest" ,python-pytest)
22018 ("python-toml" ,python-toml)
22019 ("python-flit" ,python-flit)
22020 ("python-setuptools-scm" ,python-setuptools-scm)))
22021 (home-page "https://github.com/theislab/anndata")
22022 (synopsis "Annotated data for data analysis pipelines")
22023 (description "Anndata is a package for simple (functional) high-level APIs
22024 for data analysis pipelines. In this context, it provides an efficient,
22025 scalable way of keeping track of data together with learned annotations and
22026 reduces the code overhead typically encountered when using a mostly
22027 object-oriented library such as @code{scikit-learn}.")
22028 (license license:bsd-3)))
22029
22030 (define-public python-dill
22031 (package
22032 (name "python-dill")
22033 (version "0.3.1.1")
22034 (source
22035 (origin
22036 (method url-fetch)
22037 (uri (pypi-uri "dill" version))
22038 (sha256
22039 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
22040 (build-system python-build-system)
22041 (arguments
22042 `(#:phases
22043 (modify-phases %standard-phases
22044 (replace 'check
22045 (lambda _
22046 (with-directory-excursion "/tmp"
22047 (invoke "nosetests" "-v"))
22048 #t)))))
22049 (native-inputs
22050 `(("python-nose" ,python-nose)))
22051 (home-page "https://pypi.org/project/dill/")
22052 (synopsis "Serialize all of Python")
22053 (description "Dill extends Python's @code{pickle} module for serializing
22054 and de-serializing Python objects to the majority of the built-in Python
22055 types. Dill provides the user the same interface as the @code{pickle} module,
22056 and also includes some additional features. In addition to pickling Python
22057 objects, @code{dill} provides the ability to save the state of an interpreter
22058 session in a single command. Hence, it would be feasible to save a
22059 interpreter session, close the interpreter, ship the pickled file to another
22060 computer, open a new interpreter, unpickle the session and thus continue from
22061 the saved state of the original interpreter session.")
22062 (license license:bsd-3)))
22063
22064 (define-public python-multiprocess
22065 (package
22066 (name "python-multiprocess")
22067 (version "0.70.9")
22068 (source
22069 (origin
22070 (method url-fetch)
22071 (uri (pypi-uri "multiprocess" version))
22072 (sha256
22073 (base32
22074 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
22075 (build-system python-build-system)
22076 (arguments
22077 `(#:phases
22078 (modify-phases %standard-phases
22079 (add-after 'unpack 'disable-broken-tests
22080 (lambda _
22081 ;; This test is broken as there is no keyboard interrupt.
22082 (substitute* "py3.7/multiprocess/tests/__init__.py"
22083 (("^(.*)def test_wait_result"
22084 line indent)
22085 (string-append indent
22086 "@unittest.skip(\"Disabled by Guix\")\n"
22087 line)))
22088 #t))
22089 ;; Tests must be run after installation.
22090 (delete 'check)
22091 (add-after 'install 'check
22092 (lambda* (#:key inputs outputs #:allow-other-keys)
22093 (add-installed-pythonpath inputs outputs)
22094 (invoke "python" "-m" "multiprocess.tests")
22095 #t)))))
22096 (propagated-inputs
22097 `(("python-dill" ,python-dill)))
22098 (home-page "https://pypi.org/project/multiprocess/")
22099 (synopsis "Multiprocessing and multithreading in Python")
22100 (description
22101 "This package is a fork of the multiprocessing Python package, a package
22102 which supports the spawning of processes using the API of the standard
22103 library's @code{threading} module.")
22104 (license license:bsd-3)))
22105
22106 (define-public python-toolz
22107 (package
22108 (name "python-toolz")
22109 (version "0.11.1")
22110 (source
22111 (origin
22112 (method url-fetch)
22113 (uri (pypi-uri "toolz" version))
22114 (sha256
22115 (base32
22116 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
22117 (build-system python-build-system)
22118 (arguments
22119 `(#:phases
22120 (modify-phases %standard-phases
22121 (replace 'check
22122 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
22123 (when tests?
22124 (add-installed-pythonpath inputs outputs)
22125 (invoke "python" "-m" "pytest" "--doctest-modules"
22126 "--pyargs" "toolz")))))))
22127 (native-inputs
22128 `(("python-pytest" ,python-pytest)))
22129 (home-page "https://github.com/pytoolz/toolz/")
22130 (synopsis "List processing tools and functional utilities")
22131 (description
22132 "This package provides a set of utility functions for iterators,
22133 functions, and dictionaries.")
22134 (license license:bsd-3)))
22135
22136 (define-public python-cytoolz
22137 (package
22138 (name "python-cytoolz")
22139 (version "0.9.0.1")
22140 (source
22141 (origin
22142 (method url-fetch)
22143 (uri (pypi-uri "cytoolz" version))
22144 (sha256
22145 (base32
22146 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
22147 (build-system python-build-system)
22148 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
22149 ;; 'exceptions'"
22150 (arguments '(#:tests? #f))
22151 (propagated-inputs
22152 `(("python-toolz" ,python-toolz)))
22153 (native-inputs
22154 `(("python-cython" ,python-cython)))
22155 (home-page "https://github.com/pytoolz/cytoolz")
22156 (synopsis "High performance functional utilities")
22157 (description
22158 "The cytoolz package implements the same API as provided by toolz. The
22159 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
22160 that is accessible to other projects developed in Cython.")
22161 (license license:bsd-3)))
22162
22163 (define-public python-sortedcollections
22164 (package
22165 (name "python-sortedcollections")
22166 (version "2.1.0")
22167 (source
22168 (origin
22169 (method url-fetch)
22170 (uri (pypi-uri "sortedcollections" version))
22171 (sha256
22172 (base32
22173 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
22174 (build-system python-build-system)
22175 (propagated-inputs
22176 `(("python-sortedcontainers" ,python-sortedcontainers)))
22177 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
22178 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
22179 (synopsis "Python Sorted Collections")
22180 (description "Sorted Collections is a Python sorted collections library.")
22181 (license license:asl2.0)))
22182
22183 (define-public python-sortedcontainers
22184 (package
22185 (name "python-sortedcontainers")
22186 (version "2.1.0")
22187 (source
22188 (origin
22189 (method url-fetch)
22190 (uri (pypi-uri "sortedcontainers" version))
22191 (sha256
22192 (base32
22193 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
22194 (build-system python-build-system)
22195 (arguments
22196 ;; FIXME: Tests require many extra dependencies, and would introduce
22197 ;; a circular dependency on hypothesis, which uses this package.
22198 '(#:tests? #f))
22199 (propagated-inputs
22200 `(("python-appdirs" ,python-appdirs)
22201 ("python-distlib" ,python-distlib)
22202 ("python-filelock" ,python-filelock)
22203 ("python-six" ,python-six-bootstrap)))
22204 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
22205 (synopsis "Sorted List, Sorted Dict, Sorted Set")
22206 (description
22207 "This package provides a sorted collections library, written in
22208 pure-Python.")
22209 (license license:asl2.0)))
22210
22211 (define-public python2-sortedcontainers
22212 (package-with-python2 python-sortedcontainers))
22213
22214 (define python-cloudpickle-testpkg
22215 (package
22216 (name "python-cloudpickle-testpkg")
22217 (version "1.6.0")
22218 (source
22219 (origin
22220 ;; Archive on pypi does not include test infrastructure.
22221 (method git-fetch)
22222 (uri (git-reference
22223 (url "https://github.com/cloudpipe/cloudpickle")
22224 (commit (string-append "v" version))))
22225 (file-name (git-file-name name version))
22226 (sha256
22227 (base32
22228 "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
22229 (build-system python-build-system)
22230 (arguments
22231 '(#:phases
22232 (modify-phases %standard-phases
22233 (add-after 'unpack 'chdir
22234 (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
22235 (home-page "https://github.com/cloudpipe/cloudpickle")
22236 (synopsis "Extended pickling support for Python objects")
22237 (description
22238 "Cloudpickle makes it possible to serialize Python constructs not
22239 supported by the default pickle module from the Python standard library. It
22240 is especially useful for cluster computing where Python expressions are
22241 shipped over the network to execute on remote hosts, possibly close to the
22242 data.")
22243 (license license:bsd-3)))
22244
22245 (define-public python-cloudpickle
22246 (package
22247 (inherit python-cloudpickle-testpkg)
22248 (name "python-cloudpickle")
22249 (build-system python-build-system)
22250 (arguments
22251 '(#:phases
22252 (modify-phases %standard-phases
22253 (replace 'check
22254 (lambda* (#:key tests? #:allow-other-keys)
22255 (if tests?
22256 (invoke "pytest" "-s" "-vv")
22257 (format #t "test suite not run~%")))))))
22258 (native-inputs
22259 `(;; For tests.
22260 ("python-cloudpickle-testpkg" ,python-cloudpickle-testpkg)
22261 ("python-psutil" ,python-psutil)
22262 ("python-pytest" ,python-pytest)
22263 ("python-tornado" ,python-tornado-6)))
22264 (home-page "https://github.com/cloudpipe/cloudpickle")
22265 (synopsis "Extended pickling support for Python objects")
22266 (description
22267 "Cloudpickle makes it possible to serialize Python constructs not
22268 supported by the default pickle module from the Python standard library. It
22269 is especially useful for cluster computing where Python expressions are
22270 shipped over the network to execute on remote hosts, possibly close to the
22271 data.")
22272 (properties `((python2-variant . ,(delay python2-cloudpickle))))
22273 (license license:bsd-3)))
22274
22275 (define-public python2-cloudpickle
22276 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
22277 (package/inherit base
22278 (version "1.3.0")
22279 (source
22280 (origin
22281 (method url-fetch)
22282 (uri (pypi-uri "cloudpickle" version))
22283 (sha256
22284 (base32
22285 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
22286 (native-inputs
22287 `(;; For tests.
22288 ("python-mock" ,python2-mock)
22289 ("python-psutil" ,python2-psutil)
22290 ("python-pytest" ,python2-pytest)
22291 ("python-tornado" ,python2-tornado)))
22292 (propagated-inputs
22293 `(("python-futures" ,python2-futures)
22294 ,@(package-propagated-inputs base))))))
22295
22296 (define-public python-locket
22297 (package
22298 (name "python-locket")
22299 (version "0.2.0")
22300 (source
22301 (origin
22302 (method url-fetch)
22303 (uri (pypi-uri "locket" version))
22304 (sha256
22305 (base32
22306 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
22307 (build-system python-build-system)
22308 (home-page "https://github.com/mwilliamson/locket.py")
22309 (synopsis "File-based locks for Python")
22310 (description
22311 "Locket implements a lock that can be used by multiple processes provided
22312 they use the same path.")
22313 (license license:bsd-2)))
22314
22315 (define-public python2-locket
22316 (package-with-python2 python-locket))
22317
22318 (define-public python-blosc
22319 (package
22320 (name "python-blosc")
22321 (version "1.5.1")
22322 (source
22323 (origin
22324 (method url-fetch)
22325 (uri (pypi-uri "blosc" version))
22326 (sha256
22327 (base32
22328 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
22329 (build-system python-build-system)
22330 ;; FIXME: all tests pass, but then this error is printed:
22331 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
22332 (arguments '(#:tests? #f))
22333 (propagated-inputs
22334 `(("python-numpy" ,python-numpy)))
22335 (home-page "https://github.com/blosc/python-blosc")
22336 (synopsis "Python wrapper for the Blosc data compressor library")
22337 (description "Blosc is a high performance compressor optimized for binary
22338 data. It has been designed to transmit data to the processor cache faster
22339 than the traditional, non-compressed, direct memory fetch approach via a
22340 @code{memcpy()} system call.
22341
22342 Blosc works well for compressing numerical arrays that contains data with
22343 relatively low entropy, like sparse data, time series, grids with
22344 regular-spaced values, etc.
22345
22346 This Python package wraps the Blosc library.")
22347 (license license:bsd-3)))
22348
22349 (define-public python2-blosc
22350 (package-with-python2 python-blosc))
22351
22352 (define-public python-partd
22353 (package
22354 (name "python-partd")
22355 (version "1.2.0")
22356 (source
22357 (origin
22358 (method url-fetch)
22359 (uri (pypi-uri "partd" version))
22360 (sha256
22361 (base32
22362 "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
22363 (build-system python-build-system)
22364 (propagated-inputs
22365 `(("python-blosc" ,python-blosc)
22366 ("python-locket" ,python-locket)
22367 ("python-numpy" ,python-numpy)
22368 ("python-pandas" ,python-pandas)
22369 ("python-pyzmq" ,python-pyzmq)
22370 ("python-toolz" ,python-toolz)))
22371 (home-page "https://github.com/dask/partd/")
22372 (synopsis "Appendable key-value storage")
22373 (description "Partd stores key-value pairs. Values are raw bytes. We
22374 append on old values. Partd excels at shuffling operations.")
22375 (license license:bsd-3)))
22376
22377 (define-public python-fsspec
22378 (package
22379 (name "python-fsspec")
22380 (version "0.6.1")
22381 (source
22382 (origin
22383 (method url-fetch)
22384 (uri (pypi-uri "fsspec" version))
22385 (sha256
22386 (base32
22387 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
22388 (build-system python-build-system)
22389 (arguments '(#:tests? #f)) ; there are none
22390 (home-page "https://github.com/intake/filesystem_spec")
22391 (synopsis "File-system specification")
22392 (description "The purpose of this package is to produce a template or
22393 specification for a file-system interface, that specific implementations
22394 should follow, so that applications making use of them can rely on a common
22395 behavior and not have to worry about the specific internal implementation
22396 decisions with any given backend.")
22397 (license license:bsd-3)))
22398
22399 (define-public python-dask
22400 (package
22401 (name "python-dask")
22402 (version "2021.9.1")
22403 (source
22404 (origin
22405 (method url-fetch)
22406 (uri (pypi-uri "dask" version))
22407 (sha256
22408 (base32 "0p6nd8wi30l29g5hdwk0453w6fxg4zvxq1y1ix0fa2f8rbr2n7z1"))))
22409 (build-system python-build-system)
22410 (arguments
22411 `(#:phases
22412 (modify-phases %standard-phases
22413 (add-after 'unpack 'disable-broken-tests
22414 (lambda _
22415 ;; This test is marked as xfail when pytest-xdist is used.
22416 (substitute* "dask/tests/test_threaded.py"
22417 (("def test_interrupt\\(\\)" m)
22418 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
22419 m)))))
22420 (replace 'check
22421 (lambda _ (invoke "pytest" "-vv"))))))
22422 (propagated-inputs
22423 `(("python-cloudpickle" ,python-cloudpickle)
22424 ("python-fsspec" ,python-fsspec)
22425 ("python-numpy" ,python-numpy)
22426 ("python-packaging" ,python-packaging)
22427 ("python-pandas" ,python-pandas)
22428 ("python-partd" ,python-partd)
22429 ("python-toolz" ,python-toolz)
22430 ("python-pyyaml" ,python-pyyaml)))
22431 (native-inputs
22432 `(("python-pytest" ,python-pytest)
22433 ("python-pytest-runner" ,python-pytest-runner)))
22434 (home-page "https://github.com/dask/dask/")
22435 (synopsis "Parallel computing with task scheduling")
22436 (description
22437 "Dask is a flexible parallel computing library for analytics. It
22438 consists of two components: dynamic task scheduling optimized for computation,
22439 and large data collections like parallel arrays, dataframes, and lists that
22440 extend common interfaces like NumPy, Pandas, or Python iterators to
22441 larger-than-memory or distributed environments. These parallel collections
22442 run on top of the dynamic task schedulers. ")
22443 (license license:bsd-3)))
22444
22445 (define-public python-ilinkedlist
22446 (package
22447 (name "python-ilinkedlist")
22448 (version "0.4.0")
22449 (source
22450 (origin
22451 (method url-fetch)
22452 (uri (pypi-uri "ilinkedlist" version))
22453 (sha256
22454 (base32
22455 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
22456 (build-system python-build-system)
22457 (native-inputs `(("python-pytest" ,python-pytest)))
22458 (inputs `(("python" ,python)))
22459 (home-page "https://github.com/luther9/ilinkedlist-py")
22460 (synopsis "Immutable linked list library")
22461 (description
22462 "This is a implementation of immutable linked lists for Python. It
22463 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
22464 Since a linked list is treated as immutable, it is hashable, and its length
22465 can be retrieved in constant time. Some of the terminology is inspired by
22466 LISP. It is possible to create an improper list by creating a @code{Pair}
22467 with a non-list @code{cdr}.")
22468 (license license:gpl3+)))
22469
22470 (define-public python-readlike
22471 (package
22472 (name "python-readlike")
22473 (version "0.1.3")
22474 (source
22475 (origin
22476 (method url-fetch)
22477 (uri (pypi-uri "readlike" version))
22478 (sha256
22479 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
22480 (build-system python-build-system)
22481 (home-page "https://github.com/jangler/readlike")
22482 (synopsis "GNU Readline-like line editing module")
22483 (description
22484 "This Python module provides line editing functions similar to the default
22485 Emacs-style ones of GNU Readline. Unlike the Python standard library's
22486 @code{readline} package, this one allows access to those capabilities in settings
22487 outside of a standard command-line interface. It is especially well-suited to
22488 interfacing with Urwid, due to a shared syntax for describing key inputs.
22489
22490 Currently, all stateless Readline commands are implemented. Yanking and history
22491 are not supported.")
22492 (license license:expat)))
22493
22494 (define-public python2-readlike
22495 (package-with-python2 python-readlike))
22496
22497 (define-public python-reparser
22498 (package
22499 (name "python-reparser")
22500 (version "1.4.3")
22501 (source
22502 (origin
22503 (method url-fetch)
22504 (uri (pypi-uri "ReParser" version))
22505 (sha256
22506 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
22507 (build-system python-build-system)
22508 (home-page "https://github.com/xmikos/reparser")
22509 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
22510 (description
22511 "This Python library provides a simple lexer/parser for inline markup based
22512 on regular expressions.")
22513 (license license:expat)))
22514
22515 (define-public python2-reparser
22516 (let ((reparser (package-with-python2
22517 (strip-python2-variant python-reparser))))
22518 (package/inherit reparser
22519 (propagated-inputs
22520 `(("python2-enum34" ,python2-enum34)
22521 ,@(package-propagated-inputs reparser))))))
22522
22523 (define-public python-retrying
22524 (package
22525 (name "python-retrying")
22526 (version "1.3.3")
22527 (source
22528 (origin
22529 (method git-fetch)
22530 (uri (git-reference
22531 (url "https://github.com/rholder/retrying")
22532 (commit (string-append "v" version))))
22533 (file-name (git-file-name name version))
22534 (sha256
22535 (base32
22536 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
22537 (build-system python-build-system)
22538 (propagated-inputs
22539 `(("python-six" ,python-six)))
22540 (home-page "https://github.com/rholder/retrying")
22541 (synopsis "Library for adding retry behavior")
22542 (description "Retrying is a general-purpose retrying library to simplify
22543 the task of adding retry behavior to just about anything.
22544
22545 Features:
22546
22547 @itemize
22548 @item Generic Decorator API.
22549 @item Specify stop condition (i.e. limit by number of attempts).
22550 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
22551 @item Customize retrying on Exceptions.
22552 @item Customize retrying on expected returned result.
22553 @end itemize")
22554 (license license:asl2.0)))
22555
22556 (define-public python-pre-commit
22557 (package
22558 (name "python-pre-commit")
22559 (version "2.10.0")
22560 (source
22561 (origin
22562 (method url-fetch)
22563 (uri (pypi-uri "pre_commit" version))
22564 (sha256
22565 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
22566 (build-system python-build-system)
22567 (arguments
22568 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
22569 ;; attribute 'empty_template_setup'".
22570 `(#:tests? #false))
22571 (propagated-inputs
22572 `(("python-cfgv" ,python-cfgv)
22573 ("python-identify" ,python-identify)
22574 ("python-importlib-metadata" ,python-importlib-metadata)
22575 ("python-importlib-resources" ,python-importlib-resources)
22576 ("python-nodeenv" ,python-nodeenv)
22577 ("python-pyyaml" ,python-pyyaml)
22578 ("python-toml" ,python-toml)
22579 ("python-virtualenv" ,python-virtualenv)))
22580 (home-page "https://github.com/pre-commit/pre-commit")
22581 (synopsis "Framework for managing multi-language pre-commit hooks")
22582 (description
22583 "This package provides a framework for managing and maintaining
22584 multi-language pre-commit hooks.")
22585 (license license:expat)))
22586
22587 (define-public python-precis-i18n
22588 (package
22589 (name "python-precis-i18n")
22590 (version "1.0.0")
22591 (source
22592 (origin
22593 (method url-fetch)
22594 (uri (pypi-uri "precis_i18n" version))
22595 (sha256
22596 (base32
22597 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
22598 (build-system python-build-system)
22599 (home-page "https://github.com/byllyfish/precis_i18n")
22600 (synopsis "Implementation of the PRECIS framework")
22601 (description
22602 "This module implements the PRECIS Framework as described in RFC 8264,
22603 RFC 8265 and RFC 8266.")
22604 (license license:expat)))
22605
22606 (define-public python-absl-py
22607 (package
22608 (name "python-absl-py")
22609 (version "0.6.1")
22610 (source
22611 (origin
22612 (method url-fetch)
22613 (uri (pypi-uri "absl-py" version))
22614 (sha256
22615 (base32
22616 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
22617 (build-system python-build-system)
22618 (propagated-inputs
22619 `(("python-six" ,python-six)))
22620 (home-page "https://github.com/abseil/abseil-py")
22621 (synopsis "Abseil Python common libraries")
22622 (description
22623 "This package provides the Abseil Python Common Libraries, a collection
22624 of Python libraries for building Python applications.")
22625 (license license:asl2.0)))
22626
22627 (define-public python-astor
22628 (package
22629 (name "python-astor")
22630 (version "0.8.1")
22631 (source
22632 (origin
22633 (method url-fetch)
22634 (uri (pypi-uri "astor" version))
22635 (sha256
22636 (base32
22637 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
22638 (build-system python-build-system)
22639 ;; FIXME: There are two errors and two test failures.
22640 (arguments `(#:tests? #f))
22641 (home-page "https://github.com/berkerpeksag/astor")
22642 (synopsis "Read and write Python ASTs")
22643 (description "Astor is designed to allow easy manipulation of Python
22644 source via the Abstract Syntax Tree.")
22645 (license license:bsd-3)))
22646
22647 (define-public python2-astor
22648 (package-with-python2 python-astor))
22649
22650 (define-public python-astunparse
22651 (package
22652 (name "python-astunparse")
22653 (version "1.6.2")
22654 (source
22655 (origin
22656 (method url-fetch)
22657 (uri (pypi-uri "astunparse" version))
22658 (sha256
22659 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
22660 (build-system python-build-system)
22661 (arguments '(#:tests? #f)) ; there are none
22662 (propagated-inputs
22663 `(("python-six" ,python-six)
22664 ("python-wheel" ,python-wheel)))
22665 (home-page "https://github.com/simonpercivall/astunparse")
22666 (synopsis "AST unparser for Python")
22667 (description "This package provides an AST unparser for Python. It is a
22668 factored out version of @code{unparse} found in the Python source
22669 distribution.")
22670 (license license:bsd-3)))
22671
22672 (define-public python-gast
22673 (package
22674 (name "python-gast")
22675 (version "0.5.2")
22676 (source
22677 (origin
22678 (method url-fetch)
22679 (uri (pypi-uri "gast" version))
22680 (sha256
22681 (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
22682 (build-system python-build-system)
22683 (propagated-inputs
22684 `(("python-astunparse" ,python-astunparse)))
22685 (home-page "https://pypi.org/project/gast/")
22686 (synopsis "Generic Python AST that abstracts the underlying Python version")
22687 (description
22688 "GAST provides a compatibility layer between the AST of various Python
22689 versions, as produced by @code{ast.parse} from the standard @code{ast}
22690 module.")
22691 (license license:bsd-3)))
22692
22693 (define-public python-wikidata
22694 (package
22695 (name "python-wikidata")
22696 (version "0.6.1")
22697 (source
22698 (origin
22699 (method url-fetch)
22700 (uri (pypi-uri "Wikidata" version))
22701 (sha256
22702 (base32
22703 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
22704 (build-system python-build-system)
22705 (propagated-inputs
22706 `(("python-babel" ,python-babel)))
22707 (home-page "https://github.com/dahlia/wikidata")
22708 (synopsis "Wikidata client library")
22709 (description
22710 "This package provides a Python interface to
22711 @url{https://www.wikidata.org/, Wikidata}.")
22712 (properties '((upstream-name . "Wikidata")))
22713 (license license:gpl3+)))
22714
22715 (define-public python-doctest-ignore-unicode
22716 (package
22717 (name "python-doctest-ignore-unicode")
22718 (version "0.1.2")
22719 (source
22720 (origin
22721 (method url-fetch)
22722 (uri (pypi-uri "doctest-ignore-unicode" version))
22723 (sha256
22724 (base32
22725 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
22726 (build-system python-build-system)
22727 (native-inputs
22728 `(("python-nose" ,python-nose)))
22729 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
22730 (synopsis "Ignore Unicode literal prefixes in doctests")
22731 (description
22732 "This package adds support for a flag to ignore Unicode literal prefixes
22733 in doctests.")
22734 (license license:asl2.0)))
22735
22736 (define-public python-attr
22737 (package
22738 (name "python-attr")
22739 (version "0.3.1")
22740 (source
22741 (origin
22742 (method url-fetch)
22743 (uri (pypi-uri "attr" version))
22744 (sha256
22745 (base32
22746 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
22747 (build-system python-build-system)
22748 (home-page "https://github.com/denis-ryzhkov/attr")
22749 (synopsis "Decorator for attributes of target function or class")
22750 (description "Simple decorator to set attributes of target function or
22751 class in a @acronym{DRY, Don't Repeat Yourself} way.")
22752 (license license:expat)))
22753
22754 (define-public python-construct
22755 (package
22756 (name "python-construct")
22757 (version "2.10.56")
22758 (source
22759 (origin
22760 (method url-fetch)
22761 (uri (pypi-uri "construct" version))
22762 (sha256
22763 (base32
22764 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
22765 (build-system python-build-system)
22766 (arguments
22767 `(#:tests? #f)) ; No tests exist.
22768 (propagated-inputs
22769 `(("python-extras" ,python-extras)
22770 ("python-arrow" ,python-arrow)
22771 ("python-numpy" ,python-numpy)
22772 ("python-ruamel.yaml" ,python-ruamel.yaml)))
22773 (home-page "https://construct.readthedocs.io")
22774 (synopsis "Declarative and symmetrical parser and builder for binary data")
22775 (description
22776 "This package provides both simple, atomic constructs (such as
22777 integers of various sizes), as well as composite ones which allow you
22778 form hierarchical and sequential structures of increasing complexity.
22779 It features bit and byte granularity, easy debugging and testing, an
22780 easy-to-extend subclass system, and lots of primitive constructs to
22781 make your work easier.")
22782 (license license:expat)))
22783
22784 (define-public python-outcome
22785 (package
22786 (name "python-outcome")
22787 (version "1.0.1")
22788 (source
22789 (origin
22790 (method url-fetch)
22791 (uri (pypi-uri "outcome" version))
22792 (sha256
22793 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
22794 (build-system python-build-system)
22795 (arguments
22796 `(#:phases
22797 (modify-phases %standard-phases
22798 (replace 'check
22799 (lambda* (#:key inputs outputs #:allow-other-keys)
22800 (add-installed-pythonpath inputs outputs)
22801 (invoke "pytest" "-vv"))))))
22802 (native-inputs
22803 `(("python-pytest" ,python-pytest)
22804 ("python-pytest-cov" ,python-pytest-cov)
22805 ("python-pytest-asyncio" ,python-pytest-asyncio)))
22806 (propagated-inputs
22807 `(("python-async-generator" ,python-async-generator)
22808 ("python-attrs" ,python-attrs)))
22809 (home-page "https://github.com/python-trio/outcome")
22810 (synopsis "Capture the outcome of Python function calls")
22811 (description
22812 "Capture the outcome of Python function calls. Extracted from the Trio
22813 project.")
22814 ;; Either license applies.
22815 (license (list license:expat license:asl2.0))))
22816
22817 (define-public python-trio
22818 (package
22819 (name "python-trio")
22820 (version "0.19.0")
22821 (source
22822 (origin
22823 (method url-fetch)
22824 (uri (pypi-uri "trio" version))
22825 (sha256
22826 (base32 "1qgg4zhca81dxc1nlmcr5pl1bclmvdp3niqbyslwxs65bs732pl9"))))
22827 (build-system python-build-system)
22828 (arguments
22829 `(#:phases
22830 (modify-phases %standard-phases
22831 (add-before 'check 'change-home
22832 (lambda _
22833 ;; Tests require a writable home.
22834 (setenv "HOME" "/tmp")
22835 #t))
22836 (replace 'check
22837 (lambda* (#:key tests? #:allow-other-keys)
22838 (when tests?
22839 (invoke "pytest" "-vv" "-k"
22840 (string-append
22841 ;; This test times out.
22842 "not test_ki_protection_works"
22843 ;; Assertion errors.
22844 " and not test_guest_mode_ki"
22845 " and not test_run_in_trio_thread_ki"
22846 " and not test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage"
22847 " and not test_nursery_cancel_doesnt_create_cyclic_garbage"
22848 " and not test_locals_destroyed_promptly_on_cancel"
22849 ;; These try to raise KeyboardInterrupt which does not work
22850 ;; in the build environment.
22851 " and not test_ki_self"
22852 " and not test_ki_wakes_us_up"
22853 ;; Failure in name resolution.
22854 " and not test_getnameinfo"
22855 " and not test_SocketType_resolve"
22856 ;; OSError: protocol not found.
22857 " and not test_getprotobyname"))))))))
22858 (native-inputs
22859 `(("python-astor" ,python-astor)
22860 ("python-ipython" ,python-ipython)
22861 ("python-jedi" ,python-jedi)
22862 ("python-pylint" ,python-pylint)
22863 ("python-pyopenssl" ,python-pyopenssl)
22864 ("python-pytest" ,python-pytest)
22865 ("python-pytest-cov" ,python-pytest-cov)
22866 ("python-trustme" ,python-trustme)))
22867 (propagated-inputs
22868 `(("python-async-generator" ,python-async-generator)
22869 ("python-attrs" ,python-attrs)
22870 ("python-idna" ,python-idna)
22871 ("python-outcome" ,python-outcome)
22872 ("python-sniffio" ,python-sniffio)
22873 ("python-sortedcontainers"
22874 ,python-sortedcontainers)))
22875 (home-page "https://github.com/python-trio/trio")
22876 (synopsis "Friendly Python library for async concurrency and I/O")
22877 (description
22878 "Trio strives to be a production-quality, async/await-native I/O library
22879 for Python. Like all async libraries, its main purpose is to help you write
22880 programs that do multiple things at the same time with parallelized I/O.")
22881 ;; Either license applies.
22882 (license (list license:expat license:asl2.0))))
22883
22884 (define-public python-trio-typing
22885 (package
22886 (name "python-trio-typing")
22887 (version "0.5.0")
22888 (source
22889 (origin
22890 (method url-fetch)
22891 (uri (pypi-uri "trio-typing" version))
22892 (sha256
22893 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22894 (build-system python-build-system)
22895 (arguments
22896 `(#:phases
22897 (modify-phases %standard-phases
22898 (replace 'check
22899 (lambda _
22900 (invoke "pytest" "-vv"))))))
22901 (native-inputs
22902 `(("python-attrs" ,python-attrs)
22903 ("python-pytest" ,python-pytest)))
22904 (propagated-inputs
22905 `(("python-mypy" ,python-mypy)
22906 ("python-mypy-extensions"
22907 ,python-mypy-extensions)
22908 ("python-trio" ,python-trio)
22909 ("python-typing-extensions"
22910 ,python-typing-extensions)))
22911 (home-page "https://github.com/python-trio/trio-typing")
22912 (synopsis "Static type checking support for Trio and related projects")
22913 (description
22914 "This package provides:
22915
22916 @itemize
22917 @item PEP 561 typing stubs packages for the Trio project packages:
22918
22919 @itemize
22920 @item trio (@code{trio-stubs})
22921 @item outcome (@code{outcome-stubs})
22922 @item async_generator (@code{async_generator-stubs})
22923 @end itemize
22924
22925 @item A package @code{trio_typing} containing types that Trio programs often
22926 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22927 a mypy plugin that smooths over some limitations in the basic type hints.
22928 @end itemize")
22929 ;; Either license applies.
22930 (license (list license:expat license:asl2.0))))
22931
22932 (define-public python-humanize
22933 (package
22934 (name "python-humanize")
22935 (version "0.5.1")
22936 (source
22937 (origin
22938 (method url-fetch)
22939 (uri (pypi-uri "humanize" version))
22940 (sha256
22941 (base32
22942 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22943 (arguments
22944 '(#:tests? #f)) ; tests not in pypi archive
22945 (build-system python-build-system)
22946 (home-page "https://github.com/jmoiron/humanize")
22947 (synopsis "Print numerical information in a human-readable form")
22948 (description "This package provides a Python module that displays numbers
22949 and dates in \"human readable\" forms. For example, it would display
22950 \"12345591313\" as \"12.3 billion\".")
22951 (license license:expat)))
22952
22953 (define-public python-txaio
22954 (package
22955 (name "python-txaio")
22956 (version "18.8.1")
22957 (source
22958 (origin
22959 (method url-fetch)
22960 (uri (pypi-uri "txaio" version))
22961 (sha256
22962 (base32
22963 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22964 (build-system python-build-system)
22965 (propagated-inputs
22966 `(("python-twisted" ,python-twisted)
22967 ("python-six" ,python-six)))
22968 (home-page "https://github.com/crossbario/txaio")
22969 (synopsis "Compatibility layer between Python asyncio and Twisted")
22970 (description "Txaio provides a compatibility layer between the Python
22971 @code{asyncio} module and @code{Twisted}.")
22972 (license license:expat)))
22973
22974 (define-public python-toolshed
22975 (package
22976 (name "python-toolshed")
22977 (version "0.4.6")
22978 (source
22979 (origin
22980 (method url-fetch)
22981 (uri (pypi-uri "toolshed" version))
22982 (sha256
22983 (base32
22984 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22985 (build-system python-build-system)
22986 (native-inputs
22987 `(("python-nose" ,python-nose)))
22988 (home-page "https://github.com/brentp/toolshed/")
22989 (synopsis "Collection of modules and functions for working with data")
22990 (description "This is a collection of well-tested, simple modules and
22991 functions that aim to reduce boilerplate when working with data.")
22992 (license license:bsd-2)))
22993
22994 (define-public python-annoy
22995 (package
22996 (name "python-annoy")
22997 (version "1.15.1")
22998 (source
22999 (origin
23000 (method url-fetch)
23001 (uri (pypi-uri "annoy" version))
23002 (sha256
23003 (base32
23004 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
23005 (build-system python-build-system)
23006 (native-inputs
23007 `(("python-nose" ,python-nose)))
23008 (home-page "https://github.com/spotify/annoy/")
23009 (synopsis "Approximate nearest neighbors library")
23010 (description
23011 "Annoy is a C++ library with Python bindings to search for points in
23012 space that are close to a given query point. It also creates large read-only
23013 file-based data structures that are @code{mmap}ped into memory so that many
23014 processes may share the same data.")
23015 (license license:asl2.0)))
23016
23017 (define-public python-croniter
23018 (package
23019 (name "python-croniter")
23020 (version "0.3.34")
23021 (source (origin
23022 (method url-fetch)
23023 (uri (pypi-uri "croniter" version))
23024 (sha256
23025 (base32
23026 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
23027 (build-system python-build-system)
23028 (propagated-inputs
23029 `(("python-dateutil" ,python-dateutil)
23030 ("python-natsort" ,python-natsort)))
23031 (home-page "https://github.com/kiorky/croniter")
23032 (synopsis "Iterate datetime objects with cron-like syntax")
23033 (description
23034 "@code{croniter} provides iteration for datetime object with cron-like
23035 format.")
23036 (license license:expat)))
23037
23038 (define-public python-crontab
23039 (package
23040 (name "python-crontab")
23041 (version "2.5.1")
23042 (source
23043 (origin
23044 (method url-fetch)
23045 (uri (pypi-uri name version))
23046 (sha256
23047 (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
23048 (build-system python-build-system)
23049 (arguments
23050 ;; Comptability tests fail so they are disabled.
23051 `(#:tests? #f))
23052 (inputs
23053 `(("python-dateutil" ,python-dateutil)))
23054 (home-page "https://gitlab.com/doctormo/python-crontab/")
23055 (synopsis "Module for reading and writing crontab files")
23056 (description "This Python module can read, write crontab files, and
23057 access the system cron automatically and simply using a direct API.")
23058 (license license:lgpl3+)))
23059
23060 (define-public python-pylzma
23061 (package
23062 (name "python-pylzma")
23063 (version "0.5.0")
23064 (source
23065 (origin
23066 (method url-fetch)
23067 (uri (pypi-uri "pylzma" version))
23068 (sha256
23069 (base32
23070 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
23071 (build-system python-build-system)
23072 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
23073 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
23074 (description "This package provides Python bindings for the LZMA library
23075 by Igor Pavlov.")
23076 (license license:lgpl2.1+)))
23077
23078 (define-public python2-pylzma
23079 (package-with-python2 python-pylzma))
23080
23081 (define-public python-ifaddr
23082 (package
23083 (name "python-ifaddr")
23084 (version "0.1.7")
23085 (source
23086 (origin
23087 (method url-fetch)
23088 (uri (pypi-uri "ifaddr" version))
23089 (sha256
23090 (base32
23091 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
23092 (build-system python-build-system)
23093 (arguments
23094 `(#:phases
23095 (modify-phases %standard-phases
23096 (replace 'check
23097 (lambda _ (invoke "nosetests"))))))
23098 (native-inputs
23099 `(("python-nose" ,python-nose)))
23100 (home-page "https://github.com/pydron/ifaddr")
23101 (synopsis "Network interface and IP address enumeration library")
23102 (description "This package provides a network interface and IP address
23103 enumeration library in Python.")
23104 (license license:expat)))
23105
23106 (define-public python-zeroconf
23107 (package
23108 (name "python-zeroconf")
23109 (version "0.28.8")
23110 (source
23111 (origin
23112 (method url-fetch)
23113 (uri (pypi-uri "zeroconf" version))
23114 (sha256
23115 (base32
23116 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
23117 (build-system python-build-system)
23118 (native-inputs
23119 `(("python-nose" ,python-nose)))
23120 (propagated-inputs
23121 `(("python-ifaddr" ,python-ifaddr)))
23122 (arguments
23123 `(#:phases
23124 (modify-phases %standard-phases
23125 (replace 'check
23126 (lambda _ ;; Networking isn't available for these tests.
23127 (invoke "nosetests" "-v"
23128 "--exclude" "test_integration_with_listener_ipv6"
23129 "--exclude" "test_launch_and_close_v6_only"
23130 "--exclude" "test_launch_and_close_v4_v6"
23131 "--exclude" "test_launch_and_close"))))))
23132 (home-page "https://github.com/jstasiak/python-zeroconf")
23133 (synopsis "Pure Python mDNS service discovery")
23134 (description
23135 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
23136 compatible).")
23137 (license license:lgpl2.1+)))
23138
23139 (define-public python2-zeroconf
23140 (package
23141 (name "python2-zeroconf")
23142
23143 ;; This is the last version that supports Python 2.x.
23144 (version "0.19.1")
23145 (source
23146 (origin
23147 (method url-fetch)
23148 (uri (pypi-uri "zeroconf" version))
23149 (sha256
23150 (base32
23151 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
23152 (build-system python-build-system)
23153 (arguments
23154 `(#:python ,python-2
23155 #:phases
23156 (modify-phases %standard-phases
23157 (add-after 'unpack 'patch-requires
23158 (lambda* (#:key inputs #:allow-other-keys)
23159 (substitute* "setup.py"
23160 (("enum-compat")
23161 "enum34"))
23162 #t)))))
23163 (native-inputs
23164 `(("python2-six" ,python2-six)
23165 ("python2-enum32" ,python2-enum34)
23166 ("python2-netifaces" ,python2-netifaces)
23167 ("python2-typing" ,python2-typing)))
23168 (home-page "https://github.com/jstasiak/python-zeroconf")
23169 (synopsis "Pure Python mDNS service discovery")
23170 (description
23171 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
23172 compatible).")
23173 (license license:lgpl2.1+)))
23174
23175 (define-public python-bsddb3
23176 (package
23177 (name "python-bsddb3")
23178 (version "6.2.9")
23179 (source
23180 (origin
23181 (method url-fetch)
23182 (uri (pypi-uri "bsddb3" version))
23183 (sha256
23184 (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
23185 (build-system python-build-system)
23186 (inputs
23187 `(("bdb" ,bdb)))
23188 (arguments
23189 '(#:phases
23190 (modify-phases %standard-phases
23191 (add-after 'unpack 'configure-locations
23192 (lambda* (#:key inputs #:allow-other-keys)
23193 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
23194 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
23195 #t))
23196 (replace 'check
23197 (lambda _
23198 (invoke "python3" "test3.py" "-v"))))))
23199 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
23200 (synopsis "Python bindings for Oracle Berkeley DB")
23201 (description
23202 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
23203 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
23204 Transaction objects, and each of these is exposed as a Python type in the
23205 bsddb3.db module. The database objects can use various access methods: btree,
23206 hash, recno, and queue. Complete support of Berkeley DB distributed
23207 transactions. Complete support for Berkeley DB Replication Manager.
23208 Complete support for Berkeley DB Base Replication. Support for RPC.")
23209 (license license:bsd-3)))
23210
23211 (define-public python-dbfread
23212 (package
23213 (name "python-dbfread")
23214 (version "2.0.7")
23215 (source (origin
23216 (method url-fetch)
23217 (uri (pypi-uri "dbfread" version))
23218 (sha256
23219 (base32
23220 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
23221 (build-system python-build-system)
23222 (native-inputs
23223 `(("python-pytest" ,python-pytest)))
23224 (home-page "https://dbfread.readthedocs.io")
23225 (synopsis "Read DBF Files with Python")
23226 (description
23227 "This library reads DBF files and returns the data as native Python data
23228 types for further processing. It is primarily intended for batch jobs and
23229 one-off scripts.")
23230 (license license:expat)))
23231
23232 (define-public python-cached-property
23233 (package
23234 (name "python-cached-property")
23235 (version "1.5.2")
23236 (source
23237 (origin
23238 (method url-fetch)
23239 (uri (pypi-uri "cached-property" version))
23240 (sha256
23241 (base32
23242 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
23243 (build-system python-build-system)
23244 (arguments
23245 `(#:phases
23246 (modify-phases %standard-phases
23247 ;; https://github.com/pydanny/cached-property/issues/131
23248 ;; recent versions of freezegun break one test
23249 (add-after 'unpack 'disable-broken-test
23250 (lambda _
23251 (substitute* "tests/test_cached_property.py"
23252 (("def test_threads_ttl_expiry\\(self\\)" m)
23253 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
23254 " " m)))
23255 #t)))))
23256 (native-inputs
23257 `(("python-freezegun" ,python-freezegun)))
23258 (home-page
23259 "https://github.com/pydanny/cached-property")
23260 (synopsis
23261 "Decorator for caching properties in classes")
23262 (description
23263 "This package provides a decorator which makes caching
23264 time-or-computationally-expensive properties quick and easy and works in Python
23265 2 or 3.")
23266 (license license:bsd-3)))
23267
23268 (define-public python-folium
23269 (package
23270 (name "python-folium")
23271 (version "0.12.1")
23272 (source
23273 (origin
23274 ;; PyPI has a ".whl" file but not a proper source release.
23275 ;; Thus, fetch code from Git.
23276 (method git-fetch)
23277 (uri (git-reference
23278 (url "https://github.com/python-visualization/folium")
23279 (commit (string-append "v" version))))
23280 (file-name (git-file-name name version))
23281 (sha256
23282 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
23283 (build-system python-build-system)
23284 (propagated-inputs
23285 `(("python-branca" ,python-branca)
23286 ("python-jinja2" ,python-jinja2)
23287 ("python-numpy" ,python-numpy)
23288 ("python-requests" ,python-requests)))
23289 (native-inputs
23290 `(("python-pytest" ,python-pytest)))
23291 (home-page "https://github.com/python-visualization/folium")
23292 (synopsis "Make beautiful maps with Leaflet.js & Python")
23293 (description "@code{folium} makes it easy to visualize data that’s been
23294 manipulated in Python on an interactive leaflet map. It enables both the
23295 binding of data to a map for @code{choropleth} visualizations as well as
23296 passing rich vector/raster/HTML visualizations as markers on the map.
23297
23298 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
23299 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
23300 supports Image, Video, GeoJSON and TopoJSON overlays.")
23301 (license license:expat)))
23302
23303 (define-public jube
23304 (package
23305 ;; This is a command-line tool, so no "python-" prefix.
23306 (name "jube")
23307 (version "2.2.2")
23308 (source (origin
23309 (method url-fetch)
23310 (uri (string-append
23311 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
23312 version))
23313 (sha256
23314 (base32
23315 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
23316 (file-name (string-append "jube-" version ".tar.gz"))))
23317 (build-system python-build-system)
23318 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
23319 (synopsis "Benchmarking environment")
23320 (description
23321 "JUBE helps perform and analyze benchmarks in a systematic way. For each
23322 benchmarked application, benchmark data is stored in a format that allows JUBE
23323 to deduct the desired information. This data can be parsed by automatic pre-
23324 and post-processing scripts that draw information and store it more densely
23325 for manual interpretation.")
23326 (license license:gpl3+)))
23327
23328 (define-public python-pyroutelib3
23329 (package
23330 (name "python-pyroutelib3")
23331 (version "1.3.post1")
23332 (source
23333 (origin
23334 (method url-fetch)
23335 (uri (pypi-uri "pyroutelib3" version))
23336 (sha256
23337 (base32
23338 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
23339 (build-system python-build-system)
23340 (propagated-inputs
23341 `(("python-dateutil" ,python-dateutil)))
23342 (home-page "https://github.com/MKuranowski/pyroutelib3")
23343 (synopsis "Library for simple routing on OSM data")
23344 (description "Library for simple routing on OSM data")
23345 (license license:gpl3+)))
23346
23347 (define-public python-bibtexparser
23348 (package
23349 (name "python-bibtexparser")
23350 (version "1.1.0")
23351 (source
23352 (origin
23353 (method url-fetch)
23354 (uri (pypi-uri "bibtexparser" version))
23355 (sha256
23356 (base32
23357 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
23358 (build-system python-build-system)
23359 (propagated-inputs
23360 `(("python-pyparsing" ,python-pyparsing)))
23361 (native-inputs
23362 `(("python-future" ,python-future)))
23363 (home-page "https://github.com/sciunto-org/python-bibtexparser")
23364 (synopsis "Python library to parse BibTeX files")
23365 (description "BibtexParser is a Python library to parse BibTeX files.")
23366 (license (list license:bsd-3 license:lgpl3))))
23367
23368 (define-public python-distro
23369 (package
23370 (name "python-distro")
23371 (version "1.4.0")
23372 (source
23373 (origin
23374 (method url-fetch)
23375 (uri (pypi-uri "distro" version))
23376 (sha256
23377 (base32
23378 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
23379 (build-system python-build-system)
23380 (native-inputs
23381 `(("python-pytest" ,python-pytest)))
23382 (home-page "https://github.com/nir0s/distro")
23383 (synopsis
23384 "OS platform information API")
23385 (description
23386 "@code{distro} provides information about the OS distribution it runs on,
23387 such as a reliable machine-readable ID, or version information.
23388
23389 It is the recommended replacement for Python's original
23390 `platform.linux_distribution` function (which will be removed in Python 3.8).
23391 @code{distro} also provides a command-line interface to output the platform
23392 information in various formats.")
23393 (license license:asl2.0)))
23394
23395 (define-public python-cairosvg
23396 (package
23397 (name "python-cairosvg")
23398 (version "2.5.0")
23399 (source
23400 (origin
23401 (method url-fetch)
23402 (uri (pypi-uri "CairoSVG" version))
23403 (sha256
23404 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
23405 (build-system python-build-system)
23406 (arguments
23407 `(#:phases
23408 (modify-phases %standard-phases
23409 (replace 'check
23410 (lambda _ (invoke "pytest"))))))
23411 (propagated-inputs
23412 `(("python-cairocffi" ,python-cairocffi)
23413 ("python-cssselect2" ,python-cssselect2)
23414 ("python-defusedxml" ,python-defusedxml)
23415 ("python-pillow" ,python-pillow)
23416 ("python-tinycss2" ,python-tinycss2)))
23417 (native-inputs
23418 `(("python-pytest-flake8" ,python-pytest-flake8)
23419 ("python-pytest-isort" ,python-pytest-isort)
23420 ("python-pytest-runner" ,python-pytest-runner)))
23421 (home-page "https://cairosvg.org/")
23422 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
23423 (description "CairoSVG is a SVG converter based on Cairo. It can export
23424 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
23425 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
23426 parsed, the result is drawn to a Cairo surface that can be exported to
23427 qvarious formats: PDF, PostScript, PNG and even SVG.")
23428 (license license:lgpl3+)))
23429
23430 (define-public python-pyphen
23431 (package
23432 (name "python-pyphen")
23433 (version "0.10.0")
23434 (source
23435 (origin
23436 (method url-fetch)
23437 (uri (pypi-uri "Pyphen" version))
23438 (sha256
23439 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
23440 (build-system python-build-system)
23441 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
23442 ;; embedded set provided by upstream - like Debian does.
23443 (home-page "https://github.com/Kozea/Pyphen")
23444 (synopsis "Pure Python module to hyphenate text")
23445 (description "Pyphen is a pure Python module to hyphenate text using
23446 existing Hunspell hyphenation dictionaries.")
23447 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
23448
23449 (define-public python-intelhex
23450 (package
23451 (name "python-intelhex")
23452 (version "2.2.1")
23453 (source
23454 (origin
23455 (method url-fetch)
23456 (uri (pypi-uri "intelhex" version))
23457 (sha256
23458 (base32
23459 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
23460 (build-system python-build-system)
23461 (arguments '(#:tests? #f)) ;issue with version
23462 (home-page "https://pypi.org/project/IntelHex/")
23463 (synopsis "Python library for Intel HEX files manipulations")
23464 (description "The Intel HEX file format is widely used in microprocessors
23465 and microcontrollers area (embedded systems etc.) as the de facto standard for
23466 representation of code to be programmed into microelectronic devices. This
23467 package provides an intelhex Python library to read, write, create from
23468 scratch and manipulate data from Intel HEX file format. It also includes
23469 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
23470 converters and more, those based on the library itself.")
23471 (license license:bsd-3)))
23472
23473 (define-public python-pykwalify
23474 (package
23475 (name "python-pykwalify")
23476 (version "1.7.0")
23477 (source
23478 (origin
23479 (method url-fetch)
23480 (uri (pypi-uri "pykwalify" version))
23481 (sha256
23482 (base32
23483 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
23484 (build-system python-build-system)
23485 (arguments '(#:tests? #f)) ;missing dependencies
23486 (propagated-inputs
23487 `(("python-dateutil" ,python-dateutil)
23488 ("python-docopt" ,python-docopt)
23489 ("python-pyyaml" ,python-pyyaml)))
23490 (home-page "https://github.com/grokzen/pykwalify")
23491 (synopsis
23492 "Python lib/cli for JSON/YAML schema validation")
23493 (description
23494 "This package provides a parser, schema validator, and data binding tool
23495 for YAML and JSON.")
23496 (license license:expat)))
23497
23498 (define-public python-dbusmock
23499 (package
23500 (name "python-dbusmock")
23501 (version "0.18.3")
23502 (source
23503 (origin
23504 (method url-fetch)
23505 (uri (pypi-uri "python-dbusmock" version))
23506 (sha256
23507 (base32
23508 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
23509 (build-system python-build-system)
23510 (arguments
23511 '(#:phases
23512 (modify-phases %standard-phases
23513 (add-after 'unpack 'patch-shell-path
23514 (lambda _
23515 (substitute* "tests/test_code.py"
23516 (("/bin/bash") (which "bash")))
23517 #t)))))
23518 (native-inputs
23519 `(;; For tests.
23520 ("dbus" ,dbus) ; for dbus-daemon
23521 ("python-nose" ,python-nose)
23522 ("which" ,which)))
23523 (propagated-inputs
23524 `(("python-dbus" ,python-dbus)
23525 ("python-pygobject" ,python-pygobject)))
23526 (home-page "https://github.com/martinpitt/python-dbusmock")
23527 (synopsis "Python library for mock D-Bus objects")
23528 (description "python-dbusmock allows for the easy creation of mock objects on
23529 D-Bus. This is useful for writing tests for software which talks to D-Bus
23530 services such as upower, systemd, logind, gnome-session or others, and it is
23531 hard (or impossible without root privileges) to set the state of the real
23532 services to what you expect in your tests.")
23533 (license license:lgpl3+)))
23534
23535 (define-public python-jsonplus
23536 (package
23537 (name "python-jsonplus")
23538 (version "0.8.0")
23539 (home-page "https://github.com/randomir/jsonplus")
23540 (source (origin
23541 (method url-fetch)
23542 (uri (pypi-uri "jsonplus" version))
23543 (sha256
23544 (base32
23545 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
23546 (build-system python-build-system)
23547 ;; XXX: No tests on PyPI, and the repository has no tags.
23548 (arguments '(#:tests? #f))
23549 (propagated-inputs
23550 `(("python-dateutil" ,python-dateutil)
23551 ("python-simplejson" ,python-simplejson)
23552 ("python-sortedcontainers" ,python-sortedcontainers)))
23553 (synopsis "Serialize Python types to/from JSON")
23554 (description
23555 "This package provides functionality to serialize arbitrary data types
23556 to and from JSON. Common data types are implemented and it is easy to
23557 register custom encoders and decoders.")
23558 (license license:expat)))
23559
23560 (define-public python-ujson
23561 (package
23562 (name "python-ujson")
23563 (version "4.0.2")
23564 (source
23565 (origin
23566 (method url-fetch)
23567 (uri (pypi-uri "ujson" version))
23568 (sha256
23569 (base32
23570 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
23571 (modules '((guix build utils)))
23572 (snippet
23573 '(begin (delete-file-recursively "deps") #t))))
23574 (build-system python-build-system)
23575 (arguments
23576 `(#:phases
23577 (modify-phases %standard-phases
23578 (add-after 'unpack 'link-to-system-double-conversion
23579 (lambda* (#:key inputs #:allow-other-keys)
23580 (let ((d-c (assoc-ref inputs "double-conversion")))
23581 (substitute* "setup.py"
23582 (("./deps/double-conversion/double-conversion\"")
23583 (string-append d-c "/include/double-conversion\""))
23584 (("-lstdc++" stdc)
23585 (string-append "-L" d-c "/lib\","
23586 " \"-ldouble-conversion\","
23587 " \"" stdc)))
23588 #t)))
23589 (replace 'check
23590 (lambda* (#:key inputs outputs #:allow-other-keys)
23591 (add-installed-pythonpath inputs outputs)
23592 (invoke "pytest"))))))
23593 (native-inputs
23594 `(("double-conversion" ,double-conversion)
23595 ("python-setuptools-scm" ,python-setuptools-scm)
23596 ("python-pytest" ,python-pytest)))
23597 (home-page "https://github.com/ultrajson/ultrajson")
23598 (synopsis "Ultra fast JSON encoder and decoder for Python")
23599 (description
23600 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
23601 bindings for Python 3.")
23602 (license license:bsd-3)))
23603
23604 (define-public python-iocapture
23605 ;; The latest release is more than a year older than this commit.
23606 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
23607 (revision "1"))
23608 (package
23609 (name "python-iocapture")
23610 (version "0.1.2")
23611 (source
23612 (origin
23613 (method git-fetch)
23614 (uri (git-reference
23615 (url "https://github.com/oinume/iocapture")
23616 (commit commit)))
23617 (file-name (git-file-name name version))
23618 (sha256
23619 (base32
23620 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
23621 (build-system python-build-system)
23622 (arguments
23623 `(#:phases
23624 (modify-phases %standard-phases
23625 (delete 'check)
23626 (add-after 'install 'check
23627 (lambda* (#:key inputs outputs #:allow-other-keys)
23628 (add-installed-pythonpath inputs outputs)
23629 (invoke "py.test" "-v" "tests")
23630 #t)))))
23631 (propagated-inputs
23632 `(("python-flexmock" ,python-flexmock)
23633 ("python-pytest" ,python-pytest)
23634 ("python-pytest-cov" ,python-pytest-cov)
23635 ("python-six" ,python-six)))
23636 (home-page "https://github.com/oinume/iocapture")
23637 (synopsis "Python capturing tool for stdout and stderr")
23638 (description
23639 "This package helps you to capture the standard out (stdout) and the
23640 standard error channel (stderr) in your program.")
23641 (license license:expat))))
23642
23643 (define-public python-anyio
23644 (package
23645 (name "python-anyio")
23646 (version "3.3.0")
23647 (source
23648 (origin
23649 (method url-fetch)
23650 (uri (pypi-uri "anyio" version))
23651 (sha256
23652 (base32
23653 "0x03hsprdrs86wjjkj96zm2jswy3a5bgyrknyi58pzz5hdsscmxf"))))
23654 (build-system python-build-system)
23655 (arguments
23656 `(#:phases
23657 (modify-phases %standard-phases
23658 (add-after 'unpack 'fix-compatibility
23659 (lambda _
23660 (substitute* "tests/test_taskgroups.py"
23661 (("import pytest")
23662 "import pytest\nimport _pytest\nfrom _pytest import logging")
23663 (("pytest.LogCaptureFixture")
23664 "_pytest.logging.LogCaptureFixture"))))
23665 (replace 'check
23666 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23667 (when tests?
23668 (add-installed-pythonpath inputs outputs)
23669 (invoke "pytest" "-vv" "-p" "no:asyncio"
23670 "-m" "not network"
23671 "-k"
23672 (string-append
23673 "not test_is_block_device"
23674
23675 ;; These fail because of network (or specifically
23676 ;; IPv6 network) access.
23677 " and not test_accept"
23678 " and not test_accept_after_close"
23679 " and not test_close_during_receive"
23680 " and not test_close_from_other_task"
23681 " and not test_concurrent_receive"
23682 " and not test_concurrent_send"
23683 " and not test_connect_tcp_with_tls"
23684 " and not test_connect_tcp_with_tls_cert_check_fail"
23685 " and not test_connection_refused"
23686 " and not test_extra_attributes"
23687 " and not test_getaddrinfo"
23688 " and not test_getnameinfo"
23689 " and not test_happy_eyeballs"
23690 " and not test_iterate"
23691 " and not test_receive_after_close"
23692 " and not test_receive_timeout"
23693 " and not test_reuse_port"
23694 " and not test_run_process"
23695 " and not test_send_after_close"
23696 " and not test_send_after_eof"
23697 " and not test_send_after_peer_closed"
23698 " and not test_send_eof"
23699 " and not test_send_large_buffer"
23700 " and not test_send_receive"
23701 " and not test_socket_options"))))))))
23702 (propagated-inputs
23703 `(("python-idna" ,python-idna)
23704 ("python-sniffio" ,python-sniffio)
23705 ("python-typing-extensions" ,python-typing-extensions)))
23706 (native-inputs
23707 `(("python-coverage" ,python-coverage)
23708 ("python-hypothesis" ,python-hypothesis)
23709 ("python-iniconfig" ,python-iniconfig)
23710 ("python-mock" ,python-mock)
23711 ("python-pytest" ,python-pytest-6)
23712 ("python-pytest-mock" ,python-pytest-mock)
23713 ("python-pytest-trio" ,python-pytest-trio)
23714 ("python-setuptools-scm" ,python-setuptools-scm)
23715 ("python-trustme" ,python-trustme)
23716 ("python-uvloop" ,python-uvloop)))
23717 (home-page "https://github.com/agronholm/anyio")
23718 (synopsis "Compatibility layer for multiple asynchronous event loops")
23719 (description
23720 "AnyIO is an asynchronous networking and concurrency library that works
23721 on top of either asyncio or trio. It implements trio-like structured
23722 concurrency on top of asyncio, and works in harmony with the native SC of trio
23723 itself.")
23724 (license license:expat)))
23725
23726 (define-public python-argh
23727 ;; There are 21 commits since the latest release containing important
23728 ;; improvements.
23729 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
23730 (revision "1"))
23731 (package
23732 (name "python-argh")
23733 (version (git-version "0.26.2" revision commit))
23734 (source
23735 (origin
23736 (method git-fetch)
23737 (uri (git-reference
23738 (url "https://github.com/neithere/argh")
23739 (commit commit)))
23740 (file-name (git-file-name name version))
23741 (sha256
23742 (base32
23743 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
23744 (build-system python-build-system)
23745 (propagated-inputs
23746 `(("python-iocapture" ,python-iocapture)
23747 ("python-mock" ,python-mock)
23748 ("python-pytest" ,python-pytest)
23749 ("python-pytest-cov" ,python-pytest-cov)
23750 ("python-pytest-xdist" ,python-pytest-xdist)))
23751 (home-page "https://github.com/neithere/argh/")
23752 (synopsis "Argparse wrapper with natural syntax")
23753 (description
23754 "python-argh is a small library that provides several layers of
23755 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
23756 always possible to declare a command with the highest possible (and least
23757 flexible) layer and then tune the behaviour with any of the lower layers
23758 including the native API of @code{python-argparse}.")
23759 (license license:lgpl3+))))
23760
23761 (define-public python-ppft
23762 (package
23763 (name "python-ppft")
23764 (version "1.6.6.1")
23765 (source
23766 (origin
23767 (method url-fetch)
23768 (uri (pypi-uri "ppft" version))
23769 (sha256
23770 (base32
23771 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
23772 (build-system python-build-system)
23773 (arguments '(#:tests? #f)) ; there are none
23774 (propagated-inputs
23775 `(("python-six" ,python-six)))
23776 (home-page "https://pypi.org/project/ppft/")
23777 (synopsis "Fork of Parallel Python")
23778 (description
23779 "This package is a fork of Parallel Python. The Parallel Python
23780 module (@code{pp}) provides an easy and efficient way to create
23781 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
23782 computers and clusters. It features cross-platform portability and dynamic
23783 load balancing.")
23784 (license license:bsd-3)))
23785
23786 (define-public python-pox
23787 (package
23788 (name "python-pox")
23789 (version "0.2.7")
23790 (source
23791 (origin
23792 (method url-fetch)
23793 (uri (pypi-uri "pox" version))
23794 (sha256
23795 (base32
23796 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
23797 (build-system python-build-system)
23798 (arguments
23799 `(#:phases
23800 (modify-phases %standard-phases
23801 (replace 'check
23802 (lambda _
23803 (mkdir-p "/tmp/guix")
23804 (setenv "SHELL" "bash")
23805 (setenv "USERNAME" "guix")
23806 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
23807 (invoke "py.test" "-vv")
23808 #t)))))
23809 (native-inputs
23810 `(("python-pytest" ,python-pytest)
23811 ("which" ,which)))
23812 (home-page "https://pypi.org/project/pox/")
23813 (synopsis "Python utilities for file system exploration and automated builds")
23814 (description
23815 "Pox provides a collection of utilities for navigating and manipulating
23816 file systems. This module is designed to facilitate some of the low-level
23817 operating system interactions that are useful when exploring a file system on a
23818 remote host. Pox provides Python equivalents of several shell commands such
23819 as @command{which} and @command{find}. These commands allow automated
23820 discovery of what has been installed on an operating system, and where the
23821 essential tools are located.")
23822 (license license:bsd-3)))
23823
23824 (define-public python-pathos
23825 (package
23826 (name "python-pathos")
23827 (version "0.2.5")
23828 (source
23829 (origin
23830 (method url-fetch)
23831 (uri (pypi-uri "pathos" version))
23832 (sha256
23833 (base32
23834 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
23835 (build-system python-build-system)
23836 (arguments
23837 '(#:phases
23838 (modify-phases %standard-phases
23839 (replace 'check
23840 (lambda _
23841 (invoke "python" "./tests/__main__.py"))))))
23842 (propagated-inputs
23843 `(("python-dill" ,python-dill)
23844 ("python-multiprocess" ,python-multiprocess)
23845 ("python-pox" ,python-pox)
23846 ("python-ppft" ,python-ppft)))
23847 (native-inputs
23848 `(("python-pytest" ,python-pytest)))
23849 (home-page "https://pypi.org/project/pathos/")
23850 (synopsis
23851 "Parallel graph management and execution in heterogeneous computing")
23852 (description
23853 "Python-pathos is a framework for heterogeneous computing. It provides a
23854 consistent high-level interface for configuring and launching parallel
23855 computations across heterogeneous resources. Python-pathos provides configurable
23856 launchers for parallel and distributed computing, where each launcher contains
23857 the syntactic logic to configure and launch jobs in an execution environment.")
23858 (license license:bsd-3)))
23859
23860 (define-public python-flit
23861 (package
23862 (name "python-flit")
23863 (version "3.2.0")
23864 ;; We fetch the sources via git because on pypi the package is split into
23865 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
23866 (source (origin
23867 (method git-fetch)
23868 (uri (git-reference
23869 (url "https://github.com/takluyver/flit")
23870 (commit version)))
23871 (file-name (git-file-name name version))
23872 (sha256
23873 (base32
23874 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
23875 (build-system python-build-system)
23876 (arguments
23877 `(#:phases
23878 (modify-phases %standard-phases
23879 (add-before 'build 'bootstrap
23880 (lambda* (#:key inputs #:allow-other-keys)
23881 (let ((home (string-append (getcwd) "/home")))
23882 (mkdir-p home)
23883 (setenv "HOME" home))
23884 (for-each make-file-writable (find-files "."))
23885 (copy-recursively (assoc-ref inputs "python-testpath")
23886 (string-append (getcwd) "/testpath"))
23887 (substitute* "pyproject.toml"
23888 (("\"testpath\",") ""))
23889 (invoke "python" "bootstrap_dev.py")))
23890 (replace 'build
23891 (lambda _
23892 ;; A ZIP archive should be generated, but it fails with "ZIP does
23893 ;; not support timestamps before 1980". Luckily,
23894 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
23895 ;; 1980.
23896 (setenv "SOURCE_DATE_EPOCH" "315532800")
23897 (for-each (lambda (toml)
23898 (invoke "python3" "-m" "flit"
23899 "--debug" "--ini-file" toml
23900 "build"))
23901 '("testpath/pyproject.toml"
23902 "pyproject.toml"))
23903 (with-directory-excursion "flit_core"
23904 (invoke "python" "build_dists.py"))))
23905 (replace 'install
23906 (lambda* (#:key inputs outputs #:allow-other-keys)
23907 (add-installed-pythonpath inputs outputs)
23908 (let ((out (assoc-ref outputs "out")))
23909 (delete-file-recursively "./home")
23910 (for-each (lambda (wheel)
23911 (format #true wheel)
23912 (invoke "python" "-m" "pip" "install"
23913 wheel (string-append "--prefix=" out)))
23914 (append
23915 (find-files "flit_core/dist" "\\.whl$")
23916 (find-files "dist" "\\.whl$")))))))
23917 #:tests? #f)) ; XXX: Check requires network access.
23918 (propagated-inputs
23919 `(("python-pytoml" ,python-pytoml)
23920 ("python-toml" ,python-toml)))
23921 (native-inputs
23922 `(("python-docutils" ,python-docutils)
23923 ("python-responses" ,python-responses)
23924 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
23925 ("python-pytest" ,python-pytest)
23926 ("python-pytest-cov" ,python-pytest-cov)
23927 ("python-sphinx" ,python-sphinx)
23928 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
23929 ;; This package needs testpath, but testpath also needs flit...
23930 ("python-testpath"
23931 ,(let ((name "python-testpath")
23932 (version "0.4.4"))
23933 (origin
23934 (method git-fetch)
23935 (uri (git-reference
23936 (url "https://github.com/jupyter/testpath")
23937 (commit version)))
23938 (file-name (git-file-name name version))
23939 (sha256
23940 (base32
23941 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
23942 (home-page "https://flit.readthedocs.io/")
23943 (synopsis
23944 "Simple packaging tool for simple packages")
23945 (description
23946 "Flit is a simple way to put Python packages and modules on PyPI. Flit
23947 packages a single importable module or package at a time, using the import
23948 name as the name on PyPI. All subpackages and data files within a package
23949 are included automatically.")
23950 (license license:bsd-3)))
23951
23952 (define-public python-pathtools
23953 (package
23954 (name "python-pathtools")
23955 (version "0.1.2")
23956 (source
23957 (origin
23958 (method url-fetch)
23959 (uri (pypi-uri "pathtools" version))
23960 (sha256
23961 (base32
23962 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
23963 (build-system python-build-system)
23964 (home-page
23965 "https://github.com/gorakhargosh/pathtools")
23966 (synopsis "Path utilities for Python")
23967 (description "Pattern matching and various utilities for file systems
23968 paths.")
23969 (license license:expat)))
23970
23971 (define-public python-fastentrypoints
23972 (package
23973 (name "python-fastentrypoints")
23974 (version "0.12")
23975 (source
23976 (origin
23977 (method url-fetch)
23978 (uri (pypi-uri "fastentrypoints" version))
23979 (sha256
23980 (base32
23981 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
23982 (build-system python-build-system)
23983 (home-page
23984 "https://github.com/ninjaaron/fast-entry_points")
23985 (synopsis
23986 "Makes entry_points specified in setup.py load more quickly")
23987 (description
23988 "Using entry_points in your setup.py makes scripts that start really
23989 slowly because it imports pkg_resources. This package allows such setup
23990 scripts to load entry points more quickly.")
23991 (license license:bsd-3)))
23992
23993 (define-public python-funcparserlib
23994 (package
23995 (name "python-funcparserlib")
23996 (version "0.3.6")
23997 (source
23998 (origin
23999 (method url-fetch)
24000 (uri (pypi-uri "funcparserlib" version))
24001 (sha256
24002 (base32
24003 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
24004 (native-inputs
24005 `(("python-tox" ,python-tox)))
24006 (arguments
24007 `(#:phases
24008 (modify-phases %standard-phases
24009 (replace 'check
24010 (lambda _
24011 (invoke "tox"))))))
24012 (build-system python-build-system)
24013 (home-page
24014 "https://github.com/vlasovskikh/funcparserlib")
24015 (synopsis
24016 "Recursive descent parsing library based on functional combinators")
24017 (description
24018 "This package is a recursive descent parsing library for Python based on
24019 functional combinators. Parser combinators are just higher-order functions
24020 that take parsers as their arguments and return them as result values.")
24021 (license license:expat)))
24022
24023 (define-public python-speg
24024 (package
24025 (name "python-speg")
24026 (version "0.3")
24027 (source
24028 (origin
24029 (method url-fetch)
24030 (uri (pypi-uri "speg" version ".zip"))
24031 (sha256
24032 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
24033 (arguments
24034 `(#:tests? #f)) ;FIXME: tests fail, not sure why
24035 (native-inputs
24036 `(("unzip" ,unzip)))
24037 (build-system python-build-system)
24038 (home-page "https://github.com/avakar/speg")
24039 (synopsis "PEG-based parser interpreter with memoization")
24040 (description "This package is a PEG-based parser and interpreter with
24041 memoization.")
24042 (license license:expat)))
24043
24044 (define-public python-cson
24045 (package
24046 (name "python-cson")
24047 (version "0.8")
24048 (source
24049 (origin
24050 (method url-fetch)
24051 (uri (pypi-uri "cson" version))
24052 (sha256
24053 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
24054 (build-system python-build-system)
24055 (propagated-inputs
24056 `(("python-speg" ,python-speg)))
24057 (home-page "https://github.com/avakar/pycson")
24058 (synopsis "Parser for Coffeescript Object Notation (CSON)")
24059 (description "This package is a parser for Coffeescript Object
24060 Notation (CSON).")
24061 (license license:expat)))
24062
24063 (define-public python-asynctest
24064 (package
24065 (name "python-asynctest")
24066 (version "0.13.0")
24067 (source
24068 (origin
24069 (method url-fetch)
24070 (uri (pypi-uri "asynctest" version))
24071 (sha256
24072 (base32
24073 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
24074 (build-system python-build-system)
24075 (arguments
24076 '(#:phases
24077 (modify-phases %standard-phases
24078 (replace 'check
24079 (lambda _
24080 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
24081 (add-after 'unpack 'disable-tests
24082 (lambda* _
24083 ;; XXX: 7 tests fail out of 220. Disable them for now.
24084 (substitute* (list "test/test_selector.py"
24085 "test/test_mock.py")
24086 (("def test_events_watched_outside_test_are_ignored")
24087 "@unittest.skip('disabled by guix')
24088 def test_events_watched_outside_test_are_ignored")
24089 (("def test_awaited_from_autospec_mock.*" line)
24090 (string-append line " return True\n"))
24091 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
24092 (string-append line " return True\n"))
24093 (("def test_patch_coroutine_with_multiple_scopes.*" line)
24094 (string-append line " return True\n"))
24095 (("def test_multiple_patches_on_coroutine.*" line)
24096 (string-append line " return True\n"))
24097 (("def test_patch_coroutine_only_when_running.*" line)
24098 (string-append line " return True\n")))
24099 #t)))))
24100 (home-page "https://github.com/Martiusweb/asynctest")
24101 (synopsis "Extension of unittest for testing asyncio libraries")
24102 (description
24103 "The package asynctest is built on top of the standard unittest module
24104 and cuts down boilerplate code when testing libraries for asyncio.")
24105 (license license:asl2.0)))
24106
24107 (define-public python-aionotify
24108 (package
24109 (name "python-aionotify")
24110 (version "0.2.0")
24111 (source
24112 (origin
24113 ;; Source tarball on PyPi lacks tests
24114 (method git-fetch)
24115 (uri (git-reference
24116 (url "https://github.com/rbarrois/aionotify")
24117 (commit (string-append "v" version))))
24118 (file-name (git-file-name name version))
24119 (sha256
24120 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
24121 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
24122 (build-system python-build-system)
24123 (home-page "https://github.com/rbarrois/aionotify")
24124 (synopsis "Asyncio-powered inotify library")
24125 (description
24126 "@code{aionotify} is a simple, asyncio-based inotify library.")
24127 (license license:bsd-3)))
24128
24129 (define-public python-forbiddenfruit
24130 (package
24131 (name "python-forbiddenfruit")
24132 (version "0.1.3")
24133 (source
24134 (origin
24135 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
24136 (method git-fetch)
24137 (uri (git-reference
24138 (url "https://github.com/clarete/forbiddenfruit")
24139 (commit version)))
24140 (file-name (git-file-name name version))
24141 (sha256
24142 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
24143 (build-system python-build-system)
24144 (arguments
24145 '(#:phases
24146 (modify-phases %standard-phases
24147 (replace 'check
24148 (lambda _
24149 (invoke "make" "SKIP_DEPS=1"))))))
24150 (native-inputs
24151 `(("python-nose" ,python-nose)
24152 ("python-coverage" ,python-coverage)))
24153 (home-page "https://github.com/clarete/forbiddenfruit")
24154 (synopsis "Patch python built-in objects")
24155 (description "This project allows Python code to extend built-in types.")
24156 (license (list license:gpl3+ license:expat))))
24157
24158 (define-public python-k5test
24159 (package
24160 (name "python-k5test")
24161 (version "0.9.2")
24162 (source
24163 (origin
24164 (method url-fetch)
24165 (uri (pypi-uri "k5test" version))
24166 (sha256
24167 (base32
24168 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
24169 (build-system python-build-system)
24170 (propagated-inputs
24171 `(("python-six" ,python-six)
24172 ;; `which`, `kadmin.local` binaries called inside library
24173 ("which" ,which)
24174 ("mit-krb5" ,mit-krb5)))
24175 (native-inputs `(("mit-krb5" ,mit-krb5)))
24176 (arguments
24177 '(#:phases
24178 (modify-phases %standard-phases
24179 (add-after 'unpack 'apply-upstream-fixes
24180 (lambda* _
24181 (substitute* "k5test/realm.py"
24182 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
24183 (("'kadmin_local'") "'kadmin.local'")
24184 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
24185 (("\\.stop_daemon") "._stop_daemon")))))))
24186 (home-page "https://github.com/pythongssapi/k5test")
24187 (synopsis "Library for setting up self-contained Kerberos 5 environments")
24188 (description
24189 "@code{k5test} is a library for setting up self-contained Kerberos 5
24190 environments, and running Python unit tests inside those environments. It is
24191 based on the file of the same name found alongside the MIT Kerberos 5 unit
24192 tests.")
24193 (license license:isc)))
24194
24195 (define-public python-gssapi
24196 (package
24197 (name "python-gssapi")
24198 (version "1.6.12")
24199 (source
24200 (origin
24201 (method url-fetch)
24202 (uri (pypi-uri "gssapi" version))
24203 (sha256
24204 (base32
24205 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
24206 (build-system python-build-system)
24207 (propagated-inputs
24208 `(("python-decorator" ,python-decorator)
24209 ("python-six" ,python-six)))
24210 (inputs
24211 `(("mit-krb5" ,mit-krb5)))
24212 ;; for tests
24213 (native-inputs
24214 `(("python-parameterized" ,python-parameterized)
24215 ("python-k5test" ,python-k5test)
24216 ("python-nose" ,python-nose)))
24217 (home-page "https://github.com/pythongssapi/python-gssapi")
24218 (synopsis "Python GSSAPI Wrapper")
24219 (description
24220 "Python-GSSAPI provides both low-level and high level wrappers around the
24221 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
24222 also be usable with other GSSAPI mechanisms.")
24223 (license license:isc)))
24224
24225 (define-public python-check-manifest
24226 (package
24227 (name "python-check-manifest")
24228 (version "0.37")
24229 (source
24230 (origin
24231 (method url-fetch)
24232 (uri (pypi-uri "check-manifest" version))
24233 (sha256
24234 (base32
24235 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
24236 (build-system python-build-system)
24237 (native-inputs
24238 `(("python-mock" ,python-mock)
24239 ("git" ,git)))
24240 (home-page "https://github.com/mgedmin/check-manifest")
24241 (synopsis "Check MANIFEST.in in a Python source package for completeness")
24242 (description "Python package can include a MANIFEST.in file to help with
24243 sending package files to the Python Package Index. This package checks that
24244 file to ensure it completely and accurately describes your project.")
24245 (license license:expat)))
24246
24247 (define-public python-android-stringslib
24248 (package
24249 (name "python-android-stringslib")
24250 (version "0.1.2")
24251 (source
24252 (origin
24253 (method git-fetch)
24254 (uri (git-reference
24255 (url "https://framagit.org/tyreunom/python-android-strings-lib")
24256 (commit (string-append "v" version))))
24257 (file-name (git-file-name name version))
24258 (sha256
24259 (base32
24260 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
24261 (build-system python-build-system)
24262 (arguments
24263 `(#:tests? #f))
24264 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
24265 (synopsis "Android strings.xml support")
24266 (description "Android Strings Lib provides support for android's strings.xml
24267 files. These files are used to translate strings in android apps.")
24268 (license license:expat)))
24269
24270 (define-public python-watchdog
24271 (package
24272 (name "python-watchdog")
24273 (version "0.9.0")
24274 (source
24275 (origin
24276 (method url-fetch)
24277 (uri (pypi-uri "watchdog" version))
24278 (sha256
24279 (base32
24280 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
24281 (build-system python-build-system)
24282 (arguments
24283 `(#:phases
24284 (modify-phases %standard-phases
24285 (add-before 'check 'remove-failing
24286 (lambda _
24287 (delete-file "tests/test_inotify_buffer.py")
24288 (delete-file "tests/test_snapshot_diff.py")
24289 #t)))))
24290 (propagated-inputs
24291 `(("python-argh" ,python-argh)
24292 ("python-pathtools" ,python-pathtools)
24293 ("python-pyyaml" ,python-pyyaml)))
24294 (native-inputs
24295 `(("python-pytest-cov" ,python-pytest-cov)
24296 ("python-pytest-timeout" ,python-pytest-timeout)))
24297 (home-page "https://github.com/gorakhargosh/watchdog")
24298 (synopsis "File system events monitoring")
24299 (description "This package provides a way to monitor file system events
24300 such as a file modification and trigger an action. This is similar to inotify,
24301 but portable.")
24302 (license license:asl2.0)))
24303
24304 (define-public python-watchgod
24305 (package
24306 (name "python-watchgod")
24307 (version "0.6")
24308 (source
24309 (origin
24310 ;; There are no tests in the PyPI tarball.
24311 (method git-fetch)
24312 (uri (git-reference
24313 (url "https://github.com/samuelcolvin/watchgod")
24314 (commit (string-append "v" version))))
24315 (file-name (git-file-name name version))
24316 (sha256
24317 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
24318 (build-system python-build-system)
24319 (arguments
24320 `(#:phases
24321 (modify-phases %standard-phases
24322 (replace 'check
24323 (lambda* (#:key tests? #:allow-other-keys)
24324 (when tests?
24325 (invoke "pytest" "-vv")))))))
24326 (native-inputs
24327 `(("python-coverage" ,python-coverage)
24328 ("python-docutils" ,python-docutils)
24329 ("python-flake8" ,python-flake8)
24330 ("python-isort" ,python-isort)
24331 ("python-pycodestyle" ,python-pycodestyle)
24332 ("python-pyflakes" ,python-pyflakes)
24333 ("python-pygments" ,python-pygments)
24334 ("python-pytest" ,python-pytest)
24335 ("python-pytest-cov" ,python-pytest-cov)
24336 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
24337 ("python-pytest-mock" ,python-pytest-mock)
24338 ("python-pytest-sugar" ,python-pytest-sugar)
24339 ("python-pytest-toolbox" ,python-pytest-toolbox)))
24340 (home-page "https://github.com/samuelcolvin/watchgod")
24341 (synopsis "Simple, modern file watching and code reload in Python")
24342 (description
24343 "Simple, modern file watching and code reload in Python inspired by
24344 @code{watchdog}. Among the differences are a unified approach for each
24345 operating systems and an elegant approach to concurrency using threading.")
24346 (license license:expat)))
24347
24348 (define-public python-wget
24349 (package
24350 (name "python-wget")
24351 (version "3.2")
24352 (source
24353 (origin
24354 (method url-fetch)
24355 (uri (pypi-uri "wget" version ".zip"))
24356 (sha256
24357 (base32
24358 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
24359 (build-system python-build-system)
24360 (native-inputs `(("unzip" ,unzip)))
24361 (home-page "https://bitbucket.org/techtonik/python-wget/")
24362 (synopsis "Pure Python download utility")
24363 (description "The python-wget library provides an API to download files
24364 with features similar to the @command{wget} utility.")
24365 (license license:unlicense)))
24366
24367 (define-public offlate
24368 (package
24369 (name "offlate")
24370 (version "0.5")
24371 (source
24372 (origin
24373 (method git-fetch)
24374 (uri (git-reference
24375 (url "https://framagit.org/tyreunom/offlate")
24376 (commit version)))
24377 (file-name (git-file-name name version))
24378 (sha256
24379 (base32
24380 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
24381 (build-system python-build-system)
24382 (arguments
24383 ;; No tests
24384 `(#:tests? #f))
24385 (propagated-inputs
24386 `(("python-android-stringslib" ,python-android-stringslib)
24387 ("python-dateutil" ,python-dateutil)
24388 ("python-gitlab" ,python-gitlab)
24389 ("python-lxml" ,python-lxml)
24390 ("python-polib" ,python-polib)
24391 ("python-pyenchant" ,python-pyenchant)
24392 ("python-pygit2" ,python-pygit2)
24393 ("python-pygithub" ,python-pygithub)
24394 ("python-pyqt" ,python-pyqt)
24395 ("python-requests" ,python-requests)
24396 ("python-ruamel.yaml" ,python-ruamel.yaml)
24397 ("python-translation-finder" ,python-translation-finder)
24398 ("python-watchdog" ,python-watchdog)))
24399 (native-inputs
24400 `(("qttools" ,qttools)))
24401 (home-page "https://framagit.org/tyreunom/offlate")
24402 (synopsis "Offline translation interface for online translation tools")
24403 (description "Offlate offers a unified interface for different translation
24404 file formats, as well as many different online translation platforms. You can
24405 use it to get work from online platforms, specialized such as the Translation
24406 Project, or not such a gitlab instance when your upstream doesn't use any
24407 dedicated platform. The tool proposes a unified interface for any format and
24408 an upload option to send your work back to the platform.")
24409 (license license:gpl3+)))
24410
24411 (define-public python-titlecase
24412 (package
24413 (name "python-titlecase")
24414 (version "0.12.0")
24415 (source
24416 (origin
24417 (method url-fetch)
24418 (uri (pypi-uri "titlecase" version))
24419 (sha256
24420 (base32
24421 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
24422 (build-system python-build-system)
24423 (native-inputs
24424 `(("python-nose" ,python-nose)))
24425 (home-page "https://github.com/ppannuto/python-titlecase")
24426 (synopsis "Capitalize strings similar to book titles")
24427 (description
24428 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
24429 It capitalizes (predominantly English) strings in a way that is similar to
24430 book titles, using the New York Times Manual of Style to leave certain words
24431 lowercase.")
24432 (license license:expat)))
24433
24434 (define-public python-pypng
24435 (package
24436 (name "python-pypng")
24437 (version "0.0.20")
24438 (source
24439 (origin
24440 (method url-fetch)
24441 (uri (pypi-uri "pypng" version))
24442 (sha256
24443 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
24444 (build-system python-build-system)
24445 (home-page "https://github.com/drj11/pypng")
24446 (synopsis "Pure Python PNG image encoder/decoder")
24447 (description
24448 "The PyPNG module implements support for PNG images. It reads and writes
24449 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
24450 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
24451 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
24452 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
24453 A number of optional chunks can be specified (when writing) and
24454 understood (when reading): tRNS, bKGD, gAMA.
24455
24456 PyPNG is not a high level toolkit for image processing (like PIL) and does not
24457 aim at being a replacement or competitor. Its strength lies in fine-grained
24458 extensive support of PNG features. It can also read and write Netpbm PAM
24459 files, with a focus on its use as an intermediate format for implementing
24460 custom PNG processing.")
24461 (license license:expat)))
24462
24463 (define-public python-fuzzywuzzy
24464 (package
24465 (name "python-fuzzywuzzy")
24466 (version "0.18.0")
24467 (source
24468 (origin
24469 (method url-fetch)
24470 (uri (pypi-uri "fuzzywuzzy" version))
24471 (sha256
24472 (base32
24473 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
24474 (build-system python-build-system)
24475 (native-inputs
24476 `(("python-hypothesis" ,python-hypothesis)
24477 ("python-pycodestyle" ,python-pycodestyle)
24478 ("python-pytest" ,python-pytest)))
24479 (propagated-inputs
24480 `(("python-levenshtein" ,python-levenshtein)))
24481 (home-page "https://github.com/seatgeek/fuzzywuzzy")
24482 (synopsis "Fuzzy string matching in Python")
24483 (description "Approximate string matching using
24484 @emph{Levenshtein Distance} to calculate the differences between
24485 sequences.")
24486 (license license:gpl2)))
24487
24488 (define-public python2-fuzzywuzzy
24489 (package-with-python2 python-fuzzywuzzy))
24490
24491 (define-public python-block-tracing
24492 (package
24493 (name "python-block-tracing")
24494 (version "1.0.1")
24495 (source
24496 (origin
24497 (method url-fetch)
24498 (uri (pypi-uri "block_tracing" version))
24499 (sha256
24500 (base32
24501 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
24502 (build-system python-build-system)
24503 (arguments '(#:tests? #f)) ; no tests
24504 (home-page "https://github.com/rianhunter/block_tracing")
24505 (synopsis "Protect process memory")
24506 (description
24507 "@code{block_tracing} is a tiny Python library that can be used to
24508 prevent debuggers and other applications from inspecting the memory within
24509 your process.")
24510 (license license:expat)))
24511
24512 (define-public python-gcovr
24513 (package
24514 (name "python-gcovr")
24515 (version "4.2")
24516 (source
24517 (origin
24518 (method url-fetch)
24519 (uri (pypi-uri "gcovr" version))
24520 (sha256
24521 (base32
24522 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
24523 (build-system python-build-system)
24524 (propagated-inputs
24525 `(("python-lxml" ,python-lxml)
24526 ("python-jinja2" ,python-jinja2)))
24527 (home-page "https://gcovr.com/")
24528 (synopsis "Utility for generating code coverage results")
24529 (description
24530 "Gcovr provides a utility for managing the use of the GNU gcov
24531 utility and generating summarized code coverage results. It is inspired
24532 by the Python coverage.py package, which provides a similar utility for
24533 Python.")
24534 (license license:bsd-3)))
24535
24536 (define-public python-owslib
24537 (package
24538 (name "python-owslib")
24539 (version "0.19.2")
24540 (source
24541 (origin
24542 (method url-fetch)
24543 (uri (pypi-uri "OWSLib" version))
24544 (sha256
24545 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
24546 (build-system python-build-system)
24547 (arguments
24548 ;; TODO: package dependencies required for tests.
24549 '(#:tests? #f
24550 #:phases (modify-phases %standard-phases
24551 (delete 'sanity-check))))
24552 (synopsis "Interface for Open Geospatial Consortium web service")
24553 (description
24554 "OWSLib is a Python package for client programming with Open Geospatial
24555 Consortium (OGC) web service (hence OWS) interface standards, and their related
24556 content models.")
24557 (home-page "https://geopython.github.io/OWSLib/")
24558 (license license:bsd-3)))
24559
24560 (define-public python-docusign-esign
24561 (package
24562 (name "python-docusign-esign")
24563 (version "3.1.0")
24564 (source (origin
24565 (method url-fetch)
24566 (uri (pypi-uri "docusign_esign" version))
24567 (sha256
24568 (base32
24569 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
24570 (build-system python-build-system)
24571 ;; Testing requires undocumented setup changes, and so testing is disabled here.
24572 (arguments `(#:tests? #f))
24573 (propagated-inputs
24574 `(("python-certifi" ,python-certifi)
24575 ("python-six" ,python-six)
24576 ("python-dateutil" ,python-dateutil)
24577 ("python-urllib3" ,python-urllib3)
24578 ("python-pyjwt" ,python-pyjwt)
24579 ("python-cryptography" ,python-cryptography)
24580 ("python-nose" ,python-nose)))
24581 (synopsis "DocuSign Python Client")
24582 (description "The Official DocuSign Python Client Library used to interact
24583 with the eSign REST API. Send, sign, and approve documents using this client.")
24584 (home-page "https://www.docusign.com/devcenter")
24585 (license license:expat)))
24586
24587 (define-public python-xattr
24588 (package
24589 (name "python-xattr")
24590 (version "0.9.7")
24591 (source
24592 (origin
24593 (method url-fetch)
24594 (uri (pypi-uri "xattr" version))
24595 (sha256
24596 (base32
24597 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
24598 (build-system python-build-system)
24599 (propagated-inputs
24600 `(("python-cffi" ,python-cffi)))
24601 (home-page "https://github.com/xattr/xattr")
24602 (synopsis
24603 "Python wrapper for extended file system attributes")
24604 (description "This package provides a Python wrapper for using extended
24605 file system attributes. Extended attributes extend the basic attributes of files
24606 and directories in the file system. They are stored as name:data pairs
24607 associated with file system objects (files, directories, symlinks, etc).")
24608 (license license:expat)))
24609
24610 (define-public python-json-logger
24611 (package
24612 (name "python-json-logger")
24613 (version "0.1.11")
24614 (source
24615 (origin
24616 (method url-fetch)
24617 (uri (pypi-uri "python-json-logger" version))
24618 (sha256
24619 (base32
24620 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
24621 (build-system python-build-system)
24622 (home-page
24623 "https://github.com/madzak/python-json-logger")
24624 (synopsis "JSON log formatter in Python")
24625 (description "This library allows standard Python logging to output log data
24626 as JSON objects. With JSON we can make our logs more readable by machines and
24627 we can stop writing custom parsers for syslog-type records.")
24628 (license license:bsd-3)))
24629
24630 (define-public python-daiquiri
24631 (package
24632 (name "python-daiquiri")
24633 (version "2.1.1")
24634 (source
24635 (origin
24636 (method url-fetch)
24637 (uri (pypi-uri "daiquiri" version))
24638 (sha256
24639 (base32
24640 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
24641 (build-system python-build-system)
24642 (propagated-inputs
24643 `(("python-json-logger" ,python-json-logger)))
24644 (native-inputs
24645 `(("python-mock" ,python-mock)
24646 ("python-pytest" ,python-pytest)
24647 ("python-setuptools-scm" ,python-setuptools-scm)
24648 ("python-six" ,python-six)))
24649 (home-page "https://github.com/jd/daiquiri")
24650 (synopsis
24651 "Library to configure Python logging easily")
24652 (description "The daiquiri library provides an easy way to configure
24653 logging in Python. It also provides some custom formatters and handlers.")
24654 (license license:asl2.0)))
24655
24656 (define-public python-pifpaf
24657 (package
24658 (name "python-pifpaf")
24659 (version "2.5.0")
24660 (source
24661 (origin
24662 (method url-fetch)
24663 (uri (pypi-uri "pifpaf" version))
24664 (sha256
24665 (base32
24666 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
24667 (build-system python-build-system)
24668 (arguments
24669 '(#:phases
24670 (modify-phases %standard-phases
24671 (replace 'check
24672 (lambda _
24673 (invoke "python" "setup.py" "testr" "--slowest"
24674 "--testr-args=until-failure"))))))
24675 (propagated-inputs
24676 `(("python-click" ,python-click)
24677 ("python-daiquiri" ,python-daiquiri)
24678 ("python-fixtures" ,python-fixtures)
24679 ("python-jinja2" ,python-jinja2)
24680 ("python-pbr" ,python-pbr)
24681 ("python-psutil" ,python-psutil)
24682 ("python-six" ,python-six)
24683 ("python-xattr" ,python-xattr)))
24684 (native-inputs
24685 `(("python-mock" ,python-mock)
24686 ("python-os-testr" ,python-os-testr)
24687 ("python-requests" ,python-requests)
24688 ("python-testrepository" ,python-testrepository)
24689 ("python-testtools" ,python-testtools)))
24690 (home-page "https://github.com/jd/pifpaf")
24691 (synopsis "Tools and fixtures to manage daemons for testing in Python")
24692 (description "Pifpaf is a suite of fixtures and a command-line tool that
24693 starts and stops daemons for a quick throw-away usage. This is typically
24694 useful when needing these daemons to run integration testing. It originally
24695 evolved from its precursor @code{overtest}.")
24696 (license license:asl2.0)))
24697
24698 (define-public python-pytest-check-links
24699 (package
24700 (name "python-pytest-check-links")
24701 (version "0.3.0")
24702 (source
24703 (origin
24704 (method url-fetch)
24705 ;; URI uses underscores
24706 (uri (pypi-uri "pytest_check_links" version))
24707 (sha256
24708 (base32
24709 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
24710 (build-system python-build-system)
24711 (propagated-inputs
24712 `(("python-docutils" ,python-docutils)
24713 ("python-html5lib" ,python-html5lib)
24714 ("python-nbconvert" ,python-nbconvert)
24715 ("python-nbformat" ,python-nbformat)
24716 ("python-pytest" ,python-pytest)
24717 ("python-six" ,python-six)))
24718 (native-inputs
24719 `(("python-pbr-minimal" ,python-pbr-minimal)))
24720 (home-page "https://github.com/minrk/pytest-check-links")
24721 (synopsis "Check links in files")
24722 (description "This package provides a pytest plugin that checks URLs for
24723 HTML-containing files.")
24724 (license license:bsd-3)))
24725
24726 (define-public python-json5
24727 (package
24728 (name "python-json5")
24729 (version "0.8.5")
24730 (source
24731 (origin
24732 ;; sample.json5 is missing from PyPi source tarball
24733 (method git-fetch)
24734 (uri (git-reference
24735 (url "https://github.com/dpranke/pyjson5")
24736 (commit (string-append "v" version))))
24737 (file-name (git-file-name name version))
24738 (sha256
24739 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
24740 (build-system python-build-system)
24741 (home-page "https://github.com/dpranke/pyjson5")
24742 (synopsis
24743 "Python implementation of the JSON5 data format")
24744 (description
24745 "JSON5 extends the JSON data interchange format to make it slightly more
24746 usable as a configuration language. This Python package implements parsing and
24747 dumping of JSON5 data structures.")
24748 (license license:asl2.0)))
24749
24750 (define-public python-frozendict
24751 (package
24752 (name "python-frozendict")
24753 (version "1.2")
24754 (source
24755 (origin
24756 (method url-fetch)
24757 (uri (pypi-uri "frozendict" version))
24758 (sha256
24759 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
24760 (build-system python-build-system)
24761 (home-page "https://github.com/slezica/python-frozendict")
24762 (synopsis "Simple immutable mapping for Python")
24763 (description
24764 "@dfn{frozendict} is an immutable wrapper around dictionaries that
24765 implements the complete mapping interface. It can be used as a drop-in
24766 replacement for dictionaries where immutability is desired.")
24767 (license license:expat)))
24768
24769 (define-public python-unpaddedbase64
24770 (package
24771 (name "python-unpaddedbase64")
24772 (version "2.1.0")
24773 (source
24774 (origin
24775 (method url-fetch)
24776 (uri (pypi-uri "unpaddedbase64" version))
24777 (sha256
24778 (base32 "01ghlmw63fgslwj8j74vkpf1kqvr7a4agm6nyn89vqwx106ccwvj"))))
24779 (build-system python-build-system)
24780 (arguments
24781 `(#:phases
24782 (modify-phases %standard-phases
24783 (replace 'check
24784 (lambda* (#:key inputs tests? #:allow-other-keys)
24785 (when tests?
24786 (copy-recursively (string-append
24787 (assoc-ref inputs "tests") "/tests")
24788 "tests")
24789 (invoke "python" "-m" "pytest" "-vv")))))))
24790 (native-inputs
24791 `(("python-pytest" ,python-pytest)
24792 ("tests"
24793 ;; The release on pypi comes without tests. We can't build from this
24794 ;; checkout, though, because installation requires an invocation of
24795 ;; poetry.
24796 ,(origin
24797 (method git-fetch)
24798 (uri (git-reference
24799 (url "https://github.com/matrix-org/python-unpaddedbase64")
24800 (commit (string-append "v" version))))
24801 (file-name (git-file-name name version))
24802 (sha256
24803 (base32
24804 "1n6har8pxv0mqb96lanzihp1xf76aa17jw3977drb1fgz947pnmz"))))))
24805 (home-page "https://github.com/matrix-org/python-unpaddedbase64")
24806 (synopsis "Encode and decode Base64 without “=” padding")
24807 (description
24808 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
24809 using “=” characters. However this conveys no benefit so many protocols
24810 choose to use Base64 without the “=” padding.")
24811 (license license:asl2.0)))
24812
24813 (define-public python-py-cpuinfo
24814 (package
24815 (name "python-py-cpuinfo")
24816 (version "5.0.0")
24817 (source
24818 (origin
24819 (method url-fetch)
24820 (uri (pypi-uri "py-cpuinfo" version))
24821 (sha256
24822 (base32
24823 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
24824 (build-system python-build-system)
24825 (home-page "https://github.com/workhorsy/py-cpuinfo")
24826 (synopsis "Get CPU info with Python")
24827 (description
24828 "This Python module returns the CPU info by using the best sources of
24829 information for your operating system.")
24830 (license license:expat)))
24831
24832 (define-public python-canonicaljson
24833 (package
24834 (name "python-canonicaljson")
24835 (version "1.4.0")
24836 (source
24837 (origin
24838 (method url-fetch)
24839 (uri (pypi-uri "canonicaljson" version))
24840 (sha256
24841 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
24842 (build-system python-build-system)
24843 (propagated-inputs
24844 `(("python-six" ,python-six)
24845 ("python-frozendict" ,python-frozendict)
24846 ("python-simplejson" ,python-simplejson)))
24847 (home-page "https://github.com/matrix-org/python-canonicaljson")
24848 (synopsis "Canonical JSON")
24849 (description
24850 "Deterministically encode JSON.
24851
24852 @itemize
24853 @item Encodes objects and arrays as RFC 7159 JSON.
24854 @item Sorts object keys so that you get the same result each time.
24855 @item Has no insignificant whitespace to make the output as small as possible.
24856 @item Escapes only the characters that must be escaped, U+0000 to
24857 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
24858 @item Uses the shortest escape sequence for each escaped character.
24859 @item Encodes the JSON as UTF-8.
24860 @item Can encode frozendict immutable dictionaries.
24861 @end itemize")
24862 (license license:asl2.0)))
24863
24864 (define-public python-signedjson
24865 (package
24866 (name "python-signedjson")
24867 (version "1.1.1")
24868 (source
24869 (origin
24870 (method url-fetch)
24871 (uri (pypi-uri "signedjson" version))
24872 (sha256
24873 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
24874 (build-system python-build-system)
24875 (propagated-inputs
24876 `(("python-canonicaljson" ,python-canonicaljson)
24877 ("python-importlib-metadata" ,python-importlib-metadata)
24878 ("python-pynacl" ,python-pynacl)
24879 ("python-typing-extensions" ,python-typing-extensions)
24880 ("python-unpaddedbase64" ,python-unpaddedbase64)))
24881 (native-inputs
24882 `(("python-setuptools-scm" ,python-setuptools-scm)))
24883 (home-page "https://github.com/matrix-org/python-signedjson")
24884 (synopsis "Sign JSON objects with ED25519 signatures")
24885 (description
24886 "Sign JSON objects with ED25519 signatures.
24887
24888 @itemize
24889 @item More than one entity can sign the same object.
24890 @item Each entity can sign the object with more than one key making it easier to
24891 rotate keys
24892 @item ED25519 can be replaced with a different algorithm.
24893 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
24894 key.
24895 @end itemize")
24896 (license license:asl2.0)))
24897
24898 (define-public python-daemonize
24899 (package
24900 (name "python-daemonize")
24901 (version "2.5.0")
24902 (source
24903 (origin
24904 (method url-fetch)
24905 (uri (pypi-uri "daemonize" version))
24906 (sha256
24907 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
24908 (build-system python-build-system)
24909 (home-page "https://github.com/thesharp/daemonize")
24910 (synopsis "Library for writing system daemons in Python")
24911 (description "Daemonize is a library for writing system daemons in Python.")
24912 (license license:expat)))
24913
24914 (define-public python-pymacaroons
24915 (package
24916 (name "python-pymacaroons")
24917 (version "0.13.0")
24918 (source
24919 (origin
24920 (method url-fetch)
24921 (uri (pypi-uri "pymacaroons" version))
24922 (sha256
24923 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
24924 (build-system python-build-system)
24925 (propagated-inputs
24926 `(("python-six" ,python-six)
24927 ("python-pynacl" ,python-pynacl)))
24928 (home-page "https://github.com/ecordell/pymacaroons")
24929 (synopsis "Python Macaroon Library")
24930 (description
24931 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
24932 tokens, macaroons embed caveats that define specific authorization
24933 requirements for the target service, the service that issued the root macaroon
24934 and which is capable of verifying the integrity of macaroons it receives.
24935
24936 Macaroons allow for delegation and attenuation of authorization. They are
24937 simple and fast to verify, and decouple authorization policy from the
24938 enforcement of that policy.")
24939 (license license:expat)))
24940
24941 (define-public python-ldap3
24942 (package
24943 (name "python-ldap3")
24944 (version "2.7")
24945 (home-page "https://github.com/cannatag/ldap3")
24946 (source
24947 (origin
24948 (method git-fetch)
24949 (uri (git-reference (url home-page)
24950 (commit (string-append "v" version))))
24951 (file-name (git-file-name name version))
24952 (sha256
24953 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
24954 (build-system python-build-system)
24955 (arguments
24956 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
24957 #:phases (modify-phases %standard-phases
24958 (replace 'check
24959 (lambda* (#:key tests? #:allow-other-keys)
24960 (when tests?
24961 (invoke "nosetests" "-s" "test"))
24962 #t)))))
24963 (native-inputs
24964 `(("python-nose" ,python-nose)))
24965 (propagated-inputs
24966 `(("python-gssapi" ,python-gssapi)
24967 ("python-pyasn1" ,python-pyasn1)))
24968 (synopsis "Python LDAP client")
24969 (description
24970 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
24971 library.")
24972 (license license:lgpl3+)))
24973
24974 (define-public python-boltons
24975 (package
24976 (name "python-boltons")
24977 (version "20.0.0")
24978 (source
24979 (origin
24980 (method url-fetch)
24981 (uri (pypi-uri "boltons" version))
24982 (sha256
24983 (base32
24984 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
24985 (build-system python-build-system)
24986 (home-page "https://github.com/mahmoud/boltons")
24987 (synopsis "Extensions to the Python standard library")
24988 (description
24989 "Boltons is a set of over 230 pure-Python utilities in the same spirit
24990 as — and yet conspicuously missing from — the standard library, including:
24991
24992 @itemize
24993 @item Atomic file saving, bolted on with fileutils
24994 @item A highly-optimized OrderedMultiDict, in dictutils
24995 @item Two types of PriorityQueue, in queueutils
24996 @item Chunked and windowed iteration, in iterutils
24997 @item Recursive data structure iteration and merging, with iterutils.remap
24998 @item Exponential backoff functionality, including jitter, through
24999 iterutils.backoff
25000 @item A full-featured TracebackInfo type, for representing stack traces, in
25001 tbutils
25002 @end itemize")
25003 (license license:bsd-3)))
25004
25005 (define-public python-eliot
25006 (package
25007 (name "python-eliot")
25008 (version "1.13.0")
25009 (source
25010 (origin
25011 (method url-fetch)
25012 (uri (pypi-uri "eliot" version))
25013 (sha256
25014 (base32 "1xzzhsjrrw430dc84vamf683bwp9i0nr86xf2iav6yla615ijq2p"))))
25015 (build-system python-build-system)
25016 (arguments
25017 `(#:phases
25018 (modify-phases %standard-phases
25019 (add-after 'unpack 'remove-journald-support
25020 (lambda _
25021 (for-each delete-file
25022 '("eliot/tests/test_journald.py"
25023 "eliot/journald.py"))
25024 #t))
25025 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
25026 ;; remove command-line tool's tests. TODO eliot-prettyprint should
25027 ;; be installed and these tests should pass.
25028 (lambda _
25029 (delete-file "eliot/tests/test_prettyprint.py")
25030 #t))
25031 (add-after 'remove-eliot-prettyprint-tests 'remove-failing-tests
25032 (lambda _
25033 ;; These tests started to fail after updating python-pandas to
25034 ;; 1.3.3 and python-dask to 2021.9.1.
25035 (substitute* "eliot/tests/test_validation.py"
25036 (("test_omitLoggerFromActionType")
25037 "_test_omitLoggerFromActionType")
25038 (("test_logCallsDefaultLoggerWrite")
25039 "_test_logCallsDefaultLoggerWrite"))
25040 #t)))))
25041 (propagated-inputs
25042 `(("python-boltons" ,python-boltons)
25043 ("python-pyrsistent" ,python-pyrsistent)
25044 ("python-six" ,python-six)
25045 ("python-zope-interface" ,python-zope-interface)))
25046 (native-inputs
25047 `(("python-black" ,python-black)
25048 ("python-coverage" ,python-coverage)
25049 ("python-dask" ,python-dask)
25050 ("python-flake8" ,python-flake8)
25051 ("python-hypothesis" ,python-hypothesis)
25052 ("python-pytest" ,python-pytest)
25053 ("python-setuptools" ,python-setuptools)
25054 ("python-sphinx" ,python-sphinx)
25055 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
25056 ("python-testtools" ,python-testtools)
25057 ("python-twine" ,python-twine)
25058 ("python-twisted" ,python-twisted)))
25059 (home-page "https://github.com/itamarst/eliot/")
25060 (synopsis "Eliot: the logging system that tells you why it happened")
25061 (description
25062 "@dfn{eliot} is a Python logging system that outputs causal chains of
25063 actions: actions can spawn other actions, and eventually they either succeed
25064 or fail. The resulting logs tell you the story of what your software did: what
25065 happened, and what caused it.")
25066 (license license:asl2.0)))
25067
25068 (define-public python-pem
25069 (package
25070 (name "python-pem")
25071 (version "20.1.0")
25072 (source
25073 (origin
25074 (method url-fetch)
25075 (uri (pypi-uri "pem" version))
25076 (sha256
25077 (base32
25078 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
25079 (build-system python-build-system)
25080 (native-inputs
25081 `(("python-certifi" ,python-certifi)
25082 ("python-coverage" ,python-coverage)
25083 ("python-pretend" ,python-pretend)
25084 ("python-pyopenssl" ,python-pyopenssl)
25085 ("python-pytest" ,python-pytest)
25086 ("python-sphinx" ,python-sphinx)
25087 ("python-twisted" ,python-twisted)))
25088 (home-page "https://pem.readthedocs.io/")
25089 (synopsis "Easy PEM file parsing in Python")
25090 (description
25091 "This package provides a Python module for parsing and splitting PEM files.")
25092 (license license:expat)))
25093
25094 (define-public python-txsni
25095 ;; We need a few commits on top of 0.1.9 for compatibility with newer
25096 ;; Python and OpenSSL.
25097 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
25098 (revision "0"))
25099 (package
25100 (name "python-txsni")
25101 (version (git-version "0.1.9" revision commit))
25102 (home-page "https://github.com/glyph/txsni")
25103 (source
25104 (origin
25105 (method git-fetch)
25106 (uri (git-reference (url home-page) (commit commit)))
25107 (file-name (git-file-name name version))
25108 (sha256
25109 (base32
25110 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
25111 (build-system python-build-system)
25112 (propagated-inputs
25113 `(("python-pyopenssl" ,python-pyopenssl)
25114 ("python-service-identity" ,python-service-identity)
25115 ("python-twisted" ,python-twisted)))
25116 (synopsis "Run TLS servers with Twisted")
25117 (description
25118 "This package provides an easy-to-use SNI endpoint for use
25119 with the Twisted web framework.")
25120 (license license:expat))))
25121
25122 (define-public python-txacme
25123 (package
25124 (name "python-txacme")
25125 (version "0.9.2")
25126 (source
25127 (origin
25128 (method url-fetch)
25129 (uri (pypi-uri "txacme" version))
25130 (sha256
25131 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
25132 (build-system python-build-system)
25133 (propagated-inputs
25134 `(("python-acme" ,python-acme)
25135 ("python-attrs" ,python-attrs)
25136 ("python-eliot" ,python-eliot)
25137 ("python-josepy" ,python-josepy)
25138 ("python-pem" ,python-pem)
25139 ("python-treq" ,python-treq)
25140 ("python-twisted" ,python-twisted)
25141 ("python-txsni" ,python-txsni)))
25142 (native-inputs
25143 `(("python-fixtures" ,python-fixtures)
25144 ("python-hypothesis" ,python-hypothesis)
25145 ("python-mock" ,python-mock)
25146 ("python-service-identity"
25147 ,python-service-identity)
25148 ("python-testrepository" ,python-testrepository)
25149 ("python-testscenarios" ,python-testscenarios)
25150 ("python-testtools" ,python-testtools)))
25151 (home-page "https://github.com/twisted/txacme")
25152 (synopsis "Twisted implexmentation of the ACME protocol")
25153 (description
25154 "ACME is Automatic Certificate Management Environment, a protocol that
25155 allows clients and certificate authorities to automate verification and
25156 certificate issuance. The ACME protocol is used by the free Let's Encrypt
25157 Certificate Authority.
25158
25159 txacme is an implementation of the protocol for Twisted, the event-driven
25160 networking engine for Python.")
25161 (license license:expat)))
25162
25163 (define-public python-pysaml2
25164 (package
25165 (name "python-pysaml2")
25166 (version "6.5.1")
25167 (source
25168 (origin
25169 (method url-fetch)
25170 (uri (pypi-uri "pysaml2" version))
25171 (sha256
25172 (base32
25173 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
25174 (build-system python-build-system)
25175 (propagated-inputs
25176 `(("python-cryptography" ,python-cryptography)
25177 ("python-dateutil" ,python-dateutil)
25178 ("python-defusedxml" ,python-defusedxml)
25179 ("python-importlib-resources"
25180 ,python-importlib-resources)
25181 ("python-pyopenssl" ,python-pyopenssl)
25182 ("python-pytz" ,python-pytz)
25183 ("python-requests" ,python-requests)
25184 ("python-six" ,python-six)
25185 ("python-xmlschema" ,python-xmlschema)))
25186 (home-page "https://idpy.org")
25187 (synopsis "Python implementation of SAML Version 2 Standard")
25188 (description
25189 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
25190 It contains all necessary pieces for building a SAML2 service provider or
25191 an identity provider. The distribution contains examples of both.
25192
25193 This package was originally written to work in a WSGI environment, but
25194 there are extensions that allow you to use it with other frameworks.")
25195 (license license:asl2.0)))
25196
25197 (define-public python-click-plugins
25198 (package
25199 (name "python-click-plugins")
25200 (version "1.1.1")
25201 (source
25202 (origin
25203 (method url-fetch)
25204 (uri (pypi-uri "click-plugins" version))
25205 (sha256
25206 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
25207 (build-system python-build-system)
25208 (native-inputs
25209 `(("python-pytest" ,python-pytest)))
25210 (propagated-inputs
25211 `(("python-click" ,python-click)))
25212 (synopsis "Extension for Click to register external CLI commands")
25213 (description "This package provides n extension module for Click to
25214 register external CLI commands via setuptools entry-points.")
25215 (home-page "https://github.com/click-contrib/click-plugins")
25216 (license license:bsd-3)))
25217
25218 (define-public python-diceware
25219 (package
25220 (name "python-diceware")
25221 (version "0.9.6")
25222 (source
25223 (origin
25224 (method url-fetch)
25225 (uri (pypi-uri "diceware" version))
25226 (sha256
25227 (base32
25228 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
25229 (build-system python-build-system)
25230 (native-inputs
25231 `(("python-coverage" ,python-coverage)
25232 ("python-pytest" ,python-pytest)
25233 ("python-pytest-runner" ,python-pytest-runner)))
25234 (home-page "https://github.com/ulif/diceware/")
25235 (synopsis "Generates memorable passphrases")
25236 (description "This package generates passphrases by concatenating words
25237 randomly picked from wordlists. It supports several sources of
25238 randomness (including real life dice) and different wordlists (including
25239 cryptographically signed ones).")
25240 (license license:gpl3+)))
25241
25242 (define-public python-dictdiffer
25243 (package
25244 (name "python-dictdiffer")
25245 (version "0.8.1")
25246 (source (origin
25247 (method url-fetch)
25248 (uri (pypi-uri "dictdiffer" version))
25249 (sha256
25250 (base32
25251 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
25252 (build-system python-build-system)
25253 (native-inputs
25254 `(("python-check-manifest" ,python-check-manifest)
25255 ("python-coverage" ,python-coverage)
25256 ("python-isort" ,python-isort)
25257 ("python-mock" ,python-mock)
25258 ("python-pydoctstyle" ,python-pydocstyle)
25259 ("python-pytest-cache" ,python-pytest-cache)
25260 ("python-pytest-cov" ,python-pytest-cov)
25261 ("python-pytest-pep8" ,python-pytest-pep8)
25262 ("python-pytest-runner" ,python-pytest-runner)
25263 ("python-pytest" ,python-pytest)
25264 ("python-setuptools-scm" ,python-setuptools-scm)
25265 ("python-tox" ,python-tox)))
25266 (home-page "https://github.com/inveniosoftware/dictdiffer")
25267 (synopsis "Diff and patch Python dictionary objects")
25268 (description
25269 "Dictdiffer is a Python module that helps you to diff and patch
25270 dictionaries.")
25271 (license license:expat)))
25272
25273 (define-public pyzo
25274 (package
25275 (name "pyzo")
25276 (version "4.11.2")
25277 (source
25278 (origin
25279 (method url-fetch)
25280 (uri (pypi-uri "pyzo" version))
25281 (sha256
25282 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
25283 (build-system python-build-system)
25284 (arguments
25285 `(#:phases
25286 (modify-phases %standard-phases
25287 (add-before 'check 'fix-home-directory
25288 (lambda _
25289 ;; Tests fail with "Permission denied: '/homeless-shelter'".
25290 (setenv "HOME" "/tmp")
25291 #t)))
25292 ;; Tests fail with "Uncaught Python exception: python: undefined
25293 ;; symbol: objc_getClass".
25294 #:tests? #f))
25295 (propagated-inputs
25296 `(("python-pyqt" ,python-pyqt)))
25297 (home-page "https://pyzo.org")
25298 (synopsis
25299 "Python IDE for scientific computing")
25300 (description
25301 "Pyzo is a Python IDE focused on interactivity and introspection,
25302 which makes it very suitable for scientific computing. Its practical
25303 design is aimed at simplicity and efficiency.
25304
25305 It consists of two main components, the editor and the shell, and uses
25306 a set of pluggable tools to help the programmer in various ways. Some
25307 example tools are source structure, project manager, interactive help,
25308 workspace...")
25309 (license license:bsd-2)))
25310
25311 (define-public python-osc
25312 (package
25313 (name "python-osc")
25314 (version "1.7.4")
25315 (source
25316 (origin
25317 (method url-fetch)
25318 (uri (pypi-uri "python-osc" version))
25319 (sha256
25320 (base32
25321 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
25322 (build-system python-build-system)
25323 (home-page "https://github.com/attwad/python-osc")
25324 (synopsis "Open Sound Control server and client implementations")
25325 (description
25326 "@code{python-osc} is a pure Python library with no external
25327 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
25328 Open Sound Control 1.0} specification.")
25329 (license license:unlicense)))
25330
25331 (define-public python-voluptuous
25332 (package
25333 (name "python-voluptuous")
25334 (version "0.11.7")
25335 (source
25336 (origin
25337 (method url-fetch)
25338 (uri (pypi-uri "voluptuous" version))
25339 (sha256
25340 (base32
25341 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
25342 (build-system python-build-system)
25343 (native-inputs
25344 `(("python-nose" ,python-nose)))
25345 (home-page "https://github.com/alecthomas/voluptuous")
25346 (synopsis "Python data validation library")
25347 (description
25348 "Voluptuous is a Python data validation library. It is primarily
25349 intended for validating data coming into Python as JSON, YAML, etc.")
25350 (license license:bsd-3)))
25351
25352 (define-public python-cmd2
25353 (package
25354 (name "python-cmd2")
25355 (version "1.0.2")
25356 (source
25357 (origin
25358 (method url-fetch)
25359 (uri (pypi-uri "cmd2" version))
25360 (sha256
25361 (base32
25362 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
25363 (build-system python-build-system)
25364 (propagated-inputs
25365 `(("python-attrs" ,python-attrs)
25366 ("python-colorama" ,python-colorama)
25367 ("python-pyperclip" ,python-pyperclip)
25368 ("python-wcwidth" ,python-wcwidth)))
25369 (native-inputs
25370 `(("python-codecov" ,python-codecov)
25371 ("python-coverage" ,python-coverage)
25372 ("python-doc8" ,python-doc8)
25373 ("python-flake8" ,python-flake8)
25374 ("python-invoke" ,python-invoke)
25375 ("python-mock" ,python-mock)
25376 ("python-pytest" ,python-pytest)
25377 ("python-pytest-cov" ,python-pytest-cov)
25378 ("python-pytest-mock" ,python-pytest-mock)
25379 ("python-setuptools-scm" ,python-setuptools-scm)
25380 ("python-sphinx" ,python-sphinx)
25381 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
25382 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
25383 ("python-tox" ,python-tox)
25384 ("python-twine" ,python-twine)
25385 ("which" ,which)))
25386 (home-page "https://github.com/python-cmd2/cmd2")
25387 (synopsis "Tool for building interactive command line applications")
25388 (description
25389 "Cmd2 is a tool for building interactive command line applications in
25390 Python. Its goal is to make it quick and easy for developers to build
25391 feature-rich and user-friendly interactive command line applications. It
25392 provides a simple API which is an extension of Python's built-in @code{cmd}
25393 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
25394 make your life easier and eliminates much of the boilerplate code which would
25395 be necessary when using @code{cmd}.")
25396 (license license:expat)))
25397
25398 (define-public python-pytidylib
25399 (package
25400 (name "python-pytidylib")
25401 (version "0.3.2")
25402 (source (origin
25403 (method url-fetch)
25404 (uri (pypi-uri "pytidylib" version))
25405 (sha256
25406 (base32
25407 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
25408 (build-system python-build-system)
25409 (arguments
25410 '(#:phases
25411 (modify-phases %standard-phases
25412 (add-before 'build 'qualify-libtidy
25413 (lambda* (#:key inputs #:allow-other-keys)
25414 (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
25415 (substitute* "tidylib/tidy.py"
25416 (("ctypes\\.util\\.find_library\\('tidy'\\)")
25417 (format #f "'~a'" libtidy)))
25418 #t))))))
25419 (inputs `(("tidy" ,tidy)))
25420 (home-page "https://github.com/countergram/pytidylib")
25421 (synopsis "Python wrapper for HTML Tidy library")
25422 (description
25423 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
25424 allows you, from Python code, to “fix” invalid (X)HTML markup.")
25425 (license license:expat)))
25426
25427 (define-public python2-pytidylib
25428 (package-with-python2 python-pytidylib))
25429
25430 (define-public python-mujson
25431 (package
25432 (name "python-mujson")
25433 (version "1.4")
25434 (source
25435 (origin
25436 (method url-fetch)
25437 (uri (pypi-uri "mujson" version))
25438 (sha256
25439 (base32
25440 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
25441 (build-system python-build-system)
25442 (home-page "https://github.com/mattgiles/mujson")
25443 (synopsis "Use the fastest JSON functions available at import time")
25444 (description "This package selects the fastest JSON functions available
25445 at import time.")
25446 (license license:expat)))
25447
25448 (define-public python-bashlex
25449 (package
25450 (name "python-bashlex")
25451 (version "0.14")
25452 (source
25453 (origin
25454 (method url-fetch)
25455 (uri (pypi-uri "bashlex" version))
25456 (sha256
25457 (base32
25458 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
25459 (build-system python-build-system)
25460 (arguments
25461 `(#:phases
25462 (modify-phases %standard-phases
25463 (add-before 'build 'pregenerate-yacc-tables
25464 (lambda _
25465 ;; parser.py caches tables, which attempts to write to site lib
25466 ;; see https://github.com/idank/bashlex/issues/51
25467 (invoke "python" "-c" "import bashlex"))))))
25468 (home-page
25469 "https://github.com/idank/bashlex")
25470 (synopsis "Python parser for bash")
25471 (description "@code{bashlex} is a Python port of the parser used
25472 internally by GNU bash.
25473
25474 For the most part it's transliterated from C, the major differences are:
25475
25476 @itemize
25477 @item it does not execute anything
25478 @item it is reentrant
25479 @item it generates a complete AST
25480 @end itemize
25481 ")
25482 (license license:gpl3+)))
25483
25484 (define-public python-jinxed
25485 (package
25486 (name "python-jinxed")
25487 (version "1.0.0")
25488 (source
25489 (origin
25490 (method url-fetch)
25491 (uri (pypi-uri "jinxed" version))
25492 (sha256
25493 (base32
25494 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
25495 (build-system python-build-system)
25496 (arguments
25497 '(#:phases
25498 (modify-phases %standard-phases
25499 (add-before 'check 'set-environment-variables
25500 (lambda* (#:key inputs #:allow-other-keys)
25501 (let ((ncurses (assoc-ref inputs "ncurses")))
25502 (setenv "TERM" "LINUX")
25503 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
25504 #t))))
25505 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
25506 (native-inputs
25507 `(("ncurses" ,ncurses)))
25508 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
25509 (synopsis "Jinxed Terminal Library")
25510 (description
25511 "Jinxed is an implementation of a subset of the Python curses library.")
25512 (license license:mpl2.0)))
25513
25514 (define-public python-svgutils
25515 (package
25516 (name "python-svgutils")
25517 (version "0.3.4")
25518 (source
25519 (origin
25520 (method url-fetch)
25521 (uri (pypi-uri "svgutils" version))
25522 (sha256
25523 (base32
25524 "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
25525 (build-system python-build-system)
25526 (propagated-inputs
25527 `(("python-lxml" ,python-lxml)))
25528 (home-page "https://svgutils.readthedocs.io")
25529 (synopsis "Python SVG editor")
25530 (description "This is an utility package that helps with editing and
25531 concatenating SVG files. It is especially directed at scientists preparing
25532 final figures for submission to journals. So far it supports arbitrary
25533 placement and scaling of SVG figures and adding markers, such as labels.")
25534 (license license:expat)))
25535
25536 (define-public python-blessed
25537 (package
25538 (name "python-blessed")
25539 (version "1.17.8")
25540 (source
25541 (origin
25542 (method url-fetch)
25543 (uri (pypi-uri "blessed" version))
25544 (sha256
25545 (base32
25546 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
25547 (modules '((guix build utils)))
25548 (snippet
25549 '(begin
25550 ;; Don't get hung up on Windows test failures.
25551 (delete-file "blessed/win_terminal.py") #t))))
25552 (build-system python-build-system)
25553 (propagated-inputs
25554 `(("python-jinxed" ,python-jinxed)
25555 ("python-six" ,python-six)
25556 ("python-wcwidth" ,python-wcwidth)))
25557 (native-inputs
25558 `(("python-mock" ,python-mock)
25559 ("python-pytest" ,python-pytest)))
25560 (home-page "https://github.com/jquast/blessed")
25561 (synopsis "Wrapper around terminal capabilities")
25562 (description
25563 "Blessed is a thin, practical wrapper around terminal styling, screen
25564 positioning, and keyboard input.")
25565 (license license:expat)))
25566
25567 (define-public python-readme-renderer
25568 (package
25569 (name "python-readme-renderer")
25570 (version "26.0")
25571 (source
25572 (origin
25573 (method url-fetch)
25574 (uri (pypi-uri "readme_renderer" version))
25575 (sha256
25576 (base32
25577 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
25578 (build-system python-build-system)
25579 (propagated-inputs
25580 `(("python-bleach" ,python-bleach)
25581 ("python-docutils" ,python-docutils)
25582 ("python-pygments" ,python-pygments)
25583 ("python-six" ,python-six)))
25584 (native-inputs
25585 `(("python-mock" ,python-mock)
25586 ("python-pytest" ,python-pytest)))
25587 (home-page "https://github.com/pypa/readme_renderer")
25588 (synopsis "Render README files in Warehouse")
25589 (description
25590 "Readme Renderer is a library that will safely render arbitrary README
25591 files into HTML. It is designed to be used in Warehouse to render the
25592 @code{long_description} for packages. It can handle Markdown, reStructuredText,
25593 and plain text.")
25594 (license license:asl2.0)))
25595
25596 (define-public python-lazr-delegates
25597 (package
25598 (name "python-lazr-delegates")
25599 (version "2.0.4")
25600 (source
25601 (origin
25602 (method url-fetch)
25603 (uri (pypi-uri "lazr.delegates" version))
25604 (sha256
25605 (base32
25606 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
25607 (build-system python-build-system)
25608 (arguments
25609 '(#:phases
25610 (modify-phases %standard-phases
25611 (replace 'check
25612 (lambda _
25613 (invoke "python" "setup.py" "nosetests"))))))
25614 (native-inputs
25615 `(("python-nose" ,python-nose)))
25616 (propagated-inputs
25617 `(("python-zope-interface" ,python-zope-interface)))
25618 (home-page "https://launchpad.net/lazr.delegates")
25619 (synopsis "Easily write objects that delegate behavior")
25620 (description
25621 "The @code{lazr.delegates} package makes it easy to write objects that
25622 delegate behavior to another object. The new object adds some property or
25623 behavior on to the other object, while still providing the underlying interface,
25624 and delegating behavior.")
25625 (license license:lgpl3)))
25626
25627 (define-public python-lazr-config
25628 (package
25629 (name "python-lazr-config")
25630 (version "2.2.3")
25631 (source
25632 (origin
25633 (method url-fetch)
25634 (uri (pypi-uri "lazr.config" version))
25635 (sha256
25636 (base32
25637 "1qdbrzl61q7cjhbnxvw9y3frcr935y7diwy15xrwcv9ynvw76jmp"))))
25638 (build-system python-build-system)
25639 (arguments
25640 '(#:phases
25641 (modify-phases %standard-phases
25642 (replace 'check
25643 (lambda _
25644 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
25645 (native-inputs
25646 `(("python-nose" ,python-nose)))
25647 (propagated-inputs
25648 `(("python-lazr-delegates" ,python-lazr-delegates)
25649 ("python-zope-interface" ,python-zope-interface)))
25650 (home-page "https://launchpad.net/lazr.config")
25651 (synopsis "Create configuration schemas and process and validate configurations")
25652 (description
25653 "The LAZR config system is typically used to manage process configuration.
25654 Process configuration is for saying how things change when we run systems on
25655 different machines, or under different circumstances. This system uses ini-like
25656 file format of section, keys, and values. The config file supports inheritance
25657 to minimize duplication of information across files. The format supports schema
25658 validation.")
25659 (license license:lgpl3)))
25660
25661 (define-public python-flufl-bounce
25662 (package
25663 (name "python-flufl-bounce")
25664 (version "3.0.1")
25665 (source
25666 (origin
25667 (method url-fetch)
25668 (uri (pypi-uri "flufl.bounce" version))
25669 (sha256
25670 (base32
25671 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
25672 (build-system python-build-system)
25673 (propagated-inputs
25674 `(("python-atpublic" ,python-atpublic)
25675 ("python-zope-interface" ,python-zope-interface)))
25676 (native-inputs
25677 `(("python-nose2" ,python-nose2)))
25678 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
25679 (synopsis "Email bounce detectors")
25680 (description "The @code{flufl.bounce} library provides a set of heuristics
25681 and an API for detecting the original bouncing email addresses from a bounce
25682 message. Many formats found in the wild are supported, as are VERP and
25683 RFC 3464.")
25684 (license (list license:asl2.0
25685 license:lgpl3)))) ; only for setup_headers.py
25686
25687 (define-public python-flufl-i18n
25688 (package
25689 (name "python-flufl-i18n")
25690 (version "3.0")
25691 (source
25692 (origin
25693 (method url-fetch)
25694 (uri (pypi-uri "flufl.i18n" version))
25695 (sha256
25696 (base32
25697 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
25698 (build-system python-build-system)
25699 (propagated-inputs
25700 `(("python-atpublic" ,python-atpublic)))
25701 (home-page "https://flufli18n.readthedocs.io")
25702 (synopsis "API for Python internationalization")
25703 (description
25704 "This package provides a high-level, convenient API for managing
25705 internationalization/translation contexts in Python applications. There is a
25706 simple API for single-context applications, such as command line scripts which
25707 only need to translate into one language during the entire course of their
25708 execution. There is a more flexible, but still convenient API for multi-context
25709 applications, such as servers, which may need to switch language contexts for
25710 different tasks.")
25711 (license license:asl2.0)))
25712
25713 (define-public python-flufl-lock
25714 (package
25715 (name "python-flufl-lock")
25716 (version "4.0")
25717 (source
25718 (origin
25719 (method url-fetch)
25720 (uri (pypi-uri "flufl.lock" version))
25721 (sha256
25722 (base32
25723 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
25724 (build-system python-build-system)
25725 (propagated-inputs
25726 `(("python-atpublic" ,python-atpublic)
25727 ("python-psutil" ,python-psutil)))
25728 (home-page "https://flufllock.readthedocs.io")
25729 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
25730 (description
25731 "The @dfn{flufl.lock} package provides NFS-safe file locking with
25732 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
25733 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
25734 and have a maximum lifetime built-in.")
25735 (license (list license:asl2.0
25736 license:lgpl3)))) ; only for setup_helpers.py
25737
25738 (define-public python-flufl-testing
25739 (package
25740 (name "python-flufl-testing")
25741 (version "0.8")
25742 (source
25743 (origin
25744 (method url-fetch)
25745 (uri (pypi-uri "flufl.testing" version))
25746 (sha256
25747 (base32
25748 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
25749 (build-system python-build-system)
25750 (native-inputs
25751 `(("python-nose2" ,python-nose2)))
25752 (home-page "https://gitlab.com/warsaw/flufl.testing")
25753 (synopsis "Collection of test tool plugins")
25754 (description
25755 "This package contains a small collection of test tool plugins for
25756 @code{nose2} and @code{flake8}.")
25757 (license license:asl2.0)))
25758
25759 (define-public python-devtools
25760 (package
25761 (name "python-devtools")
25762 (version "0.6")
25763 (source
25764 (origin
25765 (method git-fetch)
25766 (uri (git-reference
25767 (url "https://github.com/samuelcolvin/python-devtools")
25768 (commit (string-append "v" version))))
25769 (file-name (git-file-name name version))
25770 (sha256
25771 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
25772 (build-system python-build-system)
25773 (native-inputs
25774 `(("python-pytest" ,python-pytest)
25775 ("python-pytest-mock" ,python-pytest-mock)))
25776 (propagated-inputs
25777 `(("python-pygments" ,python-pygments)))
25778 (arguments
25779 `(#:phases (modify-phases %standard-phases
25780 (replace 'check
25781 (lambda _
25782 (invoke "pytest")
25783 #t)))))
25784 (home-page "https://github.com/samuelcolvin/python-devtools")
25785 (synopsis "Debug command and development tools")
25786 (description
25787 "This package provides a debug print command and other development tools.
25788 It adds a simple and readable way to print stuff during development.")
25789 (license license:expat)))
25790
25791 (define-public python-dateparser
25792 (package
25793 (name "python-dateparser")
25794 (version "0.7.6")
25795 (source
25796 (origin
25797 (method url-fetch)
25798 (uri (pypi-uri "dateparser" version))
25799 (sha256
25800 (base32
25801 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
25802 (build-system python-build-system)
25803 (propagated-inputs
25804 `(("python-dateutil" ,python-dateutil)
25805 ("python-pytz" ,python-pytz)
25806 ("python-regex" ,python-regex)
25807 ("python-ruamel.yaml" ,python-ruamel.yaml)
25808 ("python-tzlocal" ,python-tzlocal)))
25809 (native-inputs
25810 `(("python-mock" ,python-mock)
25811 ("python-parameterized" ,python-parameterized)
25812 ("tzdata" ,tzdata-for-tests)))
25813 (arguments
25814 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
25815 #:tests? #f
25816 #:phases
25817 (modify-phases %standard-phases
25818 (add-before 'check 'set-check-environment
25819 (lambda* (#:key inputs #:allow-other-keys)
25820 (setenv "TZ" "UTC")
25821 (setenv "TZDIR"
25822 (search-input-directory inputs
25823 "share/zoneinfo")))))))
25824 (home-page "https://github.com/scrapinghub/dateparser")
25825 (synopsis
25826 "Date parsing library designed to parse dates from HTML pages")
25827 (description
25828 "@code{python-dateparser} provides modules to easily parse localized
25829 dates in almost any string formats commonly found on web pages.")
25830 (license license:bsd-3)))
25831
25832 (define-public python-dparse
25833 (package
25834 (name "python-dparse")
25835 (version "0.5.1")
25836 (source
25837 (origin
25838 (method url-fetch)
25839 (uri (pypi-uri "dparse" version))
25840 (sha256
25841 (base32
25842 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
25843 (build-system python-build-system)
25844 (native-inputs
25845 `(("python-pytest" ,python-pytest)))
25846 (propagated-inputs
25847 `(("python-packaging" ,python-packaging)
25848 ("python-pyyaml" ,python-pyyaml)
25849 ("python-toml" ,python-toml)))
25850 (home-page "https://github.com/pyupio/dparse")
25851 (synopsis "Parser for Python dependency files")
25852 (description "This package provides a parser for Python dependency files.")
25853 (license license:expat)))
25854
25855 (define-public python-dpath
25856 (package
25857 (name "python-dpath")
25858 (version "2.0.1")
25859 (source
25860 (origin
25861 (method url-fetch)
25862 (uri (pypi-uri "dpath" version))
25863 (sha256
25864 (base32
25865 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
25866 (build-system python-build-system)
25867 (native-inputs
25868 `(("python-hypothesis" ,python-hypothesis)
25869 ("python-mock" ,python-mock)
25870 ("python-nose" ,python-nose)))
25871 (arguments
25872 '(#:phases
25873 (modify-phases %standard-phases
25874 (replace 'check
25875 (lambda* (#:key inputs outputs #:allow-other-keys)
25876 (add-installed-pythonpath inputs outputs)
25877 ;; This invokation is taken from tox.ini.
25878 (invoke "nosetests" "-d" "-v" "tests/"))))))
25879 (home-page "https://github.com/akesterson/dpath-python")
25880 (synopsis "File-system-like pathing and searching for dictionaries")
25881 (description
25882 "@code{python-dpath} is a library for accessing and searching
25883 dictionaries via /slashed/paths ala xpath.
25884
25885 Basically it lets you glob over a dictionary as if it were a file system. It
25886 allows you to specify globs (ala the bash eglob syntax, through some advanced
25887 fnmatch.fnmatch magic) to access dictionary elements, and provides some
25888 facility for filtering those results.")
25889 (license license:expat)))
25890
25891 (define-public python-safety
25892 (package
25893 (name "python-safety")
25894 (version "1.9.0")
25895 (source
25896 (origin
25897 (method url-fetch)
25898 (uri (pypi-uri "safety" version))
25899 (sha256
25900 (base32
25901 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
25902 (build-system python-build-system)
25903 (arguments
25904 `(#:phases
25905 (modify-phases %standard-phases
25906 (add-after 'unpack 'disable-tests
25907 (lambda _
25908 (substitute* "tests/test_safety.py"
25909 ;; requires network
25910 (("def test_check_live") "def _test_check_live"))
25911 #t)))))
25912 (propagated-inputs
25913 `(("python-click" ,python-click)
25914 ("python-dparse" ,python-dparse)
25915 ("python-packaging" ,python-packaging)
25916 ("python-requests" ,python-requests)))
25917 (home-page "https://github.com/pyupio/safety")
25918 (synopsis "Check installed dependencies for known vulnerabilities")
25919 (description "Safety checks installed dependencies for known vulnerabilities.
25920 By default it uses the open Python vulnerability database Safety DB.")
25921 (license license:expat)))
25922
25923 (define-public python-pypandoc
25924 (package
25925 (name "python-pypandoc")
25926 (version "1.6.4")
25927 (source
25928 (origin
25929 (method url-fetch)
25930 (uri (pypi-uri "pypandoc" version))
25931 (sha256
25932 (base32
25933 "149basv4pvzg9zm74cjz68x8s2n5fykyj7prgysb0qfmja73r83f"))))
25934 (build-system python-build-system)
25935 (inputs
25936 `(("pandoc" ,pandoc)))
25937 (propagated-inputs
25938 `(("wheel" ,python-wheel)))
25939 (native-inputs
25940 `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
25941 texlive-fonts-ec
25942 texlive-generic-iftex
25943 texlive-hyperref
25944 texlive-oberdiek
25945 texlive-lm
25946 texlive-xcolor)))))
25947 (arguments
25948 `(#:phases
25949 (modify-phases %standard-phases
25950 (add-before 'check 'disable-tests
25951 (lambda _
25952 ;; Disable test requiring network access
25953 (substitute* "tests.py"
25954 (("test_basic_conversion_from_http_url")
25955 "skip_test_basic_conversion_from_http_url"))
25956 #t)))))
25957 (home-page "https://github.com/bebraw/pypandoc")
25958 (synopsis "Python wrapper for pandoc")
25959 (description "pypandoc is a thin Python wrapper around pandoc
25960 and pandoc-citeproc.")
25961 (license license:expat)))
25962
25963 (define-public python-rnc2rng
25964 (package
25965 (name "python-rnc2rng")
25966 (version "2.6.4")
25967 (source
25968 (origin
25969 (method url-fetch)
25970 (uri (pypi-uri "rnc2rng" version))
25971 (sha256
25972 (base32
25973 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
25974 (build-system python-build-system)
25975 (propagated-inputs
25976 `(("python-rply" ,python-rply)))
25977 (arguments
25978 `(#:phases (modify-phases %standard-phases
25979 (replace 'check
25980 (lambda _
25981 (invoke "python" "test.py"))))))
25982 (home-page "https://github.com/djc/rnc2rng")
25983 (synopsis "Convert RELAX NG Compact to regular syntax")
25984 (description
25985 "This package provides the @command{rnc2rng} command-line tool as well as
25986 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
25987 equivalent schemata in the XML-based default RELAX NG syntax.")
25988 (license license:expat)))
25989
25990 (define-public python-telethon
25991 (package
25992 (name "python-telethon")
25993 (version "1.17.5")
25994 (source
25995 (origin
25996 (method git-fetch)
25997 (uri (git-reference
25998 (url "https://github.com/LonamiWebs/Telethon")
25999 (commit (string-append "v" version))))
26000 (file-name (git-file-name name version))
26001 (sha256
26002 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
26003 (build-system python-build-system)
26004 (arguments
26005 '(#:phases
26006 (modify-phases %standard-phases
26007 (replace 'check
26008 (lambda* (#:key tests? #:allow-other-keys)
26009 (when tests?
26010 (invoke "py.test" "-v"))
26011 #t)))))
26012 (propagated-inputs
26013 `(("python-rsa" ,python-rsa)
26014 ("python-pyaes" ,python-pyaes)))
26015 (native-inputs
26016 `(("python-pytest" ,python-pytest)
26017 ("python-pytest-asyncio" ,python-pytest-asyncio)
26018 ("python-pytest-trio" ,python-pytest-trio)))
26019 (home-page "https://docs.telethon.dev")
26020 (synopsis "Full-featured Telegram client library for Python 3")
26021 (description "This library is designed to make it easy to write Python
26022 programs that can interact with Telegram.")
26023 (license license:expat)))
26024
26025 (define-public python-citeproc-py
26026 (package
26027 (name "python-citeproc-py")
26028 (version "0.5.1")
26029 (source
26030 (origin
26031 (method url-fetch)
26032 (uri (pypi-uri "citeproc-py" version))
26033 (sha256
26034 (base32
26035 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
26036 (build-system python-build-system)
26037 (propagated-inputs
26038 `(("python-lxml" ,python-lxml)
26039 ("python-rnc2rng" ,python-rnc2rng)))
26040 (home-page
26041 "https://github.com/brechtm/citeproc-py")
26042 (synopsis "Citations and bibliography formatter")
26043 (description
26044 "Citeproc-py is a CSL processor for Python. It aims to implement the
26045 CSL 1.0.1 specification. citeproc-py can output styled citations and
26046 bibliographies in a number of different output formats. Currently supported
26047 are plain text, reStructuredText and HTML.")
26048 (license license:bsd-2)))
26049
26050 (define-public python-inform
26051 (package
26052 (name "python-inform")
26053 (version "1.23.0")
26054 (source
26055 (origin
26056 (method url-fetch)
26057 (uri (pypi-uri "inform" version))
26058 (sha256
26059 (base32
26060 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
26061 (build-system python-build-system)
26062 (arguments
26063 `(#:tests? #f)) ; PyPI tarball lacks tests
26064 (native-inputs
26065 `(("python-hypothesis" ,python-hypothesis)
26066 ("python-pytest-cov" ,python-pytest-cov)
26067 ("python-pytest-runner" ,python-pytest-runner)))
26068 (propagated-inputs
26069 `(("python-arrow" ,python-arrow)
26070 ("python-six" ,python-six)))
26071 (home-page "https://inform.readthedocs.io")
26072 (synopsis "Print & logging utilities for communicating with user")
26073 (description
26074 "Inform is designed to display messages from programs that are typically run from
26075 a console. It provides a collection of ‘print’ functions that allow you to simply and
26076 cleanly print different types of messages.")
26077 (license license:gpl3+)))
26078
26079 (define-public python-nestedtext
26080 (package
26081 (name "python-nestedtext")
26082 (version "1.0.0")
26083 (source
26084 (origin
26085 (method url-fetch)
26086 (uri (pypi-uri "nestedtext" version))
26087 (sha256
26088 (base32
26089 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
26090 (build-system python-build-system)
26091 (arguments
26092 `(#:tests? #f)) ; PyPI tarball lacks tests
26093 (propagated-inputs
26094 `(("python-inform" ,python-inform)))
26095 (home-page "https://nestedtext.org")
26096 (synopsis "Human readable and writable data interchange format")
26097 (description
26098 "NestedText is a file format for holding data that is to be entered, edited, or
26099 viewed by people. It allows data to be organized into a nested collection of
26100 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
26101 without the complexity and risk of YAML and without the syntactic clutter of JSON.
26102 NestedText is both simple and natural. Only a small number of concepts and rules must
26103 be kept in mind when creating it. It is easily created, modified, or viewed with
26104 a text editor and easily understood and used by both programmers and non-programmers.")
26105 (license license:expat))) ; MIT license
26106
26107 (define-public python-nest-asyncio
26108 (package
26109 (name "python-nest-asyncio")
26110 (version "1.5.1")
26111 (source
26112 (origin
26113 (method url-fetch)
26114 (uri (pypi-uri "nest_asyncio" version))
26115 (sha256
26116 (base32
26117 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
26118 (build-system python-build-system)
26119 (home-page "https://github.com/erdewit/nest_asyncio")
26120 (synopsis "Patch asyncio to allow nested event loops")
26121 (description
26122 "By design @code{asyncio} does not allow its event loop to be nested.
26123 This presents a practical problem: when in an environment where the event loop
26124 is already running it's impossible to run tasks and wait for the result. This
26125 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
26126 @code{loop.run_until_complete}.")
26127 (license license:bsd-3)))
26128
26129 (define-public python-simpervisor
26130 (package
26131 (name "python-simpervisor")
26132 (version "0.4")
26133 (source
26134 (origin
26135 ;; Tests not included in release.
26136 (method git-fetch)
26137 (uri (git-reference
26138 (url "https://github.com/yuvipanda/simpervisor")
26139 (commit (string-append "v" version))))
26140 (file-name (git-file-name name version))
26141 (sha256
26142 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
26143 (build-system python-build-system)
26144 (arguments
26145 `(#:tests? #f ; Test suite can't find aiohttp.
26146 #:phases
26147 (modify-phases %standard-phases
26148 (replace 'check
26149 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
26150 (when tests?
26151 (add-installed-pythonpath inputs outputs)
26152 (invoke "pytest" "--maxfail" "3" "--verbose"))
26153 #t)))))
26154 (native-inputs
26155 `(("python-aiohttp" ,python-aiohttp)
26156 ("python-pytest" ,python-pytest)
26157 ("python-pytest-asyncio" ,python-pytest-asyncio)))
26158 (home-page "https://github.com/yuvipanda/simpervisor")
26159 (synopsis "Simple async process supervisor")
26160 (description
26161 "This package provides a simple async process supervisor in Python.")
26162 (license license:bsd-3)))
26163
26164 (define-public python-parallel
26165 (package
26166 (name "python-parallel")
26167 (version "1.6.4.4")
26168 (source
26169 (origin
26170 (method url-fetch)
26171 (uri (string-append
26172 "https://www.parallelpython.com/downloads/pp/pp-"
26173 version ".zip"))
26174 (sha256
26175 (base32
26176 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
26177 (native-inputs
26178 `(("unzip" ,unzip)))
26179 (build-system python-build-system)
26180 (arguments '(#:tests? #f)) ; No test suite.
26181 (home-page "https://www.parallelpython.com")
26182 (synopsis "Parallel and distributed programming for Python")
26183 (description "Parallel Python module (PP) provides an easy and efficient
26184 way to create parallel-enabled applications for SMP computers and clusters.
26185 PP module features cross-platform portability and dynamic load balancing.
26186 Thus applications written with PP will parallelize efficiently even on
26187 heterogeneous and multi-platform clusters (including clusters running other
26188 applications with variable CPU loads).")
26189 (license license:bsd-3)))
26190
26191 (define-public python2-parallel
26192 (package-with-python2 python-parallel))
26193
26194 (define-public python-djvulibre
26195 (package
26196 (name "python-djvulibre")
26197 (version "0.8.6")
26198 (source
26199 (origin
26200 (method url-fetch)
26201 (uri (pypi-uri "python-djvulibre" version))
26202 (sha256
26203 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
26204 (build-system python-build-system)
26205 (native-inputs
26206 `(("ghostscript" ,ghostscript)
26207 ("pkg-config" ,pkg-config)
26208 ("python-nose" ,python-nose)))
26209 (inputs
26210 `(("djvulibre" ,djvulibre)
26211 ("python-cython" ,python-cython)))
26212 (arguments
26213 `(#:phases
26214 (modify-phases %standard-phases
26215 (add-after 'unpack 'fix-tests
26216 (lambda _
26217 ;; Unit tests try to load the 'dllpath.py' and fail, because it
26218 ;; doesn't make sense on GNU/Linux.
26219 (delete-file "djvu/dllpath.py")
26220 #t)))))
26221 (synopsis "Python bindings for DjVuLibre")
26222 (description "This is a set of Python bindings for the DjVuLibre library.")
26223 (home-page "https://jwilk.net/software/python-djvulibre")
26224 (license license:gpl2)))
26225
26226 (define-public python2-djvulibre
26227 (package-with-python2 python-djvulibre))
26228
26229 (define-public python-versioneer
26230 (package
26231 (name "python-versioneer")
26232 (version "0.19")
26233 (source
26234 (origin
26235 (method url-fetch)
26236 (uri (pypi-uri "versioneer" version))
26237 (sha256
26238 (base32
26239 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
26240 (build-system python-build-system)
26241 (home-page
26242 "https://github.com/python-versioneer/python-versioneer")
26243 (synopsis
26244 "Version-string management for VCS-controlled trees")
26245 (description
26246 "@code{versioneer} is a tool for managing a recorded version number in
26247 distutils-based python projects. The goal is to remove the tedious and
26248 error-prone \"update the embedded version string\" step from your release
26249 process.")
26250 (license license:public-domain)))
26251
26252 (define-public python2-gamera
26253 (package
26254 (name "python2-gamera")
26255 (version "3.4.4")
26256 (source
26257 (origin
26258 (method url-fetch)
26259 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
26260 "gamera-" version ".tar.gz"))
26261 (sha256
26262 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
26263 (modules '((guix build utils)))
26264 (snippet
26265 '(begin
26266 ;; Remove bundled libraries.
26267 (for-each delete-file-recursively
26268 '("src/libpng-1.2.5"
26269 "src/libtiff"
26270 "src/zlib-1.2.8"))))))
26271 (build-system python-build-system)
26272 (inputs
26273 `(("libpng" ,libpng)
26274 ("libtiff" ,libtiff)
26275 ("zlib" ,zlib)))
26276 (arguments
26277 `(#:python ,python-2
26278 #:phases
26279 (modify-phases %standard-phases
26280 (add-after 'unpack 'disable-wx-support
26281 (lambda _
26282 (substitute* "setup.py"
26283 (("no_wx = False")
26284 "no_wx = True")))))))
26285 (synopsis "Framework for building document analysis applications")
26286 (description
26287 "Gamera is a toolkit for building document image recognition systems.")
26288 (home-page "https://gamera.informatik.hsnr.de/")
26289 (license license:gpl2+)))
26290
26291 (define-public python-contextvars
26292 (package
26293 (name "python-contextvars")
26294 (version "2.4")
26295 (source
26296 (origin
26297 (method url-fetch)
26298 (uri (pypi-uri "contextvars" version))
26299 (sha256
26300 (base32
26301 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
26302 (build-system python-build-system)
26303 (propagated-inputs
26304 `(("python-immutables" ,python-immutables)))
26305 (home-page
26306 "https://github.com/MagicStack/contextvars")
26307 (synopsis "PEP 567 Backport")
26308 (description "This package implements a backport of Python 3.7
26309 @code{contextvars} module (see PEP 567) for Python 3.6.")
26310 (license license:asl2.0)))
26311
26312 (define-public python-aiofiles
26313 (package
26314 (name "python-aiofiles")
26315 (version "0.6.0")
26316 (source
26317 (origin
26318 (method url-fetch)
26319 (uri (pypi-uri "aiofiles" version))
26320 (sha256
26321 (base32
26322 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
26323 (build-system python-build-system)
26324 (home-page "https://github.com/Tinche/aiofiles")
26325 (synopsis "File support for @code{asyncio}")
26326 (description "@code{python-aiofiles} is a library for handling local
26327 disk files in asyncio applications.")
26328 (license license:asl2.0)))
26329
26330 (define-public python-pyre-extensions
26331 (package
26332 (name "python-pyre-extensions")
26333 (version "0.0.18")
26334 (source
26335 (origin
26336 (method url-fetch)
26337 (uri (pypi-uri "pyre-extensions" version))
26338 (sha256
26339 (base32
26340 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
26341 (build-system python-build-system)
26342 (propagated-inputs
26343 `(("python-typing-extensions"
26344 ,python-typing-extensions)
26345 ("python-typing-inspect" ,python-typing-inspect)))
26346 (home-page "https://pyre-check.org")
26347 (synopsis
26348 "Type system extensions for use with @code{python-pyre}")
26349 (description
26350 "@code{python-pyre-extensions} defines extensions to the standard
26351 @code{typing} module that are supported by the Pyre typechecker.")
26352 (license license:expat)))
26353
26354 (define-public python-dataclasses
26355 (package
26356 (name "python-dataclasses")
26357 (version "0.8")
26358 (source
26359 (origin
26360 (method url-fetch)
26361 (uri (pypi-uri "dataclasses" version))
26362 (sha256
26363 (base32
26364 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
26365 (build-system python-build-system)
26366 (home-page
26367 "https://github.com/ericvsmith/dataclasses")
26368 (synopsis
26369 "Backport of the @code{dataclasses} module for Python 3.6")
26370 (description
26371 "This is an implementation of PEP 557, Data Classes. It is a
26372 backport of the @code{dataclasses} module for Python 3.6.")
26373 (license license:asl2.0)))
26374
26375 (define-public python-pywatchman
26376 (package
26377 (name "python-pywatchman")
26378 (version "1.4.1")
26379 (source
26380 (origin
26381 (method url-fetch)
26382 (uri (pypi-uri "pywatchman" version))
26383 (sha256
26384 (base32
26385 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
26386 (build-system python-build-system)
26387 (arguments
26388 `(#:tests? #f)) ;there are none
26389 (home-page
26390 "https://facebook.github.io/watchman/")
26391 (synopsis "Watchman client for python")
26392 (description "@code{python-pywatchman} is a library to connect and
26393 query Watchman to discover file changes.")
26394 (license license:bsd-3)))
26395
26396 (define-public python-helpdev
26397 (package
26398 (name "python-helpdev")
26399 (version "0.7.1")
26400 (source
26401 (origin
26402 (method url-fetch)
26403 (uri (pypi-uri "helpdev" version))
26404 (sha256
26405 (base32
26406 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
26407 (build-system python-build-system)
26408 (arguments
26409 `(#:phases
26410 (modify-phases %standard-phases
26411 (replace 'check
26412 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
26413 (when tests?
26414 (add-installed-pythonpath inputs outputs)
26415 (invoke "pytest" "tests"))
26416 #t)))))
26417 (propagated-inputs
26418 `(("python-importlib-metadata" ,python-importlib-metadata)))
26419 (native-inputs
26420 `(("python-pytest" ,python-pytest)))
26421 (home-page "https://gitlab.com/dpizetta/helpdev")
26422 (synopsis
26423 "Extract information about the Python environment easily")
26424 (description
26425 "Helpdev is a library to easily extract information about the Python
26426 environment.")
26427 (license license:expat)))
26428
26429 (define-public python-logutils
26430 (package
26431 (name "python-logutils")
26432 (version "0.3.5")
26433 (source
26434 (origin
26435 (method url-fetch)
26436 (uri (pypi-uri "logutils" version))
26437 (sha256
26438 (base32
26439 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
26440 (build-system python-build-system)
26441 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
26442 (synopsis "Logging utilities")
26443 (description "This package provides a set of handlers for the Python
26444 standard library logging package. Some of these handlers are out-of-scope
26445 for the standard library, and so they are packaged here. Others are updated
26446 versions which have appeared in recent Python releases, but are usable with
26447 older versions of Python and so are packaged here.")
26448 (license license:bsd-3)))
26449
26450 (define-public python-helper
26451 (package
26452 (name "python-helper")
26453 (version "2.5.0")
26454 (source (origin
26455 (method url-fetch)
26456 (uri (pypi-uri "helper" version))
26457 (sha256
26458 (base32
26459 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
26460 (build-system python-build-system)
26461 (native-inputs
26462 `(("python-mock" ,python-mock)))
26463 (propagated-inputs
26464 `(("python-logutils" ,python-logutils)
26465 ("python-pyyaml" ,python-pyyaml)))
26466 (home-page "https://github.com/gmr/helper")
26467 (synopsis "Library for writing configurable applications and daemons")
26468 (description
26469 "This package provides procedures for quickly writing configurable
26470 applications and daemons.")
26471 (license license:bsd-3)))
26472
26473 (define-public python-qtsass
26474 (package
26475 (name "python-qtsass")
26476 (version "0.3.0")
26477 (source
26478 (origin
26479 ;; There are no tests in the PyPI tarball.
26480 (method git-fetch)
26481 (uri (git-reference
26482 (url "https://github.com/spyder-ide/qtsass/")
26483 (commit (string-append "v" version))))
26484 (file-name (git-file-name name version))
26485 (sha256
26486 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
26487 (build-system python-build-system)
26488 (arguments
26489 `(#:test-target "pytest"
26490 #:phases
26491 (modify-phases %standard-phases
26492 ;; Tests need to read and write files.
26493 (add-before 'check 'make-git-checkout-writable
26494 (lambda _
26495 (for-each make-file-writable (find-files "."))
26496 #t)))))
26497 (native-inputs
26498 `(("python-pytest" ,python-pytest)
26499 ("python-pytest-cov" ,python-pytest-cov)
26500 ("python-pytest-runner" ,python-pytest-runner)))
26501 (propagated-inputs
26502 `(("python-libsass" ,python-libsass)))
26503 (home-page "https://github.com/spyder-ide/qtsass")
26504 (synopsis "Compile SCSS files to valid Qt stylesheets")
26505 (description
26506 "Besides being used in web development, CSS is also the way to stylize
26507 Qt-based desktop applications. However, Qt's CSS has a few variations that
26508 prevent the direct use of SASS compiler.
26509
26510 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
26511 handling those variations.")
26512 (license license:expat)))
26513
26514 (define-public python-qdarkstyle
26515 (package
26516 (name "python-qdarkstyle")
26517 (version "2.8.1")
26518 (source
26519 (origin
26520 (method url-fetch)
26521 (uri (pypi-uri "QDarkStyle" version))
26522 (sha256
26523 (base32
26524 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
26525 (build-system python-build-system)
26526 (arguments
26527 `(;; Fails unable to detect valid Qt bindings even when
26528 ;; added as native-inputs.
26529 #:tests? #f))
26530 (propagated-inputs
26531 `(("python-helpdev" ,python-helpdev)
26532 ("python-qtpy" ,python-qtpy)))
26533 (home-page
26534 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
26535 (synopsis
26536 "Complete dark stylesheet for Python and Qt applications")
26537 (description "QDarkStyle is the most complete dark stylesheet for Python and
26538 Qt applications.")
26539 (license license:expat)))
26540
26541 (define-public python-bitstring
26542 (package
26543 (name "python-bitstring")
26544 (version "3.1.7")
26545 (source
26546 (origin
26547 (method url-fetch)
26548 (uri (pypi-uri "bitstring" version))
26549 (sha256
26550 (base32
26551 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
26552 (build-system python-build-system)
26553 (arguments
26554 `(#:phases
26555 (modify-phases %standard-phases
26556 (replace 'check
26557 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26558 (when tests?
26559 (add-installed-pythonpath inputs outputs)
26560 (with-directory-excursion "test"
26561 (invoke "pytest")))
26562 #t)))))
26563 (native-inputs
26564 `(("python-pytest" ,python-pytest)))
26565 (home-page "https://github.com/scott-griffiths/bitstring")
26566 (synopsis
26567 "Simple construction, analysis and modification of binary data")
26568 (description
26569 "Bitstring is a library for simple construction, analysis and modification
26570 of binary data.")
26571 (license license:expat)))
26572
26573 (define-public python-confuse
26574 (package
26575 (name "python-confuse")
26576 (version "1.5.0")
26577 (source
26578 (origin
26579 (method url-fetch)
26580 (uri (pypi-uri "confuse" version))
26581 (sha256
26582 (base32
26583 "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
26584 (build-system python-build-system)
26585 (propagated-inputs
26586 `(("python-pyyaml" ,python-pyyaml)))
26587 (home-page "https://github.com/beetbox/confuse")
26588 (synopsis "Painless YAML configuration")
26589 (description "Confuse is a configuration library for Python that uses
26590 YAML. It takes care of defaults, overrides, type checking, command-line
26591 integration, human-readable errors, and standard OS-specific locations.")
26592 (license license:expat)))
26593
26594 (define-public python-reflink
26595 (package
26596 (name "python-reflink")
26597 (version "0.2.1")
26598 (source
26599 (origin
26600 (method url-fetch)
26601 (uri (pypi-uri "reflink" version))
26602 (sha256
26603 (base32
26604 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
26605 (build-system python-build-system)
26606 (arguments
26607 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
26608 (propagated-inputs
26609 `(("python-cffi" ,python-cffi)))
26610 (native-inputs
26611 `(("python-pytest" ,python-pytest)
26612 ("python-pytest-runner" ,python-pytest-runner)))
26613 (home-page "https://gitlab.com/rubdos/pyreflink")
26614 (synopsis "Python wrapper around reflink system call")
26615 (description
26616 "Python reflink wraps around platform specific @code{reflink}
26617 implementations.")
26618 (license license:expat)))
26619
26620 (define-public python-pivy
26621 (package
26622 (name "python-pivy")
26623 (version "0.6.5")
26624 (source
26625 (origin
26626 (method git-fetch)
26627 (uri (git-reference
26628 (url "https://github.com/coin3d/pivy")
26629 (commit version)))
26630 (file-name (git-file-name name version))
26631 (sha256
26632 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
26633 (build-system python-build-system)
26634 (arguments
26635 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
26636 #:tests? #f
26637 #:phases
26638 (modify-phases %standard-phases
26639 (add-after 'unpack 'patch-cmake-include-dirs
26640 (lambda _
26641 ;; Patch buildsystem to respect Coin3D include directory
26642 (substitute* "CMakeLists.txt"
26643 (("\\$\\{SoQt_INCLUDE_DIRS}")
26644 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
26645 #t)))))
26646 (native-inputs
26647 `(("cmake" ,cmake)
26648 ("swig" ,swig)))
26649 (inputs
26650 `(("python-wrapper" ,python-wrapper)
26651 ("qtbase" ,qtbase-5)
26652 ("libxi" ,libxi)
26653 ("libice" ,libice)
26654 ("soqt" ,soqt)
26655 ("glew" ,glew)
26656 ("coin3D" ,coin3D-4)))
26657 (home-page "https://github.com/coin3d/pivy")
26658 (synopsis "Python bindings to Coin3D")
26659 (description
26660 "Pivy provides python bindings for Coin, a 3D graphics library with an
26661 Application Programming Interface based on the Open Inventor 2.1 API.")
26662 (license license:isc)))
26663
26664 (define-public python-crayons
26665 (package
26666 (name "python-crayons")
26667 (version "0.4.0")
26668 (source
26669 (origin
26670 (method url-fetch)
26671 (uri (pypi-uri "crayons" version))
26672 (sha256
26673 (base32
26674 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
26675 (build-system python-build-system)
26676 (propagated-inputs
26677 `(("python-colorama" ,python-colorama)))
26678 (home-page "https://github.com/MasterOdin/crayons")
26679 (synopsis "TextUI colors for Python")
26680 (description "This package gives you colored strings for the terminal.
26681 Crayons automatically wraps a given string in the foreground color and
26682 restores the original state after the string is printed.")
26683 (license license:expat)))
26684
26685 (define-public python-sane
26686 (package
26687 (name "python-sane")
26688 (version "2.9.1")
26689 (source
26690 (origin
26691 (method url-fetch)
26692 (uri (pypi-uri name version))
26693 (sha256
26694 (base32
26695 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
26696 (build-system python-build-system)
26697 (native-inputs
26698 `(("python-pytest" ,python-pytest)))
26699 (inputs
26700 `(("sane-backends" ,sane-backends)))
26701 (home-page "https://github.com/python-pillow/Sane")
26702 (synopsis "Python interface to the SANE scanner")
26703 (description "This package provides Python interface to the SANE scanner
26704 and frame grabber interface.")
26705 (license (license:non-copyleft
26706 ;; Yet another variant of the X/MIT license.
26707 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
26708
26709 (define-public python-screenkey
26710 (package
26711 (name "python-screenkey")
26712 (version "1.4")
26713 (source
26714 (origin
26715 (method git-fetch)
26716 (uri (git-reference
26717 (url "https://gitlab.com/screenkey/screenkey")
26718 (commit (string-append "v" version))))
26719 (file-name (git-file-name name version))
26720 (sha256
26721 (base32
26722 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
26723 (build-system python-build-system)
26724 (arguments
26725 `(#:phases
26726 (modify-phases %standard-phases
26727 (add-after 'unpack 'fix-dlopen-paths
26728 (lambda* (#:key inputs outputs #:allow-other-keys)
26729 (let* ((x11 (assoc-ref inputs "libx11"))
26730 (xtst (assoc-ref inputs "libxtst")))
26731 (substitute* "Screenkey/xlib.py"
26732 (("libX11.so.6")
26733 (string-append x11 "/lib/libX11.so.6")))
26734 (substitute* "Screenkey/xlib.py"
26735 (("libXtst.so.6")
26736 (string-append xtst "/lib/libXtst.so.6")))
26737 #t)))
26738 (add-after 'install 'wrap-screenkey
26739 (lambda* (#:key outputs #:allow-other-keys)
26740 (wrap-program
26741 (string-append (assoc-ref outputs "out") "/bin/screenkey")
26742 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
26743 `("GI_TYPELIB_PATH"
26744 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
26745 #t)))))
26746 (inputs
26747 `(("python-distutils-extra" ,python-distutils-extra)
26748 ("python-tokenize-rt" ,python-tokenize-rt)
26749 ("libx11" ,libx11)
26750 ("libxtst" ,libxtst)
26751 ("gtk+" ,gtk+)
26752 ("python-pygobject" ,python-pygobject)
26753 ("python-pycairo" ,python-pycairo)
26754 ("python-setuptools-git" ,python-setuptools-git)
26755 ("python-babel" ,python-babel)))
26756 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
26757 (synopsis
26758 "Screencast tool to display pressed keys")
26759 (description
26760 "A screencast tool to display your keys inspired by Screenflick.")
26761 (license license:gpl3+)))
26762
26763 (define-public python-jinja2-cli
26764 (package
26765 (name "python-jinja2-cli")
26766 (version "0.7.0")
26767 (source
26768 (origin
26769 (method url-fetch)
26770 (uri (pypi-uri "jinja2-cli" version))
26771 (sha256
26772 (base32
26773 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
26774 (build-system python-build-system)
26775 (propagated-inputs
26776 `(("python-jinja2" ,python-jinja2)))
26777 (native-inputs
26778 `(("python-flake8" ,python-flake8)
26779 ("python-jinja2" ,python-jinja2)
26780 ("python-pytest" ,python-pytest)))
26781 (home-page "https://github.com/mattrobenolt/jinja2-cli")
26782 (synopsis "Command-line interface to Jinja2")
26783 (description
26784 "This package provides a command-line interface (CLI) to the Jinja2
26785 template engine.")
26786 (license license:bsd-3)))
26787
26788 (define-public python-readability
26789 (package
26790 (name "python-readability")
26791 (version "0.3.1")
26792 (source
26793 (origin
26794 (method url-fetch)
26795 (uri (pypi-uri "readability" version))
26796 (sha256
26797 (base32
26798 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
26799 (build-system python-build-system)
26800 (home-page
26801 "https://github.com/andreasvc/readability/")
26802 (synopsis
26803 "Measure the readability of a given text using surface
26804 characteristics")
26805 (description
26806 "This package provides a Python library that is an implementation of
26807 traditional readability measures based on simple surface
26808 characteristics. These measures are basically linear regressions based on the
26809 number of words, syllables, and sentences.")
26810 (license license:asl2.0)))
26811
26812 (define-public python-listparser
26813 (package
26814 (name "python-listparser")
26815 (version "0.18")
26816 (source
26817 (origin
26818 (method url-fetch)
26819 (uri (pypi-uri "listparser" version))
26820 (sha256
26821 (base32
26822 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
26823 (build-system python-build-system)
26824 (home-page
26825 "https://github.com/kurtmckee/listparser")
26826 (synopsis
26827 "Parse subscription lists in Python")
26828 (description
26829 "This package provides a Python library that can parse OPML, FOAF, and
26830 iGoogle subscription lists.")
26831 (license license:expat)))
26832
26833 (define-public python-smartypants
26834 (package
26835 (name "python-smartypants")
26836 (version "2.0.1")
26837 (source
26838 (origin
26839 ;; There's no source tarball for 2.0.1 on PyPI.
26840 (method git-fetch)
26841 (uri (git-reference
26842 (url "https://github.com/leohemsted/smartypants.py")
26843 (commit (string-append "v" version))))
26844 (file-name (git-file-name name version))
26845 (sha256
26846 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
26847 (build-system python-build-system)
26848 (arguments
26849 '(#:phases
26850 (modify-phases %standard-phases
26851 (replace 'check
26852 ;; Its `setup.py test` doesn't report failure with exit status, so
26853 ;; we use `nose` instead.
26854 (lambda _
26855 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
26856 (native-inputs
26857 ;; For tests.
26858 `(("python-docutils" ,python-docutils)
26859 ("python-nose" ,python-nose)
26860 ("python-pygments" ,python-pygments)))
26861 (home-page "https://github.com/leohemsted/smartypants.py")
26862 (synopsis "Translate punctuation characters into smart quotes")
26863 (description
26864 "@command{smartpants} can perform the following transformations:
26865 @enumerate
26866 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
26867 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
26868 entities
26869 @item Dashes (-- and ---) into en- and em-dash entities
26870 @item Three consecutive dots (... or . . .) into an ellipsis entity
26871 @end enumerate")
26872 (license license:bsd-3)))
26873
26874 (define-public python-typogrify
26875 (package
26876 (name "python-typogrify")
26877 (version "2.0.7")
26878 (source (origin
26879 (method url-fetch)
26880 (uri (pypi-uri "typogrify" version))
26881 (sha256
26882 (base32
26883 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
26884 (build-system python-build-system)
26885 (arguments
26886 '(#:phases
26887 (modify-phases %standard-phases
26888 (replace 'check
26889 (lambda _
26890 (invoke "nosetests" "-v"))))))
26891 (propagated-inputs
26892 `(("python-smartypants" ,python-smartypants)))
26893 (native-inputs
26894 ;; For tests.
26895 `(("python-nose" ,python-nose)))
26896 (home-page "https://github.com/mintchaos/typogrify")
26897 (synopsis "Filters to transform text into typographically-improved HTML")
26898 (description
26899 "@code{typogrify} provides a set of custom filters that automatically
26900 apply various transformations to plain text in order to yield
26901 typographically-improved HTML. While often used in conjunction with Jinja and
26902 Django template systems, the filters can be used in any environment.")
26903 (license license:bsd-3)))
26904
26905 (define-public python-ld
26906 (package
26907 (name "python-ld")
26908 (version "0.5.0")
26909 (source
26910 (origin
26911 (method url-fetch)
26912 (uri (pypi-uri "ld" version))
26913 (sha256
26914 (base32
26915 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
26916 (build-system python-build-system)
26917 (propagated-inputs
26918 `(("python-six" ,python-six)))
26919 (home-page "https://github.com/nir0s/ld")
26920 (synopsis "OS platform information API")
26921 (description
26922 "The ld package provides information about the GNU/Linux distribution it
26923 runs on, such as a reliable machine-readable ID, or version information.")
26924 (license license:asl2.0)))
26925
26926 (define-public python-quicktions
26927 (package
26928 (name "python-quicktions")
26929 (version "1.11")
26930 (source
26931 (origin
26932 (method url-fetch)
26933 (uri (pypi-uri "quicktions" version))
26934 (sha256
26935 (base32
26936 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
26937 (modules '((guix build utils)))
26938 (snippet
26939 '(begin
26940 ;; This file is generated by Cython.
26941 (delete-file "src/quicktions.c") #t))))
26942 (build-system python-build-system)
26943 (arguments
26944 `(#:phases
26945 (modify-phases %standard-phases
26946 (add-before 'build 'cythonize-sources
26947 (lambda _
26948 (with-directory-excursion "src"
26949 (invoke "cython" "quicktions.pyx"))))
26950 (replace 'check
26951 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26952 (when tests?
26953 (add-installed-pythonpath inputs outputs)
26954 (invoke "pytest"))
26955 #t)))))
26956 (native-inputs
26957 `(("python-cython" ,python-cython)
26958 ("python-pytest" ,python-pytest)))
26959 (home-page "https://github.com/scoder/quicktions")
26960 (synopsis "Fast fractions data type for rational numbers")
26961 (description
26962 "This package provides fast fractions data type for rational numbers. It
26963 is the cythonized version of @code{fractions.Fraction}.")
26964 (license license:psfl)))
26965
26966 (define-public python-pathvalidate
26967 (package
26968 (name "python-pathvalidate")
26969 (version "2.4.1")
26970 (source
26971 (origin
26972 (method url-fetch)
26973 (uri (pypi-uri "pathvalidate" version))
26974 (sha256
26975 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
26976 (build-system python-build-system)
26977 (arguments
26978 '(#:tests? #f))
26979 ;; Tests disabled because of circular dependencies.
26980 ;; pathvalidate tests depend on pytest-md-report, which
26981 ;; depends on pathvalidate.
26982 (native-inputs
26983 `(("python-allpairspy" ,python-allpairspy)
26984 ("python-click" ,python-click)
26985 ("python-faker" ,python-faker)
26986 ("python-pytest" ,python-pytest)))
26987 (home-page "https://github.com/thombashi/pathvalidate")
26988 (synopsis "Sanitize strings representing paths")
26989 (description
26990 "@code{pathvalidate} is a Python library to sanitize/validate strings
26991 representing paths or filenames.")
26992 (license license:expat)))
26993
26994 (define-public python-escapism
26995 (package
26996 (name "python-escapism")
26997 (version "1.0.1")
26998 (source
26999 (origin
27000 (method url-fetch)
27001 (uri (pypi-uri "escapism" version))
27002 (sha256
27003 (base32
27004 "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
27005 (build-system python-build-system)
27006 (home-page "https://github.com/minrk/escapism")
27007 (synopsis "Simple, generic library for escaping strings")
27008 (description
27009 "This Python library provides a programming interface to, given a set of
27010 safe characters and an escape character, escape safe strings and unescape the
27011 result.")
27012 (license license:expat)))
27013
27014 (define-public python-recommonmark
27015 (package
27016 (name "python-recommonmark")
27017 (version "0.7.1")
27018 (source
27019 (origin
27020 (method url-fetch)
27021 (uri (pypi-uri "recommonmark" version))
27022 (sha256
27023 (base32
27024 "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
27025 (build-system python-build-system)
27026 (propagated-inputs
27027 `(("python-commonmark" ,python-commonmark)
27028 ("python-docutils" ,python-docutils)
27029 ("python-sphinx" ,python-sphinx)))
27030 (arguments
27031 '(#:phases (modify-phases %standard-phases
27032 (add-after 'unpack 'delete-test-sphinx
27033 (lambda* (#:key outputs #:allow-other-keys)
27034 (let* ((out (assoc-ref outputs "out")))
27035 (delete-file "tests/test_sphinx.py")))))))
27036 (home-page "https://github.com/readthedocs/recommonmark")
27037 (synopsis "Docutils-compatibility bridge to CommonMark")
27038 (description
27039 "This packages provides a docutils-compatibility bridge to CommonMark,
27040 enabling you to write CommonMark inside of Docutils & Sphinx projects.")
27041 (license license:expat)))
27042
27043 (define-public python-pyhull
27044 (package
27045 (name "python-pyhull")
27046 (version "2015.2.1")
27047 (source
27048 (origin
27049 (method url-fetch)
27050 (uri (pypi-uri "pyhull" version))
27051 (sha256
27052 (base32
27053 "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
27054 (build-system python-build-system)
27055 (propagated-inputs
27056 `(("python-numpy" ,python-numpy)))
27057 (home-page "https://github.com/materialsvirtuallab/pyhull")
27058 (synopsis "Python wrapper to Qhull")
27059 (description
27060 "This package provides a Python wrapper to @uref{http://www.qhull.org/,
27061 Qhull} for the computation of the convex hull, Delaunay triangulation, and
27062 Voronoi diagram.")
27063 (license license:expat)))
27064
27065 (define-public python-opcodes
27066 ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
27067 ;; version number, which is what we use here.
27068 (let ((commit "0f7c7d63f5e13ce5a89d9acc3934f1b6e247ec1f"))
27069 (package
27070 (name "python-opcodes")
27071 (version "0.3.14") ;from 'opcodes/__init__.py'
27072 (home-page "https://github.com/Maratyszcza/Opcodes")
27073 (source (origin
27074 (method git-fetch)
27075 (uri (git-reference (url home-page) (commit commit)))
27076 (file-name (git-file-name name version))
27077 (sha256
27078 (base32
27079 "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
27080 (build-system python-build-system)
27081 (synopsis "Database of processor instructions and opcodes")
27082 (description
27083 "This project documents instruction sets in a format convenient for
27084 tools development. An instruction set is represented by three files:
27085
27086 @itemize
27087 @item an XML file that describes instructions;
27088 @item an XSD file that describes the structure of the XML file;
27089 @item a Python module that reads the XML file and represents it as a set of
27090 Python objects;
27091 @end itemize
27092
27093 It currently provides descriptions for most user-mode x86, x86_64, and k1om
27094 instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
27095 and BMI2).")
27096 (license license:bsd-2))))
27097
27098 (define-public python-peachpy
27099 ;; There is no tag in this repo.
27100 (let ((commit "906d578266dc7188bf61e4cdbc9f8ea7d69edec0")
27101 (version "0.2.0") ;from 'peachpy/__init__.py'
27102 (revision "1"))
27103 (package
27104 (name "python-peachpy")
27105 (version (git-version version revision commit))
27106 (home-page "https://github.com/Maratyszcza/PeachPy")
27107 (source (origin
27108 (method git-fetch)
27109 (uri (git-reference (url home-page) (commit commit)))
27110 (file-name (git-file-name name version))
27111 (sha256
27112 (base32
27113 "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))))
27114 (build-system python-build-system)
27115 (arguments
27116 '(#:phases (modify-phases %standard-phases
27117 (replace 'check
27118 (lambda* (#:key tests? #:allow-other-keys)
27119 (when tests?
27120 (invoke "python" "setup.py" "nosetests")))))))
27121 (native-inputs
27122 `(("python-nose" ,python-nose)
27123 ("python-rednose" ,python-rednose)))
27124 (propagated-inputs
27125 `(("python-six" ,python-six)
27126 ("python-opcodes" ,python-opcodes)))
27127 (synopsis "Efficient assembly code generation in Python")
27128 (description
27129 "PeachPy is a Python framework for writing high-performance assembly kernels.
27130 PeachPy aims to simplify writing optimized assembly kernels while preserving
27131 all optimization opportunities of traditional assembly.
27132
27133 PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings
27134 for the Go language tool chain; it adapts to different calling conventions and
27135 application binary interfaces (ABIs); it takes care of register allocation; it
27136 supports x86_64 instructions up to AVX-512 and SHA.")
27137 (license license:bsd-2))))
27138
27139 (define-public python-sgmllib3k
27140 (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
27141 (revision "1"))
27142 (package
27143 (name "python-sgmllib3k")
27144 (version
27145 (git-version "1.0.0" revision commit))
27146 (source
27147 (origin
27148 (method git-fetch)
27149 (uri (git-reference
27150 (url "https://github.com/hsoft/sgmllib")
27151 (commit commit)))
27152 (file-name (git-file-name name version))
27153 (sha256
27154 (base32
27155 "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
27156 (build-system python-build-system)
27157 (home-page "https://github.com/hsoft/sgmllib")
27158 (synopsis "Python 3 port of sgmllib")
27159 (description "This package is a port of sgmllib that is no longer part
27160 of Python 3.")
27161 (license license:bsd-3))))
27162
27163 (define-public python-cwcwidth
27164 (package
27165 (name "python-cwcwidth")
27166 (version "0.1.4")
27167 (source
27168 (origin
27169 (method url-fetch)
27170 (uri (pypi-uri "cwcwidth" version))
27171 (sha256
27172 (base32
27173 "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
27174 (build-system python-build-system)
27175 (native-inputs
27176 `(("python-cython" ,python-cython)
27177 ("python-pytest" ,python-pytest)
27178 ("python-setuptools-scm" ,python-setuptools-scm)
27179 ("python-toml" ,python-toml)
27180 ("python-wheel" ,python-wheel)))
27181 (home-page
27182 "https://github.com/sebastinas/cwcwidth")
27183 (synopsis "Python bindings for wc(s)width")
27184 (description "This package provides bindings for wcwidth and wcswidth
27185 functions defined in POSIX.1-2001 and POSIX.1-2008.")
27186 (license license:expat)))
27187
27188 (define-public python-pyan3
27189 (package
27190 (name "python-pyan3")
27191 (version "1.2.0")
27192 (source
27193 (origin
27194 ;; Source tarball on PyPI lacks tests.
27195 (method git-fetch)
27196 (uri (git-reference
27197 (url "https://github.com/Technologicat/pyan")
27198 (commit (string-append "v" version))))
27199 (file-name (git-file-name name version))
27200 (sha256
27201 (base32
27202 "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
27203 (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
27204 "python-pyan3-fix-absolute-path-bug.patch"))))
27205 (build-system python-build-system)
27206 (arguments
27207 `(#:phases
27208 (modify-phases %standard-phases
27209 (replace 'check
27210 (lambda* (#:key tests? #:allow-other-keys)
27211 (when tests?
27212 ;; Extend PYTHONPATH so the built package will be found.
27213 (setenv "GUIX_PYTHONPATH"
27214 (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
27215 (invoke "pytest")))))))
27216 (native-inputs
27217 `(("python-pytest" ,python-pytest)
27218 ("python-pytest-cov" ,python-pytest-cov)
27219 ("python-wheel" ,python-wheel)))
27220 (propagated-inputs
27221 `(("python-jinja2" ,python-jinja2)))
27222 (home-page "https://github.com/Technologicat/pyan")
27223 (synopsis "Offline call graph generator for Python 3")
27224 (description "Pyan takes one or more Python source files, performs
27225 a (rather superficial) static analysis, and constructs a directed graph of the
27226 objects in the combined source, and how they define or use each other. The
27227 graph can be output for rendering by GraphViz or yEd.")
27228 (license license:gpl2)))
27229
27230 (define-public date2name
27231 (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
27232 (revision "1"))
27233 (package
27234 (name "date2name")
27235 (version (git-version "0.0" revision commit))
27236 (source
27237 (origin
27238 (method git-fetch)
27239 (uri (git-reference
27240 (url "https://github.com/novoid/date2name")
27241 (commit commit)))
27242 (file-name (git-file-name name version))
27243 (sha256
27244 (base32
27245 "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
27246 (build-system python-build-system)
27247 (arguments
27248 `(#:tests? #f ; no tests
27249 #:phases
27250 (modify-phases %standard-phases
27251 (delete 'build)
27252 (replace 'install
27253 (lambda* (#:key outputs #:allow-other-keys)
27254 (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
27255 (binary (string-append bindir "/date2name")))
27256 (mkdir-p bindir)
27257 (copy-file "date2name/__init__.py" binary)
27258 (chmod binary #o555)))))))
27259 (synopsis "Handling time-stamps and date-stamps in file names")
27260 (description "By default, date2name gets the modification time of matching
27261 files and directories and adds a datestamp in standard ISO 8601+ format
27262 YYYY-MM-DD at the beginning of the file or directory name.")
27263 (home-page "https://github.com/novoid/date2name")
27264 (license license:gpl3+))))
27265
27266 (define-public python-braintree
27267 (package
27268 (name "python-braintree")
27269 (version "4.12.0")
27270 (source
27271 (origin
27272 (method url-fetch)
27273 (uri (pypi-uri "braintree" version))
27274 (sha256
27275 (base32 "19kli85q18p80nsn8fm4ql6axpr7bllfqg5chv2ywhr8zr8bssll"))))
27276 (build-system python-build-system)
27277 (propagated-inputs
27278 `(("python-requests" ,python-requests)))
27279 (home-page
27280 "https://developers.braintreepayments.com/python/sdk/server/overview")
27281 (synopsis "Braintree Python Library")
27282 (description "The Braintree Python SDK provides integration access to the
27283 Braintree Gateway. Braintree is a US-based payments service provider.")
27284 (license license:expat)))
27285
27286 (define-public python-markuppy
27287 (package
27288 (name "python-markuppy")
27289 (version "1.14")
27290 (source
27291 (origin
27292 (method url-fetch)
27293 (uri (pypi-uri "MarkupPy" version))
27294 (sha256
27295 (base32 "0pqdmpxbr8iq22b4css2gz5z6s01ddpzyj25x27kgbs2lp0f5phs"))))
27296 (build-system python-build-system)
27297 (home-page "https://github.com/tylerbakke/MarkupPy")
27298 (synopsis "A pythonic HTML/XML generator")
27299 (description "This Python module attempts to make it easier to generate
27300 HTML/XML from a Python program in an intuitive, lightweight, customizable and
27301 pythonic way.")
27302 (license license:expat)))
27303
27304 (define-public python-tablib
27305 (package
27306 (name "python-tablib")
27307 (version "3.0.0")
27308 (source
27309 (origin
27310 (method url-fetch)
27311 (uri (pypi-uri "tablib" version))
27312 (sha256
27313 (base32 "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q"))))
27314 (build-system python-build-system)
27315 (arguments
27316 '(#:phases
27317 (modify-phases %standard-phases
27318 (replace 'check
27319 (lambda* (#:key tests? #:allow-other-keys)
27320 (when tests?
27321 (setenv "PYTHONPATH"
27322 (string-append (getcwd) "/build/lib:"
27323 (getenv "PYTHONPATH")))
27324 (invoke "pytest")))))))
27325 (native-inputs
27326 `(("python-pandas" ,python-pandas) ;; required for test-suite
27327 ("python-pytest" ,python-pytest)
27328 ("python-pytest-cov" ,python-pytest-cov)
27329 ("python-setuptools-scm" ,python-setuptools-scm)))
27330 (propagated-inputs
27331 `(("python-markuppy" ,python-markuppy)
27332 ("python-odfpy" ,python-odfpy)
27333 ("python-openpyxl" ,python-openpyxl)
27334 ("python-pyyaml" ,python-pyyaml)
27335 ("python-tabulate" ,python-tabulate)
27336 ("python-xlrd" ,python-xlrd)
27337 ("python-xlwt" ,python-xlwt)))
27338 (home-page "https://tablib.readthedocs.io")
27339 (synopsis "Format agnostic tabular data library")
27340 (description "@code{tablib} is a format-agnostic tabular dataset library,
27341 written in Python. Supported output formats are Excel (Sets + Books),
27342 JSON (Sets + Books), YAML (Sets + Books), HTML (Sets), Jira (Sets),
27343 TSV (Sets), ODS (Sets), CSV (Sets), and DBF (Sets).
27344
27345 @code{tablib} also supports Pandas DataFrames (Sets). Anyhow, since pandas is
27346 quite huge, this Guix package doesn't depend on pandas. In case, just also
27347 install @code{python-pandas}.")
27348 (license license:expat)))
27349
27350 (define-public python-csb43
27351 (package
27352 (name "python-csb43")
27353 (version "0.9.1")
27354 (source
27355 (origin
27356 (method url-fetch)
27357 (uri (pypi-uri "csb43" version))
27358 (sha256
27359 (base32 "0r0csl9npncnkfafg3rg6xr38d1qr0sxvq7wn7mg9bq41hvvh1si"))))
27360 (build-system python-build-system)
27361 (native-inputs
27362 `(("python-lxml" ,python-lxml)))
27363 (propagated-inputs
27364 `(("python-pycountry" ,python-pycountry)
27365 ("python-pyyaml" ,python-pyyaml)
27366 ("python-tablib" ,python-tablib)))
27367 (home-page "https://bitbucket.org/wmj/csb43")
27368 (synopsis "Tools for converting from the Spanish banks' format CSB norm
27369 43 (CSB43)")
27370 (description "This package provides tools to convert files in the format
27371 used by multiple Spanish banks (standard 43 of the Spanish Banking Council
27372 [CSB43] / Spanish Banking Association [AEB43]) to other formats.
27373
27374 Supported output formats are: OFX, HomeBank CSV, HTML, JSON, ODS (OpenDocument
27375 spreadsheet), CSV, TSV, XLS, XLSX (Microsoft Excel spreadsheet), and YAML.")
27376 (license license:lgpl3)))
27377
27378 (define-public python-febelfin-coda
27379 (package
27380 (name "python-febelfin-coda")
27381 (version "0.1.0")
27382 (source
27383 (origin
27384 (method url-fetch)
27385 (uri (pypi-uri "febelfin-coda" version))
27386 (sha256
27387 (base32 "10nf4hdwldqgdmh4g613vx55sbsw1x1yzpvs3crwlggbp75fjjfi"))))
27388 (build-system python-build-system)
27389 (home-page "https://coda.b2ck.com/")
27390 (synopsis "A module to parse Belgian CODA files")
27391 (description "This package provides a module to parse Coded statement of
27392 account (CODA) files as defined be the Belgian Febelfin bank standard.")
27393 (license license:bsd-3)))
27394
27395 (define-public python-ofxparse
27396 (package
27397 (name "python-ofxparse")
27398 (version "0.21")
27399 (source
27400 (origin
27401 (method url-fetch)
27402 (uri (pypi-uri "ofxparse" version))
27403 (sha256
27404 (base32 "19y4sp5l9jqiqzzlbqdfiab42qx7d84n4xm4s7jfq397666vcyh5"))))
27405 (build-system python-build-system)
27406 (arguments
27407 '(#:phases
27408 (modify-phases %standard-phases
27409 (replace 'check
27410 (lambda* (#:key tests? #:allow-other-keys)
27411 (when tests?
27412 (invoke "nosetests" "-v")))))))
27413 (native-inputs
27414 `(("python-nose" ,python-nose)))
27415 (propagated-inputs
27416 `(("python-beautifulsoup4" ,python-beautifulsoup4)
27417 ("python-lxml" ,python-lxml)
27418 ("python-six" ,python-six)))
27419 (home-page "http://sites.google.com/site/ofxparse")
27420 (synopsis "Tools for working with the OFX (Open Financial Exchange) file
27421 format")
27422 (description "@code{ofxparse} is a parser for Open Financial
27423 Exchange (.ofx) format files. OFX files are available from almost any online
27424 banking site, so they work well if you want to pull together your finances
27425 from multiple sources. Online trading accounts also often provide account
27426 statements in OFX files.")
27427 (license license:expat)))
27428
27429 (define-public python-stripe
27430 (package
27431 (name "python-stripe")
27432 (version "2.60.0")
27433 (source
27434 (origin
27435 (method url-fetch)
27436 (uri (pypi-uri "stripe" version))
27437 (sha256
27438 (base32 "0258lzh4qikhinfggnlfh5aklcvg7lrvl8giqrh0yf0l61wvfrl9"))))
27439 (build-system python-build-system)
27440 (arguments
27441 '(#:tests? #f)) ;; tests require network
27442 (propagated-inputs
27443 `(("python-requests" ,python-requests)))
27444 (home-page "https://github.com/stripe/stripe-python")
27445 (synopsis "Python bindings for the Stripe financial services' API")
27446 (description "This package provides access to the Stripe financial
27447 services' API. It includes a pre-defined set of classes for API resources
27448 that initialize themselves dynamically from API responses which makes it
27449 compatible with a wide range of versions of the Stripe API.")
27450 (license license:expat)))
27451
27452 (define-public python-platformdirs
27453 (package
27454 (name "python-platformdirs")
27455 (version "2.2.0")
27456 (source
27457 (origin
27458 (method url-fetch)
27459 (uri (pypi-uri "platformdirs" version))
27460 (sha256
27461 (base32 "07hq5qrp7pqj63iczg01wbf5ii6f0ncd0dq5mzkdhsslmg9slbb3"))))
27462 (build-system python-build-system)
27463 (native-inputs
27464 `(("python-appdirs" ,python-appdirs)
27465 ("python-pytest" ,python-pytest)
27466 ("python-pytest-cov" ,python-pytest-cov)
27467 ("python-pytest-mock" ,python-pytest-mock)))
27468 (home-page "https://github.com/platformdirs/platformdirs")
27469 (synopsis "Determine the appropriate platform-specific directories")
27470 (description "When writing applications, finding the right location to
27471 store user data and configuration varies per platform. Even for
27472 single-platform apps, there may by plenty of nuances in figuring out the right
27473 location. This small Python module determines the appropriate
27474 platform-specific directories, e.g. the ``user data dir''.")
27475 (license license:expat)))
27476
27477 (define-public python-json2html
27478 (package
27479 (name "python-json2html")
27480 (version "1.3.0")
27481 (source
27482 ;; There are no tests in the PyPI tarball.
27483 (origin
27484 (method git-fetch)
27485 (uri (git-reference
27486 (url "https://github.com/softvar/json2html")
27487 (commit (string-append "v" version))))
27488 (file-name (git-file-name name version))
27489 (sha256
27490 (base32 "1ncypljnl5y8lsxy6ibcqy412kx3mzxl4ajg67568hvq98kv1sb3"))))
27491 (build-system python-build-system)
27492 (arguments
27493 '(#:phases
27494 (modify-phases %standard-phases
27495 (replace 'check
27496 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
27497 (when tests?
27498 (add-installed-pythonpath inputs outputs)
27499 (invoke "python" "test/run_tests.py")))))))
27500 (home-page "https://github.com/softvar/json2html")
27501 (synopsis "Convert JSON to HTML table")
27502 (description "@code{python-json2html} is a python module to convert JSON
27503 into a human readable HTML table representation.")
27504 (license license:expat)))
27505
27506 (define-public python-face
27507 (package
27508 (name "python-face")
27509 (version "20.1.1")
27510 (source
27511 (origin
27512 (method url-fetch)
27513 (uri (pypi-uri "face" version))
27514 (sha256
27515 (base32 "0gpd9f0rmbv3rd2szi2na37l29fabkwazikjrxc6wca1lddwlnbx"))))
27516 (build-system python-build-system)
27517 (arguments
27518 '(#:phases
27519 (modify-phases %standard-phases
27520 (replace 'check
27521 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
27522 (when tests?
27523 ;; Make installed package available for running the tests.
27524 (add-installed-pythonpath inputs outputs)
27525 (invoke "pytest" "-v")))))))
27526 (native-inputs
27527 `(("python-pytest" ,python-pytest)))
27528 (propagated-inputs
27529 `(("python-boltons" ,python-boltons)))
27530 (home-page "https://github.com/mahmoud/face")
27531 (synopsis "CLI parsing and dispatching microframework")
27532 (description "@code{python-face} is a Pythonic microframework for building
27533 command-line applications.
27534
27535 @itemize
27536 @item First-class subcommand support
27537 @item Powerful middleware architecture
27538 @item Separate parser layer
27539 @item Built-in flagfile support
27540 @item Handy testing utilities
27541 @item Themeable help display
27542 @end itemize")
27543 (license license:bsd-3)))
27544
27545 (define-public python-glom
27546 (package
27547 (name "python-glom")
27548 (version "20.11.0")
27549 (source
27550 (origin
27551 (method url-fetch)
27552 (uri (pypi-uri "glom" version))
27553 (sha256
27554 (base32 "04pba09vdr3qjvqvy14g60fscdsi35chbbyqpczdp76cpir101al"))))
27555 (build-system python-build-system)
27556 (arguments
27557 '(#:phases
27558 (modify-phases %standard-phases
27559 (replace 'check
27560 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
27561 (when tests?
27562 ;; Make installed executable available for running the tests.
27563 (setenv "PATH"
27564 (string-append (assoc-ref outputs "out") "/bin"
27565 ":" (getenv "PATH")))
27566 (invoke "pytest" "-v")))))))
27567 (native-inputs
27568 `(("python-pytest" ,python-pytest)
27569 ("python-pyyaml" ,python-pyyaml)))
27570 (propagated-inputs
27571 `(("python-attrs" ,python-attrs)
27572 ("python-boltons" ,python-boltons)
27573 ("python-face" ,python-face)))
27574 (home-page "https://github.com/mahmoud/glom")
27575 (synopsis "Declaratively restructure data")
27576 (description "Real applications have real data, and real data
27577 nests---objects inside of objects inside of lists of objects. glom is a new
27578 and powerful way to handle real-world data, featuring:
27579
27580 @itemize
27581 @item Path-based access to nested data structures
27582 @item Readable, meaningful error messages
27583 @item Declarative data transformation, using lightweight, Pythonic specifications
27584 @item Built-in data exploration and debugging features
27585 @end itemize")
27586 (license license:bsd-3)))
27587
27588 (define-public python-box
27589 (package
27590 (name "python-box")
27591 (version "5.3.0")
27592 (source
27593 (origin
27594 (method url-fetch)
27595 (uri (pypi-uri "python-box" version))
27596 (sha256
27597 (base32
27598 "0jhrdif57khx2hsw1q6a9x42knwcvq8ijgqyq1jmll6y6ifyzm2f"))))
27599 (build-system python-build-system)
27600 (propagated-inputs
27601 `(("python-msgpack" ,python-msgpack)
27602 ("python-ruamel.yaml" ,python-ruamel.yaml)
27603 ("python-toml" ,python-toml)))
27604 (home-page "https://github.com/cdgriffith/Box")
27605 (synopsis "Advanced Python dictionaries with dot notation access")
27606 (description
27607 "This package provides the @code{python-box} Python module.
27608 It implements advanced Python dictionaries with dot notation access.")
27609 (license license:expat)))
27610
27611 (define-public python-fields
27612 (package
27613 (name "python-fields")
27614 (version "5.0.0")
27615 (source
27616 (origin
27617 (method url-fetch)
27618 (uri (pypi-uri "fields" version))
27619 (sha256
27620 (base32 "09sppvhhkhkv9zc9g994m53z15v92csxwcf42ggkaknlv01smm1i"))))
27621 (build-system python-build-system)
27622 (home-page "https://python-fields.readthedocs.io/")
27623 (synopsis "Python container class boilerplate killer")
27624 (description "Avoid repetetive boilerplate code in Python classes.")
27625 (license license:bsd-3)))
27626
27627 (define-public python-aspectlib
27628 (package
27629 (name "python-aspectlib")
27630 (version "1.5.2")
27631 (source
27632 (origin
27633 (method url-fetch)
27634 (uri (pypi-uri "aspectlib" version))
27635 (sha256
27636 (base32 "1am4ycf292zbmgz791z393v63w7qrynf8q5p9db2wwf2qj1fqxfj"))))
27637 (build-system python-build-system)
27638 (propagated-inputs `(("python-fields" ,python-fields)))
27639 (home-page "https://github.com/ionelmc/python-aspectlib")
27640 (synopsis
27641 "Python monkey-patching and decorators")
27642 (description
27643 "This package provides an aspect-oriented programming, monkey-patch
27644 and decorators library. It is useful when changing behavior in existing
27645 code is desired. It includes tools for debugging and testing:
27646 simple mock/record and a complete capture/replay framework.")
27647 (license license:bsd-2)))