gnu: texlive-context: Adjust to changes from 'master'.
[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 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
103 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
104 ;;; Copyright © 2021 jgart <jgart@dismail.de>
105 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
106 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
107 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
108 ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
109 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
110 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
111 ;;;
112 ;;; This file is part of GNU Guix.
113 ;;;
114 ;;; GNU Guix is free software; you can redistribute it and/or modify it
115 ;;; under the terms of the GNU General Public License as published by
116 ;;; the Free Software Foundation; either version 3 of the License, or (at
117 ;;; your option) any later version.
118 ;;;
119 ;;; GNU Guix is distributed in the hope that it will be useful, but
120 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
121 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122 ;;; GNU General Public License for more details.
123 ;;;
124 ;;; You should have received a copy of the GNU General Public License
125 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
126
127 (define-module (gnu packages python-xyz)
128 #:use-module ((guix licenses) #:prefix license:)
129 #:use-module (gnu packages)
130 #:use-module (gnu packages algebra)
131 #:use-module (gnu packages adns)
132 #:use-module (gnu packages aidc)
133 #:use-module (gnu packages attr)
134 #:use-module (gnu packages backup)
135 #:use-module (gnu packages bash)
136 #:use-module (gnu packages check)
137 #:use-module (gnu packages cmake)
138 #:use-module (gnu packages compression)
139 #:use-module (gnu packages crypto)
140 #:use-module (gnu packages databases)
141 #:use-module (gnu packages dbm)
142 #:use-module (gnu packages djvu)
143 #:use-module (gnu packages docker)
144 #:use-module (gnu packages enchant)
145 #:use-module (gnu packages file)
146 #:use-module (gnu packages fontutils)
147 #:use-module (gnu packages freedesktop)
148 #:use-module (gnu packages gcc)
149 #:use-module (gnu packages geo)
150 #:use-module (gnu packages ghostscript)
151 #:use-module (gnu packages gl)
152 #:use-module (gnu packages glib)
153 #:use-module (gnu packages gnome)
154 #:use-module (gnu packages gnupg)
155 #:use-module (gnu packages graphviz)
156 #:use-module (gnu packages graphics)
157 #:use-module (gnu packages gsasl)
158 #:use-module (gnu packages gstreamer)
159 #:use-module (gnu packages gtk)
160 #:use-module (gnu packages haskell-xyz)
161 #:use-module (gnu packages icu4c)
162 #:use-module (gnu packages image)
163 #:use-module (gnu packages imagemagick)
164 #:use-module (gnu packages jupyter)
165 #:use-module (gnu packages kerberos)
166 #:use-module (gnu packages libevent)
167 #:use-module (gnu packages libffi)
168 #:use-module (gnu packages libidn)
169 #:use-module (gnu packages linux)
170 #:use-module (gnu packages llvm)
171 #:use-module (gnu packages man)
172 #:use-module (gnu packages markup)
173 #:use-module (gnu packages maths)
174 #:use-module (gnu packages monitoring)
175 #:use-module (gnu packages multiprecision)
176 #:use-module (gnu packages networking)
177 #:use-module (gnu packages ncurses)
178 #:use-module (gnu packages openstack)
179 #:use-module (gnu packages pcre)
180 #:use-module (gnu packages pdf)
181 #:use-module (gnu packages perl)
182 #:use-module (gnu packages photo)
183 #:use-module (gnu packages pkg-config)
184 #:use-module (gnu packages python)
185 #:use-module (gnu packages python-build)
186 #:use-module (gnu packages python-check)
187 #:use-module (gnu packages python-compression)
188 #:use-module (gnu packages python-crypto)
189 #:use-module (gnu packages python-science)
190 #:use-module (gnu packages python-web)
191 #:use-module (gnu packages qt)
192 #:use-module (gnu packages rdf)
193 #:use-module (gnu packages readline)
194 #:use-module (gnu packages regex)
195 #:use-module (gnu packages sdl)
196 #:use-module (gnu packages scanner)
197 #:use-module (gnu packages search)
198 #:use-module (gnu packages serialization)
199 #:use-module (gnu packages shells)
200 #:use-module (gnu packages sphinx)
201 #:use-module (gnu packages ssh)
202 #:use-module (gnu packages swig)
203 #:use-module (gnu packages terminals)
204 #:use-module (gnu packages tex)
205 #:use-module (gnu packages texinfo)
206 #:use-module (gnu packages textutils)
207 #:use-module (gnu packages time)
208 #:use-module (gnu packages tls)
209 #:use-module (gnu packages version-control)
210 #:use-module (gnu packages video)
211 #:use-module (gnu packages web)
212 #:use-module (gnu packages wxwidgets)
213 #:use-module (gnu packages base)
214 #:use-module (gnu packages xml)
215 #:use-module (gnu packages xorg)
216 #:use-module (gnu packages xdisorg)
217 #:use-module (gnu packages tcl)
218 #:use-module (gnu packages bdw-gc)
219 #:use-module (gnu packages serialization)
220 #:use-module (guix packages)
221 #:use-module (guix download)
222 #:use-module (guix git-download)
223 #:use-module (guix hg-download)
224 #:use-module (guix gexp)
225 #:use-module (guix utils)
226 #:use-module (guix build-system gnu)
227 #:use-module (guix build-system cmake)
228 #:use-module (guix build-system python)
229 #:use-module (guix build-system trivial)
230 #:use-module (srfi srfi-1)
231 #:use-module (srfi srfi-26))
232
233 (define-public python-ueberzug
234 (package
235 (name "python-ueberzug")
236 (version "18.1.9")
237 (source
238 (origin
239 (method url-fetch)
240 (uri (pypi-uri "ueberzug" version))
241 (sha256
242 (base32
243 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
244 (build-system python-build-system)
245 (inputs
246 `(("libx11" ,libx11)
247 ("libxext" ,libxext)))
248 (propagated-inputs
249 `(("python-attrs" ,python-attrs)
250 ("python-docopt" ,python-docopt)
251 ("python-pillow" ,python-pillow)
252 ("python-xlib" ,python-xlib)))
253 (home-page "https://github.com/seebye/ueberzug")
254 (synopsis "Command line util to display images in combination with X11")
255 (description "Überzug is a command line util which allows to draw images on
256 terminals by using child windows. The advantages of using Überzug are:
257 @itemize
258 @item No race conditions as a new window is created to display images.
259 @item Expose events will be processed, so images will be redrawn on switch
260 workspaces.
261 @item Tmux support (excluding multi pane windows).
262 @item Terminals without the WINDOWID environment variable are supported.
263 @item Chars are used as position - and size unit.
264 @item No memory leak (/ unlimited cache).
265 @end itemize")
266 (license license:gpl3+)))
267
268 (define-public python-fire
269 (package
270 (name "python-fire")
271 (version "0.4.0")
272 (source
273 (origin
274 (method url-fetch)
275 (uri (pypi-uri "fire" version))
276 (sha256
277 (base32
278 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
279 (build-system python-build-system)
280 (native-inputs
281 `(("python-pytest", python-pytest)))
282 (arguments
283 '(#:phases
284 (modify-phases %standard-phases
285 (replace 'check
286 (lambda* (#:key tests? #:allow-other-keys)
287 (when tests?
288 (invoke "pytest")))))))
289 (inputs
290 `(("python-six", python-six)
291 ("python-termcolor", python-termcolor)))
292 (synopsis "Library for automatically generating command line interfaces")
293 (description
294 "Fire is a library for automatically generating command line interfaces
295 from absolutely any Python object. The following are the advantages:
296 @itemize
297 @item A simple way to create a CLI in Python.
298 @item A helpful tool for developing and debugging Python code.
299 @item Helps with exploring existing code or turning other people's code into a
300 command line interface.
301 @item Makes transitioning between Bash and Python easier.
302 @item Makes using a Python REPL easier by setting up the REPL with the modules
303 and variables you'll need already imported and created.
304 @end itemize")
305 (home-page "https://github.com/google/python-fire")
306 (license license:asl2.0)))
307
308 (define-public python-twodict
309 (package
310 (name "python-twodict")
311 (version "1.2")
312 (source
313 (origin
314 (method url-fetch)
315 (uri (pypi-uri "twodict" version))
316 (sha256
317 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
318 (build-system python-build-system)
319 (home-page "https://github.com/MrS0m30n3/twodict")
320 (synopsis "Two way ordered dictionary for Python")
321 (description "TwoDict is a custom dictionary in which you can get the
322 key:value relationship but you can also get the value:key relationship. It also
323 remembers the order in which the items were inserted and supports almost all the
324 features of the Python's built-in dict.")
325 (license license:unlicense)))
326
327 (define-public python2-twodict
328 (package
329 (inherit python-twodict)
330 (name "python2-twodict")
331 (version "1.2")
332 (source
333 (origin
334 (method url-fetch)
335 (uri (pypi-uri "twodict" version))
336 (sha256
337 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
338 (build-system python-build-system)
339 (arguments
340 `(#:python ,python-2))))
341
342 (define-public python-argopt
343 (package
344 (name "python-argopt")
345 (version "0.7.0")
346 (source (origin
347 (method url-fetch)
348 (uri (pypi-uri "argopt" version))
349 (sha256
350 (base32
351 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
352 (build-system python-build-system)
353 (native-inputs
354 `(("python-coverage" ,python-coverage)
355 ("python-nose" ,python-nose)
356 ("python-setuptools" ,python-setuptools) ; Won't build without this.
357 ("python-setuptools-scm" ,python-setuptools-scm)))
358 (propagated-inputs
359 `(("python-toml" ,python-toml)
360 ("python-flake8" ,python-flake8)))
361 (home-page "https://github.com/casperdcl/argopt")
362 (synopsis "Generate a command-line interface from a docstring")
363 (description "This package provides tools to define a command line interface
364 from a docstring rather than the other way around.")
365 (license license:mpl2.0)))
366
367 (define-public python-cachetools
368 (package
369 (name "python-cachetools")
370 (version "4.2.2")
371 (source (origin
372 (method url-fetch)
373 (uri (pypi-uri "cachetools" version))
374 (sha256
375 (base32
376 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
377 (build-system python-build-system)
378 (home-page "https://github.com/tkem/cachetools/")
379 (synopsis "Extensible memoizing collections and decorators")
380 (description "This module provides various memoizing collections and
381 decorators, including variants of the Python standard library's
382 @code{lru_cache} function decorator.")
383 (license license:expat)))
384
385 (define-public python-colorful
386 (package
387 (name "python-colorful")
388 (version "0.5.4")
389 (source
390 (origin
391 (method url-fetch)
392 (uri
393 (pypi-uri "colorful" version))
394 (sha256
395 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
396 (build-system python-build-system)
397 ;; FIXME: tests cannot be computed:
398 ;; "Can't perform this operation for unregistered loader type"
399 (arguments
400 `(#:tests? #f))
401 (native-inputs
402 `(("python-coverage" ,python-coverage)
403 ("python-flake8" ,python-flake8)
404 ("python-pytest" ,python-pytest)))
405 (propagated-inputs
406 `(("python-colorama" ,python-colorama)))
407 (home-page "http://github.com/timofurrer/colorful")
408 (synopsis "Terminal string styling")
409 (description "Colorful provides an array of text styles, that can be used
410 as functions or string constants to form colored terminal output.")
411 (license license:expat)))
412
413 (define-public python-yaspin
414 (package
415 (name "python-yaspin")
416 (version "1.5.0")
417 (source
418 (origin
419 (method url-fetch)
420 (uri
421 (pypi-uri "yaspin" version))
422 (sha256
423 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
424 (build-system python-build-system)
425 (native-inputs
426 `(("python-pytest" ,python-pytest)))
427 (home-page "https://github.com/pavdmyt/yaspin")
428 (synopsis "Yet Another Terminal Spinner")
429 (description "Yaspin provides a terminal spinner to indicate the progress
430 during long operations.")
431 (license license:expat)))
432
433 (define-public python-lunr
434 (package
435 (name "python-lunr")
436 (version "0.6.0")
437 (source
438 (origin
439 (method url-fetch)
440 (uri
441 (pypi-uri "lunr" version))
442 (sha256
443 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
444 (build-system python-build-system)
445 (native-inputs
446 `(("python-mock" ,python-mock)
447 ("python-pytest" ,python-pytest)))
448 (propagated-inputs
449 `(("python-nltk" ,python-nltk-3.4)))
450 (home-page
451 "https://github.com/yeraydiazdiaz/lunr.py")
452 (synopsis "Full-text search library")
453 (description "This package provides python library for full-text search.
454 It indexes documents and provides a search interface for retrieving documents
455 that best match text queries.")
456 (license license:expat)))
457
458 (define-public python-mkdocs
459 (package
460 (name "python-mkdocs")
461 (version "1.1.2")
462 (source
463 (origin
464 (method url-fetch)
465 (uri
466 (pypi-uri "mkdocs" version))
467 (sha256
468 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
469 (build-system python-build-system)
470 (arguments
471 `(#:phases
472 (modify-phases %standard-phases
473 ;; Requirements refer to a specific version of dependencies,
474 ;; which are too old. So we patch to refer to any later version.
475 (add-after 'unpack 'patch-requirements
476 (lambda _
477 (substitute* "setup.py"
478 (("==") ">=")))))))
479 (propagated-inputs
480 `(("python-click" ,python-click)
481 ("python-jinja2" ,python-jinja2)
482 ("python-livereload" ,python-livereload)
483 ("python-lunr" ,python-lunr)
484 ("python-markdown" ,python-markdown)
485 ("python-pyyaml" ,python-pyyaml)
486 ("python-tornado" ,python-tornado)))
487 (home-page "https://www.mkdocs.org")
488 (synopsis "Project documentation with Markdown")
489 (description "MkDocs is a static site generator geared towards building
490 project documentation. Documentation source files are written in Markdown, and
491 configured with a single YAML configuration file.")
492 (license license:bsd-3)))
493
494 (define-public python-pymdown-extensions
495 (package
496 (name "python-pymdown-extensions")
497 (version "8.1.1")
498 (source
499 (origin
500 (method url-fetch)
501 (uri
502 (pypi-uri "pymdown-extensions" version))
503 (sha256
504 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
505 (build-system python-build-system)
506 ;; FIXME: "AssertionError: False is not true"
507 (arguments
508 `(#:tests? #f))
509 (propagated-inputs
510 `(("python-markdown" ,python-markdown)))
511 (home-page "https://github.com/facelessuser/pymdown-extensions")
512 (synopsis "Extension pack for Python Markdown")
513 (description "PyMdown Extensions is a collection of extensions for Python
514 Markdown. All extensions are found under the module namespace of pymdownx.")
515 (license license:expat)))
516
517 (define-public python-mkdocs-material
518 (package
519 (name "python-mkdocs-material")
520 (version "7.1.3")
521 (source
522 (origin
523 (method url-fetch)
524 (uri
525 (pypi-uri "mkdocs-material" version))
526 (sha256
527 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
528 (build-system python-build-system)
529 (arguments
530 `(#:phases
531 (modify-phases %standard-phases
532 ;; Requirement mkdocs-material-extensions
533 ;; in-turn requires mkdocs-material. This causes
534 ;; circular dependency, so we remove this requirement.
535 (add-after 'unpack 'patch-requirements
536 (lambda _
537 (substitute* "requirements.txt"
538 (("mkdocs-material-extensions.*$") "")))))))
539 (propagated-inputs
540 `(("python-markdown" ,python-markdown)
541 ("python-mkdocs" ,python-mkdocs)
542 ("python-pygments" ,python-pygments)
543 ("python-pymdown-extensions"
544 ,python-pymdown-extensions)))
545 (home-page "https://squidfunk.github.io/mkdocs-material/")
546 (synopsis "Material Design theme for MkDocs")
547 (description "This package provides a theme plugin for the static site
548 generator MkDocs.")
549 (license license:expat)))
550
551 (define-public python-slixmpp
552 (package
553 (name "python-slixmpp")
554 (version "1.5.2")
555 (source
556 (origin
557 (method git-fetch)
558 (uri
559 (git-reference
560 (url "https://lab.louiz.org/poezio/slixmpp.git")
561 (commit
562 (string-append "slix-" version))))
563 (file-name
564 (git-file-name name version))
565 (sha256
566 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
567 (build-system python-build-system)
568 (arguments
569 `(#:phases
570 (modify-phases %standard-phases
571 (add-after 'unpack 'patch
572 (lambda _
573 (substitute* "setup.py"
574 (("'CC', 'cc'")
575 "'CC', 'gcc'"))
576 #t)))))
577 (native-inputs
578 `(("cython" ,python-cython)
579 ("gnupg" ,gnupg)
580 ("pkg-config" ,pkg-config)))
581 (propagated-inputs
582 `(("python-aiodns" ,python-aiodns)
583 ("python-aiohttp" ,python-aiohttp)
584 ("python-pyasn1" ,python-pyasn1)
585 ("python-pyasn1-modules" ,python-pyasn1-modules)))
586 (inputs
587 `(("libidn" ,libidn)
588 ("python" ,python))) ; We are building a Python extension.
589 (synopsis "XMPP library without threads")
590 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
591 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
592 socket handling, the timers, the events dispatching) in order to remove all
593 threads.")
594 (home-page "https://lab.louiz.org/poezio/slixmpp")
595 (license license:expat)))
596
597 (define-public python-tenacity
598 (package
599 (name "python-tenacity")
600 (version "6.1.0")
601 (source (origin
602 (method url-fetch)
603 (uri (pypi-uri "tenacity" version))
604 (sha256
605 (base32
606 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
607 (build-system python-build-system)
608 (native-inputs
609 `(("python-setuptools-scm" ,python-setuptools-scm)
610 ("python-sphinx" ,python-sphinx)
611 ("python-tornado" ,python-tornado)
612 ("python-pytest" ,python-pytest)))
613 (propagated-inputs
614 `(("python-six" ,python-six)))
615 (arguments
616 `(#:phases (modify-phases %standard-phases
617 (replace 'check
618 (lambda _
619 (invoke "pytest")
620 #t)))))
621 (home-page "https://github.com/jd/tenacity")
622 (synopsis "Retrying library for python")
623 (description "Tenacity is a general-purpose python library to simplify the
624 task of adding retry behavior to just about anything.")
625 (license license:asl2.0)))
626
627 (define-public python-pytelegrambotapi
628 (package
629 (name "python-pytelegrambotapi")
630 (version "3.7.4")
631 (source
632 (origin
633 (method git-fetch)
634 (uri (git-reference
635 (url "https://github.com/eternnoir/pyTelegramBotAPI")
636 (commit version)))
637 (file-name (git-file-name name version))
638 (sha256
639 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
640 (build-system python-build-system)
641 (arguments
642 `(#:phases
643 (modify-phases %standard-phases
644 (replace 'check
645 (lambda* (#:key tests? #:allow-other-keys)
646 (when tests?
647 (with-directory-excursion "tests"
648 (invoke "py.test")))
649 #t)))))
650 (propagated-inputs
651 `(("python-requests" ,python-requests)))
652 (native-inputs
653 `(("python-pytest" ,python-pytest)))
654 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
655 (synopsis "Python Telegram bot api")
656 (description "This package provides a simple, but extensible Python
657 implementation for the Telegram Bot API.")
658 (license license:gpl2)))
659
660 (define-public python-colorlog
661 (package
662 (name "python-colorlog")
663 (version "4.1.0")
664 (source (origin
665 (method url-fetch)
666 (uri (pypi-uri "colorlog" version))
667 (sha256
668 (base32
669 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
670 (build-system python-build-system)
671 (native-inputs
672 `(("python-pytest" ,python-pytest)))
673 (arguments
674 `(#:phases (modify-phases %standard-phases
675 (replace 'check
676 (lambda _
677 (invoke "pytest" "-p" "no:logging"))))))
678 (home-page "https://github.com/borntyping/python-colorlog")
679 (synopsis "Log formatting with colors for python")
680 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
681 with Python's logging module that outputs records using terminal colors.")
682 (license license:expat)))
683
684 (define-public python-pyprind
685 (package
686 (name "python-pyprind")
687 (version "2.11.3")
688 (source (origin
689 (method url-fetch)
690 (uri (pypi-uri "PyPrind" version))
691 (sha256
692 (base32
693 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
694 (build-system python-build-system)
695 (propagated-inputs
696 `(("python-psutil" ,python-psutil)))
697 (home-page "https://github.com/rasbt/pyprind")
698 (synopsis "Python Progress Bar and Percent Indicator Utility")
699 (description "The PyPrind (Python Progress Indicator) module provides a
700 progress bar and a percentage indicator object that let you track the progress
701 of a loop structure or other iterative computation.")
702 (license license:bsd-3)))
703
704 (define-public python-gphoto2
705 (package
706 (name "python-gphoto2")
707 (version "2.2.1")
708 (source (origin
709 (method url-fetch)
710 (uri (pypi-uri "gphoto2" version))
711 (sha256
712 (base32
713 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
714 (build-system python-build-system)
715 (native-inputs
716 `(("pkg-config" ,pkg-config)))
717 (inputs
718 `(("libgphoto2" ,libgphoto2)))
719 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
720 (synopsis "Python interface to libgphoto2")
721 (description "@code{python-gphoto2} is a comprehensive Python interface
722 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
723 automatically generate the interface code.")
724 (license license:gpl3+)))
725
726 (define-public python-colour
727 (package
728 (name "python-colour")
729 (version "0.1.5")
730 (source (origin
731 (method url-fetch)
732 (uri (pypi-uri "colour" version))
733 (sha256
734 (base32
735 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
736 (build-system python-build-system)
737 (native-inputs
738 `(("python-d2to1" ,python-d2to1)))
739 (home-page "https://github.com/vaab/colour")
740 (synopsis "Convert and manipulate various color representations")
741 (description "Pythonic way to manipulate color representations (HSL, RVB,
742 web, X11, ...).")
743 (license license:expat)))
744
745 (define-public python-d2to1
746 (package
747 (name "python-d2to1")
748 (version "0.2.12.post1")
749 (source (origin
750 (method url-fetch)
751 (uri (pypi-uri "d2to1" version))
752 (sha256
753 (base32
754 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
755 (build-system python-build-system)
756 (native-inputs
757 `(("python-nose" ,python-nose)))
758 (home-page "https://github.com/embray/d2to1")
759 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
760 in python")
761 (description "The python package d2to1 (the d is for distutils) allows
762 using distutils2-like setup.cfg files for a package's metadata with a
763 distribute/setuptools setup.py script.")
764 (license license:bsd-2)))
765
766 (define-public python-rawkit
767 (package
768 (name "python-rawkit")
769 (version "0.6.0")
770 (source (origin
771 (method url-fetch)
772 (uri (pypi-uri "rawkit" version))
773 (sha256
774 (base32
775 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
776 (build-system python-build-system)
777 (native-inputs
778 `(("python-pytest" ,python-pytest)
779 ("python-mock" ,python-mock)))
780 (inputs
781 `(("libraw" ,libraw)))
782 (home-page "https://rawkit.readthedocs.io")
783 (synopsis "Ctypes-based LibRaw binding for Python")
784 (description "The rawkit package provides two modules: rawkit and libraw.
785 The rawkit module provides a high-level Pythonic interface for developing raw
786 photos, while the libraw module provides a CTypes based interface for
787 interacting with the low-level LibRaw C APIs.")
788 (license license:expat)))
789
790 (define-public python-easygui
791 (package
792 (name "python-easygui")
793 (version "0.98.1")
794 (source (origin
795 (method url-fetch)
796 (uri (pypi-uri "easygui" version))
797 (sha256
798 (base32
799 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
800 (build-system python-build-system)
801 (propagated-inputs
802 `(("python-tkinter" ,python "tk")))
803 (home-page "https://github.com/robertlugg/easygui")
804 (synopsis "GUI programming module for Python")
805 (description "EasyGUI is a module for very simple, very easy GUI
806 programming in Python. EasyGUI is different from other GUI generators in that
807 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
808 simple function calls.")
809 (license license:bsd-3)))
810
811 (define-public python-pymd4c
812 (package
813 (name "python-pymd4c")
814 (version "0.4.6.0b1")
815 (source
816 (origin
817 (method url-fetch)
818 (uri (pypi-uri "pymd4c" version))
819 (sha256
820 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
821 (build-system python-build-system)
822 (inputs
823 `(("md4c" ,md4c)))
824 (native-inputs
825 `(("python-flake8" ,python-flake8)
826 ("python-pkgconfig" ,python-pkgconfig)
827 ("pkg-config" ,pkg-config)))
828 (home-page "https://github.com/dominickpastore/pymd4c")
829 (synopsis "Python bindings for MD4C")
830 (description
831 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
832 to CommonMark.")
833 (license license:expat)))
834
835 (define-public python-pymediainfo
836 (package
837 (name "python-pymediainfo")
838 (version "4.1")
839 (source
840 (origin
841 (method url-fetch)
842 (uri (pypi-uri "pymediainfo" version))
843 (sha256
844 (base32
845 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
846 (build-system python-build-system)
847 (native-inputs
848 `(("python-setuptools-scm" ,python-setuptools-scm)
849 ("python-pytest" ,python-pytest)))
850 (inputs
851 `(("libmediainfo" ,libmediainfo)))
852 (arguments
853 `(#:phases
854 (modify-phases %standard-phases
855 (add-after 'unpack 'patch-libmediainfo
856 (lambda _
857 (substitute* "pymediainfo/__init__.py"
858 (("libmediainfo.so.0")
859 (string-append (assoc-ref %build-inputs "libmediainfo")
860 "/lib/libmediainfo.so.0")))
861 #t))
862 (replace 'check
863 (lambda* (#:key tests? #:allow-other-keys)
864 (when tests?
865 ;; Extend PYTHONPATH so the built package will be found.
866 (setenv "PYTHONPATH"
867 (string-append (getcwd) "/build/lib:"
868 (getenv "PYTHONPATH")))
869 ;; Skip the only failing test "test_parse_url"
870 (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
871 (home-page
872 "https://github.com/sbraz/pymediainfo")
873 (synopsis
874 "Python wrapper for the mediainfo library")
875 (description
876 "Python wrapper for the mediainfo library to access the technical and tag
877 data for video and audio files.")
878 (license license:expat)))
879
880 (define-public python-psutil
881 (package
882 (name "python-psutil")
883 (version "5.8.0")
884 (source
885 (origin
886 (method url-fetch)
887 (uri (pypi-uri "psutil" version))
888 (sha256
889 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
890 (build-system python-build-system)
891 (arguments
892 ;; FIXME: some tests do not return and time out. Some tests fail because
893 ;; some processes survive kill().
894 '(#:tests? #f))
895 (home-page "https://github.com/giampaolo/psutil")
896 (synopsis "Library for retrieving information on running processes")
897 (description
898 "@code{psutil} (Python system and process utilities) is a library for
899 retrieving information on running processes and system utilization (CPU,
900 memory, disks, network) in Python. It is useful mainly for system monitoring,
901 profiling and limiting process resources and management of running processes.
902 It implements many functionalities offered by command line tools such as: ps,
903 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
904 iotop, uptime, pidof, tty, taskset, pmap.")
905 (properties `((python2-variant . ,(delay python2-psutil))))
906 (license license:bsd-3)))
907
908 (define-public python2-psutil
909 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
910 (package/inherit base
911 (propagated-inputs
912 `(("python2-enum34" ,python2-enum34) ;optional
913 ,@(package-propagated-inputs base))))))
914
915 (define-public python-shapely
916 (package
917 (name "python-shapely")
918 (version "1.7.1")
919 (source
920 (origin
921 (method url-fetch)
922 (uri (pypi-uri "Shapely" version))
923 (sha256
924 (base32
925 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
926 (modules '((guix build utils)))
927 (snippet
928 '(begin
929 (delete-file "shapely/speedups/_speedups.c")
930 (delete-file "shapely/vectorized/_vectorized.c")
931 #t))))
932 (build-system python-build-system)
933 (native-inputs
934 `(("python-cython" ,python-cython)
935 ("python-matplotlib" ,python-matplotlib)
936 ("python-pytest" ,python-pytest)
937 ("python-pytest-cov" ,python-pytest-cov)))
938 (inputs
939 `(("geos" ,geos)))
940 (propagated-inputs
941 `(("python-numpy" ,python-numpy)))
942 (arguments
943 `(#:phases
944 (modify-phases %standard-phases
945 (add-after 'unpack 'patch-geos-path
946 (lambda* (#:key inputs #:allow-other-keys)
947 (let ((geos (assoc-ref inputs "geos"))
948 (glibc (assoc-ref inputs ,(if (%current-target-system)
949 "cross-libc" "libc"))))
950 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
951 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
952 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
953 geos "/lib/libgeos_c.so'])"))
954 (("free = load_dll\\('c'\\)\\.free")
955 (string-append "free = load_dll('c', fallbacks=['"
956 glibc "/lib/libc.so.6']).free"))
957 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
958 (string-append "free = load_dll('c', fallbacks=['"
959 glibc "/lib/libc.so.6']).free"))))
960 #t)))))
961 (home-page "https://github.com/Toblerity/Shapely")
962 (synopsis "Library for the manipulation and analysis of geometric objects")
963 (description "Shapely is a Python package for manipulation and analysis of
964 planar geometric objects. It is based on the @code{GEOS} library.")
965 (license license:bsd-3)))
966
967 (define-public python-shortuuid
968 (package
969 (name "python-shortuuid")
970 (version "0.5.0")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "shortuuid" version))
975 (sha256
976 (base32
977 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
978 (build-system python-build-system)
979 (native-inputs
980 `(("python-pep8" ,python-pep8)))
981 (home-page "https://github.com/skorokithakis/shortuuid")
982 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
983 (description
984 "@code{shortuuid} is a Python library for generating concise, unambiguous
985 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
986 module and then similar looking characters are removed.")
987 (license license:bsd-3)))
988
989 (define-public python-logwrap
990 (package
991 (name "python-logwrap")
992 (version "8.2.0.post0")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (pypi-uri "logwrap" version))
997 (sha256
998 (base32
999 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
1000 (build-system python-build-system)
1001 (arguments
1002 `(#:tests? #f ; Tests not included in pypi release.
1003 #:phases
1004 (modify-phases %standard-phases
1005 (replace 'check
1006 (lambda* (#:key tests? #:allow-other-keys)
1007 (when tests?
1008 (invoke "pytest"))
1009 #t)))))
1010 (native-inputs
1011 `(("python-cython" ,python-cython)
1012 ("python-pytest" ,python-pytest)
1013 ("python-setuptools-scm" ,python-setuptools-scm)
1014 ("python-toml" ,python-toml)
1015 ("python-wheel" ,python-wheel)))
1016 (home-page "https://github.com/python-useful-helpers/logwrap")
1017 (synopsis "Decorator for logging function arguments")
1018 (description "This package provides a decorator to log function arguments
1019 and function call return values in a human-readable way.")
1020 (license license:asl2.0)))
1021
1022 (define-public python-clyent
1023 (package
1024 (name "python-clyent")
1025 (version "1.2.1")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (pypi-uri "clyent" version))
1030 (sha256
1031 (base32
1032 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1033 (build-system python-build-system)
1034 (native-inputs
1035 `(("python-mock" ,python-mock)))
1036 (home-page "https://github.com/Anaconda-Platform/clyent")
1037 (synopsis "Command line client library")
1038 (description "Clyent is a Python command line utility library. It is used
1039 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1040 (license license:bsd-3)))
1041
1042 (define-public python2-clyent
1043 (package-with-python2 python-clyent))
1044
1045 (define-public python-babel
1046 (package
1047 (name "python-babel")
1048 (version "2.9.0")
1049 (source
1050 (origin
1051 (method url-fetch)
1052 (uri (pypi-uri "Babel" version))
1053 (sha256
1054 (base32
1055 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1056 (build-system python-build-system)
1057 (native-inputs
1058 `(("python-freezegun" ,python-freezegun)
1059 ("python-pytest" ,python-pytest)
1060 ("tzdata" ,tzdata-for-tests)))
1061 (propagated-inputs
1062 `(("python-pytz" ,python-pytz)))
1063 (arguments
1064 `(#:phases (modify-phases %standard-phases
1065 (replace 'check
1066 (lambda _
1067 (invoke "pytest" "-vv"))))))
1068 (home-page "https://babel.pocoo.org/")
1069 (synopsis
1070 "Tools for internationalizing Python applications")
1071 (description
1072 "Babel is composed of two major parts:
1073 - tools to build and work with gettext message catalogs
1074 - a Python interface to the CLDR (Common Locale Data Repository), providing
1075 access to various locale display names, localized number and date formatting,
1076 etc. ")
1077 (license license:bsd-3)))
1078
1079 (define-public python2-babel
1080 (package-with-python2 python-babel))
1081
1082 (define-public python2-backport-ssl-match-hostname
1083 (package
1084 (name "python2-backport-ssl-match-hostname")
1085 (version "3.5.0.1")
1086 (source
1087 (origin
1088 (method url-fetch)
1089 (uri (pypi-uri "backports.ssl_match_hostname" version))
1090 (sha256
1091 (base32
1092 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1093 (build-system python-build-system)
1094 (arguments
1095 `(#:python ,python-2
1096 #:tests? #f)) ; no test target
1097 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
1098 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
1099 (description
1100 "This backport brings the ssl.match_hostname() function to users of
1101 earlier versions of Python. The function checks the hostname in the
1102 certificate returned by the server to which a connection has been established,
1103 and verifies that it matches the intended target hostname.")
1104 (license license:psfl)))
1105
1106 (define-public python-bidict
1107 (package
1108 (name "python-bidict")
1109 (version "0.21.2")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (pypi-uri "bidict" version))
1114 (sha256
1115 (base32
1116 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1117 (build-system python-build-system)
1118 (native-inputs
1119 `(("python-coverage" ,python-coverage)
1120 ("python-hypothesis" ,python-hypothesis)
1121 ("python-pre-commit" ,python-pre-commit)
1122 ("python-py" ,python-py)
1123 ("python-pytest" ,python-pytest)
1124 ("python-pytest-benchmark" ,python-pytest-benchmark)
1125 ("python-pytest-cov" ,python-pytest-cov)
1126 ("python-setuptools-scm" ,python-setuptools-scm)
1127 ("python-sortedcollections" ,python-sortedcollections)
1128 ("python-sortedcontainers" ,python-sortedcontainers)
1129 ("python-sphinx" ,python-sphinx)
1130 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
1131 ("python-tox" ,python-tox)))
1132 (arguments
1133 `(#:phases (modify-phases %standard-phases
1134 (add-after 'unpack 'relax-reqs
1135 (lambda _
1136 (substitute* "setup.py"
1137 (("sortedcollections < 2") "sortedcollections"))
1138 #t))
1139 (replace 'check
1140 (lambda _ (invoke "./run_tests.py"))))))
1141 (home-page "https://bidict.readthedocs.io")
1142 (synopsis "Bidirectional mapping library")
1143 (description "The @code{bidict} library provides several data structures
1144 for working with bidirectional mappings in Python.")
1145 (license license:mpl2.0)))
1146
1147 (define-public python-bitarray
1148 (package
1149 (name "python-bitarray")
1150 (version "1.4.0")
1151 (source (origin
1152 (method url-fetch)
1153 (uri (pypi-uri "bitarray" version))
1154 (sha256
1155 (base32
1156 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1157 (build-system python-build-system)
1158 (home-page "https://github.com/ilanschnell/bitarray")
1159 (synopsis "Efficient arrays of booleans")
1160 (description "This package provides an object type which efficiently
1161 represents an array of booleans. Bitarrays are sequence types and behave very
1162 much like usual lists. Eight bits are represented by one byte in a contiguous
1163 block of memory. The user can select between two representations:
1164 little-endian and big-endian. All of the functionality is implemented in C.
1165 Methods for accessing the machine representation are provided. This can be
1166 useful when bit level access to binary files is required, such as portable
1167 bitmap image files. Also, when dealing with compressed data which uses
1168 variable bit length encoding, you may find this module useful.")
1169 (license license:psfl)))
1170
1171 (define-public python-boolean.py
1172 (package
1173 (name "python-boolean.py")
1174 (version "3.6")
1175 (source
1176 (origin
1177 ;; There's no source tarball on PyPI.
1178 (method git-fetch)
1179 (uri (git-reference
1180 (url "https://github.com/bastikr/boolean.py")
1181 (commit (string-append "v" version))))
1182 (file-name (git-file-name name version))
1183 (sha256
1184 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1185 (build-system python-build-system)
1186 (home-page "https://github.com/bastikr/boolean.py")
1187 (synopsis "Boolean algebra in one Python module")
1188 (description
1189 "This is a small Python library that implements boolean algebra.
1190 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1191 @code{Symbol} class that can take on one of these two values. Calculations
1192 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1193 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1194 Expressions are constructed from parsed strings or directly in Python.")
1195 (license license:bsd-2)))
1196
1197 (define-public python-hdf4
1198 (package
1199 (name "python-hdf4")
1200 (version "0.9")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri name version))
1205 (sha256
1206 (base32
1207 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1208 (build-system python-build-system)
1209 (native-inputs `(("nose" ,python-nose)))
1210 (propagated-inputs `(("numpy" ,python-numpy)))
1211 (inputs
1212 `(("hdf4" ,hdf4)
1213 ("libjpeg" ,libjpeg-turbo)
1214 ("zlib" ,zlib)))
1215 (arguments
1216 `(#:phases
1217 (modify-phases %standard-phases
1218 (replace 'check
1219 (lambda _
1220 (invoke "./runexamples.sh")
1221 (invoke "nosetests" "-v"))))))
1222 (home-page "https://github.com/fhs/python-hdf4")
1223 (synopsis "Python interface to the NCSA HDF4 library")
1224 (description
1225 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1226 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1227 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1228 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1229 (license license:expat)))
1230
1231 (define-public python-h5py
1232 (package
1233 (name "python-h5py")
1234 (version "2.10.0")
1235 (source
1236 (origin
1237 (method url-fetch)
1238 (uri (pypi-uri "h5py" version))
1239 (sha256
1240 (base32
1241 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1242 (build-system python-build-system)
1243 (arguments
1244 `(#:tests? #f ; no test target
1245 #:phases
1246 (modify-phases %standard-phases
1247 (add-after 'unpack 'fix-hdf5-paths
1248 (lambda* (#:key inputs #:allow-other-keys)
1249 (let ((prefix (assoc-ref inputs "hdf5")))
1250 (substitute* "setup_build.py"
1251 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1252 (string-append "['" prefix "/lib" "']"))
1253 (("'/opt/local/include', '/usr/local/include'")
1254 (string-append "'" prefix "/include" "'")))
1255 (substitute* "setup_configure.py"
1256 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1257 (string-append "['" prefix "/lib" "']")))
1258 #t))))))
1259 (propagated-inputs
1260 `(("python-six" ,python-six)
1261 ("python-numpy" ,python-numpy)))
1262 (inputs
1263 `(("hdf5" ,hdf5-1.10)))
1264 (native-inputs
1265 `(("python-cython" ,python-cython)
1266 ("python-pkgconfig" ,python-pkgconfig)
1267 ("pkg-config" ,pkg-config)))
1268 (home-page "https://www.h5py.org/")
1269 (synopsis "Read and write HDF5 files from Python")
1270 (description
1271 "The h5py package provides both a high- and low-level interface to the
1272 HDF5 library from Python. The low-level interface is intended to be a
1273 complete wrapping of the HDF5 API, while the high-level component supports
1274 access to HDF5 files, datasets and groups using established Python and NumPy
1275 concepts.")
1276 (license license:bsd-3)))
1277
1278 (define-public python2-h5py
1279 (package-with-python2 python-h5py))
1280
1281 (define-public python-pyls-black
1282 (package
1283 (name "python-pyls-black")
1284 (version "0.4.6")
1285 (source
1286 (origin
1287 ;; There are no tests in the PyPI tarball.
1288 (method git-fetch)
1289 (uri (git-reference
1290 (url "https://github.com/rupert/pyls-black/")
1291 (commit (string-append "v" version))))
1292 (file-name (git-file-name name version))
1293 (sha256
1294 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1295 (build-system python-build-system)
1296 (arguments
1297 `(#:test-target "pytest"))
1298 (propagated-inputs
1299 `(("python-black" ,python-black)
1300 ("python-language-server"
1301 ,python-language-server)
1302 ("python-toml" ,python-toml)))
1303 (native-inputs
1304 `(("python-flake8" ,python-flake8)
1305 ("python-isort" ,python-isort)
1306 ("python-mypy" ,python-mypy)
1307 ("python-pytest" ,python-pytest)
1308 ("python-pytest-runner" ,python-pytest-runner)))
1309 (home-page "https://github.com/rupert/pyls-black")
1310 (synopsis "Black plugin for the Python Language Server")
1311 (description "Black plugin for the Python Language Server.")
1312 (license license:expat)))
1313
1314 (define-public python-sh
1315 (package
1316 (name "python-sh")
1317 (version "1.12.14")
1318 (source
1319 (origin
1320 (method url-fetch)
1321 (uri (pypi-uri "sh" version))
1322 (sha256
1323 (base32
1324 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1325 (build-system python-build-system)
1326 (arguments
1327 '(#:phases
1328 (modify-phases %standard-phases
1329 (replace 'check
1330 (lambda _
1331 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1332 (setenv "HOME" "/tmp")
1333 (invoke "python" "sh.py" "test"))))))
1334 (native-inputs
1335 `(("python-coverage" ,python-coverage)))
1336 (home-page "https://github.com/amoffat/sh")
1337 (synopsis "Python subprocess replacement")
1338 (description "This package provides a replacement for Python's
1339 @code{subprocess} feature.")
1340 (license license:expat)))
1341
1342 (define-public python-cftime
1343 (package
1344 (name "python-cftime")
1345 (version "1.0.4.2")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (pypi-uri "cftime" version))
1350 (sha256
1351 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1352 (build-system python-build-system)
1353 (propagated-inputs
1354 `(("python-numpy" ,python-numpy)))
1355 (native-inputs
1356 `(("python-coveralls" ,python-coveralls)
1357 ("python-cython" ,python-cython)
1358 ("python-pytest-cov" ,python-pytest-cov)))
1359 (home-page "https://github.com/Unidata/cftime")
1360 (synopsis "Library for time handling")
1361 (description
1362 "This package provides time-handling functionality that used to be part
1363 of the netcdf4 package before.")
1364 ;; This package claims to include code under the GPLv3 but is released
1365 ;; under ISC.
1366 (license (list license:isc license:gpl3+))))
1367
1368 (define-public python-netcdf4
1369 (package
1370 (name "python-netcdf4")
1371 (version "1.5.3")
1372 (source
1373 (origin
1374 (method url-fetch)
1375 (uri (pypi-uri "netCDF4" version))
1376 (sha256
1377 (base32
1378 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1379 (build-system python-build-system)
1380 (arguments
1381 '(#:phases
1382 (modify-phases %standard-phases
1383 (add-after 'unpack 'configure-locations
1384 (lambda* (#:key inputs #:allow-other-keys)
1385 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1386 #t)))))
1387 (native-inputs
1388 `(("python-cython" ,python-cython)))
1389 (propagated-inputs
1390 `(("python-numpy" ,python-numpy)
1391 ("python-cftime" ,python-cftime)))
1392 (inputs
1393 `(("netcdf" ,netcdf)
1394 ("hdf4" ,hdf4)
1395 ("hdf5" ,hdf5)))
1396 (home-page "https://github.com/Unidata/netcdf4-python")
1397 (synopsis "Python/numpy interface to the netCDF library")
1398 (description "Netcdf4-python is a Python interface to the netCDF C
1399 library. netCDF version 4 has many features not found in earlier
1400 versions of the library and is implemented on top of HDF5. This module
1401 can read and write files in both the new netCDF 4 and the old netCDF 3
1402 format, and can create files that are readable by HDF5 clients. The
1403 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1404 to users of that module.")
1405 ;; The software is mainly ISC, but includes some files covered
1406 ;; by the Expat license.
1407 (license (list license:isc license:expat))))
1408
1409 (define-public python-ncclient
1410 (package
1411 (name "python-ncclient")
1412 (version "0.6.12")
1413 (source
1414 (origin
1415 (method git-fetch) ;no tests in PyPI release
1416 (uri (git-reference
1417 (url "https://github.com/ncclient/ncclient")
1418 (commit (string-append "v" version))))
1419 (file-name (git-file-name name version))
1420 (sha256
1421 (base32
1422 "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
1423 (build-system python-build-system)
1424 (arguments
1425 `(#:phases (modify-phases %standard-phases
1426 (replace 'check
1427 (lambda* (#:key tests? #:allow-other-keys)
1428 (when tests?
1429 (invoke "pytest")))))))
1430 (native-inputs
1431 `(("python-pytest" ,python-pytest)))
1432 (propagated-inputs
1433 `(("python-lxml" ,python-lxml)
1434 ("python-paramiko" ,python-paramiko)))
1435 (home-page "https://github.com/ncclient/ncclient")
1436 (synopsis "Python library for NETCONF clients")
1437 (description "@code{ncclient} is a Python library that facilitates
1438 client-side scripting and application development around the NETCONF
1439 protocol.")
1440 (license license:asl2.0)))
1441
1442 (define-public python-license-expression
1443 (package
1444 (name "python-license-expression")
1445 (version "1.2")
1446 (source
1447 (origin
1448 (method url-fetch)
1449 (uri (pypi-uri "license-expression" version))
1450 (sha256
1451 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1452 (build-system python-build-system)
1453 (propagated-inputs
1454 `(("python-boolean.py" ,python-boolean.py)))
1455 (home-page "https://github.com/nexB/license-expression")
1456 (synopsis "Apply boolean logic to license expressions")
1457 (description
1458 "This Python module defines a tiny language to evaluate and compare
1459 license expressions using boolean logic. Logical combinations of licenses can
1460 be tested for equality, containment, and equivalence. They can be normalised
1461 and simplified. It supports SPDX license expressions as well as other naming
1462 conventions and aliases in the same expression.")
1463 (license license:gpl2+)))
1464
1465 (define-public python-lockfile
1466 (package
1467 (name "python-lockfile")
1468 (version "0.12.2")
1469 (source
1470 (origin
1471 (method url-fetch)
1472 (uri (pypi-uri "lockfile" version))
1473 (sha256
1474 (base32
1475 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1476 (build-system python-build-system)
1477 (arguments '(#:test-target "check"))
1478 (native-inputs
1479 `(("python-pbr" ,python-pbr)))
1480 (home-page "https://launchpad.net/pylockfile")
1481 (synopsis "Platform-independent file locking module")
1482 (description
1483 "The lockfile package exports a LockFile class which provides a simple
1484 API for locking files.")
1485 (license license:expat)))
1486
1487 (define-public python-fb-re2
1488 (package
1489 (name "python-fb-re2")
1490 (version "1.0.7")
1491 (source
1492 (origin
1493 (method git-fetch)
1494 (uri (git-reference
1495 (url "https://github.com/facebook/pyre2")
1496 (commit (string-append "v" version))))
1497 (file-name (git-file-name name version))
1498 (sha256
1499 (base32
1500 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1501 (build-system python-build-system)
1502 (inputs
1503 `(("re2" ,re2)))
1504 (home-page "https://github.com/facebook/pyre2")
1505 (synopsis "Python wrapper for RE2")
1506 (description "This package provides a Python extension that wraps Google's
1507 RE2 regular expression library. It implements many of the features of
1508 Python's built-in @code{re} module with compatible interfaces.")
1509 (license license:bsd-3)))
1510
1511 (define-public python-filelock
1512 (package
1513 (name "python-filelock")
1514 (version "3.0.12")
1515 (source
1516 (origin
1517 (method url-fetch)
1518 (uri (pypi-uri "filelock" version))
1519 (sha256
1520 (base32
1521 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1522 (build-system python-build-system)
1523 (home-page
1524 "https://github.com/benediktschmitt/py-filelock")
1525 (synopsis "Platform independent file lock")
1526 (description "@code{filelock} contains a single module implementing
1527 a platform independent file lock in Python, which provides a simple way of
1528 inter-process communication.")
1529 (license license:unlicense)))
1530
1531 (define-public python-semantic-version
1532 (package
1533 (name "python-semantic-version")
1534 (version "2.8.5")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "semantic_version" version))
1539 (sha256
1540 (base32
1541 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1542 (build-system python-build-system)
1543 (home-page "https://github.com/rbarrois/python-semanticversion")
1544 (synopsis "Semantic versioning module for Python")
1545 (description
1546 "The @code{semantic_version} class is a small library for handling
1547 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1548
1549 It can compare versions, generate a new version that represents a bump in one of
1550 the version levels, and check whether any given string is a proper semantic
1551 version identifier.")
1552 (license license:bsd-3)))
1553
1554 (define-public python2-semantic-version
1555 (package-with-python2 python-semantic-version))
1556
1557 (define-public python-serpent
1558 (package
1559 (name "python-serpent")
1560 (version "1.28")
1561 (source
1562 (origin
1563 (method url-fetch)
1564 (uri (pypi-uri "serpent" version))
1565 (sha256
1566 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1567 (build-system python-build-system)
1568 (native-inputs
1569 `(("python-attrs" ,python-attrs)
1570 ("python-pytz" ,python-pytz)))
1571 (home-page "https://github.com/irmen/Serpent")
1572 (synopsis "Serializer for literal Python expressions")
1573 (description
1574 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1575 serialization. It serializes an object tree into bytes (an utf-8 encoded
1576 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1577 to rebuild the original object tree.
1578
1579 Because only safe literals are encoded, it is safe to send serpent data to
1580 other machines, such as over the network.")
1581 (properties `((python2-variant . ,(delay python2-serpent))))
1582 (license license:expat)))
1583
1584 (define-public python2-serpent
1585 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1586 (package/inherit base
1587 (propagated-inputs
1588 `(("python-enum34" ,python2-enum34)
1589 ,@(package-propagated-inputs base))))))
1590
1591 (define-public python-setuptools
1592 (package
1593 (name "python-setuptools")
1594 (version "52.0.0")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (pypi-uri "setuptools" version))
1599 (sha256
1600 (base32
1601 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1602 (modules '((guix build utils)))
1603 (snippet
1604 '(begin
1605 ;; Remove included binaries which are used to build self-extracting
1606 ;; installers for Windows.
1607 ;; TODO: Find some way to build them ourself so we can include them.
1608 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1609 #t))))
1610 (build-system python-build-system)
1611 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1612 ;; One could bootstrap with an internal untested setuptools.
1613 (arguments
1614 `(#:tests? #f))
1615 (home-page "https://pypi.org/project/setuptools/")
1616 (synopsis
1617 "Library designed to facilitate packaging Python projects")
1618 (description
1619 "Setuptools is a fully-featured, stable library designed to facilitate
1620 packaging Python projects, where packaging includes:
1621 Python package and module definitions,
1622 distribution package metadata,
1623 test hooks,
1624 project installation,
1625 platform-specific details,
1626 Python 3 support.")
1627 ;; TODO: setuptools now bundles the following libraries:
1628 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1629 (license (list license:psfl ; setuptools itself
1630 license:expat ; six, appdirs, pyparsing
1631 license:asl2.0 ; packaging is dual ASL2/BSD-2
1632 license:bsd-2))
1633 (properties `((python2-variant . ,(delay python2-setuptools))))))
1634
1635 ;; Newer versions of setuptools no longer support Python 2.
1636 (define-public python2-setuptools
1637 (package
1638 (name "python2-setuptools")
1639 (version "41.0.1")
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (pypi-uri "setuptools" version ".zip"))
1644 (sha256
1645 (base32
1646 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1647 (modules '((guix build utils)))
1648 (snippet
1649 '(begin
1650 ;; Remove included binaries which are used to build self-extracting
1651 ;; installers for Windows.
1652 ;; TODO: Find some way to build them ourself so we can include them.
1653 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1654 #t))))
1655 (build-system python-build-system)
1656 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1657 ;; One could bootstrap with an internal untested setuptools.
1658 (arguments
1659 `(#:tests? #f))
1660 (native-inputs
1661 `(("unzip" ,unzip)))
1662 (home-page "https://pypi.org/project/setuptools/")
1663 (synopsis
1664 "Library designed to facilitate packaging Python projects")
1665 (description
1666 "Setuptools is a fully-featured, stable library designed to facilitate
1667 packaging Python projects, where packaging includes:
1668 Python package and module definitions,
1669 distribution package metadata,
1670 test hooks,
1671 project installation,
1672 platform-specific details,
1673 Python 3 support.")
1674 ;; TODO: setuptools now bundles the following libraries:
1675 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1676 (license (list license:psfl ; setuptools itself
1677 license:expat ; six, appdirs, pyparsing
1678 license:asl2.0 ; packaging is dual ASL2/BSD-2
1679 license:bsd-2))))
1680
1681 (define-public python-setuptools-declarative-requirements
1682 (package
1683 (name "python-setuptools-declarative-requirements")
1684 (version "1.2.0")
1685 (source
1686 (origin
1687 (method url-fetch)
1688 (uri (pypi-uri
1689 "setuptools-declarative-requirements"
1690 version))
1691 (sha256
1692 (base32
1693 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1694 (build-system python-build-system)
1695 (native-inputs
1696 `(("python-pytest" ,python-pytest)
1697 ("python-setuptools-scm" ,python-setuptools-scm)))
1698 (propagated-inputs
1699 `(("python-toml" ,python-toml)
1700 ("python-wheel" ,python-wheel)))
1701 (home-page
1702 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1703 (synopsis "File support for setuptools declarative setup.cfg")
1704 (description
1705 "This package provides file support for setuptools declarative
1706 @code{setup.cfg}.")
1707 (license license:asl2.0)))
1708
1709 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1710 (define-public python-setuptools-for-tensorflow
1711 (hidden-package
1712 (package
1713 (inherit python-setuptools)
1714 (version "39.1.0")
1715 (source (origin
1716 (inherit (package-source python-setuptools))
1717 (uri (pypi-uri "setuptools" version ".zip"))
1718 (sha256
1719 (base32
1720 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1721
1722 (define-public python-uniseg
1723 (package
1724 (name "python-uniseg")
1725 (version "0.7.1")
1726 (source
1727 (origin
1728 (method url-fetch)
1729 (uri (pypi-uri "uniseg" version ".zip"))
1730 (sha256
1731 (base32
1732 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1733 (build-system python-build-system)
1734 (arguments
1735 '(#:tests? #f)) ; The test suite requires network access.
1736 (native-inputs
1737 `(("unzip" ,unzip)))
1738 (home-page
1739 "https://bitbucket.org/emptypage/uniseg-python")
1740 (synopsis
1741 "Python library to determine Unicode text segmentations")
1742 (description
1743 "Uniseg is a Python package used to determine Unicode text segmentations.
1744 Supported segmentations include:
1745 @enumerate
1746 @item @dfn{Code point} (any value in the Unicode codespace)
1747 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1748 multiple Unicode code points, e.g. \"G\" + acute-accent)
1749 @item Word break
1750 @item Sentence break
1751 @item Line break
1752 @end enumerate")
1753 (license license:expat)))
1754
1755 (define-public python2-uniseg
1756 (package-with-python2 python-uniseg))
1757
1758 (define-public python-humanfriendly
1759 (package
1760 (name "python-humanfriendly")
1761 (version "8.2")
1762 (source
1763 (origin
1764 (method url-fetch)
1765 (uri (pypi-uri "humanfriendly" version))
1766 (sha256
1767 (base32
1768 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1769 (build-system python-build-system)
1770 (arguments
1771 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1772 #:tests? #f))
1773 (home-page "https://humanfriendly.readthedocs.io")
1774 (synopsis "Human-friendly input and output in Python")
1775 (description
1776 "The functions and classes in @code{humanfriendly} can be used to make
1777 text interfaces more user-friendly. It includes tools to parse and format
1778 numbers, file sizes, and timespans, timers for long-running operations, menus
1779 to allow the user to choose from a list of options, and terminal interaction
1780 helpers.")
1781 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1782 (license license:expat)))
1783
1784 (define-public python2-humanfriendly
1785 (let ((base (package-with-python2
1786 (strip-python2-variant python-humanfriendly))))
1787 (package/inherit base
1788 (propagated-inputs
1789 `(("python2-monotonic" ,python2-monotonic)
1790 ,@(package-propagated-inputs base))))))
1791
1792 (define-public python-textparser
1793 (package
1794 (name "python-textparser")
1795 (version "0.23.0")
1796 (source
1797 (origin
1798 (method url-fetch)
1799 (uri (pypi-uri "textparser" version))
1800 (sha256
1801 (base32
1802 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1803 (build-system python-build-system)
1804 (home-page "https://github.com/eerimoq/textparser")
1805 (synopsis "Fast text parser for Python")
1806 (description "This library provides a text parser written in the Python
1807 language. It aims to be fast.")
1808 (license license:expat)))
1809
1810 (define-public python-aenum
1811 (package
1812 (name "python-aenum")
1813 (version "2.2.4")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (pypi-uri "aenum" version))
1818 (sha256
1819 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1820 (build-system python-build-system)
1821 (arguments
1822 `(#:phases (modify-phases %standard-phases
1823 (replace 'check
1824 (lambda _
1825 ;; We must run the test suite module directly, as it
1826 ;; fails to define the 'tempdir' variable in scope for
1827 ;; the tests otherwise
1828 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1829 ;; issues/32/running-tests-with-python-setuppy-test).
1830 (invoke "python3" "aenum/test.py")
1831 ;; This one fails with "NameError: name
1832 ;; 'test_pickle_dump_load' is not defined" (see:
1833 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1834 ;; /error-running-the-test_v3py-test-suite).
1835 ;; (invoke "python3" "aenum/test_v3.py")
1836 #t)))))
1837 (home-page "https://bitbucket.org/stoneleaf/aenum")
1838 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1839 (description "The aenum library includes an @code{Enum} base class, a
1840 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1841 class.")
1842 (license license:bsd-3)))
1843
1844 (define-public python-can
1845 (package
1846 (name "python-can")
1847 (version "3.3.3")
1848 (source
1849 (origin
1850 (method url-fetch)
1851 (uri (pypi-uri "python-can" version))
1852 (sha256
1853 (base32
1854 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1855 (build-system python-build-system)
1856 (arguments
1857 `(#:phases (modify-phases %standard-phases
1858 (add-after 'unpack 'relax-version-requirements
1859 (lambda _
1860 (substitute* "setup.py"
1861 (("mock~=2\\.0") "mock")
1862 (("coverage<5") "coverage")
1863 (("pytest~=4\\.3") "pytest")
1864 (("hypothesis~=4\\.56") "hypothesis"))
1865 #t))
1866 (add-after 'unpack 'fix-broken-tests
1867 ;; The tests try to run two scripts it expects should be
1868 ;; in PATH, but they aren't at this time (see:
1869 ;; https://github.com/hardbyte/python-can/issues/805).
1870 (lambda _
1871 (substitute* "test/test_scripts.py"
1872 (("\"can_logger\\.py --help\"") "")
1873 (("\"can_player\\.py --help\"") ""))
1874 #t)))))
1875 (propagated-inputs
1876 `(("python-aenum" ,python-aenum)
1877 ("python-wrapt" ,python-wrapt)))
1878 (native-inputs
1879 `(("python-codecov" ,python-codecov)
1880 ("python-coverage" ,python-coverage)
1881 ("python-future" ,python-future)
1882 ("python-hypothesis" ,python-hypothesis)
1883 ("python-mock" ,python-mock)
1884 ("python-pyserial" ,python-pyserial)
1885 ("python-pytest" ,python-pytest)
1886 ("python-pytest-cov" ,python-pytest-cov)
1887 ("python-pytest-runner" ,python-pytest-runner)
1888 ("python-pytest-timeout" ,python-pytest-timeout)))
1889 (home-page "https://github.com/hardbyte/python-can")
1890 (synopsis "Controller Area Network (CAN) interface module for Python")
1891 (description "This package defines the @code{can} module, which provides
1892 controller area network (CAN) support for Python developers; providing common
1893 abstractions to different hardware devices, and a suite of utilities for
1894 sending and receiving messages on a CAN bus.")
1895 (license license:lgpl3+)))
1896
1897 (define-public python-caniusepython3
1898 (package
1899 (name "python-caniusepython3")
1900 (version "7.2.0")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (pypi-uri "caniusepython3" version))
1905 (sha256
1906 (base32
1907 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1908 (build-system python-build-system)
1909 (arguments
1910 `(#:phases (modify-phases %standard-phases
1911 (add-after 'unpack 'relax-requirements
1912 (lambda _
1913 (substitute* "setup.py"
1914 ;; These are for compatibility with Python 2.
1915 ((".*'argparse', 'backports.functools_lru_cache',.*")
1916 ""))
1917 (substitute* "dev_requirements.txt"
1918 ((".*pylint.*") "")) ;not actually required
1919 #t))
1920 (replace 'check
1921 (lambda _
1922 (invoke "py.test" "-k" "not NetworkTests"))))))
1923 (propagated-inputs
1924 `(("python-distlib" ,python-distlib)
1925 ("python-packaging" ,python-packaging)
1926 ("python-requests" ,python-requests)))
1927 (native-inputs
1928 `(("python-mock" ,python-mock)
1929 ("python-pytest" ,python-pytest)))
1930 (home-page "https://github.com/brettcannon/caniusepython3")
1931 (synopsis "Check for Python 3-incompatible Python libraries")
1932 (description "The @command{caniusepython3} command scans your project and
1933 reports the Python 3-incompatible libraries it found. It can also be used as
1934 a library.")
1935 (license license:asl2.0)))
1936
1937 (define-public python-diskcache
1938 (package
1939 (name "python-diskcache")
1940 (version "4.1.0")
1941 (source
1942 (origin
1943 (method url-fetch)
1944 (uri (pypi-uri "diskcache" version))
1945 (sha256
1946 (base32
1947 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1948 (build-system python-build-system)
1949 (arguments
1950 `(#:tests? #f)) ;test suite not included in the release
1951 (home-page "http://www.grantjenks.com/docs/diskcache/")
1952 (synopsis "Disk and file backed cache library")
1953 (description "DiskCache is a disk and file backed persistent cache.")
1954 (license license:asl2.0)))
1955
1956 (define-public python-bitstruct
1957 (package
1958 (name "python-bitstruct")
1959 (version "8.9.0")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (pypi-uri "bitstruct" version))
1964 (sha256
1965 (base32
1966 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1967 (build-system python-build-system)
1968 (home-page "https://github.com/eerimoq/bitstruct")
1969 (synopsis "Python values to and C bit field structs converter")
1970 (description "This module performs conversions between Python values and C
1971 bit field structs represented as Python byte strings. It is intended to have
1972 a similar interface as the @code{struct} module from Python, but working on
1973 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1974 (license license:expat)))
1975
1976 (define-public python-cantools
1977 (package
1978 (name "python-cantools")
1979 (version "33.1.1")
1980 (source
1981 (origin
1982 ;; We take the sources from the Git repository as the documentation is
1983 ;; not included with the PyPI archive.
1984 (method git-fetch)
1985 (uri (git-reference
1986 (url "https://github.com/eerimoq/cantools")
1987 (commit version)))
1988 (file-name (git-file-name name version))
1989 (sha256
1990 (base32
1991 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1992 (build-system python-build-system)
1993 (arguments
1994 `(#:phases
1995 (modify-phases %standard-phases
1996 (add-after 'build 'build-doc
1997 (lambda _
1998 ;; See: https://github.com/eerimoq/cantools/issues/190.
1999 (substitute* "README.rst"
2000 (("https://github.com/eerimoq/cantools/raw/master\
2001 /docs/monitor.png")
2002 "monitor.png"))
2003 (with-directory-excursion "docs"
2004 (invoke "make" "man" "info"))))
2005 (add-after 'install 'install-doc
2006 (lambda* (#:key outputs #:allow-other-keys)
2007 (let* ((out (assoc-ref outputs "out"))
2008 (info (string-append out "/share/info"))
2009 (man1 (string-append out "/share/man/man1")))
2010 (format #t "CWD: ~s~%" (getcwd))
2011 (install-file "docs/_build/texinfo/cantools.info" info)
2012 (install-file "docs/_build/man/cantools.1" man1)
2013 #t))))))
2014 (native-inputs
2015 `(("sphinx" ,python-sphinx)
2016 ("texinfo" ,texinfo)))
2017 (propagated-inputs
2018 `(("python-bitstruct" ,python-bitstruct)
2019 ("python-can" ,python-can)
2020 ("python-diskcache" ,python-diskcache)
2021 ("python-textparser" ,python-textparser)))
2022 (home-page "https://github.com/eerimoq/cantools")
2023 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
2024 (description "This package includes Controller Area Network (CAN) related
2025 tools that can be used to:
2026 @itemize
2027 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
2028 @item encode and decode CAN messages
2029 @item multiplex simple and extended signals
2030 @item diagnose DID encoding and decoding
2031 @item dump the CAN decoder output
2032 @item test CAN nodes
2033 @item generate C source code
2034 @item monitor the CAN bus
2035 @end itemize")
2036 (license license:expat)))
2037
2038 (define-public python-capturer
2039 (package
2040 (name "python-capturer")
2041 (version "2.4")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "capturer" version))
2046 (sha256
2047 (base32
2048 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2049 (build-system python-build-system)
2050 (arguments
2051 `(#:tests? #f))
2052 (propagated-inputs
2053 `(("python-humanfriendly" ,python-humanfriendly)))
2054 (home-page "https://capturer.readthedocs.io")
2055 (synopsis "Capture stdout and stderr streams of the current process")
2056 (description
2057 "The capturer package makes it easy to capture the stdout and stderr
2058 streams of the current process and subprocesses. Output can be relayed
2059 to the terminal in real time but is also available to the Python program
2060 for additional processing.")
2061 (license license:expat)))
2062
2063 (define-public python2-capturer
2064 (package-with-python2 python-capturer))
2065
2066 (define-public python-case
2067 (package
2068 (name "python-case")
2069 (version "1.5.3")
2070 (source
2071 (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "case" version))
2074 (sha256
2075 (base32
2076 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2077 (build-system python-build-system)
2078 (propagated-inputs
2079 `(("python-mock" ,python-mock)
2080 ("python-nose" ,python-nose)
2081 ("python-six" ,python-six)
2082 ("python-unittest2" ,python-unittest2)))
2083 (native-inputs
2084 `(("python-coverage" ,python-coverage)))
2085 (home-page "https://github.com/celery/case")
2086 (synopsis "Unittest utilities and convenience methods")
2087 (description
2088 "The @code{case} package provides utilities on top of unittest, including
2089 some helpful Python 2 compatibility convenience methods.")
2090 (license license:bsd-3)))
2091
2092 (define-public python-verboselogs
2093 (package
2094 (name "python-verboselogs")
2095 (version "1.7")
2096 (source
2097 (origin
2098 (method url-fetch)
2099 (uri (pypi-uri "verboselogs" version))
2100 (sha256
2101 (base32
2102 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2103 (build-system python-build-system)
2104 (arguments
2105 `(#:phases
2106 (modify-phases %standard-phases
2107 (replace 'check
2108 (lambda _
2109 ;; Do not run pylint plugin test, as astroid is an old
2110 ;; unsupported version.
2111 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2112 "verboselogs/tests.py"))))))
2113 (native-inputs
2114 `(("python-mock" ,python-mock)
2115 ("python-pytest" ,python-pytest)))
2116 (home-page "https://verboselogs.readthedocs.io")
2117 (synopsis "Verbose logging level for Python's logging module")
2118 (description
2119 "The @code{verboselogs} package extends Python's @code{logging} module to
2120 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2121 (license license:expat)))
2122
2123 (define-public python2-verboselogs
2124 (package-with-python2 python-verboselogs))
2125
2126 (define-public python-coloredlogs
2127 (package
2128 (name "python-coloredlogs")
2129 (version "10.0")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "coloredlogs" version))
2134 (sha256
2135 (base32
2136 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2137 (build-system python-build-system)
2138 (arguments
2139 `(;Tests require some updated modules
2140 #:tests? #f))
2141 (propagated-inputs
2142 `(("python-capturer" ,python-capturer)))
2143 (home-page "https://coloredlogs.readthedocs.io")
2144 (synopsis "Colored stream handler for Python's logging module")
2145 (description
2146 "The @code{coloredlogs} package enables colored terminal output for
2147 Python's logging module. The @code{ColoredFormatter} class inherits from
2148 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2149 messages in color.")
2150 (license license:expat)))
2151
2152 (define-public python2-coloredlogs
2153 (package-with-python2 python-coloredlogs))
2154
2155 (define-public python-editorconfig
2156 (package
2157 (name "python-editorconfig")
2158 (version "0.12.2")
2159 (source
2160 (origin
2161 (method url-fetch)
2162 (uri (pypi-uri "EditorConfig" version))
2163 (sha256
2164 (base32
2165 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2166 (build-system python-build-system)
2167 (home-page "https://editorconfig.org/")
2168 (synopsis "EditorConfig bindings for python")
2169 (description "The EditorConfig project consists of a file format for
2170 defining coding styles and a collection of text editor plugins that enable
2171 editors to read the file format and adhere to defined styles. EditorConfig
2172 files are easily readable and they work nicely with version control systems.")
2173 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2174 (license (list license:bsd-2 license:psfl))))
2175
2176 (define-public dosage
2177 (package
2178 (name "dosage")
2179 (version "2.17")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (pypi-uri "dosage" version))
2184 (sha256
2185 (base32
2186 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2187 (build-system python-build-system)
2188 (propagated-inputs
2189 `(("python2-backports-functools-lru-cache"
2190 ,python2-backports-functools-lru-cache)
2191 ("python2-backports-shutil-get-terminal-size"
2192 ,python2-backports-shutil-get-terminal-size)
2193 ("python-cached-property" ,python-cached-property)
2194 ("python-colorama" ,python-colorama)
2195 ("python-imagesize" ,python-imagesize)
2196 ("python-importlib-metadata" ,python-importlib-metadata)
2197 ("python-lxml" ,python-lxml)
2198 ("python-requests" ,python-requests)
2199 ("python-six" ,python-six)))
2200 (native-inputs
2201 `(("python-pytest-cov" ,python-pytest-cov)
2202 ("python-pytest-xdist" ,python-pytest-xdist)
2203 ("python-responses" ,python-responses)
2204 ("python-setuptools-scm" ,python-setuptools-scm)))
2205 (home-page "https://github.com/webcomics/dosage")
2206 (synopsis "Comic strip downloader and archiver")
2207 (description "Dosage is designed to keep a local copy of specific webcomics and other
2208 picture-based content such as Picture of the Day sites. With the @command{dosage}
2209 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2210 downloaded, or download a strip for a particular date or index, if possible.")
2211 (license license:expat)))
2212
2213 (define-public python-et-xmlfile
2214 (package
2215 (name "python-et-xmlfile")
2216 (version "1.0.1")
2217 (source
2218 (origin
2219 (method url-fetch)
2220 (uri (pypi-uri "et_xmlfile" version))
2221 (sha256
2222 (base32
2223 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2224 (build-system python-build-system)
2225 (arguments
2226 `(#:phases (modify-phases %standard-phases
2227 (replace 'check
2228 (lambda _
2229 (invoke "pytest"))))))
2230 (native-inputs
2231 `(("python-pytest" ,python-pytest)
2232 ("python-lxml" ,python-lxml))) ;used for the tests
2233 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2234 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2235 (description "This Python library is based upon the @code{xmlfile} module
2236 from @code{lxml}. It aims to provide a low memory, compatible implementation
2237 of @code{xmlfile}.")
2238 (license license:expat)))
2239
2240 (define-public python2-et-xmlfile
2241 (package-with-python2 python-et-xmlfile))
2242
2243 (define-public python-openpyxl
2244 (package
2245 (name "python-openpyxl")
2246 (version "3.0.5")
2247 (source
2248 (origin
2249 ;; We use the upstream repository, as the tests are not included in the
2250 ;; PyPI releases.
2251 (method hg-fetch)
2252 (uri (hg-reference
2253 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2254 (changeset version)))
2255 (file-name (string-append name "-" version "-checkout"))
2256 (sha256
2257 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2258 (build-system python-build-system)
2259 (arguments
2260 `(#:phases (modify-phases %standard-phases
2261 (replace 'check
2262 (lambda _
2263 (invoke "pytest"))))))
2264 (native-inputs
2265 ;; For the test suite.
2266 `(("python-lxml" ,python-lxml)
2267 ("python-pillow" ,python-pillow)
2268 ("python-pytest" ,python-pytest)))
2269 (propagated-inputs
2270 `(("python-et-xmlfile" ,python-et-xmlfile)
2271 ("python-jdcal" ,python-jdcal)))
2272 (home-page "https://openpyxl.readthedocs.io")
2273 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2274 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2275 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2276 standard.")
2277 (properties `((python2-variant . ,(delay python2-openpyxl))))
2278 (license license:expat)))
2279
2280 (define-public python2-openpyxl
2281 (let ((base (package-with-python2
2282 (strip-python2-variant python-openpyxl))))
2283 (package
2284 (inherit base)
2285 ;; This is the latest version that has python2 support
2286 (version "2.6.4")
2287 (source
2288 (origin
2289 (method url-fetch)
2290 (uri (pypi-uri "openpyxl" version))
2291 (sha256
2292 (base32
2293 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2294 (arguments '(#:tests? #f))))) ; No test suite.
2295
2296 (define-public python-eventlet
2297 (package
2298 (name "python-eventlet")
2299 (version "0.25.1")
2300 (source
2301 (origin
2302 (method url-fetch)
2303 (uri (pypi-uri "eventlet" version))
2304 (sha256
2305 (base32
2306 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2307 (build-system python-build-system)
2308 (propagated-inputs
2309 `(("python-dnspython" ,python-dnspython)
2310 ("python-greenlet" ,python-greenlet)
2311 ("python-monotonic" ,python-monotonic)))
2312 (arguments
2313 ;; TODO: Requires unpackaged 'enum-compat'.
2314 '(#:tests? #f))
2315 (home-page "https://eventlet.net")
2316 (synopsis "Concurrent networking library for Python")
2317 (description
2318 "Eventlet is a concurrent networking library for Python that
2319 allows you to change how you run your code, not how you write it.
2320 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2321 Coroutines ensure that the developer uses a blocking style of programming
2322 that is similar to threading, but provide the benefits of non-blocking I/O.
2323 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2324 from the Python interpreter, or as a small part of a larger application.")
2325 (license license:expat)))
2326
2327 (define-public python-sinfo
2328 (package
2329 (name "python-sinfo")
2330 (version "0.3.4")
2331 (source (origin
2332 (method url-fetch)
2333 (uri (pypi-uri "sinfo" version))
2334 (sha256
2335 (base32
2336 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2337 (build-system python-build-system)
2338 (propagated-inputs
2339 `(("python-stdlib-list" ,python-stdlib-list)))
2340 (home-page "https://gitlab.com/joelostblom/session_info")
2341 (synopsis "Output module version information loaded in a Python session")
2342 (description "This package outputs version information for modules loaded
2343 in the current session, Python, and the OS.")
2344 (license license:bsd-3)))
2345
2346 (define-public python-six
2347 (package
2348 (name "python-six")
2349 (version "1.15.0")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "six" version))
2354 (sha256
2355 (base32
2356 "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh"))))
2357 (build-system python-build-system)
2358 (arguments
2359 `(#:phases
2360 (modify-phases %standard-phases
2361 (replace 'check
2362 (lambda _
2363 (invoke "py.test" "-v"))))))
2364 (native-inputs
2365 `(("python-pytest" ,python-pytest-bootstrap)))
2366 (home-page "https://pypi.org/project/six/")
2367 (synopsis "Python 2 and 3 compatibility utilities")
2368 (description
2369 "Six is a Python 2 and 3 compatibility library. It provides utility
2370 functions for smoothing over the differences between the Python versions with
2371 the goal of writing Python code that is compatible on both Python versions.
2372 Six supports every Python version since 2.5. It is contained in only one
2373 Python file, so it can be easily copied into your project.")
2374 (license license:x11)))
2375
2376 (define-public python2-six
2377 (package-with-python2 python-six))
2378
2379 (define-public python-six-bootstrap
2380 (package
2381 (inherit python-six)
2382 (name "python-six-bootstrap")
2383 (native-inputs `())
2384 (arguments `(#:tests? #f))))
2385
2386 (define-public python2-six-bootstrap
2387 (package-with-python2 python-six-bootstrap))
2388
2389 (define-public python-schedule
2390 (package
2391 (name "python-schedule")
2392 (version "0.4.3")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "schedule" version))
2397 (sha256
2398 (base32
2399 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2400 (build-system python-build-system)
2401 (native-inputs
2402 `(("python-pytest" ,python-pytest)
2403 ("python-mock" ,python-mock)))
2404 (home-page "https://github.com/dbader/schedule")
2405 (synopsis "Schedule periodic function calls in Python")
2406 (description
2407 "Schedule is an in-process scheduler for periodic jobs that uses the
2408 builder pattern for configuration. Schedule lets you run Python functions (or
2409 any other callable) periodically at pre-determined intervals using a simple,
2410 human-friendly syntax.")
2411 (license license:expat)))
2412
2413 (define-public python2-schedule
2414 (package-with-python2 python-schedule))
2415
2416 (define-public python-scour
2417 (package
2418 (name "python-scour")
2419 (version "0.38.2")
2420 (source
2421 (origin
2422 (method git-fetch)
2423 (uri
2424 (git-reference
2425 (url "https://github.com/scour-project/scour")
2426 (commit
2427 (string-append "v" version))))
2428 (file-name (git-file-name name version))
2429 (sha256
2430 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2431 (propagated-inputs
2432 `(("python-six" ,python-six)))
2433 (build-system python-build-system)
2434 (home-page "https://github.com/scour-project/scour")
2435 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2436 (description "The goal of Scour is to output a file that renders
2437 identically at a fraction of the size by removing a lot of redundant
2438 information created by most SVG editors. Optimization options are typically
2439 lossless but can be tweaked for more aggressive cleaning.")
2440 (license license:asl2.0)))
2441
2442 (define-public python-mechanize
2443 (package
2444 (name "python-mechanize")
2445 (version "0.4.5")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "mechanize" version))
2450 (sha256
2451 (base32
2452 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2453 (build-system python-build-system)
2454 (propagated-inputs
2455 `(("python-html5lib" ,python-html5lib)))
2456 (home-page "https://github.com/python-mechanize/mechanize")
2457 (synopsis
2458 "Stateful programmatic web browsing in Python")
2459 (description
2460 "Mechanize implements stateful programmatic web browsing in Python,
2461 after Andy Lester’s Perl module WWW::Mechanize.")
2462 (license license:bsd-3)))
2463
2464 (define-public python2-mechanize
2465 (package-with-python2 python-mechanize))
2466
2467 (define-public python-simpleaudio
2468 (package
2469 (name "python-simpleaudio")
2470 (version "1.0.4")
2471 (source
2472 (origin
2473 (method url-fetch)
2474 (uri (pypi-uri "simpleaudio" version))
2475 (sha256
2476 (base32
2477 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2478 (build-system python-build-system)
2479 (arguments
2480 `(#:tests? #f))
2481 (inputs
2482 `(("alsa-lib" ,alsa-lib)))
2483 (home-page
2484 "https://github.com/hamiltron/py-simple-audio")
2485 (synopsis "Simple, asynchronous audio playback for Python 3")
2486 (description
2487 "The @code{simplaudio} package provides cross-platform, dependency-free
2488 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2489 (license license:expat))) ; MIT license
2490
2491 (define-public python-simplejson
2492 (package
2493 (name "python-simplejson")
2494 (version "3.17.2")
2495 (source
2496 (origin
2497 (method url-fetch)
2498 (uri (pypi-uri "simplejson" version))
2499 (sha256
2500 (base32
2501 "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
2502 (build-system python-build-system)
2503 (native-inputs
2504 `(("python-toml" ,python-toml)))
2505 (home-page "https://simplejson.readthedocs.io/en/latest")
2506 (synopsis
2507 "Json library for Python")
2508 (description
2509 "JSON (JavaScript Object Notation) is a subset of JavaScript
2510 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2511 format.
2512
2513 Simplejson exposes an API familiar to users of the standard library marshal
2514 and pickle modules. It is the externally maintained version of the json
2515 library contained in Python 2.6, but maintains compatibility with Python 2.5
2516 and (currently) has significant performance advantages, even without using
2517 the optional C extension for speedups. Simplejson is also supported on
2518 Python 3.3+.")
2519 (license license:x11)))
2520
2521 (define-public python2-simplejson
2522 (package-with-python2 python-simplejson))
2523
2524
2525 (define-public python-pyicu
2526 (package
2527 (name "python-pyicu")
2528 (version "2.7.4")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "PyICU" version))
2533 (sha256
2534 (base32
2535 "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
2536 (build-system python-build-system)
2537 (inputs
2538 `(("icu4c" ,icu4c)))
2539 (native-inputs
2540 `(("python-pytest" ,python-pytest)
2541 ("python-six" ,python-six)))
2542 (home-page "https://github.com/ovalhub/pyicu")
2543 (synopsis "Python extension wrapping the ICU C++ API")
2544 (description
2545 "PyICU is a python extension wrapping the ICU C++ API.")
2546 (license license:x11)))
2547
2548 (define-public python2-pyicu
2549 (package-with-python2 python-pyicu))
2550
2551 (define-public python-dogtail
2552 (package
2553 (name "python-dogtail")
2554 (version "0.9.11")
2555 (source (origin
2556 (method url-fetch)
2557 (uri
2558 (string-append
2559 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2560 "dogtail-" version ".tar.gz"))
2561 (sha256
2562 (base32
2563 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2564 (build-system python-build-system)
2565 (arguments
2566 `(#:tests? #f ; TODO Launching dbus for the tests
2567 ; fails
2568 #:phases
2569 (modify-phases %standard-phases
2570 (replace 'check
2571 (lambda* (#:key tests? #:allow-other-keys)
2572 (when tests?
2573 (system "Xvfb :1 &")
2574 (setenv "DISPLAY" ":1")
2575 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2576 #t)))))
2577 (propagated-inputs
2578 `(("python-pygobject" ,python-pygobject)
2579 ("python-pycairo" ,python-pycairo)
2580 ("python-pyatspi" ,python-pyatspi)))
2581 (native-inputs
2582 `(("python-nose" ,python-nose)
2583 ("gtk+" ,gtk+)
2584 ("xvfb" ,xorg-server)
2585 ("dbus" ,dbus)
2586 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2587 ("gobject-introspection" ,gobject-introspection)))
2588 (home-page "https://gitlab.com/dogtail/dogtail/")
2589 (synopsis "GUI test tool and automation framework written in Python")
2590 (description
2591 "Dogtail is a GUI test tool and automation framework written in Python.
2592 It uses Accessibility (a11y) technologies to communicate with desktop
2593 applications. dogtail scripts are written in Python and executed like any
2594 other Python program.")
2595 (license license:gpl2+)))
2596
2597 (define-public python2-dogtail
2598 (package-with-python2 python-dogtail))
2599
2600 (define-public python-empy
2601 (package
2602 (name "python-empy")
2603 (version "3.3.3")
2604 (source (origin
2605 (method url-fetch)
2606 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2607 version ".tar.gz"))
2608 (sha256
2609 (base32
2610 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2611 (build-system python-build-system)
2612 (arguments
2613 `(#:tests? #f)) ; python2 only
2614 (home-page "http://www.alcyone.com/software/empy/")
2615 (synopsis "Templating system for Python")
2616 (description
2617 "EmPy is a system for embedding Python expressions and statements in
2618 template text; it takes an EmPy source file, processes it, and produces
2619 output. This is accomplished via expansions, which are special signals to the
2620 EmPy system and are set off by a special prefix (by default the at sign, @@).
2621 EmPy can expand arbitrary Python expressions and statements in this way, as
2622 well as a variety of special forms. Textual data not explicitly delimited in
2623 this way is sent unaffected to the output, allowing Python to be used in
2624 effect as a markup language. Also supported are callbacks via hooks,
2625 recording and playback via diversions, and dynamic, chainable filters. The
2626 system is highly configurable via command line options and embedded
2627 commands.")
2628 (license license:lgpl2.1+)))
2629
2630 (define-public python2-empy
2631 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2632 (package/inherit base
2633 (arguments `(,@(package-arguments base)
2634 #:tests? #t)))))
2635
2636 (define-public python2-element-tree
2637 (package
2638 (name "python2-element-tree")
2639 (version "1.2.6")
2640 (source (origin
2641 (method url-fetch)
2642 (uri (string-append
2643 "http://effbot.org/media/downloads/elementtree-"
2644 version "-20050316.tar.gz"))
2645 (sha256
2646 (base32
2647 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2648 (build-system python-build-system)
2649 (arguments
2650 `(#:python ,python-2 ; seems to be part of Python 3
2651 #:tests? #f)) ; no 'test' sub-command
2652 (synopsis "Toolkit for XML processing in Python")
2653 (description
2654 "ElementTree is a Python library supporting lightweight XML processing.")
2655 (home-page "https://effbot.org/zone/element-index.htm")
2656 (license (license:x11-style
2657 "http://docs.python.org/2/license.html"
2658 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2659
2660 (define-public python2-pybugz
2661 (package
2662 (name "python2-pybugz")
2663 (version "0.6.11")
2664 (source (origin
2665 (method url-fetch)
2666 (uri (string-append
2667 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2668 version ".tar.gz"))
2669 (sha256
2670 (base32
2671 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2672 (patches (search-patches "pybugz-stty.patch"
2673 "pybugz-encode-error.patch"))))
2674 (build-system python-build-system)
2675 (arguments
2676 `(#:python ,python-2 ; SyntaxError with Python 3
2677 #:tests? #f)) ; no 'test' sub-command
2678 (propagated-inputs
2679 `(("element-tree" ,python2-element-tree)))
2680 (synopsis "Python and command-line interface to Bugzilla")
2681 (description
2682 "PyBugz is a Python library and command-line tool to query the Bugzilla
2683 bug tracking system. It is meant as an aid to speed up interaction with the
2684 bug tracker.")
2685 (home-page "http://www.liquidx.net/pybugz/")
2686 (license license:gpl2)))
2687
2688 (define-public python2-enum
2689 (package
2690 (name "python2-enum")
2691 (version "0.4.6")
2692 (source (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "enum" version))
2695 (sha256
2696 (base32
2697 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2698 (build-system python-build-system)
2699 (arguments
2700 `(#:python ,python-2))
2701 (home-page "https://pypi.org/project/enum/")
2702 (synopsis "Robust enumerated type support in Python")
2703 (description
2704 "This provides a module for robust enumerations in Python. It has
2705 been superseded by the Python standard library and is provided only for
2706 compatibility.")
2707 ;; Choice of either license.
2708 (license (list license:gpl3+ license:psfl))))
2709
2710 (define-public python-enum34
2711 (package
2712 (name "python-enum34")
2713 (version "1.1.6")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (pypi-uri "enum34" version))
2718 (sha256
2719 (base32
2720 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2721 (build-system python-build-system)
2722 (home-page "https://pypi.org/project/enum34/")
2723 (synopsis "Backported Python 3.4 Enum")
2724 (description
2725 "Enum34 is the new Python stdlib enum module available in Python 3.4
2726 backported for previous versions of Python from 2.4 to 3.3.")
2727 (license license:bsd-3)))
2728
2729 (define-public python2-enum34
2730 (package-with-python2 python-enum34))
2731
2732 (define-public python-parse-type
2733 (package
2734 (name "python-parse-type")
2735 (version "0.4.2")
2736 (source
2737 (origin
2738 (method url-fetch)
2739 (uri (pypi-uri "parse_type" version))
2740 (sha256
2741 (base32
2742 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2743 (build-system python-build-system)
2744 (propagated-inputs
2745 `(("python-six" ,python-six)
2746 ("python-parse" ,python-parse)))
2747 (native-inputs
2748 `(("python-pytest" ,python-pytest)
2749 ("python-pytest-runner" ,python-pytest-runner)))
2750 (home-page "https://github.com/jenisys/parse_type")
2751 (synopsis "Extended parse module")
2752 (description
2753 "Parse_type extends the python parse module.")
2754 (properties
2755 `((python2-variant . ,(delay python2-parse-type))))
2756 (license license:bsd-3)))
2757
2758 (define-public python2-parse-type
2759 (let ((base (package-with-python2
2760 (strip-python2-variant python-parse-type))))
2761 (package/inherit base
2762 (propagated-inputs
2763 `(("python2-enum34" ,python2-enum34)
2764 ,@(package-propagated-inputs base))))))
2765
2766 (define-public python-parse
2767 (package
2768 (name "python-parse")
2769 (version "1.18.0")
2770 (source
2771 (origin
2772 (method url-fetch)
2773 (uri (pypi-uri "parse" version))
2774 (sha256
2775 (base32
2776 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2777 (build-system python-build-system)
2778 (arguments
2779 `(#:phases
2780 (modify-phases %standard-phases
2781 (replace 'check
2782 (lambda _ (invoke "python" "test_parse.py"))))))
2783 (home-page "https://github.com/r1chardj0n3s/parse")
2784 (synopsis "Parse strings")
2785 (description
2786 "Parse strings using a specification based on the Python @code{format()}
2787 syntax.")
2788 (license license:x11)))
2789
2790 (define-public python-polib
2791 (package
2792 (name "python-polib")
2793 (version "1.1.0")
2794 (source (origin
2795 (method url-fetch)
2796 (uri (pypi-uri "polib" version))
2797 (sha256
2798 (base32
2799 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2800 (build-system python-build-system)
2801 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2802 (synopsis "Manipulate, create and modify gettext files")
2803 (description "Polib can manipulate any gettext format (po, pot and mo)
2804 files. It can be used to create po files from scratch or to modify
2805 existing ones.")
2806 (license license:expat)))
2807
2808 (define-public python2-polib
2809 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2810 (package/inherit base
2811 (arguments `(,@(package-arguments base)
2812 ;; Tests don't work with python2.
2813 #:tests? #f)))))
2814
2815 (define-public python-poyo
2816 (package
2817 (name "python-poyo")
2818 (version "0.5.0")
2819 (source
2820 (origin
2821 (method url-fetch)
2822 (uri (pypi-uri "poyo" version))
2823 (sha256
2824 (base32
2825 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2826 (build-system python-build-system)
2827 (home-page "https://github.com/hackebrot/poyo")
2828 (synopsis "Lightweight YAML Parser for Python")
2829 (description
2830 "This package provides a lightweight YAML Parser for Python. It supports
2831 only a chosen subset of the YAML format that is required to parse cookiecutter
2832 user configuration files. It does not have support for serializing into YAML
2833 and is not compatible with JSON.")
2834 (license license:expat)))
2835
2836 (define-public scons
2837 (package
2838 (name "scons")
2839 (version "3.0.4")
2840 (source (origin
2841 (method git-fetch)
2842 (uri (git-reference
2843 (url "https://github.com/SCons/scons")
2844 (commit version)))
2845 (file-name (git-file-name name version))
2846 (sha256
2847 (base32
2848 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2849 (build-system python-build-system)
2850 (arguments
2851 `(#:use-setuptools? #f ; still relies on distutils
2852 #:tests? #f ; no 'python setup.py test' command
2853 #:phases
2854 (modify-phases %standard-phases
2855 (add-before 'build 'bootstrap
2856 (lambda _
2857 (substitute* "src/engine/SCons/compat/__init__.py"
2858 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2859 "sys.modules[new] = __import__(old)"))
2860 (substitute* "src/engine/SCons/Platform/__init__.py"
2861 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2862 "mod = __import__(full_name)"))
2863 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2864 (chdir "build/scons")
2865 #t)))))
2866 (home-page "https://scons.org/")
2867 (synopsis "Software construction tool written in Python")
2868 (description
2869 "SCons is a software construction tool. Think of SCons as an improved,
2870 cross-platform substitute for the classic Make utility with integrated
2871 functionality similar to autoconf/automake and compiler caches such as ccache.
2872 In short, SCons is an easier, more reliable and faster way to build
2873 software.")
2874 (license license:x11)))
2875
2876 (define-public scons-python2
2877 (package
2878 (inherit (package-with-python2 scons))
2879 (name "scons-python2")))
2880
2881 (define-public python-extension-helpers
2882 (package
2883 (name "python-extension-helpers")
2884 (version "0.1")
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (pypi-uri "extension-helpers" version))
2889 (sha256
2890 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2891 (build-system python-build-system)
2892 (native-inputs
2893 `(("coverage" ,python-coverage)
2894 ("pytest" ,python-pytest-astropy)
2895 ("pytest-cov" ,python-pytest-cov)
2896 ("setuptools-scm" ,python-setuptools-scm)))
2897 (home-page "https://github.com/astropy/astropy-helpers")
2898 (synopsis
2899 "Utilities for building and installing packages in the Astropy ecosystem")
2900 (description
2901 "The extension-helpers package includes many build, installation, and
2902 documentation-related tools used by the Astropy project.")
2903 (license license:bsd-3)))
2904
2905 (define-public python-extras
2906 (package
2907 (name "python-extras")
2908 (version "1.0.0")
2909 (source
2910 (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "extras" version))
2913 (sha256
2914 (base32
2915 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2916 (build-system python-build-system)
2917 (arguments
2918 ;; FIXME: Circular dependency on testtools.
2919 '(#:tests? #f))
2920 (home-page "https://github.com/testing-cabal/extras")
2921 (synopsis "Useful extensions to the Python standard library")
2922 (description
2923 "Extras is a set of extensions to the Python standard library.")
2924 (license license:expat)))
2925
2926 (define-public python2-extras
2927 (package-with-python2 python-extras))
2928
2929 (define-public python-mimeparse
2930 (package
2931 (name "python-mimeparse")
2932 (version "1.6.0")
2933 (source
2934 (origin
2935 (method url-fetch)
2936 (uri (pypi-uri "python-mimeparse" version))
2937 (sha256
2938 (base32
2939 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2940 (build-system python-build-system)
2941 (arguments
2942 '(#:phases
2943 (modify-phases %standard-phases
2944 (replace 'check
2945 (lambda _
2946 (invoke "./mimeparse_test.py"))))))
2947 (home-page
2948 "https://github.com/dbtsai/python-mimeparse")
2949 (synopsis "Python library for parsing MIME types")
2950 (description
2951 "Mimeparse provides basic functions for parsing MIME type names and
2952 matching them against a list of media-ranges.")
2953 (license license:expat)))
2954
2955 (define-public python2-mimeparse
2956 (package-with-python2 python-mimeparse))
2957
2958 (define-public python-miniboa
2959 (package
2960 (name "python-miniboa")
2961 (version "1.0.8")
2962 (source
2963 (origin
2964 (method url-fetch)
2965 (uri (pypi-uri "miniboa" version))
2966 (sha256
2967 (base32
2968 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
2969 (build-system python-build-system)
2970 (home-page "https://github.com/shmup/miniboa")
2971 (synopsis "Simple, single-threaded Telnet server")
2972 (description
2973 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2974 server.")
2975 (license license:asl2.0)))
2976
2977 (define-public python2-miniboa
2978 (package-with-python2 python-miniboa))
2979
2980 (define-public python-pafy
2981 (package
2982 (name "python-pafy")
2983 (version "0.5.3.1")
2984 (source
2985 (origin
2986 (method url-fetch)
2987 (uri (pypi-uri "pafy" version))
2988 (sha256
2989 (base32
2990 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2991 (build-system python-build-system)
2992 (arguments
2993 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2994 (propagated-inputs
2995 ;; Youtube-dl is a python package which is imported in the file
2996 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2997 `(("youtube-dl" ,youtube-dl)))
2998 (home-page "https://np1.github.io/pafy/")
2999 (synopsis "Retrieve YouTube content and metadata")
3000 (description
3001 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
3002 (license license:lgpl3+)))
3003
3004 (define-public python2-funcsigs
3005 (package
3006 (name "python2-funcsigs")
3007 (version "1.0.2")
3008 (source (origin
3009 (method url-fetch)
3010 (uri (pypi-uri "funcsigs" version))
3011 (sha256
3012 (base32
3013 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
3014 (build-system python-build-system)
3015 (arguments
3016 `(#:python ,python-2))
3017 (native-inputs
3018 `(("python2-unittest2" ,python2-unittest2)))
3019 (home-page "http://funcsigs.readthedocs.org")
3020 (synopsis "Python function signatures from PEP362")
3021 (description
3022 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
3023 (license license:asl2.0)))
3024
3025 (define-public python2-funcsigs-bootstrap
3026 (package
3027 (inherit python2-funcsigs)
3028 (name "python2-funcsigs-bootstrap")
3029 (native-inputs `())
3030 (arguments
3031 `(#:tests? #f
3032 ,@(package-arguments python2-funcsigs)))))
3033
3034 (define-public python-py
3035 (package
3036 (name "python-py")
3037 (version "1.10.0")
3038 (source
3039 (origin
3040 (method url-fetch)
3041 (uri (pypi-uri "py" version))
3042 (sha256
3043 (base32
3044 "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
3045 (build-system python-build-system)
3046 (arguments
3047 ;; FIXME: "ImportError: 'test' module incorrectly imported from
3048 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
3049 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
3050 ;; Is this module globally installed?"
3051 '(#:tests? #f))
3052 (native-inputs
3053 `(("python-setuptools-scm" ,python-setuptools-scm)))
3054 (home-page "https://github.com/pytest-dev/py")
3055 (synopsis "Python library for parsing, I/O, instrospection, and logging")
3056 (description
3057 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3058 code introspection, and logging.")
3059 (license license:expat)))
3060
3061 (define-public python2-py
3062 (package-with-python2 python-py))
3063
3064 ;; Recent versions of python-fixtures and python-testrepository need
3065 ;; python-pbr for packaging, which itself needs these two packages for
3066 ;; testing.
3067 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3068 ;; same source, just without any test dependencies and with tests disabled.
3069 ;; python-pbr-minmal is then used to package python-fixtures and
3070 ;; python-testrepository.
3071 ;; Strictly speaking we currently could remove the test-requirements from the
3072 ;; normal python-pbr package (and save this package) since test are disabled
3073 ;; there anyway. But this may change in future.
3074 (define-public python-pbr-minimal
3075 (package
3076 (name "python-pbr-minimal")
3077 (version "3.0.1")
3078 (source
3079 (origin
3080 (method url-fetch)
3081 (uri (pypi-uri "pbr" version))
3082 (sha256
3083 (base32
3084 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
3085 (build-system python-build-system)
3086 (arguments
3087 `(#:tests? #f))
3088 (home-page "https://docs.openstack.org/pbr/latest/")
3089 (synopsis "Minimal build of python-pbr used for bootstrapping")
3090 (description
3091 "Used only for bootstrapping python2-pbr, you should not need this.")
3092 (license license:asl2.0)))
3093
3094 (define-public python-pbr
3095 (package
3096 (inherit python-pbr-minimal)
3097 (name "python-pbr")
3098 (arguments
3099 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3100 (propagated-inputs
3101 `(("git" ,git))) ;; pbr actually uses the "git" binary.
3102 (native-inputs
3103 `(("python-fixtures" ,python-fixtures-bootstrap)
3104 ;; discover, coverage, hacking, subunit
3105 ("python-mock" ,python-mock)
3106 ("python-six" ,python-six)
3107 ("python-sphinx" ,python-sphinx)
3108 ("python-testrepository" ,python-testrepository-bootstrap)
3109 ("python-testresources" ,python-testresources-bootstrap)
3110 ("python-testscenarios" ,python-testscenarios-bootstrap)
3111 ("python-testtools" ,python-testtools-bootstrap)
3112 ("python-virtualenv" ,python-virtualenv)))
3113 (synopsis "Enhance the default behavior of Python’s setuptools")
3114 (description
3115 "Python Build Reasonableness (PBR) is a library that injects some useful
3116 and sensible default behaviors into your setuptools run. It will set
3117 versions, process requirements files and generate AUTHORS and ChangeLog file
3118 from git information.
3119 ")))
3120
3121 (define-public python-pyrsistent
3122 (package
3123 (name "python-pyrsistent")
3124 (version "0.16.0")
3125 (home-page "https://github.com/tobgu/pyrsistent")
3126 (source (origin
3127 (method url-fetch)
3128 (uri (pypi-uri "pyrsistent" version))
3129 (sha256
3130 (base32
3131 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3132 (build-system python-build-system)
3133 (arguments
3134 '(#:phases (modify-phases %standard-phases
3135 ;; The package works fine with newer Pytest and Hypothesis, but
3136 ;; has pinned older versions to stay compatible with Python 2.
3137 (add-before 'check 'loosen-pytest-requirement
3138 (lambda _
3139 (substitute* "setup.py"
3140 (("pytest<5") "pytest")
3141 (("hypothesis<5") "hypothesis"))
3142 #t)))))
3143 (native-inputs
3144 `(("python-hypothesis" ,python-hypothesis)
3145 ("python-pytest" ,python-pytest)
3146 ("python-pytest-runner" ,python-pytest-runner)))
3147 (propagated-inputs
3148 `(("python-six" ,python-six)))
3149 (synopsis "Persistent data structures for Python")
3150 (description
3151 "Pyrsistent is a number of persistent collections (by some referred to as
3152 functional data structures). Persistent in the sense that they are immutable.
3153
3154 All methods on a data structure that would normally mutate it instead return a
3155 new copy of the structure containing the requested updates. The original
3156 structure is left untouched.")
3157 (license license:expat)))
3158
3159 (define-public python2-pyrsistent
3160 (package-with-python2 python-pyrsistent))
3161
3162 (define-public python-exif-read
3163 (package
3164 (name "python-exif-read")
3165 (version "2.1.2")
3166 (source (origin
3167 (method url-fetch)
3168 (uri (pypi-uri "ExifRead" version))
3169 (sha256
3170 (base32
3171 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3172 (build-system python-build-system)
3173 (arguments `(#:tests? #f)) ; no tests
3174 (home-page "https://github.com/ianare/exif-py")
3175 (synopsis "Python library to extract EXIF data from image files")
3176 (description
3177 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3178 files.")
3179 (license license:bsd-3)))
3180
3181 (define-public python2-exif-read
3182 (package-with-python2 python-exif-read))
3183
3184 (define-public python-pyld
3185 (package
3186 (name "python-pyld")
3187 (version "1.0.5")
3188 (source (origin
3189 (method url-fetch)
3190 (uri (pypi-uri "PyLD" version))
3191 (sha256
3192 (base32
3193 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3194 (build-system python-build-system)
3195 (home-page "https://github.com/digitalbazaar/pyld")
3196 (synopsis "Python implementation of the JSON-LD specification")
3197 (description
3198 "PyLD is an implementation of the JSON-LD specification.")
3199 (license license:bsd-3)))
3200
3201 (define-public python2-pyld
3202 (package-with-python2 python-pyld))
3203
3204 (define-public python-cli-helpers
3205 (package
3206 (name "python-cli-helpers")
3207 (version "2.0.1")
3208 (source
3209 (origin
3210 ;; There's no source tarball on PyPI.
3211 (method git-fetch)
3212 (uri (git-reference
3213 (url "https://github.com/dbcli/cli_helpers")
3214 (commit (string-append "v" version))))
3215 (file-name (git-file-name name version))
3216 (sha256
3217 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3218 (build-system python-build-system)
3219 (native-inputs
3220 `(("python-pytest" ,python-pytest)))
3221 (propagated-inputs
3222 `(("python-wcwidth" ,python-wcwidth)
3223 ("python-configobj" ,python-configobj)
3224 ("python-tabulate" ,python-tabulate)
3225 ("python-terminaltables" ,python-terminaltables)))
3226 (home-page "https://github.com/dbcli/cli_helpers")
3227 (synopsis "Helpers for building command-line apps")
3228 (description
3229 "CLI Helpers is a Python package that makes it easy to perform common
3230 tasks when building command-line apps. It's a helper library for command-line
3231 interfaces.")
3232 (license license:bsd-3)))
3233
3234 (define-public python-click
3235 (package
3236 (name "python-click")
3237 (version "7.1.2")
3238 (source
3239 (origin
3240 (method url-fetch)
3241 (uri (pypi-uri "click" version))
3242 (sha256
3243 (base32
3244 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3245 (build-system python-build-system)
3246 (arguments
3247 `(#:phases
3248 (modify-phases %standard-phases
3249 (add-after 'unpack 'fix-paths
3250 (lambda* (#:key inputs #:allow-other-keys)
3251 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3252 "cross-libc" "libc"))))
3253 (substitute* "src/click/_unicodefun.py"
3254 (("'locale'")
3255 (string-append "'" glibc "/bin/locale'"))))))
3256 (replace 'check
3257 (lambda _
3258 (invoke "python" "-m" "pytest"))))))
3259 (native-inputs
3260 `(("python-pytest" ,python-pytest)))
3261 (home-page "https://palletsprojects.com/p/click/")
3262 (synopsis "Command line library for Python")
3263 (description
3264 "Click is a Python package for creating command line interfaces in a
3265 composable way with as little code as necessary. Its name stands for
3266 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3267 with sensible defaults out of the box.")
3268 (license license:bsd-3)))
3269
3270 (define-public python2-click
3271 (package-with-python2 python-click))
3272
3273 (define-public python-click-5
3274 (package (inherit python-click)
3275 (name "python-click")
3276 (version "5.1")
3277 (source
3278 (origin
3279 (method url-fetch)
3280 (uri (pypi-uri "click" version))
3281 (sha256
3282 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3283 (arguments `())))
3284
3285 (define-public python-vcversioner
3286 (package
3287 (name "python-vcversioner")
3288 (version "2.16.0.0")
3289 (source
3290 (origin
3291 (method url-fetch)
3292 (uri (pypi-uri "vcversioner" version))
3293 (sha256
3294 (base32
3295 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3296 (build-system python-build-system)
3297 (synopsis "Python library for version number discovery")
3298 (description "Vcversioner is a Python library that inspects tagging
3299 information in a variety of version control systems in order to discover
3300 version numbers.")
3301 (home-page "https://github.com/habnabit/vcversioner")
3302 (license license:isc)))
3303
3304 (define-public python2-vcversioner
3305 (package-with-python2 python-vcversioner))
3306
3307 (define-public python-jdcal
3308 (package
3309 (name "python-jdcal")
3310 (version "1.4")
3311 (source
3312 (origin
3313 (method url-fetch)
3314 (uri (pypi-uri "jdcal" version))
3315 (sha256
3316 (base32
3317 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3318 (build-system python-build-system)
3319 (arguments
3320 `(#:phases (modify-phases %standard-phases
3321 (replace 'check
3322 (lambda _
3323 (invoke "pytest"))))))
3324 (native-inputs
3325 `(("python-pytest" ,python-pytest)))
3326 (home-page "https://github.com/phn/jdcal")
3327 (synopsis "Functions to convert between Julian dates Gregorian dates")
3328 (description "This Python library provides functions for converting
3329 between Julian dates and Gregorian dates.")
3330 (license license:bsd-2)))
3331
3332 (define-public python2-jdcal
3333 (package-with-python2 python-jdcal))
3334
3335 (define-public python-jsondiff
3336 (package
3337 (name "python-jsondiff")
3338 (version "1.2.0")
3339 (source
3340 (origin
3341 (method url-fetch)
3342 (uri (pypi-uri "jsondiff" version))
3343 (sha256
3344 (base32
3345 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3346 (build-system python-build-system)
3347 (native-inputs
3348 `(("python-nose" ,python-nose)
3349 ("python-nose-random" ,python-nose-random)))
3350 (home-page
3351 "https://github.com/fzumstein/jsondiff")
3352 (synopsis "Compare JSON and JSON-like structures in Python")
3353 (description "@code{jsondiff} is a Python library which lets you
3354 compare, diff, and patch JSON and JSON-like structures in Python.")
3355 (license license:expat)))
3356
3357 (define-public python-jsonschema
3358 (package
3359 (name "python-jsonschema")
3360 (version "3.2.0")
3361 (source (origin
3362 (method url-fetch)
3363 (uri (pypi-uri "jsonschema" version))
3364 (sha256
3365 (base32
3366 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3367 (build-system python-build-system)
3368 (arguments
3369 '(#:phases
3370 (modify-phases %standard-phases
3371 (replace 'check
3372 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3373 (when tests?
3374 (setenv "JSON_SCHEMA_TEST_SUITE" "json")
3375 (invoke "trial" "jsonschema")))))))
3376 (native-inputs
3377 `(("python-setuptools_scm" ,python-setuptools-scm)
3378 ("python-twisted" ,python-twisted)))
3379 (propagated-inputs
3380 `(("python-attrs" ,python-attrs)
3381 ("python-pyrsistent" ,python-pyrsistent)
3382 ("python-six" ,python-six)))
3383 (home-page "https://github.com/Julian/jsonschema")
3384 (synopsis "Implementation of JSON Schema for Python")
3385 (description
3386 "Jsonschema is an implementation of JSON Schema for Python.")
3387 (license license:expat)
3388 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3389
3390 (define-public python2-jsonschema
3391 (let ((jsonschema (package-with-python2
3392 (strip-python2-variant python-jsonschema))))
3393 (package/inherit jsonschema
3394 (propagated-inputs
3395 `(("python2-functools32" ,python2-functools32)
3396 ("python2-importlib-metadata" ,python2-importlib-metadata)
3397 ,@(package-propagated-inputs jsonschema))))))
3398
3399 (define-public python-schema
3400 (package
3401 (name "python-schema")
3402 (version "0.6.6")
3403 (source
3404 (origin
3405 (method url-fetch)
3406 (uri (pypi-uri "schema" version))
3407 (sha256
3408 (base32
3409 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3410 (build-system python-build-system)
3411 (native-inputs
3412 `(("python-pytest" ,python-pytest)))
3413 (home-page "https://github.com/keleshev/schema")
3414 (synopsis "Simple data validation library")
3415 (description
3416 "@code{python-schema} is a library for validating Python data
3417 structures, such as those obtained from config-files, forms, external
3418 services or command-line parsing, converted from JSON/YAML (or
3419 something else) to Python data-types.")
3420 (license license:psfl)))
3421
3422 (define-public python2-schema
3423 (package-with-python2 python-schema))
3424
3425 (define-public python-schema-0.5
3426 (package (inherit python-schema)
3427 (version "0.5.0")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "schema" version))
3432 (sha256
3433 (base32
3434 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3435
3436 (define-public python2-schema-0.5
3437 (package-with-python2 python-schema-0.5))
3438
3439 (define-public python-kitchen
3440 (package
3441 (name "python-kitchen")
3442 (version "1.2.5")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (pypi-uri "kitchen" version))
3447 (sha256
3448 (base32
3449 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3450 (build-system python-build-system)
3451 (propagated-inputs
3452 `(("python-chardet" ,python-chardet)))
3453 (home-page "https://github.com/fedora-infra/kitchen")
3454 (synopsis "Python API for snippets")
3455 (description "@code{kitchen} module provides a python API for all sorts of
3456 little useful snippets of code that everybody ends up writing for their projects
3457 but never seem big enough to build an independent release. Use kitchen and stop
3458 cutting and pasting that code over and over.")
3459 (license (list license:lgpl2.1+
3460 ;; subprocess.py, test_subprocess.py,
3461 ;; kitchen/pycompat25/defaultdict.py:
3462 license:psfl))))
3463
3464 (define-public python2-kitchen
3465 (package-with-python2 python-kitchen))
3466
3467 (define-public python-roman
3468 (package
3469 (name "python-roman")
3470 (version "3.3")
3471 (source
3472 (origin
3473 (method url-fetch)
3474 (uri (pypi-uri "roman" version))
3475 (sha256
3476 (base32
3477 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3478 (build-system python-build-system)
3479 (home-page "https://github.com/zopefoundation/roman")
3480 (synopsis "Integer to Roman numerals converter")
3481 (description
3482 "This package provides a small helper library to convert Arabic Numbers
3483 to Roman Numerals.")
3484 (license license:psfl)))
3485
3486 (define-public python-unidecode
3487 (package
3488 (name "python-unidecode")
3489 (version "1.1.1")
3490 (source (origin
3491 (method url-fetch)
3492 (uri (pypi-uri "Unidecode" version))
3493 (sha256
3494 (base32
3495 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3496 (build-system python-build-system)
3497 (home-page "https://pypi.org/project/Unidecode/")
3498 (synopsis "ASCII transliterations of Unicode text")
3499 (description
3500 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3501 useful when integrating with legacy code that doesn't support Unicode, or for
3502 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3503 machine identifiers from human-readable Unicode strings that should still be
3504 somewhat intelligible.")
3505 (license license:gpl2+)))
3506
3507 (define-public python2-unidecode
3508 (package-with-python2 python-unidecode))
3509
3510 (define-public python-text-unidecode
3511 (package
3512 (name "python-text-unidecode")
3513 (version "1.3")
3514 (source (origin
3515 (method url-fetch)
3516 (uri (pypi-uri "text-unidecode" version))
3517 (sha256
3518 (base32
3519 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3520 (build-system python-build-system)
3521 (arguments
3522 '(#:phases (modify-phases %standard-phases
3523 (replace 'check
3524 (lambda _
3525 (invoke "pytest" "-vv"))))))
3526 (native-inputs
3527 `(("python-pytest" ,python-pytest)))
3528 (home-page "https://github.com/kmike/text-unidecode/")
3529 (synopsis "Decode Unicode data")
3530 (description
3531 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3532 Perl library. It can create ASCII representations of Unicode data. In general
3533 users should prefer the @code{python-unidecode} package which offers better
3534 memory usage and transliteration quality.")
3535 ;; The user can choose either license.
3536 (license (list license:clarified-artistic license:gpl2+))))
3537
3538 (define-public python2-text-unidecode
3539 (package-with-python2 python-text-unidecode))
3540
3541 (define-public python-pyjwt
3542 (package
3543 (name "python-pyjwt")
3544 (version "1.7.1")
3545 (source
3546 (origin
3547 (method url-fetch)
3548 (uri (pypi-uri "PyJWT" version))
3549 (sha256
3550 (base32
3551 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3552 (modules '((guix build utils)))
3553 (snippet
3554 '(begin
3555 (for-each delete-file-recursively
3556 (find-files "." "\\.pyc$"))
3557 #t))))
3558 (build-system python-build-system)
3559 (arguments
3560 '(#:phases (modify-phases %standard-phases
3561 (replace 'check
3562 (lambda _
3563 ;; Mimic upstream commit 3a20892442b34c7 to get
3564 ;; rid of dependency on pytest-runner < 5.0.
3565 ;; Remove substitution for PyJWT > 1.7.1.
3566 (substitute* "setup.py"
3567 ((".*pytest-runner.*")
3568 ""))
3569 (invoke "pytest" "-vv"))))))
3570 (native-inputs
3571 `(("python-pytest" ,python-pytest)
3572 ("python-pytest-cov" ,python-pytest-cov)))
3573 (home-page "https://github.com/progrium/pyjwt")
3574 (synopsis "JSON Web Token implementation in Python")
3575 (description
3576 "PyJWT is a JSON Web Token implementation written in Python.")
3577 (license license:expat)))
3578
3579 (define-public python2-pyjwt
3580 (package-with-python2 python-pyjwt))
3581
3582 (define-public python-pymsgbox
3583 (package
3584 (name "python-pymsgbox")
3585 (version "1.0.6")
3586 (source
3587 (origin
3588 (method git-fetch)
3589 (uri (git-reference
3590 ;; LICENSE.txt is not present on pypi
3591 (url "https://github.com/asweigart/PyMsgBox")
3592 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3593 (file-name (git-file-name name version))
3594 (sha256
3595 (base32
3596 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3597 (arguments
3598 ;; Circular dependency to run tests:
3599 ;; Tests need pyautogui, which depends on pymsgbox.
3600 '(#:tests? #f))
3601 (build-system python-build-system)
3602 (home-page "https://github.com/asweigart/PyMsgBox")
3603 (synopsis "Python module for JavaScript-like message boxes")
3604 (description
3605 "PyMsgBox is a simple, cross-platform, pure Python module for
3606 JavaScript-like message boxes. Types of dialog boxes include:
3607 @enumerate
3608 @item alert
3609 @item confirm
3610 @item prompt
3611 @item password
3612 @end enumerate
3613 ")
3614 (license license:bsd-3)))
3615
3616 (define-public python-pympler
3617 (package
3618 (name "python-pympler")
3619 (home-page "https://pythonhosted.org/Pympler/")
3620 (version "0.9")
3621 (source (origin
3622 (method url-fetch)
3623 (uri (pypi-uri "Pympler" version))
3624 (sha256
3625 (base32
3626 "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
3627 (build-system python-build-system)
3628 (arguments
3629 `(#:phases (modify-phases %standard-phases
3630 (delete 'check)
3631 (add-after 'install 'check
3632 (lambda* (#:key inputs outputs #:allow-other-keys)
3633 (add-installed-pythonpath inputs outputs)
3634 (invoke "python" "setup.py" "test"))))))
3635 (synopsis "Measure, monitor and analyze memory behavior")
3636 (description
3637 "Pympler is a development tool to measure, monitor and analyze
3638 the memory behavior of Python objects in a running Python application.
3639
3640 By pympling a Python application, detailed insight in the size and the
3641 lifetime of Python objects can be obtained. Undesirable or unexpected
3642 runtime behavior like memory bloat and other @samp{pymples} can easily
3643 be identified.
3644
3645 A web profiling frontend exposes process statistics, garbage
3646 visualisation and class tracker statistics.")
3647 (license license:asl2.0)))
3648
3649 (define-public python2-pympler
3650 (package-with-python2 python-pympler))
3651
3652 (define-public python-itsdangerous
3653 (package
3654 (name "python-itsdangerous")
3655 (version "2.0.1")
3656 (source
3657 (origin
3658 (method url-fetch)
3659 (uri (pypi-uri "itsdangerous" version))
3660 (sha256
3661 (base32
3662 "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
3663 (build-system python-build-system)
3664 (home-page "https://palletsprojects.com/p/itsdangerous/")
3665 (synopsis "Python library for passing data to/from untrusted environments")
3666 (description
3667 "Itsdangerous provides various helpers to pass trusted data to untrusted
3668 environments and back.")
3669 (license license:bsd-3)))
3670
3671 (define-public python2-itsdangerous
3672 (package-with-python2 python-itsdangerous))
3673
3674 (define-public python-pyyaml
3675 (package
3676 (name "python-pyyaml")
3677 (version "5.4.1")
3678 (source
3679 (origin
3680 (method url-fetch)
3681 (uri (pypi-uri "PyYAML" version))
3682 (sha256
3683 (base32
3684 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3685 (build-system python-build-system)
3686 (inputs
3687 `(("libyaml" ,libyaml)
3688 ("python-cython" ,python-cython)))
3689 (home-page "https://pyyaml.org")
3690 (synopsis "YAML parser and emitter for Python")
3691 (description
3692 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3693 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3694 API, and sensible error messages. PyYAML supports standard YAML tags and
3695 provides Python-specific tags that represent an arbitrary Python object.")
3696 (license license:expat)))
3697
3698 (define-public python2-pyyaml
3699 (package-with-python2 python-pyyaml))
3700
3701 (define-public python-vine
3702 (package
3703 (name "python-vine")
3704 (version "1.1.4")
3705 (source
3706 (origin
3707 (method url-fetch)
3708 (uri (pypi-uri "vine" version))
3709 (sha256
3710 (base32
3711 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3712 (build-system python-build-system)
3713 (native-inputs
3714 `(("python-pytest" ,python-pytest)
3715 ("python-case" ,python-case)))
3716 (home-page "https://github.com/celery/vine")
3717 (synopsis "Promises for Python")
3718 (description
3719 "@code{vine} provides a special implementation of promises in that it can
3720 be used both for \"promise of a value\" and lazy evaluation. The biggest
3721 upside for this is that everything in a promise can also be a promise,
3722 e.g. filters, callbacks and errbacks can all be promises.")
3723 (license license:bsd-3)))
3724
3725 (define-public python-virtualenv
3726 (package
3727 (name "python-virtualenv")
3728 (version "20.3.1")
3729 (source
3730 (origin
3731 (method url-fetch)
3732 (uri (pypi-uri "virtualenv" version))
3733 (sha256
3734 (base32
3735 "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
3736 (build-system python-build-system)
3737 (native-inputs
3738 `(("python-mock" ,python-mock)
3739 ("python-pytest" ,python-pytest)
3740 ("python-setuptools-scm" ,python-setuptools-scm)))
3741 (propagated-inputs
3742 `(("python-appdirs" ,python-appdirs)
3743 ("python-distlib" ,python-distlib)
3744 ("python-filelock" ,python-filelock)
3745 ("python-six" ,python-six)))
3746 (home-page "https://virtualenv.pypa.io/")
3747 (synopsis "Virtual Python environment builder")
3748 (description
3749 "Virtualenv is a tool to create isolated Python environments.")
3750 (license license:expat)))
3751
3752 (define-public python2-virtualenv
3753 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3754 (package
3755 (inherit base)
3756 (arguments
3757 `(#:python ,python-2
3758 #:phases
3759 (modify-phases %standard-phases
3760 (add-after 'set-paths 'adjust-PYTHONPATH
3761 (lambda* (#:key inputs #:allow-other-keys)
3762 (let* ((python (assoc-ref inputs "python"))
3763 (python-sitedir (string-append python "/lib/python2.7"
3764 "/site-packages")))
3765 ;; XXX: 'python2' always comes first on PYTHONPATH
3766 ;; and shadows the 'setuptools' input. Move python2
3767 ;; last: this should be fixed in python-build-system
3768 ;; in a future rebuild cycle.
3769 (setenv "PYTHONPATH"
3770 (string-append (string-join (delete python-sitedir
3771 (string-split
3772 (getenv "PYTHONPATH")
3773 #\:))
3774 ":")
3775 ":" python-sitedir))
3776 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3777 (getenv "PYTHONPATH"))
3778 #t))))))
3779 (propagated-inputs
3780 `(("python-contextlib2" ,python2-contextlib2)
3781 ,@(package-propagated-inputs base))))))
3782
3783 (define-public python-markupsafe
3784 (package
3785 (name "python-markupsafe")
3786 (version "2.0.1")
3787 (source
3788 (origin
3789 (method url-fetch)
3790 (uri (pypi-uri "MarkupSafe" version))
3791 (sha256
3792 (base32
3793 "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
3794 (build-system python-build-system)
3795 (arguments
3796 `(#:phases (modify-phases %standard-phases
3797 (replace 'check
3798 (lambda* (#:key tests? #:allow-other-keys)
3799 (when tests?
3800 (invoke "pytest" "-vv")))))))
3801 (native-inputs
3802 `(("python-pytest" ,python-pytest)))
3803 (home-page "https://github.com/mitsuhiko/markupsafe")
3804 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3805 (description
3806 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3807 for Python.")
3808 (license license:bsd-3)))
3809
3810 (define-public python2-markupsafe
3811 (package-with-python2 python-markupsafe))
3812
3813 (define-public python-jinja2
3814 (package
3815 (name "python-jinja2")
3816 (version "3.0.1")
3817 (source
3818 (origin
3819 (method url-fetch)
3820 (uri (pypi-uri "Jinja2" version))
3821 (sha256
3822 (base32
3823 "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh"))))
3824 (build-system python-build-system)
3825 (arguments
3826 '(#:phases (modify-phases %standard-phases
3827 (replace 'check
3828 (lambda* (#:key tests? #:allow-other-keys)
3829 (if tests?
3830 (invoke "pytest" "-vv")
3831 (format #t "test suite not run~%")))))))
3832 (native-inputs
3833 `(("python-pytest" ,python-pytest)))
3834 (propagated-inputs
3835 `(("python-markupsafe" ,python-markupsafe)))
3836 (home-page "http://jinja.pocoo.org/")
3837 (synopsis "Python template engine")
3838 (description
3839 "Jinja2 is a small but fast and easy to use stand-alone template engine
3840 written in pure Python.")
3841 (license license:bsd-3)))
3842
3843 (define-public python2-jinja2
3844 (package-with-python2 python-jinja2))
3845
3846 (define-public python-jinja2-time
3847 (package
3848 (name "python-jinja2-time")
3849 (version "0.2.0")
3850 (source
3851 (origin
3852 (method url-fetch)
3853 (uri (pypi-uri "jinja2-time" version))
3854 (sha256
3855 (base32
3856 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3857 (build-system python-build-system)
3858 (propagated-inputs
3859 `(("python-arrow" ,python-arrow)
3860 ("python-jinja2" ,python-jinja2)))
3861 (home-page
3862 "https://github.com/hackebrot/jinja2-time")
3863 (synopsis "Jinja2 Extension for Dates and Times")
3864 (description
3865 "This package provides an extension for the template engine Jinja2. It
3866 adds a 'now' tag providing a convenient access to the arrow.now() API from
3867 templates. A format string can be provided to control the output.")
3868 (license license:expat)))
3869
3870 (define-public python-pystache
3871 (package
3872 (name "python-pystache")
3873 (version "0.5.4")
3874 (source (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "pystache" version))
3877 (sha256
3878 (base32
3879 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3880 (build-system python-build-system)
3881 (arguments
3882 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3883 (home-page "http://defunkt.io/pystache/")
3884 (synopsis "Python logic-less template engine")
3885 (description
3886 "Pystache is a Python implementation of the framework agnostic,
3887 logic-free templating system Mustache.")
3888 (license license:expat)
3889 (properties `((python2-variant . ,(delay python2-pystache))))))
3890
3891 (define-public python2-pystache
3892 (let ((base (package-with-python2
3893 (strip-python2-variant python-pystache))))
3894 (package/inherit base
3895 (arguments
3896 `(#:python ,python-2
3897 #:phases
3898 (modify-phases %standard-phases
3899 (replace 'check
3900 (lambda _
3901 (invoke "python" "test_pystache.py")))))))))
3902
3903 (define-public python-joblib
3904 (package
3905 (name "python-joblib")
3906 (version "0.14.1")
3907 (source (origin
3908 (method url-fetch)
3909 (uri (pypi-uri "joblib" version))
3910 (sha256
3911 (base32
3912 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3913 (build-system python-build-system)
3914 (arguments
3915 `(#:phases
3916 (modify-phases %standard-phases
3917 (replace 'check
3918 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3919 (native-inputs
3920 `(("python-pytest" ,python-pytest)))
3921 (home-page "https://joblib.readthedocs.io/")
3922 (synopsis "Using Python functions as pipeline jobs")
3923 (description
3924 "Joblib is a set of tools to provide lightweight pipelining in Python.
3925 In particular, joblib offers: transparent disk-caching of the output values
3926 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3927 logging and tracing of the execution.")
3928 (license license:bsd-3)))
3929
3930 (define-public python2-joblib
3931 (package-with-python2 python-joblib))
3932
3933 (define-public python-daemon
3934 (package
3935 (name "python-daemon")
3936 (version "2.2.3")
3937 (source
3938 (origin
3939 (method url-fetch)
3940 (uri (pypi-uri "python-daemon" version))
3941 (sha256
3942 (base32
3943 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3944 (build-system python-build-system)
3945 (arguments
3946 `(#:phases
3947 (modify-phases %standard-phases
3948 (add-before 'check 'disable-tests
3949 (lambda _
3950 ;; FIXME: Determine why test fails
3951 (substitute* "test/test_daemon.py"
3952 (("test_detaches_process_context")
3953 "skip_test_detaches_process_context"))
3954 #t)))))
3955 (propagated-inputs
3956 `(("python-lockfile" ,python-lockfile)))
3957 (native-inputs
3958 `(("python-unittest2" ,python-unittest2)
3959 ("python-testtools" ,python-testtools)
3960 ("python-testscenarios" ,python-testscenarios)
3961 ("python-mock" ,python-mock)
3962 ("python-docutils" ,python-docutils)))
3963 (home-page "https://pagure.io/python-daemon/")
3964 (synopsis "Python library for making a Unix daemon process")
3965 (description "Python-daemon is a library that assists a Python program to
3966 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3967
3968 This library provides a @code{DaemonContext} class that manages the following
3969 important tasks for becoming a daemon process:
3970 @enumerate
3971 @item Detach the process into its own process group.
3972 @item Set process environment appropriate for running inside a chroot.
3973 @item Renounce suid and sgid privileges.
3974 @item Close all open file descriptors.
3975 @item Change the working directory, uid, gid, and umask.
3976 @item Set appropriate signal handlers.
3977 @item Open new file descriptors for stdin, stdout, and stderr.
3978 @item Manage a specified PID lock file.
3979 @item Register cleanup functions for at-exit processing.
3980 @end enumerate")
3981 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3982 (license (list license:asl2.0 license:gpl3+))))
3983
3984 (define-public python-anytree
3985 (package
3986 (name "python-anytree")
3987 (version "2.8.0")
3988 (source (origin
3989 (method url-fetch)
3990 (uri (pypi-uri "anytree" version))
3991 (sha256
3992 (base32
3993 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3994 (build-system python-build-system)
3995 (propagated-inputs
3996 `(("python-six" ,python-six)))
3997 (native-inputs
3998 `(;; For tests.
3999 ("graphviz" ,graphviz) ;for 'dot'
4000 ("python-nose" ,python-nose)))
4001 (home-page "https://github.com/c0fec0de/anytree")
4002 (synopsis "Lightweight tree data library")
4003 (description
4004 "@code{anytree} is a simple, lightweight, and extensible tree data
4005 structure for Python.")
4006 (license license:asl2.0)))
4007
4008 (define-public python-docutils
4009 (package
4010 (name "python-docutils")
4011 (version "0.16")
4012 (source
4013 (origin
4014 (method url-fetch)
4015 (uri (pypi-uri "docutils" version))
4016 (sha256
4017 (base32
4018 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
4019 (build-system python-build-system)
4020 (arguments
4021 '(#:phases (modify-phases %standard-phases
4022 (replace 'check
4023 (lambda* (#:key tests? #:allow-other-keys)
4024 (if tests?
4025 (invoke "python" "test/alltests.py")
4026 (format #t "test suite not run~%"))
4027 #t)))))
4028 (home-page "http://docutils.sourceforge.net/")
4029 (synopsis "Python Documentation Utilities")
4030 (description
4031 "Docutils is a modular system for processing documentation into useful
4032 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
4033 easy to use markup language, for input.
4034
4035 This package provides tools for converting @file{.rst} files to other formats
4036 via commands such as @command{rst2man}, as well as supporting Python code.")
4037 ;; Most of the source code is public domain, but some source files are
4038 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
4039 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
4040
4041 (define-public python2-docutils
4042 (package-with-python2 python-docutils))
4043
4044 ;; python2-sphinx fails its test suite with newer versions.
4045 (define-public python2-docutils-0.14
4046 (package
4047 (inherit python2-docutils)
4048 (version "0.14")
4049 (source (origin
4050 (method url-fetch)
4051 (uri (pypi-uri "docutils" version))
4052 (sha256
4053 (base32
4054 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4055
4056 (define-public python-restructuredtext-lint
4057 (package
4058 (name "python-restructuredtext-lint")
4059 (version "1.3.0")
4060 (source
4061 (origin
4062 (method url-fetch)
4063 (uri (pypi-uri "restructuredtext-lint" version))
4064 (sha256
4065 (base32
4066 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4067 (build-system python-build-system)
4068 (arguments
4069 `(#:phases
4070 (modify-phases %standard-phases
4071 (delete 'check)
4072 (add-after 'install 'check
4073 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4074 (when tests?
4075 (add-installed-pythonpath inputs outputs)
4076 (invoke "nosetests" "-v"))
4077 #t)))))
4078 (propagated-inputs
4079 `(("python-docutils" ,python-docutils)))
4080 (native-inputs
4081 `(("python-nose" ,python-nose)))
4082 (home-page "https://github.com/twolfson/restructuredtext-lint")
4083 (synopsis "reStructuredText linter")
4084 (description "This package provides a linter for the reStructuredText
4085 format.")
4086 (license license:unlicense)))
4087
4088 (define-public python-doc8
4089 (package
4090 (name "python-doc8")
4091 (version "0.8.0")
4092 (source
4093 (origin
4094 (method url-fetch)
4095 (uri (pypi-uri "doc8" version))
4096 (sha256
4097 (base32
4098 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4099 (build-system python-build-system)
4100 (arguments
4101 `(#:phases
4102 (modify-phases %standard-phases
4103 (delete 'check)
4104 (add-after 'install 'check
4105 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4106 (when tests?
4107 (add-installed-pythonpath inputs outputs)
4108 (invoke "pytest" "-v"))
4109 #t)))))
4110 (propagated-inputs
4111 `(("python-chardet" ,python-chardet)
4112 ("python-docutils" ,python-docutils)
4113 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
4114 ("python-six" ,python-six)
4115 ("python-stevedore" ,python-stevedore)))
4116 (native-inputs
4117 `(("python-testtools" ,python-testtools)
4118 ("python-pytest" ,python-pytest)))
4119 (home-page "https://launchpad.net/doc8")
4120 (synopsis
4121 "Style checker for Sphinx (or other) RST documentation")
4122 (description
4123 "Doc8 is an opinionated style checker for reStructured Text and plain
4124 text styles of documentation.")
4125 (license license:asl2.0)))
4126
4127 (define-public python-pygments
4128 (package
4129 (name "python-pygments")
4130 (version "2.8.1")
4131 (source
4132 (origin
4133 (method url-fetch)
4134 (uri (pypi-uri "Pygments" version))
4135 (sha256
4136 (base32
4137 "153zyxigm879sk2n71lfv03y2pgxb7dl0dlsbwkz9aydxnkf2mi6"))))
4138 (build-system python-build-system)
4139 (arguments
4140 ;; FIXME: Tests require sphinx, which depends on this.
4141 '(#:tests? #f))
4142 (home-page "https://pygments.org/")
4143 (synopsis "Syntax highlighting")
4144 (description
4145 "Pygments is a syntax highlighting package written in Python.")
4146 (license license:bsd-2)
4147 (properties `((python2-variant . ,(delay python2-pygments))))))
4148
4149 ;; Pygments 2.6 and later does not support Python 2.
4150 (define-public python2-pygments
4151 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4152 (package
4153 (inherit base)
4154 (version "2.5.2")
4155 (source (origin
4156 (method url-fetch)
4157 (uri (pypi-uri "Pygments" version))
4158 (sha256
4159 (base32
4160 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4161
4162 (define-public python-pygments-github-lexers
4163 (package
4164 (name "python-pygments-github-lexers")
4165 (version "0.0.5")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (pypi-uri "pygments-github-lexers" version))
4170 (sha256
4171 (base32
4172 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4173 (build-system python-build-system)
4174 (propagated-inputs
4175 `(("python-pygments" ,python-pygments)))
4176 (home-page "https://github.com/liluo/pygments-github-lexers")
4177 (synopsis "Pygments Github custom lexers")
4178 (description "This package installs Github custom lexers to Pygments.")
4179 (license license:bsd-3)))
4180
4181 (define-public python-bump2version
4182 (package
4183 (name "python-bump2version")
4184 (version "1.0.1")
4185 (source
4186 (origin
4187 (method url-fetch)
4188 (uri (pypi-uri "bump2version" version))
4189 (sha256
4190 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4191 (build-system python-build-system)
4192 (arguments
4193 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4194 ;; required: --new-version".
4195 `(#:tests? #false))
4196 (home-page "https://github.com/c4urself/bump2version")
4197 (synopsis "Version-bump your software with a single command!")
4198 (description
4199 "This package provides a small command line tool to simplify releasing
4200 software by updating all version strings in your source code by the correct
4201 increment. It also creates commits and tags.")
4202 (license license:expat)))
4203
4204 (define-public python-bumpversion
4205 (package
4206 (name "python-bumpversion")
4207 (version "0.5.3")
4208 (source
4209 (origin
4210 (method url-fetch)
4211 (uri (pypi-uri "bumpversion" version))
4212 (sha256
4213 (base32
4214 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4215 (build-system python-build-system)
4216 (home-page "https://github.com/peritus/bumpversion")
4217 (synopsis "Tool to bump software version")
4218 (description "This tool provides a command-line interface (CLI) to bump a
4219 software version simply.")
4220 (license license:expat)))
4221
4222 (define-public python-deprecated
4223 (package
4224 (name "python-deprecated")
4225 (version "1.2.5")
4226 (source
4227 (origin
4228 (method git-fetch)
4229 (uri (git-reference
4230 (url "https://github.com/tantale/deprecated")
4231 (commit (string-append "v" version))))
4232 (file-name (git-file-name name version))
4233 (sha256
4234 (base32
4235 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4236 (build-system python-build-system)
4237 (arguments
4238 `(#:phases (modify-phases %standard-phases
4239 (replace 'check
4240 (lambda _
4241 (invoke "pytest"))))))
4242 (propagated-inputs
4243 `(("python-wrapt" ,python-wrapt)))
4244 (native-inputs
4245 `(("python-bumpversion" ,python-bumpversion)
4246 ("python-pytest" ,python-pytest)
4247 ("python-pytest-cov" ,python-pytest-cov)
4248 ("python-sphinx" ,python-sphinx)
4249 ("python-tox" ,python-tox)))
4250 (home-page "https://github.com/tantale/deprecated")
4251 (synopsis "Python decorator to deprecate classes, functions or methods")
4252 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4253 to deprecate classes, functions or methods.")
4254 (license license:expat)))
4255
4256 (define-public python-pygithub
4257 (package
4258 (name "python-pygithub")
4259 (version "1.54.1")
4260 (source
4261 ;; We fetch from the Git repo because there are no tests in the PyPI
4262 ;; archive.
4263 (origin
4264 (method git-fetch)
4265 (uri (git-reference
4266 (url "https://github.com/PyGithub/PyGithub")
4267 (commit (string-append "v" version))))
4268 (file-name (git-file-name name version))
4269 (sha256
4270 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4271 (build-system python-build-system)
4272 (arguments
4273 `(#:phases
4274 (modify-phases %standard-phases
4275 (replace 'check
4276 (lambda* (#:key tests? #:allow-other-keys)
4277 (when tests?
4278 (invoke "pytest"))
4279 #t)))))
4280 (propagated-inputs
4281 `(("python-cryptography" ,python-cryptography)
4282 ("python-deprecated" ,python-deprecated)
4283 ("python-pyjwt" ,python-pyjwt)
4284 ("python-requests" ,python-requests)))
4285 (native-inputs
4286 `(("python-httpretty" ,python-httpretty)
4287 ("python-pytest" ,python-pytest)))
4288 (home-page "https://pygithub.readthedocs.io/en/latest/")
4289 (synopsis "Python library for the GitHub API")
4290 (description "This library allows managing GitHub resources such as
4291 repositories, user profiles, and organizations in your Python applications,
4292 using version 3 of the GitHub application programming interface (API).")
4293 (license license:lgpl3+)))
4294
4295 (define-public python-rellu
4296 (package
4297 (name "python-rellu")
4298 (version "0.7")
4299 (source
4300 (origin
4301 (method url-fetch)
4302 (uri (pypi-uri "rellu" version))
4303 (sha256
4304 (base32
4305 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4306 (build-system python-build-system)
4307 (propagated-inputs
4308 `(("python-invoke" ,python-invoke)
4309 ("python-pygithub" ,python-pygithub)))
4310 (home-page "https://github.com/robotframework/rellu")
4311 (synopsis "Utilities to create PyPI releases")
4312 (description "This collection of utilities contains tooling and templates
4313 to assist in creating releases on GitHub and publishing them on PyPI. It is
4314 designed to be used by Robot Framework and tools and libraries in its
4315 ecosystem, but can naturally be used also by other projects.")
4316 (license license:asl2.0)))
4317
4318 (define-public python-robotframework
4319 (package
4320 (name "python-robotframework")
4321 (version "3.2.2")
4322 ;; There are no tests in the PyPI archive.
4323 (source
4324 (origin
4325 (method git-fetch)
4326 (uri (git-reference
4327 (url "https://github.com/robotframework/robotframework")
4328 (commit (string-append "v" version))))
4329 (file-name (git-file-name name version))
4330 (sha256
4331 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
4332 (patches (search-patches
4333 "python-robotframework-source-date-epoch.patch"))))
4334 (build-system python-build-system)
4335 (arguments
4336 `(#:phases (modify-phases %standard-phases
4337 (add-before 'build 'build-and-install-doc
4338 (lambda* (#:key outputs #:allow-other-keys)
4339 (let* ((doc-output (assoc-ref outputs "doc"))
4340 (doc (string-append doc-output "/share/"
4341 ,name "-" ,version "/")))
4342 (invoke "invoke" "library-docs" "all")
4343 (mkdir-p doc)
4344 (copy-recursively "doc/libraries"
4345 (string-append doc "/libraries"))
4346 #t)))
4347 (replace 'check
4348 (lambda* (#:key inputs #:allow-other-keys)
4349 ;; Some tests require timezone data. Otherwise, they
4350 ;; look up /etc/localtime, which doesn't exist, and fail
4351 ;; with:
4352 ;;
4353 ;; OverflowError: mktime argument out of range
4354 (setenv "TZDIR"
4355 (search-input-directory inputs "share/zoneinfo"))
4356 (setenv "TZ" "Europe/Paris")
4357
4358 (invoke "python" "utest/run.py"))))))
4359 (native-inputs
4360 `(("python-invoke" ,python-invoke)
4361 ("python-rellu" ,python-rellu)
4362 ("python:tk" ,python "tk") ;used when building the HTML doc
4363 ("tzdata" ,tzdata-for-tests)))
4364 (outputs '("out" "doc"))
4365 (home-page "https://robotframework.org")
4366 (synopsis "Generic automation framework")
4367 (description "Robot Framework is a generic automation framework for
4368 acceptance testing, acceptance test driven development (ATDD), and robotic
4369 process automation (RPA).")
4370 (license license:asl2.0)))
4371
4372 (define-public python-robotframework-lint
4373 ;; There is no properly tagged release; the commit below seems to correspond
4374 ;; to the 0.9 stable release available from PyPI. The tests are not
4375 ;; included in the PyPI archive, so we fetch the sources from the upstream
4376 ;; Git repo.
4377 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4378 (revision "0"))
4379 (package
4380 (name "python-robotframework-lint")
4381 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4382 revision commit))
4383 (source
4384 (origin
4385 (method git-fetch)
4386 (uri (git-reference
4387 (url "https://github.com/boakley/robotframework-lint")
4388 (commit commit)))
4389 (file-name (git-file-name name version))
4390 (sha256
4391 (base32
4392 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4393 (build-system python-build-system)
4394 (arguments
4395 `(#:phases
4396 (modify-phases %standard-phases
4397 (replace 'check
4398 (lambda _
4399 (invoke "python" "-m" "robot" "-A"
4400 "tests/conf/default.args" "tests"))))))
4401 (propagated-inputs
4402 `(("python-robotframework" ,python-robotframework)))
4403 (home-page "https://github.com/boakley/robotframework-lint/")
4404 (synopsis "Static analysis tool (linter) for Robot Framework")
4405 (description "This package provides the @code{rflint} command-line
4406 utility, a static analysis tool (linter) for Robot Framework source files.")
4407 (license license:asl2.0))))
4408
4409 (define-public python-robotframework-sshlibrary
4410 (package
4411 (name "python-robotframework-sshlibrary")
4412 (version "3.3.0")
4413 ;; There are no tests in the PyPI archive.
4414 (source
4415 (origin
4416 (method git-fetch)
4417 (uri (git-reference
4418 (url "https://github.com/robotframework/SSHLibrary")
4419 (commit (string-append "v" version))))
4420 (file-name (git-file-name name version))
4421 (sha256
4422 (base32
4423 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4424 (build-system python-build-system)
4425 (arguments
4426 `(#:phases
4427 (modify-phases %standard-phases
4428 (add-before 'build 'build-and-install-doc
4429 (lambda* (#:key outputs #:allow-other-keys)
4430 (let* ((doc-output (assoc-ref outputs "doc"))
4431 (doc (string-append doc-output "/share/"
4432 ,name "-" ,version "/")))
4433 (invoke "chmod" "-R" "+w" "docs")
4434 (invoke "invoke" "kw-docs" "project-docs")
4435 (mkdir-p doc)
4436 (for-each delete-file (find-files "docs" "\\.rst"))
4437 (copy-recursively "docs" doc)
4438 #t)))
4439 (replace 'check
4440 (lambda _
4441 ;; Some tests require an SSH server; we remove them.
4442 (delete-file "utest/test_client_api.py")
4443 (delete-file "utest/test_scp.py")
4444 (invoke "python" "utest/run.py"))))))
4445 (propagated-inputs
4446 `(("python-robotframework" ,python-robotframework)
4447 ("python-paramiko" ,python-paramiko)
4448 ("python-scp" ,python-scp)))
4449 (native-inputs
4450 `(("openssh" ,openssh)
4451 ("which" ,which)
4452 ;; To generate the documentation
4453 ("python-docutils" ,python-docutils)
4454 ("python-invoke" ,python-invoke)
4455 ("python-pygments" ,python-pygments)
4456 ("python-rellu" ,python-rellu)))
4457 (outputs '("out" "doc"))
4458 (home-page "https://github.com/robotframework/SSHLibrary")
4459 (synopsis "Robot Framework library for SSH and SFTP")
4460 (description "SSHLibrary is a Robot Framework library providing support
4461 for SSH and SFTP. It has the following main usages:
4462 @itemize @bullet
4463 @item Executing commands on the remote machine, either blocking or non-blocking.
4464 @item Writing and reading in an interactive shell.
4465 @item Transferring files and directories over SFTP.
4466 @item Ensuring that files and directories exist on the remote machine.
4467 @end itemize")
4468 (license license:asl2.0)))
4469
4470 (define-public python-rstr
4471 (package
4472 (name "python-rstr")
4473 (version "2.2.6")
4474 (source
4475 (origin
4476 (method url-fetch)
4477 (uri (pypi-uri "rstr" version))
4478 (sha256
4479 (base32
4480 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4481 (build-system python-build-system)
4482 (home-page "https://github.com/leapfrogonline/rstr")
4483 (synopsis "Generate random strings in Python")
4484 (description "This package provides a python module for generating
4485 random strings of various types. It could be useful for fuzz testing,
4486 generating dummy data, or other applications. It has no dependencies
4487 outside the standard library.")
4488 (license license:bsd-3)))
4489
4490 (define-public python-scp
4491 (package
4492 (name "python-scp")
4493 (version "0.13.3")
4494 (source
4495 (origin
4496 (method url-fetch)
4497 (uri (pypi-uri "scp" version))
4498 (sha256
4499 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4500 (build-system python-build-system)
4501 (arguments
4502 '(#:tests? #f)) ;tests require an SSH server
4503 (propagated-inputs
4504 `(("python-paramiko" ,python-paramiko)))
4505 (home-page "https://github.com/jbardin/scp.py")
4506 (synopsis "SCP protocol module for Python and Paramiko")
4507 (description "The scp module extends the Paramiko library to send and
4508 receive files via the SCP1 protocol, as implemented by the OpenSSH
4509 @command{scp} program.")
4510 (license license:gpl2+)))
4511
4512 (define-public python-rst.linker
4513 (package
4514 (name "python-rst.linker")
4515 (version "1.11")
4516 (source
4517 (origin
4518 (method url-fetch)
4519 (uri (pypi-uri "rst.linker" version))
4520 (sha256
4521 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4522 (build-system python-build-system)
4523 (propagated-inputs
4524 `(("python-dateutil" ,python-dateutil)
4525 ("python-six" ,python-six)))
4526 (native-inputs
4527 `(("python-setuptools-scm" ,python-setuptools-scm)))
4528 ;; Test would require path.py, which would introduce a cyclic dependence.
4529 (arguments `(#:tests? #f))
4530 ;; Note: As of version 1.7 the documentation is not worth building.
4531 (home-page "https://github.com/jaraco/rst.linker")
4532 (synopsis "Sphinx plugin to add links and timestamps")
4533 (description "rst.linker automatically replaces text by a
4534 reStructuredText external reference or timestamps. It's primary purpose is to
4535 augment the changelog, but it can be used for other documents, too.")
4536 (license license:expat)))
4537
4538 (define-public python2-rst.linker
4539 (package-with-python2 python-rst.linker))
4540
4541 (define-public python-sshpubkeys
4542 (package
4543 (name "python-sshpubkeys")
4544 (version "3.1.0")
4545 (home-page "https://github.com/ojarva/python-sshpubkeys")
4546 (source (origin
4547 (method git-fetch)
4548 (uri (git-reference
4549 (url home-page)
4550 (commit (string-append "v" version))))
4551 (file-name (git-file-name name version))
4552 (sha256
4553 (base32
4554 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4555 (build-system python-build-system)
4556 (propagated-inputs
4557 `(("python-cryptography" ,python-cryptography)
4558 ("python-ecdsa" ,python-ecdsa)))
4559 (synopsis "OpenSSH public key parser")
4560 (description
4561 "This package provides a library for parsing and validating OpenSSH
4562 public key files.")
4563 (license license:bsd-3)))
4564
4565 (define-public python-feedgenerator
4566 (package
4567 (name "python-feedgenerator")
4568 (version "1.9")
4569 (source
4570 (origin
4571 (method url-fetch)
4572 (uri (pypi-uri "feedgenerator" version))
4573 (sha256
4574 (base32
4575 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4576 (modules '((guix build utils)))
4577 (snippet
4578 '(begin
4579 ;; Remove pre-compiled .pyc files from source.
4580 (for-each delete-file-recursively
4581 (find-files "." "__pycache__" #:directories? #t))
4582 (for-each delete-file (find-files "." "\\.pyc$"))
4583 #t))))
4584 (build-system python-build-system)
4585 (propagated-inputs
4586 `(("python-pytz" ,python-pytz)
4587 ("python-six" ,python-six)))
4588 (home-page "https://github.com/getpelican/feedgenerator")
4589 (synopsis
4590 "Standalone version of Django's Atom/RSS feed generator")
4591 (description
4592 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4593 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4594 (license license:bsd-3)))
4595
4596 (define-public python2-feedgenerator
4597 (package-with-python2 python-feedgenerator))
4598
4599 (define-public python-jsonrpc-server
4600 (package
4601 (name "python-jsonrpc-server")
4602 (version "0.4.0")
4603 (source
4604 (origin
4605 (method url-fetch)
4606 (uri (pypi-uri "python-jsonrpc-server" version))
4607 (sha256
4608 (base32
4609 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4610 (build-system python-build-system)
4611 (propagated-inputs
4612 `(("python-mock" ,python-mock)
4613 ("python-pytest" ,python-pytest)
4614 ("python-ujson" ,python-ujson)))
4615 (home-page
4616 "https://github.com/palantir/python-jsonrpc-server")
4617 (synopsis "JSON RPC 2.0 server library")
4618 (description
4619 "This package provides a JSON RPC 2.0 server library for Python.")
4620 (license license:expat)))
4621
4622 (define-public python-pydantic
4623 (package
4624 (name "python-pydantic")
4625 (version "1.8.2")
4626 (source
4627 (origin
4628 (method git-fetch)
4629 (uri (git-reference
4630 (url "https://github.com/samuelcolvin/pydantic")
4631 (commit (string-append "v" version))))
4632 (file-name (git-file-name name version))
4633 (sha256
4634 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4635 (build-system python-build-system)
4636 (arguments
4637 '(#:phases
4638 (modify-phases %standard-phases
4639 (add-before 'check 'disable-test
4640 (lambda _
4641 ;; Reported upstream:
4642 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4643 ;; Disable the faulty test as the fix is unclear.
4644 (substitute* "tests/test_validators.py"
4645 (("test_assert_raises_validation_error")
4646 "_test_assert_raises_validation_error"))
4647
4648 ;; These fail because of <https://bugs.python.org/issue40398>.
4649 ;; Remove after Python has been upgraded to >= 3.9.
4650 (substitute* "tests/test_generics.py"
4651 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4652 ""))
4653 (substitute* "tests/test_schema.py"
4654 (("test_unenforced_constraints_schema")
4655 "_test_unenforced_constraints_schema"))
4656
4657 ;; Disable tests for the Hypothesis plugin because it is tricky
4658 ;; to configure in the build container.
4659 (delete-file "tests/test_hypothesis_plugin.py")))
4660 (replace 'check
4661 (lambda _ (invoke "pytest" "-vv"))))))
4662 (native-inputs
4663 `(("python-pytest" ,python-pytest)
4664 ("python-pytest-mock" ,python-pytest-mock)))
4665 (propagated-inputs
4666 `(("python-typing-extensions" ,python-typing-extensions)))
4667 (home-page "https://github.com/samuelcolvin/pydantic")
4668 (synopsis "Python data validation and settings management")
4669 (description
4670 "Pydantic enforces type hints at runtime, and provides user friendly
4671 errors when data is invalid.")
4672 (license license:expat)))
4673
4674 (define-public python-pydocstyle
4675 (package
4676 (name "python-pydocstyle")
4677 (version "3.0.0")
4678 (source
4679 (origin
4680 (method url-fetch)
4681 (uri (pypi-uri "pydocstyle" version))
4682 (sha256
4683 (base32
4684 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4685 (build-system python-build-system)
4686 (propagated-inputs
4687 `(("python-six" ,python-six)
4688 ("python-snowballstemmer" ,python-snowballstemmer)))
4689 (home-page
4690 "https://github.com/PyCQA/pydocstyle/")
4691 (synopsis "Python docstring style checker")
4692 (description
4693 "This package provides a style checker for the Python Language
4694 Server (PLS).")
4695 (license license:expat)))
4696
4697 (define-public python-language-server
4698 (package
4699 (name "python-language-server")
4700 (version "0.36.2")
4701 (source
4702 (origin
4703 (method url-fetch)
4704 (uri (pypi-uri "python-language-server" version))
4705 (sha256
4706 (base32
4707 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4708 (build-system python-build-system)
4709 (arguments
4710 `(#:phases
4711 (modify-phases %standard-phases
4712 (add-after 'unpack 'relax-deps
4713 (lambda _
4714 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4715 "pycodestyle"))
4716 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4717 #t))
4718 (add-before 'check 'set-HOME
4719 (lambda _ (setenv "HOME" "/tmp") #t))
4720 (replace 'check
4721 (lambda _
4722 ;; Disable failing test.
4723 (invoke "python" "-m" "pytest" "-k"
4724 "not test_pyqt_completion"))))))
4725 (propagated-inputs
4726 `(("python-autopep8" ,python-autopep8)
4727 ("python-configparser" ,python-configparser)
4728 ("python-pydocstyle" ,python-pydocstyle)
4729 ("python-flake8" ,python-flake8)
4730 ("python-future" ,python-future)
4731 ("python-jedi" ,python-jedi)
4732 ("python-jsonrpc-server" ,python-jsonrpc-server)
4733 ("python-pluggy" ,python-pluggy)
4734 ("python-pycodestyle" ,python-pycodestyle)
4735 ("python-pyflakes" ,python-pyflakes)
4736 ("python-rope" ,python-rope)
4737 ("python-ujson" ,python-ujson)
4738 ("python-yapf" ,python-yapf)))
4739 (native-inputs
4740 `(("python-coverage" ,python-coverage)
4741 ("python-flaky" ,python-flaky)
4742 ("python-matplotlib" ,python-matplotlib)
4743 ("python-mock" ,python-mock)
4744 ("python-numpy" ,python-numpy)
4745 ("python-pandas" ,python-pandas)
4746 ("python-pylint" ,python-pylint)
4747 ("python-pytest" ,python-pytest)
4748 ("python-pytest-cov" ,python-pytest-cov)
4749 ("python-versioneer" ,python-versioneer)))
4750 (home-page "https://github.com/palantir/python-language-server")
4751 (synopsis "Python implementation of the Language Server Protocol")
4752 (description
4753 "The Python Language Server (pyls) is an implementation of the Python 3
4754 language specification for the Language Server Protocol (LSP). This tool is
4755 used in text editing environments to provide a complete and integrated
4756 feature-set for programming Python effectively.")
4757 (license license:expat)))
4758
4759 (define-public python-pathspec
4760 (package
4761 (name "python-pathspec")
4762 (version "0.7.0")
4763 (source
4764 (origin
4765 (method url-fetch)
4766 (uri (pypi-uri "pathspec" version))
4767 (sha256
4768 (base32
4769 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4770 (build-system python-build-system)
4771 (home-page "https://github.com/cpburnz/python-path-specification")
4772 (synopsis "Utility library for gitignore style pattern matching of file paths")
4773 (description
4774 "This package provides a utility library for gitignore style pattern
4775 matching of file paths.")
4776 (license license:mpl2.0)))
4777
4778 (define-public python-black
4779 (package
4780 (name "python-black")
4781 (version "20.8b1")
4782 (source
4783 (origin
4784 (method url-fetch)
4785 (uri (pypi-uri "black" version))
4786 (sha256
4787 (base32
4788 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4789 (build-system python-build-system)
4790 (arguments
4791 `(#:phases
4792 (modify-phases %standard-phases
4793 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4794 (lambda _
4795 (let ((python3 (which "python3")))
4796 (substitute* '("tests/data/fmtonoff.py"
4797 "tests/data/string_prefixes.py"
4798 "tests/data/function.py"
4799 "tests/data/python37.py")
4800 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4801 (string-append "#!" python3 (if (string? minor-version)
4802 minor-version
4803 "")))))
4804 #t))
4805 (add-after 'unpack 'disable-broken-tests
4806 (lambda* (#:key outputs inputs #:allow-other-keys)
4807 ;; Make installed package available for running the tests
4808 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4809 ":" (getenv "PATH")))
4810
4811 ;; These tests are supposed to be skipped when the blackd
4812 ;; dependencies are missing, but this doesn't quite work.
4813 (substitute* "tests/test_black.py"
4814 (("( *)class BlackDTestCase.*" match indent)
4815 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4816 indent "class BlackDTestCase(unittest.TestCase):\n"))
4817 (("web.Application") "False")
4818 (("@unittest_run_loop") ""))
4819
4820 ;; Patching the above file breaks the self test
4821 (substitute* "tests/test_black.py"
4822 (("( *)def test_self" match indent)
4823 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4824
4825 (substitute* "tests/test_black.py"
4826 (("( *)def test_python38" match indent)
4827 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4828 #t))
4829 ;; Remove blackd, because it depends on python-aiohttp and
4830 ;; python-aiohttp-cors.
4831 (add-after 'unpack 'remove-entrypoint
4832 (lambda _
4833 (substitute* "setup.py"
4834 (("\\s*\"blackd=blackd:patched_main \\[d\\]\",\n") "")
4835 (("\"blackd\", ") "")))))))
4836 (propagated-inputs
4837 `(("python-click" ,python-click)
4838 ("python-attrs" ,python-attrs)
4839 ("python-appdirs" ,python-appdirs)
4840 ("python-pathspec" ,python-pathspec)
4841 ("python-mypy-extensions" ,python-mypy-extensions)
4842 ("python-regex" ,python-regex)
4843 ("python-toml" ,python-toml)
4844 ("python-typed-ast" ,python-typed-ast)
4845 ("python-typing-extensions" ,python-typing-extensions)))
4846 (native-inputs
4847 `(("python-setuptools-scm" ,python-setuptools-scm)))
4848 (home-page "https://github.com/ambv/black")
4849 (synopsis "The uncompromising code formatter")
4850 (description "Black is the uncompromising Python code formatter.")
4851 (license license:expat)))
4852
4853 (define-public python-black-macchiato
4854 (package
4855 (name "python-black-macchiato")
4856 (version "1.3.0")
4857 (source
4858 (origin
4859 (method url-fetch)
4860 (uri (pypi-uri "black-macchiato" version))
4861 (sha256
4862 (base32
4863 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4864 (build-system python-build-system)
4865 (propagated-inputs
4866 `(("python-black" ,python-black)))
4867 (home-page "https://github.com/wbolster/black-macchiato")
4868 (synopsis "Partial @code{python-black} formatting")
4869 (description
4870 "This package is built on top the @{python-black} code formatter to
4871 enable formatting of partial files.")
4872 (license license:bsd-3)))
4873
4874 (define-public python-blinker
4875 (package
4876 (name "python-blinker")
4877 (version "1.4")
4878 (source
4879 (origin
4880 (method url-fetch)
4881 (uri (pypi-uri "blinker" version))
4882 (sha256
4883 (base32
4884 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4885 (build-system python-build-system)
4886 (home-page "https://pythonhosted.org/blinker/")
4887 (synopsis "Fast, simple object-to-object and broadcast signaling")
4888 (description
4889 "Blinker provides a fast dispatching system that allows any number of
4890 interested parties to subscribe to events, or \"signals\".")
4891 (license license:expat)))
4892
4893 (define-public python2-blinker
4894 (package-with-python2 python-blinker))
4895
4896 (define-public pelican
4897 (package
4898 (name "pelican")
4899 (version "4.2.0")
4900 (source
4901 (origin
4902 (method url-fetch)
4903 (uri (pypi-uri "pelican" version))
4904 (sha256
4905 (base32
4906 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4907 (build-system python-build-system)
4908 (propagated-inputs
4909 `(("python-blinker" ,python-blinker)
4910 ("python-dateutil" ,python-dateutil)
4911 ("python-docutils" ,python-docutils)
4912 ("python-feedgenerator" ,python-feedgenerator)
4913 ("python-jinja2" ,python-jinja2)
4914 ("python-markdown" ,python-markdown)
4915 ("python-pygments" ,python-pygments)
4916 ("python-pytz" ,python-pytz)
4917 ("python-six" ,python-six)
4918 ("python-unidecode" ,python-unidecode)))
4919 (home-page "https://getpelican.com/")
4920 (arguments
4921 `(;; XXX Requires a lot more packages to do unit tests :P
4922 #:tests? #f))
4923 (synopsis "Python-based static site publishing system")
4924 (description
4925 "Pelican is a tool to generate a static blog from reStructuredText,
4926 Markdown input files, and more. Pelican uses Jinja2 for templating
4927 and is very extensible.")
4928 (license license:agpl3+)))
4929
4930 (define-public mallard-ducktype
4931 (package
4932 (name "mallard-ducktype")
4933 (version "1.0.2")
4934 (source
4935 (origin
4936 (method git-fetch)
4937 ;; git-reference because tests are not included in pypi source tarball
4938 ;; https://issues.guix.gnu.org/issue/36755#2
4939 (uri (git-reference
4940 (url "https://github.com/projectmallard/mallard-ducktype")
4941 (commit version)))
4942 (file-name (git-file-name name version))
4943 (sha256
4944 (base32
4945 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4946 (build-system python-build-system)
4947 (arguments
4948 '(#:phases
4949 (modify-phases %standard-phases
4950 (replace 'check
4951 (lambda _
4952 (with-directory-excursion "tests"
4953 (invoke "sh" "runtests")))))))
4954 (home-page "http://projectmallard.org")
4955 (synopsis "Convert Ducktype to Mallard documentation markup")
4956 (description
4957 "Ducktype is a lightweight syntax that can represent all the semantics
4958 of the Mallard XML documentation system. Ducktype files can be converted to
4959 Mallard using the @command{ducktype} tool. The yelp-tools package
4960 provides additional functionality on the produced Mallard documents.")
4961 (license license:expat)))
4962
4963 (define-public python-cython
4964 (package
4965 (name "python-cython")
4966 (version "0.29.22")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri (pypi-uri "Cython" version))
4971 (sha256
4972 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4973 (build-system python-build-system)
4974 ;; we need the full python package and not just the python-wrapper
4975 ;; because we need libpython3.3m.so
4976 (inputs
4977 `(("python" ,python)))
4978 (arguments
4979 `(#:phases
4980 (modify-phases %standard-phases
4981 (add-before 'check 'set-HOME
4982 ;; some tests require access to "$HOME/.cython"
4983 (lambda _ (setenv "HOME" "/tmp") #t))
4984 (replace 'check
4985 (lambda _
4986 ;; Disable compiler optimizations to greatly reduce the running
4987 ;; time of the test suite.
4988 (setenv "CFLAGS" "-O0")
4989
4990 (invoke "python" "runtests.py" "-vv"
4991 "-j" (number->string (parallel-job-count))
4992 ;; XXX: On 32-bit architectures, running the parallel tests
4993 ;; fails on many-core systems, see
4994 ;; <https://github.com/cython/cython/issues/2807>.
4995 ,@(if (not (target-64bit?))
4996 '("-x" "run.parallel")
4997 '())))))))
4998 (home-page "https://cython.org/")
4999 (synopsis "C extensions for Python")
5000 (description "Cython is an optimising static compiler for both the Python
5001 programming language and the extended Cython programming language. It makes
5002 writing C extensions for Python as easy as Python itself.")
5003 (license license:asl2.0)
5004 (properties `((python2-variant . ,(delay python2-cython))))))
5005
5006 (define-public python2-cython
5007 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
5008 (package/inherit base
5009 (name "python2-cython")
5010 (inputs
5011 `(("python-2" ,python-2))) ;this is not automatically changed
5012 (arguments
5013 (substitute-keyword-arguments (package-arguments base)
5014 ((#:phases phases)
5015 `(modify-phases ,phases
5016 (add-before 'check 'adjust-test_embed
5017 (lambda _
5018 (substitute* "runtests.py"
5019 ;; test_embed goes great lengths to find the static libpythonX.Y.a
5020 ;; so it can give the right -L flag to GCC when embedding static
5021 ;; builds of Python. It is unaware that the Python "config"
5022 ;; directory (where the static library lives) was renamed in
5023 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
5024 ;; which works fine, because that is where the shared library is.
5025 ;;
5026 ;; It also appears to be unaware that the Makefile in Demos/embed
5027 ;; already unconditionally pass the static library location to GCC,
5028 ;; after checking sysconfig.get_config_var('LIBPL).
5029 ;;
5030 ;; The effect is that the linker is unable to resolve libexpat
5031 ;; symbols when building for Python 2, because neither the Python 2
5032 ;; shared library nor Expat is available. To fix it, we can either
5033 ;; add Expat as an input and make it visible to the linker, or just
5034 ;; prevent it from overriding the Python shared library location.
5035 ;; The end result is identical, so we take the easy route.
5036 ((" or libname not in os\\.listdir\\(libdir\\)")
5037 ""))
5038 #t)))))))))
5039
5040 ;; NOTE: when upgrading numpy please make sure that python-pandas and
5041 ;; python-scipy still build, as these three packages are often used together.
5042 (define-public python-numpy
5043 (package
5044 (name "python-numpy")
5045 (version "1.17.3")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (string-append
5050 "https://github.com/numpy/numpy/releases/download/v"
5051 version "/numpy-" version ".tar.gz"))
5052 (sha256
5053 (base32
5054 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
5055 (build-system python-build-system)
5056 (inputs
5057 `(("openblas" ,openblas)))
5058 (native-inputs
5059 `(("python-cython" ,python-cython)
5060 ("python-pytest" ,python-pytest)
5061 ("gfortran" ,gfortran)))
5062 (arguments
5063 `(#:phases
5064 (modify-phases %standard-phases
5065 (add-before 'build 'configure-blas-lapack
5066 (lambda* (#:key inputs #:allow-other-keys)
5067 (call-with-output-file "site.cfg"
5068 (lambda (port)
5069 (format port
5070 "[openblas]
5071 libraries = openblas
5072 library_dirs = ~a/lib
5073 include_dirs = ~a/include
5074
5075 # backslash-n to make emacs happy
5076 \n[lapack]
5077 lapack_libs = lapack
5078 library_dirs = ~a/lib
5079 include_dirs = ~a/include
5080 "
5081 (assoc-ref inputs "openblas")
5082 (assoc-ref inputs "openblas")
5083 (assoc-ref inputs "lapack")
5084 (assoc-ref inputs "lapack"))))
5085 #t))
5086 (add-before 'build 'fix-executable-paths
5087 (lambda* (#:key inputs #:allow-other-keys)
5088 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5089 ;; instead of /bin/sh.
5090 (substitute* "numpy/distutils/exec_command.py"
5091 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
5092 (string-append match-start (assoc-ref inputs "bash") match-end)))
5093 ;; Use "gcc" executable, not "cc".
5094 (substitute* "numpy/distutils/system_info.py"
5095 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5096 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
5097 #t))
5098 ;; Tests can only be run after the library has been installed and not
5099 ;; within the source directory.
5100 (delete 'check)
5101 (add-after 'install 'check
5102 (lambda* (#:key outputs inputs #:allow-other-keys)
5103 ;; Make installed package available for running the tests
5104 (add-installed-pythonpath inputs outputs)
5105 ;; Make sure "f2py" etc is found.
5106 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5107 ":" (getenv "PATH")))
5108 (with-directory-excursion "/tmp"
5109 (invoke "python" "-c"
5110 "import numpy; numpy.test(verbose=2)")))))))
5111 (home-page "https://numpy.org")
5112 (synopsis "Fundamental package for scientific computing with Python")
5113 (description "NumPy is the fundamental package for scientific computing
5114 with Python. It contains among other things: a powerful N-dimensional array
5115 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5116 and Fortran code, useful linear algebra, Fourier transform, and random number
5117 capabilities.")
5118 (properties `((python2-variant . ,(delay python2-numpy))))
5119 (license license:bsd-3)))
5120
5121 ;; Numpy 1.16.x are the last versions that support Python 2.
5122 (define-public python2-numpy
5123 (let ((numpy (package-with-python2
5124 (strip-python2-variant python-numpy))))
5125 (package
5126 (inherit numpy)
5127 (version "1.16.5")
5128 (source (origin
5129 (method url-fetch)
5130 (uri (string-append
5131 "https://github.com/numpy/numpy/releases/download/v"
5132 version "/numpy-" version ".tar.gz"))
5133 (sha256
5134 (base32
5135 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5136
5137 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5138 ;; interest only for legacy code going back to NumPy's predecessor
5139 ;; Numeric.
5140 (define-public python2-numpy-1.8
5141 (package (inherit python2-numpy)
5142 (version "1.8.2")
5143 (source
5144 (origin
5145 (method git-fetch)
5146 (uri (git-reference
5147 (url "https://github.com/numpy/numpy")
5148 (commit (string-append "v" version))))
5149 (file-name (git-file-name "numpy" version))
5150 (sha256
5151 (base32
5152 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5153 (arguments
5154 (substitute-keyword-arguments (package-arguments python2-numpy)
5155 ((#:phases phases)
5156 `(modify-phases ,phases
5157 (replace 'configure-blas-lapack
5158 (lambda* (#:key inputs #:allow-other-keys)
5159 (call-with-output-file "site.cfg"
5160 (lambda (port)
5161 (format port
5162 "[openblas]
5163 libraries = openblas,lapack
5164 library_dirs = ~a/lib:~a/lib
5165 include_dirs = ~a/include:~a/include
5166 "
5167 (assoc-ref inputs "openblas")
5168 (assoc-ref inputs "lapack")
5169 (assoc-ref inputs "openblas")
5170 (assoc-ref inputs "lapack"))))
5171 #t))))))
5172 (native-inputs
5173 `(("python2-nose" ,python2-nose)))
5174 (description "NumPy is the fundamental package for scientific computing
5175 with Python. It contains among other things: a powerful N-dimensional array
5176 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5177 and Fortran code, useful linear algebra, Fourier transform, and random number
5178 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5179 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5180 Numeric.")
5181 (license license:bsd-3)))
5182
5183 (define-public python-munch
5184 (package
5185 (name "python-munch")
5186 (version "2.0.4")
5187 (source
5188 (origin
5189 (method url-fetch)
5190 (uri (pypi-uri "munch" version))
5191 (sha256
5192 (base32
5193 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5194 (build-system python-build-system)
5195 (home-page "https://github.com/Infinidat/munch")
5196 (synopsis "Dot-accessible dictionary")
5197 (description "Munch is a dot-accessible dictionary similar to JavaScript
5198 objects.")
5199 (license license:expat)))
5200
5201 (define-public python2-munch
5202 (package-with-python2 python-munch))
5203
5204 (define-public python-colormath
5205 (package
5206 (name "python-colormath")
5207 (version "3.0.0")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (pypi-uri "colormath" version))
5212 (sha256
5213 (base32
5214 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5215 (build-system python-build-system)
5216 (propagated-inputs
5217 `(("python-networkx" ,python-networkx)
5218 ("python-numpy" ,python-numpy)))
5219 (home-page "https://github.com/gtaylor/python-colormath")
5220 (synopsis "Color math and conversion library")
5221 (description
5222 "This is a Python library for color math and conversions.")
5223 (license license:bsd-3)))
5224
5225 (define-public python2-colormath
5226 (package-with-python2 python-colormath))
5227
5228 (define-public python-sparse
5229 (package
5230 (name "python-sparse")
5231 (version "0.12.0")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (pypi-uri "sparse" version))
5236 (sha256
5237 (base32
5238 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5239 (build-system python-build-system)
5240 (arguments
5241 `(#:phases
5242 (modify-phases %standard-phases
5243 (replace 'check
5244 (lambda* (#:key tests? #:allow-other-keys)
5245 (when tests?
5246 (invoke "python" "-m" "pytest" "-v")))))))
5247 (propagated-inputs
5248 `(("python-numba" ,python-numba)
5249 ("python-numpy" ,python-numpy)
5250 ("python-scipy" ,python-scipy)))
5251 (native-inputs
5252 `(("python-dask" ,python-dask)
5253 ("python-pytest" ,python-pytest)
5254 ("python-pytest-black" ,python-pytest-black)
5255 ("python-pytest-cov" ,python-pytest-cov)))
5256 (home-page "https://github.com/pydata/sparse/")
5257 (synopsis "Library for multi-dimensional sparse arrays")
5258 (description
5259 "This package implements sparse arrays of arbitrary dimension on top of
5260 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5261 of the elements are zero. @code{python-sparse} generalizes the
5262 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5263 extends beyond just rows and columns to an arbitrary number of dimensions.
5264 Additionally, this project maintains compatibility with the
5265 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5266 used in @code{scipy.sparse}. These differences make this project useful in
5267 certain situations where @code{scipy.sparse} matrices are not well suited, but
5268 it should not be considered a full replacement. It lacks layouts that are not
5269 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5270 depends on @code{scipy.sparse} for some computations.")
5271 (license license:bsd-3)))
5272
5273 (define-public python-spectra
5274 (package
5275 (name "python-spectra")
5276 (version "0.0.11")
5277 (source
5278 (origin
5279 (method url-fetch)
5280 (uri (pypi-uri "spectra" version))
5281 (sha256
5282 (base32
5283 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5284 (build-system python-build-system)
5285 (arguments
5286 `(#:phases
5287 (modify-phases %standard-phases
5288 (replace 'check
5289 (lambda _ (invoke "nosetests" "-v"))))))
5290 (propagated-inputs
5291 `(("python-colormath" ,python-colormath)))
5292 (native-inputs
5293 `(("python-nose" ,python-nose)))
5294 (home-page "https://github.com/jsvine/spectra")
5295 (synopsis "Color scales and color conversion")
5296 (description
5297 "This package provides a Python library intended to make color math,
5298 color scales, and color space conversion easy. It has support for:
5299
5300 @enumerate
5301 @item Color scales
5302 @item Color ranges
5303 @item Color blending
5304 @item Brightening/darkening colors
5305 @item Saturating/desaturating colors
5306 @item Conversion to/from multiple color spaces.
5307 @end enumerate\n")
5308 (license license:expat)))
5309
5310 (define-public python2-spectra
5311 (package-with-python2 python-spectra))
5312
5313 (define-public python-pyspnego
5314 (package
5315 (name "python-pyspnego")
5316 (version "0.1.6")
5317 (source
5318 (origin
5319 (method git-fetch) ;no tests in PyPI release
5320 (uri (git-reference
5321 (url "https://github.com/jborean93/pyspnego")
5322 (commit (string-append "v" version))))
5323 (file-name (git-file-name name version))
5324 (sha256
5325 (base32
5326 "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
5327 (build-system python-build-system)
5328 (arguments
5329 `(#:phases (modify-phases %standard-phases
5330 (replace 'check
5331 (lambda* (#:key tests? #:allow-other-keys)
5332 (when tests?
5333 (invoke "pytest")))))))
5334 (native-inputs
5335 `(("python-pytest" ,python-pytest)
5336 ("python-pytest-mock" ,python-pytest-mock)))
5337 (propagated-inputs
5338 `(("python-cryptography" ,python-cryptography)
5339 ("python-gssapi" ,python-gssapi)
5340 ("python-ruamel.yaml" ,python-ruamel.yaml)))
5341 (home-page "https://github.com/jborean93/pyspnego")
5342 (synopsis "Python SPNEGO library")
5343 (description "The @code{pyspnego} Python library handles Negotiate, NTLM,
5344 Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet
5345 parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human
5346 readable format.")
5347 (license license:expat)))
5348
5349 (define-public python-numpy-documentation
5350 (package
5351 (name "python-numpy-documentation")
5352 (version (package-version python-numpy))
5353 (source (package-source python-numpy))
5354 (build-system python-build-system)
5355 (native-inputs
5356 `(("python-matplotlib" ,python-matplotlib)
5357 ("python-numpy" ,python-numpy)
5358 ("pkg-config" ,pkg-config)
5359 ("python-sphinx" ,python-sphinx)
5360 ("python-numpydoc" ,python-numpydoc)
5361 ("texlive" ,(texlive-updmap.cfg (list texlive-cm-super
5362 texlive-fonts-ec
5363 texlive-generic-iftex
5364 texlive-pdftex
5365 texlive-amsfonts
5366 texlive-latex-capt-of
5367 texlive-latex-cmap
5368 texlive-latex-environ
5369 texlive-latex-eqparbox
5370 texlive-etoolbox
5371 texlive-latex-expdlist
5372 texlive-latex-fancyhdr
5373 texlive-latex-fancyvrb
5374 texlive-latex-fncychap
5375 texlive-latex-float
5376 texlive-latex-framed
5377 texlive-latex-geometry
5378 texlive-latex-graphics
5379 texlive-hyperref
5380 texlive-latex-mdwtools
5381 texlive-latex-multirow
5382 texlive-latex-needspace
5383 texlive-oberdiek
5384 texlive-latex-parskip
5385 texlive-latex-preview
5386 texlive-latex-tabulary
5387 texlive-latex-threeparttable
5388 texlive-latex-titlesec
5389 texlive-latex-trimspaces
5390 texlive-latex-ucs
5391 texlive-latex-upquote
5392 texlive-url
5393 texlive-latex-varwidth
5394 texlive-latex-wrapfig)))
5395 ("texinfo" ,texinfo)
5396 ("perl" ,perl)
5397 ("scipy-sphinx-theme"
5398 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5399 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5400 (method git-fetch)
5401 (uri (git-reference
5402 (url "https://github.com/scipy/scipy-sphinx-theme")
5403 (commit commit)))
5404 (file-name (git-file-name "python-scipy-sphinx-theme"
5405 (string-take commit 7)))
5406 (sha256
5407 (base32
5408 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5409 ,@(package-native-inputs python-numpy)))
5410 (arguments
5411 `(#:tests? #f ; we're only generating the documentation
5412 #:phases
5413 (modify-phases %standard-phases
5414 (delete 'build)
5415 (replace 'install
5416 (lambda* (#:key inputs outputs #:allow-other-keys)
5417 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5418 (doc (string-append
5419 data "/doc/" ,name "-"
5420 ,(package-version python-numpy)))
5421 (info-reader (string-append data "/info"))
5422 (html (string-append doc "/html"))
5423 (scipy-sphinx-theme "scipy-sphinx-theme")
5424 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5425 (pyver ,(string-append "PYVER=")))
5426
5427 ;; FIXME: this is needed to for texlive-updmap.cfg to generate
5428 ;; fonts, which are not found.
5429 (setenv "HOME" "/tmp")
5430
5431 (with-directory-excursion "doc"
5432 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5433 (mkdir-p html)
5434 (invoke "make" "html" pyver)
5435 (invoke "make" "latex" "PAPER=a4" pyver)
5436 (invoke "make" "-C" "build/latex"
5437 "all-pdf" "PAPER=a4" pyver)
5438 ;; FIXME: Generation of the info file fails.
5439 ;; (invoke "make" "info" pyver)
5440 ;; (mkdir-p info)
5441 ;; (copy-file "build/texinfo/numpy.info"
5442 ;; (string-append info "/numpy.info"))
5443 (for-each (lambda (file)
5444 (copy-file (string-append "build/latex" file)
5445 (string-append doc file)))
5446 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5447 (with-directory-excursion "build/html"
5448 (for-each (lambda (file)
5449 (let* ((dir (dirname file))
5450 (tgt-dir (string-append html "/" dir)))
5451 (unless (equal? "." dir)
5452 (mkdir-p tgt-dir))
5453 (install-file file html)))
5454 (find-files "." ".*")))))
5455 #t)))))
5456 (home-page (package-home-page python-numpy))
5457 (synopsis "Documentation for the python-numpy package")
5458 (description (package-description python-numpy))
5459 (license (package-license python-numpy))))
5460
5461 (define-public python-pygit2
5462 (package
5463 (name "python-pygit2")
5464 (version "1.6.0")
5465 (source
5466 (origin
5467 (method url-fetch)
5468 (uri (pypi-uri "pygit2" version))
5469 (sha256
5470 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5471 (build-system python-build-system)
5472 (arguments
5473 '(#:tests? #f)) ; tests don't run correctly in our environment
5474 (propagated-inputs
5475 `(("python-cached-property" ,python-cached-property)
5476 ("python-cffi" ,python-cffi)
5477 ("libgit2" ,libgit2)))
5478 (native-inputs
5479 `(("python-pytest" ,python-pytest)))
5480 (home-page "https://github.com/libgit2/pygit2")
5481 (synopsis "Python bindings for libgit2")
5482 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5483 library, libgit2 implements Git plumbing.")
5484 ;; GPL2.0 only, with linking exception.
5485 (license license:gpl2)))
5486
5487 (define-public python-patiencediff
5488 (package
5489 (name "python-patiencediff")
5490 (version "0.2.0")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "patiencediff" version))
5495 (sha256
5496 (base32
5497 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5498 (build-system python-build-system)
5499 (home-page "https://www.breezy-vcs.org/")
5500 (synopsis "Python implementation of the patiencediff algorithm")
5501 (description
5502 "This package contains a Python implementation of the @code{patiencediff}
5503 algorithm. Patiencediff provides a good balance of performance, nice output for
5504 humans, and implementation simplicity.")
5505 (license license:gpl2)))
5506
5507 (define-public python-pdftotext
5508 (package
5509 (name "python-pdftotext")
5510 (version "2.1.6")
5511 (source
5512 (origin
5513 (method url-fetch)
5514 (uri (pypi-uri "pdftotext" version))
5515 (sha256
5516 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5517 (build-system python-build-system)
5518 (inputs
5519 `(("poppler" ,poppler)))
5520 (home-page "https://github.com/jalan/pdftotext")
5521 (synopsis "Simple PDF text extraction")
5522 (description "Pdftotext is a Python library of PDF text extraction.")
5523 (license license:expat)))
5524
5525 (define-public python-pyparsing
5526 (package
5527 (name "python-pyparsing")
5528 (version "2.4.6")
5529 (source
5530 (origin
5531 (method url-fetch)
5532 (uri (pypi-uri "pyparsing" version))
5533 (sha256
5534 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5535 (build-system python-build-system)
5536 (outputs '("out" "doc"))
5537 (arguments
5538 `(#:tests? #f ; no test target
5539 #:phases
5540 (modify-phases %standard-phases
5541 (add-after 'install 'install-doc
5542 (lambda* (#:key outputs #:allow-other-keys)
5543 (let* ((doc (string-append (assoc-ref outputs "doc")
5544 "/share/doc/" ,name "-" ,version))
5545 (html-doc (string-append doc "/html"))
5546 (examples (string-append doc "/examples")))
5547 (mkdir-p html-doc)
5548 (mkdir-p examples)
5549 (for-each
5550 (lambda (dir tgt)
5551 (map (lambda (file)
5552 (install-file file tgt))
5553 (find-files dir ".*")))
5554 (list "docs" "htmldoc" "examples")
5555 (list doc html-doc examples))
5556 #t))))))
5557 (home-page "https://github.com/pyparsing/pyparsing")
5558 (synopsis "Python parsing class library")
5559 (description
5560 "The pyparsing module is an alternative approach to creating and
5561 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5562 of regular expressions. The pyparsing module provides a library of classes
5563 that client code uses to construct the grammar directly in Python code.")
5564 (license license:expat)))
5565
5566 (define-public python2-pyparsing
5567 (package-with-python2 python-pyparsing))
5568
5569 (define-public python-pyparsing-2.4.7
5570 (package
5571 (inherit python-pyparsing)
5572 (version "2.4.7")
5573 (source
5574 (origin
5575 (method url-fetch)
5576 (uri (pypi-uri "pyparsing" version))
5577 (sha256
5578 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5579
5580 (define-public python-numpydoc
5581 (package
5582 (name "python-numpydoc")
5583 (version "0.8.0")
5584 (source
5585 (origin
5586 (method url-fetch)
5587 (uri (pypi-uri "numpydoc" version))
5588 (sha256
5589 (base32
5590 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5591 (build-system python-build-system)
5592 (propagated-inputs
5593 `(("python-sphinx" ,python-sphinx)))
5594 (native-inputs
5595 `(("python-nose" ,python-nose)))
5596 (home-page "https://pypi.org/project/numpydoc/")
5597 (synopsis
5598 "Numpy's Sphinx extensions")
5599 (description
5600 "Sphinx extension to support docstrings in Numpy format.")
5601 (license license:bsd-2)
5602 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5603
5604 (define-public python2-numpydoc
5605 (let ((base (package-with-python2
5606 (strip-python2-variant python-numpydoc))))
5607 (package/inherit base
5608 (propagated-inputs
5609 `(("python2-jinja2" ,python2-jinja2)
5610 ,@(package-propagated-inputs base))))))
5611
5612 (define-public python-numexpr
5613 (package
5614 (name "python-numexpr")
5615 (version "2.7.3")
5616 (source
5617 (origin
5618 (method url-fetch)
5619 (uri (pypi-uri "numexpr" version))
5620 (sha256
5621 (base32
5622 "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
5623 (build-system python-build-system)
5624 (arguments `(#:tests? #f)) ; no tests included
5625 (propagated-inputs
5626 `(("python-numpy" ,python-numpy)))
5627 (home-page "https://github.com/pydata/numexpr")
5628 (synopsis "Fast numerical expression evaluator for NumPy")
5629 (description
5630 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5631 expressions that operate on arrays are accelerated and use less memory than
5632 doing the same calculation in Python. In addition, its multi-threaded
5633 capabilities can make use of all your cores, which may accelerate
5634 computations, most specially if they are not memory-bounded (e.g. those using
5635 transcendental functions).")
5636 (license license:expat)))
5637
5638 (define-public python2-numexpr
5639 (package-with-python2 python-numexpr))
5640
5641 (define-public python-cycler
5642 (package
5643 (name "python-cycler")
5644 (version "0.10.0")
5645 (source (origin
5646 (method url-fetch)
5647 (uri (pypi-uri "cycler" version))
5648 (sha256
5649 (base32
5650 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5651 (build-system python-build-system)
5652 (arguments
5653 ;; XXX: The current version requires 'coveralls' which we don't have.
5654 ;; Enable this for the next release which uses 'python-pytest'.
5655 '(#:tests? #f))
5656 (propagated-inputs
5657 `(("python-six" ,python-six)))
5658 (home-page "https://matplotlib.org/cycler/")
5659 (synopsis "Composable keyword argument iterator")
5660 (description
5661 "When using @code{matplotlib} and plotting more than one line, it is
5662 common to want to be able to want to be able to cycle over one or more artist
5663 styles; but the plotting logic can quickly become involved.
5664 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5665 @code{Cycler} class was developed.")
5666 (license license:bsd-3)))
5667
5668 (define-public python2-cycler
5669 (package-with-python2 python-cycler))
5670
5671 (define-public python-colorspacious
5672 (package
5673 (name "python-colorspacious")
5674 (version "1.1.2")
5675 (source
5676 (origin
5677 (method git-fetch)
5678 (uri (git-reference
5679 (url "https://github.com/njsmith/colorspacious")
5680 (commit (string-append "v" version))))
5681 (file-name (git-file-name name version))
5682 (sha256
5683 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5684 (build-system python-build-system)
5685 (propagated-inputs
5686 `(("python-numpy" ,python-numpy)))
5687 (native-inputs
5688 `(("python-nose" ,python-nose)))
5689 (arguments
5690 `(#:phases
5691 (modify-phases %standard-phases
5692 (replace 'check
5693 (lambda _
5694 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5695 (home-page "https://github.com/njsmith/colorspacious")
5696 (synopsis "Python library for colorspace conversions")
5697 (description "@code{colorspacious} is a Python library that lets you
5698 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5699 (license license:expat)))
5700
5701 (define-public python2-colorspacious
5702 (package-with-python2 python-colorspacious))
5703
5704 (define-public python-matplotlib
5705 (package
5706 (name "python-matplotlib")
5707 (version "3.4.3")
5708 (source
5709 (origin
5710 (method url-fetch)
5711 (uri (pypi-uri "matplotlib" version))
5712 (sha256
5713 (base32 "06032j0ccjxldx4z9kf97qps2g36mfgvy1nap3b9n75kzmnm4kzw"))))
5714 (build-system python-build-system)
5715 (propagated-inputs ; the following packages are all needed at run time
5716 `(("python-cycler" ,python-cycler)
5717 ("python-kiwisolver" ,python-kiwisolver)
5718 ("python-pyparsing" ,python-pyparsing)
5719 ("python-pygobject" ,python-pygobject)
5720 ("python-certifi" ,python-certifi)
5721 ("gobject-introspection" ,gobject-introspection)
5722 ("python-tkinter" ,python "tk")
5723 ("python-dateutil" ,python-dateutil)
5724 ("python-numpy" ,python-numpy)
5725 ("python-pillow" ,python-pillow)
5726 ("python-pytz" ,python-pytz)
5727 ("python-six" ,python-six)
5728 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5729 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5730 ;; object. For this reason we need to import both libraries.
5731 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5732 ("python-pycairo" ,python-pycairo)
5733 ("python-cairocffi" ,python-cairocffi)))
5734 (inputs
5735 `(("libpng" ,libpng)
5736 ("freetype" ,freetype)
5737 ("qhull" ,qhull)
5738 ("cairo" ,cairo)
5739 ("glib" ,glib)
5740 ;; FIXME: Add backends when available.
5741 ;("python-wxpython" ,python-wxpython)
5742 ("tcl" ,tcl)
5743 ("tk" ,tk)))
5744 (native-inputs
5745 `(("pkg-config" ,pkg-config)
5746 ("python-pytest" ,python-pytest)
5747 ("python-mock" ,python-mock)
5748 ("python-wheel" ,python-wheel)
5749 ("unzip" ,unzip)
5750 ("jquery-ui"
5751 ,(origin
5752 (method url-fetch)
5753 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5754 (sha256
5755 (base32
5756 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5757 (arguments
5758 `(#:phases
5759 (modify-phases %standard-phases
5760 ;; XXX We disable all image comparison tests because we're using a
5761 ;; newer version of FreeType than matplotlib expects. This leads to
5762 ;; minor differences throughout the tests.
5763 (add-after 'unpack 'fix-and-disable-failing-tests
5764 (lambda _
5765 (substitute* (append (find-files "lib/matplotlib/tests/"
5766 "test_.*\\.py$")
5767 (find-files "lib/mpl_toolkits/tests"
5768 "test_.*\\.py$"))
5769 (("^from matplotlib" match)
5770 (string-append "import pytest\n" match))
5771 (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
5772 indent)
5773 (string-append indent
5774 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5775 match)))
5776 (substitute* "lib/matplotlib/tests/test_animation.py"
5777 (("/bin/sh") (which "sh")))
5778 (for-each delete-file
5779 ;; test_normal_axes, test_get_tightbbox_polar
5780 '("lib/matplotlib/tests/test_axes.py"
5781 "lib/matplotlib/tests/test_polar.py"
5782 ;; We don't use the webagg backend and this test
5783 ;; forces it.
5784 "lib/matplotlib/tests/test_backend_webagg.py"
5785 ;; test_outward_ticks
5786 "lib/matplotlib/tests/test_tightlayout.py"
5787 ;; test_hidden_axes fails with minor extent
5788 ;; differences, possibly due to the use of a
5789 ;; different version of FreeType.
5790 "lib/matplotlib/tests/test_constrainedlayout.py"
5791 ;; Fontconfig returns no fonts.
5792 "lib/matplotlib/tests/test_font_manager.py"))
5793 #t))
5794 (add-before 'install 'install-jquery-ui
5795 (lambda* (#:key outputs inputs #:allow-other-keys)
5796 (let* ((python-version (python-version
5797 (assoc-ref inputs "python")))
5798 (dir
5799 (string-append (assoc-ref outputs "out")
5800 "/lib/python" python-version
5801 "/site-packages"
5802 "/matplotlib/backends/web_backend/")))
5803 (mkdir-p dir)
5804 (invoke "unzip"
5805 (assoc-ref inputs "jquery-ui")
5806 "-d" dir))
5807 #t))
5808 (replace 'check
5809 (lambda* (#:key outputs inputs #:allow-other-keys)
5810 (add-installed-pythonpath inputs outputs)
5811 (invoke "python" "tests.py" "-v"
5812 "-m" "not network and not webagg")))
5813 (add-before 'build 'configure-environment
5814 (lambda* (#:key outputs inputs #:allow-other-keys)
5815 (let ((cairo (assoc-ref inputs "cairo")))
5816 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5817 ;; has not effect.
5818 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5819 (setenv "HOME" (getcwd))
5820 ;; Fix rounding errors when using the x87 FPU.
5821 (when (string-prefix? "i686" ,(%current-system))
5822 (setenv "CFLAGS" "-ffloat-store"))
5823 (call-with-output-file "setup.cfg"
5824 (lambda (port)
5825 (format port "[libs]~%
5826 system_freetype = true
5827 system_qhull = true
5828 [directories]~%
5829 basedirlist = ~a,~a~%
5830 [packages]~%
5831 tests = True~%"
5832 (assoc-ref inputs "tcl")
5833 (assoc-ref inputs "tk")))))
5834 #t)))))
5835 (home-page "https://matplotlib.org/")
5836 (synopsis "2D plotting library for Python")
5837 (description
5838 "Matplotlib is a Python 2D plotting library which produces publication
5839 quality figures in a variety of hardcopy formats and interactive environments
5840 across platforms. Matplotlib can be used in Python scripts, the python and
5841 ipython shell, web application servers, and six graphical user interface
5842 toolkits.")
5843 (license license:psfl)
5844 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5845
5846 (define-public python2-matplotlib
5847 (let ((matplotlib (package-with-python2
5848 (strip-python2-variant python-matplotlib))))
5849 (package (inherit matplotlib)
5850 (version "2.2.4")
5851 (source
5852 (origin
5853 (method url-fetch)
5854 (uri (pypi-uri "matplotlib" version))
5855 (sha256
5856 (base32
5857 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5858 (arguments
5859 (substitute-keyword-arguments (package-arguments matplotlib)
5860 ((#:phases phases)
5861 `(modify-phases ,phases
5862 (replace 'install-jquery-ui
5863 (lambda* (#:key outputs inputs #:allow-other-keys)
5864 (let ((dir (string-append (assoc-ref outputs "out")
5865 "/lib/python2.7/site-packages/"
5866 "matplotlib/backends/web_backend/")))
5867 (mkdir-p dir)
5868 (invoke "unzip"
5869 (assoc-ref inputs "jquery-ui")
5870 "-d" dir))
5871 #t))
5872 (delete 'fix-and-disable-failing-tests)
5873 (delete 'check))))) ; These tests weren't run the the past.
5874 ;; Make sure to use special packages for Python 2 instead
5875 ;; of those automatically rewritten by package-with-python2.
5876 (propagated-inputs
5877 `(("python2-pycairo" ,python2-pycairo)
5878 ("python2-backports-functools-lru-cache"
5879 ,python2-backports-functools-lru-cache)
5880 ("python2-functools32" ,python2-functools32)
5881 ("python2-pygobject-2" ,python2-pygobject-2)
5882 ("python2-subprocess32" ,python2-subprocess32)
5883 ("python2-tkinter" ,python-2 "tk")
5884 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5885 '("python-cairocffi"
5886 "python-pycairo"
5887 "python-pygobject"
5888 "python-tkinter")))))))
5889
5890 (define-public python-matplotlib-documentation
5891 (package
5892 (name "python-matplotlib-documentation")
5893 (version (package-version python-matplotlib))
5894 (source (package-source python-matplotlib))
5895 (build-system python-build-system)
5896 (native-inputs
5897 `(("python-matplotlib" ,python-matplotlib)
5898 ("python-colorspacious" ,python-colorspacious)
5899 ("python-sphinx" ,python-sphinx)
5900 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5901 ("python-sphinx-gallery" ,python-sphinx-gallery)
5902 ("python-numpydoc" ,python-numpydoc)
5903 ("python-ipython" ,python-ipython)
5904 ("python-ipykernel" ,python-ipykernel)
5905 ("python-mock" ,python-mock)
5906 ("graphviz" ,graphviz)
5907 ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
5908 texlive-latex-amsmath
5909 texlive-latex-enumitem
5910 texlive-latex-expdlist
5911 texlive-latex-geometry
5912 texlive-latex-preview
5913 texlive-latex-type1cm
5914 texlive-latex-ucs
5915
5916 texlive-pdftex
5917
5918 texlive-fonts-ec
5919 texlive-times
5920 texlive-txfonts)))
5921 ("texinfo" ,texinfo)
5922 ,@(package-native-inputs python-matplotlib)))
5923 (arguments
5924 `(#:tests? #f ; we're only generating documentation
5925 #:phases
5926 (modify-phases %standard-phases
5927 ;; The tests in python-matplotlib are run after the install phase, so
5928 ;; we need to delete the extra phase here.
5929 (delete 'check)
5930 (replace 'build
5931 (lambda _
5932 (chdir "doc")
5933 (setenv "PYTHONPATH" "../examples/units")
5934 (substitute* "conf.py"
5935 ;; Don't use git.
5936 (("^SHA = check_output.*")
5937 (string-append "SHA = \"" ,version "\"\n"))
5938 ;; Don't fetch intersphinx files from the Internet
5939 (("^explicit_order_folders" m)
5940 (string-append "intersphinx_mapping = {}\n" m))
5941 (("'sphinx.ext.intersphinx',") "")
5942 ;; Disable URL embedding which requires internet access.
5943 (("'https://docs.scipy.org/doc/numpy'") "None")
5944 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5945 (invoke "make"
5946 "SPHINXBUILD=sphinx-build"
5947 "SPHINXOPTS=" ; don't abort on warnings
5948 "html" "texinfo")))
5949 (replace 'install
5950 (lambda* (#:key inputs outputs #:allow-other-keys)
5951 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5952 (doc (string-append data "/doc/python-matplotlib-" ,version))
5953 (info (string-append data "/info"))
5954 (html (string-append doc "/html")))
5955 (mkdir-p html)
5956 (mkdir-p info)
5957 (copy-recursively "build/html" html)
5958 (symlink (string-append html "/_images")
5959 (string-append info "/matplotlib-figures"))
5960 (with-directory-excursion "build/texinfo"
5961 (substitute* "matplotlib.texi"
5962 (("@image\\{([^,]*)" all file)
5963 (string-append "@image{matplotlib-figures/" file)))
5964 (symlink (string-append html "/_images")
5965 "./matplotlib-figures")
5966 (invoke "makeinfo" "--no-split"
5967 "-o" "matplotlib.info" "matplotlib.texi"))
5968 (install-file "build/texinfo/matplotlib.info" info)))))))
5969 (home-page (package-home-page python-matplotlib))
5970 (synopsis "Documentation for the python-matplotlib package")
5971 (description (package-description python-matplotlib))
5972 (license (package-license python-matplotlib))))
5973
5974 (define-public python-matplotlib-venn
5975 (package
5976 (name "python-matplotlib-venn")
5977 (version "0.11.5")
5978 (source
5979 (origin
5980 (method url-fetch)
5981 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5982 (sha256
5983 (base32
5984 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5985 (build-system python-build-system)
5986 (arguments '(#:tests? #f)) ; tests are not included
5987 (propagated-inputs
5988 `(("python-matplotlib" ,python-matplotlib)
5989 ("python-numpy" ,python-numpy)
5990 ("python-scipy" ,python-scipy)))
5991 (native-inputs
5992 `(("unzip" ,unzip)))
5993 (home-page "https://github.com/konstantint/matplotlib-venn")
5994 (synopsis "Plot area-proportional Venn diagrams")
5995 (description
5996 "This package provides tools for plotting area-proportional two- and
5997 three-way Venn diagrams in @code{matplotlib}.")
5998 (license license:expat)))
5999
6000 (define-public python-pysnptools
6001 (package
6002 (name "python-pysnptools")
6003 (version "0.4.11")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (pypi-uri "pysnptools" version))
6008 (sha256
6009 (base32
6010 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
6011 (build-system python-build-system)
6012 (arguments
6013 `(#:tests? #f ; no test data are included
6014 #:phases
6015 (modify-phases %standard-phases
6016 (replace 'check
6017 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6018 (if tests?
6019 (begin
6020 (add-installed-pythonpath inputs outputs)
6021 (invoke "python3" "pysnptools/test.py"))
6022 #t))))))
6023 (propagated-inputs
6024 `(("python-dill" ,python-dill)
6025 ("python-h5py" ,python-h5py)
6026 ("python-numpy" ,python-numpy)
6027 ("python-pandas" ,python-pandas)
6028 ("python-psutil" ,python-psutil)
6029 ("python-scipy" ,python-scipy)))
6030 (native-inputs
6031 `(("python-cython" ,python-cython)))
6032 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
6033 (synopsis "Library for reading and manipulating genetic data")
6034 (description
6035 "PySnpTools is a library for reading and manipulating genetic data. It
6036 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
6037 those files. It can also efficiently manipulate ranges of integers using set
6038 operators such as union, intersection, and difference.")
6039 (license license:asl2.0)))
6040
6041 (define-public python2-pysnptools
6042 (package-with-python2 python-pysnptools))
6043
6044 (define-public python-pykdtree
6045 (package
6046 (name "python-pykdtree")
6047 (version "1.3.4")
6048 (source
6049 (origin
6050 (method url-fetch)
6051 (uri (pypi-uri "pykdtree" version))
6052 (sha256
6053 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
6054 (build-system python-build-system)
6055 (native-inputs
6056 `(("python-nose" ,python-nose)))
6057 (propagated-inputs
6058 `(("python-numpy" ,python-numpy)))
6059 (home-page "https://github.com/storpipfugl/pykdtree")
6060 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
6061 (description
6062 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
6063 search in Python.")
6064 (license license:lgpl3+)))
6065
6066 (define-public python-wurlitzer
6067 (package
6068 (name "python-wurlitzer")
6069 (version "2.0.1")
6070 (source
6071 (origin
6072 (method url-fetch)
6073 (uri (pypi-uri "wurlitzer" version))
6074 (sha256
6075 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
6076 (build-system python-build-system)
6077 (arguments
6078 '(#:phases
6079 (modify-phases %standard-phases
6080 (replace 'check
6081 (lambda _
6082 (invoke "pytest" "-vv" "test.py"))))))
6083 (native-inputs
6084 `(("python-mock" ,python-mock)
6085 ("python-pytest" ,python-pytest)))
6086 (home-page "https://github.com/minrk/wurlitzer")
6087 (synopsis "Capture C-level output in context managers")
6088 (description
6089 "This library helps to redirect @code{sys.stdout} to a stream or a file
6090 while executing some piece of code, including C code running within a Python
6091 process.")
6092 (license license:expat)))
6093
6094 (define-public python-socksipy-branch
6095 (package
6096 (name "python-socksipy-branch")
6097 (version "1.01")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 (uri (pypi-uri "SocksiPy-branch" version))
6102 (sha256
6103 (base32
6104 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
6105 (build-system python-build-system)
6106 (arguments
6107 `(#:tests? #f)) ; There are no tests
6108 (home-page "https://code.google.com/archive/p/socksipy-branch/")
6109 (synopsis "Python SOCKS module")
6110 (description
6111 "SocksiPy - A Python SOCKS client module. It provides a
6112 socket-like interface that supports connections to any TCP
6113 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
6114 The original version was developed by Dan Haim, this is a
6115 branch created by Mario Vilas to address some open issues,
6116 as the original project seems to have been abandoned circa 2007.")
6117 (license license:bsd-3)))
6118
6119 (define-public python2-socksipy-branch
6120 (package-with-python2 python-socksipy-branch))
6121
6122 (define-public python-socksipychain
6123 (package
6124 (name "python-socksipychain")
6125 (version "2.1.2")
6126 (source
6127 (origin
6128 (method git-fetch)
6129 (uri (git-reference
6130 (url "https://github.com/pagekite/PySocksipyChain")
6131 (commit (string-append "v" version))))
6132 (file-name (git-file-name name version))
6133 (sha256
6134 (base32
6135 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
6136 (build-system python-build-system)
6137 (arguments
6138 `(#:tests? #f)) ; Tests try to access the network.
6139 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
6140 (synopsis "Python SOCKS module with chained proxies support")
6141 (description
6142 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6143 adds support for arbitrary chaining of proxy servers and various modes of
6144 TLS/SSL encryption. It was developed for use in PageKite, and also includes
6145 a simple netcat replacement with chaining support.")
6146 (license license:bsd-3)))
6147
6148 (define-public python-pycodestyle
6149 (package
6150 (name "python-pycodestyle")
6151 (version "2.7.0")
6152 (source
6153 (origin
6154 (method url-fetch)
6155 (uri (pypi-uri "pycodestyle" version))
6156 (sha256
6157 (base32
6158 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
6159 (build-system python-build-system)
6160 (arguments
6161 `(#:phases
6162 (modify-phases %standard-phases
6163 (replace 'check
6164 (lambda _
6165 (invoke "pytest" "-vv"))))))
6166 (native-inputs
6167 `(("python-pytest" ,python-pytest)))
6168 (home-page "https://pycodestyle.readthedocs.io/")
6169 (synopsis "Python style guide checker")
6170 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6171 Python code against some of the style conventions in
6172 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6173 (license license:expat)))
6174
6175 (define-public python2-pycodestyle
6176 (package-with-python2 python-pycodestyle))
6177
6178 (define-public python-pycodestyle-2.6
6179 (package
6180 (inherit python-pycodestyle)
6181 (version "2.6.0")
6182 (source (origin
6183 (method url-fetch)
6184 (uri (pypi-uri "pycodestyle" version))
6185 (sha256
6186 (base32
6187 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6188
6189 (define-public python-multidict
6190 (package
6191 (name "python-multidict")
6192 (version "4.7.5")
6193 (source
6194 (origin
6195 (method url-fetch)
6196 (uri (pypi-uri "multidict" version))
6197 (sha256
6198 (base32
6199 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6200 (build-system python-build-system)
6201 (arguments
6202 '(#:phases (modify-phases %standard-phases
6203 (replace 'check
6204 (lambda* (#:key tests? #:allow-other-keys)
6205 (if tests?
6206 (invoke "pytest" "-vv")
6207 (format #t "test suite not run~%")))))))
6208 (native-inputs
6209 `(("python-pytest" ,python-pytest)
6210 ("python-pytest-cov" ,python-pytest-cov)))
6211 (home-page "https://github.com/aio-libs/multidict/")
6212 (synopsis "Multidict implementation")
6213 (description "Multidict is dict-like collection of key-value pairs
6214 where key might be occurred more than once in the container.")
6215 (license license:asl2.0)))
6216
6217 (define-public python-orderedmultidict
6218 (package
6219 (name "python-orderedmultidict")
6220 (version "1.0")
6221 (source
6222 (origin
6223 (method url-fetch)
6224 (uri (pypi-uri "orderedmultidict" version))
6225 (sha256
6226 (base32
6227 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6228 (build-system python-build-system)
6229 (arguments
6230 `(#:phases
6231 (modify-phases %standard-phases
6232 (add-after 'unpack 'fix-tests
6233 (lambda _
6234 ;; The package uses nosetest for running the tests.
6235 ;; Adding this initfile allows to run the test suite
6236 ;; without requiring nosetest.
6237 (with-output-to-file "tests/__init__.py" newline)
6238 #t)))))
6239 (propagated-inputs
6240 `(("python-six" ,python-six)))
6241 (native-inputs
6242 `(("python-pycodestyle" ,python-pycodestyle)))
6243 (home-page "https://github.com/gruns/orderedmultidict")
6244 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6245 (description "This package contains a library for ordered multivalue
6246 dictionaries. A multivalue dictionary is a dictionary that can store
6247 multiple values for the same key. An ordered multivalue dictionary is a
6248 multivalue dictionary that retains the order of insertions and deletions.")
6249 (license license:unlicense)))
6250
6251 (define-public python2-orderedmultidict
6252 (package-with-python2 python-orderedmultidict))
6253
6254 (define-public python-autopep8
6255 (package
6256 (name "python-autopep8")
6257 (version "1.5.3")
6258 (source
6259 (origin
6260 (method url-fetch)
6261 (uri (pypi-uri "autopep8" version))
6262 (sha256
6263 (base32
6264 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6265 (build-system python-build-system)
6266 (propagated-inputs
6267 `(("python-pycodestyle" ,python-pycodestyle)
6268 ("python-toml" ,python-toml)))
6269 (home-page "https://github.com/hhatto/autopep8")
6270 (synopsis "Format Python code according to the PEP 8 style guide")
6271 (description
6272 "@code{autopep8} automatically formats Python code to conform to
6273 the PEP 8 style guide. It uses the pycodestyle utility to determine
6274 what parts of the code needs to be formatted. @code{autopep8} is
6275 capable of fixing most of the formatting issues that can be reported
6276 by pycodestyle.")
6277 (license (license:non-copyleft
6278 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6279
6280 (define-public python2-autopep8
6281 (package-with-python2 python-autopep8))
6282
6283 (define-public python-distlib
6284 (package
6285 (name "python-distlib")
6286 (version "0.3.1")
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "distlib" version ".zip"))
6291 (sha256
6292 (base32
6293 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
6294 (build-system python-build-system)
6295 (arguments
6296 `(#:phases
6297 (modify-phases %standard-phases
6298 (add-before 'build 'no-/bin/sh
6299 (lambda _
6300 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6301 (("/bin/sh") (which "sh")))
6302 #t))
6303 (add-before 'check 'prepare-test-env
6304 (lambda _
6305 (setenv "HOME" "/tmp")
6306 ;; NOTE: Any value works, the variable just has to be present.
6307 (setenv "SKIP_ONLINE" "1")
6308 #t)))))
6309 (native-inputs `(("unzip" ,unzip)))
6310 (home-page "https://bitbucket.org/pypa/distlib")
6311 (synopsis "Distribution utilities")
6312 (description "Distlib is a library which implements low-level functions that
6313 relate to packaging and distribution of Python software. It is intended to be
6314 used as the basis for third-party packaging tools.")
6315 (license license:psfl)))
6316
6317 (define-public python-distutils-extra
6318 (package
6319 (name "python-distutils-extra")
6320 (version "2.38")
6321 (source
6322 (origin
6323 (method url-fetch)
6324 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6325 version "/+download/python-distutils-extra-"
6326 version ".tar.gz"))
6327 (sha256
6328 (base32
6329 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6330 (build-system python-build-system)
6331 (home-page "https://launchpad.net/python-distutils-extra/")
6332 (synopsis "Enhancements to Python's distutils")
6333 (description
6334 "The python-distutils-extra module enables you to easily integrate
6335 gettext support, themed icons, and scrollkeeper-based documentation into
6336 Python's distutils.")
6337 (license license:gpl2)))
6338
6339 (define-public python2-distutils-extra
6340 (package-with-python2 python-distutils-extra))
6341
6342 (define-public python2-elib.intl
6343 (package
6344 (name "python2-elib.intl")
6345 (version "0.0.3")
6346 (source
6347 (origin
6348 ;; This project doesn't tag releases or publish tarballs, so we take
6349 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6350 (method git-fetch)
6351 (uri (git-reference
6352 (url "https://github.com/dieterv/elib.intl")
6353 (commit "d09997cfef")))
6354 (file-name (string-append name "-" version "-checkout"))
6355 (sha256
6356 (base32
6357 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6358 (build-system python-build-system)
6359 (arguments
6360 ;; incompatible with Python 3 (exception syntax)
6361 `(#:python ,python-2
6362 #:tests? #f))
6363 (home-page "https://github.com/dieterv/elib.intl")
6364 (synopsis "Enhanced internationalization for Python")
6365 (description
6366 "The elib.intl module provides enhanced internationalization (I18N)
6367 services for your Python modules and applications.")
6368 (license license:lgpl3+)))
6369
6370 (define-public python-olefile
6371 (package
6372 (name "python-olefile")
6373 (version "0.46")
6374 (source
6375 (origin
6376 (method url-fetch)
6377 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6378 "download/v" version "/olefile-" version ".tar.gz"))
6379 (file-name (string-append name "-" version ".tar.gz"))
6380 (sha256
6381 (base32
6382 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6383 (build-system python-build-system)
6384 (home-page "https://www.decalage.info/python/olefileio")
6385 (synopsis "Read and write Microsoft OLE2 files.")
6386 (description
6387 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6388 Storage or Compound Document, Microsoft Office). It is an improved version of
6389 the OleFileIO module from PIL, the Python Image Library.")
6390 (license license:bsd-3)))
6391
6392 (define-public python2-olefile
6393 (package-with-python2 python-olefile))
6394
6395 (define-public python-pikepdf
6396 (package
6397 (name "python-pikepdf")
6398 (version "2.16.1")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "pikepdf" version))
6403 (sha256
6404 (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
6405 (build-system python-build-system)
6406 (arguments
6407 `(#:tests? #false)) ;require python-xmp-toolkit
6408 (native-inputs
6409 `(("pybind11" ,pybind11)
6410 ("python-setuptools" ,python-setuptools)
6411 ("python-setuptools-scm" ,python-setuptools-scm)
6412 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6413 ("python-toml" ,python-toml)
6414 ("python-wheel" ,python-wheel)))
6415 (inputs
6416 `(("qpdf" ,qpdf)))
6417 (propagated-inputs
6418 `(("python-lxml" ,python-lxml)
6419 ("python-pillow" ,python-pillow)))
6420 (home-page "https://github.com/pikepdf/pikepdf")
6421 (synopsis "Read and write PDFs with Python")
6422 (description
6423 "pikepdf is a Python library for reading and writing PDF files.")
6424 (license license:mpl2.0)))
6425
6426 (define-public python-pillow
6427 (package
6428 (name "python-pillow")
6429 (version "8.1.1")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (pypi-uri "Pillow" version))
6434 (sha256
6435 (base32
6436 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6437 (build-system python-build-system)
6438 (native-inputs
6439 `(("python-pytest" ,python-pytest)))
6440 (inputs
6441 `(("freetype" ,freetype)
6442 ("lcms" ,lcms)
6443 ("libjpeg" ,libjpeg-turbo)
6444 ("libtiff" ,libtiff)
6445 ("libwebp" ,libwebp)
6446 ("openjpeg" ,openjpeg)
6447 ("zlib" ,zlib)))
6448 (propagated-inputs
6449 `(("python-olefile" ,python-olefile)))
6450 (arguments
6451 `(#:phases
6452 (modify-phases %standard-phases
6453 (add-after 'unpack 'patch-ldconfig
6454 (lambda _
6455 (substitute* "setup.py"
6456 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6457 (replace 'check
6458 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6459 (if tests?
6460 (begin
6461 (setenv "HOME" (getcwd))
6462 ;; Make installed package available for running the tests.
6463 (add-installed-pythonpath inputs outputs)
6464 (invoke "python" "selftest.py" "--installed")
6465 (invoke "python" "-m" "pytest" "-vv"))
6466 #t))))))
6467 (home-page "https://python-pillow.org")
6468 (synopsis "Fork of the Python Imaging Library")
6469 (description
6470 "The Python Imaging Library adds image processing capabilities to your
6471 Python interpreter. This library provides extensive file format support, an
6472 efficient internal representation, and fairly powerful image processing
6473 capabilities. The core image library is designed for fast access to data
6474 stored in a few basic pixel formats. It should provide a solid foundation for
6475 a general image processing tool.")
6476 (properties `((python2-variant . ,(delay python2-pillow))))
6477 (license (license:x11-style
6478 "http://www.pythonware.com/products/pil/license.htm"
6479 "The PIL Software License"))))
6480
6481 (define-public python2-pillow
6482 (package-with-python2
6483 (package
6484 (inherit (strip-python2-variant python-pillow))
6485 ;; Version 6 is the last series with Python 2 support.
6486 (version "6.2.2")
6487 (source
6488 (origin
6489 (method url-fetch)
6490 (uri (pypi-uri "Pillow" version))
6491 (sha256
6492 (base32
6493 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
6494 (arguments
6495 (substitute-keyword-arguments (package-arguments python-pillow)
6496 ;; FIXME: One of the tests is failing.
6497 ((#:tests? _ #f) #f))))))
6498
6499 (define-public python-pillow-2.9
6500 (package
6501 (inherit python-pillow)
6502 (version "2.9.0")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "Pillow" version))
6507 (sha256
6508 (base32
6509 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6510 (arguments
6511 (substitute-keyword-arguments (package-arguments python-pillow)
6512 ((#:tests? _ #f) #f)))
6513 (properties '((hidden? #t)))))
6514
6515 (define-public python-pillow-simd
6516 (package
6517 (inherit python-pillow)
6518 (name "python-pillow-simd")
6519 (version "7.1.2")
6520 ;; The PyPI tarball does not include test files.
6521 (source
6522 (origin
6523 (method git-fetch)
6524 (uri (git-reference
6525 (url "https://github.com/uploadcare/pillow-simd")
6526 (commit version)))
6527 (file-name (git-file-name name version))
6528 (sha256
6529 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6530 (arguments
6531 (substitute-keyword-arguments
6532 (package-arguments python-pillow)
6533 ((#:phases phases)
6534 `(modify-phases ,phases
6535 (add-after 'unpack 'make-tests-writable
6536 (lambda _
6537 (for-each make-file-writable (find-files "Tests"))
6538 #t))))))
6539 (inputs
6540 `(("libraqm" ,libraqm)
6541 ("libimagequant" ,libimagequant)
6542 ,@(package-inputs python-pillow)))
6543 (home-page "https://github.com/uploadcare/pillow-simd")
6544 (synopsis "Fork of the Python Imaging Library (Pillow)")
6545 (description "This package is a fork of Pillow which adds support for SIMD
6546 parallelism.")))
6547
6548 (define-public python-imagecodecs
6549 (package
6550 (name "python-imagecodecs")
6551 (version "2021.3.31")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 (uri (pypi-uri "imagecodecs" version))
6556 (sha256
6557 (base32
6558 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6559 (modules '((guix build utils)))
6560 (snippet
6561 '(begin
6562 ;; Unbundle 3rd party modules.
6563 (delete-file-recursively "3rdparty")
6564 ;; Delete pre-generated Cython files.
6565 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6566 #t))))
6567 (build-system python-build-system)
6568 (arguments
6569 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6570 #:phases
6571 (modify-phases %standard-phases
6572 (add-after 'unpack 'create-configuration
6573 (lambda* (#:key inputs #:allow-other-keys)
6574 ;; By default everything is enabled. We can selectively disable
6575 ;; extensions (and thus dependencies) by deleting them from the
6576 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6577 (call-with-output-file "imagecodecs_distributor_setup.py"
6578 (lambda (port)
6579 (format port "\
6580 def customize_build(EXTENSIONS, OPTIONS):
6581 del EXTENSIONS['aec']
6582 del EXTENSIONS['avif']
6583 del EXTENSIONS['bitshuffle']
6584 del EXTENSIONS['deflate']
6585 del EXTENSIONS['jpeg2k']
6586 del EXTENSIONS['jpeg12']
6587 del EXTENSIONS['jpegls']
6588 del EXTENSIONS['jpegxl']
6589 del EXTENSIONS['jpegxr']
6590 del EXTENSIONS['lerc']
6591 del EXTENSIONS['ljpeg']
6592 del EXTENSIONS['lzf']
6593 del EXTENSIONS['zfp']
6594 del EXTENSIONS['zopfli']
6595 OPTIONS['cythonize']
6596 ")))
6597 #t)))))
6598 (inputs
6599 `(("c-blosc" ,c-blosc)
6600 ("giflib" ,giflib)
6601 ("google-brotli" ,google-brotli)
6602 ("libjpeg-turbo" ,libjpeg-turbo)
6603 ("libpng" ,libpng)
6604 ("libtiff" ,libtiff)
6605 ("libwebp" ,libwebp)
6606 ("lz4" ,lz4)
6607 ("snappy" ,snappy)
6608 ("xz" ,xz)
6609 ("zlib" ,zlib)
6610 ("zstd" ,zstd "lib")))
6611 (propagated-inputs
6612 `(("python-numpy" ,python-numpy)))
6613 (native-inputs
6614 ;; For building.
6615 `(("python-cython" ,python-cython)
6616 ;; For testing. Incomplete.
6617 ;("python-numcodecs" ,python-numcodecs)
6618 ;("python-zarr" ,python-zarr)
6619 ;("python-pytest" ,python-pytest)
6620 ))
6621 (home-page "https://www.lfd.uci.edu/~gohlke/")
6622 (synopsis
6623 "Image transformation, compression, and decompression codecs")
6624 (description
6625 "Imagecodecs is a Python library that provides block-oriented, in-memory
6626 buffer transformation, compression, and decompression functions for use in the
6627 tifffile, czifile, and other scientific image input/output modules.")
6628 (license license:bsd-3)))
6629
6630 (define-public python-roifile
6631 (package
6632 (name "python-roifile")
6633 (version "2020.11.28")
6634 (source
6635 (origin
6636 (method url-fetch)
6637 (uri (pypi-uri "roifile" version))
6638 (sha256
6639 (base32
6640 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6641 (build-system python-build-system)
6642 (arguments `(#:tests? #f)) ; there are none
6643 (propagated-inputs
6644 `(("python-numpy" ,python-numpy)))
6645 (home-page "https://www.lfd.uci.edu/~gohlke/")
6646 (synopsis "Read and write ImageJ ROI format")
6647 (description "Roifile is a Python library to read, write, create, and plot
6648 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6649 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6650 (license license:bsd-3)))
6651
6652 (define-public python-tifffile
6653 (package
6654 (name "python-tifffile")
6655 (version "2021.4.8")
6656 (source
6657 (origin
6658 (method url-fetch)
6659 (uri (pypi-uri "tifffile" version))
6660 (sha256
6661 (base32
6662 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6663 (build-system python-build-system)
6664 ;; Tests require lfdfiles, which depends on tifffile
6665 (arguments `(#:tests? #f))
6666 (propagated-inputs
6667 `(("python-numpy" ,python-numpy)
6668 ("python-imagecodecs" ,python-imagecodecs)))
6669 (home-page "https://www.lfd.uci.edu/~gohlke/")
6670 (synopsis "Read and write TIFF(r) files")
6671 (description "This package lets you read image and metadata from many
6672 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6673 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6674 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6675 (license license:bsd-3)))
6676
6677 (define-public python-lfdfiles
6678 (package
6679 (name "python-lfdfiles")
6680 (version "2021.2.22")
6681 (source
6682 (origin
6683 (method url-fetch)
6684 (uri (pypi-uri "lfdfiles" version))
6685 (sha256
6686 (base32
6687 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6688 (modules '((guix build utils)))
6689 (snippet
6690 '(begin
6691 ;; Delete pre-generated Cython files.
6692 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6693 #t))))
6694 (build-system python-build-system)
6695 (arguments
6696 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6697 (propagated-inputs
6698 `(("python-click" ,python-click)
6699 ("python-numpy" ,python-numpy)
6700 ("python-tifffile" ,python-tifffile)))
6701 (native-inputs `(("python-cython" ,python-cython)))
6702 (home-page "https://www.lfd.uci.edu/~gohlke/")
6703 (synopsis "Work with LFD data files")
6704 (description
6705 "Lfdfiles is a Python library and console script for reading, writing,
6706 converting, and viewing many of the proprietary file formats used to store
6707 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6708 (license license:bsd-3)))
6709
6710 (define-public python-imageio
6711 (package
6712 (name "python-imageio")
6713 (version "2.8.0")
6714 (source
6715 (origin
6716 (method url-fetch)
6717 (uri (pypi-uri "imageio" version))
6718 (sha256
6719 (base32
6720 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6721 (build-system python-build-system)
6722 (arguments
6723 `(#:tests? #f ; many tests require online data
6724 #:phases
6725 (modify-phases %standard-phases
6726 (replace 'check
6727 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6728 (if tests?
6729 (begin
6730 ;; Make installed package available for running the tests.
6731 (add-installed-pythonpath inputs outputs)
6732 (invoke "pytest" "-vv"))
6733 #t))))))
6734 (propagated-inputs
6735 `(("python-numpy" ,python-numpy)
6736 ("python-pillow" ,python-pillow)
6737 ("python-psutil" ,python-psutil)))
6738 (native-inputs
6739 `(("python-pytest" ,python-pytest)))
6740 (home-page "https://imageio.github.io/")
6741 (synopsis "Library for reading and writing a wide range of image data")
6742 (description
6743 "Imageio is a Python library that provides an easy interface to read and
6744 write a wide range of image data, including animated images, video, volumetric
6745 data, and scientific formats.")
6746 (license license:bsd-2)))
6747
6748 (define-public python-pycparser
6749 (package
6750 (name "python-pycparser")
6751 (version "2.20")
6752 (source
6753 (origin
6754 (method url-fetch)
6755 (uri (pypi-uri "pycparser" version))
6756 (sha256
6757 (base32
6758 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6759 (outputs '("out" "doc"))
6760 (build-system python-build-system)
6761 (native-inputs
6762 `(("pkg-config" ,pkg-config)))
6763 (arguments
6764 `(#:phases
6765 (modify-phases %standard-phases
6766 (replace 'check
6767 (lambda _
6768 (with-directory-excursion "tests"
6769 (invoke "python" "all_tests.py"))
6770 #t))
6771 (add-after 'install 'install-doc
6772 (lambda* (#:key outputs #:allow-other-keys)
6773 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6774 (doc (string-append data "/doc/" ,name "-" ,version))
6775 (examples (string-append doc "/examples")))
6776 (mkdir-p examples)
6777 (for-each (lambda (file)
6778 (copy-file (string-append "." file)
6779 (string-append doc file)))
6780 '("/README.rst" "/CHANGES" "/LICENSE"))
6781 (copy-recursively "examples" examples)
6782 #t))))))
6783 (home-page "https://github.com/eliben/pycparser")
6784 (synopsis "C parser in Python")
6785 (description
6786 "Pycparser is a complete parser of the C language, written in pure Python
6787 using the PLY parsing library. It parses C code into an AST and can serve as
6788 a front-end for C compilers or analysis tools.")
6789 (license license:bsd-3)))
6790
6791 (define-public python2-pycparser
6792 (package-with-python2 python-pycparser))
6793
6794 (define-public python-xlsxwriter
6795 (package
6796 (name "python-xlsxwriter")
6797 (version "1.3.9")
6798 (source
6799 (origin
6800 ;; There are no tests in the PyPI tarball.
6801 (method git-fetch)
6802 (uri (git-reference
6803 (url "https://github.com/jmcnamara/XlsxWriter")
6804 (commit (string-append "RELEASE_" version))))
6805 (file-name (git-file-name name version))
6806 (sha256
6807 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6808 (build-system python-build-system)
6809 (home-page "https://github.com/jmcnamara/XlsxWriter")
6810 (synopsis "Python module for creating Excel XLSX files")
6811 (description
6812 "XlsxWriter is a Python module that can be used to write text, numbers,
6813 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6814 (license license:bsd-2)))
6815
6816 (define-public python-pywavelets
6817 (package
6818 (name "python-pywavelets")
6819 (version "1.1.1")
6820 (home-page "https://github.com/PyWavelets/pywt")
6821 (source (origin
6822 (method url-fetch)
6823 (uri (pypi-uri "PyWavelets" version))
6824 (sha256
6825 (base32
6826 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6827 (build-system python-build-system)
6828 (arguments
6829 '(#:modules ((ice-9 ftw)
6830 (srfi srfi-1)
6831 (srfi srfi-26)
6832 (guix build utils)
6833 (guix build python-build-system))
6834 #:phases
6835 (modify-phases %standard-phases
6836 (replace 'check
6837 (lambda _
6838 (let ((cwd (getcwd))
6839 (libdir (find (cut string-prefix? "lib." <>)
6840 (scandir "build"))))
6841 (with-directory-excursion (string-append cwd "/build/" libdir)
6842 (invoke "pytest" "-vv"))))))))
6843 (native-inputs
6844 `(("python-matplotlib" ,python-matplotlib) ;for tests
6845 ("python-pytest" ,python-pytest)))
6846 (propagated-inputs
6847 `(("python-numpy" ,python-numpy)))
6848 (synopsis "Wavelet transforms in Python")
6849 (description
6850 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6851 mathematical basis functions that are localized in both time and frequency.
6852 Wavelet transforms are time-frequency transforms employing wavelets. They are
6853 similar to Fourier transforms, the difference being that Fourier transforms are
6854 localized only in frequency instead of in time and frequency.")
6855 (license license:expat)))
6856
6857 (define-public python-pywal
6858 (package
6859 (name "python-pywal")
6860 (version "3.3.0")
6861 (source
6862 (origin
6863 (method git-fetch)
6864 (uri (git-reference
6865 (url "https://github.com/dylanaraps/pywal")
6866 (commit version)))
6867 (file-name (git-file-name name version))
6868 (sha256
6869 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6870 (build-system python-build-system)
6871 (arguments
6872 `(#:phases
6873 (modify-phases %standard-phases
6874 (add-before 'check 'fix-home-directory
6875 (lambda _
6876 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6877 (setenv "HOME" "/tmp")
6878 #t)))))
6879 (inputs
6880 `(("imagemagick" ,imagemagick)))
6881 (home-page "https://github.com/dylanaraps/pywal")
6882 (synopsis "Color palette generator and applicator")
6883 (description
6884 "Pywal is a tool that generates a color palette from the dominant colors
6885 in an image. It then applies the colors system-wide and on-the-fly in all of
6886 your favourite programs.")
6887 (license license:expat)))
6888
6889 (define-public python-pywinrm
6890 (package
6891 (name "python-pywinrm")
6892 (version "0.4.1")
6893 (source
6894 (origin
6895 (method url-fetch)
6896 (uri (pypi-uri "pywinrm" version))
6897 (sha256
6898 (base32
6899 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6900 (build-system python-build-system)
6901 (propagated-inputs
6902 `(("python-six" ,python-six)
6903 ("python-requests_ntlm" ,python-requests_ntlm)
6904 ("python-xmltodict" ,python-xmltodict)
6905 ("python-kerberos" ,python-kerberos)))
6906 (native-inputs
6907 `(("python-mock" ,python-mock)
6908 ("python-pytest" ,python-pytest)))
6909 (home-page "https://github.com/diyan/pywinrm/")
6910 (synopsis
6911 "Python library for Windows Remote Management (WinRM)")
6912 (description
6913 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6914 service. It allows you to invoke commands on target Windows machines from
6915 any machine that can run Python.")
6916 (license license:expat)))
6917
6918 (define-public python-xcffib
6919 (package
6920 (name "python-xcffib")
6921 (version "0.6.0")
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "xcffib" version))
6926 (sha256
6927 (base32
6928 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6929 (build-system python-build-system)
6930 (inputs
6931 `(("libxcb" ,libxcb)))
6932 (propagated-inputs
6933 `(("python-cffi" ,python-cffi) ; used at run time
6934 ("python-six" ,python-six)))
6935 (arguments
6936 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6937 #:tests? #f
6938 #:phases
6939 (modify-phases %standard-phases
6940 (add-after 'unpack 'fix-libxcb-path
6941 (lambda* (#:key inputs #:allow-other-keys)
6942 (let ((libxcb (assoc-ref inputs "libxcb")))
6943 (substitute* '("xcffib/__init__.py")
6944 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6945 #t)))
6946 (add-after 'install 'install-doc
6947 (lambda* (#:key outputs #:allow-other-keys)
6948 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6949 "/doc/" ,name "-" ,version)))
6950 (mkdir-p doc)
6951 (copy-file "README.md"
6952 (string-append doc "/README.md"))
6953 #t))))))
6954 (home-page "https://github.com/tych0/xcffib")
6955 (synopsis "XCB Python bindings")
6956 (description
6957 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6958 support for Python 3 and PyPy. It is based on cffi.")
6959 (license license:expat)))
6960
6961 (define-public python2-xcffib
6962 (package-with-python2 python-xcffib))
6963
6964 (define-public python-cairocffi
6965 (package
6966 (name "python-cairocffi")
6967 (version "1.2.0")
6968 (source
6969 (origin
6970 ;; The PyPI archive does not include the documentation, so use Git.
6971 (method git-fetch)
6972 (uri (git-reference
6973 (url "https://github.com/Kozea/cairocffi")
6974 (commit (string-append "v" version))))
6975 (file-name (git-file-name name version))
6976 (sha256
6977 (base32
6978 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6979 (build-system python-build-system)
6980 (outputs '("out" "doc"))
6981 (inputs
6982 `(("glib" ,glib)
6983 ("gtk+" ,gtk+)
6984 ("gdk-pixbuf" ,gdk-pixbuf)
6985 ("cairo" ,cairo)))
6986 (native-inputs
6987 `(("python-numpy" ,python-numpy)
6988 ("python-pytest" ,python-pytest)
6989 ("python-pytest-cov" ,python-pytest-cov)
6990 ("python-pytest-runner" ,python-pytest-runner)
6991 ("python-sphinx" ,python-sphinx)
6992 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6993 (propagated-inputs
6994 `(("python-xcffib" ,python-xcffib))) ; used at run time
6995 (arguments
6996 `(#:phases
6997 (modify-phases %standard-phases
6998 (add-after 'unpack 'patch-paths
6999 (lambda* (#:key inputs #:allow-other-keys)
7000 (substitute* "cairocffi/__init__.py"
7001 ;; Hack the dynamic library loading mechanism.
7002 (("find_library\\(library_name\\)")
7003 "\"found\"")
7004 (("filenames = \\(library_filename,\\) \\+ filenames")
7005 "pass")
7006 (("libcairo.so.2")
7007 (search-input-file inputs "/lib/libcairo.so.2")))
7008 (substitute* "cairocffi/pixbuf.py"
7009 (("libgdk_pixbuf-2.0.so.0")
7010 (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
7011 (("libgobject-2.0.so.0")
7012 (search-input-file inputs "/lib/libgobject-2.0.so.0"))
7013 (("libglib-2.0.so.0")
7014 (search-input-file inputs "/lib/libglib-2.0.so.0"))
7015 (("libgdk-3.so.0")
7016 (search-input-file inputs "/lib/libgdk-3.so.0")))))
7017 (add-after 'unpack 'disable-linters
7018 ;; Their check fails; none of our business.
7019 (lambda _
7020 (substitute* "setup.cfg"
7021 ((".*pytest-flake8.*") "")
7022 ((".*pytest-isort.*") "")
7023 (("--flake8") "")
7024 (("--isort") ""))
7025 #t))
7026 (add-after 'install 'install-doc
7027 (lambda* (#:key inputs outputs #:allow-other-keys)
7028 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7029 (doc (string-append data "/doc/" ,name "-" ,version))
7030 (html (string-append doc "/html")))
7031 (setenv "LD_LIBRARY_PATH"
7032 (string-append (assoc-ref inputs "cairo") "/lib" ":"
7033 (assoc-ref inputs "gdk-pixbuf") "/lib"))
7034 (setenv "LANG" "en_US.UTF-8")
7035 (mkdir-p html)
7036 (for-each (lambda (file)
7037 (copy-file (string-append "." file)
7038 (string-append doc file)))
7039 '("/README.rst" "/NEWS.rst"))
7040 (system* "python" "setup.py" "build_sphinx")
7041 (copy-recursively "docs/_build/html" html)
7042 #t))))))
7043 (home-page "https://github.com/Kozea/cairocffi")
7044 (synopsis "Python bindings and object-oriented API for Cairo")
7045 (description
7046 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
7047 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
7048 graphics library with support for multiple backends including image buffers,
7049 PNG, PostScript, PDF, and SVG file output.")
7050 (license license:bsd-3)))
7051
7052 (define-public python-decorator
7053 (package
7054 (name "python-decorator")
7055 (version "4.4.2")
7056 (source
7057 (origin
7058 (method url-fetch)
7059 (uri (pypi-uri "decorator" version))
7060 (sha256
7061 (base32 "1rxzhk5zwiggk45hl53zydvy70lk654kg0nc1p54090p402jz9p3"))))
7062 (build-system python-build-system)
7063 (home-page "https://pypi.org/project/decorator/")
7064 (synopsis "Python module to simplify usage of decorators")
7065 (description
7066 "The aim of the decorator module is to simplify the usage of decorators
7067 for the average programmer, and to popularize decorators usage giving examples
7068 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
7069 etc. The core of this module is a decorator factory.")
7070 (license license:expat)))
7071
7072 (define-public python2-decorator
7073 (package-with-python2 python-decorator))
7074
7075 (define-public python-drmaa
7076 (package
7077 (name "python-drmaa")
7078 (version "0.7.7")
7079 (source
7080 (origin
7081 (method url-fetch)
7082 (uri (pypi-uri "drmaa" version))
7083 (sha256
7084 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
7085 (build-system python-build-system)
7086 ;; The test suite requires libdrmaa which is provided by the cluster
7087 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
7088 ;; should be set to the path of the libdrmaa library.
7089 (arguments '(#:tests? #f))
7090 (native-inputs
7091 `(("python-nose" ,python-nose)))
7092 (home-page "https://pypi.org/project/drmaa/")
7093 (synopsis "Python bindings for the DRMAA library")
7094 (description
7095 "A Python package for Distributed Resource Management (DRM) job
7096 submission and control. This package is an implementation of the DRMAA 1.0
7097 Python language binding specification.")
7098 (license license:bsd-3)))
7099
7100 (define-public python2-drmaa
7101 (package-with-python2 python-drmaa))
7102
7103 (define-public python-grako
7104 (package
7105 (name "python-grako")
7106 (version "3.99.9")
7107 (source
7108 (origin
7109 (method url-fetch)
7110 (uri
7111 (pypi-uri "grako" version ".zip"))
7112 (sha256
7113 (base32
7114 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
7115 (build-system python-build-system)
7116 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
7117 (native-inputs
7118 `(("unzip" ,unzip)
7119 ("python-pytest" ,python-pytest)
7120 ("python-pytest-runner" ,python-pytest-runner)))
7121 (home-page "https://bitbucket.org/neogeny/grako")
7122 (synopsis "EBNF parser generator")
7123 (description
7124 "Grako takes a grammar in a variation of EBNF as input, and outputs a
7125 memoizing PEG/Packrat parser in Python.")
7126 (license license:bsd-3)))
7127
7128 (define-public python2-grako
7129 (package-with-python2 python-grako))
7130
7131 (define-public python-grandalf
7132 (package
7133 (name "python-grandalf")
7134 (version "0.7")
7135 (source
7136 (origin
7137 ;; There's no source tarball on PyPI.
7138 (method git-fetch)
7139 (uri (git-reference
7140 (url "https://github.com/bdcht/grandalf")
7141 (commit (string-append "v" version))))
7142 (file-name (git-file-name name version))
7143 (sha256
7144 (base32
7145 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7146 (build-system python-build-system)
7147 (arguments
7148 '(#:phases
7149 (modify-phases %standard-phases
7150 (replace 'check
7151 (lambda _
7152 (invoke "python" "setup.py" "pytest"))))))
7153 (native-inputs
7154 `(("python-pytest" ,python-pytest)
7155 ("python-pytest-runner" ,python-pytest-runner)))
7156 (propagated-inputs
7157 `(("python-numpy" ,python-numpy)
7158 ("python-ply" ,python-ply)))
7159 (home-page "https://github.com/bdcht/grandalf")
7160 (synopsis "Graph and drawing algorithms framework")
7161 (description
7162 "Grandalf is a Python package made for experimentations with graphs
7163 drawing algorithms. It is written in pure Python, and currently implements
7164 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7165 minimization approach. While not as fast or featured as graphviz or other
7166 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7167 than thousands of nodes, while keeping the source code simple enough to tweak
7168 and hack any part of it for experimental purpose. With a total of about 1500
7169 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7170 in less than 600 lines. The energy minimization approach is comprised of only
7171 250 lines!
7172
7173 Grandalf does only 2 not-so-simple things:
7174 @itemize
7175 @item computing the nodes (x,y) coordinates (based on provided nodes
7176 dimensions, and a chosen layout)
7177 @item routing the edges with lines or nurbs
7178 @end itemize
7179
7180 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7181 will help you find where to draw things like nodes and edges, but it’s up to
7182 you to actually draw things with your favorite toolkit.")
7183 ;; The user can choose either license.
7184 (license (list license:gpl2 license:epl1.0))))
7185
7186 (define-public python-gridmap
7187 (package
7188 (name "python-gridmap")
7189 (version "0.14.0")
7190 (source
7191 (origin
7192 (method git-fetch)
7193 (uri (git-reference
7194 (url "https://github.com/pygridtools/gridmap")
7195 (commit (string-append "v" version))))
7196 (file-name (git-file-name name version))
7197 (sha256
7198 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7199 (build-system python-build-system)
7200 (arguments
7201 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7202 (propagated-inputs
7203 `(("python-psutil" ,python-psutil)
7204 ("python-drmaa" ,python-drmaa)
7205 ("python-pyzmq" ,python-pyzmq)))
7206 (home-page "https://github.com/pygridtools/gridmap")
7207 (synopsis "Create jobs on a cluster directly from Python")
7208 (description
7209 "Gridmap is a Python package to allow you to easily create jobs on the
7210 cluster directly from Python. You can directly map Python functions onto the
7211 cluster without needing to write any wrapper code yourself.")
7212 (license license:gpl3+)))
7213
7214 (define-public python-honcho
7215 (package
7216 (name "python-honcho")
7217 (version "1.0.1")
7218 (source
7219 (origin
7220 (method git-fetch)
7221 (uri (git-reference
7222 (url "https://github.com/nickstenning/honcho")
7223 (commit (string-append "v" version))))
7224 (file-name (git-file-name name version))
7225 (sha256
7226 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7227 (build-system python-build-system)
7228 (native-inputs
7229 `(("python-pytest" ,python-pytest)
7230 ("python-mock" ,python-mock)
7231 ("python-tox" ,python-tox)
7232 ("which" ,which))) ;for tests
7233 (propagated-inputs
7234 `(("python-jinja2" ,python-jinja2)))
7235 (arguments
7236 `(#:phases
7237 (modify-phases %standard-phases
7238 (delete 'check)
7239 (add-after 'install 'check
7240 (lambda* (#:key outputs inputs #:allow-other-keys)
7241 ;; fix honcho path in testsuite
7242 (substitute* "tests/conftest.py"
7243 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7244 "/bin/honcho" "'")))
7245 ;; It's easier to run tests after install.
7246 ;; Make installed package available for running the tests
7247 (add-installed-pythonpath inputs outputs)
7248 (invoke "py.test" "-v"))))))
7249 (home-page "https://github.com/nickstenning/honcho")
7250 (synopsis "Manage Procfile-based applications")
7251 (description
7252 "A Procfile is a file which describes how to run an application
7253 consisting of several processes. honcho starts all listed processes.
7254 The output of all running processes is collected by honcho and
7255 displayed.")
7256 (license license:expat)))
7257
7258 (define-public python-pebble
7259 (package
7260 (name "python-pebble")
7261 (version "4.6.1")
7262 (source
7263 (origin
7264 (method url-fetch)
7265 (uri (pypi-uri "Pebble" version))
7266 (sha256
7267 (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
7268 (build-system python-build-system)
7269 (native-inputs
7270 `(("python-pytest" ,python-pytest)))
7271 (arguments
7272 `(#:phases
7273 (modify-phases %standard-phases
7274 (replace 'check
7275 (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
7276 (home-page "https://github.com/noxdafox/pebble")
7277 (synopsis "Threading and multiprocessing for Python")
7278 (description
7279 "Pebble aims to help manage threads and processes in an easier way. It
7280 wraps Python's standard library threading and multiprocessing objects.")
7281 (license license:lgpl3+)))
7282
7283 (define-public python-pexpect
7284 (package
7285 (name "python-pexpect")
7286 (version "4.8.0")
7287 (source
7288 (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "pexpect" version))
7291 (sha256
7292 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7293 (build-system python-build-system)
7294 (arguments
7295 `(#:phases
7296 (modify-phases %standard-phases
7297 (add-before 'check 'prepare-tests
7298 (lambda _
7299 (substitute* (find-files "tests")
7300 (("/bin/ls") (which "ls"))
7301 (("/bin/echo") (which "echo"))
7302 (("/bin/which") (which "which"))
7303 ;; Many tests try to use the /bin directory which
7304 ;; is not present in the build environment.
7305 ;; Use one that's non-empty and unlikely to change.
7306 (("/bin'") "/dev'")
7307 ;; Disable failing test. See upstream bug report
7308 ;; https://github.com/pexpect/pexpect/issues/568
7309 (("def test_bash") "def _test_bash"))
7310 ;; XXX: Socket connection test gets "Connection reset by peer".
7311 ;; Why does it not work? Delete for now.
7312 (delete-file "tests/test_socket.py")
7313 #t))
7314 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7315 (native-inputs
7316 `(("python-nose" ,python-nose)
7317 ("python-pytest" ,python-pytest)
7318 ("man-db" ,man-db)
7319 ("which" ,which)
7320 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7321 (propagated-inputs
7322 `(("python-ptyprocess" ,python-ptyprocess)))
7323 (home-page "http://pexpect.readthedocs.org/")
7324 (synopsis "Controlling interactive console applications")
7325 (description
7326 "Pexpect is a pure Python module for spawning child applications;
7327 controlling them; and responding to expected patterns in their output.
7328 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7329 child application and control it as if a human were typing commands.")
7330 (license license:isc)))
7331
7332 (define-public python2-pexpect
7333 (package-with-python2 python-pexpect))
7334
7335 (define-public python-setuptools-scm
7336 (package
7337 (name "python-setuptools-scm")
7338 (version "5.0.1")
7339 (source (origin
7340 (method url-fetch)
7341 (uri (pypi-uri "setuptools_scm" version))
7342 (sha256
7343 (base32
7344 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))
7345 (build-system python-build-system)
7346 (home-page "https://github.com/pypa/setuptools_scm/")
7347 (synopsis "Manage Python package versions in SCM metadata")
7348 (description
7349 "Setuptools_scm handles managing your Python package versions in
7350 @dfn{software configuration management} (SCM) metadata instead of declaring
7351 them as the version argument or in a SCM managed file.")
7352 (license license:expat)))
7353
7354 (define-public python2-setuptools-scm
7355 (package-with-python2 python-setuptools-scm))
7356
7357 (define-public python-sexpdata
7358 (package
7359 (name "python-sexpdata")
7360 (version "0.0.3")
7361 (source
7362 (origin
7363 (method url-fetch)
7364 (uri (pypi-uri "sexpdata" version))
7365 (sha256
7366 (base32
7367 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7368 (build-system python-build-system)
7369 (home-page "https://github.com/jd-boyd/sexpdata")
7370 (synopsis "S-expression parser for Python")
7371 (description
7372 "Sexpdata is an S-expression parser/serializer. It has load and dump
7373 functions like pickle, json or PyYAML module.")
7374 (license license:bsd-3)))
7375
7376 (define-public python-pathlib2
7377 (package
7378 (name "python-pathlib2")
7379 (version "2.3.3")
7380 (source
7381 (origin
7382 (method url-fetch)
7383 (uri (pypi-uri "pathlib2" version))
7384 (sha256
7385 (base32
7386 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7387 (build-system python-build-system)
7388 (propagated-inputs
7389 `(("python-scandir" ,python-scandir)
7390 ("python-six" ,python-six)))
7391 (home-page "https://pypi.org/project/pathlib2/")
7392 (synopsis "Object-oriented file system paths")
7393 (description "The goal of pathlib2 is to provide a backport of the
7394 standard @code{pathlib} module which tracks the standard library module, so
7395 all the newest features of the standard @code{pathlib} can be used also on
7396 older Python versions.")
7397 (license license:expat)))
7398
7399 (define-public python-importlib-resources
7400 (package
7401 (name "python-importlib-resources")
7402 (version "3.0.0")
7403 (source
7404 (origin
7405 (method url-fetch)
7406 (uri (pypi-uri "importlib_resources" version))
7407 (sha256
7408 (base32
7409 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7410 (build-system python-build-system)
7411 (native-inputs
7412 `(("python-setuptools-scm" ,python-setuptools-scm)
7413 ("python-toml" ,python-toml)))
7414 (home-page "http://importlib-resources.readthedocs.io/")
7415 (synopsis "Read resources from Python packages")
7416 (description
7417 "@code{importlib_resources} is a backport of Python 3's standard library
7418 @code{importlib.resources} module for Python 2.7, and Python 3.")
7419 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7420 (license license:asl2.0)))
7421
7422 (define-public python2-importlib-resources
7423 (package
7424 (name "python2-importlib-resources")
7425 (version "1.0.2")
7426 (source (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "importlib_resources" version))
7429 (sha256
7430 (base32
7431 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7432 (build-system python-build-system)
7433 (arguments
7434 `(#:python ,python-2
7435 #:phases (modify-phases %standard-phases
7436 ;; The build system tests for python-wheel, but it is
7437 ;; not required for Guix nor the test suite. Just drop
7438 ;; it to make bootstrapping pytest easier.
7439 (add-after 'unpack 'drop-wheel-dependency
7440 (lambda _
7441 (substitute* "setup.cfg"
7442 (("^[[:blank:]]+wheel")
7443 ""))
7444 #t)))))
7445 (propagated-inputs
7446 `(("python-pathlib2" ,python2-pathlib2)
7447 ("python-typing" ,python2-typing)))
7448 (home-page "https://gitlab.com/python-devs/importlib_resources")
7449 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7450 (description
7451 "This package provides an implementation of @code{importlib.resources}
7452 for older versions of Python.")
7453 (license license:asl2.0)))
7454
7455 ;; For importlib-metadata-bootstrap below.
7456 (define-public python2-importlib-resources-bootstrap
7457 (hidden-package
7458 (package/inherit
7459 python2-importlib-resources
7460 (name "python2-importlib-resources-bootstrap")
7461 (propagated-inputs
7462 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7463 ("python-typing" ,python2-typing))))))
7464
7465 (define-public python-importlib-metadata
7466 (package
7467 (name "python-importlib-metadata")
7468 (version "1.5.0")
7469 (source
7470 (origin
7471 (method url-fetch)
7472 (uri (pypi-uri "importlib_metadata" version))
7473 (sha256
7474 (base32
7475 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7476 (build-system python-build-system)
7477 (propagated-inputs
7478 `(("python-zipp" ,python-zipp)))
7479 (native-inputs
7480 `(("python-setuptools-scm" ,python-setuptools-scm)
7481 ("python-pyfakefs" ,python-pyfakefs)
7482 ("python-packaging" ,python-packaging)))
7483 (home-page "https://importlib-metadata.readthedocs.io/")
7484 (synopsis "Read metadata from Python packages")
7485 (description
7486 "@code{importlib_metadata} is a library which provides an API for
7487 accessing an installed Python package's metadata, such as its entry points or
7488 its top-level name. This functionality intends to replace most uses of
7489 @code{pkg_resources} entry point API and metadata API. Along with
7490 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7491 need to use the older and less efficient @code{pkg_resources} package.")
7492 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7493 (license license:asl2.0)))
7494
7495 (define-public python2-importlib-metadata
7496 (let ((base (package-with-python2 (strip-python2-variant
7497 python-importlib-metadata))))
7498 (package/inherit
7499 base
7500 (name "python2-importlib-metadata")
7501 (native-inputs
7502 `(("python-setuptools-scm" ,python2-setuptools-scm)
7503 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7504 ("python-packaging" ,python2-packaging-bootstrap)))
7505 (propagated-inputs
7506 `(("python-configparser" ,python2-configparser)
7507 ("python-contextlib2" ,python2-contextlib2)
7508 ("python-importlib-resources" ,python2-importlib-resources)
7509 ("python-pathlib2" ,python2-pathlib2)
7510 ,@(package-propagated-inputs base))))))
7511
7512 ;; This package is used by python2-pytest, and thus must not depend on it.
7513 (define-public python2-importlib-metadata-bootstrap
7514 (hidden-package
7515 (package/inherit
7516 python2-importlib-metadata
7517 (name "python2-importlib-metadata-bootstrap")
7518 (arguments
7519 `(#:tests? #f
7520 ,@(package-arguments python2-importlib-metadata)))
7521 (propagated-inputs
7522 `(("python-zipp" ,python2-zipp-bootstrap)
7523 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7524 ("python-configparser" ,python2-configparser)
7525 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7526 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7527
7528 (define-public python-importmagic
7529 (package
7530 (name "python-importmagic")
7531 (version "0.1.7")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "importmagic" version))
7536 (sha256
7537 (base32
7538 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7539 (build-system python-build-system)
7540 (home-page "https://github.com/alecthomas/importmagic")
7541 (synopsis "Library for adding, removing and managing Python imports")
7542 (description
7543 "Importmagic is a Python library for automatically managing imports by
7544 finding unresolved symbols in Python code and their corresponding imports.")
7545 (license license:bsd-3)))
7546
7547 (define-public python-inotify-simple
7548 (package
7549 (name "python-inotify-simple")
7550 (version "1.3.5")
7551 (source
7552 (origin
7553 (method git-fetch)
7554 (uri (git-reference
7555 (url "https://github.com/chrisjbillington/inotify_simple")
7556 (commit version)))
7557 (file-name (git-file-name name version))
7558 (sha256
7559 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7560 (build-system python-build-system)
7561 (home-page
7562 "https://github.com/chrisjbillington/inotify_simple")
7563 (synopsis "Simple wrapper around inotify library")
7564 (description
7565 "@code{inotify-simple} is a simple wrapper around inotify library.")
7566 (license license:bsd-3)))
7567
7568 (define-public python-jaraco-packaging
7569 (package
7570 (name "python-jaraco-packaging")
7571 (version "6.1")
7572 (source
7573 (origin
7574 (method url-fetch)
7575 (uri (pypi-uri "jaraco.packaging" version))
7576 (sha256
7577 (base32
7578 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7579 (build-system python-build-system)
7580 (propagated-inputs
7581 `(("python-pytest" ,python-pytest)
7582 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7583 ("python-pytest-flake8" ,python-pytest-flake8)
7584 ("python-rst.linker" ,python-rst.linker)
7585 ("python-setuptools" ,python-setuptools)
7586 ("python-setuptools-scm" ,python-setuptools-scm)
7587 ("python-six" ,python-six)
7588 ("python-sphinx" ,python-sphinx)))
7589 (home-page "https://github.com/jaraco/jaraco.packaging")
7590 (synopsis "Tools to supplement packaging Python releases")
7591 (description
7592 "This package provides various tools to supplement packaging Python
7593 releases.")
7594 (license license:expat)))
7595
7596 (define-public python-pathpy
7597 (package
7598 (name "python-pathpy")
7599 (version "11.5.1")
7600 (source
7601 (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "path.py" version))
7604 (sha256
7605 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7606 (outputs '("out" "doc"))
7607 (build-system python-build-system)
7608 (propagated-inputs
7609 `(("python-appdirs" ,python-appdirs)
7610 ("python-importlib-metadata" ,python-importlib-metadata)))
7611 (native-inputs
7612 `(("python-setuptools-scm" ,python-setuptools-scm)
7613 ("python-sphinx" ,python-sphinx)
7614 ("python-rst.linker" ,python-rst.linker)
7615 ("python-pytest" ,python-pytest)
7616 ("python-pytest-runner" ,python-pytest-runner)
7617 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7618 (arguments
7619 `(#:phases
7620 (modify-phases %standard-phases
7621 (add-after 'build 'build-doc
7622 (lambda _
7623 (setenv "LANG" "en_US.UTF-8")
7624 (invoke "python" "setup.py" "build_sphinx")))
7625 (add-after 'install 'install-doc
7626 (lambda* (#:key outputs #:allow-other-keys)
7627 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7628 (doc (string-append data "/doc/" ,name "-" ,version))
7629 (html (string-append doc "/html")))
7630 (mkdir-p html)
7631 (for-each (lambda (file)
7632 (copy-file file (string-append doc "/" file)))
7633 '("README.rst" "CHANGES.rst"))
7634 (copy-recursively "build/sphinx/html" html)
7635 #t)))
7636 (replace 'check
7637 (lambda _
7638 ;; The import time test aborts if an import takes longer than
7639 ;; 100ms. It may very well take a little longer than that.
7640 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7641 (home-page "https://github.com/jaraco/path.py")
7642 (synopsis "Python module wrapper for built-in os.path")
7643 (description
7644 "@code{path.py} implements path objects as first-class entities, allowing
7645 common operations on files to be invoked on those path objects directly.")
7646 (license license:expat)))
7647
7648 (define-public python-simplegeneric
7649 (package
7650 (name "python-simplegeneric")
7651 (version "0.8.1")
7652 (source
7653 (origin
7654 (method url-fetch)
7655 (uri (pypi-uri "simplegeneric" version ".zip"))
7656 (sha256
7657 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7658 (build-system python-build-system)
7659 (native-inputs
7660 `(("unzip" ,unzip)))
7661 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7662 (synopsis "Python module for simple generic functions")
7663 (description
7664 "The simplegeneric module lets you define simple single-dispatch generic
7665 functions, akin to Python’s built-in generic functions like @code{len()},
7666 @code{iter()} and so on. However, instead of using specially-named methods,
7667 these generic functions use simple lookup tables, akin to those used by
7668 e.g. @code{pickle.dump()} and other generic functions found in the Python
7669 standard library.")
7670 (license license:zpl2.1)))
7671
7672 (define-public python2-simplegeneric
7673 (package-with-python2 python-simplegeneric))
7674
7675 (define-public python-ipython-genutils
7676 ;; TODO: This package is retired, check if can be removed, see description.
7677 (package
7678 (name "python-ipython-genutils")
7679 (version "0.1.0")
7680 (source
7681 (origin
7682 (method url-fetch)
7683 (uri (pypi-uri "ipython_genutils" version))
7684 (sha256
7685 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7686 (build-system python-build-system)
7687 (arguments `(#:tests? #f)) ; no tests
7688 (home-page "https://ipython.org")
7689 (synopsis "Vestigial utilities from IPython")
7690 (description
7691 "This package provides retired utilities from IPython. No packages
7692 outside IPython/Jupyter should depend on it.
7693
7694 This package shouldn't exist. It contains some common utilities shared by
7695 Jupyter and IPython projects during The Big Split. As soon as possible, those
7696 packages will remove their dependency on this, and this package will go
7697 away.")
7698 (license license:bsd-3)))
7699
7700 (define-public python2-ipython-genutils
7701 (package-with-python2 python-ipython-genutils))
7702
7703 (define-public python-ipyparallel
7704 (package
7705 (name "python-ipyparallel")
7706 (version "6.2.4")
7707 (source
7708 (origin
7709 (method url-fetch)
7710 (uri (pypi-uri "ipyparallel" version))
7711 (sha256
7712 (base32
7713 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7714 (build-system python-build-system)
7715 (arguments
7716 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7717 #:phases
7718 (modify-phases %standard-phases
7719 (add-before 'check 'prepare-for-tests
7720 (lambda _
7721 (setenv "HOME" (getcwd))
7722 #t)))))
7723 (propagated-inputs
7724 `(("python-dateutil" ,python-dateutil)
7725 ("python-decorator" ,python-decorator)
7726 ("python-ipykernel" ,python-ipykernel)
7727 ("python-ipython" ,python-ipython)
7728 ("python-ipython-genutils" ,python-ipython-genutils)
7729 ("python-jupyter-client" ,python-jupyter-client)
7730 ("python-pyzmq" ,python-pyzmq)
7731 ("python-tornado" ,python-tornado)
7732 ("python-traitlets" ,python-traitlets)))
7733 (native-inputs
7734 `(("python-ipython" ,python-ipython)
7735 ("python-mock" ,python-mock)
7736 ("python-nose" ,python-nose)
7737 ("python-pytest" ,python-pytest)
7738 ("python-pytest-cov" ,python-pytest-cov)
7739 ("python-testpath" ,python-testpath)))
7740 (home-page "https://ipython.org/")
7741 (synopsis "Interactive Parallel Computing with IPython")
7742 (description
7743 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7744 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7745 CLI scripts:
7746 @enumerate
7747 @item ipcluster - start/stop a cluster
7748 @item ipcontroller - start a scheduler
7749 @item ipengine - start an engine
7750 @end enumerate")
7751 (license license:bsd-3)))
7752
7753 (define-public python-ipython-cluster-helper
7754 (package
7755 (name "python-ipython-cluster-helper")
7756 (version "0.6.4")
7757 (source
7758 (origin
7759 (method url-fetch)
7760 (uri (pypi-uri "ipython-cluster-helper" version))
7761 (sha256
7762 (base32
7763 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7764 (modules '((guix build utils)))
7765 (snippet
7766 '(begin (substitute* "requirements.txt"
7767 (("ipython.*") "ipython\n"))
7768 #t))))
7769 (build-system python-build-system)
7770 (arguments
7771 `(#:tests? #f ; Test suite can't find IPython.
7772 #:phases
7773 (modify-phases %standard-phases
7774 (replace 'check
7775 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7776 (if tests?
7777 (begin
7778 (setenv "HOME" (getcwd))
7779 (add-installed-pythonpath inputs outputs)
7780 (invoke "python" "example/example.py" "--local"))
7781 #t))))))
7782 (propagated-inputs
7783 `(("python-ipyparallel" ,python-ipyparallel)
7784 ("python-ipython" ,python-ipython)
7785 ("python-netifaces" ,python-netifaces)
7786 ("python-pyzmq" ,python-pyzmq)
7787 ("python-setuptools" ,python-setuptools)
7788 ("python-six" ,python-six)))
7789 (home-page "https://github.com/roryk/ipython-cluster-helper")
7790 (synopsis
7791 "Simplify IPython cluster start up and use for multiple schedulers")
7792 (description
7793 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7794 profile, launches a cluster and returns a view. On program exit it shuts the
7795 cluster down and deletes the throwaway profile.")
7796 (license license:expat)))
7797
7798 (define-public python-traitlets
7799 (package
7800 (name "python-traitlets")
7801 (version "4.3.3")
7802 (source
7803 (origin
7804 (method url-fetch)
7805 (uri (pypi-uri "traitlets" version))
7806 (sha256
7807 (base32
7808 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7809 (build-system python-build-system)
7810 (arguments
7811 `(#:phases
7812 (modify-phases %standard-phases
7813 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7814 (propagated-inputs
7815 `(("python-ipython-genutils" ,python-ipython-genutils)
7816 ("python-decorator" ,python-decorator)
7817 ("python-six" ,python-six)))
7818 (native-inputs
7819 `(("python-pytest" ,python-pytest)))
7820 (properties `((python2-variant . ,(delay python2-traitlets))))
7821 (home-page "https://ipython.org")
7822 (synopsis "Configuration system for Python applications")
7823 (description
7824 "Traitlets is a framework that lets Python classes have attributes with
7825 type checking, dynamically calculated default values, and ‘on change’
7826 callbacks. The package also includes a mechanism to use traitlets for
7827 configuration, loading values from files or from command line arguments. This
7828 is a distinct layer on top of traitlets, so you can use traitlets in your code
7829 without using the configuration machinery.")
7830 (license license:bsd-3)))
7831
7832 (define-public python2-traitlets
7833 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7834 (package/inherit traitlets
7835 (propagated-inputs
7836 `(("python2-enum34" ,python2-enum34)
7837 ,@(package-propagated-inputs traitlets))))))
7838
7839 (define-public python-jupyter-core
7840 (package
7841 (name "python-jupyter-core")
7842 (version "4.7.1")
7843 (source
7844 (origin
7845 (method url-fetch)
7846 (uri (string-append (pypi-uri "jupyter_core" version)))
7847 (sha256
7848 (base32
7849 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7850 (build-system python-build-system)
7851 (arguments
7852 `(#:phases
7853 (modify-phases %standard-phases
7854 (replace 'check
7855 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7856 (when tests?
7857 ; Some tests write to $HOME.
7858 (setenv "HOME" "/tmp")
7859 ; Some tests load the installed package.
7860 (add-installed-pythonpath inputs outputs)
7861 (invoke "pytest" "-vv"))))
7862 (add-after 'unpack 'patch-testsuite
7863 (lambda _
7864 ;; test_not_on_path() and test_path_priority() try to run a test
7865 ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
7866 (substitute* "jupyter_core/tests/test_command.py"
7867 (("env = \\{'PATH': ''\\}")
7868 "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
7869 (("env = \\{'PATH': str\\(b\\)\\}")
7870 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))
7871 #t))
7872 ;; Migration is running whenever etc/jupyter exists, but the
7873 ;; Guix-managed directory will never contain any migratable IPython
7874 ;; config files and cannot be written to anyway, so just pretend we
7875 ;; already did that.
7876 (add-after 'install 'disable-migration
7877 (lambda* (#:key outputs #:allow-other-keys)
7878 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
7879 (invoke "touch"
7880 (string-append
7881 (assoc-ref outputs "out")
7882 "/etc/jupyter/migrated")))))))
7883 (propagated-inputs
7884 `(("python-traitlets" ,python-traitlets)))
7885 (native-inputs
7886 `(("python-six" ,python-six)
7887 ("python-pytest" ,python-pytest)))
7888 ;; This package provides the `jupyter` binary and thus also exports the
7889 ;; search paths.
7890 (native-search-paths
7891 (list (search-path-specification
7892 (variable "JUPYTER_CONFIG_DIR")
7893 (files '("etc/jupyter")))
7894 (search-path-specification
7895 (variable "JUPYTER_PATH")
7896 (files '("share/jupyter")))))
7897 (home-page "https://jupyter.org/")
7898 (synopsis "Jupyter base package")
7899 (description
7900 "Jupyter core is the base package on which Jupyter projects rely.")
7901 (license license:bsd-3)))
7902
7903 (define-public python-jupyter-client
7904 (package
7905 (name "python-jupyter-client")
7906 (version "6.1.12")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "jupyter_client" version))
7911 (sha256
7912 (base32
7913 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7914 (build-system python-build-system)
7915 (arguments
7916 `(#:phases
7917 (modify-phases %standard-phases
7918 (add-after 'unpack 'set-tool-file-names
7919 (lambda* (#:key inputs #:allow-other-keys)
7920 (let ((iproute (assoc-ref inputs "iproute")))
7921 (substitute* "jupyter_client/localinterfaces.py"
7922 (("'ip'")
7923 (string-append "'" iproute "/sbin/ip'")))
7924 #t)))
7925 (replace 'check
7926 (lambda* (#:key tests? #:allow-other-keys)
7927 (when tests?
7928 ;; Some tests try to write to $HOME.
7929 (setenv "HOME" "/tmp")
7930 (invoke "pytest" "-vv")))))))
7931 (inputs
7932 `(("iproute" ,iproute)))
7933 (propagated-inputs
7934 `(("python-dateutil" ,python-dateutil)
7935 ("python-jupyter-core" ,python-jupyter-core)
7936 ("python-pyzmq" ,python-pyzmq)
7937 ("python-tornado" ,python-tornado-6)
7938 ("python-traitlets" ,python-traitlets)))
7939 (native-inputs
7940 `(("python-pytest" ,python-pytest)
7941 ("python-pytest-asyncio" ,python-pytest-asyncio)
7942 ("python-pytest-timeout" ,python-pytest-timeout)
7943 ("python-async-generator" ,python-async-generator)
7944 ("python-mock" ,python-mock)
7945 ("python-msgpack" ,python-msgpack)
7946 ("python-ipython" ,python-ipython)
7947 ("python-ipykernel" ,python-ipykernel-bootstrap)))
7948 (home-page "https://jupyter.org/")
7949 (synopsis "Jupyter protocol implementation and client libraries")
7950 (description
7951 "The @code{jupyter_client} package contains the reference implementation
7952 of the Jupyter protocol. It also provides client and kernel management APIs
7953 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7954 installing @code{kernelspec}s for use with Jupyter frontends.")
7955 (license license:bsd-3)))
7956
7957 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
7958 ;; and jupyter-client by removing the former from its native-inputs and
7959 ;; disabling tests.
7960 (define-public python-jupyter-client-bootstrap
7961 (let ((base python-jupyter-client))
7962 (hidden-package
7963 (package
7964 (inherit base)
7965 (name "python-jupyter-client-bootstrap")
7966 (arguments
7967 `(#:tests? #f
7968 ,@(package-arguments base)))
7969 (native-inputs `())))))
7970
7971 (define-public python-ipykernel
7972 (package
7973 (name "python-ipykernel")
7974 (version "5.5.3")
7975 (source
7976 (origin
7977 (method url-fetch)
7978 (uri (pypi-uri "ipykernel" version))
7979 (sha256
7980 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7981 (build-system python-build-system)
7982 (arguments
7983 `(#:phases
7984 (modify-phases %standard-phases
7985 (replace 'check
7986 (lambda _
7987 (setenv "HOME" "/tmp")
7988 (invoke "pytest" "-v")
7989 #t))
7990 (add-after 'install 'set-python-file-name
7991 (lambda* (#:key outputs #:allow-other-keys)
7992 ;; Record the absolute file name of the 'python' executable in
7993 ;; 'kernel.json'.
7994 (let ((out (assoc-ref outputs "out")))
7995 (substitute* (string-append out "/share/jupyter"
7996 "/kernels/python3/kernel.json")
7997 (("\"python\"")
7998 (string-append "\"" (which "python") "\"")))
7999 #t))))))
8000 (propagated-inputs
8001 `(("python-ipython" ,python-ipython)
8002 ("python-tornado" ,python-tornado-6)
8003 ("python-traitlets" ,python-traitlets)
8004 ;; imported at runtime during connect
8005 ("python-jupyter-client" ,python-jupyter-client)))
8006 (native-inputs
8007 `(("python-flaky" ,python-flaky)
8008 ("python-nose" ,python-nose)
8009 ("python-pytest" ,python-pytest)))
8010 (home-page "https://ipython.org")
8011 (synopsis "IPython Kernel for Jupyter")
8012 (description
8013 "This package provides the IPython kernel for Jupyter.")
8014 (license license:bsd-3)))
8015
8016 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
8017 ;; break the cycle between ipykernel and jupyter-client.
8018 (define-public python-ipykernel-bootstrap
8019 (let ((parent python-ipykernel))
8020 (hidden-package
8021 (package
8022 (inherit parent)
8023 (name "python-ipykernel-bootstrap")
8024 (propagated-inputs
8025 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
8026 ,@(fold alist-delete (package-propagated-inputs parent)
8027 '("python-jupyter-client"))))))))
8028
8029 (define-public python-pari-jupyter
8030 (package
8031 (name "python-pari-jupyter")
8032 (version "1.3.2")
8033 (source
8034 (origin
8035 (method url-fetch)
8036 (uri (pypi-uri "pari_jupyter" version))
8037 (sha256
8038 (base32
8039 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
8040 (build-system python-build-system)
8041 (propagated-inputs
8042 `(("python-ipykernel" ,python-ipykernel)))
8043 (inputs
8044 `(("pari-gp" ,pari-gp)
8045 ("readline" ,readline)))
8046 (arguments
8047 `(#:tests? #f)) ; no test suite
8048 (home-page
8049 "https://github.com/jdemeyer/pari_jupyter")
8050 (synopsis "A Jupyter kernel for PARI/GP")
8051 (description "The package provides a PARI/GP kernel for Jupyter.")
8052 (license license:gpl3+)))
8053
8054 (define-public python-backcall
8055 (package
8056 (name "python-backcall")
8057 (version "0.2.0")
8058 (source
8059 (origin
8060 (method url-fetch)
8061 (uri (pypi-uri "backcall" version))
8062 (sha256
8063 (base32
8064 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
8065 (build-system python-build-system)
8066 (home-page "https://github.com/takluyver/backcall/")
8067 (synopsis "Specifications for callback functions passed in to an API")
8068 (description
8069 "If your code lets other people supply callback functions, it's important
8070 to specify the function signature you expect, and check that functions support
8071 that. Adding extra parameters later would break other peoples code unless
8072 you're careful. The @code{backcall} package provides a way of specifying the
8073 callback signature using a prototype function.")
8074 (license license:bsd-3)))
8075
8076 (define-public python-ipython
8077 (package
8078 (name "python-ipython")
8079 (version "7.9.0")
8080 (source
8081 (origin
8082 (method url-fetch)
8083 (uri (pypi-uri "ipython" version ".tar.gz"))
8084 (sha256
8085 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8086 (build-system python-build-system)
8087 (propagated-inputs
8088 `(("python-backcall" ,python-backcall)
8089 ("python-pyzmq" ,python-pyzmq)
8090 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
8091 ("python-terminado" ,python-terminado)
8092 ("python-matplotlib" ,python-matplotlib)
8093 ("python-numpy" ,python-numpy)
8094 ("python-numpydoc" ,python-numpydoc)
8095 ("python-jedi" ,python-jedi)
8096 ("python-jinja2" ,python-jinja2)
8097 ("python-mistune" ,python-mistune)
8098 ("python-pexpect" ,python-pexpect)
8099 ("python-pickleshare" ,python-pickleshare)
8100 ("python-simplegeneric" ,python-simplegeneric)
8101 ("python-jsonschema" ,python-jsonschema)
8102 ("python-traitlets" ,python-traitlets)
8103 ("python-nbformat" ,python-nbformat)
8104 ("python-pygments" ,python-pygments)))
8105 (inputs
8106 `(("readline" ,readline)
8107 ("which" ,which)))
8108 (native-inputs
8109 `(("graphviz" ,graphviz)
8110 ("pkg-config" ,pkg-config)
8111 ("python-requests" ,python-requests) ;; for tests
8112 ("python-testpath" ,python-testpath)
8113 ("python-nose" ,python-nose)))
8114 (arguments
8115 `(#:phases
8116 (modify-phases %standard-phases
8117 (add-after 'unpack 'make-docs-reproducible
8118 (lambda _
8119 (substitute* "IPython/sphinxext/ipython_directive.py"
8120 ((".*import datetime") "")
8121 ((".*datetime.datetime.now\\(\\)") "")
8122 (("%timeit") "# %timeit"))
8123 #t))
8124 ;; Tests can only be run after the library has been installed and not
8125 ;; within the source directory.
8126 (delete 'check)
8127 (add-after 'install 'check
8128 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8129 (if tests?
8130 (begin
8131 ;; Make installed package available for running the tests
8132 (add-installed-pythonpath inputs outputs)
8133 (setenv "HOME" "/tmp/") ;; required by a test
8134 ;; We only test the core because one of the other tests
8135 ;; tries to import ipykernel.
8136 (invoke "python" "IPython/testing/iptest.py"
8137 "-v" "IPython/core/tests"))
8138 #t)))
8139 (add-before 'check 'fix-tests
8140 (lambda* (#:key inputs #:allow-other-keys)
8141 (substitute* "./IPython/utils/_process_posix.py"
8142 (("/usr/bin/env', 'which") (which "which")))
8143 (substitute* "./IPython/core/tests/test_inputtransformer.py"
8144 (("#!/usr/bin/env python")
8145 (string-append "#!" (which "python"))))
8146 ;; This test introduces a circular dependency on ipykernel
8147 ;; (which depends on ipython).
8148 (delete-file "IPython/core/tests/test_display.py")
8149 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
8150 (delete-file "IPython/core/tests/test_interactiveshell.py")
8151 #t)))))
8152 (home-page "https://ipython.org")
8153 (synopsis "IPython is a tool for interactive computing in Python")
8154 (description
8155 "IPython provides a rich architecture for interactive computing with:
8156 Powerful interactive shells, a browser-based notebook, support for interactive
8157 data visualization, embeddable interpreters and tools for parallel
8158 computing.")
8159 (license license:bsd-3)))
8160
8161 (define-public python-ipython-documentation
8162 (package
8163 (inherit python-ipython)
8164 (name "python-ipython-documentation")
8165 (version (package-version python-ipython))
8166 (arguments
8167 `(#:phases
8168 (modify-phases %standard-phases
8169 (delete 'build)
8170 (delete 'check)
8171 (replace 'install
8172 (lambda* (#:key outputs #:allow-other-keys)
8173 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8174 (doc (string-append data "/doc/" ,name "-" ,version))
8175 (html (string-append doc "/html"))
8176 (man1 (string-append data "/man/man1"))
8177 (info (string-append data "/info"))
8178 (examples (string-append doc "/examples"))
8179 (python-arg (string-append "PYTHON=" (which "python"))))
8180 (setenv "LANG" "en_US.utf8")
8181 (with-directory-excursion "docs"
8182 ;; FIXME: pdf fails to build
8183 ;;(system* "make" "pdf" "PAPER=a4")
8184 (system* "make" python-arg "html")
8185 ;; FIXME: the generated texi file contains ^@^@, which trips
8186 ;; up the parser.
8187 ;; (system* "make" python-arg "info")
8188 )
8189 (copy-recursively "docs/man" man1)
8190 (copy-recursively "examples" examples)
8191 (copy-recursively "docs/build/html" html)
8192 ;; (copy-file "docs/build/latex/ipython.pdf"
8193 ;; (string-append doc "/ipython.pdf"))
8194 (mkdir-p info)
8195 ;; (copy-file "docs/build/texinfo/ipython.info"
8196 ;; (string-append info "/ipython.info"))
8197 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8198 #t)))))
8199 (inputs
8200 `(("python-ipython" ,python-ipython)
8201 ("python-ipykernel" ,python-ipykernel)))
8202 (native-inputs
8203 `(("python-sphinx" ,python-sphinx)
8204 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8205 ;; FIXME: It's possible that a smaller union would work just as well.
8206 ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
8207 texlive-fonts-ec
8208 texlive-generic-iftex
8209 texlive-pdftex
8210 texlive-latex-capt-of
8211 texlive-latex-cmap
8212 texlive-latex-environ
8213 texlive-latex-eqparbox
8214 texlive-etoolbox
8215 texlive-latex-expdlist
8216 texlive-latex-fancyhdr
8217 texlive-latex-fancyvrb
8218 texlive-latex-fncychap
8219 texlive-latex-float
8220 texlive-latex-framed
8221 texlive-latex-geometry
8222 texlive-latex-graphics
8223 texlive-hyperref
8224 texlive-latex-mdwtools
8225 texlive-latex-multirow
8226 texlive-latex-needspace
8227 texlive-oberdiek
8228 texlive-latex-parskip
8229 texlive-latex-preview
8230 texlive-latex-tabulary
8231 texlive-latex-threeparttable
8232 texlive-latex-titlesec
8233 texlive-latex-trimspaces
8234 texlive-latex-ucs
8235 texlive-latex-upquote
8236 texlive-url
8237 texlive-latex-varwidth
8238 texlive-latex-wrapfig)))
8239 ("texinfo" ,texinfo)))))
8240
8241 (define-public python-urwid
8242 (package
8243 (name "python-urwid")
8244 (version "2.1.2")
8245 (source
8246 (origin
8247 (method url-fetch)
8248 (uri (pypi-uri "urwid" version))
8249 (sha256
8250 (base32
8251 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8252 (build-system python-build-system)
8253 (home-page "http://urwid.org")
8254 (synopsis "Console user interface library for Python")
8255 (description
8256 "Urwid is a curses-based UI/widget library for Python. It includes many
8257 features useful for text console applications.")
8258 (properties `((python2-variant . ,(delay python2-urwid))))
8259 (license license:lgpl2.1+)))
8260
8261 (define-public python2-urwid
8262 (let ((base (package-with-python2
8263 (strip-python2-variant python-urwid))))
8264 (package
8265 (inherit base)
8266 (version "2.1.0")
8267 (source
8268 (origin
8269 (method url-fetch)
8270 (uri (pypi-uri "urwid" version))
8271 (sha256
8272 (base32
8273 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8274
8275 (define-public python-urwid-readline
8276 (package
8277 (name "python-urwid-readline")
8278 (version "0.12")
8279 (source
8280 (origin
8281 (method git-fetch)
8282 (uri (git-reference
8283 (url "https://github.com/rr-/urwid_readline")
8284 (commit version)))
8285 (file-name (git-file-name name version))
8286 (sha256
8287 (base32
8288 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8289 (build-system python-build-system)
8290 (arguments
8291 `(#:phases
8292 (modify-phases %standard-phases
8293 (replace 'check
8294 (lambda* (#:key tests? #:allow-other-keys)
8295 (when tests?
8296 (invoke "python" "-m" "pytest"))
8297 #t)))))
8298 (propagated-inputs
8299 `(("python-urwid" ,python-urwid)))
8300 (native-inputs
8301 `(("python-pytest" ,python-pytest)))
8302 (home-page "https://github.com/rr-/urwid_readline")
8303 (synopsis "Text input widget for urwid that supports readline shortcuts")
8304 (description
8305 "This package provides a textbox edit widget for @code{python-urwid} that
8306 supports @code{readline} shortcuts.")
8307 (license license:expat)))
8308
8309 (define-public python-textdistance
8310 (package
8311 (name "python-textdistance")
8312 (version "4.2.1")
8313 (source
8314 (origin
8315 ;; There are no tests in the PyPI tarball.
8316 (method git-fetch)
8317 (uri (git-reference
8318 (url "https://github.com/life4/textdistance")
8319 (commit (string-append "v." version))))
8320 (file-name (git-file-name name version))
8321 (sha256
8322 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8323 (build-system python-build-system)
8324 (arguments
8325 `(#:test-target "pytest"
8326 #:phases
8327 (modify-phases %standard-phases
8328 (add-after 'unpack 'delete-external-test
8329 (lambda _
8330 ;; All tests in this file require external libraries.
8331 (delete-file "tests/test_external.py")
8332 #t)))))
8333 (native-inputs
8334 `(("python-hypothesis" ,python-hypothesis)
8335 ("python-isort" ,python-isort)
8336 ("python-numpy" ,python-numpy)
8337 ("python-pytest" ,python-pytest)
8338 ("python-pytest-runner" ,python-pytest-runner)
8339 ("python-tabulate" ,python-tabulate)))
8340 (home-page "https://github.com/life4/textdistance")
8341 (synopsis "Compute distance between the two texts")
8342 (description "@code{textdistance} is a pure Python library for comparing
8343 distance between two or more sequences by many algorithms.")
8344 (license license:expat)))
8345
8346 (define-public python-urwidtrees
8347 (package
8348 (name "python-urwidtrees")
8349 (version "1.0.2")
8350 (source
8351 (origin
8352 (method git-fetch)
8353 ;; package author intends on distributing via github rather than pypi:
8354 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8355 (uri (git-reference
8356 (url "https://github.com/pazz/urwidtrees")
8357 (commit version)))
8358 (file-name (git-file-name name version))
8359 (sha256
8360 (base32
8361 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8362 (build-system python-build-system)
8363 (arguments
8364 '(#:use-setuptools? #f
8365 #:tests? #f)) ; no tests
8366 (propagated-inputs `(("python-urwid" ,python-urwid)))
8367 (home-page "https://github.com/pazz/urwidtrees")
8368 (synopsis "Tree widgets for urwid")
8369 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8370 toolkit. Use it to build trees of widgets.")
8371 (license license:gpl3+)))
8372
8373 (define-public python2-urwidtrees
8374 (package-with-python2 python-urwidtrees))
8375
8376 (define-public python-ua-parser
8377 (package
8378 (name "python-ua-parser")
8379 (version "0.8.0")
8380 (source
8381 (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "ua-parser" version))
8384 (sha256
8385 (base32
8386 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8387 (build-system python-build-system)
8388 (arguments
8389 `(#:tests? #f)) ;no test suite in release
8390 (native-inputs
8391 `(("python-pyyaml" ,python-pyyaml)))
8392 (home-page "https://github.com/ua-parser/uap-python")
8393 (synopsis "User agent parser")
8394 (description
8395 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8396 (license license:asl2.0)))
8397
8398 (define-public python2-ua-parser
8399 (package-with-python2 python-ua-parser))
8400
8401 (define-public python-user-agents
8402 (package
8403 (name "python-user-agents")
8404 (version "1.1.0")
8405 (source
8406 (origin
8407 (method url-fetch)
8408 (uri (pypi-uri "user-agents" version))
8409 (sha256
8410 (base32
8411 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8412 (build-system python-build-system)
8413 (arguments
8414 `(#:tests? #f)) ;missing devices.json test file in release
8415 (propagated-inputs
8416 `(("python-ua-parser" ,python-ua-parser)))
8417 (home-page "https://github.com/selwin/python-user-agents")
8418 (synopsis "User Agent strings parsing library")
8419 (description
8420 "A library to identify devices (phones, tablets) and their capabilities by
8421 parsing (browser/HTTP) user agent strings.")
8422 (license license:expat)))
8423
8424 (define-public python2-user-agents
8425 (package-with-python2 python-user-agents))
8426
8427 (define-public python-dbus
8428 (package
8429 (name "python-dbus")
8430 (version "1.2.16")
8431 (source
8432 (origin
8433 (method url-fetch)
8434 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8435 "dbus-python-" version ".tar.gz"))
8436 (sha256
8437 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8438 (build-system gnu-build-system)
8439 (native-inputs
8440 `(("pkg-config" ,pkg-config)))
8441 (inputs
8442 `(("python" ,python-wrapper)
8443 ("dbus-glib" ,dbus-glib)))
8444 (synopsis "Python bindings for D-bus")
8445 (description "python-dbus provides bindings for libdbus, the reference
8446 implementation of D-Bus.")
8447 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8448 (license license:expat)))
8449
8450 (define-public python2-dbus
8451 (package/inherit python-dbus
8452 (name "python2-dbus")
8453 (inputs `(("python" ,python-2)
8454 ,@(alist-delete "python"
8455 (package-inputs python-dbus)
8456 equal?)))))
8457
8458 (define-public python-notify2
8459 (package
8460 (name "python-notify2")
8461 (version "0.3.1")
8462 (source
8463 (origin
8464 (method url-fetch)
8465 (uri (pypi-uri "notify2" version))
8466 (sha256
8467 (base32
8468 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8469 (build-system python-build-system)
8470 (arguments `(#:tests? #f)) ; tests depend on system state
8471 (native-inputs
8472 `(("python-dbus" ,python-dbus)))
8473 (home-page "https://bitbucket.org/takluyver/pynotify2")
8474 (synopsis "Python interface to D-Bus notifications")
8475 (description
8476 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8477 It is a reimplementation of pynotify in pure Python, and an alternative to
8478 the GObject Introspection bindings to libnotify for non-GTK applications.")
8479 (license (list license:bsd-2
8480 license:lgpl2.1+))))
8481
8482 (define-public python2-notify2
8483 (package-with-python2 python-notify2))
8484
8485 ;; beautifulsoup4 has a totally different namespace than 3.x,
8486 ;; and pypi seems to put it under its own name, so I guess we should too
8487 (define-public python-beautifulsoup4
8488 (package
8489 (name "python-beautifulsoup4")
8490 (version "4.9.3")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "beautifulsoup4" version))
8495 (sha256
8496 (base32
8497 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8498 (build-system python-build-system)
8499 (arguments
8500 `(#:phases
8501 (modify-phases %standard-phases
8502 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8503 ;; must use this conversion script when building with Python 3. The
8504 ;; conversion script also runs the tests.
8505 ;; For more information, see the file 'convert-py3k' in the source
8506 ;; distribution.
8507 (replace 'check
8508 (lambda _ (invoke "./convert-py3k"))))))
8509 (propagated-inputs
8510 `(("python-soupsieve" ,python-soupsieve)))
8511 (home-page
8512 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8513 (synopsis
8514 "Python screen-scraping library")
8515 (description
8516 "Beautiful Soup is a Python library designed for rapidly setting up
8517 screen-scraping projects. It offers Pythonic idioms for navigating,
8518 searching, and modifying a parse tree, providing a toolkit for
8519 dissecting a document and extracting what you need. It automatically
8520 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8521 (license license:expat)
8522 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8523
8524 (define-public python2-beautifulsoup4
8525 (let ((base (package-with-python2
8526 (strip-python2-variant python-beautifulsoup4))))
8527 (package/inherit base
8528 (arguments `(#:python ,python-2)))))
8529
8530 (define-public python-soupsieve
8531 (package
8532 (name "python-soupsieve")
8533 (version "2.2.1")
8534 (source
8535 (origin
8536 (method url-fetch)
8537 (uri (pypi-uri "soupsieve" version))
8538 (sha256
8539 (base32
8540 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8541 (build-system python-build-system)
8542 (arguments
8543 ;;XXX: 2 tests fail currently despite claming they were to be
8544 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8545 ;;don't want to create a circular dependency.
8546 (list #:tests? #f
8547 #:phases
8548 #~(modify-phases %standard-phases
8549 ;; Circular dependency with python-beautifulsoup4.
8550 (delete 'sanity-check))))
8551 (home-page "https://github.com/facelessuser/soupsieve")
8552 (synopsis "CSS selector library")
8553 (description
8554 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8555 Soup 4. It aims to provide selecting, matching, and filtering using modern
8556 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8557 specifications up through the latest CSS level 4 drafts and beyond (though
8558 some are not yet implemented).")
8559 (properties `((python2-variant . ,(delay python2-soupsieve))))
8560 (license license:expat)))
8561
8562 ;; This is the last version that supports python-2
8563 (define-public python2-soupsieve
8564 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8565 (package
8566 (inherit base)
8567 (version "1.9.6")
8568 (source
8569 (origin
8570 (method url-fetch)
8571 (uri (pypi-uri "soupsieve" version))
8572 (sha256
8573 (base32
8574 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8575 (propagated-inputs
8576 `(("python2-backports-functools-lru-cache"
8577 ,python2-backports-functools-lru-cache)
8578 ,@(package-propagated-inputs base))))))
8579
8580 (define-public python-netifaces
8581 (package
8582 (name "python-netifaces")
8583 (version "0.10.9")
8584 (source
8585 (origin
8586 (method url-fetch)
8587 (uri (pypi-uri "netifaces" version))
8588 (sha256
8589 (base32
8590 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8591 (build-system python-build-system)
8592 (home-page "https://github.com/al45tair/netifaces")
8593 (synopsis
8594 "Python module for portable network interface information")
8595 (description
8596 "Netifaces is a Python module providing information on network
8597 interfaces in an easy and portable manner.")
8598 (license license:expat)))
8599
8600 (define-public python2-netifaces
8601 (package-with-python2 python-netifaces))
8602
8603 (define-public python-networkx
8604 (package
8605 (name "python-networkx")
8606 (version "2.6.2")
8607 (source
8608 (origin
8609 (method url-fetch)
8610 (uri (pypi-uri "networkx" version))
8611 (sha256
8612 (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
8613 (build-system python-build-system)
8614 (arguments
8615 '(#:phases (modify-phases %standard-phases
8616 (replace 'check
8617 (lambda* (#:key tests? #:allow-other-keys)
8618 (if tests?
8619 (invoke "pytest" "-vv" "--pyargs" "networkx")
8620 (format #t "test suite not run~%"))
8621 #t)))))
8622 ;; python-decorator is needed at runtime.
8623 (propagated-inputs
8624 `(("python-decorator" ,python-decorator)))
8625 (native-inputs
8626 `(("python-pytest" ,python-pytest)))
8627 (home-page "https://networkx.github.io/")
8628 (synopsis "Python module for creating and manipulating graphs and networks")
8629 (description
8630 "NetworkX is a Python package for the creation, manipulation, and study
8631 of the structure, dynamics, and functions of complex networks.")
8632 (properties `((python2-variant . ,(delay python2-networkx))))
8633 (license license:bsd-3)))
8634
8635 ;; NetworkX 2.2 is the last version with support for Python 2.
8636 (define-public python2-networkx
8637 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8638 (package
8639 (inherit base)
8640 (version "2.2")
8641 (source (origin
8642 (method url-fetch)
8643 (uri (pypi-uri "networkx" version ".zip"))
8644 (sha256
8645 (base32
8646 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8647 (arguments
8648 `(#:python ,python-2))
8649 (native-inputs
8650 `(("python-nose" ,python2-nose)
8651 ("unzip" ,unzip))))))
8652
8653 (define-public python-datrie
8654 (package
8655 (name "python-datrie")
8656 (version "0.8.2")
8657 (source
8658 (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "datrie" version))
8661 (sha256
8662 (base32
8663 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8664 (build-system python-build-system)
8665 (native-inputs
8666 `(("python-cython" ,python-cython)
8667 ("python-hypothesis" ,python-hypothesis)
8668 ("python-pytest" ,python-pytest)
8669 ("python-pytest-runner" ,python-pytest-runner)))
8670 (home-page "https://github.com/kmike/datrie")
8671 (synopsis "Fast, efficiently stored trie for Python")
8672 (description
8673 "This package provides a fast, efficiently stored trie implementation for
8674 Python.")
8675 (license license:lgpl2.1+)))
8676
8677 (define-public python-amply
8678 (package
8679 (name "python-amply")
8680 (version "0.1.4")
8681 (source
8682 (origin
8683 (method url-fetch)
8684 (uri (pypi-uri "amply" version))
8685 (sha256
8686 (base32
8687 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8688 (build-system python-build-system)
8689 (propagated-inputs
8690 `(("python-docutils" ,python-docutils)
8691 ("python-pyparsing" ,python-pyparsing)))
8692 (native-inputs
8693 `(("python-setuptools-scm" ,python-setuptools-scm)))
8694 (home-page "https://github.com/willu47/amply")
8695 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8696 (description
8697 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8698 structures.")
8699 (license license:epl1.0)))
8700
8701 (define-public python-pulp
8702 (package
8703 (name "python-pulp")
8704 (version "2.4")
8705 (source
8706 (origin
8707 (method url-fetch)
8708 (uri (pypi-uri "PuLP" version))
8709 (sha256
8710 (base32
8711 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8712 (build-system python-build-system)
8713 (propagated-inputs
8714 `(("python-amply" ,python-amply)))
8715 (home-page "https://github.com/coin-or/pulp")
8716 (synopsis "Linear Programming modeler")
8717 (description
8718 "PuLP is a Linear Programming modeler written in Python. PuLP can
8719 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8720 solve linear problems.")
8721 (license license:expat)))
8722
8723 (define-public python-toposort
8724 (package
8725 (name "python-toposort")
8726 (version "1.6")
8727 (source
8728 (origin
8729 (method url-fetch)
8730 (uri (pypi-uri "toposort" version))
8731 (sha256
8732 (base32
8733 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8734 (build-system python-build-system)
8735 (home-page "https://gitlab.com/ericvsmith/toposort")
8736 (synopsis "Topological sort algorithm")
8737 (description
8738 "This package provides an implementation of a topological sort
8739 algorithm.")
8740 (license license:asl2.0)))
8741
8742 (define-public python-three-merge
8743 (package
8744 (name "python-three-merge")
8745 (version "0.1.1")
8746 (source
8747 (origin
8748 ;; There are no tests in the PyPI tarball.
8749 (method git-fetch)
8750 (uri (git-reference
8751 (url "https://github.com/spyder-ide/three-merge")
8752 (commit (string-append "v" version))))
8753 (file-name (git-file-name name version))
8754 (sha256
8755 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
8756 (build-system python-build-system)
8757 (arguments
8758 `(#:test-target "pytest"))
8759 (propagated-inputs
8760 `(("python-diff-match-patch" ,python-diff-match-patch)))
8761 (native-inputs
8762 `(("python-flaky" ,python-flaky)
8763 ("python-pytest" ,python-pytest)
8764 ("python-pytest-cov" ,python-pytest-cov)
8765 ("python-pytest-runner" ,python-pytest-runner)
8766 ("python-pytest-timeout" ,python-pytest-timeout)))
8767 (home-page "https://github.com/spyder-ide/three-merge")
8768 (synopsis "Library for merging two strings with respect to a base one")
8769 (description
8770 "This package provides a Python library to perform a 3-way merge between
8771 strings, based on @code{diff-match-patch}. This library performs merges at a
8772 character level, as opposed to most VCS systems, which opt for a line-based
8773 approach.")
8774 (license license:expat)))
8775
8776 (define-public snakemake
8777 (package
8778 (name "snakemake")
8779 (version "5.32.2")
8780 (source
8781 (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "snakemake" version))
8784 (sha256
8785 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8786 (build-system python-build-system)
8787 (arguments
8788 ;; TODO: Package missing test dependencies.
8789 '(#:tests? #f
8790 #:phases
8791 (modify-phases %standard-phases
8792 ;; For cluster execution Snakemake will call Python. Since there is
8793 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8794 ;; this by calling the snakemake wrapper instead.
8795 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8796 (lambda* (#:key outputs #:allow-other-keys)
8797 (substitute* "snakemake/executors/__init__.py"
8798 (("\\{sys.executable\\} -m snakemake")
8799 (string-append (assoc-ref outputs "out")
8800 "/bin/snakemake")))
8801 #t)))))
8802 (propagated-inputs
8803 `(("python-appdirs" ,python-appdirs)
8804 ("python-configargparse" ,python-configargparse)
8805 ("python-datrie" ,python-datrie)
8806 ("python-docutils" ,python-docutils)
8807 ("python-gitpython" ,python-gitpython)
8808 ("python-jinja2" ,python-jinja2)
8809 ("python-jsonschema" ,python-jsonschema)
8810 ("python-nbformat" ,python-nbformat)
8811 ("python-networkx" ,python-networkx)
8812 ("python-psutil" ,python-psutil)
8813 ("python-pulp" ,python-pulp)
8814 ("python-pyyaml" ,python-pyyaml)
8815 ("python-ratelimiter" ,python-ratelimiter)
8816 ("python-requests" ,python-requests)
8817 ("python-toposort" ,python-toposort)
8818 ("python-wrapt" ,python-wrapt)))
8819 (home-page "https://snakemake.readthedocs.io")
8820 (synopsis "Python-based execution environment for make-like workflows")
8821 (description
8822 "Snakemake aims to reduce the complexity of creating workflows by
8823 providing a clean and modern domain specific specification language (DSL) in
8824 Python style, together with a fast and comfortable execution environment.")
8825 (license license:expat)))
8826
8827 (define-public python-pyqrcode
8828 (package
8829 (name "python-pyqrcode")
8830 (version "1.2.1")
8831 (source
8832 (origin
8833 (method url-fetch)
8834 (uri (pypi-uri "PyQRCode" version))
8835 (sha256
8836 (base32
8837 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8838 (build-system python-build-system)
8839 (home-page
8840 "https://github.com/mnooner256/pyqrcode")
8841 (synopsis "QR code generator")
8842 (description
8843 "Pyqrcode is a QR code generator written purely in Python with
8844 SVG, EPS, PNG and terminal output.")
8845 (license license:bsd-3)))
8846
8847 (define-public python-seaborn
8848 (package
8849 (name "python-seaborn")
8850 (version "0.11.1")
8851 (source
8852 (origin
8853 (method url-fetch)
8854 (uri (pypi-uri "seaborn" version))
8855 (sha256
8856 (base32 "1b81p9s6li3b606ivgbynrh102fclwlw74m8qxzsii9pv6p8xrs4"))
8857 (patches (search-patches "python-seaborn-kde-test.patch"))))
8858 (build-system python-build-system)
8859 (arguments
8860 `(#:phases
8861 (modify-phases %standard-phases
8862 (add-before 'check 'start-xserver
8863 (lambda _
8864 ;; There must be a running X server and make check doesn't
8865 ;; start one. Therefore we must do it.
8866 (system "Xvfb :1 &")
8867 (setenv "DISPLAY" ":1")))
8868 (replace 'check
8869 (lambda* (#:key tests? #:allow-other-keys)
8870 (when tests?
8871 (invoke "pytest" "seaborn")))))))
8872 (propagated-inputs
8873 `(("python-pandas" ,python-pandas)
8874 ("python-matplotlib" ,python-matplotlib)
8875 ("python-numpy" ,python-numpy)
8876 ("python-scipy" ,python-scipy)))
8877 (native-inputs
8878 `(("python-pytest" ,python-pytest)
8879 ("xorg-server" ,xorg-server-for-tests)))
8880 (home-page "https://seaborn.pydata.org/")
8881 (synopsis "Statistical data visualization")
8882 (description
8883 "Seaborn is a library for making attractive and informative statistical
8884 graphics in Python. It is built on top of matplotlib and tightly integrated
8885 with the PyData stack, including support for numpy and pandas data structures
8886 and statistical routines from scipy and statsmodels.")
8887 (properties `((python2-variant . ,(delay python2-seaborn))))
8888 (license license:bsd-3)))
8889
8890 ;; 0.9.1 is the last release with support for Python 2.
8891 (define-public python2-seaborn
8892 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8893 (package
8894 (inherit base)
8895 (version "0.9.1")
8896 (source (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "seaborn" version))
8899 (sha256
8900 (base32
8901 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8902
8903 (define-public python-mpmath
8904 (package
8905 (name "python-mpmath")
8906 (version "1.1.0")
8907 (source (origin
8908 (method url-fetch)
8909 (uri (pypi-uri "mpmath" version))
8910 (file-name (git-file-name name version))
8911 (sha256
8912 (base32
8913 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8914 (build-system python-build-system)
8915 (native-inputs
8916 `(("python-pytest" ,python-pytest)))
8917 (arguments
8918 '(#:phases
8919 (modify-phases %standard-phases
8920 (replace 'check
8921 (lambda _
8922 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8923 (home-page "https://mpmath.org")
8924 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8925 (description
8926 "@code{mpmath} can be used as an arbitrary-precision substitute for
8927 Python's float/complex types and math/cmath modules, but also does much
8928 more advanced mathematics.")
8929 (license license:bsd-3)))
8930
8931 (define-public python2-mpmath
8932 (package-with-python2 python-mpmath))
8933
8934 (define-public python-bigfloat
8935 (package
8936 (name "python-bigfloat")
8937 (version "0.3.0")
8938 (source
8939 (origin
8940 (method url-fetch)
8941 (uri (pypi-uri "bigfloat" version))
8942 (sha256
8943 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8944 (build-system python-build-system)
8945 (inputs
8946 `(("mpfr" ,mpfr)))
8947 (home-page "https://github.com/mdickinson/bigfloat")
8948 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8949 (description
8950 "This package provides a Python interface to the MPFR library for
8951 multiprecision arithmetic.")
8952 (license license:lgpl3+)))
8953
8954 (define-public python-sympy
8955 (package
8956 (name "python-sympy")
8957 (version "1.7.1")
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "sympy" version))
8962 (sha256
8963 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8964 (build-system python-build-system)
8965 (arguments
8966 `(#:phases
8967 (modify-phases %standard-phases
8968 (replace 'check
8969 (lambda* (#:key outputs #:allow-other-keys)
8970 (invoke
8971 (or (which "python3") (which "python"))
8972 "-c" "import sympy; sympy.test(\"/core\")"))))))
8973 (propagated-inputs
8974 `(("python-mpmath" ,python-mpmath)))
8975 (home-page "https://www.sympy.org/")
8976 (synopsis "Python library for symbolic mathematics")
8977 (description
8978 "SymPy is a Python library for symbolic mathematics. It aims to become a
8979 full-featured computer algebra system (CAS) while keeping the code as simple
8980 as possible in order to be comprehensible and easily extensible.")
8981 (license license:bsd-3)))
8982
8983 (define-public python2-sympy
8984 (package
8985 (inherit (package-with-python2 python-sympy))
8986 (version "1.5.1") ; last release for python2
8987 (source
8988 (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "sympy" version))
8991 (sha256
8992 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8993
8994 (define-public python-q
8995 (package
8996 (name "python-q")
8997 (version "2.6")
8998 (source
8999 (origin
9000 (method url-fetch)
9001 (uri (pypi-uri "q" version))
9002 (sha256
9003 (base32
9004 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
9005 (build-system python-build-system)
9006 (home-page "https://github.com/zestyping/q")
9007 (synopsis "Quick-and-dirty debugging output for tired programmers")
9008 (description
9009 "q is a Python module for \"print\" style of debugging Python code. It
9010 provides convenient short API for print out of values, tracebacks, and
9011 falling into the Python interpreter.")
9012 (license license:asl2.0)))
9013
9014 (define-public python2-q
9015 (package-with-python2 python-q))
9016
9017 (define-public python-xlib
9018 (package
9019 (name "python-xlib")
9020 (version "0.29")
9021 (source
9022 (origin
9023 (method git-fetch)
9024 (uri (git-reference
9025 (url "https://github.com/python-xlib/python-xlib")
9026 (commit version)))
9027 (file-name (git-file-name name version))
9028 (sha256
9029 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
9030 (build-system python-build-system)
9031 (arguments
9032 `(#:phases
9033 (modify-phases %standard-phases
9034 (add-before 'check 'start-xserver
9035 (lambda* (#:key inputs #:allow-other-keys)
9036 (let ((xorg-server (assoc-ref inputs "xorg-server")))
9037 ;; There must be a running X server and make check doesn't
9038 ;; start one. Therefore we must do it.
9039 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
9040 (setenv "DISPLAY" ":1")
9041 #t))))))
9042 (native-inputs
9043 `(("python-mock" ,python-mock)
9044 ("python-setuptools-scm" ,python-setuptools-scm)
9045 ("xorg-server" ,xorg-server)))
9046 (propagated-inputs
9047 `(("python-six" ,python-six)))
9048 (home-page "https://github.com/python-xlib/python-xlib")
9049 (synopsis "Python X11 client library")
9050 (description
9051 "The Python X Library is intended to be a fully functional
9052 X client library for Python programs. It is useful to implement
9053 low-level X clients. It is written entirely in Python.")
9054 (license license:gpl2+)))
9055
9056 (define-public python2-xlib
9057 (package-with-python2 python-xlib))
9058
9059 (define-public python-singledispatch
9060 (package
9061 (name "python-singledispatch")
9062 (version "3.4.0.3")
9063 (source
9064 (origin
9065 (method url-fetch)
9066 (uri (pypi-uri "singledispatch" version))
9067 (sha256
9068 (base32
9069 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
9070 (build-system python-build-system)
9071 (native-inputs
9072 `(("python-six" ,python-six))) ; required for conversion, not at run-time
9073 (home-page
9074 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
9075 (synopsis "Backport of singledispatch feature from Python 3.4")
9076 (description
9077 "This library brings functools.singledispatch from Python 3.4 to Python
9078 2.6-3.3.")
9079 (license license:expat)))
9080
9081 (define-public python2-singledispatch
9082 (package-with-python2 python-singledispatch))
9083
9084 ;; the python- version can be removed with python-3.5
9085 (define-public python-backports-abc
9086 (package
9087 (name "python-backports-abc")
9088 (version "0.5")
9089 (source
9090 (origin
9091 (method url-fetch)
9092 (uri (pypi-uri "backports_abc" version))
9093 (sha256
9094 (base32
9095 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9096 (build-system python-build-system)
9097 (home-page "https://github.com/cython/backports_abc")
9098 (synopsis "Backport of additions to the 'collections.abc' module")
9099 (description
9100 "Python-backports-abc provides a backport of additions to the
9101 @code{collections.abc} module in Python-3.5.")
9102 (license license:psfl)))
9103
9104 (define-public python2-backports-abc
9105 (package-with-python2 python-backports-abc))
9106
9107 (define-public python-backports-csv
9108 (package
9109 (name "python-backports-csv")
9110 (version "1.0.7")
9111 (source
9112 (origin
9113 (method url-fetch)
9114 (uri (pypi-uri "backports.csv" version))
9115 (sha256
9116 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9117 (build-system python-build-system)
9118 (home-page "https://github.com/ryanhiebert/backports.csv")
9119 (synopsis "Backport of Python 3's csv module for Python 2")
9120 (description
9121 "Provides a backport of Python 3's @code{csv} module for parsing
9122 comma separated values. The API of the @code{csv} module in Python 2
9123 is drastically different from the @code{csv} module in Python 3.
9124 This is due, for the most part, to the difference between str in
9125 Python 2 and Python 3.")
9126 (license license:psfl)))
9127
9128 (define-public python2-backports-csv
9129 (package-with-python2 python-backports-csv))
9130
9131 (define-public python2-backports-shutil-get-terminal-size
9132 (package
9133 (name "python2-backports-shutil-get-terminal-size")
9134 (version "1.0.0")
9135 (source
9136 (origin
9137 (method url-fetch)
9138 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9139 (sha256
9140 (base32
9141 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9142 (build-system python-build-system)
9143 (arguments
9144 `(#:python ,python-2
9145 #:phases
9146 (modify-phases %standard-phases
9147 (replace 'check
9148 (lambda _
9149 (invoke "py.test" "-v"))))))
9150 (native-inputs
9151 `(("python2-pytest" ,python2-pytest)))
9152 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9153 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9154 (description
9155 "This package provides a backport of the @code{get_terminal_size
9156 function} from Python 3.3's @code{shutil}.
9157 Unlike the original version it is written in pure Python rather than C,
9158 so it might be a tiny bit slower.")
9159 (license license:expat)))
9160
9161 (define-public python-waf
9162 (package
9163 (name "python-waf")
9164 (version "2.0.19")
9165 (source (origin
9166 (method url-fetch)
9167 (uri (string-append "https://waf.io/"
9168 "waf-" version ".tar.bz2"))
9169 (sha256
9170 (base32
9171 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9172 (build-system python-build-system)
9173 (arguments
9174 '(#:phases
9175 (modify-phases %standard-phases
9176 (replace 'build
9177 (lambda _
9178 ;; XXX: Find a way to add all extra tools.
9179 (let ((tools '("gccdeps"
9180 "clang_compilation_database")))
9181 (invoke "python" "waf-light" "configure" "build"
9182 (string-append "--tools="
9183 (string-join tools ","))))))
9184 (replace 'check
9185 (lambda _
9186 (invoke "python" "waf" "--version")))
9187 (replace 'install
9188 (lambda* (#:key outputs #:allow-other-keys)
9189 (let ((out (assoc-ref outputs "out")))
9190 (install-file "waf" (string-append out "/bin")))
9191 #t))
9192 ;; waf breaks when it is wrapped.
9193 (delete 'wrap))))
9194 (home-page "https://waf.io/")
9195 (synopsis "Python-based build system")
9196 (description
9197 "Waf is a Python-based framework for configuring, compiling and installing
9198 applications.")
9199 (license license:bsd-3)))
9200
9201 (define-public python2-waf
9202 (package-with-python2 python-waf))
9203
9204 (define-public python-pyzmq
9205 (package
9206 (name "python-pyzmq")
9207 (version "22.1.0")
9208 (source
9209 (origin
9210 (method url-fetch)
9211 (uri (pypi-uri "pyzmq" version))
9212 (sha256
9213 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9214 (build-system python-build-system)
9215 (arguments
9216 `(#:configure-flags
9217 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9218 #:phases
9219 (modify-phases %standard-phases
9220 (add-before 'check 'build-extensions
9221 (lambda _
9222 ;; Cython extensions have to be built before running the tests.
9223 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9224 (inputs
9225 `(("zeromq" ,zeromq)))
9226 (native-inputs
9227 `(("pkg-config" ,pkg-config)
9228 ("python-cython" ,python-cython)
9229 ("python-pytest" ,python-pytest)))
9230 (home-page "https://github.com/zeromq/pyzmq")
9231 (synopsis "Python bindings for 0MQ")
9232 (description
9233 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9234 (license license:bsd-4)))
9235
9236 (define-public python-pep8
9237 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9238 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9239 ;; some dependents' test suites, and nothing more.
9240 (package
9241 (name "python-pep8")
9242 (version "1.7.0")
9243 (source
9244 (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "pep8" version))
9247 (sha256
9248 (base32
9249 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9250 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9251 (build-system python-build-system)
9252 (home-page "https://pep8.readthedocs.org/")
9253 (synopsis "Python style guide checker")
9254 (description
9255 "This tools checks Python code against some of the style conventions in
9256 PEP 8.")
9257 (license license:expat)))
9258
9259 (define-public python2-pep8
9260 (package-with-python2 python-pep8))
9261
9262 (define-public python-pep517
9263 (package
9264 (inherit python-pep517-bootstrap)
9265 (name "python-pep517")
9266 (arguments
9267 '(#:phases
9268 (modify-phases %standard-phases
9269 (replace 'check
9270 (lambda* (#:key tests? #:allow-other-keys)
9271 (delete-file "pytest.ini")
9272 ;; This test tries to connect to the internet
9273 (delete-file "tests/test_meta.py")
9274 (if tests?
9275 (invoke "pytest")
9276 #t))))))
9277 (native-inputs
9278 `(("python-mock" ,python-mock)
9279 ("python-pytest" ,python-pytest)
9280 ("python-testpath" ,python-testpath)))
9281 (properties `((python2-variant . ,(delay python2-pep517))))))
9282
9283 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9284 (define-public python2-pep517
9285 (let ((base (package-with-python2
9286 (strip-python2-variant python-pep517))))
9287 (package/inherit base
9288 (name "python2-pep517")
9289 (arguments
9290 `(#:tests? #f
9291 ,@(package-arguments base)))
9292 (native-inputs `()))))
9293
9294 (define-public python-pyflakes
9295 (package
9296 (name "python-pyflakes")
9297 (version "2.3.1")
9298 (source
9299 (origin
9300 (method url-fetch)
9301 (uri (pypi-uri "pyflakes" version))
9302 (sha256
9303 (base32
9304 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9305 (build-system python-build-system)
9306 (home-page "https://github.com/PyCQA/pyflakes")
9307 (synopsis "Passive checker of Python programs")
9308 (description
9309 "Pyflakes statically checks Python source code for common errors.")
9310 (license license:expat)))
9311
9312 (define-public python2-pyflakes
9313 (package-with-python2 python-pyflakes))
9314
9315 (define-public python-pyflakes-2.2
9316 (package
9317 (inherit python-pyflakes)
9318 (version "2.2.0")
9319 (source (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "pyflakes" version))
9322 (sha256
9323 (base32
9324 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9325
9326 (define-public python-mccabe
9327 (package
9328 (name "python-mccabe")
9329 (version "0.6.1")
9330 (source
9331 (origin
9332 (method url-fetch)
9333 (uri (pypi-uri "mccabe" version))
9334 (sha256
9335 (base32
9336 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9337 (build-system python-build-system)
9338 (native-inputs
9339 `(("python-toml", python-toml)
9340 ("python-pytest" ,python-pytest-bootstrap)
9341 ("python-pytest-runner" ,python-pytest-runner)))
9342 (home-page "https://github.com/PyCQA/mccabe")
9343 (synopsis "McCabe checker, plugin for flake8")
9344 (description "This package provides a Flake8 plug-in to compute the McCabe
9345 cyclomatic complexity of Python source code.")
9346 (license license:expat)))
9347
9348 (define-public python2-mccabe
9349 (package-with-python2 python-mccabe))
9350
9351 (define-public python-flake8
9352 (package
9353 (name "python-flake8")
9354 (version "3.9.1")
9355 (source (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "flake8" version))
9358 (sha256
9359 (base32
9360 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9361 (build-system python-build-system)
9362 (arguments
9363 `(#:phases
9364 (modify-phases %standard-phases
9365 (replace 'check
9366 (lambda* (#:key inputs outputs #:allow-other-keys)
9367 (add-installed-pythonpath inputs outputs)
9368 (invoke "pytest" "-v"))))))
9369 (propagated-inputs
9370 `(("python-pycodestyle" ,python-pycodestyle)
9371 ("python-entrypoints" ,python-entrypoints)
9372 ("python-pyflakes" ,python-pyflakes)
9373 ("python-mccabe" ,python-mccabe)))
9374 (native-inputs
9375 `(("python-mock" ,python-mock)
9376 ("python-pytest" ,python-pytest)))
9377 (home-page "https://gitlab.com/pycqa/flake8")
9378 (synopsis
9379 "The modular source code checker: pep8, pyflakes and co")
9380 (description
9381 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9382 (properties `((python2-variant . ,(delay python2-flake8))))
9383 (license license:expat)))
9384
9385 (define-public python2-flake8
9386 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9387 (package/inherit base
9388 (propagated-inputs
9389 `(("python2-configparser" ,python2-configparser)
9390 ("python2-enum34" ,python2-enum34)
9391 ("python2-functools32" ,python2-functools32)
9392 ("python2-typing" ,python2-typing)
9393 ,@(package-propagated-inputs base))))))
9394
9395 (define-public python-flake8-3.8
9396 (package
9397 (inherit python-flake8)
9398 (version "3.8.4")
9399 (source (origin
9400 (method url-fetch)
9401 (uri (pypi-uri "flake8" version))
9402 (sha256
9403 (base32
9404 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9405 (propagated-inputs
9406 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9407 ("python-entrypoints" ,python-entrypoints)
9408 ("python-pyflakes" ,python-pyflakes-2.2)
9409 ("python-mccabe" ,python-mccabe)))))
9410
9411 (define-public python-flake8-bugbear
9412 (package
9413 (name "python-flake8-bugbear")
9414 (version "20.1.4")
9415 (source
9416 (origin
9417 (method url-fetch)
9418 (uri (pypi-uri "flake8-bugbear" version))
9419 (sha256
9420 (base32
9421 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9422 (build-system python-build-system)
9423 (arguments
9424 '(#:phases
9425 (modify-phases %standard-phases
9426 (add-before 'check 'disable-test
9427 (lambda _
9428 ;; This test fails on slow computers.
9429 (substitute* "tests/test_bugbear.py"
9430 (("def test_does_not_crash_on_any_valid_code")
9431 "def _test_does_not_crash_on_any_valid_code")))))))
9432 (native-inputs
9433 `(("python-hypothesis" ,python-hypothesis)
9434 ("python-hypothesmith" ,python-hypothesmith)))
9435 (propagated-inputs
9436 `(("python-attrs" ,python-attrs)
9437 ("python-flake8" ,python-flake8)))
9438 (home-page "https://github.com/PyCQA/flake8-bugbear")
9439 (synopsis
9440 "Flake8 plugin for finding likely bugs and design problems in your program")
9441 (description
9442 "This package contains a plugin for Flake8 finding likely bugs and
9443 design problems in your program. It contains warnings that don't belong
9444 in pyflakes and pycodestyle.")
9445 (license license:expat)))
9446
9447 (define-public python-flake8-continuation
9448 (package
9449 (name "python-flake8-continuation")
9450 (version "1.0.5")
9451 (source
9452 (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "flake8-continuation" version))
9455 (sha256
9456 (base32
9457 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9458 (build-system python-build-system)
9459 (propagated-inputs
9460 `(("python-flake8" ,python-flake8)
9461 ("python-pycodestyle" ,python-pycodestyle)
9462 ("python-six" ,python-six)))
9463 (home-page "https://github.com/planetlabs/flake8-continuation")
9464 (synopsis "Flake8 Line Continuation Plugin")
9465 (description "A Flake8 plugin that checks for the line continuation
9466 style to be in the preferred method according to PEP-8, specifically:
9467 @quotation
9468 The preferred way of wrapping long lines is by using Python's implied
9469 line continuation inside parentheses, brackets and braces. Long lines
9470 can be broken over multiple lines by wrapping expressions in parentheses.
9471 These should be used in preference to using a backslash for line continuation.
9472 @end quotation")
9473 (license license:asl2.0)))
9474
9475 (define-public python-flake8-implicit-str-concat
9476 (package
9477 (name "python-flake8-implicit-str-concat")
9478 (version "0.2.0")
9479 (source
9480 (origin
9481 (method url-fetch)
9482 (uri (pypi-uri "flake8_implicit_str_concat" version))
9483 (sha256
9484 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9485 (build-system python-build-system)
9486 (propagated-inputs
9487 `(("python-attrs" ,python-attrs)
9488 ("python-more-itertools" ,python-more-itertools)))
9489 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9490 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9491 (description
9492 "This is a plugin for the Python code checking tool Flake8 to encourage
9493 correct string literal concatenation.
9494
9495 It looks for style problems like implicitly concatenated string literals on
9496 the same line (which can be introduced by the code formatting tool Black), or
9497 unnecessary plus operators for explicit string literal concatenation.")
9498 (license license:expat)))
9499
9500 (define-public python-flake8-polyfill
9501 (package
9502 (name "python-flake8-polyfill")
9503 (version "1.0.2")
9504 (source
9505 (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "flake8-polyfill" version))
9508 (sha256
9509 (base32
9510 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9511 (build-system python-build-system)
9512 (arguments
9513 '(#:phases
9514 (modify-phases %standard-phases
9515 (replace 'check
9516 (lambda _
9517 ;; Be compatible with Pytest 4:
9518 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9519 (substitute* "setup.cfg"
9520 (("\\[pytest\\]")
9521 "[tool:pytest]"))
9522 (invoke "py.test" "-v"))))))
9523 (propagated-inputs
9524 `(("python-flake8" ,python-flake8)))
9525 (native-inputs
9526 `(("python-mock" ,python-mock)
9527 ("python-pep8" ,python-pep8)
9528 ("python-pycodestyle" ,python-pycodestyle)
9529 ("python-pytest" ,python-pytest)))
9530 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9531 (synopsis "Polyfill package for Flake8 plugins")
9532 (description
9533 "This package that provides some compatibility helpers for Flake8
9534 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
9535 (license license:expat)))
9536
9537 (define-public python2-flake8-polyfill
9538 (package-with-python2 python-flake8-polyfill))
9539
9540 (define-public python-flake8-print
9541 (package
9542 (name "python-flake8-print")
9543 (version "4.0.0")
9544 (source
9545 (origin
9546 (method url-fetch)
9547 (uri (pypi-uri "flake8-print" version))
9548 (sha256
9549 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
9550 (build-system python-build-system)
9551 (propagated-inputs
9552 `(("python-flake8" ,python-flake8)
9553 ("python-pycodestyle" ,python-pycodestyle)
9554 ("python-six" ,python-six)))
9555 (home-page "https://github.com/jbkahn/flake8-print")
9556 (synopsis "Print statement checker plugin for Flake8")
9557 (description
9558 "This plugin for Flake8 checks for @code{print} statements in Python
9559 files.")
9560 (license license:expat)))
9561
9562 (define-public python-flake8-pyi
9563 (package
9564 (name "python-flake8-pyi")
9565 (version "20.10.0")
9566 (source
9567 (origin
9568 (method url-fetch)
9569 (uri (pypi-uri "flake8-pyi" version))
9570 (sha256
9571 (base32
9572 "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
9573 (build-system python-build-system)
9574 (propagated-inputs
9575 `(("python-attrs" ,python-attrs)
9576 ("python-flake8" ,python-flake8)
9577 ("python-pyflakes" ,python-pyflakes)))
9578 (home-page "https://github.com/ambv/flake8-pyi")
9579 (synopsis
9580 "Flake8 plugin that provides specializations for type hinting stub files")
9581 (description
9582 "This package contains a plugin that provides specializations for
9583 type hinting stub files, especially interesting for linting typeshed. It
9584 adds the @file{.pyi} extension to the default value of the @code{--filename}
9585 command-line argument to Flake8. This means stubs are linted by default with
9586 this plugin enabled, without needing to explicitly list every file. It
9587 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9588 expressions after the entire file has been read. This enables support for
9589 first-class forward references that stub files use.")
9590 (license license:expat)))
9591
9592 (define-public python-flake8-pie
9593 (package
9594 (name "python-flake8-pie")
9595 (version "0.5.0")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "flake8-pie" version))
9600 (sha256
9601 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9602 (build-system python-build-system)
9603 (home-page "https://github.com/sbdchd/flake8-pie")
9604 (synopsis "Flake8 extension that implements lints")
9605 (description
9606 "This package provides a flake8 extension that implements miscellaneous
9607 lints.")
9608 (license license:bsd-2)))
9609
9610 (define-public python-flake8-quotes
9611 (package
9612 (name "python-flake8-quotes")
9613 (version "3.2.0")
9614 (source
9615 (origin
9616 (method url-fetch)
9617 (uri (pypi-uri "flake8-quotes" version))
9618 (sha256
9619 (base32
9620 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9621 (build-system python-build-system)
9622 (propagated-inputs
9623 `(("python-flake8" ,python-flake8)))
9624 (home-page "https://github.com/zheller/flake8-quotes/")
9625 (synopsis "Flake8 lint for quotes")
9626 (description "This package provides a Flake8 lint for quotes.")
9627 (license license:expat)))
9628
9629 (define-public python-autoflake
9630 (package
9631 (name "python-autoflake")
9632 (version "1.3.1")
9633 (source
9634 (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "autoflake" version))
9637 (sha256
9638 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9639 (build-system python-build-system)
9640 (propagated-inputs
9641 `(("python-pyflakes" ,python-pyflakes)))
9642 (home-page "https://github.com/myint/autoflake")
9643 (synopsis "Removes unused imports and unused variables")
9644 (description
9645 "@code{autoflake} removes unused imports and unused variables from Python
9646 code as reported by @code{pyflakes}.
9647
9648 By default, it only removes unused imports for modules that are part of the
9649 standard library. Removal of unused variables is also disabled by default.
9650 It also removes useless @code{pass} statements.")
9651 (license license:expat)))
9652
9653 (define-public python-mistune
9654 (package
9655 (name "python-mistune")
9656 (version "0.8.4")
9657 (source
9658 (origin
9659 (method url-fetch)
9660 (uri (pypi-uri "mistune" version))
9661 (sha256
9662 (base32
9663 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9664 (build-system python-build-system)
9665 (native-inputs
9666 `(("python-nose" ,python-nose)
9667 ("python-cython" ,python-cython)))
9668 (home-page "https://github.com/lepture/mistune")
9669 (synopsis "Markdown parser in pure Python")
9670 (description "This package provides a fast markdown parser in pure
9671 Python.")
9672 (license license:bsd-3)))
9673
9674 (define-public python2-mistune
9675 (package-with-python2 python-mistune))
9676
9677 (define-public python-markdown
9678 (package
9679 (name "python-markdown")
9680 (version "3.3.4")
9681 (source
9682 (origin
9683 (method url-fetch)
9684 (uri (pypi-uri "Markdown" version))
9685 (sha256
9686 (base32
9687 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9688 (build-system python-build-system)
9689 (native-inputs
9690 `(("python-nose" ,python-nose)
9691 ("python-pyyaml" ,python-pyyaml)))
9692 (home-page "https://python-markdown.github.io/")
9693 (synopsis "Python implementation of Markdown")
9694 (description
9695 "This package provides a Python implementation of John Gruber's
9696 Markdown. The library features international input, various Markdown
9697 extensions, and several HTML output formats. A command line wrapper
9698 markdown_py is also provided to convert Markdown files to HTML.")
9699 (properties `((python2-variant . ,(delay python2-markdown))))
9700 (license license:bsd-3)))
9701
9702 ;; Markdown 3.2 dropped support for Python 2.
9703 (define-public python2-markdown
9704 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9705 (package
9706 (inherit base)
9707 (version "3.1.1")
9708 (source (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "Markdown" version))
9711 (sha256
9712 (base32
9713 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9714
9715 (define-public python-ptyprocess
9716 (package
9717 (name "python-ptyprocess")
9718 (version "0.5.2")
9719 (source
9720 (origin
9721 (method url-fetch)
9722 (uri (pypi-uri "ptyprocess" version))
9723 (sha256
9724 (base32
9725 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9726 (build-system python-build-system)
9727 (native-inputs
9728 `(("python-nose" ,python-nose)))
9729 (arguments
9730 `(#:phases
9731 (modify-phases %standard-phases
9732 (replace 'check
9733 (lambda _ (invoke "nosetests"))))))
9734 (home-page "https://github.com/pexpect/ptyprocess")
9735 (synopsis "Run a subprocess in a pseudo terminal")
9736 (description
9737 "This package provides a Python library used to launch a subprocess in a
9738 pseudo terminal (pty), and interact with both the process and its pty.")
9739 (license license:isc)))
9740
9741 (define-public python2-ptyprocess
9742 (package-with-python2 python-ptyprocess))
9743
9744 (define-public python-cram
9745 (package
9746 (name "python-cram")
9747 (version "0.7")
9748 (home-page "https://bitheap.org/cram/")
9749 (source (origin
9750 (method url-fetch)
9751 (uri (list (string-append home-page "cram-"
9752 version ".tar.gz")
9753 (pypi-uri "cram" version)))
9754 (sha256
9755 (base32
9756 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9757 (arguments
9758 '(#:phases
9759 (modify-phases %standard-phases
9760 (add-after 'unpack 'patch-source
9761 (lambda _
9762 (substitute* (find-files "cram" ".*\\.py$")
9763 ;; Replace default shell path.
9764 (("/bin/sh") (which "sh")))
9765 (substitute* (find-files "tests" ".*\\.t$")
9766 (("md5") "md5sum")
9767 (("/bin/bash") (which "bash"))
9768 (("/bin/sh") (which "sh")))
9769 (substitute* "cram/_test.py"
9770 ;; This hack works around a bug triggered by substituting
9771 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9772 ;; "cram -h", which breaks the output at 80 characters. This
9773 ;; causes the line showing the default shell to break into two
9774 ;; lines, but the test expects a single line...
9775 (("env\\['COLUMNS'\\] = '80'")
9776 "env['COLUMNS'] = '160'"))
9777
9778 (substitute* "Makefile"
9779 ;; Recent versions of python-coverage have caused the test
9780 ;; coverage to decrease (as of version 0.7). Allow that.
9781 (("--fail-under=100")
9782 "--fail-under=90"))
9783
9784 #t))
9785 (replace 'check
9786 ;; The test phase uses the built library and executable.
9787 (lambda* (#:key inputs outputs #:allow-other-keys)
9788 (add-installed-pythonpath inputs outputs)
9789 (setenv "PATH" (string-append (getenv "PATH") ":"
9790 (assoc-ref outputs "out") "/bin"))
9791 (invoke "make" "test"))))))
9792 (build-system python-build-system)
9793 (native-inputs
9794 `(("python-coverage" ,python-coverage)
9795 ("which" ,which)))
9796 (synopsis "Simple testing framework for command line applications")
9797 (description
9798 "Cram is a functional testing framework for command line applications.
9799 Cram tests look like snippets of interactive shell sessions. Cram runs each
9800 command and compares the command output in the test with the command’s actual
9801 output.")
9802 (license license:gpl2+)))
9803
9804 (define-public python2-cram
9805 (package-with-python2 python-cram))
9806
9807 (define-public python-crashtest
9808 (package
9809 (name "python-crashtest")
9810 (version "0.3.1")
9811 (source
9812 (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "crashtest" version))
9815 (sha256
9816 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9817 (build-system python-build-system)
9818 (home-page "https://github.com/sdispater/crashtest")
9819 (synopsis "Manage Python errors with ease")
9820 (description
9821 "Python library that makes exceptions handling and inspection easier.")
9822 (license license:expat)))
9823
9824 (define-public python-stdlib-list
9825 (package
9826 (name "python-stdlib-list")
9827 (version "0.8.0")
9828 (source (origin
9829 (method url-fetch)
9830 (uri (pypi-uri "stdlib-list" version))
9831 (sha256
9832 (base32
9833 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
9834 (build-system python-build-system)
9835 (arguments
9836 `(#:tests? #f)) ; Tests require more dependencies.
9837 (native-inputs
9838 `(("python-sphinx" ,python-sphinx)))
9839 (home-page "https://github.com/jackmaney/python-stdlib-list")
9840 (synopsis "Python Standard Libraries")
9841 (description "This package contains a list of Python Standard Libraries.")
9842 (license license:expat)))
9843
9844 (define-public python-straight-plugin
9845 (package
9846 (name "python-straight-plugin")
9847 (version "1.4.1")
9848 (source
9849 (origin
9850 (method url-fetch)
9851 (uri (pypi-uri "straight.plugin" version))
9852 (sha256
9853 (base32
9854 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9855 (build-system python-build-system)
9856 (home-page "https://github.com/ironfroggy/straight.plugin")
9857 (synopsis "Simple namespaced plugin facility")
9858 (description "Straight Plugin provides a type of plugin you can create from
9859 almost any existing Python modules, and an easy way for outside developers to
9860 add functionality and customization to your projects with their own plugins.")
9861 (license license:expat)))
9862
9863 (define-public python2-straight-plugin
9864 (package-with-python2 python-straight-plugin))
9865
9866 (define-public python-fonttools
9867 (package
9868 (name "python-fonttools")
9869 (version "4.6.0")
9870 (source (origin
9871 (method url-fetch)
9872 (uri (pypi-uri "fonttools" version ".zip"))
9873 (sha256
9874 (base32
9875 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9876 (build-system python-build-system)
9877 (native-inputs
9878 `(("unzip" ,unzip)
9879 ("python-pytest" ,python-pytest)
9880 ("python-pytest-runner" ,python-pytest-runner)))
9881 (home-page "https://github.com/fonttools/fonttools")
9882 (synopsis "Tools to manipulate font files")
9883 (description
9884 "FontTools/TTX is a library to manipulate font files from Python. It
9885 supports reading and writing of TrueType/OpenType fonts, reading and writing
9886 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9887 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9888 from an XML-based format.")
9889 (license license:expat)))
9890
9891 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9892 (define-public python2-fonttools
9893 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9894 (package
9895 (inherit base)
9896 (version "3.44.0")
9897 (source (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "fonttools" version ".zip"))
9900 (sha256
9901 (base32
9902 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9903
9904 (define-public python-ly
9905 (package
9906 (name "python-ly")
9907 (version "0.9.5")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri name version))
9912 (sha256
9913 (base32
9914 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9915 (build-system python-build-system)
9916 (arguments
9917 ;; FIXME: Some tests need network access.
9918 '(#:tests? #f))
9919 (synopsis "Tool and library for manipulating LilyPond files")
9920 (description "This package provides a Python library to parse, manipulate
9921 or create documents in LilyPond format. A command line program ly is also
9922 provided that can be used to do various manipulations with LilyPond files.")
9923 (home-page "https://pypi.org/project/python-ly/")
9924 (license license:gpl2+)))
9925
9926 (define-public python-appdirs
9927 (package
9928 (name "python-appdirs")
9929 (version "1.4.3")
9930 (source
9931 (origin
9932 (method url-fetch)
9933 (uri (pypi-uri "appdirs" version))
9934 (sha256
9935 (base32
9936 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9937 (build-system python-build-system)
9938 (home-page "https://github.com/ActiveState/appdirs")
9939 (synopsis
9940 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9941 (description
9942 "This module provides a portable way of finding out where user data
9943 should be stored on various operating systems.")
9944 (license license:expat)))
9945
9946 (define-public python2-appdirs
9947 (package-with-python2 python-appdirs))
9948
9949 (define-public python-gorilla
9950 (package
9951 (name "python-gorilla")
9952 (version "0.3.0")
9953 (source (origin
9954 (method url-fetch)
9955 (uri (pypi-uri "gorilla" version))
9956 (sha256
9957 (base32
9958 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9959 (build-system python-build-system)
9960 (home-page "https://github.com/christophercrouzet/gorilla")
9961 (synopsis "Convenient monkey patching with Python")
9962 (description
9963 "Gorilla is a Python library that provides a convenient approach to
9964 monkey patching. Monkey patching is the process of modifying module and
9965 class attributes at runtime with the purpose of replacing or extending
9966 third-party code.")
9967 (license license:expat)))
9968
9969 (define-public python-llfuse
9970 (package
9971 (name "python-llfuse")
9972 (version "1.3.8")
9973 (source (origin
9974 (method url-fetch)
9975 (uri (pypi-uri "llfuse" version))
9976 (sha256
9977 (base32
9978 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9979 (build-system python-build-system)
9980 (inputs
9981 `(("fuse" ,fuse)
9982 ("attr" ,attr)))
9983 (native-inputs
9984 `(("pkg-config" ,pkg-config)))
9985 (synopsis "Python bindings for FUSE")
9986 (description
9987 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9988 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9989 (license license:lgpl2.0+)
9990 (properties `((python2-variant . ,(delay python2-llfuse))))))
9991
9992 (define-public python2-llfuse
9993 (let ((base (package-with-python2
9994 (strip-python2-variant python-llfuse))))
9995 (package/inherit base
9996 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9997
9998 (define-public python-msgpack
9999 (package
10000 (name "python-msgpack")
10001 (version "1.0.0")
10002 (source (origin
10003 (method url-fetch)
10004 (uri (pypi-uri "msgpack" version))
10005 (sha256
10006 (base32
10007 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
10008 (build-system python-build-system)
10009 (arguments
10010 `(#:modules ((guix build utils)
10011 (guix build python-build-system)
10012 (ice-9 ftw)
10013 (srfi srfi-1)
10014 (srfi srfi-26))
10015 #:phases
10016 (modify-phases %standard-phases
10017 (replace 'check
10018 (lambda _
10019 (invoke "pytest" "-v" "test"))))))
10020 (native-inputs
10021 `(("python-pytest" ,python-pytest)))
10022 (synopsis "MessagePack (de)serializer")
10023 (description "MessagePack is a fast, compact binary serialization format,
10024 suitable for similar data to JSON. This package provides CPython bindings for
10025 reading and writing MessagePack data.")
10026 (home-page "https://pypi.org/project/msgpack/")
10027 (license license:asl2.0)))
10028
10029 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
10030 ;; release 0.5. Some packages like borg still call it by the old name for now.
10031 ;; <https://bugs.gnu.org/30662>
10032 (define-public python-msgpack-transitional
10033 (package
10034 (inherit python-msgpack)
10035 (name "python-msgpack-transitional")
10036 (version "0.5.6")
10037 (source (origin
10038 (method url-fetch)
10039 (uri (pypi-uri "msgpack" version))
10040 (sha256
10041 (base32
10042 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
10043 (arguments
10044 (substitute-keyword-arguments (package-arguments python-msgpack)
10045 ((#:phases phases)
10046 `(modify-phases ,phases
10047 (add-after 'unpack 'configure-transitional
10048 (lambda _
10049 ;; Keep using the old name.
10050 (substitute* "setup.py"
10051 (("TRANSITIONAL = False")
10052 "TRANSITIONAL = 1"))
10053 #t))))))))
10054
10055 (define-public python2-msgpack
10056 (package-with-python2 python-msgpack))
10057
10058 (define-public python-netaddr
10059 (package
10060 (name "python-netaddr")
10061 (version "0.8.0")
10062 (source
10063 (origin
10064 (method url-fetch)
10065 (uri (pypi-uri "netaddr" version))
10066 (sha256
10067 (base32
10068 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
10069 (build-system python-build-system)
10070 (arguments `(#:tests? #f)) ;; No tests.
10071 (home-page "https://github.com/drkjam/netaddr/")
10072 (synopsis "Pythonic manipulation of network addresses")
10073 (description
10074 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
10075 and MAC network addresses.")
10076 (license license:bsd-3)))
10077
10078 (define-public python2-netaddr
10079 (package-with-python2 python-netaddr))
10080
10081 (define-public python2-pyroute2
10082 (package
10083 (name "python2-pyroute2")
10084 (version "0.5.6")
10085 (source
10086 (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "pyroute2" version))
10089 (sha256
10090 (base32
10091 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10092 (build-system python-build-system)
10093 (arguments
10094 `(#:python ,python-2)) ;Python 3.x is not supported
10095 (home-page "https://github.com/svinota/pyroute2")
10096 (synopsis "Python netlink library")
10097 (description
10098 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10099 Supported netlink families and protocols include:
10100 @itemize
10101 @item rtnl, network settings - addresses, routes, traffic controls
10102 @item nfnetlink - netfilter API: ipset, nftables, ...
10103 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10104 @item devlink - manage and monitor devlink-enabled hardware
10105 @item generic - generic netlink families
10106 @itemize
10107 @item nl80211 - wireless functions API (basic support)
10108 @item taskstats - extended process statistics
10109 @item acpi_events - ACPI events monitoring
10110 @item thermal_events - thermal events monitoring
10111 @item VFS_DQUOT - disk quota events monitoring
10112 @end itemize
10113 @end itemize")
10114 (license license:gpl2+)))
10115
10116 (define-public python-wrapt
10117 (package
10118 (name "python-wrapt")
10119 (version "1.11.2")
10120 (source
10121 (origin
10122 (method url-fetch)
10123 (uri (pypi-uri "wrapt" version))
10124 (sha256
10125 (base32
10126 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10127 (build-system python-build-system)
10128 (arguments
10129 ;; Tests are not included in the tarball, they are only available in the
10130 ;; git repository.
10131 `(#:tests? #f))
10132 (home-page "https://github.com/GrahamDumpleton/wrapt")
10133 (synopsis "Module for decorators, wrappers and monkey patching")
10134 (description
10135 "The aim of the wrapt module is to provide a transparent object proxy for
10136 Python, which can be used as the basis for the construction of function
10137 wrappers and decorator functions.")
10138 (license license:bsd-2)))
10139
10140 (define-public python2-wrapt
10141 (package-with-python2 python-wrapt))
10142
10143 (define-public python-commentjson
10144 (package
10145 (name "python-commentjson")
10146 (version "0.9.0")
10147 (source (origin
10148 ;; The PyPI release is missing some test files.
10149 (method git-fetch)
10150 (uri (git-reference
10151 (url "https://github.com/vaidik/commentjson")
10152 (commit (string-append "v" version))))
10153 (file-name (git-file-name name version))
10154 (sha256
10155 (base32
10156 "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
10157 (build-system python-build-system)
10158 (arguments
10159 `(#:modules ((guix build python-build-system)
10160 (guix build utils)
10161 (ice-9 ftw)
10162 (ice-9 textual-ports))
10163 #:phases
10164 (modify-phases %standard-phases
10165 (add-after 'unpack 'relax-requirements
10166 (lambda _
10167 (substitute* "setup.py"
10168 (("lark-parser>=0.7.1,<0.8.0")
10169 "lark-parser>=0.7.1"))))
10170 (add-after 'unpack 'delete-unspported-tests
10171 ;; Some tests rely on the 'test' module of Python itself,
10172 ;; which is not available with the Python package in Guix;
10173 ;; remove them.
10174 (lambda _
10175 ;; XXX: Copied from (guix build dub-build-system).
10176 (define (grep string file-name)
10177 (string-contains (call-with-input-file file-name get-string-all)
10178 string))
10179
10180 (with-directory-excursion "commentjson/tests/test_json"
10181 (let* ((dot? (lambda (x) (member x '("." ".."))))
10182 (test-files (scandir "." (negate dot?))))
10183 (for-each delete-file
10184 (filter (lambda (f) (grep "from test." f))
10185 test-files)))))))))
10186 (propagated-inputs
10187 `(("python-lark-parser" ,python-lark-parser)))
10188 (native-inputs
10189 `(("python-six" ,python-six)))
10190 (home-page "https://github.com/vaidik/commentjson")
10191 (synopsis "Python library for adding comments to JSON files")
10192 (description "Comment JSON is a Python package that helps you create JSON
10193 files with Python and JavaScript style inline comments. Its API is very
10194 similar to the Python standard library's @code{json} module.")
10195 (license license:expat)))
10196
10197 (define-public python-resolvelib
10198 (package
10199 (name "python-resolvelib")
10200 (version "0.7.1")
10201 (source
10202 (origin
10203 ;; Tests are missing from the PyPI release.
10204 (method git-fetch)
10205 (uri (git-reference
10206 (url "https://github.com/sarugaku/resolvelib")
10207 (commit version)))
10208 (file-name (git-file-name name version))
10209 (sha256
10210 (base32
10211 "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
10212 (build-system python-build-system)
10213 (arguments
10214 `(#:phases
10215 (modify-phases %standard-phases
10216 (replace 'check
10217 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10218 (when tests?
10219 (add-installed-pythonpath inputs outputs)
10220 (invoke "pytest")))))))
10221 (native-inputs
10222 `(("python-commentjson" ,python-commentjson)
10223 ("python-packaging" ,python-packaging)
10224 ("python-pytest" ,python-pytest)))
10225 (home-page "https://github.com/sarugaku/resolvelib")
10226 (synopsis "Abstract dependencies resolver")
10227 (description "The ResolveLib library provides a @code{Resolver} class that
10228 includes dependency resolution logic.")
10229 (license license:isc)))
10230
10231 ;;; This older version is required by ansible-core.
10232 (define-public python-resolvelib-0.5
10233 (package/inherit python-resolvelib
10234 (name "python-resolvelib")
10235 (version "0.5.4")
10236 (source
10237 (origin
10238 (method git-fetch)
10239 (uri (git-reference
10240 (url "https://github.com/sarugaku/resolvelib")
10241 (commit version)))
10242 (file-name (git-file-name name version))
10243 (sha256
10244 (base32
10245 "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
10246
10247 (define-public python-commonmark
10248 (package
10249 (name "python-commonmark")
10250 (version "0.9.1")
10251 (source
10252 (origin
10253 (method url-fetch)
10254 (uri (pypi-uri "commonmark" version))
10255 (sha256
10256 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10257 (build-system python-build-system)
10258 (arguments
10259 `(#:phases
10260 (modify-phases %standard-phases
10261 (replace 'check
10262 (lambda* (#:key inputs outputs #:allow-other-keys)
10263 (add-installed-pythonpath inputs outputs)
10264 (invoke "python" "setup.py" "test"))))))
10265 (home-page "https://github.com/readthedocs/commonmark.py")
10266 (synopsis "Python parser for the CommonMark Markdown spec")
10267 (description
10268 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10269 Markdown parser and renderer for the CommonMark specification, using only
10270 native modules.")
10271 (license license:bsd-3)))
10272
10273 (define-public python-xlrd
10274 (package
10275 (name "python-xlrd")
10276 (version "1.2.0")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "xlrd" version))
10280 (sha256
10281 (base32
10282 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10283 (build-system python-build-system)
10284 (arguments
10285 `(#:phases
10286 (modify-phases %standard-phases
10287 ;; Some tests depend on writing a temporary file to the user's home
10288 ;; directory.
10289 (add-after 'unpack 'fix-tests
10290 (lambda _
10291 (delete-file "tests/test_open_workbook.py")
10292 #t)))))
10293 (home-page "http://www.python-excel.org/")
10294 (synopsis "Library for extracting data from Excel files")
10295 (description "This package provides a library to extract data from
10296 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10297 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10298 Unicode-aware. It is not intended as an end-user tool.")
10299 (license license:bsd-3)))
10300
10301 (define-public python2-xlrd
10302 (package-with-python2 python-xlrd))
10303
10304 (define-public python-immutables
10305 (package
10306 (name "python-immutables")
10307 (version "0.14")
10308 (source
10309 (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "immutables" version))
10312 (sha256
10313 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10314 (build-system python-build-system)
10315 (home-page "https://github.com/MagicStack/immutables")
10316 (synopsis "High-performance immutable mapping type for Python")
10317 (description
10318 "An immutable mapping type for Python. The underlying datastructure is a
10319 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10320 functional languages.")
10321 (license license:asl2.0)))
10322
10323 (define-public python-prettytable
10324 (package
10325 (name "python-prettytable")
10326 (version "0.7.2")
10327 (source
10328 (origin
10329 (method url-fetch)
10330 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10331 (sha256
10332 (base32
10333 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10334 (build-system python-build-system)
10335 (home-page "https://code.google.com/archive/p/prettytable/")
10336 (synopsis "Display tabular data in an ASCII table format")
10337 (description
10338 "A library designed to represent tabular data in visually appealing ASCII
10339 tables. PrettyTable allows for selection of which columns are to be printed,
10340 independent alignment of columns (left or right justified or centred) and
10341 printing of sub-tables by specifying a row range.")
10342 (license license:bsd-3)))
10343
10344 (define-public python2-prettytable
10345 (package-with-python2 python-prettytable))
10346
10347 (define-public python-curio
10348 (package
10349 (name "python-curio")
10350 (version "1.2")
10351 (source
10352 (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "curio" version))
10355 (sha256
10356 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
10357 (build-system python-build-system)
10358 (arguments
10359 `(#:phases
10360 (modify-phases %standard-phases
10361 (replace 'check
10362 (lambda* (#:key inputs outputs #:allow-other-keys)
10363 (add-installed-pythonpath inputs outputs)
10364 (invoke "pytest" "-vv" "-k"
10365 ;; Tries to open an outgoing connection.
10366 "not test_ssl_outgoing"))))))
10367 (native-inputs
10368 `(("python-pytest" ,python-pytest)))
10369 (home-page "https://github.com/dabeaz/curio")
10370 (synopsis "Coroutine-based library for concurrent Python")
10371 (description
10372 "Curio is a coroutine-based library for concurrent Python systems
10373 programming. It provides standard programming abstractions such as as
10374 tasks, sockets, files, locks, and queues.")
10375 (license license:bsd-3)))
10376
10377 (define-public python-tables
10378 (package
10379 (name "python-tables")
10380 (version "3.6.1")
10381 (source
10382 (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "tables" version))
10385 (sha256
10386 (base32
10387 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10388 (modules '((guix build utils)))
10389 (snippet
10390 '(begin
10391 ;; Remove pre-compiled .pyc files from source.
10392 (for-each delete-file-recursively
10393 (find-files "." "__pycache__" #:directories? #t))
10394 (for-each delete-file (find-files "." "\\.pyc$"))
10395 #t))))
10396 (build-system python-build-system)
10397 (arguments
10398 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10399 ;; or "check", so we must override the build and check phases.
10400 #:phases
10401 (modify-phases %standard-phases
10402 (add-after 'unpack 'use-gcc
10403 (lambda _
10404 (substitute* "setup.py"
10405 (("^( +)compiler = new_compiler\\(\\)" line indent)
10406 (string-append line
10407 "\n"
10408 indent
10409 "compiler.set_executables(compiler='gcc',"
10410 "compiler_so='gcc',"
10411 "linker_exe='gcc',"
10412 "linker_so='gcc -shared')")))
10413 #t))
10414 (add-after 'unpack 'disable-tuning
10415 (lambda _
10416 (substitute* "setup.py"
10417 (("cpu_flags = .*")
10418 "cpu_flags = ['sse2']\n"))
10419 #t))
10420 (replace 'build
10421 (lambda* (#:key inputs #:allow-other-keys)
10422 (invoke "python" "setup.py" "build"
10423 (string-append "--hdf5="
10424 (assoc-ref inputs "hdf5")))))
10425 (replace 'check
10426 (lambda* (#:key inputs #:allow-other-keys)
10427 (invoke "python" "setup.py" "check"
10428 (string-append "--hdf5="
10429 (assoc-ref inputs "hdf5"))))))))
10430 (propagated-inputs
10431 `(("python-numexpr" ,python-numexpr)
10432 ("python-numpy" ,python-numpy)))
10433 (native-inputs
10434 `(("python-cython" ,python-cython)
10435 ("pkg-config" ,pkg-config)))
10436 (inputs
10437 `(("hdf5" ,hdf5-1.10)
10438 ("bzip2" ,bzip2)
10439 ("zlib" ,zlib)))
10440 (home-page "https://www.pytables.org/")
10441 (synopsis "Hierarchical datasets for Python")
10442 (description "PyTables is a package for managing hierarchical datasets and
10443 designed to efficiently cope with extremely large amounts of data.")
10444 (license license:bsd-3)))
10445
10446 (define-public python-sniffio
10447 (package
10448 (name "python-sniffio")
10449 (version "1.2.0")
10450 (source
10451 (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "sniffio" version))
10454 (sha256
10455 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10456 (build-system python-build-system)
10457 (arguments
10458 `(#:phases
10459 (modify-phases %standard-phases
10460 (replace 'check
10461 (lambda _
10462 (invoke "pytest" "-vv"))))))
10463 (native-inputs
10464 `(("python-curio" ,python-curio)
10465 ("python-pytest" ,python-pytest)
10466 ("python-pytest-cov" ,python-pytest-cov)))
10467 (home-page "https://github.com/python-trio/sniffio")
10468 (synopsis "Detect which async library a program is running under")
10469 (description "This package detects which async library a program is
10470 running under. It supports multiple async I/O packages, like Trio, and
10471 asyncio.")
10472 ;; Either license applies.
10473 (license (list license:expat license:asl2.0))))
10474
10475 (define-public python-pytest-black
10476 (package
10477 (name "python-pytest-black")
10478 (version "0.3.8")
10479 (source
10480 (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "pytest-black" version))
10483 (sha256
10484 (base32
10485 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
10486 (build-system python-build-system)
10487 (propagated-inputs
10488 `(("python-pytest" ,python-pytest)
10489 ("python-black" ,python-black)
10490 ("python-toml" ,python-toml)))
10491 (native-inputs
10492 `(("python-setuptools-scm" ,python-setuptools-scm)))
10493 (home-page "https://github.com/shopkeep/pytest-black")
10494 (synopsis "Pytest plugin to enable format checking with black")
10495 (description
10496 "This package provides a pytest plugin to enable format checking with the
10497 Python code formatter \"black\".")
10498 (license license:expat)))
10499
10500 (define-public python-get-version
10501 (package
10502 (name "python-get-version")
10503 (version "2.1")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "get_version" version))
10508 (sha256
10509 (base32
10510 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
10511 (build-system python-build-system)
10512 (propagated-inputs
10513 `(("python-pygments" ,python-pygments)
10514 ("python-pytest" ,python-pytest)
10515 ("python-pytest-black" ,python-pytest-black)
10516 ("python-pytest-cov" ,python-pytest-cov)
10517 ("python-setuptools" ,python-setuptools)
10518 ("python-testpath" ,python-testpath)))
10519 (home-page "https://github.com/flying-sheep/get_version")
10520 (synopsis "Version helper in the spirit of versioneer")
10521 (description
10522 "This package provides a version helper that lets you automatically use
10523 the latest @code{vX.X.X} Git tag as the version in your Python package. It
10524 also supports getting the version from Python source distributions or, once
10525 your package is installed, via @code{pkg_resources} (part of
10526 @code{setuptools}).")
10527 (license license:gpl3+)))
10528
10529 (define-public python-legacy-api-wrap
10530 (package
10531 (name "python-legacy-api-wrap")
10532 (version "1.2")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "legacy-api-wrap" version))
10537 (sha256
10538 (base32
10539 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
10540 (build-system python-build-system)
10541 (propagated-inputs
10542 `(("python-get-version" ,python-get-version)
10543 ("python-pytest" ,python-pytest)
10544 ("python-pytest-black" ,python-pytest-black)
10545 ("python-pytest-cov" ,python-pytest-cov)
10546 ("python-setuptools" ,python-setuptools)))
10547 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
10548 (synopsis "Legacy API wrapper")
10549 (description "This module defines a decorator to wrap legacy APIs. The
10550 primary use case is APIs defined before keyword-only parameters existed.")
10551 (license license:gpl3+)))
10552
10553 (define-public python-langdetect
10554 (package
10555 (name "python-langdetect")
10556 (version "1.0.9")
10557 (source
10558 (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "langdetect" version))
10561 (sha256
10562 (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
10563 (build-system python-build-system)
10564 (propagated-inputs
10565 `(("python-six" ,python-six)))
10566 (home-page "https://github.com/Mimino666/langdetect")
10567 (synopsis "Language detection library")
10568 (description
10569 "This library is a port of Nakatani Shuyo's language-detection library
10570 (version from 03/03/2014) to Python.")
10571 (license license:expat)))
10572
10573 (define-public python-pyasn1
10574 (package
10575 (name "python-pyasn1")
10576 (version "0.4.8")
10577 (source
10578 (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "pyasn1" version))
10581 (sha256
10582 (base32
10583 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
10584 (build-system python-build-system)
10585 (home-page "http://pyasn1.sourceforge.net/")
10586 (synopsis "ASN.1 types and codecs")
10587 (description
10588 "This is an implementation of ASN.1 types and codecs in Python. It is
10589 suitable for a wide range of protocols based on the ASN.1 specification.")
10590 (license license:bsd-2)))
10591
10592 (define-public python2-pyasn1
10593 (package-with-python2 python-pyasn1))
10594
10595 (define-public python-pyasn1-modules
10596 (package
10597 (name "python-pyasn1-modules")
10598 (version "0.2.2")
10599 (source
10600 (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "pyasn1-modules" version))
10603 (sha256
10604 (base32
10605 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
10606 (build-system python-build-system)
10607 (propagated-inputs
10608 `(("python-pyasn1" ,python-pyasn1)))
10609 (home-page "https://sourceforge.net/projects/pyasn1/")
10610 (synopsis "ASN.1 codec implementations")
10611 (description
10612 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
10613 implementations of ASN.1-based codecs and protocols.")
10614 (license license:bsd-3)))
10615
10616 (define-public python2-pyasn1-modules
10617 (package-with-python2 python-pyasn1-modules))
10618
10619 (define-public python2-ipaddress
10620 (package
10621 (name "python2-ipaddress")
10622 (version "1.0.23")
10623 (source (origin
10624 (method url-fetch)
10625 (uri (pypi-uri "ipaddress" version))
10626 (sha256
10627 (base32
10628 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
10629 (build-system python-build-system)
10630 (arguments
10631 `(#:python ,python-2))
10632 (home-page "https://github.com/phihag/ipaddress")
10633 (synopsis "IP address manipulation library")
10634 (description
10635 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
10636 in Python. This library is used to create, poke at, and manipulate IPv4 and
10637 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
10638 module to older versions of Python.")
10639 (license license:psfl)))
10640
10641 (define-public python-asn1tools
10642 (package
10643 (name "python-asn1tools")
10644 (version "0.158.0")
10645 (source
10646 (origin
10647 (method url-fetch)
10648 (uri (pypi-uri "asn1tools" version))
10649 (sha256
10650 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
10651 (build-system python-build-system)
10652 (propagated-inputs
10653 `(("python-bitstruct" ,python-bitstruct)
10654 ("python-diskcache" ,python-diskcache)
10655 ("python-prompt-toolkit" ,python-prompt-toolkit)
10656 ("python-pyparsing" ,python-pyparsing)))
10657 (home-page "https://github.com/eerimoq/asn1tools")
10658 (synopsis "ASN.1 parsing, encoding and decoding")
10659 (description "This package provides ASN.1 parsing, encoding and decoding
10660 for Python, including constraints checking. It supports several
10661 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
10662 for OER and UPER.")
10663 (license license:expat)))
10664
10665 (define-public python2-ipaddr
10666 (package
10667 (name "python2-ipaddr")
10668 (version "2.1.11")
10669 (source
10670 (origin
10671 (method url-fetch)
10672 (uri (pypi-uri "ipaddr" version))
10673 (sha256
10674 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
10675 (build-system python-build-system)
10676 (arguments
10677 `(#:python ,python-2 ;version 2 only
10678 #:phases
10679 (modify-phases %standard-phases
10680 (replace 'check
10681 (lambda _ (invoke "python" "ipaddr_test.py"))))))
10682 (home-page "https://github.com/google/ipaddr-py")
10683 (synopsis "IP address manipulation library")
10684 (description
10685 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
10686 IPv6 addresses and networks.
10687
10688 For new implementations you may prefer to use the standard module
10689 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
10690 versions of Python.")
10691 (license license:asl2.0)))
10692
10693 (define-public python-idna
10694 (package
10695 (name "python-idna")
10696 (version "2.10")
10697 (source
10698 (origin
10699 (method url-fetch)
10700 (uri (pypi-uri "idna" version))
10701 (sha256
10702 (base32
10703 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
10704 (build-system python-build-system)
10705 (home-page "https://github.com/kjd/idna")
10706 (synopsis "Internationalized domain names in applications")
10707 (description
10708 "This is a library to support the Internationalised Domain Names in
10709 Applications (IDNA) protocol as specified in RFC 5891. This version of the
10710 protocol is often referred to as “IDNA2008” and can produce different results
10711 from the earlier standard from 2003. The library is also intended to act as a
10712 suitable drop-in replacement for the “encodings.idna” module that comes with
10713 the Python standard library but currently only supports the older 2003
10714 specification.")
10715 (license license:bsd-4)))
10716
10717 (define-public python-idna-2.7
10718 (package (inherit python-idna)
10719 (version "2.7")
10720 (source (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "idna" version))
10723 (sha256
10724 (base32
10725 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
10726
10727
10728 (define-public python2-idna
10729 (package-with-python2 python-idna))
10730
10731 (define-public python-libsass
10732 (package
10733 (name "python-libsass")
10734 (version "0.20.1")
10735 (source
10736 (origin
10737 ;; PyPI tarball is missing some test files.
10738 (method git-fetch)
10739 (uri (git-reference
10740 (url "https://github.com/sass/libsass-python")
10741 (commit version)))
10742 (file-name (git-file-name name version))
10743 (sha256
10744 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10745 (build-system python-build-system)
10746 (arguments
10747 `(#:phases
10748 (modify-phases %standard-phases
10749 ;; Use Guix package of libsass instead of compiling from a checkout.
10750 (add-before 'build 'set-libsass
10751 (lambda _
10752 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10753 #t))
10754 (replace 'check
10755 (lambda* (#:key inputs outputs #:allow-other-keys)
10756 (add-installed-pythonpath inputs outputs)
10757 (invoke "pytest" "sasstests.py"))))))
10758 (native-inputs
10759 `(("python-pytest" ,python-pytest)
10760 ("python-werkzeug" ,python-werkzeug)))
10761 (inputs
10762 `(("libsass" ,libsass)))
10763 (propagated-inputs
10764 `(("python-six" ,python-six)))
10765 (home-page "https://sass.github.io/libsass-python/")
10766 (synopsis "Straightforward binding of libsass for Python")
10767 (description
10768 "This package provides a simple Python extension module @code{sass} which
10769 is binding LibSass.")
10770 (license license:expat)))
10771
10772 (define-public python-idna-ssl
10773 (package
10774 (name "python-idna-ssl")
10775 (version "1.0.1")
10776 (source
10777 (origin
10778 (method url-fetch)
10779 (uri (pypi-uri "idna-ssl" version))
10780 (sha256
10781 (base32
10782 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10783 (build-system python-build-system)
10784 (arguments
10785 `(#:tests? #f)) ;circular dependency with python-aiohttp
10786 (propagated-inputs `(("python-idna" ,python-idna)))
10787 (home-page "https://github.com/aio-libs/idna-ssl")
10788 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10789 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10790 domains support.")
10791 (license license:expat)))
10792
10793 (define-public python-pretend
10794 (package
10795 (name "python-pretend")
10796 (version "1.0.9")
10797 (source
10798 (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "pretend" version))
10801 (sha256
10802 (base32
10803 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10804 (build-system python-build-system)
10805 (home-page "https://github.com/alex/pretend")
10806 (synopsis "Library for stubbing in Python")
10807 (description
10808 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10809 technique for writing tests. You may hear the term mixed up with mocks,
10810 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10811 responses, rather than doing any computation.")
10812 (license license:bsd-3)))
10813
10814 (define-public python2-pretend
10815 (package-with-python2 python-pretend))
10816
10817 (define-public python-pip
10818 (package
10819 (name "python-pip")
10820 (version "20.2.4")
10821 (source
10822 (origin
10823 (method url-fetch)
10824 (uri (pypi-uri "pip" version))
10825 (sha256
10826 (base32
10827 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10828 (build-system python-build-system)
10829 (arguments
10830 '(#:tests? #f)) ; there are no tests in the pypi archive.
10831 (home-page "https://pip.pypa.io/")
10832 (synopsis "Package manager for Python software")
10833 (description
10834 "Pip is a package manager for Python software, that finds packages on the
10835 Python Package Index (PyPI).")
10836 (license license:expat)))
10837
10838 (define-public python2-pip
10839 (package-with-python2 python-pip))
10840
10841 (define-public python-tlsh
10842 (package
10843 (name "python-tlsh")
10844 (version "3.4.5")
10845 (home-page "https://github.com/trendmicro/tlsh")
10846 (source
10847 (origin
10848 (method git-fetch)
10849 (uri (git-reference
10850 (url "https://github.com/trendmicro/tlsh")
10851 (commit (string-append "v" version))))
10852 (file-name (git-file-name name version))
10853 (sha256
10854 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10855 (build-system cmake-build-system)
10856 (arguments
10857 '(#:out-of-source? #f
10858 #:phases (modify-phases %standard-phases
10859 (replace
10860 'install
10861 (lambda* (#:key outputs #:allow-other-keys)
10862 ;; Build and install the Python bindings. The underlying
10863 ;; C++ library is apparently not meant to be installed.
10864 (let ((out (assoc-ref outputs "out")))
10865 (with-directory-excursion "py_ext"
10866 (and (system* "python" "setup.py" "build")
10867 (system* "python" "setup.py" "install"
10868 (string-append "--prefix=" out))))))))))
10869 (inputs `(("python" ,python-wrapper))) ;for the bindings
10870 (synopsis "Fuzzy matching library for Python")
10871 (description
10872 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10873 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10874 value which can be used for similarity comparisons. Similar objects have
10875 similar hash values, which allows for the detection of similar objects by
10876 comparing their hash values. The byte stream should have a sufficient amount
10877 of complexity; for example, a byte stream of identical bytes will not generate
10878 a hash value.")
10879 (license license:asl2.0)))
10880
10881 (define-public python2-tlsh
10882 (package/inherit python-tlsh
10883 (name "python2-tlsh")
10884 (inputs `(("python" ,python-2)))))
10885
10886 (define-public python-termcolor
10887 (package
10888 (name "python-termcolor")
10889 (version "1.1.0")
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "termcolor" version))
10894 (sha256
10895 (base32
10896 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10897 (build-system python-build-system)
10898 (arguments
10899 ;; There are no tests.
10900 `(#:tests? #f))
10901 (home-page "https://pypi.org/project/termcolor/")
10902 (synopsis "ANSII Color formatting for terminal output")
10903 (description
10904 "This package provides ANSII Color formatting for output in terminals.")
10905 (license license:expat)))
10906
10907 (define-public python2-termcolor
10908 (package-with-python2 python-termcolor))
10909
10910 (define-public python-terminaltables
10911 (package
10912 (name "python-terminaltables")
10913 (version "3.1.0")
10914 (source
10915 (origin
10916 (method url-fetch)
10917 (uri (pypi-uri "terminaltables" version))
10918 (sha256
10919 (base32
10920 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10921 (build-system python-build-system)
10922 (home-page "https://github.com/Robpol86/terminaltables")
10923 (synopsis
10924 "Generate simple tables in terminals from a nested list of strings")
10925 (description
10926 "This package makes it easy to draw tables in terminal/console
10927 applications from a list of lists of strings. It supports multi-line rows.")
10928 (license license:expat)))
10929
10930 (define-public python-libarchive-c
10931 (package
10932 (name "python-libarchive-c")
10933 (version "2.9")
10934 (source (origin
10935 (method url-fetch)
10936 (uri (pypi-uri "libarchive-c" version))
10937 (sha256
10938 (base32
10939 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10940 (build-system python-build-system)
10941 (arguments
10942 '(#:phases (modify-phases %standard-phases
10943 (add-before
10944 'build 'reference-libarchive
10945 (lambda* (#:key inputs #:allow-other-keys)
10946 ;; Retain the absolute file name of libarchive.so.
10947 (let ((libarchive (assoc-ref inputs "libarchive")))
10948 (substitute* "libarchive/ffi.py"
10949 (("find_library\\('archive'\\)")
10950 (string-append "'" libarchive
10951 "/lib/libarchive.so'"))))))
10952 (replace 'check
10953 (lambda _ (invoke "pytest" "-vv"))))))
10954 (native-inputs
10955 `(("python-mock" ,python-mock)
10956 ("python-pytest" ,python-pytest)))
10957 (inputs
10958 `(("libarchive" ,libarchive)))
10959 (home-page "https://github.com/Changaco/python-libarchive-c")
10960 (synopsis "Python interface to libarchive")
10961 (description
10962 "This package provides Python bindings to libarchive, a C library to
10963 access possibly compressed archives in many different formats. It uses
10964 Python's @code{ctypes} foreign function interface (FFI).")
10965 (license license:lgpl2.0+)))
10966
10967 (define-public python2-libarchive-c
10968 (package-with-python2 python-libarchive-c))
10969
10970 (define-public python-file
10971 (package/inherit file
10972 (name "python-file")
10973 (build-system python-build-system)
10974 (arguments
10975 '(#:tests? #f ;no tests
10976 #:configure-flags '("--single-version-externally-managed" "--root=/")
10977 #:phases (modify-phases %standard-phases
10978 (add-before 'build 'change-directory
10979 (lambda _
10980 (chdir "python")
10981 #t))
10982 (add-before 'build 'set-library-file-name
10983 (lambda* (#:key inputs #:allow-other-keys)
10984 (let ((file (assoc-ref inputs "file")))
10985 (substitute* "magic.py"
10986 (("find_library\\('magic'\\)")
10987 (string-append "'" file "/lib/libmagic.so'")))
10988 #t))))))
10989 (inputs `(("file" ,file)))
10990 (native-inputs (if (%current-target-system)
10991 `(("self" ,this-package))
10992 '()))
10993 (synopsis "Python bindings to the libmagic file type guesser")
10994 (description "This package provides Python bindings to the libmagic file
10995 type guesser.
10996
10997 Note that this module and the @code{python-magic} module both provide a
10998 @file{magic.py} file; these two modules, which are different and were
10999 developed separately, both serve the same purpose: provide Python bindings for
11000 libmagic.")))
11001
11002 (define-public python2-file
11003 (package-with-python2 python-file))
11004
11005 (define-public python-debian
11006 (package
11007 (name "python-debian")
11008 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
11009 (version "0.1.36")
11010 (source
11011 (origin
11012 ;; Use git-fetch, as pypi doesn't include test suite.
11013 (method git-fetch)
11014 (uri (git-reference
11015 (url home-page)
11016 (commit version)))
11017 (file-name (git-file-name name version))
11018 (sha256
11019 (base32
11020 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
11021 (build-system python-build-system)
11022 (arguments
11023 `(#:phases (modify-phases %standard-phases
11024 (add-after 'unpack 'remove-debian-specific-tests
11025 ;; python-apt, apt and dpkg are not yet available in guix,
11026 ;; and these tests heavily depend on them.
11027 (lambda _
11028 (delete-file "lib/debian/tests/test_deb822.py")
11029 (delete-file "lib/debian/tests/test_debfile.py")
11030 #t)))))
11031 (propagated-inputs
11032 `(("python-six" ,python-six)
11033 ("python-chardet" ,python-chardet)))
11034 (synopsis "Debian package related modules")
11035 (description
11036 ;; XXX: Use @enumerate instead of @itemize to work around
11037 ;; <http://bugs.gnu.org/21772>.
11038 "This package provides Python modules that abstract many formats of
11039 Debian-related files, such as:
11040
11041 @enumerate
11042 @item Debtags information;
11043 @item @file{debian/changelog} files;
11044 @item packages files, pdiffs;
11045 @item control files of single or multiple RFC822-style paragraphs---e.g.
11046 @file{debian/control}, @file{.changes}, @file{.dsc};
11047 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
11048 contained files and meta-information.
11049 @end enumerate\n")
11050
11051 ;; Modules are either GPLv2+ or GPLv3+.
11052 (license license:gpl3+)))
11053
11054 (define-public python-json-spec
11055 (package
11056 (name "python-json-spec")
11057 (version "0.10.1")
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "json-spec" version))
11062 (sha256
11063 (base32
11064 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
11065 (build-system python-build-system)
11066 (propagated-inputs
11067 `(("python-pathlib" ,python-pathlib)
11068 ("python-six" ,python-six)))
11069 (native-inputs
11070 `(("python-pytest" ,python-pytest)))
11071 (home-page "http://py.errorist.io/json-spec")
11072 (synopsis
11073 "JSON Schema, JSON Pointer and JSON Reference for Python")
11074 (description
11075 "This Python library implements several JSON specs, like JSON Schema,
11076 JSON Reference and JSON Pointer.")
11077 (license license:bsd-3)))
11078
11079 (define-public python-fastjsonschema
11080 (package
11081 (name "python-fastjsonschema")
11082 (version "2.15.1")
11083 (source
11084 (origin
11085 (method url-fetch)
11086 (uri (pypi-uri "fastjsonschema" version))
11087 (sha256
11088 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
11089 (build-system python-build-system)
11090 (arguments
11091 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
11092 #:phases
11093 (modify-phases %standard-phases
11094 (replace 'check
11095 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11096 (when tests?
11097 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
11098 (native-inputs
11099 `(("python-colorama" ,python-colorama)
11100 ("python-json-spec" ,python-json-spec)
11101 ("python-jsonschema" ,python-jsonschema)
11102 ("python-pylint" ,python-pylint)
11103 ("python-pytest" ,python-pytest)
11104 ("python-pytest-benchmark"
11105 ,python-pytest-benchmark)
11106 ("python-pytest-cache" ,python-pytest-cache)
11107 ("python-validictory" ,python-validictory)))
11108 (home-page
11109 "https://github.com/horejsek/python-fastjsonschema")
11110 (synopsis
11111 "Fast Python implementation of JSON schema")
11112 (description
11113 "This library implements validation of JSON documents by JSON schema for
11114 drafts 04, 06 and 07.")
11115 (license license:bsd-3)))
11116
11117 (define-public python-nbformat
11118 (package
11119 (name "python-nbformat")
11120 (version "5.1.3")
11121 ;; The PyPi release tarball lacks some test cases and test data.
11122 (source (origin
11123 (method git-fetch)
11124 (uri (git-reference
11125 (url "https://github.com/jupyter/nbformat.git")
11126 (commit version)))
11127 (sha256
11128 (base32
11129 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
11130 (file-name (git-file-name name version))))
11131 (build-system python-build-system)
11132 (arguments
11133 `(#:phases
11134 (modify-phases %standard-phases
11135 (replace 'check
11136 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11137 (when tests?
11138 (invoke "pytest" "-vv")))))))
11139 (propagated-inputs
11140 `(("python-ipython-genutils" ,python-ipython-genutils)
11141 ("python-jsonschema" ,python-jsonschema)
11142 ("python-jupyter-core" ,python-jupyter-core)
11143 ("python-traitlets" ,python-traitlets)))
11144 (native-inputs
11145 `(("python-pytest" ,python-pytest)
11146 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
11147 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
11148 ; testing only.
11149 ("python-testpath" ,python-testpath)))
11150 (home-page "https://jupyter.org")
11151 (synopsis "Jupyter Notebook format")
11152 (description "This package provides the reference implementation of the
11153 Jupyter Notebook format and Python APIs for working with notebooks.")
11154 (license license:bsd-3)))
11155
11156 (define-public python-bleach
11157 (package
11158 (name "python-bleach")
11159 (version "3.1.5")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "bleach" version))
11164 (sha256
11165 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
11166 (build-system python-build-system)
11167 (propagated-inputs
11168 `(("python-webencodings" ,python-webencodings)
11169 ("python-six" ,python-six)))
11170 (native-inputs
11171 `(("python-datrie" ,python-datrie)
11172 ("python-genshi" ,python-genshi)
11173 ("python-lxml" ,python-lxml)
11174 ("python-pytest" ,python-pytest)))
11175 (home-page "https://github.com/mozilla/bleach")
11176 (synopsis "Whitelist-based HTML-sanitizing tool")
11177 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
11178 (license license:asl2.0)))
11179
11180 (define-public python2-bleach
11181 (package-with-python2 python-bleach))
11182
11183 (define-public python-entrypoints
11184 (package
11185 (name "python-entrypoints")
11186 (version "0.3")
11187 (source
11188 (origin
11189 (method url-fetch)
11190 (uri (pypi-uri "entrypoints" version))
11191 (sha256
11192 (base32
11193 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11194 (build-system python-build-system)
11195 ;; The package does not come with a setup.py file, so we have to generate
11196 ;; one ourselves.
11197 (arguments
11198 `(#:tests? #f
11199 #:phases
11200 (modify-phases %standard-phases
11201 (add-after 'unpack 'create-setup.py
11202 (lambda _
11203 (call-with-output-file "setup.py"
11204 (lambda (port)
11205 (format port "\
11206 from setuptools import setup
11207 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11208 " ,version))))))))
11209 (home-page "https://github.com/takluyver/entrypoints")
11210 (synopsis "Discover and load entry points from installed Python packages")
11211 (description "Entry points are a way for Python packages to advertise
11212 objects with some common interface. The most common examples are
11213 @code{console_scripts} entry points, which define shell commands by
11214 identifying a Python function to run. The @code{entrypoints} module contains
11215 functions to find and load entry points.")
11216 (license license:expat)))
11217
11218 (define-public python2-entrypoints
11219 (package-with-python2 python-entrypoints))
11220
11221 (define-public python-epc
11222 (package
11223 (name "python-epc")
11224 (version "0.0.5")
11225 (source
11226 (origin
11227 (method url-fetch)
11228 (uri (pypi-uri "epc" version))
11229 (sha256
11230 (base32
11231 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11232 (build-system python-build-system)
11233 (propagated-inputs
11234 `(("python-sexpdata" ,python-sexpdata)))
11235 (native-inputs
11236 `(("python-nose" ,python-nose)))
11237 (home-page "https://github.com/tkf/python-epc")
11238 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11239 (description
11240 "Python-EPC can call elisp functions from Python and Python functions
11241 from elisp.")
11242 (license license:gpl3)))
11243
11244 (define-public python-forex-python
11245 (package
11246 (name "python-forex-python")
11247 (version "1.5")
11248 (source
11249 (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "forex-python" version))
11252 (sha256
11253 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11254 (build-system python-build-system)
11255 (arguments
11256 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11257 ;; repository require online data.
11258 `(#:tests? #f))
11259 (propagated-inputs
11260 `(("python-requests" ,python-requests)
11261 ("python-simplejson" ,python-simplejson)))
11262 (home-page "https://github.com/MicroPyramid/forex-python")
11263 (synopsis "Foreign exchange rates and currency conversion")
11264 (description
11265 "@code{python-forex-python} can be used to manipulate foreign
11266 exchange rates and to operate currency conversions.
11267
11268 Features:
11269 @itemize
11270 @item List all currency rates.
11271 @item BitCoin price for all currencies.
11272 @item Converting amount to BitCoins.
11273 @item Get historical rates for any day since 1999.
11274 @item Conversion rate for one currency(ex; USD to INR).
11275 @item Convert amount from one currency to other.('USD 10$' to INR).
11276 @item Currency symbols.
11277 @item Currency names.
11278 @end itemize")
11279 (license license:expat)))
11280
11281 (define-public python-simpleeval
11282 (package
11283 (name "python-simpleeval")
11284 (version "0.9.10")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (pypi-uri "simpleeval" version))
11289 (sha256
11290 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11291 (build-system python-build-system)
11292 (home-page "https://github.com/danthedeckie/simpleeval")
11293 (synopsis "Simple, safe single expression evaluator library")
11294 (description
11295 "This package provides a quick single file library for easily adding
11296 evaluatable expressions into python projects. Say you want to allow a user
11297 to set an alarm volume, which could depend on the time of day, alarm level,
11298 how many previous alarms had gone off, and if there is music playing at the
11299 time.")
11300 (license license:expat)))
11301
11302 (define-public python-nbconvert
11303 (package
11304 (name "python-nbconvert")
11305 (version "6.0.7")
11306 (source
11307 (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "nbconvert" version))
11310 (sha256
11311 (base32
11312 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11313 (build-system python-build-system)
11314 (arguments
11315 `(#:phases
11316 (modify-phases %standard-phases
11317 (add-after 'unpack 'fix-paths-and-tests
11318 (lambda _
11319 ;; Use pandoc binary from input.
11320 (substitute* "nbconvert/utils/pandoc.py"
11321 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11322 ;; Same for LaTeX.
11323 (substitute* "nbconvert/exporters/pdf.py"
11324 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11325 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11326 ;; Make sure tests are not skipped.
11327 (substitute* (find-files "." "test_.+\\.py$")
11328 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11329 ;; Pandoc is never missing, disable test.
11330 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11331 (("import os" all) (string-append all "\nimport pytest"))
11332 (("(.+)(def test_pandoc_available)" all indent def)
11333 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11334 indent def)))
11335 ;; Not installing pyppeteer, delete test.
11336 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11337 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11338 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11339 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11340 indent def)))))
11341 (replace 'check
11342 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11343 (when tests?
11344 ;; Some tests invoke the installed nbconvert binary.
11345 (add-installed-pythonpath inputs outputs)
11346 ;; Tries to write to this path.
11347 (unsetenv "JUPYTER_CONFIG_DIR")
11348 ;; Tests depend on templates installed to output.
11349 (setenv "JUPYTER_PATH"
11350 (string-append
11351 (assoc-ref outputs "out")
11352 "/share/jupyter:"
11353 (getenv "JUPYTER_PATH")))
11354 ;; Some tests need HOME
11355 (setenv "HOME" "/tmp")
11356 (invoke "pytest" "-vv")))))))
11357 (inputs
11358 `(("pandoc" ,pandoc)
11359 ;; XXX: Disabled, needs substitute*.
11360 ;;("inkscape" ,inkscape)
11361 ))
11362 (native-inputs
11363 `(("python-ipykernel" ,python-ipykernel)
11364 ;; XXX: Disabled, not in guix.
11365 ;;("python-pyppeteer" ,python-pyppeteer)
11366 ("python-pytest" ,python-pytest)
11367 ("python-pytest-cov" ,python-pytest-cov)
11368 ("python-pytest-dependency" ,python-pytest-dependency)
11369 ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
11370 texlive-amsfonts
11371 texlive-booktabs
11372 texlive-caption
11373 texlive-eurosym
11374 texlive-fonts-rsfs
11375 texlive-generic-ulem
11376 texlive-generic-iftex
11377 texlive-jknappen
11378 texlive-latex-amsmath
11379 texlive-latex-enumitem
11380 texlive-latex-fancyvrb
11381 texlive-latex-float
11382 texlive-fontspec
11383 texlive-latex-geometry
11384 texlive-hyperref
11385 texlive-latex-jknapltx
11386 texlive-latex-ms
11387 texlive-oberdiek
11388 texlive-latex-parskip
11389 texlive-latex-trimspaces
11390 texlive-latex-upquote
11391 texlive-latex-ucs
11392 texlive-lm
11393 texlive-mathpazo
11394 texlive-tcolorbox
11395 texlive-titling
11396 texlive-tools
11397 texlive-xcolor
11398 texlive-zapfding)))))
11399 (propagated-inputs
11400 `(("python-bleach" ,python-bleach)
11401 ("python-defusedxml" ,python-defusedxml)
11402 ("python-entrypoints" ,python-entrypoints)
11403 ("python-jinja2" ,python-jinja2)
11404 ("python-jupyter-core" ,python-jupyter-core)
11405 ("python-mistune" ,python-mistune)
11406 ("python-nbclient" ,python-nbclient)
11407 ("python-nbformat" ,python-nbformat)
11408 ("python-pandocfilters" ,python-pandocfilters)
11409 ("python-pygments" ,python-pygments)
11410 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11411 ("python-testpath" ,python-testpath)
11412 ("python-traitlets" ,python-traitlets)
11413 ;; Required, even if [serve] is not used.
11414 ("python-tornado" ,python-tornado-6)))
11415 (home-page "https://jupyter.org")
11416 (synopsis "Converting Jupyter Notebooks")
11417 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11418 notebooks to various other formats via Jinja templates. It allows you to
11419 convert an @code{.ipynb} notebook file into various static formats including:
11420
11421 @enumerate
11422 @item HTML
11423 @item LaTeX
11424 @item PDF
11425 @item Reveal JS
11426 @item Markdown (md)
11427 @item ReStructured Text (rst)
11428 @item executable script
11429 @end enumerate\n")
11430 (license license:bsd-3)))
11431
11432 (define-public python-notebook
11433 (package
11434 (name "python-notebook")
11435 (version "6.3.0")
11436 (source (origin
11437 (method url-fetch)
11438 (uri (pypi-uri "notebook" version))
11439 (sha256
11440 (base32
11441 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11442 (build-system python-build-system)
11443 (arguments
11444 `(#:phases
11445 (modify-phases %standard-phases
11446 (replace 'check
11447 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11448 ;; These tests require a browser
11449 (delete-file-recursively "notebook/tests/selenium")
11450 (when tests?
11451 (add-installed-pythonpath inputs outputs)
11452 ;; Some tests do not expect all files to be installed in the
11453 ;; same directory, but JUPYTER_PATH contains multiple entries.
11454 (unsetenv "JUPYTER_PATH")
11455 ;; Some tests need HOME
11456 (setenv "HOME" "/tmp")
11457 (with-directory-excursion "/tmp"
11458 (invoke "pytest" "-vv"
11459 ;; TODO: This tests fails because nbconvert does not
11460 ;; list "python" as a format.
11461 "-k" "not test_list_formats"))))))))
11462 (propagated-inputs
11463 `(("python-argon2-cffi" ,python-argon2-cffi)
11464 ("python-ipykernel" ,python-ipykernel)
11465 ("python-ipython-genutils" ,python-ipython-genutils)
11466 ("python-jinja2" ,python-jinja2)
11467 ("python-jupyter-client" ,python-jupyter-client)
11468 ("python-jupyter-core" ,python-jupyter-core)
11469 ("python-nbconvert" ,python-nbconvert)
11470 ("python-nbformat" ,python-nbformat)
11471 ("python-prometheus-client" ,python-prometheus-client)
11472 ("python-pyzmq" ,python-pyzmq)
11473 ("python-send2trash" ,python-send2trash)
11474 ("python-terminado" ,python-terminado)
11475 ("python-tornado" ,python-tornado-6)
11476 ("python-traitlets" ,python-traitlets)))
11477 (native-inputs
11478 `(("python-coverage" ,python-coverage)
11479 ("python-nbval" ,python-nbval)
11480 ("python-pytest" ,python-pytest)
11481 ("python-pytest-cov" ,python-pytest-cov)
11482 ("python-requests" ,python-requests)
11483 ("python-requests-unixsocket" ,python-requests-unixsocket)))
11484 (home-page "https://jupyter.org/")
11485 (synopsis "Web-based notebook environment for interactive computing")
11486 (description
11487 "The Jupyter HTML notebook is a web-based notebook environment for
11488 interactive computing.")
11489 (license license:bsd-3)))
11490
11491 (define-public python-widgetsnbextension
11492 (package
11493 (name "python-widgetsnbextension")
11494 (version "3.5.1")
11495 (source
11496 (origin
11497 (method url-fetch)
11498 (uri (pypi-uri "widgetsnbextension" version))
11499 (sha256
11500 (base32
11501 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
11502 (build-system python-build-system)
11503 (propagated-inputs
11504 `(("python-notebook" ,python-notebook)))
11505 (home-page "https://ipython.org")
11506 (synopsis "IPython HTML widgets for Jupyter")
11507 (description "This package provides interactive HTML widgets for Jupyter
11508 notebooks.")
11509 (license license:bsd-3)))
11510
11511 (define-public python-ipywidgets
11512 (package
11513 (name "python-ipywidgets")
11514 (version "7.6.3")
11515 (source
11516 (origin
11517 (method url-fetch)
11518 (uri (pypi-uri "ipywidgets" version))
11519 (sha256
11520 (base32
11521 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
11522 (build-system python-build-system)
11523 (propagated-inputs
11524 `(("python-ipykernel" ,python-ipykernel)
11525 ("python-ipython" ,python-ipython)
11526 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
11527 ("python-nbformat" ,python-nbformat)
11528 ("python-traitlets" ,python-traitlets)
11529 ("python-widgetsnbextension" ,python-widgetsnbextension)))
11530 (native-inputs
11531 `(("python-mock" ,python-mock)
11532 ("python-pytest" ,python-pytest)
11533 ("python-pytest-cov" ,python-pytest-cov)))
11534 (home-page "https://ipython.org")
11535 (synopsis "IPython HTML widgets for Jupyter")
11536 (description "Ipywidgets are interactive HTML widgets for Jupyter
11537 notebooks and the IPython kernel. Notebooks come alive when interactive
11538 widgets are used. Users gain control of their data and can visualize changes
11539 in the data.")
11540 (license license:bsd-3)))
11541
11542 (define-public python-jupyter-console
11543 (package
11544 (name "python-jupyter-console")
11545 (version "6.1.0")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (pypi-uri "jupyter_console" version))
11550 (sha256
11551 (base32
11552 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
11553 (build-system python-build-system)
11554 (propagated-inputs
11555 `(("python-ipykernel" ,python-ipykernel)
11556 ("python-jupyter-client" ,python-jupyter-client)
11557 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
11558 ("python-pygments" ,python-pygments)))
11559 (native-inputs
11560 `(("python-nose" ,python-nose)))
11561 (home-page "https://jupyter.org")
11562 (synopsis "Jupyter terminal console")
11563 (description "This package provides a terminal-based console frontend for
11564 Jupyter kernels. It also allows for console-based interaction with non-Python
11565 Jupyter kernels such as IJulia and IRKernel.")
11566 (license license:bsd-3)))
11567
11568 ;; The python-ipython and python-jupyter-console require each other. To get
11569 ;; the functionality in both packages working, strip down the
11570 ;; python-jupyter-console package when using it as an input to python-ipython.
11571 (define python-jupyter-console-minimal
11572 (package/inherit python-jupyter-console
11573 (name "python-jupyter-console-minimal")
11574 (arguments
11575 (substitute-keyword-arguments
11576 (package-arguments python-jupyter-console)
11577 ((#:phases phases)
11578 `(modify-phases ,phases
11579 (add-after 'install 'delete-bin
11580 (lambda* (#:key outputs #:allow-other-keys)
11581 ;; Delete the bin files, to avoid conflicts in profiles
11582 ;; where python-ipython and python-jupyter-console are
11583 ;; both present.
11584 (delete-file-recursively
11585 (string-append
11586 (assoc-ref outputs "out") "/bin"))))))))
11587 ;; Remove the python-ipython propagated input, to avoid the cycle
11588 (propagated-inputs
11589 (alist-delete
11590 "python-ipython"
11591 (package-propagated-inputs python-jupyter-console)))))
11592
11593 (define-public python-qtconsole
11594 (package
11595 (name "python-qtconsole")
11596 (version "4.4.3")
11597 (source
11598 (origin
11599 (method url-fetch)
11600 (uri (pypi-uri "qtconsole" version))
11601 (sha256
11602 (base32
11603 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
11604 (build-system python-build-system)
11605 (arguments
11606 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
11607 ;; but we only have the LTS version 5.x. This means that there might be
11608 ;; runtime errors, but since this is a dependency of the Jupyter package,
11609 ;; and Jupyter can be used without the qtconsole we can overlook this for
11610 ;; now.
11611 `(#:tests? #f
11612 #:phases
11613 (modify-phases %standard-phases
11614 (add-before 'check 'pre-check
11615 (lambda _
11616 (setenv "QT_QPA_PLATFORM" "offscreen")
11617 #t)))))
11618 (propagated-inputs
11619 `(("python-ipykernel" ,python-ipykernel)
11620 ("python-ipython" ,python-ipython)))
11621 (native-inputs
11622 `(("python-pytest" ,python-pytest)))
11623 (home-page "https://jupyter.org")
11624 (synopsis "Jupyter Qt console")
11625 (description "This package provides a Qt-based console for Jupyter with
11626 support for rich media output.")
11627 (license license:bsd-3)))
11628
11629 (define-public python-jsbeautifier
11630 (package
11631 (name "python-jsbeautifier")
11632 (version "1.10.2")
11633 (home-page "https://github.com/beautify-web/js-beautify")
11634 (source (origin
11635 (method git-fetch)
11636 (uri (git-reference
11637 (url home-page)
11638 (commit (string-append "v" version))))
11639 (file-name (git-file-name name version))
11640 (sha256
11641 (base32
11642 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
11643 (build-system python-build-system)
11644 (arguments
11645 `(#:phases (modify-phases %standard-phases
11646 (add-after 'unpack 'chdir
11647 (lambda _
11648 ;; The upstream Git repository contains all the code,
11649 ;; but this package only builds the python code.
11650 (chdir "python")
11651 #t))
11652 (add-after 'unpack 'patch-python-six-requirements
11653 (lambda _
11654 (substitute* "python/setup.py"
11655 (("six>=1.12.0")
11656 "six>=1.11.0"))
11657 #t)))))
11658 (propagated-inputs
11659 `(("python-editorconfig" ,python-editorconfig)
11660 ("python-six" ,python-six)))
11661 (native-inputs
11662 `(("python-pytest" ,python-pytest)))
11663 (synopsis "JavaScript unobfuscator and beautifier")
11664 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
11665 popular online obfuscators.")
11666 (license license:expat)))
11667
11668 (define-public jupyter
11669 (package
11670 (name "jupyter")
11671 (version "1.0.0")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "jupyter" version))
11676 (sha256
11677 (base32
11678 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
11679 (build-system python-build-system)
11680 (arguments '(#:tests? #f)) ; there are none.
11681 (propagated-inputs
11682 `(("python-ipykernel" ,python-ipykernel)
11683 ("python-ipywidgets" ,python-ipywidgets)
11684 ("python-jupyter-console" ,python-jupyter-console)
11685 ("python-nbconvert" ,python-nbconvert)
11686 ("python-notebook" ,python-notebook)
11687 ("python-qtconsole" ,python-qtconsole)))
11688 (home-page "https://jupyter.org")
11689 (synopsis "Web application for interactive documents")
11690 (description
11691 "The Jupyter Notebook is a web application that allows you to create and
11692 share documents that contain live code, equations, visualizations and
11693 explanatory text. Uses include: data cleaning and transformation, numerical
11694 simulation, statistical modeling, machine learning and much more.")
11695 (license license:bsd-3)))
11696
11697 (define-public python-chardet
11698 (package
11699 (name "python-chardet")
11700 (version "3.0.4")
11701 (source
11702 (origin
11703 (method url-fetch)
11704 (uri (pypi-uri "chardet" version))
11705 (sha256
11706 (base32
11707 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
11708 (native-inputs
11709 `(("python-hypothesis" ,python-hypothesis)
11710 ("python-pytest" ,python-pytest)
11711 ("python-pytest-runner" ,python-pytest-runner)))
11712 (build-system python-build-system)
11713 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
11714 (arguments `(#:tests? #f))
11715 (home-page "https://github.com/chardet/chardet")
11716 (synopsis "Universal encoding detector for Python 2 and 3")
11717 (description
11718 "This package provides @code{chardet}, a Python module that can
11719 automatically detect a wide range of file encodings.")
11720 (license license:lgpl2.1+)))
11721
11722 (define-public python2-chardet
11723 (package-with-python2 python-chardet))
11724
11725 (define-public python-docopt
11726 (package
11727 (name "python-docopt")
11728 (version "0.6.2")
11729 (source
11730 (origin
11731 (method git-fetch)
11732 ;; The release on PyPI does not include tests.
11733 (uri (git-reference
11734 (url "https://github.com/docopt/docopt")
11735 (commit version)))
11736 (file-name (git-file-name name version))
11737 (sha256
11738 (base32
11739 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
11740 (patches (search-patches "python-docopt-pytest6-compat.patch"))))
11741 (build-system python-build-system)
11742 (native-inputs
11743 `(("python-pytest" ,python-pytest)))
11744 (arguments
11745 `(#:phases
11746 (modify-phases %standard-phases
11747 (replace 'check
11748 (lambda* (#:key tests? #:allow-other-keys)
11749 (when tests?
11750 (invoke "py.test")))))))
11751 (home-page "http://docopt.org")
11752 (synopsis "Command-line interface description language for Python")
11753 (description "This library allows the user to define a command-line
11754 interface from a program's help message rather than specifying it
11755 programmatically with command-line parsers like @code{getopt} and
11756 @code{argparse}.")
11757 (license license:expat)))
11758
11759 (define-public python2-docopt
11760 (package-with-python2 python-docopt))
11761
11762 (define-public python-pythondialog
11763 (package
11764 (name "python-pythondialog")
11765 (version "3.4.0")
11766 (source
11767 (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "pythondialog" version))
11770 (sha256
11771 (base32
11772 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
11773 (build-system python-build-system)
11774 (arguments
11775 `(#:phases
11776 (modify-phases %standard-phases
11777 (add-after 'unpack 'patch-path
11778 (lambda* (#:key inputs #:allow-other-keys)
11779 (let* ((dialog (assoc-ref inputs "dialog")))
11780 ;; Since this library really wants to grovel the search path, we
11781 ;; must hardcode dialog's store path into it.
11782 (substitute* "dialog.py"
11783 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
11784 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
11785 #t))))
11786 #:tests? #f)) ; no test suite
11787 (propagated-inputs
11788 `(("dialog" ,dialog)))
11789 (home-page "http://pythondialog.sourceforge.net/")
11790 (synopsis "Python interface to the UNIX dialog utility")
11791 (description "A Python wrapper for the dialog utility. Its purpose is to
11792 provide an easy to use, pythonic and comprehensive Python interface to dialog.
11793 This allows one to make simple text-mode user interfaces on Unix-like systems")
11794 (license license:lgpl2.1)
11795 (properties `((python2-variant . ,(delay python2-pythondialog))))))
11796
11797 (define-public python2-pythondialog
11798 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
11799 (package
11800 (inherit base)
11801 (version (package-version python-pythondialog))
11802 (source (origin
11803 (method url-fetch)
11804 (uri (pypi-uri "python2-pythondialog" version))
11805 (sha256
11806 (base32
11807 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11808
11809 (define-public python-configobj
11810 (package
11811 (name "python-configobj")
11812 (version "5.0.6")
11813 (source (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "configobj" version))
11816 (sha256
11817 (base32
11818 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11819 ;; Patch setup.py so it looks for python-setuptools, which is
11820 ;; required to parse the keyword 'install_requires' in setup.py.
11821 (patches (search-patches "python-configobj-setuptools.patch"))))
11822 (build-system python-build-system)
11823 (propagated-inputs
11824 `(("python-six" ,python-six)))
11825 (synopsis "Config file reading, writing and validation")
11826 (description "ConfigObj is a simple but powerful config file reader and
11827 writer: an ini file round tripper. Its main feature is that it is very easy to
11828 use, with a straightforward programmer’s interface and a simple syntax for
11829 config files.")
11830 (home-page "https://github.com/DiffSK/configobj")
11831 (license license:bsd-3)))
11832
11833 (define-public python2-configobj
11834 (package-with-python2 python-configobj))
11835
11836 (define-public python-configargparse
11837 (package
11838 (name "python-configargparse")
11839 (version "1.2.3")
11840 (source (origin
11841 (method url-fetch)
11842 (uri (pypi-uri "ConfigArgParse" version))
11843 (sha256
11844 (base32
11845 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11846 (build-system python-build-system)
11847 (native-inputs
11848 `(("python-pyyaml" ,python-pyyaml)))
11849 (arguments
11850 `(#:phases
11851 (modify-phases %standard-phases
11852 (replace 'check
11853 (lambda _
11854 ;; Bypass setuptools-shim because one test relies on "setup.py"
11855 ;; being the first argument passed to the python call.
11856 ;;
11857 ;; NOTE: Many tests do not run because they rely on Python's
11858 ;; built-in test.test_argparse, but we remove the unit tests from
11859 ;; our Python installation.
11860 (invoke "python" "setup.py" "test"))))))
11861 (synopsis "Replacement for argparse")
11862 (description "A drop-in replacement for argparse that allows options to also
11863 be set via config files and/or environment variables.")
11864 (home-page "https://github.com/bw2/ConfigArgParse")
11865 (license license:expat)))
11866
11867 (define-public python-argparse-manpage
11868 (package
11869 (name "python-argparse-manpage")
11870 (version "1.1")
11871 (source
11872 (origin
11873 (method url-fetch)
11874 (uri (pypi-uri "argparse-manpage" version))
11875 (sha256
11876 (base32
11877 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11878 (build-system python-build-system)
11879 (home-page "https://github.com/praiskup/argparse-manpage")
11880 (synopsis "Build manual page from Python's ArgumentParser object")
11881 (description
11882 "This package provides tools to build manual pages from Python's
11883 @code{ArgumentParser} object.")
11884 (license license:asl2.0)))
11885
11886 (define-public python-contextlib2
11887 (package
11888 (name "python-contextlib2")
11889 (version "0.6.0.post1")
11890 (source
11891 (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "contextlib2" version))
11894 (sha256
11895 (base32
11896 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11897 (build-system python-build-system)
11898 (home-page "https://contextlib2.readthedocs.org/")
11899 (synopsis "Tools for decorators and context managers")
11900 (description "This module is primarily a backport of the Python
11901 3.2 contextlib to earlier Python versions. Like contextlib, it
11902 provides utilities for common tasks involving decorators and context
11903 managers. It also contains additional features that are not part of
11904 the standard library.")
11905 (properties `((python2-variant . ,(delay python2-contextlib2))))
11906 (license license:psfl)))
11907
11908 (define-public python2-contextlib2
11909 (let ((base (package-with-python2
11910 (strip-python2-variant python-contextlib2))))
11911 (package/inherit base
11912 (arguments
11913 (substitute-keyword-arguments (package-arguments base)
11914 ((#:phases phases)
11915 `(modify-phases ,phases
11916 (replace 'check
11917 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11918 (native-inputs
11919 `(("python2-unittest2" ,python2-unittest2))))))
11920
11921 ;; This package is used by python2-pytest via python2-importlib-metadata,
11922 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11923 (define-public python2-contextlib2-bootstrap
11924 (hidden-package
11925 (package/inherit
11926 python2-contextlib2
11927 (name "python2-contextlib2-bootstrap")
11928 (arguments
11929 `(#:tests? #f
11930 ,@(package-arguments python2-contextlib2)))
11931 (native-inputs '()))))
11932
11933 (define-public python-texttable
11934 (package
11935 (name "python-texttable")
11936 (version "1.6.2")
11937 (source
11938 (origin
11939 (method url-fetch)
11940 (uri (pypi-uri "texttable" version))
11941 (sha256
11942 (base32
11943 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11944 (build-system python-build-system)
11945 (arguments
11946 `(#:phases
11947 (modify-phases %standard-phases
11948 (replace 'check
11949 (lambda _ (invoke "pytest" "tests.py"))))))
11950 (native-inputs
11951 `(("python-pytest" ,python-pytest)))
11952 (home-page "https://github.com/foutaise/texttable/")
11953 (synopsis "Python module for creating simple ASCII tables")
11954 (description "Texttable is a Python module for creating simple ASCII
11955 tables.")
11956 (license license:expat)))
11957
11958 (define-public python2-texttable
11959 (package-with-python2 python-texttable))
11960
11961 (define-public python-atomicwrites
11962 (package
11963 (name "python-atomicwrites")
11964 (version "1.4.0")
11965 (source (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "atomicwrites" version))
11968 (sha256
11969 (base32
11970 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
11971 (build-system python-build-system)
11972 (arguments `(#:tests? #f)) ;avoid circular dependency with pytest
11973 (synopsis "Atomic file writes in Python")
11974 (description "Library for atomic file writes using platform dependent tools
11975 for atomic file system operations.")
11976 (home-page "https://github.com/untitaker/python-atomicwrites")
11977 (license license:expat)))
11978
11979 (define-public python2-atomicwrites
11980 (package-with-python2 python-atomicwrites))
11981
11982 (define-public python-qstylizer
11983 (package
11984 (name "python-qstylizer")
11985 (version "0.1.10")
11986 (source
11987 (origin
11988 (method git-fetch)
11989 (uri (git-reference
11990 (url "https://github.com/blambright/qstylizer")
11991 (commit version)))
11992 (file-name (git-file-name name version))
11993 (sha256
11994 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
11995 (build-system python-build-system)
11996 (arguments
11997 `(#:test-target "pytest"
11998 #:phases
11999 (modify-phases %standard-phases
12000 (add-before 'build 'set-pbr-version
12001 (lambda _
12002 (setenv "PBR_VERSION" "3.0.1"))))))
12003 (native-inputs
12004 `(("python-pbr" ,python-pbr)
12005 ("python-pytest" ,python-pytest)
12006 ("python-pytest-catchlog" ,python-pytest-catchlog)
12007 ("python-pytest-cov" ,python-pytest-cov)
12008 ("python-pytest-mock" ,python-pytest-mock)
12009 ("python-pytest-runner" ,python-pytest-runner)
12010 ("python-pytest-xdist" ,python-pytest-xdist)))
12011 (propagated-inputs
12012 `(("python-inflection" ,python-inflection)
12013 ("python-tinycss" ,python-tinycss)))
12014 (home-page "https://github.com/blambright/qstylizer")
12015 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
12016 (description "@code{qstylizer} is a Python package designed to help with
12017 the construction of PyQt/PySide stylesheets.")
12018 (license license:expat)))
12019
12020 (define-public python-click-threading
12021 (package
12022 (name "python-click-threading")
12023 (version "0.4.4")
12024 (source (origin
12025 (method url-fetch)
12026 (uri (pypi-uri "click-threading" version))
12027 (sha256
12028 (base32
12029 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
12030 (build-system python-build-system)
12031 (propagated-inputs
12032 `(("python-click" ,python-click)))
12033 (synopsis "Utilities for multithreading in Click")
12034 (description "This package provides utilities for multithreading in Click
12035 applications.")
12036 (home-page "https://github.com/click-contrib/click-threading")
12037 (license license:expat)))
12038
12039 (define-public python-click-log
12040 (package
12041 (name "python-click-log")
12042 (version "0.3.2")
12043 (source (origin
12044 (method url-fetch)
12045 (uri (pypi-uri "click-log" version))
12046 (sha256
12047 (base32
12048 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
12049 (build-system python-build-system)
12050 (propagated-inputs
12051 `(("python-click" ,python-click)))
12052 (synopsis "Logging for click applications")
12053 (description "This package provides a Python library for logging Click
12054 applications.")
12055 (home-page "https://github.com/click-contrib/click-log")
12056 (license license:expat)))
12057
12058 (define-public python-click-default-group
12059 (package
12060 (name "python-click-default-group")
12061 (version "1.2.2")
12062 (source (origin
12063 (method url-fetch)
12064 (uri (pypi-uri "click-default-group" version))
12065 (sha256
12066 (base32
12067 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
12068 (build-system python-build-system)
12069 (arguments
12070 `(#:tests? #f)) ; no target
12071 (propagated-inputs
12072 `(("python-click" ,python-click)))
12073 (synopsis "Extends click.Group")
12074 (description "This package extends click.Group to invoke a command without
12075 explicit subcommand name.")
12076 (home-page "https://github.com/click-contrib/click-default-group")
12077 (license license:bsd-3)))
12078
12079 (define-public python-structlog
12080 (package
12081 (name "python-structlog")
12082 (version "20.2.0")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "structlog" version))
12087 (sha256
12088 (base32
12089 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
12090 (build-system python-build-system)
12091 (arguments
12092 `(#:phases
12093 (modify-phases %standard-phases
12094 (replace 'check
12095 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12096 (when tests?
12097 (add-installed-pythonpath inputs outputs)
12098 (invoke "pytest"))
12099 #t)))))
12100 (native-inputs
12101 `(("python-coverage" ,python-coverage)
12102 ("python-freezegun" ,python-freezegun)
12103 ("python-pretend" ,python-pretend)
12104 ("python-pytest" ,python-pytest)
12105 ("python-pytest-asyncio" ,python-pytest-asyncio)
12106 ("python-simplejson" ,python-simplejson)
12107 ("python-twisted" ,python-twisted)))
12108 (home-page "https://www.structlog.org/")
12109 (synopsis "Structured Logging for Python")
12110 (description "@code{structlog} changes logging in Python by adding structure
12111 to your log entries.")
12112 (license (list license:asl2.0 license:expat))))
12113
12114 (define-public python-apipkg
12115 (package
12116 (name "python-apipkg")
12117 (version "1.5")
12118 (source (origin
12119 (method url-fetch)
12120 (uri (pypi-uri "apipkg" version))
12121 (sha256
12122 (base32
12123 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
12124 (build-system python-build-system)
12125 (native-inputs
12126 `(("python-pytest" ,python-pytest)
12127 ("python-setuptools-scm" ,python-setuptools-scm)))
12128 (synopsis "Namespace control and lazy-import mechanism")
12129 (description "With apipkg you can control the exported namespace of a Python
12130 package and greatly reduce the number of imports for your users. It is a small
12131 pure Python module that works on virtually all Python versions.")
12132 (home-page "https://github.com/pytest-dev/apipkg")
12133 (license license:expat)))
12134
12135 (define-public python-execnet
12136 (package
12137 (name "python-execnet")
12138 (version "1.9.0")
12139 (source (origin
12140 (method url-fetch)
12141 (uri (pypi-uri "execnet" version))
12142 (sha256
12143 (base32
12144 "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
12145 (patches (search-patches "python-execnet-read-only-fix.patch"))))
12146 (build-system python-build-system)
12147 (arguments
12148 `(#:phases
12149 (modify-phases %standard-phases
12150 (replace 'check
12151 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12152 (when tests?
12153 ;; Unset PYTHONDONTWRITEBYTECODE to match the
12154 ;; expectations of a test in
12155 ;; 'testing/test_gateway.py'.
12156 (unsetenv "PYTHONDONTWRITEBYTECODE")
12157
12158 (add-installed-pythonpath inputs outputs)
12159 (invoke "pytest" "-vv")))))))
12160 (native-inputs
12161 `(("python-pytest" ,python-pytest)
12162 ("python-setuptools-scm" ,python-setuptools-scm)))
12163 (synopsis "Rapid multi-Python deployment")
12164 (description "Execnet provides a share-nothing model with
12165 channel-send/receive communication for distributing execution across many
12166 Python interpreters across version, platform and network barriers. It has a
12167 minimal and fast API targeting the following uses:
12168 @enumerate
12169 @item distribute tasks to (many) local or remote CPUs
12170 @item write and deploy hybrid multi-process applications
12171 @item write scripts to administer multiple environments
12172 @end enumerate")
12173 (home-page "https://codespeak.net/execnet/")
12174 (license license:expat)))
12175
12176 (define-public python2-execnet
12177 (package-with-python2 python-execnet))
12178
12179 (define-public python-icalendar
12180 (package
12181 (name "python-icalendar")
12182 (version "4.0.7")
12183 (source (origin
12184 (method url-fetch)
12185 (uri (pypi-uri "icalendar" version))
12186 (sha256
12187 (base32
12188 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
12189 (build-system python-build-system)
12190 (propagated-inputs
12191 `(("python-dateutil" ,python-dateutil)
12192 ("python-pytz" ,python-pytz)))
12193 (synopsis "Python library for parsing iCalendar files")
12194 (description "The icalendar package is a parser/generator of iCalendar
12195 files for use with Python.")
12196 (home-page "https://github.com/collective/icalendar")
12197 (license license:bsd-2)))
12198
12199 (define-public python-args
12200 (package
12201 (name "python-args")
12202 (version "0.1.0")
12203 (source (origin
12204 (method url-fetch)
12205 (uri (pypi-uri "args" version))
12206 (sha256
12207 (base32
12208 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12209 (build-system python-build-system)
12210 (home-page "https://github.com/kennethreitz/args")
12211 (synopsis "Command-line argument parser")
12212 (description
12213 "This library provides a Python module to parse command-line arguments.")
12214 (license license:bsd-3)))
12215
12216 (define-public python2-args
12217 (package-with-python2 python-args))
12218
12219 (define-public python-clint
12220 (package
12221 (name "python-clint")
12222 (version "0.5.1")
12223 (source (origin
12224 (method url-fetch)
12225 (uri (pypi-uri "clint" version))
12226 (sha256
12227 (base32
12228 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12229 (build-system python-build-system)
12230 (arguments
12231 '(#:phases
12232 (modify-phases %standard-phases
12233 (replace 'check
12234 (lambda _ (invoke "py.test" "-v"))))))
12235 (native-inputs
12236 `(("python-pytest" ,python-pytest)))
12237 (propagated-inputs
12238 `(("python-args" ,python-args)))
12239 (home-page "https://github.com/kennethreitz/clint")
12240 (synopsis "Command-line interface tools")
12241 (description
12242 "Clint is a Python module filled with a set of tools for developing
12243 command-line applications, including tools for colored and indented
12244 output, progress bar display, and pipes.")
12245 (license license:isc)))
12246
12247 (define-public python2-clint
12248 (package-with-python2 python-clint))
12249
12250 (define-public python-rply
12251 (package
12252 (name "python-rply")
12253 (version "0.7.8")
12254 (source (origin
12255 (method url-fetch)
12256 (uri (pypi-uri "rply" version))
12257 (sha256
12258 (base32
12259 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12260 (build-system python-build-system)
12261 (propagated-inputs
12262 `(("python-appdirs" ,python-appdirs)))
12263 (home-page "https://github.com/alex/rply")
12264 (synopsis "Parser generator for Python")
12265 (description
12266 "This package provides a pure Python based parser generator, that also
12267 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12268 with a new public API, and RPython support.")
12269 (license license:bsd-3)))
12270
12271 (define-public python2-rply
12272 (package-with-python2 python-rply))
12273
12274 (define-public python-hy
12275 (package
12276 (name "python-hy")
12277 (version "0.18.0")
12278 (source (origin
12279 (method url-fetch)
12280 (uri (pypi-uri "hy" version))
12281 (sha256
12282 (base32
12283 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12284 (build-system python-build-system)
12285 (arguments
12286 '(#:phases
12287 (modify-phases %standard-phases
12288 (add-before 'install 'set-HOME
12289 (lambda _
12290 (setenv "HOME" "/tmp") #t))
12291 (replace 'check
12292 (lambda _
12293 ;; Tests require write access to HOME.
12294 (setenv "HOME" "/tmp")
12295 (invoke "nosetests"))))))
12296 (native-inputs
12297 `(("python-coverage" ,python-coverage)
12298 ("python-nose" ,python-nose)))
12299 (propagated-inputs
12300 `(("python-astor" ,python-astor)
12301 ("python-colorama" ,python-colorama)
12302 ("python-rply" ,python-rply)
12303 ("python-funcparserlib"
12304 ,python-funcparserlib)))
12305 (home-page "http://hylang.org/")
12306 (synopsis "Lisp frontend to Python")
12307 (description
12308 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12309 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12310 Python at your fingertips, in Lisp form.")
12311 (license license:expat)))
12312
12313 (define-public python-hissp
12314 (package
12315 (name "python-hissp")
12316 (version "0.2.0")
12317 (source
12318 (origin
12319 (method url-fetch)
12320 (uri (pypi-uri "hissp" version))
12321 (sha256
12322 (base32
12323 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12324 (build-system python-build-system)
12325 (home-page "https://github.com/gilch/hissp")
12326 (synopsis "It's Python with a Lissp")
12327 (description "Hissp is a modular Lisp implementation that compiles to a
12328 functional subset of Python—Syntactic macro metaprogramming with full access
12329 to the Python ecosystem.")
12330 (license license:asl2.0)))
12331
12332 (define-public python2-functools32
12333 (package
12334 (name "python2-functools32")
12335 (version "3.2.3-2")
12336 (source
12337 (origin
12338 (method url-fetch)
12339 (uri (pypi-uri "functools32" version))
12340 (sha256
12341 (base32
12342 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12343 (build-system python-build-system)
12344 (arguments
12345 `(#:python ,python-2
12346 #:tests? #f)) ; no test target
12347 (home-page "https://github.com/MiCHiLU/python-functools32")
12348 (synopsis
12349 "Backport of the functools module from Python 3.2.3")
12350 (description
12351 "This package is a backport of the @code{functools} module from Python
12352 3.2.3 for use with older versions of Python and PyPy.")
12353 (license license:expat)))
12354
12355 (define-public python2-subprocess32
12356 (package
12357 (name "python2-subprocess32")
12358 (version "3.2.7")
12359 (source (origin
12360 (method url-fetch)
12361 (uri (pypi-uri "subprocess32" version))
12362 (sha256
12363 (base32
12364 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12365 (patches
12366 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12367 (build-system python-build-system)
12368 (arguments
12369 `(#:python ,python-2
12370 ;; The test suite fails with Python > 2.7.13:
12371 ;; import test.support
12372 ;; ImportError: No module named support
12373 #:tests? #f
12374 #:phases
12375 (modify-phases %standard-phases
12376 (add-after 'unpack 'patch-/bin/sh
12377 (lambda _
12378 (substitute* '("subprocess32.py"
12379 "test_subprocess32.py")
12380 (("/bin/sh") (which "sh")))
12381 #t)))))
12382 (home-page "https://github.com/google/python-subprocess32")
12383 (synopsis "Backport of the subprocess module from Python 3.2")
12384 (description
12385 "This is a backport of the @code{subprocess} standard library module
12386 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12387 new features. On POSIX systems it is guaranteed to be reliable when used
12388 in threaded applications. It includes timeout support from Python 3.3 but
12389 otherwise matches 3.2’s API.")
12390 (license license:psfl)))
12391
12392 (define-public python2-futures
12393 (package
12394 (name "python2-futures")
12395 (version "3.2.0")
12396 (source
12397 (origin
12398 (method url-fetch)
12399 (uri (pypi-uri "futures" version))
12400 (sha256
12401 (base32
12402 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12403 (build-system python-build-system)
12404 (arguments
12405 `(#:python ,python-2
12406 #:phases
12407 (modify-phases %standard-phases
12408 (replace 'check
12409 (lambda _
12410 (invoke "python" "test_futures.py")
12411 #t)))))
12412 (home-page "https://github.com/agronholm/pythonfutures")
12413 (synopsis
12414 "Backport of the concurrent.futures package from Python 3.2")
12415 (description
12416 "The concurrent.futures module provides a high-level interface for
12417 asynchronously executing callables. This package backports the
12418 concurrent.futures package from Python 3.2")
12419 (license license:bsd-3)))
12420
12421 (define-public python-promise
12422 (package
12423 (name "python-promise")
12424 (version "0.4.2")
12425 (source
12426 (origin
12427 (method url-fetch)
12428 (uri (pypi-uri "promise" version))
12429 (sha256
12430 (base32
12431 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12432 (build-system python-build-system)
12433 ;; Tests wants python-futures, which is a python2 only program, and
12434 ;; can't be found by python-promise at test time.
12435 (arguments `(#:tests? #f))
12436 (home-page "https://github.com/syrusakbary/promise")
12437 (synopsis "Promises/A+ implementation for Python")
12438 (description
12439 "Promises/A+ implementation for Python")
12440 (properties `((python2-variant . ,(delay python2-promise))))
12441 (license license:expat)))
12442
12443 (define-public python2-promise
12444 (let ((promise (package-with-python2
12445 (strip-python2-variant python-promise))))
12446 (package/inherit promise
12447 (arguments (substitute-keyword-arguments (package-arguments promise)
12448 ((#:tests? _) #t)))
12449 (native-inputs
12450 `(("python2-futures" ,python2-futures)
12451 ("python2-pytest" ,python2-pytest)
12452 ,@(package-native-inputs promise))))))
12453
12454 (define-public python-progressbar2
12455 (package
12456 (name "python-progressbar2")
12457 (version "3.51.3")
12458 (source
12459 (origin
12460 (method url-fetch)
12461 (uri (pypi-uri "progressbar2" version))
12462 (sha256
12463 (base32
12464 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
12465 (build-system python-build-system)
12466 (propagated-inputs
12467 `(("python-six" ,python-six)
12468 ("python-utils" ,python-utils)))
12469 (native-inputs
12470 `(("python-flake8" ,python-flake8)
12471 ("python-freezegun" ,python-freezegun)
12472 ("python-pycodestyle" ,python-pycodestyle)
12473 ("python-pytest" ,python-pytest)
12474 ("python-pytest-cache" ,python-pytest-cache)
12475 ("python-pytest-cov" ,python-pytest-cov)
12476 ("python-pytest-flakes" ,python-pytest-flakes)
12477 ("python-pytest-pep8" ,python-pytest-pep8)
12478 ("python-sphinx" ,python-sphinx)))
12479 (home-page "https://github.com/WoLpH/python-progressbar")
12480 (synopsis "Text progress bar library for Python")
12481 (description
12482 "This package provides a Python progressbar library to provide
12483 visual (yet text based) progress to long running operations.")
12484 (license license:bsd-3)))
12485
12486 (define-public python-progressbar33
12487 (package
12488 (name "python-progressbar33")
12489 (version "2.4")
12490 (source
12491 (origin
12492 (method url-fetch)
12493 (uri (pypi-uri "progressbar33" version))
12494 (sha256
12495 (base32
12496 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
12497 (build-system python-build-system)
12498 (home-page "https://github.com/germangh/python-progressbar")
12499 (synopsis "Text progress bar library for Python")
12500 (description
12501 "This package provides a text progress bar library for Python. This
12502 version only differs from the original @code{progressbar} package in that it
12503 uses relative package imports instead of absolute imports, which is necessary
12504 for the module to work under Python 3.3.")
12505 ;; Either or both of these licenses may be selected.
12506 (license (list license:lgpl2.1+ license:bsd-3))))
12507
12508 (define-public python-colorama
12509 (package
12510 (name "python-colorama")
12511 (version "0.4.4")
12512 (source
12513 (origin
12514 (method url-fetch)
12515 (uri (pypi-uri "colorama" version))
12516 (sha256
12517 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
12518 (build-system python-build-system)
12519 (synopsis "Colored terminal text rendering for Python")
12520 (description "Colorama is a Python library for rendering colored terminal
12521 text.")
12522 (home-page "https://pypi.org/project/colorama/")
12523 (license license:bsd-3)))
12524
12525 (define-public python2-colorama
12526 (package-with-python2 python-colorama))
12527
12528 (define-public python-moto
12529 (package
12530 (name "python-moto")
12531 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
12532 (version "1.3.16.dev134")
12533 (source (origin
12534 (method url-fetch)
12535 (uri (pypi-uri "moto" version))
12536 (sha256
12537 (base32
12538 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
12539 (build-system python-build-system)
12540 (arguments
12541 `(#:phases (modify-phases %standard-phases
12542 (add-after 'unpack 'patch-hardcoded-executable-names
12543 (lambda _
12544 (substitute* "moto/batch/models.py"
12545 (("/bin/sh")
12546 (which "sh")))
12547 (substitute* (find-files "tests" "\\.py$")
12548 (("#!/bin/bash")
12549 (string-append "#!" (which "bash"))))
12550 #t))
12551 (replace 'check
12552 (lambda _
12553 (invoke "pytest" "-vv" "-m" "not network"
12554 ;; These tests require Docker.
12555 "-k" "not test_terminate_job \
12556 and not test_invoke_function_from_sqs_exception"))))))
12557 (native-inputs
12558 `(("python-flask" ,python-flask)
12559 ("python-flask-cors" ,python-flask-cors)
12560 ("python-freezegun" ,python-freezegun)
12561 ("python-parameterized" ,python-parameterized)
12562 ("python-pytest" ,python-pytest)
12563 ("python-sure" ,python-sure)))
12564 (propagated-inputs
12565 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
12566 ("python-boto" ,python-boto)
12567 ("python-boto3" ,python-boto3)
12568 ("python-botocore" ,python-botocore)
12569 ("python-cfn-lint" ,python-cfn-lint)
12570 ("python-cryptography" ,python-cryptography)
12571 ("python-dateutil" ,python-dateutil)
12572 ("python-docker" ,python-docker)
12573 ("python-idna" ,python-idna)
12574 ("python-jinja2" ,python-jinja2)
12575 ("python-jose" ,python-jose)
12576 ("python-jsondiff" ,python-jsondiff)
12577 ("python-mock" ,python-mock)
12578 ("python-pytz" ,python-pytz)
12579 ("python-pyyaml" ,python-pyyaml)
12580 ("python-requests" ,python-requests)
12581 ("python-responses" ,python-responses)
12582 ("python-six" ,python-six)
12583 ("python-sshpubkeys" ,python-sshpubkeys)
12584 ("python-werkzeug" ,python-werkzeug)
12585 ("python-xmltodict" ,python-xmltodict)))
12586 (home-page "https://github.com/spulec/moto")
12587 (synopsis "Mock out the boto library")
12588 (description
12589 "@code{moto} is a library designed to easily mock out the
12590 @code{boto} library.")
12591 (license license:asl2.0)))
12592
12593 (define-public python-rsa
12594 (package
12595 (name "python-rsa")
12596 (version "3.4.2")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "rsa" version))
12601 (sha256
12602 (base32
12603 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
12604 (build-system python-build-system)
12605 (propagated-inputs
12606 `(("python-pyasn1" ,python-pyasn1)))
12607 (synopsis "Pure-Python RSA implementation")
12608 (description "Python-RSA is a pure-Python RSA implementation. It supports
12609 encryption and decryption, signing and verifying signatures, and key
12610 generation according to PKCS#1 version 1.5. It can be used as a Python
12611 library as well as on the command line.")
12612 (home-page "https://stuvel.eu/rsa")
12613 (license license:asl2.0)))
12614
12615 (define-public python2-rsa
12616 (package-with-python2 python-rsa))
12617
12618 (define-public python-pluggy
12619 (package
12620 (name "python-pluggy")
12621 (version "0.13.1")
12622 (source
12623 (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "pluggy" version))
12626 (sha256
12627 (base32
12628 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
12629 (build-system python-build-system)
12630 (native-inputs
12631 `(("python-setuptools-scm" ,python-setuptools-scm)))
12632 (synopsis "Plugin and hook calling mechanism for Python")
12633 (description "Pluggy is an extraction of the plugin manager as used by
12634 Pytest but stripped of Pytest specific details.")
12635 (home-page "https://pypi.org/project/pluggy/")
12636 (properties `((python2-variant . ,(delay python2-pluggy))))
12637 (license license:expat)))
12638
12639 (define-public python2-pluggy
12640 (let ((base (package-with-python2 (strip-python2-variant
12641 python-pluggy))))
12642 (package/inherit
12643 base
12644 (propagated-inputs
12645 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
12646
12647 ;; This package requires python2-importlib-metadata, but that package
12648 ;; ends up needing python2-pluggy via python2-pytest, so we need this
12649 ;; variant to solve the circular dependency.
12650 (define-public python2-pluggy-bootstrap
12651 (hidden-package
12652 (package/inherit
12653 python2-pluggy
12654 (name "python2-pluggy-bootstrap")
12655 (arguments
12656 `(#:tests? #f
12657 ,@(package-arguments python2-pluggy)))
12658 (propagated-inputs
12659 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
12660
12661 (define-public python-plumbum
12662 (package
12663 (name "python-plumbum")
12664 (version "1.7.0")
12665 (source
12666 (origin
12667 (method url-fetch)
12668 (uri (pypi-uri "plumbum" version))
12669 (sha256
12670 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
12671 (build-system python-build-system)
12672 (arguments
12673 `(#:tests? #f)) ;no tests
12674 (native-inputs
12675 ;; XXX: Not actually used since there are no tests but required for
12676 ;; build.
12677 `(("python-pytest" ,python-pytest)))
12678 (home-page "https://plumbum.readthedocs.io")
12679 (synopsis "Python shell combinators library")
12680 (description
12681 "Plumbum is a library of tools for replacing shell scripts with Python
12682 code.")
12683 (license license:expat)))
12684
12685 (define-public python-deprecation
12686 (package
12687 (name "python-deprecation")
12688 (version "2.1.0")
12689 (source
12690 (origin
12691 (method url-fetch)
12692 (uri (pypi-uri "deprecation" version))
12693 (sha256
12694 (base32
12695 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
12696 (build-system python-build-system)
12697 (propagated-inputs
12698 `(("python-packaging" ,python-packaging)))
12699 (native-inputs
12700 `(("python-unittest2" ,python-unittest2)))
12701 (home-page "https://deprecation.readthedocs.io/")
12702 (synopsis "Python library to handle automated deprecations")
12703 (description
12704 "This is a library that enables automated deprecations. It offers the
12705 @code{deprecated()} decorator to wrap functions, providing proper warnings
12706 both in documentation and via Python’s warnings system, as well as the
12707 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
12708 that deprecated code is eventually removed.")
12709 (license license:asl2.0)))
12710
12711 (define-public python-tox
12712 (package
12713 (name "python-tox")
12714 (version "3.20.0")
12715 (source
12716 (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "tox" version))
12719 (sha256
12720 (base32
12721 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
12722 (build-system python-build-system)
12723 (arguments
12724 ;; FIXME: Tests require pytest-timeout, which itself requires
12725 ;; pytest>=2.8.0 for installation.
12726 '(#:tests? #f))
12727 (propagated-inputs
12728 `(("python-filelock" ,python-filelock)
12729 ("python-packaging" ,python-packaging)
12730 ("python-pluggy" ,python-pluggy)
12731 ("python-py" ,python-py)
12732 ("python-six" ,python-six)
12733 ("python-toml" ,python-toml)
12734 ("python-virtualenv" ,python-virtualenv)))
12735 (native-inputs
12736 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
12737 ("python-pytest" ,python-pytest) ; >= 2.3.5
12738 ("python-setuptools-scm" ,python-setuptools-scm)))
12739 (home-page "https://tox.readthedocs.io")
12740 (synopsis "Virtualenv-based automation of test activities")
12741 (description "Tox is a generic virtualenv management and test command line
12742 tool. It can be used to check that a package installs correctly with
12743 different Python versions and interpreters, or run tests in each type of
12744 supported environment, or act as a frontend to continuous integration
12745 servers.")
12746 (license license:expat)))
12747
12748 (define-public python-jmespath
12749 (package
12750 (name "python-jmespath")
12751 (version "0.9.4")
12752 (source
12753 (origin
12754 (method url-fetch)
12755 (uri (pypi-uri "jmespath" version))
12756 (sha256
12757 (base32
12758 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
12759 (build-system python-build-system)
12760 (native-inputs
12761 `(("python-nose" ,python-nose)))
12762 (synopsis "JSON Matching Expressions")
12763 (description "JMESPath (pronounced “james path”) is a Python library that
12764 allows one to declaratively specify how to extract elements from a JSON
12765 document.")
12766 (home-page "https://github.com/jmespath/jmespath.py")
12767 (license license:expat)))
12768
12769 (define-public python2-jmespath
12770 (package-with-python2 python-jmespath))
12771
12772 (define-public python-symengine
12773 (package
12774 (name "python-symengine")
12775 (version "0.6.1")
12776 (source
12777 (origin
12778 (method url-fetch)
12779 (uri (pypi-uri "symengine" version))
12780 (sha256
12781 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
12782 (build-system python-build-system)
12783 (native-inputs
12784 `(("cmake" ,cmake)
12785 ("python-cython" ,python-cython)))
12786 (inputs
12787 `(("symengine" ,symengine)))
12788 (home-page "https://github.com/symengine/symengine.py")
12789 (synopsis "Python library providing wrappers to SymEngine")
12790 (description
12791 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
12792 manipulation library.")
12793 (license license:expat)))
12794
12795 (define-public python-uncertainties
12796 (package
12797 (name "python-uncertainties")
12798 (version "3.1.5")
12799 (source
12800 (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "uncertainties" version))
12803 (sha256
12804 (base32
12805 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
12806 (build-system python-build-system)
12807 ;; While there are test files, there is no "tests" directory, so the tests
12808 ;; fail.
12809 (arguments '(#:tests? #false))
12810 (propagated-inputs
12811 `(("python-future" ,python-future)))
12812 (native-inputs
12813 `(("python-nose" ,python-nose)
12814 ("python-numpy" ,python-numpy)))
12815 (home-page "https://uncertainties-python-package.readthedocs.io/")
12816 (synopsis "Calculations with uncertainties")
12817 (description
12818 "The uncertainties package transparently handles calculations with
12819 numbers with uncertainties. It can also yield the derivatives of any
12820 expression.")
12821 (license license:bsd-3)))
12822
12823 (define-public python-asteval
12824 (package
12825 (name "python-asteval")
12826 (version "0.9.23")
12827 (source
12828 (origin
12829 (method url-fetch)
12830 (uri (pypi-uri "asteval" version))
12831 (sha256
12832 (base32
12833 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
12834 (build-system python-build-system)
12835 (native-inputs
12836 `(("python-pytest" ,python-pytest)))
12837 (home-page "https://github.com/newville/asteval")
12838 (synopsis "Minimalistic evaluator of Python expressions")
12839 (description
12840 "This package provides a minimalistic evaluator of Python expression
12841 using the @code{ast} module")
12842 (license license:expat)))
12843
12844 (define-public python-lmfit
12845 (package
12846 (name "python-lmfit")
12847 (version "1.0.2")
12848 (source
12849 (origin
12850 (method url-fetch)
12851 (uri (pypi-uri "lmfit" version))
12852 (sha256
12853 (base32
12854 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
12855 (build-system python-build-system)
12856 (propagated-inputs
12857 `(("python-asteval" ,python-asteval)
12858 ("python-numpy" ,python-numpy)
12859 ("python-scipy" ,python-scipy)
12860 ("python-uncertainties" ,python-uncertainties)))
12861 (native-inputs
12862 `(("python-pytest" ,python-pytest)))
12863 (home-page "https://lmfit.github.io/lmfit-py/")
12864 (synopsis "Least-Squares minimization with bounds and constraints")
12865 (description
12866 "Lmfit provides a high-level interface to non-linear optimization and
12867 curve fitting problems for Python. It builds on and extends many of the
12868 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12869 named for) extending the Levenberg-Marquardt method from
12870 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12871 enhancements to optimization and data fitting problems.")
12872 (license license:bsd-3)))
12873
12874 (define-public python-boto
12875 (package
12876 (name "python-boto")
12877 (version "2.49.0")
12878 (source (origin
12879 (method url-fetch)
12880 (uri (pypi-uri "boto" version))
12881 (sha256
12882 (base32
12883 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12884 (build-system python-build-system)
12885 (arguments
12886 ;; XXX: This package is unmaintained and has problems with newer versions
12887 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12888 ;; subset of this library, so keep it around for now, but disable tests.
12889 '(#:tests? #f))
12890 (propagated-inputs
12891 `(("python-paramiko" ,python-paramiko)
12892 ("python-requests" ,python-requests)))
12893 (home-page "https://github.com/boto/boto")
12894 (synopsis "Python interfaces for Amazon Web Services")
12895 (description
12896 "This package provides various facilities for interacting with Amazon
12897 Web Services through Python.
12898
12899 This software is unmaintained, and new projects should use @code{boto3} instead.")
12900 (license license:expat)))
12901
12902 (define-public python-botocore
12903 ;; Note: When updating botocore, also make sure that boto3 and awscli
12904 ;; are compatible.
12905 (package
12906 (name "python-botocore")
12907 (version "1.19.22")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "botocore" version))
12912 (sha256
12913 (base32
12914 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12915 (build-system python-build-system)
12916 (arguments
12917 ;; FIXME: Many tests are failing.
12918 '(#:tests? #f))
12919 (propagated-inputs
12920 `(("python-dateutil" ,python-dateutil)
12921 ("python-jmespath" ,python-jmespath)
12922 ("python-urllib3" ,python-urllib3)))
12923 (home-page "https://github.com/boto/botocore")
12924 (synopsis "Low-level interface to AWS")
12925 (description "Botocore is a Python library that provides a low-level
12926 interface to the Amazon Web Services (AWS) API.")
12927 (license license:asl2.0)))
12928
12929 (define-public python2-botocore
12930 (package-with-python2 python-botocore))
12931
12932 (define-public python-boto3
12933 (package
12934 (name "python-boto3")
12935 (version "1.16.22")
12936 (home-page "https://github.com/boto/boto3")
12937 (source (origin
12938 (method git-fetch)
12939 (uri (git-reference (url home-page) (commit version)))
12940 (file-name (git-file-name name version))
12941 (sha256
12942 (base32
12943 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12944 (arguments
12945 `(#:phases
12946 (modify-phases %standard-phases
12947 (add-after 'unpack 'delete-network-tests
12948 ;; Deleting integration tests because they are trying to connect to AWS.
12949 (lambda _
12950 (delete-file-recursively "tests/integration")
12951 #t)))))
12952 (build-system python-build-system)
12953 (native-inputs
12954 `(("python-nose" ,python-nose)
12955 ("python-mock" ,python-mock)))
12956 (propagated-inputs
12957 `(("python-botocore" ,python-botocore)
12958 ("python-jmespath" ,python-jmespath)
12959 ("python-s3transfer" ,python-s3transfer)))
12960 (synopsis "AWS SDK for Python")
12961 (description
12962 "Boto3 is a Python library for writing programs that interact with
12963 @acronym{AWS,Amazon Web Services}.")
12964 (license license:asl2.0)))
12965
12966 (define-public python-pyfiglet
12967 (package
12968 (name "python-pyfiglet")
12969 (version "0.8.post1")
12970 (source
12971 (origin
12972 (method url-fetch)
12973 (uri (pypi-uri "pyfiglet" version))
12974 (sha256
12975 (base32
12976 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12977 (build-system python-build-system)
12978 (home-page "https://github.com/pwaller/pyfiglet")
12979 (synopsis "Draw ASCII art big letters in Python")
12980 (description "This module lets you draw large letter from ordinary characters
12981 in pure Python.")
12982 (license license:expat)))
12983
12984 (define-public python-xdo
12985 (package
12986 (name "python-xdo")
12987 (version "0.3")
12988 (source (origin
12989 (method url-fetch)
12990 (uri (string-append
12991 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12992 "python-xdo_" version ".orig.tar.gz"))
12993 (sha256
12994 (base32
12995 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12996 (build-system python-build-system)
12997 (arguments
12998 '(#:phases
12999 (modify-phases %standard-phases
13000 (add-before 'install 'patch-libxdo-path
13001 ;; Hardcode the path of dynamically loaded libxdo library.
13002 (lambda* (#:key inputs #:allow-other-keys)
13003 (let ((libxdo (string-append
13004 (assoc-ref inputs "xdotool")
13005 "/lib/libxdo.so")))
13006 (substitute* "xdo/_xdo.py"
13007 (("find_library\\(\"xdo\"\\)")
13008 (simple-format #f "\"~a\"" libxdo)))
13009 #t))))
13010 #:tests? #f)) ; no tests provided
13011 (propagated-inputs
13012 `(("python-six" ,python-six)))
13013 (inputs
13014 `(("xdotool" ,xdotool)
13015 ("libX11" ,libx11)))
13016 (home-page "https://tracker.debian.org/pkg/python-xdo")
13017 (synopsis "Python library for simulating X11 keyboard/mouse input")
13018 (description "Provides bindings to libxdo for manipulating X11 via simulated
13019 input. (Note that this is mostly a legacy library; you may wish to look at
13020 python-xdo for newer bindings.)")
13021 (license license:bsd-3)))
13022
13023 (define-public python2-xdo
13024 (package-with-python2 python-xdo))
13025
13026 (define-public python-mako
13027 (package
13028 (name "python-mako")
13029 (version "1.1.3")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (pypi-uri "Mako" version))
13034 (sha256
13035 (base32
13036 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
13037 (build-system python-build-system)
13038 (arguments
13039 `(#:phases (modify-phases %standard-phases
13040 (replace 'check
13041 (lambda* (#:key tests? #:allow-other-keys)
13042 (if tests?
13043 (invoke "nosetests" "-v")
13044 (format #t "test suite not run~%"))
13045 #t)))))
13046 (propagated-inputs
13047 `(("python-markupsafe" ,python-markupsafe)))
13048 (native-inputs
13049 `(("python-mock" ,python-mock)
13050 ("python-nose" ,python-nose)))
13051 (home-page "https://www.makotemplates.org/")
13052 (synopsis "Templating language for Python")
13053 (description "Mako is a templating language for Python that compiles
13054 templates into Python modules.")
13055 (license license:expat)))
13056
13057 (define-public python2-mako
13058 (package-with-python2 python-mako))
13059
13060 (define-public python-waitress
13061 (package
13062 (name "python-waitress")
13063 (version "1.1.0")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "waitress" version))
13068 (patches (search-patches "python-waitress-fix-tests.patch"))
13069 (sha256
13070 (base32
13071 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
13072 (build-system python-build-system)
13073 (home-page "https://github.com/Pylons/waitress")
13074 (synopsis "Waitress WSGI server")
13075 (description "Waitress is meant to be a production-quality pure-Python WSGI
13076 server with very acceptable performance.")
13077 (license license:zpl2.1)))
13078
13079 (define-public python2-waitress
13080 (package-with-python2 python-waitress))
13081
13082 (define-public python-whichcraft
13083 (package
13084 (name "python-whichcraft")
13085 (version "0.6.1")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "whichcraft" version))
13090 (sha256
13091 (base32
13092 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
13093 (build-system python-build-system)
13094 (native-inputs
13095 `(("python-pytest" ,python-pytest)))
13096 (home-page "https://github.com/pydanny/whichcraft")
13097 (synopsis "Cross-platform cross-python shutil.which functionality")
13098 (description
13099 "This package provides a shim of the shutil.which function that's
13100 designed to work across multiple versions of Python.")
13101 (license license:bsd-3)))
13102
13103 (define-public python-cookiecutter
13104 (package
13105 (name "python-cookiecutter")
13106 (version "1.7.3")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "cookiecutter" version))
13111 (sha256
13112 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
13113 (build-system python-build-system)
13114 (native-inputs
13115 `(("python-freezegun" ,python-freezegun)
13116 ("python-pytest" ,python-pytest)
13117 ("python-pytest-catchlog" ,python-pytest-catchlog)
13118 ("python-pytest-cov" ,python-pytest-cov)
13119 ("python-pytest-mock" ,python-pytest-mock)))
13120 (propagated-inputs
13121 `(("python-binaryornot" ,python-binaryornot)
13122 ("python-click" ,python-click)
13123 ("python-future" ,python-future)
13124 ("python-jinja2" ,python-jinja2)
13125 ("python-jinja2-time" ,python-jinja2-time)
13126 ("python-poyo" ,python-poyo)
13127 ("python-requests" ,python-requests)
13128 ("python-slugify" ,python-slugify)
13129 ("python-text-unidecode" ,python-text-unidecode)
13130 ("python-whichcraft" ,python-whichcraft)))
13131 (home-page "https://github.com/cookiecutter/cookiecutter")
13132 (synopsis
13133 "Command-line utility that creates projects from project templates")
13134 (description
13135 "This package provides a command-line utility that creates projects from
13136 project templates, e.g. creating a Python package project from a Python package
13137 project template.")
13138 (license license:bsd-3)))
13139
13140 (define-public python-pyquery
13141 (package
13142 (name "python-pyquery")
13143 (version "1.2.17")
13144 (source
13145 (origin
13146 (method url-fetch)
13147 (uri (pypi-uri "pyquery" version))
13148 (sha256
13149 (base32
13150 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
13151 (build-system python-build-system)
13152 (native-inputs
13153 `(("python-webob" ,python-webob)
13154 ("python-webtest" ,python-webtest)))
13155 (propagated-inputs
13156 `(("python-lxml" ,python-lxml)
13157 ("python-cssselect" ,python-cssselect)))
13158 (home-page "https://github.com/gawel/pyquery")
13159 (synopsis "Make jQuery-like queries on xml documents")
13160 (description "pyquery allows you to make jQuery queries on xml documents.
13161 The API is as much as possible the similar to jQuery. pyquery uses lxml for
13162 fast xml and html manipulation.")
13163 (license license:bsd-3)))
13164
13165 (define-public python-anyjson
13166 (package
13167 (name "python-anyjson")
13168 (version "0.3.3")
13169 (source
13170 (origin
13171 (method url-fetch)
13172 (uri (pypi-uri "anyjson" version))
13173 (sha256
13174 (base32
13175 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
13176 (build-system python-build-system)
13177 (arguments
13178 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
13179 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
13180 ;; whatever) so this transformation needs to be done before the tests
13181 ;; can be run. Maybe we could add a build step to transform beforehand
13182 ;; but it could be annoying/difficult.
13183 ;; We can enable tests for the Python 2 version, though, and do below.
13184 #:tests? #f))
13185 (home-page "https://bitbucket.org/runeh/anyjson/")
13186 (synopsis
13187 "Wraps best available JSON implementation in a common interface")
13188 (description
13189 "Anyjson loads whichever is the fastest JSON module installed
13190 and provides a uniform API regardless of which JSON implementation is used.")
13191 (license license:bsd-3)
13192 (properties `((python2-variant . ,(delay python2-anyjson))))))
13193
13194 (define-public python2-anyjson
13195 (let ((anyjson (package-with-python2
13196 (strip-python2-variant python-anyjson))))
13197 (package/inherit anyjson
13198 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13199 #:tests? #t
13200 ,@(package-arguments anyjson)))
13201 (native-inputs `(("python2-nose" ,python2-nose))))))
13202
13203 (define-public python-amqp
13204 (package
13205 (name "python-amqp")
13206 (version "2.3.2")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "amqp" version))
13211 (sha256
13212 (base32
13213 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13214 (build-system python-build-system)
13215 (native-inputs
13216 `(("python-case" ,python-case)
13217 ("python-pytest-sugar" ,python-pytest-sugar)
13218 ("python-mock" ,python-mock)))
13219 (propagated-inputs
13220 `(("python-vine" ,python-vine)))
13221 (home-page "https://github.com/celery/py-amqp")
13222 (synopsis
13223 "Low-level AMQP client for Python (fork of amqplib)")
13224 (description
13225 "This is a fork of amqplib which was originally written by Barry Pederson.
13226 It is maintained by the Celery project, and used by kombu as a pure python
13227 alternative when librabbitmq is not available.")
13228 (license license:lgpl2.1+)
13229 (properties `((python2-variant . ,(delay python2-amqp))))))
13230
13231 (define-public python2-amqp
13232 (let ((amqp (package-with-python2
13233 (strip-python2-variant python-amqp))))
13234 (package/inherit amqp
13235 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13236 ;; unmaintained. Weirdly, does not do this on the python 3
13237 ;; version?
13238 #:tests? #f
13239 ,@(package-arguments amqp))))))
13240
13241 (define-public python-txamqp
13242 (package
13243 (name "python-txamqp")
13244 (version "0.8.2")
13245 (source
13246 (origin
13247 (method url-fetch)
13248 (uri (pypi-uri "txAMQP" version))
13249 (sha256
13250 (base32
13251 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13252 (build-system python-build-system)
13253 (propagated-inputs
13254 `(("python-six" ,python-six)
13255 ("python-twisted" ,python-twisted)))
13256 (home-page "https://github.com/txamqp/txamqp")
13257 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13258 (description
13259 "This package provides a Python library for communicating with AMQP peers
13260 and brokers using the asynchronous networking framework Twisted. It contains
13261 all the necessary code to connect, send and receive messages to/from an
13262 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13263 also includes support for using Thrift RPC over AMQP in Twisted
13264 applications.")
13265 (license license:asl2.0)))
13266
13267 (define-public python2-txamqp
13268 (package-with-python2 python-txamqp))
13269
13270 (define-public python-kombu
13271 (package
13272 (name "python-kombu")
13273 (version "4.2.2")
13274 (source
13275 (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "kombu" version))
13278 (sha256
13279 (base32
13280 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13281 (build-system python-build-system)
13282 (native-inputs
13283 `(("python-mock" ,python-mock)
13284 ("python-case" ,python-case)
13285 ("python-pyro4" ,python-pyro4)
13286 ("python-pytest-sugar" ,python-pytest-sugar)
13287 ("python-pytz" ,python-pytz)))
13288 (propagated-inputs
13289 `(("python-anyjson" ,python-anyjson)
13290 ("python-amqp" ,python-amqp)
13291 ("python-redis" ,python-redis)))
13292 (home-page "https://kombu.readthedocs.io")
13293 (synopsis "Message passing library for Python")
13294 (description "The aim of Kombu is to make messaging in Python as easy as
13295 possible by providing an idiomatic high-level interface for the AMQ protocol,
13296 and also provide proven and tested solutions to common messaging problems.
13297 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13298 message orientation, queuing, routing, reliability and security, for which the
13299 RabbitMQ messaging server is the most popular implementation.")
13300 (license license:bsd-3)
13301 (properties `((python2-variant . ,(delay python2-kombu))))))
13302
13303 (define-public python2-kombu
13304 (let ((kombu (package-with-python2
13305 (strip-python2-variant python-kombu))))
13306 (package/inherit kombu
13307 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13308 ;; It works fine on the python3 variant.
13309 #:tests? #f
13310 ,@(package-arguments kombu)))
13311 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13312 ,@(package-native-inputs kombu))))))
13313
13314 (define-public python-billiard
13315 (package
13316 (name "python-billiard")
13317 (version "3.5.0.5")
13318 (source
13319 (origin
13320 (method url-fetch)
13321 (uri (pypi-uri "billiard" version))
13322 (sha256
13323 (base32
13324 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13325 (build-system python-build-system)
13326 (native-inputs
13327 `(("python-case" ,python-case)
13328 ("python-pytest" ,python-pytest)))
13329 (home-page "https://github.com/celery/billiard")
13330 (synopsis
13331 "Python multiprocessing fork with improvements and bugfixes")
13332 (description
13333 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13334 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13335 pyprocessing package. This standalone variant is intended to be compatible with
13336 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13337 (license license:bsd-3)
13338 (properties `((python2-variant . ,(delay python2-billiard))))))
13339
13340 (define-public python2-billiard
13341 (let ((billiard (package-with-python2
13342 (strip-python2-variant python-billiard))))
13343 (package/inherit billiard
13344 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13345 ("python2-mock" ,python2-mock)
13346 ,@(package-native-inputs billiard))))))
13347
13348 (define-public python-celery
13349 (package
13350 (name "python-celery")
13351 (version "4.2.1")
13352 (source
13353 (origin
13354 (method url-fetch)
13355 (uri (pypi-uri "celery" version))
13356 (sha256
13357 (base32
13358 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13359 (build-system python-build-system)
13360 (arguments
13361 '(;; TODO The tests fail with Python 3.7
13362 ;; https://github.com/celery/celery/issues/4849
13363 #:tests? #f
13364 #:phases
13365 (modify-phases %standard-phases
13366 (add-after 'unpack 'patch-requirements
13367 (lambda _
13368 (substitute* "requirements/test.txt"
13369 (("pytest>=3\\.0,<3\\.3")
13370 "pytest>=3.0"))
13371 #t)))))
13372 (native-inputs
13373 `(("python-case" ,python-case)
13374 ("python-pytest" ,python-pytest)))
13375 (propagated-inputs
13376 `(("python-pytz" ,python-pytz)
13377 ("python-billiard" ,python-billiard)
13378 ("python-kombu" ,python-kombu)))
13379 (home-page "https://celeryproject.org")
13380 (synopsis "Distributed Task Queue")
13381 (description "Celery is an asynchronous task queue/job queue based on
13382 distributed message passing. It is focused on real-time operation, but
13383 supports scheduling as well. The execution units, called tasks, are executed
13384 concurrently on a single or more worker servers using multiprocessing,
13385 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13386 synchronously (wait until ready).")
13387 (license license:bsd-3)
13388 (properties `((python2-variant . ,(delay python2-celery))))))
13389
13390 (define-public python2-celery
13391 (let ((celery (package-with-python2
13392 (strip-python2-variant python-celery))))
13393 (package/inherit celery
13394 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13395 ("python2-mock" ,python2-mock)
13396 ,@(package-native-inputs celery))))))
13397
13398 (define-public python-translitcodec
13399 (package
13400 (name "python-translitcodec")
13401 (version "0.4.0")
13402 (source
13403 (origin
13404 (method url-fetch)
13405 (uri (pypi-uri "translitcodec" version))
13406 (sha256
13407 (base32
13408 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13409 (build-system python-build-system)
13410 (arguments
13411 `(#:tests? #f)) ; no tests provided
13412 (home-page
13413 "https://github.com/claudep/translitcodec")
13414 (synopsis
13415 "Unicode to 8-bit charset transliteration codec")
13416 (description
13417 "This package contains codecs for transliterating ISO 10646 texts into
13418 best-effort representations using smaller coded character sets (ASCII,
13419 ISO 8859, etc.).")
13420 (license license:expat)))
13421
13422 (define-public python2-translitcodec
13423 (package-with-python2 python-translitcodec))
13424
13425 (define-public python-anyqt
13426 (package
13427 (name "python-anyqt")
13428 (version "0.0.11")
13429 (source
13430 (origin
13431 (method url-fetch)
13432 (uri (pypi-uri "AnyQt" version))
13433 (sha256
13434 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13435 (build-system python-build-system)
13436 (arguments
13437 `(#:tests? #f ;there are no tests
13438 #:phases
13439 (modify-phases %standard-phases
13440 (add-after 'unpack 'delete-files
13441 ;; Delete files related to other operating systems.
13442 (lambda _
13443 (delete-file "AnyQt/QtMacExtras.py")
13444 (delete-file "AnyQt/QtWinExtras.py")
13445 #t)))))
13446 (home-page "https://github.com/ales-erjavec/anyqt")
13447 (synopsis "PyQt4/PyQt5 compatibility layer")
13448 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
13449 (license license:gpl3)))
13450
13451 (define-public python-pyqtgraph
13452 (package
13453 (name "python-pyqtgraph")
13454 (version "0.12.1")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "pyqtgraph" version))
13459 (sha256
13460 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
13461 (build-system python-build-system)
13462 (arguments
13463 `(#:phases
13464 (modify-phases %standard-phases
13465 (add-before 'check 'set-home-and-qpa
13466 (lambda _
13467 (setenv "HOME" "/tmp")
13468 (setenv "QT_QPA_PLATFORM" "offscreen")
13469 #t))
13470 (replace 'check
13471 (lambda* (#:key inputs outputs #:allow-other-keys)
13472 (add-installed-pythonpath inputs outputs)
13473 (invoke "pytest" "-vv" "-k"
13474 ;; These tests try to download online data.
13475 (string-append "not test_PolyLineROI"
13476 " and not test_getArrayRegion_axisorder"
13477 " and not test_getArrayRegion"
13478 " and not test_PlotCurveItem"
13479 " and not test_NonUniformImage_colormap"
13480 " and not test_NonUniformImage_lut"
13481 " and not test_ImageItem_axisorder"
13482 " and not test_ImageItem")))))))
13483 (native-inputs
13484 `(("python-pytest" ,python-pytest)
13485 ("python-pytest-cov" ,python-pytest-cov)
13486 ("python-pytest-xdist" ,python-pytest-xdist)))
13487 (inputs
13488 `(("qtbase" ,qtbase-5)))
13489 (propagated-inputs
13490 `(("python-h5py" ,python-h5py)
13491 ("python-numpy" ,python-numpy)
13492 ("python-pyopengl" ,python-pyopengl)
13493 ("python-scipy" ,python-scipy)
13494 ("python-pyqt" ,python-pyqt)))
13495 (home-page "http://www.pyqtgraph.org")
13496 (synopsis "Scientific graphics and GUI library for Python")
13497 (description
13498 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
13499 and PySide6. It is intended for use in mathematics, scientific or engineering
13500 applications.")
13501 (license license:expat)))
13502
13503 (define-public python-qasync
13504 (package
13505 (name "python-qasync")
13506 (version "0.15.0")
13507 (source
13508 (origin
13509 ;; There are no tests in the PyPI tarball.
13510 (method git-fetch)
13511 (uri (git-reference
13512 (url "https://github.com/CabbageDevelopment/qasync/")
13513 (commit (string-append "v" version))))
13514 (file-name (git-file-name name version))
13515 (sha256
13516 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
13517 (build-system python-build-system)
13518 (arguments
13519 `(#:test-target "pytest"
13520 #:phases
13521 (modify-phases %standard-phases
13522 (add-before 'check 'set-qpa
13523 (lambda _
13524 (setenv "QT_QPA_PLATFORM" "offscreen")
13525 #t)))))
13526 (native-inputs
13527 `(("python-pytest" ,python-pytest)
13528 ("python-pytest-runner" ,python-pytest-runner)))
13529 (propagated-inputs
13530 `(("python-pyqt" ,python-pyqt)))
13531 (home-page "https://github.com/CabbageDevelopment/qasync")
13532 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
13533 (description
13534 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
13535 by providing an implementation of the PEP 3156 event-loop.")
13536 (license license:bsd-2)))
13537
13538 (define-public python-editor
13539 (package
13540 (name "python-editor")
13541 (version "1.0.4")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "python-editor" version))
13546 (sha256
13547 (base32
13548 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
13549 (build-system python-build-system)
13550 (arguments
13551 '(#:tests? #f)) ;XXX: needs a TTY and an editor
13552 (home-page "https://github.com/fmoo/python-editor")
13553 (synopsis "Programmatically open an editor, capture the result")
13554 (description
13555 "python-editor is a library that provides the editor module for
13556 programmatically interfacing with your system's $EDITOR.")
13557 (license license:asl2.0)))
13558
13559 (define-public python2-editor
13560 (package-with-python2 python-editor))
13561
13562 (define-public python-multiprocessing-logging
13563 (package
13564 (name "python-multiprocessing-logging")
13565 (version "0.3.1")
13566 (home-page "https://github.com/jruere/multiprocessing-logging")
13567 (source (origin
13568 (method git-fetch)
13569 (uri (git-reference
13570 (url home-page)
13571 (commit (string-append "v" version))))
13572 (file-name (git-file-name name version))
13573 (sha256
13574 (base32
13575 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
13576 (build-system python-build-system)
13577 (synopsis "Manage logs from multiple processes")
13578 (description
13579 "This Python module implements a multiprocessing-aware @code{Handler}
13580 that, when set on the root @code{Logger}, will tunnel log records to the
13581 main process so that they are handled correctly.")
13582 (license license:lgpl3+)))
13583
13584 (define-public python-vobject
13585 (package
13586 (name "python-vobject")
13587 (version "0.9.6.1")
13588 (source (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "vobject" version))
13591 (sha256
13592 (base32
13593 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
13594 (build-system python-build-system)
13595 (arguments
13596 '(;; The test suite relies on some non-portable Windows interfaces.
13597 #:tests? #f))
13598 (propagated-inputs
13599 `(("python-dateutil" ,python-dateutil)
13600 ("python-pyicu" ,python-pyicu)))
13601 (synopsis "Parse and generate vCard and vCalendar files")
13602 (description "Vobject is intended to be a full featured Python package for
13603 parsing and generating vCard and vCalendar files. Currently, iCalendar files
13604 are supported and well tested. vCard 3.0 files are supported, and all data
13605 should be imported, but only a few components are understood in a sophisticated
13606 way.")
13607 (home-page "https://eventable.github.io/vobject/")
13608 (license license:asl2.0)))
13609
13610 (define-public python2-vobject
13611 (package-with-python2 python-vobject))
13612
13613 (define-public python-munkres
13614 (package
13615 (name "python-munkres")
13616 (version "1.1.4")
13617 (source (origin
13618 (method url-fetch)
13619 (uri (pypi-uri "munkres" version))
13620 (sha256
13621 (base32
13622 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w"))))
13623 (build-system python-build-system)
13624 (native-inputs `(("python-pytest" ,python-pytest-6)))
13625 (home-page "https://software.clapper.org/munkres/")
13626 (synopsis "Implementation of the Munkres algorithm")
13627 (description "The Munkres module provides an implementation of the Munkres
13628 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
13629 useful for solving the Assignment Problem.")
13630 (license license:bsd-3)))
13631
13632 (define-public python2-munkres
13633 (package-with-python2 python-munkres))
13634
13635 (define-public python-whoosh
13636 (package
13637 (name "python-whoosh")
13638 (version "2.7.4")
13639 (source
13640 (origin
13641 (method url-fetch)
13642 (uri (pypi-uri "Whoosh" version))
13643 (sha256
13644 (base32
13645 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
13646 (build-system python-build-system)
13647 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
13648 (native-inputs
13649 `(("python-pytest" ,python-pytest)))
13650 (home-page "https://bitbucket.org/mchaput/whoosh")
13651 (synopsis "Full text indexing, search, and spell checking library")
13652 (description
13653 "Whoosh is a fast, pure-Python full text indexing, search, and spell
13654 checking library.")
13655 (license license:bsd-2)))
13656
13657 (define-public python2-whoosh
13658 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
13659 (package/inherit whoosh
13660 (propagated-inputs
13661 `(("python2-backport-ssl-match-hostname"
13662 ,python2-backport-ssl-match-hostname)
13663 ,@(package-propagated-inputs whoosh))))))
13664
13665 (define-public python-pathlib
13666 (package
13667 (name "python-pathlib")
13668 (version "1.0.1")
13669 (source (origin
13670 (method url-fetch)
13671 (uri (pypi-uri "pathlib" version))
13672 (sha256
13673 (base32
13674 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
13675 (build-system python-build-system)
13676 ;; The tests depend on the internal "test" module, which does not provide
13677 ;; a stable interface.
13678 (arguments `(#:tests? #f))
13679 (home-page "https://pathlib.readthedocs.org/")
13680 (synopsis "Object-oriented file system paths")
13681 (description "Pathlib offers a set of classes to handle file system paths.
13682 It offers the following advantages over using string objects:
13683
13684 @enumerate
13685 @item No more cumbersome use of os and os.path functions. Everything can
13686 be done easily through operators, attribute accesses, and method calls.
13687 @item Embodies the semantics of different path types. For example,
13688 comparing Windows paths ignores casing.
13689 @item Well-defined semantics, eliminating any inconsistencies or
13690 ambiguities (forward vs. backward slashes, etc.).
13691 @end enumerate
13692
13693 Note: In Python 3.4, pathlib is now part of the standard library. For other
13694 Python versions please consider python-pathlib2 instead, which tracks the
13695 standard library module. This module (python-pathlib) isn't maintained
13696 anymore.")
13697 (license license:expat)))
13698
13699 (define-public python2-pathlib
13700 (package-with-python2 python-pathlib))
13701
13702 (define-public python2-pathlib2
13703 (package
13704 (name "python2-pathlib2")
13705 (version "2.3.5")
13706 (source (origin
13707 (method url-fetch)
13708 (uri (pypi-uri "pathlib2" version))
13709 (sha256
13710 (base32
13711 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
13712 (build-system python-build-system)
13713 ;; We only need the the Python 2 variant, since for Python 3 our minimum
13714 ;; version is 3.4 which already includes this package as part of the
13715 ;; standard library.
13716 (arguments
13717 `(#:python ,python-2))
13718 (propagated-inputs
13719 `(("python2-scandir" ,python2-scandir)
13720 ("python2-six" ,python2-six)))
13721 (home-page "https://pypi.org/project/pathlib2/")
13722 (synopsis "Object-oriented file system paths - backport of standard
13723 pathlib module")
13724 (description "The goal of pathlib2 is to provide a backport of standard
13725 pathlib module which tracks the standard library module, so all the newest
13726 features of the standard pathlib can be used also on older Python versions.
13727
13728 Pathlib offers a set of classes to handle file system paths. It offers the
13729 following advantages over using string objects:
13730
13731 @enumerate
13732 @item No more cumbersome use of os and os.path functions. Everything can
13733 be done easily through operators, attribute accesses, and method calls.
13734 @item Embodies the semantics of different path types. For example,
13735 comparing Windows paths ignores casing.
13736 @item Well-defined semantics, eliminating any inconsistencies or
13737 ambiguities (forward vs. backward slashes, etc.).
13738 @end enumerate")
13739 (license license:expat)))
13740
13741 (define-public python2-pathlib2-bootstrap
13742 (hidden-package
13743 (package
13744 (inherit python2-pathlib2)
13745 (name "python2-pathlib2-bootstrap")
13746 (propagated-inputs
13747 `(("python2-scandir" ,python2-scandir)
13748 ("python2-six" ,python2-six-bootstrap))))))
13749
13750 (define-public python-jellyfish
13751 (package
13752 (name "python-jellyfish")
13753 (version "0.8.8")
13754 (source (origin
13755 (method url-fetch)
13756 (uri (pypi-uri "jellyfish" version))
13757 (sha256
13758 (base32
13759 "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
13760 (build-system python-build-system)
13761 (arguments
13762 `(#:tests? #f ; XXX: Tests cannot find C coded version.
13763 #:phases
13764 (modify-phases %standard-phases
13765 (replace 'check
13766 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
13767 (when tests?
13768 (add-installed-pythonpath inputs outputs)
13769 (invoke "pytest" "-vv" "jellyfish/test.py")))))))
13770 (native-inputs
13771 `(("python-pytest" ,python-pytest)))
13772 (home-page "https://github.com/jamesturk/jellyfish")
13773 (synopsis "Approximate and phonetic matching of strings")
13774 (description "Jellyfish uses a variety of string comparison and phonetic
13775 encoding algorithms to do fuzzy string matching.")
13776 (license license:bsd-2)))
13777
13778 (define-public python2-unicodecsv
13779 (package
13780 (name "python2-unicodecsv")
13781 (version "0.14.1")
13782 (source (origin
13783 (method git-fetch)
13784 ;; The test suite is not included in the PyPi release.
13785 ;; https://github.com/jdunck/python-unicodecsv/issues/19
13786 (uri (git-reference
13787 (url "https://github.com/jdunck/python-unicodecsv")
13788 (commit version)))
13789 (file-name (git-file-name name version))
13790 (sha256
13791 (base32
13792 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
13793 (build-system python-build-system)
13794 (arguments
13795 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
13796 #:python ,python-2))
13797 (native-inputs
13798 `(("python2-unittest2" ,python2-unittest2)))
13799 (home-page "https://github.com/jdunck/python-unicodecsv")
13800 (synopsis "Unicode CSV module for Python 2")
13801 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
13802 module, adding support for Unicode strings.")
13803 (license license:bsd-2)))
13804
13805 (define-public python-pdfminer-six
13806 (package
13807 (name "python-pdfminer-six")
13808 (version "20201018")
13809 ;; There are no tests in the PyPI tarball.
13810 (source
13811 (origin
13812 (method git-fetch)
13813 (uri (git-reference
13814 (url "https://github.com/pdfminer/pdfminer.six")
13815 (commit version)))
13816 (file-name (git-file-name name version))
13817 (sha256
13818 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
13819 (build-system python-build-system)
13820 (arguments
13821 `(#:phases
13822 (modify-phases %standard-phases
13823 ;; Tests write to the source tree.
13824 (add-after 'unpack 'make-git-checkout-writable
13825 (lambda _
13826 (for-each make-file-writable (find-files "."))
13827 #t))
13828 (replace 'check
13829 (lambda _
13830 (invoke "make" "test")))
13831 (add-before 'reset-gzip-timestamps 'make-files-writable
13832 (lambda* (#:key outputs #:allow-other-keys)
13833 (let ((out (assoc-ref outputs "out")))
13834 (for-each make-file-writable
13835 (find-files out "\\.gz$"))
13836 #t))))))
13837 (propagated-inputs
13838 `(("python-chardet" ,python-chardet)
13839 ("python-cryptography" ,python-cryptography)
13840 ("python-sortedcontainers" ,python-sortedcontainers)))
13841 (native-inputs
13842 `(("python-nose" ,python-nose)
13843 ("python-tox" ,python-tox)))
13844 (home-page "https://github.com/pdfminer/pdfminer.six")
13845 (synopsis "PDF parser and analyzer")
13846 (description "@code{pdfminer.six} is a community maintained fork of
13847 the original PDFMiner. It is a tool for extracting information from PDF
13848 documents. It focuses on getting and analyzing text data. Pdfminer.six
13849 extracts the text from a page directly from the sourcecode of the PDF. It
13850 can also be used to get the exact location, font or color of the text.")
13851 (license license:expat)))
13852
13853 (define-public python-rarfile
13854 (package
13855 (name "python-rarfile")
13856 (version "4.0")
13857 (source (origin
13858 (method url-fetch)
13859 (uri (pypi-uri "rarfile" version))
13860 (sha256
13861 (base32
13862 "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
13863 (build-system python-build-system)
13864 (arguments
13865 `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
13866 #:phases
13867 (modify-phases %standard-phases
13868 (add-after 'unpack 'patch
13869 (lambda* (#:key inputs #:allow-other-keys)
13870 (substitute* "rarfile.py"
13871 ;; Disable unrar and unar, which are unavailable on Guix.
13872 (("(unrar|unar)=True" all tool) (string-append tool "=False"))
13873 ;; Hardcode path to bsdtar
13874 (("\"bsdtar\"")
13875 (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
13876 #t))
13877 (replace 'check
13878 (lambda* (#:key inputs tests? #:allow-other-keys)
13879 (when tests?
13880 (invoke "pytest" "-vv")))))))
13881 (native-inputs `(("python-pytest" ,python-pytest)))
13882 (inputs `(("libarchive" ,libarchive)))
13883 (home-page "https://github.com/markokr/rarfile")
13884 (synopsis "RAR archive reader for Python")
13885 (description "This is Python module for RAR archive reading. The interface
13886 is made as zipfile like as possible.")
13887 (license license:isc)))
13888
13889 (define-public python-rich
13890 (package
13891 (name "python-rich")
13892 (version "10.2.2")
13893 (source (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "rich" version))
13896 (sha256
13897 (base32
13898 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
13899 (build-system python-build-system)
13900 (arguments
13901 `(#:phases
13902 (modify-phases %standard-phases
13903 (replace 'check
13904 (lambda* (#:key inputs tests? #:allow-other-keys)
13905 (when tests?
13906 (copy-recursively (string-append
13907 (assoc-ref inputs "tests") "/tests")
13908 "tests")
13909 (invoke "python" "-m" "pytest" "-vv")))))))
13910 (propagated-inputs
13911 `(("python-attrs" ,python-attrs)
13912 ("python-colorama" ,python-colorama)
13913 ("python-commonmark" ,python-commonmark)
13914 ("python-ipywidgets" ,python-ipywidgets)
13915 ("python-pygments" ,python-pygments)
13916 ("python-typing-extensions" ,python-typing-extensions)))
13917 (native-inputs
13918 `(("python-pytest" ,python-pytest)
13919 ("tests"
13920 ;; The release on pypi comes without tests. We can't build from this
13921 ;; checkout, though, because installation requires an invocation of
13922 ;; poetry.
13923 ,(origin
13924 (method git-fetch)
13925 (uri (git-reference
13926 (url "https://github.com/willmcgugan/rich")
13927 (commit (string-append "v" version))))
13928 (file-name (git-file-name name version))
13929 (sha256
13930 (base32
13931 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
13932 (home-page "https://github.com/willmcgugan/rich")
13933 (synopsis "Render rich text and more to the terminal")
13934 (description
13935 "This is a Python package for rendering rich text, tables, progress bars,
13936 syntax highlighting, markdown and more to the terminal.")
13937 (license license:expat)))
13938
13939 (define-public python-magic
13940 (package
13941 (name "python-magic")
13942 (version "0.4.22")
13943 (home-page "https://github.com/ahupp/python-magic")
13944 (source
13945 (origin
13946 (method git-fetch)
13947 (uri (git-reference (url home-page) (commit version)))
13948 (file-name (git-file-name name version))
13949 (sha256
13950 (base32
13951 "0zbdjr5shijs0jayz7gycpx0kn6v2bh83dpanyajk2vmy47jvbd6"))))
13952 (build-system python-build-system)
13953 (arguments
13954 '(#:phases (modify-phases %standard-phases
13955 ;; Replace a specific method call with a hard-coded
13956 ;; path to the necessary libmagic.so file in the
13957 ;; store. If we don't do this, then the method call
13958 ;; will fail to find the libmagic.so file, which in
13959 ;; turn will cause any application using
13960 ;; python-magic to fail.
13961 (add-before 'build 'hard-code-path-to-libmagic
13962 (lambda* (#:key inputs #:allow-other-keys)
13963 (let ((file (assoc-ref inputs "file")))
13964 (substitute* "magic/loader.py"
13965 (("ctypes\\.util\\.find_library\\('magic'\\)")
13966 (string-append "'" file "/lib/libmagic.so'"))))))
13967 (replace 'check
13968 (lambda* (#:key tests? #:allow-other-keys)
13969 ;; The test suite mandates this variable.
13970 (setenv "LC_ALL" "en_US.UTF-8")
13971 (if tests?
13972 (invoke "python" "./test/test.py")
13973 (format #t "test suite not run~%")))))))
13974 (native-inputs
13975 `(("which" ,which)))
13976 (inputs
13977 ;; python-magic needs to be able to find libmagic.so.
13978 `(("file" ,file)))
13979 (synopsis "File type identification using libmagic")
13980 (description
13981 "This module uses ctypes to access the libmagic file type
13982 identification library. It makes use of the local magic database and
13983 supports both textual and MIME-type output. Note that this module and
13984 the python-file module both provide a \"magic.py\" file; these two
13985 modules, which are different and were developed separately, both serve
13986 the same purpose: to provide Python bindings for libmagic.")
13987 (license license:expat)))
13988
13989 (define-public python2-magic
13990 (package-with-python2 python-magic))
13991
13992 (define-public python2-s3cmd
13993 (package
13994 (name "python2-s3cmd")
13995 (version "1.6.1")
13996 (source
13997 (origin
13998 (method url-fetch)
13999 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
14000 "s3cmd-" version ".tar.gz"))
14001 (sha256
14002 (base32
14003 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
14004 (build-system python-build-system)
14005 (arguments
14006 ;; s3cmd is written for python2 only and contains no tests.
14007 `(#:python ,python-2
14008 #:tests? #f))
14009 (propagated-inputs
14010 `(("python2-dateutil" ,python2-dateutil)
14011 ;; The python-file package also provides a magic.py module.
14012 ;; This is an unfortunate state of affairs; however, s3cmd
14013 ;; fails to install if it cannot find specifically the
14014 ;; python-magic package. Thus we include it, instead of using
14015 ;; python-file. Ironically, s3cmd sometimes works better
14016 ;; without libmagic bindings at all:
14017 ;; https://github.com/s3tools/s3cmd/issues/198
14018 ("python2-magic" ,python2-magic)))
14019 (home-page "https://s3tools.org/s3cmd")
14020 (synopsis "Command line tool for S3-compatible storage services")
14021 (description
14022 "S3cmd is a command line tool for uploading, retrieving and managing data
14023 in storage services that are compatible with the Amazon Simple Storage
14024 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
14025 GnuPG encryption, and more. It also supports management of Amazon's
14026 CloudFront content delivery network.")
14027 (license license:gpl2+)))
14028
14029 (define-public python-pkgconfig
14030 (package
14031 (name "python-pkgconfig")
14032 (version "1.3.1")
14033 (source
14034 (origin
14035 (method url-fetch)
14036 (uri (pypi-uri "pkgconfig" version))
14037 (sha256
14038 (base32
14039 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
14040 (build-system python-build-system)
14041 (native-inputs
14042 `(("python-nose" ,python-nose)))
14043 (inputs
14044 `(("pkg-config" ,pkg-config)))
14045 (arguments
14046 `(#:phases
14047 (modify-phases %standard-phases
14048 (add-before 'build 'patch
14049 ;; Hard-code the path to pkg-config.
14050 (lambda _
14051 (substitute* "pkgconfig/pkgconfig.py"
14052 (("cmd = 'pkg-config")
14053 (string-append "cmd = '" (which "pkg-config"))))
14054 #t))
14055 (replace 'check
14056 (lambda _
14057 (invoke "nosetests" "test.py"))))))
14058 (home-page "https://github.com/matze/pkgconfig")
14059 (synopsis "Python interface for pkg-config")
14060 (description "This module provides a Python interface to pkg-config. It
14061 can be used to find all pkg-config packages, check if a package exists,
14062 check if a package meets certain version requirements, query CFLAGS and
14063 LDFLAGS and parse the output to build extensions with setup.py.")
14064 (license license:expat)))
14065
14066 (define-public python2-pkgconfig
14067 (package-with-python2 python-pkgconfig))
14068
14069 (define-public python-bz2file
14070 (package
14071 (name "python-bz2file")
14072 (version "0.98")
14073 (source
14074 (origin
14075 (method url-fetch)
14076 (uri (pypi-uri "bz2file" version))
14077 (sha256
14078 (base32
14079 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
14080 (build-system python-build-system)
14081 (arguments
14082 `(#:tests? #f)) ; Tests use deprecated python modules.
14083 (home-page "https://github.com/nvawda/bz2file")
14084 (synopsis "Read and write bzip2-compressed files")
14085 (description
14086 "Bz2file is a Python library for reading and writing bzip2-compressed
14087 files. It contains a drop-in replacement for the I/O interface in the
14088 standard library's @code{bz2} module, including features from the latest
14089 development version of CPython that are not available in older releases.")
14090 (license license:asl2.0)))
14091
14092 (define-public python2-bz2file
14093 (package-with-python2 python-bz2file))
14094
14095 (define-public python-future
14096 (package
14097 (name "python-future")
14098 (version "0.17.1")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (pypi-uri "future" version))
14103 (sha256
14104 (base32
14105 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
14106 (build-system python-build-system)
14107 ;; Many tests connect to the network or are otherwise flawed.
14108 ;; https://github.com/PythonCharmers/python-future/issues/210
14109 (arguments
14110 `(#:tests? #f))
14111 (home-page "https://python-future.org")
14112 (synopsis "Single-source support for Python 3 and 2")
14113 (description
14114 "@code{python-future} is the missing compatibility layer between Python 2 and
14115 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
14116 to support both Python 2 and Python 3 with minimal overhead.")
14117 (license license:expat)))
14118
14119 (define-public python2-future
14120 (package-with-python2 python-future))
14121
14122 (define-public python-cysignals
14123 (package
14124 (name "python-cysignals")
14125 (version "1.9.0")
14126 (source
14127 (origin
14128 (method url-fetch)
14129 (uri (pypi-uri "cysignals" version))
14130 (sha256
14131 (base32
14132 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
14133 (build-system python-build-system)
14134 (native-inputs
14135 `(("python-cython" ,python-cython)
14136 ("python-sphinx" ,python-sphinx)))
14137 (inputs
14138 `(("pari-gp" ,pari-gp)))
14139 (arguments
14140 `(#:modules ((guix build python-build-system)
14141 ((guix build gnu-build-system) #:prefix gnu:)
14142 (guix build utils))
14143 ;; FIXME: Tests are executed after installation and currently fail
14144 ;; when not installing into standard locations; the author is working
14145 ;; on a fix.
14146 #:tests? #f
14147 #:phases
14148 (modify-phases %standard-phases
14149 (add-before
14150 'build 'configure
14151 (assoc-ref gnu:%standard-phases 'configure)))))
14152 (home-page
14153 "https://github.com/sagemath/cysignals")
14154 (synopsis
14155 "Handling of interrupts and signals for Cython")
14156 (description
14157 "The cysignals package provides mechanisms to handle interrupts (and
14158 other signals and errors) in Cython code, using two related approaches,
14159 for mixed Cython/Python code or external C libraries and pure Cython code,
14160 respectively.")
14161 (license license:lgpl3+)))
14162
14163 (define-public python2-cysignals
14164 (package-with-python2 python-cysignals))
14165
14166 (define-public python2-shedskin
14167 (package
14168 (name "python2-shedskin")
14169 (version "0.9.4")
14170 (source
14171 (origin
14172 (method url-fetch)
14173 (uri (string-append "https://github.com/shedskin/shedskin/"
14174 "releases/download/v" version
14175 "/shedskin-" version ".tgz"))
14176 (sha256
14177 (base32
14178 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
14179 (build-system python-build-system)
14180 (arguments
14181 `(#:python ,python-2
14182 #:phases (modify-phases %standard-phases
14183 (add-after 'unpack 'fix-resulting-include-libs
14184 (lambda* (#:key inputs #:allow-other-keys)
14185 (let ((libgc (assoc-ref inputs "libgc"))
14186 (pcre (assoc-ref inputs "pcre")))
14187 (substitute* "shedskin/makefile.py"
14188 (("variable == 'CCFLAGS':[ ]*")
14189 (string-append "variable == 'CCFLAGS':\n"
14190 " line += ' -I " pcre "/include"
14191 " -I " libgc "/include'"))
14192 (("variable == 'LFLAGS':[ ]*")
14193 (string-append "variable == 'LFLAGS':\n"
14194 " line += ' -L" pcre "/lib"
14195 " -L " libgc "/lib'")))
14196 #t))))))
14197 (inputs `(("pcre" ,pcre)
14198 ("libgc" ,libgc)))
14199 (home-page "https://shedskin.github.io/")
14200 (synopsis "Experimental Python-2 to C++ Compiler")
14201 (description (string-append "This is an experimental compiler for a subset of
14202 Python. It generates C++ code and a Makefile."))
14203 (license (list license:gpl3 license:bsd-3 license:expat))))
14204
14205 (define-public python-rope
14206 (package
14207 (name "python-rope")
14208 (version "0.19.0")
14209 (source
14210 (origin
14211 (method url-fetch)
14212 (uri (pypi-uri "rope" version))
14213 (sha256
14214 (base32
14215 "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4"))))
14216 (build-system python-build-system)
14217 (home-page "https://github.com/python-rope/rope")
14218 (synopsis "Refactoring library for Python")
14219 (description "Rope is a refactoring library for Python. It facilitates
14220 the renaming, moving and extracting of attributes, functions, modules, fields
14221 and parameters in Python 2 source code. These refactorings can also be applied
14222 to occurrences in strings and comments.")
14223 (license license:lgpl3+)))
14224
14225 (define-public python-py3status
14226 (package
14227 (name "python-py3status")
14228 (version "3.21")
14229 (source
14230 (origin
14231 (method url-fetch)
14232 (uri (pypi-uri "py3status" version))
14233 (sha256
14234 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14235 (build-system python-build-system)
14236 (inputs
14237 `(("file" ,file)))
14238 (arguments
14239 '(#:phases
14240 (modify-phases %standard-phases
14241 ;; 'file' is used for detection of configuration file encoding
14242 ;; let's make link the dependency to particular input
14243 (add-before 'build 'patch-file-path
14244 (lambda* (#:key inputs #:allow-other-keys)
14245 (let ((file-path (assoc-ref inputs "file")))
14246 (substitute* "py3status/parse_config.py"
14247 (("\\[\"file\", \"-b\"")
14248 (string-append "['" file-path "/bin/file', '-b'")))
14249 #t))))
14250 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14251 (home-page "https://github.com/ultrabug/py3status")
14252 (synopsis "Extensible i3status wrapper written in Python")
14253 (description "py3status is an i3status wrapper which extends i3status
14254 functionality in a modular way, allowing you to extend your panel with your
14255 own code, responding to click events and updating clock every second.")
14256 (license license:bsd-3)))
14257
14258 (define-public python-tblib
14259 (package
14260 (name "python-tblib")
14261 (version "1.6.0")
14262 (source (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "tblib" version))
14265 (sha256
14266 (base32
14267 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14268 (build-system python-build-system)
14269 (arguments
14270 `(#:phases
14271 (modify-phases %standard-phases
14272 (replace 'check
14273 (lambda _
14274 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14275 (native-inputs
14276 `(("python-pytest" ,python-pytest)
14277 ("python-six" ,python-six)))
14278 (home-page "https://github.com/ionelmc/python-tblib")
14279 (synopsis "Traceback serialization library")
14280 (description
14281 "Traceback serialization allows you to:
14282
14283 @enumerate
14284 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14285 different processes. This allows better error handling when running code over
14286 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14287
14288 @item Parse traceback strings and raise with the parsed tracebacks.
14289 @end enumerate\n")
14290 (license license:bsd-3)))
14291
14292 (define-public python2-tblib
14293 (package-with-python2 python-tblib))
14294
14295 (define-public python-greenlet
14296 (package
14297 (name "python-greenlet")
14298 (version "1.1.1")
14299 (source (origin
14300 (method url-fetch)
14301 (uri (pypi-uri "greenlet" version))
14302 (sha256
14303 (base32
14304 "10gllbrcbazxck84nr7dw3js3gq0rxrsr4kkvy5hg542rms2gwn0"))))
14305 (build-system python-build-system)
14306 (home-page "https://greenlet.readthedocs.io/")
14307 (synopsis "Lightweight in-process concurrent programming")
14308 (description
14309 "Greenlet package is a spin-off of Stackless, a version of CPython
14310 that supports micro-threads called \"tasklets\". Tasklets run
14311 pseudo-concurrently (typically in a single or a few OS-level threads) and
14312 are synchronized with data exchanges on \"channels\".")
14313 (license (list license:psfl license:expat))))
14314
14315 (define-public python-objgraph
14316 (package
14317 (name "python-objgraph")
14318 (version "3.4.1")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "objgraph" version))
14323 (sha256
14324 (base32
14325 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14326 (build-system python-build-system)
14327 (propagated-inputs
14328 `(("python-graphviz" ,python-graphviz)))
14329 (native-inputs
14330 `(("python-mock" ,python-mock)
14331 ("graphviz" ,graphviz)))
14332 (home-page "https://mg.pov.lt/objgraph/")
14333 (synopsis "Draw Python object reference graphs with graphviz")
14334 (description
14335 "This package provides tools to draw Python object reference graphs with
14336 graphviz.")
14337 (license license:expat)))
14338
14339 (define-public python2-objgraph
14340 (package-with-python2 python-objgraph))
14341
14342 (define-public python-gevent
14343 (package
14344 (name "python-gevent")
14345 (version "21.1.2")
14346 (source (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "gevent" version))
14349 (sha256
14350 (base32
14351 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14352 (modules '((guix build utils)))
14353 (snippet
14354 '(begin
14355 ;; unbunding libev and c-ares
14356 (delete-file-recursively "deps")))))
14357 (build-system python-build-system)
14358 (arguments
14359 `(#:modules ((ice-9 ftw)
14360 (ice-9 match)
14361 (srfi srfi-26)
14362 (guix build utils)
14363 (guix build python-build-system))
14364 #:phases (modify-phases %standard-phases
14365 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14366 (lambda _
14367 (substitute* "src/gevent/subprocess.py"
14368 (("/bin/sh") (which "sh")))
14369 (for-each (lambda (file)
14370 (substitute* file
14371 (("/bin/sh") (which "sh"))
14372 (("/bin/true") (which "true"))))
14373 (find-files "src/greentest" "\\.py$"))))
14374 (add-before 'build 'do-not-use-bundled-sources
14375 (lambda _
14376 (setenv "GEVENTSETUP_EMBED" "0")
14377
14378 ;; Prevent building bundled libev.
14379 (substitute* "setup.py"
14380 (("run_make=_BUILDING")
14381 "run_make=False"))))
14382 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14383 (lambda* (#:key inputs #:allow-other-keys)
14384 (let ((greenlet (string-append
14385 (assoc-ref inputs "python-greenlet")
14386 "/include")))
14387 (match (scandir greenlet
14388 (lambda (item)
14389 (string-prefix? "python" item)))
14390 ((python)
14391 (setenv "C_INCLUDE_PATH"
14392 (string-append greenlet "/" python ":"
14393 (or (getenv "C_INCLUDE_PATH")
14394 ""))))))))
14395 (add-before 'check 'pretend-to-be-CI
14396 (lambda _
14397 ;; A few tests are skipped due to network constraints or
14398 ;; get longer timeouts when running in a CI environment.
14399 ;; Piggy-back on that, as we need the same adjustments.
14400 (setenv "TRAVIS" "1")
14401 (setenv "APPVEYOR" "1")))
14402 (add-before 'check 'adjust-tests
14403 (lambda _
14404 (let ((disabled-tests
14405 '(;; These tests relies on networking which is
14406 ;; not available in the build container.
14407 "test__getaddrinfo_import.py"
14408 "test__server_pywsgi.py"
14409 ;; XXX: These tests borrow functionality from the
14410 ;; Python builtin 'test' module, but it is not
14411 ;; installed with the Guix Python distribution.
14412 "test_smtpd.py"
14413 "test_wsgiref.py"
14414 "test_urllib2.py"
14415 "test_thread.py"
14416 "test_threading.py"
14417 "test__threading_2.py"
14418 ;; These tests rely on KeyboardInterrupts which do not
14419 ;; work inside the build container for some reason
14420 ;; (lack of controlling terminal?).
14421 "test_subprocess.py"
14422 "test__issues461_471.py"
14423 ;; TODO: Patch out the tests that use getprotobyname, etc
14424 ;; instead of disabling all the tests from these files.
14425 "test__resolver_dnspython.py"
14426 "test__doctests.py"
14427 "test__all__.py"
14428 "test___config.py"
14429 "test__execmodules.py")))
14430 (call-with-output-file "skipped_tests.txt"
14431 (lambda (port)
14432 (format port "~a~%"
14433 (string-join disabled-tests "\n")))))))
14434 (replace 'check
14435 (lambda _
14436 ;; Use the build daemons configured number of workers.
14437 (setenv "NWORKERS" (number->string (parallel-job-count)))
14438
14439 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
14440 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
14441 (propagated-inputs
14442 `(("python-greenlet" ,python-greenlet)
14443 ("python-objgraph" ,python-objgraph)
14444 ("python-zope.event" ,python-zope-event)
14445 ("python-zope.interface" ,python-zope-interface)))
14446 (native-inputs
14447 `(("python-six" ,python-six)
14448
14449 ;; For tests.
14450 ("python-dnspython" ,python-dnspython)
14451 ("python-psutil" ,python-psutil)))
14452 (inputs
14453 `(("c-ares" ,c-ares)
14454 ("libev" ,libev)))
14455 (home-page "https://www.gevent.org/")
14456 (synopsis "Coroutine-based network library")
14457 (description
14458 "@code{gevent} is a coroutine-based Python networking library that uses
14459 @code{greenlet} to provide a high-level synchronous API on top of the
14460 @code{libev} event loop.")
14461 (license license:expat)))
14462
14463 (define-public python-fastimport
14464 (package
14465 (name "python-fastimport")
14466 (version "0.9.9")
14467 (source
14468 (origin
14469 (method url-fetch)
14470 (uri (pypi-uri "fastimport" version))
14471 (sha256
14472 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
14473 (build-system python-build-system)
14474 (home-page "https://github.com/jelmer/python-fastimport")
14475 (synopsis "VCS fastimport parser and generator in Python")
14476 (description "This package provides a parser for and generator of the Git
14477 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
14478 format.")
14479 (license license:gpl2+)))
14480
14481 (define-public python-twisted
14482 (package
14483 (name "python-twisted")
14484 (version "19.7.0")
14485 (source (origin
14486 (method url-fetch)
14487 (uri (pypi-uri "Twisted" version ".tar.bz2"))
14488 (sha256
14489 (base32
14490 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
14491 (build-system python-build-system)
14492 (arguments
14493 '(#:tests? #f ; FIXME: some tests fail
14494 #:phases
14495 (modify-phases %standard-phases
14496 ;; Remove scripts, because they depend on [conch]
14497 (add-after 'unpack 'remove-entrypoint
14498 (lambda _
14499 (substitute* "src/twisted/python/_setup.py"
14500 (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
14501 (propagated-inputs
14502 `(("python-zope-interface" ,python-zope-interface)
14503 ("python-pyhamcrest" ,python-pyhamcrest)
14504 ("python-incremental" ,python-incremental)
14505 ("python-hyperlink" ,python-hyperlink)
14506 ("python-constantly" ,python-constantly)
14507 ("python-automat" ,python-automat)))
14508 (home-page "https://twistedmatrix.com/")
14509 (synopsis "Asynchronous networking framework written in Python")
14510 (description
14511 "Twisted is an extensible framework for Python programming, with special
14512 focus on event-based network programming and multiprotocol integration.")
14513 (license license:expat)))
14514
14515 (define-public python2-twisted
14516 (package-with-python2 python-twisted))
14517
14518 (define-public python-pika
14519 (package
14520 (name "python-pika")
14521 (version "1.2.0")
14522 (source
14523 (origin
14524 (method git-fetch)
14525 (uri (git-reference
14526 (url "https://github.com/pika/pika")
14527 (commit version)))
14528 (file-name (git-file-name name version))
14529 (sha256
14530 (base32
14531 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
14532 (build-system python-build-system)
14533 (arguments
14534 '(#:phases (modify-phases %standard-phases
14535 (add-before 'check 'disable-live-tests
14536 (lambda _
14537 ;; Disable tests that require RabbitMQ, which is not
14538 ;; yet available in Guix.
14539 (substitute* "setup.cfg"
14540 (("tests/unit,tests/acceptance")
14541 "tests/unit"))
14542 (with-directory-excursion "tests"
14543 (for-each delete-file
14544 '("unit/base_connection_tests.py"
14545 "unit/threaded_test_wrapper_test.py")))))
14546 (replace 'check
14547 (lambda _
14548 (invoke "nosetests"))))))
14549 (native-inputs
14550 `(("python-mock" ,python-mock)
14551 ("python-nose" ,python-nose)
14552
14553 ;; These are optional at runtime, and provided here for tests.
14554 ("python-gevent" ,python-gevent)
14555 ("python-tornado" ,python-tornado)
14556 ("python-twisted" ,python-twisted)))
14557 (home-page "https://pika.readthedocs.org")
14558 (synopsis "Pure Python AMQP Client Library")
14559 (description
14560 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
14561 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
14562 network support library.")
14563 (license license:bsd-3)))
14564
14565 (define-public python-ply
14566 (package
14567 (name "python-ply")
14568 (version "3.11")
14569 (source
14570 (origin
14571 (method url-fetch)
14572 (uri (pypi-uri "ply" version))
14573 (sha256
14574 (base32
14575 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
14576 (build-system python-build-system)
14577 (home-page "http://www.dabeaz.com/ply/")
14578 (synopsis "Python Lex & Yacc")
14579 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
14580 It uses LR parsing and does extensive error checking.")
14581 (license license:bsd-3)))
14582
14583 (define-public python-tabulate
14584 (package
14585 (name "python-tabulate")
14586 (version "0.8.9")
14587 (source (origin
14588 (method url-fetch)
14589 (uri (pypi-uri "tabulate" version))
14590 (sha256
14591 (base32
14592 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
14593 (build-system python-build-system)
14594 (arguments
14595 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
14596 ;; and the latest release is not tagged in the upstream repository.
14597 '(#:tests? #f))
14598 (home-page "https://bitbucket.org/astanin/python-tabulate")
14599 (synopsis "Pretty-print tabular data")
14600 (description
14601 "Tabulate is a library and command-line utility to pretty-print tabular
14602 data in Python.")
14603 (license license:expat)))
14604
14605 (define-public python2-tabulate
14606 (package-with-python2 python-tabulate))
14607
14608 (define-public python-kazoo
14609 (package
14610 (name "python-kazoo")
14611 (version "2.4.0")
14612 (source
14613 (origin
14614 (method url-fetch)
14615 (uri (pypi-uri "kazoo" version))
14616 (sha256
14617 (base32
14618 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
14619 (build-system python-build-system)
14620 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
14621 (propagated-inputs
14622 `(("python-six" ,python-six)))
14623 (home-page "https://kazoo.readthedocs.org")
14624 (synopsis "High-level Zookeeper client library")
14625 (description
14626 "Kazoo is a Python client library for the Apache Zookeeper distributed
14627 application service. It is designed to be easy to use and to avoid common
14628 programming errors.")
14629 (license license:asl2.0)))
14630
14631 (define-public python2-kazoo
14632 (package-with-python2 python-kazoo))
14633
14634 (define-public python-pykafka
14635 (package
14636 (name "python-pykafka")
14637 (version "2.4.0")
14638 (source (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "pykafka" version))
14641 (sha256
14642 (base32
14643 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
14644 (build-system python-build-system)
14645 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
14646 (propagated-inputs
14647 `(("python-gevent" ,python-gevent)
14648 ("python-kazoo" ,python-kazoo)
14649 ("python-tabulate" ,python-tabulate)))
14650 (inputs
14651 `(("librdkafka" ,librdkafka)))
14652 (home-page "https://pykafka.readthedocs.io/")
14653 (synopsis "Apache Kafka client for Python")
14654 (description
14655 "PyKafka is a client for the Apache Kafka distributed messaging system.
14656 It includes Python implementations of Kafka producers and consumers, which
14657 are optionally backed by a C extension built on librdkafka.")
14658 (license license:asl2.0)))
14659
14660 (define-public python-wcwidth
14661 (package
14662 (name "python-wcwidth")
14663 (version "0.1.8")
14664 (source (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "wcwidth" version))
14667 (sha256
14668 (base32
14669 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
14670 (build-system python-build-system)
14671 (home-page "https://github.com/jquast/wcwidth")
14672 (synopsis "Measure number of terminal column cells of wide-character codes")
14673 (description "Wcwidth measures the number of terminal column cells of
14674 wide-character codes. It is useful for those implementing a terminal emulator,
14675 or programs that carefully produce output to be interpreted by one. It is a
14676 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
14677 specified in POSIX.1-2001 and POSIX.1-2008.")
14678 (license license:expat)))
14679
14680 (define-public python2-wcwidth
14681 (package-with-python2 python-wcwidth))
14682
14683 (define-public python2-jsonrpclib
14684 (package
14685 (name "python2-jsonrpclib")
14686 (version "0.1.7")
14687 (source (origin
14688 (method url-fetch)
14689 (uri (pypi-uri "jsonrpclib" version))
14690 (sha256
14691 (base32
14692 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
14693 (build-system python-build-system)
14694 (arguments
14695 `(#:tests? #f
14696 #:python ,python-2))
14697 (home-page "https://github.com/joshmarshall/jsonrpclib/")
14698 (synopsis "Implementation of JSON-RPC specification for Python")
14699 (description
14700 "This library is an implementation of the JSON-RPC specification.
14701 It supports both the original 1.0 specification, as well as the
14702 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
14703 etc.")
14704 (license license:asl2.0)))
14705
14706 (define-public python-chai
14707 (package
14708 (name "python-chai")
14709 (version "1.1.2")
14710 (source (origin
14711 (method url-fetch)
14712 (uri (pypi-uri "chai" version))
14713 (sha256
14714 (base32
14715 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
14716 (patches (search-patches "python-chai-drop-python2.patch"))))
14717 (build-system python-build-system)
14718 (home-page "https://github.com/agoragames/chai")
14719 (synopsis "Mocking framework for Python")
14720 (description
14721 "Chai provides an api for mocking, stubbing and spying your python
14722 objects, patterned after the Mocha library for Ruby.")
14723 (license license:bsd-3)))
14724
14725 (define-public python-inflection
14726 (package
14727 (name "python-inflection")
14728 (version "0.3.1")
14729 (source
14730 (origin (method url-fetch)
14731 (uri (pypi-uri "inflection" version))
14732 (sha256
14733 (base32
14734 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
14735 (build-system python-build-system)
14736 (native-inputs
14737 `(("python-pytest" ,python-pytest)))
14738 (home-page "https://github.com/jpvanhal/inflection")
14739 (synopsis "Python string transformation library")
14740 (description
14741 "Inflection is a string transformation library. It singularizes
14742 and pluralizes English words, and transforms strings from CamelCase to
14743 underscored string.")
14744 (license license:expat)))
14745
14746 (define-public python2-inflection
14747 (package-with-python2 python-inflection))
14748
14749 (define-public python-pylev
14750 (package
14751 (name "python-pylev")
14752 (version "1.3.0")
14753 (source (origin
14754 (method url-fetch)
14755 (uri (pypi-uri "pylev" version))
14756 (sha256
14757 (base32
14758 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
14759 (build-system python-build-system)
14760 (home-page "https://github.com/toastdriven/pylev")
14761 (synopsis "Levenshtein distance implementation in Python")
14762 (description "Pure Python Levenshtein implementation, based off the
14763 Wikipedia code samples at
14764 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
14765 (license license:bsd-3)))
14766
14767 (define-public python2-pylev
14768 (package-with-python2 python-pylev))
14769
14770 (define-public python-cleo
14771 (package
14772 (name "python-cleo")
14773 (version "0.8.1")
14774 (source (origin
14775 (method url-fetch)
14776 (uri (pypi-uri "cleo" version))
14777 (sha256
14778 (base32
14779 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
14780 (build-system python-build-system)
14781 (native-inputs
14782 `( ;; For testing
14783 ("python-mock" ,python-mock)
14784 ("python-pytest-mock" ,python-pytest-mock)
14785 ("python-pytest" ,python-pytest)))
14786 (propagated-inputs
14787 `(("python-backpack" ,python-backpack)
14788 ("python-clikit" ,python-clikit)
14789 ("python-pastel" ,python-pastel)
14790 ("python-pylev" ,python-pylev)))
14791 (home-page "https://github.com/sdispater/cleo")
14792 (synopsis "Command-line arguments library for Python")
14793 (description
14794 "Cleo allows you to create command-line commands with signature in
14795 docstring and colored output.")
14796 (license license:expat)))
14797
14798 (define-public python2-cleo
14799 (package-with-python2 python-cleo))
14800
14801 (define-public python-tomlkit
14802 (package
14803 (name "python-tomlkit")
14804 (version "0.7.0")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "tomlkit" version))
14809 (sha256
14810 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
14811 (build-system python-build-system)
14812 (native-inputs
14813 `(("python-pytest" ,python-pytest)
14814 ("python-pyyaml" ,python-pyyaml)))
14815 (home-page "https://github.com/sdispater/tomlkit")
14816 (synopsis "Style-preserving TOML library")
14817 (description
14818 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
14819 preserves all comments, indentations, whitespace and internal element ordering,
14820 and makes them accessible and editable via an intuitive API. It can also
14821 create new TOML documents from scratch using the provided helpers. Part of the
14822 implementation has been adapted, improved, and fixed from Molten.")
14823 (license license:expat)))
14824
14825 (define-public python-shellingham
14826 (package
14827 (name "python-shellingham")
14828 (version "1.3.2")
14829 (source
14830 (origin
14831 (method url-fetch)
14832 (uri (pypi-uri "shellingham" version))
14833 (sha256
14834 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
14835 (build-system python-build-system)
14836 (arguments
14837 `(#:phases
14838 (modify-phases %standard-phases
14839 (add-after 'unpack 'restore-setup.py
14840 ;; setup.py will return in the next release.
14841 ;; <https://github.com/sarugaku/shellingham/issues/33>
14842 (lambda _
14843 (with-output-to-file "setup.py"
14844 (lambda _
14845 (display "from setuptools import setup\nsetup()\n")))
14846 #t)))))
14847 (home-page "https://github.com/sarugaku/shellingham")
14848 (synopsis "Tool to detect surrounding shell")
14849 (description
14850 "Shellingham detects what shell the current Python executable is
14851 running in.")
14852 (license license:isc)))
14853
14854 (define-public python-memcached
14855 (package
14856 (name "python-memcached")
14857 (version "1.59")
14858 (source
14859 (origin
14860 (method url-fetch)
14861 (uri (pypi-uri "python-memcached" version))
14862 (sha256
14863 (base32
14864 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
14865 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
14866 (build-system python-build-system)
14867 (propagated-inputs `(("python-six" ,python-six)))
14868 (home-page
14869 "https://github.com/linsomniac/python-memcached")
14870 (synopsis "Pure python memcached client")
14871 (description
14872 "This software is a pure Python interface to the memcached memory cache
14873 daemon. It is the client side software which allows storing values in one or
14874 more, possibly remote, memcached servers.")
14875 (license license:psfl)))
14876
14877 (define-public python-clikit
14878 (package
14879 (name "python-clikit")
14880 (version "0.6.2")
14881 (source
14882 (origin
14883 (method url-fetch)
14884 (uri (pypi-uri "clikit" version))
14885 (sha256
14886 (base32
14887 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
14888 (build-system python-build-system)
14889 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
14890 (propagated-inputs
14891 `(("python-crashtest" ,python-crashtest)
14892 ("python-pastel" ,python-pastel)
14893 ("python-pylev" ,python-pylev)))
14894 (home-page "https://github.com/sdispater/clikit")
14895 (synopsis "Group of utilities to build command line interfaces")
14896 (description
14897 "CliKit is a group of utilities to build testable command line
14898 interfaces.")
14899 (properties `((python2-variant . ,(delay python2-clikit))))
14900 (license license:expat)))
14901
14902 (define-public python2-clikit
14903 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
14904 (package/inherit
14905 base
14906 (propagated-inputs
14907 `(("python-enum34" ,python2-enum34)
14908 ("python-typing" ,python2-typing)
14909 ,@(package-propagated-inputs base))))))
14910
14911 (define-public python-msgpack-python
14912 (package
14913 (name "python-msgpack-python")
14914 (version "0.5.6")
14915 (source
14916 (origin
14917 (method url-fetch)
14918 (uri (pypi-uri "msgpack-python" version))
14919 (sha256
14920 (base32
14921 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
14922 (build-system python-build-system)
14923 (home-page "https://msgpack.org/")
14924 (synopsis "Package to deserialize messages in MessagePack binary format")
14925 (description
14926 "MessagePack is an efficient binary serialization format. It lets you
14927 exchange data among multiple languages like JSON. But it's faster and
14928 smaller. Small integers are encoded into a single byte, and typical short
14929 strings require only one extra byte in addition to the strings themselves.")
14930 (license license:asl2.0)))
14931
14932 (define-public python-cachy
14933 (package
14934 (name "python-cachy")
14935 (version "0.3.0")
14936 (source
14937 (origin
14938 (method url-fetch)
14939 (uri (pypi-uri "cachy" version))
14940 (sha256
14941 (base32
14942 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
14943 (build-system python-build-system)
14944 (arguments
14945 '(#:phases
14946 (modify-phases %standard-phases
14947 (replace 'check
14948 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
14949 "pytest"))))))
14950 (native-inputs
14951 `(("memcached" ,memcached)
14952 ("python-fakeredis" ,python-fakeredis)
14953 ("python-flexmock" ,python-flexmock)
14954 ("python-pifpaf" ,python-pifpaf)
14955 ("python-pytest" ,python-pytest)))
14956 (propagated-inputs
14957 `(("python-memcached" ,python-memcached)
14958 ("python-msgpack-python" ,python-msgpack-python)
14959 ("python-redis" ,python-redis)))
14960 (home-page "https://github.com/sdispater/cachy")
14961 (synopsis "Simple yet effective caching library")
14962 (description
14963 "Cachy provides a simple yet effective caching library. A simple but
14964 powerful API: thread-safety; decorator syntax; support for memcached, redis,
14965 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
14966 (license license:expat)))
14967
14968 (define-public poetry
14969 (package
14970 (name "poetry")
14971 (version "1.1.5")
14972 ;; Poetry can only be built from source with Poetry.
14973 (source
14974 (origin
14975 (method url-fetch)
14976 (uri (pypi-uri "poetry" version))
14977 (sha256
14978 (base32
14979 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
14980 (build-system python-build-system)
14981 (arguments
14982 `(#:tests? #f ;; Pypi does not have tests.
14983 #:phases
14984 (modify-phases %standard-phases
14985 (add-before 'build 'patch-setup-py
14986 (lambda _
14987 (substitute* "setup.py"
14988 ;; Allow newer versions of python-keyring.
14989 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
14990 ;; TODO: remove after the next release cycle,
14991 ;; when packaging has been updated.
14992 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
14993 #t)))))
14994 (propagated-inputs
14995 `(("python-cachecontrol" ,python-cachecontrol)
14996 ("python-cachy" ,python-cachy)
14997 ("python-cleo" ,python-cleo)
14998 ("python-clikit" ,python-clikit)
14999 ("python-html5lib" ,python-html5lib)
15000 ("python-keyring" ,python-keyring)
15001 ("python-msgpack-transitional" ,python-msgpack-transitional)
15002 ("python-packaging" ,python-packaging)
15003 ("python-pexpect" ,python-pexpect)
15004 ("python-pip" ,python-pip)
15005 ("python-pkginfo" ,python-pkginfo)
15006 ("python-poetry-core" ,python-poetry-core)
15007 ("python-requests" ,python-requests)
15008 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
15009 ("python-shellingham" ,python-shellingham)
15010 ("python-tomlkit" ,python-tomlkit)
15011 ("python-virtualenv" ,python-virtualenv)))
15012 (home-page "https://python-poetry.org")
15013 (synopsis "Python dependency management and packaging made easy")
15014 (description "Poetry is a tool for dependency management and packaging
15015 in Python. It allows you to declare the libraries your project depends on and
15016 it will manage (install/update) them for you.")
15017 (license license:expat)))
15018
15019 (define-public python-lark-parser
15020 (package
15021 (name "python-lark-parser")
15022 (version "0.9.0")
15023 (source (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "lark-parser" version))
15026 (sha256
15027 (base32
15028 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
15029 (build-system python-build-system)
15030 (home-page "https://github.com/lark-parser/lark")
15031 (synopsis "Multi-language parser for Python")
15032 (description
15033 "Lark is a parser built with a focus on ergonomics, performance and
15034 resilience. Lark can parse all context-free languages. That means it is
15035 capable of parsing almost any programming language out there, and to
15036 some degree most natural languages too.")
15037 (license license:expat)))
15038
15039 (define-public python-libcst
15040 (package
15041 (name "python-libcst")
15042 (version "0.3.8")
15043 (source (origin
15044 (method url-fetch)
15045 (uri (pypi-uri "libcst" version))
15046 (sha256
15047 (base32
15048 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
15049 (build-system python-build-system)
15050 (arguments
15051 `(#:phases
15052 (modify-phases %standard-phases
15053 (add-after 'unpack 'remove-failing-tests
15054 (lambda _
15055 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
15056 (delete-file "libcst/tests/test_fuzz.py")
15057 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
15058 (delete-file "libcst/tests/test_pyre_integration.py")
15059 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
15060 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
15061 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
15062 (add-before 'check 'generate-test-data
15063 (lambda _
15064 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
15065 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
15066 (replace 'check
15067 (lambda* (#:key tests? #:allow-other-keys)
15068 (when tests?
15069 (invoke "python" "-m" "unittest")))))))
15070 (native-inputs
15071 `(("python-black" ,python-black)
15072 ("python-isort" ,python-isort)))
15073 (propagated-inputs
15074 `(("python-typing-extensions" ,python-typing-extensions)
15075 ("python-typing-inspect" ,python-typing-inspect)
15076 ("python-pyyaml" ,python-pyyaml)))
15077 (home-page "https://github.com/Instagram/LibCST")
15078 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
15079 (description
15080 "LibCST parses Python source code as a CST tree that keeps all
15081 formatting details (comments, whitespaces, parentheses, etc). It's useful
15082 for building automated refactoring (codemod) applications and linters.
15083 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
15084 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
15085 naming node types and fields, LibCST creates a lossless CST that looks and
15086 feels like an AST.")
15087 (license (list license:expat
15088 ;; Some files unde libcst/_parser/ are under Python Software
15089 ;; Foundation license (see LICENSE file for details)
15090 license:psfl
15091 ;; libcst/_add_slots.py
15092 license:asl2.0))))
15093
15094 (define-public python-libcst-minimal
15095 (hidden-package
15096 (package
15097 (inherit python-libcst)
15098 (name "python-libcst-minimal")
15099 (arguments '(#:tests? #f))
15100 (native-inputs '()))))
15101
15102 (define-public python-typing-inspect
15103 (package
15104 (name "python-typing-inspect")
15105 (version "0.6.0")
15106 (source (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "typing_inspect" version))
15109 (sha256
15110 (base32
15111 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
15112 (patches (search-patches "python-typing-inspect-fix.patch"))))
15113 (build-system python-build-system)
15114 (propagated-inputs
15115 `(("python-mypy-extensions" ,python-mypy-extensions)
15116 ("python-typing-extensions" ,python-typing-extensions)))
15117 (home-page "https://github.com/ilevkivskyi/typing_inspect")
15118 (synopsis "API for inspection of types in the Python @code{typing} module")
15119 (description
15120 "The @code{typing_inspect} module defines experimental API for runtime
15121 inspection of types defined in the Python standard typing module.")
15122 (license license:expat)))
15123
15124 (define-public python-lazy-object-proxy
15125 (package
15126 (name "python-lazy-object-proxy")
15127 (version "1.5.1")
15128 (source (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "lazy-object-proxy" version))
15131 (sha256
15132 (base32
15133 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
15134 (native-inputs
15135 `(("python-setuptools-scm" ,python-setuptools-scm)))
15136 (build-system python-build-system)
15137 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
15138 (synopsis "Lazy object proxy for python")
15139 (description
15140 "Lazy object proxy is an object that wraps a callable but defers the call
15141 until the object is actually required, and caches the result of said call.")
15142 (license license:bsd-2)))
15143
15144 (define-public python2-lazy-object-proxy
15145 (package-with-python2 python-lazy-object-proxy))
15146
15147 (define-public python-dnspython
15148 (package
15149 (name "python-dnspython")
15150 (version "2.1.0")
15151 (source (origin
15152 (method url-fetch)
15153 (uri (pypi-uri "dnspython" version ".zip"))
15154 (sha256
15155 (base32
15156 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15157 (build-system python-build-system)
15158 (native-inputs `(("unzip" ,unzip)))
15159 (arguments '(#:tests? #f)) ; XXX: requires internet access
15160 (home-page "https://www.dnspython.org")
15161 (synopsis "DNS toolkit for Python")
15162 (description
15163 "dnspython is a DNS toolkit for Python. It supports almost all record
15164 types. It can be used for queries, zone transfers, and dynamic updates.
15165 It supports TSIG authenticated messages and EDNS0.")
15166 (license license:expat)))
15167
15168 (define-public python-dnspython-1.16
15169 (package
15170 (inherit python-dnspython)
15171 (version "1.16.0")
15172 (source (origin
15173 (method url-fetch)
15174 (uri (string-append "http://www.dnspython.org/kits/"
15175 version "/dnspython-" version ".tar.gz"))
15176 (sha256
15177 (base32
15178 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15179 (native-inputs '())))
15180
15181 (define-public python2-dnspython-1.16
15182 (package-with-python2 python-dnspython-1.16))
15183
15184 (define-public python-py3dns
15185 (package
15186 (name "python-py3dns")
15187 (version "3.2.1")
15188 (source
15189 (origin
15190 (method url-fetch)
15191 (uri (pypi-uri "py3dns" version))
15192 (sha256
15193 (base32
15194 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15195 (build-system python-build-system)
15196 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15197 ;; removing functionality so we copy from Nix and "just don't build it".
15198 (arguments
15199 `(#:phases
15200 (modify-phases %standard-phases
15201 (add-after 'unpack 'patch-source
15202 (lambda _
15203 (substitute* "setup.py"
15204 (("import DNS") "")
15205 (("DNS.__version__") (string-append "\"" ,version "\"")))
15206 #t)))
15207 #:tests? #f)) ; Also skip the tests.
15208 (home-page "https://launchpad.net/py3dns")
15209 (synopsis "Python 3 DNS library")
15210 (description "This Python 3 module provides a DNS API for looking up DNS
15211 entries from within Python 3 modules and applications. This module is a
15212 simple, lightweight implementation.")
15213 (license license:psfl)))
15214
15215 (define-public python-email-validator
15216 (package
15217 (name "python-email-validator")
15218 (version "1.0.2")
15219 (source
15220 (origin (method url-fetch)
15221 (uri (pypi-uri "email_validator" version))
15222 (sha256
15223 (base32
15224 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15225 (build-system python-build-system)
15226 (arguments
15227 '(#:phases
15228 (modify-phases %standard-phases
15229 (add-before 'build 'use-dnspython
15230 (lambda _
15231 (substitute* "setup.py"
15232 (("dnspython3") "dnspython"))
15233 #t)))))
15234 (propagated-inputs
15235 `(("python-dnspython" ,python-dnspython)
15236 ("python-idna" ,python-idna)))
15237 (home-page "https://github.com/JoshData/python-email-validator")
15238 (synopsis "Email address validation library for Python")
15239 (description
15240 "This library validates email address syntax and deliverability.")
15241 (license license:cc0)))
15242
15243 (define-public python2-email-validator
15244 (package-with-python2 python-email-validator))
15245
15246 (define-public python-ukpostcodeparser
15247 (package
15248 (name "python-ukpostcodeparser")
15249 (version "1.0.3")
15250 (source (origin
15251 (method url-fetch)
15252 (uri (pypi-uri "UkPostcodeParser" version))
15253 (sha256
15254 (base32
15255 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
15256 (build-system python-build-system)
15257 (home-page "https://github.com/hamstah/ukpostcodeparser")
15258 (synopsis "UK Postcode parser for Python")
15259 (description
15260 "This library provides the @code{parse_uk_postcode} function for
15261 parsing UK postcodes.")
15262 (license license:expat)))
15263
15264 (define-public python2-ukpostcodeparser
15265 (package-with-python2 python-ukpostcodeparser))
15266
15267 (define-public python-faker
15268 (package
15269 (name "python-faker")
15270 (version "8.12.1")
15271 (source (origin
15272 (method url-fetch)
15273 (uri (pypi-uri "Faker" version))
15274 (sha256
15275 (base32
15276 "1f95g8adzdh97cbfq7j3482iy4yskbahhjma2cm2mrhrdmi5j241"))))
15277 (build-system python-build-system)
15278 (arguments
15279 '(#:phases
15280 (modify-phases %standard-phases
15281 (replace 'check
15282 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15283 (native-inputs
15284 `(;; For testing
15285 ("python-freezegun" ,python-freezegun)
15286 ("python-pytest" ,python-pytest)
15287 ("python-random2" ,python-random2)
15288 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15289 ("python-validators" ,python-validators)))
15290 (propagated-inputs
15291 `(("python-dateutil" ,python-dateutil)
15292 ("python-text-unidecode" ,python-text-unidecode)))
15293 (home-page "https://github.com/joke2k/faker")
15294 (synopsis "Python package that generates fake data")
15295 (description
15296 "Faker is a Python package that generates fake data such as names,
15297 addresses, and phone numbers.")
15298 (license license:expat)
15299 (properties `((python2-variant . ,(delay python2-faker))))))
15300
15301 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15302 (define-public python2-faker
15303 (let ((base (package-with-python2 (strip-python2-variant
15304 python-faker))))
15305 (package
15306 (inherit base)
15307 (version "3.0.1")
15308 (source (origin
15309 (method url-fetch)
15310 (uri (pypi-uri "Faker" version))
15311 (sha256
15312 (base32
15313 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15314 (native-inputs
15315 `(("python-mock" ,python2-mock)
15316 ,@(package-native-inputs base)))
15317 (propagated-inputs
15318 `(("python2-ipaddress" ,python2-ipaddress)
15319 ("python2-six" ,python2-six)
15320 ,@(package-propagated-inputs base))))))
15321
15322 (define-public python-pyaml
15323 (package
15324 (name "python-pyaml")
15325 (version "18.11.0")
15326 (source (origin
15327 (method url-fetch)
15328 (uri (pypi-uri "pyaml" version))
15329 (sha256
15330 (base32
15331 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15332 (build-system python-build-system)
15333 (native-inputs
15334 `(("python-unidecode" ,python-unidecode)))
15335 (propagated-inputs
15336 `(("python-pyyaml" ,python-pyyaml)))
15337 (home-page "https://github.com/mk-fg/pretty-yaml")
15338 (synopsis "YAML pretty-print library for Python")
15339 (description
15340 "pyaml is a PyYAML based python module to produce pretty and readable
15341 YAML-serialized data.")
15342 (license license:wtfpl2)))
15343
15344 (define-public python2-pyaml
15345 (package-with-python2 python-pyaml))
15346
15347 (define-public python-backpack
15348 (package
15349 (name "python-backpack")
15350 (version "0.1")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (pypi-uri "backpack" version))
15355 (sha256
15356 (base32
15357 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15358 (build-system python-build-system)
15359 (native-inputs
15360 `(("python-pytest" ,python-pytest)
15361 ("python-nose" ,python-nose)
15362 ("python-toml" ,python-toml)))
15363 (propagated-inputs
15364 `(("python-simplejson" ,python-simplejson)))
15365 (home-page "https://github.com/sdispater/backpack")
15366 (synopsis "Utilities for working with Python collections")
15367 (description "Backpack provides some useful utilities for working with
15368 collections of data.")
15369 (license license:expat)))
15370
15371 (define-public python2-backpack
15372 (package-with-python2 python-backpack))
15373
15374 (define-public python-prompt-toolkit
15375 (package
15376 (name "python-prompt-toolkit")
15377 (version "3.0.18")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "prompt_toolkit" version))
15382 (sha256
15383 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15384 (build-system python-build-system)
15385 (arguments
15386 `(#:phases
15387 (modify-phases %standard-phases
15388 (delete 'check)
15389 (add-after 'install 'post-install-check
15390 (lambda* (#:key inputs outputs #:allow-other-keys)
15391 ;; HOME is needed for the test
15392 ;; "test_pathcompleter_can_expanduser".
15393 (setenv "HOME" "/tmp")
15394 (add-installed-pythonpath inputs outputs)
15395 (invoke "py.test"))))))
15396 (propagated-inputs
15397 `(("python-wcwidth" ,python-wcwidth)))
15398 (native-inputs
15399 `(("python-pytest" ,python-pytest)))
15400 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
15401 (synopsis "Library for building command line interfaces in Python")
15402 (description
15403 "Prompt-Toolkit is a library for building interactive command line
15404 interfaces in Python. It's like GNU Readline but it also features syntax
15405 highlighting while typing, out-of-the-box multi-line input editing, advanced
15406 code completion, incremental search, support for Chinese double-width
15407 characters, mouse support, and auto suggestions.")
15408 (license license:bsd-3)
15409 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
15410
15411 (define-public python-prompt-toolkit-2
15412 (package (inherit python-prompt-toolkit)
15413 (name "python-prompt-toolkit")
15414 (version "2.0.7")
15415 (source
15416 (origin
15417 (method url-fetch)
15418 (uri (pypi-uri "prompt_toolkit" version))
15419 (sha256
15420 (base32
15421 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
15422 (propagated-inputs
15423 `(("python-wcwidth" ,python-wcwidth)
15424 ("python-six" ,python-six)
15425 ("python-pygments" ,python-pygments)))
15426 (properties '())))
15427
15428 (define-public python2-prompt-toolkit
15429 (package-with-python2 python-prompt-toolkit-2))
15430
15431 (define-public python-prompt-toolkit-1
15432 (package (inherit python-prompt-toolkit-2)
15433 (version "1.0.15")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
15438 (sha256
15439 (base32
15440 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
15441
15442 (define-public python2-prompt-toolkit-1
15443 (package-with-python2 python-prompt-toolkit-1))
15444
15445 (define-public python-jedi
15446 ;; The 0.18.0 release tests do not work with Python 3.9.6. Use a more
15447 ;; recent commit.
15448 (let ((commit "1d944943c311b2d71655432f8870d68b2cf7d44b")
15449 (revision "1"))
15450 (package
15451 (name "python-jedi")
15452 (version
15453 (git-version "0.18.0" revision commit))
15454 (source
15455 (origin
15456 (method git-fetch)
15457 (uri (git-reference
15458 (url "https://github.com/davidhalter/jedi")
15459 (commit commit)))
15460 (file-name (git-file-name name version))
15461 (sha256
15462 (base32
15463 "052szkbv2pf9hy21any6zb4dhx3c5w1v6b9hn5grlc84zfm350vq"))))
15464 (build-system python-build-system)
15465 (arguments
15466 `(#:phases
15467 (modify-phases %standard-phases
15468 (add-after 'unpack 'unpack-submodule-sources
15469 (lambda* (#:key inputs #:allow-other-keys)
15470 (copy-recursively (assoc-ref inputs "python-django-stubs")
15471 "jedi/third_party/django-stubs")
15472 (copy-recursively (assoc-ref inputs "python-typeshed")
15473 "jedi/third_party/typeshed")
15474 #t))
15475 (replace 'check
15476 (lambda* (#:key tests? #:allow-other-keys)
15477 (when tests?
15478 (setenv "HOME" "/tmp")
15479 ;; Disable the pytest tests that fail with pytest 6. See:
15480 ;; https://github.com/davidhalter/jedi/issues/1660.
15481 (invoke "pytest" "-vv" "-k"
15482 "not test_completion[pytest"))
15483 #t)))))
15484 (native-inputs
15485 `(("python-pytest" ,python-pytest)
15486 ("python-docopt" ,python-docopt)
15487 ("python-django-stubs"
15488 ,(origin
15489 (method git-fetch)
15490 (uri (git-reference
15491 (url "https://github.com/davidhalter/django-stubs")
15492 (commit "3d2534ea8d8300c4c9db8f18e300355d5fd5488b")))
15493 (file-name "django-stubs-checkout")
15494 (sha256
15495 (base32 "1fpvn4lcqkd2q18z29rcnwakm649fccw2k6jik5d64j7p6xns08r"))))
15496 ("python-typeshed"
15497 ,(origin
15498 (method git-fetch)
15499 (uri (git-reference
15500 (url "https://github.com/davidhalter/typeshed")
15501 (commit "ae9d4f4b21bb5e1239816c301da7b1ea904b44c3")))
15502 (file-name "typeshed-checkout")
15503 (sha256
15504 (base32 "02xdip4amj0a7z9xph2mj46x1k55bjxl8d0gkpy25575acyx1kjq"))))))
15505 (propagated-inputs
15506 `(("python-parso" ,python-parso)))
15507 (home-page "https://github.com/davidhalter/jedi")
15508 (synopsis "Autocompletion and static analysis library for Python")
15509 (description
15510 "Jedi is a static analysis tool for Python that can be used in Integrated
15511 Development Environments (@dfn{IDE}s) and text editors. It understands Python
15512 on a deeper level than many other static analysis frameworks for Python.
15513
15514 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
15515 well.")
15516 (license license:expat))))
15517
15518 (define-public python2-jedi
15519 (package-with-python2 python-jedi))
15520
15521 (define-public ptpython
15522 (package
15523 (name "ptpython")
15524 (version "3.0.17")
15525 (source (origin
15526 (method url-fetch)
15527 (uri (pypi-uri "ptpython" version))
15528 (sha256
15529 (base32
15530 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
15531 (build-system python-build-system)
15532 (arguments
15533 `(#:tests? #f)) ;there are no tests
15534 (propagated-inputs
15535 `(("python-appdirs" ,python-appdirs)
15536 ("python-black" ,python-black)
15537 ("python-jedi" ,python-jedi)
15538 ("python-prompt-toolkit" ,python-prompt-toolkit)
15539 ("python-pygments" ,python-pygments)))
15540 (home-page "https://github.com/jonathanslenders/ptpython")
15541 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
15542 (description
15543 "ptpython is a Python read-eval-print loop with IDE-like features.
15544 It supports syntax highlighting, multiline editing, autocompletion, mouse,
15545 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
15546 etc.")
15547 (license license:bsd-3)
15548 (properties `((python2-variant . ,(delay ptpython-2))))))
15549
15550 (define-public ptpython-2
15551 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
15552 (package/inherit base
15553 (name "ptpython2"))))
15554
15555 (define-public python-easyprocess
15556 (package
15557 (name "python-easyprocess")
15558 (version "0.3")
15559 (source
15560 (origin
15561 (method url-fetch)
15562 (uri (pypi-uri "EasyProcess" version))
15563 (sha256
15564 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
15565 (build-system python-build-system)
15566 (arguments
15567 ;; Tests require pyvirtualdisplay, which requires this package.
15568 `(#:tests? #f))
15569 (home-page "https://github.com/ponty/easyprocess")
15570 (synopsis "Python subprocess interface")
15571 (description
15572 "@code{easyprocess} is an easy to use Python subprocess interface.")
15573 (license license:bsd-3)))
15574
15575 (define-public python-entrypoint2
15576 (package
15577 (name "python-entrypoint2")
15578 (version "0.2.4")
15579 (source
15580 (origin
15581 (method url-fetch)
15582 (uri (pypi-uri "entrypoint2" version))
15583 (sha256
15584 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
15585 (build-system python-build-system)
15586 (arguments
15587 `(#:test-target "pytest"))
15588 (native-inputs
15589 `(("python-easyprocess" ,python-easyprocess)
15590 ("python-pytest" ,python-pytest)
15591 ("python-pytest-runner" ,python-pytest-runner)))
15592 (home-page "https://github.com/ponty/entrypoint2")
15593 (synopsis "Command-line interface for Python modules")
15594 (description
15595 "@code{entrypoint2} is an easy to use command-line interface for Python
15596 modules based on @code{argparse}. It translates function signature and
15597 documentation to argparse configuration.")
15598 (license license:bsd-3)))
15599
15600 (define-public python-pyvirtualdisplay
15601 (package
15602 (name "python-pyvirtualdisplay")
15603 (version "2.1")
15604 (source
15605 (origin
15606 (method url-fetch)
15607 (uri (pypi-uri "PyVirtualDisplay" version))
15608 (sha256
15609 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
15610 (build-system python-build-system)
15611 (arguments
15612 ;; Tests fail with:
15613 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
15614 `(#:tests? #f))
15615 (native-inputs
15616 `(("python-entrypoint2" ,python-entrypoint2)
15617 ("python-psutil" ,python-psutil)
15618 ("python-pytest" ,python-pytest)
15619 ("python-pytest-runner" ,python-pytest-runner)))
15620 (propagated-inputs
15621 `(("python-easyprocess" ,python-easyprocess)
15622 ("python-pillow" ,python-pillow)))
15623 (home-page "https://github.com/ponty/pyvirtualdisplay")
15624 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
15625 (description
15626 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
15627 (license license:bsd-3)))
15628
15629 (define-public python-stem
15630 (package
15631 (name "python-stem")
15632 (version "1.8.0")
15633 (source
15634 (origin
15635 (method url-fetch)
15636 (uri (pypi-uri "stem" version))
15637 (sha256
15638 (base32
15639 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
15640 (build-system python-build-system)
15641 (arguments
15642 `(#:phases
15643 (modify-phases %standard-phases
15644 (add-after 'unpack 'fix-tests
15645 ;; See https://github.com/torproject/stem/issues/56
15646 (lambda _
15647 (substitute* "run_tests.py"
15648 (("test\\.task\\.MOCK_VERSION,")
15649 ""))))
15650 (replace 'check
15651 (lambda _
15652 (invoke "./run_tests.py" "--unit")
15653 #t)))))
15654 (native-inputs
15655 `(("python-mock" ,python-mock)
15656 ("python-pycodestyle" ,python-pycodestyle)
15657 ("python-pyflakes" ,python-pyflakes)))
15658 (home-page "https://stem.torproject.org/")
15659 (synopsis
15660 "Python controller library that allows applications to interact with Tor")
15661 (description
15662 "Stem is a Python controller library for Tor. With it you can use Tor's
15663 control protocol to script against the Tor process and read descriptor data
15664 relays publish about themselves.")
15665 (license license:lgpl3)))
15666
15667 (define-public python-pyserial
15668 (package
15669 (name "python-pyserial")
15670 (version "3.5")
15671 (source
15672 (origin
15673 (method url-fetch)
15674 (uri (pypi-uri "pyserial" version))
15675 (sha256
15676 (base32
15677 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
15678 (build-system python-build-system)
15679 (arguments
15680 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
15681 ;; #:phases
15682 ;; (modify-phases %standard-phases
15683 ;; (replace 'check
15684 ;; (lambda _
15685 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
15686 (home-page
15687 "https://github.com/pyserial/pyserial")
15688 (synopsis "Python Serial Port Bindings")
15689 (description "@code{pyserial} provide serial port bindings for Python. It
15690 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
15691 and/or Xon/Xoff. The port is accessed in RAW mode.")
15692 (license license:bsd-3)))
15693
15694 (define-public python2-pyserial
15695 (package-with-python2 python-pyserial))
15696
15697 (define-public python-kivy
15698 (package
15699 (name "python-kivy")
15700 (version "1.10.1")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "Kivy" version))
15705 (file-name (string-append name "-" version ".tar.gz"))
15706 (sha256
15707 (base32
15708 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
15709 (build-system python-build-system)
15710 (arguments
15711 `(#:tests? #f ; Tests require many optional packages
15712 #:phases
15713 (modify-phases %standard-phases
15714 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
15715 (lambda* (#:key inputs #:allow-other-keys)
15716 (setenv "KIVY_SDL2_PATH"
15717 (search-input-directory inputs "/include/SDL2")))))))
15718 (native-inputs
15719 `(("pkg-config" ,pkg-config)
15720 ("python-cython" ,python-cython)))
15721 (inputs
15722 `(("gstreamer" ,gstreamer)
15723 ("mesa" ,mesa)
15724 ("sdl-union"
15725 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
15726 (home-page "https://kivy.org")
15727 (synopsis
15728 "Multitouch application framework")
15729 (description
15730 "A software library for rapid development of
15731 hardware-accelerated multitouch applications.")
15732 (license license:expat)))
15733
15734 (define-public python2-kivy
15735 (package-with-python2 python-kivy))
15736
15737 (define-public python-binaryornot
15738 (package
15739 (name "python-binaryornot")
15740 (version "0.4.4")
15741 (source (origin
15742 (method url-fetch)
15743 (uri (pypi-uri "binaryornot" version))
15744 (sha256
15745 (base32
15746 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
15747 (build-system python-build-system)
15748 (arguments
15749 `(#:phases
15750 (modify-phases %standard-phases
15751 (add-after 'unpack 'patch-tests
15752 (lambda _
15753 ;; TypeError: binary() got an unexpected keyword argument
15754 ;; 'average_size'.
15755 (substitute* "tests/test_check.py"
15756 (("average_size=512") ""))
15757 #t)))))
15758 (propagated-inputs
15759 `(("python-chardet" ,python-chardet)
15760 ("python-hypothesis" ,python-hypothesis)))
15761 (home-page "https://github.com/audreyr/binaryornot")
15762 (synopsis "Package to check if a file is binary or text")
15763 (description "Ultra-lightweight pure Python package to check if a file is
15764 binary or text.")
15765 (license license:bsd-3)
15766 (properties `((python2-variant . ,(delay python2-binaryornot))))))
15767
15768 (define-public python2-binaryornot
15769 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
15770 (package/inherit base
15771 (propagated-inputs
15772 `(("python2-enum34" ,python2-enum34)
15773 ,@(package-propagated-inputs base))))))
15774
15775 (define-public python-binwalk
15776 (package
15777 (name "python-binwalk")
15778 (version "2.2.0")
15779 (source
15780 (origin
15781 (method git-fetch)
15782 (uri (git-reference
15783 (url "https://github.com/ReFirmLabs/binwalk")
15784 (commit (string-append "v" version))))
15785 (file-name (git-file-name name version))
15786 (sha256
15787 (base32
15788 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
15789 (build-system python-build-system)
15790 (arguments
15791 `(#:phases
15792 (modify-phases %standard-phases
15793 (add-before 'check 'set-home
15794 (lambda _
15795 (setenv "HOME" ""))))))
15796 (native-inputs
15797 `(("python-coverage" ,python-coverage)
15798 ("python-nose" ,python-nose)))
15799 (home-page "https://github.com/ReFirmLabs/binwalk")
15800 (synopsis "Firmware analysis tool")
15801 (description "Binwalk is a tool for analyzing, reverse engineering, and
15802 extracting firmware images")
15803 (license license:expat)))
15804
15805 (define-public python-nltk
15806 (package
15807 (name "python-nltk")
15808 (version "3.6.2")
15809 (source (origin
15810 (method url-fetch)
15811 (uri (pypi-uri "nltk" version ".zip"))
15812 (sha256
15813 (base32
15814 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
15815 (build-system python-build-system)
15816 (arguments
15817 '(;; The tests require some extra resources to be downloaded.
15818 ;; TODO Try packaging these resources.
15819 #:tests? #f))
15820 (propagated-inputs
15821 `(("python-click" ,python-click)
15822 ("python-joblib" ,python-joblib)
15823 ("python-regex" ,python-regex)
15824 ("python-tqdm" ,python-tqdm)))
15825 (native-inputs
15826 `(("unzip" ,unzip)))
15827 (home-page "http://nltk.org/")
15828 (synopsis "Natural Language Toolkit")
15829 (description "It provides interfaces to over 50 corpora and lexical
15830 resources such as WordNet, along with a suite of text processing libraries
15831 for classification, tokenization, stemming, tagging, parsing, and semantic
15832 reasoning, wrappers for natural language processing libraries.")
15833 (license license:asl2.0)))
15834
15835 ;; Versions >=3.5 breaks backward-compatibility,
15836 ;; so we keep version 3.4.x around for a while.
15837 (define-public python-nltk-3.4
15838 (package
15839 (inherit python-nltk)
15840 (version "3.4.5")
15841 (source
15842 (origin
15843 (method url-fetch)
15844 (uri (pypi-uri "nltk" version ".zip"))
15845 (sha256
15846 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
15847 (propagated-inputs `(("python-six" ,python-six)))))
15848
15849 (define-public python2-nltk
15850 (package-with-python2 python-nltk))
15851
15852 (define-public python-pymongo
15853 (package
15854 (name "python-pymongo")
15855 (version "3.7.2")
15856 (source (origin
15857 (method url-fetch)
15858 (uri (pypi-uri "pymongo" version))
15859 (sha256
15860 (base32
15861 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
15862 (build-system python-build-system)
15863 (propagated-inputs
15864 `(("python-certifi" ,python-certifi)))
15865 (home-page "https://github.com/mongodb/mongo-python-driver")
15866 (synopsis "Python driver for MongoDB")
15867 (description "Python driver for MongoDB.")
15868 (license license:asl2.0)))
15869
15870 (define-public python2-pymongo
15871 (package-with-python2 python-pymongo))
15872
15873 (define-public python-consul
15874 (package
15875 (name "python-consul")
15876 (version "0.6.1")
15877 (source
15878 (origin
15879 (method url-fetch)
15880 (uri (pypi-uri "python-consul" version))
15881 (sha256
15882 (base32
15883 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
15884 (build-system python-build-system)
15885 (arguments
15886 '(#:tests? #f)) ; The tests are not distributed
15887 (propagated-inputs
15888 `(("python-requests" ,python-requests)
15889 ("python-six" ,python-six)))
15890 (home-page "https://github.com/cablehead/python-consul")
15891 (synopsis "Python client for Consul")
15892 (description
15893 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
15894 discovery, monitoring and configuration.")
15895 (license license:expat)))
15896
15897 (define-public python2-consul
15898 (package-with-python2 python-consul))
15899
15900 (define-public python-schematics
15901 (package
15902 (name "python-schematics")
15903 (version "1.1.1")
15904 (source
15905 (origin
15906 (method git-fetch)
15907 (uri (git-reference
15908 (url "https://github.com/schematics/schematics")
15909 (commit (string-append "v" version))))
15910 (file-name (git-file-name name version))
15911 (sha256
15912 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
15913 (build-system python-build-system)
15914 (propagated-inputs
15915 `(("python-six" ,python-six)))
15916 (arguments
15917 ;; The tests require a bunch of not very nice packages with fixed
15918 ;; version requirements (e.g. python-coveralls).
15919 `(#:tests? #f))
15920 (home-page "https://github.com/schematics/schematics")
15921 (synopsis "Python Data Structures for Humans")
15922 (description "Python Data Structures for Humans.")
15923 (license license:bsd-3)))
15924
15925 (define-public python2-schematics
15926 (package-with-python2 python-schematics))
15927
15928 (define-public python-odfpy
15929 (package
15930 (name "python-odfpy")
15931 (version "1.4.1")
15932 (source (origin
15933 (method url-fetch)
15934 (uri (pypi-uri "odfpy" version))
15935 (sha256
15936 (base32
15937 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
15938 (arguments
15939 `(#:phases
15940 (modify-phases %standard-phases
15941 (replace 'check
15942 (lambda _
15943 (invoke "pytest" "-vv"))))))
15944 (build-system python-build-system)
15945 (native-inputs
15946 `(("python-pytest" ,python-pytest)))
15947 (propagated-inputs
15948 `(("python-defusedxml" ,python-defusedxml)))
15949 (home-page "https://github.com/eea/odfpy")
15950 (synopsis "Python API and tools to manipulate OpenDocument files")
15951 (description "Collection of libraries and utility programs written in
15952 Python to manipulate OpenDocument 1.2 files.")
15953 (license
15954 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
15955 ;; number of files with other licenses.
15956 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
15957
15958 (define-public python2-odfpy
15959 (package-with-python2 python-odfpy))
15960
15961 (define-public python-natsort
15962 (package
15963 (name "python-natsort")
15964 (version "7.0.1")
15965 (source (origin
15966 (method url-fetch)
15967 (uri (pypi-uri "natsort" version))
15968 (sha256
15969 (base32
15970 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
15971 (build-system python-build-system)
15972 (arguments
15973 `(#:phases
15974 (modify-phases %standard-phases
15975 (add-before 'check 'set-cachedir
15976 ;; Tests require write access to $HOME by default
15977 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
15978 (replace 'check
15979 (lambda _
15980 (invoke "pytest" "-v"))))))
15981 (native-inputs
15982 `(("python-hypothesis" ,python-hypothesis)
15983 ("python-pytest-cov" ,python-pytest-cov)
15984 ("python-pytest-mock" ,python-pytest-mock)
15985 ("python-pytest" ,python-pytest)))
15986 (propagated-inputs ; TODO: Add python-fastnumbers.
15987 `(("python-pyicu" ,python-pyicu)))
15988 (home-page "https://github.com/SethMMorton/natsort")
15989 (synopsis "Natural sorting for python and shell")
15990 (description
15991 "Natsort lets you apply natural sorting on lists instead of
15992 lexicographical. If you use the built-in @code{sorted} method in python
15993 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
15994 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
15995 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
15996 identifies numbers and sorts them separately from strings. It can also sort
15997 version numbers, real numbers, mixed types and more, and comes with a shell
15998 command @command{natsort} that exposes this functionality in the command line.")
15999 (license license:expat)
16000 (properties `((python2-variant . ,(delay python2-natsort))))))
16001
16002 ;; Natsort 6.x are the last versions with support for Python 2.
16003 (define-public python2-natsort
16004 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
16005 (package (inherit base)
16006 (version "6.2.1")
16007 (source (origin
16008 (method url-fetch)
16009 (uri (pypi-uri "natsort" version))
16010 (sha256
16011 (base32
16012 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
16013 (native-inputs
16014 `(("python2-pathlib" ,python2-pathlib)
16015 ,@(package-native-inputs base))))))
16016
16017 (define-public glances
16018 (package
16019 (name "glances")
16020 (version "3.1.7")
16021 (source
16022 (origin
16023 (method url-fetch)
16024 (uri (pypi-uri "Glances" version))
16025 (sha256
16026 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
16027 (modules '((guix build utils)))
16028 (snippet
16029 '(begin
16030 ;; Glances phones PyPI for weekly update checks by default.
16031 ;; Disable these. The user can re-enable them if desired.
16032 (substitute* "glances/outdated.py"
16033 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
16034 (string-append indentation
16035 "self.args.disable_check_update = True\n"
16036 line)))
16037 #t))))
16038 (build-system python-build-system)
16039 (propagated-inputs
16040 `(("python-future" ,python-future)
16041 ("python-psutil" ,python-psutil)))
16042 (home-page "https://github.com/nicolargo/glances")
16043 (synopsis "Cross-platform curses-based monitoring tool")
16044 (description
16045 "Glances is a curses-based monitoring tool for a wide variety of platforms.
16046 Glances uses the PsUtil library to get information from your system. It
16047 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
16048 (license license:lgpl3+)))
16049
16050 (define-public python-glances
16051 (deprecated-package "python-glances" glances))
16052
16053 (define-public python-graphql-core
16054 (package
16055 (name "python-graphql-core")
16056 (version "3.1.2")
16057 (source
16058 (origin
16059 (method url-fetch)
16060 (uri (pypi-uri "graphql-core" version))
16061 (sha256
16062 (base32
16063 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
16064 (build-system python-build-system)
16065 (arguments
16066 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
16067 #:phases
16068 (modify-phases %standard-phases
16069 (add-after 'unpack 'patch-hardcoded-version
16070 (lambda _ (substitute*
16071 "setup.py"
16072 (("'gevent==1.1rc1'") "'gevent'"))
16073 #t)))))
16074 (native-inputs
16075 `(("python-gevent" ,python-gevent)
16076 ("python-mock" ,python-mock)
16077 ("python-pytest-mock" ,python-pytest-mock)))
16078 (propagated-inputs
16079 `(("python-promise" ,python-promise)
16080 ("python-six" ,python-six)))
16081 (home-page "https://github.com/graphql-python/graphql-core")
16082 (synopsis "GraphQL implementation for Python")
16083 (description
16084 "GraphQL implementation for Python. GraphQL is a data query language and
16085 runtime designed and used to request and deliver data to mobile and web apps.
16086 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
16087 to Python.")
16088 (license license:expat)))
16089
16090 (define-public python-graphql-relay
16091 (package
16092 (name "python-graphql-relay")
16093 (version "0.4.5")
16094 (source
16095 (origin
16096 (method url-fetch)
16097 (uri (pypi-uri "graphql-relay" version))
16098 (sha256
16099 (base32
16100 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
16101 (build-system python-build-system)
16102 (arguments
16103 '(#:tests? #f)) ; The tests are not distributed
16104 (propagated-inputs
16105 `(("python-graphql-core" ,python-graphql-core)
16106 ("python-promise" ,python-promise)
16107 ("python-six" ,python-six)))
16108 (home-page "https://github.com/graphql-python/graphql-relay-py")
16109 (synopsis "Relay implementation for Python")
16110 (description
16111 "This is a library to allow the easy creation of Relay-compliant servers
16112 using the GraphQL Python reference implementation of a GraphQL server. It
16113 should be noted that the code is a exact port of the original
16114 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
16115 from Facebook.")
16116 (license license:expat)))
16117
16118 (define-public python-graphene
16119 (package
16120 (name "python-graphene")
16121 (version "0.10.2")
16122 (source
16123 (origin
16124 (method url-fetch)
16125 (uri (pypi-uri "graphene" version))
16126 (sha256
16127 (base32
16128 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
16129 (build-system python-build-system)
16130 (propagated-inputs
16131 `(("python-graphql-core" ,python-graphql-core)
16132 ("python-graphql-relay" ,python-graphql-relay)
16133 ("python-iso8601" ,python-iso8601)
16134 ("python-promise" ,python-promise)
16135 ("python-six" ,python-six)))
16136 (arguments
16137 `(#:tests? #f)) ; no tests/ in the PyPI tarball
16138 (home-page "https://graphene-python.org/")
16139 (synopsis "GraphQL Framework for Python")
16140 (description
16141 "Graphene is a Python library for building GraphQL schemas/types.
16142 A GraphQL schema describes your data model, and provides a GraphQL server
16143 with an associated set of resolve methods that know how to fetch data.")
16144 (license license:expat)))
16145
16146 (define-public python-nautilus
16147 (package
16148 (name "python-nautilus")
16149 (version "0.4.9")
16150 (source
16151 (origin
16152 (method url-fetch)
16153 (uri (pypi-uri "nautilus" version))
16154 (sha256
16155 (base32
16156 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
16157 (build-system python-build-system)
16158 (arguments `(#:tests? #f)) ; fails to import test modules
16159 (propagated-inputs
16160 `(("python-bcrypt" ,python-bcrypt)
16161 ("python-click" ,python-click)
16162 ("python-consul" ,python-consul)
16163 ("python-graphene" ,python-graphene)
16164 ("python-jinja2" ,python-jinja2)
16165 ("python-peewee" ,python-peewee)
16166 ("python-pika" ,python-pika)
16167 ("python-tornado" ,python-tornado)
16168 ("python-wtforms" ,python-wtforms)))
16169 (native-inputs
16170 `(("python-nose2" ,python-nose2)))
16171 (home-page "https://github.com/AlecAivazis/nautilus")
16172 (synopsis "Library for creating microservice applications")
16173 (description
16174 "Nautilus is a framework for flux based microservices that looks to
16175 provide extendible implementations of common aspects of a cloud so that you can
16176 focus on building massively scalable web applications.")
16177 (license license:expat)))
16178
16179 (define-public python-random2
16180 (package
16181 (name "python-random2")
16182 (version "1.0.1")
16183 (source (origin
16184 (method url-fetch)
16185 (uri (pypi-uri "random2" version ".zip"))
16186 (sha256
16187 (base32
16188 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
16189 (patches
16190 (search-patches "python-random2-getrandbits-test.patch"))))
16191 (build-system python-build-system)
16192 (native-inputs `(("unzip" ,unzip)))
16193 (home-page "http://pypi.python.org/pypi/random2")
16194 (synopsis "Python 3 version of the Python 2 @code{random} module")
16195 (description
16196 "This package provides a Python 3 ported version of Python 2.7’s
16197 @code{random} module. It has also been back-ported to work in Python 2.6.
16198
16199 In Python 3, the implementation of @code{randrange()} was changed, so that
16200 even with the same seed you get different sequences in Python 2 and 3.
16201
16202 This package closes that gap, allowing stable random number generation
16203 between the different Python versions.")
16204 (license license:psfl)))
16205
16206 (define-public python2-random2
16207 (package-with-python2 python-random2))
16208
16209 (define-public python-snowballstemmer
16210 (package
16211 (name "python-snowballstemmer")
16212 (version "2.0.0")
16213 (source (origin
16214 (method url-fetch)
16215 (uri (pypi-uri "snowballstemmer" version))
16216 (sha256
16217 (base32
16218 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16219 (build-system python-build-system)
16220 (arguments
16221 `(;; No tests exist
16222 #:tests? #f))
16223 (home-page "https://github.com/shibukawa/snowball_py")
16224 (synopsis "Snowball stemming library collection for Python")
16225 (description "This package provides 16 word stemmer algorithms generated
16226 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16227 English stemmer.")
16228 (license license:bsd-3)))
16229
16230 (define-public python2-snowballstemmer
16231 (package-with-python2 python-snowballstemmer))
16232
16233 (define-public python-setproctitle
16234 (package
16235 (name "python-setproctitle")
16236 (version "1.1.10")
16237 (source
16238 (origin
16239 (method url-fetch)
16240 (uri (pypi-uri "setproctitle" version))
16241 (sha256
16242 (base32
16243 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16244 (build-system python-build-system)
16245 (arguments
16246 '(#:phases
16247 (modify-phases %standard-phases
16248 (add-before 'check 'patch-Makefile
16249 ;; Stricly this is only required for the python2 variant.
16250 ;; But adding a phase in an inherited package seems to be
16251 ;; cumbersum. So we patch even for python3.
16252 (lambda _
16253 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16254 (when nose
16255 (substitute* "Makefile"
16256 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16257 (string-append nose "/bin/nosetests "))))
16258 #t)))
16259 (replace 'check
16260 (lambda _
16261 (setenv "PYTHON" (or (which "python3") (which "python")))
16262 (setenv "PYCONFIG" (if (which "python3-config")
16263 "python3-config --embed"
16264 "python-config"))
16265 (setenv "CC" "gcc")
16266 ;; No need to extend PYTHONPATH to find the built package, since
16267 ;; the Makefile will build anyway
16268 (invoke "make" "check"))))))
16269 (native-inputs
16270 `(("procps" ,procps))) ; required for tests
16271 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16272 (synopsis
16273 "Setproctitle implementation for Python to customize the process title")
16274 (description "The library allows a process to change its title (as displayed
16275 by system tools such as ps and top).
16276
16277 Changing the title is mostly useful in multi-process systems, for
16278 example when a master process is forked: changing the children's title
16279 allows identifying the task each process is busy with. The technique
16280 is used by PostgreSQL and the OpenSSH Server for example.")
16281 (license license:bsd-3)
16282 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16283
16284 (define-public python2-setproctitle
16285 (let ((base (package-with-python2
16286 (strip-python2-variant python-setproctitle))))
16287 (package/inherit base
16288 (native-inputs `(("python2-nose" ,python2-nose)
16289 ,@(package-native-inputs base))))))
16290
16291 (define-public python-validictory
16292 (package
16293 (name "python-validictory")
16294 (version "1.0.1")
16295 (source
16296 (origin
16297 (method url-fetch)
16298 (uri (pypi-uri "validictory" version))
16299 (sha256
16300 (base32
16301 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16302 (build-system python-build-system)
16303 (arguments
16304 '(#:phases
16305 (modify-phases %standard-phases
16306 (add-after 'unpack 'bootstrap
16307 ;; Move the tests out of the package directory to avoid
16308 ;; packaging them.
16309 (lambda* _
16310 (rename-file "validictory/tests" "tests")
16311 (delete-file "tests/__init__.py")))
16312 (replace 'check
16313 (lambda _
16314 (invoke "py.test" "-vv" ))))))
16315 (native-inputs
16316 `(("python-pytest" ,python-pytest)))
16317 (home-page
16318 "https://github.com/jamesturk/validictory")
16319 (synopsis "General purpose Python data validator")
16320 (description "It allows validation of arbitrary Python data structures.
16321
16322 The schema format is based on the JSON Schema
16323 proposal (http://json-schema.org), so combined with json the library is also
16324 useful as a validator for JSON data.")
16325 (license license:expat)))
16326
16327 (define-public python2-validictory
16328 (package-with-python2 python-validictory))
16329
16330 (define-public python-pyelftools
16331 (package
16332 (name "python-pyelftools")
16333 (version "0.25")
16334 (source
16335 (origin
16336 (method url-fetch)
16337 (uri (pypi-uri "pyelftools" version))
16338 (sha256
16339 (base32
16340 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
16341 (build-system python-build-system)
16342 (home-page
16343 "https://github.com/eliben/pyelftools")
16344 (synopsis
16345 "Analyze binary and library file information")
16346 (description "This Python library provides interfaces for parsing and
16347 analyzing two binary and library file formats; the Executable and Linking
16348 Format (ELF), and debugging information in the Debugging With Attributed
16349 Record Format (DWARF).")
16350 (license license:public-domain)))
16351
16352 (define-public python-pyev
16353 (package
16354 (name "python-pyev")
16355 (version "0.9.0")
16356 (source
16357 (origin
16358 (method url-fetch)
16359 (uri (pypi-uri "pyev" version))
16360 (sha256
16361 (base32
16362 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
16363 (build-system python-build-system)
16364 (arguments
16365 `(#:tests? #f ; no test suite
16366 #:phases
16367 (modify-phases %standard-phases
16368 (add-after 'unpack 'patch
16369 (lambda* (#:key inputs #:allow-other-keys)
16370 (let ((libev (search-input-file inputs "/lib/libev.so.4")))
16371 (substitute* "setup.py"
16372 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
16373 (string-append "libev_dll_name = \"" libev "\"")))))))))
16374 (inputs
16375 `(("libev" ,libev)))
16376 (home-page "https://github.com/gabrielfalcao/pyev")
16377 (synopsis "Python libev interface")
16378 (description "Pyev provides a Python interface to libev.")
16379 (license license:gpl3)))
16380
16381 (define-public python2-pyev
16382 (package-with-python2 python-pyev))
16383
16384 (define-public python-imagesize
16385 (package
16386 (name "python-imagesize")
16387 (version "1.2.0")
16388 (source
16389 (origin
16390 (method url-fetch)
16391 (uri (pypi-uri "imagesize" version))
16392 (sha256
16393 (base32
16394 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
16395 (build-system python-build-system)
16396 (home-page "https://github.com/shibukawa/imagesize_py")
16397 (synopsis "Gets image size of files in various formats in Python")
16398 (description
16399 "This package allows determination of image size from
16400 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
16401 (license license:expat)))
16402
16403 (define-public python2-imagesize
16404 (package-with-python2 python-imagesize))
16405
16406 (define-public python-termstyle
16407 (package
16408 (name "python-termstyle")
16409 (version "0.1.11")
16410 (source
16411 (origin
16412 (method url-fetch)
16413 (uri (pypi-uri "termstyle" version))
16414 (sha256
16415 (base32
16416 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
16417 (build-system python-build-system)
16418 (arguments
16419 '(#:phases
16420 (modify-phases %standard-phases
16421 (replace 'check
16422 (lambda _
16423 (invoke "python" "test3.py"))))))
16424 (home-page "https://github.com/gfxmonk/termstyle")
16425 (synopsis "Console text coloring for Python")
16426 (description "This package provides console text coloring for Python.")
16427 (license license:bsd-3)))
16428
16429 (define-public python-argcomplete
16430 (package
16431 (name "python-argcomplete")
16432 (version "1.11.1")
16433 (source
16434 (origin
16435 (method url-fetch)
16436 (uri (pypi-uri "argcomplete" version))
16437 (sha256
16438 (base32
16439 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
16440 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
16441 (build-system python-build-system)
16442 (native-inputs
16443 `(("python-coverage" ,python-coverage)
16444 ("python-flake8" ,python-flake8)
16445 ("python-pexpect" ,python-pexpect)
16446 ("python-wheel" ,python-wheel)
16447 ("tcsh" ,tcsh)
16448 ("fish" ,fish)
16449 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
16450 (home-page "https://github.com/kislyuk/argcomplete")
16451 (synopsis "Shell tab completion for Python argparse")
16452 (description "argcomplete provides extensible command line tab completion
16453 of arguments and options for Python scripts using @code{argparse}. It's
16454 particularly useful for programs with many options or sub-parsers that can
16455 dynamically suggest completions; for example, when browsing resources over the
16456 network.")
16457 (license license:asl2.0)
16458 (properties `((python2-variant . ,(delay python2-argcomplete))))))
16459
16460 (define-public python2-argcomplete
16461 (let ((variant (package-with-python2
16462 (strip-python2-variant python-argcomplete))))
16463 (package/inherit variant
16464 (arguments
16465 (substitute-keyword-arguments (package-arguments variant)
16466 ((#:phases phases '%standard-phases)
16467 `(modify-phases ,phases
16468 (add-after 'unpack 'set-my-HOME
16469 (lambda _ (setenv "HOME" "/tmp")))))))
16470 (native-inputs
16471 `(("python2-importlib-metadata" ,python2-importlib-metadata)
16472 ,@(package-native-inputs variant))))))
16473
16474 (define-public python-csscompressor
16475 (package
16476 (name "python-csscompressor")
16477 (version "0.9.5")
16478 (source
16479 (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "csscompressor" version))
16482 (sha256
16483 (base32
16484 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
16485 (build-system python-build-system)
16486 (arguments
16487 '(#:phases
16488 (modify-phases %standard-phases
16489 (replace 'check
16490 (lambda _
16491 (invoke "py.test"))))))
16492 (native-inputs
16493 `(("python-pytest" ,python-pytest)))
16494 (home-page "https://github.com/sprymix/csscompressor")
16495 (synopsis "Python port of YUI CSS Compressor")
16496 (description
16497 "This package provides a python port of YUI CSS Compressor.")
16498 (license license:bsd-3)))
16499
16500 (define-public python-rcssmin
16501 (package
16502 (name "python-rcssmin")
16503 (version "1.0.6")
16504 (source
16505 (origin
16506 (method url-fetch)
16507 (uri (pypi-uri "rcssmin" version))
16508 (sha256
16509 (base32
16510 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
16511 (build-system python-build-system)
16512 (arguments
16513 '(#:phases
16514 (modify-phases %standard-phases
16515 (replace 'check
16516 (lambda _
16517 (invoke "python" "run_tests.py" "tests"))))))
16518 (home-page "http://opensource.perlig.de/rcssmin/")
16519 (synopsis "CSS Minifier")
16520 (description "The minifier is based on the semantics of the YUI compressor,
16521 which itself is based on the rule list by Isaac Schlueter.")
16522 (license license:asl2.0)))
16523
16524 (define-public python-rjsmin
16525 (package
16526 (name "python-rjsmin")
16527 (version "1.1.0")
16528 (source
16529 (origin
16530 (method url-fetch)
16531 (uri (pypi-uri "rjsmin" version))
16532 (sha256
16533 (base32
16534 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
16535 (modules '((guix build utils)))
16536 (snippet
16537 '(begin
16538 (for-each delete-file (find-files "bench" "\\.js$"))
16539 #t))))
16540 (build-system python-build-system)
16541 (arguments
16542 '(#:tests? #f ; Not all test files included.
16543 #:phases
16544 (modify-phases %standard-phases
16545 (replace 'check
16546 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16547 (add-installed-pythonpath inputs outputs)
16548 (if tests?
16549 (invoke "py.test" "-vv" "tests")
16550 #t))))))
16551 (native-inputs
16552 `(("python-pytest" ,python-pytest)))
16553 (home-page "http://opensource.perlig.de/rjsmin/")
16554 (synopsis "Javascript Minifier")
16555 (description "@code{rJSmin} is a javascript minifier written in Python. The
16556 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
16557 is a re-implementation aiming for speed, so it can be used at runtime (rather
16558 than during a preprocessing step).")
16559 (license license:asl2.0)))
16560
16561 (define-public python-xopen
16562 (package
16563 (name "python-xopen")
16564 (version "0.5.0")
16565 (source
16566 (origin
16567 (method url-fetch)
16568 (uri (pypi-uri "xopen" version))
16569 (sha256
16570 (base32
16571 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
16572 (build-system python-build-system)
16573 (propagated-inputs
16574 `(("python-setuptools-scm" ,python-setuptools-scm)))
16575 (home-page "https://github.com/marcelm/xopen/")
16576 (synopsis "Open compressed files transparently")
16577 (description "This module provides an @code{xopen} function that works like
16578 Python's built-in @code{open} function, but can also deal with compressed files.
16579 Supported compression formats are gzip, bzip2 and, xz, and are automatically
16580 recognized by their file extensions. The focus is on being as efficient as
16581 possible on all supported Python versions.")
16582 (license license:expat)))
16583
16584 (define-public python2-xopen
16585 (let ((base (package-with-python2
16586 (strip-python2-variant python-xopen))))
16587 (package/inherit base
16588 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
16589 ,@(package-propagated-inputs base))))))
16590
16591 (define-public python-cheetah
16592 (package
16593 (name "python-cheetah")
16594 (version "3.2.4")
16595 (source
16596 (origin
16597 (method url-fetch)
16598 (uri (pypi-uri "Cheetah3" version))
16599 (sha256
16600 (base32
16601 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
16602 (build-system python-build-system)
16603 (arguments
16604 `(#:phases (modify-phases %standard-phases
16605 (add-after 'unpack 'use-absolute-python
16606 (lambda _
16607 (substitute* "Cheetah/CheetahWrapper.py"
16608 (("#!/usr/bin/env python")
16609 (string-append "#!" (which "python"))))))
16610 (add-after 'unpack 'fix-tests
16611 (lambda _
16612 (substitute* "Cheetah/Tests/ImportHooks.py"
16613 (("os.path.dirname\\(__file__\\)")
16614 (string-append "'" (getcwd) "/Cheetah/Tests'")))))
16615 (replace 'check
16616 (lambda _
16617 (setenv "TMPDIR" "/tmp")
16618 (substitute* "Cheetah/Tests/Test.py"
16619 (("unittest.TextTestRunner\\(\\)")
16620 "unittest.TextTestRunner(verbosity=2)"))
16621
16622 (invoke "python" "Cheetah/Tests/Test.py"))))))
16623 (propagated-inputs
16624 `(("python-markdown" ,python-markdown))) ;optional
16625 (home-page "https://cheetahtemplate.org/")
16626 (synopsis "Template engine")
16627 (description "Cheetah is a text-based template engine and Python code
16628 generator.
16629
16630 Cheetah can be used as a standalone templating utility or referenced as
16631 a library from other Python applications. It has many potential uses,
16632 but web developers looking for a viable alternative to ASP, JSP, PHP and
16633 PSP are expected to be its principle user group.
16634
16635 Features:
16636 @enumerate
16637 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
16638 text-based format.
16639 @item Cleanly separates content, graphic design, and program code.
16640 @item Blends the power and flexibility of Python with a simple template language
16641 that non-programmers can understand.
16642 @item Gives template writers full access to any Python data structure, module,
16643 function, object, or method in their templates.
16644 @item Makes code reuse easy by providing an object-orientated interface to
16645 templates that is accessible from Python code or other Cheetah templates.
16646 One template can subclass another and selectively reimplement sections of it.
16647 @item Provides a simple, yet powerful, caching mechanism that can dramatically
16648 improve the performance of a dynamic website.
16649 @item Compiles templates into optimized, yet readable, Python code.
16650 @end enumerate")
16651 (license (license:x11-style "file://LICENSE"))))
16652
16653 (define-public python2-cheetah
16654 (package-with-python2 python-cheetah))
16655
16656 (define-public python-dulwich
16657 (package
16658 (name "python-dulwich")
16659 (version "0.19.16")
16660 (source
16661 (origin
16662 (method url-fetch)
16663 (uri (list (string-append "https://www.dulwich.io/releases/"
16664 "dulwich-" version ".tar.gz")
16665 (pypi-uri "dulwich" version)))
16666 (sha256
16667 (base32
16668 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
16669 (build-system python-build-system)
16670 (arguments
16671 `(#:phases
16672 (modify-phases %standard-phases
16673 (add-before 'check 'fix-tests
16674 (lambda* (#:key inputs #:allow-other-keys)
16675 ;; The tests use Popen with a custom environment which doesn't
16676 ;; include PATH.
16677 (substitute* "dulwich/tests/compat/utils.py"
16678 (("'git'") (string-append "'"
16679 (which "git")
16680 "'")))
16681 (substitute* '("dulwich/tests/test_repository.py"
16682 "dulwich/tests/test_hooks.py")
16683 (("#!/bin/sh") (string-append "#!" (which "sh"))))
16684 (setenv "TEST_RUNNER" "unittest")
16685 (setenv "PYTHONHASHSEED" "random")
16686 #t)))))
16687 (propagated-inputs
16688 `(("python-fastimport" ,python-fastimport)
16689 ("python-urllib3" ,python-urllib3)))
16690 (native-inputs
16691 `(("python-mock" ,python-mock)
16692 ("python-geventhttpclient" ,python-geventhttpclient)
16693 ("git" ,git)))
16694 (home-page "https://www.dulwich.io/")
16695 (synopsis "Git implementation in Python")
16696 (description "Dulwich is an implementation of the Git file formats and
16697 protocols written in pure Python.")
16698 ;; Can be used with either license.
16699 (license (list license:asl2.0 license:gpl2+))))
16700
16701 (define-public python-pbkdf2
16702 (package
16703 (name "python-pbkdf2")
16704 (version "1.3")
16705 (source
16706 (origin
16707 (method url-fetch)
16708 (uri (pypi-uri "pbkdf2" version))
16709 (sha256
16710 (base32
16711 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
16712 (build-system python-build-system)
16713 (arguments
16714 '(#:phases
16715 (modify-phases %standard-phases
16716 (replace 'check
16717 (lambda _
16718 (invoke "python" "test/test_pbkdf2.py"))))))
16719 (propagated-inputs
16720 `(("python-pycrypto" ,python-pycrypto))) ; optional
16721 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
16722 (synopsis "Password-based key derivation")
16723 (description "This module implements the password-based key derivation
16724 function, PBKDF2, specified in RSA PKCS#5 v2.0.
16725
16726 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
16727 is part of the RSA Public Key Cryptography Standards series. The provided
16728 implementation takes a password or a passphrase and a salt value (and
16729 optionally a iteration count, a digest module, and a MAC module) and provides
16730 a file-like object from which an arbitrarily-sized key can be read.")
16731 (license license:expat)))
16732
16733 (define-public python2-pbkdf2
16734 (package-with-python2 python-pbkdf2))
16735
16736 (define-public python-qrcode
16737 (package
16738 (name "python-qrcode")
16739 (version "6.1")
16740 (source
16741 (origin
16742 (method url-fetch)
16743 (uri (pypi-uri "qrcode" version))
16744 (sha256
16745 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
16746 (build-system python-build-system)
16747 (arguments
16748 ;; FIXME: Tests require packaging 'pymaging'.
16749 '(#:tests? #f))
16750 (propagated-inputs
16751 `(("python-lxml" ,python-lxml) ; for SVG output
16752 ("python-pillow" ,python-pillow) ; for PNG output
16753 ("python-six" ,python-six)))
16754 (home-page "https://github.com/lincolnloop/python-qrcode")
16755 (synopsis "QR Code image generator")
16756 (description "This package provides a pure Python QR Code generator
16757 module. It uses the Python Imaging Library (PIL) to allow for the generation
16758 of QR Codes.
16759
16760 In addition this package provides a command line tool to generate QR codes and
16761 either write these QR codes to a file or do the output as ascii art at the
16762 console.")
16763 (license license:bsd-3)))
16764
16765 (define-public python2-qrcode
16766 (package-with-python2 python-qrcode))
16767
16768 (define-public python-rst2ansi
16769 (package
16770 (name "python-rst2ansi")
16771 (version "0.1.5")
16772 (source
16773 (origin
16774 (method url-fetch)
16775 (uri (pypi-uri "rst2ansi" version))
16776 (sha256
16777 (base32
16778 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
16779 (build-system python-build-system)
16780 (propagated-inputs
16781 `(("python-docutils" ,python-docutils)))
16782 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
16783 (synopsis "Convert RST to ANSI-decorated console output")
16784 (description
16785 "Python module dedicated to rendering RST (reStructuredText) documents
16786 to ansi-escaped strings suitable for display in a terminal.")
16787 (license license:expat)))
16788
16789 (define-public python-ansi2html
16790 (package
16791 (name "python-ansi2html")
16792 (version "1.2.0")
16793 (source
16794 (origin
16795 (method url-fetch)
16796 (uri (pypi-uri "ansi2html" version))
16797 (sha256
16798 (base32
16799 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
16800 (build-system python-build-system)
16801 (native-inputs
16802 `(("python-mock" ,python-mock)
16803 ("python-nose" ,python-nose)))
16804 (propagated-inputs
16805 `(("python-six" ,python-six)))
16806 (home-page "https://github.com/ralphbean/ansi2html")
16807 (synopsis "Convert ANSI-decorated console output to HTML")
16808 (description
16809 "@command{ansi2html} is a Python library and command line utility for
16810 converting text with ANSI color codes to HTML or LaTeX.")
16811 (license license:gpl3+)))
16812
16813 (define-public python2-ansi2html
16814 (package-with-python2 python-ansi2html))
16815
16816 (define-public python-easy-ansi
16817 (package
16818 (name "python-easy-ansi")
16819 (version "0.3")
16820 (source
16821 (origin
16822 (method git-fetch)
16823 (uri (git-reference
16824 (url "https://gitlab.com/joeysbytes/easy-ansi")
16825 (commit (string-append "v" version))))
16826 (file-name (git-file-name name version))
16827 (sha256
16828 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
16829 (build-system python-build-system)
16830 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
16831 (synopsis "Terminal framework API")
16832 (description
16833 "Easy ANSI is a terminal framework API to give you an easy way to use
16834 colors, cursor control movements, and line/box drawing. It is not meant as a
16835 replacement to more full-featured frameworks (such as curses or urwid), but as
16836 a tool to quickly create nice-looking screens in your terminal window. You
16837 can even create animations with the cursor controls.")
16838 (license license:expat)))
16839
16840 (define-public python-ddt
16841 (package
16842 (name "python-ddt")
16843 (version "1.4.2")
16844 (source
16845 (origin
16846 (method url-fetch)
16847 (uri (pypi-uri "ddt" version))
16848 (sha256
16849 (base32
16850 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
16851 (build-system python-build-system)
16852 (native-inputs
16853 `(("python-pytest" ,python-pytest)))
16854 (propagated-inputs
16855 `(("python-pyyaml" ,python-pyyaml)))
16856 (home-page "https://github.com/datadriventests/ddt")
16857 (synopsis "Data-Driven Tests")
16858 (description
16859 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
16860 running it with different test data, and make it appear as multiple test
16861 cases.")
16862 (license license:expat)))
16863
16864 (define-public python-pycountry
16865 (package
16866 (name "python-pycountry")
16867 (version "18.5.26")
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "pycountry" version))
16872 (sha256
16873 (base32
16874 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
16875 (build-system python-build-system)
16876 (home-page "https://bitbucket.org/flyingcircus/pycountry")
16877 (synopsis "ISO databases for languages, countries, currencies, etc.")
16878 (description
16879 "@code{pycountry} provides the ISO databases for the standards:
16880 @enumerate
16881 @item 639-3 (Languages)
16882 @item 3166 (Countries)
16883 @item 3166-3 (Deleted Countries)
16884 @item 3166-2 (Subdivisions of countries)
16885 @item 4217 (Currencies)
16886 @item 15924 (Scripts)
16887 @end enumerate
16888 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
16889 through a Python API.")
16890 (license license:lgpl2.1+)))
16891
16892 (define-public python2-pycountry
16893 (package-with-python2 python-pycountry))
16894
16895 (define-public python-pycosat
16896 (package
16897 (name "python-pycosat")
16898 (version "0.6.3")
16899 (source
16900 (origin
16901 (method url-fetch)
16902 (uri (pypi-uri "pycosat" version ".zip"))
16903 (sha256
16904 (base32
16905 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
16906 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
16907 (build-system python-build-system)
16908 (native-inputs
16909 `(("unzip" ,unzip)))
16910 (home-page "https://github.com/ContinuumIO/pycosat")
16911 (synopsis "Bindings to picosat (a SAT solver)")
16912 (description
16913 "This package provides efficient Python bindings to @code{picosat} on
16914 the C level. When importing pycosat, the @code{picosat} solver becomes part
16915 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
16916 Problem} (SAT) solver.")
16917 (license license:expat)))
16918
16919 (define-public python2-pycosat
16920 (package-with-python2 python-pycosat))
16921
16922 (define-public python2-ruamel.ordereddict
16923 (package
16924 (name "python2-ruamel.ordereddict")
16925 (version "0.4.9")
16926 (source
16927 (origin
16928 (method url-fetch)
16929 (uri (pypi-uri "ruamel.ordereddict" version))
16930 (sha256
16931 (base32
16932 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
16933 (build-system python-build-system)
16934 (arguments
16935 `(#:python ,python-2
16936 #:phases
16937 (modify-phases %standard-phases
16938 (delete 'check)
16939 (add-after 'install 'check
16940 (lambda* (#:key inputs outputs #:allow-other-keys)
16941 (add-installed-pythonpath inputs outputs)
16942 (invoke "python" "test/testordereddict.py"))))))
16943 (home-page "https://bitbucket.org/ruamel/ordereddict")
16944 (synopsis "Version of dict that keeps keys in insertion order")
16945 (description
16946 "This is an implementation of an ordered dictionary with @dfn{Key
16947 Insertion Order} (KIO: updates of values do not affect the position of the
16948 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
16949 removed and put at the back). The standard library module @code{OrderedDict},
16950 implemented later, implements a subset of @code{ordereddict} functionality.
16951 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
16952 Order} (KSO, no sorting function can be specified, but a transform can be
16953 specified to apply on the key before comparison (e.g. @code{string.lower})).")
16954 (license license:expat)))
16955
16956 (define-public python-pypeg2
16957 (package
16958 (name "python-pypeg2")
16959 (version "2.15.2")
16960 (source
16961 (origin
16962 (method url-fetch)
16963 (uri (pypi-uri "pyPEG2" version))
16964 (sha256
16965 (base32
16966 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
16967 (build-system python-build-system)
16968 (propagated-inputs `(("python-lxml" ,python-lxml)))
16969 (arguments
16970 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
16971 '(#:tests? #f))
16972 (home-page "https://fdik.org/pyPEG/")
16973 (synopsis "Parsing Expression Grammars in Python")
16974 (description "PyPEG is an intrinsic parser interpreter framework for
16975 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
16976 parse many formal languages.")
16977 (license license:gpl2)))
16978
16979 (define-public python-incremental
16980 (package
16981 (name "python-incremental")
16982 (version "17.5.0")
16983 (source
16984 (origin
16985 (method url-fetch)
16986 (uri (pypi-uri "incremental" version))
16987 (sha256
16988 (base32
16989 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
16990 (build-system python-build-system)
16991 (home-page "https://github.com/hawkowl/incremental")
16992 (synopsis "Library for versioning Python projects")
16993 (description "Incremental is a small library that versions your Python
16994 projects.")
16995 (license license:expat)))
16996
16997 (define-public python2-incremental
16998 (package-with-python2 python-incremental))
16999
17000 (define-public python-invoke
17001 (package
17002 (name "python-invoke")
17003 (home-page "https://www.pyinvoke.org/")
17004 (version "1.5.0")
17005 (source (origin
17006 (method url-fetch)
17007 (uri (pypi-uri "invoke" version))
17008 (sha256
17009 (base32
17010 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
17011 (build-system python-build-system)
17012 (arguments
17013 ;; XXX: Requires many dependencies that are not yet in Guix.
17014 `(#:tests? #f
17015 #:phases
17016 (modify-phases %standard-phases
17017 (add-after 'unpack 'fix-bash-path
17018 (lambda* (#:key inputs #:allow-other-keys)
17019 (let ((bash (assoc-ref inputs "bash")))
17020 (substitute* "invoke/config.py"
17021 (("shell = \"/bin/bash\"")
17022 (string-append "shell = \"" bash "/bin/bash\""))
17023 )
17024 #t))))))
17025 (inputs
17026 `(("bash" ,bash-minimal)))
17027 (synopsis "Pythonic task execution")
17028 (description
17029 "Invoke is a Python task execution tool and library, drawing inspiration
17030 from various sources to arrive at a powerful and clean feature set. It is
17031 evolved from the Fabric project, but focuses on local and abstract concerns
17032 instead of servers and network commands.")
17033 (license license:bsd-3)))
17034
17035 (define-public python2-invoke
17036 (package-with-python2 python-invoke))
17037
17038 (define-public python-automat
17039 (package
17040 (name "python-automat")
17041 (version "20.2.0")
17042 (source (origin
17043 (method url-fetch)
17044 (uri (pypi-uri "Automat" version))
17045 (sha256
17046 (base32
17047 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
17048 (build-system python-build-system)
17049 ;; We disable the tests because they require python-twisted, while
17050 ;; python-twisted depends on python-automat. Twisted is optional, but the
17051 ;; tests fail if it is not available. Also see
17052 ;; <https://github.com/glyph/automat/issues/71>.
17053 (arguments
17054 `(#:tests? #f
17055 #:phases
17056 (modify-phases %standard-phases
17057 ;; Remove script, because it depends on python-twisted.
17058 (add-after 'unpack 'remove-entrypoint
17059 (lambda _
17060 (substitute* "setup.py"
17061 (("\"automat-visualize = automat._visualize:tool\"") "")))))))
17062 (native-inputs
17063 `(("python-m2r" ,python-m2r)
17064 ("python-setuptools-scm" ,python-setuptools-scm)
17065 ("python-graphviz" ,python-graphviz)))
17066 (propagated-inputs
17067 `(("python-six" ,python-six)
17068 ("python-attrs" ,python-attrs)))
17069 (home-page "https://github.com/glyph/Automat")
17070 (synopsis "Self-service finite-state machines")
17071 (description "Automat is a library for concise, idiomatic Python
17072 expression of finite-state automata (particularly deterministic finite-state
17073 transducers).")
17074 (license license:expat)))
17075
17076 (define-public python2-automat
17077 (package-with-python2 python-automat))
17078
17079 (define-public python-m2r
17080 (package
17081 (name "python-m2r")
17082 (version "0.2.1")
17083 (source (origin
17084 (method url-fetch)
17085 (uri (pypi-uri "m2r" version))
17086 (sha256
17087 (base32
17088 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
17089 (build-system python-build-system)
17090 (propagated-inputs
17091 `(("python-docutils" ,python-docutils)
17092 ("python-mistune" ,python-mistune)))
17093 (native-inputs
17094 `(("python-pygments" ,python-pygments)
17095 ("python-mock" ,python-mock)))
17096 (home-page "https://github.com/miyakogi/m2r")
17097 (synopsis "Markdown to reStructuredText converter")
17098 (description "M2R converts a markdown file including reST markups to valid
17099 reST format.")
17100 (license license:expat)))
17101
17102 (define-public python2-m2r
17103 (package-with-python2 python-m2r))
17104
17105 (define-public python-constantly
17106 (package
17107 (name "python-constantly")
17108 (version "15.1.0")
17109 (source (origin
17110 (method url-fetch)
17111 (uri (pypi-uri "constantly" version))
17112 (sha256
17113 (base32
17114 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
17115 (build-system python-build-system)
17116 (home-page "https://github.com/twisted/constantly")
17117 (synopsis "Symbolic constants in Python")
17118 (description "Constantly is a Python library that provides symbolic
17119 constant support. It includes collections and constants with text, numeric,
17120 and bit flag values.")
17121 (license license:expat)))
17122
17123 (define-public python2-constantly
17124 (package-with-python2 python-constantly))
17125
17126 (define-public python-attrs
17127 (package
17128 (name "python-attrs")
17129 (version "21.2.0")
17130 (source (origin
17131 (method url-fetch)
17132 (uri (pypi-uri "attrs" version))
17133 (sha256
17134 (base32
17135 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
17136 (build-system python-build-system)
17137 (arguments
17138 `(#:phases (modify-phases %standard-phases
17139 (replace 'check
17140 (lambda* (#:key tests? #:allow-other-keys)
17141 (when tests?
17142 (invoke "pytest")))))))
17143 (native-inputs
17144 `(("python-coverage" ,python-coverage)
17145 ("python-hypothesis" ,python-hypothesis)
17146 ("python-pympler" ,python-pympler)
17147 ("python-pytest" ,python-pytest)
17148 ("python-six" ,python-six)))
17149 (home-page "https://github.com/python-attrs/attrs/")
17150 (synopsis "Attributes without boilerplate")
17151 (description "@code{attrs} is a Python package with class decorators that
17152 ease the chores of implementing the most common attribute-related object
17153 protocols.")
17154 (license license:expat)))
17155
17156 (define-public python2-attrs
17157 (package-with-python2 python-attrs))
17158
17159 (define-public python-attrs-bootstrap
17160 (package
17161 (inherit python-attrs)
17162 (name "python-attrs-bootstrap")
17163 (native-inputs `())
17164 (arguments `(#:tests? #f))))
17165
17166 (define-public python2-attrs-bootstrap
17167 (package-with-python2 python-attrs-bootstrap))
17168
17169 (define-public python-cliapp
17170 (package
17171 (name "python-cliapp")
17172 (version "1.20180812.1")
17173 (source
17174 (origin
17175 (method url-fetch)
17176 (uri (string-append
17177 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17178 version ".tar.gz"))
17179 (sha256
17180 (base32
17181 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17182 (build-system python-build-system)
17183 (arguments
17184 `(;; XXX: The tests only do style and coverage checks, which
17185 ;; fails due to deprecation warnings, etc.
17186 #:tests? #f))
17187 (native-inputs
17188 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17189 ("python-pep8" ,python-pep8)))
17190 (propagated-inputs
17191 `(("python-pyaml" ,python-pyaml)))
17192 (home-page "https://liw.fi/cliapp/")
17193 (synopsis "Python framework for command line programs")
17194 (description "@code{cliapp} is a Python framework for command line
17195 programs. It contains the typical stuff such programs need to do, such
17196 as parsing the command line for options, and iterating over input files.")
17197 (license license:gpl2+)))
17198
17199 (define-public python2-cliapp
17200 (package-with-python2 python-cliapp))
17201
17202 (define-public python-ttystatus
17203 (package
17204 (name "python-ttystatus")
17205 (version "0.38")
17206 (source
17207 (origin
17208 (method git-fetch)
17209 (uri (git-reference
17210 (url "http://git.liw.fi/ttystatus")
17211 ;; There are no tags after ttystatus-0.36.
17212 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17213 (sha256
17214 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17215 (file-name (git-file-name name version))))
17216 (build-system python-build-system)
17217 (native-inputs
17218 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17219 ("python-pep8" ,python-pep8)))
17220 (arguments
17221 `(#:phases
17222 (modify-phases %standard-phases
17223 ;; check phase needs to be run before the build phase. If not,
17224 ;; coverage-test-runner looks for tests for the built source files,
17225 ;; and fails.
17226 (delete 'check)
17227 (add-before 'build 'check
17228 (lambda _ (invoke "make" "check"))))))
17229 (home-page "https://liw.fi/ttystatus/")
17230 (synopsis "Python library for showing progress reporting and
17231 status updates on terminals")
17232 (description "@code{ttystatus} is a Python library for showing progress
17233 reporting and status updates on terminals, for command line programs.
17234 Output is automatically adapted to the width of the terminal: truncated
17235 if it does not fit, and resized if the terminal size changes.")
17236 (license license:gpl3+)))
17237
17238 (define-public python2-ttystatus
17239 (package-with-python2 python-ttystatus))
17240
17241 (define-public python2-tracing
17242 (package
17243 (name "python2-tracing")
17244 (version "0.10")
17245 (source
17246 (origin
17247 (method url-fetch)
17248 (uri (string-append
17249 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17250 version ".tar.gz"))
17251 (sha256
17252 (base32
17253 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17254 (build-system python-build-system)
17255 (arguments
17256 `(#:python ,python-2))
17257 (home-page "https://liw.fi/tracing/")
17258 (synopsis "Python debug logging helper")
17259 (description "@code{python2-tracing} is a python library for
17260 logging debug messages. It provides a way to turn debugging messages
17261 on and off, based on the filename they occur in. It is much faster
17262 than using @code{logging.Filter} to accomplish the same thing, which
17263 matters when code is run in production mode. The actual logging still
17264 happens using the @code{logging} library.")
17265 (license license:gpl3+)))
17266
17267 (define-public python-astroid
17268 (package
17269 (name "python-astroid")
17270 (version "2.6.6")
17271 (source
17272 (origin
17273 (method git-fetch)
17274 (uri (git-reference
17275 (url "https://github.com/PyCQA/astroid")
17276 (commit (string-append "v" version))))
17277 (file-name (git-file-name name version))
17278 (sha256
17279 (base32 "1amzf996inwmh4r3mlpzmch60xs6lrg86vppfnwl1y0l8r0y7zxh"))))
17280 (build-system python-build-system)
17281 (propagated-inputs
17282 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17283 ("python-wrapt" ,python-wrapt)))
17284 (native-inputs
17285 `(("python-pytest" ,python-pytest)
17286 ("python-pytest-runner" ,python-pytest-runner)))
17287 (home-page "https://github.com/PyCQA/astroid")
17288 (synopsis "Common base representation of python source code for pylint and
17289 other projects")
17290 (description "@code{python-astroid} provides a common base representation
17291 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17292
17293 It provides a compatible representation which comes from the _ast module. It
17294 rebuilds the tree generated by the builtin _ast module by recursively walking
17295 down the AST and building an extended ast. The new node classes have
17296 additional methods and attributes for different usages. They include some
17297 support for static inference and local name scopes. Furthermore, astroid
17298 builds partial trees by inspecting living objects.")
17299 (license license:lgpl2.1+)
17300 (properties `((python2-variant . ,(delay python2-astroid))))))
17301
17302 (define-public python2-astroid
17303 (let ((base (package-with-python2
17304 (strip-python2-variant python-astroid))))
17305 (package (inherit base)
17306 ;; Version 2.x removes python2 support.
17307 (version "1.6.5")
17308 (source
17309 (origin
17310 (method url-fetch)
17311 (uri (pypi-uri "astroid" version))
17312 (sha256
17313 (base32
17314 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17315 (arguments
17316 (substitute-keyword-arguments (package-arguments base)
17317 ((#:phases phases)
17318 `(modify-phases ,phases
17319 (add-after 'unpack 'remove-spurious-test
17320 (lambda _
17321 ;; https://github.com/PyCQA/astroid/issues/276
17322 (delete-file "astroid/tests/unittest_brain.py")
17323 #t))
17324 (replace 'check
17325 (lambda _
17326 (invoke"python" "-m" "unittest" "discover"
17327 "-p" "unittest*.py")))))))
17328 (native-inputs `())
17329 (propagated-inputs
17330 `(("python2-backports-functools-lru-cache"
17331 ,python2-backports-functools-lru-cache)
17332 ("python2-enum34" ,python2-enum34)
17333 ("python2-singledispatch" ,python2-singledispatch)
17334 ,@(alist-delete "python-typed-ast"
17335 (package-propagated-inputs base)))))))
17336
17337 (define-public python-isbnlib
17338 (package
17339 (name "python-isbnlib")
17340 (version "3.10.4")
17341 (source
17342 (origin
17343 (method url-fetch)
17344 (uri (pypi-uri "isbnlib" version))
17345 (sha256
17346 (base32
17347 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
17348 (build-system python-build-system)
17349 (arguments '(#:tests? #f)) ; No test
17350 (home-page "https://github.com/xlcnd/isbnlib")
17351 (synopsis "Python library to work with ISBN strings")
17352 (description "@code{python-isbnlib} is a (pure) python library that provides
17353 several useful methods and functions to validate, clean, transform, hyphenate and
17354 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
17355 version, is suitable to be include as a dependency in other projects.")
17356 (license license:lgpl3+)))
17357
17358 (define-public python-isort
17359 (package
17360 (name "python-isort")
17361 (version "5.7.0")
17362 (source
17363 (origin
17364 (method git-fetch)
17365 (uri (git-reference
17366 ;; Tests pass only from the Github sources
17367 (url "https://github.com/timothycrosley/isort")
17368 (commit version)))
17369 (file-name (git-file-name name version))
17370 (modules '((guix build utils)))
17371 (snippet '(for-each delete-file (find-files "." "\\.whl$")))
17372 (sha256
17373 (base32
17374 "0phq4s911mjjdyr5h5siz93jnpkqb2qgphgcfk6axncgxr8i7vi1"))))
17375 (build-system python-build-system)
17376 (arguments
17377 `(#:phases
17378 (modify-phases %standard-phases
17379 ;; A foretaste of what our future python-build-system will need to
17380 ;; do.
17381 (replace 'build
17382 (lambda _
17383 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
17384 (replace 'install
17385 (lambda* (#:key outputs #:allow-other-keys)
17386 (let ((out (assoc-ref outputs "out"))
17387 (whl (car (find-files "dist" "\\.whl$"))))
17388 (invoke "pip" "--no-cache-dir" "--no-input"
17389 "install" "--no-deps" "--prefix" out whl))))
17390 (add-after 'install 'install-example-plugins
17391 (lambda* (#:key outputs #:allow-other-keys)
17392 (let ((out (assoc-ref outputs "out")))
17393 ;; Patch to use the core poetry API.
17394 (substitute* '("example_isort_formatting_plugin/pyproject.toml"
17395 "example_shared_isort_profile/pyproject.toml")
17396 (("poetry>=0.12")
17397 "poetry-core>=1.0.0")
17398 (("poetry.masonry.api")
17399 "poetry.core.masonry.api"))
17400 ;; Build the example plugins.
17401 (for-each (lambda (source-directory)
17402 (invoke "python" "-m" "build" "--wheel"
17403 "--no-isolation" "--outdir=dist"
17404 source-directory))
17405 '("example_isort_formatting_plugin"
17406 "example_shared_isort_profile"))
17407 ;; Install them to temporary storage, for the test.
17408 (setenv "HOME" (getcwd))
17409 (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
17410 (apply invoke "pip" "--no-cache-dir" "--no-input"
17411 "install" "--user" "--no-deps" example-whls)))))
17412 (replace 'check
17413 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17414 (when tests?
17415 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
17416 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
17417 (add-installed-pythonpath inputs outputs)
17418 (invoke "pytest" "-vv" "tests/unit/"
17419 "--ignore=tests/unit/test_deprecated_finders.py")))))))
17420 (native-inputs
17421 `(("git" ,git-minimal)
17422 ("python-black" ,python-black)
17423 ("python-colorama" ,python-colorama)
17424 ("python-hypothesmith" ,python-hypothesmith)
17425 ("python-libcst" ,python-libcst-minimal)
17426 ("python-poetry-core" ,python-poetry-core)
17427 ("python-pylama" ,python-pylama)
17428 ("python-pypa-build" ,python-pypa-build)
17429 ("python-pytest-mock" ,python-pytest-mock)
17430 ("python-pytest" ,python-pytest)))
17431 (home-page "https://github.com/PyCQA/isort")
17432 (synopsis "Python utility/library to sort python imports")
17433 (description "@code{python-isort} is a python utility/library to sort
17434 imports alphabetically, and automatically separated into sections. It
17435 provides a command line utility, a python library and plugins for various
17436 editors.")
17437 (license license:expat)
17438 (properties `((python2-variant . ,(delay python2-isort))))))
17439
17440 (define-public python2-isort
17441 (let ((base (package-with-python2
17442 (strip-python2-variant python-isort))))
17443 (package/inherit base
17444 (native-inputs
17445 `(("python2-futures" ,python2-futures)
17446 ,@(package-native-inputs base))))))
17447
17448 (define-public python2-backports-functools-lru-cache
17449 (package
17450 (name "python2-backports-functools-lru-cache")
17451 (version "1.6.1")
17452 (source
17453 (origin
17454 (method url-fetch)
17455 ;; only the pypi tarballs contain the necessary metadata
17456 (uri (pypi-uri "backports.functools_lru_cache" version))
17457 (sha256
17458 (base32
17459 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
17460 (build-system python-build-system)
17461 (native-inputs
17462 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
17463 (arguments
17464 `(#:python ,python-2))
17465 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
17466 (synopsis "Backport of functools.lru_cache from Python 3.3")
17467 (description "@code{python2-backports-functools-lru-cache} is a backport
17468 of @code{functools.lru_cache} from python 3.3.")
17469 (license license:expat)))
17470
17471 (define-public python-configparser
17472 (package
17473 (name "python-configparser")
17474 (version "4.0.2")
17475 (source
17476 (origin
17477 (method url-fetch)
17478 (uri (pypi-uri "configparser" version))
17479 (sha256
17480 (base32
17481 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
17482 (native-inputs
17483 `(("python-setuptools_scm" ,python-setuptools-scm)))
17484 (build-system python-build-system)
17485 (home-page "https://github.com/jaraco/configparser/")
17486 (synopsis "Backport of configparser from python 3.5")
17487 (description "@code{python-configparser} is a backport of
17488 @code{configparser} from Python 3.5 so that it can be used directly
17489 in other versions.")
17490 (license license:expat)))
17491
17492 (define-public python2-configparser
17493 (package-with-python2 python-configparser))
17494
17495 (define-public python-iniconfig
17496 (package
17497 (name "python-iniconfig")
17498 (version "1.1.1")
17499 (source
17500 (origin
17501 (method url-fetch)
17502 (uri (pypi-uri "iniconfig" version))
17503 (sha256
17504 (base32
17505 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
17506 (build-system python-build-system)
17507 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
17508 (synopsis "Simple INI-file parser")
17509 (description "The @code{iniconfig} package provides a small and simple
17510 INI-file parser module having a unique set of features; @code{iniconfig}
17511 @itemize
17512 @item maintains the order of sections and entries;
17513 @item supports multi-line values with or without line-continuations;
17514 @item supports \"#\" comments everywhere;
17515 @item raises errors with proper line-numbers;
17516 @item raises an error when two sections have the same name.
17517 @end itemize")
17518 (license license:expat)))
17519
17520 (define-public python-mamba
17521 (package
17522 (name "python-mamba")
17523 (version "0.11.2")
17524 (source (origin
17525 (method url-fetch)
17526 (uri (pypi-uri "mamba" version))
17527 (sha256
17528 (base32
17529 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
17530 (build-system python-build-system)
17531 (arguments `(#:tests? #f)) ; No test
17532 (propagated-inputs
17533 `(("python-clint" ,python-clint)
17534 ("python-coverage" ,python-coverage)))
17535 (home-page "https://nestorsalceda.com/mamba/")
17536 (synopsis "Test runner for Python")
17537 (description
17538 "Mamba is a Behaviour-Driven Development tool for Python developers.
17539 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
17540 (license license:expat)))
17541
17542 (define-public python-mando
17543 (package
17544 (name "python-mando")
17545 (version "0.6.4")
17546 (source (origin
17547 (method url-fetch)
17548 (uri (pypi-uri "mando" version))
17549 (sha256
17550 (base32
17551 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
17552 (build-system python-build-system)
17553 (propagated-inputs
17554 `(("python-rst2ansi" ,python-rst2ansi)
17555 ("python-six" ,python-six)))
17556 (native-inputs
17557 `(("python-pytest" ,python-pytest)))
17558 (home-page "https://mando.readthedocs.org/")
17559 (synopsis
17560 "Wrapper around argparse, allowing creation of complete CLI applications")
17561 (description
17562 "This package is a wrapper around argparse, allowing you to write complete CLI
17563 applications in seconds while maintaining all the flexibility.")
17564 (license license:expat)))
17565
17566 (define-public python2-mando
17567 (package-with-python2 python-mando))
17568
17569 (define-public python2-argparse
17570 (package
17571 (name "python2-argparse")
17572 (version "1.4.0")
17573 (source
17574 (origin
17575 (method url-fetch)
17576 (uri (pypi-uri "argparse" version))
17577 (sha256
17578 (base32
17579 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
17580 (build-system python-build-system)
17581 (arguments
17582 `(#:python ,python-2))
17583 (home-page "https://github.com/ThomasWaldmann/argparse/")
17584 (synopsis "Python command-line parsing library")
17585 (description
17586 "This package is mostly for people who want to have @code{argparse} on
17587 older Pythons because it was not part of the standard library back then.")
17588 (license license:psfl)))
17589
17590 (define-public python-mwclient
17591 (package
17592 (name "python-mwclient")
17593 (version "0.10.1")
17594 (source
17595 (origin
17596 (method git-fetch)
17597 ;; The PyPI version wouldn't contain tests.
17598 (uri (git-reference
17599 (url "https://github.com/mwclient/mwclient")
17600 (commit (string-append "v" version))))
17601 (file-name (git-file-name name version))
17602 (sha256
17603 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
17604 (build-system python-build-system)
17605 (propagated-inputs
17606 `(("python-requests-oauthlib" ,python-requests-oauthlib)
17607 ("python-six" ,python-six)))
17608 (native-inputs
17609 `(("python-mock" ,python-mock)
17610 ("python-pytest" ,python-pytest)
17611 ("python-pytest-cov" ,python-pytest-cov)
17612 ("python-pytest-runner" ,python-pytest-runner)
17613 ("python-responses" ,python-responses)))
17614 (home-page "https://github.com/btongminh/mwclient")
17615 (synopsis "MediaWiki API client")
17616 (description "This package provides a MediaWiki API client.")
17617 (license license:expat)))
17618
17619 (define-public python-utils
17620 (package
17621 (name "python-utils")
17622 (version "2.4.0")
17623 (source (origin
17624 (method url-fetch)
17625 (uri (pypi-uri "python-utils" version))
17626 (sha256
17627 (base32
17628 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
17629 (build-system python-build-system)
17630 (arguments
17631 `(#:phases
17632 (modify-phases %standard-phases
17633 (replace 'check
17634 (lambda* (#:key inputs outputs #:allow-other-keys)
17635 (add-installed-pythonpath inputs outputs)
17636 (delete-file "pytest.ini")
17637 (invoke "pytest" "-vv"))))))
17638 (native-inputs
17639 `(("pytest-runner" ,python-pytest-runner)
17640 ("pytest" ,python-pytest)
17641 ("six" ,python-six)))
17642 (home-page "https://github.com/WoLpH/python-utils")
17643 (synopsis "Convenient utilities not included with the standard Python install")
17644 (description
17645 "Python Utils is a collection of small Python functions and classes which
17646 make common patterns shorter and easier.")
17647 (license license:bsd-2)))
17648
17649 (define-public python-diff-match-patch
17650 (package
17651 (name "python-diff-match-patch")
17652 (version "20121119")
17653 (source
17654 (origin
17655 (method url-fetch)
17656 (uri (pypi-uri "diff-match-patch" version))
17657 (sha256
17658 (base32
17659 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
17660 (build-system python-build-system)
17661 (home-page "https://code.google.com/p/google-diff-match-patch")
17662 (synopsis "Synchronize plain text")
17663 (description "Diff Match and Patch libraries offer robust algorithms to
17664 perform the operations required for synchronizing plain text.")
17665 (license license:asl2.0)))
17666
17667 (define-public python2-diff-match-patch
17668 (package-with-python2 python-diff-match-patch))
17669
17670 (define-public python-dirsync
17671 (package
17672 (name "python-dirsync")
17673 (version "2.2.5")
17674 (source
17675 (origin
17676 (method url-fetch)
17677 (uri (pypi-uri "dirsync" version))
17678 (sha256
17679 (base32
17680 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
17681 (build-system python-build-system)
17682 (propagated-inputs
17683 `(("six" ,python-six)))
17684 (home-page "https://github.com/tkhyn/dirsync")
17685 (synopsis "Advanced directory tree synchronisation tool")
17686 (description "Advanced directory tree synchronisation tool.")
17687 (license license:expat)))
17688
17689 (define-public python2-dirsync
17690 (package-with-python2 python-dirsync))
17691
17692 (define-public python-levenshtein
17693 (package
17694 (name "python-levenshtein")
17695 (version "0.12.0")
17696 (source
17697 (origin
17698 (method url-fetch)
17699 (uri (pypi-uri "python-Levenshtein" version))
17700 (sha256
17701 (base32
17702 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
17703 (build-system python-build-system)
17704 (home-page "https://github.com/ztane/python-Levenshtein")
17705 (synopsis "Fast computation of Levenshtein distance and string similarity")
17706 (description
17707 "The Levenshtein Python C extension module contains functions for fast computation of
17708 @enumerate
17709 @item Levenshtein (edit) distance, and edit operations
17710 @item string similarity
17711 @item approximate median strings, and generally string averaging
17712 @item string sequence and set similarity
17713 @end enumerate
17714 It supports both normal and Unicode strings.")
17715 (license license:gpl2+)))
17716
17717 (define-public python2-levenshtein
17718 (package-with-python2 python-levenshtein))
17719
17720 (define-public python-scandir
17721 (package
17722 (name "python-scandir")
17723 (version "1.10.0")
17724 (source
17725 (origin
17726 (method url-fetch)
17727 (uri (pypi-uri "scandir" version))
17728 (sha256
17729 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
17730 (build-system python-build-system)
17731 (arguments
17732 `(#:phases (modify-phases %standard-phases
17733 (replace 'check
17734 (lambda _
17735 (invoke "python" "test/run_tests.py"))))))
17736 (home-page "https://github.com/benhoyt/scandir")
17737 (synopsis "Directory iteration function")
17738 (description
17739 "Directory iteration function like os.listdir(), except that instead of
17740 returning a list of bare filenames, it yields DirEntry objects that include
17741 file type and stat information along with the name. Using scandir() increases
17742 the speed of os.walk() by 2-20 times (depending on the platform and file
17743 system) by avoiding unnecessary calls to os.stat() in most cases.
17744
17745 This package is part of the Python standard library since version 3.5.")
17746 (license license:bsd-3)))
17747
17748 (define-public python2-scandir
17749 (package-with-python2 python-scandir))
17750
17751 (define-public python2-stemming
17752 (package
17753 (name "python2-stemming")
17754 (version "1.0.1")
17755 (source
17756 (origin
17757 (method url-fetch)
17758 (uri (pypi-uri "stemming" version))
17759 (sha256
17760 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
17761 (build-system python-build-system)
17762 (arguments
17763 `(#:python ,python-2))
17764 (home-page "https://bitbucket.org/mchaput/stemming/overview")
17765 (synopsis "Python implementations of various stemming algorithms")
17766 (description
17767 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
17768 stemming algorithms for English. These implementations are straightforward and
17769 efficient, unlike some Python versions of the same algorithms available on the
17770 Web. This package is an extraction of the stemming code included in the Whoosh
17771 search engine.")
17772 (license license:public-domain)))
17773
17774 (define-public python-factory-boy
17775 (package
17776 (name "python-factory-boy")
17777 (version "2.8.1")
17778 (source
17779 (origin
17780 (method url-fetch)
17781 (uri (pypi-uri "factory_boy" version))
17782 (sha256
17783 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
17784 (build-system python-build-system)
17785 (arguments
17786 ;; Tests are not included in the tarball.
17787 `(#:tests? #f))
17788 (propagated-inputs
17789 `(("faker" ,python-faker)))
17790 (home-page "https://github.com/benhoyt/scandir")
17791 (synopsis "Versatile test fixtures replacement")
17792 (description
17793 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
17794
17795 As a fixtures replacement tool, it aims to replace static, hard to maintain
17796 fixtures with easy-to-use factories for complex object.
17797
17798 Instead of building an exhaustive test setup with every possible combination
17799 of corner cases, factory_boy allows you to use objects customized for the
17800 current test, while only declaring the test-specific fields")
17801 (license license:expat)))
17802
17803 (define-public python-translate-toolkit
17804 (package
17805 (name "python-translate-toolkit")
17806 (version "2.1.0")
17807 (source
17808 (origin
17809 (method url-fetch)
17810 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
17811 (sha256
17812 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
17813 (build-system python-build-system)
17814 (native-inputs
17815 `(("python-pytest" ,python-pytest)
17816 ("python-sphinx" ,python-sphinx)))
17817 (propagated-inputs
17818 `(("python-babel" ,python-babel)
17819 ("python-beautifulsoup4" ,python-beautifulsoup4)
17820 ("python-chardet" ,python-chardet)
17821 ("python-diff-match-patch" ,python-diff-match-patch)
17822 ("python-levenshtein" ,python-levenshtein)
17823 ("python-lxml" ,python-lxml)
17824 ("python-six" ,python-six)
17825 ("python-vobject" ,python-vobject)
17826 ("python-pyyaml" ,python-pyyaml)))
17827 (arguments
17828 ;; TODO: tests are not run, because they end with
17829 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
17830 ;; 'parse_funcs'
17831 ;; during test setup.
17832 `(#:tests? #f))
17833 (home-page "https://toolkit.translatehouse.org")
17834 (synopsis "Tools and API for translation and localization engineering")
17835 (description
17836 "Tools and API for translation and localization engineering. It contains
17837 several utilities, as well as an API for building localization tools.")
17838 (license license:gpl2+)))
17839
17840 (define-public python2-translate-toolkit
17841 (package-with-python2 python-translate-toolkit))
17842
17843 (define-public python-packaging
17844 (package
17845 (name "python-packaging")
17846 (version "20.0")
17847 (source
17848 (origin
17849 (method url-fetch)
17850 (uri (pypi-uri "packaging" version))
17851 ;; XXX: The URL in the patch file is wrong, it should be
17852 ;; <https://github.com/pypa/packaging/pull/256>.
17853 (patches (search-patches "python-packaging-test-arch.patch"))
17854 (sha256
17855 (base32
17856 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
17857 (build-system python-build-system)
17858 (arguments
17859 `(#:phases (modify-phases %standard-phases
17860 (replace 'check
17861 (lambda* (#:key tests? #:allow-other-keys)
17862 (if tests?
17863 (invoke "py.test" "-vv")
17864 (format #t "test suite not run~%"))
17865 #t)))))
17866 (native-inputs
17867 `(("python-pretend" ,python-pretend)
17868 ("python-pytest" ,python-pytest)))
17869 (propagated-inputs
17870 `(("python-pyparsing" ,python-pyparsing)
17871 ("python-six" ,python-six)))
17872 (home-page "https://github.com/pypa/packaging")
17873 (synopsis "Core utilities for Python packages")
17874 (description "Packaging is a Python module for dealing with Python packages.
17875 It offers an interface for working with package versions, names, and dependency
17876 information.")
17877 ;; From 'LICENSE': This software is made available under the terms of
17878 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
17879 ;; Contributions to this software is made under the terms of *both* these
17880 ;; licenses.
17881 (license (list license:asl2.0 license:bsd-2))))
17882
17883 (define-public python2-packaging
17884 (package-with-python2 python-packaging))
17885
17886 ;; Variants with minimal dependencies, for bootstrapping Pytest.
17887 (define-public python-packaging-bootstrap
17888 (hidden-package
17889 (package/inherit
17890 python-packaging
17891 (name "python-packaging-bootstrap")
17892 (arguments
17893 (substitute-keyword-arguments (package-arguments python-packaging)
17894 ((#:phases phases)
17895 `(modify-phases ,phases
17896 (add-after 'unpack 'fix-dependencies
17897 (lambda* (#:key tests? #:allow-other-keys)
17898 (substitute* "setup.py" (("\"six\"") ""))))))
17899 ((#:tests? _ #f) #f)))
17900 (native-inputs '())
17901 (propagated-inputs
17902 `(("python-pyparsing" ,python-pyparsing))))))
17903
17904 (define-public python2-packaging-bootstrap
17905 (hidden-package
17906 (package/inherit
17907 python2-packaging
17908 (name "python2-packaging-bootstrap")
17909 (native-inputs '())
17910 (propagated-inputs
17911 `(("python-pyparsing" ,python2-pyparsing)
17912 ("python-six" ,python2-six-bootstrap)))
17913 (arguments
17914 `(#:tests? #f
17915 ,@(package-arguments python2-packaging))))))
17916
17917 (define-public python-relatorio
17918 (package
17919 (name "python-relatorio")
17920 (version "0.8.0")
17921 (source
17922 (origin
17923 (method url-fetch)
17924 (uri (pypi-uri "relatorio" version))
17925 (sha256
17926 (base32
17927 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
17928 (build-system python-build-system)
17929 (propagated-inputs
17930 `(("python-lxml" ,python-lxml)
17931 ("python-genshi" ,python-genshi)))
17932 (native-inputs
17933 `(("python-magic" ,python-magic)))
17934 (home-page "https://relatorio.tryton.org/")
17935 (synopsis "Templating library able to output ODT and PDF files")
17936 (description "Relatorio is a templating library which provides a way to
17937 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
17938 for more filetypes can be easily added by creating plugins for them.")
17939 (license license:gpl3+)))
17940
17941 (define-public python2-relatorio
17942 (package-with-python2 python-relatorio))
17943
17944 (define-public python-radon
17945 (package
17946 (name "python-radon")
17947 (version "4.1.0")
17948 (source
17949 (origin
17950 (method url-fetch)
17951 (uri (pypi-uri "radon" version))
17952 (sha256
17953 (base32
17954 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
17955 (build-system python-build-system)
17956 (arguments
17957 `(#:phases (modify-phases %standard-phases
17958 (add-after 'unpack 'relax-requirements
17959 (lambda _
17960 (substitute* "setup.py"
17961 ((".*'future'.*")
17962 "")
17963 (("colorama==0.4.1")
17964 "colorama>=0.4.1"))))
17965 (replace 'check
17966 (lambda _
17967 (invoke "python" "radon/tests/run.py"))))))
17968 (propagated-inputs
17969 `(("python-colorama" ,python-colorama)
17970 ("python-flake8-polyfill" ,python-flake8-polyfill)
17971 ("python-mando" ,python-mando)))
17972 (native-inputs
17973 `(("python-pytest" ,python-pytest)
17974 ("python-pytest-mock" ,python-pytest-mock)))
17975 (home-page "https://radon.readthedocs.org/")
17976 (synopsis "Code Metrics in Python")
17977 (description "Radon is a Python tool which computes various code metrics.
17978 Supported metrics are:
17979 @itemize @bullet
17980 @item raw metrics: SLOC, comment lines, blank lines, &c.
17981 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
17982 @item Halstead metrics (all of them)
17983 @item the Maintainability Index (a Visual Studio metric)
17984 @end itemize")
17985 (properties `((python2-variant . ,(delay python2-radon))))
17986 (license license:expat)))
17987
17988 (define-public python2-radon
17989 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
17990 (package/inherit base
17991 (propagated-inputs
17992 `(("python-configparser" ,python2-configparser)
17993 ("python-future" ,python2-future)
17994 ,@(package-propagated-inputs base))))))
17995
17996 (define-public python-sure
17997 (package
17998 (name "python-sure")
17999 (version "1.4.11")
18000 (source
18001 (origin
18002 (method url-fetch)
18003 (uri (pypi-uri "sure" version))
18004 (sha256
18005 (base32
18006 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
18007 (build-system python-build-system)
18008 (propagated-inputs
18009 `(("python-mock" ,python-mock)
18010 ("python-six" ,python-six)))
18011 (native-inputs
18012 `(("python-nose" ,python-nose)))
18013 (home-page "https://github.com/gabrielfalcao/sure")
18014 (synopsis "Automated testing library in python for python")
18015 (description
18016 "Sure is a python library that leverages a DSL for writing assertions.
18017 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
18018 (license license:gpl3+)))
18019
18020 (define-public python2-sure
18021 (package-with-python2 python-sure))
18022
18023 (define-public python2-couleur
18024 ;; This package does not seem to support python3 at all, hence,
18025 ;; only the python2 variant definition is provided.
18026 (package
18027 (name "python2-couleur")
18028 (version "0.6.2")
18029 (source
18030 (origin
18031 (method url-fetch)
18032 (uri (pypi-uri "couleur" version))
18033 (sha256
18034 (base32
18035 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
18036 (build-system python-build-system)
18037 (arguments
18038 `(#:python ,python-2))
18039 (home-page "https://github.com/gabrielfalcao/couleur")
18040 (synopsis
18041 "ANSI terminal tool for python, colored shell and other handy fancy features")
18042 (description
18043 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
18044 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
18045 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
18046 ;; https://github.com/gabrielfalcao/couleur/issues/11
18047 (license license:lgpl3+)))
18048
18049 (define-public python-misaka
18050 (package
18051 (name "python-misaka")
18052 (version "2.1.1")
18053 (source
18054 (origin
18055 (method url-fetch)
18056 (uri (pypi-uri "misaka" version))
18057 (sha256
18058 (base32
18059 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
18060 (build-system python-build-system)
18061 (arguments
18062 `(;; Line 37 of setup.py calls self.run_command('develop')
18063 ;; in the 'check' phase. This command seems to be trying
18064 ;; to write to
18065 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
18066 ;; for which it does not have the permission to write.
18067 #:tests? #f))
18068 (propagated-inputs
18069 `(("python-cffi" ,python-cffi)))
18070 (home-page "https://github.com/FSX/misaka")
18071 (synopsis "Python binding for Hoedown")
18072 (description
18073 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
18074 library written in C. It features a fast HTML renderer and functionality to make custom
18075 renderers (e.g. man pages or LaTeX).")
18076 (license license:expat)))
18077
18078 (define-public python2-misaka
18079 (package-with-python2 python-misaka))
18080
18081 (define-public python2-steadymark
18082 ;; This is forced into being a python2 only variant
18083 ;; due to its dependence on couleur that has no support
18084 ;; for python3
18085 (package
18086 (name "python2-steadymark")
18087 (version "0.7.3")
18088 (source
18089 (origin
18090 (method url-fetch)
18091 (uri (pypi-uri "steadymark" version))
18092 (sha256
18093 (base32
18094 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
18095 (build-system python-build-system)
18096 (native-inputs
18097 `(("python-couleur" ,python2-couleur)
18098 ("python-sure" ,python2-sure)
18099 ("python-misaka" ,python2-misaka)))
18100 (arguments
18101 `(#:python ,python-2
18102 #:phases
18103 (modify-phases %standard-phases
18104 (add-before 'build 'patch-setup-py
18105 (lambda _
18106 ;; Update requirements from dependency==version
18107 ;; to dependency>=version
18108 (substitute* "setup.py"
18109 (("==") ">="))
18110 #t)))))
18111 (home-page "https://github.com/gabrielfalcao/steadymark")
18112 (synopsis "Markdown-based test runner for python")
18113 (description
18114 "@code{Steadymark} allows documentation to be written in github-flavoured
18115 markdown. The documentation may contain snippets of code surrounded by python
18116 code blocks and @code{Steadymark} will find these snippets and run them, making
18117 sure that there are no old malfunctional examples in the documentation examples.")
18118 (license license:expat)))
18119
18120 (define-public python-jsonpointer
18121 (package
18122 (name "python-jsonpointer")
18123 (version "1.10")
18124 (source
18125 (origin
18126 (method url-fetch)
18127 (uri (pypi-uri "jsonpointer" version))
18128 (sha256
18129 (base32
18130 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
18131 (build-system python-build-system)
18132 (home-page "https://github.com/stefankoegl/python-json-pointer")
18133 (synopsis "Identify specific nodes in a JSON document")
18134 (description "@code{jsonpointer} allows you to access specific nodes
18135 by path in a JSON document (see RFC 6901).")
18136 (license license:bsd-3)))
18137
18138 (define-public python2-jsonpointer
18139 (package-with-python2 python-jsonpointer))
18140
18141 (define-public python-jsonpatch
18142 (package
18143 (name "python-jsonpatch")
18144 (version "1.16")
18145 (source
18146 (origin
18147 (method git-fetch)
18148 ;; pypi version lacks tests.js
18149 (uri (git-reference
18150 (url "https://github.com/stefankoegl/python-json-patch")
18151 (commit (string-append "v" version))))
18152 (file-name (git-file-name name version))
18153 (sha256
18154 (base32
18155 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18156 (build-system python-build-system)
18157 (propagated-inputs
18158 `(("python-jsonpointer" ,python-jsonpointer)))
18159 (home-page "https://github.com/stefankoegl/python-json-patch")
18160 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18161 (description "@code{jsonpatch} is a library and program that allows
18162 applying JSON Patches according to RFC 6902.")
18163 (license license:bsd-3)))
18164
18165 (define-public python2-jsonpatch
18166 (package-with-python2 python-jsonpatch))
18167
18168 (define-public python-jsonpatch-0.4
18169 (package (inherit python-jsonpatch)
18170 (name "python-jsonpatch")
18171 (version "0.4")
18172 (source
18173 (origin
18174 (method git-fetch)
18175 (uri (git-reference
18176 (url "https://github.com/stefankoegl/python-json-patch")
18177 (commit (string-append "v" version))))
18178 (file-name (git-file-name name version))
18179 (sha256
18180 (base32
18181 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18182
18183 (define-public python2-jsonpatch-0.4
18184 (package-with-python2 python-jsonpatch-0.4))
18185
18186 (define-public python-rfc3986
18187 (package
18188 (name "python-rfc3986")
18189 (version "1.4.0")
18190 (source (origin
18191 (method url-fetch)
18192 (uri (pypi-uri "rfc3986" version))
18193 (sha256
18194 (base32
18195 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18196 (build-system python-build-system)
18197 (arguments
18198 `(#:phases
18199 (modify-phases %standard-phases
18200 (replace 'check
18201 (lambda _
18202 (invoke "pytest" "-v"))))))
18203 (native-inputs
18204 `(("python-pytest" ,python-pytest)))
18205 (home-page "https://rfc3986.readthedocs.io/")
18206 (synopsis "Parse and validate URI references")
18207 (description
18208 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18209 validation and authority parsing. This module also supports RFC@tie{}6874
18210 which adds support for zone identifiers to IPv6 addresses.")
18211 (license license:asl2.0)))
18212
18213 (define-public python2-rfc3986
18214 (package-with-python2 python-rfc3986))
18215
18216 (define-public python-rfc3987
18217 (package
18218 (name "python-rfc3987")
18219 (version "1.3.7")
18220 (source
18221 (origin
18222 (method url-fetch)
18223 (uri (pypi-uri "rfc3987" version))
18224 (sha256
18225 (base32
18226 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18227 (build-system python-build-system)
18228 (home-page "https://pypi.org/project/rfc3987/")
18229 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18230 (description "@code{rfc3987} provides routines for parsing and
18231 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18232 (license license:gpl3+)))
18233
18234 (define-public python2-rfc3987
18235 (package-with-python2 python-rfc3987))
18236
18237 ;; The latest commit contains fixes for building with both python3 and python2.
18238 (define-public python-rfc6555
18239 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18240 (revision "1"))
18241 (package
18242 (name "python-rfc6555")
18243 (version (git-version "0.0.0" revision commit))
18244 (source (origin
18245 (method git-fetch)
18246 (uri (git-reference
18247 (url "https://github.com/sethmlarson/rfc6555")
18248 (commit commit)))
18249 (file-name (git-file-name name version))
18250 (sha256
18251 (base32
18252 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18253 (build-system python-build-system)
18254 (arguments
18255 '(#:phases
18256 (modify-phases %standard-phases
18257 (replace 'check
18258 (lambda* (#:key tests? #:allow-other-keys)
18259 (if tests?
18260 ;; Other tests require network access.
18261 (invoke "pytest" "tests/test_ipv6.py")
18262 #t))))))
18263 (native-inputs
18264 `(("python-pytest" ,python-pytest)))
18265 (home-page "https://pypi.org/project/rfc6555/")
18266 (synopsis "Python implementation of RFC 6555")
18267 (description
18268 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18269 6555. Provided with a single file and dead-simple API to allow easy vendoring
18270 and integration into other projects.")
18271 (license license:asl2.0))))
18272
18273 (define-public python-bagit
18274 (package
18275 (name "python-bagit")
18276 (version "1.7.0")
18277 (source
18278 (origin
18279 (method url-fetch)
18280 (uri (pypi-uri "bagit" version))
18281 (sha256
18282 (base32
18283 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18284 (build-system python-build-system)
18285 (native-inputs
18286 `(("python-setuptools-scm" ,python-setuptools-scm)
18287 ("python-coverage" ,python-coverage)
18288 ("python-mock" ,python-mock)))
18289 (home-page "https://libraryofcongress.github.io/bagit-python/")
18290 (synopsis "Create and validate BagIt packages")
18291 (description "Bagit is a Python library and command line utility for working
18292 with BagIt style packages. BagIt is a minimalist packaging format for digital
18293 preservation.")
18294 (license license:cc0)))
18295
18296 (define-public python-prov
18297 (package
18298 (name "python-prov")
18299 (version "2.0.0")
18300 (source
18301 (origin
18302 (method url-fetch)
18303 (uri (pypi-uri "prov" version))
18304 (sha256
18305 (base32
18306 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18307 (build-system python-build-system)
18308 (propagated-inputs
18309 `(("python-dateutil" ,python-dateutil)
18310 ("python-lxml" ,python-lxml)
18311 ("python-networkx" ,python-networkx)
18312 ("python-rdflib" ,python-rdflib)))
18313 (native-inputs
18314 `(("graphviz" ,graphviz)
18315 ("python-pydot" ,python-pydot)))
18316 (home-page "https://github.com/trungdong/prov")
18317 (synopsis
18318 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18319 (description
18320 "This package provides a library for W3C Provenance Data Model supporting
18321 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18322 (license license:expat)))
18323
18324 (define-public python-arcp
18325 (package
18326 (name "python-arcp")
18327 (version "0.2.1")
18328 (source
18329 (origin
18330 (method url-fetch)
18331 (uri (pypi-uri "arcp" version))
18332 (sha256
18333 (base32
18334 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
18335 (build-system python-build-system)
18336 (native-inputs
18337 `(("python-pytest" ,python-pytest)))
18338 (home-page "http://arcp.readthedocs.io/")
18339 (synopsis
18340 "Archive and Package URI parser and generator")
18341 (description
18342 "@acronym{arcp, Archive and Package} provides functions for creating
18343 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
18344 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
18345 consume or reference hypermedia resources bundled inside a file archive or an
18346 application package, as well as to resolve URIs for archive resources within a
18347 programmatic framework. This URI scheme provides mechanisms to generate a
18348 unique base URI to represent the root of the archive, so that relative URI
18349 references in a bundled resource can be resolved within the archive without
18350 having to extract the archive content on the local file system. An arcp URI can
18351 be used for purposes of isolation (e.g. when consuming multiple archives),
18352 security constraints (avoiding \"climb out\" from the archive), or for
18353 externally identiyfing sub-resources referenced by hypermedia formats.")
18354 (license license:asl2.0)))
18355
18356 (define-public python-shellescape
18357 (package
18358 (name "python-shellescape")
18359 (version "3.8.1")
18360 (source
18361 (origin
18362 (method git-fetch)
18363 (uri (git-reference
18364 (url "https://github.com/chrissimpkins/shellescape")
18365 (commit (string-append "v" version))))
18366 (file-name (git-file-name name version))
18367 (sha256
18368 (base32
18369 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
18370 (build-system python-build-system)
18371 (arguments
18372 '(#:phases
18373 (modify-phases %standard-phases
18374 (replace 'check
18375 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18376 (when tests?
18377 (add-installed-pythonpath inputs outputs)
18378 (invoke "python" "tests/test_shellescape.py"))
18379 #t)))))
18380 (native-inputs
18381 `(("python-pytest" ,python-pytest)))
18382 (home-page "https://github.com/chrissimpkins/shellescape")
18383 (synopsis
18384 "Shell escape a string to safely use it as a token in a shell command")
18385 (description
18386 "The shellescape Python module defines the @code{shellescape.quote()}
18387 function that returns a shell-escaped version of a Python string. This is a
18388 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
18389 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
18390 (license license:expat)))
18391
18392 (define-public python-validators
18393 (package
18394 (name "python-validators")
18395 (version "0.14.2")
18396 (source (origin
18397 (method url-fetch)
18398 (uri (pypi-uri "validators" version))
18399 (sha256
18400 (base32
18401 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
18402 (build-system python-build-system)
18403 (arguments
18404 '(#:phases (modify-phases %standard-phases
18405 (replace 'check
18406 (lambda _
18407 (invoke "pytest" "-vv"))))))
18408 (propagated-inputs
18409 `(("python-decorator" ,python-decorator)
18410 ("python-six" ,python-six)))
18411 (native-inputs
18412 `(("python-flake8" ,python-flake8)
18413 ("python-isort" ,python-isort)
18414 ("python-pytest" ,python-pytest)))
18415 (home-page "https://github.com/kvesteri/validators")
18416 (synopsis "Data validation library")
18417 (description
18418 "This package contains validators for different things such as email
18419 addresses, IP addresses, URLs, hashes and more. It has been designed to
18420 be easy to use and not require defining a schema or form just to validate
18421 some input.")
18422 (license license:expat)))
18423
18424 (define-public python2-validators
18425 (package-with-python2 python-validators))
18426
18427 (define-public python-validate-email
18428 (package
18429 (name "python-validate-email")
18430 (version "1.3")
18431 (source
18432 (origin
18433 (method url-fetch)
18434 (uri (pypi-uri "validate_email" version))
18435 (sha256
18436 (base32
18437 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
18438 (build-system python-build-system)
18439 (home-page "https://github.com/syrusakbary/validate_email")
18440 (synopsis "Verifies if an email address is valid and really exists")
18441 (description "@code{validate_email} can be used to verify if an email
18442 address is valid and really exists.")
18443 (license license:lgpl3+)))
18444
18445 (define-public python2-validate-email
18446 (package-with-python2 python-validate-email))
18447
18448 (define-public python-flex
18449 (package
18450 (name "python-flex")
18451 (version "6.10.0")
18452 (source
18453 (origin
18454 (method url-fetch)
18455 (uri (pypi-uri "flex" version))
18456 (sha256
18457 (base32
18458 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
18459 (build-system python-build-system)
18460 (propagated-inputs
18461 `(("python-click" ,python-click)
18462 ("python-iso8601" ,python-iso8601)
18463 ("python-jsonpointer" ,python-jsonpointer)
18464 ("python-pyyaml" ,python-pyyaml)
18465 ("python-requests" ,python-requests)
18466 ("python-rfc3987" ,python-rfc3987)
18467 ("python-six" ,python-six)
18468 ("python-validate-email" ,python-validate-email)))
18469 (home-page "https://github.com/pipermerriam/flex")
18470 (synopsis "Validates Swagger schemata")
18471 (description "@code{flex} can be used to validate Swagger schemata.")
18472 (license license:bsd-3)))
18473
18474 (define-public python2-flex
18475 (package-with-python2 python-flex))
18476
18477 (define-public python-marshmallow
18478 (package
18479 (name "python-marshmallow")
18480 (version "3.9.1")
18481 (source
18482 (origin
18483 (method url-fetch)
18484 (uri (pypi-uri "marshmallow" version))
18485 (sha256
18486 (base32
18487 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
18488 (build-system python-build-system)
18489 (propagated-inputs
18490 `(("python-dateutil" ,python-dateutil)
18491 ("python-simplejson" ,python-simplejson)))
18492 (native-inputs
18493 `(("python-pytest" ,python-pytest)
18494 ("python-pytz" ,python-pytz)))
18495 (home-page "https://github.com/marshmallow-code/marshmallow")
18496 (synopsis "Convert complex datatypes to and from native
18497 Python datatypes.")
18498 (description "@code{marshmallow} provides a library for converting
18499 complex datatypes to and from native Python datatypes.")
18500 (license license:expat)))
18501
18502 (define-public python-apispec
18503 (package
18504 (name "python-apispec")
18505 (version "4.0.0")
18506 (source
18507 (origin
18508 (method url-fetch)
18509 (uri (pypi-uri "apispec" version))
18510 (sha256
18511 (base32
18512 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
18513 (build-system python-build-system)
18514 (arguments
18515 '(#:phases (modify-phases %standard-phases
18516 (replace 'check
18517 (lambda _
18518 (invoke "pytest" "-vv"
18519 ;; Disable validation tests since they require
18520 ;; the optional 'prance' library which is not
18521 ;; yet in Guix.
18522 "-k" "not openapi_tools_validate"))))))
18523 (propagated-inputs
18524 `(("python-pyyaml" ,python-pyyaml)))
18525 (native-inputs
18526 `(("python-pytest" ,python-pytest)
18527 ("python-marshmallow" ,python-marshmallow)))
18528 (home-page "https://github.com/marshmallow-code/apispec")
18529 (synopsis "Swagger/OpenAPI specification generator")
18530 (description "@code{python-apispec} is a pluggable API specification
18531 generator. It currently supports the OpenAPI specification, formerly known
18532 as Swagger.")
18533 (license license:expat)))
18534
18535 (define-public python-flasgger
18536 (package
18537 (name "python-flasgger")
18538 (version "0.6.3")
18539 (source
18540 (origin
18541 (method git-fetch)
18542 (uri (git-reference
18543 (url "https://github.com/rochacbruno/flasgger")
18544 (commit version)))
18545 (file-name (git-file-name name version))
18546 (sha256
18547 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
18548 (build-system python-build-system)
18549 (arguments
18550 `(#:phases
18551 (modify-phases %standard-phases
18552 (replace 'check
18553 (lambda* (#:key inputs outputs #:allow-other-keys)
18554 (substitute* "Makefile"
18555 (("flake8 flasgger --ignore=F403")
18556 "flake8 flasgger --ignore=E731,F403"))
18557 (invoke "py.test"))))))
18558 (propagated-inputs
18559 `(("python-flask" ,python-flask)
18560 ("python-pyyaml" ,python-pyyaml)
18561 ("python-jsonschema" ,python-jsonschema)
18562 ("python-mistune" ,python-mistune)
18563 ("python-six" ,python-six)))
18564 (native-inputs
18565 `(("python-decorator" ,python-decorator)
18566 ("python-flake8" ,python-flake8)
18567 ("python-flask-restful" ,python-flask-restful)
18568 ("python-flex" ,python-flex)
18569 ("python-pytest" ,python-pytest)
18570 ("python-pytest-cov" ,python-pytest-cov)
18571 ("python-marshmallow" ,python-marshmallow)
18572 ("python-apispec" ,python-apispec)))
18573 (home-page "https://github.com/rochacbruno/flasgger/")
18574 (synopsis "Extract Swagger specs from your Flask project")
18575 (description "@code{python-flasgger} allows extracting Swagger specs
18576 from your Flask project. It is a fork of Flask-Swagger.")
18577 (license license:expat)))
18578
18579 (define-public python-swagger-spec-validator
18580 (package
18581 (name "python-swagger-spec-validator")
18582 (version "2.4.3")
18583 (source
18584 (origin
18585 (method url-fetch)
18586 (uri (pypi-uri "swagger-spec-validator" version))
18587 (sha256
18588 (base32
18589 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
18590 (build-system python-build-system)
18591 (propagated-inputs
18592 `(("python-jsonschema" ,python-jsonschema)
18593 ("python-pyyaml" ,python-pyyaml)
18594 ("python-six" ,python-six)))
18595 (home-page
18596 "https://github.com/Yelp/swagger_spec_validator")
18597 (synopsis "Validation of Swagger specifications")
18598 (description "@code{swagger_spec_validator} provides a library for
18599 validating Swagger API specifications.")
18600 (license license:asl2.0)))
18601
18602 (define-public python2-swagger-spec-validator
18603 (package-with-python2 python-swagger-spec-validator))
18604
18605 (define-public python-apache-libcloud
18606 (package
18607 (name "python-apache-libcloud")
18608 (version "3.1.0")
18609 (source
18610 (origin
18611 (method url-fetch)
18612 (uri (pypi-uri "apache-libcloud" version))
18613 (sha256
18614 (base32
18615 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
18616 (build-system python-build-system)
18617 (arguments
18618 `(#:phases
18619 (modify-phases %standard-phases
18620 (add-after 'unpack 'patch-ssh
18621 (lambda* (#:key inputs #:allow-other-keys)
18622 (substitute* "libcloud/compute/ssh.py"
18623 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
18624 "/bin/ssh" "'")))
18625 #t))
18626 (add-after 'unpack 'patch-tests
18627 (lambda _
18628 (substitute* "libcloud/test/compute/test_ssh_client.py"
18629 (("class ShellOutSSHClientTests")
18630 "@unittest.skip(\"Guix container doesn't have ssh service\")
18631 class ShellOutSSHClientTests"))
18632 #t))
18633 (add-before 'check 'copy-secret
18634 (lambda _
18635 (copy-file "libcloud/test/secrets.py-dist"
18636 "libcloud/test/secrets.py")
18637 #t)))))
18638 (inputs
18639 `(("openssh" ,openssh)))
18640 (propagated-inputs
18641 `(("python-paramiko" ,python-paramiko)
18642 ("python-requests" ,python-requests)))
18643 (native-inputs
18644 `(("python-lockfile" ,python-lockfile)
18645 ("python-mock" ,python-mock)
18646 ("python-pytest" ,python-pytest)
18647 ("python-pytest-runner" ,python-pytest-runner)
18648 ("python-requests-mock" ,python-requests-mock)))
18649 (home-page "https://libcloud.apache.org/")
18650 (synopsis "Unified Cloud API")
18651 (description "@code{libcloud} is a Python library for interacting with
18652 many of the popular cloud service providers using a unified API.")
18653 (license license:asl2.0)))
18654
18655 (define-public python-smmap
18656 (package
18657 (name "python-smmap")
18658 (version "3.0.1")
18659 (source
18660 (origin
18661 (method url-fetch)
18662 (uri (pypi-uri "smmap" version))
18663 (sha256
18664 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
18665 (build-system python-build-system)
18666 (native-inputs
18667 `(("python-nosexcover" ,python-nosexcover)))
18668 (home-page "https://github.com/Byron/smmap")
18669 (synopsis "Python sliding window memory map manager")
18670 (description "@code{smmap} is a pure Python implementation of a sliding
18671 window memory map manager.")
18672 (license license:bsd-3)))
18673
18674 (define-public python-smmap2
18675 (deprecated-package "python-smmap2" python-smmap))
18676
18677 (define-public python2-smmap
18678 (package-with-python2 python-smmap))
18679
18680 (define-public python2-smmap2
18681 (deprecated-package "python2-smmap2" python2-smmap))
18682
18683 (define-public python-regex
18684 (package
18685 (name "python-regex")
18686 (version "2020.6.8")
18687 (source (origin
18688 (method url-fetch)
18689 (uri (pypi-uri "regex" version))
18690 (sha256
18691 (base32
18692 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
18693 (build-system python-build-system)
18694 (arguments
18695 '(#:phases
18696 (modify-phases %standard-phases
18697 (replace 'check
18698 (lambda* (#:key inputs outputs #:allow-other-keys)
18699 (add-installed-pythonpath inputs outputs)
18700 (invoke "python" "-c"
18701 "from regex.test_regex import test_main; test_main()"))))))
18702 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
18703 (synopsis "Alternative regular expression module")
18704 (description "This regular expression implementation is backwards-
18705 compatible with the standard @code{re} module, but offers additional
18706 functionality like full case-folding for case-insensitive matches in Unicode.")
18707 (license license:psfl)))
18708
18709 (define-public python2-regex
18710 (package-with-python2 python-regex))
18711
18712 (define-public python-pyopengl
18713 (package
18714 (name "python-pyopengl")
18715 (version "3.1.5")
18716 (source
18717 (origin
18718 (method url-fetch)
18719 (uri (pypi-uri "PyOpenGL" version))
18720 (sha256
18721 (base32
18722 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
18723 (build-system python-build-system)
18724 (inputs
18725 `(("mesa" ,mesa)
18726 ("freeglut" ,freeglut)
18727 ("glu" ,glu)))
18728 (arguments
18729 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
18730 ;attribute 'OSMesa'
18731 #:phases
18732 (modify-phases %standard-phases
18733 (add-before 'build 'fix-paths
18734 (lambda* (#:key inputs outputs #:allow-other-keys)
18735 (substitute* '("OpenGL/platform/ctypesloader.py")
18736 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
18737 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
18738 (("'GL'")
18739 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
18740 (("'GLU'")
18741 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
18742 (("'glut',")
18743 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
18744 (("'GLESv1_CM'")
18745 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
18746 (("'GLESv2'")
18747 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
18748 ;; Not providing libgle. It seems to be very old.
18749 #t)))))
18750 (home-page "http://pyopengl.sourceforge.net")
18751 (synopsis "Standard OpenGL bindings for Python")
18752 (description
18753 "PyOpenGL is the most common cross platform Python binding to OpenGL and
18754 related APIs. The binding is created using the standard @code{ctypes}
18755 library.")
18756 (license license:bsd-3)))
18757
18758 (define-public python-pyopengl-accelerate
18759 (package
18760 (inherit python-pyopengl)
18761 (name "python-pyopengl-accelerate")
18762 (version "3.1.5")
18763 (source
18764 (origin
18765 (method url-fetch)
18766 (uri (pypi-uri "PyOpenGL-accelerate" version))
18767 (sha256
18768 (base32
18769 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
18770 (inputs
18771 `(("mesa" ,mesa)
18772 ("python-numpy" ,python-numpy))) ; for cython module
18773 ; numpy_formathandler, thus not propagated
18774 (arguments
18775 `(#:tests? #f
18776 #:phases
18777 (modify-phases %standard-phases
18778 (delete 'fix-paths))))
18779 (synopsis "Acceleration code for PyOpenGL")
18780 (description
18781 "This is the Cython-coded accelerator module for PyOpenGL.")))
18782
18783 (define-public python-rencode
18784 (package
18785 (name "python-rencode")
18786 (version "1.0.5")
18787 (source
18788 (origin
18789 (method url-fetch)
18790 (uri (pypi-uri "rencode" version))
18791 (sha256
18792 (base32
18793 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
18794 (build-system python-build-system)
18795 (arguments
18796 `(#:phases
18797 (modify-phases %standard-phases
18798 (add-before 'check 'delete-bogus-test
18799 ;; This test requires /home/aresch/Downloads, which is not provided by
18800 ;; the build environment.
18801 (lambda _
18802 (delete-file "rencode/t.py")
18803 #t)))))
18804 (native-inputs `(("pkg-config" ,pkg-config)
18805 ("python-cython" ,python-cython)))
18806 (home-page "https://github.com/aresch/rencode")
18807 (synopsis "Serialization of heterogeneous data structures")
18808 (description
18809 "The @code{rencode} module is a data structure serialization library,
18810 similar to @code{bencode} from the BitTorrent project. For complex,
18811 heterogeneous data structures with many small elements, r-encoding stake up
18812 significantly less space than b-encodings. This version of rencode is a
18813 complete rewrite in Cython to attempt to increase the performance over the
18814 pure Python module.")
18815 (license license:bsd-3)))
18816
18817 (define-public python2-rencode
18818 (package-with-python2 python-rencode))
18819
18820 (define-public python-xenon
18821 (package
18822 (name "python-xenon")
18823 (version "0.7.0")
18824 (source
18825 (origin
18826 (method url-fetch)
18827 (uri (pypi-uri "xenon" version))
18828 (sha256
18829 (base32
18830 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
18831 (build-system python-build-system)
18832 (native-inputs
18833 `(("python-pyyaml" ,python-pyyaml)
18834 ("python-radon" ,python-radon)
18835 ("python-requests" ,python-requests)
18836 ("python-flake8" ,python-flake8)
18837 ("python-tox" ,python-tox)))
18838 (arguments
18839 `(#:tests? #f ;test suite not shipped with the PyPI archive
18840 #:phases
18841 (modify-phases %standard-phases
18842 (add-before 'build 'patch-test-requirements
18843 (lambda _
18844 ;; Remove httpretty dependency for tests.
18845 (substitute* "setup.py"
18846 (("httpretty") ""))
18847 #t)))))
18848 (home-page "https://xenon.readthedocs.org/")
18849 (synopsis "Monitor code metrics for Python on your CI server")
18850 (description
18851 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
18852 Ideally, @code{xenon} is run every time code is committed. Through command
18853 line options, various thresholds can be set for the complexity of code. It
18854 will fail (i.e. it will exit with a non-zero exit code) when any of these
18855 requirements is not met.")
18856 (license license:expat)))
18857
18858 (define-public python-pysocks
18859 (package
18860 (name "python-pysocks")
18861 (version "1.7.1")
18862 (source
18863 (origin
18864 (method url-fetch)
18865 (uri (pypi-uri "PySocks" version))
18866 (sha256
18867 (base32
18868 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
18869 (build-system python-build-system)
18870 (arguments `(#:tests? #f))
18871 (home-page "https://github.com/Anorov/PySocks")
18872 (synopsis "SOCKS client module")
18873 (description "@code{pysocks} is an updated and semi-actively maintained
18874 version of @code{SocksiPy} with bug fixes and extra features.")
18875 (license license:bsd-3)))
18876
18877 (define-public python2-pysocks
18878 (package-with-python2 python-pysocks))
18879
18880 (define-public python-pydiff
18881 (package
18882 (name "python-pydiff")
18883 (version "0.2")
18884 (source
18885 (origin
18886 (method url-fetch)
18887 (uri (pypi-uri "pydiff" version))
18888 (sha256
18889 (base32
18890 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
18891 (build-system python-build-system)
18892 (home-page "https://github.com/myint/pydiff")
18893 (synopsis "Library to diff two Python files at the bytecode level")
18894 (description
18895 "@code{pydiff} makes it easy to look for actual code changes while
18896 ignoring formatting changes.")
18897 (license license:expat)))
18898
18899 (define-public python2-pydiff
18900 (package-with-python2 python-pydiff))
18901
18902 (define-public python-pydub
18903 (package
18904 (name "python-pydub")
18905 (version "0.24.1")
18906 (source
18907 (origin
18908 (method url-fetch)
18909 (uri (pypi-uri "pydub" version))
18910 (sha256
18911 (base32
18912 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
18913 (build-system python-build-system)
18914 (arguments
18915 `(#:phases
18916 (modify-phases %standard-phases
18917 (add-after 'unpack 'fix-ffmpeg-path
18918 (lambda* (#:key inputs #:allow-other-keys)
18919 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
18920 (substitute* '("pydub/utils.py")
18921 (("return \"ffmpeg\"")
18922 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
18923 (("return \"ffplay\"")
18924 (string-append "return \"" ffmpeg "/bin/ffplay\""))
18925 (("return \"ffprobe\"")
18926 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
18927 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
18928 #t))))))
18929 (home-page "https://pydub.com")
18930 (inputs
18931 `(("ffmpeg" ,ffmpeg)))
18932 (propagated-inputs
18933 `(("python-scipy" ,python-scipy)))
18934 (synopsis "Manipulate audio with a high level interface in Python")
18935 (description
18936 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
18937 @code{ffmpeg} to open various audio formats.")
18938 (license license:expat))) ; MIT license
18939
18940 (define-public python-tqdm
18941 (package
18942 (name "python-tqdm")
18943 (version "4.60.0")
18944 (source
18945 (origin
18946 (method url-fetch)
18947 (uri (pypi-uri "tqdm" version))
18948 (sha256
18949 (base32
18950 "1bjpy4mjg6ryp0ijvqi77vgs76l5hh3zrv3x4vmcwxrlbswvvppb"))))
18951 (build-system python-build-system)
18952 (arguments
18953 '(#:phases (modify-phases %standard-phases
18954 (replace 'check
18955 (lambda _
18956 (invoke "pytest" "-vv" "-k" "not perf"))))))
18957 (native-inputs
18958 `(("python-pytest" ,python-pytest)
18959 ("python-pytest-asyncio" ,python-pytest-asyncio)
18960 ("python-pytest-timeout" ,python-pytest-timeout)
18961 ("python-setuptools-scm" ,python-setuptools-scm)
18962 ("python-toml" ,python-toml)))
18963 (home-page "https://github.com/tqdm/tqdm")
18964 (synopsis "Fast, extensible progress meter")
18965 (description
18966 "Make loops show a progress bar on the console by just wrapping any
18967 iterable with @code{|tqdm(iterable)|}. Offers many options to define
18968 design and layout.")
18969 (license (list license:mpl2.0 license:expat))))
18970
18971 (define-public python2-tqdm
18972 (package-with-python2 python-tqdm))
18973
18974 (define-public python-pkginfo
18975 (package
18976 (name "python-pkginfo")
18977 (version "1.7.0")
18978 (source
18979 (origin
18980 (method url-fetch)
18981 (uri (pypi-uri "pkginfo" version))
18982 (sha256
18983 (base32
18984 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
18985 (build-system python-build-system)
18986 (arguments
18987 `(#:phases
18988 (modify-phases %standard-phases
18989 (add-before 'check 'patch-tests
18990 (lambda _
18991 (substitute* "pkginfo/tests/test_installed.py"
18992 (("test_ctor_w_package_no_PKG_INFO")
18993 "_test_ctor_w_package_no_PKG_INFO"))
18994 #t)))))
18995 (home-page
18996 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
18997 (synopsis
18998 "Query metadatdata from sdists, bdists, and installed packages")
18999 (description
19000 "API to query the distutils metadata written in @file{PKG-INFO} inside a
19001 source distriubtion (an sdist) or a binary distribution (e.g., created by
19002 running bdist_egg). It can also query the EGG-INFO directory of an installed
19003 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
19004 created by running @code{python setup.py develop}).")
19005 (license license:expat)))
19006
19007 (define-public python2-pkginfo
19008 (package-with-python2 python-pkginfo))
19009
19010 (define-public python-twine
19011 (package
19012 (name "python-twine")
19013 (version "1.15.0")
19014 (source
19015 (origin
19016 (method url-fetch)
19017 (uri (pypi-uri "twine" version))
19018 (sha256
19019 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
19020 (build-system python-build-system)
19021 (propagated-inputs
19022 `(("python-tqdm" ,python-tqdm)
19023 ("python-packaging" ,python-packaging)
19024 ("python-pkginfo" ,python-pkginfo)
19025 ("python-readme-renderer" ,python-readme-renderer)
19026 ("python-requests" ,python-requests)
19027 ("python-requests-toolbelt" ,python-requests-toolbelt)))
19028 (home-page "https://github.com/pypa/twine")
19029 (synopsis "Collection of utilities for interacting with PyPI")
19030 (description
19031 "@code{twine} currently supports registering projects and uploading
19032 distributions. It authenticates the user over HTTPS, allows them to pre-sign
19033 their files and supports any packaging format (including wheels).")
19034 (license license:asl2.0)))
19035
19036 (define-public python2-twine
19037 (package-with-python2 python-twine))
19038
19039 (define-public python-linecache2
19040 (package
19041 (name "python-linecache2")
19042 (version "1.0.0")
19043 (source
19044 (origin
19045 (method url-fetch)
19046 (uri (pypi-uri "linecache2" version))
19047 (sha256
19048 (base32
19049 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
19050 (build-system python-build-system)
19051 (arguments
19052 `(;; The tests depend on unittest2, and our version is a bit too old.
19053 #:tests? #f))
19054 (native-inputs
19055 `(("python-pbr" ,python-pbr-minimal)))
19056 (home-page
19057 "https://github.com/testing-cabal/linecache2")
19058 (synopsis "Backports of the linecache module")
19059 (description
19060 "The linecache module allows one to get any line from any file, while
19061 attempting to optimize internally, using a cache, the common case where many
19062 lines are read from a single file.")
19063 (license license:psfl)))
19064
19065 (define-public python2-linecache2
19066 (package-with-python2 python-linecache2))
19067
19068 (define-public python-traceback2
19069 (package
19070 (name "python-traceback2")
19071 (version "1.4.0")
19072 (source
19073 (origin
19074 (method url-fetch)
19075 (uri (pypi-uri "traceback2" version))
19076 (sha256
19077 (base32
19078 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
19079 (build-system python-build-system)
19080 (arguments
19081 `(;; python-traceback2 and python-unittest2 depend on one another.
19082 #:tests? #f))
19083 (native-inputs
19084 `(("python-pbr" ,python-pbr-minimal)))
19085 (propagated-inputs
19086 `(("python-linecache2" ,python-linecache2)
19087 ("python-six" ,python-six)))
19088 (home-page
19089 "https://github.com/testing-cabal/traceback2")
19090 (synopsis "Backports of the traceback module")
19091 (description
19092 "This module provides a standard interface to extract, format and print
19093 stack traces of Python programs. It exactly mimics the behavior of the Python
19094 interpreter when it prints a stack trace.")
19095 (license license:psfl)))
19096
19097 (define-public python2-traceback2
19098 (package-with-python2 python-traceback2))
19099
19100 (define-public python-ratelimiter
19101 (package
19102 (name "python-ratelimiter")
19103 (version "1.2.0")
19104 (source
19105 (origin
19106 (method url-fetch)
19107 (uri (pypi-uri "ratelimiter" version))
19108 (sha256
19109 (base32
19110 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
19111 (build-system python-build-system)
19112 (arguments
19113 '(#:tests? #f)) ; There are no tests in the pypi archive.
19114 (home-page "https://github.com/RazerM/ratelimiter")
19115 (synopsis "Simple rate limiting object")
19116 (description
19117 "The @code{ratelimiter} module ensures that an operation will not be
19118 executed more than a given number of times during a given period.")
19119 (license license:asl2.0)))
19120
19121 (define-public python2-ratelimiter
19122 (package-with-python2 python-ratelimiter))
19123
19124 (define-public python-dukpy
19125 (package
19126 (name "python-dukpy")
19127 (version "0.3")
19128 (source
19129 (origin
19130 (method git-fetch)
19131 (uri (git-reference
19132 (url "https://github.com/kovidgoyal/dukpy")
19133 (commit (string-append "v" version))))
19134 (file-name (git-file-name name version))
19135 (sha256
19136 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19137 (build-system python-build-system)
19138 (home-page "https://github.com/kovidgoyal/dukpy")
19139 (synopsis "Run JavaScript in python")
19140 (description
19141 "dukpy is a JavaScript runtime environment for Python using the duktape
19142 embeddable JavaScript engine.")
19143 ;; Dukpy is licensed under MIT like the embedded duktape library,
19144 ;; with 'errors.c' as GPL3.
19145 (license (list license:expat license:gpl3))))
19146
19147 (define-public python2-dukpy
19148 (package-with-python2 python-dukpy))
19149
19150 (define-public python-jsonrpclib-pelix
19151 (package
19152 (name "python-jsonrpclib-pelix")
19153 (version "0.3.2")
19154 (source
19155 (origin
19156 (method url-fetch)
19157 (uri (pypi-uri "jsonrpclib-pelix" version))
19158 (sha256
19159 (base32
19160 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19161 (build-system python-build-system)
19162 (arguments
19163 `(#:tests? #f)) ; no tests in PyPI tarball
19164 (home-page "https://github.com/tcalmant/jsonrpclib/")
19165 (synopsis "JSON-RPC 2.0 client library for Python")
19166 (description
19167 "This library implements the JSON-RPC v2.0
19168 specification (backwards-compatible) as a client library for Python. This
19169 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19170 services.")
19171 (license license:asl2.0)))
19172
19173 (define-public python2-jsonrpclib-pelix
19174 (package-with-python2 python-jsonrpclib-pelix))
19175
19176 (define-public python-setuptools-scm-git-archive
19177 (package
19178 (name "python-setuptools-scm-git-archive")
19179 (version "1.0")
19180 (source
19181 (origin
19182 (method url-fetch)
19183 (uri (pypi-uri "setuptools_scm_git_archive" version))
19184 (sha256
19185 (base32
19186 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19187 (build-system python-build-system)
19188 (native-inputs
19189 `(("python-pytest" ,python-pytest)))
19190 (propagated-inputs
19191 `(("python-setuptools-scm" ,python-setuptools-scm)))
19192 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19193 (synopsis "Setuptools_scm plugin for git archives")
19194 (description
19195 "The setuptools_scm_git_archive package is a plugin to
19196 setuptools_scm, which supports obtaining versions from git archives that
19197 belong to tagged versions.")
19198 (license license:expat)))
19199
19200 (define-public python2-setuptools-scm-git-archive
19201 (package-with-python2 python-setuptools-scm-git-archive))
19202
19203 (define-public python-setuptools-git
19204 (package
19205 (name "python-setuptools-git")
19206 (version "1.2")
19207 (source
19208 (origin
19209 (method url-fetch)
19210 (uri (pypi-uri "setuptools-git" version))
19211 (sha256
19212 (base32
19213 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19214 (build-system python-build-system)
19215 (arguments
19216 `(#:phases
19217 (modify-phases %standard-phases
19218 ;; This is needed for tests.
19219 (add-after 'unpack 'configure-git
19220 (lambda _
19221 (setenv "HOME" "/tmp")
19222 (invoke "git" "config" "--global" "user.email" "guix")
19223 (invoke "git" "config" "--global" "user.name" "guix")
19224 #t)))))
19225 (native-inputs
19226 `(("git" ,git-minimal)))
19227 (home-page "https://github.com/msabramo/setuptools-git")
19228 (synopsis "Setuptools revision control system plugin for Git")
19229 (description
19230 "This package provides a plugin for Setuptools for revision control with
19231 Git.")
19232 (license license:bsd-3)))
19233
19234 (define-public python-pyclipper
19235 (package
19236 (name "python-pyclipper")
19237 (version "1.1.0.post3")
19238 (source
19239 (origin
19240 (method url-fetch)
19241 (uri (pypi-uri "pyclipper" version ".zip"))
19242 (sha256
19243 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19244 (modules '((guix build utils)))
19245 (snippet
19246 '(begin
19247 ;; This file is generated by Cython.
19248 (delete-file "pyclipper/pyclipper.cpp") #t))))
19249 (build-system python-build-system)
19250 (arguments
19251 `(#:phases
19252 (modify-phases %standard-phases
19253 (add-before 'build 'cythonize-sources
19254 (lambda _
19255 (with-directory-excursion "pyclipper"
19256 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19257 (propagated-inputs
19258 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19259 (native-inputs
19260 `(("python-cython" ,python-cython)
19261 ("python-pytest" ,python-pytest)
19262 ("python-pytest-runner" ,python-pytest-runner)
19263 ("python-unittest2" ,python-unittest2)
19264 ("unzip" ,unzip)))
19265 (home-page "https://github.com/greginvm/pyclipper")
19266 (synopsis "Wrapper for Angus Johnson's Clipper library")
19267 (description
19268 "Pyclipper is a Cython wrapper for the C++ translation of the
19269 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19270 (license license:expat)))
19271
19272 (define-public python2-pyclipper
19273 (package-with-python2 python-pyclipper))
19274
19275 (define-public python2-booleanoperations
19276 (package
19277 (name "python2-booleanoperations")
19278 (version "0.7.1")
19279 (source
19280 (origin
19281 (method url-fetch)
19282 (uri (pypi-uri "booleanOperations" version ".zip"))
19283 (sha256
19284 (base32
19285 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19286 (build-system python-build-system)
19287 (arguments
19288 `(#:python ,python-2))
19289 (native-inputs
19290 `(("unzip" ,unzip)
19291 ("python2-pytest" ,python2-pytest)
19292 ("python2-pytest-runner" ,python2-pytest-runner)))
19293 (propagated-inputs
19294 `(("python-fonttools" ,python2-fonttools)
19295 ("python-pyclipper" ,python2-pyclipper)
19296 ("python-ufolib" ,python2-ufolib)))
19297 (home-page "https://github.com/typemytype/booleanOperations")
19298 (synopsis "Boolean operations on paths")
19299 (description
19300 "BooleanOperations provides a Python library that enables
19301 boolean operations on paths.")
19302 (license license:expat)))
19303
19304 (define-public python-tempdir
19305 (package
19306 (name "python-tempdir")
19307 (version "0.7.1")
19308 (source
19309 (origin
19310 (method url-fetch)
19311 (uri (pypi-uri "tempdir" version))
19312 (sha256
19313 (base32
19314 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19315 (build-system python-build-system)
19316 (home-page "https://pypi.org/project/tempdir/")
19317 (arguments
19318 ;; the package has no tests
19319 '(#:tests? #f))
19320 (synopsis "Python library for managing temporary directories")
19321 (description
19322 "This library manages temporary directories that are automatically
19323 deleted with all their contents when they are no longer needed. It is
19324 particularly convenient for use in tests.")
19325 (license license:expat)))
19326
19327 (define-public python2-tempdir
19328 (package-with-python2 python-tempdir))
19329
19330 (define-public python-activepapers
19331 (package
19332 (name "python-activepapers")
19333 (version "0.2.2")
19334 (source
19335 (origin
19336 (method url-fetch)
19337 (uri (pypi-uri "ActivePapers.Py" version))
19338 (sha256
19339 (base32
19340 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
19341 (build-system python-build-system)
19342 (arguments
19343 `(#:modules ((ice-9 ftw)
19344 (srfi srfi-1)
19345 (guix build utils)
19346 (guix build python-build-system))
19347
19348 #:phases
19349 (modify-phases %standard-phases
19350 (add-after 'unpack 'delete-python2-code
19351 (lambda _
19352 (for-each delete-file
19353 '("lib/activepapers/builtins2.py"
19354 "lib/activepapers/standardlib2.py"
19355 "lib/activepapers/utility2.py"))))
19356 (replace 'check
19357 (lambda _
19358 ;; Deactivate the test cases that download files
19359 (setenv "NO_NETWORK_ACCESS" "1")
19360 ;; For some strange reason, some tests fail if nosetests runs all
19361 ;; test modules in a single execution. They pass if each test
19362 ;; module is run individually.
19363 (for-each (lambda (filename)
19364 (invoke "nosetests"
19365 (string-append "tests/" filename)))
19366 (scandir "tests"
19367 (lambda (filename)
19368 (string-suffix? ".py" filename)))))))))
19369 (native-inputs
19370 `(("python-tempdir" ,python-tempdir)
19371 ("python-nose" ,python-nose)))
19372 (propagated-inputs
19373 `(("python-h5py" ,python-h5py)))
19374 (home-page "https://www.activepapers.org/")
19375 (synopsis "Executable papers for scientific computing")
19376 (description
19377 "ActivePapers is a tool for working with executable papers, which
19378 combine data, code, and documentation in single-file packages,
19379 suitable for publication as supplementary material or on repositories
19380 such as figshare or Zenodo.")
19381 (properties `((python2-variant . ,(delay python2-activepapers))))
19382 (license license:bsd-3)))
19383
19384 (define-public python2-activepapers
19385 (let ((base (package-with-python2
19386 (strip-python2-variant python-activepapers))))
19387 (package/inherit base
19388 (arguments
19389 (substitute-keyword-arguments (package-arguments base)
19390 ((#:phases phases)
19391 `(modify-phases ,phases
19392 (delete 'delete-python2-code)
19393 (add-after 'unpack 'delete-python3-code
19394 (lambda _
19395 (for-each delete-file
19396 '("lib/activepapers/builtins3.py"
19397 "lib/activepapers/standardlib3.py"
19398 "lib/activepapers/utility3.py")))))))))))
19399
19400 (define-public python-semver
19401 (package
19402 (name "python-semver")
19403 (version "2.9.0")
19404 (source
19405 (origin
19406 (method url-fetch)
19407 (uri (pypi-uri "semver" version))
19408 (sha256
19409 (base32
19410 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
19411 (build-system python-build-system)
19412 (arguments
19413 `(#:phases (modify-phases %standard-phases
19414 (replace 'check
19415 (lambda _
19416 (delete-file "setup.cfg")
19417 (invoke "py.test"))))))
19418 (native-inputs
19419 `(("python-pytest" ,python-pytest)))
19420 (home-page "https://github.com/k-bx/python-semver")
19421 (synopsis "Python helper for Semantic Versioning")
19422 (description "This package provides a Python library for
19423 @url{Semantic Versioning, http://semver.org/}.")
19424 (license license:bsd-3)))
19425
19426 (define-public python2-semver
19427 (package-with-python2 python-semver))
19428
19429 (define-public python-pyro4
19430 (package
19431 (name "python-pyro4")
19432 (version "4.77")
19433 (source
19434 (origin
19435 (method url-fetch)
19436 (uri (pypi-uri "Pyro4" version))
19437 (sha256
19438 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
19439 (build-system python-build-system)
19440 (arguments
19441 '(#:tests? #f)) ;FIXME: Some tests require network access.
19442 (native-inputs
19443 `(("python-cloudpickle" ,python-cloudpickle)
19444 ("python-dill" ,python-dill)
19445 ("python-msgpack" ,python-msgpack)))
19446 (propagated-inputs
19447 `(("python-serpent" ,python-serpent)))
19448 (home-page "https://pyro4.readthedocs.io")
19449 (synopsis "Distributed object middleware for Python")
19450 (description
19451 "Pyro enables you to build applications in which objects can talk to each
19452 other over the network. You can just use normal Python method calls to call
19453 objects on other machines, also known as remote procedure calls (RPC).")
19454 (license license:expat)))
19455
19456 (define-public python2-pyro
19457 (package
19458 (name "python2-pyro")
19459 (version "3.16")
19460 (source
19461 (origin
19462 (method url-fetch)
19463 (uri (pypi-uri "Pyro" version))
19464 (file-name (string-append "Pyro-" version ".tar.gz"))
19465 (sha256
19466 (base32
19467 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
19468 (build-system python-build-system)
19469 (arguments
19470 ;; Pyro is not compatible with Python 3
19471 `(#:python ,python-2
19472 ;; Pyro has no test cases for automatic execution
19473 #:tests? #f))
19474 (home-page "https://pythonhosted.org/Pyro/")
19475 (synopsis "Distributed object manager for Python")
19476 (description "Pyro is a Distributed Object Technology system
19477 written in Python that is designed to be easy to use. It resembles
19478 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
19479 which is a system and language independent Distributed Object Technology
19480 and has much more to offer than Pyro or RMI. Pyro 3.x is no
19481 longer maintained. New projects should use Pyro4 instead, which
19482 is the new Pyro version that is actively developed.")
19483 (license license:expat)))
19484
19485 (define-public python2-scientific
19486 (package
19487 (name "python2-scientific")
19488 (version "2.9.4")
19489 (source
19490 (origin
19491 (method git-fetch)
19492 (uri (git-reference
19493 (url "https://github.com/khinsen/ScientificPython")
19494 (commit (string-append "rel" version))))
19495 (file-name (git-file-name name version))
19496 (sha256
19497 (base32
19498 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
19499 (build-system python-build-system)
19500 (inputs
19501 `(("netcdf" ,netcdf)))
19502 (propagated-inputs
19503 `(("python-numpy" ,python2-numpy-1.8)
19504 ("python-pyro" ,python2-pyro)))
19505 (arguments
19506 ;; ScientificPython is not compatible with Python 3
19507 `(#:python ,python-2
19508 #:tests? #f ; No test suite
19509 #:phases
19510 (modify-phases %standard-phases
19511 (replace 'build
19512 (lambda* (#:key inputs #:allow-other-keys)
19513 (invoke "python" "setup.py" "build"
19514 (string-append "--netcdf_prefix="
19515 (assoc-ref inputs "netcdf"))))))))
19516 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
19517 (synopsis "Python modules for scientific computing")
19518 (description "ScientificPython is a collection of Python modules that are
19519 useful for scientific computing. Most modules are rather general (Geometry,
19520 physical units, automatic derivatives, ...) whereas others are more
19521 domain-specific (e.g. netCDF and PDB support). The library is currently
19522 not actively maintained and works only with Python 2 and NumPy < 1.9.")
19523 (license license:cecill-c)))
19524
19525 (define-public python2-mmtk
19526 (package
19527 (name "python2-mmtk")
19528 (version "2.7.12")
19529 (source
19530 (origin
19531 (method git-fetch)
19532 (uri (git-reference
19533 (url "https://github.com/khinsen/MMTK")
19534 (commit (string-append "rel" version))))
19535 (file-name (git-file-name name version))
19536 (sha256
19537 (base32
19538 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
19539 (build-system python-build-system)
19540 (native-inputs
19541 `(("netcdf" ,netcdf)))
19542 (propagated-inputs
19543 `(("python-scientific" ,python2-scientific)
19544 ("python-tkinter" ,python-2 "tk")))
19545 (arguments
19546 `(#:python ,python-2
19547 #:tests? #f
19548 #:phases
19549 (modify-phases %standard-phases
19550 (add-before 'build 'includes-from-scientific
19551 (lambda* (#:key inputs #:allow-other-keys)
19552 (mkdir-p "Include/Scientific")
19553 (copy-recursively
19554 (string-append
19555 (assoc-ref inputs "python-scientific")
19556 "/include/python2.7/Scientific")
19557 "Include/Scientific"))))))
19558 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
19559 (synopsis "Python library for molecular simulation")
19560 (description "MMTK is a library for molecular simulations with an emphasis
19561 on biomolecules. It provides widely used methods such as Molecular Dynamics
19562 and normal mode analysis, but also basic routines for implementing new methods
19563 for simulation and analysis. The library is currently not actively maintained
19564 and works only with Python 2 and NumPy < 1.9.")
19565 (license license:cecill-c)))
19566
19567 (define-public python-phonenumbers
19568 (package
19569 (name "python-phonenumbers")
19570 (version "8.9.1")
19571 (source
19572 (origin
19573 (method url-fetch)
19574 (uri (pypi-uri "phonenumbers" version))
19575 (sha256
19576 (base32
19577 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
19578 (build-system python-build-system)
19579 (home-page
19580 "https://github.com/daviddrysdale/python-phonenumbers")
19581 (synopsis
19582 "Python library for dealing with international phone numbers")
19583 (description
19584 "This package provides a Python port of Google's libphonenumber library.")
19585 (license license:asl2.0)))
19586
19587 (define-public python2-phonenumbers
19588 (package-with-python2 python-phonenumbers))
19589
19590 (define-public python-heapdict
19591 (package
19592 (name "python-heapdict")
19593 (version "1.0.1")
19594 (source
19595 (origin
19596 (method url-fetch)
19597 (uri (pypi-uri "HeapDict" version))
19598 (sha256
19599 (base32
19600 "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
19601 (build-system python-build-system)
19602 (home-page "http://stutzbachenterprises.com/")
19603 (synopsis "Heap with decrease-key and increase-key operations")
19604 (description
19605 "heapdict implements the MutableMapping ABC, meaning it works pretty much
19606 like a regular Python @code{dict}. It’s designed to be used as a priority
19607 queue.")
19608 (license license:bsd-3)))
19609
19610 (define-public python-zict
19611 (package
19612 (name "python-zict")
19613 (version "2.0.0")
19614 (source
19615 (origin
19616 (method url-fetch)
19617 (uri (pypi-uri "zict" version))
19618 (sha256
19619 (base32
19620 "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
19621 (build-system python-build-system)
19622 (propagated-inputs
19623 `(("python-heapdict" ,python-heapdict)))
19624 (native-inputs
19625 `(("python-pytest" ,python-pytest)))
19626 (home-page "https://zict.readthedocs.io/en/latest/")
19627 (synopsis "Composable mutable mapping tools")
19628 (description "This package provides abstract @code{MutableMapping} classes
19629 that consume and build on other @code{MutableMappings}. Several of these can
19630 be composed with one another to form intuitive interfaces over complex storage
19631 systems policies.")
19632 (license license:bsd-3)))
19633
19634 (define-public python-send2trash
19635 (package
19636 (name "python-send2trash")
19637 (version "1.5.0")
19638 (source
19639 (origin (method git-fetch)
19640 ;; Source tarball on PyPI doesn't include tests.
19641 (uri (git-reference
19642 (url "https://github.com/hsoft/send2trash")
19643 (commit version)))
19644 (file-name (git-file-name name version))
19645 (sha256
19646 (base32
19647 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
19648 (build-system python-build-system)
19649 (arguments
19650 '(#:phases
19651 (modify-phases %standard-phases
19652 (add-before 'check 'pre-check
19653 (lambda _
19654 (mkdir-p "/tmp/foo")
19655 (setenv "HOME" "/tmp/foo")
19656 #t)))))
19657 (home-page "https://github.com/hsoft/send2trash")
19658 (synopsis "Send files to the user's @file{~/Trash} directory")
19659 (description "This package provides a Python library to send files to the
19660 user's @file{~/Trash} directory.")
19661 (properties `((python2-variant . ,(delay python2-send2trash))))
19662 (license license:bsd-3)))
19663
19664 (define-public python2-send2trash
19665 (let ((base (package-with-python2
19666 (strip-python2-variant python-send2trash))))
19667 (package/inherit base
19668 (arguments
19669 (substitute-keyword-arguments (package-arguments python-send2trash)
19670 ((#:phases phases)
19671 `(modify-phases ,phases
19672 (add-before 'check 'setenv
19673 (lambda _
19674 (setenv "PYTHONPATH"
19675 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19676 #t)))))))))
19677
19678 (define-public python-pyfavicon
19679 (package
19680 (name "python-pyfavicon")
19681 (version "0.1.1")
19682 (source
19683 (origin
19684 (method url-fetch)
19685 (uri (pypi-uri "pyfavicon" version))
19686 (sha256
19687 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
19688 (build-system python-build-system)
19689 (arguments
19690 ;; There are no tests in the PyPI tarball and the tests from the
19691 ;; repository require online data.
19692 '(#:tests? #f))
19693 (propagated-inputs
19694 `(("python-aiohttp" ,python-aiohttp)
19695 ("python-beautifulsoup4" ,python-beautifulsoup4)
19696 ("python-pillow" ,python-pillow)))
19697 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
19698 (synopsis "Async favicon fetcher")
19699 (description
19700 "@code{pyfavicon} is an async favicon fetcher.")
19701 (license license:expat)))
19702
19703 (define-public python-yamllint
19704 (package
19705 (name "python-yamllint")
19706 (version "1.26.1")
19707 (source
19708 (origin
19709 (method url-fetch)
19710 (uri (pypi-uri "yamllint" version))
19711 (sha256
19712 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
19713 (build-system python-build-system)
19714 (propagated-inputs
19715 `(("python-pathspec" ,python-pathspec)
19716 ("python-pyyaml" ,python-pyyaml)
19717 ("python-setuptools" ,python-setuptools)))
19718 (home-page "https://github.com/adrienverge/yamllint")
19719 (synopsis "Linter for YAML files")
19720 (description
19721 "Yamllint is a linter for YAML files. yamllint does not only check for
19722 syntax validity, but for weirdnesses like key repetition and cosmetic problems
19723 such as lines length, trailing spaces, indentation, etc.")
19724 (license license:gpl3+)))
19725
19726 (define-public python-yapf
19727 (package
19728 (name "python-yapf")
19729 (version "0.29.0")
19730 (source
19731 (origin
19732 (method url-fetch)
19733 (uri (pypi-uri "yapf" version))
19734 (sha256
19735 (base32
19736 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
19737 (build-system python-build-system)
19738 (home-page "https://github.com/google/yapf")
19739 (synopsis "Formatter for Python code")
19740 (description "YAPF is a formatter for Python code. It's based off of
19741 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
19742 takes the code and reformats it to the best formatting that conforms to the
19743 style guide, even if the original code didn't violate the style guide.")
19744 (license license:asl2.0)))
19745
19746 (define-public python2-yapf
19747 (package-with-python2 python-yapf))
19748
19749 (define-public python-yq
19750 (package
19751 (name "python-yq")
19752 (version "2.11.1")
19753 (source
19754 (origin
19755 (method url-fetch)
19756 (uri (pypi-uri "yq" version))
19757 (sha256
19758 (base32
19759 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
19760 (build-system python-build-system)
19761 (arguments
19762 '(#:phases
19763 (modify-phases %standard-phases
19764 (add-after 'unpack 'patch
19765 (lambda* (#:key inputs #:allow-other-keys)
19766 (substitute* "yq/__init__.py"
19767 (("Popen\\(\\[\"jq")
19768 (string-append
19769 "Popen([\""
19770 (assoc-ref inputs "jq")
19771 "/bin/jq")))
19772 #t)))))
19773 (inputs
19774 `(("python-argcomplete" ,python-argcomplete)
19775 ("python-pyyaml" ,python-pyyaml)
19776 ("python-xmltodict" ,python-xmltodict)
19777 ("jq" ,jq)))
19778 (native-inputs
19779 `(("python-coverage" ,python-coverage)
19780 ("python-flake8" ,python-flake8)
19781 ("python-wheel" ,python-wheel)))
19782 (home-page "https://github.com/kislyuk/yq")
19783 (synopsis "Command-line YAML/XML processor")
19784 (description
19785 "This package provides @command{yq} and @command{xq} for processing YAML
19786 and XML respectively. The processing is done through @command{jq}, @command{jq}
19787 filters can be used to process the data as it passes through.")
19788 (license license:asl2.0)))
19789
19790 (define-public python-gyp
19791 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
19792 (revision "0"))
19793 (package
19794 (name "python-gyp")
19795 ;; Google does not release versions,
19796 ;; based on second most recent commit date.
19797 (version (git-version "0.0.0" revision commit))
19798 (source
19799 (origin
19800 ;; Google does not release tarballs,
19801 ;; git checkout is needed.
19802 (method git-fetch)
19803 (uri (git-reference
19804 (url "https://chromium.googlesource.com/external/gyp")
19805 (commit commit)))
19806 (file-name (git-file-name name version))
19807 (sha256
19808 (base32
19809 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
19810 (build-system python-build-system)
19811 (home-page "https://gyp.gsrc.io/")
19812 (synopsis "GYP is a Meta-Build system")
19813 (description
19814 "GYP builds build systems for large, cross platform applications.
19815 It can be used to generate XCode projects, Visual Studio projects, Ninja build
19816 files, and Makefiles.")
19817 (license license:bsd-3))))
19818
19819 (define-public python2-gyp
19820 (package-with-python2 python-gyp))
19821
19822 (define-public python-whatever
19823 (package
19824 (name "python-whatever")
19825 (version "0.6")
19826 (source
19827 (origin
19828 (method git-fetch)
19829 (uri (git-reference
19830 (url "https://github.com/Suor/whatever")
19831 (commit version)))
19832 (file-name (git-file-name name version))
19833 (sha256
19834 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
19835 (build-system python-build-system)
19836 (arguments
19837 `(#:phases
19838 (modify-phases %standard-phases
19839 (replace 'check
19840 (lambda _
19841 (invoke "py.test"))))))
19842 (native-inputs
19843 `(("python-pytest" ,python-pytest)))
19844 (home-page "https://github.com/Suor/whatever")
19845 (synopsis "Make anonymous functions by partial application of operators")
19846 (description "@code{whatever} provides an easy way to make anonymous
19847 functions by partial application of operators.")
19848 (license license:bsd-3)))
19849
19850 (define-public python2-whatever
19851 (package-with-python2 python-whatever))
19852
19853 (define-public python-funcy
19854 (package
19855 (name "python-funcy")
19856 (version "1.11")
19857 (source
19858 (origin
19859 (method git-fetch)
19860 (uri (git-reference
19861 (url "https://github.com/Suor/funcy")
19862 (commit version)))
19863 (sha256
19864 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
19865 (file-name (git-file-name name version))))
19866 (build-system python-build-system)
19867 (arguments
19868 `(#:phases
19869 (modify-phases %standard-phases
19870 (replace 'check
19871 (lambda _
19872 (invoke "py.test"))))))
19873 (native-inputs
19874 `(("python-pytest" ,python-pytest)
19875 ("python-whatever" ,python-whatever)))
19876 (home-page "https://github.com/Suor/funcy")
19877 (synopsis "Functional tools")
19878 (description "@code{funcy} is a library that provides functional tools.
19879 Examples are:
19880 @enumerate
19881 @item merge - Merges collections of the same type
19882 @item walk - Type-preserving map
19883 @item select - Selects a part of a collection
19884 @item take - Takes the first n items of a collection
19885 @item first - Takes the first item of a collection
19886 @item remove - Predicated-removes items of a collection
19887 @item concat - Concatenates two collections
19888 @item flatten - Flattens a collection with subcollections
19889 @item distinct - Returns only distinct items
19890 @item split - Predicated-splits a collection
19891 @item split_at - Splits a collection at a given item
19892 @item group_by - Groups items by group
19893 @item pairwise - Pairs off adjacent items
19894 @item partial - Partially-applies a function
19895 @item curry - Curries a function
19896 @item compose - Composes functions
19897 @item complement - Complements a predicate
19898 @item all_fn - \"all\" with predicate
19899 @end enumerate")
19900 (license license:bsd-3)))
19901
19902 (define-public python2-funcy
19903 (package-with-python2 python-funcy))
19904
19905 (define-public python-isoweek
19906 (package
19907 (name "python-isoweek")
19908 (version "1.3.3")
19909 (source
19910 (origin
19911 (method url-fetch)
19912 (uri (pypi-uri "isoweek" version))
19913 (sha256
19914 (base32
19915 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
19916 (build-system python-build-system)
19917 (home-page "https://github.com/gisle/isoweek")
19918 (synopsis "Objects representing a week")
19919 (description "The @code{isoweek} module provide the class Week that
19920 implements the week definition of ISO 8601. This standard also defines
19921 a notation for identifying weeks; yyyyWww (where the W is a literal).
19922 Week instances stringify to this form.")
19923 (license license:bsd-3)))
19924
19925 (define-public python2-isoweek
19926 (package-with-python2 python-isoweek))
19927
19928 (define-public python-pyzbar
19929 (package
19930 (name "python-pyzbar")
19931 (version "0.1.8")
19932 (source
19933 (origin
19934 ;; There's no source tarball on PyPI.
19935 (method git-fetch)
19936 (uri (git-reference
19937 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
19938 (commit (string-append "v" version))))
19939 (file-name (git-file-name name version))
19940 (sha256
19941 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
19942 (build-system python-build-system)
19943 (arguments
19944 `(#:phases
19945 (modify-phases %standard-phases
19946 (add-after 'unpack 'remove-failing-test
19947 (lambda _
19948 ;; This tests if find_library was called once, but we remove
19949 ;; the call in the stage below to make the library find libzbar.
19950 (delete-file "pyzbar/tests/test_zbar_library.py")
19951 #t))
19952 (add-before 'build 'set-library-file-name
19953 (lambda* (#:key inputs #:allow-other-keys)
19954 (let ((libzbar (assoc-ref inputs "zbar")))
19955 (substitute* "pyzbar/zbar_library.py"
19956 (("find_library\\('zbar'\\)")
19957 (string-append "'" libzbar "/lib/libzbar.so.0'")))
19958 #t))))))
19959 (native-inputs
19960 `(("pkg-config" ,pkg-config)
19961 ("python-numpy" ,python-numpy)
19962 ("python-pillow" ,python-pillow)))
19963 (inputs
19964 `(("zbar" ,zbar)))
19965 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
19966 (synopsis "Read one-dimensional barcodes and QR codes")
19967 (description
19968 "Read one-dimensional barcodes and QR codes using the zbar library.
19969
19970 Features:
19971
19972 @itemize
19973 @item Pure python
19974 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
19975 @item Decodes locations of barcodes
19976 @item No dependencies, other than the zbar library itself
19977 @end itemize")
19978 (license license:expat)))
19979
19980 (define-public python-tokenize-rt
19981 (package
19982 (name "python-tokenize-rt")
19983 (version "2.0.1")
19984 (source
19985 (origin
19986 (method url-fetch)
19987 (uri (pypi-uri "tokenize-rt" version))
19988 (sha256
19989 (base32
19990 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
19991 (build-system python-build-system)
19992 (home-page "https://github.com/asottile/tokenize-rt")
19993 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
19994 (description
19995 "This Python library is a wrapper around @code{tokenize} from the Python
19996 standard library. It provides two additional tokens @code{ESCAPED_NL} and
19997 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
19998 and @code{tokens_to_src} to roundtrip.")
19999 (license license:expat)))
20000
20001 (define-public python-future-fstrings
20002 (package
20003 (name "python-future-fstrings")
20004 (version "0.4.1")
20005 (source
20006 (origin
20007 (method url-fetch)
20008 (uri (pypi-uri "future_fstrings" version))
20009 (sha256
20010 (base32
20011 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
20012 (build-system python-build-system)
20013 (propagated-inputs
20014 `(("python-tokenize-rt" ,python-tokenize-rt)))
20015 (home-page "https://github.com/asottile/future-fstrings")
20016 (synopsis "Backport of fstrings to Python < 3.6")
20017 (description
20018 "This package provides a UTF-8 compatible encoding
20019 @code{future_fstrings}, which performs source manipulation. It decodes the
20020 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
20021 @code{f} strings.")
20022 (license license:expat)))
20023
20024 (define-public python-typed-ast
20025 (package
20026 (name "python-typed-ast")
20027 (version "1.4.2")
20028 (source
20029 (origin
20030 (method git-fetch)
20031 (uri (git-reference
20032 (url "https://github.com/python/typed_ast")
20033 (commit version)))
20034 (sha256
20035 (base32 "1wr6pkvvrq6rzjjw88pd5xy8fy06msam4hlxbkglvdmwh4c083l0"))
20036 (file-name (git-file-name name version))))
20037 (build-system python-build-system)
20038 (arguments
20039 `(#:phases
20040 (modify-phases %standard-phases
20041 (replace 'check
20042 (lambda _
20043 (invoke "pytest"))))))
20044 (native-inputs `(("python-pytest" ,python-pytest)))
20045 (home-page "https://github.com/python/typed_ast")
20046 (synopsis "Fork of Python @code{ast} modules with type comment support")
20047 (description "This package provides a parser similar to the standard
20048 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
20049 include PEP 484 type comments and are independent of the version of Python
20050 under which they are run. The @code{typed_ast} parsers produce the standard
20051 Python AST (plus type comments), and are both fast and correct, as they are
20052 based on the CPython 2.7 and 3.7 parsers.")
20053 ;; See the file "LICENSE" for the details.
20054 (license (list license:psfl
20055 license:asl2.0
20056 license:expat)))) ;ast27/Parser/spark.py
20057
20058 (define-public python-typer
20059 (package
20060 (name "python-typer")
20061 (version "0.3.2")
20062 (source
20063 (origin
20064 ;; Building `python-typer` from the git repository requires the `flit-core`
20065 ;; Python package that is not installed by `python-flit`.
20066 (method url-fetch)
20067 (uri (pypi-uri "typer" version))
20068 (sha256
20069 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
20070 (build-system python-build-system)
20071 (arguments
20072 `(#:phases
20073 (modify-phases %standard-phases
20074 (add-before 'check 'disable-failing-tests
20075 (lambda _
20076 (substitute* "tests/test_completion/test_completion.py"
20077 (("def test_show_completion")
20078 "def _test_show_completion")
20079 (("def test_install_completion")
20080 "def _test_install_completion"))
20081 (substitute* "tests/test_completion/test_completion_install.py"
20082 (("def test_completion_install_bash")
20083 "def _test_completion_install_bash")
20084 (("def test_completion_install_zsh")
20085 "def _test_completion_install_zsh")
20086 (("def test_completion_install_fish")
20087 "def _test_completion_install_fish")
20088 (("def test_completion_install_powershell")
20089 "def _test_completion_install_powershell"))
20090 #t))
20091 (replace 'check
20092 (lambda _
20093 (setenv "PYTHONPATH"
20094 (string-append (getcwd) ":"
20095 (getenv "PYTHONPATH")))
20096 (invoke "python" "-m" "pytest" "tests/")
20097 #t)))))
20098 (propagated-inputs
20099 `(("python-click" ,python-click)))
20100 (native-inputs
20101 `(("python-coverage" ,python-coverage)
20102 ("python-pytest" ,python-pytest)
20103 ("python-shellingham" ,python-shellingham)))
20104 (home-page "https://github.com/tiangolo/typer")
20105 (synopsis
20106 "Typer builds CLI based on Python type hints")
20107 (description
20108 "Typer is a library for building CLI applications. It's based on
20109 Python 3.6+ type hints.")
20110 ;; MIT license
20111 (license license:expat)))
20112
20113 (define-public python-typing
20114 (package
20115 (name "python-typing")
20116 (version "3.7.4.3")
20117 (source
20118 (origin
20119 (method url-fetch)
20120 (uri (pypi-uri "typing" version))
20121 (sha256
20122 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
20123 (build-system python-build-system)
20124 (home-page "https://docs.python.org/3/library/typing.html")
20125 (synopsis "Type hints for Python")
20126 (description "This is a backport of the standard library @code{typing}
20127 module to Python versions older than 3.5. Typing defines a standard notation
20128 for Python function and variable type annotations. The notation can be used
20129 for documenting code in a concise, standard format, and it has been designed
20130 to also be used by static and runtime type checkers, static analyzers, IDEs
20131 and other tools.")
20132 (license license:psfl)))
20133
20134 (define-public python2-typing
20135 (package-with-python2 python-typing))
20136
20137 (define-public python-typing-extensions
20138 (package
20139 (name "python-typing-extensions")
20140 (version "3.7.4.3")
20141 (source
20142 (origin
20143 (method url-fetch)
20144 (uri (pypi-uri "typing_extensions" version))
20145 (sha256
20146 (base32
20147 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20148 (build-system python-build-system)
20149 (home-page
20150 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20151 (synopsis "Experimental type hints for Python")
20152 (description
20153 "The typing_extensions module contains additional @code{typing} hints not
20154 yet present in the of the @code{typing} standard library.
20155 Included are implementations of:
20156 @enumerate
20157 @item ClassVar
20158 @item ContextManager
20159 @item Counter
20160 @item DefaultDict
20161 @item Deque
20162 @item NewType
20163 @item NoReturn
20164 @item overload
20165 @item Protocol
20166 @item runtime
20167 @item Text
20168 @item Type
20169 @item TYPE_CHECKING
20170 @item AsyncGenerator
20171 @end enumerate\n")
20172 (license license:psfl)))
20173
20174 (define-public bpython
20175 (package
20176 (name "bpython")
20177 (version "0.21")
20178 (source
20179 (origin
20180 (method url-fetch)
20181 (uri (pypi-uri "bpython" version))
20182 (sha256
20183 (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
20184 (build-system python-build-system)
20185 (arguments
20186 `(#:phases
20187 (modify-phases %standard-phases
20188 (add-after 'unpack 'remove-failing-test
20189 (lambda _
20190 ;; Remove failing test. FIXME: make it pass
20191 (delete-file "bpython/test/test_args.py")
20192 #t))
20193 (add-after 'wrap 'add-aliases
20194 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20195 (lambda* (#:key outputs #:allow-other-keys)
20196 (let ((out (assoc-ref outputs "out")))
20197 (for-each
20198 (lambda (old new)
20199 (symlink old (string-append out "/bin/" new)))
20200 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20201 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20202 #t)))))
20203 (propagated-inputs
20204 `(("python-pygments" ,python-pygments)
20205 ("python-requests" ,python-requests)
20206 ("python-curtsies" ,python-curtsies)
20207 ("python-greenlet" ,python-greenlet)
20208 ("python-six" ,python-six)
20209 ("python-cwcwidth" ,python-cwcwidth)
20210 ("python-pyxdg" ,python-pyxdg)
20211 ;; optional dependencies
20212 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20213 ("python-watchdog" ,python-watchdog)
20214 ("python-jedi" ,python-jedi)))
20215 (native-inputs
20216 `(("python-sphinx" ,python-sphinx)
20217 ("python-mock" ,python-mock)
20218 ("python-tox" ,python-tox)
20219 ("python-wheel" ,python-wheel)))
20220 (home-page "https://bpython-interpreter.org/")
20221 (synopsis "Fancy interface to the Python interpreter")
20222 (description "Bpython is a fancy interface to the Python
20223 interpreter. bpython's main features are
20224
20225 @enumerate
20226 @item in-line syntax highlighting,
20227 @item readline-like autocomplete with suggestions displayed as you type,
20228 @item expected parameter list for any Python function,
20229 @item \"rewind\" function to pop the last line of code from memory and
20230 re-evaluate,
20231 @item send the code you've entered off to a pastebin,
20232 @item save the code you've entered to a file, and
20233 @item auto-indentation.
20234 @end enumerate")
20235 (license license:expat)))
20236
20237 (define-public python-pyinotify
20238 (package
20239 (name "python-pyinotify")
20240 (version "0.9.6")
20241 (source (origin
20242 (method url-fetch)
20243 (uri (pypi-uri "pyinotify" version))
20244 (sha256
20245 (base32
20246 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20247 (build-system python-build-system)
20248 (arguments `(#:tests? #f)) ;no tests
20249 (home-page "https://github.com/seb-m/pyinotify")
20250 (synopsis "Python library for monitoring inotify events")
20251 (description
20252 "@code{pyinotify} provides a Python interface for monitoring
20253 file system events on Linux.")
20254 (license license:expat)))
20255
20256 (define-public python2-pyinotify
20257 (package-with-python2 python-pyinotify))
20258
20259 ;; Ada parser uses this version.
20260 (define-public python2-quex-0.67.3
20261 (package
20262 (name "python2-quex")
20263 (version "0.67.3")
20264 (source
20265 (origin
20266 (method url-fetch)
20267 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20268 (version-major+minor version)
20269 "/quex-" version ".zip"))
20270 (sha256
20271 (base32
20272 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20273 (build-system python-build-system)
20274 (native-inputs
20275 `(("unzip" ,unzip)))
20276 (arguments
20277 `(#:python ,python-2
20278 #:tests? #f
20279 #:phases
20280 (modify-phases %standard-phases
20281 (delete 'configure)
20282 (delete 'build)
20283 (replace 'install
20284 (lambda* (#:key outputs #:allow-other-keys)
20285 (let* ((out (assoc-ref outputs "out"))
20286 (share/quex (string-append out "/share/quex"))
20287 (bin (string-append out "/bin")))
20288 (copy-recursively "." share/quex)
20289 (mkdir-p bin)
20290 (symlink (string-append share/quex "/quex-exe.py")
20291 (string-append bin "/quex"))
20292 #t))))))
20293 (native-search-paths
20294 (list (search-path-specification
20295 (variable "QUEX_PATH")
20296 (files '("share/quex")))))
20297 (home-page "http://quex.sourceforge.net/")
20298 (synopsis "Lexical analyzer generator in Python")
20299 (description "@code{quex} is a lexical analyzer generator in Python.")
20300 (license license:lgpl2.1+))) ; Non-military
20301
20302 (define-public python2-quex
20303 (package (inherit python2-quex-0.67.3)
20304 (name "python2-quex")
20305 (version "0.68.1")
20306 (source
20307 (origin
20308 (method url-fetch)
20309 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20310 (sha256
20311 (base32
20312 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20313 (file-name (string-append name "-" version ".tar.gz"))))))
20314
20315 (define-public python-more-itertools
20316 (package
20317 (name "python-more-itertools")
20318 (version "8.2.0")
20319 (source
20320 (origin
20321 (method url-fetch)
20322 (uri (pypi-uri "more-itertools" version))
20323 (sha256
20324 (base32
20325 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
20326 (build-system python-build-system)
20327 (home-page "https://github.com/erikrose/more-itertools")
20328 (synopsis "More routines for operating on iterables, beyond itertools")
20329 (description "Python's built-in @code{itertools} module implements a
20330 number of iterator building blocks inspired by constructs from APL, Haskell,
20331 and SML. @code{more-itertools} includes additional building blocks for
20332 working with iterables.")
20333 (properties `((python2-variant . ,(delay python2-more-itertools))))
20334 (license license:expat)))
20335
20336 ;; The 5.x series are the last versions supporting Python 2.7.
20337 (define-public python2-more-itertools
20338 (package
20339 (inherit python-more-itertools)
20340 (name "python2-more-itertools")
20341 (version "5.0.0")
20342 (source (origin
20343 (method url-fetch)
20344 (uri (pypi-uri "more-itertools" version))
20345 (sha256
20346 (base32
20347 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
20348 (arguments
20349 `(#:python ,python-2))
20350 (propagated-inputs
20351 `(("python2-six" ,python2-six-bootstrap)))))
20352
20353 (define-public python-latexcodec
20354 (package
20355 (name "python-latexcodec")
20356 (version "1.0.7")
20357 (source
20358 (origin
20359 (method url-fetch)
20360 (uri (pypi-uri "latexcodec" version))
20361 (sha256
20362 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
20363 (build-system python-build-system)
20364 (inputs
20365 `(("python-six" ,python-six)))
20366 (home-page "https://readthedocs.org/projects/latexcodec/")
20367 (synopsis "Work with LaTeX code in Python")
20368 (description "Lexer and codec to work with LaTeX code in Python.")
20369 (license license:expat)))
20370
20371 (define-public python-pybtex
20372 (package
20373 (name "python-pybtex")
20374 (version "0.22.2")
20375 (source
20376 (origin
20377 (method url-fetch)
20378 (uri (pypi-uri "pybtex" version))
20379 (sha256
20380 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
20381 (build-system python-build-system)
20382 (native-inputs
20383 `(("python-nose" ,python-nose)))
20384 (inputs
20385 `(("python-latexcodec" ,python-latexcodec)
20386 ("python-pyyaml" ,python-pyyaml)
20387 ("python-six" ,python-six)))
20388 (arguments
20389 `(#:test-target "nosetests"))
20390 (home-page "https://pybtex.org/")
20391 (synopsis "BibTeX-compatible bibliography processor")
20392 (description "Pybtex is a BibTeX-compatible bibliography processor written
20393 in Python. You can simply type pybtex instead of bibtex.")
20394 (license license:expat)))
20395
20396 (define-public python-onetimepass
20397 (package
20398 (name "python-onetimepass")
20399 (version "1.0.1")
20400 (source
20401 (origin
20402 (method url-fetch)
20403 (uri (pypi-uri "onetimepass" version))
20404 (sha256
20405 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
20406 (build-system python-build-system)
20407 (propagated-inputs `(("python-six" ,python-six)))
20408 (home-page "https://github.com/tadeck/onetimepass/")
20409 (synopsis "One-time password library")
20410 (description "Python one-time password library for HMAC-based (HOTP) and
20411 time-based (TOTP) passwords.")
20412 (license license:expat)))
20413
20414 (define-public python-parso
20415 (package
20416 (name "python-parso")
20417 (version "0.8.2")
20418 (source
20419 (origin
20420 (method url-fetch)
20421 (uri (pypi-uri "parso" version))
20422 (sha256
20423 (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
20424 (native-inputs
20425 `(("python-pytest" ,python-pytest)))
20426 (build-system python-build-system)
20427 (arguments
20428 `(#:phases (modify-phases %standard-phases
20429 (replace 'check
20430 (lambda _ (invoke "pytest" "-vv"))))))
20431 (home-page "https://github.com/davidhalter/parso")
20432 (synopsis "Python Parser")
20433 (description "Parso is a Python parser that supports error recovery and
20434 round-trip parsing for different Python versions (in multiple Python versions).
20435 Parso is also able to list multiple syntax errors in your Python file.")
20436 (license license:expat)))
20437
20438 (define-public python2-parso
20439 (package-with-python2 python-parso))
20440
20441 (define-public python-async-generator
20442 (package
20443 (name "python-async-generator")
20444 (version "1.10")
20445 (source
20446 (origin
20447 (method url-fetch)
20448 (uri (pypi-uri "async_generator" version))
20449 (sha256
20450 (base32
20451 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
20452 (build-system python-build-system)
20453 (native-inputs
20454 `(("python-pytest" ,python-pytest)))
20455 (home-page "https://github.com/python-trio/async_generator")
20456 (synopsis "Async generators and context managers for Python 3.5+")
20457 (description "@code{async_generator} back-ports Python 3.6's native async
20458 generators and Python 3.7's context managers into Python 3.5.")
20459 ;; Dual licensed.
20460 (license (list license:expat license:asl2.0))))
20461
20462 (define-public python-async-timeout
20463 (package
20464 (name "python-async-timeout")
20465 (version "3.0.1")
20466 (source
20467 (origin
20468 (method url-fetch)
20469 (uri (pypi-uri "async-timeout" version))
20470 (sha256
20471 (base32
20472 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
20473 (build-system python-build-system)
20474 (home-page "https://github.com/aio-libs/async_timeout/")
20475 (synopsis "Timeout context manager for asyncio programs")
20476 (description "@code{async-timeout} provides a timeout timeout context
20477 manager compatible with @code{asyncio}.")
20478 (license license:asl2.0)))
20479
20480 (define-public python-glob2
20481 (package
20482 (name "python-glob2")
20483 (version "0.7")
20484 (source
20485 (origin
20486 (method git-fetch)
20487 (uri (git-reference
20488 (url "https://github.com/miracle2k/python-glob2")
20489 (commit (string-append "v" version))))
20490 (file-name (git-file-name name version))
20491 (sha256
20492 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
20493 (build-system python-build-system)
20494 (home-page "https://github.com/miracle2k/python-glob2/")
20495 (synopsis "Extended Version of the python buildin glob module")
20496 (description "This is an extended version of the Python
20497 @url{http://docs.python.org/library/glob.html, built-in glob module} which
20498 adds:
20499
20500 @itemize
20501 @item The ability to capture the text matched by glob patterns, and return
20502 those matches alongside the file names.
20503 @item A recursive @code{**} globbing syntax, akin for example to the
20504 @code{globstar} option of Bash.
20505 @item The ability to replace the file system functions used, in order to glob
20506 on virtual file systems.
20507 @item Compatible with Python 2 and Python 3 (tested with 3.3).
20508 @end itemize
20509
20510 Glob2 currently based on the glob code from Python 3.3.1.")
20511 (license license:bsd-2)))
20512
20513 (define-public python2-glob2
20514 (package-with-python2 python-glob2))
20515
20516 (define-public python-gipc
20517 (package
20518 (name "python-gipc")
20519 (version "0.6.0")
20520 (source
20521 (origin
20522 (method url-fetch)
20523 (uri (pypi-uri "gipc" version ".zip"))
20524 (sha256
20525 (base32
20526 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
20527 (build-system python-build-system)
20528 (native-inputs
20529 `(("unzip" ,unzip)))
20530 (propagated-inputs
20531 `(("python-gevent" ,python-gevent)))
20532 (home-page "https://gehrcke.de/gipc/")
20533 (synopsis "Child process management in the context of gevent")
20534 (description "Usage of Python's multiprocessing package in a
20535 gevent-powered application may raise problems. With @code{gipc},
20536 process-based child processes can safely be created anywhere within a
20537 gevent-powered application.")
20538 (license license:expat)))
20539
20540 (define-public python-beautifultable
20541 (package
20542 (name "python-beautifultable")
20543 (version "1.0.0")
20544 (source
20545 (origin
20546 (method url-fetch)
20547 (uri (pypi-uri "beautifultable" version))
20548 (sha256
20549 (base32
20550 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
20551 (build-system python-build-system)
20552 (propagated-inputs
20553 `(("python-wcwidth" ,python-wcwidth)))
20554 (arguments
20555 `(#:phases
20556 (modify-phases %standard-phases
20557 (add-after 'unpack 'patch-setup.py
20558 (lambda _
20559 (substitute* "setup.py"
20560 (("setup\\(")
20561 "setup(\n test_suite=\"test\",")))))))
20562 (home-page "https://github.com/pri22296/beautifultable")
20563 (synopsis "Print ASCII tables for terminals")
20564 (description "@code{python-beautifultable} provides a class for easily
20565 printing tabular data in a visually appealing ASCII format to a terminal.
20566
20567 Features include, but are not limited to:
20568 @itemize
20569 @item Full customization of the look and feel of the table
20570 @item Row and column accessors.
20571 @item Full support for colors using ANSI sequences or any library.
20572 @item Plenty of predefined styles and option to create custom ones.
20573 @item Support for Unicode characters.
20574 @item Supports streaming table when data is slow to retrieve.
20575 @end itemize")
20576 (license license:expat)))
20577
20578 (define-public python-globber
20579 (package
20580 (name "python-globber")
20581 (version "0.2.1")
20582 (source
20583 (origin
20584 (method git-fetch)
20585 (uri (git-reference
20586 (url "https://github.com/asharov/globber")
20587 (commit version)))
20588 (file-name (git-file-name name version))
20589 (sha256
20590 (base32
20591 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
20592 (build-system python-build-system)
20593 (home-page "https://github.com/asharov/globber")
20594 (synopsis "Library for string matching with glob patterns")
20595 (description
20596 "Globber is a Python library for matching file names against glob patterns.
20597 In contrast to other glob-matching libraries, it matches arbitrary strings and
20598 doesn't require the matched names to be existing files. In addition, it
20599 supports the globstar @code{**} operator to match an arbitrary number of
20600 path components.")
20601 (license license:asl2.0)))
20602
20603 (define-public python-git-hammer
20604 (package
20605 (name "python-git-hammer")
20606 (version "0.3.1")
20607 (source
20608 (origin
20609 (method git-fetch)
20610 (uri (git-reference
20611 (url "https://github.com/asharov/git-hammer")
20612 (commit version)))
20613 (file-name (git-file-name name version))
20614 (sha256
20615 (base32
20616 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
20617 (build-system python-build-system)
20618 (arguments
20619 `(#:phases
20620 (modify-phases %standard-phases
20621 (add-after 'unpack 'patch-setup.py
20622 (lambda _
20623 (substitute* "setup.py"
20624 (("setup\\(")
20625 "setup(\n test_suite=\"test\",")))))))
20626 (propagated-inputs
20627 `(("python-beautifultable" ,python-beautifultable)
20628 ("python-dateutil" ,python-dateutil)
20629 ("python-gitpython" ,python-gitpython)
20630 ("python-globber" ,python-globber)
20631 ("python-matplotlib" ,python-matplotlib)
20632 ("python-sqlalchemy" ,python-sqlalchemy)
20633 ("python-sqlalchemy-utils"
20634 ,python-sqlalchemy-utils)))
20635 (home-page "https://github.com/asharov/git-hammer")
20636 (synopsis "Provide statistics for git repositories")
20637 (description
20638 "Git Hammer is a statistics tool for projects in git repositories.
20639 Its major feature is tracking the number of lines authored by each person for every
20640 commit, but it also includes some other useful statistics.")
20641 (license license:asl2.0)))
20642
20643 (define-public python-fusepy
20644 (package
20645 (name "python-fusepy")
20646 (version "2.0.4")
20647 (source
20648 (origin
20649 (method url-fetch)
20650 (uri (pypi-uri "fusepy" version))
20651 (sha256
20652 (base32
20653 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
20654 (build-system python-build-system)
20655 (arguments
20656 `(#:phases
20657 (modify-phases %standard-phases
20658 (add-before 'build 'set-library-file-name
20659 (lambda* (#:key inputs #:allow-other-keys)
20660 (let ((fuse (assoc-ref inputs "fuse")))
20661 (substitute* "fuse.py"
20662 (("find_library\\('fuse'\\)")
20663 (string-append "'" fuse "/lib/libfuse.so'")))
20664 #t))))))
20665 (propagated-inputs
20666 `(("fuse" ,fuse)))
20667 (home-page "https://github.com/fusepy/fusepy")
20668 (synopsis "Simple ctypes bindings for FUSE")
20669 (description "Python module that provides a simple interface to FUSE and
20670 MacFUSE. The binding is created using the standard @code{ctypes} library.")
20671 (license license:isc)))
20672
20673 (define-public python2-fusepy
20674 (package-with-python2 python-fusepy))
20675
20676 (define-public python-fusepyng
20677 (package
20678 (name "python-fusepyng")
20679 (version "1.0.7")
20680 (source
20681 (origin
20682 (method url-fetch)
20683 (uri (pypi-uri "fusepyng" version))
20684 (sha256
20685 (base32
20686 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
20687 (build-system python-build-system)
20688 (arguments
20689 '(#:phases
20690 (modify-phases %standard-phases
20691 (add-after 'unpack 'set-libfuse-path
20692 (lambda* (#:key inputs #:allow-other-keys)
20693 (let ((fuse (assoc-ref inputs "fuse")))
20694 (substitute* "fusepyng.py"
20695 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
20696 (string-append "\"" fuse "/lib/libfuse.so\""))))
20697 #t)))))
20698 (inputs
20699 `(("fuse" ,fuse)))
20700 (propagated-inputs
20701 `(("python-paramiko" ,python-paramiko)))
20702 (home-page "https://github.com/rianhunter/fusepyng")
20703 (synopsis "Simple ctypes bindings for FUSE")
20704 (description "@code{fusepyng} is a Python module that provides a simple
20705 interface to FUSE on various operating systems. It's just one file and is
20706 implemented using @code{ctypes}.")
20707 (license license:isc)))
20708
20709 (define-public python-userspacefs
20710 (package
20711 (name "python-userspacefs")
20712 (version "2.0.3")
20713 (source
20714 (origin
20715 (method url-fetch)
20716 (uri (pypi-uri "userspacefs" version))
20717 (sha256
20718 (base32
20719 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
20720 (build-system python-build-system)
20721 (propagated-inputs
20722 `(("python-fusepyng" ,python-fusepyng)))
20723 (home-page "https://github.com/rianhunter/userspacefs")
20724 (synopsis "User-space file systems for Python")
20725 (description
20726 "@code{userspacefs} is a library that allows you to easily write
20727 user-space file systems in Python.")
20728 (license license:gpl3+)))
20729
20730 (define-public python-stone
20731 (package
20732 (name "python-stone")
20733 (version "3.2.1")
20734 (source
20735 (origin
20736 (method url-fetch)
20737 (uri (pypi-uri "stone" version))
20738 (sha256
20739 (base32
20740 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
20741 (build-system python-build-system)
20742 (arguments
20743 `(#:phases
20744 (modify-phases %standard-phases
20745 (add-after 'unpack 'change-version-requirements
20746 (lambda _
20747 ;; Match the requirement in test/requirements.txt
20748 (substitute* "setup.py"
20749 (("pytest < 5") "pytest < 7"))
20750 ;; We don't care about a coverage report.
20751 (substitute* "test/requirements.txt"
20752 (("coverage.*") "coverage\n"))))
20753 (replace 'check
20754 (lambda* (#:key tests? #:allow-other-keys)
20755 (when tests?
20756 ;; These tests don't import currectly.
20757 (delete-file "test/test_js_client.py")
20758 (delete-file "test/test_tsd_types.py")
20759 (delete-file "test/test_python_gen.py")
20760 (invoke "pytest")))))))
20761 (propagated-inputs
20762 `(("python-ply" ,python-ply)
20763 ("python-six" ,python-six)))
20764 (native-inputs
20765 `(("python-coverage" ,python-coverage)
20766 ("python-mock" ,python-mock)
20767 ("python-pytest" ,python-pytest)
20768 ("python-pytest-runner" ,python-pytest-runner)))
20769 (home-page "https://github.com/dropbox/stone")
20770 (synopsis "Official Api Spec Language for Dropbox")
20771 (description
20772 "Stone is an interface description language (IDL) for APIs.")
20773 (license license:expat)))
20774
20775 (define-public pybind11
20776 (package
20777 (name "pybind11")
20778 (version "2.6.2")
20779 (source (origin
20780 (method git-fetch)
20781 (uri (git-reference
20782 (url "https://github.com/pybind/pybind11")
20783 (commit (string-append "v" version))))
20784 (sha256
20785 (base32
20786 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
20787 (file-name (git-file-name name version))))
20788 (build-system cmake-build-system)
20789 (native-inputs
20790 `(("python" ,python-wrapper)
20791
20792 ;; The following dependencies are used for tests.
20793 ("python-pytest" ,python-pytest)
20794 ("catch" ,catch-framework2-1)
20795 ("eigen" ,eigen)))
20796 (arguments
20797 `(#:configure-flags
20798 (list (string-append "-DCATCH_INCLUDE_DIR="
20799 (assoc-ref %build-inputs "catch")
20800 "/include/catch"))
20801
20802 #:phases (modify-phases %standard-phases
20803 (add-after 'install 'install-python
20804 (lambda* (#:key outputs #:allow-other-keys)
20805 (let ((out (assoc-ref outputs "out")))
20806 (with-directory-excursion "../source"
20807 (setenv "PYBIND11_USE_CMAKE" "yes")
20808 (invoke "python" "setup.py" "install"
20809 "--single-version-externally-managed"
20810 "--root=/"
20811 (string-append "--prefix=" out)))))))
20812
20813 #:test-target "check"))
20814 (home-page "https://github.com/pybind/pybind11/")
20815 (synopsis "Seamless operability between C++11 and Python")
20816 (description
20817 "@code{pybind11} is a lightweight header-only library that exposes C++
20818 types in Python and vice versa, mainly to create Python bindings of existing
20819 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
20820 library: to minimize boilerplate code in traditional extension modules by
20821 inferring type information using compile-time introspection.")
20822 (license license:bsd-3)))
20823
20824 (define-public python-pooch
20825 (package
20826 (name "python-pooch")
20827 (version "1.3.0")
20828 (source
20829 (origin
20830 (method url-fetch)
20831 (uri (pypi-uri "pooch" version))
20832 (sha256
20833 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
20834 (build-system python-build-system)
20835 (arguments
20836 `(#:tests? #f)) ;requires online data
20837 (propagated-inputs
20838 `(("python-appdirs" ,python-appdirs)
20839 ("python-packaging" ,python-packaging)
20840 ("python-requests" ,python-requests)))
20841 (home-page "https://github.com/fatiando/pooch")
20842 (synopsis "Manage your Python library's sample data files")
20843 (description
20844 "Pooch manages your Python library's sample data files: it automatically
20845 downloads and stores them in a local directory, with support for versioning
20846 and corruption checks.")
20847 (license license:bsd-3)))
20848
20849 (define-public python-fasteners
20850 (package
20851 (name "python-fasteners")
20852 (version "0.15")
20853 (source
20854 (origin
20855 (method url-fetch)
20856 (uri (pypi-uri "fasteners" version))
20857 (sha256
20858 (base32
20859 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
20860 (build-system python-build-system)
20861 (propagated-inputs
20862 `(("python-monotonic" ,python-monotonic)
20863 ("python-six" ,python-six)))
20864 (native-inputs
20865 `(("python-testtools" ,python-testtools)))
20866 (home-page "https://github.com/harlowja/fasteners")
20867 (synopsis "Python package that provides useful locks")
20868 (description
20869 "This package provides a Python program that provides following locks:
20870
20871 @itemize
20872 @item Locking decorator
20873 @item Reader-writer locks
20874 @item Inter-process locks
20875 @item Generic helpers
20876 @end itemize\n")
20877 (license license:asl2.0)))
20878
20879 (define-public python-requests-file
20880 (package
20881 (name "python-requests-file")
20882 (version "1.4.3")
20883 (source
20884 (origin
20885 (method url-fetch)
20886 (uri (pypi-uri "requests-file" version))
20887 (sha256
20888 (base32
20889 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
20890 (build-system python-build-system)
20891 (propagated-inputs
20892 `(("python-requests" ,python-requests)
20893 ("python-six" ,python-six)))
20894 (home-page
20895 "https://github.com/dashea/requests-file")
20896 (synopsis "File transport adapter for Requests")
20897 (description
20898 "Requests-File is a transport adapter for use with the Requests Python
20899 library to allow local file system access via @code{file://} URLs.")
20900 (license license:asl2.0)))
20901
20902 (define-public python2-requests-file
20903 (package-with-python2 python-requests-file))
20904
20905 (define-public python-identify
20906 (package
20907 (name "python-identify")
20908 (version "1.4.25")
20909 (source
20910 (origin
20911 ;; There are no tests in the PyPI tarball.
20912 (method git-fetch)
20913 (uri (git-reference
20914 (url "https://github.com/chriskuehl/identify")
20915 (commit (string-append "v" version))))
20916 (file-name (git-file-name name version))
20917 (sha256
20918 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
20919 (build-system python-build-system)
20920 (arguments
20921 `(#:phases
20922 (modify-phases %standard-phases
20923 ;; system-error "utime" "~A" ("No such file or directory")
20924 (delete 'ensure-no-mtimes-pre-1980)
20925 (replace 'check
20926 (lambda* (#:key tests? #:allow-other-keys)
20927 (when tests?
20928 (invoke "pytest" "-vv")))))))
20929 (native-inputs
20930 `(("python-coverage" ,python-coverage)
20931 ("python-pytest" ,python-pytest)))
20932 (propagated-inputs
20933 `(("python-editdistance" ,python-editdistance)))
20934 (home-page "https://github.com/chriskuehl/identify")
20935 (synopsis "File identification library for Python")
20936 (description
20937 "@code{identify} is a file identification library for Python. Given
20938 a file (or some information about a file), return a set of standardized tags
20939 identifying what the file is.")
20940 (license license:expat)))
20941
20942 (define-public python-tldextract
20943 (package
20944 (name "python-tldextract")
20945 (version "2.2.0")
20946 (source
20947 (origin
20948 (method url-fetch)
20949 (uri (pypi-uri "tldextract" version))
20950 (sha256
20951 (base32
20952 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
20953 (build-system python-build-system)
20954 (native-inputs
20955 `(("python-pytest" ,python-pytest)
20956 ("python-responses" ,python-responses)))
20957 (propagated-inputs
20958 `(("python-idna" ,python-idna)
20959 ("python-requests" ,python-requests)
20960 ("python-requests-file" ,python-requests-file)))
20961 (home-page
20962 "https://github.com/john-kurkowski/tldextract")
20963 (synopsis
20964 "Separate the TLD from the registered domain and subdomains of a URL")
20965 (description
20966 "TLDExtract accurately separates the TLD from the registered domain and
20967 subdomains of a URL, using the Public Suffix List. By default, this includes
20968 the public ICANN TLDs and their exceptions. It can optionally support the
20969 Public Suffix List's private domains as well.")
20970 (license license:bsd-3)))
20971
20972 (define-public python2-tldextract
20973 (package-with-python2 python-tldextract))
20974
20975 (define-public python-tldr
20976 (package
20977 (name "python-tldr")
20978 (version "1.2.1")
20979 (source
20980 (origin
20981 ;; There's no test in PyPI.
20982 (method git-fetch)
20983 (uri (git-reference
20984 (url "https://github.com/tldr-pages/tldr-python-client")
20985 (commit version)))
20986 (file-name (git-file-name name version))
20987 (sha256
20988 (base32 "0n9wqvjxspm18vlxf9j9slrcydshk4rkv5nwkrqhfq606n6zvks4"))))
20989 (build-system python-build-system)
20990 (arguments
20991 `(#:phases
20992 (modify-phases %standard-phases
20993 (replace 'check
20994 (lambda* (#:key tests? #:allow-other-keys)
20995 (when tests?
20996 ;; This test fails. It tries to open a network socket.
20997 (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
20998 (native-inputs
20999 `(("python-pytest" ,python-pytest)
21000 ("python-pytest-runner" ,python-pytest-runner)))
21001 (inputs
21002 `(("python-argcomplete" ,python-argcomplete)
21003 ("python-colorama" ,python-colorama)
21004 ("python-termcolor" ,python-termcolor)))
21005 (home-page "https://github.com/tldr-pages/tldr-python-client")
21006 (synopsis "Python command-line client for tldr pages")
21007 (description "This package provides the @code{tldr} command allowing users
21008 to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
21009 effort to simplify the man pages with practical examples.")
21010 (license license:expat))) ; MIT license
21011
21012 (define-public python-nodeenv
21013 (package
21014 (name "python-nodeenv")
21015 (version "1.4.0")
21016 (source
21017 (origin
21018 ;; There's no tarball in PyPI.
21019 (method git-fetch)
21020 (uri (git-reference
21021 (url "https://github.com/ekalinin/nodeenv")
21022 (commit version)))
21023 (file-name (git-file-name name version))
21024 (sha256
21025 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
21026 (build-system python-build-system)
21027 (arguments
21028 `(#:phases
21029 (modify-phases %standard-phases
21030 (replace 'check
21031 (lambda _
21032 ;; This test fails. It tries to open a network socket.
21033 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
21034 (native-inputs
21035 `(("python-coverage" ,python-coverage)
21036 ("python-mock" ,python-mock)
21037 ("python-pytest" ,python-pytest)))
21038 (home-page "https://ekalinin.github.io/nodeenv/")
21039 (synopsis "Create isolated node.js environments")
21040 (description
21041 "Nodeenv (node.js virtual environment) is a tool to create isolated
21042 node.js environments. It creates an environment that has its own installation
21043 directories, that doesn't share libraries with other node.js virtual
21044 environments.")
21045 (license license:bsd-3)))
21046
21047 (define-public python-pynamecheap
21048 (package
21049 (name "python-pynamecheap")
21050 (version "0.0.3")
21051 (source
21052 (origin
21053 (method url-fetch)
21054 (uri (pypi-uri "PyNamecheap" version))
21055 (sha256
21056 (base32
21057 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
21058 (build-system python-build-system)
21059 (propagated-inputs
21060 `(("python-requests" ,python-requests)))
21061 (home-page
21062 "https://github.com/Bemmu/PyNamecheap")
21063 (synopsis
21064 "Namecheap API client in Python")
21065 (description
21066 "PyNamecheap is a Namecheap API client in Python.")
21067 (license license:expat)))
21068
21069 (define-public python2-pynamecheap
21070 (package-with-python2 python-pynamecheap))
21071
21072 (define-public python-dns-lexicon
21073 (package
21074 (name "python-dns-lexicon")
21075 (version "2.4.0")
21076 (source
21077 (origin
21078 (method url-fetch)
21079 (uri (pypi-uri "dns-lexicon" version))
21080 (sha256
21081 (base32
21082 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
21083 (build-system python-build-system)
21084 (arguments
21085 `(#:tests? #f)) ;requires internet access
21086 (propagated-inputs
21087 `(("python-future" ,python-future)
21088 ("python-pynamecheap" ,python-pynamecheap)
21089 ("python-requests" ,python-requests)
21090 ("python-tldextract" ,python-tldextract)
21091 ("python-urllib3" ,python-urllib3)))
21092 (home-page "https://github.com/AnalogJ/lexicon")
21093 (synopsis
21094 "Manipulate DNS records on various DNS providers")
21095 (description
21096 "Lexicon provides a way to manipulate DNS records on multiple DNS
21097 providers in a standardized way. It has a CLI but it can also be used as a
21098 Python library. It was designed to be used in automation, specifically with
21099 Let's Encrypt.")
21100 (license license:expat)))
21101
21102 (define-public python2-dns-lexicon
21103 (package-with-python2 python-dns-lexicon))
21104
21105 (define-public python-cfgv
21106 (package
21107 (name "python-cfgv")
21108 (version "3.1.0")
21109 (source
21110 (origin
21111 ;; There are no tests in the PyPI tarball.
21112 (method git-fetch)
21113 (uri (git-reference
21114 (url "https://github.com/asottile/cfgv")
21115 (commit (string-append "v" version))))
21116 (file-name (git-file-name name version))
21117 (sha256
21118 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
21119 (build-system python-build-system)
21120 (arguments
21121 `(#:phases
21122 (modify-phases %standard-phases
21123 (replace 'check
21124 (lambda _
21125 (invoke "pytest" "-vv"))))))
21126 (native-inputs
21127 `(("python-covdefaults" ,python-covdefaults)
21128 ("python-coverage" ,python-coverage)
21129 ("python-pytest" ,python-pytest)))
21130 (home-page "https://github.com/asottile/cfgv")
21131 (synopsis "Configuration validation library")
21132 (description
21133 "This library helps to validate configuration files and produce human
21134 readable error messages.")
21135 (license license:expat)))
21136
21137 (define-public python-commandlines
21138 (package
21139 (name "python-commandlines")
21140 (version "0.4.1")
21141 (source
21142 (origin
21143 (method url-fetch)
21144 (uri (pypi-uri "commandlines" version))
21145 (sha256
21146 (base32
21147 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
21148 (build-system python-build-system)
21149 (home-page "https://github.com/chrissimpkins/commandlines")
21150 (synopsis "Command line argument to object parsing library")
21151 (description
21152 "@code{Commandlines} is a Python library for command line application
21153 development that supports command line argument parsing, command string
21154 validation testing and application logic.")
21155 (license license:expat)))
21156
21157 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
21158 ;; python-numba. They have a very unflexible relationship.
21159 (define-public python-numba
21160 (package
21161 (name "python-numba")
21162 (version "0.51.2")
21163 (source
21164 (origin
21165 (method url-fetch)
21166 (uri (pypi-uri "numba" version))
21167 (sha256
21168 (base32
21169 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
21170 (build-system python-build-system)
21171 (arguments
21172 `(#:phases
21173 (modify-phases %standard-phases
21174 (add-after 'unpack 'disable-proprietary-features
21175 (lambda _
21176 (setenv "NUMBA_DISABLE_HSA" "1")
21177 (setenv "NUMBA_DISABLE_CUDA" "1")
21178 #t))
21179 (replace 'check
21180 (lambda* (#:key inputs outputs #:allow-other-keys)
21181 (add-installed-pythonpath inputs outputs)
21182 ;; Something is wrong with the PYTHONPATH when running the
21183 ;; tests from the build directory, as it complains about not being
21184 ;; able to import certain modules.
21185 (with-directory-excursion "/tmp"
21186 (setenv "HOME" (getcwd))
21187 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21188 (propagated-inputs
21189 `(("python-llvmlite" ,python-llvmlite)
21190 ("python-numpy" ,python-numpy)
21191 ("python-singledispatch" ,python-singledispatch)))
21192 (native-inputs ;for tests
21193 `(("python-jinja2" ,python-jinja2)
21194 ("python-pygments" ,python-pygments)))
21195 (home-page "https://numba.pydata.org")
21196 (synopsis "Compile Python code using LLVM")
21197 (description "Numba gives you the power to speed up your applications with
21198 high performance functions written directly in Python. With a few
21199 annotations, array-oriented and math-heavy Python code can be just-in-time
21200 compiled to native machine instructions, similar in performance to C, C++ and
21201 Fortran, without having to switch languages or Python interpreters.
21202
21203 Numba works by generating optimized machine code using the LLVM compiler
21204 infrastructure at import time, runtime, or statically (using the included pycc
21205 tool).")
21206 (license license:bsd-3)))
21207
21208 (define-public python-numcodecs
21209 (package
21210 (name "python-numcodecs")
21211 (version "0.6.4")
21212 (source
21213 (origin
21214 (method url-fetch)
21215 (uri (pypi-uri "numcodecs" version))
21216 (sha256
21217 (base32
21218 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21219 (build-system python-build-system)
21220 (propagated-inputs
21221 `(("python-numpy" ,python-numpy)
21222 ("python-msgpack" ,python-msgpack)))
21223 (native-inputs
21224 `(("python-pytest" ,python-pytest)
21225 ("python-setuptools-scm" ,python-setuptools-scm)))
21226 (home-page "https://github.com/zarr-developers/numcodecs")
21227 (synopsis "Buffer compression and transformation codecs")
21228 (description
21229 "This Python package provides buffer compression and transformation
21230 codecs for use in data storage and communication applications.")
21231 (license license:expat)))
21232
21233 (define-public python-asciitree
21234 (package
21235 (name "python-asciitree")
21236 (version "0.3.3")
21237 (source
21238 (origin
21239 (method url-fetch)
21240 (uri (pypi-uri "asciitree" version))
21241 (sha256
21242 (base32
21243 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21244 (build-system python-build-system)
21245 (home-page "https://github.com/mbr/asciitree")
21246 (synopsis "Draws ASCII trees")
21247 (description "This package draws tree structures using characters.")
21248 (license license:expat)))
21249
21250 (define-public python-zarr
21251 (package
21252 (name "python-zarr")
21253 (version "2.4.0")
21254 (source
21255 (origin
21256 (method url-fetch)
21257 (uri (pypi-uri "zarr" version))
21258 (sha256
21259 (base32
21260 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21261 (build-system python-build-system)
21262 (arguments
21263 `(#:phases
21264 (modify-phases %standard-phases
21265 (add-after 'unpack 'disable-service-tests
21266 (lambda _
21267 (setenv "ZARR_TEST_ABS" "0")
21268 (setenv "ZARR_TEST_MONGO" "0")
21269 (setenv "ZARR_TEST_REDIS" "0")
21270 #t))
21271 (replace 'check
21272 (lambda _
21273 (invoke "pytest" "-vv" "-k" "not lmdb")
21274 #t)))))
21275 (propagated-inputs
21276 `(("python-asciitree" ,python-asciitree)
21277 ("python-fasteners" ,python-fasteners)
21278 ("python-numcodecs" ,python-numcodecs)
21279 ("python-numpy" ,python-numpy)))
21280 (native-inputs
21281 `(("python-pytest" ,python-pytest)
21282 ("python-setuptools-scm" ,python-setuptools-scm)))
21283 (home-page "https://github.com/zarr-developers/zarr-python")
21284 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21285 (description
21286 "This package provides an implementation of chunked, compressed,
21287 N-dimensional arrays for Python.")
21288 (license license:expat)))
21289
21290 (define-public python-anndata
21291 (package
21292 (name "python-anndata")
21293 (version "0.7.6")
21294 (source
21295 (origin
21296 ;; The tarball from PyPi doesn't include tests.
21297 (method git-fetch)
21298 (uri (git-reference
21299 (url "https://github.com/theislab/anndata")
21300 (commit version)))
21301 (file-name (git-file-name name version))
21302 (sha256
21303 (base32
21304 "1q30bsfsq9xfqm8nmabg3bjh9gix3yng0170xiiyw1lin4xncf0q"))))
21305 (build-system python-build-system)
21306 (arguments
21307 `(#:phases
21308 (modify-phases %standard-phases
21309 (delete 'check)
21310 (add-before 'build 'relax-dependency-requirements
21311 (lambda _
21312 ;; We need to upgrade python-pandas to avoid
21313 ;; https://github.com/pandas-dev/pandas/issues/35446
21314 (substitute* "pyproject.toml"
21315 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21316 (replace 'build
21317 (lambda _
21318 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
21319 ;; ZIP does not support timestamps before 1980.
21320 (setenv "SOURCE_DATE_EPOCH" "315532800")
21321 (invoke "flit" "build")))
21322 (replace 'install
21323 (lambda* (#:key inputs outputs #:allow-other-keys)
21324 (add-installed-pythonpath inputs outputs)
21325 (let ((out (assoc-ref outputs "out")))
21326 (for-each (lambda (wheel)
21327 (format #true wheel)
21328 (invoke "python" "-m" "pip" "install"
21329 wheel (string-append "--prefix=" out)))
21330 (find-files "dist" "\\.whl$")))
21331 #t)))))
21332 (propagated-inputs
21333 `(("python-h5py" ,python-h5py)
21334 ("python-importlib-metadata" ,python-importlib-metadata)
21335 ("python-natsort" ,python-natsort)
21336 ("python-numcodecs" ,python-numcodecs)
21337 ("python-packaging" ,python-packaging)
21338 ("python-pandas" ,python-pandas)
21339 ("python-scipy" ,python-scipy)
21340 ("python-zarr" ,python-zarr)))
21341 (native-inputs
21342 `(("python-joblib" ,python-joblib)
21343 ("python-pytest" ,python-pytest)
21344 ("python-toml" ,python-toml)
21345 ("python-flit" ,python-flit)
21346 ("python-setuptools-scm" ,python-setuptools-scm)))
21347 (home-page "https://github.com/theislab/anndata")
21348 (synopsis "Annotated data for data analysis pipelines")
21349 (description "Anndata is a package for simple (functional) high-level APIs
21350 for data analysis pipelines. In this context, it provides an efficient,
21351 scalable way of keeping track of data together with learned annotations and
21352 reduces the code overhead typically encountered when using a mostly
21353 object-oriented library such as @code{scikit-learn}.")
21354 (license license:bsd-3)))
21355
21356 (define-public python-dill
21357 (package
21358 (name "python-dill")
21359 (version "0.3.1.1")
21360 (source
21361 (origin
21362 (method url-fetch)
21363 (uri (pypi-uri "dill" version))
21364 (sha256
21365 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
21366 (build-system python-build-system)
21367 (arguments
21368 `(#:phases
21369 (modify-phases %standard-phases
21370 (replace 'check
21371 (lambda _
21372 (with-directory-excursion "/tmp"
21373 (invoke "nosetests" "-v"))
21374 #t)))))
21375 (native-inputs
21376 `(("python-nose" ,python-nose)))
21377 (home-page "https://pypi.org/project/dill/")
21378 (synopsis "Serialize all of Python")
21379 (description "Dill extends Python's @code{pickle} module for serializing
21380 and de-serializing Python objects to the majority of the built-in Python
21381 types. Dill provides the user the same interface as the @code{pickle} module,
21382 and also includes some additional features. In addition to pickling Python
21383 objects, @code{dill} provides the ability to save the state of an interpreter
21384 session in a single command. Hence, it would be feasible to save a
21385 interpreter session, close the interpreter, ship the pickled file to another
21386 computer, open a new interpreter, unpickle the session and thus continue from
21387 the saved state of the original interpreter session.")
21388 (license license:bsd-3)))
21389
21390 (define-public python-multiprocess
21391 (package
21392 (name "python-multiprocess")
21393 (version "0.70.9")
21394 (source
21395 (origin
21396 (method url-fetch)
21397 (uri (pypi-uri "multiprocess" version))
21398 (sha256
21399 (base32
21400 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
21401 (build-system python-build-system)
21402 (arguments
21403 `(#:phases
21404 (modify-phases %standard-phases
21405 (add-after 'unpack 'disable-broken-tests
21406 (lambda _
21407 ;; This test is broken as there is no keyboard interrupt.
21408 (substitute* "py3.7/multiprocess/tests/__init__.py"
21409 (("^(.*)def test_wait_result"
21410 line indent)
21411 (string-append indent
21412 "@unittest.skip(\"Disabled by Guix\")\n"
21413 line)))
21414 #t))
21415 ;; Tests must be run after installation.
21416 (delete 'check)
21417 (add-after 'install 'check
21418 (lambda* (#:key inputs outputs #:allow-other-keys)
21419 (add-installed-pythonpath inputs outputs)
21420 (invoke "python" "-m" "multiprocess.tests")
21421 #t)))))
21422 (propagated-inputs
21423 `(("python-dill" ,python-dill)))
21424 (home-page "https://pypi.org/project/multiprocess/")
21425 (synopsis "Multiprocessing and multithreading in Python")
21426 (description
21427 "This package is a fork of the multiprocessing Python package, a package
21428 which supports the spawning of processes using the API of the standard
21429 library's @code{threading} module.")
21430 (license license:bsd-3)))
21431
21432 (define-public python-toolz
21433 (package
21434 (name "python-toolz")
21435 (version "0.11.1")
21436 (source
21437 (origin
21438 (method url-fetch)
21439 (uri (pypi-uri "toolz" version))
21440 (sha256
21441 (base32
21442 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
21443 (build-system python-build-system)
21444 (arguments
21445 `(#:phases
21446 (modify-phases %standard-phases
21447 (replace 'check
21448 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
21449 (when tests?
21450 (add-installed-pythonpath inputs outputs)
21451 (invoke "python" "-m" "pytest" "--doctest-modules"
21452 "--pyargs" "toolz")))))))
21453 (native-inputs
21454 `(("python-pytest" ,python-pytest)))
21455 (home-page "https://github.com/pytoolz/toolz/")
21456 (synopsis "List processing tools and functional utilities")
21457 (description
21458 "This package provides a set of utility functions for iterators,
21459 functions, and dictionaries.")
21460 (license license:bsd-3)))
21461
21462 (define-public python-cytoolz
21463 (package
21464 (name "python-cytoolz")
21465 (version "0.9.0.1")
21466 (source
21467 (origin
21468 (method url-fetch)
21469 (uri (pypi-uri "cytoolz" version))
21470 (sha256
21471 (base32
21472 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
21473 (build-system python-build-system)
21474 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
21475 ;; 'exceptions'"
21476 (arguments '(#:tests? #f))
21477 (propagated-inputs
21478 `(("python-toolz" ,python-toolz)))
21479 (native-inputs
21480 `(("python-cython" ,python-cython)))
21481 (home-page "https://github.com/pytoolz/cytoolz")
21482 (synopsis "High performance functional utilities")
21483 (description
21484 "The cytoolz package implements the same API as provided by toolz. The
21485 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
21486 that is accessible to other projects developed in Cython.")
21487 (license license:bsd-3)))
21488
21489 (define-public python-sortedcollections
21490 (package
21491 (name "python-sortedcollections")
21492 (version "2.1.0")
21493 (source
21494 (origin
21495 (method url-fetch)
21496 (uri (pypi-uri "sortedcollections" version))
21497 (sha256
21498 (base32
21499 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
21500 (build-system python-build-system)
21501 (propagated-inputs
21502 `(("python-sortedcontainers" ,python-sortedcontainers)))
21503 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
21504 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
21505 (synopsis "Python Sorted Collections")
21506 (description "Sorted Collections is a Python sorted collections library.")
21507 (license license:asl2.0)))
21508
21509 (define-public python-sortedcontainers
21510 (package
21511 (name "python-sortedcontainers")
21512 (version "2.1.0")
21513 (source
21514 (origin
21515 (method url-fetch)
21516 (uri (pypi-uri "sortedcontainers" version))
21517 (sha256
21518 (base32
21519 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
21520 (build-system python-build-system)
21521 (arguments
21522 ;; FIXME: Tests require many extra dependencies, and would introduce
21523 ;; a circular dependency on hypothesis, which uses this package.
21524 '(#:tests? #f))
21525 (propagated-inputs
21526 `(("python-appdirs" ,python-appdirs)
21527 ("python-distlib" ,python-distlib)
21528 ("python-filelock" ,python-filelock)
21529 ("python-six" ,python-six-bootstrap)))
21530 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
21531 (synopsis "Sorted List, Sorted Dict, Sorted Set")
21532 (description
21533 "This package provides a sorted collections library, written in
21534 pure-Python.")
21535 (license license:asl2.0)))
21536
21537 (define-public python2-sortedcontainers
21538 (package-with-python2 python-sortedcontainers))
21539
21540 (define python-cloudpickle-testpkg
21541 (package
21542 (name "python-cloudpickle-testpkg")
21543 (version "1.6.0")
21544 (source
21545 (origin
21546 ;; Archive on pypi does not include test infrastructure.
21547 (method git-fetch)
21548 (uri (git-reference
21549 (url "https://github.com/cloudpipe/cloudpickle")
21550 (commit (string-append "v" version))))
21551 (file-name (git-file-name name version))
21552 (sha256
21553 (base32
21554 "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
21555 (build-system python-build-system)
21556 (arguments
21557 '(#:phases
21558 (modify-phases %standard-phases
21559 (add-after 'unpack 'chdir
21560 (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
21561 (home-page "https://github.com/cloudpipe/cloudpickle")
21562 (synopsis "Extended pickling support for Python objects")
21563 (description
21564 "Cloudpickle makes it possible to serialize Python constructs not
21565 supported by the default pickle module from the Python standard library. It
21566 is especially useful for cluster computing where Python expressions are
21567 shipped over the network to execute on remote hosts, possibly close to the
21568 data.")
21569 (license license:bsd-3)))
21570
21571 (define-public python-cloudpickle
21572 (package
21573 (inherit python-cloudpickle-testpkg)
21574 (name "python-cloudpickle")
21575 (build-system python-build-system)
21576 (arguments
21577 '(#:phases
21578 (modify-phases %standard-phases
21579 (replace 'check
21580 (lambda* (#:key tests? #:allow-other-keys)
21581 (if tests?
21582 (invoke "pytest" "-s" "-vv")
21583 (format #t "test suite not run~%")))))))
21584 (native-inputs
21585 `(;; For tests.
21586 ("python-cloudpickle-testpkg" ,python-cloudpickle-testpkg)
21587 ("python-psutil" ,python-psutil)
21588 ("python-pytest" ,python-pytest)
21589 ("python-tornado" ,python-tornado-6)))
21590 (home-page "https://github.com/cloudpipe/cloudpickle")
21591 (synopsis "Extended pickling support for Python objects")
21592 (description
21593 "Cloudpickle makes it possible to serialize Python constructs not
21594 supported by the default pickle module from the Python standard library. It
21595 is especially useful for cluster computing where Python expressions are
21596 shipped over the network to execute on remote hosts, possibly close to the
21597 data.")
21598 (properties `((python2-variant . ,(delay python2-cloudpickle))))
21599 (license license:bsd-3)))
21600
21601 (define-public python2-cloudpickle
21602 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
21603 (package/inherit base
21604 (version "1.3.0")
21605 (source
21606 (origin
21607 (method url-fetch)
21608 (uri (pypi-uri "cloudpickle" version))
21609 (sha256
21610 (base32
21611 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
21612 (native-inputs
21613 `(;; For tests.
21614 ("python-mock" ,python2-mock)
21615 ("python-psutil" ,python2-psutil)
21616 ("python-pytest" ,python2-pytest)
21617 ("python-tornado" ,python2-tornado)))
21618 (propagated-inputs
21619 `(("python-futures" ,python2-futures)
21620 ,@(package-propagated-inputs base))))))
21621
21622 (define-public python-locket
21623 (package
21624 (name "python-locket")
21625 (version "0.2.0")
21626 (source
21627 (origin
21628 (method url-fetch)
21629 (uri (pypi-uri "locket" version))
21630 (sha256
21631 (base32
21632 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
21633 (build-system python-build-system)
21634 (home-page "https://github.com/mwilliamson/locket.py")
21635 (synopsis "File-based locks for Python")
21636 (description
21637 "Locket implements a lock that can be used by multiple processes provided
21638 they use the same path.")
21639 (license license:bsd-2)))
21640
21641 (define-public python2-locket
21642 (package-with-python2 python-locket))
21643
21644 (define-public python-blosc
21645 (package
21646 (name "python-blosc")
21647 (version "1.5.1")
21648 (source
21649 (origin
21650 (method url-fetch)
21651 (uri (pypi-uri "blosc" version))
21652 (sha256
21653 (base32
21654 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
21655 (build-system python-build-system)
21656 ;; FIXME: all tests pass, but then this error is printed:
21657 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
21658 (arguments '(#:tests? #f))
21659 (propagated-inputs
21660 `(("python-numpy" ,python-numpy)))
21661 (home-page "https://github.com/blosc/python-blosc")
21662 (synopsis "Python wrapper for the Blosc data compressor library")
21663 (description "Blosc is a high performance compressor optimized for binary
21664 data. It has been designed to transmit data to the processor cache faster
21665 than the traditional, non-compressed, direct memory fetch approach via a
21666 @code{memcpy()} system call.
21667
21668 Blosc works well for compressing numerical arrays that contains data with
21669 relatively low entropy, like sparse data, time series, grids with
21670 regular-spaced values, etc.
21671
21672 This Python package wraps the Blosc library.")
21673 (license license:bsd-3)))
21674
21675 (define-public python2-blosc
21676 (package-with-python2 python-blosc))
21677
21678 (define-public python-partd
21679 (package
21680 (name "python-partd")
21681 (version "1.2.0")
21682 (source
21683 (origin
21684 (method url-fetch)
21685 (uri (pypi-uri "partd" version))
21686 (sha256
21687 (base32
21688 "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
21689 (build-system python-build-system)
21690 (propagated-inputs
21691 `(("python-blosc" ,python-blosc)
21692 ("python-locket" ,python-locket)
21693 ("python-numpy" ,python-numpy)
21694 ("python-pandas" ,python-pandas)
21695 ("python-pyzmq" ,python-pyzmq)
21696 ("python-toolz" ,python-toolz)))
21697 (home-page "https://github.com/dask/partd/")
21698 (synopsis "Appendable key-value storage")
21699 (description "Partd stores key-value pairs. Values are raw bytes. We
21700 append on old values. Partd excels at shuffling operations.")
21701 (license license:bsd-3)))
21702
21703 (define-public python-fsspec
21704 (package
21705 (name "python-fsspec")
21706 (version "0.6.1")
21707 (source
21708 (origin
21709 (method url-fetch)
21710 (uri (pypi-uri "fsspec" version))
21711 (sha256
21712 (base32
21713 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
21714 (build-system python-build-system)
21715 (arguments '(#:tests? #f)) ; there are none
21716 (home-page "https://github.com/intake/filesystem_spec")
21717 (synopsis "File-system specification")
21718 (description "The purpose of this package is to produce a template or
21719 specification for a file-system interface, that specific implementations
21720 should follow, so that applications making use of them can rely on a common
21721 behavior and not have to worry about the specific internal implementation
21722 decisions with any given backend.")
21723 (license license:bsd-3)))
21724
21725 (define-public python-dask
21726 (package
21727 (name "python-dask")
21728 (version "2021.7.1")
21729 (source
21730 (origin
21731 (method url-fetch)
21732 (uri (pypi-uri "dask" version))
21733 (sha256
21734 (base32 "131c1bp193d7wp4gx09j6wark1c322c8sqjy22i0jaafl5rqfbz7"))))
21735 (build-system python-build-system)
21736 (arguments
21737 `(#:phases
21738 (modify-phases %standard-phases
21739 (add-after 'unpack 'disable-broken-tests
21740 (lambda _
21741 ;; This test is marked as xfail when pytest-xdist is used.
21742 (substitute* "dask/tests/test_threaded.py"
21743 (("def test_interrupt\\(\\)" m)
21744 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21745 m)))))
21746 (replace 'check
21747 (lambda _ (invoke "pytest" "-vv"))))))
21748 (propagated-inputs
21749 `(("python-cloudpickle" ,python-cloudpickle)
21750 ("python-fsspec" ,python-fsspec)
21751 ("python-numpy" ,python-numpy)
21752 ("python-packaging" ,python-packaging)
21753 ("python-pandas" ,python-pandas)
21754 ("python-partd" ,python-partd)
21755 ("python-toolz" ,python-toolz)
21756 ("python-pyyaml" ,python-pyyaml)))
21757 (native-inputs
21758 `(("python-pytest" ,python-pytest)
21759 ("python-pytest-runner" ,python-pytest-runner)))
21760 (home-page "https://github.com/dask/dask/")
21761 (synopsis "Parallel computing with task scheduling")
21762 (description
21763 "Dask is a flexible parallel computing library for analytics. It
21764 consists of two components: dynamic task scheduling optimized for computation,
21765 and large data collections like parallel arrays, dataframes, and lists that
21766 extend common interfaces like NumPy, Pandas, or Python iterators to
21767 larger-than-memory or distributed environments. These parallel collections
21768 run on top of the dynamic task schedulers. ")
21769 (license license:bsd-3)))
21770
21771 (define-public python-ilinkedlist
21772 (package
21773 (name "python-ilinkedlist")
21774 (version "0.4.0")
21775 (source
21776 (origin
21777 (method url-fetch)
21778 (uri (pypi-uri "ilinkedlist" version))
21779 (sha256
21780 (base32
21781 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
21782 (build-system python-build-system)
21783 (native-inputs `(("python-pytest" ,python-pytest)))
21784 (inputs `(("python" ,python)))
21785 (home-page "https://github.com/luther9/ilinkedlist-py")
21786 (synopsis "Immutable linked list library")
21787 (description
21788 "This is a implementation of immutable linked lists for Python. It
21789 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
21790 Since a linked list is treated as immutable, it is hashable, and its length
21791 can be retrieved in constant time. Some of the terminology is inspired by
21792 LISP. It is possible to create an improper list by creating a @code{Pair}
21793 with a non-list @code{cdr}.")
21794 (license license:gpl3+)))
21795
21796 (define-public python-readlike
21797 (package
21798 (name "python-readlike")
21799 (version "0.1.3")
21800 (source
21801 (origin
21802 (method url-fetch)
21803 (uri (pypi-uri "readlike" version))
21804 (sha256
21805 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
21806 (build-system python-build-system)
21807 (home-page "https://github.com/jangler/readlike")
21808 (synopsis "GNU Readline-like line editing module")
21809 (description
21810 "This Python module provides line editing functions similar to the default
21811 Emacs-style ones of GNU Readline. Unlike the Python standard library's
21812 @code{readline} package, this one allows access to those capabilities in settings
21813 outside of a standard command-line interface. It is especially well-suited to
21814 interfacing with Urwid, due to a shared syntax for describing key inputs.
21815
21816 Currently, all stateless Readline commands are implemented. Yanking and history
21817 are not supported.")
21818 (license license:expat)))
21819
21820 (define-public python2-readlike
21821 (package-with-python2 python-readlike))
21822
21823 (define-public python-reparser
21824 (package
21825 (name "python-reparser")
21826 (version "1.4.3")
21827 (source
21828 (origin
21829 (method url-fetch)
21830 (uri (pypi-uri "ReParser" version))
21831 (sha256
21832 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
21833 (build-system python-build-system)
21834 (home-page "https://github.com/xmikos/reparser")
21835 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
21836 (description
21837 "This Python library provides a simple lexer/parser for inline markup based
21838 on regular expressions.")
21839 (license license:expat)))
21840
21841 (define-public python2-reparser
21842 (let ((reparser (package-with-python2
21843 (strip-python2-variant python-reparser))))
21844 (package/inherit reparser
21845 (propagated-inputs
21846 `(("python2-enum34" ,python2-enum34)
21847 ,@(package-propagated-inputs reparser))))))
21848
21849 (define-public python-retrying
21850 (package
21851 (name "python-retrying")
21852 (version "1.3.3")
21853 (source
21854 (origin
21855 (method git-fetch)
21856 (uri (git-reference
21857 (url "https://github.com/rholder/retrying")
21858 (commit (string-append "v" version))))
21859 (file-name (git-file-name name version))
21860 (sha256
21861 (base32
21862 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
21863 (build-system python-build-system)
21864 (propagated-inputs
21865 `(("python-six" ,python-six)))
21866 (home-page "https://github.com/rholder/retrying")
21867 (synopsis "Library for adding retry behavior")
21868 (description "Retrying is a general-purpose retrying library to simplify
21869 the task of adding retry behavior to just about anything.
21870
21871 Features:
21872
21873 @itemize
21874 @item Generic Decorator API.
21875 @item Specify stop condition (i.e. limit by number of attempts).
21876 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
21877 @item Customize retrying on Exceptions.
21878 @item Customize retrying on expected returned result.
21879 @end itemize")
21880 (license license:asl2.0)))
21881
21882 (define-public python-pre-commit
21883 (package
21884 (name "python-pre-commit")
21885 (version "2.10.0")
21886 (source
21887 (origin
21888 (method url-fetch)
21889 (uri (pypi-uri "pre_commit" version))
21890 (sha256
21891 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
21892 (build-system python-build-system)
21893 (arguments
21894 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
21895 ;; attribute 'empty_template_setup'".
21896 `(#:tests? #false))
21897 (propagated-inputs
21898 `(("python-cfgv" ,python-cfgv)
21899 ("python-identify" ,python-identify)
21900 ("python-importlib-metadata" ,python-importlib-metadata)
21901 ("python-importlib-resources" ,python-importlib-resources)
21902 ("python-nodeenv" ,python-nodeenv)
21903 ("python-pyyaml" ,python-pyyaml)
21904 ("python-toml" ,python-toml)
21905 ("python-virtualenv" ,python-virtualenv)))
21906 (home-page "https://github.com/pre-commit/pre-commit")
21907 (synopsis "Framework for managing multi-language pre-commit hooks")
21908 (description
21909 "This package provides a framework for managing and maintaining
21910 multi-language pre-commit hooks.")
21911 (license license:expat)))
21912
21913 (define-public python-precis-i18n
21914 (package
21915 (name "python-precis-i18n")
21916 (version "1.0.0")
21917 (source
21918 (origin
21919 (method url-fetch)
21920 (uri (pypi-uri "precis_i18n" version))
21921 (sha256
21922 (base32
21923 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
21924 (build-system python-build-system)
21925 (home-page "https://github.com/byllyfish/precis_i18n")
21926 (synopsis "Implementation of the PRECIS framework")
21927 (description
21928 "This module implements the PRECIS Framework as described in RFC 8264,
21929 RFC 8265 and RFC 8266.")
21930 (license license:expat)))
21931
21932 (define-public python-absl-py
21933 (package
21934 (name "python-absl-py")
21935 (version "0.6.1")
21936 (source
21937 (origin
21938 (method url-fetch)
21939 (uri (pypi-uri "absl-py" version))
21940 (sha256
21941 (base32
21942 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
21943 (build-system python-build-system)
21944 (propagated-inputs
21945 `(("python-six" ,python-six)))
21946 (home-page "https://github.com/abseil/abseil-py")
21947 (synopsis "Abseil Python common libraries")
21948 (description
21949 "This package provides the Abseil Python Common Libraries, a collection
21950 of Python libraries for building Python applications.")
21951 (license license:asl2.0)))
21952
21953 (define-public python-astor
21954 (package
21955 (name "python-astor")
21956 (version "0.8.1")
21957 (source
21958 (origin
21959 (method url-fetch)
21960 (uri (pypi-uri "astor" version))
21961 (sha256
21962 (base32
21963 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
21964 (build-system python-build-system)
21965 ;; FIXME: There are two errors and two test failures.
21966 (arguments `(#:tests? #f))
21967 (home-page "https://github.com/berkerpeksag/astor")
21968 (synopsis "Read and write Python ASTs")
21969 (description "Astor is designed to allow easy manipulation of Python
21970 source via the Abstract Syntax Tree.")
21971 (license license:bsd-3)))
21972
21973 (define-public python2-astor
21974 (package-with-python2 python-astor))
21975
21976 (define-public python-astunparse
21977 (package
21978 (name "python-astunparse")
21979 (version "1.6.2")
21980 (source
21981 (origin
21982 (method url-fetch)
21983 (uri (pypi-uri "astunparse" version))
21984 (sha256
21985 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
21986 (build-system python-build-system)
21987 (arguments '(#:tests? #f)) ; there are none
21988 (propagated-inputs
21989 `(("python-six" ,python-six)
21990 ("python-wheel" ,python-wheel)))
21991 (home-page "https://github.com/simonpercivall/astunparse")
21992 (synopsis "AST unparser for Python")
21993 (description "This package provides an AST unparser for Python. It is a
21994 factored out version of @code{unparse} found in the Python source
21995 distribution.")
21996 (license license:bsd-3)))
21997
21998 (define-public python-gast
21999 (package
22000 (name "python-gast")
22001 (version "0.5.2")
22002 (source
22003 (origin
22004 (method url-fetch)
22005 (uri (pypi-uri "gast" version))
22006 (sha256
22007 (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
22008 (build-system python-build-system)
22009 (propagated-inputs
22010 `(("python-astunparse" ,python-astunparse)))
22011 (home-page "https://pypi.org/project/gast/")
22012 (synopsis "Generic Python AST that abstracts the underlying Python version")
22013 (description
22014 "GAST provides a compatibility layer between the AST of various Python
22015 versions, as produced by @code{ast.parse} from the standard @code{ast}
22016 module.")
22017 (license license:bsd-3)))
22018
22019 (define-public python-wikidata
22020 (package
22021 (name "python-wikidata")
22022 (version "0.6.1")
22023 (source
22024 (origin
22025 (method url-fetch)
22026 (uri (pypi-uri "Wikidata" version))
22027 (sha256
22028 (base32
22029 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
22030 (build-system python-build-system)
22031 (propagated-inputs
22032 `(("python-babel" ,python-babel)))
22033 (home-page "https://github.com/dahlia/wikidata")
22034 (synopsis "Wikidata client library")
22035 (description
22036 "This package provides a Python interface to
22037 @url{https://www.wikidata.org/, Wikidata}.")
22038 (properties '((upstream-name . "Wikidata")))
22039 (license license:gpl3+)))
22040
22041 (define-public python-doctest-ignore-unicode
22042 (package
22043 (name "python-doctest-ignore-unicode")
22044 (version "0.1.2")
22045 (source
22046 (origin
22047 (method url-fetch)
22048 (uri (pypi-uri "doctest-ignore-unicode" version))
22049 (sha256
22050 (base32
22051 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
22052 (build-system python-build-system)
22053 (native-inputs
22054 `(("python-nose" ,python-nose)))
22055 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
22056 (synopsis "Ignore Unicode literal prefixes in doctests")
22057 (description
22058 "This package adds support for a flag to ignore Unicode literal prefixes
22059 in doctests.")
22060 (license license:asl2.0)))
22061
22062 (define-public python-attr
22063 (package
22064 (name "python-attr")
22065 (version "0.3.1")
22066 (source
22067 (origin
22068 (method url-fetch)
22069 (uri (pypi-uri "attr" version))
22070 (sha256
22071 (base32
22072 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
22073 (build-system python-build-system)
22074 (home-page "https://github.com/denis-ryzhkov/attr")
22075 (synopsis "Decorator for attributes of target function or class")
22076 (description "Simple decorator to set attributes of target function or
22077 class in a @acronym{DRY, Don't Repeat Yourself} way.")
22078 (license license:expat)))
22079
22080 (define-public python-construct
22081 (package
22082 (name "python-construct")
22083 (version "2.10.56")
22084 (source
22085 (origin
22086 (method url-fetch)
22087 (uri (pypi-uri "construct" version))
22088 (sha256
22089 (base32
22090 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
22091 (build-system python-build-system)
22092 (arguments
22093 `(#:tests? #f)) ; No tests exist.
22094 (propagated-inputs
22095 `(("python-extras" ,python-extras)
22096 ("python-arrow" ,python-arrow)
22097 ("python-numpy" ,python-numpy)
22098 ("python-ruamel.yaml" ,python-ruamel.yaml)))
22099 (home-page "https://construct.readthedocs.io")
22100 (synopsis "Declarative and symmetrical parser and builder for binary data")
22101 (description
22102 "This package provides both simple, atomic constructs (such as
22103 integers of various sizes), as well as composite ones which allow you
22104 form hierarchical and sequential structures of increasing complexity.
22105 It features bit and byte granularity, easy debugging and testing, an
22106 easy-to-extend subclass system, and lots of primitive constructs to
22107 make your work easier.")
22108 (license license:expat)))
22109
22110 (define-public python-outcome
22111 (package
22112 (name "python-outcome")
22113 (version "1.0.1")
22114 (source
22115 (origin
22116 (method url-fetch)
22117 (uri (pypi-uri "outcome" version))
22118 (sha256
22119 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
22120 (build-system python-build-system)
22121 (arguments
22122 `(#:phases
22123 (modify-phases %standard-phases
22124 (replace 'check
22125 (lambda* (#:key inputs outputs #:allow-other-keys)
22126 (add-installed-pythonpath inputs outputs)
22127 (invoke "pytest" "-vv"))))))
22128 (native-inputs
22129 `(("python-pytest" ,python-pytest)
22130 ("python-pytest-cov" ,python-pytest-cov)
22131 ("python-pytest-asyncio" ,python-pytest-asyncio)))
22132 (propagated-inputs
22133 `(("python-async-generator" ,python-async-generator)
22134 ("python-attrs" ,python-attrs)))
22135 (home-page "https://github.com/python-trio/outcome")
22136 (synopsis "Capture the outcome of Python function calls")
22137 (description
22138 "Capture the outcome of Python function calls. Extracted from the Trio
22139 project.")
22140 ;; Either license applies.
22141 (license (list license:expat license:asl2.0))))
22142
22143 (define-public python-trio
22144 (package
22145 (name "python-trio")
22146 (version "0.17.0")
22147 (source
22148 (origin
22149 (method url-fetch)
22150 (uri (pypi-uri "trio" version))
22151 (sha256
22152 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
22153 (build-system python-build-system)
22154 (arguments
22155 `(#:phases
22156 (modify-phases %standard-phases
22157 (add-before 'check 'change-home
22158 (lambda _
22159 ;; Tests require a writable home.
22160 (setenv "HOME" "/tmp")
22161 #t))
22162 (replace 'check
22163 (lambda _
22164 (invoke "pytest" "-vv" "-k"
22165 (string-append
22166 ;; This test times out.
22167 "not test_ki_protection_works"
22168 ;; Assertion errors.
22169 " and not test_guest_mode_ki"
22170 " and not test_run_in_trio_thread_ki"
22171 ;; These try to raise KeyboardInterrupt which does not work
22172 ;; in the build environment.
22173 " and not test_ki_self"
22174 " and not test_ki_wakes_us_up"
22175 ;; Failure in name resolution.
22176 " and not test_getnameinfo"
22177 " and not test_SocketType_resolve"
22178 ;; OSError: protocol not found.
22179 " and not test_getprotobyname")))))))
22180 (native-inputs
22181 `(("python-astor" ,python-astor)
22182 ("python-ipython" ,python-ipython)
22183 ("python-jedi" ,python-jedi)
22184 ("python-pylint" ,python-pylint)
22185 ("python-pyopenssl" ,python-pyopenssl)
22186 ("python-pytest" ,python-pytest)
22187 ("python-pytest-cov" ,python-pytest-cov)
22188 ("python-trustme" ,python-trustme)))
22189 (propagated-inputs
22190 `(("python-attrs" ,python-attrs)
22191 ("python-idna" ,python-idna)
22192 ("python-outcome" ,python-outcome)
22193 ("python-sniffio" ,python-sniffio)
22194 ("python-sortedcontainers"
22195 ,python-sortedcontainers)))
22196 (home-page "https://github.com/python-trio/trio")
22197 (synopsis "Friendly Python library for async concurrency and I/O")
22198 (description
22199 "Trio strives to be a production-quality, async/await-native I/O library
22200 for Python. Like all async libraries, its main purpose is to help you write
22201 programs that do multiple things at the same time with parallelized I/O.")
22202 ;; Either license applies.
22203 (license (list license:expat license:asl2.0))))
22204
22205 (define-public python-trio-typing
22206 (package
22207 (name "python-trio-typing")
22208 (version "0.5.0")
22209 (source
22210 (origin
22211 (method url-fetch)
22212 (uri (pypi-uri "trio-typing" version))
22213 (sha256
22214 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22215 (build-system python-build-system)
22216 (arguments
22217 `(#:phases
22218 (modify-phases %standard-phases
22219 (replace 'check
22220 (lambda _
22221 (invoke "pytest" "-vv"))))))
22222 (native-inputs
22223 `(("python-attrs" ,python-attrs)
22224 ("python-pytest" ,python-pytest)))
22225 (propagated-inputs
22226 `(("python-mypy" ,python-mypy)
22227 ("python-mypy-extensions"
22228 ,python-mypy-extensions)
22229 ("python-trio" ,python-trio)
22230 ("python-typing-extensions"
22231 ,python-typing-extensions)))
22232 (home-page "https://github.com/python-trio/trio-typing")
22233 (synopsis "Static type checking support for Trio and related projects")
22234 (description
22235 "This package provides:
22236
22237 @itemize
22238 @item PEP 561 typing stubs packages for the Trio project packages:
22239
22240 @itemize
22241 @item trio (@code{trio-stubs})
22242 @item outcome (@code{outcome-stubs})
22243 @item async_generator (@code{async_generator-stubs})
22244 @end itemize
22245
22246 @item A package @code{trio_typing} containing types that Trio programs often
22247 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22248 a mypy plugin that smooths over some limitations in the basic type hints.
22249 @end itemize")
22250 ;; Either license applies.
22251 (license (list license:expat license:asl2.0))))
22252
22253 (define-public python-humanize
22254 (package
22255 (name "python-humanize")
22256 (version "0.5.1")
22257 (source
22258 (origin
22259 (method url-fetch)
22260 (uri (pypi-uri "humanize" version))
22261 (sha256
22262 (base32
22263 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22264 (arguments
22265 '(#:tests? #f)) ; tests not in pypi archive
22266 (build-system python-build-system)
22267 (home-page "https://github.com/jmoiron/humanize")
22268 (synopsis "Print numerical information in a human-readable form")
22269 (description "This package provides a Python module that displays numbers
22270 and dates in \"human readable\" forms. For example, it would display
22271 \"12345591313\" as \"12.3 billion\".")
22272 (license license:expat)))
22273
22274 (define-public python-txaio
22275 (package
22276 (name "python-txaio")
22277 (version "18.8.1")
22278 (source
22279 (origin
22280 (method url-fetch)
22281 (uri (pypi-uri "txaio" version))
22282 (sha256
22283 (base32
22284 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22285 (build-system python-build-system)
22286 (propagated-inputs
22287 `(("python-twisted" ,python-twisted)
22288 ("python-six" ,python-six)))
22289 (home-page "https://github.com/crossbario/txaio")
22290 (synopsis "Compatibility layer between Python asyncio and Twisted")
22291 (description "Txaio provides a compatibility layer between the Python
22292 @code{asyncio} module and @code{Twisted}.")
22293 (license license:expat)))
22294
22295 (define-public python-toolshed
22296 (package
22297 (name "python-toolshed")
22298 (version "0.4.6")
22299 (source
22300 (origin
22301 (method url-fetch)
22302 (uri (pypi-uri "toolshed" version))
22303 (sha256
22304 (base32
22305 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22306 (build-system python-build-system)
22307 (native-inputs
22308 `(("python-nose" ,python-nose)))
22309 (home-page "https://github.com/brentp/toolshed/")
22310 (synopsis "Collection of modules and functions for working with data")
22311 (description "This is a collection of well-tested, simple modules and
22312 functions that aim to reduce boilerplate when working with data.")
22313 (license license:bsd-2)))
22314
22315 (define-public python-annoy
22316 (package
22317 (name "python-annoy")
22318 (version "1.15.1")
22319 (source
22320 (origin
22321 (method url-fetch)
22322 (uri (pypi-uri "annoy" version))
22323 (sha256
22324 (base32
22325 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
22326 (build-system python-build-system)
22327 (native-inputs
22328 `(("python-nose" ,python-nose)))
22329 (home-page "https://github.com/spotify/annoy/")
22330 (synopsis "Approximate nearest neighbors library")
22331 (description
22332 "Annoy is a C++ library with Python bindings to search for points in
22333 space that are close to a given query point. It also creates large read-only
22334 file-based data structures that are @code{mmap}ped into memory so that many
22335 processes may share the same data.")
22336 (license license:asl2.0)))
22337
22338 (define-public python-croniter
22339 (package
22340 (name "python-croniter")
22341 (version "0.3.34")
22342 (source (origin
22343 (method url-fetch)
22344 (uri (pypi-uri "croniter" version))
22345 (sha256
22346 (base32
22347 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
22348 (build-system python-build-system)
22349 (propagated-inputs
22350 `(("python-dateutil" ,python-dateutil)
22351 ("python-natsort" ,python-natsort)))
22352 (home-page "https://github.com/kiorky/croniter")
22353 (synopsis "Iterate datetime objects with cron-like syntax")
22354 (description
22355 "@code{croniter} provides iteration for datetime object with cron-like
22356 format.")
22357 (license license:expat)))
22358
22359 (define-public python-pylzma
22360 (package
22361 (name "python-pylzma")
22362 (version "0.5.0")
22363 (source
22364 (origin
22365 (method url-fetch)
22366 (uri (pypi-uri "pylzma" version))
22367 (sha256
22368 (base32
22369 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
22370 (build-system python-build-system)
22371 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
22372 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
22373 (description "This package provides Python bindings for the LZMA library
22374 by Igor Pavlov.")
22375 (license license:lgpl2.1+)))
22376
22377 (define-public python2-pylzma
22378 (package-with-python2 python-pylzma))
22379
22380 (define-public python-ifaddr
22381 (package
22382 (name "python-ifaddr")
22383 (version "0.1.7")
22384 (source
22385 (origin
22386 (method url-fetch)
22387 (uri (pypi-uri "ifaddr" version))
22388 (sha256
22389 (base32
22390 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
22391 (build-system python-build-system)
22392 (arguments
22393 `(#:phases
22394 (modify-phases %standard-phases
22395 (replace 'check
22396 (lambda _ (invoke "nosetests"))))))
22397 (native-inputs
22398 `(("python-nose" ,python-nose)))
22399 (home-page "https://github.com/pydron/ifaddr")
22400 (synopsis "Network interface and IP address enumeration library")
22401 (description "This package provides a network interface and IP address
22402 enumeration library in Python.")
22403 (license license:expat)))
22404
22405 (define-public python-zeroconf
22406 (package
22407 (name "python-zeroconf")
22408 (version "0.28.8")
22409 (source
22410 (origin
22411 (method url-fetch)
22412 (uri (pypi-uri "zeroconf" version))
22413 (sha256
22414 (base32
22415 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
22416 (build-system python-build-system)
22417 (native-inputs
22418 `(("python-nose" ,python-nose)))
22419 (propagated-inputs
22420 `(("python-ifaddr" ,python-ifaddr)))
22421 (arguments
22422 `(#:phases
22423 (modify-phases %standard-phases
22424 (replace 'check
22425 (lambda _ ;; Networking isn't available for these tests.
22426 (invoke "nosetests" "-v"
22427 "--exclude" "test_integration_with_listener_ipv6"
22428 "--exclude" "test_launch_and_close_v6_only"
22429 "--exclude" "test_launch_and_close_v4_v6"
22430 "--exclude" "test_launch_and_close"))))))
22431 (home-page "https://github.com/jstasiak/python-zeroconf")
22432 (synopsis "Pure Python mDNS service discovery")
22433 (description
22434 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22435 compatible).")
22436 (license license:lgpl2.1+)))
22437
22438 (define-public python2-zeroconf
22439 (package
22440 (name "python2-zeroconf")
22441
22442 ;; This is the last version that supports Python 2.x.
22443 (version "0.19.1")
22444 (source
22445 (origin
22446 (method url-fetch)
22447 (uri (pypi-uri "zeroconf" version))
22448 (sha256
22449 (base32
22450 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
22451 (build-system python-build-system)
22452 (arguments
22453 `(#:python ,python-2
22454 #:phases
22455 (modify-phases %standard-phases
22456 (add-after 'unpack 'patch-requires
22457 (lambda* (#:key inputs #:allow-other-keys)
22458 (substitute* "setup.py"
22459 (("enum-compat")
22460 "enum34"))
22461 #t)))))
22462 (native-inputs
22463 `(("python2-six" ,python2-six)
22464 ("python2-enum32" ,python2-enum34)
22465 ("python2-netifaces" ,python2-netifaces)
22466 ("python2-typing" ,python2-typing)))
22467 (home-page "https://github.com/jstasiak/python-zeroconf")
22468 (synopsis "Pure Python mDNS service discovery")
22469 (description
22470 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22471 compatible).")
22472 (license license:lgpl2.1+)))
22473
22474 (define-public python-bsddb3
22475 (package
22476 (name "python-bsddb3")
22477 (version "6.2.9")
22478 (source
22479 (origin
22480 (method url-fetch)
22481 (uri (pypi-uri "bsddb3" version))
22482 (sha256
22483 (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
22484 (build-system python-build-system)
22485 (inputs
22486 `(("bdb" ,bdb)))
22487 (arguments
22488 '(#:phases
22489 (modify-phases %standard-phases
22490 (add-after 'unpack 'configure-locations
22491 (lambda* (#:key inputs #:allow-other-keys)
22492 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
22493 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
22494 #t))
22495 (replace 'check
22496 (lambda _
22497 (invoke "python3" "test3.py" "-v"))))))
22498 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
22499 (synopsis "Python bindings for Oracle Berkeley DB")
22500 (description
22501 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
22502 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
22503 Transaction objects, and each of these is exposed as a Python type in the
22504 bsddb3.db module. The database objects can use various access methods: btree,
22505 hash, recno, and queue. Complete support of Berkeley DB distributed
22506 transactions. Complete support for Berkeley DB Replication Manager.
22507 Complete support for Berkeley DB Base Replication. Support for RPC.")
22508 (license license:bsd-3)))
22509
22510 (define-public python-dbfread
22511 (package
22512 (name "python-dbfread")
22513 (version "2.0.7")
22514 (source (origin
22515 (method url-fetch)
22516 (uri (pypi-uri "dbfread" version))
22517 (sha256
22518 (base32
22519 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
22520 (build-system python-build-system)
22521 (native-inputs
22522 `(("python-pytest" ,python-pytest)))
22523 (home-page "https://dbfread.readthedocs.io")
22524 (synopsis "Read DBF Files with Python")
22525 (description
22526 "This library reads DBF files and returns the data as native Python data
22527 types for further processing. It is primarily intended for batch jobs and
22528 one-off scripts.")
22529 (license license:expat)))
22530
22531 (define-public python-cached-property
22532 (package
22533 (name "python-cached-property")
22534 (version "1.5.2")
22535 (source
22536 (origin
22537 (method url-fetch)
22538 (uri (pypi-uri "cached-property" version))
22539 (sha256
22540 (base32
22541 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
22542 (build-system python-build-system)
22543 (arguments
22544 `(#:phases
22545 (modify-phases %standard-phases
22546 ;; https://github.com/pydanny/cached-property/issues/131
22547 ;; recent versions of freezegun break one test
22548 (add-after 'unpack 'disable-broken-test
22549 (lambda _
22550 (substitute* "tests/test_cached_property.py"
22551 (("def test_threads_ttl_expiry\\(self\\)" m)
22552 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
22553 " " m)))
22554 #t)))))
22555 (native-inputs
22556 `(("python-freezegun" ,python-freezegun)))
22557 (home-page
22558 "https://github.com/pydanny/cached-property")
22559 (synopsis
22560 "Decorator for caching properties in classes")
22561 (description
22562 "This package provides a decorator which makes caching
22563 time-or-computationally-expensive properties quick and easy and works in Python
22564 2 or 3.")
22565 (license license:bsd-3)))
22566
22567 (define-public python-folium
22568 (package
22569 (name "python-folium")
22570 (version "0.12.1")
22571 (source
22572 (origin
22573 ;; PyPI has a ".whl" file but not a proper source release.
22574 ;; Thus, fetch code from Git.
22575 (method git-fetch)
22576 (uri (git-reference
22577 (url "https://github.com/python-visualization/folium")
22578 (commit (string-append "v" version))))
22579 (file-name (git-file-name name version))
22580 (sha256
22581 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
22582 (build-system python-build-system)
22583 (propagated-inputs
22584 `(("python-branca" ,python-branca)
22585 ("python-jinja2" ,python-jinja2)
22586 ("python-numpy" ,python-numpy)
22587 ("python-requests" ,python-requests)))
22588 (native-inputs
22589 `(("python-pytest" ,python-pytest)))
22590 (home-page "https://github.com/python-visualization/folium")
22591 (synopsis "Make beautiful maps with Leaflet.js & Python")
22592 (description "@code{folium} makes it easy to visualize data that’s been
22593 manipulated in Python on an interactive leaflet map. It enables both the
22594 binding of data to a map for @code{choropleth} visualizations as well as
22595 passing rich vector/raster/HTML visualizations as markers on the map.
22596
22597 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
22598 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
22599 supports Image, Video, GeoJSON and TopoJSON overlays.")
22600 (license license:expat)))
22601
22602 (define-public jube
22603 (package
22604 ;; This is a command-line tool, so no "python-" prefix.
22605 (name "jube")
22606 (version "2.2.2")
22607 (source (origin
22608 (method url-fetch)
22609 (uri (string-append
22610 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
22611 version))
22612 (sha256
22613 (base32
22614 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
22615 (file-name (string-append "jube-" version ".tar.gz"))))
22616 (build-system python-build-system)
22617 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
22618 (synopsis "Benchmarking environment")
22619 (description
22620 "JUBE helps perform and analyze benchmarks in a systematic way. For each
22621 benchmarked application, benchmark data is stored in a format that allows JUBE
22622 to deduct the desired information. This data can be parsed by automatic pre-
22623 and post-processing scripts that draw information and store it more densely
22624 for manual interpretation.")
22625 (license license:gpl3+)))
22626
22627 (define-public python-pyroutelib3
22628 (package
22629 (name "python-pyroutelib3")
22630 (version "1.3.post1")
22631 (source
22632 (origin
22633 (method url-fetch)
22634 (uri (pypi-uri "pyroutelib3" version))
22635 (sha256
22636 (base32
22637 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
22638 (build-system python-build-system)
22639 (propagated-inputs
22640 `(("python-dateutil" ,python-dateutil)))
22641 (home-page "https://github.com/MKuranowski/pyroutelib3")
22642 (synopsis "Library for simple routing on OSM data")
22643 (description "Library for simple routing on OSM data")
22644 (license license:gpl3+)))
22645
22646 (define-public python-bibtexparser
22647 (package
22648 (name "python-bibtexparser")
22649 (version "1.1.0")
22650 (source
22651 (origin
22652 (method url-fetch)
22653 (uri (pypi-uri "bibtexparser" version))
22654 (sha256
22655 (base32
22656 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
22657 (build-system python-build-system)
22658 (propagated-inputs
22659 `(("python-pyparsing" ,python-pyparsing)))
22660 (native-inputs
22661 `(("python-future" ,python-future)))
22662 (home-page "https://github.com/sciunto-org/python-bibtexparser")
22663 (synopsis "Python library to parse BibTeX files")
22664 (description "BibtexParser is a Python library to parse BibTeX files.")
22665 (license (list license:bsd-3 license:lgpl3))))
22666
22667 (define-public python-distro
22668 (package
22669 (name "python-distro")
22670 (version "1.4.0")
22671 (source
22672 (origin
22673 (method url-fetch)
22674 (uri (pypi-uri "distro" version))
22675 (sha256
22676 (base32
22677 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
22678 (build-system python-build-system)
22679 (native-inputs
22680 `(("python-pytest" ,python-pytest)))
22681 (home-page "https://github.com/nir0s/distro")
22682 (synopsis
22683 "OS platform information API")
22684 (description
22685 "@code{distro} provides information about the OS distribution it runs on,
22686 such as a reliable machine-readable ID, or version information.
22687
22688 It is the recommended replacement for Python's original
22689 `platform.linux_distribution` function (which will be removed in Python 3.8).
22690 @code{distro} also provides a command-line interface to output the platform
22691 information in various formats.")
22692 (license license:asl2.0)))
22693
22694 (define-public python-cairosvg
22695 (package
22696 (name "python-cairosvg")
22697 (version "2.5.0")
22698 (source
22699 (origin
22700 (method url-fetch)
22701 (uri (pypi-uri "CairoSVG" version))
22702 (sha256
22703 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
22704 (build-system python-build-system)
22705 (arguments
22706 `(#:phases
22707 (modify-phases %standard-phases
22708 (replace 'check
22709 (lambda _ (invoke "pytest"))))))
22710 (propagated-inputs
22711 `(("python-cairocffi" ,python-cairocffi)
22712 ("python-cssselect2" ,python-cssselect2)
22713 ("python-defusedxml" ,python-defusedxml)
22714 ("python-pillow" ,python-pillow)
22715 ("python-tinycss2" ,python-tinycss2)))
22716 (native-inputs
22717 `(("python-pytest-flake8" ,python-pytest-flake8)
22718 ("python-pytest-isort" ,python-pytest-isort)
22719 ("python-pytest-runner" ,python-pytest-runner)))
22720 (home-page "https://cairosvg.org/")
22721 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
22722 (description "CairoSVG is a SVG converter based on Cairo. It can export
22723 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
22724 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
22725 parsed, the result is drawn to a Cairo surface that can be exported to
22726 qvarious formats: PDF, PostScript, PNG and even SVG.")
22727 (license license:lgpl3+)))
22728
22729 (define-public python-pyphen
22730 (package
22731 (name "python-pyphen")
22732 (version "0.10.0")
22733 (source
22734 (origin
22735 (method url-fetch)
22736 (uri (pypi-uri "Pyphen" version))
22737 (sha256
22738 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
22739 (build-system python-build-system)
22740 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
22741 ;; embedded set provided by upstream - like Debian does.
22742 (home-page "https://github.com/Kozea/Pyphen")
22743 (synopsis "Pure Python module to hyphenate text")
22744 (description "Pyphen is a pure Python module to hyphenate text using
22745 existing Hunspell hyphenation dictionaries.")
22746 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
22747
22748 (define-public python-intelhex
22749 (package
22750 (name "python-intelhex")
22751 (version "2.2.1")
22752 (source
22753 (origin
22754 (method url-fetch)
22755 (uri (pypi-uri "intelhex" version))
22756 (sha256
22757 (base32
22758 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
22759 (build-system python-build-system)
22760 (arguments '(#:tests? #f)) ;issue with version
22761 (home-page "https://pypi.org/project/IntelHex/")
22762 (synopsis "Python library for Intel HEX files manipulations")
22763 (description "The Intel HEX file format is widely used in microprocessors
22764 and microcontrollers area (embedded systems etc.) as the de facto standard for
22765 representation of code to be programmed into microelectronic devices. This
22766 package provides an intelhex Python library to read, write, create from
22767 scratch and manipulate data from Intel HEX file format. It also includes
22768 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
22769 converters and more, those based on the library itself.")
22770 (license license:bsd-3)))
22771
22772 (define-public python-pykwalify
22773 (package
22774 (name "python-pykwalify")
22775 (version "1.7.0")
22776 (source
22777 (origin
22778 (method url-fetch)
22779 (uri (pypi-uri "pykwalify" version))
22780 (sha256
22781 (base32
22782 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
22783 (build-system python-build-system)
22784 (arguments '(#:tests? #f)) ;missing dependencies
22785 (propagated-inputs
22786 `(("python-dateutil" ,python-dateutil)
22787 ("python-docopt" ,python-docopt)
22788 ("python-pyyaml" ,python-pyyaml)))
22789 (home-page "https://github.com/grokzen/pykwalify")
22790 (synopsis
22791 "Python lib/cli for JSON/YAML schema validation")
22792 (description
22793 "This package provides a parser, schema validator, and data binding tool
22794 for YAML and JSON.")
22795 (license license:expat)))
22796
22797 (define-public python-dbusmock
22798 (package
22799 (name "python-dbusmock")
22800 (version "0.18.3")
22801 (source
22802 (origin
22803 (method url-fetch)
22804 (uri (pypi-uri "python-dbusmock" version))
22805 (sha256
22806 (base32
22807 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
22808 (build-system python-build-system)
22809 (arguments
22810 '(#:phases
22811 (modify-phases %standard-phases
22812 (add-after 'unpack 'patch-shell-path
22813 (lambda _
22814 (substitute* "tests/test_code.py"
22815 (("/bin/bash") (which "bash")))
22816 #t)))))
22817 (native-inputs
22818 `(;; For tests.
22819 ("dbus" ,dbus) ; for dbus-daemon
22820 ("python-nose" ,python-nose)
22821 ("which" ,which)))
22822 (propagated-inputs
22823 `(("python-dbus" ,python-dbus)
22824 ("python-pygobject" ,python-pygobject)))
22825 (home-page "https://github.com/martinpitt/python-dbusmock")
22826 (synopsis "Python library for mock D-Bus objects")
22827 (description "python-dbusmock allows for the easy creation of mock objects on
22828 D-Bus. This is useful for writing tests for software which talks to D-Bus
22829 services such as upower, systemd, logind, gnome-session or others, and it is
22830 hard (or impossible without root privileges) to set the state of the real
22831 services to what you expect in your tests.")
22832 (license license:lgpl3+)))
22833
22834 (define-public python-jsonplus
22835 (package
22836 (name "python-jsonplus")
22837 (version "0.8.0")
22838 (home-page "https://github.com/randomir/jsonplus")
22839 (source (origin
22840 (method url-fetch)
22841 (uri (pypi-uri "jsonplus" version))
22842 (sha256
22843 (base32
22844 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
22845 (build-system python-build-system)
22846 ;; XXX: No tests on PyPI, and the repository has no tags.
22847 (arguments '(#:tests? #f))
22848 (propagated-inputs
22849 `(("python-dateutil" ,python-dateutil)
22850 ("python-simplejson" ,python-simplejson)
22851 ("python-sortedcontainers" ,python-sortedcontainers)))
22852 (synopsis "Serialize Python types to/from JSON")
22853 (description
22854 "This package provides functionality to serialize arbitrary data types
22855 to and from JSON. Common data types are implemented and it is easy to
22856 register custom encoders and decoders.")
22857 (license license:expat)))
22858
22859 (define-public python-ujson
22860 (package
22861 (name "python-ujson")
22862 (version "4.0.2")
22863 (source
22864 (origin
22865 (method url-fetch)
22866 (uri (pypi-uri "ujson" version))
22867 (sha256
22868 (base32
22869 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
22870 (modules '((guix build utils)))
22871 (snippet
22872 '(begin (delete-file-recursively "deps") #t))))
22873 (build-system python-build-system)
22874 (arguments
22875 `(#:phases
22876 (modify-phases %standard-phases
22877 (add-after 'unpack 'link-to-system-double-conversion
22878 (lambda* (#:key inputs #:allow-other-keys)
22879 (let ((d-c (assoc-ref inputs "double-conversion")))
22880 (substitute* "setup.py"
22881 (("./deps/double-conversion/double-conversion\"")
22882 (string-append d-c "/include/double-conversion\""))
22883 (("-lstdc++" stdc)
22884 (string-append "-L" d-c "/lib\","
22885 " \"-ldouble-conversion\","
22886 " \"" stdc)))
22887 #t)))
22888 (replace 'check
22889 (lambda* (#:key inputs outputs #:allow-other-keys)
22890 (add-installed-pythonpath inputs outputs)
22891 (invoke "pytest"))))))
22892 (native-inputs
22893 `(("double-conversion" ,double-conversion)
22894 ("python-setuptools-scm" ,python-setuptools-scm)
22895 ("python-pytest" ,python-pytest)))
22896 (home-page "https://github.com/ultrajson/ultrajson")
22897 (synopsis "Ultra fast JSON encoder and decoder for Python")
22898 (description
22899 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
22900 bindings for Python 3.")
22901 (license license:bsd-3)))
22902
22903 (define-public python-iocapture
22904 ;; The latest release is more than a year older than this commit.
22905 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
22906 (revision "1"))
22907 (package
22908 (name "python-iocapture")
22909 (version "0.1.2")
22910 (source
22911 (origin
22912 (method git-fetch)
22913 (uri (git-reference
22914 (url "https://github.com/oinume/iocapture")
22915 (commit commit)))
22916 (file-name (git-file-name name version))
22917 (sha256
22918 (base32
22919 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
22920 (build-system python-build-system)
22921 (arguments
22922 `(#:phases
22923 (modify-phases %standard-phases
22924 (delete 'check)
22925 (add-after 'install 'check
22926 (lambda* (#:key inputs outputs #:allow-other-keys)
22927 (add-installed-pythonpath inputs outputs)
22928 (invoke "py.test" "-v" "tests")
22929 #t)))))
22930 (propagated-inputs
22931 `(("python-flexmock" ,python-flexmock)
22932 ("python-pytest" ,python-pytest)
22933 ("python-pytest-cov" ,python-pytest-cov)
22934 ("python-six" ,python-six)))
22935 (home-page "https://github.com/oinume/iocapture")
22936 (synopsis "Python capturing tool for stdout and stderr")
22937 (description
22938 "This package helps you to capture the standard out (stdout) and the
22939 standard error channel (stderr) in your program.")
22940 (license license:expat))))
22941
22942 (define-public python-anyio
22943 (package
22944 (name "python-anyio")
22945 (version "3.3.0")
22946 (source
22947 (origin
22948 (method url-fetch)
22949 (uri (pypi-uri "anyio" version))
22950 (sha256
22951 (base32
22952 "0x03hsprdrs86wjjkj96zm2jswy3a5bgyrknyi58pzz5hdsscmxf"))))
22953 (build-system python-build-system)
22954 (arguments
22955 `(#:phases
22956 (modify-phases %standard-phases
22957 (add-after 'unpack 'fix-compatibility
22958 (lambda _
22959 (substitute* "tests/test_taskgroups.py"
22960 (("import pytest")
22961 "import pytest\nimport _pytest\nfrom _pytest import logging")
22962 (("pytest.LogCaptureFixture")
22963 "_pytest.logging.LogCaptureFixture"))))
22964 (replace 'check
22965 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
22966 (when tests?
22967 (add-installed-pythonpath inputs outputs)
22968 (invoke "pytest" "-vv" "-p" "no:asyncio"
22969 "-m" "not network"
22970 "-k"
22971 (string-append
22972 "not test_is_block_device"
22973
22974 ;; These fail because of network (or specifically
22975 ;; IPv6 network) access.
22976 " and not test_accept"
22977 " and not test_accept_after_close"
22978 " and not test_close_during_receive"
22979 " and not test_close_from_other_task"
22980 " and not test_concurrent_receive"
22981 " and not test_concurrent_send"
22982 " and not test_connect_tcp_with_tls"
22983 " and not test_connect_tcp_with_tls_cert_check_fail"
22984 " and not test_connection_refused"
22985 " and not test_extra_attributes"
22986 " and not test_getaddrinfo"
22987 " and not test_getnameinfo"
22988 " and not test_happy_eyeballs"
22989 " and not test_iterate"
22990 " and not test_receive_after_close"
22991 " and not test_receive_timeout"
22992 " and not test_reuse_port"
22993 " and not test_run_process"
22994 " and not test_send_after_close"
22995 " and not test_send_after_eof"
22996 " and not test_send_after_peer_closed"
22997 " and not test_send_eof"
22998 " and not test_send_large_buffer"
22999 " and not test_send_receive"
23000 " and not test_socket_options"))))))))
23001 (propagated-inputs
23002 `(("python-idna" ,python-idna)
23003 ("python-sniffio" ,python-sniffio)
23004 ("python-typing-extensions" ,python-typing-extensions)))
23005 (native-inputs
23006 `(("python-coverage" ,python-coverage)
23007 ("python-hypothesis" ,python-hypothesis)
23008 ("python-iniconfig" ,python-iniconfig)
23009 ("python-mock" ,python-mock)
23010 ("python-pytest" ,python-pytest-6)
23011 ("python-pytest-mock" ,python-pytest-mock)
23012 ("python-pytest-trio" ,python-pytest-trio)
23013 ("python-setuptools-scm" ,python-setuptools-scm)
23014 ("python-trustme" ,python-trustme)
23015 ("python-uvloop" ,python-uvloop)))
23016 (home-page "https://github.com/agronholm/anyio")
23017 (synopsis "Compatibility layer for multiple asynchronous event loops")
23018 (description
23019 "AnyIO is an asynchronous networking and concurrency library that works
23020 on top of either asyncio or trio. It implements trio-like structured
23021 concurrency on top of asyncio, and works in harmony with the native SC of trio
23022 itself.")
23023 (license license:expat)))
23024
23025 (define-public python-argh
23026 ;; There are 21 commits since the latest release containing important
23027 ;; improvements.
23028 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
23029 (revision "1"))
23030 (package
23031 (name "python-argh")
23032 (version (git-version "0.26.2" revision commit))
23033 (source
23034 (origin
23035 (method git-fetch)
23036 (uri (git-reference
23037 (url "https://github.com/neithere/argh")
23038 (commit commit)))
23039 (file-name (git-file-name name version))
23040 (sha256
23041 (base32
23042 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
23043 (build-system python-build-system)
23044 (propagated-inputs
23045 `(("python-iocapture" ,python-iocapture)
23046 ("python-mock" ,python-mock)
23047 ("python-pytest" ,python-pytest)
23048 ("python-pytest-cov" ,python-pytest-cov)
23049 ("python-pytest-xdist" ,python-pytest-xdist)))
23050 (home-page "https://github.com/neithere/argh/")
23051 (synopsis "Argparse wrapper with natural syntax")
23052 (description
23053 "python-argh is a small library that provides several layers of
23054 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
23055 always possible to declare a command with the highest possible (and least
23056 flexible) layer and then tune the behaviour with any of the lower layers
23057 including the native API of @code{python-argparse}.")
23058 (license license:lgpl3+))))
23059
23060 (define-public python-ppft
23061 (package
23062 (name "python-ppft")
23063 (version "1.6.6.1")
23064 (source
23065 (origin
23066 (method url-fetch)
23067 (uri (pypi-uri "ppft" version))
23068 (sha256
23069 (base32
23070 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
23071 (build-system python-build-system)
23072 (arguments '(#:tests? #f)) ; there are none
23073 (propagated-inputs
23074 `(("python-six" ,python-six)))
23075 (home-page "https://pypi.org/project/ppft/")
23076 (synopsis "Fork of Parallel Python")
23077 (description
23078 "This package is a fork of Parallel Python. The Parallel Python
23079 module (@code{pp}) provides an easy and efficient way to create
23080 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
23081 computers and clusters. It features cross-platform portability and dynamic
23082 load balancing.")
23083 (license license:bsd-3)))
23084
23085 (define-public python-pox
23086 (package
23087 (name "python-pox")
23088 (version "0.2.7")
23089 (source
23090 (origin
23091 (method url-fetch)
23092 (uri (pypi-uri "pox" version))
23093 (sha256
23094 (base32
23095 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
23096 (build-system python-build-system)
23097 (arguments
23098 `(#:phases
23099 (modify-phases %standard-phases
23100 (replace 'check
23101 (lambda _
23102 (mkdir-p "/tmp/guix")
23103 (setenv "SHELL" "bash")
23104 (setenv "USERNAME" "guix")
23105 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
23106 (invoke "py.test" "-vv")
23107 #t)))))
23108 (native-inputs
23109 `(("python-pytest" ,python-pytest)
23110 ("which" ,which)))
23111 (home-page "https://pypi.org/project/pox/")
23112 (synopsis "Python utilities for file system exploration and automated builds")
23113 (description
23114 "Pox provides a collection of utilities for navigating and manipulating
23115 file systems. This module is designed to facilitate some of the low-level
23116 operating system interactions that are useful when exploring a file system on a
23117 remote host. Pox provides Python equivalents of several shell commands such
23118 as @command{which} and @command{find}. These commands allow automated
23119 discovery of what has been installed on an operating system, and where the
23120 essential tools are located.")
23121 (license license:bsd-3)))
23122
23123 (define-public python-pathos
23124 (package
23125 (name "python-pathos")
23126 (version "0.2.5")
23127 (source
23128 (origin
23129 (method url-fetch)
23130 (uri (pypi-uri "pathos" version))
23131 (sha256
23132 (base32
23133 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
23134 (build-system python-build-system)
23135 (arguments
23136 '(#:phases
23137 (modify-phases %standard-phases
23138 (replace 'check
23139 (lambda _
23140 (invoke "python" "./tests/__main__.py"))))))
23141 (propagated-inputs
23142 `(("python-dill" ,python-dill)
23143 ("python-multiprocess" ,python-multiprocess)
23144 ("python-pox" ,python-pox)
23145 ("python-ppft" ,python-ppft)))
23146 (native-inputs
23147 `(("python-pytest" ,python-pytest)))
23148 (home-page "https://pypi.org/project/pathos/")
23149 (synopsis
23150 "Parallel graph management and execution in heterogeneous computing")
23151 (description
23152 "Python-pathos is a framework for heterogeneous computing. It provides a
23153 consistent high-level interface for configuring and launching parallel
23154 computations across heterogeneous resources. Python-pathos provides configurable
23155 launchers for parallel and distributed computing, where each launcher contains
23156 the syntactic logic to configure and launch jobs in an execution environment.")
23157 (license license:bsd-3)))
23158
23159 (define-public python-flit
23160 (package
23161 (name "python-flit")
23162 (version "3.2.0")
23163 ;; We fetch the sources via git because on pypi the package is split into
23164 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
23165 (source (origin
23166 (method git-fetch)
23167 (uri (git-reference
23168 (url "https://github.com/takluyver/flit")
23169 (commit version)))
23170 (file-name (git-file-name name version))
23171 (sha256
23172 (base32
23173 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
23174 (build-system python-build-system)
23175 (arguments
23176 `(#:phases
23177 (modify-phases %standard-phases
23178 (add-before 'build 'bootstrap
23179 (lambda* (#:key inputs #:allow-other-keys)
23180 (let ((home (string-append (getcwd) "/home")))
23181 (mkdir-p home)
23182 (setenv "HOME" home))
23183 (for-each make-file-writable (find-files "."))
23184 (copy-recursively (assoc-ref inputs "python-testpath")
23185 (string-append (getcwd) "/testpath"))
23186 (substitute* "pyproject.toml"
23187 (("\"testpath\",") ""))
23188 (invoke "python" "bootstrap_dev.py")))
23189 (replace 'build
23190 (lambda _
23191 ;; A ZIP archive should be generated, but it fails with "ZIP does
23192 ;; not support timestamps before 1980". Luckily,
23193 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
23194 ;; 1980.
23195 (setenv "SOURCE_DATE_EPOCH" "315532800")
23196 (for-each (lambda (toml)
23197 (invoke "python3" "-m" "flit"
23198 "--debug" "--ini-file" toml
23199 "build"))
23200 '("testpath/pyproject.toml"
23201 "pyproject.toml"))
23202 (with-directory-excursion "flit_core"
23203 (invoke "python" "build_dists.py"))))
23204 (replace 'install
23205 (lambda* (#:key inputs outputs #:allow-other-keys)
23206 (add-installed-pythonpath inputs outputs)
23207 (let ((out (assoc-ref outputs "out")))
23208 (delete-file-recursively "./home")
23209 (for-each (lambda (wheel)
23210 (format #true wheel)
23211 (invoke "python" "-m" "pip" "install"
23212 wheel (string-append "--prefix=" out)))
23213 (append
23214 (find-files "flit_core/dist" "\\.whl$")
23215 (find-files "dist" "\\.whl$")))))))
23216 #:tests? #f)) ; XXX: Check requires network access.
23217 (propagated-inputs
23218 `(("python-pytoml" ,python-pytoml)
23219 ("python-toml" ,python-toml)))
23220 (native-inputs
23221 `(("python-docutils" ,python-docutils)
23222 ("python-responses" ,python-responses)
23223 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
23224 ("python-pytest" ,python-pytest)
23225 ("python-pytest-cov" ,python-pytest-cov)
23226 ("python-sphinx" ,python-sphinx)
23227 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
23228 ;; This package needs testpath, but testpath also needs flit...
23229 ("python-testpath"
23230 ,(let ((name "python-testpath")
23231 (version "0.4.4"))
23232 (origin
23233 (method git-fetch)
23234 (uri (git-reference
23235 (url "https://github.com/jupyter/testpath")
23236 (commit version)))
23237 (file-name (git-file-name name version))
23238 (sha256
23239 (base32
23240 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
23241 (home-page "https://flit.readthedocs.io/")
23242 (synopsis
23243 "Simple packaging tool for simple packages")
23244 (description
23245 "Flit is a simple way to put Python packages and modules on PyPI. Flit
23246 packages a single importable module or package at a time, using the import
23247 name as the name on PyPI. All subpackages and data files within a package
23248 are included automatically.")
23249 (license license:bsd-3)))
23250
23251 (define-public python-pathtools
23252 (package
23253 (name "python-pathtools")
23254 (version "0.1.2")
23255 (source
23256 (origin
23257 (method url-fetch)
23258 (uri (pypi-uri "pathtools" version))
23259 (sha256
23260 (base32
23261 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
23262 (build-system python-build-system)
23263 (home-page
23264 "https://github.com/gorakhargosh/pathtools")
23265 (synopsis "Path utilities for Python")
23266 (description "Pattern matching and various utilities for file systems
23267 paths.")
23268 (license license:expat)))
23269
23270 (define-public python-fastentrypoints
23271 (package
23272 (name "python-fastentrypoints")
23273 (version "0.12")
23274 (source
23275 (origin
23276 (method url-fetch)
23277 (uri (pypi-uri "fastentrypoints" version))
23278 (sha256
23279 (base32
23280 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
23281 (build-system python-build-system)
23282 (home-page
23283 "https://github.com/ninjaaron/fast-entry_points")
23284 (synopsis
23285 "Makes entry_points specified in setup.py load more quickly")
23286 (description
23287 "Using entry_points in your setup.py makes scripts that start really
23288 slowly because it imports pkg_resources. This package allows such setup
23289 scripts to load entry points more quickly.")
23290 (license license:bsd-3)))
23291
23292 (define-public python-funcparserlib
23293 (package
23294 (name "python-funcparserlib")
23295 (version "0.3.6")
23296 (source
23297 (origin
23298 (method url-fetch)
23299 (uri (pypi-uri "funcparserlib" version))
23300 (sha256
23301 (base32
23302 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
23303 (native-inputs
23304 `(("python-tox" ,python-tox)))
23305 (arguments
23306 `(#:phases
23307 (modify-phases %standard-phases
23308 (replace 'check
23309 (lambda _
23310 (invoke "tox"))))))
23311 (build-system python-build-system)
23312 (home-page
23313 "https://github.com/vlasovskikh/funcparserlib")
23314 (synopsis
23315 "Recursive descent parsing library based on functional combinators")
23316 (description
23317 "This package is a recursive descent parsing library for Python based on
23318 functional combinators. Parser combinators are just higher-order functions
23319 that take parsers as their arguments and return them as result values.")
23320 (license license:expat)))
23321
23322 (define-public python-speg
23323 (package
23324 (name "python-speg")
23325 (version "0.3")
23326 (source
23327 (origin
23328 (method url-fetch)
23329 (uri (pypi-uri "speg" version ".zip"))
23330 (sha256
23331 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
23332 (arguments
23333 `(#:tests? #f)) ;FIXME: tests fail, not sure why
23334 (native-inputs
23335 `(("unzip" ,unzip)))
23336 (build-system python-build-system)
23337 (home-page "https://github.com/avakar/speg")
23338 (synopsis "PEG-based parser interpreter with memoization")
23339 (description "This package is a PEG-based parser and interpreter with
23340 memoization.")
23341 (license license:expat)))
23342
23343 (define-public python-cson
23344 (package
23345 (name "python-cson")
23346 (version "0.8")
23347 (source
23348 (origin
23349 (method url-fetch)
23350 (uri (pypi-uri "cson" version))
23351 (sha256
23352 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
23353 (build-system python-build-system)
23354 (propagated-inputs
23355 `(("python-speg" ,python-speg)))
23356 (home-page "https://github.com/avakar/pycson")
23357 (synopsis "Parser for Coffeescript Object Notation (CSON)")
23358 (description "This package is a parser for Coffeescript Object
23359 Notation (CSON).")
23360 (license license:expat)))
23361
23362 (define-public python-asynctest
23363 (package
23364 (name "python-asynctest")
23365 (version "0.13.0")
23366 (source
23367 (origin
23368 (method url-fetch)
23369 (uri (pypi-uri "asynctest" version))
23370 (sha256
23371 (base32
23372 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
23373 (build-system python-build-system)
23374 (arguments
23375 '(#:phases
23376 (modify-phases %standard-phases
23377 (replace 'check
23378 (lambda _
23379 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
23380 (add-after 'unpack 'disable-tests
23381 (lambda* _
23382 ;; XXX: 7 tests fail out of 220. Disable them for now.
23383 (substitute* (list "test/test_selector.py"
23384 "test/test_mock.py")
23385 (("def test_events_watched_outside_test_are_ignored")
23386 "@unittest.skip('disabled by guix')
23387 def test_events_watched_outside_test_are_ignored")
23388 (("def test_awaited_from_autospec_mock.*" line)
23389 (string-append line " return True\n"))
23390 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
23391 (string-append line " return True\n"))
23392 (("def test_patch_coroutine_with_multiple_scopes.*" line)
23393 (string-append line " return True\n"))
23394 (("def test_multiple_patches_on_coroutine.*" line)
23395 (string-append line " return True\n"))
23396 (("def test_patch_coroutine_only_when_running.*" line)
23397 (string-append line " return True\n")))
23398 #t)))))
23399 (home-page "https://github.com/Martiusweb/asynctest")
23400 (synopsis "Extension of unittest for testing asyncio libraries")
23401 (description
23402 "The package asynctest is built on top of the standard unittest module
23403 and cuts down boilerplate code when testing libraries for asyncio.")
23404 (license license:asl2.0)))
23405
23406 (define-public python-aionotify
23407 (package
23408 (name "python-aionotify")
23409 (version "0.2.0")
23410 (source
23411 (origin
23412 ;; Source tarball on PyPi lacks tests
23413 (method git-fetch)
23414 (uri (git-reference
23415 (url "https://github.com/rbarrois/aionotify")
23416 (commit (string-append "v" version))))
23417 (file-name (git-file-name name version))
23418 (sha256
23419 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
23420 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
23421 (build-system python-build-system)
23422 (home-page "https://github.com/rbarrois/aionotify")
23423 (synopsis "Asyncio-powered inotify library")
23424 (description
23425 "@code{aionotify} is a simple, asyncio-based inotify library.")
23426 (license license:bsd-3)))
23427
23428 (define-public python-forbiddenfruit
23429 (package
23430 (name "python-forbiddenfruit")
23431 (version "0.1.3")
23432 (source
23433 (origin
23434 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
23435 (method git-fetch)
23436 (uri (git-reference
23437 (url "https://github.com/clarete/forbiddenfruit")
23438 (commit version)))
23439 (file-name (git-file-name name version))
23440 (sha256
23441 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
23442 (build-system python-build-system)
23443 (arguments
23444 '(#:phases
23445 (modify-phases %standard-phases
23446 (replace 'check
23447 (lambda _
23448 (invoke "make" "SKIP_DEPS=1"))))))
23449 (native-inputs
23450 `(("python-nose" ,python-nose)
23451 ("python-coverage" ,python-coverage)))
23452 (home-page "https://github.com/clarete/forbiddenfruit")
23453 (synopsis "Patch python built-in objects")
23454 (description "This project allows Python code to extend built-in types.")
23455 (license (list license:gpl3+ license:expat))))
23456
23457 (define-public python-k5test
23458 (package
23459 (name "python-k5test")
23460 (version "0.9.2")
23461 (source
23462 (origin
23463 (method url-fetch)
23464 (uri (pypi-uri "k5test" version))
23465 (sha256
23466 (base32
23467 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
23468 (build-system python-build-system)
23469 (propagated-inputs
23470 `(("python-six" ,python-six)
23471 ;; `which`, `kadmin.local` binaries called inside library
23472 ("which" ,which)
23473 ("mit-krb5" ,mit-krb5)))
23474 (native-inputs `(("mit-krb5" ,mit-krb5)))
23475 (arguments
23476 '(#:phases
23477 (modify-phases %standard-phases
23478 (add-after 'unpack 'apply-upstream-fixes
23479 (lambda* _
23480 (substitute* "k5test/realm.py"
23481 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
23482 (("'kadmin_local'") "'kadmin.local'")
23483 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
23484 (("\\.stop_daemon") "._stop_daemon")))))))
23485 (home-page "https://github.com/pythongssapi/k5test")
23486 (synopsis "Library for setting up self-contained Kerberos 5 environments")
23487 (description
23488 "@code{k5test} is a library for setting up self-contained Kerberos 5
23489 environments, and running Python unit tests inside those environments. It is
23490 based on the file of the same name found alongside the MIT Kerberos 5 unit
23491 tests.")
23492 (license license:isc)))
23493
23494 (define-public python-gssapi
23495 (package
23496 (name "python-gssapi")
23497 (version "1.6.12")
23498 (source
23499 (origin
23500 (method url-fetch)
23501 (uri (pypi-uri "gssapi" version))
23502 (sha256
23503 (base32
23504 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
23505 (build-system python-build-system)
23506 (propagated-inputs
23507 `(("python-decorator" ,python-decorator)
23508 ("python-six" ,python-six)))
23509 (inputs
23510 `(("mit-krb5" ,mit-krb5)))
23511 ;; for tests
23512 (native-inputs
23513 `(("python-parameterized" ,python-parameterized)
23514 ("python-k5test" ,python-k5test)
23515 ("python-nose" ,python-nose)))
23516 (home-page "https://github.com/pythongssapi/python-gssapi")
23517 (synopsis "Python GSSAPI Wrapper")
23518 (description
23519 "Python-GSSAPI provides both low-level and high level wrappers around the
23520 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
23521 also be usable with other GSSAPI mechanisms.")
23522 (license license:isc)))
23523
23524 (define-public python-check-manifest
23525 (package
23526 (name "python-check-manifest")
23527 (version "0.37")
23528 (source
23529 (origin
23530 (method url-fetch)
23531 (uri (pypi-uri "check-manifest" version))
23532 (sha256
23533 (base32
23534 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
23535 (build-system python-build-system)
23536 (native-inputs
23537 `(("python-mock" ,python-mock)
23538 ("git" ,git)))
23539 (home-page "https://github.com/mgedmin/check-manifest")
23540 (synopsis "Check MANIFEST.in in a Python source package for completeness")
23541 (description "Python package can include a MANIFEST.in file to help with
23542 sending package files to the Python Package Index. This package checks that
23543 file to ensure it completely and accurately describes your project.")
23544 (license license:expat)))
23545
23546 (define-public python-android-stringslib
23547 (package
23548 (name "python-android-stringslib")
23549 (version "0.1.2")
23550 (source
23551 (origin
23552 (method git-fetch)
23553 (uri (git-reference
23554 (url "https://framagit.org/tyreunom/python-android-strings-lib")
23555 (commit (string-append "v" version))))
23556 (file-name (git-file-name name version))
23557 (sha256
23558 (base32
23559 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
23560 (build-system python-build-system)
23561 (arguments
23562 `(#:tests? #f))
23563 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
23564 (synopsis "Android strings.xml support")
23565 (description "Android Strings Lib provides support for android's strings.xml
23566 files. These files are used to translate strings in android apps.")
23567 (license license:expat)))
23568
23569 (define-public python-watchdog
23570 (package
23571 (name "python-watchdog")
23572 (version "0.9.0")
23573 (source
23574 (origin
23575 (method url-fetch)
23576 (uri (pypi-uri "watchdog" version))
23577 (sha256
23578 (base32
23579 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
23580 (build-system python-build-system)
23581 (arguments
23582 `(#:phases
23583 (modify-phases %standard-phases
23584 (add-before 'check 'remove-failing
23585 (lambda _
23586 (delete-file "tests/test_inotify_buffer.py")
23587 (delete-file "tests/test_snapshot_diff.py")
23588 #t)))))
23589 (propagated-inputs
23590 `(("python-argh" ,python-argh)
23591 ("python-pathtools" ,python-pathtools)
23592 ("python-pyyaml" ,python-pyyaml)))
23593 (native-inputs
23594 `(("python-pytest-cov" ,python-pytest-cov)
23595 ("python-pytest-timeout" ,python-pytest-timeout)))
23596 (home-page "https://github.com/gorakhargosh/watchdog")
23597 (synopsis "File system events monitoring")
23598 (description "This package provides a way to monitor file system events
23599 such as a file modification and trigger an action. This is similar to inotify,
23600 but portable.")
23601 (license license:asl2.0)))
23602
23603 (define-public python-watchgod
23604 (package
23605 (name "python-watchgod")
23606 (version "0.6")
23607 (source
23608 (origin
23609 ;; There are no tests in the PyPI tarball.
23610 (method git-fetch)
23611 (uri (git-reference
23612 (url "https://github.com/samuelcolvin/watchgod")
23613 (commit (string-append "v" version))))
23614 (file-name (git-file-name name version))
23615 (sha256
23616 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
23617 (build-system python-build-system)
23618 (arguments
23619 `(#:phases
23620 (modify-phases %standard-phases
23621 (replace 'check
23622 (lambda* (#:key tests? #:allow-other-keys)
23623 (when tests?
23624 (invoke "pytest" "-vv")))))))
23625 (native-inputs
23626 `(("python-coverage" ,python-coverage)
23627 ("python-docutils" ,python-docutils)
23628 ("python-flake8" ,python-flake8)
23629 ("python-isort" ,python-isort)
23630 ("python-pycodestyle" ,python-pycodestyle)
23631 ("python-pyflakes" ,python-pyflakes)
23632 ("python-pygments" ,python-pygments)
23633 ("python-pytest" ,python-pytest)
23634 ("python-pytest-cov" ,python-pytest-cov)
23635 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
23636 ("python-pytest-mock" ,python-pytest-mock)
23637 ("python-pytest-sugar" ,python-pytest-sugar)
23638 ("python-pytest-toolbox" ,python-pytest-toolbox)))
23639 (home-page "https://github.com/samuelcolvin/watchgod")
23640 (synopsis "Simple, modern file watching and code reload in Python")
23641 (description
23642 "Simple, modern file watching and code reload in Python inspired by
23643 @code{watchdog}. Among the differences are a unified approach for each
23644 operating systems and an elegant approach to concurrency using threading.")
23645 (license license:expat)))
23646
23647 (define-public python-wget
23648 (package
23649 (name "python-wget")
23650 (version "3.2")
23651 (source
23652 (origin
23653 (method url-fetch)
23654 (uri (pypi-uri "wget" version ".zip"))
23655 (sha256
23656 (base32
23657 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
23658 (build-system python-build-system)
23659 (native-inputs `(("unzip" ,unzip)))
23660 (home-page "https://bitbucket.org/techtonik/python-wget/")
23661 (synopsis "Pure Python download utility")
23662 (description "The python-wget library provides an API to download files
23663 with features similar to the @command{wget} utility.")
23664 (license license:unlicense)))
23665
23666 (define-public offlate
23667 (package
23668 (name "offlate")
23669 (version "0.5")
23670 (source
23671 (origin
23672 (method git-fetch)
23673 (uri (git-reference
23674 (url "https://framagit.org/tyreunom/offlate")
23675 (commit version)))
23676 (file-name (git-file-name name version))
23677 (sha256
23678 (base32
23679 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
23680 (build-system python-build-system)
23681 (arguments
23682 ;; No tests
23683 `(#:tests? #f))
23684 (propagated-inputs
23685 `(("python-android-stringslib" ,python-android-stringslib)
23686 ("python-dateutil" ,python-dateutil)
23687 ("python-gitlab" ,python-gitlab)
23688 ("python-lxml" ,python-lxml)
23689 ("python-polib" ,python-polib)
23690 ("python-pyenchant" ,python-pyenchant)
23691 ("python-pygit2" ,python-pygit2)
23692 ("python-pygithub" ,python-pygithub)
23693 ("python-pyqt" ,python-pyqt)
23694 ("python-requests" ,python-requests)
23695 ("python-ruamel.yaml" ,python-ruamel.yaml)
23696 ("python-translation-finder" ,python-translation-finder)
23697 ("python-watchdog" ,python-watchdog)))
23698 (native-inputs
23699 `(("qttools" ,qttools)))
23700 (home-page "https://framagit.org/tyreunom/offlate")
23701 (synopsis "Offline translation interface for online translation tools")
23702 (description "Offlate offers a unified interface for different translation
23703 file formats, as well as many different online translation platforms. You can
23704 use it to get work from online platforms, specialized such as the Translation
23705 Project, or not such a gitlab instance when your upstream doesn't use any
23706 dedicated platform. The tool proposes a unified interface for any format and
23707 an upload option to send your work back to the platform.")
23708 (license license:gpl3+)))
23709
23710 (define-public python-titlecase
23711 (package
23712 (name "python-titlecase")
23713 (version "0.12.0")
23714 (source
23715 (origin
23716 (method url-fetch)
23717 (uri (pypi-uri "titlecase" version))
23718 (sha256
23719 (base32
23720 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
23721 (build-system python-build-system)
23722 (native-inputs
23723 `(("python-nose" ,python-nose)))
23724 (home-page "https://github.com/ppannuto/python-titlecase")
23725 (synopsis "Capitalize strings similar to book titles")
23726 (description
23727 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
23728 It capitalizes (predominantly English) strings in a way that is similar to
23729 book titles, using the New York Times Manual of Style to leave certain words
23730 lowercase.")
23731 (license license:expat)))
23732
23733 (define-public python-pypng
23734 (package
23735 (name "python-pypng")
23736 (version "0.0.20")
23737 (source
23738 (origin
23739 (method url-fetch)
23740 (uri (pypi-uri "pypng" version))
23741 (sha256
23742 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
23743 (build-system python-build-system)
23744 (home-page "https://github.com/drj11/pypng")
23745 (synopsis "Pure Python PNG image encoder/decoder")
23746 (description
23747 "The PyPNG module implements support for PNG images. It reads and writes
23748 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
23749 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
23750 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
23751 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
23752 A number of optional chunks can be specified (when writing) and
23753 understood (when reading): tRNS, bKGD, gAMA.
23754
23755 PyPNG is not a high level toolkit for image processing (like PIL) and does not
23756 aim at being a replacement or competitor. Its strength lies in fine-grained
23757 extensive support of PNG features. It can also read and write Netpbm PAM
23758 files, with a focus on its use as an intermediate format for implementing
23759 custom PNG processing.")
23760 (license license:expat)))
23761
23762 (define-public python-fuzzywuzzy
23763 (package
23764 (name "python-fuzzywuzzy")
23765 (version "0.18.0")
23766 (source
23767 (origin
23768 (method url-fetch)
23769 (uri (pypi-uri "fuzzywuzzy" version))
23770 (sha256
23771 (base32
23772 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
23773 (build-system python-build-system)
23774 (native-inputs
23775 `(("python-hypothesis" ,python-hypothesis)
23776 ("python-pycodestyle" ,python-pycodestyle)
23777 ("python-pytest" ,python-pytest)))
23778 (propagated-inputs
23779 `(("python-levenshtein" ,python-levenshtein)))
23780 (home-page "https://github.com/seatgeek/fuzzywuzzy")
23781 (synopsis "Fuzzy string matching in Python")
23782 (description "Approximate string matching using
23783 @emph{Levenshtein Distance} to calculate the differences between
23784 sequences.")
23785 (license license:gpl2)))
23786
23787 (define-public python2-fuzzywuzzy
23788 (package-with-python2 python-fuzzywuzzy))
23789
23790 (define-public python-block-tracing
23791 (package
23792 (name "python-block-tracing")
23793 (version "1.0.1")
23794 (source
23795 (origin
23796 (method url-fetch)
23797 (uri (pypi-uri "block_tracing" version))
23798 (sha256
23799 (base32
23800 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
23801 (build-system python-build-system)
23802 (arguments '(#:tests? #f)) ; no tests
23803 (home-page "https://github.com/rianhunter/block_tracing")
23804 (synopsis "Protect process memory")
23805 (description
23806 "@code{block_tracing} is a tiny Python library that can be used to
23807 prevent debuggers and other applications from inspecting the memory within
23808 your process.")
23809 (license license:expat)))
23810
23811 (define-public python-gcovr
23812 (package
23813 (name "python-gcovr")
23814 (version "4.2")
23815 (source
23816 (origin
23817 (method url-fetch)
23818 (uri (pypi-uri "gcovr" version))
23819 (sha256
23820 (base32
23821 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
23822 (build-system python-build-system)
23823 (propagated-inputs
23824 `(("python-lxml" ,python-lxml)
23825 ("python-jinja2" ,python-jinja2)))
23826 (home-page "https://gcovr.com/")
23827 (synopsis "Utility for generating code coverage results")
23828 (description
23829 "Gcovr provides a utility for managing the use of the GNU gcov
23830 utility and generating summarized code coverage results. It is inspired
23831 by the Python coverage.py package, which provides a similar utility for
23832 Python.")
23833 (license license:bsd-3)))
23834
23835 (define-public python-owslib
23836 (package
23837 (name "python-owslib")
23838 (version "0.19.2")
23839 (source
23840 (origin
23841 (method url-fetch)
23842 (uri (pypi-uri "OWSLib" version))
23843 (sha256
23844 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
23845 (build-system python-build-system)
23846 (arguments
23847 ;; TODO: package dependencies required for tests.
23848 '(#:tests? #f
23849 #:phases (modify-phases %standard-phases
23850 (delete 'sanity-check))))
23851 (synopsis "Interface for Open Geospatial Consortium web service")
23852 (description
23853 "OWSLib is a Python package for client programming with Open Geospatial
23854 Consortium (OGC) web service (hence OWS) interface standards, and their related
23855 content models.")
23856 (home-page "https://geopython.github.io/OWSLib/")
23857 (license license:bsd-3)))
23858
23859 (define-public python-docusign-esign
23860 (package
23861 (name "python-docusign-esign")
23862 (version "3.1.0")
23863 (source (origin
23864 (method url-fetch)
23865 (uri (pypi-uri "docusign_esign" version))
23866 (sha256
23867 (base32
23868 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
23869 (build-system python-build-system)
23870 ;; Testing requires undocumented setup changes, and so testing is disabled here.
23871 (arguments `(#:tests? #f))
23872 (propagated-inputs
23873 `(("python-certifi" ,python-certifi)
23874 ("python-six" ,python-six)
23875 ("python-dateutil" ,python-dateutil)
23876 ("python-urllib3" ,python-urllib3)
23877 ("python-pyjwt" ,python-pyjwt)
23878 ("python-cryptography" ,python-cryptography)
23879 ("python-nose" ,python-nose)))
23880 (synopsis "DocuSign Python Client")
23881 (description "The Official DocuSign Python Client Library used to interact
23882 with the eSign REST API. Send, sign, and approve documents using this client.")
23883 (home-page "https://www.docusign.com/devcenter")
23884 (license license:expat)))
23885
23886 (define-public python-xattr
23887 (package
23888 (name "python-xattr")
23889 (version "0.9.7")
23890 (source
23891 (origin
23892 (method url-fetch)
23893 (uri (pypi-uri "xattr" version))
23894 (sha256
23895 (base32
23896 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
23897 (build-system python-build-system)
23898 (propagated-inputs
23899 `(("python-cffi" ,python-cffi)))
23900 (home-page "https://github.com/xattr/xattr")
23901 (synopsis
23902 "Python wrapper for extended file system attributes")
23903 (description "This package provides a Python wrapper for using extended
23904 file system attributes. Extended attributes extend the basic attributes of files
23905 and directories in the file system. They are stored as name:data pairs
23906 associated with file system objects (files, directories, symlinks, etc).")
23907 (license license:expat)))
23908
23909 (define-public python-json-logger
23910 (package
23911 (name "python-json-logger")
23912 (version "0.1.11")
23913 (source
23914 (origin
23915 (method url-fetch)
23916 (uri (pypi-uri "python-json-logger" version))
23917 (sha256
23918 (base32
23919 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
23920 (build-system python-build-system)
23921 (home-page
23922 "https://github.com/madzak/python-json-logger")
23923 (synopsis "JSON log formatter in Python")
23924 (description "This library allows standard Python logging to output log data
23925 as JSON objects. With JSON we can make our logs more readable by machines and
23926 we can stop writing custom parsers for syslog-type records.")
23927 (license license:bsd-3)))
23928
23929 (define-public python-daiquiri
23930 (package
23931 (name "python-daiquiri")
23932 (version "2.1.1")
23933 (source
23934 (origin
23935 (method url-fetch)
23936 (uri (pypi-uri "daiquiri" version))
23937 (sha256
23938 (base32
23939 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
23940 (build-system python-build-system)
23941 (propagated-inputs
23942 `(("python-json-logger" ,python-json-logger)))
23943 (native-inputs
23944 `(("python-mock" ,python-mock)
23945 ("python-pytest" ,python-pytest)
23946 ("python-setuptools-scm" ,python-setuptools-scm)
23947 ("python-six" ,python-six)))
23948 (home-page "https://github.com/jd/daiquiri")
23949 (synopsis
23950 "Library to configure Python logging easily")
23951 (description "The daiquiri library provides an easy way to configure
23952 logging in Python. It also provides some custom formatters and handlers.")
23953 (license license:asl2.0)))
23954
23955 (define-public python-pifpaf
23956 (package
23957 (name "python-pifpaf")
23958 (version "2.5.0")
23959 (source
23960 (origin
23961 (method url-fetch)
23962 (uri (pypi-uri "pifpaf" version))
23963 (sha256
23964 (base32
23965 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
23966 (build-system python-build-system)
23967 (arguments
23968 '(#:phases
23969 (modify-phases %standard-phases
23970 (replace 'check
23971 (lambda _
23972 (invoke "python" "setup.py" "testr" "--slowest"
23973 "--testr-args=until-failure"))))))
23974 (propagated-inputs
23975 `(("python-click" ,python-click)
23976 ("python-daiquiri" ,python-daiquiri)
23977 ("python-fixtures" ,python-fixtures)
23978 ("python-jinja2" ,python-jinja2)
23979 ("python-pbr" ,python-pbr)
23980 ("python-psutil" ,python-psutil)
23981 ("python-six" ,python-six)
23982 ("python-xattr" ,python-xattr)))
23983 (native-inputs
23984 `(("python-mock" ,python-mock)
23985 ("python-os-testr" ,python-os-testr)
23986 ("python-requests" ,python-requests)
23987 ("python-testrepository" ,python-testrepository)
23988 ("python-testtools" ,python-testtools)))
23989 (home-page "https://github.com/jd/pifpaf")
23990 (synopsis "Tools and fixtures to manage daemons for testing in Python")
23991 (description "Pifpaf is a suite of fixtures and a command-line tool that
23992 starts and stops daemons for a quick throw-away usage. This is typically
23993 useful when needing these daemons to run integration testing. It originally
23994 evolved from its precursor @code{overtest}.")
23995 (license license:asl2.0)))
23996
23997 (define-public python-pytest-check-links
23998 (package
23999 (name "python-pytest-check-links")
24000 (version "0.3.0")
24001 (source
24002 (origin
24003 (method url-fetch)
24004 ;; URI uses underscores
24005 (uri (pypi-uri "pytest_check_links" version))
24006 (sha256
24007 (base32
24008 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
24009 (build-system python-build-system)
24010 (propagated-inputs
24011 `(("python-docutils" ,python-docutils)
24012 ("python-html5lib" ,python-html5lib)
24013 ("python-nbconvert" ,python-nbconvert)
24014 ("python-nbformat" ,python-nbformat)
24015 ("python-pytest" ,python-pytest)
24016 ("python-six" ,python-six)))
24017 (native-inputs
24018 `(("python-pbr-minimal" ,python-pbr-minimal)))
24019 (home-page "https://github.com/minrk/pytest-check-links")
24020 (synopsis "Check links in files")
24021 (description "This package provides a pytest plugin that checks URLs for
24022 HTML-containing files.")
24023 (license license:bsd-3)))
24024
24025 (define-public python-json5
24026 (package
24027 (name "python-json5")
24028 (version "0.8.5")
24029 (source
24030 (origin
24031 ;; sample.json5 is missing from PyPi source tarball
24032 (method git-fetch)
24033 (uri (git-reference
24034 (url "https://github.com/dpranke/pyjson5")
24035 (commit (string-append "v" version))))
24036 (file-name (git-file-name name version))
24037 (sha256
24038 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
24039 (build-system python-build-system)
24040 (home-page "https://github.com/dpranke/pyjson5")
24041 (synopsis
24042 "Python implementation of the JSON5 data format")
24043 (description
24044 "JSON5 extends the JSON data interchange format to make it slightly more
24045 usable as a configuration language. This Python package implements parsing and
24046 dumping of JSON5 data structures.")
24047 (license license:asl2.0)))
24048
24049 (define-public python-frozendict
24050 (package
24051 (name "python-frozendict")
24052 (version "1.2")
24053 (source
24054 (origin
24055 (method url-fetch)
24056 (uri (pypi-uri "frozendict" version))
24057 (sha256
24058 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
24059 (build-system python-build-system)
24060 (home-page "https://github.com/slezica/python-frozendict")
24061 (synopsis "Simple immutable mapping for Python")
24062 (description
24063 "@dfn{frozendict} is an immutable wrapper around dictionaries that
24064 implements the complete mapping interface. It can be used as a drop-in
24065 replacement for dictionaries where immutability is desired.")
24066 (license license:expat)))
24067
24068 (define-public python-unpaddedbase64
24069 (package
24070 (name "python-unpaddedbase64")
24071 (version "1.1.0")
24072 (source
24073 (origin
24074 (method git-fetch)
24075 (uri (git-reference
24076 (url "https://github.com/matrix-org/python-unpaddedbase64")
24077 (commit (string-append "v" version))))
24078 (file-name (git-file-name name version))
24079 (sha256
24080 (base32
24081 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
24082 (build-system python-build-system)
24083 (home-page "https://pypi.org/project/unpaddedbase64/")
24084 (synopsis "Encode and decode Base64 without “=” padding")
24085 (description
24086 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
24087 using “=” characters. However this conveys no benefit so many protocols
24088 choose to use Base64 without the “=” padding.")
24089 (license license:asl2.0)))
24090
24091 (define-public python-py-cpuinfo
24092 (package
24093 (name "python-py-cpuinfo")
24094 (version "5.0.0")
24095 (source
24096 (origin
24097 (method url-fetch)
24098 (uri (pypi-uri "py-cpuinfo" version))
24099 (sha256
24100 (base32
24101 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
24102 (build-system python-build-system)
24103 (home-page "https://github.com/workhorsy/py-cpuinfo")
24104 (synopsis "Get CPU info with Python")
24105 (description
24106 "This Python module returns the CPU info by using the best sources of
24107 information for your operating system.")
24108 (license license:expat)))
24109
24110 (define-public python-canonicaljson
24111 (package
24112 (name "python-canonicaljson")
24113 (version "1.4.0")
24114 (source
24115 (origin
24116 (method url-fetch)
24117 (uri (pypi-uri "canonicaljson" version))
24118 (sha256
24119 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
24120 (build-system python-build-system)
24121 (propagated-inputs
24122 `(("python-six" ,python-six)
24123 ("python-frozendict" ,python-frozendict)
24124 ("python-simplejson" ,python-simplejson)))
24125 (home-page "https://github.com/matrix-org/python-canonicaljson")
24126 (synopsis "Canonical JSON")
24127 (description
24128 "Deterministically encode JSON.
24129
24130 @itemize
24131 @item Encodes objects and arrays as RFC 7159 JSON.
24132 @item Sorts object keys so that you get the same result each time.
24133 @item Has no insignificant whitespace to make the output as small as possible.
24134 @item Escapes only the characters that must be escaped, U+0000 to
24135 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
24136 @item Uses the shortest escape sequence for each escaped character.
24137 @item Encodes the JSON as UTF-8.
24138 @item Can encode frozendict immutable dictionaries.
24139 @end itemize")
24140 (license license:asl2.0)))
24141
24142 (define-public python-signedjson
24143 (package
24144 (name "python-signedjson")
24145 (version "1.1.1")
24146 (source
24147 (origin
24148 (method url-fetch)
24149 (uri (pypi-uri "signedjson" version))
24150 (sha256
24151 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
24152 (build-system python-build-system)
24153 (propagated-inputs
24154 `(("python-canonicaljson" ,python-canonicaljson)
24155 ("python-importlib-metadata" ,python-importlib-metadata)
24156 ("python-pynacl" ,python-pynacl)
24157 ("python-typing-extensions" ,python-typing-extensions)
24158 ("python-unpaddedbase64" ,python-unpaddedbase64)))
24159 (native-inputs
24160 `(("python-setuptools-scm" ,python-setuptools-scm)))
24161 (home-page "https://github.com/matrix-org/python-signedjson")
24162 (synopsis "Sign JSON objects with ED25519 signatures")
24163 (description
24164 "Sign JSON objects with ED25519 signatures.
24165
24166 @itemize
24167 @item More than one entity can sign the same object.
24168 @item Each entity can sign the object with more than one key making it easier to
24169 rotate keys
24170 @item ED25519 can be replaced with a different algorithm.
24171 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
24172 key.
24173 @end itemize")
24174 (license license:asl2.0)))
24175
24176 (define-public python-daemonize
24177 (package
24178 (name "python-daemonize")
24179 (version "2.5.0")
24180 (source
24181 (origin
24182 (method url-fetch)
24183 (uri (pypi-uri "daemonize" version))
24184 (sha256
24185 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
24186 (build-system python-build-system)
24187 (home-page "https://github.com/thesharp/daemonize")
24188 (synopsis "Library for writing system daemons in Python")
24189 (description "Daemonize is a library for writing system daemons in Python.")
24190 (license license:expat)))
24191
24192 (define-public python-pymacaroons
24193 (package
24194 (name "python-pymacaroons")
24195 (version "0.13.0")
24196 (source
24197 (origin
24198 (method url-fetch)
24199 (uri (pypi-uri "pymacaroons" version))
24200 (sha256
24201 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
24202 (build-system python-build-system)
24203 (propagated-inputs
24204 `(("python-six" ,python-six)
24205 ("python-pynacl" ,python-pynacl)))
24206 (home-page "https://github.com/ecordell/pymacaroons")
24207 (synopsis "Python Macaroon Library")
24208 (description
24209 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
24210 tokens, macaroons embed caveats that define specific authorization
24211 requirements for the target service, the service that issued the root macaroon
24212 and which is capable of verifying the integrity of macaroons it receives.
24213
24214 Macaroons allow for delegation and attenuation of authorization. They are
24215 simple and fast to verify, and decouple authorization policy from the
24216 enforcement of that policy.")
24217 (license license:expat)))
24218
24219 (define-public python-ldap3
24220 (package
24221 (name "python-ldap3")
24222 (version "2.7")
24223 (home-page "https://github.com/cannatag/ldap3")
24224 (source
24225 (origin
24226 (method git-fetch)
24227 (uri (git-reference (url home-page)
24228 (commit (string-append "v" version))))
24229 (file-name (git-file-name name version))
24230 (sha256
24231 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
24232 (build-system python-build-system)
24233 (arguments
24234 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
24235 #:phases (modify-phases %standard-phases
24236 (replace 'check
24237 (lambda* (#:key tests? #:allow-other-keys)
24238 (when tests?
24239 (invoke "nosetests" "-s" "test"))
24240 #t)))))
24241 (native-inputs
24242 `(("python-nose" ,python-nose)))
24243 (propagated-inputs
24244 `(("python-gssapi" ,python-gssapi)
24245 ("python-pyasn1" ,python-pyasn1)))
24246 (synopsis "Python LDAP client")
24247 (description
24248 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
24249 library.")
24250 (license license:lgpl3+)))
24251
24252 (define-public python-boltons
24253 (package
24254 (name "python-boltons")
24255 (version "20.0.0")
24256 (source
24257 (origin
24258 (method url-fetch)
24259 (uri (pypi-uri "boltons" version))
24260 (sha256
24261 (base32
24262 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
24263 (build-system python-build-system)
24264 (home-page "https://github.com/mahmoud/boltons")
24265 (synopsis "Extensions to the Python standard library")
24266 (description
24267 "Boltons is a set of over 230 pure-Python utilities in the same spirit
24268 as — and yet conspicuously missing from — the standard library, including:
24269
24270 @itemize
24271 @item Atomic file saving, bolted on with fileutils
24272 @item A highly-optimized OrderedMultiDict, in dictutils
24273 @item Two types of PriorityQueue, in queueutils
24274 @item Chunked and windowed iteration, in iterutils
24275 @item Recursive data structure iteration and merging, with iterutils.remap
24276 @item Exponential backoff functionality, including jitter, through
24277 iterutils.backoff
24278 @item A full-featured TracebackInfo type, for representing stack traces, in
24279 tbutils
24280 @end itemize")
24281 (license license:bsd-3)))
24282
24283 (define-public python-eliot
24284 (package
24285 (name "python-eliot")
24286 (version "1.12.0")
24287 (source
24288 (origin
24289 (method url-fetch)
24290 (uri (pypi-uri "eliot" version))
24291 (sha256
24292 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
24293 (build-system python-build-system)
24294 (arguments
24295 `(#:phases
24296 (modify-phases %standard-phases
24297 (add-after 'unpack 'remove-journald-support
24298 (lambda _
24299 (for-each delete-file
24300 '("eliot/tests/test_journald.py"
24301 "eliot/journald.py"))
24302 #t))
24303 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
24304 ;; remove command-line tool's tests. TODO eliot-prettyprint should
24305 ;; be installed and these tests should pass.
24306 (lambda _
24307 (delete-file "eliot/tests/test_prettyprint.py")
24308 #t)))))
24309 (propagated-inputs
24310 `(("python-boltons" ,python-boltons)
24311 ("python-pyrsistent" ,python-pyrsistent)
24312 ("python-six" ,python-six)
24313 ("python-zope-interface" ,python-zope-interface)))
24314 (native-inputs
24315 `(("python-black" ,python-black)
24316 ("python-coverage" ,python-coverage)
24317 ("python-dask" ,python-dask)
24318 ("python-flake8" ,python-flake8)
24319 ("python-hypothesis" ,python-hypothesis)
24320 ("python-pytest" ,python-pytest)
24321 ("python-setuptools" ,python-setuptools)
24322 ("python-sphinx" ,python-sphinx)
24323 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24324 ("python-testtools" ,python-testtools)
24325 ("python-twine" ,python-twine)
24326 ("python-twisted" ,python-twisted)))
24327 (home-page "https://github.com/itamarst/eliot/")
24328 (synopsis "Eliot: the logging system that tells you why it happened")
24329 (description
24330 "@dfn{eliot} is a Python logging system that outputs causal chains of
24331 actions: actions can spawn other actions, and eventually they either succeed
24332 or fail. The resulting logs tell you the story of what your software did: what
24333 happened, and what caused it.")
24334 (license license:asl2.0)))
24335
24336 (define-public python-pem
24337 (package
24338 (name "python-pem")
24339 (version "20.1.0")
24340 (source
24341 (origin
24342 (method url-fetch)
24343 (uri (pypi-uri "pem" version))
24344 (sha256
24345 (base32
24346 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
24347 (build-system python-build-system)
24348 (native-inputs
24349 `(("python-certifi" ,python-certifi)
24350 ("python-coverage" ,python-coverage)
24351 ("python-pretend" ,python-pretend)
24352 ("python-pyopenssl" ,python-pyopenssl)
24353 ("python-pytest" ,python-pytest)
24354 ("python-sphinx" ,python-sphinx)
24355 ("python-twisted" ,python-twisted)))
24356 (home-page "https://pem.readthedocs.io/")
24357 (synopsis "Easy PEM file parsing in Python")
24358 (description
24359 "This package provides a Python module for parsing and splitting PEM files.")
24360 (license license:expat)))
24361
24362 (define-public python-txsni
24363 ;; We need a few commits on top of 0.1.9 for compatibility with newer
24364 ;; Python and OpenSSL.
24365 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
24366 (revision "0"))
24367 (package
24368 (name "python-txsni")
24369 (version (git-version "0.1.9" revision commit))
24370 (home-page "https://github.com/glyph/txsni")
24371 (source
24372 (origin
24373 (method git-fetch)
24374 (uri (git-reference (url home-page) (commit commit)))
24375 (file-name (git-file-name name version))
24376 (sha256
24377 (base32
24378 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
24379 (build-system python-build-system)
24380 (propagated-inputs
24381 `(("python-pyopenssl" ,python-pyopenssl)
24382 ("python-service-identity" ,python-service-identity)
24383 ("python-twisted" ,python-twisted)))
24384 (synopsis "Run TLS servers with Twisted")
24385 (description
24386 "This package provides an easy-to-use SNI endpoint for use
24387 with the Twisted web framework.")
24388 (license license:expat))))
24389
24390 (define-public python-txacme
24391 (package
24392 (name "python-txacme")
24393 (version "0.9.2")
24394 (source
24395 (origin
24396 (method url-fetch)
24397 (uri (pypi-uri "txacme" version))
24398 (sha256
24399 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
24400 (build-system python-build-system)
24401 (propagated-inputs
24402 `(("python-acme" ,python-acme)
24403 ("python-attrs" ,python-attrs)
24404 ("python-eliot" ,python-eliot)
24405 ("python-josepy" ,python-josepy)
24406 ("python-pem" ,python-pem)
24407 ("python-treq" ,python-treq)
24408 ("python-twisted" ,python-twisted)
24409 ("python-txsni" ,python-txsni)))
24410 (native-inputs
24411 `(("python-fixtures" ,python-fixtures)
24412 ("python-hypothesis" ,python-hypothesis)
24413 ("python-mock" ,python-mock)
24414 ("python-service-identity"
24415 ,python-service-identity)
24416 ("python-testrepository" ,python-testrepository)
24417 ("python-testscenarios" ,python-testscenarios)
24418 ("python-testtools" ,python-testtools)))
24419 (home-page "https://github.com/twisted/txacme")
24420 (synopsis "Twisted implexmentation of the ACME protocol")
24421 (description
24422 "ACME is Automatic Certificate Management Environment, a protocol that
24423 allows clients and certificate authorities to automate verification and
24424 certificate issuance. The ACME protocol is used by the free Let's Encrypt
24425 Certificate Authority.
24426
24427 txacme is an implementation of the protocol for Twisted, the event-driven
24428 networking engine for Python.")
24429 (license license:expat)))
24430
24431 (define-public python-pysaml2
24432 (package
24433 (name "python-pysaml2")
24434 (version "6.5.1")
24435 (source
24436 (origin
24437 (method url-fetch)
24438 (uri (pypi-uri "pysaml2" version))
24439 (sha256
24440 (base32
24441 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
24442 (build-system python-build-system)
24443 (propagated-inputs
24444 `(("python-cryptography" ,python-cryptography)
24445 ("python-dateutil" ,python-dateutil)
24446 ("python-defusedxml" ,python-defusedxml)
24447 ("python-importlib-resources"
24448 ,python-importlib-resources)
24449 ("python-pyopenssl" ,python-pyopenssl)
24450 ("python-pytz" ,python-pytz)
24451 ("python-requests" ,python-requests)
24452 ("python-six" ,python-six)
24453 ("python-xmlschema" ,python-xmlschema)))
24454 (home-page "https://idpy.org")
24455 (synopsis "Python implementation of SAML Version 2 Standard")
24456 (description
24457 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
24458 It contains all necessary pieces for building a SAML2 service provider or
24459 an identity provider. The distribution contains examples of both.
24460
24461 This package was originally written to work in a WSGI environment, but
24462 there are extensions that allow you to use it with other frameworks.")
24463 (license license:asl2.0)))
24464
24465 (define-public python-click-plugins
24466 (package
24467 (name "python-click-plugins")
24468 (version "1.1.1")
24469 (source
24470 (origin
24471 (method url-fetch)
24472 (uri (pypi-uri "click-plugins" version))
24473 (sha256
24474 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
24475 (build-system python-build-system)
24476 (native-inputs
24477 `(("python-pytest" ,python-pytest)))
24478 (propagated-inputs
24479 `(("python-click" ,python-click)))
24480 (synopsis "Extension for Click to register external CLI commands")
24481 (description "This package provides n extension module for Click to
24482 register external CLI commands via setuptools entry-points.")
24483 (home-page "https://github.com/click-contrib/click-plugins")
24484 (license license:bsd-3)))
24485
24486 (define-public python-diceware
24487 (package
24488 (name "python-diceware")
24489 (version "0.9.6")
24490 (source
24491 (origin
24492 (method url-fetch)
24493 (uri (pypi-uri "diceware" version))
24494 (sha256
24495 (base32
24496 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
24497 (build-system python-build-system)
24498 (native-inputs
24499 `(("python-coverage" ,python-coverage)
24500 ("python-pytest" ,python-pytest)
24501 ("python-pytest-runner" ,python-pytest-runner)))
24502 (home-page "https://github.com/ulif/diceware/")
24503 (synopsis "Generates memorable passphrases")
24504 (description "This package generates passphrases by concatenating words
24505 randomly picked from wordlists. It supports several sources of
24506 randomness (including real life dice) and different wordlists (including
24507 cryptographically signed ones).")
24508 (license license:gpl3+)))
24509
24510 (define-public python-dictdiffer
24511 (package
24512 (name "python-dictdiffer")
24513 (version "0.8.1")
24514 (source (origin
24515 (method url-fetch)
24516 (uri (pypi-uri "dictdiffer" version))
24517 (sha256
24518 (base32
24519 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
24520 (build-system python-build-system)
24521 (native-inputs
24522 `(("python-check-manifest" ,python-check-manifest)
24523 ("python-coverage" ,python-coverage)
24524 ("python-isort" ,python-isort)
24525 ("python-mock" ,python-mock)
24526 ("python-pydoctstyle" ,python-pydocstyle)
24527 ("python-pytest-cache" ,python-pytest-cache)
24528 ("python-pytest-cov" ,python-pytest-cov)
24529 ("python-pytest-pep8" ,python-pytest-pep8)
24530 ("python-pytest-runner" ,python-pytest-runner)
24531 ("python-pytest" ,python-pytest)
24532 ("python-setuptools-scm" ,python-setuptools-scm)
24533 ("python-tox" ,python-tox)))
24534 (home-page "https://github.com/inveniosoftware/dictdiffer")
24535 (synopsis "Diff and patch Python dictionary objects")
24536 (description
24537 "Dictdiffer is a Python module that helps you to diff and patch
24538 dictionaries.")
24539 (license license:expat)))
24540
24541 (define-public pyzo
24542 (package
24543 (name "pyzo")
24544 (version "4.11.2")
24545 (source
24546 (origin
24547 (method url-fetch)
24548 (uri (pypi-uri "pyzo" version))
24549 (sha256
24550 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
24551 (build-system python-build-system)
24552 (arguments
24553 `(#:phases
24554 (modify-phases %standard-phases
24555 (add-before 'check 'fix-home-directory
24556 (lambda _
24557 ;; Tests fail with "Permission denied: '/homeless-shelter'".
24558 (setenv "HOME" "/tmp")
24559 #t)))
24560 ;; Tests fail with "Uncaught Python exception: python: undefined
24561 ;; symbol: objc_getClass".
24562 #:tests? #f))
24563 (propagated-inputs
24564 `(("python-pyqt" ,python-pyqt)))
24565 (home-page "https://pyzo.org")
24566 (synopsis
24567 "Python IDE for scientific computing")
24568 (description
24569 "Pyzo is a Python IDE focused on interactivity and introspection,
24570 which makes it very suitable for scientific computing. Its practical
24571 design is aimed at simplicity and efficiency.
24572
24573 It consists of two main components, the editor and the shell, and uses
24574 a set of pluggable tools to help the programmer in various ways. Some
24575 example tools are source structure, project manager, interactive help,
24576 workspace...")
24577 (license license:bsd-2)))
24578
24579 (define-public python-osc
24580 (package
24581 (name "python-osc")
24582 (version "1.7.4")
24583 (source
24584 (origin
24585 (method url-fetch)
24586 (uri (pypi-uri "python-osc" version))
24587 (sha256
24588 (base32
24589 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
24590 (build-system python-build-system)
24591 (home-page "https://github.com/attwad/python-osc")
24592 (synopsis "Open Sound Control server and client implementations")
24593 (description
24594 "@code{python-osc} is a pure Python library with no external
24595 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
24596 Open Sound Control 1.0} specification.")
24597 (license license:unlicense)))
24598
24599 (define-public python-voluptuous
24600 (package
24601 (name "python-voluptuous")
24602 (version "0.11.7")
24603 (source
24604 (origin
24605 (method url-fetch)
24606 (uri (pypi-uri "voluptuous" version))
24607 (sha256
24608 (base32
24609 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
24610 (build-system python-build-system)
24611 (native-inputs
24612 `(("python-nose" ,python-nose)))
24613 (home-page "https://github.com/alecthomas/voluptuous")
24614 (synopsis "Python data validation library")
24615 (description
24616 "Voluptuous is a Python data validation library. It is primarily
24617 intended for validating data coming into Python as JSON, YAML, etc.")
24618 (license license:bsd-3)))
24619
24620 (define-public python-cmd2
24621 (package
24622 (name "python-cmd2")
24623 (version "1.0.2")
24624 (source
24625 (origin
24626 (method url-fetch)
24627 (uri (pypi-uri "cmd2" version))
24628 (sha256
24629 (base32
24630 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
24631 (build-system python-build-system)
24632 (propagated-inputs
24633 `(("python-attrs" ,python-attrs)
24634 ("python-colorama" ,python-colorama)
24635 ("python-pyperclip" ,python-pyperclip)
24636 ("python-wcwidth" ,python-wcwidth)))
24637 (native-inputs
24638 `(("python-codecov" ,python-codecov)
24639 ("python-coverage" ,python-coverage)
24640 ("python-doc8" ,python-doc8)
24641 ("python-flake8" ,python-flake8)
24642 ("python-invoke" ,python-invoke)
24643 ("python-mock" ,python-mock)
24644 ("python-pytest" ,python-pytest)
24645 ("python-pytest-cov" ,python-pytest-cov)
24646 ("python-pytest-mock" ,python-pytest-mock)
24647 ("python-setuptools-scm" ,python-setuptools-scm)
24648 ("python-sphinx" ,python-sphinx)
24649 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
24650 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24651 ("python-tox" ,python-tox)
24652 ("python-twine" ,python-twine)
24653 ("which" ,which)))
24654 (home-page "https://github.com/python-cmd2/cmd2")
24655 (synopsis "Tool for building interactive command line applications")
24656 (description
24657 "Cmd2 is a tool for building interactive command line applications in
24658 Python. Its goal is to make it quick and easy for developers to build
24659 feature-rich and user-friendly interactive command line applications. It
24660 provides a simple API which is an extension of Python's built-in @code{cmd}
24661 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
24662 make your life easier and eliminates much of the boilerplate code which would
24663 be necessary when using @code{cmd}.")
24664 (license license:expat)))
24665
24666 (define-public python-pytidylib
24667 (package
24668 (name "python-pytidylib")
24669 (version "0.3.2")
24670 (source (origin
24671 (method url-fetch)
24672 (uri (pypi-uri "pytidylib" version))
24673 (sha256
24674 (base32
24675 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
24676 (build-system python-build-system)
24677 (arguments
24678 '(#:phases
24679 (modify-phases %standard-phases
24680 (add-before 'build 'qualify-libtidy
24681 (lambda* (#:key inputs #:allow-other-keys)
24682 (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
24683 (substitute* "tidylib/tidy.py"
24684 (("ctypes\\.util\\.find_library\\('tidy'\\)")
24685 (format #f "'~a'" libtidy)))
24686 #t))))))
24687 (inputs `(("tidy" ,tidy)))
24688 (home-page "https://github.com/countergram/pytidylib")
24689 (synopsis "Python wrapper for HTML Tidy library")
24690 (description
24691 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
24692 allows you, from Python code, to “fix” invalid (X)HTML markup.")
24693 (license license:expat)))
24694
24695 (define-public python2-pytidylib
24696 (package-with-python2 python-pytidylib))
24697
24698 (define-public python-mujson
24699 (package
24700 (name "python-mujson")
24701 (version "1.4")
24702 (source
24703 (origin
24704 (method url-fetch)
24705 (uri (pypi-uri "mujson" version))
24706 (sha256
24707 (base32
24708 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
24709 (build-system python-build-system)
24710 (home-page "https://github.com/mattgiles/mujson")
24711 (synopsis "Use the fastest JSON functions available at import time")
24712 (description "This package selects the fastest JSON functions available
24713 at import time.")
24714 (license license:expat)))
24715
24716 (define-public python-bashlex
24717 (package
24718 (name "python-bashlex")
24719 (version "0.14")
24720 (source
24721 (origin
24722 (method url-fetch)
24723 (uri (pypi-uri "bashlex" version))
24724 (sha256
24725 (base32
24726 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
24727 (build-system python-build-system)
24728 (arguments
24729 `(#:phases
24730 (modify-phases %standard-phases
24731 (add-before 'build 'pregenerate-yacc-tables
24732 (lambda _
24733 ;; parser.py caches tables, which attempts to write to site lib
24734 ;; see https://github.com/idank/bashlex/issues/51
24735 (invoke "python" "-c" "import bashlex"))))))
24736 (home-page
24737 "https://github.com/idank/bashlex")
24738 (synopsis "Python parser for bash")
24739 (description "@code{bashlex} is a Python port of the parser used
24740 internally by GNU bash.
24741
24742 For the most part it's transliterated from C, the major differences are:
24743
24744 @itemize
24745 @item it does not execute anything
24746 @item it is reentrant
24747 @item it generates a complete AST
24748 @end itemize
24749 ")
24750 (license license:gpl3+)))
24751
24752 (define-public python-jinxed
24753 (package
24754 (name "python-jinxed")
24755 (version "1.0.0")
24756 (source
24757 (origin
24758 (method url-fetch)
24759 (uri (pypi-uri "jinxed" version))
24760 (sha256
24761 (base32
24762 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
24763 (build-system python-build-system)
24764 (arguments
24765 '(#:phases
24766 (modify-phases %standard-phases
24767 (add-before 'check 'set-environment-variables
24768 (lambda* (#:key inputs #:allow-other-keys)
24769 (let ((ncurses (assoc-ref inputs "ncurses")))
24770 (setenv "TERM" "LINUX")
24771 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
24772 #t))))
24773 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
24774 (native-inputs
24775 `(("ncurses" ,ncurses)))
24776 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
24777 (synopsis "Jinxed Terminal Library")
24778 (description
24779 "Jinxed is an implementation of a subset of the Python curses library.")
24780 (license license:mpl2.0)))
24781
24782 (define-public python-svgutils
24783 (package
24784 (name "python-svgutils")
24785 (version "0.3.4")
24786 (source
24787 (origin
24788 (method url-fetch)
24789 (uri (pypi-uri "svgutils" version))
24790 (sha256
24791 (base32
24792 "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
24793 (build-system python-build-system)
24794 (propagated-inputs
24795 `(("python-lxml" ,python-lxml)))
24796 (home-page "https://svgutils.readthedocs.io")
24797 (synopsis "Python SVG editor")
24798 (description "This is an utility package that helps with editing and
24799 concatenating SVG files. It is especially directed at scientists preparing
24800 final figures for submission to journals. So far it supports arbitrary
24801 placement and scaling of SVG figures and adding markers, such as labels.")
24802 (license license:expat)))
24803
24804 (define-public python-blessed
24805 (package
24806 (name "python-blessed")
24807 (version "1.17.8")
24808 (source
24809 (origin
24810 (method url-fetch)
24811 (uri (pypi-uri "blessed" version))
24812 (sha256
24813 (base32
24814 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
24815 (modules '((guix build utils)))
24816 (snippet
24817 '(begin
24818 ;; Don't get hung up on Windows test failures.
24819 (delete-file "blessed/win_terminal.py") #t))))
24820 (build-system python-build-system)
24821 (propagated-inputs
24822 `(("python-jinxed" ,python-jinxed)
24823 ("python-six" ,python-six)
24824 ("python-wcwidth" ,python-wcwidth)))
24825 (native-inputs
24826 `(("python-mock" ,python-mock)
24827 ("python-pytest" ,python-pytest)))
24828 (home-page "https://github.com/jquast/blessed")
24829 (synopsis "Wrapper around terminal capabilities")
24830 (description
24831 "Blessed is a thin, practical wrapper around terminal styling, screen
24832 positioning, and keyboard input.")
24833 (license license:expat)))
24834
24835 (define-public python-readme-renderer
24836 (package
24837 (name "python-readme-renderer")
24838 (version "26.0")
24839 (source
24840 (origin
24841 (method url-fetch)
24842 (uri (pypi-uri "readme_renderer" version))
24843 (sha256
24844 (base32
24845 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
24846 (build-system python-build-system)
24847 (propagated-inputs
24848 `(("python-bleach" ,python-bleach)
24849 ("python-docutils" ,python-docutils)
24850 ("python-pygments" ,python-pygments)
24851 ("python-six" ,python-six)))
24852 (native-inputs
24853 `(("python-mock" ,python-mock)
24854 ("python-pytest" ,python-pytest)))
24855 (home-page "https://github.com/pypa/readme_renderer")
24856 (synopsis "Render README files in Warehouse")
24857 (description
24858 "Readme Renderer is a library that will safely render arbitrary README
24859 files into HTML. It is designed to be used in Warehouse to render the
24860 @code{long_description} for packages. It can handle Markdown, reStructuredText,
24861 and plain text.")
24862 (license license:asl2.0)))
24863
24864 (define-public python-lazr-delegates
24865 (package
24866 (name "python-lazr-delegates")
24867 (version "2.0.4")
24868 (source
24869 (origin
24870 (method url-fetch)
24871 (uri (pypi-uri "lazr.delegates" version))
24872 (sha256
24873 (base32
24874 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
24875 (build-system python-build-system)
24876 (arguments
24877 '(#:phases
24878 (modify-phases %standard-phases
24879 (replace 'check
24880 (lambda _
24881 (invoke "python" "setup.py" "nosetests"))))))
24882 (native-inputs
24883 `(("python-nose" ,python-nose)))
24884 (propagated-inputs
24885 `(("python-zope-interface" ,python-zope-interface)))
24886 (home-page "https://launchpad.net/lazr.delegates")
24887 (synopsis "Easily write objects that delegate behavior")
24888 (description
24889 "The @code{lazr.delegates} package makes it easy to write objects that
24890 delegate behavior to another object. The new object adds some property or
24891 behavior on to the other object, while still providing the underlying interface,
24892 and delegating behavior.")
24893 (license license:lgpl3)))
24894
24895 (define-public python-lazr-config
24896 (package
24897 (name "python-lazr-config")
24898 (version "2.2.2")
24899 (source
24900 (origin
24901 (method url-fetch)
24902 (uri (pypi-uri "lazr.config" version))
24903 (sha256
24904 (base32
24905 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
24906 (build-system python-build-system)
24907 (arguments
24908 '(#:phases
24909 (modify-phases %standard-phases
24910 (replace 'check
24911 (lambda _
24912 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
24913 (native-inputs
24914 `(("python-nose" ,python-nose)))
24915 (propagated-inputs
24916 `(("python-lazr-delegates" ,python-lazr-delegates)
24917 ("python-zope-interface" ,python-zope-interface)))
24918 (home-page "https://launchpad.net/lazr.config")
24919 (synopsis "Create configuration schemas and process and validate configurations")
24920 (description
24921 "The LAZR config system is typically used to manage process configuration.
24922 Process configuration is for saying how things change when we run systems on
24923 different machines, or under different circumstances. This system uses ini-like
24924 file format of section, keys, and values. The config file supports inheritance
24925 to minimize duplication of information across files. The format supports schema
24926 validation.")
24927 (license license:lgpl3)))
24928
24929 (define-public python-flufl-bounce
24930 (package
24931 (name "python-flufl-bounce")
24932 (version "3.0.1")
24933 (source
24934 (origin
24935 (method url-fetch)
24936 (uri (pypi-uri "flufl.bounce" version))
24937 (sha256
24938 (base32
24939 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
24940 (build-system python-build-system)
24941 (propagated-inputs
24942 `(("python-atpublic" ,python-atpublic)
24943 ("python-zope-interface" ,python-zope-interface)))
24944 (native-inputs
24945 `(("python-nose2" ,python-nose2)))
24946 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
24947 (synopsis "Email bounce detectors")
24948 (description "The @code{flufl.bounce} library provides a set of heuristics
24949 and an API for detecting the original bouncing email addresses from a bounce
24950 message. Many formats found in the wild are supported, as are VERP and
24951 RFC 3464.")
24952 (license (list license:asl2.0
24953 license:lgpl3)))) ; only for setup_headers.py
24954
24955 (define-public python-flufl-i18n
24956 (package
24957 (name "python-flufl-i18n")
24958 (version "3.0")
24959 (source
24960 (origin
24961 (method url-fetch)
24962 (uri (pypi-uri "flufl.i18n" version))
24963 (sha256
24964 (base32
24965 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
24966 (build-system python-build-system)
24967 (propagated-inputs
24968 `(("python-atpublic" ,python-atpublic)))
24969 (home-page "https://flufli18n.readthedocs.io")
24970 (synopsis "API for Python internationalization")
24971 (description
24972 "This package provides a high-level, convenient API for managing
24973 internationalization/translation contexts in Python applications. There is a
24974 simple API for single-context applications, such as command line scripts which
24975 only need to translate into one language during the entire course of their
24976 execution. There is a more flexible, but still convenient API for multi-context
24977 applications, such as servers, which may need to switch language contexts for
24978 different tasks.")
24979 (license license:asl2.0)))
24980
24981 (define-public python-flufl-lock
24982 (package
24983 (name "python-flufl-lock")
24984 (version "4.0")
24985 (source
24986 (origin
24987 (method url-fetch)
24988 (uri (pypi-uri "flufl.lock" version))
24989 (sha256
24990 (base32
24991 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
24992 (build-system python-build-system)
24993 (propagated-inputs
24994 `(("python-atpublic" ,python-atpublic)
24995 ("python-psutil" ,python-psutil)))
24996 (home-page "https://flufllock.readthedocs.io")
24997 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
24998 (description
24999 "The @dfn{flufl.lock} package provides NFS-safe file locking with
25000 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
25001 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
25002 and have a maximum lifetime built-in.")
25003 (license (list license:asl2.0
25004 license:lgpl3)))) ; only for setup_helpers.py
25005
25006 (define-public python-flufl-testing
25007 (package
25008 (name "python-flufl-testing")
25009 (version "0.8")
25010 (source
25011 (origin
25012 (method url-fetch)
25013 (uri (pypi-uri "flufl.testing" version))
25014 (sha256
25015 (base32
25016 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
25017 (build-system python-build-system)
25018 (native-inputs
25019 `(("python-nose2" ,python-nose2)))
25020 (home-page "https://gitlab.com/warsaw/flufl.testing")
25021 (synopsis "Collection of test tool plugins")
25022 (description
25023 "This package contains a small collection of test tool plugins for
25024 @code{nose2} and @code{flake8}.")
25025 (license license:asl2.0)))
25026
25027 (define-public python-devtools
25028 (package
25029 (name "python-devtools")
25030 (version "0.6")
25031 (source
25032 (origin
25033 (method git-fetch)
25034 (uri (git-reference
25035 (url "https://github.com/samuelcolvin/python-devtools")
25036 (commit (string-append "v" version))))
25037 (file-name (git-file-name name version))
25038 (sha256
25039 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
25040 (build-system python-build-system)
25041 (native-inputs
25042 `(("python-pytest" ,python-pytest)
25043 ("python-pytest-mock" ,python-pytest-mock)))
25044 (propagated-inputs
25045 `(("python-pygments" ,python-pygments)))
25046 (arguments
25047 `(#:phases (modify-phases %standard-phases
25048 (replace 'check
25049 (lambda _
25050 (invoke "pytest")
25051 #t)))))
25052 (home-page "https://github.com/samuelcolvin/python-devtools")
25053 (synopsis "Debug command and development tools")
25054 (description
25055 "This package provides a debug print command and other development tools.
25056 It adds a simple and readable way to print stuff during development.")
25057 (license license:expat)))
25058
25059 (define-public python-dateparser
25060 (package
25061 (name "python-dateparser")
25062 (version "0.7.6")
25063 (source
25064 (origin
25065 (method url-fetch)
25066 (uri (pypi-uri "dateparser" version))
25067 (sha256
25068 (base32
25069 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
25070 (build-system python-build-system)
25071 (propagated-inputs
25072 `(("python-dateutil" ,python-dateutil)
25073 ("python-pytz" ,python-pytz)
25074 ("python-regex" ,python-regex)
25075 ("python-ruamel.yaml" ,python-ruamel.yaml)
25076 ("python-tzlocal" ,python-tzlocal)))
25077 (native-inputs
25078 `(("python-mock" ,python-mock)
25079 ("python-parameterized" ,python-parameterized)
25080 ("tzdata" ,tzdata-for-tests)))
25081 (arguments
25082 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
25083 #:tests? #f
25084 #:phases
25085 (modify-phases %standard-phases
25086 (add-before 'check 'set-check-environment
25087 (lambda* (#:key inputs #:allow-other-keys)
25088 (setenv "TZ" "UTC")
25089 (setenv "TZDIR"
25090 (search-input-directory inputs
25091 "share/zoneinfo")))))))
25092 (home-page "https://github.com/scrapinghub/dateparser")
25093 (synopsis
25094 "Date parsing library designed to parse dates from HTML pages")
25095 (description
25096 "@code{python-dateparser} provides modules to easily parse localized
25097 dates in almost any string formats commonly found on web pages.")
25098 (license license:bsd-3)))
25099
25100 (define-public python-dparse
25101 (package
25102 (name "python-dparse")
25103 (version "0.5.1")
25104 (source
25105 (origin
25106 (method url-fetch)
25107 (uri (pypi-uri "dparse" version))
25108 (sha256
25109 (base32
25110 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
25111 (build-system python-build-system)
25112 (native-inputs
25113 `(("python-pytest" ,python-pytest)))
25114 (propagated-inputs
25115 `(("python-packaging" ,python-packaging)
25116 ("python-pyyaml" ,python-pyyaml)
25117 ("python-toml" ,python-toml)))
25118 (home-page "https://github.com/pyupio/dparse")
25119 (synopsis "Parser for Python dependency files")
25120 (description "This package provides a parser for Python dependency files.")
25121 (license license:expat)))
25122
25123 (define-public python-dpath
25124 (package
25125 (name "python-dpath")
25126 (version "2.0.1")
25127 (source
25128 (origin
25129 (method url-fetch)
25130 (uri (pypi-uri "dpath" version))
25131 (sha256
25132 (base32
25133 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
25134 (build-system python-build-system)
25135 (native-inputs
25136 `(("python-hypothesis" ,python-hypothesis)
25137 ("python-mock" ,python-mock)
25138 ("python-nose" ,python-nose)))
25139 (arguments
25140 '(#:phases
25141 (modify-phases %standard-phases
25142 (replace 'check
25143 (lambda* (#:key inputs outputs #:allow-other-keys)
25144 (add-installed-pythonpath inputs outputs)
25145 ;; This invokation is taken from tox.ini.
25146 (invoke "nosetests" "-d" "-v" "tests/"))))))
25147 (home-page "https://github.com/akesterson/dpath-python")
25148 (synopsis "File-system-like pathing and searching for dictionaries")
25149 (description
25150 "@code{python-dpath} is a library for accessing and searching
25151 dictionaries via /slashed/paths ala xpath.
25152
25153 Basically it lets you glob over a dictionary as if it were a file system. It
25154 allows you to specify globs (ala the bash eglob syntax, through some advanced
25155 fnmatch.fnmatch magic) to access dictionary elements, and provides some
25156 facility for filtering those results.")
25157 (license license:expat)))
25158
25159 (define-public python-safety
25160 (package
25161 (name "python-safety")
25162 (version "1.9.0")
25163 (source
25164 (origin
25165 (method url-fetch)
25166 (uri (pypi-uri "safety" version))
25167 (sha256
25168 (base32
25169 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
25170 (build-system python-build-system)
25171 (arguments
25172 `(#:phases
25173 (modify-phases %standard-phases
25174 (add-after 'unpack 'disable-tests
25175 (lambda _
25176 (substitute* "tests/test_safety.py"
25177 ;; requires network
25178 (("def test_check_live") "def _test_check_live"))
25179 #t)))))
25180 (propagated-inputs
25181 `(("python-click" ,python-click)
25182 ("python-dparse" ,python-dparse)
25183 ("python-packaging" ,python-packaging)
25184 ("python-requests" ,python-requests)))
25185 (home-page "https://github.com/pyupio/safety")
25186 (synopsis "Check installed dependencies for known vulnerabilities")
25187 (description "Safety checks installed dependencies for known vulnerabilities.
25188 By default it uses the open Python vulnerability database Safety DB.")
25189 (license license:expat)))
25190
25191 (define-public python-pypandoc
25192 (package
25193 (name "python-pypandoc")
25194 (version "1.5")
25195 (source
25196 (origin
25197 (method url-fetch)
25198 (uri (pypi-uri "pypandoc" version))
25199 (sha256
25200 (base32
25201 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
25202 (build-system python-build-system)
25203 (inputs
25204 `(("pandoc" ,pandoc)
25205 ("pandoc-citeproc" ,pandoc-citeproc)))
25206 (propagated-inputs
25207 `(("wheel" ,python-wheel)))
25208 (native-inputs
25209 `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
25210 texlive-fonts-ec
25211 texlive-hyperref
25212 texlive-oberdiek
25213 texlive-lm
25214 texlive-xcolor)))))
25215 (arguments
25216 `(#:phases
25217 (modify-phases %standard-phases
25218 (add-before 'check 'disable-tests
25219 (lambda _
25220 ;; Disable test requiring network access
25221 (substitute* "tests.py"
25222 (("test_basic_conversion_from_http_url")
25223 "skip_test_basic_conversion_from_http_url"))
25224 #t)))))
25225 (home-page "https://github.com/bebraw/pypandoc")
25226 (synopsis "Python wrapper for pandoc")
25227 (description "pypandoc is a thin Python wrapper around pandoc
25228 and pandoc-citeproc.")
25229 (license license:expat)))
25230
25231 (define-public python-rnc2rng
25232 (package
25233 (name "python-rnc2rng")
25234 (version "2.6.4")
25235 (source
25236 (origin
25237 (method url-fetch)
25238 (uri (pypi-uri "rnc2rng" version))
25239 (sha256
25240 (base32
25241 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
25242 (build-system python-build-system)
25243 (propagated-inputs
25244 `(("python-rply" ,python-rply)))
25245 (arguments
25246 `(#:phases (modify-phases %standard-phases
25247 (replace 'check
25248 (lambda _
25249 (invoke "python" "test.py"))))))
25250 (home-page "https://github.com/djc/rnc2rng")
25251 (synopsis "Convert RELAX NG Compact to regular syntax")
25252 (description
25253 "This package provides the @command{rnc2rng} command-line tool as well as
25254 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
25255 equivalent schemata in the XML-based default RELAX NG syntax.")
25256 (license license:expat)))
25257
25258 (define-public python-telethon
25259 (package
25260 (name "python-telethon")
25261 (version "1.17.5")
25262 (source
25263 (origin
25264 (method git-fetch)
25265 (uri (git-reference
25266 (url "https://github.com/LonamiWebs/Telethon")
25267 (commit (string-append "v" version))))
25268 (file-name (git-file-name name version))
25269 (sha256
25270 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
25271 (build-system python-build-system)
25272 (arguments
25273 '(#:phases
25274 (modify-phases %standard-phases
25275 (replace 'check
25276 (lambda* (#:key tests? #:allow-other-keys)
25277 (when tests?
25278 (invoke "py.test" "-v"))
25279 #t)))))
25280 (propagated-inputs
25281 `(("python-rsa" ,python-rsa)
25282 ("python-pyaes" ,python-pyaes)))
25283 (native-inputs
25284 `(("python-pytest" ,python-pytest)
25285 ("python-pytest-asyncio" ,python-pytest-asyncio)
25286 ("python-pytest-trio" ,python-pytest-trio)))
25287 (home-page "https://docs.telethon.dev")
25288 (synopsis "Full-featured Telegram client library for Python 3")
25289 (description "This library is designed to make it easy to write Python
25290 programs that can interact with Telegram.")
25291 (license license:expat)))
25292
25293 (define-public python-citeproc-py
25294 (package
25295 (name "python-citeproc-py")
25296 (version "0.5.1")
25297 (source
25298 (origin
25299 (method url-fetch)
25300 (uri (pypi-uri "citeproc-py" version))
25301 (sha256
25302 (base32
25303 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
25304 (build-system python-build-system)
25305 (propagated-inputs
25306 `(("python-lxml" ,python-lxml)
25307 ("python-rnc2rng" ,python-rnc2rng)))
25308 (home-page
25309 "https://github.com/brechtm/citeproc-py")
25310 (synopsis "Citations and bibliography formatter")
25311 (description
25312 "Citeproc-py is a CSL processor for Python. It aims to implement the
25313 CSL 1.0.1 specification. citeproc-py can output styled citations and
25314 bibliographies in a number of different output formats. Currently supported
25315 are plain text, reStructuredText and HTML.")
25316 (license license:bsd-2)))
25317
25318 (define-public python-inform
25319 (package
25320 (name "python-inform")
25321 (version "1.23.0")
25322 (source
25323 (origin
25324 (method url-fetch)
25325 (uri (pypi-uri "inform" version))
25326 (sha256
25327 (base32
25328 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
25329 (build-system python-build-system)
25330 (arguments
25331 `(#:tests? #f)) ; PyPI tarball lacks tests
25332 (native-inputs
25333 `(("python-hypothesis" ,python-hypothesis)
25334 ("python-pytest-cov" ,python-pytest-cov)
25335 ("python-pytest-runner" ,python-pytest-runner)))
25336 (propagated-inputs
25337 `(("python-arrow" ,python-arrow)
25338 ("python-six" ,python-six)))
25339 (home-page "https://inform.readthedocs.io")
25340 (synopsis "Print & logging utilities for communicating with user")
25341 (description
25342 "Inform is designed to display messages from programs that are typically run from
25343 a console. It provides a collection of ‘print’ functions that allow you to simply and
25344 cleanly print different types of messages.")
25345 (license license:gpl3+)))
25346
25347 (define-public python-nestedtext
25348 (package
25349 (name "python-nestedtext")
25350 (version "1.0.0")
25351 (source
25352 (origin
25353 (method url-fetch)
25354 (uri (pypi-uri "nestedtext" version))
25355 (sha256
25356 (base32
25357 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
25358 (build-system python-build-system)
25359 (arguments
25360 `(#:tests? #f)) ; PyPI tarball lacks tests
25361 (propagated-inputs
25362 `(("python-inform" ,python-inform)))
25363 (home-page "https://nestedtext.org")
25364 (synopsis "Human readable and writable data interchange format")
25365 (description
25366 "NestedText is a file format for holding data that is to be entered, edited, or
25367 viewed by people. It allows data to be organized into a nested collection of
25368 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
25369 without the complexity and risk of YAML and without the syntactic clutter of JSON.
25370 NestedText is both simple and natural. Only a small number of concepts and rules must
25371 be kept in mind when creating it. It is easily created, modified, or viewed with
25372 a text editor and easily understood and used by both programmers and non-programmers.")
25373 (license license:expat))) ; MIT license
25374
25375 (define-public python-nest-asyncio
25376 (package
25377 (name "python-nest-asyncio")
25378 (version "1.5.1")
25379 (source
25380 (origin
25381 (method url-fetch)
25382 (uri (pypi-uri "nest_asyncio" version))
25383 (sha256
25384 (base32
25385 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
25386 (build-system python-build-system)
25387 (home-page "https://github.com/erdewit/nest_asyncio")
25388 (synopsis "Patch asyncio to allow nested event loops")
25389 (description
25390 "By design @code{asyncio} does not allow its event loop to be nested.
25391 This presents a practical problem: when in an environment where the event loop
25392 is already running it's impossible to run tasks and wait for the result. This
25393 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
25394 @code{loop.run_until_complete}.")
25395 (license license:bsd-3)))
25396
25397 (define-public python-simpervisor
25398 (package
25399 (name "python-simpervisor")
25400 (version "0.4")
25401 (source
25402 (origin
25403 ;; Tests not included in release.
25404 (method git-fetch)
25405 (uri (git-reference
25406 (url "https://github.com/yuvipanda/simpervisor")
25407 (commit (string-append "v" version))))
25408 (file-name (git-file-name name version))
25409 (sha256
25410 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
25411 (build-system python-build-system)
25412 (arguments
25413 `(#:tests? #f ; Test suite can't find aiohttp.
25414 #:phases
25415 (modify-phases %standard-phases
25416 (replace 'check
25417 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25418 (when tests?
25419 (add-installed-pythonpath inputs outputs)
25420 (invoke "pytest" "--maxfail" "3" "--verbose"))
25421 #t)))))
25422 (native-inputs
25423 `(("python-aiohttp" ,python-aiohttp)
25424 ("python-pytest" ,python-pytest)
25425 ("python-pytest-asyncio" ,python-pytest-asyncio)))
25426 (home-page "https://github.com/yuvipanda/simpervisor")
25427 (synopsis "Simple async process supervisor")
25428 (description
25429 "This package provides a simple async process supervisor in Python.")
25430 (license license:bsd-3)))
25431
25432 (define-public python-parallel
25433 (package
25434 (name "python-parallel")
25435 (version "1.6.4.4")
25436 (source
25437 (origin
25438 (method url-fetch)
25439 (uri (string-append
25440 "https://www.parallelpython.com/downloads/pp/pp-"
25441 version ".zip"))
25442 (sha256
25443 (base32
25444 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
25445 (native-inputs
25446 `(("unzip" ,unzip)))
25447 (build-system python-build-system)
25448 (arguments '(#:tests? #f)) ; No test suite.
25449 (home-page "https://www.parallelpython.com")
25450 (synopsis "Parallel and distributed programming for Python")
25451 (description "Parallel Python module (PP) provides an easy and efficient
25452 way to create parallel-enabled applications for SMP computers and clusters.
25453 PP module features cross-platform portability and dynamic load balancing.
25454 Thus applications written with PP will parallelize efficiently even on
25455 heterogeneous and multi-platform clusters (including clusters running other
25456 applications with variable CPU loads).")
25457 (license license:bsd-3)))
25458
25459 (define-public python2-parallel
25460 (package-with-python2 python-parallel))
25461
25462 (define-public python-djvulibre
25463 (package
25464 (name "python-djvulibre")
25465 (version "0.8.6")
25466 (source
25467 (origin
25468 (method url-fetch)
25469 (uri (pypi-uri "python-djvulibre" version))
25470 (sha256
25471 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
25472 (build-system python-build-system)
25473 (native-inputs
25474 `(("ghostscript" ,ghostscript)
25475 ("pkg-config" ,pkg-config)
25476 ("python-nose" ,python-nose)))
25477 (inputs
25478 `(("djvulibre" ,djvulibre)
25479 ("python-cython" ,python-cython)))
25480 (arguments
25481 `(#:phases
25482 (modify-phases %standard-phases
25483 (add-after 'unpack 'fix-tests
25484 (lambda _
25485 ;; Unit tests try to load the 'dllpath.py' and fail, because it
25486 ;; doesn't make sense on GNU/Linux.
25487 (delete-file "djvu/dllpath.py")
25488 #t)))))
25489 (synopsis "Python bindings for DjVuLibre")
25490 (description "This is a set of Python bindings for the DjVuLibre library.")
25491 (home-page "https://jwilk.net/software/python-djvulibre")
25492 (license license:gpl2)))
25493
25494 (define-public python2-djvulibre
25495 (package-with-python2 python-djvulibre))
25496
25497 (define-public python-versioneer
25498 (package
25499 (name "python-versioneer")
25500 (version "0.19")
25501 (source
25502 (origin
25503 (method url-fetch)
25504 (uri (pypi-uri "versioneer" version))
25505 (sha256
25506 (base32
25507 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
25508 (build-system python-build-system)
25509 (home-page
25510 "https://github.com/python-versioneer/python-versioneer")
25511 (synopsis
25512 "Version-string management for VCS-controlled trees")
25513 (description
25514 "@code{versioneer} is a tool for managing a recorded version number in
25515 distutils-based python projects. The goal is to remove the tedious and
25516 error-prone \"update the embedded version string\" step from your release
25517 process.")
25518 (license license:public-domain)))
25519
25520 (define-public python2-gamera
25521 (package
25522 (name "python2-gamera")
25523 (version "3.4.4")
25524 (source
25525 (origin
25526 (method url-fetch)
25527 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
25528 "gamera-" version ".tar.gz"))
25529 (sha256
25530 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
25531 (modules '((guix build utils)))
25532 (snippet
25533 '(begin
25534 ;; Remove bundled libraries.
25535 (for-each delete-file-recursively
25536 '("src/libpng-1.2.5"
25537 "src/libtiff"
25538 "src/zlib-1.2.8"))))))
25539 (build-system python-build-system)
25540 (inputs
25541 `(("libpng" ,libpng)
25542 ("libtiff" ,libtiff)
25543 ("zlib" ,zlib)))
25544 (arguments
25545 `(#:python ,python-2
25546 #:phases
25547 (modify-phases %standard-phases
25548 (add-after 'unpack 'disable-wx-support
25549 (lambda _
25550 (substitute* "setup.py"
25551 (("no_wx = False")
25552 "no_wx = True")))))))
25553 (synopsis "Framework for building document analysis applications")
25554 (description
25555 "Gamera is a toolkit for building document image recognition systems.")
25556 (home-page "https://gamera.informatik.hsnr.de/")
25557 (license license:gpl2+)))
25558
25559 (define-public python-contextvars
25560 (package
25561 (name "python-contextvars")
25562 (version "2.4")
25563 (source
25564 (origin
25565 (method url-fetch)
25566 (uri (pypi-uri "contextvars" version))
25567 (sha256
25568 (base32
25569 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
25570 (build-system python-build-system)
25571 (propagated-inputs
25572 `(("python-immutables" ,python-immutables)))
25573 (home-page
25574 "https://github.com/MagicStack/contextvars")
25575 (synopsis "PEP 567 Backport")
25576 (description "This package implements a backport of Python 3.7
25577 @code{contextvars} module (see PEP 567) for Python 3.6.")
25578 (license license:asl2.0)))
25579
25580 (define-public python-aiofiles
25581 (package
25582 (name "python-aiofiles")
25583 (version "0.6.0")
25584 (source
25585 (origin
25586 (method url-fetch)
25587 (uri (pypi-uri "aiofiles" version))
25588 (sha256
25589 (base32
25590 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
25591 (build-system python-build-system)
25592 (home-page "https://github.com/Tinche/aiofiles")
25593 (synopsis "File support for @code{asyncio}")
25594 (description "@code{python-aiofiles} is a library for handling local
25595 disk files in asyncio applications.")
25596 (license license:asl2.0)))
25597
25598 (define-public python-pyre-extensions
25599 (package
25600 (name "python-pyre-extensions")
25601 (version "0.0.18")
25602 (source
25603 (origin
25604 (method url-fetch)
25605 (uri (pypi-uri "pyre-extensions" version))
25606 (sha256
25607 (base32
25608 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
25609 (build-system python-build-system)
25610 (propagated-inputs
25611 `(("python-typing-extensions"
25612 ,python-typing-extensions)
25613 ("python-typing-inspect" ,python-typing-inspect)))
25614 (home-page "https://pyre-check.org")
25615 (synopsis
25616 "Type system extensions for use with @code{python-pyre}")
25617 (description
25618 "@code{python-pyre-extensions} defines extensions to the standard
25619 @code{typing} module that are supported by the Pyre typechecker.")
25620 (license license:expat)))
25621
25622 (define-public python-dataclasses
25623 (package
25624 (name "python-dataclasses")
25625 (version "0.8")
25626 (source
25627 (origin
25628 (method url-fetch)
25629 (uri (pypi-uri "dataclasses" version))
25630 (sha256
25631 (base32
25632 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
25633 (build-system python-build-system)
25634 (home-page
25635 "https://github.com/ericvsmith/dataclasses")
25636 (synopsis
25637 "Backport of the @code{dataclasses} module for Python 3.6")
25638 (description
25639 "This is an implementation of PEP 557, Data Classes. It is a
25640 backport of the @code{dataclasses} module for Python 3.6.")
25641 (license license:asl2.0)))
25642
25643 (define-public python-pywatchman
25644 (package
25645 (name "python-pywatchman")
25646 (version "1.4.1")
25647 (source
25648 (origin
25649 (method url-fetch)
25650 (uri (pypi-uri "pywatchman" version))
25651 (sha256
25652 (base32
25653 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
25654 (build-system python-build-system)
25655 (arguments
25656 `(#:tests? #f)) ;there are none
25657 (home-page
25658 "https://facebook.github.io/watchman/")
25659 (synopsis "Watchman client for python")
25660 (description "@code{python-pywatchman} is a library to connect and
25661 query Watchman to discover file changes.")
25662 (license license:bsd-3)))
25663
25664 (define-public python-helpdev
25665 (package
25666 (name "python-helpdev")
25667 (version "0.7.1")
25668 (source
25669 (origin
25670 (method url-fetch)
25671 (uri (pypi-uri "helpdev" version))
25672 (sha256
25673 (base32
25674 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
25675 (build-system python-build-system)
25676 (arguments
25677 `(#:phases
25678 (modify-phases %standard-phases
25679 (replace 'check
25680 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25681 (when tests?
25682 (add-installed-pythonpath inputs outputs)
25683 (invoke "pytest" "tests"))
25684 #t)))))
25685 (propagated-inputs
25686 `(("python-importlib-metadata" ,python-importlib-metadata)))
25687 (native-inputs
25688 `(("python-pytest" ,python-pytest)))
25689 (home-page "https://gitlab.com/dpizetta/helpdev")
25690 (synopsis
25691 "Extract information about the Python environment easily")
25692 (description
25693 "Helpdev is a library to easily extract information about the Python
25694 environment.")
25695 (license license:expat)))
25696
25697 (define-public python-logutils
25698 (package
25699 (name "python-logutils")
25700 (version "0.3.5")
25701 (source
25702 (origin
25703 (method url-fetch)
25704 (uri (pypi-uri "logutils" version))
25705 (sha256
25706 (base32
25707 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
25708 (build-system python-build-system)
25709 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
25710 (synopsis "Logging utilities")
25711 (description "This package provides a set of handlers for the Python
25712 standard library logging package. Some of these handlers are out-of-scope
25713 for the standard library, and so they are packaged here. Others are updated
25714 versions which have appeared in recent Python releases, but are usable with
25715 older versions of Python and so are packaged here.")
25716 (license license:bsd-3)))
25717
25718 (define-public python-helper
25719 (package
25720 (name "python-helper")
25721 (version "2.5.0")
25722 (source (origin
25723 (method url-fetch)
25724 (uri (pypi-uri "helper" version))
25725 (sha256
25726 (base32
25727 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
25728 (build-system python-build-system)
25729 (native-inputs
25730 `(("python-mock" ,python-mock)))
25731 (propagated-inputs
25732 `(("python-logutils" ,python-logutils)
25733 ("python-pyyaml" ,python-pyyaml)))
25734 (home-page "https://github.com/gmr/helper")
25735 (synopsis "Library for writing configurable applications and daemons")
25736 (description
25737 "This package provides procedures for quickly writing configurable
25738 applications and daemons.")
25739 (license license:bsd-3)))
25740
25741 (define-public python-qtsass
25742 (package
25743 (name "python-qtsass")
25744 (version "0.3.0")
25745 (source
25746 (origin
25747 ;; There are no tests in the PyPI tarball.
25748 (method git-fetch)
25749 (uri (git-reference
25750 (url "https://github.com/spyder-ide/qtsass/")
25751 (commit (string-append "v" version))))
25752 (file-name (git-file-name name version))
25753 (sha256
25754 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
25755 (build-system python-build-system)
25756 (arguments
25757 `(#:test-target "pytest"
25758 #:phases
25759 (modify-phases %standard-phases
25760 ;; Tests need to read and write files.
25761 (add-before 'check 'make-git-checkout-writable
25762 (lambda _
25763 (for-each make-file-writable (find-files "."))
25764 #t)))))
25765 (native-inputs
25766 `(("python-pytest" ,python-pytest)
25767 ("python-pytest-cov" ,python-pytest-cov)
25768 ("python-pytest-runner" ,python-pytest-runner)))
25769 (propagated-inputs
25770 `(("python-libsass" ,python-libsass)))
25771 (home-page "https://github.com/spyder-ide/qtsass")
25772 (synopsis "Compile SCSS files to valid Qt stylesheets")
25773 (description
25774 "Besides being used in web development, CSS is also the way to stylize
25775 Qt-based desktop applications. However, Qt's CSS has a few variations that
25776 prevent the direct use of SASS compiler.
25777
25778 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
25779 handling those variations.")
25780 (license license:expat)))
25781
25782 (define-public python-qdarkstyle
25783 (package
25784 (name "python-qdarkstyle")
25785 (version "2.8.1")
25786 (source
25787 (origin
25788 (method url-fetch)
25789 (uri (pypi-uri "QDarkStyle" version))
25790 (sha256
25791 (base32
25792 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
25793 (build-system python-build-system)
25794 (arguments
25795 `(;; Fails unable to detect valid Qt bindings even when
25796 ;; added as native-inputs.
25797 #:tests? #f))
25798 (propagated-inputs
25799 `(("python-helpdev" ,python-helpdev)
25800 ("python-qtpy" ,python-qtpy)))
25801 (home-page
25802 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
25803 (synopsis
25804 "Complete dark stylesheet for Python and Qt applications")
25805 (description "QDarkStyle is the most complete dark stylesheet for Python and
25806 Qt applications.")
25807 (license license:expat)))
25808
25809 (define-public python-bitstring
25810 (package
25811 (name "python-bitstring")
25812 (version "3.1.7")
25813 (source
25814 (origin
25815 (method url-fetch)
25816 (uri (pypi-uri "bitstring" version))
25817 (sha256
25818 (base32
25819 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
25820 (build-system python-build-system)
25821 (arguments
25822 `(#:phases
25823 (modify-phases %standard-phases
25824 (replace 'check
25825 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25826 (when tests?
25827 (add-installed-pythonpath inputs outputs)
25828 (with-directory-excursion "test"
25829 (invoke "pytest")))
25830 #t)))))
25831 (native-inputs
25832 `(("python-pytest" ,python-pytest)))
25833 (home-page "https://github.com/scott-griffiths/bitstring")
25834 (synopsis
25835 "Simple construction, analysis and modification of binary data")
25836 (description
25837 "Bitstring is a library for simple construction, analysis and modification
25838 of binary data.")
25839 (license license:expat)))
25840
25841 (define-public python-confuse
25842 (package
25843 (name "python-confuse")
25844 (version "1.5.0")
25845 (source
25846 (origin
25847 (method url-fetch)
25848 (uri (pypi-uri "confuse" version))
25849 (sha256
25850 (base32
25851 "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
25852 (build-system python-build-system)
25853 (propagated-inputs
25854 `(("python-pyyaml" ,python-pyyaml)))
25855 (home-page "https://github.com/beetbox/confuse")
25856 (synopsis "Painless YAML configuration")
25857 (description "Confuse is a configuration library for Python that uses
25858 YAML. It takes care of defaults, overrides, type checking, command-line
25859 integration, human-readable errors, and standard OS-specific locations.")
25860 (license license:expat)))
25861
25862 (define-public python-reflink
25863 (package
25864 (name "python-reflink")
25865 (version "0.2.1")
25866 (source
25867 (origin
25868 (method url-fetch)
25869 (uri (pypi-uri "reflink" version))
25870 (sha256
25871 (base32
25872 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
25873 (build-system python-build-system)
25874 (arguments
25875 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
25876 (propagated-inputs
25877 `(("python-cffi" ,python-cffi)))
25878 (native-inputs
25879 `(("python-pytest" ,python-pytest)
25880 ("python-pytest-runner" ,python-pytest-runner)))
25881 (home-page "https://gitlab.com/rubdos/pyreflink")
25882 (synopsis "Python wrapper around reflink system call")
25883 (description
25884 "Python reflink wraps around platform specific @code{reflink}
25885 implementations.")
25886 (license license:expat)))
25887
25888 (define-public python-pivy
25889 (package
25890 (name "python-pivy")
25891 (version "0.6.5")
25892 (source
25893 (origin
25894 (method git-fetch)
25895 (uri (git-reference
25896 (url "https://github.com/coin3d/pivy")
25897 (commit version)))
25898 (file-name (git-file-name name version))
25899 (sha256
25900 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
25901 (build-system python-build-system)
25902 (arguments
25903 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
25904 #:tests? #f
25905 #:phases
25906 (modify-phases %standard-phases
25907 (add-after 'unpack 'patch-cmake-include-dirs
25908 (lambda _
25909 ;; Patch buildsystem to respect Coin3D include directory
25910 (substitute* "CMakeLists.txt"
25911 (("\\$\\{SoQt_INCLUDE_DIRS}")
25912 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
25913 #t)))))
25914 (native-inputs
25915 `(("cmake" ,cmake)
25916 ("swig" ,swig)))
25917 (inputs
25918 `(("python-wrapper" ,python-wrapper)
25919 ("qtbase" ,qtbase-5)
25920 ("libxi" ,libxi)
25921 ("libice" ,libice)
25922 ("soqt" ,soqt)
25923 ("glew" ,glew)
25924 ("coin3D" ,coin3D-4)))
25925 (home-page "https://github.com/coin3d/pivy")
25926 (synopsis "Python bindings to Coin3D")
25927 (description
25928 "Pivy provides python bindings for Coin, a 3D graphics library with an
25929 Application Programming Interface based on the Open Inventor 2.1 API.")
25930 (license license:isc)))
25931
25932 (define-public python-crayons
25933 (package
25934 (name "python-crayons")
25935 (version "0.4.0")
25936 (source
25937 (origin
25938 (method url-fetch)
25939 (uri (pypi-uri "crayons" version))
25940 (sha256
25941 (base32
25942 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
25943 (build-system python-build-system)
25944 (propagated-inputs
25945 `(("python-colorama" ,python-colorama)))
25946 (home-page "https://github.com/MasterOdin/crayons")
25947 (synopsis "TextUI colors for Python")
25948 (description "This package gives you colored strings for the terminal.
25949 Crayons automatically wraps a given string in the foreground color and
25950 restores the original state after the string is printed.")
25951 (license license:expat)))
25952
25953 (define-public python-sane
25954 (package
25955 (name "python-sane")
25956 (version "2.9.1")
25957 (source
25958 (origin
25959 (method url-fetch)
25960 (uri (pypi-uri name version))
25961 (sha256
25962 (base32
25963 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
25964 (build-system python-build-system)
25965 (native-inputs
25966 `(("python-pytest" ,python-pytest)))
25967 (inputs
25968 `(("sane-backends" ,sane-backends)))
25969 (home-page "https://github.com/python-pillow/Sane")
25970 (synopsis "Python interface to the SANE scanner")
25971 (description "This package provides Python interface to the SANE scanner
25972 and frame grabber interface.")
25973 (license (license:non-copyleft
25974 ;; Yet another variant of the X/MIT license.
25975 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
25976
25977 (define-public python-screenkey
25978 (package
25979 (name "python-screenkey")
25980 (version "1.4")
25981 (source
25982 (origin
25983 (method git-fetch)
25984 (uri (git-reference
25985 (url "https://gitlab.com/screenkey/screenkey")
25986 (commit (string-append "v" version))))
25987 (file-name (git-file-name name version))
25988 (sha256
25989 (base32
25990 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
25991 (build-system python-build-system)
25992 (arguments
25993 `(#:phases
25994 (modify-phases %standard-phases
25995 (add-after 'unpack 'fix-dlopen-paths
25996 (lambda* (#:key inputs outputs #:allow-other-keys)
25997 (let* ((x11 (assoc-ref inputs "libx11"))
25998 (xtst (assoc-ref inputs "libxtst")))
25999 (substitute* "Screenkey/xlib.py"
26000 (("libX11.so.6")
26001 (string-append x11 "/lib/libX11.so.6")))
26002 (substitute* "Screenkey/xlib.py"
26003 (("libXtst.so.6")
26004 (string-append xtst "/lib/libXtst.so.6")))
26005 #t)))
26006 (add-after 'install 'wrap-screenkey
26007 (lambda* (#:key outputs #:allow-other-keys)
26008 (wrap-program
26009 (string-append (assoc-ref outputs "out") "/bin/screenkey")
26010 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
26011 `("GI_TYPELIB_PATH"
26012 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
26013 #t)))))
26014 (inputs
26015 `(("python-distutils-extra" ,python-distutils-extra)
26016 ("python-tokenize-rt" ,python-tokenize-rt)
26017 ("libx11" ,libx11)
26018 ("libxtst" ,libxtst)
26019 ("gtk+" ,gtk+)
26020 ("python-pygobject" ,python-pygobject)
26021 ("python-pycairo" ,python-pycairo)
26022 ("python-setuptools-git" ,python-setuptools-git)
26023 ("python-babel" ,python-babel)))
26024 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
26025 (synopsis
26026 "Screencast tool to display pressed keys")
26027 (description
26028 "A screencast tool to display your keys inspired by Screenflick.")
26029 (license license:gpl3+)))
26030
26031 (define-public python-jinja2-cli
26032 (package
26033 (name "python-jinja2-cli")
26034 (version "0.7.0")
26035 (source
26036 (origin
26037 (method url-fetch)
26038 (uri (pypi-uri "jinja2-cli" version))
26039 (sha256
26040 (base32
26041 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
26042 (build-system python-build-system)
26043 (propagated-inputs
26044 `(("python-jinja2" ,python-jinja2)))
26045 (native-inputs
26046 `(("python-flake8" ,python-flake8)
26047 ("python-jinja2" ,python-jinja2)
26048 ("python-pytest" ,python-pytest)))
26049 (home-page "https://github.com/mattrobenolt/jinja2-cli")
26050 (synopsis "Command-line interface to Jinja2")
26051 (description
26052 "This package provides a command-line interface (CLI) to the Jinja2
26053 template engine.")
26054 (license license:bsd-3)))
26055
26056 (define-public python-readability
26057 (package
26058 (name "python-readability")
26059 (version "0.3.1")
26060 (source
26061 (origin
26062 (method url-fetch)
26063 (uri (pypi-uri "readability" version))
26064 (sha256
26065 (base32
26066 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
26067 (build-system python-build-system)
26068 (home-page
26069 "https://github.com/andreasvc/readability/")
26070 (synopsis
26071 "Measure the readability of a given text using surface
26072 characteristics")
26073 (description
26074 "This package provides a Python library that is an implementation of
26075 traditional readability measures based on simple surface
26076 characteristics. These measures are basically linear regressions based on the
26077 number of words, syllables, and sentences.")
26078 (license license:asl2.0)))
26079
26080 (define-public python-listparser
26081 (package
26082 (name "python-listparser")
26083 (version "0.18")
26084 (source
26085 (origin
26086 (method url-fetch)
26087 (uri (pypi-uri "listparser" version))
26088 (sha256
26089 (base32
26090 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
26091 (build-system python-build-system)
26092 (home-page
26093 "https://github.com/kurtmckee/listparser")
26094 (synopsis
26095 "Parse subscription lists in Python")
26096 (description
26097 "This package provides a Python library that can parse OPML, FOAF, and
26098 iGoogle subscription lists.")
26099 (license license:expat)))
26100
26101 (define-public python-smartypants
26102 (package
26103 (name "python-smartypants")
26104 (version "2.0.1")
26105 (source
26106 (origin
26107 ;; There's no source tarball for 2.0.1 on PyPI.
26108 (method git-fetch)
26109 (uri (git-reference
26110 (url "https://github.com/leohemsted/smartypants.py")
26111 (commit (string-append "v" version))))
26112 (file-name (git-file-name name version))
26113 (sha256
26114 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
26115 (build-system python-build-system)
26116 (arguments
26117 '(#:phases
26118 (modify-phases %standard-phases
26119 (replace 'check
26120 ;; Its `setup.py test` doesn't report failure with exit status, so
26121 ;; we use `nose` instead.
26122 (lambda _
26123 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
26124 (native-inputs
26125 ;; For tests.
26126 `(("python-docutils" ,python-docutils)
26127 ("python-nose" ,python-nose)
26128 ("python-pygments" ,python-pygments)))
26129 (home-page "https://github.com/leohemsted/smartypants.py")
26130 (synopsis "Translate punctuation characters into smart quotes")
26131 (description
26132 "@command{smartpants} can perform the following transformations:
26133 @enumerate
26134 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
26135 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
26136 entities
26137 @item Dashes (-- and ---) into en- and em-dash entities
26138 @item Three consecutive dots (... or . . .) into an ellipsis entity
26139 @end enumerate")
26140 (license license:bsd-3)))
26141
26142 (define-public python-typogrify
26143 (package
26144 (name "python-typogrify")
26145 (version "2.0.7")
26146 (source (origin
26147 (method url-fetch)
26148 (uri (pypi-uri "typogrify" version))
26149 (sha256
26150 (base32
26151 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
26152 (build-system python-build-system)
26153 (arguments
26154 '(#:phases
26155 (modify-phases %standard-phases
26156 (replace 'check
26157 (lambda _
26158 (invoke "nosetests" "-v"))))))
26159 (propagated-inputs
26160 `(("python-smartypants" ,python-smartypants)))
26161 (native-inputs
26162 ;; For tests.
26163 `(("python-nose" ,python-nose)))
26164 (home-page "https://github.com/mintchaos/typogrify")
26165 (synopsis "Filters to transform text into typographically-improved HTML")
26166 (description
26167 "@code{typogrify} provides a set of custom filters that automatically
26168 apply various transformations to plain text in order to yield
26169 typographically-improved HTML. While often used in conjunction with Jinja and
26170 Django template systems, the filters can be used in any environment.")
26171 (license license:bsd-3)))
26172
26173 (define-public python-ld
26174 (package
26175 (name "python-ld")
26176 (version "0.5.0")
26177 (source
26178 (origin
26179 (method url-fetch)
26180 (uri (pypi-uri "ld" version))
26181 (sha256
26182 (base32
26183 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
26184 (build-system python-build-system)
26185 (propagated-inputs
26186 `(("python-six" ,python-six)))
26187 (home-page "https://github.com/nir0s/ld")
26188 (synopsis "OS platform information API")
26189 (description
26190 "The ld package provides information about the GNU/Linux distribution it
26191 runs on, such as a reliable machine-readable ID, or version information.")
26192 (license license:asl2.0)))
26193
26194 (define-public python-quicktions
26195 (package
26196 (name "python-quicktions")
26197 (version "1.11")
26198 (source
26199 (origin
26200 (method url-fetch)
26201 (uri (pypi-uri "quicktions" version))
26202 (sha256
26203 (base32
26204 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
26205 (modules '((guix build utils)))
26206 (snippet
26207 '(begin
26208 ;; This file is generated by Cython.
26209 (delete-file "src/quicktions.c") #t))))
26210 (build-system python-build-system)
26211 (arguments
26212 `(#:phases
26213 (modify-phases %standard-phases
26214 (add-before 'build 'cythonize-sources
26215 (lambda _
26216 (with-directory-excursion "src"
26217 (invoke "cython" "quicktions.pyx"))))
26218 (replace 'check
26219 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26220 (when tests?
26221 (add-installed-pythonpath inputs outputs)
26222 (invoke "pytest"))
26223 #t)))))
26224 (native-inputs
26225 `(("python-cython" ,python-cython)
26226 ("python-pytest" ,python-pytest)))
26227 (home-page "https://github.com/scoder/quicktions")
26228 (synopsis "Fast fractions data type for rational numbers")
26229 (description
26230 "This package provides fast fractions data type for rational numbers. It
26231 is the cythonized version of @code{fractions.Fraction}.")
26232 (license license:psfl)))
26233
26234 (define-public python-pathvalidate
26235 (package
26236 (name "python-pathvalidate")
26237 (version "2.4.1")
26238 (source
26239 (origin
26240 (method url-fetch)
26241 (uri (pypi-uri "pathvalidate" version))
26242 (sha256
26243 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
26244 (build-system python-build-system)
26245 (arguments
26246 '(#:tests? #f))
26247 ;; Tests disabled because of circular dependencies.
26248 ;; pathvalidate tests depend on pytest-md-report, which
26249 ;; depends on pathvalidate.
26250 (native-inputs
26251 `(("python-allpairspy" ,python-allpairspy)
26252 ("python-click" ,python-click)
26253 ("python-faker" ,python-faker)
26254 ("python-pytest" ,python-pytest)))
26255 (home-page "https://github.com/thombashi/pathvalidate")
26256 (synopsis "Sanitize strings representing paths")
26257 (description
26258 "@code{pathvalidate} is a Python library to sanitize/validate strings
26259 representing paths or filenames.")
26260 (license license:expat)))
26261
26262 (define-public python-escapism
26263 (package
26264 (name "python-escapism")
26265 (version "1.0.1")
26266 (source
26267 (origin
26268 (method url-fetch)
26269 (uri (pypi-uri "escapism" version))
26270 (sha256
26271 (base32
26272 "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
26273 (build-system python-build-system)
26274 (home-page "https://github.com/minrk/escapism")
26275 (synopsis "Simple, generic library for escaping strings")
26276 (description
26277 "This Python library provides a programming interface to, given a set of
26278 safe characters and an escape character, escape safe strings and unescape the
26279 result.")
26280 (license license:expat)))
26281
26282 (define-public python-recommonmark
26283 (package
26284 (name "python-recommonmark")
26285 (version "0.7.1")
26286 (source
26287 (origin
26288 (method url-fetch)
26289 (uri (pypi-uri "recommonmark" version))
26290 (sha256
26291 (base32
26292 "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
26293 (build-system python-build-system)
26294 (propagated-inputs
26295 `(("python-commonmark" ,python-commonmark)
26296 ("python-docutils" ,python-docutils)
26297 ("python-sphinx" ,python-sphinx)))
26298 (arguments
26299 '(#:phases (modify-phases %standard-phases
26300 (add-after 'unpack 'delete-test-sphinx
26301 (lambda* (#:key outputs #:allow-other-keys)
26302 (let* ((out (assoc-ref outputs "out")))
26303 (delete-file "tests/test_sphinx.py")))))))
26304 (home-page "https://github.com/readthedocs/recommonmark")
26305 (synopsis "Docutils-compatibility bridge to CommonMark")
26306 (description
26307 "This packages provides a docutils-compatibility bridge to CommonMark,
26308 enabling you to write CommonMark inside of Docutils & Sphinx projects.")
26309 (license license:expat)))
26310
26311 (define-public python-pyhull
26312 (package
26313 (name "python-pyhull")
26314 (version "2015.2.1")
26315 (source
26316 (origin
26317 (method url-fetch)
26318 (uri (pypi-uri "pyhull" version))
26319 (sha256
26320 (base32
26321 "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
26322 (build-system python-build-system)
26323 (propagated-inputs
26324 `(("python-numpy" ,python-numpy)))
26325 (home-page "https://github.com/materialsvirtuallab/pyhull")
26326 (synopsis "Python wrapper to Qhull")
26327 (description
26328 "This package provides a Python wrapper to @uref{http://www.qhull.org/,
26329 Qhull} for the computation of the convex hull, Delaunay triangulation, and
26330 Voronoi diagram.")
26331 (license license:expat)))
26332
26333 (define-public python-opcodes
26334 ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
26335 ;; version number, which is what we use here.
26336 (let ((commit "0f7c7d63f5e13ce5a89d9acc3934f1b6e247ec1f"))
26337 (package
26338 (name "python-opcodes")
26339 (version "0.3.14") ;from 'opcodes/__init__.py'
26340 (home-page "https://github.com/Maratyszcza/Opcodes")
26341 (source (origin
26342 (method git-fetch)
26343 (uri (git-reference (url home-page) (commit commit)))
26344 (file-name (git-file-name name version))
26345 (sha256
26346 (base32
26347 "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
26348 (build-system python-build-system)
26349 (synopsis "Database of processor instructions and opcodes")
26350 (description
26351 "This project documents instruction sets in a format convenient for
26352 tools development. An instruction set is represented by three files:
26353
26354 @itemize
26355 @item an XML file that describes instructions;
26356 @item an XSD file that describes the structure of the XML file;
26357 @item a Python module that reads the XML file and represents it as a set of
26358 Python objects;
26359 @end itemize
26360
26361 It currently provides descriptions for most user-mode x86, x86_64, and k1om
26362 instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
26363 and BMI2).")
26364 (license license:bsd-2))))
26365
26366 (define-public python-peachpy
26367 ;; There is no tag in this repo.
26368 (let ((commit "906d578266dc7188bf61e4cdbc9f8ea7d69edec0")
26369 (version "0.2.0") ;from 'peachpy/__init__.py'
26370 (revision "1"))
26371 (package
26372 (name "python-peachpy")
26373 (version (git-version version revision commit))
26374 (home-page "https://github.com/Maratyszcza/PeachPy")
26375 (source (origin
26376 (method git-fetch)
26377 (uri (git-reference (url home-page) (commit commit)))
26378 (file-name (git-file-name name version))
26379 (sha256
26380 (base32
26381 "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))))
26382 (build-system python-build-system)
26383 (arguments
26384 '(#:phases (modify-phases %standard-phases
26385 (replace 'check
26386 (lambda* (#:key tests? #:allow-other-keys)
26387 (when tests?
26388 (invoke "python" "setup.py" "nosetests")))))))
26389 (native-inputs
26390 `(("python-nose" ,python-nose)
26391 ("python-rednose" ,python-rednose)))
26392 (propagated-inputs
26393 `(("python-six" ,python-six)
26394 ("python-opcodes" ,python-opcodes)))
26395 (synopsis "Efficient assembly code generation in Python")
26396 (description
26397 "PeachPy is a Python framework for writing high-performance assembly kernels.
26398 PeachPy aims to simplify writing optimized assembly kernels while preserving
26399 all optimization opportunities of traditional assembly.
26400
26401 PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings
26402 for the Go language tool chain; it adapts to different calling conventions and
26403 application binary interfaces (ABIs); it takes care of register allocation; it
26404 supports x86_64 instructions up to AVX-512 and SHA.")
26405 (license license:bsd-2))))
26406
26407 (define-public python-sgmllib3k
26408 (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
26409 (revision "1"))
26410 (package
26411 (name "python-sgmllib3k")
26412 (version
26413 (git-version "1.0.0" revision commit))
26414 (source
26415 (origin
26416 (method git-fetch)
26417 (uri (git-reference
26418 (url "https://github.com/hsoft/sgmllib")
26419 (commit commit)))
26420 (file-name (git-file-name name version))
26421 (sha256
26422 (base32
26423 "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
26424 (build-system python-build-system)
26425 (home-page "https://github.com/hsoft/sgmllib")
26426 (synopsis "Python 3 port of sgmllib")
26427 (description "This package is a port of sgmllib that is no longer part
26428 of Python 3.")
26429 (license license:bsd-3))))
26430
26431 (define-public python-cwcwidth
26432 (package
26433 (name "python-cwcwidth")
26434 (version "0.1.4")
26435 (source
26436 (origin
26437 (method url-fetch)
26438 (uri (pypi-uri "cwcwidth" version))
26439 (sha256
26440 (base32
26441 "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
26442 (build-system python-build-system)
26443 (native-inputs
26444 `(("python-cython" ,python-cython)
26445 ("python-pytest" ,python-pytest)
26446 ("python-setuptools-scm" ,python-setuptools-scm)
26447 ("python-toml" ,python-toml)
26448 ("python-wheel" ,python-wheel)))
26449 (home-page
26450 "https://github.com/sebastinas/cwcwidth")
26451 (synopsis "Python bindings for wc(s)width")
26452 (description "This package provides bindings for wcwidth and wcswidth
26453 functions defined in POSIX.1-2001 and POSIX.1-2008.")
26454 (license license:expat)))
26455
26456 (define-public python-pyan3
26457 (package
26458 (name "python-pyan3")
26459 (version "1.2.0")
26460 (source
26461 (origin
26462 ;; Source tarball on PyPI lacks tests.
26463 (method git-fetch)
26464 (uri (git-reference
26465 (url "https://github.com/Technologicat/pyan")
26466 (commit (string-append "v" version))))
26467 (file-name (git-file-name name version))
26468 (sha256
26469 (base32
26470 "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
26471 (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
26472 "python-pyan3-fix-absolute-path-bug.patch"))))
26473 (build-system python-build-system)
26474 (arguments
26475 `(#:phases
26476 (modify-phases %standard-phases
26477 (replace 'check
26478 (lambda* (#:key tests? #:allow-other-keys)
26479 (when tests?
26480 ;; Extend PYTHONPATH so the built package will be found.
26481 (setenv "GUIX_PYTHONPATH"
26482 (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
26483 (invoke "pytest")))))))
26484 (native-inputs
26485 `(("python-pytest" ,python-pytest)
26486 ("python-pytest-cov" ,python-pytest-cov)
26487 ("python-wheel" ,python-wheel)))
26488 (propagated-inputs
26489 `(("python-jinja2" ,python-jinja2)))
26490 (home-page "https://github.com/Technologicat/pyan")
26491 (synopsis "Offline call graph generator for Python 3")
26492 (description "Pyan takes one or more Python source files, performs
26493 a (rather superficial) static analysis, and constructs a directed graph of the
26494 objects in the combined source, and how they define or use each other. The
26495 graph can be output for rendering by GraphViz or yEd.")
26496 (license license:gpl2)))
26497
26498 (define-public date2name
26499 (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
26500 (revision "1"))
26501 (package
26502 (name "date2name")
26503 (version (git-version "0.0" revision commit))
26504 (source
26505 (origin
26506 (method git-fetch)
26507 (uri (git-reference
26508 (url "https://github.com/novoid/date2name")
26509 (commit commit)))
26510 (file-name (git-file-name name version))
26511 (sha256
26512 (base32
26513 "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
26514 (build-system python-build-system)
26515 (arguments
26516 `(#:tests? #f ; no tests
26517 #:phases
26518 (modify-phases %standard-phases
26519 (delete 'build)
26520 (replace 'install
26521 (lambda* (#:key outputs #:allow-other-keys)
26522 (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
26523 (binary (string-append bindir "/date2name")))
26524 (mkdir-p bindir)
26525 (copy-file "date2name/__init__.py" binary)
26526 (chmod binary #o555)))))))
26527 (synopsis "Handling time-stamps and date-stamps in file names")
26528 (description "By default, date2name gets the modification time of matching
26529 files and directories and adds a datestamp in standard ISO 8601+ format
26530 YYYY-MM-DD at the beginning of the file or directory name.")
26531 (home-page "https://github.com/novoid/date2name")
26532 (license license:gpl3+))))