Merge branch 'master' into core-updates-frozen
[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 ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
112 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
113 ;;;
114 ;;; This file is part of GNU Guix.
115 ;;;
116 ;;; GNU Guix is free software; you can redistribute it and/or modify it
117 ;;; under the terms of the GNU General Public License as published by
118 ;;; the Free Software Foundation; either version 3 of the License, or (at
119 ;;; your option) any later version.
120 ;;;
121 ;;; GNU Guix is distributed in the hope that it will be useful, but
122 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
123 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124 ;;; GNU General Public License for more details.
125 ;;;
126 ;;; You should have received a copy of the GNU General Public License
127 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
128
129 (define-module (gnu packages python-xyz)
130 #:use-module ((guix licenses) #:prefix license:)
131 #:use-module (gnu packages)
132 #:use-module (gnu packages algebra)
133 #:use-module (gnu packages adns)
134 #:use-module (gnu packages aidc)
135 #:use-module (gnu packages attr)
136 #:use-module (gnu packages backup)
137 #:use-module (gnu packages bash)
138 #:use-module (gnu packages check)
139 #:use-module (gnu packages cmake)
140 #:use-module (gnu packages compression)
141 #:use-module (gnu packages crypto)
142 #:use-module (gnu packages databases)
143 #:use-module (gnu packages dbm)
144 #:use-module (gnu packages djvu)
145 #:use-module (gnu packages docker)
146 #:use-module (gnu packages enchant)
147 #:use-module (gnu packages file)
148 #:use-module (gnu packages fontutils)
149 #:use-module (gnu packages freedesktop)
150 #:use-module (gnu packages gcc)
151 #:use-module (gnu packages geo)
152 #:use-module (gnu packages ghostscript)
153 #:use-module (gnu packages gl)
154 #:use-module (gnu packages glib)
155 #:use-module (gnu packages gnome)
156 #:use-module (gnu packages gnupg)
157 #:use-module (gnu packages graphviz)
158 #:use-module (gnu packages graphics)
159 #:use-module (gnu packages gsasl)
160 #:use-module (gnu packages gstreamer)
161 #:use-module (gnu packages gtk)
162 #:use-module (gnu packages haskell-xyz)
163 #:use-module (gnu packages icu4c)
164 #:use-module (gnu packages image)
165 #:use-module (gnu packages imagemagick)
166 #:use-module (gnu packages jupyter)
167 #:use-module (gnu packages kerberos)
168 #:use-module (gnu packages libevent)
169 #:use-module (gnu packages libffi)
170 #:use-module (gnu packages libidn)
171 #:use-module (gnu packages linux)
172 #:use-module (gnu packages llvm)
173 #:use-module (gnu packages man)
174 #:use-module (gnu packages markup)
175 #:use-module (gnu packages maths)
176 #:use-module (gnu packages monitoring)
177 #:use-module (gnu packages multiprecision)
178 #:use-module (gnu packages networking)
179 #:use-module (gnu packages ncurses)
180 #:use-module (gnu packages openstack)
181 #:use-module (gnu packages pcre)
182 #:use-module (gnu packages pdf)
183 #:use-module (gnu packages perl)
184 #:use-module (gnu packages photo)
185 #:use-module (gnu packages pkg-config)
186 #:use-module (gnu packages python)
187 #:use-module (gnu packages python-build)
188 #:use-module (gnu packages python-check)
189 #:use-module (gnu packages python-compression)
190 #:use-module (gnu packages python-crypto)
191 #:use-module (gnu packages python-science)
192 #:use-module (gnu packages python-web)
193 #:use-module (gnu packages qt)
194 #:use-module (gnu packages rdf)
195 #:use-module (gnu packages readline)
196 #:use-module (gnu packages regex)
197 #:use-module (gnu packages sdl)
198 #:use-module (gnu packages scanner)
199 #:use-module (gnu packages search)
200 #:use-module (gnu packages serialization)
201 #:use-module (gnu packages shells)
202 #:use-module (gnu packages sphinx)
203 #:use-module (gnu packages ssh)
204 #:use-module (gnu packages swig)
205 #:use-module (gnu packages terminals)
206 #:use-module (gnu packages tex)
207 #:use-module (gnu packages texinfo)
208 #:use-module (gnu packages textutils)
209 #:use-module (gnu packages time)
210 #:use-module (gnu packages tls)
211 #:use-module (gnu packages version-control)
212 #:use-module (gnu packages video)
213 #:use-module (gnu packages web)
214 #:use-module (gnu packages wxwidgets)
215 #:use-module (gnu packages base)
216 #:use-module (gnu packages xml)
217 #:use-module (gnu packages xorg)
218 #:use-module (gnu packages xdisorg)
219 #:use-module (gnu packages tcl)
220 #:use-module (gnu packages bdw-gc)
221 #:use-module (gnu packages serialization)
222 #:use-module (guix packages)
223 #:use-module (guix download)
224 #:use-module (guix git-download)
225 #:use-module (guix hg-download)
226 #:use-module (guix gexp)
227 #:use-module (guix utils)
228 #:use-module (guix build-system gnu)
229 #:use-module (guix build-system cmake)
230 #:use-module (guix build-system python)
231 #:use-module (guix build-system trivial)
232 #:use-module (srfi srfi-1)
233 #:use-module (srfi srfi-26))
234
235 (define-public python-ueberzug
236 (package
237 (name "python-ueberzug")
238 (version "18.1.9")
239 (source
240 (origin
241 (method url-fetch)
242 (uri (pypi-uri "ueberzug" version))
243 (sha256
244 (base32
245 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
246 (build-system python-build-system)
247 (inputs
248 `(("libx11" ,libx11)
249 ("libxext" ,libxext)))
250 (propagated-inputs
251 `(("python-attrs" ,python-attrs)
252 ("python-docopt" ,python-docopt)
253 ("python-pillow" ,python-pillow)
254 ("python-xlib" ,python-xlib)))
255 (home-page "https://github.com/seebye/ueberzug")
256 (synopsis "Command line util to display images in combination with X11")
257 (description "Überzug is a command line util which allows to draw images on
258 terminals by using child windows. The advantages of using Überzug are:
259 @itemize
260 @item No race conditions as a new window is created to display images.
261 @item Expose events will be processed, so images will be redrawn on switch
262 workspaces.
263 @item Tmux support (excluding multi pane windows).
264 @item Terminals without the WINDOWID environment variable are supported.
265 @item Chars are used as position - and size unit.
266 @item No memory leak (/ unlimited cache).
267 @end itemize")
268 (license license:gpl3+)))
269
270 (define-public python-fire
271 (package
272 (name "python-fire")
273 (version "0.4.0")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (pypi-uri "fire" version))
278 (sha256
279 (base32
280 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
281 (build-system python-build-system)
282 (native-inputs
283 `(("python-pytest", python-pytest)))
284 (arguments
285 '(#:phases
286 (modify-phases %standard-phases
287 (replace 'check
288 (lambda* (#:key tests? #:allow-other-keys)
289 (when tests?
290 (invoke "pytest")))))))
291 (inputs
292 `(("python-six", python-six)
293 ("python-termcolor", python-termcolor)))
294 (synopsis "Library for automatically generating command line interfaces")
295 (description
296 "Fire is a library for automatically generating command line interfaces
297 from absolutely any Python object. The following are the advantages:
298 @itemize
299 @item A simple way to create a CLI in Python.
300 @item A helpful tool for developing and debugging Python code.
301 @item Helps with exploring existing code or turning other people's code into a
302 command line interface.
303 @item Makes transitioning between Bash and Python easier.
304 @item Makes using a Python REPL easier by setting up the REPL with the modules
305 and variables you'll need already imported and created.
306 @end itemize")
307 (home-page "https://github.com/google/python-fire")
308 (license license:asl2.0)))
309
310 (define-public python-twodict
311 (package
312 (name "python-twodict")
313 (version "1.2")
314 (source
315 (origin
316 (method url-fetch)
317 (uri (pypi-uri "twodict" version))
318 (sha256
319 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
320 (build-system python-build-system)
321 (home-page "https://github.com/MrS0m30n3/twodict")
322 (synopsis "Two way ordered dictionary for Python")
323 (description "TwoDict is a custom dictionary in which you can get the
324 key:value relationship but you can also get the value:key relationship. It also
325 remembers the order in which the items were inserted and supports almost all the
326 features of the Python's built-in dict.")
327 (license license:unlicense)))
328
329 (define-public python2-twodict
330 (package
331 (inherit python-twodict)
332 (name "python2-twodict")
333 (version "1.2")
334 (source
335 (origin
336 (method url-fetch)
337 (uri (pypi-uri "twodict" version))
338 (sha256
339 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
340 (build-system python-build-system)
341 (arguments
342 `(#:python ,python-2))))
343
344 (define-public python-argopt
345 (package
346 (name "python-argopt")
347 (version "0.7.0")
348 (source (origin
349 (method url-fetch)
350 (uri (pypi-uri "argopt" version))
351 (sha256
352 (base32
353 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
354 (build-system python-build-system)
355 (native-inputs
356 `(("python-coverage" ,python-coverage)
357 ("python-nose" ,python-nose)
358 ("python-setuptools" ,python-setuptools) ; Won't build without this.
359 ("python-setuptools-scm" ,python-setuptools-scm)))
360 (propagated-inputs
361 `(("python-toml" ,python-toml)
362 ("python-flake8" ,python-flake8)))
363 (home-page "https://github.com/casperdcl/argopt")
364 (synopsis "Generate a command-line interface from a docstring")
365 (description "This package provides tools to define a command line interface
366 from a docstring rather than the other way around.")
367 (license license:mpl2.0)))
368
369 (define-public python-cachetools
370 (package
371 (name "python-cachetools")
372 (version "4.2.2")
373 (source (origin
374 (method url-fetch)
375 (uri (pypi-uri "cachetools" version))
376 (sha256
377 (base32
378 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
379 (build-system python-build-system)
380 (home-page "https://github.com/tkem/cachetools/")
381 (synopsis "Extensible memoizing collections and decorators")
382 (description "This module provides various memoizing collections and
383 decorators, including variants of the Python standard library's
384 @code{lru_cache} function decorator.")
385 (license license:expat)))
386
387 (define-public python-colorful
388 (package
389 (name "python-colorful")
390 (version "0.5.4")
391 (source
392 (origin
393 (method url-fetch)
394 (uri
395 (pypi-uri "colorful" version))
396 (sha256
397 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
398 (build-system python-build-system)
399 ;; FIXME: tests cannot be computed:
400 ;; "Can't perform this operation for unregistered loader type"
401 (arguments
402 `(#:tests? #f))
403 (native-inputs
404 `(("python-coverage" ,python-coverage)
405 ("python-flake8" ,python-flake8)
406 ("python-pytest" ,python-pytest)))
407 (propagated-inputs
408 `(("python-colorama" ,python-colorama)))
409 (home-page "http://github.com/timofurrer/colorful")
410 (synopsis "Terminal string styling")
411 (description "Colorful provides an array of text styles, that can be used
412 as functions or string constants to form colored terminal output.")
413 (license license:expat)))
414
415 (define-public python-yaspin
416 (package
417 (name "python-yaspin")
418 (version "1.5.0")
419 (source
420 (origin
421 (method url-fetch)
422 (uri
423 (pypi-uri "yaspin" version))
424 (sha256
425 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
426 (build-system python-build-system)
427 (native-inputs
428 `(("python-pytest" ,python-pytest)))
429 (home-page "https://github.com/pavdmyt/yaspin")
430 (synopsis "Yet Another Terminal Spinner")
431 (description "Yaspin provides a terminal spinner to indicate the progress
432 during long operations.")
433 (license license:expat)))
434
435 (define-public python-lunr
436 (package
437 (name "python-lunr")
438 (version "0.6.0")
439 (source
440 (origin
441 (method url-fetch)
442 (uri
443 (pypi-uri "lunr" version))
444 (sha256
445 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
446 (build-system python-build-system)
447 (native-inputs
448 `(("python-mock" ,python-mock)
449 ("python-pytest" ,python-pytest)))
450 (propagated-inputs
451 `(("python-nltk" ,python-nltk-3.4)))
452 (home-page
453 "https://github.com/yeraydiazdiaz/lunr.py")
454 (synopsis "Full-text search library")
455 (description "This package provides python library for full-text search.
456 It indexes documents and provides a search interface for retrieving documents
457 that best match text queries.")
458 (license license:expat)))
459
460 (define-public python-mkdocs
461 (package
462 (name "python-mkdocs")
463 (version "1.1.2")
464 (source
465 (origin
466 (method url-fetch)
467 (uri
468 (pypi-uri "mkdocs" version))
469 (sha256
470 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
471 (build-system python-build-system)
472 (arguments
473 `(#:phases
474 (modify-phases %standard-phases
475 ;; Requirements refer to a specific version of dependencies,
476 ;; which are too old. So we patch to refer to any later version.
477 (add-after 'unpack 'patch-requirements
478 (lambda _
479 (substitute* "setup.py"
480 (("==") ">=")))))))
481 (propagated-inputs
482 `(("python-click" ,python-click)
483 ("python-jinja2" ,python-jinja2)
484 ("python-livereload" ,python-livereload)
485 ("python-lunr" ,python-lunr)
486 ("python-markdown" ,python-markdown)
487 ("python-pyyaml" ,python-pyyaml)
488 ("python-tornado" ,python-tornado)))
489 (home-page "https://www.mkdocs.org")
490 (synopsis "Project documentation with Markdown")
491 (description "MkDocs is a static site generator geared towards building
492 project documentation. Documentation source files are written in Markdown, and
493 configured with a single YAML configuration file.")
494 (license license:bsd-3)))
495
496 (define-public python-pymdown-extensions
497 (package
498 (name "python-pymdown-extensions")
499 (version "8.1.1")
500 (source
501 (origin
502 (method url-fetch)
503 (uri
504 (pypi-uri "pymdown-extensions" version))
505 (sha256
506 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
507 (build-system python-build-system)
508 ;; FIXME: "AssertionError: False is not true"
509 (arguments
510 `(#:tests? #f))
511 (propagated-inputs
512 `(("python-markdown" ,python-markdown)))
513 (home-page "https://github.com/facelessuser/pymdown-extensions")
514 (synopsis "Extension pack for Python Markdown")
515 (description "PyMdown Extensions is a collection of extensions for Python
516 Markdown. All extensions are found under the module namespace of pymdownx.")
517 (license license:expat)))
518
519 (define-public python-mkdocs-material
520 (package
521 (name "python-mkdocs-material")
522 (version "7.1.3")
523 (source
524 (origin
525 (method url-fetch)
526 (uri
527 (pypi-uri "mkdocs-material" version))
528 (sha256
529 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
530 (build-system python-build-system)
531 (arguments
532 `(#:phases
533 (modify-phases %standard-phases
534 ;; Requirement mkdocs-material-extensions
535 ;; in-turn requires mkdocs-material. This causes
536 ;; circular dependency, so we remove this requirement.
537 (add-after 'unpack 'patch-requirements
538 (lambda _
539 (substitute* "requirements.txt"
540 (("mkdocs-material-extensions.*$") "")))))))
541 (propagated-inputs
542 `(("python-markdown" ,python-markdown)
543 ("python-mkdocs" ,python-mkdocs)
544 ("python-pygments" ,python-pygments)
545 ("python-pymdown-extensions"
546 ,python-pymdown-extensions)))
547 (home-page "https://squidfunk.github.io/mkdocs-material/")
548 (synopsis "Material Design theme for MkDocs")
549 (description "This package provides a theme plugin for the static site
550 generator MkDocs.")
551 (license license:expat)))
552
553 (define-public python-slixmpp
554 (package
555 (name "python-slixmpp")
556 (version "1.5.2")
557 (source
558 (origin
559 (method git-fetch)
560 (uri
561 (git-reference
562 (url "https://lab.louiz.org/poezio/slixmpp.git")
563 (commit
564 (string-append "slix-" version))))
565 (file-name
566 (git-file-name name version))
567 (sha256
568 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
569 (build-system python-build-system)
570 (arguments
571 `(#:phases
572 (modify-phases %standard-phases
573 (add-after 'unpack 'patch
574 (lambda _
575 (substitute* "setup.py"
576 (("'CC', 'cc'")
577 "'CC', 'gcc'"))
578 #t)))))
579 (native-inputs
580 `(("cython" ,python-cython)
581 ("gnupg" ,gnupg)
582 ("pkg-config" ,pkg-config)))
583 (propagated-inputs
584 `(("python-aiodns" ,python-aiodns)
585 ("python-aiohttp" ,python-aiohttp)
586 ("python-pyasn1" ,python-pyasn1)
587 ("python-pyasn1-modules" ,python-pyasn1-modules)))
588 (inputs
589 `(("libidn" ,libidn)
590 ("python" ,python))) ; We are building a Python extension.
591 (synopsis "XMPP library without threads")
592 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
593 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
594 socket handling, the timers, the events dispatching) in order to remove all
595 threads.")
596 (home-page "https://lab.louiz.org/poezio/slixmpp")
597 (license license:expat)))
598
599 (define-public python-tenacity
600 (package
601 (name "python-tenacity")
602 (version "6.1.0")
603 (source (origin
604 (method url-fetch)
605 (uri (pypi-uri "tenacity" version))
606 (sha256
607 (base32
608 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
609 (build-system python-build-system)
610 (native-inputs
611 `(("python-setuptools-scm" ,python-setuptools-scm)
612 ("python-sphinx" ,python-sphinx)
613 ("python-tornado" ,python-tornado)
614 ("python-pytest" ,python-pytest)))
615 (propagated-inputs
616 `(("python-six" ,python-six)))
617 (arguments
618 `(#:phases (modify-phases %standard-phases
619 (replace 'check
620 (lambda _
621 (invoke "pytest")
622 #t)))))
623 (home-page "https://github.com/jd/tenacity")
624 (synopsis "Retrying library for python")
625 (description "Tenacity is a general-purpose python library to simplify the
626 task of adding retry behavior to just about anything.")
627 (license license:asl2.0)))
628
629 (define-public python-pytelegrambotapi
630 (package
631 (name "python-pytelegrambotapi")
632 (version "3.7.4")
633 (source
634 (origin
635 (method git-fetch)
636 (uri (git-reference
637 (url "https://github.com/eternnoir/pyTelegramBotAPI")
638 (commit version)))
639 (file-name (git-file-name name version))
640 (sha256
641 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
642 (build-system python-build-system)
643 (arguments
644 `(#:phases
645 (modify-phases %standard-phases
646 (replace 'check
647 (lambda* (#:key tests? #:allow-other-keys)
648 (when tests?
649 (with-directory-excursion "tests"
650 (invoke "py.test")))
651 #t)))))
652 (propagated-inputs
653 `(("python-requests" ,python-requests)))
654 (native-inputs
655 `(("python-pytest" ,python-pytest)))
656 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
657 (synopsis "Python Telegram bot api")
658 (description "This package provides a simple, but extensible Python
659 implementation for the Telegram Bot API.")
660 (license license:gpl2)))
661
662 (define-public python-colorlog
663 (package
664 (name "python-colorlog")
665 (version "4.1.0")
666 (source (origin
667 (method url-fetch)
668 (uri (pypi-uri "colorlog" version))
669 (sha256
670 (base32
671 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
672 (build-system python-build-system)
673 (native-inputs
674 `(("python-pytest" ,python-pytest)))
675 (arguments
676 `(#:phases (modify-phases %standard-phases
677 (replace 'check
678 (lambda _
679 (invoke "pytest" "-p" "no:logging"))))))
680 (home-page "https://github.com/borntyping/python-colorlog")
681 (synopsis "Log formatting with colors for python")
682 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
683 with Python's logging module that outputs records using terminal colors.")
684 (license license:expat)))
685
686 (define-public python-pyprind
687 (package
688 (name "python-pyprind")
689 (version "2.11.3")
690 (source (origin
691 (method url-fetch)
692 (uri (pypi-uri "PyPrind" version))
693 (sha256
694 (base32
695 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
696 (build-system python-build-system)
697 (propagated-inputs
698 `(("python-psutil" ,python-psutil)))
699 (home-page "https://github.com/rasbt/pyprind")
700 (synopsis "Python Progress Bar and Percent Indicator Utility")
701 (description "The PyPrind (Python Progress Indicator) module provides a
702 progress bar and a percentage indicator object that let you track the progress
703 of a loop structure or other iterative computation.")
704 (license license:bsd-3)))
705
706 (define-public python-gphoto2
707 (package
708 (name "python-gphoto2")
709 (version "2.2.1")
710 (source (origin
711 (method url-fetch)
712 (uri (pypi-uri "gphoto2" version))
713 (sha256
714 (base32
715 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
716 (build-system python-build-system)
717 (native-inputs
718 `(("pkg-config" ,pkg-config)))
719 (inputs
720 `(("libgphoto2" ,libgphoto2)))
721 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
722 (synopsis "Python interface to libgphoto2")
723 (description "@code{python-gphoto2} is a comprehensive Python interface
724 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
725 automatically generate the interface code.")
726 (license license:gpl3+)))
727
728 (define-public python-colour
729 (package
730 (name "python-colour")
731 (version "0.1.5")
732 (source (origin
733 (method url-fetch)
734 (uri (pypi-uri "colour" version))
735 (sha256
736 (base32
737 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
738 (build-system python-build-system)
739 (native-inputs
740 `(("python-d2to1" ,python-d2to1)))
741 (home-page "https://github.com/vaab/colour")
742 (synopsis "Convert and manipulate various color representations")
743 (description "Pythonic way to manipulate color representations (HSL, RVB,
744 web, X11, ...).")
745 (license license:expat)))
746
747 (define-public python-d2to1
748 (package
749 (name "python-d2to1")
750 (version "0.2.12.post1")
751 (source (origin
752 (method url-fetch)
753 (uri (pypi-uri "d2to1" version))
754 (sha256
755 (base32
756 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
757 (build-system python-build-system)
758 (native-inputs
759 `(("python-nose" ,python-nose)))
760 (home-page "https://github.com/embray/d2to1")
761 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
762 in python")
763 (description "The python package d2to1 (the d is for distutils) allows
764 using distutils2-like setup.cfg files for a package's metadata with a
765 distribute/setuptools setup.py script.")
766 (license license:bsd-2)))
767
768 (define-public python-rawkit
769 (package
770 (name "python-rawkit")
771 (version "0.6.0")
772 (source (origin
773 (method url-fetch)
774 (uri (pypi-uri "rawkit" version))
775 (sha256
776 (base32
777 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
778 (build-system python-build-system)
779 (native-inputs
780 `(("python-pytest" ,python-pytest)
781 ("python-mock" ,python-mock)))
782 (inputs
783 `(("libraw" ,libraw)))
784 (home-page "https://rawkit.readthedocs.io")
785 (synopsis "Ctypes-based LibRaw binding for Python")
786 (description "The rawkit package provides two modules: rawkit and libraw.
787 The rawkit module provides a high-level Pythonic interface for developing raw
788 photos, while the libraw module provides a CTypes based interface for
789 interacting with the low-level LibRaw C APIs.")
790 (license license:expat)))
791
792 (define-public python-easygui
793 (package
794 (name "python-easygui")
795 (version "0.98.1")
796 (source (origin
797 (method url-fetch)
798 (uri (pypi-uri "easygui" version))
799 (sha256
800 (base32
801 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
802 (build-system python-build-system)
803 (propagated-inputs
804 `(("python-tkinter" ,python "tk")))
805 (home-page "https://github.com/robertlugg/easygui")
806 (synopsis "GUI programming module for Python")
807 (description "EasyGUI is a module for very simple, very easy GUI
808 programming in Python. EasyGUI is different from other GUI generators in that
809 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
810 simple function calls.")
811 (license license:bsd-3)))
812
813 (define-public python-pymd4c
814 (package
815 (name "python-pymd4c")
816 (version "0.4.6.0b1")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (pypi-uri "pymd4c" version))
821 (sha256
822 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
823 (build-system python-build-system)
824 (inputs
825 `(("md4c" ,md4c)))
826 (native-inputs
827 `(("python-flake8" ,python-flake8)
828 ("python-pkgconfig" ,python-pkgconfig)
829 ("pkg-config" ,pkg-config)))
830 (home-page "https://github.com/dominickpastore/pymd4c")
831 (synopsis "Python bindings for MD4C")
832 (description
833 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
834 to CommonMark.")
835 (license license:expat)))
836
837 (define-public python-pymediainfo
838 (package
839 (name "python-pymediainfo")
840 (version "4.1")
841 (source
842 (origin
843 (method url-fetch)
844 (uri (pypi-uri "pymediainfo" version))
845 (sha256
846 (base32
847 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
848 (build-system python-build-system)
849 (native-inputs
850 `(("python-setuptools-scm" ,python-setuptools-scm)
851 ("python-pytest" ,python-pytest)))
852 (inputs
853 `(("libmediainfo" ,libmediainfo)))
854 (arguments
855 `(#:phases
856 (modify-phases %standard-phases
857 (add-after 'unpack 'patch-libmediainfo
858 (lambda _
859 (substitute* "pymediainfo/__init__.py"
860 (("libmediainfo.so.0")
861 (string-append (assoc-ref %build-inputs "libmediainfo")
862 "/lib/libmediainfo.so.0")))
863 #t))
864 (replace 'check
865 (lambda* (#:key tests? #:allow-other-keys)
866 (when tests?
867 ;; Extend PYTHONPATH so the built package will be found.
868 (setenv "PYTHONPATH"
869 (string-append (getcwd) "/build/lib:"
870 (getenv "PYTHONPATH")))
871 ;; Skip the only failing test "test_parse_url"
872 (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
873 (home-page
874 "https://github.com/sbraz/pymediainfo")
875 (synopsis
876 "Python wrapper for the mediainfo library")
877 (description
878 "Python wrapper for the mediainfo library to access the technical and tag
879 data for video and audio files.")
880 (license license:expat)))
881
882 (define-public python-psutil
883 (package
884 (name "python-psutil")
885 (version "5.8.0")
886 (source
887 (origin
888 (method url-fetch)
889 (uri (pypi-uri "psutil" version))
890 (sha256
891 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
892 (build-system python-build-system)
893 (arguments
894 ;; FIXME: some tests do not return and time out. Some tests fail because
895 ;; some processes survive kill().
896 '(#:tests? #f))
897 (home-page "https://github.com/giampaolo/psutil")
898 (synopsis "Library for retrieving information on running processes")
899 (description
900 "@code{psutil} (Python system and process utilities) is a library for
901 retrieving information on running processes and system utilization (CPU,
902 memory, disks, network) in Python. It is useful mainly for system monitoring,
903 profiling and limiting process resources and management of running processes.
904 It implements many functionalities offered by command line tools such as: ps,
905 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
906 iotop, uptime, pidof, tty, taskset, pmap.")
907 (properties `((python2-variant . ,(delay python2-psutil))))
908 (license license:bsd-3)))
909
910 (define-public python2-psutil
911 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
912 (package/inherit base
913 (propagated-inputs
914 `(("python2-enum34" ,python2-enum34) ;optional
915 ,@(package-propagated-inputs base))))))
916
917 (define-public python-shapely
918 (package
919 (name "python-shapely")
920 (version "1.7.1")
921 (source
922 (origin
923 (method url-fetch)
924 (uri (pypi-uri "Shapely" version))
925 (sha256
926 (base32
927 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
928 (modules '((guix build utils)))
929 (snippet
930 '(begin
931 (delete-file "shapely/speedups/_speedups.c")
932 (delete-file "shapely/vectorized/_vectorized.c")
933 #t))))
934 (build-system python-build-system)
935 (native-inputs
936 `(("python-cython" ,python-cython)
937 ("python-matplotlib" ,python-matplotlib)
938 ("python-pytest" ,python-pytest)
939 ("python-pytest-cov" ,python-pytest-cov)))
940 (inputs
941 `(("geos" ,geos)))
942 (propagated-inputs
943 `(("python-numpy" ,python-numpy)))
944 (arguments
945 `(#:phases
946 (modify-phases %standard-phases
947 (add-after 'unpack 'patch-geos-path
948 (lambda* (#:key inputs #:allow-other-keys)
949 (let ((geos (assoc-ref inputs "geos"))
950 (glibc (assoc-ref inputs ,(if (%current-target-system)
951 "cross-libc" "libc"))))
952 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
953 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
954 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
955 geos "/lib/libgeos_c.so'])"))
956 (("free = load_dll\\('c'\\)\\.free")
957 (string-append "free = load_dll('c', fallbacks=['"
958 glibc "/lib/libc.so.6']).free"))
959 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
960 (string-append "free = load_dll('c', fallbacks=['"
961 glibc "/lib/libc.so.6']).free"))))
962 #t)))))
963 (home-page "https://github.com/Toblerity/Shapely")
964 (synopsis "Library for the manipulation and analysis of geometric objects")
965 (description "Shapely is a Python package for manipulation and analysis of
966 planar geometric objects. It is based on the @code{GEOS} library.")
967 (license license:bsd-3)))
968
969 (define-public python-shortuuid
970 (package
971 (name "python-shortuuid")
972 (version "0.5.0")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "shortuuid" version))
977 (sha256
978 (base32
979 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
980 (build-system python-build-system)
981 (native-inputs
982 `(("python-pep8" ,python-pep8)))
983 (home-page "https://github.com/skorokithakis/shortuuid")
984 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
985 (description
986 "@code{shortuuid} is a Python library for generating concise, unambiguous
987 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
988 module and then similar looking characters are removed.")
989 (license license:bsd-3)))
990
991 (define-public python-logwrap
992 (package
993 (name "python-logwrap")
994 (version "8.2.0.post0")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "logwrap" version))
999 (sha256
1000 (base32
1001 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
1002 (build-system python-build-system)
1003 (arguments
1004 `(#:tests? #f ; Tests not included in pypi release.
1005 #:phases
1006 (modify-phases %standard-phases
1007 (replace 'check
1008 (lambda* (#:key tests? #:allow-other-keys)
1009 (when tests?
1010 (invoke "pytest"))
1011 #t)))))
1012 (native-inputs
1013 `(("python-cython" ,python-cython)
1014 ("python-pytest" ,python-pytest)
1015 ("python-setuptools-scm" ,python-setuptools-scm)
1016 ("python-toml" ,python-toml)
1017 ("python-wheel" ,python-wheel)))
1018 (home-page "https://github.com/python-useful-helpers/logwrap")
1019 (synopsis "Decorator for logging function arguments")
1020 (description "This package provides a decorator to log function arguments
1021 and function call return values in a human-readable way.")
1022 (license license:asl2.0)))
1023
1024 (define-public python-clyent
1025 (package
1026 (name "python-clyent")
1027 (version "1.2.1")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "clyent" version))
1032 (sha256
1033 (base32
1034 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1035 (build-system python-build-system)
1036 (native-inputs
1037 `(("python-mock" ,python-mock)))
1038 (home-page "https://github.com/Anaconda-Platform/clyent")
1039 (synopsis "Command line client library")
1040 (description "Clyent is a Python command line utility library. It is used
1041 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1042 (license license:bsd-3)))
1043
1044 (define-public python2-clyent
1045 (package-with-python2 python-clyent))
1046
1047 (define-public python-babel
1048 (package
1049 (name "python-babel")
1050 (version "2.9.0")
1051 (source
1052 (origin
1053 (method url-fetch)
1054 (uri (pypi-uri "Babel" version))
1055 (sha256
1056 (base32
1057 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1058 (build-system python-build-system)
1059 (native-inputs
1060 `(("python-freezegun" ,python-freezegun)
1061 ("python-pytest" ,python-pytest)
1062 ("tzdata" ,tzdata-for-tests)))
1063 (propagated-inputs
1064 `(("python-pytz" ,python-pytz)))
1065 (arguments
1066 `(#:phases (modify-phases %standard-phases
1067 (replace 'check
1068 (lambda _
1069 (invoke "pytest" "-vv"))))))
1070 (home-page "https://babel.pocoo.org/")
1071 (synopsis
1072 "Tools for internationalizing Python applications")
1073 (description
1074 "Babel is composed of two major parts:
1075 - tools to build and work with gettext message catalogs
1076 - a Python interface to the CLDR (Common Locale Data Repository), providing
1077 access to various locale display names, localized number and date formatting,
1078 etc. ")
1079 (license license:bsd-3)))
1080
1081 (define-public python2-babel
1082 (package-with-python2 python-babel))
1083
1084 (define-public python2-backport-ssl-match-hostname
1085 (package
1086 (name "python2-backport-ssl-match-hostname")
1087 (version "3.5.0.1")
1088 (source
1089 (origin
1090 (method url-fetch)
1091 (uri (pypi-uri "backports.ssl_match_hostname" version))
1092 (sha256
1093 (base32
1094 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1095 (build-system python-build-system)
1096 (arguments
1097 `(#:python ,python-2
1098 #:tests? #f)) ; no test target
1099 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
1100 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
1101 (description
1102 "This backport brings the ssl.match_hostname() function to users of
1103 earlier versions of Python. The function checks the hostname in the
1104 certificate returned by the server to which a connection has been established,
1105 and verifies that it matches the intended target hostname.")
1106 (license license:psfl)))
1107
1108 (define-public python-bidict
1109 (package
1110 (name "python-bidict")
1111 (version "0.21.2")
1112 (source
1113 (origin
1114 (method url-fetch)
1115 (uri (pypi-uri "bidict" version))
1116 (sha256
1117 (base32
1118 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1119 (build-system python-build-system)
1120 (native-inputs
1121 `(("python-coverage" ,python-coverage)
1122 ("python-hypothesis" ,python-hypothesis)
1123 ("python-pre-commit" ,python-pre-commit)
1124 ("python-py" ,python-py)
1125 ("python-pytest" ,python-pytest)
1126 ("python-pytest-benchmark" ,python-pytest-benchmark)
1127 ("python-pytest-cov" ,python-pytest-cov)
1128 ("python-setuptools-scm" ,python-setuptools-scm)
1129 ("python-sortedcollections" ,python-sortedcollections)
1130 ("python-sortedcontainers" ,python-sortedcontainers)
1131 ("python-sphinx" ,python-sphinx)
1132 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
1133 ("python-tox" ,python-tox)))
1134 (arguments
1135 `(#:phases (modify-phases %standard-phases
1136 (add-after 'unpack 'relax-reqs
1137 (lambda _
1138 (substitute* "setup.py"
1139 (("sortedcollections < 2") "sortedcollections"))
1140 #t))
1141 (replace 'check
1142 (lambda _ (invoke "./run_tests.py"))))))
1143 (home-page "https://bidict.readthedocs.io")
1144 (synopsis "Bidirectional mapping library")
1145 (description "The @code{bidict} library provides several data structures
1146 for working with bidirectional mappings in Python.")
1147 (license license:mpl2.0)))
1148
1149 (define-public python-bitarray
1150 (package
1151 (name "python-bitarray")
1152 (version "1.4.0")
1153 (source (origin
1154 (method url-fetch)
1155 (uri (pypi-uri "bitarray" version))
1156 (sha256
1157 (base32
1158 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1159 (build-system python-build-system)
1160 (home-page "https://github.com/ilanschnell/bitarray")
1161 (synopsis "Efficient arrays of booleans")
1162 (description "This package provides an object type which efficiently
1163 represents an array of booleans. Bitarrays are sequence types and behave very
1164 much like usual lists. Eight bits are represented by one byte in a contiguous
1165 block of memory. The user can select between two representations:
1166 little-endian and big-endian. All of the functionality is implemented in C.
1167 Methods for accessing the machine representation are provided. This can be
1168 useful when bit level access to binary files is required, such as portable
1169 bitmap image files. Also, when dealing with compressed data which uses
1170 variable bit length encoding, you may find this module useful.")
1171 (license license:psfl)))
1172
1173 (define-public python-boolean.py
1174 (package
1175 (name "python-boolean.py")
1176 (version "3.6")
1177 (source
1178 (origin
1179 ;; There's no source tarball on PyPI.
1180 (method git-fetch)
1181 (uri (git-reference
1182 (url "https://github.com/bastikr/boolean.py")
1183 (commit (string-append "v" version))))
1184 (file-name (git-file-name name version))
1185 (sha256
1186 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1187 (build-system python-build-system)
1188 (home-page "https://github.com/bastikr/boolean.py")
1189 (synopsis "Boolean algebra in one Python module")
1190 (description
1191 "This is a small Python library that implements boolean algebra.
1192 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1193 @code{Symbol} class that can take on one of these two values. Calculations
1194 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1195 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1196 Expressions are constructed from parsed strings or directly in Python.")
1197 (license license:bsd-2)))
1198
1199 (define-public python-hdf4
1200 (package
1201 (name "python-hdf4")
1202 (version "0.9")
1203 (source
1204 (origin
1205 (method url-fetch)
1206 (uri (pypi-uri name version))
1207 (sha256
1208 (base32
1209 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1210 (build-system python-build-system)
1211 (native-inputs `(("nose" ,python-nose)))
1212 (propagated-inputs `(("numpy" ,python-numpy)))
1213 (inputs
1214 `(("hdf4" ,hdf4)
1215 ("libjpeg" ,libjpeg-turbo)
1216 ("zlib" ,zlib)))
1217 (arguments
1218 `(#:phases
1219 (modify-phases %standard-phases
1220 (replace 'check
1221 (lambda _
1222 (invoke "./runexamples.sh")
1223 (invoke "nosetests" "-v"))))))
1224 (home-page "https://github.com/fhs/python-hdf4")
1225 (synopsis "Python interface to the NCSA HDF4 library")
1226 (description
1227 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1228 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1229 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1230 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1231 (license license:expat)))
1232
1233 (define-public python-h5py
1234 (package
1235 (name "python-h5py")
1236 (version "2.10.0")
1237 (source
1238 (origin
1239 (method url-fetch)
1240 (uri (pypi-uri "h5py" version))
1241 (sha256
1242 (base32
1243 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1244 (build-system python-build-system)
1245 (arguments
1246 `(#:tests? #f ; no test target
1247 #:phases
1248 (modify-phases %standard-phases
1249 (add-after 'unpack 'fix-hdf5-paths
1250 (lambda* (#:key inputs #:allow-other-keys)
1251 (let ((prefix (assoc-ref inputs "hdf5")))
1252 (substitute* "setup_build.py"
1253 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1254 (string-append "['" prefix "/lib" "']"))
1255 (("'/opt/local/include', '/usr/local/include'")
1256 (string-append "'" prefix "/include" "'")))
1257 (substitute* "setup_configure.py"
1258 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1259 (string-append "['" prefix "/lib" "']")))
1260 #t))))))
1261 (propagated-inputs
1262 `(("python-six" ,python-six)
1263 ("python-numpy" ,python-numpy)))
1264 (inputs
1265 `(("hdf5" ,hdf5-1.10)))
1266 (native-inputs
1267 `(("python-cython" ,python-cython)
1268 ("python-pkgconfig" ,python-pkgconfig)
1269 ("pkg-config" ,pkg-config)))
1270 (home-page "https://www.h5py.org/")
1271 (synopsis "Read and write HDF5 files from Python")
1272 (description
1273 "The h5py package provides both a high- and low-level interface to the
1274 HDF5 library from Python. The low-level interface is intended to be a
1275 complete wrapping of the HDF5 API, while the high-level component supports
1276 access to HDF5 files, datasets and groups using established Python and NumPy
1277 concepts.")
1278 (license license:bsd-3)))
1279
1280 (define-public python2-h5py
1281 (package-with-python2 python-h5py))
1282
1283 (define-public python-pyls-black
1284 (package
1285 (name "python-pyls-black")
1286 (version "0.4.6")
1287 (source
1288 (origin
1289 ;; There are no tests in the PyPI tarball.
1290 (method git-fetch)
1291 (uri (git-reference
1292 (url "https://github.com/rupert/pyls-black/")
1293 (commit (string-append "v" version))))
1294 (file-name (git-file-name name version))
1295 (sha256
1296 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1297 (build-system python-build-system)
1298 (arguments
1299 `(#:test-target "pytest"))
1300 (propagated-inputs
1301 `(("python-black" ,python-black)
1302 ("python-language-server"
1303 ,python-language-server)
1304 ("python-toml" ,python-toml)))
1305 (native-inputs
1306 `(("python-flake8" ,python-flake8)
1307 ("python-isort" ,python-isort)
1308 ("python-mypy" ,python-mypy)
1309 ("python-pytest" ,python-pytest)
1310 ("python-pytest-runner" ,python-pytest-runner)))
1311 (home-page "https://github.com/rupert/pyls-black")
1312 (synopsis "Black plugin for the Python Language Server")
1313 (description "Black plugin for the Python Language Server.")
1314 (license license:expat)))
1315
1316 (define-public python-sh
1317 (package
1318 (name "python-sh")
1319 (version "1.12.14")
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (pypi-uri "sh" version))
1324 (sha256
1325 (base32
1326 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1327 (build-system python-build-system)
1328 (arguments
1329 '(#:phases
1330 (modify-phases %standard-phases
1331 (replace 'check
1332 (lambda _
1333 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1334 (setenv "HOME" "/tmp")
1335 (invoke "python" "sh.py" "test"))))))
1336 (native-inputs
1337 `(("python-coverage" ,python-coverage)))
1338 (home-page "https://github.com/amoffat/sh")
1339 (synopsis "Python subprocess replacement")
1340 (description "This package provides a replacement for Python's
1341 @code{subprocess} feature.")
1342 (license license:expat)))
1343
1344 (define-public python-cftime
1345 (package
1346 (name "python-cftime")
1347 (version "1.0.4.2")
1348 (source
1349 (origin
1350 (method url-fetch)
1351 (uri (pypi-uri "cftime" version))
1352 (sha256
1353 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1354 (build-system python-build-system)
1355 (propagated-inputs
1356 `(("python-numpy" ,python-numpy)))
1357 (native-inputs
1358 `(("python-coveralls" ,python-coveralls)
1359 ("python-cython" ,python-cython)
1360 ("python-pytest-cov" ,python-pytest-cov)))
1361 (home-page "https://github.com/Unidata/cftime")
1362 (synopsis "Library for time handling")
1363 (description
1364 "This package provides time-handling functionality that used to be part
1365 of the netcdf4 package before.")
1366 ;; This package claims to include code under the GPLv3 but is released
1367 ;; under ISC.
1368 (license (list license:isc license:gpl3+))))
1369
1370 (define-public python-netcdf4
1371 (package
1372 (name "python-netcdf4")
1373 (version "1.5.3")
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (pypi-uri "netCDF4" version))
1378 (sha256
1379 (base32
1380 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1381 (build-system python-build-system)
1382 (arguments
1383 '(#:phases
1384 (modify-phases %standard-phases
1385 (add-after 'unpack 'configure-locations
1386 (lambda* (#:key inputs #:allow-other-keys)
1387 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1388 #t)))))
1389 (native-inputs
1390 `(("python-cython" ,python-cython)))
1391 (propagated-inputs
1392 `(("python-numpy" ,python-numpy)
1393 ("python-cftime" ,python-cftime)))
1394 (inputs
1395 `(("netcdf" ,netcdf)
1396 ("hdf4" ,hdf4)
1397 ("hdf5" ,hdf5)))
1398 (home-page "https://github.com/Unidata/netcdf4-python")
1399 (synopsis "Python/numpy interface to the netCDF library")
1400 (description "Netcdf4-python is a Python interface to the netCDF C
1401 library. netCDF version 4 has many features not found in earlier
1402 versions of the library and is implemented on top of HDF5. This module
1403 can read and write files in both the new netCDF 4 and the old netCDF 3
1404 format, and can create files that are readable by HDF5 clients. The
1405 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1406 to users of that module.")
1407 ;; The software is mainly ISC, but includes some files covered
1408 ;; by the Expat license.
1409 (license (list license:isc license:expat))))
1410
1411 (define-public python-ncclient
1412 (package
1413 (name "python-ncclient")
1414 (version "0.6.12")
1415 (source
1416 (origin
1417 (method git-fetch) ;no tests in PyPI release
1418 (uri (git-reference
1419 (url "https://github.com/ncclient/ncclient")
1420 (commit (string-append "v" version))))
1421 (file-name (git-file-name name version))
1422 (sha256
1423 (base32
1424 "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
1425 (build-system python-build-system)
1426 (arguments
1427 `(#:phases (modify-phases %standard-phases
1428 (replace 'check
1429 (lambda* (#:key tests? #:allow-other-keys)
1430 (when tests?
1431 (invoke "pytest")))))))
1432 (native-inputs
1433 `(("python-pytest" ,python-pytest)))
1434 (propagated-inputs
1435 `(("python-lxml" ,python-lxml)
1436 ("python-paramiko" ,python-paramiko)))
1437 (home-page "https://github.com/ncclient/ncclient")
1438 (synopsis "Python library for NETCONF clients")
1439 (description "@code{ncclient} is a Python library that facilitates
1440 client-side scripting and application development around the NETCONF
1441 protocol.")
1442 (license license:asl2.0)))
1443
1444 (define-public python-license-expression
1445 (package
1446 (name "python-license-expression")
1447 (version "1.2")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (pypi-uri "license-expression" version))
1452 (sha256
1453 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1454 (build-system python-build-system)
1455 (propagated-inputs
1456 `(("python-boolean.py" ,python-boolean.py)))
1457 (home-page "https://github.com/nexB/license-expression")
1458 (synopsis "Apply boolean logic to license expressions")
1459 (description
1460 "This Python module defines a tiny language to evaluate and compare
1461 license expressions using boolean logic. Logical combinations of licenses can
1462 be tested for equality, containment, and equivalence. They can be normalised
1463 and simplified. It supports SPDX license expressions as well as other naming
1464 conventions and aliases in the same expression.")
1465 (license license:gpl2+)))
1466
1467 (define-public python-lockfile
1468 (package
1469 (name "python-lockfile")
1470 (version "0.12.2")
1471 (source
1472 (origin
1473 (method url-fetch)
1474 (uri (pypi-uri "lockfile" version))
1475 (sha256
1476 (base32
1477 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1478 (build-system python-build-system)
1479 (arguments '(#:test-target "check"))
1480 (native-inputs
1481 `(("python-pbr" ,python-pbr)))
1482 (home-page "https://launchpad.net/pylockfile")
1483 (synopsis "Platform-independent file locking module")
1484 (description
1485 "The lockfile package exports a LockFile class which provides a simple
1486 API for locking files.")
1487 (license license:expat)))
1488
1489 (define-public python-fb-re2
1490 (package
1491 (name "python-fb-re2")
1492 (version "1.0.7")
1493 (source
1494 (origin
1495 (method git-fetch)
1496 (uri (git-reference
1497 (url "https://github.com/facebook/pyre2")
1498 (commit (string-append "v" version))))
1499 (file-name (git-file-name name version))
1500 (sha256
1501 (base32
1502 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1503 (build-system python-build-system)
1504 (inputs
1505 `(("re2" ,re2)))
1506 (home-page "https://github.com/facebook/pyre2")
1507 (synopsis "Python wrapper for RE2")
1508 (description "This package provides a Python extension that wraps Google's
1509 RE2 regular expression library. It implements many of the features of
1510 Python's built-in @code{re} module with compatible interfaces.")
1511 (license license:bsd-3)))
1512
1513 (define-public python-filelock
1514 (package
1515 (name "python-filelock")
1516 (version "3.0.12")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (pypi-uri "filelock" version))
1521 (sha256
1522 (base32
1523 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1524 (build-system python-build-system)
1525 (home-page
1526 "https://github.com/benediktschmitt/py-filelock")
1527 (synopsis "Platform independent file lock")
1528 (description "@code{filelock} contains a single module implementing
1529 a platform independent file lock in Python, which provides a simple way of
1530 inter-process communication.")
1531 (license license:unlicense)))
1532
1533 (define-public python-semantic-version
1534 (package
1535 (name "python-semantic-version")
1536 (version "2.8.5")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (pypi-uri "semantic_version" version))
1541 (sha256
1542 (base32
1543 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1544 (build-system python-build-system)
1545 (home-page "https://github.com/rbarrois/python-semanticversion")
1546 (synopsis "Semantic versioning module for Python")
1547 (description
1548 "The @code{semantic_version} class is a small library for handling
1549 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1550
1551 It can compare versions, generate a new version that represents a bump in one of
1552 the version levels, and check whether any given string is a proper semantic
1553 version identifier.")
1554 (license license:bsd-3)))
1555
1556 (define-public python2-semantic-version
1557 (package-with-python2 python-semantic-version))
1558
1559 (define-public python-serpent
1560 (package
1561 (name "python-serpent")
1562 (version "1.28")
1563 (source
1564 (origin
1565 (method url-fetch)
1566 (uri (pypi-uri "serpent" version))
1567 (sha256
1568 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1569 (build-system python-build-system)
1570 (native-inputs
1571 `(("python-attrs" ,python-attrs)
1572 ("python-pytz" ,python-pytz)))
1573 (home-page "https://github.com/irmen/Serpent")
1574 (synopsis "Serializer for literal Python expressions")
1575 (description
1576 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1577 serialization. It serializes an object tree into bytes (an utf-8 encoded
1578 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1579 to rebuild the original object tree.
1580
1581 Because only safe literals are encoded, it is safe to send serpent data to
1582 other machines, such as over the network.")
1583 (properties `((python2-variant . ,(delay python2-serpent))))
1584 (license license:expat)))
1585
1586 (define-public python2-serpent
1587 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1588 (package/inherit base
1589 (propagated-inputs
1590 `(("python-enum34" ,python2-enum34)
1591 ,@(package-propagated-inputs base))))))
1592
1593 (define-public python-setuptools
1594 (package
1595 (name "python-setuptools")
1596 (version "52.0.0")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (pypi-uri "setuptools" version))
1601 (sha256
1602 (base32
1603 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1604 (modules '((guix build utils)))
1605 (snippet
1606 '(begin
1607 ;; Remove included binaries which are used to build self-extracting
1608 ;; installers for Windows.
1609 ;; TODO: Find some way to build them ourself so we can include them.
1610 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1611 #t))))
1612 (build-system python-build-system)
1613 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1614 ;; One could bootstrap with an internal untested setuptools.
1615 (arguments
1616 `(#:tests? #f))
1617 (home-page "https://pypi.org/project/setuptools/")
1618 (synopsis
1619 "Library designed to facilitate packaging Python projects")
1620 (description
1621 "Setuptools is a fully-featured, stable library designed to facilitate
1622 packaging Python projects, where packaging includes:
1623 Python package and module definitions,
1624 distribution package metadata,
1625 test hooks,
1626 project installation,
1627 platform-specific details,
1628 Python 3 support.")
1629 ;; TODO: setuptools now bundles the following libraries:
1630 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1631 (license (list license:psfl ; setuptools itself
1632 license:expat ; six, appdirs, pyparsing
1633 license:asl2.0 ; packaging is dual ASL2/BSD-2
1634 license:bsd-2))
1635 (properties `((python2-variant . ,(delay python2-setuptools))))))
1636
1637 ;; Newer versions of setuptools no longer support Python 2.
1638 (define-public python2-setuptools
1639 (package
1640 (name "python2-setuptools")
1641 (version "41.0.1")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "setuptools" version ".zip"))
1646 (sha256
1647 (base32
1648 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1649 (modules '((guix build utils)))
1650 (snippet
1651 '(begin
1652 ;; Remove included binaries which are used to build self-extracting
1653 ;; installers for Windows.
1654 ;; TODO: Find some way to build them ourself so we can include them.
1655 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1656 #t))))
1657 (build-system python-build-system)
1658 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1659 ;; One could bootstrap with an internal untested setuptools.
1660 (arguments
1661 `(#:tests? #f))
1662 (native-inputs
1663 `(("unzip" ,unzip)))
1664 (home-page "https://pypi.org/project/setuptools/")
1665 (synopsis
1666 "Library designed to facilitate packaging Python projects")
1667 (description
1668 "Setuptools is a fully-featured, stable library designed to facilitate
1669 packaging Python projects, where packaging includes:
1670 Python package and module definitions,
1671 distribution package metadata,
1672 test hooks,
1673 project installation,
1674 platform-specific details,
1675 Python 3 support.")
1676 ;; TODO: setuptools now bundles the following libraries:
1677 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1678 (license (list license:psfl ; setuptools itself
1679 license:expat ; six, appdirs, pyparsing
1680 license:asl2.0 ; packaging is dual ASL2/BSD-2
1681 license:bsd-2))))
1682
1683 (define-public python-setuptools-declarative-requirements
1684 (package
1685 (name "python-setuptools-declarative-requirements")
1686 (version "1.2.0")
1687 (source
1688 (origin
1689 (method url-fetch)
1690 (uri (pypi-uri
1691 "setuptools-declarative-requirements"
1692 version))
1693 (sha256
1694 (base32
1695 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1696 (build-system python-build-system)
1697 (native-inputs
1698 `(("python-pytest" ,python-pytest)
1699 ("python-setuptools-scm" ,python-setuptools-scm)))
1700 (propagated-inputs
1701 `(("python-toml" ,python-toml)
1702 ("python-wheel" ,python-wheel)))
1703 (home-page
1704 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1705 (synopsis "File support for setuptools declarative setup.cfg")
1706 (description
1707 "This package provides file support for setuptools declarative
1708 @code{setup.cfg}.")
1709 (license license:asl2.0)))
1710
1711 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1712 (define-public python-setuptools-for-tensorflow
1713 (hidden-package
1714 (package
1715 (inherit python-setuptools)
1716 (version "39.1.0")
1717 (source (origin
1718 (inherit (package-source python-setuptools))
1719 (uri (pypi-uri "setuptools" version ".zip"))
1720 (sha256
1721 (base32
1722 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1723
1724 (define-public python-uniseg
1725 (package
1726 (name "python-uniseg")
1727 (version "0.7.1")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri (pypi-uri "uniseg" version ".zip"))
1732 (sha256
1733 (base32
1734 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1735 (build-system python-build-system)
1736 (arguments
1737 '(#:tests? #f)) ; The test suite requires network access.
1738 (native-inputs
1739 `(("unzip" ,unzip)))
1740 (home-page
1741 "https://bitbucket.org/emptypage/uniseg-python")
1742 (synopsis
1743 "Python library to determine Unicode text segmentations")
1744 (description
1745 "Uniseg is a Python package used to determine Unicode text segmentations.
1746 Supported segmentations include:
1747 @enumerate
1748 @item @dfn{Code point} (any value in the Unicode codespace)
1749 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1750 multiple Unicode code points, e.g. \"G\" + acute-accent)
1751 @item Word break
1752 @item Sentence break
1753 @item Line break
1754 @end enumerate")
1755 (license license:expat)))
1756
1757 (define-public python2-uniseg
1758 (package-with-python2 python-uniseg))
1759
1760 (define-public python-humanfriendly
1761 (package
1762 (name "python-humanfriendly")
1763 (version "8.2")
1764 (source
1765 (origin
1766 (method url-fetch)
1767 (uri (pypi-uri "humanfriendly" version))
1768 (sha256
1769 (base32
1770 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1771 (build-system python-build-system)
1772 (arguments
1773 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1774 #:tests? #f))
1775 (home-page "https://humanfriendly.readthedocs.io")
1776 (synopsis "Human-friendly input and output in Python")
1777 (description
1778 "The functions and classes in @code{humanfriendly} can be used to make
1779 text interfaces more user-friendly. It includes tools to parse and format
1780 numbers, file sizes, and timespans, timers for long-running operations, menus
1781 to allow the user to choose from a list of options, and terminal interaction
1782 helpers.")
1783 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1784 (license license:expat)))
1785
1786 (define-public python2-humanfriendly
1787 (let ((base (package-with-python2
1788 (strip-python2-variant python-humanfriendly))))
1789 (package/inherit base
1790 (propagated-inputs
1791 `(("python2-monotonic" ,python2-monotonic)
1792 ,@(package-propagated-inputs base))))))
1793
1794 (define-public python-textparser
1795 (package
1796 (name "python-textparser")
1797 (version "0.23.0")
1798 (source
1799 (origin
1800 (method url-fetch)
1801 (uri (pypi-uri "textparser" version))
1802 (sha256
1803 (base32
1804 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1805 (build-system python-build-system)
1806 (home-page "https://github.com/eerimoq/textparser")
1807 (synopsis "Fast text parser for Python")
1808 (description "This library provides a text parser written in the Python
1809 language. It aims to be fast.")
1810 (license license:expat)))
1811
1812 (define-public python-aenum
1813 (package
1814 (name "python-aenum")
1815 (version "2.2.4")
1816 (source
1817 (origin
1818 (method url-fetch)
1819 (uri (pypi-uri "aenum" version))
1820 (sha256
1821 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1822 (build-system python-build-system)
1823 (arguments
1824 `(#:phases (modify-phases %standard-phases
1825 (replace 'check
1826 (lambda _
1827 ;; We must run the test suite module directly, as it
1828 ;; fails to define the 'tempdir' variable in scope for
1829 ;; the tests otherwise
1830 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1831 ;; issues/32/running-tests-with-python-setuppy-test).
1832 (invoke "python3" "aenum/test.py")
1833 ;; This one fails with "NameError: name
1834 ;; 'test_pickle_dump_load' is not defined" (see:
1835 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1836 ;; /error-running-the-test_v3py-test-suite).
1837 ;; (invoke "python3" "aenum/test_v3.py")
1838 #t)))))
1839 (home-page "https://bitbucket.org/stoneleaf/aenum")
1840 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1841 (description "The aenum library includes an @code{Enum} base class, a
1842 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1843 class.")
1844 (license license:bsd-3)))
1845
1846 (define-public python-can
1847 (package
1848 (name "python-can")
1849 (version "3.3.3")
1850 (source
1851 (origin
1852 (method url-fetch)
1853 (uri (pypi-uri "python-can" version))
1854 (sha256
1855 (base32
1856 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1857 (build-system python-build-system)
1858 (arguments
1859 `(#:phases (modify-phases %standard-phases
1860 (add-after 'unpack 'relax-version-requirements
1861 (lambda _
1862 (substitute* "setup.py"
1863 (("mock~=2\\.0") "mock")
1864 (("coverage<5") "coverage")
1865 (("pytest~=4\\.3") "pytest")
1866 (("hypothesis~=4\\.56") "hypothesis"))
1867 #t))
1868 (add-after 'unpack 'fix-broken-tests
1869 ;; The tests try to run two scripts it expects should be
1870 ;; in PATH, but they aren't at this time (see:
1871 ;; https://github.com/hardbyte/python-can/issues/805).
1872 (lambda _
1873 (substitute* "test/test_scripts.py"
1874 (("\"can_logger\\.py --help\"") "")
1875 (("\"can_player\\.py --help\"") ""))
1876 #t)))))
1877 (propagated-inputs
1878 `(("python-aenum" ,python-aenum)
1879 ("python-wrapt" ,python-wrapt)))
1880 (native-inputs
1881 `(("python-codecov" ,python-codecov)
1882 ("python-coverage" ,python-coverage)
1883 ("python-future" ,python-future)
1884 ("python-hypothesis" ,python-hypothesis)
1885 ("python-mock" ,python-mock)
1886 ("python-pyserial" ,python-pyserial)
1887 ("python-pytest" ,python-pytest)
1888 ("python-pytest-cov" ,python-pytest-cov)
1889 ("python-pytest-runner" ,python-pytest-runner)
1890 ("python-pytest-timeout" ,python-pytest-timeout)))
1891 (home-page "https://github.com/hardbyte/python-can")
1892 (synopsis "Controller Area Network (CAN) interface module for Python")
1893 (description "This package defines the @code{can} module, which provides
1894 controller area network (CAN) support for Python developers; providing common
1895 abstractions to different hardware devices, and a suite of utilities for
1896 sending and receiving messages on a CAN bus.")
1897 (license license:lgpl3+)))
1898
1899 (define-public python-caniusepython3
1900 (package
1901 (name "python-caniusepython3")
1902 (version "7.2.0")
1903 (source
1904 (origin
1905 (method url-fetch)
1906 (uri (pypi-uri "caniusepython3" version))
1907 (sha256
1908 (base32
1909 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1910 (build-system python-build-system)
1911 (arguments
1912 `(#:phases (modify-phases %standard-phases
1913 (add-after 'unpack 'relax-requirements
1914 (lambda _
1915 (substitute* "setup.py"
1916 ;; These are for compatibility with Python 2.
1917 ((".*'argparse', 'backports.functools_lru_cache',.*")
1918 ""))
1919 (substitute* "dev_requirements.txt"
1920 ((".*pylint.*") "")) ;not actually required
1921 #t))
1922 (replace 'check
1923 (lambda _
1924 (invoke "py.test" "-k" "not NetworkTests"))))))
1925 (propagated-inputs
1926 `(("python-distlib" ,python-distlib)
1927 ("python-packaging" ,python-packaging)
1928 ("python-requests" ,python-requests)))
1929 (native-inputs
1930 `(("python-mock" ,python-mock)
1931 ("python-pytest" ,python-pytest)))
1932 (home-page "https://github.com/brettcannon/caniusepython3")
1933 (synopsis "Check for Python 3-incompatible Python libraries")
1934 (description "The @command{caniusepython3} command scans your project and
1935 reports the Python 3-incompatible libraries it found. It can also be used as
1936 a library.")
1937 (license license:asl2.0)))
1938
1939 (define-public python-diskcache
1940 (package
1941 (name "python-diskcache")
1942 (version "4.1.0")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (pypi-uri "diskcache" version))
1947 (sha256
1948 (base32
1949 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1950 (build-system python-build-system)
1951 (arguments
1952 `(#:tests? #f)) ;test suite not included in the release
1953 (home-page "http://www.grantjenks.com/docs/diskcache/")
1954 (synopsis "Disk and file backed cache library")
1955 (description "DiskCache is a disk and file backed persistent cache.")
1956 (license license:asl2.0)))
1957
1958 (define-public python-bitstruct
1959 (package
1960 (name "python-bitstruct")
1961 (version "8.9.0")
1962 (source
1963 (origin
1964 (method url-fetch)
1965 (uri (pypi-uri "bitstruct" version))
1966 (sha256
1967 (base32
1968 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1969 (build-system python-build-system)
1970 (home-page "https://github.com/eerimoq/bitstruct")
1971 (synopsis "Python values to and C bit field structs converter")
1972 (description "This module performs conversions between Python values and C
1973 bit field structs represented as Python byte strings. It is intended to have
1974 a similar interface as the @code{struct} module from Python, but working on
1975 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1976 (license license:expat)))
1977
1978 (define-public python-cantools
1979 (package
1980 (name "python-cantools")
1981 (version "33.1.1")
1982 (source
1983 (origin
1984 ;; We take the sources from the Git repository as the documentation is
1985 ;; not included with the PyPI archive.
1986 (method git-fetch)
1987 (uri (git-reference
1988 (url "https://github.com/eerimoq/cantools")
1989 (commit version)))
1990 (file-name (git-file-name name version))
1991 (sha256
1992 (base32
1993 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1994 (build-system python-build-system)
1995 (arguments
1996 `(#:phases
1997 (modify-phases %standard-phases
1998 (add-after 'build 'build-doc
1999 (lambda _
2000 ;; See: https://github.com/eerimoq/cantools/issues/190.
2001 (substitute* "README.rst"
2002 (("https://github.com/eerimoq/cantools/raw/master\
2003 /docs/monitor.png")
2004 "monitor.png"))
2005 (with-directory-excursion "docs"
2006 (invoke "make" "man" "info"))))
2007 (add-after 'install 'install-doc
2008 (lambda* (#:key outputs #:allow-other-keys)
2009 (let* ((out (assoc-ref outputs "out"))
2010 (info (string-append out "/share/info"))
2011 (man1 (string-append out "/share/man/man1")))
2012 (format #t "CWD: ~s~%" (getcwd))
2013 (install-file "docs/_build/texinfo/cantools.info" info)
2014 (install-file "docs/_build/man/cantools.1" man1)
2015 #t))))))
2016 (native-inputs
2017 `(("sphinx" ,python-sphinx)
2018 ("texinfo" ,texinfo)))
2019 (propagated-inputs
2020 `(("python-bitstruct" ,python-bitstruct)
2021 ("python-can" ,python-can)
2022 ("python-diskcache" ,python-diskcache)
2023 ("python-textparser" ,python-textparser)))
2024 (home-page "https://github.com/eerimoq/cantools")
2025 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
2026 (description "This package includes Controller Area Network (CAN) related
2027 tools that can be used to:
2028 @itemize
2029 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
2030 @item encode and decode CAN messages
2031 @item multiplex simple and extended signals
2032 @item diagnose DID encoding and decoding
2033 @item dump the CAN decoder output
2034 @item test CAN nodes
2035 @item generate C source code
2036 @item monitor the CAN bus
2037 @end itemize")
2038 (license license:expat)))
2039
2040 (define-public python-capturer
2041 (package
2042 (name "python-capturer")
2043 (version "2.4")
2044 (source
2045 (origin
2046 (method url-fetch)
2047 (uri (pypi-uri "capturer" version))
2048 (sha256
2049 (base32
2050 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2051 (build-system python-build-system)
2052 (arguments
2053 `(#:tests? #f))
2054 (propagated-inputs
2055 `(("python-humanfriendly" ,python-humanfriendly)))
2056 (home-page "https://capturer.readthedocs.io")
2057 (synopsis "Capture stdout and stderr streams of the current process")
2058 (description
2059 "The capturer package makes it easy to capture the stdout and stderr
2060 streams of the current process and subprocesses. Output can be relayed
2061 to the terminal in real time but is also available to the Python program
2062 for additional processing.")
2063 (license license:expat)))
2064
2065 (define-public python2-capturer
2066 (package-with-python2 python-capturer))
2067
2068 (define-public python-case
2069 (package
2070 (name "python-case")
2071 (version "1.5.3")
2072 (source
2073 (origin
2074 (method url-fetch)
2075 (uri (pypi-uri "case" version))
2076 (sha256
2077 (base32
2078 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2079 (build-system python-build-system)
2080 (propagated-inputs
2081 `(("python-mock" ,python-mock)
2082 ("python-nose" ,python-nose)
2083 ("python-six" ,python-six)
2084 ("python-unittest2" ,python-unittest2)))
2085 (native-inputs
2086 `(("python-coverage" ,python-coverage)))
2087 (home-page "https://github.com/celery/case")
2088 (synopsis "Unittest utilities and convenience methods")
2089 (description
2090 "The @code{case} package provides utilities on top of unittest, including
2091 some helpful Python 2 compatibility convenience methods.")
2092 (license license:bsd-3)))
2093
2094 (define-public python-verboselogs
2095 (package
2096 (name "python-verboselogs")
2097 (version "1.7")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "verboselogs" version))
2102 (sha256
2103 (base32
2104 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2105 (build-system python-build-system)
2106 (arguments
2107 `(#:phases
2108 (modify-phases %standard-phases
2109 (replace 'check
2110 (lambda _
2111 ;; Do not run pylint plugin test, as astroid is an old
2112 ;; unsupported version.
2113 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2114 "verboselogs/tests.py"))))))
2115 (native-inputs
2116 `(("python-mock" ,python-mock)
2117 ("python-pytest" ,python-pytest)))
2118 (home-page "https://verboselogs.readthedocs.io")
2119 (synopsis "Verbose logging level for Python's logging module")
2120 (description
2121 "The @code{verboselogs} package extends Python's @code{logging} module to
2122 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2123 (license license:expat)))
2124
2125 (define-public python2-verboselogs
2126 (package-with-python2 python-verboselogs))
2127
2128 (define-public python-coloredlogs
2129 (package
2130 (name "python-coloredlogs")
2131 (version "10.0")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "coloredlogs" version))
2136 (sha256
2137 (base32
2138 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2139 (build-system python-build-system)
2140 (arguments
2141 `(;Tests require some updated modules
2142 #:tests? #f))
2143 (propagated-inputs
2144 `(("python-capturer" ,python-capturer)))
2145 (home-page "https://coloredlogs.readthedocs.io")
2146 (synopsis "Colored stream handler for Python's logging module")
2147 (description
2148 "The @code{coloredlogs} package enables colored terminal output for
2149 Python's logging module. The @code{ColoredFormatter} class inherits from
2150 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2151 messages in color.")
2152 (license license:expat)))
2153
2154 (define-public python2-coloredlogs
2155 (package-with-python2 python-coloredlogs))
2156
2157 (define-public python-editorconfig
2158 (package
2159 (name "python-editorconfig")
2160 (version "0.12.2")
2161 (source
2162 (origin
2163 (method url-fetch)
2164 (uri (pypi-uri "EditorConfig" version))
2165 (sha256
2166 (base32
2167 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2168 (build-system python-build-system)
2169 (home-page "https://editorconfig.org/")
2170 (synopsis "EditorConfig bindings for python")
2171 (description "The EditorConfig project consists of a file format for
2172 defining coding styles and a collection of text editor plugins that enable
2173 editors to read the file format and adhere to defined styles. EditorConfig
2174 files are easily readable and they work nicely with version control systems.")
2175 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2176 (license (list license:bsd-2 license:psfl))))
2177
2178 (define-public dosage
2179 (package
2180 (name "dosage")
2181 (version "2.17")
2182 (source
2183 (origin
2184 (method url-fetch)
2185 (uri (pypi-uri "dosage" version))
2186 (sha256
2187 (base32
2188 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2189 (build-system python-build-system)
2190 (propagated-inputs
2191 `(("python2-backports-functools-lru-cache"
2192 ,python2-backports-functools-lru-cache)
2193 ("python2-backports-shutil-get-terminal-size"
2194 ,python2-backports-shutil-get-terminal-size)
2195 ("python-cached-property" ,python-cached-property)
2196 ("python-colorama" ,python-colorama)
2197 ("python-imagesize" ,python-imagesize)
2198 ("python-importlib-metadata" ,python-importlib-metadata)
2199 ("python-lxml" ,python-lxml)
2200 ("python-requests" ,python-requests)
2201 ("python-six" ,python-six)))
2202 (native-inputs
2203 `(("python-pytest-cov" ,python-pytest-cov)
2204 ("python-pytest-xdist" ,python-pytest-xdist)
2205 ("python-responses" ,python-responses)
2206 ("python-setuptools-scm" ,python-setuptools-scm)))
2207 (home-page "https://github.com/webcomics/dosage")
2208 (synopsis "Comic strip downloader and archiver")
2209 (description "Dosage is designed to keep a local copy of specific webcomics and other
2210 picture-based content such as Picture of the Day sites. With the @command{dosage}
2211 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2212 downloaded, or download a strip for a particular date or index, if possible.")
2213 (license license:expat)))
2214
2215 (define-public python-et-xmlfile
2216 (package
2217 (name "python-et-xmlfile")
2218 (version "1.0.1")
2219 (source
2220 (origin
2221 (method url-fetch)
2222 (uri (pypi-uri "et_xmlfile" version))
2223 (sha256
2224 (base32
2225 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2226 (build-system python-build-system)
2227 (arguments
2228 `(#:phases (modify-phases %standard-phases
2229 (replace 'check
2230 (lambda _
2231 (invoke "pytest"))))))
2232 (native-inputs
2233 `(("python-pytest" ,python-pytest)
2234 ("python-lxml" ,python-lxml))) ;used for the tests
2235 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2236 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2237 (description "This Python library is based upon the @code{xmlfile} module
2238 from @code{lxml}. It aims to provide a low memory, compatible implementation
2239 of @code{xmlfile}.")
2240 (license license:expat)))
2241
2242 (define-public python2-et-xmlfile
2243 (package-with-python2 python-et-xmlfile))
2244
2245 (define-public python-openpyxl
2246 (package
2247 (name "python-openpyxl")
2248 (version "3.0.5")
2249 (source
2250 (origin
2251 ;; We use the upstream repository, as the tests are not included in the
2252 ;; PyPI releases.
2253 (method hg-fetch)
2254 (uri (hg-reference
2255 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2256 (changeset version)))
2257 (file-name (string-append name "-" version "-checkout"))
2258 (sha256
2259 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2260 (build-system python-build-system)
2261 (arguments
2262 `(#:phases (modify-phases %standard-phases
2263 (replace 'check
2264 (lambda _
2265 (invoke "pytest"))))))
2266 (native-inputs
2267 ;; For the test suite.
2268 `(("python-lxml" ,python-lxml)
2269 ("python-pillow" ,python-pillow)
2270 ("python-pytest" ,python-pytest)))
2271 (propagated-inputs
2272 `(("python-et-xmlfile" ,python-et-xmlfile)
2273 ("python-jdcal" ,python-jdcal)))
2274 (home-page "https://openpyxl.readthedocs.io")
2275 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2276 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2277 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2278 standard.")
2279 (properties `((python2-variant . ,(delay python2-openpyxl))))
2280 (license license:expat)))
2281
2282 (define-public python2-openpyxl
2283 (let ((base (package-with-python2
2284 (strip-python2-variant python-openpyxl))))
2285 (package
2286 (inherit base)
2287 ;; This is the latest version that has python2 support
2288 (version "2.6.4")
2289 (source
2290 (origin
2291 (method url-fetch)
2292 (uri (pypi-uri "openpyxl" version))
2293 (sha256
2294 (base32
2295 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2296 (arguments '(#:tests? #f))))) ; No test suite.
2297
2298 (define-public python-eventlet
2299 (package
2300 (name "python-eventlet")
2301 (version "0.25.1")
2302 (source
2303 (origin
2304 (method url-fetch)
2305 (uri (pypi-uri "eventlet" version))
2306 (sha256
2307 (base32
2308 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2309 (build-system python-build-system)
2310 (propagated-inputs
2311 `(("python-dnspython" ,python-dnspython)
2312 ("python-greenlet" ,python-greenlet)
2313 ("python-monotonic" ,python-monotonic)))
2314 (arguments
2315 ;; TODO: Requires unpackaged 'enum-compat'.
2316 '(#:tests? #f))
2317 (home-page "https://eventlet.net")
2318 (synopsis "Concurrent networking library for Python")
2319 (description
2320 "Eventlet is a concurrent networking library for Python that
2321 allows you to change how you run your code, not how you write it.
2322 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2323 Coroutines ensure that the developer uses a blocking style of programming
2324 that is similar to threading, but provide the benefits of non-blocking I/O.
2325 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2326 from the Python interpreter, or as a small part of a larger application.")
2327 (license license:expat)))
2328
2329 (define-public python-sinfo
2330 (package
2331 (name "python-sinfo")
2332 (version "0.3.4")
2333 (source (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "sinfo" version))
2336 (sha256
2337 (base32
2338 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2339 (build-system python-build-system)
2340 (propagated-inputs
2341 `(("python-stdlib-list" ,python-stdlib-list)))
2342 (home-page "https://gitlab.com/joelostblom/session_info")
2343 (synopsis "Output module version information loaded in a Python session")
2344 (description "This package outputs version information for modules loaded
2345 in the current session, Python, and the OS.")
2346 (license license:bsd-3)))
2347
2348 (define-public python-six
2349 (package
2350 (name "python-six")
2351 (version "1.15.0")
2352 (source
2353 (origin
2354 (method url-fetch)
2355 (uri (pypi-uri "six" version))
2356 (sha256
2357 (base32
2358 "0n82108wxn5giff50hd9ykjhd3zl7cndabdasi6568yvbh1rqqrh"))))
2359 (build-system python-build-system)
2360 (arguments
2361 `(#:phases
2362 (modify-phases %standard-phases
2363 (replace 'check
2364 (lambda _
2365 (invoke "py.test" "-v"))))))
2366 (native-inputs
2367 `(("python-pytest" ,python-pytest-bootstrap)))
2368 (home-page "https://pypi.org/project/six/")
2369 (synopsis "Python 2 and 3 compatibility utilities")
2370 (description
2371 "Six is a Python 2 and 3 compatibility library. It provides utility
2372 functions for smoothing over the differences between the Python versions with
2373 the goal of writing Python code that is compatible on both Python versions.
2374 Six supports every Python version since 2.5. It is contained in only one
2375 Python file, so it can be easily copied into your project.")
2376 (license license:x11)))
2377
2378 (define-public python2-six
2379 (package-with-python2 python-six))
2380
2381 (define-public python-six-bootstrap
2382 (package
2383 (inherit python-six)
2384 (name "python-six-bootstrap")
2385 (native-inputs `())
2386 (arguments `(#:tests? #f))))
2387
2388 (define-public python2-six-bootstrap
2389 (package-with-python2 python-six-bootstrap))
2390
2391 (define-public python-schedule
2392 (package
2393 (name "python-schedule")
2394 (version "0.4.3")
2395 (source
2396 (origin
2397 (method url-fetch)
2398 (uri (pypi-uri "schedule" version))
2399 (sha256
2400 (base32
2401 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2402 (build-system python-build-system)
2403 (native-inputs
2404 `(("python-pytest" ,python-pytest)
2405 ("python-mock" ,python-mock)))
2406 (home-page "https://github.com/dbader/schedule")
2407 (synopsis "Schedule periodic function calls in Python")
2408 (description
2409 "Schedule is an in-process scheduler for periodic jobs that uses the
2410 builder pattern for configuration. Schedule lets you run Python functions (or
2411 any other callable) periodically at pre-determined intervals using a simple,
2412 human-friendly syntax.")
2413 (license license:expat)))
2414
2415 (define-public python2-schedule
2416 (package-with-python2 python-schedule))
2417
2418 (define-public python-scour
2419 (package
2420 (name "python-scour")
2421 (version "0.38.2")
2422 (source
2423 (origin
2424 (method git-fetch)
2425 (uri
2426 (git-reference
2427 (url "https://github.com/scour-project/scour")
2428 (commit
2429 (string-append "v" version))))
2430 (file-name (git-file-name name version))
2431 (sha256
2432 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2433 (propagated-inputs
2434 `(("python-six" ,python-six)))
2435 (build-system python-build-system)
2436 (home-page "https://github.com/scour-project/scour")
2437 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2438 (description "The goal of Scour is to output a file that renders
2439 identically at a fraction of the size by removing a lot of redundant
2440 information created by most SVG editors. Optimization options are typically
2441 lossless but can be tweaked for more aggressive cleaning.")
2442 (license license:asl2.0)))
2443
2444 (define-public python-mechanize
2445 (package
2446 (name "python-mechanize")
2447 (version "0.4.5")
2448 (source
2449 (origin
2450 (method url-fetch)
2451 (uri (pypi-uri "mechanize" version))
2452 (sha256
2453 (base32
2454 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2455 (build-system python-build-system)
2456 (propagated-inputs
2457 `(("python-html5lib" ,python-html5lib)))
2458 (home-page "https://github.com/python-mechanize/mechanize")
2459 (synopsis
2460 "Stateful programmatic web browsing in Python")
2461 (description
2462 "Mechanize implements stateful programmatic web browsing in Python,
2463 after Andy Lester’s Perl module WWW::Mechanize.")
2464 (license license:bsd-3)))
2465
2466 (define-public python2-mechanize
2467 (package-with-python2 python-mechanize))
2468
2469 (define-public python-simpleaudio
2470 (package
2471 (name "python-simpleaudio")
2472 (version "1.0.4")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "simpleaudio" version))
2477 (sha256
2478 (base32
2479 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2480 (build-system python-build-system)
2481 (arguments
2482 `(#:tests? #f))
2483 (inputs
2484 `(("alsa-lib" ,alsa-lib)))
2485 (home-page
2486 "https://github.com/hamiltron/py-simple-audio")
2487 (synopsis "Simple, asynchronous audio playback for Python 3")
2488 (description
2489 "The @code{simplaudio} package provides cross-platform, dependency-free
2490 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2491 (license license:expat))) ; MIT license
2492
2493 (define-public python-simplejson
2494 (package
2495 (name "python-simplejson")
2496 (version "3.17.2")
2497 (source
2498 (origin
2499 (method url-fetch)
2500 (uri (pypi-uri "simplejson" version))
2501 (sha256
2502 (base32
2503 "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
2504 (build-system python-build-system)
2505 (native-inputs
2506 `(("python-toml" ,python-toml)))
2507 (home-page "https://simplejson.readthedocs.io/en/latest")
2508 (synopsis
2509 "Json library for Python")
2510 (description
2511 "JSON (JavaScript Object Notation) is a subset of JavaScript
2512 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2513 format.
2514
2515 Simplejson exposes an API familiar to users of the standard library marshal
2516 and pickle modules. It is the externally maintained version of the json
2517 library contained in Python 2.6, but maintains compatibility with Python 2.5
2518 and (currently) has significant performance advantages, even without using
2519 the optional C extension for speedups. Simplejson is also supported on
2520 Python 3.3+.")
2521 (license license:x11)))
2522
2523 (define-public python2-simplejson
2524 (package-with-python2 python-simplejson))
2525
2526
2527 (define-public python-pyicu
2528 (package
2529 (name "python-pyicu")
2530 (version "2.7.4")
2531 (source
2532 (origin
2533 (method url-fetch)
2534 (uri (pypi-uri "PyICU" version))
2535 (sha256
2536 (base32
2537 "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
2538 (build-system python-build-system)
2539 (inputs
2540 `(("icu4c" ,icu4c)))
2541 (native-inputs
2542 `(("python-pytest" ,python-pytest)
2543 ("python-six" ,python-six)))
2544 (home-page "https://github.com/ovalhub/pyicu")
2545 (synopsis "Python extension wrapping the ICU C++ API")
2546 (description
2547 "PyICU is a python extension wrapping the ICU C++ API.")
2548 (license license:x11)))
2549
2550 (define-public python2-pyicu
2551 (package-with-python2 python-pyicu))
2552
2553 (define-public python-dogtail
2554 (package
2555 (name "python-dogtail")
2556 (version "0.9.11")
2557 (source (origin
2558 (method url-fetch)
2559 (uri
2560 (string-append
2561 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2562 "dogtail-" version ".tar.gz"))
2563 (sha256
2564 (base32
2565 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2566 (build-system python-build-system)
2567 (arguments
2568 `(#:tests? #f ; TODO Launching dbus for the tests
2569 ; fails
2570 #:phases
2571 (modify-phases %standard-phases
2572 (replace 'check
2573 (lambda* (#:key tests? #:allow-other-keys)
2574 (when tests?
2575 (system "Xvfb :1 &")
2576 (setenv "DISPLAY" ":1")
2577 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2578 #t)))))
2579 (propagated-inputs
2580 `(("python-pygobject" ,python-pygobject)
2581 ("python-pycairo" ,python-pycairo)
2582 ("python-pyatspi" ,python-pyatspi)))
2583 (native-inputs
2584 `(("python-nose" ,python-nose)
2585 ("gtk+" ,gtk+)
2586 ("xvfb" ,xorg-server)
2587 ("dbus" ,dbus)
2588 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2589 ("gobject-introspection" ,gobject-introspection)))
2590 (home-page "https://gitlab.com/dogtail/dogtail/")
2591 (synopsis "GUI test tool and automation framework written in Python")
2592 (description
2593 "Dogtail is a GUI test tool and automation framework written in Python.
2594 It uses Accessibility (a11y) technologies to communicate with desktop
2595 applications. dogtail scripts are written in Python and executed like any
2596 other Python program.")
2597 (license license:gpl2+)))
2598
2599 (define-public python2-dogtail
2600 (package-with-python2 python-dogtail))
2601
2602 (define-public python-empy
2603 (package
2604 (name "python-empy")
2605 (version "3.3.3")
2606 (source (origin
2607 (method url-fetch)
2608 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2609 version ".tar.gz"))
2610 (sha256
2611 (base32
2612 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2613 (build-system python-build-system)
2614 (arguments
2615 `(#:tests? #f)) ; python2 only
2616 (home-page "http://www.alcyone.com/software/empy/")
2617 (synopsis "Templating system for Python")
2618 (description
2619 "EmPy is a system for embedding Python expressions and statements in
2620 template text; it takes an EmPy source file, processes it, and produces
2621 output. This is accomplished via expansions, which are special signals to the
2622 EmPy system and are set off by a special prefix (by default the at sign, @@).
2623 EmPy can expand arbitrary Python expressions and statements in this way, as
2624 well as a variety of special forms. Textual data not explicitly delimited in
2625 this way is sent unaffected to the output, allowing Python to be used in
2626 effect as a markup language. Also supported are callbacks via hooks,
2627 recording and playback via diversions, and dynamic, chainable filters. The
2628 system is highly configurable via command line options and embedded
2629 commands.")
2630 (license license:lgpl2.1+)))
2631
2632 (define-public python2-empy
2633 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2634 (package/inherit base
2635 (arguments `(,@(package-arguments base)
2636 #:tests? #t)))))
2637
2638 (define-public python2-element-tree
2639 (package
2640 (name "python2-element-tree")
2641 (version "1.2.6")
2642 (source (origin
2643 (method url-fetch)
2644 (uri (string-append
2645 "http://effbot.org/media/downloads/elementtree-"
2646 version "-20050316.tar.gz"))
2647 (sha256
2648 (base32
2649 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2650 (build-system python-build-system)
2651 (arguments
2652 `(#:python ,python-2 ; seems to be part of Python 3
2653 #:tests? #f)) ; no 'test' sub-command
2654 (synopsis "Toolkit for XML processing in Python")
2655 (description
2656 "ElementTree is a Python library supporting lightweight XML processing.")
2657 (home-page "https://effbot.org/zone/element-index.htm")
2658 (license (license:x11-style
2659 "http://docs.python.org/2/license.html"
2660 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2661
2662 (define-public python2-pybugz
2663 (package
2664 (name "python2-pybugz")
2665 (version "0.6.11")
2666 (source (origin
2667 (method url-fetch)
2668 (uri (string-append
2669 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2670 version ".tar.gz"))
2671 (sha256
2672 (base32
2673 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2674 (patches (search-patches "pybugz-stty.patch"
2675 "pybugz-encode-error.patch"))))
2676 (build-system python-build-system)
2677 (arguments
2678 `(#:python ,python-2 ; SyntaxError with Python 3
2679 #:tests? #f)) ; no 'test' sub-command
2680 (propagated-inputs
2681 `(("element-tree" ,python2-element-tree)))
2682 (synopsis "Python and command-line interface to Bugzilla")
2683 (description
2684 "PyBugz is a Python library and command-line tool to query the Bugzilla
2685 bug tracking system. It is meant as an aid to speed up interaction with the
2686 bug tracker.")
2687 (home-page "http://www.liquidx.net/pybugz/")
2688 (license license:gpl2)))
2689
2690 (define-public python2-enum
2691 (package
2692 (name "python2-enum")
2693 (version "0.4.6")
2694 (source (origin
2695 (method url-fetch)
2696 (uri (pypi-uri "enum" version))
2697 (sha256
2698 (base32
2699 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2700 (build-system python-build-system)
2701 (arguments
2702 `(#:python ,python-2))
2703 (home-page "https://pypi.org/project/enum/")
2704 (synopsis "Robust enumerated type support in Python")
2705 (description
2706 "This provides a module for robust enumerations in Python. It has
2707 been superseded by the Python standard library and is provided only for
2708 compatibility.")
2709 ;; Choice of either license.
2710 (license (list license:gpl3+ license:psfl))))
2711
2712 (define-public python-enum34
2713 (package
2714 (name "python-enum34")
2715 (version "1.1.6")
2716 (source
2717 (origin
2718 (method url-fetch)
2719 (uri (pypi-uri "enum34" version))
2720 (sha256
2721 (base32
2722 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2723 (build-system python-build-system)
2724 (home-page "https://pypi.org/project/enum34/")
2725 (synopsis "Backported Python 3.4 Enum")
2726 (description
2727 "Enum34 is the new Python stdlib enum module available in Python 3.4
2728 backported for previous versions of Python from 2.4 to 3.3.")
2729 (license license:bsd-3)))
2730
2731 (define-public python2-enum34
2732 (package-with-python2 python-enum34))
2733
2734 (define-public python-parse-type
2735 (package
2736 (name "python-parse-type")
2737 (version "0.4.2")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "parse_type" version))
2742 (sha256
2743 (base32
2744 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2745 (build-system python-build-system)
2746 (propagated-inputs
2747 `(("python-six" ,python-six)
2748 ("python-parse" ,python-parse)))
2749 (native-inputs
2750 `(("python-pytest" ,python-pytest)
2751 ("python-pytest-runner" ,python-pytest-runner)))
2752 (home-page "https://github.com/jenisys/parse_type")
2753 (synopsis "Extended parse module")
2754 (description
2755 "Parse_type extends the python parse module.")
2756 (properties
2757 `((python2-variant . ,(delay python2-parse-type))))
2758 (license license:bsd-3)))
2759
2760 (define-public python2-parse-type
2761 (let ((base (package-with-python2
2762 (strip-python2-variant python-parse-type))))
2763 (package/inherit base
2764 (propagated-inputs
2765 `(("python2-enum34" ,python2-enum34)
2766 ,@(package-propagated-inputs base))))))
2767
2768 (define-public python-parse
2769 (package
2770 (name "python-parse")
2771 (version "1.18.0")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (pypi-uri "parse" version))
2776 (sha256
2777 (base32
2778 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2779 (build-system python-build-system)
2780 (arguments
2781 `(#:phases
2782 (modify-phases %standard-phases
2783 (replace 'check
2784 (lambda _ (invoke "python" "test_parse.py"))))))
2785 (home-page "https://github.com/r1chardj0n3s/parse")
2786 (synopsis "Parse strings")
2787 (description
2788 "Parse strings using a specification based on the Python @code{format()}
2789 syntax.")
2790 (license license:x11)))
2791
2792 (define-public python-polib
2793 (package
2794 (name "python-polib")
2795 (version "1.1.0")
2796 (source (origin
2797 (method url-fetch)
2798 (uri (pypi-uri "polib" version))
2799 (sha256
2800 (base32
2801 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2802 (build-system python-build-system)
2803 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2804 (synopsis "Manipulate, create and modify gettext files")
2805 (description "Polib can manipulate any gettext format (po, pot and mo)
2806 files. It can be used to create po files from scratch or to modify
2807 existing ones.")
2808 (license license:expat)))
2809
2810 (define-public python2-polib
2811 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2812 (package/inherit base
2813 (arguments `(,@(package-arguments base)
2814 ;; Tests don't work with python2.
2815 #:tests? #f)))))
2816
2817 (define-public python-poyo
2818 (package
2819 (name "python-poyo")
2820 (version "0.5.0")
2821 (source
2822 (origin
2823 (method url-fetch)
2824 (uri (pypi-uri "poyo" version))
2825 (sha256
2826 (base32
2827 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2828 (build-system python-build-system)
2829 (home-page "https://github.com/hackebrot/poyo")
2830 (synopsis "Lightweight YAML Parser for Python")
2831 (description
2832 "This package provides a lightweight YAML Parser for Python. It supports
2833 only a chosen subset of the YAML format that is required to parse cookiecutter
2834 user configuration files. It does not have support for serializing into YAML
2835 and is not compatible with JSON.")
2836 (license license:expat)))
2837
2838 (define-public scons
2839 (package
2840 (name "scons")
2841 (version "3.0.4")
2842 (source (origin
2843 (method git-fetch)
2844 (uri (git-reference
2845 (url "https://github.com/SCons/scons")
2846 (commit version)))
2847 (file-name (git-file-name name version))
2848 (sha256
2849 (base32
2850 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2851 (build-system python-build-system)
2852 (arguments
2853 `(#:use-setuptools? #f ; still relies on distutils
2854 #:tests? #f ; no 'python setup.py test' command
2855 #:phases
2856 (modify-phases %standard-phases
2857 (add-before 'build 'bootstrap
2858 (lambda _
2859 (substitute* "src/engine/SCons/compat/__init__.py"
2860 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2861 "sys.modules[new] = __import__(old)"))
2862 (substitute* "src/engine/SCons/Platform/__init__.py"
2863 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2864 "mod = __import__(full_name)"))
2865 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2866 (chdir "build/scons")
2867 #t)))))
2868 (home-page "https://scons.org/")
2869 (synopsis "Software construction tool written in Python")
2870 (description
2871 "SCons is a software construction tool. Think of SCons as an improved,
2872 cross-platform substitute for the classic Make utility with integrated
2873 functionality similar to autoconf/automake and compiler caches such as ccache.
2874 In short, SCons is an easier, more reliable and faster way to build
2875 software.")
2876 (license license:x11)))
2877
2878 (define-public scons-python2
2879 (package
2880 (inherit (package-with-python2 scons))
2881 (name "scons-python2")))
2882
2883 (define-public python-extension-helpers
2884 (package
2885 (name "python-extension-helpers")
2886 (version "0.1")
2887 (source
2888 (origin
2889 (method url-fetch)
2890 (uri (pypi-uri "extension-helpers" version))
2891 (sha256
2892 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2893 (build-system python-build-system)
2894 (native-inputs
2895 `(("coverage" ,python-coverage)
2896 ("pytest" ,python-pytest-astropy)
2897 ("pytest-cov" ,python-pytest-cov)
2898 ("setuptools-scm" ,python-setuptools-scm)))
2899 (home-page "https://github.com/astropy/astropy-helpers")
2900 (synopsis
2901 "Utilities for building and installing packages in the Astropy ecosystem")
2902 (description
2903 "The extension-helpers package includes many build, installation, and
2904 documentation-related tools used by the Astropy project.")
2905 (license license:bsd-3)))
2906
2907 (define-public python-extras
2908 (package
2909 (name "python-extras")
2910 (version "1.0.0")
2911 (source
2912 (origin
2913 (method url-fetch)
2914 (uri (pypi-uri "extras" version))
2915 (sha256
2916 (base32
2917 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2918 (build-system python-build-system)
2919 (arguments
2920 ;; FIXME: Circular dependency on testtools.
2921 '(#:tests? #f))
2922 (home-page "https://github.com/testing-cabal/extras")
2923 (synopsis "Useful extensions to the Python standard library")
2924 (description
2925 "Extras is a set of extensions to the Python standard library.")
2926 (license license:expat)))
2927
2928 (define-public python2-extras
2929 (package-with-python2 python-extras))
2930
2931 (define-public python-mimeparse
2932 (package
2933 (name "python-mimeparse")
2934 (version "1.6.0")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (pypi-uri "python-mimeparse" version))
2939 (sha256
2940 (base32
2941 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2942 (build-system python-build-system)
2943 (arguments
2944 '(#:phases
2945 (modify-phases %standard-phases
2946 (replace 'check
2947 (lambda _
2948 (invoke "./mimeparse_test.py"))))))
2949 (home-page
2950 "https://github.com/dbtsai/python-mimeparse")
2951 (synopsis "Python library for parsing MIME types")
2952 (description
2953 "Mimeparse provides basic functions for parsing MIME type names and
2954 matching them against a list of media-ranges.")
2955 (license license:expat)))
2956
2957 (define-public python2-mimeparse
2958 (package-with-python2 python-mimeparse))
2959
2960 (define-public python-miniboa
2961 (package
2962 (name "python-miniboa")
2963 (version "1.0.8")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (pypi-uri "miniboa" version))
2968 (sha256
2969 (base32
2970 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
2971 (build-system python-build-system)
2972 (home-page "https://github.com/shmup/miniboa")
2973 (synopsis "Simple, single-threaded Telnet server")
2974 (description
2975 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2976 server.")
2977 (license license:asl2.0)))
2978
2979 (define-public python2-miniboa
2980 (package-with-python2 python-miniboa))
2981
2982 (define-public python-pafy
2983 (package
2984 (name "python-pafy")
2985 (version "0.5.3.1")
2986 (source
2987 (origin
2988 (method url-fetch)
2989 (uri (pypi-uri "pafy" version))
2990 (sha256
2991 (base32
2992 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2993 (build-system python-build-system)
2994 (arguments
2995 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2996 (propagated-inputs
2997 ;; Youtube-dl is a python package which is imported in the file
2998 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2999 `(("youtube-dl" ,youtube-dl)))
3000 (home-page "https://np1.github.io/pafy/")
3001 (synopsis "Retrieve YouTube content and metadata")
3002 (description
3003 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
3004 (license license:lgpl3+)))
3005
3006 (define-public python2-funcsigs
3007 (package
3008 (name "python2-funcsigs")
3009 (version "1.0.2")
3010 (source (origin
3011 (method url-fetch)
3012 (uri (pypi-uri "funcsigs" version))
3013 (sha256
3014 (base32
3015 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
3016 (build-system python-build-system)
3017 (arguments
3018 `(#:python ,python-2))
3019 (native-inputs
3020 `(("python2-unittest2" ,python2-unittest2)))
3021 (home-page "http://funcsigs.readthedocs.org")
3022 (synopsis "Python function signatures from PEP362")
3023 (description
3024 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
3025 (license license:asl2.0)))
3026
3027 (define-public python2-funcsigs-bootstrap
3028 (package
3029 (inherit python2-funcsigs)
3030 (name "python2-funcsigs-bootstrap")
3031 (native-inputs `())
3032 (arguments
3033 `(#:tests? #f
3034 ,@(package-arguments python2-funcsigs)))))
3035
3036 (define-public python-py
3037 (package
3038 (name "python-py")
3039 (version "1.10.0")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "py" version))
3044 (sha256
3045 (base32
3046 "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
3047 (build-system python-build-system)
3048 (arguments
3049 ;; FIXME: "ImportError: 'test' module incorrectly imported from
3050 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
3051 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
3052 ;; Is this module globally installed?"
3053 '(#:tests? #f))
3054 (native-inputs
3055 `(("python-setuptools-scm" ,python-setuptools-scm)))
3056 (home-page "https://github.com/pytest-dev/py")
3057 (synopsis "Python library for parsing, I/O, instrospection, and logging")
3058 (description
3059 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3060 code introspection, and logging.")
3061 (license license:expat)))
3062
3063 (define-public python2-py
3064 (package-with-python2 python-py))
3065
3066 ;; Recent versions of python-fixtures and python-testrepository need
3067 ;; python-pbr for packaging, which itself needs these two packages for
3068 ;; testing.
3069 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3070 ;; same source, just without any test dependencies and with tests disabled.
3071 ;; python-pbr-minmal is then used to package python-fixtures and
3072 ;; python-testrepository.
3073 ;; Strictly speaking we currently could remove the test-requirements from the
3074 ;; normal python-pbr package (and save this package) since test are disabled
3075 ;; there anyway. But this may change in future.
3076 (define-public python-pbr-minimal
3077 (package
3078 (name "python-pbr-minimal")
3079 (version "3.0.1")
3080 (source
3081 (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "pbr" version))
3084 (sha256
3085 (base32
3086 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
3087 (build-system python-build-system)
3088 (arguments
3089 `(#:tests? #f))
3090 (home-page "https://docs.openstack.org/pbr/latest/")
3091 (synopsis "Minimal build of python-pbr used for bootstrapping")
3092 (description
3093 "Used only for bootstrapping python2-pbr, you should not need this.")
3094 (license license:asl2.0)))
3095
3096 (define-public python-pbr
3097 (package
3098 (inherit python-pbr-minimal)
3099 (name "python-pbr")
3100 (arguments
3101 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3102 (propagated-inputs
3103 `(("git" ,git))) ;; pbr actually uses the "git" binary.
3104 (native-inputs
3105 `(("python-fixtures" ,python-fixtures-bootstrap)
3106 ;; discover, coverage, hacking, subunit
3107 ("python-mock" ,python-mock)
3108 ("python-six" ,python-six)
3109 ("python-sphinx" ,python-sphinx)
3110 ("python-testrepository" ,python-testrepository-bootstrap)
3111 ("python-testresources" ,python-testresources-bootstrap)
3112 ("python-testscenarios" ,python-testscenarios-bootstrap)
3113 ("python-testtools" ,python-testtools-bootstrap)
3114 ("python-virtualenv" ,python-virtualenv)))
3115 (synopsis "Enhance the default behavior of Python’s setuptools")
3116 (description
3117 "Python Build Reasonableness (PBR) is a library that injects some useful
3118 and sensible default behaviors into your setuptools run. It will set
3119 versions, process requirements files and generate AUTHORS and ChangeLog file
3120 from git information.
3121 ")))
3122
3123 (define-public python-pyrsistent
3124 (package
3125 (name "python-pyrsistent")
3126 (version "0.16.0")
3127 (home-page "https://github.com/tobgu/pyrsistent")
3128 (source (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "pyrsistent" version))
3131 (sha256
3132 (base32
3133 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3134 (build-system python-build-system)
3135 (arguments
3136 '(#:phases (modify-phases %standard-phases
3137 ;; The package works fine with newer Pytest and Hypothesis, but
3138 ;; has pinned older versions to stay compatible with Python 2.
3139 (add-before 'check 'loosen-pytest-requirement
3140 (lambda _
3141 (substitute* "setup.py"
3142 (("pytest<5") "pytest")
3143 (("hypothesis<5") "hypothesis"))
3144 #t)))))
3145 (native-inputs
3146 `(("python-hypothesis" ,python-hypothesis)
3147 ("python-pytest" ,python-pytest)
3148 ("python-pytest-runner" ,python-pytest-runner)))
3149 (propagated-inputs
3150 `(("python-six" ,python-six)))
3151 (synopsis "Persistent data structures for Python")
3152 (description
3153 "Pyrsistent is a number of persistent collections (by some referred to as
3154 functional data structures). Persistent in the sense that they are immutable.
3155
3156 All methods on a data structure that would normally mutate it instead return a
3157 new copy of the structure containing the requested updates. The original
3158 structure is left untouched.")
3159 (license license:expat)))
3160
3161 (define-public python2-pyrsistent
3162 (package-with-python2 python-pyrsistent))
3163
3164 (define-public python-exif-read
3165 (package
3166 (name "python-exif-read")
3167 (version "2.1.2")
3168 (source (origin
3169 (method url-fetch)
3170 (uri (pypi-uri "ExifRead" version))
3171 (sha256
3172 (base32
3173 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3174 (build-system python-build-system)
3175 (arguments `(#:tests? #f)) ; no tests
3176 (home-page "https://github.com/ianare/exif-py")
3177 (synopsis "Python library to extract EXIF data from image files")
3178 (description
3179 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3180 files.")
3181 (license license:bsd-3)))
3182
3183 (define-public python2-exif-read
3184 (package-with-python2 python-exif-read))
3185
3186 (define-public python-pyld
3187 (package
3188 (name "python-pyld")
3189 (version "1.0.5")
3190 (source (origin
3191 (method url-fetch)
3192 (uri (pypi-uri "PyLD" version))
3193 (sha256
3194 (base32
3195 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3196 (build-system python-build-system)
3197 (home-page "https://github.com/digitalbazaar/pyld")
3198 (synopsis "Python implementation of the JSON-LD specification")
3199 (description
3200 "PyLD is an implementation of the JSON-LD specification.")
3201 (license license:bsd-3)))
3202
3203 (define-public python2-pyld
3204 (package-with-python2 python-pyld))
3205
3206 (define-public python-cli-helpers
3207 (package
3208 (name "python-cli-helpers")
3209 (version "2.0.1")
3210 (source
3211 (origin
3212 ;; There's no source tarball on PyPI.
3213 (method git-fetch)
3214 (uri (git-reference
3215 (url "https://github.com/dbcli/cli_helpers")
3216 (commit (string-append "v" version))))
3217 (file-name (git-file-name name version))
3218 (sha256
3219 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3220 (build-system python-build-system)
3221 (native-inputs
3222 `(("python-pytest" ,python-pytest)))
3223 (propagated-inputs
3224 `(("python-wcwidth" ,python-wcwidth)
3225 ("python-configobj" ,python-configobj)
3226 ("python-tabulate" ,python-tabulate)
3227 ("python-terminaltables" ,python-terminaltables)))
3228 (home-page "https://github.com/dbcli/cli_helpers")
3229 (synopsis "Helpers for building command-line apps")
3230 (description
3231 "CLI Helpers is a Python package that makes it easy to perform common
3232 tasks when building command-line apps. It's a helper library for command-line
3233 interfaces.")
3234 (license license:bsd-3)))
3235
3236 (define-public python-click
3237 (package
3238 (name "python-click")
3239 (version "7.1.2")
3240 (source
3241 (origin
3242 (method url-fetch)
3243 (uri (pypi-uri "click" version))
3244 (sha256
3245 (base32
3246 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3247 (build-system python-build-system)
3248 (arguments
3249 `(#:phases
3250 (modify-phases %standard-phases
3251 (add-after 'unpack 'fix-paths
3252 (lambda* (#:key inputs #:allow-other-keys)
3253 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3254 "cross-libc" "libc"))))
3255 (substitute* "src/click/_unicodefun.py"
3256 (("'locale'")
3257 (string-append "'" glibc "/bin/locale'"))))))
3258 (replace 'check
3259 (lambda _
3260 (invoke "python" "-m" "pytest"))))))
3261 (native-inputs
3262 `(("python-pytest" ,python-pytest)))
3263 (home-page "https://palletsprojects.com/p/click/")
3264 (synopsis "Command line library for Python")
3265 (description
3266 "Click is a Python package for creating command line interfaces in a
3267 composable way with as little code as necessary. Its name stands for
3268 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3269 with sensible defaults out of the box.")
3270 (license license:bsd-3)))
3271
3272 (define-public python2-click
3273 (package-with-python2 python-click))
3274
3275 (define-public python-click-5
3276 (package (inherit python-click)
3277 (name "python-click")
3278 (version "5.1")
3279 (source
3280 (origin
3281 (method url-fetch)
3282 (uri (pypi-uri "click" version))
3283 (sha256
3284 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3285 (arguments `())))
3286
3287 (define-public python-vcversioner
3288 (package
3289 (name "python-vcversioner")
3290 (version "2.16.0.0")
3291 (source
3292 (origin
3293 (method url-fetch)
3294 (uri (pypi-uri "vcversioner" version))
3295 (sha256
3296 (base32
3297 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3298 (build-system python-build-system)
3299 (synopsis "Python library for version number discovery")
3300 (description "Vcversioner is a Python library that inspects tagging
3301 information in a variety of version control systems in order to discover
3302 version numbers.")
3303 (home-page "https://github.com/habnabit/vcversioner")
3304 (license license:isc)))
3305
3306 (define-public python2-vcversioner
3307 (package-with-python2 python-vcversioner))
3308
3309 (define-public python-jdcal
3310 (package
3311 (name "python-jdcal")
3312 (version "1.4")
3313 (source
3314 (origin
3315 (method url-fetch)
3316 (uri (pypi-uri "jdcal" version))
3317 (sha256
3318 (base32
3319 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3320 (build-system python-build-system)
3321 (arguments
3322 `(#:phases (modify-phases %standard-phases
3323 (replace 'check
3324 (lambda _
3325 (invoke "pytest"))))))
3326 (native-inputs
3327 `(("python-pytest" ,python-pytest)))
3328 (home-page "https://github.com/phn/jdcal")
3329 (synopsis "Functions to convert between Julian dates Gregorian dates")
3330 (description "This Python library provides functions for converting
3331 between Julian dates and Gregorian dates.")
3332 (license license:bsd-2)))
3333
3334 (define-public python2-jdcal
3335 (package-with-python2 python-jdcal))
3336
3337 (define-public python-jsondiff
3338 (package
3339 (name "python-jsondiff")
3340 (version "1.2.0")
3341 (source
3342 (origin
3343 (method url-fetch)
3344 (uri (pypi-uri "jsondiff" version))
3345 (sha256
3346 (base32
3347 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3348 (build-system python-build-system)
3349 (native-inputs
3350 `(("python-nose" ,python-nose)
3351 ("python-nose-random" ,python-nose-random)))
3352 (home-page
3353 "https://github.com/fzumstein/jsondiff")
3354 (synopsis "Compare JSON and JSON-like structures in Python")
3355 (description "@code{jsondiff} is a Python library which lets you
3356 compare, diff, and patch JSON and JSON-like structures in Python.")
3357 (license license:expat)))
3358
3359 (define-public python-jsonschema
3360 (package
3361 (name "python-jsonschema")
3362 (version "3.2.0")
3363 (source (origin
3364 (method url-fetch)
3365 (uri (pypi-uri "jsonschema" version))
3366 (sha256
3367 (base32
3368 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3369 (build-system python-build-system)
3370 (arguments
3371 '(#:phases
3372 (modify-phases %standard-phases
3373 (replace 'check
3374 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3375 (when tests?
3376 (setenv "JSON_SCHEMA_TEST_SUITE" "json")
3377 (invoke "trial" "jsonschema")))))))
3378 (native-inputs
3379 `(("python-setuptools_scm" ,python-setuptools-scm)
3380 ("python-twisted" ,python-twisted)))
3381 (propagated-inputs
3382 `(("python-attrs" ,python-attrs)
3383 ("python-pyrsistent" ,python-pyrsistent)
3384 ("python-six" ,python-six)))
3385 (home-page "https://github.com/Julian/jsonschema")
3386 (synopsis "Implementation of JSON Schema for Python")
3387 (description
3388 "Jsonschema is an implementation of JSON Schema for Python.")
3389 (license license:expat)
3390 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3391
3392 (define-public python2-jsonschema
3393 (let ((jsonschema (package-with-python2
3394 (strip-python2-variant python-jsonschema))))
3395 (package/inherit jsonschema
3396 (propagated-inputs
3397 `(("python2-functools32" ,python2-functools32)
3398 ("python2-importlib-metadata" ,python2-importlib-metadata)
3399 ,@(package-propagated-inputs jsonschema))))))
3400
3401 (define-public python-schema
3402 (package
3403 (name "python-schema")
3404 (version "0.6.6")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "schema" version))
3409 (sha256
3410 (base32
3411 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3412 (build-system python-build-system)
3413 (native-inputs
3414 `(("python-pytest" ,python-pytest)))
3415 (home-page "https://github.com/keleshev/schema")
3416 (synopsis "Simple data validation library")
3417 (description
3418 "@code{python-schema} is a library for validating Python data
3419 structures, such as those obtained from config-files, forms, external
3420 services or command-line parsing, converted from JSON/YAML (or
3421 something else) to Python data-types.")
3422 (license license:psfl)))
3423
3424 (define-public python2-schema
3425 (package-with-python2 python-schema))
3426
3427 (define-public python-schema-0.5
3428 (package (inherit python-schema)
3429 (version "0.5.0")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "schema" version))
3434 (sha256
3435 (base32
3436 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3437
3438 (define-public python2-schema-0.5
3439 (package-with-python2 python-schema-0.5))
3440
3441 (define-public python-kitchen
3442 (package
3443 (name "python-kitchen")
3444 (version "1.2.5")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (pypi-uri "kitchen" version))
3449 (sha256
3450 (base32
3451 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3452 (build-system python-build-system)
3453 (propagated-inputs
3454 `(("python-chardet" ,python-chardet)))
3455 (home-page "https://github.com/fedora-infra/kitchen")
3456 (synopsis "Python API for snippets")
3457 (description "@code{kitchen} module provides a python API for all sorts of
3458 little useful snippets of code that everybody ends up writing for their projects
3459 but never seem big enough to build an independent release. Use kitchen and stop
3460 cutting and pasting that code over and over.")
3461 (license (list license:lgpl2.1+
3462 ;; subprocess.py, test_subprocess.py,
3463 ;; kitchen/pycompat25/defaultdict.py:
3464 license:psfl))))
3465
3466 (define-public python2-kitchen
3467 (package-with-python2 python-kitchen))
3468
3469 (define-public python-roman
3470 (package
3471 (name "python-roman")
3472 (version "3.3")
3473 (source
3474 (origin
3475 (method url-fetch)
3476 (uri (pypi-uri "roman" version))
3477 (sha256
3478 (base32
3479 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3480 (build-system python-build-system)
3481 (home-page "https://github.com/zopefoundation/roman")
3482 (synopsis "Integer to Roman numerals converter")
3483 (description
3484 "This package provides a small helper library to convert Arabic Numbers
3485 to Roman Numerals.")
3486 (license license:psfl)))
3487
3488 (define-public python-unidecode
3489 (package
3490 (name "python-unidecode")
3491 (version "1.1.1")
3492 (source (origin
3493 (method url-fetch)
3494 (uri (pypi-uri "Unidecode" version))
3495 (sha256
3496 (base32
3497 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3498 (build-system python-build-system)
3499 (home-page "https://pypi.org/project/Unidecode/")
3500 (synopsis "ASCII transliterations of Unicode text")
3501 (description
3502 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3503 useful when integrating with legacy code that doesn't support Unicode, or for
3504 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3505 machine identifiers from human-readable Unicode strings that should still be
3506 somewhat intelligible.")
3507 (license license:gpl2+)))
3508
3509 (define-public python2-unidecode
3510 (package-with-python2 python-unidecode))
3511
3512 (define-public python-text-unidecode
3513 (package
3514 (name "python-text-unidecode")
3515 (version "1.3")
3516 (source (origin
3517 (method url-fetch)
3518 (uri (pypi-uri "text-unidecode" version))
3519 (sha256
3520 (base32
3521 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3522 (build-system python-build-system)
3523 (arguments
3524 '(#:phases (modify-phases %standard-phases
3525 (replace 'check
3526 (lambda _
3527 (invoke "pytest" "-vv"))))))
3528 (native-inputs
3529 `(("python-pytest" ,python-pytest)))
3530 (home-page "https://github.com/kmike/text-unidecode/")
3531 (synopsis "Decode Unicode data")
3532 (description
3533 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3534 Perl library. It can create ASCII representations of Unicode data. In general
3535 users should prefer the @code{python-unidecode} package which offers better
3536 memory usage and transliteration quality.")
3537 ;; The user can choose either license.
3538 (license (list license:clarified-artistic license:gpl2+))))
3539
3540 (define-public python2-text-unidecode
3541 (package-with-python2 python-text-unidecode))
3542
3543 (define-public python-pyjwt
3544 (package
3545 (name "python-pyjwt")
3546 (version "1.7.1")
3547 (source
3548 (origin
3549 (method url-fetch)
3550 (uri (pypi-uri "PyJWT" version))
3551 (sha256
3552 (base32
3553 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3554 (modules '((guix build utils)))
3555 (snippet
3556 '(begin
3557 (for-each delete-file-recursively
3558 (find-files "." "\\.pyc$"))
3559 #t))))
3560 (build-system python-build-system)
3561 (arguments
3562 '(#:phases (modify-phases %standard-phases
3563 (replace 'check
3564 (lambda _
3565 ;; Mimic upstream commit 3a20892442b34c7 to get
3566 ;; rid of dependency on pytest-runner < 5.0.
3567 ;; Remove substitution for PyJWT > 1.7.1.
3568 (substitute* "setup.py"
3569 ((".*pytest-runner.*")
3570 ""))
3571 (invoke "pytest" "-vv"))))))
3572 (native-inputs
3573 `(("python-pytest" ,python-pytest)
3574 ("python-pytest-cov" ,python-pytest-cov)))
3575 (home-page "https://github.com/progrium/pyjwt")
3576 (synopsis "JSON Web Token implementation in Python")
3577 (description
3578 "PyJWT is a JSON Web Token implementation written in Python.")
3579 (license license:expat)))
3580
3581 (define-public python2-pyjwt
3582 (package-with-python2 python-pyjwt))
3583
3584 (define-public python-pymsgbox
3585 (package
3586 (name "python-pymsgbox")
3587 (version "1.0.6")
3588 (source
3589 (origin
3590 (method git-fetch)
3591 (uri (git-reference
3592 ;; LICENSE.txt is not present on pypi
3593 (url "https://github.com/asweigart/PyMsgBox")
3594 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3595 (file-name (git-file-name name version))
3596 (sha256
3597 (base32
3598 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3599 (arguments
3600 ;; Circular dependency to run tests:
3601 ;; Tests need pyautogui, which depends on pymsgbox.
3602 '(#:tests? #f))
3603 (build-system python-build-system)
3604 (home-page "https://github.com/asweigart/PyMsgBox")
3605 (synopsis "Python module for JavaScript-like message boxes")
3606 (description
3607 "PyMsgBox is a simple, cross-platform, pure Python module for
3608 JavaScript-like message boxes. Types of dialog boxes include:
3609 @enumerate
3610 @item alert
3611 @item confirm
3612 @item prompt
3613 @item password
3614 @end enumerate
3615 ")
3616 (license license:bsd-3)))
3617
3618 (define-public python-pympler
3619 (package
3620 (name "python-pympler")
3621 (home-page "https://pythonhosted.org/Pympler/")
3622 (version "0.9")
3623 (source (origin
3624 (method url-fetch)
3625 (uri (pypi-uri "Pympler" version))
3626 (sha256
3627 (base32
3628 "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
3629 (build-system python-build-system)
3630 (arguments
3631 `(#:phases (modify-phases %standard-phases
3632 (delete 'check)
3633 (add-after 'install 'check
3634 (lambda* (#:key inputs outputs #:allow-other-keys)
3635 (add-installed-pythonpath inputs outputs)
3636 (invoke "python" "setup.py" "test"))))))
3637 (synopsis "Measure, monitor and analyze memory behavior")
3638 (description
3639 "Pympler is a development tool to measure, monitor and analyze
3640 the memory behavior of Python objects in a running Python application.
3641
3642 By pympling a Python application, detailed insight in the size and the
3643 lifetime of Python objects can be obtained. Undesirable or unexpected
3644 runtime behavior like memory bloat and other @samp{pymples} can easily
3645 be identified.
3646
3647 A web profiling frontend exposes process statistics, garbage
3648 visualisation and class tracker statistics.")
3649 (license license:asl2.0)))
3650
3651 (define-public python2-pympler
3652 (package-with-python2 python-pympler))
3653
3654 (define-public python-itsdangerous
3655 (package
3656 (name "python-itsdangerous")
3657 (version "2.0.1")
3658 (source
3659 (origin
3660 (method url-fetch)
3661 (uri (pypi-uri "itsdangerous" version))
3662 (sha256
3663 (base32
3664 "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
3665 (build-system python-build-system)
3666 (home-page "https://palletsprojects.com/p/itsdangerous/")
3667 (synopsis "Python library for passing data to/from untrusted environments")
3668 (description
3669 "Itsdangerous provides various helpers to pass trusted data to untrusted
3670 environments and back.")
3671 (license license:bsd-3)))
3672
3673 (define-public python2-itsdangerous
3674 (package-with-python2 python-itsdangerous))
3675
3676 (define-public python-pyyaml
3677 (package
3678 (name "python-pyyaml")
3679 (version "5.4.1")
3680 (source
3681 (origin
3682 (method url-fetch)
3683 (uri (pypi-uri "PyYAML" version))
3684 (sha256
3685 (base32
3686 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3687 (build-system python-build-system)
3688 (inputs
3689 `(("libyaml" ,libyaml)
3690 ("python-cython" ,python-cython)))
3691 (home-page "https://pyyaml.org")
3692 (synopsis "YAML parser and emitter for Python")
3693 (description
3694 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3695 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3696 API, and sensible error messages. PyYAML supports standard YAML tags and
3697 provides Python-specific tags that represent an arbitrary Python object.")
3698 (license license:expat)))
3699
3700 (define-public python2-pyyaml
3701 (package-with-python2 python-pyyaml))
3702
3703 (define-public python-vine
3704 (package
3705 (name "python-vine")
3706 (version "1.1.4")
3707 (source
3708 (origin
3709 (method url-fetch)
3710 (uri (pypi-uri "vine" version))
3711 (sha256
3712 (base32
3713 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3714 (build-system python-build-system)
3715 (native-inputs
3716 `(("python-pytest" ,python-pytest)
3717 ("python-case" ,python-case)))
3718 (home-page "https://github.com/celery/vine")
3719 (synopsis "Promises for Python")
3720 (description
3721 "@code{vine} provides a special implementation of promises in that it can
3722 be used both for \"promise of a value\" and lazy evaluation. The biggest
3723 upside for this is that everything in a promise can also be a promise,
3724 e.g. filters, callbacks and errbacks can all be promises.")
3725 (license license:bsd-3)))
3726
3727 (define-public python-virtualenv
3728 (package
3729 (name "python-virtualenv")
3730 (version "20.3.1")
3731 (source
3732 (origin
3733 (method url-fetch)
3734 (uri (pypi-uri "virtualenv" version))
3735 (sha256
3736 (base32
3737 "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
3738 (build-system python-build-system)
3739 (native-inputs
3740 `(("python-mock" ,python-mock)
3741 ("python-pytest" ,python-pytest)
3742 ("python-setuptools-scm" ,python-setuptools-scm)))
3743 (propagated-inputs
3744 `(("python-appdirs" ,python-appdirs)
3745 ("python-distlib" ,python-distlib)
3746 ("python-filelock" ,python-filelock)
3747 ("python-six" ,python-six)))
3748 (home-page "https://virtualenv.pypa.io/")
3749 (synopsis "Virtual Python environment builder")
3750 (description
3751 "Virtualenv is a tool to create isolated Python environments.")
3752 (license license:expat)))
3753
3754 (define-public python2-virtualenv
3755 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3756 (package
3757 (inherit base)
3758 (arguments
3759 `(#:python ,python-2
3760 #:phases
3761 (modify-phases %standard-phases
3762 (add-after 'set-paths 'adjust-PYTHONPATH
3763 (lambda* (#:key inputs #:allow-other-keys)
3764 (let* ((python (assoc-ref inputs "python"))
3765 (python-sitedir (string-append python "/lib/python2.7"
3766 "/site-packages")))
3767 ;; XXX: 'python2' always comes first on PYTHONPATH
3768 ;; and shadows the 'setuptools' input. Move python2
3769 ;; last: this should be fixed in python-build-system
3770 ;; in a future rebuild cycle.
3771 (setenv "PYTHONPATH"
3772 (string-append (string-join (delete python-sitedir
3773 (string-split
3774 (getenv "PYTHONPATH")
3775 #\:))
3776 ":")
3777 ":" python-sitedir))
3778 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3779 (getenv "PYTHONPATH"))
3780 #t))))))
3781 (propagated-inputs
3782 `(("python-contextlib2" ,python2-contextlib2)
3783 ,@(package-propagated-inputs base))))))
3784
3785 (define-public python-markupsafe
3786 (package
3787 (name "python-markupsafe")
3788 (version "2.0.1")
3789 (source
3790 (origin
3791 (method url-fetch)
3792 (uri (pypi-uri "MarkupSafe" version))
3793 (sha256
3794 (base32
3795 "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
3796 (build-system python-build-system)
3797 (arguments
3798 `(#:phases (modify-phases %standard-phases
3799 (replace 'check
3800 (lambda* (#:key tests? #:allow-other-keys)
3801 (when tests?
3802 (invoke "pytest" "-vv")))))))
3803 (native-inputs
3804 `(("python-pytest" ,python-pytest)))
3805 (home-page "https://github.com/mitsuhiko/markupsafe")
3806 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3807 (description
3808 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3809 for Python.")
3810 (license license:bsd-3)))
3811
3812 (define-public python2-markupsafe
3813 (package-with-python2 python-markupsafe))
3814
3815 (define-public python-jinja2
3816 (package
3817 (name "python-jinja2")
3818 (version "3.0.1")
3819 (source
3820 (origin
3821 (method url-fetch)
3822 (uri (pypi-uri "Jinja2" version))
3823 (sha256
3824 (base32
3825 "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh"))))
3826 (build-system python-build-system)
3827 (arguments
3828 '(#:phases (modify-phases %standard-phases
3829 (replace 'check
3830 (lambda* (#:key tests? #:allow-other-keys)
3831 (if tests?
3832 (invoke "pytest" "-vv")
3833 (format #t "test suite not run~%")))))))
3834 (native-inputs
3835 `(("python-pytest" ,python-pytest)))
3836 (propagated-inputs
3837 `(("python-markupsafe" ,python-markupsafe)))
3838 (home-page "http://jinja.pocoo.org/")
3839 (synopsis "Python template engine")
3840 (description
3841 "Jinja2 is a small but fast and easy to use stand-alone template engine
3842 written in pure Python.")
3843 (license license:bsd-3)))
3844
3845 (define-public python2-jinja2
3846 (package-with-python2 python-jinja2))
3847
3848 (define-public python-jinja2-time
3849 (package
3850 (name "python-jinja2-time")
3851 (version "0.2.0")
3852 (source
3853 (origin
3854 (method url-fetch)
3855 (uri (pypi-uri "jinja2-time" version))
3856 (sha256
3857 (base32
3858 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3859 (build-system python-build-system)
3860 (propagated-inputs
3861 `(("python-arrow" ,python-arrow)
3862 ("python-jinja2" ,python-jinja2)))
3863 (home-page
3864 "https://github.com/hackebrot/jinja2-time")
3865 (synopsis "Jinja2 Extension for Dates and Times")
3866 (description
3867 "This package provides an extension for the template engine Jinja2. It
3868 adds a 'now' tag providing a convenient access to the arrow.now() API from
3869 templates. A format string can be provided to control the output.")
3870 (license license:expat)))
3871
3872 (define-public python-pystache
3873 (package
3874 (name "python-pystache")
3875 (version "0.5.4")
3876 (source (origin
3877 (method url-fetch)
3878 (uri (pypi-uri "pystache" version))
3879 (sha256
3880 (base32
3881 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3882 (build-system python-build-system)
3883 (arguments
3884 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3885 (home-page "http://defunkt.io/pystache/")
3886 (synopsis "Python logic-less template engine")
3887 (description
3888 "Pystache is a Python implementation of the framework agnostic,
3889 logic-free templating system Mustache.")
3890 (license license:expat)
3891 (properties `((python2-variant . ,(delay python2-pystache))))))
3892
3893 (define-public python2-pystache
3894 (let ((base (package-with-python2
3895 (strip-python2-variant python-pystache))))
3896 (package/inherit base
3897 (arguments
3898 `(#:python ,python-2
3899 #:phases
3900 (modify-phases %standard-phases
3901 (replace 'check
3902 (lambda _
3903 (invoke "python" "test_pystache.py")))))))))
3904
3905 (define-public python-joblib
3906 (package
3907 (name "python-joblib")
3908 (version "0.14.1")
3909 (source (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "joblib" version))
3912 (sha256
3913 (base32
3914 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3915 (build-system python-build-system)
3916 (arguments
3917 `(#:phases
3918 (modify-phases %standard-phases
3919 (replace 'check
3920 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3921 (native-inputs
3922 `(("python-pytest" ,python-pytest)))
3923 (home-page "https://joblib.readthedocs.io/")
3924 (synopsis "Using Python functions as pipeline jobs")
3925 (description
3926 "Joblib is a set of tools to provide lightweight pipelining in Python.
3927 In particular, joblib offers: transparent disk-caching of the output values
3928 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3929 logging and tracing of the execution.")
3930 (license license:bsd-3)))
3931
3932 (define-public python2-joblib
3933 (package-with-python2 python-joblib))
3934
3935 (define-public python-daemon
3936 (package
3937 (name "python-daemon")
3938 (version "2.2.3")
3939 (source
3940 (origin
3941 (method url-fetch)
3942 (uri (pypi-uri "python-daemon" version))
3943 (sha256
3944 (base32
3945 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3946 (build-system python-build-system)
3947 (arguments
3948 `(#:phases
3949 (modify-phases %standard-phases
3950 (add-before 'check 'disable-tests
3951 (lambda _
3952 ;; FIXME: Determine why test fails
3953 (substitute* "test/test_daemon.py"
3954 (("test_detaches_process_context")
3955 "skip_test_detaches_process_context"))
3956 #t)))))
3957 (propagated-inputs
3958 `(("python-lockfile" ,python-lockfile)))
3959 (native-inputs
3960 `(("python-unittest2" ,python-unittest2)
3961 ("python-testtools" ,python-testtools)
3962 ("python-testscenarios" ,python-testscenarios)
3963 ("python-mock" ,python-mock)
3964 ("python-docutils" ,python-docutils)))
3965 (home-page "https://pagure.io/python-daemon/")
3966 (synopsis "Python library for making a Unix daemon process")
3967 (description "Python-daemon is a library that assists a Python program to
3968 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3969
3970 This library provides a @code{DaemonContext} class that manages the following
3971 important tasks for becoming a daemon process:
3972 @enumerate
3973 @item Detach the process into its own process group.
3974 @item Set process environment appropriate for running inside a chroot.
3975 @item Renounce suid and sgid privileges.
3976 @item Close all open file descriptors.
3977 @item Change the working directory, uid, gid, and umask.
3978 @item Set appropriate signal handlers.
3979 @item Open new file descriptors for stdin, stdout, and stderr.
3980 @item Manage a specified PID lock file.
3981 @item Register cleanup functions for at-exit processing.
3982 @end enumerate")
3983 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3984 (license (list license:asl2.0 license:gpl3+))))
3985
3986 (define-public python-anytree
3987 (package
3988 (name "python-anytree")
3989 (version "2.8.0")
3990 (source (origin
3991 (method url-fetch)
3992 (uri (pypi-uri "anytree" version))
3993 (sha256
3994 (base32
3995 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3996 (build-system python-build-system)
3997 (propagated-inputs
3998 `(("python-six" ,python-six)))
3999 (native-inputs
4000 `(;; For tests.
4001 ("graphviz" ,graphviz) ;for 'dot'
4002 ("python-nose" ,python-nose)))
4003 (home-page "https://github.com/c0fec0de/anytree")
4004 (synopsis "Lightweight tree data library")
4005 (description
4006 "@code{anytree} is a simple, lightweight, and extensible tree data
4007 structure for Python.")
4008 (license license:asl2.0)))
4009
4010 (define-public python-docutils
4011 (package
4012 (name "python-docutils")
4013 (version "0.16")
4014 (source
4015 (origin
4016 (method url-fetch)
4017 (uri (pypi-uri "docutils" version))
4018 (sha256
4019 (base32
4020 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
4021 (build-system python-build-system)
4022 (arguments
4023 '(#:phases (modify-phases %standard-phases
4024 (replace 'check
4025 (lambda* (#:key tests? #:allow-other-keys)
4026 (if tests?
4027 (invoke "python" "test/alltests.py")
4028 (format #t "test suite not run~%"))
4029 #t)))))
4030 (home-page "http://docutils.sourceforge.net/")
4031 (synopsis "Python Documentation Utilities")
4032 (description
4033 "Docutils is a modular system for processing documentation into useful
4034 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
4035 easy to use markup language, for input.
4036
4037 This package provides tools for converting @file{.rst} files to other formats
4038 via commands such as @command{rst2man}, as well as supporting Python code.")
4039 ;; Most of the source code is public domain, but some source files are
4040 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
4041 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
4042
4043 (define-public python2-docutils
4044 (package-with-python2 python-docutils))
4045
4046 ;; python2-sphinx fails its test suite with newer versions.
4047 (define-public python2-docutils-0.14
4048 (package
4049 (inherit python2-docutils)
4050 (version "0.14")
4051 (source (origin
4052 (method url-fetch)
4053 (uri (pypi-uri "docutils" version))
4054 (sha256
4055 (base32
4056 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4057
4058 (define-public python-restructuredtext-lint
4059 (package
4060 (name "python-restructuredtext-lint")
4061 (version "1.3.0")
4062 (source
4063 (origin
4064 (method url-fetch)
4065 (uri (pypi-uri "restructuredtext-lint" version))
4066 (sha256
4067 (base32
4068 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4069 (build-system python-build-system)
4070 (arguments
4071 `(#:phases
4072 (modify-phases %standard-phases
4073 (delete 'check)
4074 (add-after 'install 'check
4075 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4076 (when tests?
4077 (add-installed-pythonpath inputs outputs)
4078 (invoke "nosetests" "-v"))
4079 #t)))))
4080 (propagated-inputs
4081 `(("python-docutils" ,python-docutils)))
4082 (native-inputs
4083 `(("python-nose" ,python-nose)))
4084 (home-page "https://github.com/twolfson/restructuredtext-lint")
4085 (synopsis "reStructuredText linter")
4086 (description "This package provides a linter for the reStructuredText
4087 format.")
4088 (license license:unlicense)))
4089
4090 (define-public python-doc8
4091 (package
4092 (name "python-doc8")
4093 (version "0.8.0")
4094 (source
4095 (origin
4096 (method url-fetch)
4097 (uri (pypi-uri "doc8" version))
4098 (sha256
4099 (base32
4100 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4101 (build-system python-build-system)
4102 (arguments
4103 `(#:phases
4104 (modify-phases %standard-phases
4105 (delete 'check)
4106 (add-after 'install 'check
4107 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4108 (when tests?
4109 (add-installed-pythonpath inputs outputs)
4110 (invoke "pytest" "-v"))
4111 #t)))))
4112 (propagated-inputs
4113 `(("python-chardet" ,python-chardet)
4114 ("python-docutils" ,python-docutils)
4115 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
4116 ("python-six" ,python-six)
4117 ("python-stevedore" ,python-stevedore)))
4118 (native-inputs
4119 `(("python-testtools" ,python-testtools)
4120 ("python-pytest" ,python-pytest)))
4121 (home-page "https://launchpad.net/doc8")
4122 (synopsis
4123 "Style checker for Sphinx (or other) RST documentation")
4124 (description
4125 "Doc8 is an opinionated style checker for reStructured Text and plain
4126 text styles of documentation.")
4127 (license license:asl2.0)))
4128
4129 (define-public python-pygments
4130 (package
4131 (name "python-pygments")
4132 (version "2.8.1")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (pypi-uri "Pygments" version))
4137 (sha256
4138 (base32
4139 "153zyxigm879sk2n71lfv03y2pgxb7dl0dlsbwkz9aydxnkf2mi6"))))
4140 (build-system python-build-system)
4141 (arguments
4142 ;; FIXME: Tests require sphinx, which depends on this.
4143 '(#:tests? #f))
4144 (home-page "https://pygments.org/")
4145 (synopsis "Syntax highlighting")
4146 (description
4147 "Pygments is a syntax highlighting package written in Python.")
4148 (license license:bsd-2)
4149 (properties `((python2-variant . ,(delay python2-pygments))))))
4150
4151 ;; Pygments 2.6 and later does not support Python 2.
4152 (define-public python2-pygments
4153 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4154 (package
4155 (inherit base)
4156 (version "2.5.2")
4157 (source (origin
4158 (method url-fetch)
4159 (uri (pypi-uri "Pygments" version))
4160 (sha256
4161 (base32
4162 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4163
4164 (define-public python-pygments-github-lexers
4165 (package
4166 (name "python-pygments-github-lexers")
4167 (version "0.0.5")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (pypi-uri "pygments-github-lexers" version))
4172 (sha256
4173 (base32
4174 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4175 (build-system python-build-system)
4176 (propagated-inputs
4177 `(("python-pygments" ,python-pygments)))
4178 (home-page "https://github.com/liluo/pygments-github-lexers")
4179 (synopsis "Pygments Github custom lexers")
4180 (description "This package installs Github custom lexers to Pygments.")
4181 (license license:bsd-3)))
4182
4183 (define-public python-bump2version
4184 (package
4185 (name "python-bump2version")
4186 (version "1.0.1")
4187 (source
4188 (origin
4189 (method url-fetch)
4190 (uri (pypi-uri "bump2version" version))
4191 (sha256
4192 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4193 (build-system python-build-system)
4194 (arguments
4195 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4196 ;; required: --new-version".
4197 `(#:tests? #false))
4198 (home-page "https://github.com/c4urself/bump2version")
4199 (synopsis "Version-bump your software with a single command!")
4200 (description
4201 "This package provides a small command line tool to simplify releasing
4202 software by updating all version strings in your source code by the correct
4203 increment. It also creates commits and tags.")
4204 (license license:expat)))
4205
4206 (define-public python-bumpversion
4207 (package
4208 (name "python-bumpversion")
4209 (version "0.5.3")
4210 (source
4211 (origin
4212 (method url-fetch)
4213 (uri (pypi-uri "bumpversion" version))
4214 (sha256
4215 (base32
4216 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4217 (build-system python-build-system)
4218 (home-page "https://github.com/peritus/bumpversion")
4219 (synopsis "Tool to bump software version")
4220 (description "This tool provides a command-line interface (CLI) to bump a
4221 software version simply.")
4222 (license license:expat)))
4223
4224 (define-public python-deprecated
4225 (package
4226 (name "python-deprecated")
4227 (version "1.2.5")
4228 (source
4229 (origin
4230 (method git-fetch)
4231 (uri (git-reference
4232 (url "https://github.com/tantale/deprecated")
4233 (commit (string-append "v" version))))
4234 (file-name (git-file-name name version))
4235 (sha256
4236 (base32
4237 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4238 (build-system python-build-system)
4239 (arguments
4240 `(#:phases (modify-phases %standard-phases
4241 (replace 'check
4242 (lambda _
4243 (invoke "pytest"))))))
4244 (propagated-inputs
4245 `(("python-wrapt" ,python-wrapt)))
4246 (native-inputs
4247 `(("python-bumpversion" ,python-bumpversion)
4248 ("python-pytest" ,python-pytest)
4249 ("python-pytest-cov" ,python-pytest-cov)
4250 ("python-sphinx" ,python-sphinx)
4251 ("python-tox" ,python-tox)))
4252 (home-page "https://github.com/tantale/deprecated")
4253 (synopsis "Python decorator to deprecate classes, functions or methods")
4254 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4255 to deprecate classes, functions or methods.")
4256 (license license:expat)))
4257
4258 (define-public python-pygithub
4259 (package
4260 (name "python-pygithub")
4261 (version "1.54.1")
4262 (source
4263 ;; We fetch from the Git repo because there are no tests in the PyPI
4264 ;; archive.
4265 (origin
4266 (method git-fetch)
4267 (uri (git-reference
4268 (url "https://github.com/PyGithub/PyGithub")
4269 (commit (string-append "v" version))))
4270 (file-name (git-file-name name version))
4271 (sha256
4272 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4273 (build-system python-build-system)
4274 (arguments
4275 `(#:phases
4276 (modify-phases %standard-phases
4277 (replace 'check
4278 (lambda* (#:key tests? #:allow-other-keys)
4279 (when tests?
4280 (invoke "pytest"))
4281 #t)))))
4282 (propagated-inputs
4283 `(("python-cryptography" ,python-cryptography)
4284 ("python-deprecated" ,python-deprecated)
4285 ("python-pyjwt" ,python-pyjwt)
4286 ("python-requests" ,python-requests)))
4287 (native-inputs
4288 `(("python-httpretty" ,python-httpretty)
4289 ("python-pytest" ,python-pytest)))
4290 (home-page "https://pygithub.readthedocs.io/en/latest/")
4291 (synopsis "Python library for the GitHub API")
4292 (description "This library allows managing GitHub resources such as
4293 repositories, user profiles, and organizations in your Python applications,
4294 using version 3 of the GitHub application programming interface (API).")
4295 (license license:lgpl3+)))
4296
4297 (define-public python-rellu
4298 (package
4299 (name "python-rellu")
4300 (version "0.7")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri (pypi-uri "rellu" version))
4305 (sha256
4306 (base32
4307 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4308 (build-system python-build-system)
4309 (propagated-inputs
4310 `(("python-invoke" ,python-invoke)
4311 ("python-pygithub" ,python-pygithub)))
4312 (home-page "https://github.com/robotframework/rellu")
4313 (synopsis "Utilities to create PyPI releases")
4314 (description "This collection of utilities contains tooling and templates
4315 to assist in creating releases on GitHub and publishing them on PyPI. It is
4316 designed to be used by Robot Framework and tools and libraries in its
4317 ecosystem, but can naturally be used also by other projects.")
4318 (license license:asl2.0)))
4319
4320 (define-public python-robotframework
4321 (package
4322 (name "python-robotframework")
4323 (version "3.2.2")
4324 ;; There are no tests in the PyPI archive.
4325 (source
4326 (origin
4327 (method git-fetch)
4328 (uri (git-reference
4329 (url "https://github.com/robotframework/robotframework")
4330 (commit (string-append "v" version))))
4331 (file-name (git-file-name name version))
4332 (sha256
4333 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
4334 (patches (search-patches
4335 "python-robotframework-source-date-epoch.patch"))))
4336 (build-system python-build-system)
4337 (arguments
4338 `(#:phases (modify-phases %standard-phases
4339 (add-before 'build 'build-and-install-doc
4340 (lambda* (#:key outputs #:allow-other-keys)
4341 (let* ((doc-output (assoc-ref outputs "doc"))
4342 (doc (string-append doc-output "/share/"
4343 ,name "-" ,version "/")))
4344 (invoke "invoke" "library-docs" "all")
4345 (mkdir-p doc)
4346 (copy-recursively "doc/libraries"
4347 (string-append doc "/libraries"))
4348 #t)))
4349 (replace 'check
4350 (lambda* (#:key inputs #:allow-other-keys)
4351 ;; Some tests require timezone data. Otherwise, they
4352 ;; look up /etc/localtime, which doesn't exist, and fail
4353 ;; with:
4354 ;;
4355 ;; OverflowError: mktime argument out of range
4356 (setenv "TZDIR"
4357 (search-input-directory inputs "share/zoneinfo"))
4358 (setenv "TZ" "Europe/Paris")
4359
4360 (invoke "python" "utest/run.py"))))))
4361 (native-inputs
4362 `(("python-invoke" ,python-invoke)
4363 ("python-rellu" ,python-rellu)
4364 ("python:tk" ,python "tk") ;used when building the HTML doc
4365 ("tzdata" ,tzdata-for-tests)))
4366 (outputs '("out" "doc"))
4367 (home-page "https://robotframework.org")
4368 (synopsis "Generic automation framework")
4369 (description "Robot Framework is a generic automation framework for
4370 acceptance testing, acceptance test driven development (ATDD), and robotic
4371 process automation (RPA).")
4372 (license license:asl2.0)))
4373
4374 (define-public python-robotframework-lint
4375 ;; There is no properly tagged release; the commit below seems to correspond
4376 ;; to the 0.9 stable release available from PyPI. The tests are not
4377 ;; included in the PyPI archive, so we fetch the sources from the upstream
4378 ;; Git repo.
4379 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4380 (revision "0"))
4381 (package
4382 (name "python-robotframework-lint")
4383 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4384 revision commit))
4385 (source
4386 (origin
4387 (method git-fetch)
4388 (uri (git-reference
4389 (url "https://github.com/boakley/robotframework-lint")
4390 (commit commit)))
4391 (file-name (git-file-name name version))
4392 (sha256
4393 (base32
4394 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4395 (build-system python-build-system)
4396 (arguments
4397 `(#:phases
4398 (modify-phases %standard-phases
4399 (replace 'check
4400 (lambda _
4401 (invoke "python" "-m" "robot" "-A"
4402 "tests/conf/default.args" "tests"))))))
4403 (propagated-inputs
4404 `(("python-robotframework" ,python-robotframework)))
4405 (home-page "https://github.com/boakley/robotframework-lint/")
4406 (synopsis "Static analysis tool (linter) for Robot Framework")
4407 (description "This package provides the @code{rflint} command-line
4408 utility, a static analysis tool (linter) for Robot Framework source files.")
4409 (license license:asl2.0))))
4410
4411 (define-public python-robotframework-sshlibrary
4412 (package
4413 (name "python-robotframework-sshlibrary")
4414 (version "3.3.0")
4415 ;; There are no tests in the PyPI archive.
4416 (source
4417 (origin
4418 (method git-fetch)
4419 (uri (git-reference
4420 (url "https://github.com/robotframework/SSHLibrary")
4421 (commit (string-append "v" version))))
4422 (file-name (git-file-name name version))
4423 (sha256
4424 (base32
4425 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4426 (build-system python-build-system)
4427 (arguments
4428 `(#:phases
4429 (modify-phases %standard-phases
4430 (add-before 'build 'build-and-install-doc
4431 (lambda* (#:key outputs #:allow-other-keys)
4432 (let* ((doc-output (assoc-ref outputs "doc"))
4433 (doc (string-append doc-output "/share/"
4434 ,name "-" ,version "/")))
4435 (invoke "chmod" "-R" "+w" "docs")
4436 (invoke "invoke" "kw-docs" "project-docs")
4437 (mkdir-p doc)
4438 (for-each delete-file (find-files "docs" "\\.rst"))
4439 (copy-recursively "docs" doc)
4440 #t)))
4441 (replace 'check
4442 (lambda _
4443 ;; Some tests require an SSH server; we remove them.
4444 (delete-file "utest/test_client_api.py")
4445 (delete-file "utest/test_scp.py")
4446 (invoke "python" "utest/run.py"))))))
4447 (propagated-inputs
4448 `(("python-robotframework" ,python-robotframework)
4449 ("python-paramiko" ,python-paramiko)
4450 ("python-scp" ,python-scp)))
4451 (native-inputs
4452 `(("openssh" ,openssh)
4453 ("which" ,which)
4454 ;; To generate the documentation
4455 ("python-docutils" ,python-docutils)
4456 ("python-invoke" ,python-invoke)
4457 ("python-pygments" ,python-pygments)
4458 ("python-rellu" ,python-rellu)))
4459 (outputs '("out" "doc"))
4460 (home-page "https://github.com/robotframework/SSHLibrary")
4461 (synopsis "Robot Framework library for SSH and SFTP")
4462 (description "SSHLibrary is a Robot Framework library providing support
4463 for SSH and SFTP. It has the following main usages:
4464 @itemize @bullet
4465 @item Executing commands on the remote machine, either blocking or non-blocking.
4466 @item Writing and reading in an interactive shell.
4467 @item Transferring files and directories over SFTP.
4468 @item Ensuring that files and directories exist on the remote machine.
4469 @end itemize")
4470 (license license:asl2.0)))
4471
4472 (define-public python-rstr
4473 (package
4474 (name "python-rstr")
4475 (version "2.2.6")
4476 (source
4477 (origin
4478 (method url-fetch)
4479 (uri (pypi-uri "rstr" version))
4480 (sha256
4481 (base32
4482 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4483 (build-system python-build-system)
4484 (home-page "https://github.com/leapfrogonline/rstr")
4485 (synopsis "Generate random strings in Python")
4486 (description "This package provides a python module for generating
4487 random strings of various types. It could be useful for fuzz testing,
4488 generating dummy data, or other applications. It has no dependencies
4489 outside the standard library.")
4490 (license license:bsd-3)))
4491
4492 (define-public python-scp
4493 (package
4494 (name "python-scp")
4495 (version "0.13.3")
4496 (source
4497 (origin
4498 (method url-fetch)
4499 (uri (pypi-uri "scp" version))
4500 (sha256
4501 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4502 (build-system python-build-system)
4503 (arguments
4504 '(#:tests? #f)) ;tests require an SSH server
4505 (propagated-inputs
4506 `(("python-paramiko" ,python-paramiko)))
4507 (home-page "https://github.com/jbardin/scp.py")
4508 (synopsis "SCP protocol module for Python and Paramiko")
4509 (description "The scp module extends the Paramiko library to send and
4510 receive files via the SCP1 protocol, as implemented by the OpenSSH
4511 @command{scp} program.")
4512 (license license:gpl2+)))
4513
4514 (define-public python-rst.linker
4515 (package
4516 (name "python-rst.linker")
4517 (version "1.11")
4518 (source
4519 (origin
4520 (method url-fetch)
4521 (uri (pypi-uri "rst.linker" version))
4522 (sha256
4523 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4524 (build-system python-build-system)
4525 (propagated-inputs
4526 `(("python-dateutil" ,python-dateutil)
4527 ("python-six" ,python-six)))
4528 (native-inputs
4529 `(("python-setuptools-scm" ,python-setuptools-scm)))
4530 ;; Test would require path.py, which would introduce a cyclic dependence.
4531 (arguments `(#:tests? #f))
4532 ;; Note: As of version 1.7 the documentation is not worth building.
4533 (home-page "https://github.com/jaraco/rst.linker")
4534 (synopsis "Sphinx plugin to add links and timestamps")
4535 (description "rst.linker automatically replaces text by a
4536 reStructuredText external reference or timestamps. It's primary purpose is to
4537 augment the changelog, but it can be used for other documents, too.")
4538 (license license:expat)))
4539
4540 (define-public python2-rst.linker
4541 (package-with-python2 python-rst.linker))
4542
4543 (define-public python-sshpubkeys
4544 (package
4545 (name "python-sshpubkeys")
4546 (version "3.1.0")
4547 (home-page "https://github.com/ojarva/python-sshpubkeys")
4548 (source (origin
4549 (method git-fetch)
4550 (uri (git-reference
4551 (url home-page)
4552 (commit (string-append "v" version))))
4553 (file-name (git-file-name name version))
4554 (sha256
4555 (base32
4556 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4557 (build-system python-build-system)
4558 (propagated-inputs
4559 `(("python-cryptography" ,python-cryptography)
4560 ("python-ecdsa" ,python-ecdsa)))
4561 (synopsis "OpenSSH public key parser")
4562 (description
4563 "This package provides a library for parsing and validating OpenSSH
4564 public key files.")
4565 (license license:bsd-3)))
4566
4567 (define-public python-feedgenerator
4568 (package
4569 (name "python-feedgenerator")
4570 (version "1.9")
4571 (source
4572 (origin
4573 (method url-fetch)
4574 (uri (pypi-uri "feedgenerator" version))
4575 (sha256
4576 (base32
4577 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4578 (modules '((guix build utils)))
4579 (snippet
4580 '(begin
4581 ;; Remove pre-compiled .pyc files from source.
4582 (for-each delete-file-recursively
4583 (find-files "." "__pycache__" #:directories? #t))
4584 (for-each delete-file (find-files "." "\\.pyc$"))
4585 #t))))
4586 (build-system python-build-system)
4587 (propagated-inputs
4588 `(("python-pytz" ,python-pytz)
4589 ("python-six" ,python-six)))
4590 (home-page "https://github.com/getpelican/feedgenerator")
4591 (synopsis
4592 "Standalone version of Django's Atom/RSS feed generator")
4593 (description
4594 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4595 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4596 (license license:bsd-3)))
4597
4598 (define-public python2-feedgenerator
4599 (package-with-python2 python-feedgenerator))
4600
4601 (define-public python-jsonrpc-server
4602 (package
4603 (name "python-jsonrpc-server")
4604 (version "0.4.0")
4605 (source
4606 (origin
4607 (method url-fetch)
4608 (uri (pypi-uri "python-jsonrpc-server" version))
4609 (sha256
4610 (base32
4611 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4612 (build-system python-build-system)
4613 (propagated-inputs
4614 `(("python-mock" ,python-mock)
4615 ("python-pytest" ,python-pytest)
4616 ("python-ujson" ,python-ujson)))
4617 (home-page
4618 "https://github.com/palantir/python-jsonrpc-server")
4619 (synopsis "JSON RPC 2.0 server library")
4620 (description
4621 "This package provides a JSON RPC 2.0 server library for Python.")
4622 (license license:expat)))
4623
4624 (define-public python-pydantic
4625 (package
4626 (name "python-pydantic")
4627 (version "1.8.2")
4628 (source
4629 (origin
4630 (method git-fetch)
4631 (uri (git-reference
4632 (url "https://github.com/samuelcolvin/pydantic")
4633 (commit (string-append "v" version))))
4634 (file-name (git-file-name name version))
4635 (sha256
4636 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4637 (build-system python-build-system)
4638 (arguments
4639 '(#:phases
4640 (modify-phases %standard-phases
4641 (add-before 'check 'disable-test
4642 (lambda _
4643 ;; Reported upstream:
4644 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4645 ;; Disable the faulty test as the fix is unclear.
4646 (substitute* "tests/test_validators.py"
4647 (("test_assert_raises_validation_error")
4648 "_test_assert_raises_validation_error"))
4649
4650 ;; These fail because of <https://bugs.python.org/issue40398>.
4651 ;; Remove after Python has been upgraded to >= 3.9.
4652 (substitute* "tests/test_generics.py"
4653 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4654 ""))
4655 (substitute* "tests/test_schema.py"
4656 (("test_unenforced_constraints_schema")
4657 "_test_unenforced_constraints_schema"))
4658
4659 ;; Disable tests for the Hypothesis plugin because it is tricky
4660 ;; to configure in the build container.
4661 (delete-file "tests/test_hypothesis_plugin.py")))
4662 (replace 'check
4663 (lambda _ (invoke "pytest" "-vv"))))))
4664 (native-inputs
4665 `(("python-pytest" ,python-pytest)
4666 ("python-pytest-mock" ,python-pytest-mock)))
4667 (propagated-inputs
4668 `(("python-typing-extensions" ,python-typing-extensions)))
4669 (home-page "https://github.com/samuelcolvin/pydantic")
4670 (synopsis "Python data validation and settings management")
4671 (description
4672 "Pydantic enforces type hints at runtime, and provides user friendly
4673 errors when data is invalid.")
4674 (license license:expat)))
4675
4676 (define-public python-pydocstyle
4677 (package
4678 (name "python-pydocstyle")
4679 (version "3.0.0")
4680 (source
4681 (origin
4682 (method url-fetch)
4683 (uri (pypi-uri "pydocstyle" version))
4684 (sha256
4685 (base32
4686 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4687 (build-system python-build-system)
4688 (propagated-inputs
4689 `(("python-six" ,python-six)
4690 ("python-snowballstemmer" ,python-snowballstemmer)))
4691 (home-page
4692 "https://github.com/PyCQA/pydocstyle/")
4693 (synopsis "Python docstring style checker")
4694 (description
4695 "This package provides a style checker for the Python Language
4696 Server (PLS).")
4697 (license license:expat)))
4698
4699 (define-public python-language-server
4700 (package
4701 (name "python-language-server")
4702 (version "0.36.2")
4703 (source
4704 (origin
4705 (method url-fetch)
4706 (uri (pypi-uri "python-language-server" version))
4707 (sha256
4708 (base32
4709 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4710 (build-system python-build-system)
4711 (arguments
4712 `(#:phases
4713 (modify-phases %standard-phases
4714 (add-after 'unpack 'relax-deps
4715 (lambda _
4716 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4717 "pycodestyle"))
4718 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4719 #t))
4720 (add-before 'check 'set-HOME
4721 (lambda _ (setenv "HOME" "/tmp") #t))
4722 (replace 'check
4723 (lambda _
4724 ;; Disable failing test.
4725 (invoke "python" "-m" "pytest" "-k"
4726 "not test_pyqt_completion"))))))
4727 (propagated-inputs
4728 `(("python-autopep8" ,python-autopep8)
4729 ("python-configparser" ,python-configparser)
4730 ("python-pydocstyle" ,python-pydocstyle)
4731 ("python-flake8" ,python-flake8)
4732 ("python-future" ,python-future)
4733 ("python-jedi" ,python-jedi)
4734 ("python-jsonrpc-server" ,python-jsonrpc-server)
4735 ("python-pluggy" ,python-pluggy)
4736 ("python-pycodestyle" ,python-pycodestyle)
4737 ("python-pyflakes" ,python-pyflakes)
4738 ("python-rope" ,python-rope)
4739 ("python-ujson" ,python-ujson)
4740 ("python-yapf" ,python-yapf)))
4741 (native-inputs
4742 `(("python-coverage" ,python-coverage)
4743 ("python-flaky" ,python-flaky)
4744 ("python-matplotlib" ,python-matplotlib)
4745 ("python-mock" ,python-mock)
4746 ("python-numpy" ,python-numpy)
4747 ("python-pandas" ,python-pandas)
4748 ("python-pylint" ,python-pylint)
4749 ("python-pytest" ,python-pytest)
4750 ("python-pytest-cov" ,python-pytest-cov)
4751 ("python-versioneer" ,python-versioneer)))
4752 (home-page "https://github.com/palantir/python-language-server")
4753 (synopsis "Python implementation of the Language Server Protocol")
4754 (description
4755 "The Python Language Server (pyls) is an implementation of the Python 3
4756 language specification for the Language Server Protocol (LSP). This tool is
4757 used in text editing environments to provide a complete and integrated
4758 feature-set for programming Python effectively.")
4759 (license license:expat)))
4760
4761 (define-public python-pathspec
4762 (package
4763 (name "python-pathspec")
4764 (version "0.7.0")
4765 (source
4766 (origin
4767 (method url-fetch)
4768 (uri (pypi-uri "pathspec" version))
4769 (sha256
4770 (base32
4771 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4772 (build-system python-build-system)
4773 (home-page "https://github.com/cpburnz/python-path-specification")
4774 (synopsis "Utility library for gitignore style pattern matching of file paths")
4775 (description
4776 "This package provides a utility library for gitignore style pattern
4777 matching of file paths.")
4778 (license license:mpl2.0)))
4779
4780 (define-public python-black
4781 (package
4782 (name "python-black")
4783 (version "20.8b1")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "black" version))
4788 (sha256
4789 (base32
4790 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4791 (build-system python-build-system)
4792 (arguments
4793 `(#:phases
4794 (modify-phases %standard-phases
4795 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4796 (lambda _
4797 (let ((python3 (which "python3")))
4798 (substitute* '("tests/data/fmtonoff.py"
4799 "tests/data/string_prefixes.py"
4800 "tests/data/function.py"
4801 "tests/data/python37.py")
4802 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4803 (string-append "#!" python3 (if (string? minor-version)
4804 minor-version
4805 "")))))
4806 #t))
4807 (add-after 'unpack 'disable-broken-tests
4808 (lambda* (#:key outputs inputs #:allow-other-keys)
4809 ;; Make installed package available for running the tests
4810 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4811 ":" (getenv "PATH")))
4812
4813 ;; These tests are supposed to be skipped when the blackd
4814 ;; dependencies are missing, but this doesn't quite work.
4815 (substitute* "tests/test_black.py"
4816 (("( *)class BlackDTestCase.*" match indent)
4817 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4818 indent "class BlackDTestCase(unittest.TestCase):\n"))
4819 (("web.Application") "False")
4820 (("@unittest_run_loop") ""))
4821
4822 ;; Patching the above file breaks the self test
4823 (substitute* "tests/test_black.py"
4824 (("( *)def test_self" match indent)
4825 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4826
4827 (substitute* "tests/test_black.py"
4828 (("( *)def test_python38" match indent)
4829 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4830 #t))
4831 ;; Remove blackd, because it depends on python-aiohttp and
4832 ;; python-aiohttp-cors.
4833 (add-after 'unpack 'remove-entrypoint
4834 (lambda _
4835 (substitute* "setup.py"
4836 (("\\s*\"blackd=blackd:patched_main \\[d\\]\",\n") "")
4837 (("\"blackd\", ") "")))))))
4838 (propagated-inputs
4839 `(("python-click" ,python-click)
4840 ("python-attrs" ,python-attrs)
4841 ("python-appdirs" ,python-appdirs)
4842 ("python-pathspec" ,python-pathspec)
4843 ("python-mypy-extensions" ,python-mypy-extensions)
4844 ("python-regex" ,python-regex)
4845 ("python-toml" ,python-toml)
4846 ("python-typed-ast" ,python-typed-ast)
4847 ("python-typing-extensions" ,python-typing-extensions)))
4848 (native-inputs
4849 `(("python-setuptools-scm" ,python-setuptools-scm)))
4850 (home-page "https://github.com/ambv/black")
4851 (synopsis "The uncompromising code formatter")
4852 (description "Black is the uncompromising Python code formatter.")
4853 (license license:expat)))
4854
4855 (define-public python-black-macchiato
4856 (package
4857 (name "python-black-macchiato")
4858 (version "1.3.0")
4859 (source
4860 (origin
4861 (method url-fetch)
4862 (uri (pypi-uri "black-macchiato" version))
4863 (sha256
4864 (base32
4865 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4866 (build-system python-build-system)
4867 (propagated-inputs
4868 `(("python-black" ,python-black)))
4869 (home-page "https://github.com/wbolster/black-macchiato")
4870 (synopsis "Partial @code{python-black} formatting")
4871 (description
4872 "This package is built on top the @{python-black} code formatter to
4873 enable formatting of partial files.")
4874 (license license:bsd-3)))
4875
4876 (define-public python-blinker
4877 (package
4878 (name "python-blinker")
4879 (version "1.4")
4880 (source
4881 (origin
4882 (method url-fetch)
4883 (uri (pypi-uri "blinker" version))
4884 (sha256
4885 (base32
4886 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4887 (build-system python-build-system)
4888 (home-page "https://pythonhosted.org/blinker/")
4889 (synopsis "Fast, simple object-to-object and broadcast signaling")
4890 (description
4891 "Blinker provides a fast dispatching system that allows any number of
4892 interested parties to subscribe to events, or \"signals\".")
4893 (license license:expat)))
4894
4895 (define-public python2-blinker
4896 (package-with-python2 python-blinker))
4897
4898 (define-public pelican
4899 (package
4900 (name "pelican")
4901 (version "4.2.0")
4902 (source
4903 (origin
4904 (method url-fetch)
4905 (uri (pypi-uri "pelican" version))
4906 (sha256
4907 (base32
4908 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4909 (build-system python-build-system)
4910 (propagated-inputs
4911 `(("python-blinker" ,python-blinker)
4912 ("python-dateutil" ,python-dateutil)
4913 ("python-docutils" ,python-docutils)
4914 ("python-feedgenerator" ,python-feedgenerator)
4915 ("python-jinja2" ,python-jinja2)
4916 ("python-markdown" ,python-markdown)
4917 ("python-pygments" ,python-pygments)
4918 ("python-pytz" ,python-pytz)
4919 ("python-six" ,python-six)
4920 ("python-unidecode" ,python-unidecode)))
4921 (home-page "https://getpelican.com/")
4922 (arguments
4923 `(;; XXX Requires a lot more packages to do unit tests :P
4924 #:tests? #f))
4925 (synopsis "Python-based static site publishing system")
4926 (description
4927 "Pelican is a tool to generate a static blog from reStructuredText,
4928 Markdown input files, and more. Pelican uses Jinja2 for templating
4929 and is very extensible.")
4930 (license license:agpl3+)))
4931
4932 (define-public mallard-ducktype
4933 (package
4934 (name "mallard-ducktype")
4935 (version "1.0.2")
4936 (source
4937 (origin
4938 (method git-fetch)
4939 ;; git-reference because tests are not included in pypi source tarball
4940 ;; https://issues.guix.gnu.org/issue/36755#2
4941 (uri (git-reference
4942 (url "https://github.com/projectmallard/mallard-ducktype")
4943 (commit version)))
4944 (file-name (git-file-name name version))
4945 (sha256
4946 (base32
4947 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4948 (build-system python-build-system)
4949 (arguments
4950 '(#:phases
4951 (modify-phases %standard-phases
4952 (replace 'check
4953 (lambda _
4954 (with-directory-excursion "tests"
4955 (invoke "sh" "runtests")))))))
4956 (home-page "http://projectmallard.org")
4957 (synopsis "Convert Ducktype to Mallard documentation markup")
4958 (description
4959 "Ducktype is a lightweight syntax that can represent all the semantics
4960 of the Mallard XML documentation system. Ducktype files can be converted to
4961 Mallard using the @command{ducktype} tool. The yelp-tools package
4962 provides additional functionality on the produced Mallard documents.")
4963 (license license:expat)))
4964
4965 (define-public python-cython
4966 (package
4967 (name "python-cython")
4968 (version "0.29.22")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "Cython" version))
4973 (sha256
4974 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4975 (build-system python-build-system)
4976 ;; we need the full python package and not just the python-wrapper
4977 ;; because we need libpython3.3m.so
4978 (inputs
4979 `(("python" ,python)))
4980 (arguments
4981 `(#:phases
4982 (modify-phases %standard-phases
4983 (add-before 'check 'set-HOME
4984 ;; some tests require access to "$HOME/.cython"
4985 (lambda _ (setenv "HOME" "/tmp") #t))
4986 (replace 'check
4987 (lambda _
4988 ;; Disable compiler optimizations to greatly reduce the running
4989 ;; time of the test suite.
4990 (setenv "CFLAGS" "-O0")
4991
4992 (invoke "python" "runtests.py" "-vv"
4993 "-j" (number->string (parallel-job-count))
4994 ;; XXX: On 32-bit architectures, running the parallel tests
4995 ;; fails on many-core systems, see
4996 ;; <https://github.com/cython/cython/issues/2807>.
4997 ,@(if (not (target-64bit?))
4998 '("-x" "run.parallel")
4999 '())))))))
5000 (home-page "https://cython.org/")
5001 (synopsis "C extensions for Python")
5002 (description "Cython is an optimising static compiler for both the Python
5003 programming language and the extended Cython programming language. It makes
5004 writing C extensions for Python as easy as Python itself.")
5005 (license license:asl2.0)
5006 (properties `((python2-variant . ,(delay python2-cython))))))
5007
5008 (define-public python2-cython
5009 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
5010 (package/inherit base
5011 (name "python2-cython")
5012 (inputs
5013 `(("python-2" ,python-2))) ;this is not automatically changed
5014 (arguments
5015 (substitute-keyword-arguments (package-arguments base)
5016 ((#:phases phases)
5017 `(modify-phases ,phases
5018 (add-before 'check 'adjust-test_embed
5019 (lambda _
5020 (substitute* "runtests.py"
5021 ;; test_embed goes great lengths to find the static libpythonX.Y.a
5022 ;; so it can give the right -L flag to GCC when embedding static
5023 ;; builds of Python. It is unaware that the Python "config"
5024 ;; directory (where the static library lives) was renamed in
5025 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
5026 ;; which works fine, because that is where the shared library is.
5027 ;;
5028 ;; It also appears to be unaware that the Makefile in Demos/embed
5029 ;; already unconditionally pass the static library location to GCC,
5030 ;; after checking sysconfig.get_config_var('LIBPL).
5031 ;;
5032 ;; The effect is that the linker is unable to resolve libexpat
5033 ;; symbols when building for Python 2, because neither the Python 2
5034 ;; shared library nor Expat is available. To fix it, we can either
5035 ;; add Expat as an input and make it visible to the linker, or just
5036 ;; prevent it from overriding the Python shared library location.
5037 ;; The end result is identical, so we take the easy route.
5038 ((" or libname not in os\\.listdir\\(libdir\\)")
5039 ""))
5040 #t)))))))))
5041
5042 ;; NOTE: when upgrading numpy please make sure that python-pandas and
5043 ;; python-scipy still build, as these three packages are often used together.
5044 (define-public python-numpy
5045 (package
5046 (name "python-numpy")
5047 (version "1.17.3")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (string-append
5052 "https://github.com/numpy/numpy/releases/download/v"
5053 version "/numpy-" version ".tar.gz"))
5054 (sha256
5055 (base32
5056 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
5057 (build-system python-build-system)
5058 (inputs
5059 `(("openblas" ,openblas)))
5060 (native-inputs
5061 `(("python-cython" ,python-cython)
5062 ("python-pytest" ,python-pytest)
5063 ("gfortran" ,gfortran)))
5064 (arguments
5065 `(#:phases
5066 (modify-phases %standard-phases
5067 (add-before 'build 'configure-blas-lapack
5068 (lambda* (#:key inputs #:allow-other-keys)
5069 (call-with-output-file "site.cfg"
5070 (lambda (port)
5071 (format port
5072 "[openblas]
5073 libraries = openblas
5074 library_dirs = ~a/lib
5075 include_dirs = ~a/include
5076
5077 # backslash-n to make emacs happy
5078 \n[lapack]
5079 lapack_libs = lapack
5080 library_dirs = ~a/lib
5081 include_dirs = ~a/include
5082 "
5083 (assoc-ref inputs "openblas")
5084 (assoc-ref inputs "openblas")
5085 (assoc-ref inputs "lapack")
5086 (assoc-ref inputs "lapack"))))
5087 #t))
5088 (add-before 'build 'fix-executable-paths
5089 (lambda* (#:key inputs #:allow-other-keys)
5090 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5091 ;; instead of /bin/sh.
5092 (substitute* "numpy/distutils/exec_command.py"
5093 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
5094 (string-append match-start (assoc-ref inputs "bash") match-end)))
5095 ;; Use "gcc" executable, not "cc".
5096 (substitute* "numpy/distutils/system_info.py"
5097 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5098 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
5099 #t))
5100 ;; Tests can only be run after the library has been installed and not
5101 ;; within the source directory.
5102 (delete 'check)
5103 (add-after 'install 'check
5104 (lambda* (#:key outputs inputs #:allow-other-keys)
5105 ;; Make installed package available for running the tests
5106 (add-installed-pythonpath inputs outputs)
5107 ;; Make sure "f2py" etc is found.
5108 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5109 ":" (getenv "PATH")))
5110 (with-directory-excursion "/tmp"
5111 (invoke "python" "-c"
5112 "import numpy; numpy.test(verbose=2)")))))))
5113 (home-page "https://numpy.org")
5114 (synopsis "Fundamental package for scientific computing with Python")
5115 (description "NumPy is the fundamental package for scientific computing
5116 with Python. It contains among other things: a powerful N-dimensional array
5117 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5118 and Fortran code, useful linear algebra, Fourier transform, and random number
5119 capabilities.")
5120 (properties `((python2-variant . ,(delay python2-numpy))))
5121 (license license:bsd-3)))
5122
5123 ;; Numpy 1.16.x are the last versions that support Python 2.
5124 (define-public python2-numpy
5125 (let ((numpy (package-with-python2
5126 (strip-python2-variant python-numpy))))
5127 (package
5128 (inherit numpy)
5129 (version "1.16.5")
5130 (source (origin
5131 (method url-fetch)
5132 (uri (string-append
5133 "https://github.com/numpy/numpy/releases/download/v"
5134 version "/numpy-" version ".tar.gz"))
5135 (sha256
5136 (base32
5137 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5138
5139 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5140 ;; interest only for legacy code going back to NumPy's predecessor
5141 ;; Numeric.
5142 (define-public python2-numpy-1.8
5143 (package (inherit python2-numpy)
5144 (version "1.8.2")
5145 (source
5146 (origin
5147 (method git-fetch)
5148 (uri (git-reference
5149 (url "https://github.com/numpy/numpy")
5150 (commit (string-append "v" version))))
5151 (file-name (git-file-name "numpy" version))
5152 (sha256
5153 (base32
5154 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5155 (arguments
5156 (substitute-keyword-arguments (package-arguments python2-numpy)
5157 ((#:phases phases)
5158 `(modify-phases ,phases
5159 (replace 'configure-blas-lapack
5160 (lambda* (#:key inputs #:allow-other-keys)
5161 (call-with-output-file "site.cfg"
5162 (lambda (port)
5163 (format port
5164 "[openblas]
5165 libraries = openblas,lapack
5166 library_dirs = ~a/lib:~a/lib
5167 include_dirs = ~a/include:~a/include
5168 "
5169 (assoc-ref inputs "openblas")
5170 (assoc-ref inputs "lapack")
5171 (assoc-ref inputs "openblas")
5172 (assoc-ref inputs "lapack"))))
5173 #t))))))
5174 (native-inputs
5175 `(("python2-nose" ,python2-nose)))
5176 (description "NumPy is the fundamental package for scientific computing
5177 with Python. It contains among other things: a powerful N-dimensional array
5178 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5179 and Fortran code, useful linear algebra, Fourier transform, and random number
5180 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5181 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5182 Numeric.")
5183 (license license:bsd-3)))
5184
5185 (define-public python-munch
5186 (package
5187 (name "python-munch")
5188 (version "2.0.4")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (pypi-uri "munch" version))
5193 (sha256
5194 (base32
5195 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5196 (build-system python-build-system)
5197 (home-page "https://github.com/Infinidat/munch")
5198 (synopsis "Dot-accessible dictionary")
5199 (description "Munch is a dot-accessible dictionary similar to JavaScript
5200 objects.")
5201 (license license:expat)))
5202
5203 (define-public python2-munch
5204 (package-with-python2 python-munch))
5205
5206 (define-public python-colormath
5207 (package
5208 (name "python-colormath")
5209 (version "3.0.0")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "colormath" version))
5214 (sha256
5215 (base32
5216 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5217 (build-system python-build-system)
5218 (propagated-inputs
5219 `(("python-networkx" ,python-networkx)
5220 ("python-numpy" ,python-numpy)))
5221 (home-page "https://github.com/gtaylor/python-colormath")
5222 (synopsis "Color math and conversion library")
5223 (description
5224 "This is a Python library for color math and conversions.")
5225 (license license:bsd-3)))
5226
5227 (define-public python2-colormath
5228 (package-with-python2 python-colormath))
5229
5230 (define-public python-sparse
5231 (package
5232 (name "python-sparse")
5233 (version "0.12.0")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (pypi-uri "sparse" version))
5238 (sha256
5239 (base32
5240 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5241 (build-system python-build-system)
5242 (arguments
5243 `(#:phases
5244 (modify-phases %standard-phases
5245 (replace 'check
5246 (lambda* (#:key tests? #:allow-other-keys)
5247 (when tests?
5248 (invoke "python" "-m" "pytest" "-v")))))))
5249 (propagated-inputs
5250 `(("python-numba" ,python-numba)
5251 ("python-numpy" ,python-numpy)
5252 ("python-scipy" ,python-scipy)))
5253 (native-inputs
5254 `(("python-dask" ,python-dask)
5255 ("python-pytest" ,python-pytest)
5256 ("python-pytest-black" ,python-pytest-black)
5257 ("python-pytest-cov" ,python-pytest-cov)))
5258 (home-page "https://github.com/pydata/sparse/")
5259 (synopsis "Library for multi-dimensional sparse arrays")
5260 (description
5261 "This package implements sparse arrays of arbitrary dimension on top of
5262 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5263 of the elements are zero. @code{python-sparse} generalizes the
5264 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5265 extends beyond just rows and columns to an arbitrary number of dimensions.
5266 Additionally, this project maintains compatibility with the
5267 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5268 used in @code{scipy.sparse}. These differences make this project useful in
5269 certain situations where @code{scipy.sparse} matrices are not well suited, but
5270 it should not be considered a full replacement. It lacks layouts that are not
5271 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5272 depends on @code{scipy.sparse} for some computations.")
5273 (license license:bsd-3)))
5274
5275 (define-public python-spectra
5276 (package
5277 (name "python-spectra")
5278 (version "0.0.11")
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (pypi-uri "spectra" version))
5283 (sha256
5284 (base32
5285 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5286 (build-system python-build-system)
5287 (arguments
5288 `(#:phases
5289 (modify-phases %standard-phases
5290 (replace 'check
5291 (lambda _ (invoke "nosetests" "-v"))))))
5292 (propagated-inputs
5293 `(("python-colormath" ,python-colormath)))
5294 (native-inputs
5295 `(("python-nose" ,python-nose)))
5296 (home-page "https://github.com/jsvine/spectra")
5297 (synopsis "Color scales and color conversion")
5298 (description
5299 "This package provides a Python library intended to make color math,
5300 color scales, and color space conversion easy. It has support for:
5301
5302 @enumerate
5303 @item Color scales
5304 @item Color ranges
5305 @item Color blending
5306 @item Brightening/darkening colors
5307 @item Saturating/desaturating colors
5308 @item Conversion to/from multiple color spaces.
5309 @end enumerate\n")
5310 (license license:expat)))
5311
5312 (define-public python2-spectra
5313 (package-with-python2 python-spectra))
5314
5315 (define-public python-pyspnego
5316 (package
5317 (name "python-pyspnego")
5318 (version "0.1.6")
5319 (source
5320 (origin
5321 (method git-fetch) ;no tests in PyPI release
5322 (uri (git-reference
5323 (url "https://github.com/jborean93/pyspnego")
5324 (commit (string-append "v" version))))
5325 (file-name (git-file-name name version))
5326 (sha256
5327 (base32
5328 "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
5329 (build-system python-build-system)
5330 (arguments
5331 `(#:phases (modify-phases %standard-phases
5332 (replace 'check
5333 (lambda* (#:key tests? #:allow-other-keys)
5334 (when tests?
5335 (invoke "pytest")))))))
5336 (native-inputs
5337 `(("python-pytest" ,python-pytest)
5338 ("python-pytest-mock" ,python-pytest-mock)))
5339 (propagated-inputs
5340 `(("python-cryptography" ,python-cryptography)
5341 ("python-gssapi" ,python-gssapi)
5342 ("python-ruamel.yaml" ,python-ruamel.yaml)))
5343 (home-page "https://github.com/jborean93/pyspnego")
5344 (synopsis "Python SPNEGO library")
5345 (description "The @code{pyspnego} Python library handles Negotiate, NTLM,
5346 Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet
5347 parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human
5348 readable format.")
5349 (license license:expat)))
5350
5351 (define-public python-numpy-documentation
5352 (package
5353 (name "python-numpy-documentation")
5354 (version (package-version python-numpy))
5355 (source (package-source python-numpy))
5356 (build-system python-build-system)
5357 (native-inputs
5358 `(("python-matplotlib" ,python-matplotlib)
5359 ("python-numpy" ,python-numpy)
5360 ("pkg-config" ,pkg-config)
5361 ("python-sphinx" ,python-sphinx)
5362 ("python-numpydoc" ,python-numpydoc)
5363 ("texlive" ,(texlive-updmap.cfg (list texlive-cm-super
5364 texlive-fonts-ec
5365 texlive-generic-iftex
5366 texlive-pdftex
5367 texlive-amsfonts
5368 texlive-latex-capt-of
5369 texlive-latex-cmap
5370 texlive-latex-environ
5371 texlive-latex-eqparbox
5372 texlive-etoolbox
5373 texlive-latex-expdlist
5374 texlive-latex-fancyhdr
5375 texlive-latex-fancyvrb
5376 texlive-latex-fncychap
5377 texlive-latex-float
5378 texlive-latex-framed
5379 texlive-latex-geometry
5380 texlive-latex-graphics
5381 texlive-hyperref
5382 texlive-latex-mdwtools
5383 texlive-latex-multirow
5384 texlive-latex-needspace
5385 texlive-oberdiek
5386 texlive-latex-parskip
5387 texlive-latex-preview
5388 texlive-latex-tabulary
5389 texlive-latex-threeparttable
5390 texlive-latex-titlesec
5391 texlive-latex-trimspaces
5392 texlive-latex-ucs
5393 texlive-latex-upquote
5394 texlive-url
5395 texlive-latex-varwidth
5396 texlive-latex-wrapfig)))
5397 ("texinfo" ,texinfo)
5398 ("perl" ,perl)
5399 ("scipy-sphinx-theme"
5400 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5401 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5402 (method git-fetch)
5403 (uri (git-reference
5404 (url "https://github.com/scipy/scipy-sphinx-theme")
5405 (commit commit)))
5406 (file-name (git-file-name "python-scipy-sphinx-theme"
5407 (string-take commit 7)))
5408 (sha256
5409 (base32
5410 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5411 ,@(package-native-inputs python-numpy)))
5412 (arguments
5413 `(#:tests? #f ; we're only generating the documentation
5414 #:phases
5415 (modify-phases %standard-phases
5416 (delete 'build)
5417 (replace 'install
5418 (lambda* (#:key inputs outputs #:allow-other-keys)
5419 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5420 (doc (string-append
5421 data "/doc/" ,name "-"
5422 ,(package-version python-numpy)))
5423 (info-reader (string-append data "/info"))
5424 (html (string-append doc "/html"))
5425 (scipy-sphinx-theme "scipy-sphinx-theme")
5426 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5427 (pyver ,(string-append "PYVER=")))
5428
5429 ;; FIXME: this is needed to for texlive-updmap.cfg to generate
5430 ;; fonts, which are not found.
5431 (setenv "HOME" "/tmp")
5432
5433 (with-directory-excursion "doc"
5434 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5435 (mkdir-p html)
5436 (invoke "make" "html" pyver)
5437 (invoke "make" "latex" "PAPER=a4" pyver)
5438 (invoke "make" "-C" "build/latex"
5439 "all-pdf" "PAPER=a4" pyver)
5440 ;; FIXME: Generation of the info file fails.
5441 ;; (invoke "make" "info" pyver)
5442 ;; (mkdir-p info)
5443 ;; (copy-file "build/texinfo/numpy.info"
5444 ;; (string-append info "/numpy.info"))
5445 (for-each (lambda (file)
5446 (copy-file (string-append "build/latex" file)
5447 (string-append doc file)))
5448 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5449 (with-directory-excursion "build/html"
5450 (for-each (lambda (file)
5451 (let* ((dir (dirname file))
5452 (tgt-dir (string-append html "/" dir)))
5453 (unless (equal? "." dir)
5454 (mkdir-p tgt-dir))
5455 (install-file file html)))
5456 (find-files "." ".*")))))
5457 #t)))))
5458 (home-page (package-home-page python-numpy))
5459 (synopsis "Documentation for the python-numpy package")
5460 (description (package-description python-numpy))
5461 (license (package-license python-numpy))))
5462
5463 (define-public python-pygit2
5464 (package
5465 (name "python-pygit2")
5466 (version "1.6.0")
5467 (source
5468 (origin
5469 (method url-fetch)
5470 (uri (pypi-uri "pygit2" version))
5471 (sha256
5472 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5473 (build-system python-build-system)
5474 (arguments
5475 '(#:tests? #f)) ; tests don't run correctly in our environment
5476 (propagated-inputs
5477 `(("python-cached-property" ,python-cached-property)
5478 ("python-cffi" ,python-cffi)
5479 ("libgit2" ,libgit2)))
5480 (native-inputs
5481 `(("python-pytest" ,python-pytest)))
5482 (home-page "https://github.com/libgit2/pygit2")
5483 (synopsis "Python bindings for libgit2")
5484 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5485 library, libgit2 implements Git plumbing.")
5486 ;; GPL2.0 only, with linking exception.
5487 (license license:gpl2)))
5488
5489 (define-public python-patiencediff
5490 (package
5491 (name "python-patiencediff")
5492 (version "0.2.0")
5493 (source
5494 (origin
5495 (method url-fetch)
5496 (uri (pypi-uri "patiencediff" version))
5497 (sha256
5498 (base32
5499 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5500 (build-system python-build-system)
5501 (home-page "https://www.breezy-vcs.org/")
5502 (synopsis "Python implementation of the patiencediff algorithm")
5503 (description
5504 "This package contains a Python implementation of the @code{patiencediff}
5505 algorithm. Patiencediff provides a good balance of performance, nice output for
5506 humans, and implementation simplicity.")
5507 (license license:gpl2)))
5508
5509 (define-public python-pdftotext
5510 (package
5511 (name "python-pdftotext")
5512 (version "2.1.6")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (pypi-uri "pdftotext" version))
5517 (sha256
5518 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5519 (build-system python-build-system)
5520 (inputs
5521 `(("poppler" ,poppler)))
5522 (home-page "https://github.com/jalan/pdftotext")
5523 (synopsis "Simple PDF text extraction")
5524 (description "Pdftotext is a Python library of PDF text extraction.")
5525 (license license:expat)))
5526
5527 (define-public python-pyparsing
5528 (package
5529 (name "python-pyparsing")
5530 (version "2.4.6")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (pypi-uri "pyparsing" version))
5535 (sha256
5536 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5537 (build-system python-build-system)
5538 (outputs '("out" "doc"))
5539 (arguments
5540 `(#:tests? #f ; no test target
5541 #:phases
5542 (modify-phases %standard-phases
5543 (add-after 'install 'install-doc
5544 (lambda* (#:key outputs #:allow-other-keys)
5545 (let* ((doc (string-append (assoc-ref outputs "doc")
5546 "/share/doc/" ,name "-" ,version))
5547 (html-doc (string-append doc "/html"))
5548 (examples (string-append doc "/examples")))
5549 (mkdir-p html-doc)
5550 (mkdir-p examples)
5551 (for-each
5552 (lambda (dir tgt)
5553 (map (lambda (file)
5554 (install-file file tgt))
5555 (find-files dir ".*")))
5556 (list "docs" "htmldoc" "examples")
5557 (list doc html-doc examples))
5558 #t))))))
5559 (home-page "https://github.com/pyparsing/pyparsing")
5560 (synopsis "Python parsing class library")
5561 (description
5562 "The pyparsing module is an alternative approach to creating and
5563 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5564 of regular expressions. The pyparsing module provides a library of classes
5565 that client code uses to construct the grammar directly in Python code.")
5566 (license license:expat)))
5567
5568 (define-public python2-pyparsing
5569 (package-with-python2 python-pyparsing))
5570
5571 (define-public python-pyparsing-2.4.7
5572 (package
5573 (inherit python-pyparsing)
5574 (version "2.4.7")
5575 (source
5576 (origin
5577 (method url-fetch)
5578 (uri (pypi-uri "pyparsing" version))
5579 (sha256
5580 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5581
5582 (define-public python-numpydoc
5583 (package
5584 (name "python-numpydoc")
5585 (version "0.8.0")
5586 (source
5587 (origin
5588 (method url-fetch)
5589 (uri (pypi-uri "numpydoc" version))
5590 (sha256
5591 (base32
5592 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5593 (build-system python-build-system)
5594 (propagated-inputs
5595 `(("python-sphinx" ,python-sphinx)))
5596 (native-inputs
5597 `(("python-nose" ,python-nose)))
5598 (home-page "https://pypi.org/project/numpydoc/")
5599 (synopsis
5600 "Numpy's Sphinx extensions")
5601 (description
5602 "Sphinx extension to support docstrings in Numpy format.")
5603 (license license:bsd-2)
5604 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5605
5606 (define-public python2-numpydoc
5607 (let ((base (package-with-python2
5608 (strip-python2-variant python-numpydoc))))
5609 (package/inherit base
5610 (propagated-inputs
5611 `(("python2-jinja2" ,python2-jinja2)
5612 ,@(package-propagated-inputs base))))))
5613
5614 (define-public python-numexpr
5615 (package
5616 (name "python-numexpr")
5617 (version "2.7.3")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 (uri (pypi-uri "numexpr" version))
5622 (sha256
5623 (base32
5624 "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
5625 (build-system python-build-system)
5626 (arguments `(#:tests? #f)) ; no tests included
5627 (propagated-inputs
5628 `(("python-numpy" ,python-numpy)))
5629 (home-page "https://github.com/pydata/numexpr")
5630 (synopsis "Fast numerical expression evaluator for NumPy")
5631 (description
5632 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5633 expressions that operate on arrays are accelerated and use less memory than
5634 doing the same calculation in Python. In addition, its multi-threaded
5635 capabilities can make use of all your cores, which may accelerate
5636 computations, most specially if they are not memory-bounded (e.g. those using
5637 transcendental functions).")
5638 (license license:expat)))
5639
5640 (define-public python2-numexpr
5641 (package-with-python2 python-numexpr))
5642
5643 (define-public python-cycler
5644 (package
5645 (name "python-cycler")
5646 (version "0.10.0")
5647 (source (origin
5648 (method url-fetch)
5649 (uri (pypi-uri "cycler" version))
5650 (sha256
5651 (base32
5652 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5653 (build-system python-build-system)
5654 (arguments
5655 ;; XXX: The current version requires 'coveralls' which we don't have.
5656 ;; Enable this for the next release which uses 'python-pytest'.
5657 '(#:tests? #f))
5658 (propagated-inputs
5659 `(("python-six" ,python-six)))
5660 (home-page "https://matplotlib.org/cycler/")
5661 (synopsis "Composable keyword argument iterator")
5662 (description
5663 "When using @code{matplotlib} and plotting more than one line, it is
5664 common to want to be able to want to be able to cycle over one or more artist
5665 styles; but the plotting logic can quickly become involved.
5666 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5667 @code{Cycler} class was developed.")
5668 (license license:bsd-3)))
5669
5670 (define-public python2-cycler
5671 (package-with-python2 python-cycler))
5672
5673 (define-public python-colorspacious
5674 (package
5675 (name "python-colorspacious")
5676 (version "1.1.2")
5677 (source
5678 (origin
5679 (method git-fetch)
5680 (uri (git-reference
5681 (url "https://github.com/njsmith/colorspacious")
5682 (commit (string-append "v" version))))
5683 (file-name (git-file-name name version))
5684 (sha256
5685 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5686 (build-system python-build-system)
5687 (propagated-inputs
5688 `(("python-numpy" ,python-numpy)))
5689 (native-inputs
5690 `(("python-nose" ,python-nose)))
5691 (arguments
5692 `(#:phases
5693 (modify-phases %standard-phases
5694 (replace 'check
5695 (lambda _
5696 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5697 (home-page "https://github.com/njsmith/colorspacious")
5698 (synopsis "Python library for colorspace conversions")
5699 (description "@code{colorspacious} is a Python library that lets you
5700 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5701 (license license:expat)))
5702
5703 (define-public python2-colorspacious
5704 (package-with-python2 python-colorspacious))
5705
5706 (define-public python-matplotlib
5707 (package
5708 (name "python-matplotlib")
5709 (version "3.4.3")
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (pypi-uri "matplotlib" version))
5714 (sha256
5715 (base32 "06032j0ccjxldx4z9kf97qps2g36mfgvy1nap3b9n75kzmnm4kzw"))))
5716 (build-system python-build-system)
5717 (propagated-inputs ; the following packages are all needed at run time
5718 `(("python-cycler" ,python-cycler)
5719 ("python-kiwisolver" ,python-kiwisolver)
5720 ("python-pyparsing" ,python-pyparsing)
5721 ("python-pygobject" ,python-pygobject)
5722 ("python-certifi" ,python-certifi)
5723 ("gobject-introspection" ,gobject-introspection)
5724 ("python-tkinter" ,python "tk")
5725 ("python-dateutil" ,python-dateutil)
5726 ("python-numpy" ,python-numpy)
5727 ("python-pillow" ,python-pillow)
5728 ("python-pytz" ,python-pytz)
5729 ("python-six" ,python-six)
5730 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5731 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5732 ;; object. For this reason we need to import both libraries.
5733 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5734 ("python-pycairo" ,python-pycairo)
5735 ("python-cairocffi" ,python-cairocffi)))
5736 (inputs
5737 `(("libpng" ,libpng)
5738 ("freetype" ,freetype)
5739 ("qhull" ,qhull)
5740 ("cairo" ,cairo)
5741 ("glib" ,glib)
5742 ;; FIXME: Add backends when available.
5743 ;("python-wxpython" ,python-wxpython)
5744 ("tcl" ,tcl)
5745 ("tk" ,tk)))
5746 (native-inputs
5747 `(("pkg-config" ,pkg-config)
5748 ("python-pytest" ,python-pytest)
5749 ("python-mock" ,python-mock)
5750 ("python-wheel" ,python-wheel)
5751 ("unzip" ,unzip)
5752 ("jquery-ui"
5753 ,(origin
5754 (method url-fetch)
5755 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5756 (sha256
5757 (base32
5758 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5759 (arguments
5760 `(#:phases
5761 (modify-phases %standard-phases
5762 ;; XXX We disable all image comparison tests because we're using a
5763 ;; newer version of FreeType than matplotlib expects. This leads to
5764 ;; minor differences throughout the tests.
5765 (add-after 'unpack 'fix-and-disable-failing-tests
5766 (lambda _
5767 (substitute* (append (find-files "lib/matplotlib/tests/"
5768 "test_.*\\.py$")
5769 (find-files "lib/mpl_toolkits/tests"
5770 "test_.*\\.py$"))
5771 (("^from matplotlib" match)
5772 (string-append "import pytest\n" match))
5773 (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
5774 indent)
5775 (string-append indent
5776 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5777 match)))
5778 (substitute* "lib/matplotlib/tests/test_animation.py"
5779 (("/bin/sh") (which "sh")))
5780 (for-each delete-file
5781 ;; test_normal_axes, test_get_tightbbox_polar
5782 '("lib/matplotlib/tests/test_axes.py"
5783 "lib/matplotlib/tests/test_polar.py"
5784 ;; We don't use the webagg backend and this test
5785 ;; forces it.
5786 "lib/matplotlib/tests/test_backend_webagg.py"
5787 ;; test_outward_ticks
5788 "lib/matplotlib/tests/test_tightlayout.py"
5789 ;; test_hidden_axes fails with minor extent
5790 ;; differences, possibly due to the use of a
5791 ;; different version of FreeType.
5792 "lib/matplotlib/tests/test_constrainedlayout.py"
5793 ;; Fontconfig returns no fonts.
5794 "lib/matplotlib/tests/test_font_manager.py"))
5795 #t))
5796 (add-before 'install 'install-jquery-ui
5797 (lambda* (#:key outputs inputs #:allow-other-keys)
5798 (let* ((python-version (python-version
5799 (assoc-ref inputs "python")))
5800 (dir
5801 (string-append (assoc-ref outputs "out")
5802 "/lib/python" python-version
5803 "/site-packages"
5804 "/matplotlib/backends/web_backend/")))
5805 (mkdir-p dir)
5806 (invoke "unzip"
5807 (assoc-ref inputs "jquery-ui")
5808 "-d" dir))
5809 #t))
5810 (replace 'check
5811 (lambda* (#:key outputs inputs #:allow-other-keys)
5812 (add-installed-pythonpath inputs outputs)
5813 (invoke "python" "tests.py" "-v"
5814 "-m" "not network and not webagg")))
5815 (add-before 'build 'configure-environment
5816 (lambda* (#:key outputs inputs #:allow-other-keys)
5817 (let ((cairo (assoc-ref inputs "cairo")))
5818 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5819 ;; has not effect.
5820 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5821 (setenv "HOME" (getcwd))
5822 ;; Fix rounding errors when using the x87 FPU.
5823 (when (string-prefix? "i686" ,(%current-system))
5824 (setenv "CFLAGS" "-ffloat-store"))
5825 (call-with-output-file "setup.cfg"
5826 (lambda (port)
5827 (format port "[libs]~%
5828 system_freetype = true
5829 system_qhull = true
5830 [directories]~%
5831 basedirlist = ~a,~a~%
5832 [packages]~%
5833 tests = True~%"
5834 (assoc-ref inputs "tcl")
5835 (assoc-ref inputs "tk")))))
5836 #t)))))
5837 (home-page "https://matplotlib.org/")
5838 (synopsis "2D plotting library for Python")
5839 (description
5840 "Matplotlib is a Python 2D plotting library which produces publication
5841 quality figures in a variety of hardcopy formats and interactive environments
5842 across platforms. Matplotlib can be used in Python scripts, the python and
5843 ipython shell, web application servers, and six graphical user interface
5844 toolkits.")
5845 (license license:psfl)
5846 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5847
5848 (define-public python2-matplotlib
5849 (let ((matplotlib (package-with-python2
5850 (strip-python2-variant python-matplotlib))))
5851 (package (inherit matplotlib)
5852 (version "2.2.4")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "matplotlib" version))
5857 (sha256
5858 (base32
5859 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5860 (arguments
5861 (substitute-keyword-arguments (package-arguments matplotlib)
5862 ((#:phases phases)
5863 `(modify-phases ,phases
5864 (replace 'install-jquery-ui
5865 (lambda* (#:key outputs inputs #:allow-other-keys)
5866 (let ((dir (string-append (assoc-ref outputs "out")
5867 "/lib/python2.7/site-packages/"
5868 "matplotlib/backends/web_backend/")))
5869 (mkdir-p dir)
5870 (invoke "unzip"
5871 (assoc-ref inputs "jquery-ui")
5872 "-d" dir))
5873 #t))
5874 (delete 'fix-and-disable-failing-tests)
5875 (delete 'check))))) ; These tests weren't run the the past.
5876 ;; Make sure to use special packages for Python 2 instead
5877 ;; of those automatically rewritten by package-with-python2.
5878 (propagated-inputs
5879 `(("python2-pycairo" ,python2-pycairo)
5880 ("python2-backports-functools-lru-cache"
5881 ,python2-backports-functools-lru-cache)
5882 ("python2-functools32" ,python2-functools32)
5883 ("python2-pygobject-2" ,python2-pygobject-2)
5884 ("python2-subprocess32" ,python2-subprocess32)
5885 ("python2-tkinter" ,python-2 "tk")
5886 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5887 '("python-cairocffi"
5888 "python-pycairo"
5889 "python-pygobject"
5890 "python-tkinter")))))))
5891
5892 (define-public python-matplotlib-documentation
5893 (package
5894 (name "python-matplotlib-documentation")
5895 (version (package-version python-matplotlib))
5896 (source (package-source python-matplotlib))
5897 (build-system python-build-system)
5898 (native-inputs
5899 `(("python-matplotlib" ,python-matplotlib)
5900 ("python-colorspacious" ,python-colorspacious)
5901 ("python-sphinx" ,python-sphinx)
5902 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5903 ("python-sphinx-gallery" ,python-sphinx-gallery)
5904 ("python-numpydoc" ,python-numpydoc)
5905 ("python-ipython" ,python-ipython)
5906 ("python-ipykernel" ,python-ipykernel)
5907 ("python-mock" ,python-mock)
5908 ("graphviz" ,graphviz)
5909 ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
5910 texlive-latex-amsmath
5911 texlive-latex-enumitem
5912 texlive-latex-expdlist
5913 texlive-latex-geometry
5914 texlive-latex-preview
5915 texlive-latex-type1cm
5916 texlive-latex-ucs
5917
5918 texlive-pdftex
5919
5920 texlive-fonts-ec
5921 texlive-times
5922 texlive-txfonts)))
5923 ("texinfo" ,texinfo)
5924 ,@(package-native-inputs python-matplotlib)))
5925 (arguments
5926 `(#:tests? #f ; we're only generating documentation
5927 #:phases
5928 (modify-phases %standard-phases
5929 ;; The tests in python-matplotlib are run after the install phase, so
5930 ;; we need to delete the extra phase here.
5931 (delete 'check)
5932 (replace 'build
5933 (lambda _
5934 (chdir "doc")
5935 (setenv "PYTHONPATH" "../examples/units")
5936 (substitute* "conf.py"
5937 ;; Don't use git.
5938 (("^SHA = check_output.*")
5939 (string-append "SHA = \"" ,version "\"\n"))
5940 ;; Don't fetch intersphinx files from the Internet
5941 (("^explicit_order_folders" m)
5942 (string-append "intersphinx_mapping = {}\n" m))
5943 (("'sphinx.ext.intersphinx',") "")
5944 ;; Disable URL embedding which requires internet access.
5945 (("'https://docs.scipy.org/doc/numpy'") "None")
5946 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5947 (invoke "make"
5948 "SPHINXBUILD=sphinx-build"
5949 "SPHINXOPTS=" ; don't abort on warnings
5950 "html" "texinfo")))
5951 (replace 'install
5952 (lambda* (#:key inputs outputs #:allow-other-keys)
5953 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5954 (doc (string-append data "/doc/python-matplotlib-" ,version))
5955 (info (string-append data "/info"))
5956 (html (string-append doc "/html")))
5957 (mkdir-p html)
5958 (mkdir-p info)
5959 (copy-recursively "build/html" html)
5960 (symlink (string-append html "/_images")
5961 (string-append info "/matplotlib-figures"))
5962 (with-directory-excursion "build/texinfo"
5963 (substitute* "matplotlib.texi"
5964 (("@image\\{([^,]*)" all file)
5965 (string-append "@image{matplotlib-figures/" file)))
5966 (symlink (string-append html "/_images")
5967 "./matplotlib-figures")
5968 (invoke "makeinfo" "--no-split"
5969 "-o" "matplotlib.info" "matplotlib.texi"))
5970 (install-file "build/texinfo/matplotlib.info" info)))))))
5971 (home-page (package-home-page python-matplotlib))
5972 (synopsis "Documentation for the python-matplotlib package")
5973 (description (package-description python-matplotlib))
5974 (license (package-license python-matplotlib))))
5975
5976 (define-public python-matplotlib-venn
5977 (package
5978 (name "python-matplotlib-venn")
5979 (version "0.11.5")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5984 (sha256
5985 (base32
5986 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5987 (build-system python-build-system)
5988 (arguments '(#:tests? #f)) ; tests are not included
5989 (propagated-inputs
5990 `(("python-matplotlib" ,python-matplotlib)
5991 ("python-numpy" ,python-numpy)
5992 ("python-scipy" ,python-scipy)))
5993 (native-inputs
5994 `(("unzip" ,unzip)))
5995 (home-page "https://github.com/konstantint/matplotlib-venn")
5996 (synopsis "Plot area-proportional Venn diagrams")
5997 (description
5998 "This package provides tools for plotting area-proportional two- and
5999 three-way Venn diagrams in @code{matplotlib}.")
6000 (license license:expat)))
6001
6002 (define-public python-pysnptools
6003 (package
6004 (name "python-pysnptools")
6005 (version "0.4.11")
6006 (source
6007 (origin
6008 (method url-fetch)
6009 (uri (pypi-uri "pysnptools" version))
6010 (sha256
6011 (base32
6012 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
6013 (build-system python-build-system)
6014 (arguments
6015 `(#:tests? #f ; no test data are included
6016 #:phases
6017 (modify-phases %standard-phases
6018 (replace 'check
6019 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6020 (if tests?
6021 (begin
6022 (add-installed-pythonpath inputs outputs)
6023 (invoke "python3" "pysnptools/test.py"))
6024 #t))))))
6025 (propagated-inputs
6026 `(("python-dill" ,python-dill)
6027 ("python-h5py" ,python-h5py)
6028 ("python-numpy" ,python-numpy)
6029 ("python-pandas" ,python-pandas)
6030 ("python-psutil" ,python-psutil)
6031 ("python-scipy" ,python-scipy)))
6032 (native-inputs
6033 `(("python-cython" ,python-cython)))
6034 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
6035 (synopsis "Library for reading and manipulating genetic data")
6036 (description
6037 "PySnpTools is a library for reading and manipulating genetic data. It
6038 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
6039 those files. It can also efficiently manipulate ranges of integers using set
6040 operators such as union, intersection, and difference.")
6041 (license license:asl2.0)))
6042
6043 (define-public python2-pysnptools
6044 (package-with-python2 python-pysnptools))
6045
6046 (define-public python-pykdtree
6047 (package
6048 (name "python-pykdtree")
6049 (version "1.3.4")
6050 (source
6051 (origin
6052 (method url-fetch)
6053 (uri (pypi-uri "pykdtree" version))
6054 (sha256
6055 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
6056 (build-system python-build-system)
6057 (native-inputs
6058 `(("python-nose" ,python-nose)))
6059 (propagated-inputs
6060 `(("python-numpy" ,python-numpy)))
6061 (home-page "https://github.com/storpipfugl/pykdtree")
6062 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
6063 (description
6064 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
6065 search in Python.")
6066 (license license:lgpl3+)))
6067
6068 (define-public python-wurlitzer
6069 (package
6070 (name "python-wurlitzer")
6071 (version "2.0.1")
6072 (source
6073 (origin
6074 (method url-fetch)
6075 (uri (pypi-uri "wurlitzer" version))
6076 (sha256
6077 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
6078 (build-system python-build-system)
6079 (arguments
6080 '(#:phases
6081 (modify-phases %standard-phases
6082 (replace 'check
6083 (lambda _
6084 (invoke "pytest" "-vv" "test.py"))))))
6085 (native-inputs
6086 `(("python-mock" ,python-mock)
6087 ("python-pytest" ,python-pytest)))
6088 (home-page "https://github.com/minrk/wurlitzer")
6089 (synopsis "Capture C-level output in context managers")
6090 (description
6091 "This library helps to redirect @code{sys.stdout} to a stream or a file
6092 while executing some piece of code, including C code running within a Python
6093 process.")
6094 (license license:expat)))
6095
6096 (define-public python-socksipy-branch
6097 (package
6098 (name "python-socksipy-branch")
6099 (version "1.01")
6100 (source
6101 (origin
6102 (method url-fetch)
6103 (uri (pypi-uri "SocksiPy-branch" version))
6104 (sha256
6105 (base32
6106 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
6107 (build-system python-build-system)
6108 (arguments
6109 `(#:tests? #f)) ; There are no tests
6110 (home-page "https://code.google.com/archive/p/socksipy-branch/")
6111 (synopsis "Python SOCKS module")
6112 (description
6113 "SocksiPy - A Python SOCKS client module. It provides a
6114 socket-like interface that supports connections to any TCP
6115 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
6116 The original version was developed by Dan Haim, this is a
6117 branch created by Mario Vilas to address some open issues,
6118 as the original project seems to have been abandoned circa 2007.")
6119 (license license:bsd-3)))
6120
6121 (define-public python2-socksipy-branch
6122 (package-with-python2 python-socksipy-branch))
6123
6124 (define-public python-socksipychain
6125 (package
6126 (name "python-socksipychain")
6127 (version "2.1.2")
6128 (source
6129 (origin
6130 (method git-fetch)
6131 (uri (git-reference
6132 (url "https://github.com/pagekite/PySocksipyChain")
6133 (commit (string-append "v" version))))
6134 (file-name (git-file-name name version))
6135 (sha256
6136 (base32
6137 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
6138 (build-system python-build-system)
6139 (arguments
6140 `(#:tests? #f)) ; Tests try to access the network.
6141 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
6142 (synopsis "Python SOCKS module with chained proxies support")
6143 (description
6144 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6145 adds support for arbitrary chaining of proxy servers and various modes of
6146 TLS/SSL encryption. It was developed for use in PageKite, and also includes
6147 a simple netcat replacement with chaining support.")
6148 (license license:bsd-3)))
6149
6150 (define-public python-pycodestyle
6151 (package
6152 (name "python-pycodestyle")
6153 (version "2.7.0")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "pycodestyle" version))
6158 (sha256
6159 (base32
6160 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
6161 (build-system python-build-system)
6162 (arguments
6163 `(#:phases
6164 (modify-phases %standard-phases
6165 (replace 'check
6166 (lambda _
6167 (invoke "pytest" "-vv"))))))
6168 (native-inputs
6169 `(("python-pytest" ,python-pytest)))
6170 (home-page "https://pycodestyle.readthedocs.io/")
6171 (synopsis "Python style guide checker")
6172 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6173 Python code against some of the style conventions in
6174 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6175 (license license:expat)))
6176
6177 (define-public python2-pycodestyle
6178 (package-with-python2 python-pycodestyle))
6179
6180 (define-public python-pycodestyle-2.6
6181 (package
6182 (inherit python-pycodestyle)
6183 (version "2.6.0")
6184 (source (origin
6185 (method url-fetch)
6186 (uri (pypi-uri "pycodestyle" version))
6187 (sha256
6188 (base32
6189 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6190
6191 (define-public python-multidict
6192 (package
6193 (name "python-multidict")
6194 (version "4.7.5")
6195 (source
6196 (origin
6197 (method url-fetch)
6198 (uri (pypi-uri "multidict" version))
6199 (sha256
6200 (base32
6201 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6202 (build-system python-build-system)
6203 (arguments
6204 '(#:phases (modify-phases %standard-phases
6205 (replace 'check
6206 (lambda* (#:key tests? #:allow-other-keys)
6207 (if tests?
6208 (invoke "pytest" "-vv")
6209 (format #t "test suite not run~%")))))))
6210 (native-inputs
6211 `(("python-pytest" ,python-pytest)
6212 ("python-pytest-cov" ,python-pytest-cov)))
6213 (home-page "https://github.com/aio-libs/multidict/")
6214 (synopsis "Multidict implementation")
6215 (description "Multidict is dict-like collection of key-value pairs
6216 where key might be occurred more than once in the container.")
6217 (license license:asl2.0)))
6218
6219 (define-public python-orderedmultidict
6220 (package
6221 (name "python-orderedmultidict")
6222 (version "1.0")
6223 (source
6224 (origin
6225 (method url-fetch)
6226 (uri (pypi-uri "orderedmultidict" version))
6227 (sha256
6228 (base32
6229 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6230 (build-system python-build-system)
6231 (arguments
6232 `(#:phases
6233 (modify-phases %standard-phases
6234 (add-after 'unpack 'fix-tests
6235 (lambda _
6236 ;; The package uses nosetest for running the tests.
6237 ;; Adding this initfile allows to run the test suite
6238 ;; without requiring nosetest.
6239 (with-output-to-file "tests/__init__.py" newline)
6240 #t)))))
6241 (propagated-inputs
6242 `(("python-six" ,python-six)))
6243 (native-inputs
6244 `(("python-pycodestyle" ,python-pycodestyle)))
6245 (home-page "https://github.com/gruns/orderedmultidict")
6246 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6247 (description "This package contains a library for ordered multivalue
6248 dictionaries. A multivalue dictionary is a dictionary that can store
6249 multiple values for the same key. An ordered multivalue dictionary is a
6250 multivalue dictionary that retains the order of insertions and deletions.")
6251 (license license:unlicense)))
6252
6253 (define-public python2-orderedmultidict
6254 (package-with-python2 python-orderedmultidict))
6255
6256 (define-public python-autopep8
6257 (package
6258 (name "python-autopep8")
6259 (version "1.5.3")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (pypi-uri "autopep8" version))
6264 (sha256
6265 (base32
6266 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6267 (build-system python-build-system)
6268 (propagated-inputs
6269 `(("python-pycodestyle" ,python-pycodestyle)
6270 ("python-toml" ,python-toml)))
6271 (home-page "https://github.com/hhatto/autopep8")
6272 (synopsis "Format Python code according to the PEP 8 style guide")
6273 (description
6274 "@code{autopep8} automatically formats Python code to conform to
6275 the PEP 8 style guide. It uses the pycodestyle utility to determine
6276 what parts of the code needs to be formatted. @code{autopep8} is
6277 capable of fixing most of the formatting issues that can be reported
6278 by pycodestyle.")
6279 (license (license:non-copyleft
6280 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6281
6282 (define-public python2-autopep8
6283 (package-with-python2 python-autopep8))
6284
6285 (define-public python-distlib
6286 (package
6287 (name "python-distlib")
6288 (version "0.3.1")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "distlib" version ".zip"))
6293 (sha256
6294 (base32
6295 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
6296 (build-system python-build-system)
6297 (arguments
6298 `(#:phases
6299 (modify-phases %standard-phases
6300 (add-before 'build 'no-/bin/sh
6301 (lambda _
6302 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6303 (("/bin/sh") (which "sh")))
6304 #t))
6305 (add-before 'check 'prepare-test-env
6306 (lambda _
6307 (setenv "HOME" "/tmp")
6308 ;; NOTE: Any value works, the variable just has to be present.
6309 (setenv "SKIP_ONLINE" "1")
6310 #t)))))
6311 (native-inputs `(("unzip" ,unzip)))
6312 (home-page "https://bitbucket.org/pypa/distlib")
6313 (synopsis "Distribution utilities")
6314 (description "Distlib is a library which implements low-level functions that
6315 relate to packaging and distribution of Python software. It is intended to be
6316 used as the basis for third-party packaging tools.")
6317 (license license:psfl)))
6318
6319 (define-public python-distutils-extra
6320 (package
6321 (name "python-distutils-extra")
6322 (version "2.38")
6323 (source
6324 (origin
6325 (method url-fetch)
6326 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6327 version "/+download/python-distutils-extra-"
6328 version ".tar.gz"))
6329 (sha256
6330 (base32
6331 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6332 (build-system python-build-system)
6333 (home-page "https://launchpad.net/python-distutils-extra/")
6334 (synopsis "Enhancements to Python's distutils")
6335 (description
6336 "The python-distutils-extra module enables you to easily integrate
6337 gettext support, themed icons, and scrollkeeper-based documentation into
6338 Python's distutils.")
6339 (license license:gpl2)))
6340
6341 (define-public python2-distutils-extra
6342 (package-with-python2 python-distutils-extra))
6343
6344 (define-public python2-elib.intl
6345 (package
6346 (name "python2-elib.intl")
6347 (version "0.0.3")
6348 (source
6349 (origin
6350 ;; This project doesn't tag releases or publish tarballs, so we take
6351 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6352 (method git-fetch)
6353 (uri (git-reference
6354 (url "https://github.com/dieterv/elib.intl")
6355 (commit "d09997cfef")))
6356 (file-name (string-append name "-" version "-checkout"))
6357 (sha256
6358 (base32
6359 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6360 (build-system python-build-system)
6361 (arguments
6362 ;; incompatible with Python 3 (exception syntax)
6363 `(#:python ,python-2
6364 #:tests? #f))
6365 (home-page "https://github.com/dieterv/elib.intl")
6366 (synopsis "Enhanced internationalization for Python")
6367 (description
6368 "The elib.intl module provides enhanced internationalization (I18N)
6369 services for your Python modules and applications.")
6370 (license license:lgpl3+)))
6371
6372 (define-public python-olefile
6373 (package
6374 (name "python-olefile")
6375 (version "0.46")
6376 (source
6377 (origin
6378 (method url-fetch)
6379 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6380 "download/v" version "/olefile-" version ".tar.gz"))
6381 (file-name (string-append name "-" version ".tar.gz"))
6382 (sha256
6383 (base32
6384 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6385 (build-system python-build-system)
6386 (home-page "https://www.decalage.info/python/olefileio")
6387 (synopsis "Read and write Microsoft OLE2 files.")
6388 (description
6389 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6390 Storage or Compound Document, Microsoft Office). It is an improved version of
6391 the OleFileIO module from PIL, the Python Image Library.")
6392 (license license:bsd-3)))
6393
6394 (define-public python2-olefile
6395 (package-with-python2 python-olefile))
6396
6397 (define-public python-pikepdf
6398 (package
6399 (name "python-pikepdf")
6400 (version "2.16.1")
6401 (source
6402 (origin
6403 (method url-fetch)
6404 (uri (pypi-uri "pikepdf" version))
6405 (sha256
6406 (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
6407 (build-system python-build-system)
6408 (arguments
6409 `(#:tests? #false)) ;require python-xmp-toolkit
6410 (native-inputs
6411 `(("pybind11" ,pybind11)
6412 ("python-setuptools" ,python-setuptools)
6413 ("python-setuptools-scm" ,python-setuptools-scm)
6414 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6415 ("python-toml" ,python-toml)
6416 ("python-wheel" ,python-wheel)))
6417 (inputs
6418 `(("qpdf" ,qpdf)))
6419 (propagated-inputs
6420 `(("python-lxml" ,python-lxml)
6421 ("python-pillow" ,python-pillow)))
6422 (home-page "https://github.com/pikepdf/pikepdf")
6423 (synopsis "Read and write PDFs with Python")
6424 (description
6425 "pikepdf is a Python library for reading and writing PDF files.")
6426 (license license:mpl2.0)))
6427
6428 (define-public python-pillow
6429 (package
6430 (name "python-pillow")
6431 (version "8.1.1")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "Pillow" version))
6436 (sha256
6437 (base32
6438 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6439 (build-system python-build-system)
6440 (native-inputs
6441 `(("python-pytest" ,python-pytest)))
6442 (inputs
6443 `(("freetype" ,freetype)
6444 ("lcms" ,lcms)
6445 ("libjpeg" ,libjpeg-turbo)
6446 ("libtiff" ,libtiff)
6447 ("libwebp" ,libwebp)
6448 ("openjpeg" ,openjpeg)
6449 ("zlib" ,zlib)))
6450 (propagated-inputs
6451 `(("python-olefile" ,python-olefile)))
6452 (arguments
6453 `(#:phases
6454 (modify-phases %standard-phases
6455 (add-after 'unpack 'patch-ldconfig
6456 (lambda _
6457 (substitute* "setup.py"
6458 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6459 (replace 'check
6460 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6461 (if tests?
6462 (begin
6463 (setenv "HOME" (getcwd))
6464 ;; Make installed package available for running the tests.
6465 (add-installed-pythonpath inputs outputs)
6466 (invoke "python" "selftest.py" "--installed")
6467 (invoke "python" "-m" "pytest" "-vv"))
6468 #t))))))
6469 (home-page "https://python-pillow.org")
6470 (synopsis "Fork of the Python Imaging Library")
6471 (description
6472 "The Python Imaging Library adds image processing capabilities to your
6473 Python interpreter. This library provides extensive file format support, an
6474 efficient internal representation, and fairly powerful image processing
6475 capabilities. The core image library is designed for fast access to data
6476 stored in a few basic pixel formats. It should provide a solid foundation for
6477 a general image processing tool.")
6478 (properties `((python2-variant . ,(delay python2-pillow))))
6479 (license (license:x11-style
6480 "http://www.pythonware.com/products/pil/license.htm"
6481 "The PIL Software License"))))
6482
6483 (define-public python2-pillow
6484 (package-with-python2
6485 (package
6486 (inherit (strip-python2-variant python-pillow))
6487 ;; Version 6 is the last series with Python 2 support.
6488 (version "6.2.2")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "Pillow" version))
6493 (sha256
6494 (base32
6495 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
6496 (arguments
6497 (substitute-keyword-arguments (package-arguments python-pillow)
6498 ;; FIXME: One of the tests is failing.
6499 ((#:tests? _ #f) #f))))))
6500
6501 (define-public python-pillow-2.9
6502 (package
6503 (inherit python-pillow)
6504 (version "2.9.0")
6505 (source
6506 (origin
6507 (method url-fetch)
6508 (uri (pypi-uri "Pillow" version))
6509 (sha256
6510 (base32
6511 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6512 (arguments
6513 (substitute-keyword-arguments (package-arguments python-pillow)
6514 ((#:tests? _ #f) #f)))
6515 (properties '((hidden? #t)))))
6516
6517 (define-public python-pillow-simd
6518 (package
6519 (inherit python-pillow)
6520 (name "python-pillow-simd")
6521 (version "7.1.2")
6522 ;; The PyPI tarball does not include test files.
6523 (source
6524 (origin
6525 (method git-fetch)
6526 (uri (git-reference
6527 (url "https://github.com/uploadcare/pillow-simd")
6528 (commit version)))
6529 (file-name (git-file-name name version))
6530 (sha256
6531 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6532 (arguments
6533 (substitute-keyword-arguments
6534 (package-arguments python-pillow)
6535 ((#:phases phases)
6536 `(modify-phases ,phases
6537 (add-after 'unpack 'make-tests-writable
6538 (lambda _
6539 (for-each make-file-writable (find-files "Tests"))
6540 #t))))))
6541 (inputs
6542 `(("libraqm" ,libraqm)
6543 ("libimagequant" ,libimagequant)
6544 ,@(package-inputs python-pillow)))
6545 (home-page "https://github.com/uploadcare/pillow-simd")
6546 (synopsis "Fork of the Python Imaging Library (Pillow)")
6547 (description "This package is a fork of Pillow which adds support for SIMD
6548 parallelism.")))
6549
6550 (define-public python-imagecodecs
6551 (package
6552 (name "python-imagecodecs")
6553 (version "2021.3.31")
6554 (source
6555 (origin
6556 (method url-fetch)
6557 (uri (pypi-uri "imagecodecs" version))
6558 (sha256
6559 (base32
6560 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6561 (modules '((guix build utils)))
6562 (snippet
6563 '(begin
6564 ;; Unbundle 3rd party modules.
6565 (delete-file-recursively "3rdparty")
6566 ;; Delete pre-generated Cython files.
6567 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6568 #t))))
6569 (build-system python-build-system)
6570 (arguments
6571 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6572 #:phases
6573 (modify-phases %standard-phases
6574 (add-after 'unpack 'create-configuration
6575 (lambda* (#:key inputs #:allow-other-keys)
6576 ;; By default everything is enabled. We can selectively disable
6577 ;; extensions (and thus dependencies) by deleting them from the
6578 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6579 (call-with-output-file "imagecodecs_distributor_setup.py"
6580 (lambda (port)
6581 (format port "\
6582 def customize_build(EXTENSIONS, OPTIONS):
6583 del EXTENSIONS['aec']
6584 del EXTENSIONS['avif']
6585 del EXTENSIONS['bitshuffle']
6586 del EXTENSIONS['deflate']
6587 del EXTENSIONS['jpeg2k']
6588 del EXTENSIONS['jpeg12']
6589 del EXTENSIONS['jpegls']
6590 del EXTENSIONS['jpegxl']
6591 del EXTENSIONS['jpegxr']
6592 del EXTENSIONS['lerc']
6593 del EXTENSIONS['ljpeg']
6594 del EXTENSIONS['lzf']
6595 del EXTENSIONS['zfp']
6596 del EXTENSIONS['zopfli']
6597 OPTIONS['cythonize']
6598 ")))
6599 #t)))))
6600 (inputs
6601 `(("c-blosc" ,c-blosc)
6602 ("giflib" ,giflib)
6603 ("google-brotli" ,google-brotli)
6604 ("libjpeg-turbo" ,libjpeg-turbo)
6605 ("libpng" ,libpng)
6606 ("libtiff" ,libtiff)
6607 ("libwebp" ,libwebp)
6608 ("lz4" ,lz4)
6609 ("snappy" ,snappy)
6610 ("xz" ,xz)
6611 ("zlib" ,zlib)
6612 ("zstd" ,zstd "lib")))
6613 (propagated-inputs
6614 `(("python-numpy" ,python-numpy)))
6615 (native-inputs
6616 ;; For building.
6617 `(("python-cython" ,python-cython)
6618 ;; For testing. Incomplete.
6619 ;("python-numcodecs" ,python-numcodecs)
6620 ;("python-zarr" ,python-zarr)
6621 ;("python-pytest" ,python-pytest)
6622 ))
6623 (home-page "https://www.lfd.uci.edu/~gohlke/")
6624 (synopsis
6625 "Image transformation, compression, and decompression codecs")
6626 (description
6627 "Imagecodecs is a Python library that provides block-oriented, in-memory
6628 buffer transformation, compression, and decompression functions for use in the
6629 tifffile, czifile, and other scientific image input/output modules.")
6630 (license license:bsd-3)))
6631
6632 (define-public python-roifile
6633 (package
6634 (name "python-roifile")
6635 (version "2020.11.28")
6636 (source
6637 (origin
6638 (method url-fetch)
6639 (uri (pypi-uri "roifile" version))
6640 (sha256
6641 (base32
6642 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6643 (build-system python-build-system)
6644 (arguments `(#:tests? #f)) ; there are none
6645 (propagated-inputs
6646 `(("python-numpy" ,python-numpy)))
6647 (home-page "https://www.lfd.uci.edu/~gohlke/")
6648 (synopsis "Read and write ImageJ ROI format")
6649 (description "Roifile is a Python library to read, write, create, and plot
6650 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6651 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6652 (license license:bsd-3)))
6653
6654 (define-public python-tifffile
6655 (package
6656 (name "python-tifffile")
6657 (version "2021.4.8")
6658 (source
6659 (origin
6660 (method url-fetch)
6661 (uri (pypi-uri "tifffile" version))
6662 (sha256
6663 (base32
6664 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6665 (build-system python-build-system)
6666 ;; Tests require lfdfiles, which depends on tifffile
6667 (arguments `(#:tests? #f))
6668 (propagated-inputs
6669 `(("python-numpy" ,python-numpy)
6670 ("python-imagecodecs" ,python-imagecodecs)))
6671 (home-page "https://www.lfd.uci.edu/~gohlke/")
6672 (synopsis "Read and write TIFF(r) files")
6673 (description "This package lets you read image and metadata from many
6674 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6675 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6676 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6677 (license license:bsd-3)))
6678
6679 (define-public python-lfdfiles
6680 (package
6681 (name "python-lfdfiles")
6682 (version "2021.2.22")
6683 (source
6684 (origin
6685 (method url-fetch)
6686 (uri (pypi-uri "lfdfiles" version))
6687 (sha256
6688 (base32
6689 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6690 (modules '((guix build utils)))
6691 (snippet
6692 '(begin
6693 ;; Delete pre-generated Cython files.
6694 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6695 #t))))
6696 (build-system python-build-system)
6697 (arguments
6698 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6699 (propagated-inputs
6700 `(("python-click" ,python-click)
6701 ("python-numpy" ,python-numpy)
6702 ("python-tifffile" ,python-tifffile)))
6703 (native-inputs `(("python-cython" ,python-cython)))
6704 (home-page "https://www.lfd.uci.edu/~gohlke/")
6705 (synopsis "Work with LFD data files")
6706 (description
6707 "Lfdfiles is a Python library and console script for reading, writing,
6708 converting, and viewing many of the proprietary file formats used to store
6709 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6710 (license license:bsd-3)))
6711
6712 (define-public python-imageio
6713 (package
6714 (name "python-imageio")
6715 (version "2.8.0")
6716 (source
6717 (origin
6718 (method url-fetch)
6719 (uri (pypi-uri "imageio" version))
6720 (sha256
6721 (base32
6722 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6723 (build-system python-build-system)
6724 (arguments
6725 `(#:tests? #f ; many tests require online data
6726 #:phases
6727 (modify-phases %standard-phases
6728 (replace 'check
6729 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6730 (if tests?
6731 (begin
6732 ;; Make installed package available for running the tests.
6733 (add-installed-pythonpath inputs outputs)
6734 (invoke "pytest" "-vv"))
6735 #t))))))
6736 (propagated-inputs
6737 `(("python-numpy" ,python-numpy)
6738 ("python-pillow" ,python-pillow)
6739 ("python-psutil" ,python-psutil)))
6740 (native-inputs
6741 `(("python-pytest" ,python-pytest)))
6742 (home-page "https://imageio.github.io/")
6743 (synopsis "Library for reading and writing a wide range of image data")
6744 (description
6745 "Imageio is a Python library that provides an easy interface to read and
6746 write a wide range of image data, including animated images, video, volumetric
6747 data, and scientific formats.")
6748 (license license:bsd-2)))
6749
6750 (define-public python-pycparser
6751 (package
6752 (name "python-pycparser")
6753 (version "2.20")
6754 (source
6755 (origin
6756 (method url-fetch)
6757 (uri (pypi-uri "pycparser" version))
6758 (sha256
6759 (base32
6760 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6761 (outputs '("out" "doc"))
6762 (build-system python-build-system)
6763 (native-inputs
6764 `(("pkg-config" ,pkg-config)))
6765 (arguments
6766 `(#:phases
6767 (modify-phases %standard-phases
6768 (replace 'check
6769 (lambda _
6770 (with-directory-excursion "tests"
6771 (invoke "python" "all_tests.py"))
6772 #t))
6773 (add-after 'install 'install-doc
6774 (lambda* (#:key outputs #:allow-other-keys)
6775 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6776 (doc (string-append data "/doc/" ,name "-" ,version))
6777 (examples (string-append doc "/examples")))
6778 (mkdir-p examples)
6779 (for-each (lambda (file)
6780 (copy-file (string-append "." file)
6781 (string-append doc file)))
6782 '("/README.rst" "/CHANGES" "/LICENSE"))
6783 (copy-recursively "examples" examples)
6784 #t))))))
6785 (home-page "https://github.com/eliben/pycparser")
6786 (synopsis "C parser in Python")
6787 (description
6788 "Pycparser is a complete parser of the C language, written in pure Python
6789 using the PLY parsing library. It parses C code into an AST and can serve as
6790 a front-end for C compilers or analysis tools.")
6791 (license license:bsd-3)))
6792
6793 (define-public python2-pycparser
6794 (package-with-python2 python-pycparser))
6795
6796 (define-public python-xlsxwriter
6797 (package
6798 (name "python-xlsxwriter")
6799 (version "1.3.9")
6800 (source
6801 (origin
6802 ;; There are no tests in the PyPI tarball.
6803 (method git-fetch)
6804 (uri (git-reference
6805 (url "https://github.com/jmcnamara/XlsxWriter")
6806 (commit (string-append "RELEASE_" version))))
6807 (file-name (git-file-name name version))
6808 (sha256
6809 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6810 (build-system python-build-system)
6811 (home-page "https://github.com/jmcnamara/XlsxWriter")
6812 (synopsis "Python module for creating Excel XLSX files")
6813 (description
6814 "XlsxWriter is a Python module that can be used to write text, numbers,
6815 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6816 (license license:bsd-2)))
6817
6818 (define-public python-pywavelets
6819 (package
6820 (name "python-pywavelets")
6821 (version "1.1.1")
6822 (home-page "https://github.com/PyWavelets/pywt")
6823 (source (origin
6824 (method url-fetch)
6825 (uri (pypi-uri "PyWavelets" version))
6826 (sha256
6827 (base32
6828 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6829 (build-system python-build-system)
6830 (arguments
6831 '(#:modules ((ice-9 ftw)
6832 (srfi srfi-1)
6833 (srfi srfi-26)
6834 (guix build utils)
6835 (guix build python-build-system))
6836 #:phases
6837 (modify-phases %standard-phases
6838 (replace 'check
6839 (lambda _
6840 (let ((cwd (getcwd))
6841 (libdir (find (cut string-prefix? "lib." <>)
6842 (scandir "build"))))
6843 (with-directory-excursion (string-append cwd "/build/" libdir)
6844 (invoke "pytest" "-vv"))))))))
6845 (native-inputs
6846 `(("python-matplotlib" ,python-matplotlib) ;for tests
6847 ("python-pytest" ,python-pytest)))
6848 (propagated-inputs
6849 `(("python-numpy" ,python-numpy)))
6850 (synopsis "Wavelet transforms in Python")
6851 (description
6852 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6853 mathematical basis functions that are localized in both time and frequency.
6854 Wavelet transforms are time-frequency transforms employing wavelets. They are
6855 similar to Fourier transforms, the difference being that Fourier transforms are
6856 localized only in frequency instead of in time and frequency.")
6857 (license license:expat)))
6858
6859 (define-public python-pywal
6860 (package
6861 (name "python-pywal")
6862 (version "3.3.0")
6863 (source
6864 (origin
6865 (method git-fetch)
6866 (uri (git-reference
6867 (url "https://github.com/dylanaraps/pywal")
6868 (commit version)))
6869 (file-name (git-file-name name version))
6870 (sha256
6871 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6872 (build-system python-build-system)
6873 (arguments
6874 `(#:phases
6875 (modify-phases %standard-phases
6876 (add-before 'check 'fix-home-directory
6877 (lambda _
6878 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6879 (setenv "HOME" "/tmp")
6880 #t)))))
6881 (inputs
6882 `(("imagemagick" ,imagemagick)))
6883 (home-page "https://github.com/dylanaraps/pywal")
6884 (synopsis "Color palette generator and applicator")
6885 (description
6886 "Pywal is a tool that generates a color palette from the dominant colors
6887 in an image. It then applies the colors system-wide and on-the-fly in all of
6888 your favourite programs.")
6889 (license license:expat)))
6890
6891 (define-public python-pywinrm
6892 (package
6893 (name "python-pywinrm")
6894 (version "0.4.1")
6895 (source
6896 (origin
6897 (method url-fetch)
6898 (uri (pypi-uri "pywinrm" version))
6899 (sha256
6900 (base32
6901 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6902 (build-system python-build-system)
6903 (propagated-inputs
6904 `(("python-six" ,python-six)
6905 ("python-requests_ntlm" ,python-requests_ntlm)
6906 ("python-xmltodict" ,python-xmltodict)
6907 ("python-kerberos" ,python-kerberos)))
6908 (native-inputs
6909 `(("python-mock" ,python-mock)
6910 ("python-pytest" ,python-pytest)))
6911 (home-page "https://github.com/diyan/pywinrm/")
6912 (synopsis
6913 "Python library for Windows Remote Management (WinRM)")
6914 (description
6915 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6916 service. It allows you to invoke commands on target Windows machines from
6917 any machine that can run Python.")
6918 (license license:expat)))
6919
6920 (define-public python-xcffib
6921 (package
6922 (name "python-xcffib")
6923 (version "0.6.0")
6924 (source
6925 (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "xcffib" version))
6928 (sha256
6929 (base32
6930 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6931 (build-system python-build-system)
6932 (inputs
6933 `(("libxcb" ,libxcb)))
6934 (propagated-inputs
6935 `(("python-cffi" ,python-cffi) ; used at run time
6936 ("python-six" ,python-six)))
6937 (arguments
6938 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6939 #:tests? #f
6940 #:phases
6941 (modify-phases %standard-phases
6942 (add-after 'unpack 'fix-libxcb-path
6943 (lambda* (#:key inputs #:allow-other-keys)
6944 (let ((libxcb (assoc-ref inputs "libxcb")))
6945 (substitute* '("xcffib/__init__.py")
6946 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6947 #t)))
6948 (add-after 'install 'install-doc
6949 (lambda* (#:key outputs #:allow-other-keys)
6950 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6951 "/doc/" ,name "-" ,version)))
6952 (mkdir-p doc)
6953 (copy-file "README.md"
6954 (string-append doc "/README.md"))
6955 #t))))))
6956 (home-page "https://github.com/tych0/xcffib")
6957 (synopsis "XCB Python bindings")
6958 (description
6959 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6960 support for Python 3 and PyPy. It is based on cffi.")
6961 (license license:expat)))
6962
6963 (define-public python2-xcffib
6964 (package-with-python2 python-xcffib))
6965
6966 (define-public python-cairocffi
6967 (package
6968 (name "python-cairocffi")
6969 (version "1.2.0")
6970 (source
6971 (origin
6972 ;; The PyPI archive does not include the documentation, so use Git.
6973 (method git-fetch)
6974 (uri (git-reference
6975 (url "https://github.com/Kozea/cairocffi")
6976 (commit (string-append "v" version))))
6977 (file-name (git-file-name name version))
6978 (sha256
6979 (base32
6980 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6981 (build-system python-build-system)
6982 (outputs '("out" "doc"))
6983 (inputs
6984 `(("glib" ,glib)
6985 ("gtk+" ,gtk+)
6986 ("gdk-pixbuf" ,gdk-pixbuf)
6987 ("cairo" ,cairo)))
6988 (native-inputs
6989 `(("python-numpy" ,python-numpy)
6990 ("python-pytest" ,python-pytest)
6991 ("python-pytest-cov" ,python-pytest-cov)
6992 ("python-pytest-runner" ,python-pytest-runner)
6993 ("python-sphinx" ,python-sphinx)
6994 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6995 (propagated-inputs
6996 `(("python-xcffib" ,python-xcffib))) ; used at run time
6997 (arguments
6998 `(#:phases
6999 (modify-phases %standard-phases
7000 (add-after 'unpack 'patch-paths
7001 (lambda* (#:key inputs #:allow-other-keys)
7002 (substitute* "cairocffi/__init__.py"
7003 ;; Hack the dynamic library loading mechanism.
7004 (("find_library\\(library_name\\)")
7005 "\"found\"")
7006 (("filenames = \\(library_filename,\\) \\+ filenames")
7007 "pass")
7008 (("libcairo.so.2")
7009 (search-input-file inputs "/lib/libcairo.so.2")))
7010 (substitute* "cairocffi/pixbuf.py"
7011 (("libgdk_pixbuf-2.0.so.0")
7012 (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
7013 (("libgobject-2.0.so.0")
7014 (search-input-file inputs "/lib/libgobject-2.0.so.0"))
7015 (("libglib-2.0.so.0")
7016 (search-input-file inputs "/lib/libglib-2.0.so.0"))
7017 (("libgdk-3.so.0")
7018 (search-input-file inputs "/lib/libgdk-3.so.0")))))
7019 (add-after 'unpack 'disable-linters
7020 ;; Their check fails; none of our business.
7021 (lambda _
7022 (substitute* "setup.cfg"
7023 ((".*pytest-flake8.*") "")
7024 ((".*pytest-isort.*") "")
7025 (("--flake8") "")
7026 (("--isort") ""))
7027 #t))
7028 (add-after 'install 'install-doc
7029 (lambda* (#:key inputs outputs #:allow-other-keys)
7030 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7031 (doc (string-append data "/doc/" ,name "-" ,version))
7032 (html (string-append doc "/html")))
7033 (setenv "LD_LIBRARY_PATH"
7034 (string-append (assoc-ref inputs "cairo") "/lib" ":"
7035 (assoc-ref inputs "gdk-pixbuf") "/lib"))
7036 (setenv "LANG" "en_US.UTF-8")
7037 (mkdir-p html)
7038 (for-each (lambda (file)
7039 (copy-file (string-append "." file)
7040 (string-append doc file)))
7041 '("/README.rst" "/NEWS.rst"))
7042 (system* "python" "setup.py" "build_sphinx")
7043 (copy-recursively "docs/_build/html" html)
7044 #t))))))
7045 (home-page "https://github.com/Kozea/cairocffi")
7046 (synopsis "Python bindings and object-oriented API for Cairo")
7047 (description
7048 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
7049 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
7050 graphics library with support for multiple backends including image buffers,
7051 PNG, PostScript, PDF, and SVG file output.")
7052 (license license:bsd-3)))
7053
7054 (define-public python-decorator
7055 (package
7056 (name "python-decorator")
7057 (version "5.0.9")
7058 (source
7059 (origin
7060 (method url-fetch)
7061 (uri (pypi-uri "decorator" version))
7062 (sha256
7063 (base32 "1mcy64hllgm938v8k1x2a4g0q9swsnrfnsvhz59kr28a6ajgpv3j"))))
7064 (build-system python-build-system)
7065 (home-page "https://pypi.org/project/decorator/")
7066 (synopsis "Python module to simplify usage of decorators")
7067 (description
7068 "The aim of the decorator module is to simplify the usage of decorators
7069 for the average programmer, and to popularize decorators usage giving examples
7070 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
7071 etc. The core of this module is a decorator factory.")
7072 (license license:expat)))
7073
7074 (define-public python2-decorator
7075 (package-with-python2 python-decorator))
7076
7077 (define-public python-drmaa
7078 (package
7079 (name "python-drmaa")
7080 (version "0.7.7")
7081 (source
7082 (origin
7083 (method url-fetch)
7084 (uri (pypi-uri "drmaa" version))
7085 (sha256
7086 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
7087 (build-system python-build-system)
7088 ;; The test suite requires libdrmaa which is provided by the cluster
7089 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
7090 ;; should be set to the path of the libdrmaa library.
7091 (arguments '(#:tests? #f))
7092 (native-inputs
7093 `(("python-nose" ,python-nose)))
7094 (home-page "https://pypi.org/project/drmaa/")
7095 (synopsis "Python bindings for the DRMAA library")
7096 (description
7097 "A Python package for Distributed Resource Management (DRM) job
7098 submission and control. This package is an implementation of the DRMAA 1.0
7099 Python language binding specification.")
7100 (license license:bsd-3)))
7101
7102 (define-public python2-drmaa
7103 (package-with-python2 python-drmaa))
7104
7105 (define-public python-grako
7106 (package
7107 (name "python-grako")
7108 (version "3.99.9")
7109 (source
7110 (origin
7111 (method url-fetch)
7112 (uri
7113 (pypi-uri "grako" version ".zip"))
7114 (sha256
7115 (base32
7116 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
7117 (build-system python-build-system)
7118 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
7119 (native-inputs
7120 `(("unzip" ,unzip)
7121 ("python-pytest" ,python-pytest)
7122 ("python-pytest-runner" ,python-pytest-runner)))
7123 (home-page "https://bitbucket.org/neogeny/grako")
7124 (synopsis "EBNF parser generator")
7125 (description
7126 "Grako takes a grammar in a variation of EBNF as input, and outputs a
7127 memoizing PEG/Packrat parser in Python.")
7128 (license license:bsd-3)))
7129
7130 (define-public python2-grako
7131 (package-with-python2 python-grako))
7132
7133 (define-public python-grandalf
7134 (package
7135 (name "python-grandalf")
7136 (version "0.7")
7137 (source
7138 (origin
7139 ;; There's no source tarball on PyPI.
7140 (method git-fetch)
7141 (uri (git-reference
7142 (url "https://github.com/bdcht/grandalf")
7143 (commit (string-append "v" version))))
7144 (file-name (git-file-name name version))
7145 (sha256
7146 (base32
7147 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7148 (build-system python-build-system)
7149 (arguments
7150 '(#:phases
7151 (modify-phases %standard-phases
7152 (replace 'check
7153 (lambda _
7154 (invoke "python" "setup.py" "pytest"))))))
7155 (native-inputs
7156 `(("python-pytest" ,python-pytest)
7157 ("python-pytest-runner" ,python-pytest-runner)))
7158 (propagated-inputs
7159 `(("python-numpy" ,python-numpy)
7160 ("python-ply" ,python-ply)))
7161 (home-page "https://github.com/bdcht/grandalf")
7162 (synopsis "Graph and drawing algorithms framework")
7163 (description
7164 "Grandalf is a Python package made for experimentations with graphs
7165 drawing algorithms. It is written in pure Python, and currently implements
7166 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7167 minimization approach. While not as fast or featured as graphviz or other
7168 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7169 than thousands of nodes, while keeping the source code simple enough to tweak
7170 and hack any part of it for experimental purpose. With a total of about 1500
7171 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7172 in less than 600 lines. The energy minimization approach is comprised of only
7173 250 lines!
7174
7175 Grandalf does only 2 not-so-simple things:
7176 @itemize
7177 @item computing the nodes (x,y) coordinates (based on provided nodes
7178 dimensions, and a chosen layout)
7179 @item routing the edges with lines or nurbs
7180 @end itemize
7181
7182 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7183 will help you find where to draw things like nodes and edges, but it’s up to
7184 you to actually draw things with your favorite toolkit.")
7185 ;; The user can choose either license.
7186 (license (list license:gpl2 license:epl1.0))))
7187
7188 (define-public python-gridmap
7189 (package
7190 (name "python-gridmap")
7191 (version "0.14.0")
7192 (source
7193 (origin
7194 (method git-fetch)
7195 (uri (git-reference
7196 (url "https://github.com/pygridtools/gridmap")
7197 (commit (string-append "v" version))))
7198 (file-name (git-file-name name version))
7199 (sha256
7200 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7201 (build-system python-build-system)
7202 (arguments
7203 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7204 (propagated-inputs
7205 `(("python-psutil" ,python-psutil)
7206 ("python-drmaa" ,python-drmaa)
7207 ("python-pyzmq" ,python-pyzmq)))
7208 (home-page "https://github.com/pygridtools/gridmap")
7209 (synopsis "Create jobs on a cluster directly from Python")
7210 (description
7211 "Gridmap is a Python package to allow you to easily create jobs on the
7212 cluster directly from Python. You can directly map Python functions onto the
7213 cluster without needing to write any wrapper code yourself.")
7214 (license license:gpl3+)))
7215
7216 (define-public python-honcho
7217 (package
7218 (name "python-honcho")
7219 (version "1.0.1")
7220 (source
7221 (origin
7222 (method git-fetch)
7223 (uri (git-reference
7224 (url "https://github.com/nickstenning/honcho")
7225 (commit (string-append "v" version))))
7226 (file-name (git-file-name name version))
7227 (sha256
7228 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7229 (build-system python-build-system)
7230 (native-inputs
7231 `(("python-pytest" ,python-pytest)
7232 ("python-mock" ,python-mock)
7233 ("python-tox" ,python-tox)
7234 ("which" ,which))) ;for tests
7235 (propagated-inputs
7236 `(("python-jinja2" ,python-jinja2)))
7237 (arguments
7238 `(#:phases
7239 (modify-phases %standard-phases
7240 (delete 'check)
7241 (add-after 'install 'check
7242 (lambda* (#:key outputs inputs #:allow-other-keys)
7243 ;; fix honcho path in testsuite
7244 (substitute* "tests/conftest.py"
7245 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7246 "/bin/honcho" "'")))
7247 ;; It's easier to run tests after install.
7248 ;; Make installed package available for running the tests
7249 (add-installed-pythonpath inputs outputs)
7250 (invoke "py.test" "-v"))))))
7251 (home-page "https://github.com/nickstenning/honcho")
7252 (synopsis "Manage Procfile-based applications")
7253 (description
7254 "A Procfile is a file which describes how to run an application
7255 consisting of several processes. honcho starts all listed processes.
7256 The output of all running processes is collected by honcho and
7257 displayed.")
7258 (license license:expat)))
7259
7260 (define-public python-pebble
7261 (package
7262 (name "python-pebble")
7263 (version "4.6.1")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "Pebble" version))
7268 (sha256
7269 (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
7270 (build-system python-build-system)
7271 (native-inputs
7272 `(("python-pytest" ,python-pytest)))
7273 (arguments
7274 `(#:phases
7275 (modify-phases %standard-phases
7276 (replace 'check
7277 (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
7278 (home-page "https://github.com/noxdafox/pebble")
7279 (synopsis "Threading and multiprocessing for Python")
7280 (description
7281 "Pebble aims to help manage threads and processes in an easier way. It
7282 wraps Python's standard library threading and multiprocessing objects.")
7283 (license license:lgpl3+)))
7284
7285 (define-public python-pexpect
7286 (package
7287 (name "python-pexpect")
7288 (version "4.8.0")
7289 (source
7290 (origin
7291 (method url-fetch)
7292 (uri (pypi-uri "pexpect" version))
7293 (sha256
7294 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7295 (build-system python-build-system)
7296 (arguments
7297 `(#:phases
7298 (modify-phases %standard-phases
7299 (add-before 'check 'prepare-tests
7300 (lambda _
7301 (substitute* (find-files "tests")
7302 (("/bin/ls") (which "ls"))
7303 (("/bin/echo") (which "echo"))
7304 (("/bin/which") (which "which"))
7305 ;; Many tests try to use the /bin directory which
7306 ;; is not present in the build environment.
7307 ;; Use one that's non-empty and unlikely to change.
7308 (("/bin'") "/dev'")
7309 ;; Disable failing test. See upstream bug report
7310 ;; https://github.com/pexpect/pexpect/issues/568
7311 (("def test_bash") "def _test_bash"))
7312 ;; XXX: Socket connection test gets "Connection reset by peer".
7313 ;; Why does it not work? Delete for now.
7314 (delete-file "tests/test_socket.py")
7315 #t))
7316 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7317 (native-inputs
7318 `(("python-nose" ,python-nose)
7319 ("python-pytest" ,python-pytest)
7320 ("man-db" ,man-db)
7321 ("which" ,which)
7322 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7323 (propagated-inputs
7324 `(("python-ptyprocess" ,python-ptyprocess)))
7325 (home-page "http://pexpect.readthedocs.org/")
7326 (synopsis "Controlling interactive console applications")
7327 (description
7328 "Pexpect is a pure Python module for spawning child applications;
7329 controlling them; and responding to expected patterns in their output.
7330 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7331 child application and control it as if a human were typing commands.")
7332 (license license:isc)))
7333
7334 (define-public python2-pexpect
7335 (package-with-python2 python-pexpect))
7336
7337 (define-public python-setuptools-scm
7338 (package
7339 (name "python-setuptools-scm")
7340 (version "5.0.1")
7341 (source (origin
7342 (method url-fetch)
7343 (uri (pypi-uri "setuptools_scm" version))
7344 (sha256
7345 (base32
7346 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))
7347 (build-system python-build-system)
7348 (home-page "https://github.com/pypa/setuptools_scm/")
7349 (synopsis "Manage Python package versions in SCM metadata")
7350 (description
7351 "Setuptools_scm handles managing your Python package versions in
7352 @dfn{software configuration management} (SCM) metadata instead of declaring
7353 them as the version argument or in a SCM managed file.")
7354 (license license:expat)))
7355
7356 (define-public python2-setuptools-scm
7357 (package-with-python2 python-setuptools-scm))
7358
7359 (define-public python-sexpdata
7360 (package
7361 (name "python-sexpdata")
7362 (version "0.0.3")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "sexpdata" version))
7367 (sha256
7368 (base32
7369 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7370 (build-system python-build-system)
7371 (home-page "https://github.com/jd-boyd/sexpdata")
7372 (synopsis "S-expression parser for Python")
7373 (description
7374 "Sexpdata is an S-expression parser/serializer. It has load and dump
7375 functions like pickle, json or PyYAML module.")
7376 (license license:bsd-3)))
7377
7378 (define-public python-pathlib2
7379 (package
7380 (name "python-pathlib2")
7381 (version "2.3.3")
7382 (source
7383 (origin
7384 (method url-fetch)
7385 (uri (pypi-uri "pathlib2" version))
7386 (sha256
7387 (base32
7388 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7389 (build-system python-build-system)
7390 (propagated-inputs
7391 `(("python-scandir" ,python-scandir)
7392 ("python-six" ,python-six)))
7393 (home-page "https://pypi.org/project/pathlib2/")
7394 (synopsis "Object-oriented file system paths")
7395 (description "The goal of pathlib2 is to provide a backport of the
7396 standard @code{pathlib} module which tracks the standard library module, so
7397 all the newest features of the standard @code{pathlib} can be used also on
7398 older Python versions.")
7399 (license license:expat)))
7400
7401 (define-public python-importlib-resources
7402 (package
7403 (name "python-importlib-resources")
7404 (version "3.0.0")
7405 (source
7406 (origin
7407 (method url-fetch)
7408 (uri (pypi-uri "importlib_resources" version))
7409 (sha256
7410 (base32
7411 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7412 (build-system python-build-system)
7413 (native-inputs
7414 `(("python-setuptools-scm" ,python-setuptools-scm)
7415 ("python-toml" ,python-toml)))
7416 (home-page "http://importlib-resources.readthedocs.io/")
7417 (synopsis "Read resources from Python packages")
7418 (description
7419 "@code{importlib_resources} is a backport of Python 3's standard library
7420 @code{importlib.resources} module for Python 2.7, and Python 3.")
7421 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7422 (license license:asl2.0)))
7423
7424 (define-public python2-importlib-resources
7425 (package
7426 (name "python2-importlib-resources")
7427 (version "1.0.2")
7428 (source (origin
7429 (method url-fetch)
7430 (uri (pypi-uri "importlib_resources" version))
7431 (sha256
7432 (base32
7433 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7434 (build-system python-build-system)
7435 (arguments
7436 `(#:python ,python-2
7437 #:phases (modify-phases %standard-phases
7438 ;; The build system tests for python-wheel, but it is
7439 ;; not required for Guix nor the test suite. Just drop
7440 ;; it to make bootstrapping pytest easier.
7441 (add-after 'unpack 'drop-wheel-dependency
7442 (lambda _
7443 (substitute* "setup.cfg"
7444 (("^[[:blank:]]+wheel")
7445 ""))
7446 #t)))))
7447 (propagated-inputs
7448 `(("python-pathlib2" ,python2-pathlib2)
7449 ("python-typing" ,python2-typing)))
7450 (home-page "https://gitlab.com/python-devs/importlib_resources")
7451 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7452 (description
7453 "This package provides an implementation of @code{importlib.resources}
7454 for older versions of Python.")
7455 (license license:asl2.0)))
7456
7457 ;; For importlib-metadata-bootstrap below.
7458 (define-public python2-importlib-resources-bootstrap
7459 (hidden-package
7460 (package/inherit
7461 python2-importlib-resources
7462 (name "python2-importlib-resources-bootstrap")
7463 (propagated-inputs
7464 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7465 ("python-typing" ,python2-typing))))))
7466
7467 (define-public python-importlib-metadata
7468 (package
7469 (name "python-importlib-metadata")
7470 (version "1.5.0")
7471 (source
7472 (origin
7473 (method url-fetch)
7474 (uri (pypi-uri "importlib_metadata" version))
7475 (sha256
7476 (base32
7477 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7478 (build-system python-build-system)
7479 (propagated-inputs
7480 `(("python-zipp" ,python-zipp)))
7481 (native-inputs
7482 `(("python-setuptools-scm" ,python-setuptools-scm)
7483 ("python-pyfakefs" ,python-pyfakefs)
7484 ("python-packaging" ,python-packaging)))
7485 (home-page "https://importlib-metadata.readthedocs.io/")
7486 (synopsis "Read metadata from Python packages")
7487 (description
7488 "@code{importlib_metadata} is a library which provides an API for
7489 accessing an installed Python package's metadata, such as its entry points or
7490 its top-level name. This functionality intends to replace most uses of
7491 @code{pkg_resources} entry point API and metadata API. Along with
7492 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7493 need to use the older and less efficient @code{pkg_resources} package.")
7494 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7495 (license license:asl2.0)))
7496
7497 (define-public python2-importlib-metadata
7498 (let ((base (package-with-python2 (strip-python2-variant
7499 python-importlib-metadata))))
7500 (package/inherit
7501 base
7502 (name "python2-importlib-metadata")
7503 (native-inputs
7504 `(("python-setuptools-scm" ,python2-setuptools-scm)
7505 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7506 ("python-packaging" ,python2-packaging-bootstrap)))
7507 (propagated-inputs
7508 `(("python-configparser" ,python2-configparser)
7509 ("python-contextlib2" ,python2-contextlib2)
7510 ("python-importlib-resources" ,python2-importlib-resources)
7511 ("python-pathlib2" ,python2-pathlib2)
7512 ,@(package-propagated-inputs base))))))
7513
7514 ;; This package is used by python2-pytest, and thus must not depend on it.
7515 (define-public python2-importlib-metadata-bootstrap
7516 (hidden-package
7517 (package/inherit
7518 python2-importlib-metadata
7519 (name "python2-importlib-metadata-bootstrap")
7520 (arguments
7521 `(#:tests? #f
7522 ,@(package-arguments python2-importlib-metadata)))
7523 (propagated-inputs
7524 `(("python-zipp" ,python2-zipp-bootstrap)
7525 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7526 ("python-configparser" ,python2-configparser)
7527 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7528 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7529
7530 (define-public python-importmagic
7531 (package
7532 (name "python-importmagic")
7533 (version "0.1.7")
7534 (source
7535 (origin
7536 (method url-fetch)
7537 (uri (pypi-uri "importmagic" version))
7538 (sha256
7539 (base32
7540 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7541 (build-system python-build-system)
7542 (home-page "https://github.com/alecthomas/importmagic")
7543 (synopsis "Library for adding, removing and managing Python imports")
7544 (description
7545 "Importmagic is a Python library for automatically managing imports by
7546 finding unresolved symbols in Python code and their corresponding imports.")
7547 (license license:bsd-3)))
7548
7549 (define-public python-inotify-simple
7550 (package
7551 (name "python-inotify-simple")
7552 (version "1.3.5")
7553 (source
7554 (origin
7555 (method git-fetch)
7556 (uri (git-reference
7557 (url "https://github.com/chrisjbillington/inotify_simple")
7558 (commit version)))
7559 (file-name (git-file-name name version))
7560 (sha256
7561 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7562 (build-system python-build-system)
7563 (home-page
7564 "https://github.com/chrisjbillington/inotify_simple")
7565 (synopsis "Simple wrapper around inotify library")
7566 (description
7567 "@code{inotify-simple} is a simple wrapper around inotify library.")
7568 (license license:bsd-3)))
7569
7570 (define-public python-jaraco-packaging
7571 (package
7572 (name "python-jaraco-packaging")
7573 (version "6.1")
7574 (source
7575 (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "jaraco.packaging" version))
7578 (sha256
7579 (base32
7580 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7581 (build-system python-build-system)
7582 (propagated-inputs
7583 `(("python-pytest" ,python-pytest)
7584 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7585 ("python-pytest-flake8" ,python-pytest-flake8)
7586 ("python-rst.linker" ,python-rst.linker)
7587 ("python-setuptools" ,python-setuptools)
7588 ("python-setuptools-scm" ,python-setuptools-scm)
7589 ("python-six" ,python-six)
7590 ("python-sphinx" ,python-sphinx)))
7591 (home-page "https://github.com/jaraco/jaraco.packaging")
7592 (synopsis "Tools to supplement packaging Python releases")
7593 (description
7594 "This package provides various tools to supplement packaging Python
7595 releases.")
7596 (license license:expat)))
7597
7598 (define-public python-pathpy
7599 (package
7600 (name "python-pathpy")
7601 (version "11.5.1")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (pypi-uri "path.py" version))
7606 (sha256
7607 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7608 (outputs '("out" "doc"))
7609 (build-system python-build-system)
7610 (propagated-inputs
7611 `(("python-appdirs" ,python-appdirs)
7612 ("python-importlib-metadata" ,python-importlib-metadata)))
7613 (native-inputs
7614 `(("python-setuptools-scm" ,python-setuptools-scm)
7615 ("python-sphinx" ,python-sphinx)
7616 ("python-rst.linker" ,python-rst.linker)
7617 ("python-pytest" ,python-pytest)
7618 ("python-pytest-runner" ,python-pytest-runner)
7619 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7620 (arguments
7621 `(#:phases
7622 (modify-phases %standard-phases
7623 (add-after 'build 'build-doc
7624 (lambda _
7625 (setenv "LANG" "en_US.UTF-8")
7626 (invoke "python" "setup.py" "build_sphinx")))
7627 (add-after 'install 'install-doc
7628 (lambda* (#:key outputs #:allow-other-keys)
7629 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7630 (doc (string-append data "/doc/" ,name "-" ,version))
7631 (html (string-append doc "/html")))
7632 (mkdir-p html)
7633 (for-each (lambda (file)
7634 (copy-file file (string-append doc "/" file)))
7635 '("README.rst" "CHANGES.rst"))
7636 (copy-recursively "build/sphinx/html" html)
7637 #t)))
7638 (replace 'check
7639 (lambda _
7640 ;; The import time test aborts if an import takes longer than
7641 ;; 100ms. It may very well take a little longer than that.
7642 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7643 (home-page "https://github.com/jaraco/path.py")
7644 (synopsis "Python module wrapper for built-in os.path")
7645 (description
7646 "@code{path.py} implements path objects as first-class entities, allowing
7647 common operations on files to be invoked on those path objects directly.")
7648 (license license:expat)))
7649
7650 (define-public python-simplegeneric
7651 (package
7652 (name "python-simplegeneric")
7653 (version "0.8.1")
7654 (source
7655 (origin
7656 (method url-fetch)
7657 (uri (pypi-uri "simplegeneric" version ".zip"))
7658 (sha256
7659 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7660 (build-system python-build-system)
7661 (native-inputs
7662 `(("unzip" ,unzip)))
7663 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7664 (synopsis "Python module for simple generic functions")
7665 (description
7666 "The simplegeneric module lets you define simple single-dispatch generic
7667 functions, akin to Python’s built-in generic functions like @code{len()},
7668 @code{iter()} and so on. However, instead of using specially-named methods,
7669 these generic functions use simple lookup tables, akin to those used by
7670 e.g. @code{pickle.dump()} and other generic functions found in the Python
7671 standard library.")
7672 (license license:zpl2.1)))
7673
7674 (define-public python2-simplegeneric
7675 (package-with-python2 python-simplegeneric))
7676
7677 (define-public python-ipython-genutils
7678 ;; TODO: This package is retired, check if can be removed, see description.
7679 (package
7680 (name "python-ipython-genutils")
7681 (version "0.1.0")
7682 (source
7683 (origin
7684 (method url-fetch)
7685 (uri (pypi-uri "ipython_genutils" version))
7686 (sha256
7687 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7688 (build-system python-build-system)
7689 (arguments `(#:tests? #f)) ; no tests
7690 (home-page "https://ipython.org")
7691 (synopsis "Vestigial utilities from IPython")
7692 (description
7693 "This package provides retired utilities from IPython. No packages
7694 outside IPython/Jupyter should depend on it.
7695
7696 This package shouldn't exist. It contains some common utilities shared by
7697 Jupyter and IPython projects during The Big Split. As soon as possible, those
7698 packages will remove their dependency on this, and this package will go
7699 away.")
7700 (license license:bsd-3)))
7701
7702 (define-public python2-ipython-genutils
7703 (package-with-python2 python-ipython-genutils))
7704
7705 (define-public python-ipyparallel
7706 (package
7707 (name "python-ipyparallel")
7708 (version "6.2.4")
7709 (source
7710 (origin
7711 (method url-fetch)
7712 (uri (pypi-uri "ipyparallel" version))
7713 (sha256
7714 (base32
7715 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7716 (build-system python-build-system)
7717 (arguments
7718 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7719 #:phases
7720 (modify-phases %standard-phases
7721 (add-before 'check 'prepare-for-tests
7722 (lambda _
7723 (setenv "HOME" (getcwd))
7724 #t)))))
7725 (propagated-inputs
7726 `(("python-dateutil" ,python-dateutil)
7727 ("python-decorator" ,python-decorator)
7728 ("python-ipykernel" ,python-ipykernel)
7729 ("python-ipython" ,python-ipython)
7730 ("python-ipython-genutils" ,python-ipython-genutils)
7731 ("python-jupyter-client" ,python-jupyter-client)
7732 ("python-pyzmq" ,python-pyzmq)
7733 ("python-tornado" ,python-tornado)
7734 ("python-traitlets" ,python-traitlets)))
7735 (native-inputs
7736 `(("python-ipython" ,python-ipython)
7737 ("python-mock" ,python-mock)
7738 ("python-nose" ,python-nose)
7739 ("python-pytest" ,python-pytest)
7740 ("python-pytest-cov" ,python-pytest-cov)
7741 ("python-testpath" ,python-testpath)))
7742 (home-page "https://ipython.org/")
7743 (synopsis "Interactive Parallel Computing with IPython")
7744 (description
7745 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7746 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7747 CLI scripts:
7748 @enumerate
7749 @item ipcluster - start/stop a cluster
7750 @item ipcontroller - start a scheduler
7751 @item ipengine - start an engine
7752 @end enumerate")
7753 (license license:bsd-3)))
7754
7755 (define-public python-ipython-cluster-helper
7756 (package
7757 (name "python-ipython-cluster-helper")
7758 (version "0.6.4")
7759 (source
7760 (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "ipython-cluster-helper" version))
7763 (sha256
7764 (base32
7765 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7766 (modules '((guix build utils)))
7767 (snippet
7768 '(begin (substitute* "requirements.txt"
7769 (("ipython.*") "ipython\n"))
7770 #t))))
7771 (build-system python-build-system)
7772 (arguments
7773 `(#:tests? #f ; Test suite can't find IPython.
7774 #:phases
7775 (modify-phases %standard-phases
7776 (replace 'check
7777 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7778 (if tests?
7779 (begin
7780 (setenv "HOME" (getcwd))
7781 (add-installed-pythonpath inputs outputs)
7782 (invoke "python" "example/example.py" "--local"))
7783 #t))))))
7784 (propagated-inputs
7785 `(("python-ipyparallel" ,python-ipyparallel)
7786 ("python-ipython" ,python-ipython)
7787 ("python-netifaces" ,python-netifaces)
7788 ("python-pyzmq" ,python-pyzmq)
7789 ("python-setuptools" ,python-setuptools)
7790 ("python-six" ,python-six)))
7791 (home-page "https://github.com/roryk/ipython-cluster-helper")
7792 (synopsis
7793 "Simplify IPython cluster start up and use for multiple schedulers")
7794 (description
7795 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7796 profile, launches a cluster and returns a view. On program exit it shuts the
7797 cluster down and deletes the throwaway profile.")
7798 (license license:expat)))
7799
7800 (define-public python-traitlets
7801 (package
7802 (name "python-traitlets")
7803 (version "4.3.3")
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "traitlets" version))
7808 (sha256
7809 (base32
7810 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7811 (build-system python-build-system)
7812 (arguments
7813 `(#:phases
7814 (modify-phases %standard-phases
7815 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7816 (propagated-inputs
7817 `(("python-ipython-genutils" ,python-ipython-genutils)
7818 ("python-decorator" ,python-decorator)
7819 ("python-six" ,python-six)))
7820 (native-inputs
7821 `(("python-pytest" ,python-pytest)))
7822 (properties `((python2-variant . ,(delay python2-traitlets))))
7823 (home-page "https://ipython.org")
7824 (synopsis "Configuration system for Python applications")
7825 (description
7826 "Traitlets is a framework that lets Python classes have attributes with
7827 type checking, dynamically calculated default values, and ‘on change’
7828 callbacks. The package also includes a mechanism to use traitlets for
7829 configuration, loading values from files or from command line arguments. This
7830 is a distinct layer on top of traitlets, so you can use traitlets in your code
7831 without using the configuration machinery.")
7832 (license license:bsd-3)))
7833
7834 (define-public python2-traitlets
7835 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7836 (package/inherit traitlets
7837 (propagated-inputs
7838 `(("python2-enum34" ,python2-enum34)
7839 ,@(package-propagated-inputs traitlets))))))
7840
7841 (define-public python-jupyter-core
7842 (package
7843 (name "python-jupyter-core")
7844 (version "4.7.1")
7845 (source
7846 (origin
7847 (method url-fetch)
7848 (uri (string-append (pypi-uri "jupyter_core" version)))
7849 (sha256
7850 (base32
7851 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7852 (build-system python-build-system)
7853 (arguments
7854 `(#:phases
7855 (modify-phases %standard-phases
7856 (replace 'check
7857 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7858 (when tests?
7859 ; Some tests write to $HOME.
7860 (setenv "HOME" "/tmp")
7861 ; Some tests load the installed package.
7862 (add-installed-pythonpath inputs outputs)
7863 (invoke "pytest" "-vv"))))
7864 (add-after 'unpack 'patch-testsuite
7865 (lambda _
7866 ;; test_not_on_path() and test_path_priority() try to run a test
7867 ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
7868 (substitute* "jupyter_core/tests/test_command.py"
7869 (("env = \\{'PATH': ''\\}")
7870 "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
7871 (("env = \\{'PATH': str\\(b\\)\\}")
7872 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))
7873 #t))
7874 ;; Migration is running whenever etc/jupyter exists, but the
7875 ;; Guix-managed directory will never contain any migratable IPython
7876 ;; config files and cannot be written to anyway, so just pretend we
7877 ;; already did that.
7878 (add-after 'install 'disable-migration
7879 (lambda* (#:key outputs #:allow-other-keys)
7880 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
7881 (invoke "touch"
7882 (string-append
7883 (assoc-ref outputs "out")
7884 "/etc/jupyter/migrated")))))))
7885 (propagated-inputs
7886 `(("python-traitlets" ,python-traitlets)))
7887 (native-inputs
7888 `(("python-six" ,python-six)
7889 ("python-pytest" ,python-pytest)))
7890 ;; This package provides the `jupyter` binary and thus also exports the
7891 ;; search paths.
7892 (native-search-paths
7893 (list (search-path-specification
7894 (variable "JUPYTER_CONFIG_DIR")
7895 (files '("etc/jupyter")))
7896 (search-path-specification
7897 (variable "JUPYTER_PATH")
7898 (files '("share/jupyter")))))
7899 (home-page "https://jupyter.org/")
7900 (synopsis "Jupyter base package")
7901 (description
7902 "Jupyter core is the base package on which Jupyter projects rely.")
7903 (license license:bsd-3)))
7904
7905 (define-public python-jupyter-client
7906 (package
7907 (name "python-jupyter-client")
7908 (version "6.1.12")
7909 (source
7910 (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "jupyter_client" version))
7913 (sha256
7914 (base32
7915 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7916 (build-system python-build-system)
7917 (arguments
7918 `(#:phases
7919 (modify-phases %standard-phases
7920 (add-after 'unpack 'set-tool-file-names
7921 (lambda* (#:key inputs #:allow-other-keys)
7922 (let ((iproute (assoc-ref inputs "iproute")))
7923 (substitute* "jupyter_client/localinterfaces.py"
7924 (("'ip'")
7925 (string-append "'" iproute "/sbin/ip'")))
7926 #t)))
7927 (replace 'check
7928 (lambda* (#:key tests? #:allow-other-keys)
7929 (when tests?
7930 ;; Some tests try to write to $HOME.
7931 (setenv "HOME" "/tmp")
7932 (invoke "pytest" "-vv")))))))
7933 (inputs
7934 `(("iproute" ,iproute)))
7935 (propagated-inputs
7936 `(("python-dateutil" ,python-dateutil)
7937 ("python-jupyter-core" ,python-jupyter-core)
7938 ("python-pyzmq" ,python-pyzmq)
7939 ("python-tornado" ,python-tornado-6)
7940 ("python-traitlets" ,python-traitlets)))
7941 (native-inputs
7942 `(("python-pytest" ,python-pytest)
7943 ("python-pytest-asyncio" ,python-pytest-asyncio)
7944 ("python-pytest-timeout" ,python-pytest-timeout)
7945 ("python-async-generator" ,python-async-generator)
7946 ("python-mock" ,python-mock)
7947 ("python-msgpack" ,python-msgpack)
7948 ("python-ipython" ,python-ipython)
7949 ("python-ipykernel" ,python-ipykernel-bootstrap)))
7950 (home-page "https://jupyter.org/")
7951 (synopsis "Jupyter protocol implementation and client libraries")
7952 (description
7953 "The @code{jupyter_client} package contains the reference implementation
7954 of the Jupyter protocol. It also provides client and kernel management APIs
7955 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7956 installing @code{kernelspec}s for use with Jupyter frontends.")
7957 (license license:bsd-3)))
7958
7959 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
7960 ;; and jupyter-client by removing the former from its native-inputs and
7961 ;; disabling tests.
7962 (define-public python-jupyter-client-bootstrap
7963 (let ((base python-jupyter-client))
7964 (hidden-package
7965 (package
7966 (inherit base)
7967 (name "python-jupyter-client-bootstrap")
7968 (arguments
7969 `(#:tests? #f
7970 ,@(package-arguments base)))
7971 (native-inputs `())))))
7972
7973 (define-public python-ipykernel
7974 (package
7975 (name "python-ipykernel")
7976 (version "5.5.3")
7977 (source
7978 (origin
7979 (method url-fetch)
7980 (uri (pypi-uri "ipykernel" version))
7981 (sha256
7982 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7983 (build-system python-build-system)
7984 (arguments
7985 `(#:phases
7986 (modify-phases %standard-phases
7987 (replace 'check
7988 (lambda _
7989 (setenv "HOME" "/tmp")
7990 (invoke "pytest" "-v")
7991 #t))
7992 (add-after 'install 'set-python-file-name
7993 (lambda* (#:key outputs #:allow-other-keys)
7994 ;; Record the absolute file name of the 'python' executable in
7995 ;; 'kernel.json'.
7996 (let ((out (assoc-ref outputs "out")))
7997 (substitute* (string-append out "/share/jupyter"
7998 "/kernels/python3/kernel.json")
7999 (("\"python\"")
8000 (string-append "\"" (which "python") "\"")))
8001 #t))))))
8002 (propagated-inputs
8003 `(("python-ipython" ,python-ipython)
8004 ("python-tornado" ,python-tornado-6)
8005 ("python-traitlets" ,python-traitlets)
8006 ;; imported at runtime during connect
8007 ("python-jupyter-client" ,python-jupyter-client)))
8008 (native-inputs
8009 `(("python-flaky" ,python-flaky)
8010 ("python-nose" ,python-nose)
8011 ("python-pytest" ,python-pytest)))
8012 (home-page "https://ipython.org")
8013 (synopsis "IPython Kernel for Jupyter")
8014 (description
8015 "This package provides the IPython kernel for Jupyter.")
8016 (license license:bsd-3)))
8017
8018 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
8019 ;; break the cycle between ipykernel and jupyter-client.
8020 (define-public python-ipykernel-bootstrap
8021 (let ((parent python-ipykernel))
8022 (hidden-package
8023 (package
8024 (inherit parent)
8025 (name "python-ipykernel-bootstrap")
8026 (propagated-inputs
8027 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
8028 ,@(fold alist-delete (package-propagated-inputs parent)
8029 '("python-jupyter-client"))))))))
8030
8031 (define-public python-pari-jupyter
8032 (package
8033 (name "python-pari-jupyter")
8034 (version "1.3.2")
8035 (source
8036 (origin
8037 (method url-fetch)
8038 (uri (pypi-uri "pari_jupyter" version))
8039 (sha256
8040 (base32
8041 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
8042 (build-system python-build-system)
8043 (propagated-inputs
8044 `(("python-ipykernel" ,python-ipykernel)))
8045 (inputs
8046 `(("pari-gp" ,pari-gp)
8047 ("readline" ,readline)))
8048 (arguments
8049 `(#:tests? #f)) ; no test suite
8050 (home-page
8051 "https://github.com/jdemeyer/pari_jupyter")
8052 (synopsis "A Jupyter kernel for PARI/GP")
8053 (description "The package provides a PARI/GP kernel for Jupyter.")
8054 (license license:gpl3+)))
8055
8056 (define-public python-backcall
8057 (package
8058 (name "python-backcall")
8059 (version "0.2.0")
8060 (source
8061 (origin
8062 (method url-fetch)
8063 (uri (pypi-uri "backcall" version))
8064 (sha256
8065 (base32
8066 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
8067 (build-system python-build-system)
8068 (home-page "https://github.com/takluyver/backcall/")
8069 (synopsis "Specifications for callback functions passed in to an API")
8070 (description
8071 "If your code lets other people supply callback functions, it's important
8072 to specify the function signature you expect, and check that functions support
8073 that. Adding extra parameters later would break other peoples code unless
8074 you're careful. The @code{backcall} package provides a way of specifying the
8075 callback signature using a prototype function.")
8076 (license license:bsd-3)))
8077
8078 (define-public python-ipython
8079 (package
8080 (name "python-ipython")
8081 (version "7.9.0")
8082 (source
8083 (origin
8084 (method url-fetch)
8085 (uri (pypi-uri "ipython" version ".tar.gz"))
8086 (sha256
8087 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8088 (build-system python-build-system)
8089 (propagated-inputs
8090 `(("python-backcall" ,python-backcall)
8091 ("python-pyzmq" ,python-pyzmq)
8092 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
8093 ("python-terminado" ,python-terminado)
8094 ("python-matplotlib" ,python-matplotlib)
8095 ("python-numpy" ,python-numpy)
8096 ("python-numpydoc" ,python-numpydoc)
8097 ("python-jedi" ,python-jedi)
8098 ("python-jinja2" ,python-jinja2)
8099 ("python-mistune" ,python-mistune)
8100 ("python-pexpect" ,python-pexpect)
8101 ("python-pickleshare" ,python-pickleshare)
8102 ("python-simplegeneric" ,python-simplegeneric)
8103 ("python-jsonschema" ,python-jsonschema)
8104 ("python-traitlets" ,python-traitlets)
8105 ("python-nbformat" ,python-nbformat)
8106 ("python-pygments" ,python-pygments)))
8107 (inputs
8108 `(("readline" ,readline)
8109 ("which" ,which)))
8110 (native-inputs
8111 `(("graphviz" ,graphviz)
8112 ("pkg-config" ,pkg-config)
8113 ("python-requests" ,python-requests) ;; for tests
8114 ("python-testpath" ,python-testpath)
8115 ("python-nose" ,python-nose)))
8116 (arguments
8117 `(#:phases
8118 (modify-phases %standard-phases
8119 (add-after 'unpack 'make-docs-reproducible
8120 (lambda _
8121 (substitute* "IPython/sphinxext/ipython_directive.py"
8122 ((".*import datetime") "")
8123 ((".*datetime.datetime.now\\(\\)") "")
8124 (("%timeit") "# %timeit"))
8125 #t))
8126 ;; Tests can only be run after the library has been installed and not
8127 ;; within the source directory.
8128 (delete 'check)
8129 (add-after 'install 'check
8130 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8131 (if tests?
8132 (begin
8133 ;; Make installed package available for running the tests
8134 (add-installed-pythonpath inputs outputs)
8135 (setenv "HOME" "/tmp/") ;; required by a test
8136 ;; We only test the core because one of the other tests
8137 ;; tries to import ipykernel.
8138 (invoke "python" "IPython/testing/iptest.py"
8139 "-v" "IPython/core/tests"))
8140 #t)))
8141 (add-before 'check 'fix-tests
8142 (lambda* (#:key inputs #:allow-other-keys)
8143 (substitute* "./IPython/utils/_process_posix.py"
8144 (("/usr/bin/env', 'which") (which "which")))
8145 (substitute* "./IPython/core/tests/test_inputtransformer.py"
8146 (("#!/usr/bin/env python")
8147 (string-append "#!" (which "python"))))
8148 ;; This test introduces a circular dependency on ipykernel
8149 ;; (which depends on ipython).
8150 (delete-file "IPython/core/tests/test_display.py")
8151 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
8152 (delete-file "IPython/core/tests/test_interactiveshell.py")
8153 #t)))))
8154 (home-page "https://ipython.org")
8155 (synopsis "IPython is a tool for interactive computing in Python")
8156 (description
8157 "IPython provides a rich architecture for interactive computing with:
8158 Powerful interactive shells, a browser-based notebook, support for interactive
8159 data visualization, embeddable interpreters and tools for parallel
8160 computing.")
8161 (license license:bsd-3)))
8162
8163 (define-public python-ipython-documentation
8164 (package
8165 (inherit python-ipython)
8166 (name "python-ipython-documentation")
8167 (version (package-version python-ipython))
8168 (arguments
8169 `(#:phases
8170 (modify-phases %standard-phases
8171 (delete 'build)
8172 (delete 'check)
8173 (replace 'install
8174 (lambda* (#:key outputs #:allow-other-keys)
8175 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8176 (doc (string-append data "/doc/" ,name "-" ,version))
8177 (html (string-append doc "/html"))
8178 (man1 (string-append data "/man/man1"))
8179 (info (string-append data "/info"))
8180 (examples (string-append doc "/examples"))
8181 (python-arg (string-append "PYTHON=" (which "python"))))
8182 (setenv "LANG" "en_US.utf8")
8183 (with-directory-excursion "docs"
8184 ;; FIXME: pdf fails to build
8185 ;;(system* "make" "pdf" "PAPER=a4")
8186 (system* "make" python-arg "html")
8187 ;; FIXME: the generated texi file contains ^@^@, which trips
8188 ;; up the parser.
8189 ;; (system* "make" python-arg "info")
8190 )
8191 (copy-recursively "docs/man" man1)
8192 (copy-recursively "examples" examples)
8193 (copy-recursively "docs/build/html" html)
8194 ;; (copy-file "docs/build/latex/ipython.pdf"
8195 ;; (string-append doc "/ipython.pdf"))
8196 (mkdir-p info)
8197 ;; (copy-file "docs/build/texinfo/ipython.info"
8198 ;; (string-append info "/ipython.info"))
8199 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8200 #t)))))
8201 (inputs
8202 `(("python-ipython" ,python-ipython)
8203 ("python-ipykernel" ,python-ipykernel)))
8204 (native-inputs
8205 `(("python-sphinx" ,python-sphinx)
8206 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8207 ;; FIXME: It's possible that a smaller union would work just as well.
8208 ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
8209 texlive-fonts-ec
8210 texlive-generic-iftex
8211 texlive-pdftex
8212 texlive-latex-capt-of
8213 texlive-latex-cmap
8214 texlive-latex-environ
8215 texlive-latex-eqparbox
8216 texlive-etoolbox
8217 texlive-latex-expdlist
8218 texlive-latex-fancyhdr
8219 texlive-latex-fancyvrb
8220 texlive-latex-fncychap
8221 texlive-latex-float
8222 texlive-latex-framed
8223 texlive-latex-geometry
8224 texlive-latex-graphics
8225 texlive-hyperref
8226 texlive-latex-mdwtools
8227 texlive-latex-multirow
8228 texlive-latex-needspace
8229 texlive-oberdiek
8230 texlive-latex-parskip
8231 texlive-latex-preview
8232 texlive-latex-tabulary
8233 texlive-latex-threeparttable
8234 texlive-latex-titlesec
8235 texlive-latex-trimspaces
8236 texlive-latex-ucs
8237 texlive-latex-upquote
8238 texlive-url
8239 texlive-latex-varwidth
8240 texlive-latex-wrapfig)))
8241 ("texinfo" ,texinfo)))))
8242
8243 (define-public python-urwid
8244 (package
8245 (name "python-urwid")
8246 (version "2.1.2")
8247 (source
8248 (origin
8249 (method url-fetch)
8250 (uri (pypi-uri "urwid" version))
8251 (sha256
8252 (base32
8253 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8254 (build-system python-build-system)
8255 (home-page "http://urwid.org")
8256 (synopsis "Console user interface library for Python")
8257 (description
8258 "Urwid is a curses-based UI/widget library for Python. It includes many
8259 features useful for text console applications.")
8260 (properties `((python2-variant . ,(delay python2-urwid))))
8261 (license license:lgpl2.1+)))
8262
8263 (define-public python2-urwid
8264 (let ((base (package-with-python2
8265 (strip-python2-variant python-urwid))))
8266 (package
8267 (inherit base)
8268 (version "2.1.0")
8269 (source
8270 (origin
8271 (method url-fetch)
8272 (uri (pypi-uri "urwid" version))
8273 (sha256
8274 (base32
8275 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8276
8277 (define-public python-urwid-readline
8278 (package
8279 (name "python-urwid-readline")
8280 (version "0.12")
8281 (source
8282 (origin
8283 (method git-fetch)
8284 (uri (git-reference
8285 (url "https://github.com/rr-/urwid_readline")
8286 (commit version)))
8287 (file-name (git-file-name name version))
8288 (sha256
8289 (base32
8290 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8291 (build-system python-build-system)
8292 (arguments
8293 `(#:phases
8294 (modify-phases %standard-phases
8295 (replace 'check
8296 (lambda* (#:key tests? #:allow-other-keys)
8297 (when tests?
8298 (invoke "python" "-m" "pytest"))
8299 #t)))))
8300 (propagated-inputs
8301 `(("python-urwid" ,python-urwid)))
8302 (native-inputs
8303 `(("python-pytest" ,python-pytest)))
8304 (home-page "https://github.com/rr-/urwid_readline")
8305 (synopsis "Text input widget for urwid that supports readline shortcuts")
8306 (description
8307 "This package provides a textbox edit widget for @code{python-urwid} that
8308 supports @code{readline} shortcuts.")
8309 (license license:expat)))
8310
8311 (define-public python-textdistance
8312 (package
8313 (name "python-textdistance")
8314 (version "4.2.1")
8315 (source
8316 (origin
8317 ;; There are no tests in the PyPI tarball.
8318 (method git-fetch)
8319 (uri (git-reference
8320 (url "https://github.com/life4/textdistance")
8321 (commit (string-append "v." version))))
8322 (file-name (git-file-name name version))
8323 (sha256
8324 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8325 (build-system python-build-system)
8326 (arguments
8327 `(#:test-target "pytest"
8328 #:phases
8329 (modify-phases %standard-phases
8330 (add-after 'unpack 'delete-external-test
8331 (lambda _
8332 ;; All tests in this file require external libraries.
8333 (delete-file "tests/test_external.py")
8334 #t)))))
8335 (native-inputs
8336 `(("python-hypothesis" ,python-hypothesis)
8337 ("python-isort" ,python-isort)
8338 ("python-numpy" ,python-numpy)
8339 ("python-pytest" ,python-pytest)
8340 ("python-pytest-runner" ,python-pytest-runner)
8341 ("python-tabulate" ,python-tabulate)))
8342 (home-page "https://github.com/life4/textdistance")
8343 (synopsis "Compute distance between the two texts")
8344 (description "@code{textdistance} is a pure Python library for comparing
8345 distance between two or more sequences by many algorithms.")
8346 (license license:expat)))
8347
8348 (define-public python-urwidtrees
8349 (package
8350 (name "python-urwidtrees")
8351 (version "1.0.2")
8352 (source
8353 (origin
8354 (method git-fetch)
8355 ;; package author intends on distributing via github rather than pypi:
8356 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8357 (uri (git-reference
8358 (url "https://github.com/pazz/urwidtrees")
8359 (commit version)))
8360 (file-name (git-file-name name version))
8361 (sha256
8362 (base32
8363 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8364 (build-system python-build-system)
8365 (arguments
8366 '(#:use-setuptools? #f
8367 #:tests? #f)) ; no tests
8368 (propagated-inputs `(("python-urwid" ,python-urwid)))
8369 (home-page "https://github.com/pazz/urwidtrees")
8370 (synopsis "Tree widgets for urwid")
8371 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8372 toolkit. Use it to build trees of widgets.")
8373 (license license:gpl3+)))
8374
8375 (define-public python2-urwidtrees
8376 (package-with-python2 python-urwidtrees))
8377
8378 (define-public python-ua-parser
8379 (package
8380 (name "python-ua-parser")
8381 (version "0.8.0")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "ua-parser" version))
8386 (sha256
8387 (base32
8388 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8389 (build-system python-build-system)
8390 (arguments
8391 `(#:tests? #f)) ;no test suite in release
8392 (native-inputs
8393 `(("python-pyyaml" ,python-pyyaml)))
8394 (home-page "https://github.com/ua-parser/uap-python")
8395 (synopsis "User agent parser")
8396 (description
8397 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8398 (license license:asl2.0)))
8399
8400 (define-public python2-ua-parser
8401 (package-with-python2 python-ua-parser))
8402
8403 (define-public python-user-agents
8404 (package
8405 (name "python-user-agents")
8406 (version "1.1.0")
8407 (source
8408 (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "user-agents" version))
8411 (sha256
8412 (base32
8413 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8414 (build-system python-build-system)
8415 (arguments
8416 `(#:tests? #f)) ;missing devices.json test file in release
8417 (propagated-inputs
8418 `(("python-ua-parser" ,python-ua-parser)))
8419 (home-page "https://github.com/selwin/python-user-agents")
8420 (synopsis "User Agent strings parsing library")
8421 (description
8422 "A library to identify devices (phones, tablets) and their capabilities by
8423 parsing (browser/HTTP) user agent strings.")
8424 (license license:expat)))
8425
8426 (define-public python2-user-agents
8427 (package-with-python2 python-user-agents))
8428
8429 (define-public python-dbus
8430 (package
8431 (name "python-dbus")
8432 (version "1.2.16")
8433 (source
8434 (origin
8435 (method url-fetch)
8436 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8437 "dbus-python-" version ".tar.gz"))
8438 (sha256
8439 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8440 (build-system gnu-build-system)
8441 (native-inputs
8442 `(("pkg-config" ,pkg-config)))
8443 (inputs
8444 `(("python" ,python-wrapper)
8445 ("dbus-glib" ,dbus-glib)))
8446 (synopsis "Python bindings for D-bus")
8447 (description "python-dbus provides bindings for libdbus, the reference
8448 implementation of D-Bus.")
8449 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8450 (license license:expat)))
8451
8452 (define-public python2-dbus
8453 (package/inherit python-dbus
8454 (name "python2-dbus")
8455 (inputs `(("python" ,python-2)
8456 ,@(alist-delete "python"
8457 (package-inputs python-dbus)
8458 equal?)))))
8459
8460 (define-public python-notify2
8461 (package
8462 (name "python-notify2")
8463 (version "0.3.1")
8464 (source
8465 (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "notify2" version))
8468 (sha256
8469 (base32
8470 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8471 (build-system python-build-system)
8472 (arguments `(#:tests? #f)) ; tests depend on system state
8473 (native-inputs
8474 `(("python-dbus" ,python-dbus)))
8475 (home-page "https://bitbucket.org/takluyver/pynotify2")
8476 (synopsis "Python interface to D-Bus notifications")
8477 (description
8478 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8479 It is a reimplementation of pynotify in pure Python, and an alternative to
8480 the GObject Introspection bindings to libnotify for non-GTK applications.")
8481 (license (list license:bsd-2
8482 license:lgpl2.1+))))
8483
8484 (define-public python2-notify2
8485 (package-with-python2 python-notify2))
8486
8487 ;; beautifulsoup4 has a totally different namespace than 3.x,
8488 ;; and pypi seems to put it under its own name, so I guess we should too
8489 (define-public python-beautifulsoup4
8490 (package
8491 (name "python-beautifulsoup4")
8492 (version "4.9.3")
8493 (source
8494 (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "beautifulsoup4" version))
8497 (sha256
8498 (base32
8499 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8500 (build-system python-build-system)
8501 (arguments
8502 `(#:phases
8503 (modify-phases %standard-phases
8504 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8505 ;; must use this conversion script when building with Python 3. The
8506 ;; conversion script also runs the tests.
8507 ;; For more information, see the file 'convert-py3k' in the source
8508 ;; distribution.
8509 (replace 'check
8510 (lambda _ (invoke "./convert-py3k"))))))
8511 (propagated-inputs
8512 `(("python-soupsieve" ,python-soupsieve)))
8513 (home-page
8514 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8515 (synopsis
8516 "Python screen-scraping library")
8517 (description
8518 "Beautiful Soup is a Python library designed for rapidly setting up
8519 screen-scraping projects. It offers Pythonic idioms for navigating,
8520 searching, and modifying a parse tree, providing a toolkit for
8521 dissecting a document and extracting what you need. It automatically
8522 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8523 (license license:expat)
8524 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8525
8526 (define-public python2-beautifulsoup4
8527 (let ((base (package-with-python2
8528 (strip-python2-variant python-beautifulsoup4))))
8529 (package/inherit base
8530 (arguments `(#:python ,python-2)))))
8531
8532 (define-public python-soupsieve
8533 (package
8534 (name "python-soupsieve")
8535 (version "2.2.1")
8536 (source
8537 (origin
8538 (method url-fetch)
8539 (uri (pypi-uri "soupsieve" version))
8540 (sha256
8541 (base32
8542 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8543 (build-system python-build-system)
8544 (arguments
8545 ;;XXX: 2 tests fail currently despite claming they were to be
8546 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8547 ;;don't want to create a circular dependency.
8548 (list #:tests? #f
8549 #:phases
8550 #~(modify-phases %standard-phases
8551 ;; Circular dependency with python-beautifulsoup4.
8552 (delete 'sanity-check))))
8553 (home-page "https://github.com/facelessuser/soupsieve")
8554 (synopsis "CSS selector library")
8555 (description
8556 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8557 Soup 4. It aims to provide selecting, matching, and filtering using modern
8558 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8559 specifications up through the latest CSS level 4 drafts and beyond (though
8560 some are not yet implemented).")
8561 (properties `((python2-variant . ,(delay python2-soupsieve))))
8562 (license license:expat)))
8563
8564 ;; This is the last version that supports python-2
8565 (define-public python2-soupsieve
8566 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8567 (package
8568 (inherit base)
8569 (version "1.9.6")
8570 (source
8571 (origin
8572 (method url-fetch)
8573 (uri (pypi-uri "soupsieve" version))
8574 (sha256
8575 (base32
8576 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8577 (propagated-inputs
8578 `(("python2-backports-functools-lru-cache"
8579 ,python2-backports-functools-lru-cache)
8580 ,@(package-propagated-inputs base))))))
8581
8582 (define-public python-netifaces
8583 (package
8584 (name "python-netifaces")
8585 (version "0.10.9")
8586 (source
8587 (origin
8588 (method url-fetch)
8589 (uri (pypi-uri "netifaces" version))
8590 (sha256
8591 (base32
8592 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8593 (build-system python-build-system)
8594 (home-page "https://github.com/al45tair/netifaces")
8595 (synopsis
8596 "Python module for portable network interface information")
8597 (description
8598 "Netifaces is a Python module providing information on network
8599 interfaces in an easy and portable manner.")
8600 (license license:expat)))
8601
8602 (define-public python2-netifaces
8603 (package-with-python2 python-netifaces))
8604
8605 (define-public python-networkx
8606 (package
8607 (name "python-networkx")
8608 (version "2.6.2")
8609 (source
8610 (origin
8611 (method url-fetch)
8612 (uri (pypi-uri "networkx" version))
8613 (sha256
8614 (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
8615 (build-system python-build-system)
8616 (arguments
8617 '(#:phases (modify-phases %standard-phases
8618 (replace 'check
8619 (lambda* (#:key tests? #:allow-other-keys)
8620 (if tests?
8621 (invoke "pytest" "-vv" "--pyargs" "networkx")
8622 (format #t "test suite not run~%"))
8623 #t)))))
8624 ;; python-decorator is needed at runtime.
8625 (propagated-inputs
8626 `(("python-decorator" ,python-decorator)))
8627 (native-inputs
8628 `(("python-pytest" ,python-pytest)))
8629 (home-page "https://networkx.github.io/")
8630 (synopsis "Python module for creating and manipulating graphs and networks")
8631 (description
8632 "NetworkX is a Python package for the creation, manipulation, and study
8633 of the structure, dynamics, and functions of complex networks.")
8634 (properties `((python2-variant . ,(delay python2-networkx))))
8635 (license license:bsd-3)))
8636
8637 ;; NetworkX 2.2 is the last version with support for Python 2.
8638 (define-public python2-networkx
8639 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8640 (package
8641 (inherit base)
8642 (version "2.2")
8643 (source (origin
8644 (method url-fetch)
8645 (uri (pypi-uri "networkx" version ".zip"))
8646 (sha256
8647 (base32
8648 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8649 (arguments
8650 `(#:python ,python-2))
8651 (native-inputs
8652 `(("python-nose" ,python2-nose)
8653 ("unzip" ,unzip))))))
8654
8655 (define-public python-datrie
8656 (package
8657 (name "python-datrie")
8658 (version "0.8.2")
8659 (source
8660 (origin
8661 (method url-fetch)
8662 (uri (pypi-uri "datrie" version))
8663 (sha256
8664 (base32
8665 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8666 (build-system python-build-system)
8667 (native-inputs
8668 `(("python-cython" ,python-cython)
8669 ("python-hypothesis" ,python-hypothesis)
8670 ("python-pytest" ,python-pytest)
8671 ("python-pytest-runner" ,python-pytest-runner)))
8672 (home-page "https://github.com/kmike/datrie")
8673 (synopsis "Fast, efficiently stored trie for Python")
8674 (description
8675 "This package provides a fast, efficiently stored trie implementation for
8676 Python.")
8677 (license license:lgpl2.1+)))
8678
8679 (define-public python-amply
8680 (package
8681 (name "python-amply")
8682 (version "0.1.4")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "amply" version))
8687 (sha256
8688 (base32
8689 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8690 (build-system python-build-system)
8691 (propagated-inputs
8692 `(("python-docutils" ,python-docutils)
8693 ("python-pyparsing" ,python-pyparsing)))
8694 (native-inputs
8695 `(("python-setuptools-scm" ,python-setuptools-scm)))
8696 (home-page "https://github.com/willu47/amply")
8697 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8698 (description
8699 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8700 structures.")
8701 (license license:epl1.0)))
8702
8703 (define-public python-pulp
8704 (package
8705 (name "python-pulp")
8706 (version "2.4")
8707 (source
8708 (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "PuLP" version))
8711 (sha256
8712 (base32
8713 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8714 (build-system python-build-system)
8715 (propagated-inputs
8716 `(("python-amply" ,python-amply)))
8717 (home-page "https://github.com/coin-or/pulp")
8718 (synopsis "Linear Programming modeler")
8719 (description
8720 "PuLP is a Linear Programming modeler written in Python. PuLP can
8721 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8722 solve linear problems.")
8723 (license license:expat)))
8724
8725 (define-public python-toposort
8726 (package
8727 (name "python-toposort")
8728 (version "1.6")
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "toposort" version))
8733 (sha256
8734 (base32
8735 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8736 (build-system python-build-system)
8737 (home-page "https://gitlab.com/ericvsmith/toposort")
8738 (synopsis "Topological sort algorithm")
8739 (description
8740 "This package provides an implementation of a topological sort
8741 algorithm.")
8742 (license license:asl2.0)))
8743
8744 (define-public python-three-merge
8745 (package
8746 (name "python-three-merge")
8747 (version "0.1.1")
8748 (source
8749 (origin
8750 ;; There are no tests in the PyPI tarball.
8751 (method git-fetch)
8752 (uri (git-reference
8753 (url "https://github.com/spyder-ide/three-merge")
8754 (commit (string-append "v" version))))
8755 (file-name (git-file-name name version))
8756 (sha256
8757 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
8758 (build-system python-build-system)
8759 (arguments
8760 `(#:test-target "pytest"))
8761 (propagated-inputs
8762 `(("python-diff-match-patch" ,python-diff-match-patch)))
8763 (native-inputs
8764 `(("python-flaky" ,python-flaky)
8765 ("python-pytest" ,python-pytest)
8766 ("python-pytest-cov" ,python-pytest-cov)
8767 ("python-pytest-runner" ,python-pytest-runner)
8768 ("python-pytest-timeout" ,python-pytest-timeout)))
8769 (home-page "https://github.com/spyder-ide/three-merge")
8770 (synopsis "Library for merging two strings with respect to a base one")
8771 (description
8772 "This package provides a Python library to perform a 3-way merge between
8773 strings, based on @code{diff-match-patch}. This library performs merges at a
8774 character level, as opposed to most VCS systems, which opt for a line-based
8775 approach.")
8776 (license license:expat)))
8777
8778 (define-public snakemake
8779 (package
8780 (name "snakemake")
8781 (version "5.32.2")
8782 (source
8783 (origin
8784 (method url-fetch)
8785 (uri (pypi-uri "snakemake" version))
8786 (sha256
8787 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8788 (build-system python-build-system)
8789 (arguments
8790 ;; TODO: Package missing test dependencies.
8791 '(#:tests? #f
8792 #:phases
8793 (modify-phases %standard-phases
8794 ;; For cluster execution Snakemake will call Python. Since there is
8795 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8796 ;; this by calling the snakemake wrapper instead.
8797 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8798 (lambda* (#:key outputs #:allow-other-keys)
8799 (substitute* "snakemake/executors/__init__.py"
8800 (("\\{sys.executable\\} -m snakemake")
8801 (string-append (assoc-ref outputs "out")
8802 "/bin/snakemake")))
8803 #t)))))
8804 (propagated-inputs
8805 `(("python-appdirs" ,python-appdirs)
8806 ("python-configargparse" ,python-configargparse)
8807 ("python-datrie" ,python-datrie)
8808 ("python-docutils" ,python-docutils)
8809 ("python-gitpython" ,python-gitpython)
8810 ("python-jinja2" ,python-jinja2)
8811 ("python-jsonschema" ,python-jsonschema)
8812 ("python-nbformat" ,python-nbformat)
8813 ("python-networkx" ,python-networkx)
8814 ("python-psutil" ,python-psutil)
8815 ("python-pulp" ,python-pulp)
8816 ("python-pyyaml" ,python-pyyaml)
8817 ("python-ratelimiter" ,python-ratelimiter)
8818 ("python-requests" ,python-requests)
8819 ("python-toposort" ,python-toposort)
8820 ("python-wrapt" ,python-wrapt)))
8821 (home-page "https://snakemake.readthedocs.io")
8822 (synopsis "Python-based execution environment for make-like workflows")
8823 (description
8824 "Snakemake aims to reduce the complexity of creating workflows by
8825 providing a clean and modern domain specific specification language (DSL) in
8826 Python style, together with a fast and comfortable execution environment.")
8827 (license license:expat)))
8828
8829 (define-public python-pyqrcode
8830 (package
8831 (name "python-pyqrcode")
8832 (version "1.2.1")
8833 (source
8834 (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "PyQRCode" version))
8837 (sha256
8838 (base32
8839 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8840 (build-system python-build-system)
8841 (home-page
8842 "https://github.com/mnooner256/pyqrcode")
8843 (synopsis "QR code generator")
8844 (description
8845 "Pyqrcode is a QR code generator written purely in Python with
8846 SVG, EPS, PNG and terminal output.")
8847 (license license:bsd-3)))
8848
8849 (define-public python-seaborn
8850 (package
8851 (name "python-seaborn")
8852 (version "0.11.1")
8853 (source
8854 (origin
8855 (method url-fetch)
8856 (uri (pypi-uri "seaborn" version))
8857 (sha256
8858 (base32 "1b81p9s6li3b606ivgbynrh102fclwlw74m8qxzsii9pv6p8xrs4"))
8859 (patches (search-patches "python-seaborn-kde-test.patch"))))
8860 (build-system python-build-system)
8861 (arguments
8862 `(#:phases
8863 (modify-phases %standard-phases
8864 (add-before 'check 'start-xserver
8865 (lambda _
8866 ;; There must be a running X server and make check doesn't
8867 ;; start one. Therefore we must do it.
8868 (system "Xvfb :1 &")
8869 (setenv "DISPLAY" ":1")))
8870 (replace 'check
8871 (lambda* (#:key tests? #:allow-other-keys)
8872 (when tests?
8873 (invoke "pytest" "seaborn")))))))
8874 (propagated-inputs
8875 `(("python-pandas" ,python-pandas)
8876 ("python-matplotlib" ,python-matplotlib)
8877 ("python-numpy" ,python-numpy)
8878 ("python-scipy" ,python-scipy)))
8879 (native-inputs
8880 `(("python-pytest" ,python-pytest)
8881 ("xorg-server" ,xorg-server-for-tests)))
8882 (home-page "https://seaborn.pydata.org/")
8883 (synopsis "Statistical data visualization")
8884 (description
8885 "Seaborn is a library for making attractive and informative statistical
8886 graphics in Python. It is built on top of matplotlib and tightly integrated
8887 with the PyData stack, including support for numpy and pandas data structures
8888 and statistical routines from scipy and statsmodels.")
8889 (properties `((python2-variant . ,(delay python2-seaborn))))
8890 (license license:bsd-3)))
8891
8892 ;; 0.9.1 is the last release with support for Python 2.
8893 (define-public python2-seaborn
8894 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8895 (package
8896 (inherit base)
8897 (version "0.9.1")
8898 (source (origin
8899 (method url-fetch)
8900 (uri (pypi-uri "seaborn" version))
8901 (sha256
8902 (base32
8903 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8904
8905 (define-public python-mpmath
8906 (package
8907 (name "python-mpmath")
8908 (version "1.1.0")
8909 (source (origin
8910 (method url-fetch)
8911 (uri (pypi-uri "mpmath" version))
8912 (file-name (git-file-name name version))
8913 (sha256
8914 (base32
8915 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8916 (build-system python-build-system)
8917 (native-inputs
8918 `(("python-pytest" ,python-pytest)))
8919 (arguments
8920 '(#:phases
8921 (modify-phases %standard-phases
8922 (replace 'check
8923 (lambda _
8924 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8925 (home-page "https://mpmath.org")
8926 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8927 (description
8928 "@code{mpmath} can be used as an arbitrary-precision substitute for
8929 Python's float/complex types and math/cmath modules, but also does much
8930 more advanced mathematics.")
8931 (license license:bsd-3)))
8932
8933 (define-public python2-mpmath
8934 (package-with-python2 python-mpmath))
8935
8936 (define-public python-bigfloat
8937 (package
8938 (name "python-bigfloat")
8939 (version "0.3.0")
8940 (source
8941 (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "bigfloat" version))
8944 (sha256
8945 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8946 (build-system python-build-system)
8947 (inputs
8948 `(("mpfr" ,mpfr)))
8949 (home-page "https://github.com/mdickinson/bigfloat")
8950 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8951 (description
8952 "This package provides a Python interface to the MPFR library for
8953 multiprecision arithmetic.")
8954 (license license:lgpl3+)))
8955
8956 (define-public python-sympy
8957 (package
8958 (name "python-sympy")
8959 (version "1.7.1")
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "sympy" version))
8964 (sha256
8965 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8966 (build-system python-build-system)
8967 (arguments
8968 `(#:phases
8969 (modify-phases %standard-phases
8970 (replace 'check
8971 (lambda* (#:key outputs #:allow-other-keys)
8972 (invoke
8973 (or (which "python3") (which "python"))
8974 "-c" "import sympy; sympy.test(\"/core\")"))))))
8975 (propagated-inputs
8976 `(("python-mpmath" ,python-mpmath)))
8977 (home-page "https://www.sympy.org/")
8978 (synopsis "Python library for symbolic mathematics")
8979 (description
8980 "SymPy is a Python library for symbolic mathematics. It aims to become a
8981 full-featured computer algebra system (CAS) while keeping the code as simple
8982 as possible in order to be comprehensible and easily extensible.")
8983 (license license:bsd-3)))
8984
8985 (define-public python2-sympy
8986 (package
8987 (inherit (package-with-python2 python-sympy))
8988 (version "1.5.1") ; last release for python2
8989 (source
8990 (origin
8991 (method url-fetch)
8992 (uri (pypi-uri "sympy" version))
8993 (sha256
8994 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8995
8996 (define-public python-q
8997 (package
8998 (name "python-q")
8999 (version "2.6")
9000 (source
9001 (origin
9002 (method url-fetch)
9003 (uri (pypi-uri "q" version))
9004 (sha256
9005 (base32
9006 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
9007 (build-system python-build-system)
9008 (home-page "https://github.com/zestyping/q")
9009 (synopsis "Quick-and-dirty debugging output for tired programmers")
9010 (description
9011 "q is a Python module for \"print\" style of debugging Python code. It
9012 provides convenient short API for print out of values, tracebacks, and
9013 falling into the Python interpreter.")
9014 (license license:asl2.0)))
9015
9016 (define-public python2-q
9017 (package-with-python2 python-q))
9018
9019 (define-public python-xlib
9020 (package
9021 (name "python-xlib")
9022 (version "0.29")
9023 (source
9024 (origin
9025 (method git-fetch)
9026 (uri (git-reference
9027 (url "https://github.com/python-xlib/python-xlib")
9028 (commit version)))
9029 (file-name (git-file-name name version))
9030 (sha256
9031 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
9032 (build-system python-build-system)
9033 (arguments
9034 `(#:phases
9035 (modify-phases %standard-phases
9036 (add-before 'check 'start-xserver
9037 (lambda* (#:key inputs #:allow-other-keys)
9038 (let ((xorg-server (assoc-ref inputs "xorg-server")))
9039 ;; There must be a running X server and make check doesn't
9040 ;; start one. Therefore we must do it.
9041 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
9042 (setenv "DISPLAY" ":1")
9043 #t))))))
9044 (native-inputs
9045 `(("python-mock" ,python-mock)
9046 ("python-setuptools-scm" ,python-setuptools-scm)
9047 ("xorg-server" ,xorg-server)))
9048 (propagated-inputs
9049 `(("python-six" ,python-six)))
9050 (home-page "https://github.com/python-xlib/python-xlib")
9051 (synopsis "Python X11 client library")
9052 (description
9053 "The Python X Library is intended to be a fully functional
9054 X client library for Python programs. It is useful to implement
9055 low-level X clients. It is written entirely in Python.")
9056 (license license:gpl2+)))
9057
9058 (define-public python2-xlib
9059 (package-with-python2 python-xlib))
9060
9061 (define-public python-singledispatch
9062 (package
9063 (name "python-singledispatch")
9064 (version "3.4.0.3")
9065 (source
9066 (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "singledispatch" version))
9069 (sha256
9070 (base32
9071 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
9072 (build-system python-build-system)
9073 (native-inputs
9074 `(("python-six" ,python-six))) ; required for conversion, not at run-time
9075 (home-page
9076 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
9077 (synopsis "Backport of singledispatch feature from Python 3.4")
9078 (description
9079 "This library brings functools.singledispatch from Python 3.4 to Python
9080 2.6-3.3.")
9081 (license license:expat)))
9082
9083 (define-public python2-singledispatch
9084 (package-with-python2 python-singledispatch))
9085
9086 ;; the python- version can be removed with python-3.5
9087 (define-public python-backports-abc
9088 (package
9089 (name "python-backports-abc")
9090 (version "0.5")
9091 (source
9092 (origin
9093 (method url-fetch)
9094 (uri (pypi-uri "backports_abc" version))
9095 (sha256
9096 (base32
9097 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9098 (build-system python-build-system)
9099 (home-page "https://github.com/cython/backports_abc")
9100 (synopsis "Backport of additions to the 'collections.abc' module")
9101 (description
9102 "Python-backports-abc provides a backport of additions to the
9103 @code{collections.abc} module in Python-3.5.")
9104 (license license:psfl)))
9105
9106 (define-public python2-backports-abc
9107 (package-with-python2 python-backports-abc))
9108
9109 (define-public python-backports-csv
9110 (package
9111 (name "python-backports-csv")
9112 (version "1.0.7")
9113 (source
9114 (origin
9115 (method url-fetch)
9116 (uri (pypi-uri "backports.csv" version))
9117 (sha256
9118 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9119 (build-system python-build-system)
9120 (home-page "https://github.com/ryanhiebert/backports.csv")
9121 (synopsis "Backport of Python 3's csv module for Python 2")
9122 (description
9123 "Provides a backport of Python 3's @code{csv} module for parsing
9124 comma separated values. The API of the @code{csv} module in Python 2
9125 is drastically different from the @code{csv} module in Python 3.
9126 This is due, for the most part, to the difference between str in
9127 Python 2 and Python 3.")
9128 (license license:psfl)))
9129
9130 (define-public python2-backports-csv
9131 (package-with-python2 python-backports-csv))
9132
9133 (define-public python2-backports-shutil-get-terminal-size
9134 (package
9135 (name "python2-backports-shutil-get-terminal-size")
9136 (version "1.0.0")
9137 (source
9138 (origin
9139 (method url-fetch)
9140 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9141 (sha256
9142 (base32
9143 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9144 (build-system python-build-system)
9145 (arguments
9146 `(#:python ,python-2
9147 #:phases
9148 (modify-phases %standard-phases
9149 (replace 'check
9150 (lambda _
9151 (invoke "py.test" "-v"))))))
9152 (native-inputs
9153 `(("python2-pytest" ,python2-pytest)))
9154 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9155 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9156 (description
9157 "This package provides a backport of the @code{get_terminal_size
9158 function} from Python 3.3's @code{shutil}.
9159 Unlike the original version it is written in pure Python rather than C,
9160 so it might be a tiny bit slower.")
9161 (license license:expat)))
9162
9163 (define-public python-waf
9164 (package
9165 (name "python-waf")
9166 (version "2.0.19")
9167 (source (origin
9168 (method url-fetch)
9169 (uri (string-append "https://waf.io/"
9170 "waf-" version ".tar.bz2"))
9171 (sha256
9172 (base32
9173 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9174 (build-system python-build-system)
9175 (arguments
9176 '(#:phases
9177 (modify-phases %standard-phases
9178 (replace 'build
9179 (lambda _
9180 ;; XXX: Find a way to add all extra tools.
9181 (let ((tools '("gccdeps"
9182 "clang_compilation_database")))
9183 (invoke "python" "waf-light" "configure" "build"
9184 (string-append "--tools="
9185 (string-join tools ","))))))
9186 (replace 'check
9187 (lambda _
9188 (invoke "python" "waf" "--version")))
9189 (replace 'install
9190 (lambda* (#:key outputs #:allow-other-keys)
9191 (let ((out (assoc-ref outputs "out")))
9192 (install-file "waf" (string-append out "/bin")))
9193 #t))
9194 ;; waf breaks when it is wrapped.
9195 (delete 'wrap))))
9196 (home-page "https://waf.io/")
9197 (synopsis "Python-based build system")
9198 (description
9199 "Waf is a Python-based framework for configuring, compiling and installing
9200 applications.")
9201 (license license:bsd-3)))
9202
9203 (define-public python2-waf
9204 (package-with-python2 python-waf))
9205
9206 (define-public python-pyzmq
9207 (package
9208 (name "python-pyzmq")
9209 (version "22.1.0")
9210 (source
9211 (origin
9212 (method url-fetch)
9213 (uri (pypi-uri "pyzmq" version))
9214 (sha256
9215 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9216 (build-system python-build-system)
9217 (arguments
9218 `(#:configure-flags
9219 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9220 #:phases
9221 (modify-phases %standard-phases
9222 (add-before 'check 'build-extensions
9223 (lambda _
9224 ;; Cython extensions have to be built before running the tests.
9225 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9226 (inputs
9227 `(("zeromq" ,zeromq)))
9228 (native-inputs
9229 `(("pkg-config" ,pkg-config)
9230 ("python-cython" ,python-cython)
9231 ("python-pytest" ,python-pytest)))
9232 (home-page "https://github.com/zeromq/pyzmq")
9233 (synopsis "Python bindings for 0MQ")
9234 (description
9235 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9236 (license license:bsd-4)))
9237
9238 (define-public python-pep8
9239 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9240 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9241 ;; some dependents' test suites, and nothing more.
9242 (package
9243 (name "python-pep8")
9244 (version "1.7.0")
9245 (source
9246 (origin
9247 (method url-fetch)
9248 (uri (pypi-uri "pep8" version))
9249 (sha256
9250 (base32
9251 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9252 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9253 (build-system python-build-system)
9254 (home-page "https://pep8.readthedocs.org/")
9255 (synopsis "Python style guide checker")
9256 (description
9257 "This tools checks Python code against some of the style conventions in
9258 PEP 8.")
9259 (license license:expat)))
9260
9261 (define-public python2-pep8
9262 (package-with-python2 python-pep8))
9263
9264 (define-public python-pep517
9265 (package
9266 (inherit python-pep517-bootstrap)
9267 (name "python-pep517")
9268 (arguments
9269 '(#:phases
9270 (modify-phases %standard-phases
9271 (replace 'check
9272 (lambda* (#:key tests? #:allow-other-keys)
9273 (delete-file "pytest.ini")
9274 ;; This test tries to connect to the internet
9275 (delete-file "tests/test_meta.py")
9276 (if tests?
9277 (invoke "pytest")
9278 #t))))))
9279 (native-inputs
9280 `(("python-mock" ,python-mock)
9281 ("python-pytest" ,python-pytest)
9282 ("python-testpath" ,python-testpath)))
9283 (properties `((python2-variant . ,(delay python2-pep517))))))
9284
9285 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9286 (define-public python2-pep517
9287 (let ((base (package-with-python2
9288 (strip-python2-variant python-pep517))))
9289 (package/inherit base
9290 (name "python2-pep517")
9291 (arguments
9292 `(#:tests? #f
9293 ,@(package-arguments base)))
9294 (native-inputs `()))))
9295
9296 (define-public python-pyflakes
9297 (package
9298 (name "python-pyflakes")
9299 (version "2.3.1")
9300 (source
9301 (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "pyflakes" version))
9304 (sha256
9305 (base32
9306 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9307 (build-system python-build-system)
9308 (home-page "https://github.com/PyCQA/pyflakes")
9309 (synopsis "Passive checker of Python programs")
9310 (description
9311 "Pyflakes statically checks Python source code for common errors.")
9312 (license license:expat)))
9313
9314 (define-public python2-pyflakes
9315 (package-with-python2 python-pyflakes))
9316
9317 (define-public python-pyflakes-2.2
9318 (package
9319 (inherit python-pyflakes)
9320 (version "2.2.0")
9321 (source (origin
9322 (method url-fetch)
9323 (uri (pypi-uri "pyflakes" version))
9324 (sha256
9325 (base32
9326 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9327
9328 (define-public python-mccabe
9329 (package
9330 (name "python-mccabe")
9331 (version "0.6.1")
9332 (source
9333 (origin
9334 (method url-fetch)
9335 (uri (pypi-uri "mccabe" version))
9336 (sha256
9337 (base32
9338 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9339 (build-system python-build-system)
9340 (native-inputs
9341 `(("python-toml", python-toml)
9342 ("python-pytest" ,python-pytest-bootstrap)
9343 ("python-pytest-runner" ,python-pytest-runner)))
9344 (home-page "https://github.com/PyCQA/mccabe")
9345 (synopsis "McCabe checker, plugin for flake8")
9346 (description "This package provides a Flake8 plug-in to compute the McCabe
9347 cyclomatic complexity of Python source code.")
9348 (license license:expat)))
9349
9350 (define-public python2-mccabe
9351 (package-with-python2 python-mccabe))
9352
9353 (define-public python-flake8
9354 (package
9355 (name "python-flake8")
9356 (version "3.9.1")
9357 (source (origin
9358 (method url-fetch)
9359 (uri (pypi-uri "flake8" version))
9360 (sha256
9361 (base32
9362 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9363 (build-system python-build-system)
9364 (arguments
9365 `(#:phases
9366 (modify-phases %standard-phases
9367 (replace 'check
9368 (lambda* (#:key inputs outputs #:allow-other-keys)
9369 (add-installed-pythonpath inputs outputs)
9370 (invoke "pytest" "-v"))))))
9371 (propagated-inputs
9372 `(("python-pycodestyle" ,python-pycodestyle)
9373 ("python-entrypoints" ,python-entrypoints)
9374 ("python-pyflakes" ,python-pyflakes)
9375 ("python-mccabe" ,python-mccabe)))
9376 (native-inputs
9377 `(("python-mock" ,python-mock)
9378 ("python-pytest" ,python-pytest)))
9379 (home-page "https://gitlab.com/pycqa/flake8")
9380 (synopsis
9381 "The modular source code checker: pep8, pyflakes and co")
9382 (description
9383 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9384 (properties `((python2-variant . ,(delay python2-flake8))))
9385 (license license:expat)))
9386
9387 (define-public python2-flake8
9388 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9389 (package/inherit base
9390 (propagated-inputs
9391 `(("python2-configparser" ,python2-configparser)
9392 ("python2-enum34" ,python2-enum34)
9393 ("python2-functools32" ,python2-functools32)
9394 ("python2-typing" ,python2-typing)
9395 ,@(package-propagated-inputs base))))))
9396
9397 (define-public python-flake8-3.8
9398 (package
9399 (inherit python-flake8)
9400 (version "3.8.4")
9401 (source (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "flake8" version))
9404 (sha256
9405 (base32
9406 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9407 (propagated-inputs
9408 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9409 ("python-entrypoints" ,python-entrypoints)
9410 ("python-pyflakes" ,python-pyflakes-2.2)
9411 ("python-mccabe" ,python-mccabe)))))
9412
9413 (define-public python-flake8-bugbear
9414 (package
9415 (name "python-flake8-bugbear")
9416 (version "20.1.4")
9417 (source
9418 (origin
9419 (method url-fetch)
9420 (uri (pypi-uri "flake8-bugbear" version))
9421 (sha256
9422 (base32
9423 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9424 (build-system python-build-system)
9425 (arguments
9426 '(#:phases
9427 (modify-phases %standard-phases
9428 (add-before 'check 'disable-test
9429 (lambda _
9430 ;; This test fails on slow computers.
9431 (substitute* "tests/test_bugbear.py"
9432 (("def test_does_not_crash_on_any_valid_code")
9433 "def _test_does_not_crash_on_any_valid_code")))))))
9434 (native-inputs
9435 `(("python-hypothesis" ,python-hypothesis)
9436 ("python-hypothesmith" ,python-hypothesmith)))
9437 (propagated-inputs
9438 `(("python-attrs" ,python-attrs)
9439 ("python-flake8" ,python-flake8)))
9440 (home-page "https://github.com/PyCQA/flake8-bugbear")
9441 (synopsis
9442 "Flake8 plugin for finding likely bugs and design problems in your program")
9443 (description
9444 "This package contains a plugin for Flake8 finding likely bugs and
9445 design problems in your program. It contains warnings that don't belong
9446 in pyflakes and pycodestyle.")
9447 (license license:expat)))
9448
9449 (define-public python-flake8-continuation
9450 (package
9451 (name "python-flake8-continuation")
9452 (version "1.0.5")
9453 (source
9454 (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "flake8-continuation" version))
9457 (sha256
9458 (base32
9459 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9460 (build-system python-build-system)
9461 (propagated-inputs
9462 `(("python-flake8" ,python-flake8)
9463 ("python-pycodestyle" ,python-pycodestyle)
9464 ("python-six" ,python-six)))
9465 (home-page "https://github.com/planetlabs/flake8-continuation")
9466 (synopsis "Flake8 Line Continuation Plugin")
9467 (description "A Flake8 plugin that checks for the line continuation
9468 style to be in the preferred method according to PEP-8, specifically:
9469 @quotation
9470 The preferred way of wrapping long lines is by using Python's implied
9471 line continuation inside parentheses, brackets and braces. Long lines
9472 can be broken over multiple lines by wrapping expressions in parentheses.
9473 These should be used in preference to using a backslash for line continuation.
9474 @end quotation")
9475 (license license:asl2.0)))
9476
9477 (define-public python-flake8-implicit-str-concat
9478 (package
9479 (name "python-flake8-implicit-str-concat")
9480 (version "0.2.0")
9481 (source
9482 (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "flake8_implicit_str_concat" version))
9485 (sha256
9486 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9487 (build-system python-build-system)
9488 (propagated-inputs
9489 `(("python-attrs" ,python-attrs)
9490 ("python-more-itertools" ,python-more-itertools)))
9491 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9492 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9493 (description
9494 "This is a plugin for the Python code checking tool Flake8 to encourage
9495 correct string literal concatenation.
9496
9497 It looks for style problems like implicitly concatenated string literals on
9498 the same line (which can be introduced by the code formatting tool Black), or
9499 unnecessary plus operators for explicit string literal concatenation.")
9500 (license license:expat)))
9501
9502 (define-public python-flake8-polyfill
9503 (package
9504 (name "python-flake8-polyfill")
9505 (version "1.0.2")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "flake8-polyfill" version))
9510 (sha256
9511 (base32
9512 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9513 (build-system python-build-system)
9514 (arguments
9515 '(#:phases
9516 (modify-phases %standard-phases
9517 (replace 'check
9518 (lambda _
9519 ;; Be compatible with Pytest 4:
9520 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9521 (substitute* "setup.cfg"
9522 (("\\[pytest\\]")
9523 "[tool:pytest]"))
9524 (invoke "py.test" "-v"))))))
9525 (propagated-inputs
9526 `(("python-flake8" ,python-flake8)))
9527 (native-inputs
9528 `(("python-mock" ,python-mock)
9529 ("python-pep8" ,python-pep8)
9530 ("python-pycodestyle" ,python-pycodestyle)
9531 ("python-pytest" ,python-pytest)))
9532 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9533 (synopsis "Polyfill package for Flake8 plugins")
9534 (description
9535 "This package that provides some compatibility helpers for Flake8
9536 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
9537 (license license:expat)))
9538
9539 (define-public python2-flake8-polyfill
9540 (package-with-python2 python-flake8-polyfill))
9541
9542 (define-public python-flake8-print
9543 (package
9544 (name "python-flake8-print")
9545 (version "4.0.0")
9546 (source
9547 (origin
9548 (method url-fetch)
9549 (uri (pypi-uri "flake8-print" version))
9550 (sha256
9551 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
9552 (build-system python-build-system)
9553 (propagated-inputs
9554 `(("python-flake8" ,python-flake8)
9555 ("python-pycodestyle" ,python-pycodestyle)
9556 ("python-six" ,python-six)))
9557 (home-page "https://github.com/jbkahn/flake8-print")
9558 (synopsis "Print statement checker plugin for Flake8")
9559 (description
9560 "This plugin for Flake8 checks for @code{print} statements in Python
9561 files.")
9562 (license license:expat)))
9563
9564 (define-public python-flake8-pyi
9565 (package
9566 (name "python-flake8-pyi")
9567 (version "20.10.0")
9568 (source
9569 (origin
9570 (method url-fetch)
9571 (uri (pypi-uri "flake8-pyi" version))
9572 (sha256
9573 (base32
9574 "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
9575 (build-system python-build-system)
9576 (propagated-inputs
9577 `(("python-attrs" ,python-attrs)
9578 ("python-flake8" ,python-flake8)
9579 ("python-pyflakes" ,python-pyflakes)))
9580 (home-page "https://github.com/ambv/flake8-pyi")
9581 (synopsis
9582 "Flake8 plugin that provides specializations for type hinting stub files")
9583 (description
9584 "This package contains a plugin that provides specializations for
9585 type hinting stub files, especially interesting for linting typeshed. It
9586 adds the @file{.pyi} extension to the default value of the @code{--filename}
9587 command-line argument to Flake8. This means stubs are linted by default with
9588 this plugin enabled, without needing to explicitly list every file. It
9589 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9590 expressions after the entire file has been read. This enables support for
9591 first-class forward references that stub files use.")
9592 (license license:expat)))
9593
9594 (define-public python-flake8-pie
9595 (package
9596 (name "python-flake8-pie")
9597 (version "0.5.0")
9598 (source
9599 (origin
9600 (method url-fetch)
9601 (uri (pypi-uri "flake8-pie" version))
9602 (sha256
9603 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9604 (build-system python-build-system)
9605 (home-page "https://github.com/sbdchd/flake8-pie")
9606 (synopsis "Flake8 extension that implements lints")
9607 (description
9608 "This package provides a flake8 extension that implements miscellaneous
9609 lints.")
9610 (license license:bsd-2)))
9611
9612 (define-public python-flake8-quotes
9613 (package
9614 (name "python-flake8-quotes")
9615 (version "3.2.0")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "flake8-quotes" version))
9620 (sha256
9621 (base32
9622 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9623 (build-system python-build-system)
9624 (propagated-inputs
9625 `(("python-flake8" ,python-flake8)))
9626 (home-page "https://github.com/zheller/flake8-quotes/")
9627 (synopsis "Flake8 lint for quotes")
9628 (description "This package provides a Flake8 lint for quotes.")
9629 (license license:expat)))
9630
9631 (define-public python-autoflake
9632 (package
9633 (name "python-autoflake")
9634 (version "1.3.1")
9635 (source
9636 (origin
9637 (method url-fetch)
9638 (uri (pypi-uri "autoflake" version))
9639 (sha256
9640 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9641 (build-system python-build-system)
9642 (propagated-inputs
9643 `(("python-pyflakes" ,python-pyflakes)))
9644 (home-page "https://github.com/myint/autoflake")
9645 (synopsis "Removes unused imports and unused variables")
9646 (description
9647 "@code{autoflake} removes unused imports and unused variables from Python
9648 code as reported by @code{pyflakes}.
9649
9650 By default, it only removes unused imports for modules that are part of the
9651 standard library. Removal of unused variables is also disabled by default.
9652 It also removes useless @code{pass} statements.")
9653 (license license:expat)))
9654
9655 (define-public python-mistune
9656 (package
9657 (name "python-mistune")
9658 (version "0.8.4")
9659 (source
9660 (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "mistune" version))
9663 (sha256
9664 (base32
9665 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9666 (build-system python-build-system)
9667 (native-inputs
9668 `(("python-nose" ,python-nose)
9669 ("python-cython" ,python-cython)))
9670 (home-page "https://github.com/lepture/mistune")
9671 (synopsis "Markdown parser in pure Python")
9672 (description "This package provides a fast markdown parser in pure
9673 Python.")
9674 (license license:bsd-3)))
9675
9676 (define-public python2-mistune
9677 (package-with-python2 python-mistune))
9678
9679 (define-public python-markdown
9680 (package
9681 (name "python-markdown")
9682 (version "3.3.4")
9683 (source
9684 (origin
9685 (method url-fetch)
9686 (uri (pypi-uri "Markdown" version))
9687 (sha256
9688 (base32
9689 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9690 (build-system python-build-system)
9691 (native-inputs
9692 `(("python-nose" ,python-nose)
9693 ("python-pyyaml" ,python-pyyaml)))
9694 (home-page "https://python-markdown.github.io/")
9695 (synopsis "Python implementation of Markdown")
9696 (description
9697 "This package provides a Python implementation of John Gruber's
9698 Markdown. The library features international input, various Markdown
9699 extensions, and several HTML output formats. A command line wrapper
9700 markdown_py is also provided to convert Markdown files to HTML.")
9701 (properties `((python2-variant . ,(delay python2-markdown))))
9702 (license license:bsd-3)))
9703
9704 ;; Markdown 3.2 dropped support for Python 2.
9705 (define-public python2-markdown
9706 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9707 (package
9708 (inherit base)
9709 (version "3.1.1")
9710 (source (origin
9711 (method url-fetch)
9712 (uri (pypi-uri "Markdown" version))
9713 (sha256
9714 (base32
9715 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9716
9717 (define-public python-ptyprocess
9718 (package
9719 (name "python-ptyprocess")
9720 (version "0.5.2")
9721 (source
9722 (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "ptyprocess" version))
9725 (sha256
9726 (base32
9727 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9728 (build-system python-build-system)
9729 (native-inputs
9730 `(("python-nose" ,python-nose)))
9731 (arguments
9732 `(#:phases
9733 (modify-phases %standard-phases
9734 (replace 'check
9735 (lambda _ (invoke "nosetests"))))))
9736 (home-page "https://github.com/pexpect/ptyprocess")
9737 (synopsis "Run a subprocess in a pseudo terminal")
9738 (description
9739 "This package provides a Python library used to launch a subprocess in a
9740 pseudo terminal (pty), and interact with both the process and its pty.")
9741 (license license:isc)))
9742
9743 (define-public python2-ptyprocess
9744 (package-with-python2 python-ptyprocess))
9745
9746 (define-public python-cram
9747 (package
9748 (name "python-cram")
9749 (version "0.7")
9750 (home-page "https://bitheap.org/cram/")
9751 (source (origin
9752 (method url-fetch)
9753 (uri (list (string-append home-page "cram-"
9754 version ".tar.gz")
9755 (pypi-uri "cram" version)))
9756 (sha256
9757 (base32
9758 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9759 (arguments
9760 '(#:phases
9761 (modify-phases %standard-phases
9762 (add-after 'unpack 'patch-source
9763 (lambda _
9764 (substitute* (find-files "cram" ".*\\.py$")
9765 ;; Replace default shell path.
9766 (("/bin/sh") (which "sh")))
9767 (substitute* (find-files "tests" ".*\\.t$")
9768 (("md5") "md5sum")
9769 (("/bin/bash") (which "bash"))
9770 (("/bin/sh") (which "sh")))
9771 (substitute* "cram/_test.py"
9772 ;; This hack works around a bug triggered by substituting
9773 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9774 ;; "cram -h", which breaks the output at 80 characters. This
9775 ;; causes the line showing the default shell to break into two
9776 ;; lines, but the test expects a single line...
9777 (("env\\['COLUMNS'\\] = '80'")
9778 "env['COLUMNS'] = '160'"))
9779
9780 (substitute* "Makefile"
9781 ;; Recent versions of python-coverage have caused the test
9782 ;; coverage to decrease (as of version 0.7). Allow that.
9783 (("--fail-under=100")
9784 "--fail-under=90"))
9785
9786 #t))
9787 (replace 'check
9788 ;; The test phase uses the built library and executable.
9789 (lambda* (#:key inputs outputs #:allow-other-keys)
9790 (add-installed-pythonpath inputs outputs)
9791 (setenv "PATH" (string-append (getenv "PATH") ":"
9792 (assoc-ref outputs "out") "/bin"))
9793 (invoke "make" "test"))))))
9794 (build-system python-build-system)
9795 (native-inputs
9796 `(("python-coverage" ,python-coverage)
9797 ("which" ,which)))
9798 (synopsis "Simple testing framework for command line applications")
9799 (description
9800 "Cram is a functional testing framework for command line applications.
9801 Cram tests look like snippets of interactive shell sessions. Cram runs each
9802 command and compares the command output in the test with the command’s actual
9803 output.")
9804 (license license:gpl2+)))
9805
9806 (define-public python2-cram
9807 (package-with-python2 python-cram))
9808
9809 (define-public python-crashtest
9810 (package
9811 (name "python-crashtest")
9812 (version "0.3.1")
9813 (source
9814 (origin
9815 (method url-fetch)
9816 (uri (pypi-uri "crashtest" version))
9817 (sha256
9818 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9819 (build-system python-build-system)
9820 (home-page "https://github.com/sdispater/crashtest")
9821 (synopsis "Manage Python errors with ease")
9822 (description
9823 "Python library that makes exceptions handling and inspection easier.")
9824 (license license:expat)))
9825
9826 (define-public python-stdlib-list
9827 (package
9828 (name "python-stdlib-list")
9829 (version "0.8.0")
9830 (source (origin
9831 (method url-fetch)
9832 (uri (pypi-uri "stdlib-list" version))
9833 (sha256
9834 (base32
9835 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
9836 (build-system python-build-system)
9837 (arguments
9838 `(#:tests? #f)) ; Tests require more dependencies.
9839 (native-inputs
9840 `(("python-sphinx" ,python-sphinx)))
9841 (home-page "https://github.com/jackmaney/python-stdlib-list")
9842 (synopsis "Python Standard Libraries")
9843 (description "This package contains a list of Python Standard Libraries.")
9844 (license license:expat)))
9845
9846 (define-public python-straight-plugin
9847 (package
9848 (name "python-straight-plugin")
9849 (version "1.4.1")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "straight.plugin" version))
9854 (sha256
9855 (base32
9856 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9857 (build-system python-build-system)
9858 (home-page "https://github.com/ironfroggy/straight.plugin")
9859 (synopsis "Simple namespaced plugin facility")
9860 (description "Straight Plugin provides a type of plugin you can create from
9861 almost any existing Python modules, and an easy way for outside developers to
9862 add functionality and customization to your projects with their own plugins.")
9863 (license license:expat)))
9864
9865 (define-public python2-straight-plugin
9866 (package-with-python2 python-straight-plugin))
9867
9868 (define-public python-fonttools
9869 (package
9870 (name "python-fonttools")
9871 (version "4.6.0")
9872 (source (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "fonttools" version ".zip"))
9875 (sha256
9876 (base32
9877 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9878 (build-system python-build-system)
9879 (native-inputs
9880 `(("unzip" ,unzip)
9881 ("python-pytest" ,python-pytest)
9882 ("python-pytest-runner" ,python-pytest-runner)))
9883 (home-page "https://github.com/fonttools/fonttools")
9884 (synopsis "Tools to manipulate font files")
9885 (description
9886 "FontTools/TTX is a library to manipulate font files from Python. It
9887 supports reading and writing of TrueType/OpenType fonts, reading and writing
9888 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9889 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9890 from an XML-based format.")
9891 (license license:expat)))
9892
9893 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9894 (define-public python2-fonttools
9895 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9896 (package
9897 (inherit base)
9898 (version "3.44.0")
9899 (source (origin
9900 (method url-fetch)
9901 (uri (pypi-uri "fonttools" version ".zip"))
9902 (sha256
9903 (base32
9904 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9905
9906 (define-public python-ly
9907 (package
9908 (name "python-ly")
9909 (version "0.9.5")
9910 (source
9911 (origin
9912 (method url-fetch)
9913 (uri (pypi-uri name version))
9914 (sha256
9915 (base32
9916 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9917 (build-system python-build-system)
9918 (arguments
9919 ;; FIXME: Some tests need network access.
9920 '(#:tests? #f))
9921 (synopsis "Tool and library for manipulating LilyPond files")
9922 (description "This package provides a Python library to parse, manipulate
9923 or create documents in LilyPond format. A command line program ly is also
9924 provided that can be used to do various manipulations with LilyPond files.")
9925 (home-page "https://pypi.org/project/python-ly/")
9926 (license license:gpl2+)))
9927
9928 (define-public python-appdirs
9929 (package
9930 (name "python-appdirs")
9931 (version "1.4.3")
9932 (source
9933 (origin
9934 (method url-fetch)
9935 (uri (pypi-uri "appdirs" version))
9936 (sha256
9937 (base32
9938 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9939 (build-system python-build-system)
9940 (home-page "https://github.com/ActiveState/appdirs")
9941 (synopsis
9942 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9943 (description
9944 "This module provides a portable way of finding out where user data
9945 should be stored on various operating systems.")
9946 (license license:expat)))
9947
9948 (define-public python2-appdirs
9949 (package-with-python2 python-appdirs))
9950
9951 (define-public python-gorilla
9952 (package
9953 (name "python-gorilla")
9954 (version "0.3.0")
9955 (source (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "gorilla" version))
9958 (sha256
9959 (base32
9960 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9961 (build-system python-build-system)
9962 (home-page "https://github.com/christophercrouzet/gorilla")
9963 (synopsis "Convenient monkey patching with Python")
9964 (description
9965 "Gorilla is a Python library that provides a convenient approach to
9966 monkey patching. Monkey patching is the process of modifying module and
9967 class attributes at runtime with the purpose of replacing or extending
9968 third-party code.")
9969 (license license:expat)))
9970
9971 (define-public python-llfuse
9972 (package
9973 (name "python-llfuse")
9974 (version "1.3.8")
9975 (source (origin
9976 (method url-fetch)
9977 (uri (pypi-uri "llfuse" version))
9978 (sha256
9979 (base32
9980 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9981 (build-system python-build-system)
9982 (inputs
9983 `(("fuse" ,fuse)
9984 ("attr" ,attr)))
9985 (native-inputs
9986 `(("pkg-config" ,pkg-config)))
9987 (synopsis "Python bindings for FUSE")
9988 (description
9989 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9990 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9991 (license license:lgpl2.0+)
9992 (properties `((python2-variant . ,(delay python2-llfuse))))))
9993
9994 (define-public python2-llfuse
9995 (let ((base (package-with-python2
9996 (strip-python2-variant python-llfuse))))
9997 (package/inherit base
9998 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9999
10000 (define-public python-msgpack
10001 (package
10002 (name "python-msgpack")
10003 (version "1.0.0")
10004 (source (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "msgpack" version))
10007 (sha256
10008 (base32
10009 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
10010 (build-system python-build-system)
10011 (arguments
10012 `(#:modules ((guix build utils)
10013 (guix build python-build-system)
10014 (ice-9 ftw)
10015 (srfi srfi-1)
10016 (srfi srfi-26))
10017 #:phases
10018 (modify-phases %standard-phases
10019 (replace 'check
10020 (lambda _
10021 (invoke "pytest" "-v" "test"))))))
10022 (native-inputs
10023 `(("python-pytest" ,python-pytest)))
10024 (synopsis "MessagePack (de)serializer")
10025 (description "MessagePack is a fast, compact binary serialization format,
10026 suitable for similar data to JSON. This package provides CPython bindings for
10027 reading and writing MessagePack data.")
10028 (home-page "https://pypi.org/project/msgpack/")
10029 (license license:asl2.0)))
10030
10031 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
10032 ;; release 0.5. Some packages like borg still call it by the old name for now.
10033 ;; <https://bugs.gnu.org/30662>
10034 (define-public python-msgpack-transitional
10035 (package
10036 (inherit python-msgpack)
10037 (name "python-msgpack-transitional")
10038 (version "0.5.6")
10039 (source (origin
10040 (method url-fetch)
10041 (uri (pypi-uri "msgpack" version))
10042 (sha256
10043 (base32
10044 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
10045 (arguments
10046 (substitute-keyword-arguments (package-arguments python-msgpack)
10047 ((#:phases phases)
10048 `(modify-phases ,phases
10049 (add-after 'unpack 'configure-transitional
10050 (lambda _
10051 ;; Keep using the old name.
10052 (substitute* "setup.py"
10053 (("TRANSITIONAL = False")
10054 "TRANSITIONAL = 1"))
10055 #t))))))))
10056
10057 (define-public python2-msgpack
10058 (package-with-python2 python-msgpack))
10059
10060 (define-public python-netaddr
10061 (package
10062 (name "python-netaddr")
10063 (version "0.8.0")
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (pypi-uri "netaddr" version))
10068 (sha256
10069 (base32
10070 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
10071 (build-system python-build-system)
10072 (arguments `(#:tests? #f)) ;; No tests.
10073 (home-page "https://github.com/drkjam/netaddr/")
10074 (synopsis "Pythonic manipulation of network addresses")
10075 (description
10076 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
10077 and MAC network addresses.")
10078 (license license:bsd-3)))
10079
10080 (define-public python2-netaddr
10081 (package-with-python2 python-netaddr))
10082
10083 (define-public python2-pyroute2
10084 (package
10085 (name "python2-pyroute2")
10086 (version "0.5.6")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "pyroute2" version))
10091 (sha256
10092 (base32
10093 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10094 (build-system python-build-system)
10095 (arguments
10096 `(#:python ,python-2)) ;Python 3.x is not supported
10097 (home-page "https://github.com/svinota/pyroute2")
10098 (synopsis "Python netlink library")
10099 (description
10100 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10101 Supported netlink families and protocols include:
10102 @itemize
10103 @item rtnl, network settings - addresses, routes, traffic controls
10104 @item nfnetlink - netfilter API: ipset, nftables, ...
10105 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10106 @item devlink - manage and monitor devlink-enabled hardware
10107 @item generic - generic netlink families
10108 @itemize
10109 @item nl80211 - wireless functions API (basic support)
10110 @item taskstats - extended process statistics
10111 @item acpi_events - ACPI events monitoring
10112 @item thermal_events - thermal events monitoring
10113 @item VFS_DQUOT - disk quota events monitoring
10114 @end itemize
10115 @end itemize")
10116 (license license:gpl2+)))
10117
10118 (define-public python-wrapt
10119 (package
10120 (name "python-wrapt")
10121 (version "1.11.2")
10122 (source
10123 (origin
10124 (method url-fetch)
10125 (uri (pypi-uri "wrapt" version))
10126 (sha256
10127 (base32
10128 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10129 (build-system python-build-system)
10130 (arguments
10131 ;; Tests are not included in the tarball, they are only available in the
10132 ;; git repository.
10133 `(#:tests? #f))
10134 (home-page "https://github.com/GrahamDumpleton/wrapt")
10135 (synopsis "Module for decorators, wrappers and monkey patching")
10136 (description
10137 "The aim of the wrapt module is to provide a transparent object proxy for
10138 Python, which can be used as the basis for the construction of function
10139 wrappers and decorator functions.")
10140 (license license:bsd-2)))
10141
10142 (define-public python2-wrapt
10143 (package-with-python2 python-wrapt))
10144
10145 (define-public python-commentjson
10146 (package
10147 (name "python-commentjson")
10148 (version "0.9.0")
10149 (source (origin
10150 ;; The PyPI release is missing some test files.
10151 (method git-fetch)
10152 (uri (git-reference
10153 (url "https://github.com/vaidik/commentjson")
10154 (commit (string-append "v" version))))
10155 (file-name (git-file-name name version))
10156 (sha256
10157 (base32
10158 "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
10159 (build-system python-build-system)
10160 (arguments
10161 `(#:modules ((guix build python-build-system)
10162 (guix build utils)
10163 (ice-9 ftw)
10164 (ice-9 textual-ports))
10165 #:phases
10166 (modify-phases %standard-phases
10167 (add-after 'unpack 'relax-requirements
10168 (lambda _
10169 (substitute* "setup.py"
10170 (("lark-parser>=0.7.1,<0.8.0")
10171 "lark-parser>=0.7.1"))))
10172 (add-after 'unpack 'delete-unspported-tests
10173 ;; Some tests rely on the 'test' module of Python itself,
10174 ;; which is not available with the Python package in Guix;
10175 ;; remove them.
10176 (lambda _
10177 ;; XXX: Copied from (guix build dub-build-system).
10178 (define (grep string file-name)
10179 (string-contains (call-with-input-file file-name get-string-all)
10180 string))
10181
10182 (with-directory-excursion "commentjson/tests/test_json"
10183 (let* ((dot? (lambda (x) (member x '("." ".."))))
10184 (test-files (scandir "." (negate dot?))))
10185 (for-each delete-file
10186 (filter (lambda (f) (grep "from test." f))
10187 test-files)))))))))
10188 (propagated-inputs
10189 `(("python-lark-parser" ,python-lark-parser)))
10190 (native-inputs
10191 `(("python-six" ,python-six)))
10192 (home-page "https://github.com/vaidik/commentjson")
10193 (synopsis "Python library for adding comments to JSON files")
10194 (description "Comment JSON is a Python package that helps you create JSON
10195 files with Python and JavaScript style inline comments. Its API is very
10196 similar to the Python standard library's @code{json} module.")
10197 (license license:expat)))
10198
10199 (define-public python-resolvelib
10200 (package
10201 (name "python-resolvelib")
10202 (version "0.7.1")
10203 (source
10204 (origin
10205 ;; Tests are missing from the PyPI release.
10206 (method git-fetch)
10207 (uri (git-reference
10208 (url "https://github.com/sarugaku/resolvelib")
10209 (commit version)))
10210 (file-name (git-file-name name version))
10211 (sha256
10212 (base32
10213 "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
10214 (build-system python-build-system)
10215 (arguments
10216 `(#:phases
10217 (modify-phases %standard-phases
10218 (replace 'check
10219 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10220 (when tests?
10221 (add-installed-pythonpath inputs outputs)
10222 (invoke "pytest")))))))
10223 (native-inputs
10224 `(("python-commentjson" ,python-commentjson)
10225 ("python-packaging" ,python-packaging)
10226 ("python-pytest" ,python-pytest)))
10227 (home-page "https://github.com/sarugaku/resolvelib")
10228 (synopsis "Abstract dependencies resolver")
10229 (description "The ResolveLib library provides a @code{Resolver} class that
10230 includes dependency resolution logic.")
10231 (license license:isc)))
10232
10233 ;;; This older version is required by ansible-core.
10234 (define-public python-resolvelib-0.5
10235 (package/inherit python-resolvelib
10236 (name "python-resolvelib")
10237 (version "0.5.4")
10238 (source
10239 (origin
10240 (method git-fetch)
10241 (uri (git-reference
10242 (url "https://github.com/sarugaku/resolvelib")
10243 (commit version)))
10244 (file-name (git-file-name name version))
10245 (sha256
10246 (base32
10247 "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
10248
10249 (define-public python-commonmark
10250 (package
10251 (name "python-commonmark")
10252 (version "0.9.1")
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "commonmark" version))
10257 (sha256
10258 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10259 (build-system python-build-system)
10260 (arguments
10261 `(#:phases
10262 (modify-phases %standard-phases
10263 (replace 'check
10264 (lambda* (#:key inputs outputs #:allow-other-keys)
10265 (add-installed-pythonpath inputs outputs)
10266 (invoke "python" "setup.py" "test"))))))
10267 (home-page "https://github.com/readthedocs/commonmark.py")
10268 (synopsis "Python parser for the CommonMark Markdown spec")
10269 (description
10270 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10271 Markdown parser and renderer for the CommonMark specification, using only
10272 native modules.")
10273 (license license:bsd-3)))
10274
10275 (define-public python-xlrd
10276 (package
10277 (name "python-xlrd")
10278 (version "1.2.0")
10279 (source (origin
10280 (method url-fetch)
10281 (uri (pypi-uri "xlrd" version))
10282 (sha256
10283 (base32
10284 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10285 (build-system python-build-system)
10286 (arguments
10287 `(#:phases
10288 (modify-phases %standard-phases
10289 ;; Some tests depend on writing a temporary file to the user's home
10290 ;; directory.
10291 (add-after 'unpack 'fix-tests
10292 (lambda _
10293 (delete-file "tests/test_open_workbook.py")
10294 #t)))))
10295 (home-page "http://www.python-excel.org/")
10296 (synopsis "Library for extracting data from Excel files")
10297 (description "This package provides a library to extract data from
10298 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10299 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10300 Unicode-aware. It is not intended as an end-user tool.")
10301 (license license:bsd-3)))
10302
10303 (define-public python2-xlrd
10304 (package-with-python2 python-xlrd))
10305
10306 (define-public python-immutables
10307 (package
10308 (name "python-immutables")
10309 (version "0.14")
10310 (source
10311 (origin
10312 (method url-fetch)
10313 (uri (pypi-uri "immutables" version))
10314 (sha256
10315 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10316 (build-system python-build-system)
10317 (home-page "https://github.com/MagicStack/immutables")
10318 (synopsis "High-performance immutable mapping type for Python")
10319 (description
10320 "An immutable mapping type for Python. The underlying datastructure is a
10321 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10322 functional languages.")
10323 (license license:asl2.0)))
10324
10325 (define-public python-prettytable
10326 (package
10327 (name "python-prettytable")
10328 (version "0.7.2")
10329 (source
10330 (origin
10331 (method url-fetch)
10332 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10333 (sha256
10334 (base32
10335 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10336 (build-system python-build-system)
10337 (home-page "https://code.google.com/archive/p/prettytable/")
10338 (synopsis "Display tabular data in an ASCII table format")
10339 (description
10340 "A library designed to represent tabular data in visually appealing ASCII
10341 tables. PrettyTable allows for selection of which columns are to be printed,
10342 independent alignment of columns (left or right justified or centred) and
10343 printing of sub-tables by specifying a row range.")
10344 (license license:bsd-3)))
10345
10346 (define-public python2-prettytable
10347 (package-with-python2 python-prettytable))
10348
10349 (define-public python-curio
10350 (package
10351 (name "python-curio")
10352 (version "1.2")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "curio" version))
10357 (sha256
10358 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
10359 (build-system python-build-system)
10360 (arguments
10361 `(#:phases
10362 (modify-phases %standard-phases
10363 (replace 'check
10364 (lambda* (#:key inputs outputs #:allow-other-keys)
10365 (add-installed-pythonpath inputs outputs)
10366 (invoke "pytest" "-vv" "-k"
10367 ;; Tries to open an outgoing connection.
10368 "not test_ssl_outgoing"))))))
10369 (native-inputs
10370 `(("python-pytest" ,python-pytest)))
10371 (home-page "https://github.com/dabeaz/curio")
10372 (synopsis "Coroutine-based library for concurrent Python")
10373 (description
10374 "Curio is a coroutine-based library for concurrent Python systems
10375 programming. It provides standard programming abstractions such as as
10376 tasks, sockets, files, locks, and queues.")
10377 (license license:bsd-3)))
10378
10379 (define-public python-tables
10380 (package
10381 (name "python-tables")
10382 (version "3.6.1")
10383 (source
10384 (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "tables" version))
10387 (sha256
10388 (base32
10389 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10390 (modules '((guix build utils)))
10391 (snippet
10392 '(begin
10393 ;; Remove pre-compiled .pyc files from source.
10394 (for-each delete-file-recursively
10395 (find-files "." "__pycache__" #:directories? #t))
10396 (for-each delete-file (find-files "." "\\.pyc$"))
10397 #t))))
10398 (build-system python-build-system)
10399 (arguments
10400 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10401 ;; or "check", so we must override the build and check phases.
10402 #:phases
10403 (modify-phases %standard-phases
10404 (add-after 'unpack 'use-gcc
10405 (lambda _
10406 (substitute* "setup.py"
10407 (("^( +)compiler = new_compiler\\(\\)" line indent)
10408 (string-append line
10409 "\n"
10410 indent
10411 "compiler.set_executables(compiler='gcc',"
10412 "compiler_so='gcc',"
10413 "linker_exe='gcc',"
10414 "linker_so='gcc -shared')")))
10415 #t))
10416 (add-after 'unpack 'disable-tuning
10417 (lambda _
10418 (substitute* "setup.py"
10419 (("cpu_flags = .*")
10420 "cpu_flags = ['sse2']\n"))
10421 #t))
10422 (replace 'build
10423 (lambda* (#:key inputs #:allow-other-keys)
10424 (invoke "python" "setup.py" "build"
10425 (string-append "--hdf5="
10426 (assoc-ref inputs "hdf5")))))
10427 (replace 'check
10428 (lambda* (#:key inputs #:allow-other-keys)
10429 (invoke "python" "setup.py" "check"
10430 (string-append "--hdf5="
10431 (assoc-ref inputs "hdf5"))))))))
10432 (propagated-inputs
10433 `(("python-numexpr" ,python-numexpr)
10434 ("python-numpy" ,python-numpy)))
10435 (native-inputs
10436 `(("python-cython" ,python-cython)
10437 ("pkg-config" ,pkg-config)))
10438 (inputs
10439 `(("hdf5" ,hdf5-1.10)
10440 ("bzip2" ,bzip2)
10441 ("zlib" ,zlib)))
10442 (home-page "https://www.pytables.org/")
10443 (synopsis "Hierarchical datasets for Python")
10444 (description "PyTables is a package for managing hierarchical datasets and
10445 designed to efficiently cope with extremely large amounts of data.")
10446 (license license:bsd-3)))
10447
10448 (define-public python-sniffio
10449 (package
10450 (name "python-sniffio")
10451 (version "1.2.0")
10452 (source
10453 (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "sniffio" version))
10456 (sha256
10457 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10458 (build-system python-build-system)
10459 (arguments
10460 `(#:phases
10461 (modify-phases %standard-phases
10462 (replace 'check
10463 (lambda _
10464 (invoke "pytest" "-vv"))))))
10465 (native-inputs
10466 `(("python-curio" ,python-curio)
10467 ("python-pytest" ,python-pytest)
10468 ("python-pytest-cov" ,python-pytest-cov)))
10469 (home-page "https://github.com/python-trio/sniffio")
10470 (synopsis "Detect which async library a program is running under")
10471 (description "This package detects which async library a program is
10472 running under. It supports multiple async I/O packages, like Trio, and
10473 asyncio.")
10474 ;; Either license applies.
10475 (license (list license:expat license:asl2.0))))
10476
10477 (define-public python-pytest-black
10478 (package
10479 (name "python-pytest-black")
10480 (version "0.3.8")
10481 (source
10482 (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "pytest-black" version))
10485 (sha256
10486 (base32
10487 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
10488 (build-system python-build-system)
10489 (propagated-inputs
10490 `(("python-pytest" ,python-pytest)
10491 ("python-black" ,python-black)
10492 ("python-toml" ,python-toml)))
10493 (native-inputs
10494 `(("python-setuptools-scm" ,python-setuptools-scm)))
10495 (home-page "https://github.com/shopkeep/pytest-black")
10496 (synopsis "Pytest plugin to enable format checking with black")
10497 (description
10498 "This package provides a pytest plugin to enable format checking with the
10499 Python code formatter \"black\".")
10500 (license license:expat)))
10501
10502 (define-public python-get-version
10503 (package
10504 (name "python-get-version")
10505 (version "2.1")
10506 (source
10507 (origin
10508 (method url-fetch)
10509 (uri (pypi-uri "get_version" version))
10510 (sha256
10511 (base32
10512 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
10513 (build-system python-build-system)
10514 (propagated-inputs
10515 `(("python-pygments" ,python-pygments)
10516 ("python-pytest" ,python-pytest)
10517 ("python-pytest-black" ,python-pytest-black)
10518 ("python-pytest-cov" ,python-pytest-cov)
10519 ("python-setuptools" ,python-setuptools)
10520 ("python-testpath" ,python-testpath)))
10521 (home-page "https://github.com/flying-sheep/get_version")
10522 (synopsis "Version helper in the spirit of versioneer")
10523 (description
10524 "This package provides a version helper that lets you automatically use
10525 the latest @code{vX.X.X} Git tag as the version in your Python package. It
10526 also supports getting the version from Python source distributions or, once
10527 your package is installed, via @code{pkg_resources} (part of
10528 @code{setuptools}).")
10529 (license license:gpl3+)))
10530
10531 (define-public python-legacy-api-wrap
10532 (package
10533 (name "python-legacy-api-wrap")
10534 (version "1.2")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "legacy-api-wrap" version))
10539 (sha256
10540 (base32
10541 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
10542 (build-system python-build-system)
10543 (propagated-inputs
10544 `(("python-get-version" ,python-get-version)
10545 ("python-pytest" ,python-pytest)
10546 ("python-pytest-black" ,python-pytest-black)
10547 ("python-pytest-cov" ,python-pytest-cov)
10548 ("python-setuptools" ,python-setuptools)))
10549 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
10550 (synopsis "Legacy API wrapper")
10551 (description "This module defines a decorator to wrap legacy APIs. The
10552 primary use case is APIs defined before keyword-only parameters existed.")
10553 (license license:gpl3+)))
10554
10555 (define-public python-langdetect
10556 (package
10557 (name "python-langdetect")
10558 (version "1.0.9")
10559 (source
10560 (origin
10561 (method url-fetch)
10562 (uri (pypi-uri "langdetect" version))
10563 (sha256
10564 (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
10565 (build-system python-build-system)
10566 (propagated-inputs
10567 `(("python-six" ,python-six)))
10568 (home-page "https://github.com/Mimino666/langdetect")
10569 (synopsis "Language detection library")
10570 (description
10571 "This library is a port of Nakatani Shuyo's language-detection library
10572 (version from 03/03/2014) to Python.")
10573 (license license:expat)))
10574
10575 (define-public python-pyasn1
10576 (package
10577 (name "python-pyasn1")
10578 (version "0.4.8")
10579 (source
10580 (origin
10581 (method url-fetch)
10582 (uri (pypi-uri "pyasn1" version))
10583 (sha256
10584 (base32
10585 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
10586 (build-system python-build-system)
10587 (home-page "http://pyasn1.sourceforge.net/")
10588 (synopsis "ASN.1 types and codecs")
10589 (description
10590 "This is an implementation of ASN.1 types and codecs in Python. It is
10591 suitable for a wide range of protocols based on the ASN.1 specification.")
10592 (license license:bsd-2)))
10593
10594 (define-public python2-pyasn1
10595 (package-with-python2 python-pyasn1))
10596
10597 (define-public python-pyasn1-modules
10598 (package
10599 (name "python-pyasn1-modules")
10600 (version "0.2.2")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "pyasn1-modules" version))
10605 (sha256
10606 (base32
10607 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
10608 (build-system python-build-system)
10609 (propagated-inputs
10610 `(("python-pyasn1" ,python-pyasn1)))
10611 (home-page "https://sourceforge.net/projects/pyasn1/")
10612 (synopsis "ASN.1 codec implementations")
10613 (description
10614 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
10615 implementations of ASN.1-based codecs and protocols.")
10616 (license license:bsd-3)))
10617
10618 (define-public python2-pyasn1-modules
10619 (package-with-python2 python-pyasn1-modules))
10620
10621 (define-public python2-ipaddress
10622 (package
10623 (name "python2-ipaddress")
10624 (version "1.0.23")
10625 (source (origin
10626 (method url-fetch)
10627 (uri (pypi-uri "ipaddress" version))
10628 (sha256
10629 (base32
10630 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
10631 (build-system python-build-system)
10632 (arguments
10633 `(#:python ,python-2))
10634 (home-page "https://github.com/phihag/ipaddress")
10635 (synopsis "IP address manipulation library")
10636 (description
10637 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
10638 in Python. This library is used to create, poke at, and manipulate IPv4 and
10639 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
10640 module to older versions of Python.")
10641 (license license:psfl)))
10642
10643 (define-public python-asn1tools
10644 (package
10645 (name "python-asn1tools")
10646 (version "0.158.0")
10647 (source
10648 (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "asn1tools" version))
10651 (sha256
10652 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
10653 (build-system python-build-system)
10654 (propagated-inputs
10655 `(("python-bitstruct" ,python-bitstruct)
10656 ("python-diskcache" ,python-diskcache)
10657 ("python-prompt-toolkit" ,python-prompt-toolkit)
10658 ("python-pyparsing" ,python-pyparsing)))
10659 (home-page "https://github.com/eerimoq/asn1tools")
10660 (synopsis "ASN.1 parsing, encoding and decoding")
10661 (description "This package provides ASN.1 parsing, encoding and decoding
10662 for Python, including constraints checking. It supports several
10663 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
10664 for OER and UPER.")
10665 (license license:expat)))
10666
10667 (define-public python2-ipaddr
10668 (package
10669 (name "python2-ipaddr")
10670 (version "2.1.11")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "ipaddr" version))
10675 (sha256
10676 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
10677 (build-system python-build-system)
10678 (arguments
10679 `(#:python ,python-2 ;version 2 only
10680 #:phases
10681 (modify-phases %standard-phases
10682 (replace 'check
10683 (lambda _ (invoke "python" "ipaddr_test.py"))))))
10684 (home-page "https://github.com/google/ipaddr-py")
10685 (synopsis "IP address manipulation library")
10686 (description
10687 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
10688 IPv6 addresses and networks.
10689
10690 For new implementations you may prefer to use the standard module
10691 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
10692 versions of Python.")
10693 (license license:asl2.0)))
10694
10695 (define-public python-idna
10696 (package
10697 (name "python-idna")
10698 (version "2.10")
10699 (source
10700 (origin
10701 (method url-fetch)
10702 (uri (pypi-uri "idna" version))
10703 (sha256
10704 (base32
10705 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
10706 (build-system python-build-system)
10707 (home-page "https://github.com/kjd/idna")
10708 (synopsis "Internationalized domain names in applications")
10709 (description
10710 "This is a library to support the Internationalised Domain Names in
10711 Applications (IDNA) protocol as specified in RFC 5891. This version of the
10712 protocol is often referred to as “IDNA2008” and can produce different results
10713 from the earlier standard from 2003. The library is also intended to act as a
10714 suitable drop-in replacement for the “encodings.idna” module that comes with
10715 the Python standard library but currently only supports the older 2003
10716 specification.")
10717 (license license:bsd-4)))
10718
10719 (define-public python-idna-2.7
10720 (package (inherit python-idna)
10721 (version "2.7")
10722 (source (origin
10723 (method url-fetch)
10724 (uri (pypi-uri "idna" version))
10725 (sha256
10726 (base32
10727 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
10728
10729
10730 (define-public python2-idna
10731 (package-with-python2 python-idna))
10732
10733 (define-public python-libsass
10734 (package
10735 (name "python-libsass")
10736 (version "0.20.1")
10737 (source
10738 (origin
10739 ;; PyPI tarball is missing some test files.
10740 (method git-fetch)
10741 (uri (git-reference
10742 (url "https://github.com/sass/libsass-python")
10743 (commit version)))
10744 (file-name (git-file-name name version))
10745 (sha256
10746 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10747 (build-system python-build-system)
10748 (arguments
10749 `(#:phases
10750 (modify-phases %standard-phases
10751 ;; Use Guix package of libsass instead of compiling from a checkout.
10752 (add-before 'build 'set-libsass
10753 (lambda _
10754 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10755 #t))
10756 (replace 'check
10757 (lambda* (#:key inputs outputs #:allow-other-keys)
10758 (add-installed-pythonpath inputs outputs)
10759 (invoke "pytest" "sasstests.py"))))))
10760 (native-inputs
10761 `(("python-pytest" ,python-pytest)
10762 ("python-werkzeug" ,python-werkzeug)))
10763 (inputs
10764 `(("libsass" ,libsass)))
10765 (propagated-inputs
10766 `(("python-six" ,python-six)))
10767 (home-page "https://sass.github.io/libsass-python/")
10768 (synopsis "Straightforward binding of libsass for Python")
10769 (description
10770 "This package provides a simple Python extension module @code{sass} which
10771 is binding LibSass.")
10772 (license license:expat)))
10773
10774 (define-public python-idna-ssl
10775 (package
10776 (name "python-idna-ssl")
10777 (version "1.0.1")
10778 (source
10779 (origin
10780 (method url-fetch)
10781 (uri (pypi-uri "idna-ssl" version))
10782 (sha256
10783 (base32
10784 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10785 (build-system python-build-system)
10786 (arguments
10787 `(#:tests? #f)) ;circular dependency with python-aiohttp
10788 (propagated-inputs `(("python-idna" ,python-idna)))
10789 (home-page "https://github.com/aio-libs/idna-ssl")
10790 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10791 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10792 domains support.")
10793 (license license:expat)))
10794
10795 (define-public python-pretend
10796 (package
10797 (name "python-pretend")
10798 (version "1.0.9")
10799 (source
10800 (origin
10801 (method url-fetch)
10802 (uri (pypi-uri "pretend" version))
10803 (sha256
10804 (base32
10805 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10806 (build-system python-build-system)
10807 (home-page "https://github.com/alex/pretend")
10808 (synopsis "Library for stubbing in Python")
10809 (description
10810 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10811 technique for writing tests. You may hear the term mixed up with mocks,
10812 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10813 responses, rather than doing any computation.")
10814 (license license:bsd-3)))
10815
10816 (define-public python2-pretend
10817 (package-with-python2 python-pretend))
10818
10819 (define-public python-pip
10820 (package
10821 (name "python-pip")
10822 (version "20.2.4")
10823 (source
10824 (origin
10825 (method url-fetch)
10826 (uri (pypi-uri "pip" version))
10827 (sha256
10828 (base32
10829 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10830 (build-system python-build-system)
10831 (arguments
10832 '(#:tests? #f)) ; there are no tests in the pypi archive.
10833 (home-page "https://pip.pypa.io/")
10834 (synopsis "Package manager for Python software")
10835 (description
10836 "Pip is a package manager for Python software, that finds packages on the
10837 Python Package Index (PyPI).")
10838 (license license:expat)))
10839
10840 (define-public python2-pip
10841 (package-with-python2 python-pip))
10842
10843 (define-public python-tlsh
10844 (package
10845 (name "python-tlsh")
10846 (version "3.4.5")
10847 (home-page "https://github.com/trendmicro/tlsh")
10848 (source
10849 (origin
10850 (method git-fetch)
10851 (uri (git-reference
10852 (url "https://github.com/trendmicro/tlsh")
10853 (commit (string-append "v" version))))
10854 (file-name (git-file-name name version))
10855 (sha256
10856 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10857 (build-system cmake-build-system)
10858 (arguments
10859 '(#:out-of-source? #f
10860 #:phases (modify-phases %standard-phases
10861 (replace
10862 'install
10863 (lambda* (#:key outputs #:allow-other-keys)
10864 ;; Build and install the Python bindings. The underlying
10865 ;; C++ library is apparently not meant to be installed.
10866 (let ((out (assoc-ref outputs "out")))
10867 (with-directory-excursion "py_ext"
10868 (and (system* "python" "setup.py" "build")
10869 (system* "python" "setup.py" "install"
10870 (string-append "--prefix=" out))))))))))
10871 (inputs `(("python" ,python-wrapper))) ;for the bindings
10872 (synopsis "Fuzzy matching library for Python")
10873 (description
10874 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10875 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10876 value which can be used for similarity comparisons. Similar objects have
10877 similar hash values, which allows for the detection of similar objects by
10878 comparing their hash values. The byte stream should have a sufficient amount
10879 of complexity; for example, a byte stream of identical bytes will not generate
10880 a hash value.")
10881 (license license:asl2.0)))
10882
10883 (define-public python2-tlsh
10884 (package/inherit python-tlsh
10885 (name "python2-tlsh")
10886 (inputs `(("python" ,python-2)))))
10887
10888 (define-public python-termcolor
10889 (package
10890 (name "python-termcolor")
10891 (version "1.1.0")
10892 (source
10893 (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "termcolor" version))
10896 (sha256
10897 (base32
10898 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10899 (build-system python-build-system)
10900 (arguments
10901 ;; There are no tests.
10902 `(#:tests? #f))
10903 (home-page "https://pypi.org/project/termcolor/")
10904 (synopsis "ANSII Color formatting for terminal output")
10905 (description
10906 "This package provides ANSII Color formatting for output in terminals.")
10907 (license license:expat)))
10908
10909 (define-public python2-termcolor
10910 (package-with-python2 python-termcolor))
10911
10912 (define-public python-terminaltables
10913 (package
10914 (name "python-terminaltables")
10915 (version "3.1.0")
10916 (source
10917 (origin
10918 (method url-fetch)
10919 (uri (pypi-uri "terminaltables" version))
10920 (sha256
10921 (base32
10922 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10923 (build-system python-build-system)
10924 (home-page "https://github.com/Robpol86/terminaltables")
10925 (synopsis
10926 "Generate simple tables in terminals from a nested list of strings")
10927 (description
10928 "This package makes it easy to draw tables in terminal/console
10929 applications from a list of lists of strings. It supports multi-line rows.")
10930 (license license:expat)))
10931
10932 (define-public python-libarchive-c
10933 (package
10934 (name "python-libarchive-c")
10935 (version "2.9")
10936 (source (origin
10937 (method url-fetch)
10938 (uri (pypi-uri "libarchive-c" version))
10939 (sha256
10940 (base32
10941 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10942 (build-system python-build-system)
10943 (arguments
10944 '(#:phases (modify-phases %standard-phases
10945 (add-before
10946 'build 'reference-libarchive
10947 (lambda* (#:key inputs #:allow-other-keys)
10948 ;; Retain the absolute file name of libarchive.so.
10949 (let ((libarchive (assoc-ref inputs "libarchive")))
10950 (substitute* "libarchive/ffi.py"
10951 (("find_library\\('archive'\\)")
10952 (string-append "'" libarchive
10953 "/lib/libarchive.so'"))))))
10954 (replace 'check
10955 (lambda _ (invoke "pytest" "-vv"))))))
10956 (native-inputs
10957 `(("python-mock" ,python-mock)
10958 ("python-pytest" ,python-pytest)))
10959 (inputs
10960 `(("libarchive" ,libarchive)))
10961 (home-page "https://github.com/Changaco/python-libarchive-c")
10962 (synopsis "Python interface to libarchive")
10963 (description
10964 "This package provides Python bindings to libarchive, a C library to
10965 access possibly compressed archives in many different formats. It uses
10966 Python's @code{ctypes} foreign function interface (FFI).")
10967 (license license:lgpl2.0+)))
10968
10969 (define-public python2-libarchive-c
10970 (package-with-python2 python-libarchive-c))
10971
10972 (define-public python-file
10973 (package/inherit file
10974 (name "python-file")
10975 (build-system python-build-system)
10976 (arguments
10977 '(#:tests? #f ;no tests
10978 #:configure-flags '("--single-version-externally-managed" "--root=/")
10979 #:phases (modify-phases %standard-phases
10980 (add-before 'build 'change-directory
10981 (lambda _
10982 (chdir "python")
10983 #t))
10984 (add-before 'build 'set-library-file-name
10985 (lambda* (#:key inputs #:allow-other-keys)
10986 (let ((file (assoc-ref inputs "file")))
10987 (substitute* "magic.py"
10988 (("find_library\\('magic'\\)")
10989 (string-append "'" file "/lib/libmagic.so'")))
10990 #t))))))
10991 (inputs `(("file" ,file)))
10992 (native-inputs (if (%current-target-system)
10993 `(("self" ,this-package))
10994 '()))
10995 (synopsis "Python bindings to the libmagic file type guesser")
10996 (description "This package provides Python bindings to the libmagic file
10997 type guesser.
10998
10999 Note that this module and the @code{python-magic} module both provide a
11000 @file{magic.py} file; these two modules, which are different and were
11001 developed separately, both serve the same purpose: provide Python bindings for
11002 libmagic.")))
11003
11004 (define-public python2-file
11005 (package-with-python2 python-file))
11006
11007 (define-public python-debian
11008 (package
11009 (name "python-debian")
11010 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
11011 (version "0.1.36")
11012 (source
11013 (origin
11014 ;; Use git-fetch, as pypi doesn't include test suite.
11015 (method git-fetch)
11016 (uri (git-reference
11017 (url home-page)
11018 (commit version)))
11019 (file-name (git-file-name name version))
11020 (sha256
11021 (base32
11022 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
11023 (build-system python-build-system)
11024 (arguments
11025 `(#:phases (modify-phases %standard-phases
11026 (add-after 'unpack 'remove-debian-specific-tests
11027 ;; python-apt, apt and dpkg are not yet available in guix,
11028 ;; and these tests heavily depend on them.
11029 (lambda _
11030 (delete-file "lib/debian/tests/test_deb822.py")
11031 (delete-file "lib/debian/tests/test_debfile.py")
11032 #t)))))
11033 (propagated-inputs
11034 `(("python-six" ,python-six)
11035 ("python-chardet" ,python-chardet)))
11036 (synopsis "Debian package related modules")
11037 (description
11038 ;; XXX: Use @enumerate instead of @itemize to work around
11039 ;; <http://bugs.gnu.org/21772>.
11040 "This package provides Python modules that abstract many formats of
11041 Debian-related files, such as:
11042
11043 @enumerate
11044 @item Debtags information;
11045 @item @file{debian/changelog} files;
11046 @item packages files, pdiffs;
11047 @item control files of single or multiple RFC822-style paragraphs---e.g.
11048 @file{debian/control}, @file{.changes}, @file{.dsc};
11049 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
11050 contained files and meta-information.
11051 @end enumerate\n")
11052
11053 ;; Modules are either GPLv2+ or GPLv3+.
11054 (license license:gpl3+)))
11055
11056 (define-public python-json-spec
11057 (package
11058 (name "python-json-spec")
11059 (version "0.10.1")
11060 (source
11061 (origin
11062 (method url-fetch)
11063 (uri (pypi-uri "json-spec" version))
11064 (sha256
11065 (base32
11066 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
11067 (build-system python-build-system)
11068 (propagated-inputs
11069 `(("python-pathlib" ,python-pathlib)
11070 ("python-six" ,python-six)))
11071 (native-inputs
11072 `(("python-pytest" ,python-pytest)))
11073 (home-page "http://py.errorist.io/json-spec")
11074 (synopsis
11075 "JSON Schema, JSON Pointer and JSON Reference for Python")
11076 (description
11077 "This Python library implements several JSON specs, like JSON Schema,
11078 JSON Reference and JSON Pointer.")
11079 (license license:bsd-3)))
11080
11081 (define-public python-fastjsonschema
11082 (package
11083 (name "python-fastjsonschema")
11084 (version "2.15.1")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "fastjsonschema" version))
11089 (sha256
11090 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
11091 (build-system python-build-system)
11092 (arguments
11093 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
11094 #:phases
11095 (modify-phases %standard-phases
11096 (replace 'check
11097 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11098 (when tests?
11099 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
11100 (native-inputs
11101 `(("python-colorama" ,python-colorama)
11102 ("python-json-spec" ,python-json-spec)
11103 ("python-jsonschema" ,python-jsonschema)
11104 ("python-pylint" ,python-pylint)
11105 ("python-pytest" ,python-pytest)
11106 ("python-pytest-benchmark"
11107 ,python-pytest-benchmark)
11108 ("python-pytest-cache" ,python-pytest-cache)
11109 ("python-validictory" ,python-validictory)))
11110 (home-page
11111 "https://github.com/horejsek/python-fastjsonschema")
11112 (synopsis
11113 "Fast Python implementation of JSON schema")
11114 (description
11115 "This library implements validation of JSON documents by JSON schema for
11116 drafts 04, 06 and 07.")
11117 (license license:bsd-3)))
11118
11119 (define-public python-nbformat
11120 (package
11121 (name "python-nbformat")
11122 (version "5.1.3")
11123 ;; The PyPi release tarball lacks some test cases and test data.
11124 (source (origin
11125 (method git-fetch)
11126 (uri (git-reference
11127 (url "https://github.com/jupyter/nbformat.git")
11128 (commit version)))
11129 (sha256
11130 (base32
11131 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
11132 (file-name (git-file-name name version))))
11133 (build-system python-build-system)
11134 (arguments
11135 `(#:phases
11136 (modify-phases %standard-phases
11137 (replace 'check
11138 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11139 (when tests?
11140 (invoke "pytest" "-vv")))))))
11141 (propagated-inputs
11142 `(("python-ipython-genutils" ,python-ipython-genutils)
11143 ("python-jsonschema" ,python-jsonschema)
11144 ("python-jupyter-core" ,python-jupyter-core)
11145 ("python-traitlets" ,python-traitlets)))
11146 (native-inputs
11147 `(("python-pytest" ,python-pytest)
11148 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
11149 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
11150 ; testing only.
11151 ("python-testpath" ,python-testpath)))
11152 (home-page "https://jupyter.org")
11153 (synopsis "Jupyter Notebook format")
11154 (description "This package provides the reference implementation of the
11155 Jupyter Notebook format and Python APIs for working with notebooks.")
11156 (license license:bsd-3)))
11157
11158 (define-public python-bleach
11159 (package
11160 (name "python-bleach")
11161 (version "3.1.5")
11162 (source
11163 (origin
11164 (method url-fetch)
11165 (uri (pypi-uri "bleach" version))
11166 (sha256
11167 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
11168 (build-system python-build-system)
11169 (propagated-inputs
11170 `(("python-webencodings" ,python-webencodings)
11171 ("python-six" ,python-six)))
11172 (native-inputs
11173 `(("python-datrie" ,python-datrie)
11174 ("python-genshi" ,python-genshi)
11175 ("python-lxml" ,python-lxml)
11176 ("python-pytest" ,python-pytest)))
11177 (home-page "https://github.com/mozilla/bleach")
11178 (synopsis "Whitelist-based HTML-sanitizing tool")
11179 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
11180 (license license:asl2.0)))
11181
11182 (define-public python2-bleach
11183 (package-with-python2 python-bleach))
11184
11185 (define-public python-entrypoints
11186 (package
11187 (name "python-entrypoints")
11188 (version "0.3")
11189 (source
11190 (origin
11191 (method url-fetch)
11192 (uri (pypi-uri "entrypoints" version))
11193 (sha256
11194 (base32
11195 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11196 (build-system python-build-system)
11197 ;; The package does not come with a setup.py file, so we have to generate
11198 ;; one ourselves.
11199 (arguments
11200 `(#:tests? #f
11201 #:phases
11202 (modify-phases %standard-phases
11203 (add-after 'unpack 'create-setup.py
11204 (lambda _
11205 (call-with-output-file "setup.py"
11206 (lambda (port)
11207 (format port "\
11208 from setuptools import setup
11209 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11210 " ,version))))))))
11211 (home-page "https://github.com/takluyver/entrypoints")
11212 (synopsis "Discover and load entry points from installed Python packages")
11213 (description "Entry points are a way for Python packages to advertise
11214 objects with some common interface. The most common examples are
11215 @code{console_scripts} entry points, which define shell commands by
11216 identifying a Python function to run. The @code{entrypoints} module contains
11217 functions to find and load entry points.")
11218 (license license:expat)))
11219
11220 (define-public python2-entrypoints
11221 (package-with-python2 python-entrypoints))
11222
11223 (define-public python-epc
11224 (package
11225 (name "python-epc")
11226 (version "0.0.5")
11227 (source
11228 (origin
11229 (method url-fetch)
11230 (uri (pypi-uri "epc" version))
11231 (sha256
11232 (base32
11233 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11234 (build-system python-build-system)
11235 (propagated-inputs
11236 `(("python-sexpdata" ,python-sexpdata)))
11237 (native-inputs
11238 `(("python-nose" ,python-nose)))
11239 (home-page "https://github.com/tkf/python-epc")
11240 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11241 (description
11242 "Python-EPC can call elisp functions from Python and Python functions
11243 from elisp.")
11244 (license license:gpl3)))
11245
11246 (define-public python-forex-python
11247 (package
11248 (name "python-forex-python")
11249 (version "1.5")
11250 (source
11251 (origin
11252 (method url-fetch)
11253 (uri (pypi-uri "forex-python" version))
11254 (sha256
11255 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11256 (build-system python-build-system)
11257 (arguments
11258 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11259 ;; repository require online data.
11260 `(#:tests? #f))
11261 (propagated-inputs
11262 `(("python-requests" ,python-requests)
11263 ("python-simplejson" ,python-simplejson)))
11264 (home-page "https://github.com/MicroPyramid/forex-python")
11265 (synopsis "Foreign exchange rates and currency conversion")
11266 (description
11267 "@code{python-forex-python} can be used to manipulate foreign
11268 exchange rates and to operate currency conversions.
11269
11270 Features:
11271 @itemize
11272 @item List all currency rates.
11273 @item BitCoin price for all currencies.
11274 @item Converting amount to BitCoins.
11275 @item Get historical rates for any day since 1999.
11276 @item Conversion rate for one currency(ex; USD to INR).
11277 @item Convert amount from one currency to other.('USD 10$' to INR).
11278 @item Currency symbols.
11279 @item Currency names.
11280 @end itemize")
11281 (license license:expat)))
11282
11283 (define-public python-simpleeval
11284 (package
11285 (name "python-simpleeval")
11286 (version "0.9.10")
11287 (source
11288 (origin
11289 (method url-fetch)
11290 (uri (pypi-uri "simpleeval" version))
11291 (sha256
11292 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11293 (build-system python-build-system)
11294 (home-page "https://github.com/danthedeckie/simpleeval")
11295 (synopsis "Simple, safe single expression evaluator library")
11296 (description
11297 "This package provides a quick single file library for easily adding
11298 evaluatable expressions into python projects. Say you want to allow a user
11299 to set an alarm volume, which could depend on the time of day, alarm level,
11300 how many previous alarms had gone off, and if there is music playing at the
11301 time.")
11302 (license license:expat)))
11303
11304 (define-public python-nbconvert
11305 (package
11306 (name "python-nbconvert")
11307 (version "6.0.7")
11308 (source
11309 (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "nbconvert" version))
11312 (sha256
11313 (base32
11314 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11315 (build-system python-build-system)
11316 (arguments
11317 `(#:phases
11318 (modify-phases %standard-phases
11319 (add-after 'unpack 'fix-paths-and-tests
11320 (lambda _
11321 ;; Use pandoc binary from input.
11322 (substitute* "nbconvert/utils/pandoc.py"
11323 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11324 ;; Same for LaTeX.
11325 (substitute* "nbconvert/exporters/pdf.py"
11326 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11327 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11328 ;; Make sure tests are not skipped.
11329 (substitute* (find-files "." "test_.+\\.py$")
11330 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11331 ;; Pandoc is never missing, disable test.
11332 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11333 (("import os" all) (string-append all "\nimport pytest"))
11334 (("(.+)(def test_pandoc_available)" all indent def)
11335 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11336 indent def)))
11337 ;; Not installing pyppeteer, delete test.
11338 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11339 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11340 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11341 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11342 indent def)))))
11343 (replace 'check
11344 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11345 (when tests?
11346 ;; Some tests invoke the installed nbconvert binary.
11347 (add-installed-pythonpath inputs outputs)
11348 ;; Tries to write to this path.
11349 (unsetenv "JUPYTER_CONFIG_DIR")
11350 ;; Tests depend on templates installed to output.
11351 (setenv "JUPYTER_PATH"
11352 (string-append
11353 (assoc-ref outputs "out")
11354 "/share/jupyter:"
11355 (getenv "JUPYTER_PATH")))
11356 ;; Some tests need HOME
11357 (setenv "HOME" "/tmp")
11358 (invoke "pytest" "-vv")))))))
11359 (inputs
11360 `(("pandoc" ,pandoc)
11361 ;; XXX: Disabled, needs substitute*.
11362 ;;("inkscape" ,inkscape)
11363 ))
11364 (native-inputs
11365 `(("python-ipykernel" ,python-ipykernel)
11366 ;; XXX: Disabled, not in guix.
11367 ;;("python-pyppeteer" ,python-pyppeteer)
11368 ("python-pytest" ,python-pytest)
11369 ("python-pytest-cov" ,python-pytest-cov)
11370 ("python-pytest-dependency" ,python-pytest-dependency)
11371 ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox
11372 texlive-amsfonts
11373 texlive-booktabs
11374 texlive-caption
11375 texlive-eurosym
11376 texlive-fonts-rsfs
11377 texlive-generic-ulem
11378 texlive-generic-iftex
11379 texlive-jknappen
11380 texlive-latex-amsmath
11381 texlive-latex-enumitem
11382 texlive-latex-fancyvrb
11383 texlive-latex-float
11384 texlive-fontspec
11385 texlive-latex-geometry
11386 texlive-hyperref
11387 texlive-latex-jknapltx
11388 texlive-latex-ms
11389 texlive-oberdiek
11390 texlive-latex-parskip
11391 texlive-latex-trimspaces
11392 texlive-latex-upquote
11393 texlive-latex-ucs
11394 texlive-lm
11395 texlive-mathpazo
11396 texlive-tcolorbox
11397 texlive-titling
11398 texlive-tools
11399 texlive-xcolor
11400 texlive-zapfding)))))
11401 (propagated-inputs
11402 `(("python-bleach" ,python-bleach)
11403 ("python-defusedxml" ,python-defusedxml)
11404 ("python-entrypoints" ,python-entrypoints)
11405 ("python-jinja2" ,python-jinja2)
11406 ("python-jupyter-core" ,python-jupyter-core)
11407 ("python-mistune" ,python-mistune)
11408 ("python-nbclient" ,python-nbclient)
11409 ("python-nbformat" ,python-nbformat)
11410 ("python-pandocfilters" ,python-pandocfilters)
11411 ("python-pygments" ,python-pygments)
11412 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11413 ("python-testpath" ,python-testpath)
11414 ("python-traitlets" ,python-traitlets)
11415 ;; Required, even if [serve] is not used.
11416 ("python-tornado" ,python-tornado-6)))
11417 (home-page "https://jupyter.org")
11418 (synopsis "Converting Jupyter Notebooks")
11419 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11420 notebooks to various other formats via Jinja templates. It allows you to
11421 convert an @code{.ipynb} notebook file into various static formats including:
11422
11423 @enumerate
11424 @item HTML
11425 @item LaTeX
11426 @item PDF
11427 @item Reveal JS
11428 @item Markdown (md)
11429 @item ReStructured Text (rst)
11430 @item executable script
11431 @end enumerate\n")
11432 (license license:bsd-3)))
11433
11434 (define-public python-notebook
11435 (package
11436 (name "python-notebook")
11437 (version "6.3.0")
11438 (source (origin
11439 (method url-fetch)
11440 (uri (pypi-uri "notebook" version))
11441 (sha256
11442 (base32
11443 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11444 (build-system python-build-system)
11445 (arguments
11446 `(#:phases
11447 (modify-phases %standard-phases
11448 (replace 'check
11449 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11450 ;; These tests require a browser
11451 (delete-file-recursively "notebook/tests/selenium")
11452 (when tests?
11453 (add-installed-pythonpath inputs outputs)
11454 ;; Some tests do not expect all files to be installed in the
11455 ;; same directory, but JUPYTER_PATH contains multiple entries.
11456 (unsetenv "JUPYTER_PATH")
11457 ;; Some tests need HOME
11458 (setenv "HOME" "/tmp")
11459 (with-directory-excursion "/tmp"
11460 (invoke "pytest" "-vv"
11461 ;; TODO: This tests fails because nbconvert does not
11462 ;; list "python" as a format.
11463 "-k" "not test_list_formats"))))))))
11464 (propagated-inputs
11465 `(("python-argon2-cffi" ,python-argon2-cffi)
11466 ("python-ipykernel" ,python-ipykernel)
11467 ("python-ipython-genutils" ,python-ipython-genutils)
11468 ("python-jinja2" ,python-jinja2)
11469 ("python-jupyter-client" ,python-jupyter-client)
11470 ("python-jupyter-core" ,python-jupyter-core)
11471 ("python-nbconvert" ,python-nbconvert)
11472 ("python-nbformat" ,python-nbformat)
11473 ("python-prometheus-client" ,python-prometheus-client)
11474 ("python-pyzmq" ,python-pyzmq)
11475 ("python-send2trash" ,python-send2trash)
11476 ("python-terminado" ,python-terminado)
11477 ("python-tornado" ,python-tornado-6)
11478 ("python-traitlets" ,python-traitlets)))
11479 (native-inputs
11480 `(("python-coverage" ,python-coverage)
11481 ("python-nbval" ,python-nbval)
11482 ("python-pytest" ,python-pytest)
11483 ("python-pytest-cov" ,python-pytest-cov)
11484 ("python-requests" ,python-requests)
11485 ("python-requests-unixsocket" ,python-requests-unixsocket)))
11486 (home-page "https://jupyter.org/")
11487 (synopsis "Web-based notebook environment for interactive computing")
11488 (description
11489 "The Jupyter HTML notebook is a web-based notebook environment for
11490 interactive computing.")
11491 (license license:bsd-3)))
11492
11493 (define-public python-widgetsnbextension
11494 (package
11495 (name "python-widgetsnbextension")
11496 (version "3.5.1")
11497 (source
11498 (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "widgetsnbextension" version))
11501 (sha256
11502 (base32
11503 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
11504 (build-system python-build-system)
11505 (propagated-inputs
11506 `(("python-notebook" ,python-notebook)))
11507 (home-page "https://ipython.org")
11508 (synopsis "IPython HTML widgets for Jupyter")
11509 (description "This package provides interactive HTML widgets for Jupyter
11510 notebooks.")
11511 (license license:bsd-3)))
11512
11513 (define-public python-ipywidgets
11514 (package
11515 (name "python-ipywidgets")
11516 (version "7.6.3")
11517 (source
11518 (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "ipywidgets" version))
11521 (sha256
11522 (base32
11523 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
11524 (build-system python-build-system)
11525 (propagated-inputs
11526 `(("python-ipykernel" ,python-ipykernel)
11527 ("python-ipython" ,python-ipython)
11528 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
11529 ("python-nbformat" ,python-nbformat)
11530 ("python-traitlets" ,python-traitlets)
11531 ("python-widgetsnbextension" ,python-widgetsnbextension)))
11532 (native-inputs
11533 `(("python-mock" ,python-mock)
11534 ("python-pytest" ,python-pytest)
11535 ("python-pytest-cov" ,python-pytest-cov)))
11536 (home-page "https://ipython.org")
11537 (synopsis "IPython HTML widgets for Jupyter")
11538 (description "Ipywidgets are interactive HTML widgets for Jupyter
11539 notebooks and the IPython kernel. Notebooks come alive when interactive
11540 widgets are used. Users gain control of their data and can visualize changes
11541 in the data.")
11542 (license license:bsd-3)))
11543
11544 (define-public python-jupyter-console
11545 (package
11546 (name "python-jupyter-console")
11547 (version "6.1.0")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "jupyter_console" version))
11552 (sha256
11553 (base32
11554 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
11555 (build-system python-build-system)
11556 (propagated-inputs
11557 `(("python-ipykernel" ,python-ipykernel)
11558 ("python-jupyter-client" ,python-jupyter-client)
11559 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
11560 ("python-pygments" ,python-pygments)))
11561 (native-inputs
11562 `(("python-nose" ,python-nose)))
11563 (home-page "https://jupyter.org")
11564 (synopsis "Jupyter terminal console")
11565 (description "This package provides a terminal-based console frontend for
11566 Jupyter kernels. It also allows for console-based interaction with non-Python
11567 Jupyter kernels such as IJulia and IRKernel.")
11568 (license license:bsd-3)))
11569
11570 ;; The python-ipython and python-jupyter-console require each other. To get
11571 ;; the functionality in both packages working, strip down the
11572 ;; python-jupyter-console package when using it as an input to python-ipython.
11573 (define python-jupyter-console-minimal
11574 (package/inherit python-jupyter-console
11575 (name "python-jupyter-console-minimal")
11576 (arguments
11577 (substitute-keyword-arguments
11578 (package-arguments python-jupyter-console)
11579 ((#:phases phases)
11580 `(modify-phases ,phases
11581 (add-after 'install 'delete-bin
11582 (lambda* (#:key outputs #:allow-other-keys)
11583 ;; Delete the bin files, to avoid conflicts in profiles
11584 ;; where python-ipython and python-jupyter-console are
11585 ;; both present.
11586 (delete-file-recursively
11587 (string-append
11588 (assoc-ref outputs "out") "/bin"))))))))
11589 ;; Remove the python-ipython propagated input, to avoid the cycle
11590 (propagated-inputs
11591 (alist-delete
11592 "python-ipython"
11593 (package-propagated-inputs python-jupyter-console)))))
11594
11595 (define-public python-qtconsole
11596 (package
11597 (name "python-qtconsole")
11598 (version "4.4.3")
11599 (source
11600 (origin
11601 (method url-fetch)
11602 (uri (pypi-uri "qtconsole" version))
11603 (sha256
11604 (base32
11605 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
11606 (build-system python-build-system)
11607 (arguments
11608 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
11609 ;; but we only have the LTS version 5.x. This means that there might be
11610 ;; runtime errors, but since this is a dependency of the Jupyter package,
11611 ;; and Jupyter can be used without the qtconsole we can overlook this for
11612 ;; now.
11613 `(#:tests? #f
11614 #:phases
11615 (modify-phases %standard-phases
11616 (add-before 'check 'pre-check
11617 (lambda _
11618 (setenv "QT_QPA_PLATFORM" "offscreen")
11619 #t)))))
11620 (propagated-inputs
11621 `(("python-ipykernel" ,python-ipykernel)
11622 ("python-ipython" ,python-ipython)))
11623 (native-inputs
11624 `(("python-pytest" ,python-pytest)))
11625 (home-page "https://jupyter.org")
11626 (synopsis "Jupyter Qt console")
11627 (description "This package provides a Qt-based console for Jupyter with
11628 support for rich media output.")
11629 (license license:bsd-3)))
11630
11631 (define-public python-jsbeautifier
11632 (package
11633 (name "python-jsbeautifier")
11634 (version "1.10.2")
11635 (home-page "https://github.com/beautify-web/js-beautify")
11636 (source (origin
11637 (method git-fetch)
11638 (uri (git-reference
11639 (url home-page)
11640 (commit (string-append "v" version))))
11641 (file-name (git-file-name name version))
11642 (sha256
11643 (base32
11644 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
11645 (build-system python-build-system)
11646 (arguments
11647 `(#:phases (modify-phases %standard-phases
11648 (add-after 'unpack 'chdir
11649 (lambda _
11650 ;; The upstream Git repository contains all the code,
11651 ;; but this package only builds the python code.
11652 (chdir "python")
11653 #t))
11654 (add-after 'unpack 'patch-python-six-requirements
11655 (lambda _
11656 (substitute* "python/setup.py"
11657 (("six>=1.12.0")
11658 "six>=1.11.0"))
11659 #t)))))
11660 (propagated-inputs
11661 `(("python-editorconfig" ,python-editorconfig)
11662 ("python-six" ,python-six)))
11663 (native-inputs
11664 `(("python-pytest" ,python-pytest)))
11665 (synopsis "JavaScript unobfuscator and beautifier")
11666 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
11667 popular online obfuscators.")
11668 (license license:expat)))
11669
11670 (define-public jupyter
11671 (package
11672 (name "jupyter")
11673 (version "1.0.0")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "jupyter" version))
11678 (sha256
11679 (base32
11680 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
11681 (build-system python-build-system)
11682 (arguments '(#:tests? #f)) ; there are none.
11683 (propagated-inputs
11684 `(("python-ipykernel" ,python-ipykernel)
11685 ("python-ipywidgets" ,python-ipywidgets)
11686 ("python-jupyter-console" ,python-jupyter-console)
11687 ("python-nbconvert" ,python-nbconvert)
11688 ("python-notebook" ,python-notebook)
11689 ("python-qtconsole" ,python-qtconsole)))
11690 (home-page "https://jupyter.org")
11691 (synopsis "Web application for interactive documents")
11692 (description
11693 "The Jupyter Notebook is a web application that allows you to create and
11694 share documents that contain live code, equations, visualizations and
11695 explanatory text. Uses include: data cleaning and transformation, numerical
11696 simulation, statistical modeling, machine learning and much more.")
11697 (license license:bsd-3)))
11698
11699 (define-public python-chardet
11700 (package
11701 (name "python-chardet")
11702 (version "3.0.4")
11703 (source
11704 (origin
11705 (method url-fetch)
11706 (uri (pypi-uri "chardet" version))
11707 (sha256
11708 (base32
11709 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
11710 (native-inputs
11711 `(("python-hypothesis" ,python-hypothesis)
11712 ("python-pytest" ,python-pytest)
11713 ("python-pytest-runner" ,python-pytest-runner)))
11714 (build-system python-build-system)
11715 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
11716 (arguments `(#:tests? #f))
11717 (home-page "https://github.com/chardet/chardet")
11718 (synopsis "Universal encoding detector for Python 2 and 3")
11719 (description
11720 "This package provides @code{chardet}, a Python module that can
11721 automatically detect a wide range of file encodings.")
11722 (license license:lgpl2.1+)))
11723
11724 (define-public python2-chardet
11725 (package-with-python2 python-chardet))
11726
11727 (define-public python-docopt
11728 (package
11729 (name "python-docopt")
11730 (version "0.6.2")
11731 (source
11732 (origin
11733 (method git-fetch)
11734 ;; The release on PyPI does not include tests.
11735 (uri (git-reference
11736 (url "https://github.com/docopt/docopt")
11737 (commit version)))
11738 (file-name (git-file-name name version))
11739 (sha256
11740 (base32
11741 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
11742 (patches (search-patches "python-docopt-pytest6-compat.patch"))))
11743 (build-system python-build-system)
11744 (native-inputs
11745 `(("python-pytest" ,python-pytest)))
11746 (arguments
11747 `(#:phases
11748 (modify-phases %standard-phases
11749 (replace 'check
11750 (lambda* (#:key tests? #:allow-other-keys)
11751 (when tests?
11752 (invoke "py.test")))))))
11753 (home-page "http://docopt.org")
11754 (synopsis "Command-line interface description language for Python")
11755 (description "This library allows the user to define a command-line
11756 interface from a program's help message rather than specifying it
11757 programmatically with command-line parsers like @code{getopt} and
11758 @code{argparse}.")
11759 (license license:expat)))
11760
11761 (define-public python2-docopt
11762 (package-with-python2 python-docopt))
11763
11764 (define-public python-pythondialog
11765 (package
11766 (name "python-pythondialog")
11767 (version "3.4.0")
11768 (source
11769 (origin
11770 (method url-fetch)
11771 (uri (pypi-uri "pythondialog" version))
11772 (sha256
11773 (base32
11774 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
11775 (build-system python-build-system)
11776 (arguments
11777 `(#:phases
11778 (modify-phases %standard-phases
11779 (add-after 'unpack 'patch-path
11780 (lambda* (#:key inputs #:allow-other-keys)
11781 (let* ((dialog (assoc-ref inputs "dialog")))
11782 ;; Since this library really wants to grovel the search path, we
11783 ;; must hardcode dialog's store path into it.
11784 (substitute* "dialog.py"
11785 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
11786 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
11787 #t))))
11788 #:tests? #f)) ; no test suite
11789 (propagated-inputs
11790 `(("dialog" ,dialog)))
11791 (home-page "http://pythondialog.sourceforge.net/")
11792 (synopsis "Python interface to the UNIX dialog utility")
11793 (description "A Python wrapper for the dialog utility. Its purpose is to
11794 provide an easy to use, pythonic and comprehensive Python interface to dialog.
11795 This allows one to make simple text-mode user interfaces on Unix-like systems")
11796 (license license:lgpl2.1)
11797 (properties `((python2-variant . ,(delay python2-pythondialog))))))
11798
11799 (define-public python2-pythondialog
11800 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
11801 (package
11802 (inherit base)
11803 (version (package-version python-pythondialog))
11804 (source (origin
11805 (method url-fetch)
11806 (uri (pypi-uri "python2-pythondialog" version))
11807 (sha256
11808 (base32
11809 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11810
11811 (define-public python-configobj
11812 (package
11813 (name "python-configobj")
11814 (version "5.0.6")
11815 (source (origin
11816 (method url-fetch)
11817 (uri (pypi-uri "configobj" version))
11818 (sha256
11819 (base32
11820 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11821 ;; Patch setup.py so it looks for python-setuptools, which is
11822 ;; required to parse the keyword 'install_requires' in setup.py.
11823 (patches (search-patches "python-configobj-setuptools.patch"))))
11824 (build-system python-build-system)
11825 (propagated-inputs
11826 `(("python-six" ,python-six)))
11827 (synopsis "Config file reading, writing and validation")
11828 (description "ConfigObj is a simple but powerful config file reader and
11829 writer: an ini file round tripper. Its main feature is that it is very easy to
11830 use, with a straightforward programmer’s interface and a simple syntax for
11831 config files.")
11832 (home-page "https://github.com/DiffSK/configobj")
11833 (license license:bsd-3)))
11834
11835 (define-public python2-configobj
11836 (package-with-python2 python-configobj))
11837
11838 (define-public python-configargparse
11839 (package
11840 (name "python-configargparse")
11841 (version "1.2.3")
11842 (source (origin
11843 (method url-fetch)
11844 (uri (pypi-uri "ConfigArgParse" version))
11845 (sha256
11846 (base32
11847 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11848 (build-system python-build-system)
11849 (native-inputs
11850 `(("python-pyyaml" ,python-pyyaml)))
11851 (arguments
11852 `(#:phases
11853 (modify-phases %standard-phases
11854 (replace 'check
11855 (lambda _
11856 ;; Bypass setuptools-shim because one test relies on "setup.py"
11857 ;; being the first argument passed to the python call.
11858 ;;
11859 ;; NOTE: Many tests do not run because they rely on Python's
11860 ;; built-in test.test_argparse, but we remove the unit tests from
11861 ;; our Python installation.
11862 (invoke "python" "setup.py" "test"))))))
11863 (synopsis "Replacement for argparse")
11864 (description "A drop-in replacement for argparse that allows options to also
11865 be set via config files and/or environment variables.")
11866 (home-page "https://github.com/bw2/ConfigArgParse")
11867 (license license:expat)))
11868
11869 (define-public python-argparse-manpage
11870 (package
11871 (name "python-argparse-manpage")
11872 (version "1.1")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "argparse-manpage" version))
11877 (sha256
11878 (base32
11879 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11880 (build-system python-build-system)
11881 (home-page "https://github.com/praiskup/argparse-manpage")
11882 (synopsis "Build manual page from Python's ArgumentParser object")
11883 (description
11884 "This package provides tools to build manual pages from Python's
11885 @code{ArgumentParser} object.")
11886 (license license:asl2.0)))
11887
11888 (define-public python-contextlib2
11889 (package
11890 (name "python-contextlib2")
11891 (version "0.6.0.post1")
11892 (source
11893 (origin
11894 (method url-fetch)
11895 (uri (pypi-uri "contextlib2" version))
11896 (sha256
11897 (base32
11898 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11899 (build-system python-build-system)
11900 (home-page "https://contextlib2.readthedocs.org/")
11901 (synopsis "Tools for decorators and context managers")
11902 (description "This module is primarily a backport of the Python
11903 3.2 contextlib to earlier Python versions. Like contextlib, it
11904 provides utilities for common tasks involving decorators and context
11905 managers. It also contains additional features that are not part of
11906 the standard library.")
11907 (properties `((python2-variant . ,(delay python2-contextlib2))))
11908 (license license:psfl)))
11909
11910 (define-public python2-contextlib2
11911 (let ((base (package-with-python2
11912 (strip-python2-variant python-contextlib2))))
11913 (package/inherit base
11914 (arguments
11915 (substitute-keyword-arguments (package-arguments base)
11916 ((#:phases phases)
11917 `(modify-phases ,phases
11918 (replace 'check
11919 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11920 (native-inputs
11921 `(("python2-unittest2" ,python2-unittest2))))))
11922
11923 ;; This package is used by python2-pytest via python2-importlib-metadata,
11924 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11925 (define-public python2-contextlib2-bootstrap
11926 (hidden-package
11927 (package/inherit
11928 python2-contextlib2
11929 (name "python2-contextlib2-bootstrap")
11930 (arguments
11931 `(#:tests? #f
11932 ,@(package-arguments python2-contextlib2)))
11933 (native-inputs '()))))
11934
11935 (define-public python-texttable
11936 (package
11937 (name "python-texttable")
11938 (version "1.6.2")
11939 (source
11940 (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "texttable" version))
11943 (sha256
11944 (base32
11945 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11946 (build-system python-build-system)
11947 (arguments
11948 `(#:phases
11949 (modify-phases %standard-phases
11950 (replace 'check
11951 (lambda _ (invoke "pytest" "tests.py"))))))
11952 (native-inputs
11953 `(("python-pytest" ,python-pytest)))
11954 (home-page "https://github.com/foutaise/texttable/")
11955 (synopsis "Python module for creating simple ASCII tables")
11956 (description "Texttable is a Python module for creating simple ASCII
11957 tables.")
11958 (license license:expat)))
11959
11960 (define-public python2-texttable
11961 (package-with-python2 python-texttable))
11962
11963 (define-public python-atomicwrites
11964 (package
11965 (name "python-atomicwrites")
11966 (version "1.4.0")
11967 (source (origin
11968 (method url-fetch)
11969 (uri (pypi-uri "atomicwrites" version))
11970 (sha256
11971 (base32
11972 "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
11973 (build-system python-build-system)
11974 (arguments `(#:tests? #f)) ;avoid circular dependency with pytest
11975 (synopsis "Atomic file writes in Python")
11976 (description "Library for atomic file writes using platform dependent tools
11977 for atomic file system operations.")
11978 (home-page "https://github.com/untitaker/python-atomicwrites")
11979 (license license:expat)))
11980
11981 (define-public python2-atomicwrites
11982 (package-with-python2 python-atomicwrites))
11983
11984 (define-public python-qstylizer
11985 (package
11986 (name "python-qstylizer")
11987 (version "0.1.10")
11988 (source
11989 (origin
11990 (method git-fetch)
11991 (uri (git-reference
11992 (url "https://github.com/blambright/qstylizer")
11993 (commit version)))
11994 (file-name (git-file-name name version))
11995 (sha256
11996 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
11997 (build-system python-build-system)
11998 (arguments
11999 `(#:test-target "pytest"
12000 #:phases
12001 (modify-phases %standard-phases
12002 (add-before 'build 'set-pbr-version
12003 (lambda _
12004 (setenv "PBR_VERSION" "3.0.1"))))))
12005 (native-inputs
12006 `(("python-pbr" ,python-pbr)
12007 ("python-pytest" ,python-pytest)
12008 ("python-pytest-catchlog" ,python-pytest-catchlog)
12009 ("python-pytest-cov" ,python-pytest-cov)
12010 ("python-pytest-mock" ,python-pytest-mock)
12011 ("python-pytest-runner" ,python-pytest-runner)
12012 ("python-pytest-xdist" ,python-pytest-xdist)))
12013 (propagated-inputs
12014 `(("python-inflection" ,python-inflection)
12015 ("python-tinycss" ,python-tinycss)))
12016 (home-page "https://github.com/blambright/qstylizer")
12017 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
12018 (description "@code{qstylizer} is a Python package designed to help with
12019 the construction of PyQt/PySide stylesheets.")
12020 (license license:expat)))
12021
12022 (define-public python-click-threading
12023 (package
12024 (name "python-click-threading")
12025 (version "0.4.4")
12026 (source (origin
12027 (method url-fetch)
12028 (uri (pypi-uri "click-threading" version))
12029 (sha256
12030 (base32
12031 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
12032 (build-system python-build-system)
12033 (propagated-inputs
12034 `(("python-click" ,python-click)))
12035 (synopsis "Utilities for multithreading in Click")
12036 (description "This package provides utilities for multithreading in Click
12037 applications.")
12038 (home-page "https://github.com/click-contrib/click-threading")
12039 (license license:expat)))
12040
12041 (define-public python-click-log
12042 (package
12043 (name "python-click-log")
12044 (version "0.3.2")
12045 (source (origin
12046 (method url-fetch)
12047 (uri (pypi-uri "click-log" version))
12048 (sha256
12049 (base32
12050 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
12051 (build-system python-build-system)
12052 (propagated-inputs
12053 `(("python-click" ,python-click)))
12054 (synopsis "Logging for click applications")
12055 (description "This package provides a Python library for logging Click
12056 applications.")
12057 (home-page "https://github.com/click-contrib/click-log")
12058 (license license:expat)))
12059
12060 (define-public python-click-default-group
12061 (package
12062 (name "python-click-default-group")
12063 (version "1.2.2")
12064 (source (origin
12065 (method url-fetch)
12066 (uri (pypi-uri "click-default-group" version))
12067 (sha256
12068 (base32
12069 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
12070 (build-system python-build-system)
12071 (arguments
12072 `(#:tests? #f)) ; no target
12073 (propagated-inputs
12074 `(("python-click" ,python-click)))
12075 (synopsis "Extends click.Group")
12076 (description "This package extends click.Group to invoke a command without
12077 explicit subcommand name.")
12078 (home-page "https://github.com/click-contrib/click-default-group")
12079 (license license:bsd-3)))
12080
12081 (define-public python-structlog
12082 (package
12083 (name "python-structlog")
12084 (version "20.2.0")
12085 (source
12086 (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "structlog" version))
12089 (sha256
12090 (base32
12091 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
12092 (build-system python-build-system)
12093 (arguments
12094 `(#:phases
12095 (modify-phases %standard-phases
12096 (replace 'check
12097 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12098 (when tests?
12099 (add-installed-pythonpath inputs outputs)
12100 (invoke "pytest"))
12101 #t)))))
12102 (native-inputs
12103 `(("python-coverage" ,python-coverage)
12104 ("python-freezegun" ,python-freezegun)
12105 ("python-pretend" ,python-pretend)
12106 ("python-pytest" ,python-pytest)
12107 ("python-pytest-asyncio" ,python-pytest-asyncio)
12108 ("python-simplejson" ,python-simplejson)
12109 ("python-twisted" ,python-twisted)))
12110 (home-page "https://www.structlog.org/")
12111 (synopsis "Structured Logging for Python")
12112 (description "@code{structlog} changes logging in Python by adding structure
12113 to your log entries.")
12114 (license (list license:asl2.0 license:expat))))
12115
12116 (define-public python-apipkg
12117 (package
12118 (name "python-apipkg")
12119 (version "1.5")
12120 (source (origin
12121 (method url-fetch)
12122 (uri (pypi-uri "apipkg" version))
12123 (sha256
12124 (base32
12125 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
12126 (build-system python-build-system)
12127 (native-inputs
12128 `(("python-pytest" ,python-pytest)
12129 ("python-setuptools-scm" ,python-setuptools-scm)))
12130 (synopsis "Namespace control and lazy-import mechanism")
12131 (description "With apipkg you can control the exported namespace of a Python
12132 package and greatly reduce the number of imports for your users. It is a small
12133 pure Python module that works on virtually all Python versions.")
12134 (home-page "https://github.com/pytest-dev/apipkg")
12135 (license license:expat)))
12136
12137 (define-public python-execnet
12138 (package
12139 (name "python-execnet")
12140 (version "1.9.0")
12141 (source (origin
12142 (method url-fetch)
12143 (uri (pypi-uri "execnet" version))
12144 (sha256
12145 (base32
12146 "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
12147 (patches (search-patches "python-execnet-read-only-fix.patch"))))
12148 (build-system python-build-system)
12149 (arguments
12150 `(#:phases
12151 (modify-phases %standard-phases
12152 (replace 'check
12153 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12154 (when tests?
12155 ;; Unset PYTHONDONTWRITEBYTECODE to match the
12156 ;; expectations of a test in
12157 ;; 'testing/test_gateway.py'.
12158 (unsetenv "PYTHONDONTWRITEBYTECODE")
12159
12160 (add-installed-pythonpath inputs outputs)
12161 (invoke "pytest" "-vv")))))))
12162 (native-inputs
12163 `(("python-pytest" ,python-pytest)
12164 ("python-setuptools-scm" ,python-setuptools-scm)))
12165 (synopsis "Rapid multi-Python deployment")
12166 (description "Execnet provides a share-nothing model with
12167 channel-send/receive communication for distributing execution across many
12168 Python interpreters across version, platform and network barriers. It has a
12169 minimal and fast API targeting the following uses:
12170 @enumerate
12171 @item distribute tasks to (many) local or remote CPUs
12172 @item write and deploy hybrid multi-process applications
12173 @item write scripts to administer multiple environments
12174 @end enumerate")
12175 (home-page "https://codespeak.net/execnet/")
12176 (license license:expat)))
12177
12178 (define-public python2-execnet
12179 (package-with-python2 python-execnet))
12180
12181 (define-public python-icalendar
12182 (package
12183 (name "python-icalendar")
12184 (version "4.0.7")
12185 (source (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "icalendar" version))
12188 (sha256
12189 (base32
12190 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
12191 (build-system python-build-system)
12192 (propagated-inputs
12193 `(("python-dateutil" ,python-dateutil)
12194 ("python-pytz" ,python-pytz)))
12195 (synopsis "Python library for parsing iCalendar files")
12196 (description "The icalendar package is a parser/generator of iCalendar
12197 files for use with Python.")
12198 (home-page "https://github.com/collective/icalendar")
12199 (license license:bsd-2)))
12200
12201 (define-public python-args
12202 (package
12203 (name "python-args")
12204 (version "0.1.0")
12205 (source (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "args" version))
12208 (sha256
12209 (base32
12210 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12211 (build-system python-build-system)
12212 (home-page "https://github.com/kennethreitz/args")
12213 (synopsis "Command-line argument parser")
12214 (description
12215 "This library provides a Python module to parse command-line arguments.")
12216 (license license:bsd-3)))
12217
12218 (define-public python2-args
12219 (package-with-python2 python-args))
12220
12221 (define-public python-clint
12222 (package
12223 (name "python-clint")
12224 (version "0.5.1")
12225 (source (origin
12226 (method url-fetch)
12227 (uri (pypi-uri "clint" version))
12228 (sha256
12229 (base32
12230 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12231 (build-system python-build-system)
12232 (arguments
12233 '(#:phases
12234 (modify-phases %standard-phases
12235 (replace 'check
12236 (lambda _ (invoke "py.test" "-v"))))))
12237 (native-inputs
12238 `(("python-pytest" ,python-pytest)))
12239 (propagated-inputs
12240 `(("python-args" ,python-args)))
12241 (home-page "https://github.com/kennethreitz/clint")
12242 (synopsis "Command-line interface tools")
12243 (description
12244 "Clint is a Python module filled with a set of tools for developing
12245 command-line applications, including tools for colored and indented
12246 output, progress bar display, and pipes.")
12247 (license license:isc)))
12248
12249 (define-public python2-clint
12250 (package-with-python2 python-clint))
12251
12252 (define-public python-rply
12253 (package
12254 (name "python-rply")
12255 (version "0.7.8")
12256 (source (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "rply" version))
12259 (sha256
12260 (base32
12261 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12262 (build-system python-build-system)
12263 (propagated-inputs
12264 `(("python-appdirs" ,python-appdirs)))
12265 (home-page "https://github.com/alex/rply")
12266 (synopsis "Parser generator for Python")
12267 (description
12268 "This package provides a pure Python based parser generator, that also
12269 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12270 with a new public API, and RPython support.")
12271 (license license:bsd-3)))
12272
12273 (define-public python2-rply
12274 (package-with-python2 python-rply))
12275
12276 (define-public python-hy
12277 (package
12278 (name "python-hy")
12279 (version "0.18.0")
12280 (source (origin
12281 (method url-fetch)
12282 (uri (pypi-uri "hy" version))
12283 (sha256
12284 (base32
12285 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12286 (build-system python-build-system)
12287 (arguments
12288 '(#:phases
12289 (modify-phases %standard-phases
12290 (add-before 'install 'set-HOME
12291 (lambda _
12292 (setenv "HOME" "/tmp") #t))
12293 (replace 'check
12294 (lambda _
12295 ;; Tests require write access to HOME.
12296 (setenv "HOME" "/tmp")
12297 (invoke "nosetests"))))))
12298 (native-inputs
12299 `(("python-coverage" ,python-coverage)
12300 ("python-nose" ,python-nose)))
12301 (propagated-inputs
12302 `(("python-astor" ,python-astor)
12303 ("python-colorama" ,python-colorama)
12304 ("python-rply" ,python-rply)
12305 ("python-funcparserlib"
12306 ,python-funcparserlib)))
12307 (home-page "http://hylang.org/")
12308 (synopsis "Lisp frontend to Python")
12309 (description
12310 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12311 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12312 Python at your fingertips, in Lisp form.")
12313 (license license:expat)))
12314
12315 (define-public python-hissp
12316 (package
12317 (name "python-hissp")
12318 (version "0.2.0")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "hissp" version))
12323 (sha256
12324 (base32
12325 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12326 (build-system python-build-system)
12327 (home-page "https://github.com/gilch/hissp")
12328 (synopsis "It's Python with a Lissp")
12329 (description "Hissp is a modular Lisp implementation that compiles to a
12330 functional subset of Python—Syntactic macro metaprogramming with full access
12331 to the Python ecosystem.")
12332 (license license:asl2.0)))
12333
12334 (define-public python2-functools32
12335 (package
12336 (name "python2-functools32")
12337 (version "3.2.3-2")
12338 (source
12339 (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "functools32" version))
12342 (sha256
12343 (base32
12344 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12345 (build-system python-build-system)
12346 (arguments
12347 `(#:python ,python-2
12348 #:tests? #f)) ; no test target
12349 (home-page "https://github.com/MiCHiLU/python-functools32")
12350 (synopsis
12351 "Backport of the functools module from Python 3.2.3")
12352 (description
12353 "This package is a backport of the @code{functools} module from Python
12354 3.2.3 for use with older versions of Python and PyPy.")
12355 (license license:expat)))
12356
12357 (define-public python2-subprocess32
12358 (package
12359 (name "python2-subprocess32")
12360 (version "3.2.7")
12361 (source (origin
12362 (method url-fetch)
12363 (uri (pypi-uri "subprocess32" version))
12364 (sha256
12365 (base32
12366 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12367 (patches
12368 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12369 (build-system python-build-system)
12370 (arguments
12371 `(#:python ,python-2
12372 ;; The test suite fails with Python > 2.7.13:
12373 ;; import test.support
12374 ;; ImportError: No module named support
12375 #:tests? #f
12376 #:phases
12377 (modify-phases %standard-phases
12378 (add-after 'unpack 'patch-/bin/sh
12379 (lambda _
12380 (substitute* '("subprocess32.py"
12381 "test_subprocess32.py")
12382 (("/bin/sh") (which "sh")))
12383 #t)))))
12384 (home-page "https://github.com/google/python-subprocess32")
12385 (synopsis "Backport of the subprocess module from Python 3.2")
12386 (description
12387 "This is a backport of the @code{subprocess} standard library module
12388 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12389 new features. On POSIX systems it is guaranteed to be reliable when used
12390 in threaded applications. It includes timeout support from Python 3.3 but
12391 otherwise matches 3.2’s API.")
12392 (license license:psfl)))
12393
12394 (define-public python2-futures
12395 (package
12396 (name "python2-futures")
12397 (version "3.2.0")
12398 (source
12399 (origin
12400 (method url-fetch)
12401 (uri (pypi-uri "futures" version))
12402 (sha256
12403 (base32
12404 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12405 (build-system python-build-system)
12406 (arguments
12407 `(#:python ,python-2
12408 #:phases
12409 (modify-phases %standard-phases
12410 (replace 'check
12411 (lambda _
12412 (invoke "python" "test_futures.py")
12413 #t)))))
12414 (home-page "https://github.com/agronholm/pythonfutures")
12415 (synopsis
12416 "Backport of the concurrent.futures package from Python 3.2")
12417 (description
12418 "The concurrent.futures module provides a high-level interface for
12419 asynchronously executing callables. This package backports the
12420 concurrent.futures package from Python 3.2")
12421 (license license:bsd-3)))
12422
12423 (define-public python-promise
12424 (package
12425 (name "python-promise")
12426 (version "0.4.2")
12427 (source
12428 (origin
12429 (method url-fetch)
12430 (uri (pypi-uri "promise" version))
12431 (sha256
12432 (base32
12433 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12434 (build-system python-build-system)
12435 ;; Tests wants python-futures, which is a python2 only program, and
12436 ;; can't be found by python-promise at test time.
12437 (arguments `(#:tests? #f))
12438 (home-page "https://github.com/syrusakbary/promise")
12439 (synopsis "Promises/A+ implementation for Python")
12440 (description
12441 "Promises/A+ implementation for Python")
12442 (properties `((python2-variant . ,(delay python2-promise))))
12443 (license license:expat)))
12444
12445 (define-public python2-promise
12446 (let ((promise (package-with-python2
12447 (strip-python2-variant python-promise))))
12448 (package/inherit promise
12449 (arguments (substitute-keyword-arguments (package-arguments promise)
12450 ((#:tests? _) #t)))
12451 (native-inputs
12452 `(("python2-futures" ,python2-futures)
12453 ("python2-pytest" ,python2-pytest)
12454 ,@(package-native-inputs promise))))))
12455
12456 (define-public python-progressbar2
12457 (package
12458 (name "python-progressbar2")
12459 (version "3.51.3")
12460 (source
12461 (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "progressbar2" version))
12464 (sha256
12465 (base32
12466 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
12467 (build-system python-build-system)
12468 (propagated-inputs
12469 `(("python-six" ,python-six)
12470 ("python-utils" ,python-utils)))
12471 (native-inputs
12472 `(("python-flake8" ,python-flake8)
12473 ("python-freezegun" ,python-freezegun)
12474 ("python-pycodestyle" ,python-pycodestyle)
12475 ("python-pytest" ,python-pytest)
12476 ("python-pytest-cache" ,python-pytest-cache)
12477 ("python-pytest-cov" ,python-pytest-cov)
12478 ("python-pytest-flakes" ,python-pytest-flakes)
12479 ("python-pytest-pep8" ,python-pytest-pep8)
12480 ("python-sphinx" ,python-sphinx)))
12481 (home-page "https://github.com/WoLpH/python-progressbar")
12482 (synopsis "Text progress bar library for Python")
12483 (description
12484 "This package provides a Python progressbar library to provide
12485 visual (yet text based) progress to long running operations.")
12486 (license license:bsd-3)))
12487
12488 (define-public python-progressbar33
12489 (package
12490 (name "python-progressbar33")
12491 (version "2.4")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 (uri (pypi-uri "progressbar33" version))
12496 (sha256
12497 (base32
12498 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
12499 (build-system python-build-system)
12500 (home-page "https://github.com/germangh/python-progressbar")
12501 (synopsis "Text progress bar library for Python")
12502 (description
12503 "This package provides a text progress bar library for Python. This
12504 version only differs from the original @code{progressbar} package in that it
12505 uses relative package imports instead of absolute imports, which is necessary
12506 for the module to work under Python 3.3.")
12507 ;; Either or both of these licenses may be selected.
12508 (license (list license:lgpl2.1+ license:bsd-3))))
12509
12510 (define-public python-colorama
12511 (package
12512 (name "python-colorama")
12513 (version "0.4.4")
12514 (source
12515 (origin
12516 (method url-fetch)
12517 (uri (pypi-uri "colorama" version))
12518 (sha256
12519 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
12520 (build-system python-build-system)
12521 (synopsis "Colored terminal text rendering for Python")
12522 (description "Colorama is a Python library for rendering colored terminal
12523 text.")
12524 (home-page "https://pypi.org/project/colorama/")
12525 (license license:bsd-3)))
12526
12527 (define-public python2-colorama
12528 (package-with-python2 python-colorama))
12529
12530 (define-public python-moto
12531 (package
12532 (name "python-moto")
12533 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
12534 (version "1.3.16.dev134")
12535 (source (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "moto" version))
12538 (sha256
12539 (base32
12540 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
12541 (build-system python-build-system)
12542 (arguments
12543 `(#:phases (modify-phases %standard-phases
12544 (add-after 'unpack 'patch-hardcoded-executable-names
12545 (lambda _
12546 (substitute* "moto/batch/models.py"
12547 (("/bin/sh")
12548 (which "sh")))
12549 (substitute* (find-files "tests" "\\.py$")
12550 (("#!/bin/bash")
12551 (string-append "#!" (which "bash"))))
12552 #t))
12553 (replace 'check
12554 (lambda _
12555 (invoke "pytest" "-vv" "-m" "not network"
12556 ;; These tests require Docker.
12557 "-k" "not test_terminate_job \
12558 and not test_invoke_function_from_sqs_exception"))))))
12559 (native-inputs
12560 `(("python-flask" ,python-flask)
12561 ("python-flask-cors" ,python-flask-cors)
12562 ("python-freezegun" ,python-freezegun)
12563 ("python-parameterized" ,python-parameterized)
12564 ("python-pytest" ,python-pytest)
12565 ("python-sure" ,python-sure)))
12566 (propagated-inputs
12567 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
12568 ("python-boto" ,python-boto)
12569 ("python-boto3" ,python-boto3)
12570 ("python-botocore" ,python-botocore)
12571 ("python-cfn-lint" ,python-cfn-lint)
12572 ("python-cryptography" ,python-cryptography)
12573 ("python-dateutil" ,python-dateutil)
12574 ("python-docker" ,python-docker)
12575 ("python-idna" ,python-idna)
12576 ("python-jinja2" ,python-jinja2)
12577 ("python-jose" ,python-jose)
12578 ("python-jsondiff" ,python-jsondiff)
12579 ("python-mock" ,python-mock)
12580 ("python-pytz" ,python-pytz)
12581 ("python-pyyaml" ,python-pyyaml)
12582 ("python-requests" ,python-requests)
12583 ("python-responses" ,python-responses)
12584 ("python-six" ,python-six)
12585 ("python-sshpubkeys" ,python-sshpubkeys)
12586 ("python-werkzeug" ,python-werkzeug)
12587 ("python-xmltodict" ,python-xmltodict)))
12588 (home-page "https://github.com/spulec/moto")
12589 (synopsis "Mock out the boto library")
12590 (description
12591 "@code{moto} is a library designed to easily mock out the
12592 @code{boto} library.")
12593 (license license:asl2.0)))
12594
12595 (define-public python-rsa
12596 (package
12597 (name "python-rsa")
12598 (version "3.4.2")
12599 (source
12600 (origin
12601 (method url-fetch)
12602 (uri (pypi-uri "rsa" version))
12603 (sha256
12604 (base32
12605 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
12606 (build-system python-build-system)
12607 (propagated-inputs
12608 `(("python-pyasn1" ,python-pyasn1)))
12609 (synopsis "Pure-Python RSA implementation")
12610 (description "Python-RSA is a pure-Python RSA implementation. It supports
12611 encryption and decryption, signing and verifying signatures, and key
12612 generation according to PKCS#1 version 1.5. It can be used as a Python
12613 library as well as on the command line.")
12614 (home-page "https://stuvel.eu/rsa")
12615 (license license:asl2.0)))
12616
12617 (define-public python2-rsa
12618 (package-with-python2 python-rsa))
12619
12620 (define-public python-pluggy
12621 (package
12622 (name "python-pluggy")
12623 (version "0.13.1")
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "pluggy" version))
12628 (sha256
12629 (base32
12630 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
12631 (build-system python-build-system)
12632 (native-inputs
12633 `(("python-setuptools-scm" ,python-setuptools-scm)))
12634 (synopsis "Plugin and hook calling mechanism for Python")
12635 (description "Pluggy is an extraction of the plugin manager as used by
12636 Pytest but stripped of Pytest specific details.")
12637 (home-page "https://pypi.org/project/pluggy/")
12638 (properties `((python2-variant . ,(delay python2-pluggy))))
12639 (license license:expat)))
12640
12641 (define-public python2-pluggy
12642 (let ((base (package-with-python2 (strip-python2-variant
12643 python-pluggy))))
12644 (package/inherit
12645 base
12646 (propagated-inputs
12647 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
12648
12649 ;; This package requires python2-importlib-metadata, but that package
12650 ;; ends up needing python2-pluggy via python2-pytest, so we need this
12651 ;; variant to solve the circular dependency.
12652 (define-public python2-pluggy-bootstrap
12653 (hidden-package
12654 (package/inherit
12655 python2-pluggy
12656 (name "python2-pluggy-bootstrap")
12657 (arguments
12658 `(#:tests? #f
12659 ,@(package-arguments python2-pluggy)))
12660 (propagated-inputs
12661 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
12662
12663 (define-public python-plumbum
12664 (package
12665 (name "python-plumbum")
12666 (version "1.7.0")
12667 (source
12668 (origin
12669 (method url-fetch)
12670 (uri (pypi-uri "plumbum" version))
12671 (sha256
12672 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
12673 (build-system python-build-system)
12674 (arguments
12675 `(#:tests? #f)) ;no tests
12676 (native-inputs
12677 ;; XXX: Not actually used since there are no tests but required for
12678 ;; build.
12679 `(("python-pytest" ,python-pytest)))
12680 (home-page "https://plumbum.readthedocs.io")
12681 (synopsis "Python shell combinators library")
12682 (description
12683 "Plumbum is a library of tools for replacing shell scripts with Python
12684 code.")
12685 (license license:expat)))
12686
12687 (define-public python-deprecation
12688 (package
12689 (name "python-deprecation")
12690 (version "2.1.0")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "deprecation" version))
12695 (sha256
12696 (base32
12697 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
12698 (build-system python-build-system)
12699 (propagated-inputs
12700 `(("python-packaging" ,python-packaging)))
12701 (native-inputs
12702 `(("python-unittest2" ,python-unittest2)))
12703 (home-page "https://deprecation.readthedocs.io/")
12704 (synopsis "Python library to handle automated deprecations")
12705 (description
12706 "This is a library that enables automated deprecations. It offers the
12707 @code{deprecated()} decorator to wrap functions, providing proper warnings
12708 both in documentation and via Python’s warnings system, as well as the
12709 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
12710 that deprecated code is eventually removed.")
12711 (license license:asl2.0)))
12712
12713 (define-public python-tox
12714 (package
12715 (name "python-tox")
12716 (version "3.20.0")
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "tox" version))
12721 (sha256
12722 (base32
12723 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
12724 (build-system python-build-system)
12725 (arguments
12726 ;; FIXME: Tests require pytest-timeout, which itself requires
12727 ;; pytest>=2.8.0 for installation.
12728 '(#:tests? #f))
12729 (propagated-inputs
12730 `(("python-filelock" ,python-filelock)
12731 ("python-packaging" ,python-packaging)
12732 ("python-pluggy" ,python-pluggy)
12733 ("python-py" ,python-py)
12734 ("python-six" ,python-six)
12735 ("python-toml" ,python-toml)
12736 ("python-virtualenv" ,python-virtualenv)))
12737 (native-inputs
12738 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
12739 ("python-pytest" ,python-pytest) ; >= 2.3.5
12740 ("python-setuptools-scm" ,python-setuptools-scm)))
12741 (home-page "https://tox.readthedocs.io")
12742 (synopsis "Virtualenv-based automation of test activities")
12743 (description "Tox is a generic virtualenv management and test command line
12744 tool. It can be used to check that a package installs correctly with
12745 different Python versions and interpreters, or run tests in each type of
12746 supported environment, or act as a frontend to continuous integration
12747 servers.")
12748 (license license:expat)))
12749
12750 (define-public python-jmespath
12751 (package
12752 (name "python-jmespath")
12753 (version "0.9.4")
12754 (source
12755 (origin
12756 (method url-fetch)
12757 (uri (pypi-uri "jmespath" version))
12758 (sha256
12759 (base32
12760 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
12761 (build-system python-build-system)
12762 (native-inputs
12763 `(("python-nose" ,python-nose)))
12764 (synopsis "JSON Matching Expressions")
12765 (description "JMESPath (pronounced “james path”) is a Python library that
12766 allows one to declaratively specify how to extract elements from a JSON
12767 document.")
12768 (home-page "https://github.com/jmespath/jmespath.py")
12769 (license license:expat)))
12770
12771 (define-public python2-jmespath
12772 (package-with-python2 python-jmespath))
12773
12774 (define-public python-symengine
12775 (package
12776 (name "python-symengine")
12777 (version "0.6.1")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "symengine" version))
12782 (sha256
12783 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
12784 (build-system python-build-system)
12785 (native-inputs
12786 `(("cmake" ,cmake)
12787 ("python-cython" ,python-cython)))
12788 (inputs
12789 `(("symengine" ,symengine)))
12790 (home-page "https://github.com/symengine/symengine.py")
12791 (synopsis "Python library providing wrappers to SymEngine")
12792 (description
12793 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
12794 manipulation library.")
12795 (license license:expat)))
12796
12797 (define-public python-uncertainties
12798 (package
12799 (name "python-uncertainties")
12800 (version "3.1.5")
12801 (source
12802 (origin
12803 (method url-fetch)
12804 (uri (pypi-uri "uncertainties" version))
12805 (sha256
12806 (base32
12807 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
12808 (build-system python-build-system)
12809 ;; While there are test files, there is no "tests" directory, so the tests
12810 ;; fail.
12811 (arguments '(#:tests? #false))
12812 (propagated-inputs
12813 `(("python-future" ,python-future)))
12814 (native-inputs
12815 `(("python-nose" ,python-nose)
12816 ("python-numpy" ,python-numpy)))
12817 (home-page "https://uncertainties-python-package.readthedocs.io/")
12818 (synopsis "Calculations with uncertainties")
12819 (description
12820 "The uncertainties package transparently handles calculations with
12821 numbers with uncertainties. It can also yield the derivatives of any
12822 expression.")
12823 (license license:bsd-3)))
12824
12825 (define-public python-asteval
12826 (package
12827 (name "python-asteval")
12828 (version "0.9.23")
12829 (source
12830 (origin
12831 (method url-fetch)
12832 (uri (pypi-uri "asteval" version))
12833 (sha256
12834 (base32
12835 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
12836 (build-system python-build-system)
12837 (native-inputs
12838 `(("python-pytest" ,python-pytest)))
12839 (home-page "https://github.com/newville/asteval")
12840 (synopsis "Minimalistic evaluator of Python expressions")
12841 (description
12842 "This package provides a minimalistic evaluator of Python expression
12843 using the @code{ast} module")
12844 (license license:expat)))
12845
12846 (define-public python-lmfit
12847 (package
12848 (name "python-lmfit")
12849 (version "1.0.2")
12850 (source
12851 (origin
12852 (method url-fetch)
12853 (uri (pypi-uri "lmfit" version))
12854 (sha256
12855 (base32
12856 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
12857 (build-system python-build-system)
12858 (propagated-inputs
12859 `(("python-asteval" ,python-asteval)
12860 ("python-numpy" ,python-numpy)
12861 ("python-scipy" ,python-scipy)
12862 ("python-uncertainties" ,python-uncertainties)))
12863 (native-inputs
12864 `(("python-pytest" ,python-pytest)))
12865 (home-page "https://lmfit.github.io/lmfit-py/")
12866 (synopsis "Least-Squares minimization with bounds and constraints")
12867 (description
12868 "Lmfit provides a high-level interface to non-linear optimization and
12869 curve fitting problems for Python. It builds on and extends many of the
12870 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12871 named for) extending the Levenberg-Marquardt method from
12872 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12873 enhancements to optimization and data fitting problems.")
12874 (license license:bsd-3)))
12875
12876 (define-public python-boto
12877 (package
12878 (name "python-boto")
12879 (version "2.49.0")
12880 (source (origin
12881 (method url-fetch)
12882 (uri (pypi-uri "boto" version))
12883 (sha256
12884 (base32
12885 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12886 (build-system python-build-system)
12887 (arguments
12888 ;; XXX: This package is unmaintained and has problems with newer versions
12889 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12890 ;; subset of this library, so keep it around for now, but disable tests.
12891 '(#:tests? #f))
12892 (propagated-inputs
12893 `(("python-paramiko" ,python-paramiko)
12894 ("python-requests" ,python-requests)))
12895 (home-page "https://github.com/boto/boto")
12896 (synopsis "Python interfaces for Amazon Web Services")
12897 (description
12898 "This package provides various facilities for interacting with Amazon
12899 Web Services through Python.
12900
12901 This software is unmaintained, and new projects should use @code{boto3} instead.")
12902 (license license:expat)))
12903
12904 (define-public python-botocore
12905 ;; Note: When updating botocore, also make sure that boto3 and awscli
12906 ;; are compatible.
12907 (package
12908 (name "python-botocore")
12909 (version "1.19.22")
12910 (source
12911 (origin
12912 (method url-fetch)
12913 (uri (pypi-uri "botocore" version))
12914 (sha256
12915 (base32
12916 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12917 (build-system python-build-system)
12918 (arguments
12919 ;; FIXME: Many tests are failing.
12920 '(#:tests? #f))
12921 (propagated-inputs
12922 `(("python-dateutil" ,python-dateutil)
12923 ("python-jmespath" ,python-jmespath)
12924 ("python-urllib3" ,python-urllib3)))
12925 (home-page "https://github.com/boto/botocore")
12926 (synopsis "Low-level interface to AWS")
12927 (description "Botocore is a Python library that provides a low-level
12928 interface to the Amazon Web Services (AWS) API.")
12929 (license license:asl2.0)))
12930
12931 (define-public python2-botocore
12932 (package-with-python2 python-botocore))
12933
12934 (define-public python-boto3
12935 (package
12936 (name "python-boto3")
12937 (version "1.16.22")
12938 (home-page "https://github.com/boto/boto3")
12939 (source (origin
12940 (method git-fetch)
12941 (uri (git-reference (url home-page) (commit version)))
12942 (file-name (git-file-name name version))
12943 (sha256
12944 (base32
12945 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12946 (arguments
12947 `(#:phases
12948 (modify-phases %standard-phases
12949 (add-after 'unpack 'delete-network-tests
12950 ;; Deleting integration tests because they are trying to connect to AWS.
12951 (lambda _
12952 (delete-file-recursively "tests/integration")
12953 #t)))))
12954 (build-system python-build-system)
12955 (native-inputs
12956 `(("python-nose" ,python-nose)
12957 ("python-mock" ,python-mock)))
12958 (propagated-inputs
12959 `(("python-botocore" ,python-botocore)
12960 ("python-jmespath" ,python-jmespath)
12961 ("python-s3transfer" ,python-s3transfer)))
12962 (synopsis "AWS SDK for Python")
12963 (description
12964 "Boto3 is a Python library for writing programs that interact with
12965 @acronym{AWS,Amazon Web Services}.")
12966 (license license:asl2.0)))
12967
12968 (define-public python-pyfiglet
12969 (package
12970 (name "python-pyfiglet")
12971 (version "0.8.post1")
12972 (source
12973 (origin
12974 (method url-fetch)
12975 (uri (pypi-uri "pyfiglet" version))
12976 (sha256
12977 (base32
12978 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12979 (build-system python-build-system)
12980 (home-page "https://github.com/pwaller/pyfiglet")
12981 (synopsis "Draw ASCII art big letters in Python")
12982 (description "This module lets you draw large letter from ordinary characters
12983 in pure Python.")
12984 (license license:expat)))
12985
12986 (define-public python-xdo
12987 (package
12988 (name "python-xdo")
12989 (version "0.3")
12990 (source (origin
12991 (method url-fetch)
12992 (uri (string-append
12993 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12994 "python-xdo_" version ".orig.tar.gz"))
12995 (sha256
12996 (base32
12997 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12998 (build-system python-build-system)
12999 (arguments
13000 '(#:phases
13001 (modify-phases %standard-phases
13002 (add-before 'install 'patch-libxdo-path
13003 ;; Hardcode the path of dynamically loaded libxdo library.
13004 (lambda* (#:key inputs #:allow-other-keys)
13005 (let ((libxdo (string-append
13006 (assoc-ref inputs "xdotool")
13007 "/lib/libxdo.so")))
13008 (substitute* "xdo/_xdo.py"
13009 (("find_library\\(\"xdo\"\\)")
13010 (simple-format #f "\"~a\"" libxdo)))
13011 #t))))
13012 #:tests? #f)) ; no tests provided
13013 (propagated-inputs
13014 `(("python-six" ,python-six)))
13015 (inputs
13016 `(("xdotool" ,xdotool)
13017 ("libX11" ,libx11)))
13018 (home-page "https://tracker.debian.org/pkg/python-xdo")
13019 (synopsis "Python library for simulating X11 keyboard/mouse input")
13020 (description "Provides bindings to libxdo for manipulating X11 via simulated
13021 input. (Note that this is mostly a legacy library; you may wish to look at
13022 python-xdo for newer bindings.)")
13023 (license license:bsd-3)))
13024
13025 (define-public python2-xdo
13026 (package-with-python2 python-xdo))
13027
13028 (define-public python-mako
13029 (package
13030 (name "python-mako")
13031 (version "1.1.3")
13032 (source
13033 (origin
13034 (method url-fetch)
13035 (uri (pypi-uri "Mako" version))
13036 (sha256
13037 (base32
13038 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
13039 (build-system python-build-system)
13040 (arguments
13041 `(#:phases (modify-phases %standard-phases
13042 (replace 'check
13043 (lambda* (#:key tests? #:allow-other-keys)
13044 (if tests?
13045 (invoke "nosetests" "-v")
13046 (format #t "test suite not run~%"))
13047 #t)))))
13048 (propagated-inputs
13049 `(("python-markupsafe" ,python-markupsafe)))
13050 (native-inputs
13051 `(("python-mock" ,python-mock)
13052 ("python-nose" ,python-nose)))
13053 (home-page "https://www.makotemplates.org/")
13054 (synopsis "Templating language for Python")
13055 (description "Mako is a templating language for Python that compiles
13056 templates into Python modules.")
13057 (license license:expat)))
13058
13059 (define-public python2-mako
13060 (package-with-python2 python-mako))
13061
13062 (define-public python-waitress
13063 (package
13064 (name "python-waitress")
13065 (version "1.1.0")
13066 (source
13067 (origin
13068 (method url-fetch)
13069 (uri (pypi-uri "waitress" version))
13070 (patches (search-patches "python-waitress-fix-tests.patch"))
13071 (sha256
13072 (base32
13073 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
13074 (build-system python-build-system)
13075 (home-page "https://github.com/Pylons/waitress")
13076 (synopsis "Waitress WSGI server")
13077 (description "Waitress is meant to be a production-quality pure-Python WSGI
13078 server with very acceptable performance.")
13079 (license license:zpl2.1)))
13080
13081 (define-public python2-waitress
13082 (package-with-python2 python-waitress))
13083
13084 (define-public python-whichcraft
13085 (package
13086 (name "python-whichcraft")
13087 (version "0.6.1")
13088 (source
13089 (origin
13090 (method url-fetch)
13091 (uri (pypi-uri "whichcraft" version))
13092 (sha256
13093 (base32
13094 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
13095 (build-system python-build-system)
13096 (native-inputs
13097 `(("python-pytest" ,python-pytest)))
13098 (home-page "https://github.com/pydanny/whichcraft")
13099 (synopsis "Cross-platform cross-python shutil.which functionality")
13100 (description
13101 "This package provides a shim of the shutil.which function that's
13102 designed to work across multiple versions of Python.")
13103 (license license:bsd-3)))
13104
13105 (define-public python-cookiecutter
13106 (package
13107 (name "python-cookiecutter")
13108 (version "1.7.3")
13109 (source
13110 (origin
13111 (method url-fetch)
13112 (uri (pypi-uri "cookiecutter" version))
13113 (sha256
13114 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
13115 (build-system python-build-system)
13116 (native-inputs
13117 `(("python-freezegun" ,python-freezegun)
13118 ("python-pytest" ,python-pytest)
13119 ("python-pytest-catchlog" ,python-pytest-catchlog)
13120 ("python-pytest-cov" ,python-pytest-cov)
13121 ("python-pytest-mock" ,python-pytest-mock)))
13122 (propagated-inputs
13123 `(("python-binaryornot" ,python-binaryornot)
13124 ("python-click" ,python-click)
13125 ("python-future" ,python-future)
13126 ("python-jinja2" ,python-jinja2)
13127 ("python-jinja2-time" ,python-jinja2-time)
13128 ("python-poyo" ,python-poyo)
13129 ("python-requests" ,python-requests)
13130 ("python-slugify" ,python-slugify)
13131 ("python-text-unidecode" ,python-text-unidecode)
13132 ("python-whichcraft" ,python-whichcraft)))
13133 (home-page "https://github.com/cookiecutter/cookiecutter")
13134 (synopsis
13135 "Command-line utility that creates projects from project templates")
13136 (description
13137 "This package provides a command-line utility that creates projects from
13138 project templates, e.g. creating a Python package project from a Python package
13139 project template.")
13140 (license license:bsd-3)))
13141
13142 (define-public python-pyquery
13143 (package
13144 (name "python-pyquery")
13145 (version "1.2.17")
13146 (source
13147 (origin
13148 (method url-fetch)
13149 (uri (pypi-uri "pyquery" version))
13150 (sha256
13151 (base32
13152 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
13153 (build-system python-build-system)
13154 (native-inputs
13155 `(("python-webob" ,python-webob)
13156 ("python-webtest" ,python-webtest)))
13157 (propagated-inputs
13158 `(("python-lxml" ,python-lxml)
13159 ("python-cssselect" ,python-cssselect)))
13160 (home-page "https://github.com/gawel/pyquery")
13161 (synopsis "Make jQuery-like queries on xml documents")
13162 (description "pyquery allows you to make jQuery queries on xml documents.
13163 The API is as much as possible the similar to jQuery. pyquery uses lxml for
13164 fast xml and html manipulation.")
13165 (license license:bsd-3)))
13166
13167 (define-public python-anyjson
13168 (package
13169 (name "python-anyjson")
13170 (version "0.3.3")
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (pypi-uri "anyjson" version))
13175 (sha256
13176 (base32
13177 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
13178 (build-system python-build-system)
13179 (arguments
13180 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
13181 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
13182 ;; whatever) so this transformation needs to be done before the tests
13183 ;; can be run. Maybe we could add a build step to transform beforehand
13184 ;; but it could be annoying/difficult.
13185 ;; We can enable tests for the Python 2 version, though, and do below.
13186 #:tests? #f))
13187 (home-page "https://bitbucket.org/runeh/anyjson/")
13188 (synopsis
13189 "Wraps best available JSON implementation in a common interface")
13190 (description
13191 "Anyjson loads whichever is the fastest JSON module installed
13192 and provides a uniform API regardless of which JSON implementation is used.")
13193 (license license:bsd-3)
13194 (properties `((python2-variant . ,(delay python2-anyjson))))))
13195
13196 (define-public python2-anyjson
13197 (let ((anyjson (package-with-python2
13198 (strip-python2-variant python-anyjson))))
13199 (package/inherit anyjson
13200 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13201 #:tests? #t
13202 ,@(package-arguments anyjson)))
13203 (native-inputs `(("python2-nose" ,python2-nose))))))
13204
13205 (define-public python-amqp
13206 (package
13207 (name "python-amqp")
13208 (version "2.3.2")
13209 (source
13210 (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "amqp" version))
13213 (sha256
13214 (base32
13215 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13216 (build-system python-build-system)
13217 (native-inputs
13218 `(("python-case" ,python-case)
13219 ("python-pytest-sugar" ,python-pytest-sugar)
13220 ("python-mock" ,python-mock)))
13221 (propagated-inputs
13222 `(("python-vine" ,python-vine)))
13223 (home-page "https://github.com/celery/py-amqp")
13224 (synopsis
13225 "Low-level AMQP client for Python (fork of amqplib)")
13226 (description
13227 "This is a fork of amqplib which was originally written by Barry Pederson.
13228 It is maintained by the Celery project, and used by kombu as a pure python
13229 alternative when librabbitmq is not available.")
13230 (license license:lgpl2.1+)
13231 (properties `((python2-variant . ,(delay python2-amqp))))))
13232
13233 (define-public python2-amqp
13234 (let ((amqp (package-with-python2
13235 (strip-python2-variant python-amqp))))
13236 (package/inherit amqp
13237 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13238 ;; unmaintained. Weirdly, does not do this on the python 3
13239 ;; version?
13240 #:tests? #f
13241 ,@(package-arguments amqp))))))
13242
13243 (define-public python-txamqp
13244 (package
13245 (name "python-txamqp")
13246 (version "0.8.2")
13247 (source
13248 (origin
13249 (method url-fetch)
13250 (uri (pypi-uri "txAMQP" version))
13251 (sha256
13252 (base32
13253 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13254 (build-system python-build-system)
13255 (propagated-inputs
13256 `(("python-six" ,python-six)
13257 ("python-twisted" ,python-twisted)))
13258 (home-page "https://github.com/txamqp/txamqp")
13259 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13260 (description
13261 "This package provides a Python library for communicating with AMQP peers
13262 and brokers using the asynchronous networking framework Twisted. It contains
13263 all the necessary code to connect, send and receive messages to/from an
13264 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13265 also includes support for using Thrift RPC over AMQP in Twisted
13266 applications.")
13267 (license license:asl2.0)))
13268
13269 (define-public python2-txamqp
13270 (package-with-python2 python-txamqp))
13271
13272 (define-public python-kombu
13273 (package
13274 (name "python-kombu")
13275 (version "4.2.2")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "kombu" version))
13280 (sha256
13281 (base32
13282 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13283 (build-system python-build-system)
13284 (native-inputs
13285 `(("python-mock" ,python-mock)
13286 ("python-case" ,python-case)
13287 ("python-pyro4" ,python-pyro4)
13288 ("python-pytest-sugar" ,python-pytest-sugar)
13289 ("python-pytz" ,python-pytz)))
13290 (propagated-inputs
13291 `(("python-anyjson" ,python-anyjson)
13292 ("python-amqp" ,python-amqp)
13293 ("python-redis" ,python-redis)))
13294 (home-page "https://kombu.readthedocs.io")
13295 (synopsis "Message passing library for Python")
13296 (description "The aim of Kombu is to make messaging in Python as easy as
13297 possible by providing an idiomatic high-level interface for the AMQ protocol,
13298 and also provide proven and tested solutions to common messaging problems.
13299 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13300 message orientation, queuing, routing, reliability and security, for which the
13301 RabbitMQ messaging server is the most popular implementation.")
13302 (license license:bsd-3)
13303 (properties `((python2-variant . ,(delay python2-kombu))))))
13304
13305 (define-public python2-kombu
13306 (let ((kombu (package-with-python2
13307 (strip-python2-variant python-kombu))))
13308 (package/inherit kombu
13309 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13310 ;; It works fine on the python3 variant.
13311 #:tests? #f
13312 ,@(package-arguments kombu)))
13313 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13314 ,@(package-native-inputs kombu))))))
13315
13316 (define-public python-billiard
13317 (package
13318 (name "python-billiard")
13319 (version "3.5.0.5")
13320 (source
13321 (origin
13322 (method url-fetch)
13323 (uri (pypi-uri "billiard" version))
13324 (sha256
13325 (base32
13326 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13327 (build-system python-build-system)
13328 (native-inputs
13329 `(("python-case" ,python-case)
13330 ("python-pytest" ,python-pytest)))
13331 (home-page "https://github.com/celery/billiard")
13332 (synopsis
13333 "Python multiprocessing fork with improvements and bugfixes")
13334 (description
13335 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13336 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13337 pyprocessing package. This standalone variant is intended to be compatible with
13338 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13339 (license license:bsd-3)
13340 (properties `((python2-variant . ,(delay python2-billiard))))))
13341
13342 (define-public python2-billiard
13343 (let ((billiard (package-with-python2
13344 (strip-python2-variant python-billiard))))
13345 (package/inherit billiard
13346 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13347 ("python2-mock" ,python2-mock)
13348 ,@(package-native-inputs billiard))))))
13349
13350 (define-public python-celery
13351 (package
13352 (name "python-celery")
13353 (version "4.2.1")
13354 (source
13355 (origin
13356 (method url-fetch)
13357 (uri (pypi-uri "celery" version))
13358 (sha256
13359 (base32
13360 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13361 (build-system python-build-system)
13362 (arguments
13363 '(;; TODO The tests fail with Python 3.7
13364 ;; https://github.com/celery/celery/issues/4849
13365 #:tests? #f
13366 #:phases
13367 (modify-phases %standard-phases
13368 (add-after 'unpack 'patch-requirements
13369 (lambda _
13370 (substitute* "requirements/test.txt"
13371 (("pytest>=3\\.0,<3\\.3")
13372 "pytest>=3.0"))
13373 #t)))))
13374 (native-inputs
13375 `(("python-case" ,python-case)
13376 ("python-pytest" ,python-pytest)))
13377 (propagated-inputs
13378 `(("python-pytz" ,python-pytz)
13379 ("python-billiard" ,python-billiard)
13380 ("python-kombu" ,python-kombu)))
13381 (home-page "https://celeryproject.org")
13382 (synopsis "Distributed Task Queue")
13383 (description "Celery is an asynchronous task queue/job queue based on
13384 distributed message passing. It is focused on real-time operation, but
13385 supports scheduling as well. The execution units, called tasks, are executed
13386 concurrently on a single or more worker servers using multiprocessing,
13387 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13388 synchronously (wait until ready).")
13389 (license license:bsd-3)
13390 (properties `((python2-variant . ,(delay python2-celery))))))
13391
13392 (define-public python2-celery
13393 (let ((celery (package-with-python2
13394 (strip-python2-variant python-celery))))
13395 (package/inherit celery
13396 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13397 ("python2-mock" ,python2-mock)
13398 ,@(package-native-inputs celery))))))
13399
13400 (define-public python-translitcodec
13401 (package
13402 (name "python-translitcodec")
13403 (version "0.4.0")
13404 (source
13405 (origin
13406 (method url-fetch)
13407 (uri (pypi-uri "translitcodec" version))
13408 (sha256
13409 (base32
13410 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13411 (build-system python-build-system)
13412 (arguments
13413 `(#:tests? #f)) ; no tests provided
13414 (home-page
13415 "https://github.com/claudep/translitcodec")
13416 (synopsis
13417 "Unicode to 8-bit charset transliteration codec")
13418 (description
13419 "This package contains codecs for transliterating ISO 10646 texts into
13420 best-effort representations using smaller coded character sets (ASCII,
13421 ISO 8859, etc.).")
13422 (license license:expat)))
13423
13424 (define-public python2-translitcodec
13425 (package-with-python2 python-translitcodec))
13426
13427 (define-public python-anyqt
13428 (package
13429 (name "python-anyqt")
13430 (version "0.0.11")
13431 (source
13432 (origin
13433 (method url-fetch)
13434 (uri (pypi-uri "AnyQt" version))
13435 (sha256
13436 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13437 (build-system python-build-system)
13438 (arguments
13439 `(#:tests? #f ;there are no tests
13440 #:phases
13441 (modify-phases %standard-phases
13442 (add-after 'unpack 'delete-files
13443 ;; Delete files related to other operating systems.
13444 (lambda _
13445 (delete-file "AnyQt/QtMacExtras.py")
13446 (delete-file "AnyQt/QtWinExtras.py")
13447 #t)))))
13448 (home-page "https://github.com/ales-erjavec/anyqt")
13449 (synopsis "PyQt4/PyQt5 compatibility layer")
13450 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
13451 (license license:gpl3)))
13452
13453 (define-public python-pyqtgraph
13454 (package
13455 (name "python-pyqtgraph")
13456 (version "0.12.1")
13457 (source
13458 (origin
13459 (method url-fetch)
13460 (uri (pypi-uri "pyqtgraph" version))
13461 (sha256
13462 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
13463 (build-system python-build-system)
13464 (arguments
13465 `(#:phases
13466 (modify-phases %standard-phases
13467 (add-before 'check 'set-home-and-qpa
13468 (lambda _
13469 (setenv "HOME" "/tmp")
13470 (setenv "QT_QPA_PLATFORM" "offscreen")
13471 #t))
13472 (replace 'check
13473 (lambda* (#:key inputs outputs #:allow-other-keys)
13474 (add-installed-pythonpath inputs outputs)
13475 (invoke "pytest" "-vv" "-k"
13476 ;; These tests try to download online data.
13477 (string-append "not test_PolyLineROI"
13478 " and not test_getArrayRegion_axisorder"
13479 " and not test_getArrayRegion"
13480 " and not test_PlotCurveItem"
13481 " and not test_NonUniformImage_colormap"
13482 " and not test_NonUniformImage_lut"
13483 " and not test_ImageItem_axisorder"
13484 " and not test_ImageItem")))))))
13485 (native-inputs
13486 `(("python-pytest" ,python-pytest)
13487 ("python-pytest-cov" ,python-pytest-cov)
13488 ("python-pytest-xdist" ,python-pytest-xdist)))
13489 (inputs
13490 `(("qtbase" ,qtbase-5)))
13491 (propagated-inputs
13492 `(("python-h5py" ,python-h5py)
13493 ("python-numpy" ,python-numpy)
13494 ("python-pyopengl" ,python-pyopengl)
13495 ("python-scipy" ,python-scipy)
13496 ("python-pyqt" ,python-pyqt)))
13497 (home-page "http://www.pyqtgraph.org")
13498 (synopsis "Scientific graphics and GUI library for Python")
13499 (description
13500 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
13501 and PySide6. It is intended for use in mathematics, scientific or engineering
13502 applications.")
13503 (license license:expat)))
13504
13505 (define-public python-qasync
13506 (package
13507 (name "python-qasync")
13508 (version "0.15.0")
13509 (source
13510 (origin
13511 ;; There are no tests in the PyPI tarball.
13512 (method git-fetch)
13513 (uri (git-reference
13514 (url "https://github.com/CabbageDevelopment/qasync/")
13515 (commit (string-append "v" version))))
13516 (file-name (git-file-name name version))
13517 (sha256
13518 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
13519 (build-system python-build-system)
13520 (arguments
13521 `(#:test-target "pytest"
13522 #:phases
13523 (modify-phases %standard-phases
13524 (add-before 'check 'set-qpa
13525 (lambda _
13526 (setenv "QT_QPA_PLATFORM" "offscreen")
13527 #t)))))
13528 (native-inputs
13529 `(("python-pytest" ,python-pytest)
13530 ("python-pytest-runner" ,python-pytest-runner)))
13531 (propagated-inputs
13532 `(("python-pyqt" ,python-pyqt)))
13533 (home-page "https://github.com/CabbageDevelopment/qasync")
13534 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
13535 (description
13536 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
13537 by providing an implementation of the PEP 3156 event-loop.")
13538 (license license:bsd-2)))
13539
13540 (define-public python-editor
13541 (package
13542 (name "python-editor")
13543 (version "1.0.4")
13544 (source
13545 (origin
13546 (method url-fetch)
13547 (uri (pypi-uri "python-editor" version))
13548 (sha256
13549 (base32
13550 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
13551 (build-system python-build-system)
13552 (arguments
13553 '(#:tests? #f)) ;XXX: needs a TTY and an editor
13554 (home-page "https://github.com/fmoo/python-editor")
13555 (synopsis "Programmatically open an editor, capture the result")
13556 (description
13557 "python-editor is a library that provides the editor module for
13558 programmatically interfacing with your system's $EDITOR.")
13559 (license license:asl2.0)))
13560
13561 (define-public python2-editor
13562 (package-with-python2 python-editor))
13563
13564 (define-public python-multiprocessing-logging
13565 (package
13566 (name "python-multiprocessing-logging")
13567 (version "0.3.1")
13568 (home-page "https://github.com/jruere/multiprocessing-logging")
13569 (source (origin
13570 (method git-fetch)
13571 (uri (git-reference
13572 (url home-page)
13573 (commit (string-append "v" version))))
13574 (file-name (git-file-name name version))
13575 (sha256
13576 (base32
13577 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
13578 (build-system python-build-system)
13579 (synopsis "Manage logs from multiple processes")
13580 (description
13581 "This Python module implements a multiprocessing-aware @code{Handler}
13582 that, when set on the root @code{Logger}, will tunnel log records to the
13583 main process so that they are handled correctly.")
13584 (license license:lgpl3+)))
13585
13586 (define-public python-vobject
13587 (package
13588 (name "python-vobject")
13589 (version "0.9.6.1")
13590 (source (origin
13591 (method url-fetch)
13592 (uri (pypi-uri "vobject" version))
13593 (sha256
13594 (base32
13595 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
13596 (build-system python-build-system)
13597 (arguments
13598 '(;; The test suite relies on some non-portable Windows interfaces.
13599 #:tests? #f))
13600 (propagated-inputs
13601 `(("python-dateutil" ,python-dateutil)
13602 ("python-pyicu" ,python-pyicu)))
13603 (synopsis "Parse and generate vCard and vCalendar files")
13604 (description "Vobject is intended to be a full featured Python package for
13605 parsing and generating vCard and vCalendar files. Currently, iCalendar files
13606 are supported and well tested. vCard 3.0 files are supported, and all data
13607 should be imported, but only a few components are understood in a sophisticated
13608 way.")
13609 (home-page "https://eventable.github.io/vobject/")
13610 (license license:asl2.0)))
13611
13612 (define-public python2-vobject
13613 (package-with-python2 python-vobject))
13614
13615 (define-public python-munkres
13616 (package
13617 (name "python-munkres")
13618 (version "1.1.4")
13619 (source (origin
13620 (method url-fetch)
13621 (uri (pypi-uri "munkres" version))
13622 (sha256
13623 (base32
13624 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w"))))
13625 (build-system python-build-system)
13626 (native-inputs `(("python-pytest" ,python-pytest-6)))
13627 (home-page "https://software.clapper.org/munkres/")
13628 (synopsis "Implementation of the Munkres algorithm")
13629 (description "The Munkres module provides an implementation of the Munkres
13630 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
13631 useful for solving the Assignment Problem.")
13632 (license license:bsd-3)))
13633
13634 (define-public python2-munkres
13635 (package-with-python2 python-munkres))
13636
13637 (define-public python-whoosh
13638 (package
13639 (name "python-whoosh")
13640 (version "2.7.4")
13641 (source
13642 (origin
13643 (method url-fetch)
13644 (uri (pypi-uri "Whoosh" version))
13645 (sha256
13646 (base32
13647 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
13648 (build-system python-build-system)
13649 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
13650 (native-inputs
13651 `(("python-pytest" ,python-pytest)))
13652 (home-page "https://bitbucket.org/mchaput/whoosh")
13653 (synopsis "Full text indexing, search, and spell checking library")
13654 (description
13655 "Whoosh is a fast, pure-Python full text indexing, search, and spell
13656 checking library.")
13657 (license license:bsd-2)))
13658
13659 (define-public python2-whoosh
13660 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
13661 (package/inherit whoosh
13662 (propagated-inputs
13663 `(("python2-backport-ssl-match-hostname"
13664 ,python2-backport-ssl-match-hostname)
13665 ,@(package-propagated-inputs whoosh))))))
13666
13667 (define-public python-pathlib
13668 (package
13669 (name "python-pathlib")
13670 (version "1.0.1")
13671 (source (origin
13672 (method url-fetch)
13673 (uri (pypi-uri "pathlib" version))
13674 (sha256
13675 (base32
13676 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
13677 (build-system python-build-system)
13678 ;; The tests depend on the internal "test" module, which does not provide
13679 ;; a stable interface.
13680 (arguments `(#:tests? #f))
13681 (home-page "https://pathlib.readthedocs.org/")
13682 (synopsis "Object-oriented file system paths")
13683 (description "Pathlib offers a set of classes to handle file system paths.
13684 It offers the following advantages over using string objects:
13685
13686 @enumerate
13687 @item No more cumbersome use of os and os.path functions. Everything can
13688 be done easily through operators, attribute accesses, and method calls.
13689 @item Embodies the semantics of different path types. For example,
13690 comparing Windows paths ignores casing.
13691 @item Well-defined semantics, eliminating any inconsistencies or
13692 ambiguities (forward vs. backward slashes, etc.).
13693 @end enumerate
13694
13695 Note: In Python 3.4, pathlib is now part of the standard library. For other
13696 Python versions please consider python-pathlib2 instead, which tracks the
13697 standard library module. This module (python-pathlib) isn't maintained
13698 anymore.")
13699 (license license:expat)))
13700
13701 (define-public python2-pathlib
13702 (package-with-python2 python-pathlib))
13703
13704 (define-public python2-pathlib2
13705 (package
13706 (name "python2-pathlib2")
13707 (version "2.3.5")
13708 (source (origin
13709 (method url-fetch)
13710 (uri (pypi-uri "pathlib2" version))
13711 (sha256
13712 (base32
13713 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
13714 (build-system python-build-system)
13715 ;; We only need the the Python 2 variant, since for Python 3 our minimum
13716 ;; version is 3.4 which already includes this package as part of the
13717 ;; standard library.
13718 (arguments
13719 `(#:python ,python-2))
13720 (propagated-inputs
13721 `(("python2-scandir" ,python2-scandir)
13722 ("python2-six" ,python2-six)))
13723 (home-page "https://pypi.org/project/pathlib2/")
13724 (synopsis "Object-oriented file system paths - backport of standard
13725 pathlib module")
13726 (description "The goal of pathlib2 is to provide a backport of standard
13727 pathlib module which tracks the standard library module, so all the newest
13728 features of the standard pathlib can be used also on older Python versions.
13729
13730 Pathlib offers a set of classes to handle file system paths. It offers the
13731 following advantages over using string objects:
13732
13733 @enumerate
13734 @item No more cumbersome use of os and os.path functions. Everything can
13735 be done easily through operators, attribute accesses, and method calls.
13736 @item Embodies the semantics of different path types. For example,
13737 comparing Windows paths ignores casing.
13738 @item Well-defined semantics, eliminating any inconsistencies or
13739 ambiguities (forward vs. backward slashes, etc.).
13740 @end enumerate")
13741 (license license:expat)))
13742
13743 (define-public python2-pathlib2-bootstrap
13744 (hidden-package
13745 (package
13746 (inherit python2-pathlib2)
13747 (name "python2-pathlib2-bootstrap")
13748 (propagated-inputs
13749 `(("python2-scandir" ,python2-scandir)
13750 ("python2-six" ,python2-six-bootstrap))))))
13751
13752 (define-public python-jellyfish
13753 (package
13754 (name "python-jellyfish")
13755 (version "0.8.8")
13756 (source (origin
13757 (method url-fetch)
13758 (uri (pypi-uri "jellyfish" version))
13759 (sha256
13760 (base32
13761 "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
13762 (build-system python-build-system)
13763 (arguments
13764 `(#:tests? #f ; XXX: Tests cannot find C coded version.
13765 #:phases
13766 (modify-phases %standard-phases
13767 (replace 'check
13768 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
13769 (when tests?
13770 (add-installed-pythonpath inputs outputs)
13771 (invoke "pytest" "-vv" "jellyfish/test.py")))))))
13772 (native-inputs
13773 `(("python-pytest" ,python-pytest)))
13774 (home-page "https://github.com/jamesturk/jellyfish")
13775 (synopsis "Approximate and phonetic matching of strings")
13776 (description "Jellyfish uses a variety of string comparison and phonetic
13777 encoding algorithms to do fuzzy string matching.")
13778 (license license:bsd-2)))
13779
13780 (define-public python2-unicodecsv
13781 (package
13782 (name "python2-unicodecsv")
13783 (version "0.14.1")
13784 (source (origin
13785 (method git-fetch)
13786 ;; The test suite is not included in the PyPi release.
13787 ;; https://github.com/jdunck/python-unicodecsv/issues/19
13788 (uri (git-reference
13789 (url "https://github.com/jdunck/python-unicodecsv")
13790 (commit version)))
13791 (file-name (git-file-name name version))
13792 (sha256
13793 (base32
13794 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
13795 (build-system python-build-system)
13796 (arguments
13797 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
13798 #:python ,python-2))
13799 (native-inputs
13800 `(("python2-unittest2" ,python2-unittest2)))
13801 (home-page "https://github.com/jdunck/python-unicodecsv")
13802 (synopsis "Unicode CSV module for Python 2")
13803 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
13804 module, adding support for Unicode strings.")
13805 (license license:bsd-2)))
13806
13807 (define-public python-pdfminer-six
13808 (package
13809 (name "python-pdfminer-six")
13810 (version "20201018")
13811 ;; There are no tests in the PyPI tarball.
13812 (source
13813 (origin
13814 (method git-fetch)
13815 (uri (git-reference
13816 (url "https://github.com/pdfminer/pdfminer.six")
13817 (commit version)))
13818 (file-name (git-file-name name version))
13819 (sha256
13820 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
13821 (build-system python-build-system)
13822 (arguments
13823 `(#:phases
13824 (modify-phases %standard-phases
13825 ;; Tests write to the source tree.
13826 (add-after 'unpack 'make-git-checkout-writable
13827 (lambda _
13828 (for-each make-file-writable (find-files "."))
13829 #t))
13830 (replace 'check
13831 (lambda _
13832 (invoke "make" "test")))
13833 (add-before 'reset-gzip-timestamps 'make-files-writable
13834 (lambda* (#:key outputs #:allow-other-keys)
13835 (let ((out (assoc-ref outputs "out")))
13836 (for-each make-file-writable
13837 (find-files out "\\.gz$"))
13838 #t))))))
13839 (propagated-inputs
13840 `(("python-chardet" ,python-chardet)
13841 ("python-cryptography" ,python-cryptography)
13842 ("python-sortedcontainers" ,python-sortedcontainers)))
13843 (native-inputs
13844 `(("python-nose" ,python-nose)
13845 ("python-tox" ,python-tox)))
13846 (home-page "https://github.com/pdfminer/pdfminer.six")
13847 (synopsis "PDF parser and analyzer")
13848 (description "@code{pdfminer.six} is a community maintained fork of
13849 the original PDFMiner. It is a tool for extracting information from PDF
13850 documents. It focuses on getting and analyzing text data. Pdfminer.six
13851 extracts the text from a page directly from the sourcecode of the PDF. It
13852 can also be used to get the exact location, font or color of the text.")
13853 (license license:expat)))
13854
13855 (define-public python-rarfile
13856 (package
13857 (name "python-rarfile")
13858 (version "4.0")
13859 (source (origin
13860 (method url-fetch)
13861 (uri (pypi-uri "rarfile" version))
13862 (sha256
13863 (base32
13864 "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
13865 (build-system python-build-system)
13866 (arguments
13867 `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
13868 #:phases
13869 (modify-phases %standard-phases
13870 (add-after 'unpack 'patch
13871 (lambda* (#:key inputs #:allow-other-keys)
13872 (substitute* "rarfile.py"
13873 ;; Disable unrar and unar, which are unavailable on Guix.
13874 (("(unrar|unar)=True" all tool) (string-append tool "=False"))
13875 ;; Hardcode path to bsdtar
13876 (("\"bsdtar\"")
13877 (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
13878 #t))
13879 (replace 'check
13880 (lambda* (#:key inputs tests? #:allow-other-keys)
13881 (when tests?
13882 (invoke "pytest" "-vv")))))))
13883 (native-inputs `(("python-pytest" ,python-pytest)))
13884 (inputs `(("libarchive" ,libarchive)))
13885 (home-page "https://github.com/markokr/rarfile")
13886 (synopsis "RAR archive reader for Python")
13887 (description "This is Python module for RAR archive reading. The interface
13888 is made as zipfile like as possible.")
13889 (license license:isc)))
13890
13891 (define-public python-rich
13892 (package
13893 (name "python-rich")
13894 (version "10.2.2")
13895 (source (origin
13896 (method url-fetch)
13897 (uri (pypi-uri "rich" version))
13898 (sha256
13899 (base32
13900 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
13901 (build-system python-build-system)
13902 (arguments
13903 `(#:phases
13904 (modify-phases %standard-phases
13905 (replace 'check
13906 (lambda* (#:key inputs tests? #:allow-other-keys)
13907 (when tests?
13908 (copy-recursively (string-append
13909 (assoc-ref inputs "tests") "/tests")
13910 "tests")
13911 (invoke "python" "-m" "pytest" "-vv")))))))
13912 (propagated-inputs
13913 `(("python-attrs" ,python-attrs)
13914 ("python-colorama" ,python-colorama)
13915 ("python-commonmark" ,python-commonmark)
13916 ("python-ipywidgets" ,python-ipywidgets)
13917 ("python-pygments" ,python-pygments)
13918 ("python-typing-extensions" ,python-typing-extensions)))
13919 (native-inputs
13920 `(("python-pytest" ,python-pytest)
13921 ("tests"
13922 ;; The release on pypi comes without tests. We can't build from this
13923 ;; checkout, though, because installation requires an invocation of
13924 ;; poetry.
13925 ,(origin
13926 (method git-fetch)
13927 (uri (git-reference
13928 (url "https://github.com/willmcgugan/rich")
13929 (commit (string-append "v" version))))
13930 (file-name (git-file-name name version))
13931 (sha256
13932 (base32
13933 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
13934 (home-page "https://github.com/willmcgugan/rich")
13935 (synopsis "Render rich text and more to the terminal")
13936 (description
13937 "This is a Python package for rendering rich text, tables, progress bars,
13938 syntax highlighting, markdown and more to the terminal.")
13939 (license license:expat)))
13940
13941 (define-public python-magic
13942 (package
13943 (name "python-magic")
13944 (version "0.4.22")
13945 (home-page "https://github.com/ahupp/python-magic")
13946 (source
13947 (origin
13948 (method git-fetch)
13949 (uri (git-reference (url home-page) (commit version)))
13950 (file-name (git-file-name name version))
13951 (sha256
13952 (base32
13953 "0zbdjr5shijs0jayz7gycpx0kn6v2bh83dpanyajk2vmy47jvbd6"))))
13954 (build-system python-build-system)
13955 (arguments
13956 '(#:phases (modify-phases %standard-phases
13957 ;; Replace a specific method call with a hard-coded
13958 ;; path to the necessary libmagic.so file in the
13959 ;; store. If we don't do this, then the method call
13960 ;; will fail to find the libmagic.so file, which in
13961 ;; turn will cause any application using
13962 ;; python-magic to fail.
13963 (add-before 'build 'hard-code-path-to-libmagic
13964 (lambda* (#:key inputs #:allow-other-keys)
13965 (let ((file (assoc-ref inputs "file")))
13966 (substitute* "magic/loader.py"
13967 (("ctypes\\.util\\.find_library\\('magic'\\)")
13968 (string-append "'" file "/lib/libmagic.so'"))))))
13969 (replace 'check
13970 (lambda* (#:key tests? #:allow-other-keys)
13971 ;; The test suite mandates this variable.
13972 (setenv "LC_ALL" "en_US.UTF-8")
13973 (if tests?
13974 (invoke "python" "./test/test.py")
13975 (format #t "test suite not run~%")))))))
13976 (native-inputs
13977 `(("which" ,which)))
13978 (inputs
13979 ;; python-magic needs to be able to find libmagic.so.
13980 `(("file" ,file)))
13981 (synopsis "File type identification using libmagic")
13982 (description
13983 "This module uses ctypes to access the libmagic file type
13984 identification library. It makes use of the local magic database and
13985 supports both textual and MIME-type output. Note that this module and
13986 the python-file module both provide a \"magic.py\" file; these two
13987 modules, which are different and were developed separately, both serve
13988 the same purpose: to provide Python bindings for libmagic.")
13989 (license license:expat)))
13990
13991 (define-public python2-magic
13992 (package-with-python2 python-magic))
13993
13994 (define-public python2-s3cmd
13995 (package
13996 (name "python2-s3cmd")
13997 (version "1.6.1")
13998 (source
13999 (origin
14000 (method url-fetch)
14001 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
14002 "s3cmd-" version ".tar.gz"))
14003 (sha256
14004 (base32
14005 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
14006 (build-system python-build-system)
14007 (arguments
14008 ;; s3cmd is written for python2 only and contains no tests.
14009 `(#:python ,python-2
14010 #:tests? #f))
14011 (propagated-inputs
14012 `(("python2-dateutil" ,python2-dateutil)
14013 ;; The python-file package also provides a magic.py module.
14014 ;; This is an unfortunate state of affairs; however, s3cmd
14015 ;; fails to install if it cannot find specifically the
14016 ;; python-magic package. Thus we include it, instead of using
14017 ;; python-file. Ironically, s3cmd sometimes works better
14018 ;; without libmagic bindings at all:
14019 ;; https://github.com/s3tools/s3cmd/issues/198
14020 ("python2-magic" ,python2-magic)))
14021 (home-page "https://s3tools.org/s3cmd")
14022 (synopsis "Command line tool for S3-compatible storage services")
14023 (description
14024 "S3cmd is a command line tool for uploading, retrieving and managing data
14025 in storage services that are compatible with the Amazon Simple Storage
14026 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
14027 GnuPG encryption, and more. It also supports management of Amazon's
14028 CloudFront content delivery network.")
14029 (license license:gpl2+)))
14030
14031 (define-public python-pkgconfig
14032 (package
14033 (name "python-pkgconfig")
14034 (version "1.3.1")
14035 (source
14036 (origin
14037 (method url-fetch)
14038 (uri (pypi-uri "pkgconfig" version))
14039 (sha256
14040 (base32
14041 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
14042 (build-system python-build-system)
14043 (native-inputs
14044 `(("python-nose" ,python-nose)))
14045 (inputs
14046 `(("pkg-config" ,pkg-config)))
14047 (arguments
14048 `(#:phases
14049 (modify-phases %standard-phases
14050 (add-before 'build 'patch
14051 ;; Hard-code the path to pkg-config.
14052 (lambda _
14053 (substitute* "pkgconfig/pkgconfig.py"
14054 (("cmd = 'pkg-config")
14055 (string-append "cmd = '" (which "pkg-config"))))
14056 #t))
14057 (replace 'check
14058 (lambda _
14059 (invoke "nosetests" "test.py"))))))
14060 (home-page "https://github.com/matze/pkgconfig")
14061 (synopsis "Python interface for pkg-config")
14062 (description "This module provides a Python interface to pkg-config. It
14063 can be used to find all pkg-config packages, check if a package exists,
14064 check if a package meets certain version requirements, query CFLAGS and
14065 LDFLAGS and parse the output to build extensions with setup.py.")
14066 (license license:expat)))
14067
14068 (define-public python2-pkgconfig
14069 (package-with-python2 python-pkgconfig))
14070
14071 (define-public python-bz2file
14072 (package
14073 (name "python-bz2file")
14074 (version "0.98")
14075 (source
14076 (origin
14077 (method url-fetch)
14078 (uri (pypi-uri "bz2file" version))
14079 (sha256
14080 (base32
14081 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
14082 (build-system python-build-system)
14083 (arguments
14084 `(#:tests? #f)) ; Tests use deprecated python modules.
14085 (home-page "https://github.com/nvawda/bz2file")
14086 (synopsis "Read and write bzip2-compressed files")
14087 (description
14088 "Bz2file is a Python library for reading and writing bzip2-compressed
14089 files. It contains a drop-in replacement for the I/O interface in the
14090 standard library's @code{bz2} module, including features from the latest
14091 development version of CPython that are not available in older releases.")
14092 (license license:asl2.0)))
14093
14094 (define-public python2-bz2file
14095 (package-with-python2 python-bz2file))
14096
14097 (define-public python-future
14098 (package
14099 (name "python-future")
14100 (version "0.17.1")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (pypi-uri "future" version))
14105 (sha256
14106 (base32
14107 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
14108 (build-system python-build-system)
14109 ;; Many tests connect to the network or are otherwise flawed.
14110 ;; https://github.com/PythonCharmers/python-future/issues/210
14111 (arguments
14112 `(#:tests? #f))
14113 (home-page "https://python-future.org")
14114 (synopsis "Single-source support for Python 3 and 2")
14115 (description
14116 "@code{python-future} is the missing compatibility layer between Python 2 and
14117 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
14118 to support both Python 2 and Python 3 with minimal overhead.")
14119 (license license:expat)))
14120
14121 (define-public python2-future
14122 (package-with-python2 python-future))
14123
14124 (define-public python-cysignals
14125 (package
14126 (name "python-cysignals")
14127 (version "1.9.0")
14128 (source
14129 (origin
14130 (method url-fetch)
14131 (uri (pypi-uri "cysignals" version))
14132 (sha256
14133 (base32
14134 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
14135 (build-system python-build-system)
14136 (native-inputs
14137 `(("python-cython" ,python-cython)
14138 ("python-sphinx" ,python-sphinx)))
14139 (inputs
14140 `(("pari-gp" ,pari-gp)))
14141 (arguments
14142 `(#:modules ((guix build python-build-system)
14143 ((guix build gnu-build-system) #:prefix gnu:)
14144 (guix build utils))
14145 ;; FIXME: Tests are executed after installation and currently fail
14146 ;; when not installing into standard locations; the author is working
14147 ;; on a fix.
14148 #:tests? #f
14149 #:phases
14150 (modify-phases %standard-phases
14151 (add-before
14152 'build 'configure
14153 (assoc-ref gnu:%standard-phases 'configure)))))
14154 (home-page
14155 "https://github.com/sagemath/cysignals")
14156 (synopsis
14157 "Handling of interrupts and signals for Cython")
14158 (description
14159 "The cysignals package provides mechanisms to handle interrupts (and
14160 other signals and errors) in Cython code, using two related approaches,
14161 for mixed Cython/Python code or external C libraries and pure Cython code,
14162 respectively.")
14163 (license license:lgpl3+)))
14164
14165 (define-public python2-cysignals
14166 (package-with-python2 python-cysignals))
14167
14168 (define-public python2-shedskin
14169 (package
14170 (name "python2-shedskin")
14171 (version "0.9.4")
14172 (source
14173 (origin
14174 (method url-fetch)
14175 (uri (string-append "https://github.com/shedskin/shedskin/"
14176 "releases/download/v" version
14177 "/shedskin-" version ".tgz"))
14178 (sha256
14179 (base32
14180 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
14181 (build-system python-build-system)
14182 (arguments
14183 `(#:python ,python-2
14184 #:phases (modify-phases %standard-phases
14185 (add-after 'unpack 'fix-resulting-include-libs
14186 (lambda* (#:key inputs #:allow-other-keys)
14187 (let ((libgc (assoc-ref inputs "libgc"))
14188 (pcre (assoc-ref inputs "pcre")))
14189 (substitute* "shedskin/makefile.py"
14190 (("variable == 'CCFLAGS':[ ]*")
14191 (string-append "variable == 'CCFLAGS':\n"
14192 " line += ' -I " pcre "/include"
14193 " -I " libgc "/include'"))
14194 (("variable == 'LFLAGS':[ ]*")
14195 (string-append "variable == 'LFLAGS':\n"
14196 " line += ' -L" pcre "/lib"
14197 " -L " libgc "/lib'")))
14198 #t))))))
14199 (inputs `(("pcre" ,pcre)
14200 ("libgc" ,libgc)))
14201 (home-page "https://shedskin.github.io/")
14202 (synopsis "Experimental Python-2 to C++ Compiler")
14203 (description (string-append "This is an experimental compiler for a subset of
14204 Python. It generates C++ code and a Makefile."))
14205 (license (list license:gpl3 license:bsd-3 license:expat))))
14206
14207 (define-public python-rope
14208 (package
14209 (name "python-rope")
14210 (version "0.19.0")
14211 (source
14212 (origin
14213 (method url-fetch)
14214 (uri (pypi-uri "rope" version))
14215 (sha256
14216 (base32
14217 "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4"))))
14218 (build-system python-build-system)
14219 (home-page "https://github.com/python-rope/rope")
14220 (synopsis "Refactoring library for Python")
14221 (description "Rope is a refactoring library for Python. It facilitates
14222 the renaming, moving and extracting of attributes, functions, modules, fields
14223 and parameters in Python 2 source code. These refactorings can also be applied
14224 to occurrences in strings and comments.")
14225 (license license:lgpl3+)))
14226
14227 (define-public python-py3status
14228 (package
14229 (name "python-py3status")
14230 (version "3.21")
14231 (source
14232 (origin
14233 (method url-fetch)
14234 (uri (pypi-uri "py3status" version))
14235 (sha256
14236 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14237 (build-system python-build-system)
14238 (inputs
14239 `(("file" ,file)))
14240 (arguments
14241 '(#:phases
14242 (modify-phases %standard-phases
14243 ;; 'file' is used for detection of configuration file encoding
14244 ;; let's make link the dependency to particular input
14245 (add-before 'build 'patch-file-path
14246 (lambda* (#:key inputs #:allow-other-keys)
14247 (let ((file-path (assoc-ref inputs "file")))
14248 (substitute* "py3status/parse_config.py"
14249 (("\\[\"file\", \"-b\"")
14250 (string-append "['" file-path "/bin/file', '-b'")))
14251 #t))))
14252 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14253 (home-page "https://github.com/ultrabug/py3status")
14254 (synopsis "Extensible i3status wrapper written in Python")
14255 (description "py3status is an i3status wrapper which extends i3status
14256 functionality in a modular way, allowing you to extend your panel with your
14257 own code, responding to click events and updating clock every second.")
14258 (license license:bsd-3)))
14259
14260 (define-public python-tblib
14261 (package
14262 (name "python-tblib")
14263 (version "1.6.0")
14264 (source (origin
14265 (method url-fetch)
14266 (uri (pypi-uri "tblib" version))
14267 (sha256
14268 (base32
14269 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14270 (build-system python-build-system)
14271 (arguments
14272 `(#:phases
14273 (modify-phases %standard-phases
14274 (replace 'check
14275 (lambda _
14276 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14277 (native-inputs
14278 `(("python-pytest" ,python-pytest)
14279 ("python-six" ,python-six)))
14280 (home-page "https://github.com/ionelmc/python-tblib")
14281 (synopsis "Traceback serialization library")
14282 (description
14283 "Traceback serialization allows you to:
14284
14285 @enumerate
14286 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14287 different processes. This allows better error handling when running code over
14288 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14289
14290 @item Parse traceback strings and raise with the parsed tracebacks.
14291 @end enumerate\n")
14292 (license license:bsd-3)))
14293
14294 (define-public python2-tblib
14295 (package-with-python2 python-tblib))
14296
14297 (define-public python-greenlet
14298 (package
14299 (name "python-greenlet")
14300 (version "1.1.1")
14301 (source (origin
14302 (method url-fetch)
14303 (uri (pypi-uri "greenlet" version))
14304 (sha256
14305 (base32
14306 "10gllbrcbazxck84nr7dw3js3gq0rxrsr4kkvy5hg542rms2gwn0"))))
14307 (build-system python-build-system)
14308 (home-page "https://greenlet.readthedocs.io/")
14309 (synopsis "Lightweight in-process concurrent programming")
14310 (description
14311 "Greenlet package is a spin-off of Stackless, a version of CPython
14312 that supports micro-threads called \"tasklets\". Tasklets run
14313 pseudo-concurrently (typically in a single or a few OS-level threads) and
14314 are synchronized with data exchanges on \"channels\".")
14315 (license (list license:psfl license:expat))))
14316
14317 (define-public python-objgraph
14318 (package
14319 (name "python-objgraph")
14320 (version "3.4.1")
14321 (source
14322 (origin
14323 (method url-fetch)
14324 (uri (pypi-uri "objgraph" version))
14325 (sha256
14326 (base32
14327 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14328 (build-system python-build-system)
14329 (propagated-inputs
14330 `(("python-graphviz" ,python-graphviz)))
14331 (native-inputs
14332 `(("python-mock" ,python-mock)
14333 ("graphviz" ,graphviz)))
14334 (home-page "https://mg.pov.lt/objgraph/")
14335 (synopsis "Draw Python object reference graphs with graphviz")
14336 (description
14337 "This package provides tools to draw Python object reference graphs with
14338 graphviz.")
14339 (license license:expat)))
14340
14341 (define-public python2-objgraph
14342 (package-with-python2 python-objgraph))
14343
14344 (define-public python-gevent
14345 (package
14346 (name "python-gevent")
14347 (version "21.1.2")
14348 (source (origin
14349 (method url-fetch)
14350 (uri (pypi-uri "gevent" version))
14351 (sha256
14352 (base32
14353 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14354 (modules '((guix build utils)))
14355 (snippet
14356 '(begin
14357 ;; unbunding libev and c-ares
14358 (delete-file-recursively "deps")))))
14359 (build-system python-build-system)
14360 (arguments
14361 `(#:modules ((ice-9 ftw)
14362 (ice-9 match)
14363 (srfi srfi-26)
14364 (guix build utils)
14365 (guix build python-build-system))
14366 #:phases (modify-phases %standard-phases
14367 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14368 (lambda _
14369 (substitute* "src/gevent/subprocess.py"
14370 (("/bin/sh") (which "sh")))
14371 (for-each (lambda (file)
14372 (substitute* file
14373 (("/bin/sh") (which "sh"))
14374 (("/bin/true") (which "true"))))
14375 (find-files "src/greentest" "\\.py$"))))
14376 (add-before 'build 'do-not-use-bundled-sources
14377 (lambda _
14378 (setenv "GEVENTSETUP_EMBED" "0")
14379
14380 ;; Prevent building bundled libev.
14381 (substitute* "setup.py"
14382 (("run_make=_BUILDING")
14383 "run_make=False"))))
14384 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14385 (lambda* (#:key inputs #:allow-other-keys)
14386 (let ((greenlet (string-append
14387 (assoc-ref inputs "python-greenlet")
14388 "/include")))
14389 (match (scandir greenlet
14390 (lambda (item)
14391 (string-prefix? "python" item)))
14392 ((python)
14393 (setenv "C_INCLUDE_PATH"
14394 (string-append greenlet "/" python ":"
14395 (or (getenv "C_INCLUDE_PATH")
14396 ""))))))))
14397 (add-before 'check 'pretend-to-be-CI
14398 (lambda _
14399 ;; A few tests are skipped due to network constraints or
14400 ;; get longer timeouts when running in a CI environment.
14401 ;; Piggy-back on that, as we need the same adjustments.
14402 (setenv "TRAVIS" "1")
14403 (setenv "APPVEYOR" "1")))
14404 (add-before 'check 'adjust-tests
14405 (lambda _
14406 (let ((disabled-tests
14407 '(;; These tests relies on networking which is
14408 ;; not available in the build container.
14409 "test__getaddrinfo_import.py"
14410 "test__server_pywsgi.py"
14411 ;; XXX: These tests borrow functionality from the
14412 ;; Python builtin 'test' module, but it is not
14413 ;; installed with the Guix Python distribution.
14414 "test_smtpd.py"
14415 "test_wsgiref.py"
14416 "test_urllib2.py"
14417 "test_thread.py"
14418 "test_threading.py"
14419 "test__threading_2.py"
14420 ;; These tests rely on KeyboardInterrupts which do not
14421 ;; work inside the build container for some reason
14422 ;; (lack of controlling terminal?).
14423 "test_subprocess.py"
14424 "test__issues461_471.py"
14425 ;; TODO: Patch out the tests that use getprotobyname, etc
14426 ;; instead of disabling all the tests from these files.
14427 "test__resolver_dnspython.py"
14428 "test__doctests.py"
14429 "test__all__.py"
14430 "test___config.py"
14431 "test__execmodules.py")))
14432 (call-with-output-file "skipped_tests.txt"
14433 (lambda (port)
14434 (format port "~a~%"
14435 (string-join disabled-tests "\n")))))))
14436 (replace 'check
14437 (lambda _
14438 ;; Use the build daemons configured number of workers.
14439 (setenv "NWORKERS" (number->string (parallel-job-count)))
14440
14441 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
14442 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
14443 (propagated-inputs
14444 `(("python-greenlet" ,python-greenlet)
14445 ("python-objgraph" ,python-objgraph)
14446 ("python-zope.event" ,python-zope-event)
14447 ("python-zope.interface" ,python-zope-interface)))
14448 (native-inputs
14449 `(("python-six" ,python-six)
14450
14451 ;; For tests.
14452 ("python-dnspython" ,python-dnspython)
14453 ("python-psutil" ,python-psutil)))
14454 (inputs
14455 `(("c-ares" ,c-ares)
14456 ("libev" ,libev)))
14457 (home-page "https://www.gevent.org/")
14458 (synopsis "Coroutine-based network library")
14459 (description
14460 "@code{gevent} is a coroutine-based Python networking library that uses
14461 @code{greenlet} to provide a high-level synchronous API on top of the
14462 @code{libev} event loop.")
14463 (license license:expat)))
14464
14465 (define-public python-fastimport
14466 (package
14467 (name "python-fastimport")
14468 (version "0.9.9")
14469 (source
14470 (origin
14471 (method url-fetch)
14472 (uri (pypi-uri "fastimport" version))
14473 (sha256
14474 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
14475 (build-system python-build-system)
14476 (home-page "https://github.com/jelmer/python-fastimport")
14477 (synopsis "VCS fastimport parser and generator in Python")
14478 (description "This package provides a parser for and generator of the Git
14479 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
14480 format.")
14481 (license license:gpl2+)))
14482
14483 (define-public python-twisted
14484 (package
14485 (name "python-twisted")
14486 (version "19.7.0")
14487 (source (origin
14488 (method url-fetch)
14489 (uri (pypi-uri "Twisted" version ".tar.bz2"))
14490 (sha256
14491 (base32
14492 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
14493 (build-system python-build-system)
14494 (arguments
14495 '(#:tests? #f ; FIXME: some tests fail
14496 #:phases
14497 (modify-phases %standard-phases
14498 ;; Remove scripts, because they depend on [conch]
14499 (add-after 'unpack 'remove-entrypoint
14500 (lambda _
14501 (substitute* "src/twisted/python/_setup.py"
14502 (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
14503 (propagated-inputs
14504 `(("python-zope-interface" ,python-zope-interface)
14505 ("python-pyhamcrest" ,python-pyhamcrest)
14506 ("python-incremental" ,python-incremental)
14507 ("python-hyperlink" ,python-hyperlink)
14508 ("python-constantly" ,python-constantly)
14509 ("python-automat" ,python-automat)))
14510 (home-page "https://twistedmatrix.com/")
14511 (synopsis "Asynchronous networking framework written in Python")
14512 (description
14513 "Twisted is an extensible framework for Python programming, with special
14514 focus on event-based network programming and multiprotocol integration.")
14515 (license license:expat)))
14516
14517 (define-public python2-twisted
14518 (package-with-python2 python-twisted))
14519
14520 (define-public python-pika
14521 (package
14522 (name "python-pika")
14523 (version "1.2.0")
14524 (source
14525 (origin
14526 (method git-fetch)
14527 (uri (git-reference
14528 (url "https://github.com/pika/pika")
14529 (commit version)))
14530 (file-name (git-file-name name version))
14531 (sha256
14532 (base32
14533 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
14534 (build-system python-build-system)
14535 (arguments
14536 '(#:phases (modify-phases %standard-phases
14537 (add-before 'check 'disable-live-tests
14538 (lambda _
14539 ;; Disable tests that require RabbitMQ, which is not
14540 ;; yet available in Guix.
14541 (substitute* "setup.cfg"
14542 (("tests/unit,tests/acceptance")
14543 "tests/unit"))
14544 (with-directory-excursion "tests"
14545 (for-each delete-file
14546 '("unit/base_connection_tests.py"
14547 "unit/threaded_test_wrapper_test.py")))))
14548 (replace 'check
14549 (lambda _
14550 (invoke "nosetests"))))))
14551 (native-inputs
14552 `(("python-mock" ,python-mock)
14553 ("python-nose" ,python-nose)
14554
14555 ;; These are optional at runtime, and provided here for tests.
14556 ("python-gevent" ,python-gevent)
14557 ("python-tornado" ,python-tornado)
14558 ("python-twisted" ,python-twisted)))
14559 (home-page "https://pika.readthedocs.org")
14560 (synopsis "Pure Python AMQP Client Library")
14561 (description
14562 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
14563 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
14564 network support library.")
14565 (license license:bsd-3)))
14566
14567 (define-public python-ply
14568 (package
14569 (name "python-ply")
14570 (version "3.11")
14571 (source
14572 (origin
14573 (method url-fetch)
14574 (uri (pypi-uri "ply" version))
14575 (sha256
14576 (base32
14577 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
14578 (build-system python-build-system)
14579 (home-page "http://www.dabeaz.com/ply/")
14580 (synopsis "Python Lex & Yacc")
14581 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
14582 It uses LR parsing and does extensive error checking.")
14583 (license license:bsd-3)))
14584
14585 (define-public python-tabulate
14586 (package
14587 (name "python-tabulate")
14588 (version "0.8.9")
14589 (source (origin
14590 (method url-fetch)
14591 (uri (pypi-uri "tabulate" version))
14592 (sha256
14593 (base32
14594 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
14595 (build-system python-build-system)
14596 (arguments
14597 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
14598 ;; and the latest release is not tagged in the upstream repository.
14599 '(#:tests? #f))
14600 (home-page "https://bitbucket.org/astanin/python-tabulate")
14601 (synopsis "Pretty-print tabular data")
14602 (description
14603 "Tabulate is a library and command-line utility to pretty-print tabular
14604 data in Python.")
14605 (license license:expat)))
14606
14607 (define-public python2-tabulate
14608 (package-with-python2 python-tabulate))
14609
14610 (define-public python-kazoo
14611 (package
14612 (name "python-kazoo")
14613 (version "2.4.0")
14614 (source
14615 (origin
14616 (method url-fetch)
14617 (uri (pypi-uri "kazoo" version))
14618 (sha256
14619 (base32
14620 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
14621 (build-system python-build-system)
14622 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
14623 (propagated-inputs
14624 `(("python-six" ,python-six)))
14625 (home-page "https://kazoo.readthedocs.org")
14626 (synopsis "High-level Zookeeper client library")
14627 (description
14628 "Kazoo is a Python client library for the Apache Zookeeper distributed
14629 application service. It is designed to be easy to use and to avoid common
14630 programming errors.")
14631 (license license:asl2.0)))
14632
14633 (define-public python2-kazoo
14634 (package-with-python2 python-kazoo))
14635
14636 (define-public python-pykafka
14637 (package
14638 (name "python-pykafka")
14639 (version "2.4.0")
14640 (source (origin
14641 (method url-fetch)
14642 (uri (pypi-uri "pykafka" version))
14643 (sha256
14644 (base32
14645 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
14646 (build-system python-build-system)
14647 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
14648 (propagated-inputs
14649 `(("python-gevent" ,python-gevent)
14650 ("python-kazoo" ,python-kazoo)
14651 ("python-tabulate" ,python-tabulate)))
14652 (inputs
14653 `(("librdkafka" ,librdkafka)))
14654 (home-page "https://pykafka.readthedocs.io/")
14655 (synopsis "Apache Kafka client for Python")
14656 (description
14657 "PyKafka is a client for the Apache Kafka distributed messaging system.
14658 It includes Python implementations of Kafka producers and consumers, which
14659 are optionally backed by a C extension built on librdkafka.")
14660 (license license:asl2.0)))
14661
14662 (define-public python-wcwidth
14663 (package
14664 (name "python-wcwidth")
14665 (version "0.1.8")
14666 (source (origin
14667 (method url-fetch)
14668 (uri (pypi-uri "wcwidth" version))
14669 (sha256
14670 (base32
14671 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
14672 (build-system python-build-system)
14673 (home-page "https://github.com/jquast/wcwidth")
14674 (synopsis "Measure number of terminal column cells of wide-character codes")
14675 (description "Wcwidth measures the number of terminal column cells of
14676 wide-character codes. It is useful for those implementing a terminal emulator,
14677 or programs that carefully produce output to be interpreted by one. It is a
14678 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
14679 specified in POSIX.1-2001 and POSIX.1-2008.")
14680 (license license:expat)))
14681
14682 (define-public python2-wcwidth
14683 (package-with-python2 python-wcwidth))
14684
14685 (define-public python2-jsonrpclib
14686 (package
14687 (name "python2-jsonrpclib")
14688 (version "0.1.7")
14689 (source (origin
14690 (method url-fetch)
14691 (uri (pypi-uri "jsonrpclib" version))
14692 (sha256
14693 (base32
14694 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
14695 (build-system python-build-system)
14696 (arguments
14697 `(#:tests? #f
14698 #:python ,python-2))
14699 (home-page "https://github.com/joshmarshall/jsonrpclib/")
14700 (synopsis "Implementation of JSON-RPC specification for Python")
14701 (description
14702 "This library is an implementation of the JSON-RPC specification.
14703 It supports both the original 1.0 specification, as well as the
14704 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
14705 etc.")
14706 (license license:asl2.0)))
14707
14708 (define-public python-chai
14709 (package
14710 (name "python-chai")
14711 (version "1.1.2")
14712 (source (origin
14713 (method url-fetch)
14714 (uri (pypi-uri "chai" version))
14715 (sha256
14716 (base32
14717 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
14718 (patches (search-patches "python-chai-drop-python2.patch"))))
14719 (build-system python-build-system)
14720 (home-page "https://github.com/agoragames/chai")
14721 (synopsis "Mocking framework for Python")
14722 (description
14723 "Chai provides an api for mocking, stubbing and spying your python
14724 objects, patterned after the Mocha library for Ruby.")
14725 (license license:bsd-3)))
14726
14727 (define-public python-inflection
14728 (package
14729 (name "python-inflection")
14730 (version "0.3.1")
14731 (source
14732 (origin (method url-fetch)
14733 (uri (pypi-uri "inflection" version))
14734 (sha256
14735 (base32
14736 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
14737 (build-system python-build-system)
14738 (native-inputs
14739 `(("python-pytest" ,python-pytest)))
14740 (home-page "https://github.com/jpvanhal/inflection")
14741 (synopsis "Python string transformation library")
14742 (description
14743 "Inflection is a string transformation library. It singularizes
14744 and pluralizes English words, and transforms strings from CamelCase to
14745 underscored string.")
14746 (license license:expat)))
14747
14748 (define-public python2-inflection
14749 (package-with-python2 python-inflection))
14750
14751 (define-public python-pylev
14752 (package
14753 (name "python-pylev")
14754 (version "1.3.0")
14755 (source (origin
14756 (method url-fetch)
14757 (uri (pypi-uri "pylev" version))
14758 (sha256
14759 (base32
14760 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
14761 (build-system python-build-system)
14762 (home-page "https://github.com/toastdriven/pylev")
14763 (synopsis "Levenshtein distance implementation in Python")
14764 (description "Pure Python Levenshtein implementation, based off the
14765 Wikipedia code samples at
14766 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
14767 (license license:bsd-3)))
14768
14769 (define-public python2-pylev
14770 (package-with-python2 python-pylev))
14771
14772 (define-public python-cleo
14773 (package
14774 (name "python-cleo")
14775 (version "0.8.1")
14776 (source (origin
14777 (method url-fetch)
14778 (uri (pypi-uri "cleo" version))
14779 (sha256
14780 (base32
14781 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
14782 (build-system python-build-system)
14783 (native-inputs
14784 `( ;; For testing
14785 ("python-mock" ,python-mock)
14786 ("python-pytest-mock" ,python-pytest-mock)
14787 ("python-pytest" ,python-pytest)))
14788 (propagated-inputs
14789 `(("python-backpack" ,python-backpack)
14790 ("python-clikit" ,python-clikit)
14791 ("python-pastel" ,python-pastel)
14792 ("python-pylev" ,python-pylev)))
14793 (home-page "https://github.com/sdispater/cleo")
14794 (synopsis "Command-line arguments library for Python")
14795 (description
14796 "Cleo allows you to create command-line commands with signature in
14797 docstring and colored output.")
14798 (license license:expat)))
14799
14800 (define-public python2-cleo
14801 (package-with-python2 python-cleo))
14802
14803 (define-public python-tomlkit
14804 (package
14805 (name "python-tomlkit")
14806 (version "0.7.0")
14807 (source
14808 (origin
14809 (method url-fetch)
14810 (uri (pypi-uri "tomlkit" version))
14811 (sha256
14812 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
14813 (build-system python-build-system)
14814 (native-inputs
14815 `(("python-pytest" ,python-pytest)
14816 ("python-pyyaml" ,python-pyyaml)))
14817 (home-page "https://github.com/sdispater/tomlkit")
14818 (synopsis "Style-preserving TOML library")
14819 (description
14820 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
14821 preserves all comments, indentations, whitespace and internal element ordering,
14822 and makes them accessible and editable via an intuitive API. It can also
14823 create new TOML documents from scratch using the provided helpers. Part of the
14824 implementation has been adapted, improved, and fixed from Molten.")
14825 (license license:expat)))
14826
14827 (define-public python-shellingham
14828 (package
14829 (name "python-shellingham")
14830 (version "1.3.2")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "shellingham" version))
14835 (sha256
14836 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
14837 (build-system python-build-system)
14838 (arguments
14839 `(#:phases
14840 (modify-phases %standard-phases
14841 (add-after 'unpack 'restore-setup.py
14842 ;; setup.py will return in the next release.
14843 ;; <https://github.com/sarugaku/shellingham/issues/33>
14844 (lambda _
14845 (with-output-to-file "setup.py"
14846 (lambda _
14847 (display "from setuptools import setup\nsetup()\n")))
14848 #t)))))
14849 (home-page "https://github.com/sarugaku/shellingham")
14850 (synopsis "Tool to detect surrounding shell")
14851 (description
14852 "Shellingham detects what shell the current Python executable is
14853 running in.")
14854 (license license:isc)))
14855
14856 (define-public python-memcached
14857 (package
14858 (name "python-memcached")
14859 (version "1.59")
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "python-memcached" version))
14864 (sha256
14865 (base32
14866 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
14867 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
14868 (build-system python-build-system)
14869 (propagated-inputs `(("python-six" ,python-six)))
14870 (home-page
14871 "https://github.com/linsomniac/python-memcached")
14872 (synopsis "Pure python memcached client")
14873 (description
14874 "This software is a pure Python interface to the memcached memory cache
14875 daemon. It is the client side software which allows storing values in one or
14876 more, possibly remote, memcached servers.")
14877 (license license:psfl)))
14878
14879 (define-public python-clikit
14880 (package
14881 (name "python-clikit")
14882 (version "0.6.2")
14883 (source
14884 (origin
14885 (method url-fetch)
14886 (uri (pypi-uri "clikit" version))
14887 (sha256
14888 (base32
14889 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
14890 (build-system python-build-system)
14891 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
14892 (propagated-inputs
14893 `(("python-crashtest" ,python-crashtest)
14894 ("python-pastel" ,python-pastel)
14895 ("python-pylev" ,python-pylev)))
14896 (home-page "https://github.com/sdispater/clikit")
14897 (synopsis "Group of utilities to build command line interfaces")
14898 (description
14899 "CliKit is a group of utilities to build testable command line
14900 interfaces.")
14901 (properties `((python2-variant . ,(delay python2-clikit))))
14902 (license license:expat)))
14903
14904 (define-public python2-clikit
14905 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
14906 (package/inherit
14907 base
14908 (propagated-inputs
14909 `(("python-enum34" ,python2-enum34)
14910 ("python-typing" ,python2-typing)
14911 ,@(package-propagated-inputs base))))))
14912
14913 (define-public python-msgpack-python
14914 (package
14915 (name "python-msgpack-python")
14916 (version "0.5.6")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "msgpack-python" version))
14921 (sha256
14922 (base32
14923 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
14924 (build-system python-build-system)
14925 (home-page "https://msgpack.org/")
14926 (synopsis "Package to deserialize messages in MessagePack binary format")
14927 (description
14928 "MessagePack is an efficient binary serialization format. It lets you
14929 exchange data among multiple languages like JSON. But it's faster and
14930 smaller. Small integers are encoded into a single byte, and typical short
14931 strings require only one extra byte in addition to the strings themselves.")
14932 (license license:asl2.0)))
14933
14934 (define-public python-cachy
14935 (package
14936 (name "python-cachy")
14937 (version "0.3.0")
14938 (source
14939 (origin
14940 (method url-fetch)
14941 (uri (pypi-uri "cachy" version))
14942 (sha256
14943 (base32
14944 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
14945 (build-system python-build-system)
14946 (arguments
14947 '(#:phases
14948 (modify-phases %standard-phases
14949 (replace 'check
14950 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
14951 "pytest"))))))
14952 (native-inputs
14953 `(("memcached" ,memcached)
14954 ("python-fakeredis" ,python-fakeredis)
14955 ("python-flexmock" ,python-flexmock)
14956 ("python-pifpaf" ,python-pifpaf)
14957 ("python-pytest" ,python-pytest)))
14958 (propagated-inputs
14959 `(("python-memcached" ,python-memcached)
14960 ("python-msgpack-python" ,python-msgpack-python)
14961 ("python-redis" ,python-redis)))
14962 (home-page "https://github.com/sdispater/cachy")
14963 (synopsis "Simple yet effective caching library")
14964 (description
14965 "Cachy provides a simple yet effective caching library. A simple but
14966 powerful API: thread-safety; decorator syntax; support for memcached, redis,
14967 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
14968 (license license:expat)))
14969
14970 (define-public poetry
14971 (package
14972 (name "poetry")
14973 (version "1.1.5")
14974 ;; Poetry can only be built from source with Poetry.
14975 (source
14976 (origin
14977 (method url-fetch)
14978 (uri (pypi-uri "poetry" version))
14979 (sha256
14980 (base32
14981 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
14982 (build-system python-build-system)
14983 (arguments
14984 `(#:tests? #f ;; Pypi does not have tests.
14985 #:phases
14986 (modify-phases %standard-phases
14987 (add-before 'build 'patch-setup-py
14988 (lambda _
14989 (substitute* "setup.py"
14990 ;; Allow newer versions of python-keyring.
14991 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
14992 ;; TODO: remove after the next release cycle,
14993 ;; when packaging has been updated.
14994 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
14995 #t)))))
14996 (propagated-inputs
14997 `(("python-cachecontrol" ,python-cachecontrol)
14998 ("python-cachy" ,python-cachy)
14999 ("python-cleo" ,python-cleo)
15000 ("python-clikit" ,python-clikit)
15001 ("python-html5lib" ,python-html5lib)
15002 ("python-keyring" ,python-keyring)
15003 ("python-msgpack-transitional" ,python-msgpack-transitional)
15004 ("python-packaging" ,python-packaging)
15005 ("python-pexpect" ,python-pexpect)
15006 ("python-pip" ,python-pip)
15007 ("python-pkginfo" ,python-pkginfo)
15008 ("python-poetry-core" ,python-poetry-core)
15009 ("python-requests" ,python-requests)
15010 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
15011 ("python-shellingham" ,python-shellingham)
15012 ("python-tomlkit" ,python-tomlkit)
15013 ("python-virtualenv" ,python-virtualenv)))
15014 (home-page "https://python-poetry.org")
15015 (synopsis "Python dependency management and packaging made easy")
15016 (description "Poetry is a tool for dependency management and packaging
15017 in Python. It allows you to declare the libraries your project depends on and
15018 it will manage (install/update) them for you.")
15019 (license license:expat)))
15020
15021 (define-public python-lark-parser
15022 (package
15023 (name "python-lark-parser")
15024 (version "0.9.0")
15025 (source (origin
15026 (method url-fetch)
15027 (uri (pypi-uri "lark-parser" version))
15028 (sha256
15029 (base32
15030 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
15031 (build-system python-build-system)
15032 (home-page "https://github.com/lark-parser/lark")
15033 (synopsis "Multi-language parser for Python")
15034 (description
15035 "Lark is a parser built with a focus on ergonomics, performance and
15036 resilience. Lark can parse all context-free languages. That means it is
15037 capable of parsing almost any programming language out there, and to
15038 some degree most natural languages too.")
15039 (license license:expat)))
15040
15041 (define-public python-libcst
15042 (package
15043 (name "python-libcst")
15044 (version "0.3.8")
15045 (source (origin
15046 (method url-fetch)
15047 (uri (pypi-uri "libcst" version))
15048 (sha256
15049 (base32
15050 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
15051 (build-system python-build-system)
15052 (arguments
15053 `(#:phases
15054 (modify-phases %standard-phases
15055 (add-after 'unpack 'remove-failing-tests
15056 (lambda _
15057 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
15058 (delete-file "libcst/tests/test_fuzz.py")
15059 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
15060 (delete-file "libcst/tests/test_pyre_integration.py")
15061 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
15062 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
15063 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
15064 (add-before 'check 'generate-test-data
15065 (lambda _
15066 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
15067 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
15068 (replace 'check
15069 (lambda* (#:key tests? #:allow-other-keys)
15070 (when tests?
15071 (invoke "python" "-m" "unittest")))))))
15072 (native-inputs
15073 `(("python-black" ,python-black)
15074 ("python-isort" ,python-isort)))
15075 (propagated-inputs
15076 `(("python-typing-extensions" ,python-typing-extensions)
15077 ("python-typing-inspect" ,python-typing-inspect)
15078 ("python-pyyaml" ,python-pyyaml)))
15079 (home-page "https://github.com/Instagram/LibCST")
15080 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
15081 (description
15082 "LibCST parses Python source code as a CST tree that keeps all
15083 formatting details (comments, whitespaces, parentheses, etc). It's useful
15084 for building automated refactoring (codemod) applications and linters.
15085 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
15086 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
15087 naming node types and fields, LibCST creates a lossless CST that looks and
15088 feels like an AST.")
15089 (license (list license:expat
15090 ;; Some files unde libcst/_parser/ are under Python Software
15091 ;; Foundation license (see LICENSE file for details)
15092 license:psfl
15093 ;; libcst/_add_slots.py
15094 license:asl2.0))))
15095
15096 (define-public python-libcst-minimal
15097 (hidden-package
15098 (package
15099 (inherit python-libcst)
15100 (name "python-libcst-minimal")
15101 (arguments '(#:tests? #f))
15102 (native-inputs '()))))
15103
15104 (define-public python-typing-inspect
15105 (package
15106 (name "python-typing-inspect")
15107 (version "0.6.0")
15108 (source (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "typing_inspect" version))
15111 (sha256
15112 (base32
15113 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
15114 (patches (search-patches "python-typing-inspect-fix.patch"))))
15115 (build-system python-build-system)
15116 (propagated-inputs
15117 `(("python-mypy-extensions" ,python-mypy-extensions)
15118 ("python-typing-extensions" ,python-typing-extensions)))
15119 (home-page "https://github.com/ilevkivskyi/typing_inspect")
15120 (synopsis "API for inspection of types in the Python @code{typing} module")
15121 (description
15122 "The @code{typing_inspect} module defines experimental API for runtime
15123 inspection of types defined in the Python standard typing module.")
15124 (license license:expat)))
15125
15126 (define-public python-lazy-object-proxy
15127 (package
15128 (name "python-lazy-object-proxy")
15129 (version "1.5.1")
15130 (source (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "lazy-object-proxy" version))
15133 (sha256
15134 (base32
15135 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
15136 (native-inputs
15137 `(("python-setuptools-scm" ,python-setuptools-scm)))
15138 (build-system python-build-system)
15139 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
15140 (synopsis "Lazy object proxy for python")
15141 (description
15142 "Lazy object proxy is an object that wraps a callable but defers the call
15143 until the object is actually required, and caches the result of said call.")
15144 (license license:bsd-2)))
15145
15146 (define-public python2-lazy-object-proxy
15147 (package-with-python2 python-lazy-object-proxy))
15148
15149 (define-public python-dnspython
15150 (package
15151 (name "python-dnspython")
15152 (version "2.1.0")
15153 (source (origin
15154 (method url-fetch)
15155 (uri (pypi-uri "dnspython" version ".zip"))
15156 (sha256
15157 (base32
15158 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15159 (build-system python-build-system)
15160 (native-inputs `(("unzip" ,unzip)))
15161 (arguments '(#:tests? #f)) ; XXX: requires internet access
15162 (home-page "https://www.dnspython.org")
15163 (synopsis "DNS toolkit for Python")
15164 (description
15165 "dnspython is a DNS toolkit for Python. It supports almost all record
15166 types. It can be used for queries, zone transfers, and dynamic updates.
15167 It supports TSIG authenticated messages and EDNS0.")
15168 (license license:expat)))
15169
15170 (define-public python-dnspython-1.16
15171 (package
15172 (inherit python-dnspython)
15173 (version "1.16.0")
15174 (source (origin
15175 (method url-fetch)
15176 (uri (string-append "http://www.dnspython.org/kits/"
15177 version "/dnspython-" version ".tar.gz"))
15178 (sha256
15179 (base32
15180 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15181 (native-inputs '())))
15182
15183 (define-public python2-dnspython-1.16
15184 (package-with-python2 python-dnspython-1.16))
15185
15186 (define-public python-py3dns
15187 (package
15188 (name "python-py3dns")
15189 (version "3.2.1")
15190 (source
15191 (origin
15192 (method url-fetch)
15193 (uri (pypi-uri "py3dns" version))
15194 (sha256
15195 (base32
15196 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15197 (build-system python-build-system)
15198 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15199 ;; removing functionality so we copy from Nix and "just don't build it".
15200 (arguments
15201 `(#:phases
15202 (modify-phases %standard-phases
15203 (add-after 'unpack 'patch-source
15204 (lambda _
15205 (substitute* "setup.py"
15206 (("import DNS") "")
15207 (("DNS.__version__") (string-append "\"" ,version "\"")))
15208 #t)))
15209 #:tests? #f)) ; Also skip the tests.
15210 (home-page "https://launchpad.net/py3dns")
15211 (synopsis "Python 3 DNS library")
15212 (description "This Python 3 module provides a DNS API for looking up DNS
15213 entries from within Python 3 modules and applications. This module is a
15214 simple, lightweight implementation.")
15215 (license license:psfl)))
15216
15217 (define-public python-email-validator
15218 (package
15219 (name "python-email-validator")
15220 (version "1.0.2")
15221 (source
15222 (origin (method url-fetch)
15223 (uri (pypi-uri "email_validator" version))
15224 (sha256
15225 (base32
15226 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15227 (build-system python-build-system)
15228 (arguments
15229 '(#:phases
15230 (modify-phases %standard-phases
15231 (add-before 'build 'use-dnspython
15232 (lambda _
15233 (substitute* "setup.py"
15234 (("dnspython3") "dnspython"))
15235 #t)))))
15236 (propagated-inputs
15237 `(("python-dnspython" ,python-dnspython)
15238 ("python-idna" ,python-idna)))
15239 (home-page "https://github.com/JoshData/python-email-validator")
15240 (synopsis "Email address validation library for Python")
15241 (description
15242 "This library validates email address syntax and deliverability.")
15243 (license license:cc0)))
15244
15245 (define-public python2-email-validator
15246 (package-with-python2 python-email-validator))
15247
15248 (define-public python-ukpostcodeparser
15249 (package
15250 (name "python-ukpostcodeparser")
15251 (version "1.0.3")
15252 (source (origin
15253 (method url-fetch)
15254 (uri (pypi-uri "UkPostcodeParser" version))
15255 (sha256
15256 (base32
15257 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
15258 (build-system python-build-system)
15259 (home-page "https://github.com/hamstah/ukpostcodeparser")
15260 (synopsis "UK Postcode parser for Python")
15261 (description
15262 "This library provides the @code{parse_uk_postcode} function for
15263 parsing UK postcodes.")
15264 (license license:expat)))
15265
15266 (define-public python2-ukpostcodeparser
15267 (package-with-python2 python-ukpostcodeparser))
15268
15269 (define-public python-faker
15270 (package
15271 (name "python-faker")
15272 (version "8.12.1")
15273 (source (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "Faker" version))
15276 (sha256
15277 (base32
15278 "1f95g8adzdh97cbfq7j3482iy4yskbahhjma2cm2mrhrdmi5j241"))))
15279 (build-system python-build-system)
15280 (arguments
15281 '(#:phases
15282 (modify-phases %standard-phases
15283 (replace 'check
15284 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15285 (native-inputs
15286 `(;; For testing
15287 ("python-freezegun" ,python-freezegun)
15288 ("python-pytest" ,python-pytest)
15289 ("python-random2" ,python-random2)
15290 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15291 ("python-validators" ,python-validators)))
15292 (propagated-inputs
15293 `(("python-dateutil" ,python-dateutil)
15294 ("python-text-unidecode" ,python-text-unidecode)))
15295 (home-page "https://github.com/joke2k/faker")
15296 (synopsis "Python package that generates fake data")
15297 (description
15298 "Faker is a Python package that generates fake data such as names,
15299 addresses, and phone numbers.")
15300 (license license:expat)
15301 (properties `((python2-variant . ,(delay python2-faker))))))
15302
15303 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15304 (define-public python2-faker
15305 (let ((base (package-with-python2 (strip-python2-variant
15306 python-faker))))
15307 (package
15308 (inherit base)
15309 (version "3.0.1")
15310 (source (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "Faker" version))
15313 (sha256
15314 (base32
15315 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15316 (native-inputs
15317 `(("python-mock" ,python2-mock)
15318 ,@(package-native-inputs base)))
15319 (propagated-inputs
15320 `(("python2-ipaddress" ,python2-ipaddress)
15321 ("python2-six" ,python2-six)
15322 ,@(package-propagated-inputs base))))))
15323
15324 (define-public python-pyaml
15325 (package
15326 (name "python-pyaml")
15327 (version "18.11.0")
15328 (source (origin
15329 (method url-fetch)
15330 (uri (pypi-uri "pyaml" version))
15331 (sha256
15332 (base32
15333 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15334 (build-system python-build-system)
15335 (native-inputs
15336 `(("python-unidecode" ,python-unidecode)))
15337 (propagated-inputs
15338 `(("python-pyyaml" ,python-pyyaml)))
15339 (home-page "https://github.com/mk-fg/pretty-yaml")
15340 (synopsis "YAML pretty-print library for Python")
15341 (description
15342 "pyaml is a PyYAML based python module to produce pretty and readable
15343 YAML-serialized data.")
15344 (license license:wtfpl2)))
15345
15346 (define-public python2-pyaml
15347 (package-with-python2 python-pyaml))
15348
15349 (define-public python-backpack
15350 (package
15351 (name "python-backpack")
15352 (version "0.1")
15353 (source
15354 (origin
15355 (method url-fetch)
15356 (uri (pypi-uri "backpack" version))
15357 (sha256
15358 (base32
15359 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15360 (build-system python-build-system)
15361 (native-inputs
15362 `(("python-pytest" ,python-pytest)
15363 ("python-nose" ,python-nose)
15364 ("python-toml" ,python-toml)))
15365 (propagated-inputs
15366 `(("python-simplejson" ,python-simplejson)))
15367 (home-page "https://github.com/sdispater/backpack")
15368 (synopsis "Utilities for working with Python collections")
15369 (description "Backpack provides some useful utilities for working with
15370 collections of data.")
15371 (license license:expat)))
15372
15373 (define-public python2-backpack
15374 (package-with-python2 python-backpack))
15375
15376 (define-public python-prompt-toolkit
15377 (package
15378 (name "python-prompt-toolkit")
15379 (version "3.0.18")
15380 (source
15381 (origin
15382 (method url-fetch)
15383 (uri (pypi-uri "prompt_toolkit" version))
15384 (sha256
15385 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15386 (build-system python-build-system)
15387 (arguments
15388 `(#:phases
15389 (modify-phases %standard-phases
15390 (delete 'check)
15391 (add-after 'install 'post-install-check
15392 (lambda* (#:key inputs outputs #:allow-other-keys)
15393 ;; HOME is needed for the test
15394 ;; "test_pathcompleter_can_expanduser".
15395 (setenv "HOME" "/tmp")
15396 (add-installed-pythonpath inputs outputs)
15397 (invoke "py.test"))))))
15398 (propagated-inputs
15399 `(("python-wcwidth" ,python-wcwidth)))
15400 (native-inputs
15401 `(("python-pytest" ,python-pytest)))
15402 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
15403 (synopsis "Library for building command line interfaces in Python")
15404 (description
15405 "Prompt-Toolkit is a library for building interactive command line
15406 interfaces in Python. It's like GNU Readline but it also features syntax
15407 highlighting while typing, out-of-the-box multi-line input editing, advanced
15408 code completion, incremental search, support for Chinese double-width
15409 characters, mouse support, and auto suggestions.")
15410 (license license:bsd-3)
15411 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
15412
15413 (define-public python-prompt-toolkit-2
15414 (package (inherit python-prompt-toolkit)
15415 (name "python-prompt-toolkit")
15416 (version "2.0.7")
15417 (source
15418 (origin
15419 (method url-fetch)
15420 (uri (pypi-uri "prompt_toolkit" version))
15421 (sha256
15422 (base32
15423 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
15424 (propagated-inputs
15425 `(("python-wcwidth" ,python-wcwidth)
15426 ("python-six" ,python-six)
15427 ("python-pygments" ,python-pygments)))
15428 (properties '())))
15429
15430 (define-public python2-prompt-toolkit
15431 (package-with-python2 python-prompt-toolkit-2))
15432
15433 (define-public python-prompt-toolkit-1
15434 (package (inherit python-prompt-toolkit-2)
15435 (version "1.0.15")
15436 (source
15437 (origin
15438 (method url-fetch)
15439 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
15440 (sha256
15441 (base32
15442 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
15443
15444 (define-public python2-prompt-toolkit-1
15445 (package-with-python2 python-prompt-toolkit-1))
15446
15447 (define-public python-jedi
15448 ;; The 0.18.0 release tests do not work with Python 3.9.6. Use a more
15449 ;; recent commit.
15450 (let ((commit "1d944943c311b2d71655432f8870d68b2cf7d44b")
15451 (revision "1"))
15452 (package
15453 (name "python-jedi")
15454 (version
15455 (git-version "0.18.0" revision commit))
15456 (source
15457 (origin
15458 (method git-fetch)
15459 (uri (git-reference
15460 (url "https://github.com/davidhalter/jedi")
15461 (commit commit)))
15462 (file-name (git-file-name name version))
15463 (sha256
15464 (base32
15465 "052szkbv2pf9hy21any6zb4dhx3c5w1v6b9hn5grlc84zfm350vq"))))
15466 (build-system python-build-system)
15467 (arguments
15468 `(#:phases
15469 (modify-phases %standard-phases
15470 (add-after 'unpack 'unpack-submodule-sources
15471 (lambda* (#:key inputs #:allow-other-keys)
15472 (copy-recursively (assoc-ref inputs "python-django-stubs")
15473 "jedi/third_party/django-stubs")
15474 (copy-recursively (assoc-ref inputs "python-typeshed")
15475 "jedi/third_party/typeshed")
15476 #t))
15477 (replace 'check
15478 (lambda* (#:key tests? #:allow-other-keys)
15479 (when tests?
15480 (setenv "HOME" "/tmp")
15481 ;; Disable the pytest tests that fail with pytest 6. See:
15482 ;; https://github.com/davidhalter/jedi/issues/1660.
15483 (invoke "pytest" "-vv" "-k"
15484 "not test_completion[pytest"))
15485 #t)))))
15486 (native-inputs
15487 `(("python-pytest" ,python-pytest)
15488 ("python-docopt" ,python-docopt)
15489 ("python-django-stubs"
15490 ,(origin
15491 (method git-fetch)
15492 (uri (git-reference
15493 (url "https://github.com/davidhalter/django-stubs")
15494 (commit "3d2534ea8d8300c4c9db8f18e300355d5fd5488b")))
15495 (file-name "django-stubs-checkout")
15496 (sha256
15497 (base32 "1fpvn4lcqkd2q18z29rcnwakm649fccw2k6jik5d64j7p6xns08r"))))
15498 ("python-typeshed"
15499 ,(origin
15500 (method git-fetch)
15501 (uri (git-reference
15502 (url "https://github.com/davidhalter/typeshed")
15503 (commit "ae9d4f4b21bb5e1239816c301da7b1ea904b44c3")))
15504 (file-name "typeshed-checkout")
15505 (sha256
15506 (base32 "02xdip4amj0a7z9xph2mj46x1k55bjxl8d0gkpy25575acyx1kjq"))))))
15507 (propagated-inputs
15508 `(("python-parso" ,python-parso)))
15509 (home-page "https://github.com/davidhalter/jedi")
15510 (synopsis "Autocompletion and static analysis library for Python")
15511 (description
15512 "Jedi is a static analysis tool for Python that can be used in Integrated
15513 Development Environments (@dfn{IDE}s) and text editors. It understands Python
15514 on a deeper level than many other static analysis frameworks for Python.
15515
15516 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
15517 well.")
15518 (license license:expat))))
15519
15520 (define-public python2-jedi
15521 (package-with-python2 python-jedi))
15522
15523 (define-public ptpython
15524 (package
15525 (name "ptpython")
15526 (version "3.0.17")
15527 (source (origin
15528 (method url-fetch)
15529 (uri (pypi-uri "ptpython" version))
15530 (sha256
15531 (base32
15532 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
15533 (build-system python-build-system)
15534 (arguments
15535 `(#:tests? #f)) ;there are no tests
15536 (propagated-inputs
15537 `(("python-appdirs" ,python-appdirs)
15538 ("python-black" ,python-black)
15539 ("python-jedi" ,python-jedi)
15540 ("python-prompt-toolkit" ,python-prompt-toolkit)
15541 ("python-pygments" ,python-pygments)))
15542 (home-page "https://github.com/jonathanslenders/ptpython")
15543 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
15544 (description
15545 "ptpython is a Python read-eval-print loop with IDE-like features.
15546 It supports syntax highlighting, multiline editing, autocompletion, mouse,
15547 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
15548 etc.")
15549 (license license:bsd-3)
15550 (properties `((python2-variant . ,(delay ptpython-2))))))
15551
15552 (define-public ptpython-2
15553 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
15554 (package/inherit base
15555 (name "ptpython2"))))
15556
15557 (define-public python-easyprocess
15558 (package
15559 (name "python-easyprocess")
15560 (version "0.3")
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (pypi-uri "EasyProcess" version))
15565 (sha256
15566 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
15567 (build-system python-build-system)
15568 (arguments
15569 ;; Tests require pyvirtualdisplay, which requires this package.
15570 `(#:tests? #f))
15571 (home-page "https://github.com/ponty/easyprocess")
15572 (synopsis "Python subprocess interface")
15573 (description
15574 "@code{easyprocess} is an easy to use Python subprocess interface.")
15575 (license license:bsd-3)))
15576
15577 (define-public python-entrypoint2
15578 (package
15579 (name "python-entrypoint2")
15580 (version "0.2.4")
15581 (source
15582 (origin
15583 (method url-fetch)
15584 (uri (pypi-uri "entrypoint2" version))
15585 (sha256
15586 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
15587 (build-system python-build-system)
15588 (arguments
15589 `(#:test-target "pytest"))
15590 (native-inputs
15591 `(("python-easyprocess" ,python-easyprocess)
15592 ("python-pytest" ,python-pytest)
15593 ("python-pytest-runner" ,python-pytest-runner)))
15594 (home-page "https://github.com/ponty/entrypoint2")
15595 (synopsis "Command-line interface for Python modules")
15596 (description
15597 "@code{entrypoint2} is an easy to use command-line interface for Python
15598 modules based on @code{argparse}. It translates function signature and
15599 documentation to argparse configuration.")
15600 (license license:bsd-3)))
15601
15602 (define-public python-pyvirtualdisplay
15603 (package
15604 (name "python-pyvirtualdisplay")
15605 (version "2.1")
15606 (source
15607 (origin
15608 (method url-fetch)
15609 (uri (pypi-uri "PyVirtualDisplay" version))
15610 (sha256
15611 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
15612 (build-system python-build-system)
15613 (arguments
15614 ;; Tests fail with:
15615 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
15616 `(#:tests? #f))
15617 (native-inputs
15618 `(("python-entrypoint2" ,python-entrypoint2)
15619 ("python-psutil" ,python-psutil)
15620 ("python-pytest" ,python-pytest)
15621 ("python-pytest-runner" ,python-pytest-runner)))
15622 (propagated-inputs
15623 `(("python-easyprocess" ,python-easyprocess)
15624 ("python-pillow" ,python-pillow)))
15625 (home-page "https://github.com/ponty/pyvirtualdisplay")
15626 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
15627 (description
15628 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
15629 (license license:bsd-3)))
15630
15631 (define-public python-stem
15632 (package
15633 (name "python-stem")
15634 (version "1.8.0")
15635 (source
15636 (origin
15637 (method url-fetch)
15638 (uri (pypi-uri "stem" version))
15639 (sha256
15640 (base32
15641 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
15642 (build-system python-build-system)
15643 (arguments
15644 `(#:phases
15645 (modify-phases %standard-phases
15646 (add-after 'unpack 'fix-tests
15647 ;; See https://github.com/torproject/stem/issues/56
15648 (lambda _
15649 (substitute* "run_tests.py"
15650 (("test\\.task\\.MOCK_VERSION,")
15651 ""))))
15652 (replace 'check
15653 (lambda _
15654 (invoke "./run_tests.py" "--unit")
15655 #t)))))
15656 (native-inputs
15657 `(("python-mock" ,python-mock)
15658 ("python-pycodestyle" ,python-pycodestyle)
15659 ("python-pyflakes" ,python-pyflakes)))
15660 (home-page "https://stem.torproject.org/")
15661 (synopsis
15662 "Python controller library that allows applications to interact with Tor")
15663 (description
15664 "Stem is a Python controller library for Tor. With it you can use Tor's
15665 control protocol to script against the Tor process and read descriptor data
15666 relays publish about themselves.")
15667 (license license:lgpl3)))
15668
15669 (define-public python-pyserial
15670 (package
15671 (name "python-pyserial")
15672 (version "3.5")
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "pyserial" version))
15677 (sha256
15678 (base32
15679 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
15680 (build-system python-build-system)
15681 (arguments
15682 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
15683 ;; #:phases
15684 ;; (modify-phases %standard-phases
15685 ;; (replace 'check
15686 ;; (lambda _
15687 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
15688 (home-page
15689 "https://github.com/pyserial/pyserial")
15690 (synopsis "Python Serial Port Bindings")
15691 (description "@code{pyserial} provide serial port bindings for Python. It
15692 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
15693 and/or Xon/Xoff. The port is accessed in RAW mode.")
15694 (license license:bsd-3)))
15695
15696 (define-public python2-pyserial
15697 (package-with-python2 python-pyserial))
15698
15699 (define-public python-kivy
15700 (package
15701 (name "python-kivy")
15702 (version "1.10.1")
15703 (source
15704 (origin
15705 (method url-fetch)
15706 (uri (pypi-uri "Kivy" version))
15707 (file-name (string-append name "-" version ".tar.gz"))
15708 (sha256
15709 (base32
15710 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
15711 (build-system python-build-system)
15712 (arguments
15713 `(#:tests? #f ; Tests require many optional packages
15714 #:phases
15715 (modify-phases %standard-phases
15716 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
15717 (lambda* (#:key inputs #:allow-other-keys)
15718 (setenv "KIVY_SDL2_PATH"
15719 (search-input-directory inputs "/include/SDL2")))))))
15720 (native-inputs
15721 `(("pkg-config" ,pkg-config)
15722 ("python-cython" ,python-cython)))
15723 (inputs
15724 `(("gstreamer" ,gstreamer)
15725 ("mesa" ,mesa)
15726 ("sdl-union"
15727 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
15728 (home-page "https://kivy.org")
15729 (synopsis
15730 "Multitouch application framework")
15731 (description
15732 "A software library for rapid development of
15733 hardware-accelerated multitouch applications.")
15734 (license license:expat)))
15735
15736 (define-public python2-kivy
15737 (package-with-python2 python-kivy))
15738
15739 (define-public python-binaryornot
15740 (package
15741 (name "python-binaryornot")
15742 (version "0.4.4")
15743 (source (origin
15744 (method url-fetch)
15745 (uri (pypi-uri "binaryornot" version))
15746 (sha256
15747 (base32
15748 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
15749 (build-system python-build-system)
15750 (arguments
15751 `(#:phases
15752 (modify-phases %standard-phases
15753 (add-after 'unpack 'patch-tests
15754 (lambda _
15755 ;; TypeError: binary() got an unexpected keyword argument
15756 ;; 'average_size'.
15757 (substitute* "tests/test_check.py"
15758 (("average_size=512") ""))
15759 #t)))))
15760 (propagated-inputs
15761 `(("python-chardet" ,python-chardet)
15762 ("python-hypothesis" ,python-hypothesis)))
15763 (home-page "https://github.com/audreyr/binaryornot")
15764 (synopsis "Package to check if a file is binary or text")
15765 (description "Ultra-lightweight pure Python package to check if a file is
15766 binary or text.")
15767 (license license:bsd-3)
15768 (properties `((python2-variant . ,(delay python2-binaryornot))))))
15769
15770 (define-public python2-binaryornot
15771 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
15772 (package/inherit base
15773 (propagated-inputs
15774 `(("python2-enum34" ,python2-enum34)
15775 ,@(package-propagated-inputs base))))))
15776
15777 (define-public python-binwalk
15778 (package
15779 (name "python-binwalk")
15780 (version "2.2.0")
15781 (source
15782 (origin
15783 (method git-fetch)
15784 (uri (git-reference
15785 (url "https://github.com/ReFirmLabs/binwalk")
15786 (commit (string-append "v" version))))
15787 (file-name (git-file-name name version))
15788 (sha256
15789 (base32
15790 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
15791 (build-system python-build-system)
15792 (arguments
15793 `(#:phases
15794 (modify-phases %standard-phases
15795 (add-before 'check 'set-home
15796 (lambda _
15797 (setenv "HOME" ""))))))
15798 (native-inputs
15799 `(("python-coverage" ,python-coverage)
15800 ("python-nose" ,python-nose)))
15801 (home-page "https://github.com/ReFirmLabs/binwalk")
15802 (synopsis "Firmware analysis tool")
15803 (description "Binwalk is a tool for analyzing, reverse engineering, and
15804 extracting firmware images")
15805 (license license:expat)))
15806
15807 (define-public python-nltk
15808 (package
15809 (name "python-nltk")
15810 (version "3.6.2")
15811 (source (origin
15812 (method url-fetch)
15813 (uri (pypi-uri "nltk" version ".zip"))
15814 (sha256
15815 (base32
15816 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
15817 (build-system python-build-system)
15818 (arguments
15819 '(;; The tests require some extra resources to be downloaded.
15820 ;; TODO Try packaging these resources.
15821 #:tests? #f))
15822 (propagated-inputs
15823 `(("python-click" ,python-click)
15824 ("python-joblib" ,python-joblib)
15825 ("python-regex" ,python-regex)
15826 ("python-tqdm" ,python-tqdm)))
15827 (native-inputs
15828 `(("unzip" ,unzip)))
15829 (home-page "http://nltk.org/")
15830 (synopsis "Natural Language Toolkit")
15831 (description "It provides interfaces to over 50 corpora and lexical
15832 resources such as WordNet, along with a suite of text processing libraries
15833 for classification, tokenization, stemming, tagging, parsing, and semantic
15834 reasoning, wrappers for natural language processing libraries.")
15835 (license license:asl2.0)))
15836
15837 ;; Versions >=3.5 breaks backward-compatibility,
15838 ;; so we keep version 3.4.x around for a while.
15839 (define-public python-nltk-3.4
15840 (package
15841 (inherit python-nltk)
15842 (version "3.4.5")
15843 (source
15844 (origin
15845 (method url-fetch)
15846 (uri (pypi-uri "nltk" version ".zip"))
15847 (sha256
15848 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
15849 (propagated-inputs `(("python-six" ,python-six)))))
15850
15851 (define-public python2-nltk
15852 (package-with-python2 python-nltk))
15853
15854 (define-public python-pymongo
15855 (package
15856 (name "python-pymongo")
15857 (version "3.7.2")
15858 (source (origin
15859 (method url-fetch)
15860 (uri (pypi-uri "pymongo" version))
15861 (sha256
15862 (base32
15863 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
15864 (build-system python-build-system)
15865 (propagated-inputs
15866 `(("python-certifi" ,python-certifi)))
15867 (home-page "https://github.com/mongodb/mongo-python-driver")
15868 (synopsis "Python driver for MongoDB")
15869 (description "Python driver for MongoDB.")
15870 (license license:asl2.0)))
15871
15872 (define-public python2-pymongo
15873 (package-with-python2 python-pymongo))
15874
15875 (define-public python-consul
15876 (package
15877 (name "python-consul")
15878 (version "0.6.1")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "python-consul" version))
15883 (sha256
15884 (base32
15885 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
15886 (build-system python-build-system)
15887 (arguments
15888 '(#:tests? #f)) ; The tests are not distributed
15889 (propagated-inputs
15890 `(("python-requests" ,python-requests)
15891 ("python-six" ,python-six)))
15892 (home-page "https://github.com/cablehead/python-consul")
15893 (synopsis "Python client for Consul")
15894 (description
15895 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
15896 discovery, monitoring and configuration.")
15897 (license license:expat)))
15898
15899 (define-public python2-consul
15900 (package-with-python2 python-consul))
15901
15902 (define-public python-schematics
15903 (package
15904 (name "python-schematics")
15905 (version "1.1.1")
15906 (source
15907 (origin
15908 (method git-fetch)
15909 (uri (git-reference
15910 (url "https://github.com/schematics/schematics")
15911 (commit (string-append "v" version))))
15912 (file-name (git-file-name name version))
15913 (sha256
15914 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
15915 (build-system python-build-system)
15916 (propagated-inputs
15917 `(("python-six" ,python-six)))
15918 (arguments
15919 ;; The tests require a bunch of not very nice packages with fixed
15920 ;; version requirements (e.g. python-coveralls).
15921 `(#:tests? #f))
15922 (home-page "https://github.com/schematics/schematics")
15923 (synopsis "Python Data Structures for Humans")
15924 (description "Python Data Structures for Humans.")
15925 (license license:bsd-3)))
15926
15927 (define-public python2-schematics
15928 (package-with-python2 python-schematics))
15929
15930 (define-public python-odfpy
15931 (package
15932 (name "python-odfpy")
15933 (version "1.4.1")
15934 (source (origin
15935 (method url-fetch)
15936 (uri (pypi-uri "odfpy" version))
15937 (sha256
15938 (base32
15939 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
15940 (arguments
15941 `(#:phases
15942 (modify-phases %standard-phases
15943 (replace 'check
15944 (lambda _
15945 (invoke "pytest" "-vv"))))))
15946 (build-system python-build-system)
15947 (native-inputs
15948 `(("python-pytest" ,python-pytest)))
15949 (propagated-inputs
15950 `(("python-defusedxml" ,python-defusedxml)))
15951 (home-page "https://github.com/eea/odfpy")
15952 (synopsis "Python API and tools to manipulate OpenDocument files")
15953 (description "Collection of libraries and utility programs written in
15954 Python to manipulate OpenDocument 1.2 files.")
15955 (license
15956 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
15957 ;; number of files with other licenses.
15958 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
15959
15960 (define-public python2-odfpy
15961 (package-with-python2 python-odfpy))
15962
15963 (define-public python-natsort
15964 (package
15965 (name "python-natsort")
15966 (version "7.1.1")
15967 (source (origin
15968 (method url-fetch)
15969 (uri (pypi-uri "natsort" version))
15970 (sha256
15971 (base32
15972 "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
15973 (build-system python-build-system)
15974 (arguments
15975 `(#:phases
15976 (modify-phases %standard-phases
15977 (replace 'check
15978 (lambda _
15979 (invoke "pytest" "-v"))))))
15980 (native-inputs
15981 `(("python-hypothesis" ,python-hypothesis)
15982 ("python-pytest-cov" ,python-pytest-cov)
15983 ("python-pytest-mock" ,python-pytest-mock)
15984 ("python-pytest" ,python-pytest)))
15985 (propagated-inputs ; TODO: Add python-fastnumbers.
15986 `(("python-pyicu" ,python-pyicu)))
15987 (home-page "https://github.com/SethMMorton/natsort")
15988 (synopsis "Natural sorting for python and shell")
15989 (description
15990 "Natsort lets you apply natural sorting on lists instead of
15991 lexicographical. If you use the built-in @code{sorted} method in python
15992 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
15993 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
15994 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
15995 identifies numbers and sorts them separately from strings. It can also sort
15996 version numbers, real numbers, mixed types and more, and comes with a shell
15997 command @command{natsort} that exposes this functionality in the command line.")
15998 (license license:expat)))
15999
16000 (define-public glances
16001 (package
16002 (name "glances")
16003 (version "3.1.7")
16004 (source
16005 (origin
16006 (method url-fetch)
16007 (uri (pypi-uri "Glances" version))
16008 (sha256
16009 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
16010 (modules '((guix build utils)))
16011 (snippet
16012 '(begin
16013 ;; Glances phones PyPI for weekly update checks by default.
16014 ;; Disable these. The user can re-enable them if desired.
16015 (substitute* "glances/outdated.py"
16016 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
16017 (string-append indentation
16018 "self.args.disable_check_update = True\n"
16019 line)))
16020 #t))))
16021 (build-system python-build-system)
16022 (propagated-inputs
16023 `(("python-future" ,python-future)
16024 ("python-psutil" ,python-psutil)))
16025 (home-page "https://github.com/nicolargo/glances")
16026 (synopsis "Cross-platform curses-based monitoring tool")
16027 (description
16028 "Glances is a curses-based monitoring tool for a wide variety of platforms.
16029 Glances uses the PsUtil library to get information from your system. It
16030 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
16031 (license license:lgpl3+)))
16032
16033 (define-public python-glances
16034 (deprecated-package "python-glances" glances))
16035
16036 (define-public python-graphql-core
16037 (package
16038 (name "python-graphql-core")
16039 (version "3.1.2")
16040 (source
16041 (origin
16042 (method url-fetch)
16043 (uri (pypi-uri "graphql-core" version))
16044 (sha256
16045 (base32
16046 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
16047 (build-system python-build-system)
16048 (arguments
16049 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
16050 #:phases
16051 (modify-phases %standard-phases
16052 (add-after 'unpack 'patch-hardcoded-version
16053 (lambda _ (substitute*
16054 "setup.py"
16055 (("'gevent==1.1rc1'") "'gevent'"))
16056 #t)))))
16057 (native-inputs
16058 `(("python-gevent" ,python-gevent)
16059 ("python-mock" ,python-mock)
16060 ("python-pytest-mock" ,python-pytest-mock)))
16061 (propagated-inputs
16062 `(("python-promise" ,python-promise)
16063 ("python-six" ,python-six)))
16064 (home-page "https://github.com/graphql-python/graphql-core")
16065 (synopsis "GraphQL implementation for Python")
16066 (description
16067 "GraphQL implementation for Python. GraphQL is a data query language and
16068 runtime designed and used to request and deliver data to mobile and web apps.
16069 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
16070 to Python.")
16071 (license license:expat)))
16072
16073 (define-public python-graphql-relay
16074 (package
16075 (name "python-graphql-relay")
16076 (version "0.4.5")
16077 (source
16078 (origin
16079 (method url-fetch)
16080 (uri (pypi-uri "graphql-relay" version))
16081 (sha256
16082 (base32
16083 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
16084 (build-system python-build-system)
16085 (arguments
16086 '(#:tests? #f)) ; The tests are not distributed
16087 (propagated-inputs
16088 `(("python-graphql-core" ,python-graphql-core)
16089 ("python-promise" ,python-promise)
16090 ("python-six" ,python-six)))
16091 (home-page "https://github.com/graphql-python/graphql-relay-py")
16092 (synopsis "Relay implementation for Python")
16093 (description
16094 "This is a library to allow the easy creation of Relay-compliant servers
16095 using the GraphQL Python reference implementation of a GraphQL server. It
16096 should be noted that the code is a exact port of the original
16097 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
16098 from Facebook.")
16099 (license license:expat)))
16100
16101 (define-public python-graphene
16102 (package
16103 (name "python-graphene")
16104 (version "0.10.2")
16105 (source
16106 (origin
16107 (method url-fetch)
16108 (uri (pypi-uri "graphene" version))
16109 (sha256
16110 (base32
16111 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
16112 (build-system python-build-system)
16113 (propagated-inputs
16114 `(("python-graphql-core" ,python-graphql-core)
16115 ("python-graphql-relay" ,python-graphql-relay)
16116 ("python-iso8601" ,python-iso8601)
16117 ("python-promise" ,python-promise)
16118 ("python-six" ,python-six)))
16119 (arguments
16120 `(#:tests? #f)) ; no tests/ in the PyPI tarball
16121 (home-page "https://graphene-python.org/")
16122 (synopsis "GraphQL Framework for Python")
16123 (description
16124 "Graphene is a Python library for building GraphQL schemas/types.
16125 A GraphQL schema describes your data model, and provides a GraphQL server
16126 with an associated set of resolve methods that know how to fetch data.")
16127 (license license:expat)))
16128
16129 (define-public python-nautilus
16130 (package
16131 (name "python-nautilus")
16132 (version "0.4.9")
16133 (source
16134 (origin
16135 (method url-fetch)
16136 (uri (pypi-uri "nautilus" version))
16137 (sha256
16138 (base32
16139 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
16140 (build-system python-build-system)
16141 (arguments `(#:tests? #f)) ; fails to import test modules
16142 (propagated-inputs
16143 `(("python-bcrypt" ,python-bcrypt)
16144 ("python-click" ,python-click)
16145 ("python-consul" ,python-consul)
16146 ("python-graphene" ,python-graphene)
16147 ("python-jinja2" ,python-jinja2)
16148 ("python-peewee" ,python-peewee)
16149 ("python-pika" ,python-pika)
16150 ("python-tornado" ,python-tornado)
16151 ("python-wtforms" ,python-wtforms)))
16152 (native-inputs
16153 `(("python-nose2" ,python-nose2)))
16154 (home-page "https://github.com/AlecAivazis/nautilus")
16155 (synopsis "Library for creating microservice applications")
16156 (description
16157 "Nautilus is a framework for flux based microservices that looks to
16158 provide extendible implementations of common aspects of a cloud so that you can
16159 focus on building massively scalable web applications.")
16160 (license license:expat)))
16161
16162 (define-public python-random2
16163 (package
16164 (name "python-random2")
16165 (version "1.0.1")
16166 (source (origin
16167 (method url-fetch)
16168 (uri (pypi-uri "random2" version ".zip"))
16169 (sha256
16170 (base32
16171 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
16172 (patches
16173 (search-patches "python-random2-getrandbits-test.patch"))))
16174 (build-system python-build-system)
16175 (native-inputs `(("unzip" ,unzip)))
16176 (home-page "http://pypi.python.org/pypi/random2")
16177 (synopsis "Python 3 version of the Python 2 @code{random} module")
16178 (description
16179 "This package provides a Python 3 ported version of Python 2.7’s
16180 @code{random} module. It has also been back-ported to work in Python 2.6.
16181
16182 In Python 3, the implementation of @code{randrange()} was changed, so that
16183 even with the same seed you get different sequences in Python 2 and 3.
16184
16185 This package closes that gap, allowing stable random number generation
16186 between the different Python versions.")
16187 (license license:psfl)))
16188
16189 (define-public python2-random2
16190 (package-with-python2 python-random2))
16191
16192 (define-public python-snowballstemmer
16193 (package
16194 (name "python-snowballstemmer")
16195 (version "2.0.0")
16196 (source (origin
16197 (method url-fetch)
16198 (uri (pypi-uri "snowballstemmer" version))
16199 (sha256
16200 (base32
16201 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16202 (build-system python-build-system)
16203 (arguments
16204 `(;; No tests exist
16205 #:tests? #f))
16206 (home-page "https://github.com/shibukawa/snowball_py")
16207 (synopsis "Snowball stemming library collection for Python")
16208 (description "This package provides 16 word stemmer algorithms generated
16209 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16210 English stemmer.")
16211 (license license:bsd-3)))
16212
16213 (define-public python2-snowballstemmer
16214 (package-with-python2 python-snowballstemmer))
16215
16216 (define-public python-setproctitle
16217 (package
16218 (name "python-setproctitle")
16219 (version "1.1.10")
16220 (source
16221 (origin
16222 (method url-fetch)
16223 (uri (pypi-uri "setproctitle" version))
16224 (sha256
16225 (base32
16226 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16227 (build-system python-build-system)
16228 (arguments
16229 '(#:phases
16230 (modify-phases %standard-phases
16231 (add-before 'check 'patch-Makefile
16232 ;; Stricly this is only required for the python2 variant.
16233 ;; But adding a phase in an inherited package seems to be
16234 ;; cumbersum. So we patch even for python3.
16235 (lambda _
16236 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16237 (when nose
16238 (substitute* "Makefile"
16239 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16240 (string-append nose "/bin/nosetests "))))
16241 #t)))
16242 (replace 'check
16243 (lambda _
16244 (setenv "PYTHON" (or (which "python3") (which "python")))
16245 (setenv "PYCONFIG" (if (which "python3-config")
16246 "python3-config --embed"
16247 "python-config"))
16248 (setenv "CC" "gcc")
16249 ;; No need to extend PYTHONPATH to find the built package, since
16250 ;; the Makefile will build anyway
16251 (invoke "make" "check"))))))
16252 (native-inputs
16253 `(("procps" ,procps))) ; required for tests
16254 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16255 (synopsis
16256 "Setproctitle implementation for Python to customize the process title")
16257 (description "The library allows a process to change its title (as displayed
16258 by system tools such as ps and top).
16259
16260 Changing the title is mostly useful in multi-process systems, for
16261 example when a master process is forked: changing the children's title
16262 allows identifying the task each process is busy with. The technique
16263 is used by PostgreSQL and the OpenSSH Server for example.")
16264 (license license:bsd-3)
16265 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16266
16267 (define-public python2-setproctitle
16268 (let ((base (package-with-python2
16269 (strip-python2-variant python-setproctitle))))
16270 (package/inherit base
16271 (native-inputs `(("python2-nose" ,python2-nose)
16272 ,@(package-native-inputs base))))))
16273
16274 (define-public python-validictory
16275 (package
16276 (name "python-validictory")
16277 (version "1.0.1")
16278 (source
16279 (origin
16280 (method url-fetch)
16281 (uri (pypi-uri "validictory" version))
16282 (sha256
16283 (base32
16284 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16285 (build-system python-build-system)
16286 (arguments
16287 '(#:phases
16288 (modify-phases %standard-phases
16289 (add-after 'unpack 'bootstrap
16290 ;; Move the tests out of the package directory to avoid
16291 ;; packaging them.
16292 (lambda* _
16293 (rename-file "validictory/tests" "tests")
16294 (delete-file "tests/__init__.py")))
16295 (replace 'check
16296 (lambda _
16297 (invoke "py.test" "-vv" ))))))
16298 (native-inputs
16299 `(("python-pytest" ,python-pytest)))
16300 (home-page
16301 "https://github.com/jamesturk/validictory")
16302 (synopsis "General purpose Python data validator")
16303 (description "It allows validation of arbitrary Python data structures.
16304
16305 The schema format is based on the JSON Schema
16306 proposal (http://json-schema.org), so combined with json the library is also
16307 useful as a validator for JSON data.")
16308 (license license:expat)))
16309
16310 (define-public python2-validictory
16311 (package-with-python2 python-validictory))
16312
16313 (define-public python-pyelftools
16314 (package
16315 (name "python-pyelftools")
16316 (version "0.25")
16317 (source
16318 (origin
16319 (method url-fetch)
16320 (uri (pypi-uri "pyelftools" version))
16321 (sha256
16322 (base32
16323 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
16324 (build-system python-build-system)
16325 (home-page
16326 "https://github.com/eliben/pyelftools")
16327 (synopsis
16328 "Analyze binary and library file information")
16329 (description "This Python library provides interfaces for parsing and
16330 analyzing two binary and library file formats; the Executable and Linking
16331 Format (ELF), and debugging information in the Debugging With Attributed
16332 Record Format (DWARF).")
16333 (license license:public-domain)))
16334
16335 (define-public python-pyev
16336 (package
16337 (name "python-pyev")
16338 (version "0.9.0")
16339 (source
16340 (origin
16341 (method url-fetch)
16342 (uri (pypi-uri "pyev" version))
16343 (sha256
16344 (base32
16345 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
16346 (build-system python-build-system)
16347 (arguments
16348 `(#:tests? #f ; no test suite
16349 #:phases
16350 (modify-phases %standard-phases
16351 (add-after 'unpack 'patch
16352 (lambda* (#:key inputs #:allow-other-keys)
16353 (let ((libev (search-input-file inputs "/lib/libev.so.4")))
16354 (substitute* "setup.py"
16355 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
16356 (string-append "libev_dll_name = \"" libev "\"")))))))))
16357 (inputs
16358 `(("libev" ,libev)))
16359 (home-page "https://github.com/gabrielfalcao/pyev")
16360 (synopsis "Python libev interface")
16361 (description "Pyev provides a Python interface to libev.")
16362 (license license:gpl3)))
16363
16364 (define-public python2-pyev
16365 (package-with-python2 python-pyev))
16366
16367 (define-public python-imagesize
16368 (package
16369 (name "python-imagesize")
16370 (version "1.2.0")
16371 (source
16372 (origin
16373 (method url-fetch)
16374 (uri (pypi-uri "imagesize" version))
16375 (sha256
16376 (base32
16377 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
16378 (build-system python-build-system)
16379 (home-page "https://github.com/shibukawa/imagesize_py")
16380 (synopsis "Gets image size of files in various formats in Python")
16381 (description
16382 "This package allows determination of image size from
16383 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
16384 (license license:expat)))
16385
16386 (define-public python2-imagesize
16387 (package-with-python2 python-imagesize))
16388
16389 (define-public python-termstyle
16390 (package
16391 (name "python-termstyle")
16392 (version "0.1.11")
16393 (source
16394 (origin
16395 (method url-fetch)
16396 (uri (pypi-uri "termstyle" version))
16397 (sha256
16398 (base32
16399 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
16400 (build-system python-build-system)
16401 (arguments
16402 '(#:phases
16403 (modify-phases %standard-phases
16404 (replace 'check
16405 (lambda _
16406 (invoke "python" "test3.py"))))))
16407 (home-page "https://github.com/gfxmonk/termstyle")
16408 (synopsis "Console text coloring for Python")
16409 (description "This package provides console text coloring for Python.")
16410 (license license:bsd-3)))
16411
16412 (define-public python-argcomplete
16413 (package
16414 (name "python-argcomplete")
16415 (version "1.11.1")
16416 (source
16417 (origin
16418 (method url-fetch)
16419 (uri (pypi-uri "argcomplete" version))
16420 (sha256
16421 (base32
16422 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
16423 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
16424 (build-system python-build-system)
16425 (native-inputs
16426 `(("python-coverage" ,python-coverage)
16427 ("python-flake8" ,python-flake8)
16428 ("python-pexpect" ,python-pexpect)
16429 ("python-wheel" ,python-wheel)
16430 ("tcsh" ,tcsh)
16431 ("fish" ,fish)
16432 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
16433 (home-page "https://github.com/kislyuk/argcomplete")
16434 (synopsis "Shell tab completion for Python argparse")
16435 (description "argcomplete provides extensible command line tab completion
16436 of arguments and options for Python scripts using @code{argparse}. It's
16437 particularly useful for programs with many options or sub-parsers that can
16438 dynamically suggest completions; for example, when browsing resources over the
16439 network.")
16440 (license license:asl2.0)
16441 (properties `((python2-variant . ,(delay python2-argcomplete))))))
16442
16443 (define-public python2-argcomplete
16444 (let ((variant (package-with-python2
16445 (strip-python2-variant python-argcomplete))))
16446 (package/inherit variant
16447 (arguments
16448 (substitute-keyword-arguments (package-arguments variant)
16449 ((#:phases phases '%standard-phases)
16450 `(modify-phases ,phases
16451 (add-after 'unpack 'set-my-HOME
16452 (lambda _ (setenv "HOME" "/tmp")))))))
16453 (native-inputs
16454 `(("python2-importlib-metadata" ,python2-importlib-metadata)
16455 ,@(package-native-inputs variant))))))
16456
16457 (define-public python-csscompressor
16458 (package
16459 (name "python-csscompressor")
16460 (version "0.9.5")
16461 (source
16462 (origin
16463 (method url-fetch)
16464 (uri (pypi-uri "csscompressor" version))
16465 (sha256
16466 (base32
16467 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
16468 (build-system python-build-system)
16469 (arguments
16470 '(#:phases
16471 (modify-phases %standard-phases
16472 (replace 'check
16473 (lambda _
16474 (invoke "py.test"))))))
16475 (native-inputs
16476 `(("python-pytest" ,python-pytest)))
16477 (home-page "https://github.com/sprymix/csscompressor")
16478 (synopsis "Python port of YUI CSS Compressor")
16479 (description
16480 "This package provides a python port of YUI CSS Compressor.")
16481 (license license:bsd-3)))
16482
16483 (define-public python-rcssmin
16484 (package
16485 (name "python-rcssmin")
16486 (version "1.0.6")
16487 (source
16488 (origin
16489 (method url-fetch)
16490 (uri (pypi-uri "rcssmin" version))
16491 (sha256
16492 (base32
16493 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
16494 (build-system python-build-system)
16495 (arguments
16496 '(#:phases
16497 (modify-phases %standard-phases
16498 (replace 'check
16499 (lambda _
16500 (invoke "python" "run_tests.py" "tests"))))))
16501 (home-page "http://opensource.perlig.de/rcssmin/")
16502 (synopsis "CSS Minifier")
16503 (description "The minifier is based on the semantics of the YUI compressor,
16504 which itself is based on the rule list by Isaac Schlueter.")
16505 (license license:asl2.0)))
16506
16507 (define-public python-rjsmin
16508 (package
16509 (name "python-rjsmin")
16510 (version "1.1.0")
16511 (source
16512 (origin
16513 (method url-fetch)
16514 (uri (pypi-uri "rjsmin" version))
16515 (sha256
16516 (base32
16517 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
16518 (modules '((guix build utils)))
16519 (snippet
16520 '(begin
16521 (for-each delete-file (find-files "bench" "\\.js$"))
16522 #t))))
16523 (build-system python-build-system)
16524 (arguments
16525 '(#:tests? #f ; Not all test files included.
16526 #:phases
16527 (modify-phases %standard-phases
16528 (replace 'check
16529 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16530 (add-installed-pythonpath inputs outputs)
16531 (if tests?
16532 (invoke "py.test" "-vv" "tests")
16533 #t))))))
16534 (native-inputs
16535 `(("python-pytest" ,python-pytest)))
16536 (home-page "http://opensource.perlig.de/rjsmin/")
16537 (synopsis "Javascript Minifier")
16538 (description "@code{rJSmin} is a javascript minifier written in Python. The
16539 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
16540 is a re-implementation aiming for speed, so it can be used at runtime (rather
16541 than during a preprocessing step).")
16542 (license license:asl2.0)))
16543
16544 (define-public python-xopen
16545 (package
16546 (name "python-xopen")
16547 (version "0.5.0")
16548 (source
16549 (origin
16550 (method url-fetch)
16551 (uri (pypi-uri "xopen" version))
16552 (sha256
16553 (base32
16554 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
16555 (build-system python-build-system)
16556 (propagated-inputs
16557 `(("python-setuptools-scm" ,python-setuptools-scm)))
16558 (home-page "https://github.com/marcelm/xopen/")
16559 (synopsis "Open compressed files transparently")
16560 (description "This module provides an @code{xopen} function that works like
16561 Python's built-in @code{open} function, but can also deal with compressed files.
16562 Supported compression formats are gzip, bzip2 and, xz, and are automatically
16563 recognized by their file extensions. The focus is on being as efficient as
16564 possible on all supported Python versions.")
16565 (license license:expat)))
16566
16567 (define-public python2-xopen
16568 (let ((base (package-with-python2
16569 (strip-python2-variant python-xopen))))
16570 (package/inherit base
16571 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
16572 ,@(package-propagated-inputs base))))))
16573
16574 (define-public python-cheetah
16575 (package
16576 (name "python-cheetah")
16577 (version "3.2.4")
16578 (source
16579 (origin
16580 (method url-fetch)
16581 (uri (pypi-uri "Cheetah3" version))
16582 (sha256
16583 (base32
16584 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
16585 (build-system python-build-system)
16586 (arguments
16587 `(#:phases (modify-phases %standard-phases
16588 (add-after 'unpack 'use-absolute-python
16589 (lambda _
16590 (substitute* "Cheetah/CheetahWrapper.py"
16591 (("#!/usr/bin/env python")
16592 (string-append "#!" (which "python"))))))
16593 (add-after 'unpack 'fix-tests
16594 (lambda _
16595 (substitute* "Cheetah/Tests/ImportHooks.py"
16596 (("os.path.dirname\\(__file__\\)")
16597 (string-append "'" (getcwd) "/Cheetah/Tests'")))))
16598 (replace 'check
16599 (lambda _
16600 (setenv "TMPDIR" "/tmp")
16601 (substitute* "Cheetah/Tests/Test.py"
16602 (("unittest.TextTestRunner\\(\\)")
16603 "unittest.TextTestRunner(verbosity=2)"))
16604
16605 (invoke "python" "Cheetah/Tests/Test.py"))))))
16606 (propagated-inputs
16607 `(("python-markdown" ,python-markdown))) ;optional
16608 (home-page "https://cheetahtemplate.org/")
16609 (synopsis "Template engine")
16610 (description "Cheetah is a text-based template engine and Python code
16611 generator.
16612
16613 Cheetah can be used as a standalone templating utility or referenced as
16614 a library from other Python applications. It has many potential uses,
16615 but web developers looking for a viable alternative to ASP, JSP, PHP and
16616 PSP are expected to be its principle user group.
16617
16618 Features:
16619 @enumerate
16620 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
16621 text-based format.
16622 @item Cleanly separates content, graphic design, and program code.
16623 @item Blends the power and flexibility of Python with a simple template language
16624 that non-programmers can understand.
16625 @item Gives template writers full access to any Python data structure, module,
16626 function, object, or method in their templates.
16627 @item Makes code reuse easy by providing an object-orientated interface to
16628 templates that is accessible from Python code or other Cheetah templates.
16629 One template can subclass another and selectively reimplement sections of it.
16630 @item Provides a simple, yet powerful, caching mechanism that can dramatically
16631 improve the performance of a dynamic website.
16632 @item Compiles templates into optimized, yet readable, Python code.
16633 @end enumerate")
16634 (license (license:x11-style "file://LICENSE"))))
16635
16636 (define-public python2-cheetah
16637 (package-with-python2 python-cheetah))
16638
16639 (define-public python-dulwich
16640 (package
16641 (name "python-dulwich")
16642 (version "0.19.16")
16643 (source
16644 (origin
16645 (method url-fetch)
16646 (uri (list (string-append "https://www.dulwich.io/releases/"
16647 "dulwich-" version ".tar.gz")
16648 (pypi-uri "dulwich" version)))
16649 (sha256
16650 (base32
16651 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
16652 (build-system python-build-system)
16653 (arguments
16654 `(#:phases
16655 (modify-phases %standard-phases
16656 (add-before 'check 'fix-tests
16657 (lambda* (#:key inputs #:allow-other-keys)
16658 ;; The tests use Popen with a custom environment which doesn't
16659 ;; include PATH.
16660 (substitute* "dulwich/tests/compat/utils.py"
16661 (("'git'") (string-append "'"
16662 (which "git")
16663 "'")))
16664 (substitute* '("dulwich/tests/test_repository.py"
16665 "dulwich/tests/test_hooks.py")
16666 (("#!/bin/sh") (string-append "#!" (which "sh"))))
16667 (setenv "TEST_RUNNER" "unittest")
16668 (setenv "PYTHONHASHSEED" "random")
16669 #t)))))
16670 (propagated-inputs
16671 `(("python-fastimport" ,python-fastimport)
16672 ("python-urllib3" ,python-urllib3)))
16673 (native-inputs
16674 `(("python-mock" ,python-mock)
16675 ("python-geventhttpclient" ,python-geventhttpclient)
16676 ("git" ,git)))
16677 (home-page "https://www.dulwich.io/")
16678 (synopsis "Git implementation in Python")
16679 (description "Dulwich is an implementation of the Git file formats and
16680 protocols written in pure Python.")
16681 ;; Can be used with either license.
16682 (license (list license:asl2.0 license:gpl2+))))
16683
16684 (define-public python-pbkdf2
16685 (package
16686 (name "python-pbkdf2")
16687 (version "1.3")
16688 (source
16689 (origin
16690 (method url-fetch)
16691 (uri (pypi-uri "pbkdf2" version))
16692 (sha256
16693 (base32
16694 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
16695 (build-system python-build-system)
16696 (arguments
16697 '(#:phases
16698 (modify-phases %standard-phases
16699 (replace 'check
16700 (lambda _
16701 (invoke "python" "test/test_pbkdf2.py"))))))
16702 (propagated-inputs
16703 `(("python-pycrypto" ,python-pycrypto))) ; optional
16704 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
16705 (synopsis "Password-based key derivation")
16706 (description "This module implements the password-based key derivation
16707 function, PBKDF2, specified in RSA PKCS#5 v2.0.
16708
16709 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
16710 is part of the RSA Public Key Cryptography Standards series. The provided
16711 implementation takes a password or a passphrase and a salt value (and
16712 optionally a iteration count, a digest module, and a MAC module) and provides
16713 a file-like object from which an arbitrarily-sized key can be read.")
16714 (license license:expat)))
16715
16716 (define-public python2-pbkdf2
16717 (package-with-python2 python-pbkdf2))
16718
16719 (define-public python-qrcode
16720 (package
16721 (name "python-qrcode")
16722 (version "6.1")
16723 (source
16724 (origin
16725 (method url-fetch)
16726 (uri (pypi-uri "qrcode" version))
16727 (sha256
16728 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
16729 (build-system python-build-system)
16730 (arguments
16731 ;; FIXME: Tests require packaging 'pymaging'.
16732 '(#:tests? #f))
16733 (propagated-inputs
16734 `(("python-lxml" ,python-lxml) ; for SVG output
16735 ("python-pillow" ,python-pillow) ; for PNG output
16736 ("python-six" ,python-six)))
16737 (home-page "https://github.com/lincolnloop/python-qrcode")
16738 (synopsis "QR Code image generator")
16739 (description "This package provides a pure Python QR Code generator
16740 module. It uses the Python Imaging Library (PIL) to allow for the generation
16741 of QR Codes.
16742
16743 In addition this package provides a command line tool to generate QR codes and
16744 either write these QR codes to a file or do the output as ascii art at the
16745 console.")
16746 (license license:bsd-3)))
16747
16748 (define-public python2-qrcode
16749 (package-with-python2 python-qrcode))
16750
16751 (define-public python-rst2ansi
16752 (package
16753 (name "python-rst2ansi")
16754 (version "0.1.5")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "rst2ansi" version))
16759 (sha256
16760 (base32
16761 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
16762 (build-system python-build-system)
16763 (propagated-inputs
16764 `(("python-docutils" ,python-docutils)))
16765 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
16766 (synopsis "Convert RST to ANSI-decorated console output")
16767 (description
16768 "Python module dedicated to rendering RST (reStructuredText) documents
16769 to ansi-escaped strings suitable for display in a terminal.")
16770 (license license:expat)))
16771
16772 (define-public python-ansi2html
16773 (package
16774 (name "python-ansi2html")
16775 (version "1.2.0")
16776 (source
16777 (origin
16778 (method url-fetch)
16779 (uri (pypi-uri "ansi2html" version))
16780 (sha256
16781 (base32
16782 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
16783 (build-system python-build-system)
16784 (native-inputs
16785 `(("python-mock" ,python-mock)
16786 ("python-nose" ,python-nose)))
16787 (propagated-inputs
16788 `(("python-six" ,python-six)))
16789 (home-page "https://github.com/ralphbean/ansi2html")
16790 (synopsis "Convert ANSI-decorated console output to HTML")
16791 (description
16792 "@command{ansi2html} is a Python library and command line utility for
16793 converting text with ANSI color codes to HTML or LaTeX.")
16794 (license license:gpl3+)))
16795
16796 (define-public python2-ansi2html
16797 (package-with-python2 python-ansi2html))
16798
16799 (define-public python-easy-ansi
16800 (package
16801 (name "python-easy-ansi")
16802 (version "0.3")
16803 (source
16804 (origin
16805 (method git-fetch)
16806 (uri (git-reference
16807 (url "https://gitlab.com/joeysbytes/easy-ansi")
16808 (commit (string-append "v" version))))
16809 (file-name (git-file-name name version))
16810 (sha256
16811 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
16812 (build-system python-build-system)
16813 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
16814 (synopsis "Terminal framework API")
16815 (description
16816 "Easy ANSI is a terminal framework API to give you an easy way to use
16817 colors, cursor control movements, and line/box drawing. It is not meant as a
16818 replacement to more full-featured frameworks (such as curses or urwid), but as
16819 a tool to quickly create nice-looking screens in your terminal window. You
16820 can even create animations with the cursor controls.")
16821 (license license:expat)))
16822
16823 (define-public python-ddt
16824 (package
16825 (name "python-ddt")
16826 (version "1.4.2")
16827 (source
16828 (origin
16829 (method url-fetch)
16830 (uri (pypi-uri "ddt" version))
16831 (sha256
16832 (base32
16833 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
16834 (build-system python-build-system)
16835 (native-inputs
16836 `(("python-pytest" ,python-pytest)))
16837 (propagated-inputs
16838 `(("python-pyyaml" ,python-pyyaml)))
16839 (home-page "https://github.com/datadriventests/ddt")
16840 (synopsis "Data-Driven Tests")
16841 (description
16842 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
16843 running it with different test data, and make it appear as multiple test
16844 cases.")
16845 (license license:expat)))
16846
16847 (define-public python-pycountry
16848 (package
16849 (name "python-pycountry")
16850 (version "18.5.26")
16851 (source
16852 (origin
16853 (method url-fetch)
16854 (uri (pypi-uri "pycountry" version))
16855 (sha256
16856 (base32
16857 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
16858 (build-system python-build-system)
16859 (home-page "https://bitbucket.org/flyingcircus/pycountry")
16860 (synopsis "ISO databases for languages, countries, currencies, etc.")
16861 (description
16862 "@code{pycountry} provides the ISO databases for the standards:
16863 @enumerate
16864 @item 639-3 (Languages)
16865 @item 3166 (Countries)
16866 @item 3166-3 (Deleted Countries)
16867 @item 3166-2 (Subdivisions of countries)
16868 @item 4217 (Currencies)
16869 @item 15924 (Scripts)
16870 @end enumerate
16871 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
16872 through a Python API.")
16873 (license license:lgpl2.1+)))
16874
16875 (define-public python2-pycountry
16876 (package-with-python2 python-pycountry))
16877
16878 (define-public python-pycosat
16879 (package
16880 (name "python-pycosat")
16881 (version "0.6.3")
16882 (source
16883 (origin
16884 (method url-fetch)
16885 (uri (pypi-uri "pycosat" version ".zip"))
16886 (sha256
16887 (base32
16888 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
16889 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
16890 (build-system python-build-system)
16891 (native-inputs
16892 `(("unzip" ,unzip)))
16893 (home-page "https://github.com/ContinuumIO/pycosat")
16894 (synopsis "Bindings to picosat (a SAT solver)")
16895 (description
16896 "This package provides efficient Python bindings to @code{picosat} on
16897 the C level. When importing pycosat, the @code{picosat} solver becomes part
16898 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
16899 Problem} (SAT) solver.")
16900 (license license:expat)))
16901
16902 (define-public python2-pycosat
16903 (package-with-python2 python-pycosat))
16904
16905 (define-public python2-ruamel.ordereddict
16906 (package
16907 (name "python2-ruamel.ordereddict")
16908 (version "0.4.9")
16909 (source
16910 (origin
16911 (method url-fetch)
16912 (uri (pypi-uri "ruamel.ordereddict" version))
16913 (sha256
16914 (base32
16915 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
16916 (build-system python-build-system)
16917 (arguments
16918 `(#:python ,python-2
16919 #:phases
16920 (modify-phases %standard-phases
16921 (delete 'check)
16922 (add-after 'install 'check
16923 (lambda* (#:key inputs outputs #:allow-other-keys)
16924 (add-installed-pythonpath inputs outputs)
16925 (invoke "python" "test/testordereddict.py"))))))
16926 (home-page "https://bitbucket.org/ruamel/ordereddict")
16927 (synopsis "Version of dict that keeps keys in insertion order")
16928 (description
16929 "This is an implementation of an ordered dictionary with @dfn{Key
16930 Insertion Order} (KIO: updates of values do not affect the position of the
16931 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
16932 removed and put at the back). The standard library module @code{OrderedDict},
16933 implemented later, implements a subset of @code{ordereddict} functionality.
16934 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
16935 Order} (KSO, no sorting function can be specified, but a transform can be
16936 specified to apply on the key before comparison (e.g. @code{string.lower})).")
16937 (license license:expat)))
16938
16939 (define-public python-pypeg2
16940 (package
16941 (name "python-pypeg2")
16942 (version "2.15.2")
16943 (source
16944 (origin
16945 (method url-fetch)
16946 (uri (pypi-uri "pyPEG2" version))
16947 (sha256
16948 (base32
16949 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
16950 (build-system python-build-system)
16951 (propagated-inputs `(("python-lxml" ,python-lxml)))
16952 (arguments
16953 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
16954 '(#:tests? #f))
16955 (home-page "https://fdik.org/pyPEG/")
16956 (synopsis "Parsing Expression Grammars in Python")
16957 (description "PyPEG is an intrinsic parser interpreter framework for
16958 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
16959 parse many formal languages.")
16960 (license license:gpl2)))
16961
16962 (define-public python-incremental
16963 (package
16964 (name "python-incremental")
16965 (version "17.5.0")
16966 (source
16967 (origin
16968 (method url-fetch)
16969 (uri (pypi-uri "incremental" version))
16970 (sha256
16971 (base32
16972 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
16973 (build-system python-build-system)
16974 (home-page "https://github.com/hawkowl/incremental")
16975 (synopsis "Library for versioning Python projects")
16976 (description "Incremental is a small library that versions your Python
16977 projects.")
16978 (license license:expat)))
16979
16980 (define-public python2-incremental
16981 (package-with-python2 python-incremental))
16982
16983 (define-public python-invoke
16984 (package
16985 (name "python-invoke")
16986 (home-page "https://www.pyinvoke.org/")
16987 (version "1.5.0")
16988 (source (origin
16989 (method url-fetch)
16990 (uri (pypi-uri "invoke" version))
16991 (sha256
16992 (base32
16993 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
16994 (build-system python-build-system)
16995 (arguments
16996 ;; XXX: Requires many dependencies that are not yet in Guix.
16997 `(#:tests? #f
16998 #:phases
16999 (modify-phases %standard-phases
17000 (add-after 'unpack 'fix-bash-path
17001 (lambda* (#:key inputs #:allow-other-keys)
17002 (let ((bash (assoc-ref inputs "bash")))
17003 (substitute* "invoke/config.py"
17004 (("shell = \"/bin/bash\"")
17005 (string-append "shell = \"" bash "/bin/bash\""))
17006 )
17007 #t))))))
17008 (inputs
17009 `(("bash" ,bash-minimal)))
17010 (synopsis "Pythonic task execution")
17011 (description
17012 "Invoke is a Python task execution tool and library, drawing inspiration
17013 from various sources to arrive at a powerful and clean feature set. It is
17014 evolved from the Fabric project, but focuses on local and abstract concerns
17015 instead of servers and network commands.")
17016 (license license:bsd-3)))
17017
17018 (define-public python2-invoke
17019 (package-with-python2 python-invoke))
17020
17021 (define-public python-automat
17022 (package
17023 (name "python-automat")
17024 (version "20.2.0")
17025 (source (origin
17026 (method url-fetch)
17027 (uri (pypi-uri "Automat" version))
17028 (sha256
17029 (base32
17030 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
17031 (build-system python-build-system)
17032 ;; We disable the tests because they require python-twisted, while
17033 ;; python-twisted depends on python-automat. Twisted is optional, but the
17034 ;; tests fail if it is not available. Also see
17035 ;; <https://github.com/glyph/automat/issues/71>.
17036 (arguments
17037 `(#:tests? #f
17038 #:phases
17039 (modify-phases %standard-phases
17040 ;; Remove script, because it depends on python-twisted.
17041 (add-after 'unpack 'remove-entrypoint
17042 (lambda _
17043 (substitute* "setup.py"
17044 (("\"automat-visualize = automat._visualize:tool\"") "")))))))
17045 (native-inputs
17046 `(("python-m2r" ,python-m2r)
17047 ("python-setuptools-scm" ,python-setuptools-scm)
17048 ("python-graphviz" ,python-graphviz)))
17049 (propagated-inputs
17050 `(("python-six" ,python-six)
17051 ("python-attrs" ,python-attrs)))
17052 (home-page "https://github.com/glyph/Automat")
17053 (synopsis "Self-service finite-state machines")
17054 (description "Automat is a library for concise, idiomatic Python
17055 expression of finite-state automata (particularly deterministic finite-state
17056 transducers).")
17057 (license license:expat)))
17058
17059 (define-public python2-automat
17060 (package-with-python2 python-automat))
17061
17062 (define-public python-m2r
17063 (package
17064 (name "python-m2r")
17065 (version "0.2.1")
17066 (source (origin
17067 (method url-fetch)
17068 (uri (pypi-uri "m2r" version))
17069 (sha256
17070 (base32
17071 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
17072 (build-system python-build-system)
17073 (propagated-inputs
17074 `(("python-docutils" ,python-docutils)
17075 ("python-mistune" ,python-mistune)))
17076 (native-inputs
17077 `(("python-pygments" ,python-pygments)
17078 ("python-mock" ,python-mock)))
17079 (home-page "https://github.com/miyakogi/m2r")
17080 (synopsis "Markdown to reStructuredText converter")
17081 (description "M2R converts a markdown file including reST markups to valid
17082 reST format.")
17083 (license license:expat)))
17084
17085 (define-public python2-m2r
17086 (package-with-python2 python-m2r))
17087
17088 (define-public python-constantly
17089 (package
17090 (name "python-constantly")
17091 (version "15.1.0")
17092 (source (origin
17093 (method url-fetch)
17094 (uri (pypi-uri "constantly" version))
17095 (sha256
17096 (base32
17097 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
17098 (build-system python-build-system)
17099 (home-page "https://github.com/twisted/constantly")
17100 (synopsis "Symbolic constants in Python")
17101 (description "Constantly is a Python library that provides symbolic
17102 constant support. It includes collections and constants with text, numeric,
17103 and bit flag values.")
17104 (license license:expat)))
17105
17106 (define-public python2-constantly
17107 (package-with-python2 python-constantly))
17108
17109 (define-public python-attrs
17110 (package
17111 (name "python-attrs")
17112 (version "21.2.0")
17113 (source (origin
17114 (method url-fetch)
17115 (uri (pypi-uri "attrs" version))
17116 (sha256
17117 (base32
17118 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
17119 (build-system python-build-system)
17120 (arguments
17121 `(#:phases (modify-phases %standard-phases
17122 (replace 'check
17123 (lambda* (#:key tests? #:allow-other-keys)
17124 (when tests?
17125 (invoke "pytest")))))))
17126 (native-inputs
17127 `(("python-coverage" ,python-coverage)
17128 ("python-hypothesis" ,python-hypothesis)
17129 ("python-pympler" ,python-pympler)
17130 ("python-pytest" ,python-pytest)
17131 ("python-six" ,python-six)))
17132 (home-page "https://github.com/python-attrs/attrs/")
17133 (synopsis "Attributes without boilerplate")
17134 (description "@code{attrs} is a Python package with class decorators that
17135 ease the chores of implementing the most common attribute-related object
17136 protocols.")
17137 (license license:expat)))
17138
17139 (define-public python2-attrs
17140 (package-with-python2 python-attrs))
17141
17142 (define-public python-attrs-bootstrap
17143 (package
17144 (inherit python-attrs)
17145 (name "python-attrs-bootstrap")
17146 (native-inputs `())
17147 (arguments `(#:tests? #f))))
17148
17149 (define-public python2-attrs-bootstrap
17150 (package-with-python2 python-attrs-bootstrap))
17151
17152 (define-public python-cliapp
17153 (package
17154 (name "python-cliapp")
17155 (version "1.20180812.1")
17156 (source
17157 (origin
17158 (method url-fetch)
17159 (uri (string-append
17160 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17161 version ".tar.gz"))
17162 (sha256
17163 (base32
17164 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17165 (build-system python-build-system)
17166 (arguments
17167 `(;; XXX: The tests only do style and coverage checks, which
17168 ;; fails due to deprecation warnings, etc.
17169 #:tests? #f))
17170 (native-inputs
17171 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17172 ("python-pep8" ,python-pep8)))
17173 (propagated-inputs
17174 `(("python-pyaml" ,python-pyaml)))
17175 (home-page "https://liw.fi/cliapp/")
17176 (synopsis "Python framework for command line programs")
17177 (description "@code{cliapp} is a Python framework for command line
17178 programs. It contains the typical stuff such programs need to do, such
17179 as parsing the command line for options, and iterating over input files.")
17180 (license license:gpl2+)))
17181
17182 (define-public python2-cliapp
17183 (package-with-python2 python-cliapp))
17184
17185 (define-public python-ttystatus
17186 (package
17187 (name "python-ttystatus")
17188 (version "0.38")
17189 (source
17190 (origin
17191 (method git-fetch)
17192 (uri (git-reference
17193 (url "http://git.liw.fi/ttystatus")
17194 ;; There are no tags after ttystatus-0.36.
17195 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17196 (sha256
17197 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17198 (file-name (git-file-name name version))))
17199 (build-system python-build-system)
17200 (native-inputs
17201 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17202 ("python-pep8" ,python-pep8)))
17203 (arguments
17204 `(#:phases
17205 (modify-phases %standard-phases
17206 ;; check phase needs to be run before the build phase. If not,
17207 ;; coverage-test-runner looks for tests for the built source files,
17208 ;; and fails.
17209 (delete 'check)
17210 (add-before 'build 'check
17211 (lambda _ (invoke "make" "check"))))))
17212 (home-page "https://liw.fi/ttystatus/")
17213 (synopsis "Python library for showing progress reporting and
17214 status updates on terminals")
17215 (description "@code{ttystatus} is a Python library for showing progress
17216 reporting and status updates on terminals, for command line programs.
17217 Output is automatically adapted to the width of the terminal: truncated
17218 if it does not fit, and resized if the terminal size changes.")
17219 (license license:gpl3+)))
17220
17221 (define-public python2-ttystatus
17222 (package-with-python2 python-ttystatus))
17223
17224 (define-public python2-tracing
17225 (package
17226 (name "python2-tracing")
17227 (version "0.10")
17228 (source
17229 (origin
17230 (method url-fetch)
17231 (uri (string-append
17232 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17233 version ".tar.gz"))
17234 (sha256
17235 (base32
17236 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17237 (build-system python-build-system)
17238 (arguments
17239 `(#:python ,python-2))
17240 (home-page "https://liw.fi/tracing/")
17241 (synopsis "Python debug logging helper")
17242 (description "@code{python2-tracing} is a python library for
17243 logging debug messages. It provides a way to turn debugging messages
17244 on and off, based on the filename they occur in. It is much faster
17245 than using @code{logging.Filter} to accomplish the same thing, which
17246 matters when code is run in production mode. The actual logging still
17247 happens using the @code{logging} library.")
17248 (license license:gpl3+)))
17249
17250 (define-public python-astroid
17251 (package
17252 (name "python-astroid")
17253 (version "2.6.6")
17254 (source
17255 (origin
17256 (method git-fetch)
17257 (uri (git-reference
17258 (url "https://github.com/PyCQA/astroid")
17259 (commit (string-append "v" version))))
17260 (file-name (git-file-name name version))
17261 (sha256
17262 (base32 "1amzf996inwmh4r3mlpzmch60xs6lrg86vppfnwl1y0l8r0y7zxh"))))
17263 (build-system python-build-system)
17264 (propagated-inputs
17265 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17266 ("python-wrapt" ,python-wrapt)))
17267 (native-inputs
17268 `(("python-pytest" ,python-pytest)
17269 ("python-pytest-runner" ,python-pytest-runner)))
17270 (home-page "https://github.com/PyCQA/astroid")
17271 (synopsis "Common base representation of python source code for pylint and
17272 other projects")
17273 (description "@code{python-astroid} provides a common base representation
17274 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17275
17276 It provides a compatible representation which comes from the _ast module. It
17277 rebuilds the tree generated by the builtin _ast module by recursively walking
17278 down the AST and building an extended ast. The new node classes have
17279 additional methods and attributes for different usages. They include some
17280 support for static inference and local name scopes. Furthermore, astroid
17281 builds partial trees by inspecting living objects.")
17282 (license license:lgpl2.1+)
17283 (properties `((python2-variant . ,(delay python2-astroid))))))
17284
17285 (define-public python2-astroid
17286 (let ((base (package-with-python2
17287 (strip-python2-variant python-astroid))))
17288 (package (inherit base)
17289 ;; Version 2.x removes python2 support.
17290 (version "1.6.5")
17291 (source
17292 (origin
17293 (method url-fetch)
17294 (uri (pypi-uri "astroid" version))
17295 (sha256
17296 (base32
17297 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17298 (arguments
17299 (substitute-keyword-arguments (package-arguments base)
17300 ((#:phases phases)
17301 `(modify-phases ,phases
17302 (add-after 'unpack 'remove-spurious-test
17303 (lambda _
17304 ;; https://github.com/PyCQA/astroid/issues/276
17305 (delete-file "astroid/tests/unittest_brain.py")
17306 #t))
17307 (replace 'check
17308 (lambda _
17309 (invoke"python" "-m" "unittest" "discover"
17310 "-p" "unittest*.py")))))))
17311 (native-inputs `())
17312 (propagated-inputs
17313 `(("python2-backports-functools-lru-cache"
17314 ,python2-backports-functools-lru-cache)
17315 ("python2-enum34" ,python2-enum34)
17316 ("python2-singledispatch" ,python2-singledispatch)
17317 ,@(alist-delete "python-typed-ast"
17318 (package-propagated-inputs base)))))))
17319
17320 (define-public python-isbnlib
17321 (package
17322 (name "python-isbnlib")
17323 (version "3.10.4")
17324 (source
17325 (origin
17326 (method url-fetch)
17327 (uri (pypi-uri "isbnlib" version))
17328 (sha256
17329 (base32
17330 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
17331 (build-system python-build-system)
17332 (arguments '(#:tests? #f)) ; No test
17333 (home-page "https://github.com/xlcnd/isbnlib")
17334 (synopsis "Python library to work with ISBN strings")
17335 (description "@code{python-isbnlib} is a (pure) python library that provides
17336 several useful methods and functions to validate, clean, transform, hyphenate and
17337 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
17338 version, is suitable to be include as a dependency in other projects.")
17339 (license license:lgpl3+)))
17340
17341 (define-public python-isort
17342 (package
17343 (name "python-isort")
17344 (version "5.7.0")
17345 (source
17346 (origin
17347 (method git-fetch)
17348 (uri (git-reference
17349 ;; Tests pass only from the Github sources
17350 (url "https://github.com/timothycrosley/isort")
17351 (commit version)))
17352 (file-name (git-file-name name version))
17353 (modules '((guix build utils)))
17354 (snippet '(for-each delete-file (find-files "." "\\.whl$")))
17355 (sha256
17356 (base32
17357 "0phq4s911mjjdyr5h5siz93jnpkqb2qgphgcfk6axncgxr8i7vi1"))))
17358 (build-system python-build-system)
17359 (arguments
17360 `(#:phases
17361 (modify-phases %standard-phases
17362 ;; A foretaste of what our future python-build-system will need to
17363 ;; do.
17364 (replace 'build
17365 (lambda _
17366 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
17367 (replace 'install
17368 (lambda* (#:key outputs #:allow-other-keys)
17369 (let ((out (assoc-ref outputs "out"))
17370 (whl (car (find-files "dist" "\\.whl$"))))
17371 (invoke "pip" "--no-cache-dir" "--no-input"
17372 "install" "--no-deps" "--prefix" out whl))))
17373 (add-after 'install 'install-example-plugins
17374 (lambda* (#:key outputs #:allow-other-keys)
17375 (let ((out (assoc-ref outputs "out")))
17376 ;; Patch to use the core poetry API.
17377 (substitute* '("example_isort_formatting_plugin/pyproject.toml"
17378 "example_shared_isort_profile/pyproject.toml")
17379 (("poetry>=0.12")
17380 "poetry-core>=1.0.0")
17381 (("poetry.masonry.api")
17382 "poetry.core.masonry.api"))
17383 ;; Build the example plugins.
17384 (for-each (lambda (source-directory)
17385 (invoke "python" "-m" "build" "--wheel"
17386 "--no-isolation" "--outdir=dist"
17387 source-directory))
17388 '("example_isort_formatting_plugin"
17389 "example_shared_isort_profile"))
17390 ;; Install them to temporary storage, for the test.
17391 (setenv "HOME" (getcwd))
17392 (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
17393 (apply invoke "pip" "--no-cache-dir" "--no-input"
17394 "install" "--user" "--no-deps" example-whls)))))
17395 (replace 'check
17396 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17397 (when tests?
17398 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
17399 (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
17400 (add-installed-pythonpath inputs outputs)
17401 (invoke "pytest" "-vv" "tests/unit/"
17402 "--ignore=tests/unit/test_deprecated_finders.py")))))))
17403 (native-inputs
17404 `(("git" ,git-minimal)
17405 ("python-black" ,python-black)
17406 ("python-colorama" ,python-colorama)
17407 ("python-hypothesmith" ,python-hypothesmith)
17408 ("python-libcst" ,python-libcst-minimal)
17409 ("python-poetry-core" ,python-poetry-core)
17410 ("python-pylama" ,python-pylama)
17411 ("python-pypa-build" ,python-pypa-build)
17412 ("python-pytest-mock" ,python-pytest-mock)
17413 ("python-pytest" ,python-pytest)))
17414 (home-page "https://github.com/PyCQA/isort")
17415 (synopsis "Python utility/library to sort python imports")
17416 (description "@code{python-isort} is a python utility/library to sort
17417 imports alphabetically, and automatically separated into sections. It
17418 provides a command line utility, a python library and plugins for various
17419 editors.")
17420 (license license:expat)
17421 (properties `((python2-variant . ,(delay python2-isort))))))
17422
17423 (define-public python2-isort
17424 (let ((base (package-with-python2
17425 (strip-python2-variant python-isort))))
17426 (package/inherit base
17427 (native-inputs
17428 `(("python2-futures" ,python2-futures)
17429 ,@(package-native-inputs base))))))
17430
17431 (define-public python2-backports-functools-lru-cache
17432 (package
17433 (name "python2-backports-functools-lru-cache")
17434 (version "1.6.1")
17435 (source
17436 (origin
17437 (method url-fetch)
17438 ;; only the pypi tarballs contain the necessary metadata
17439 (uri (pypi-uri "backports.functools_lru_cache" version))
17440 (sha256
17441 (base32
17442 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
17443 (build-system python-build-system)
17444 (native-inputs
17445 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
17446 (arguments
17447 `(#:python ,python-2))
17448 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
17449 (synopsis "Backport of functools.lru_cache from Python 3.3")
17450 (description "@code{python2-backports-functools-lru-cache} is a backport
17451 of @code{functools.lru_cache} from python 3.3.")
17452 (license license:expat)))
17453
17454 (define-public python-configparser
17455 (package
17456 (name "python-configparser")
17457 (version "4.0.2")
17458 (source
17459 (origin
17460 (method url-fetch)
17461 (uri (pypi-uri "configparser" version))
17462 (sha256
17463 (base32
17464 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
17465 (native-inputs
17466 `(("python-setuptools_scm" ,python-setuptools-scm)))
17467 (build-system python-build-system)
17468 (home-page "https://github.com/jaraco/configparser/")
17469 (synopsis "Backport of configparser from python 3.5")
17470 (description "@code{python-configparser} is a backport of
17471 @code{configparser} from Python 3.5 so that it can be used directly
17472 in other versions.")
17473 (license license:expat)))
17474
17475 (define-public python2-configparser
17476 (package-with-python2 python-configparser))
17477
17478 (define-public python-iniconfig
17479 (package
17480 (name "python-iniconfig")
17481 (version "1.1.1")
17482 (source
17483 (origin
17484 (method url-fetch)
17485 (uri (pypi-uri "iniconfig" version))
17486 (sha256
17487 (base32
17488 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
17489 (build-system python-build-system)
17490 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
17491 (synopsis "Simple INI-file parser")
17492 (description "The @code{iniconfig} package provides a small and simple
17493 INI-file parser module having a unique set of features; @code{iniconfig}
17494 @itemize
17495 @item maintains the order of sections and entries;
17496 @item supports multi-line values with or without line-continuations;
17497 @item supports \"#\" comments everywhere;
17498 @item raises errors with proper line-numbers;
17499 @item raises an error when two sections have the same name.
17500 @end itemize")
17501 (license license:expat)))
17502
17503 (define-public python-mamba
17504 (package
17505 (name "python-mamba")
17506 (version "0.11.2")
17507 (source (origin
17508 (method url-fetch)
17509 (uri (pypi-uri "mamba" version))
17510 (sha256
17511 (base32
17512 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
17513 (build-system python-build-system)
17514 (arguments `(#:tests? #f)) ; No test
17515 (propagated-inputs
17516 `(("python-clint" ,python-clint)
17517 ("python-coverage" ,python-coverage)))
17518 (home-page "https://nestorsalceda.com/mamba/")
17519 (synopsis "Test runner for Python")
17520 (description
17521 "Mamba is a Behaviour-Driven Development tool for Python developers.
17522 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
17523 (license license:expat)))
17524
17525 (define-public python-mando
17526 (package
17527 (name "python-mando")
17528 (version "0.6.4")
17529 (source (origin
17530 (method url-fetch)
17531 (uri (pypi-uri "mando" version))
17532 (sha256
17533 (base32
17534 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
17535 (build-system python-build-system)
17536 (propagated-inputs
17537 `(("python-rst2ansi" ,python-rst2ansi)
17538 ("python-six" ,python-six)))
17539 (native-inputs
17540 `(("python-pytest" ,python-pytest)))
17541 (home-page "https://mando.readthedocs.org/")
17542 (synopsis
17543 "Wrapper around argparse, allowing creation of complete CLI applications")
17544 (description
17545 "This package is a wrapper around argparse, allowing you to write complete CLI
17546 applications in seconds while maintaining all the flexibility.")
17547 (license license:expat)))
17548
17549 (define-public python2-mando
17550 (package-with-python2 python-mando))
17551
17552 (define-public python2-argparse
17553 (package
17554 (name "python2-argparse")
17555 (version "1.4.0")
17556 (source
17557 (origin
17558 (method url-fetch)
17559 (uri (pypi-uri "argparse" version))
17560 (sha256
17561 (base32
17562 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
17563 (build-system python-build-system)
17564 (arguments
17565 `(#:python ,python-2))
17566 (home-page "https://github.com/ThomasWaldmann/argparse/")
17567 (synopsis "Python command-line parsing library")
17568 (description
17569 "This package is mostly for people who want to have @code{argparse} on
17570 older Pythons because it was not part of the standard library back then.")
17571 (license license:psfl)))
17572
17573 (define-public python-mwclient
17574 (package
17575 (name "python-mwclient")
17576 (version "0.10.1")
17577 (source
17578 (origin
17579 (method git-fetch)
17580 ;; The PyPI version wouldn't contain tests.
17581 (uri (git-reference
17582 (url "https://github.com/mwclient/mwclient")
17583 (commit (string-append "v" version))))
17584 (file-name (git-file-name name version))
17585 (sha256
17586 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
17587 (build-system python-build-system)
17588 (propagated-inputs
17589 `(("python-requests-oauthlib" ,python-requests-oauthlib)
17590 ("python-six" ,python-six)))
17591 (native-inputs
17592 `(("python-mock" ,python-mock)
17593 ("python-pytest" ,python-pytest)
17594 ("python-pytest-cov" ,python-pytest-cov)
17595 ("python-pytest-runner" ,python-pytest-runner)
17596 ("python-responses" ,python-responses)))
17597 (home-page "https://github.com/btongminh/mwclient")
17598 (synopsis "MediaWiki API client")
17599 (description "This package provides a MediaWiki API client.")
17600 (license license:expat)))
17601
17602 (define-public python-utils
17603 (package
17604 (name "python-utils")
17605 (version "2.4.0")
17606 (source (origin
17607 (method url-fetch)
17608 (uri (pypi-uri "python-utils" version))
17609 (sha256
17610 (base32
17611 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
17612 (build-system python-build-system)
17613 (arguments
17614 `(#:phases
17615 (modify-phases %standard-phases
17616 (replace 'check
17617 (lambda* (#:key inputs outputs #:allow-other-keys)
17618 (add-installed-pythonpath inputs outputs)
17619 (delete-file "pytest.ini")
17620 (invoke "pytest" "-vv"))))))
17621 (native-inputs
17622 `(("pytest-runner" ,python-pytest-runner)
17623 ("pytest" ,python-pytest)
17624 ("six" ,python-six)))
17625 (home-page "https://github.com/WoLpH/python-utils")
17626 (synopsis "Convenient utilities not included with the standard Python install")
17627 (description
17628 "Python Utils is a collection of small Python functions and classes which
17629 make common patterns shorter and easier.")
17630 (license license:bsd-2)))
17631
17632 (define-public python-diff-match-patch
17633 (package
17634 (name "python-diff-match-patch")
17635 (version "20121119")
17636 (source
17637 (origin
17638 (method url-fetch)
17639 (uri (pypi-uri "diff-match-patch" version))
17640 (sha256
17641 (base32
17642 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
17643 (build-system python-build-system)
17644 (home-page "https://code.google.com/p/google-diff-match-patch")
17645 (synopsis "Synchronize plain text")
17646 (description "Diff Match and Patch libraries offer robust algorithms to
17647 perform the operations required for synchronizing plain text.")
17648 (license license:asl2.0)))
17649
17650 (define-public python2-diff-match-patch
17651 (package-with-python2 python-diff-match-patch))
17652
17653 (define-public python-dirsync
17654 (package
17655 (name "python-dirsync")
17656 (version "2.2.5")
17657 (source
17658 (origin
17659 (method url-fetch)
17660 (uri (pypi-uri "dirsync" version))
17661 (sha256
17662 (base32
17663 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
17664 (build-system python-build-system)
17665 (propagated-inputs
17666 `(("six" ,python-six)))
17667 (home-page "https://github.com/tkhyn/dirsync")
17668 (synopsis "Advanced directory tree synchronisation tool")
17669 (description "Advanced directory tree synchronisation tool.")
17670 (license license:expat)))
17671
17672 (define-public python2-dirsync
17673 (package-with-python2 python-dirsync))
17674
17675 (define-public python-levenshtein
17676 (package
17677 (name "python-levenshtein")
17678 (version "0.12.0")
17679 (source
17680 (origin
17681 (method url-fetch)
17682 (uri (pypi-uri "python-Levenshtein" version))
17683 (sha256
17684 (base32
17685 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
17686 (build-system python-build-system)
17687 (home-page "https://github.com/ztane/python-Levenshtein")
17688 (synopsis "Fast computation of Levenshtein distance and string similarity")
17689 (description
17690 "The Levenshtein Python C extension module contains functions for fast computation of
17691 @enumerate
17692 @item Levenshtein (edit) distance, and edit operations
17693 @item string similarity
17694 @item approximate median strings, and generally string averaging
17695 @item string sequence and set similarity
17696 @end enumerate
17697 It supports both normal and Unicode strings.")
17698 (license license:gpl2+)))
17699
17700 (define-public python2-levenshtein
17701 (package-with-python2 python-levenshtein))
17702
17703 (define-public python-scandir
17704 (package
17705 (name "python-scandir")
17706 (version "1.10.0")
17707 (source
17708 (origin
17709 (method url-fetch)
17710 (uri (pypi-uri "scandir" version))
17711 (sha256
17712 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
17713 (build-system python-build-system)
17714 (arguments
17715 `(#:phases (modify-phases %standard-phases
17716 (replace 'check
17717 (lambda _
17718 (invoke "python" "test/run_tests.py"))))))
17719 (home-page "https://github.com/benhoyt/scandir")
17720 (synopsis "Directory iteration function")
17721 (description
17722 "Directory iteration function like os.listdir(), except that instead of
17723 returning a list of bare filenames, it yields DirEntry objects that include
17724 file type and stat information along with the name. Using scandir() increases
17725 the speed of os.walk() by 2-20 times (depending on the platform and file
17726 system) by avoiding unnecessary calls to os.stat() in most cases.
17727
17728 This package is part of the Python standard library since version 3.5.")
17729 (license license:bsd-3)))
17730
17731 (define-public python2-scandir
17732 (package-with-python2 python-scandir))
17733
17734 (define-public python2-stemming
17735 (package
17736 (name "python2-stemming")
17737 (version "1.0.1")
17738 (source
17739 (origin
17740 (method url-fetch)
17741 (uri (pypi-uri "stemming" version))
17742 (sha256
17743 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
17744 (build-system python-build-system)
17745 (arguments
17746 `(#:python ,python-2))
17747 (home-page "https://bitbucket.org/mchaput/stemming/overview")
17748 (synopsis "Python implementations of various stemming algorithms")
17749 (description
17750 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
17751 stemming algorithms for English. These implementations are straightforward and
17752 efficient, unlike some Python versions of the same algorithms available on the
17753 Web. This package is an extraction of the stemming code included in the Whoosh
17754 search engine.")
17755 (license license:public-domain)))
17756
17757 (define-public python-factory-boy
17758 (package
17759 (name "python-factory-boy")
17760 (version "2.8.1")
17761 (source
17762 (origin
17763 (method url-fetch)
17764 (uri (pypi-uri "factory_boy" version))
17765 (sha256
17766 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
17767 (build-system python-build-system)
17768 (arguments
17769 ;; Tests are not included in the tarball.
17770 `(#:tests? #f))
17771 (propagated-inputs
17772 `(("faker" ,python-faker)))
17773 (home-page "https://github.com/benhoyt/scandir")
17774 (synopsis "Versatile test fixtures replacement")
17775 (description
17776 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
17777
17778 As a fixtures replacement tool, it aims to replace static, hard to maintain
17779 fixtures with easy-to-use factories for complex object.
17780
17781 Instead of building an exhaustive test setup with every possible combination
17782 of corner cases, factory_boy allows you to use objects customized for the
17783 current test, while only declaring the test-specific fields")
17784 (license license:expat)))
17785
17786 (define-public python-translate-toolkit
17787 (package
17788 (name "python-translate-toolkit")
17789 (version "2.1.0")
17790 (source
17791 (origin
17792 (method url-fetch)
17793 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
17794 (sha256
17795 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
17796 (build-system python-build-system)
17797 (native-inputs
17798 `(("python-pytest" ,python-pytest)
17799 ("python-sphinx" ,python-sphinx)))
17800 (propagated-inputs
17801 `(("python-babel" ,python-babel)
17802 ("python-beautifulsoup4" ,python-beautifulsoup4)
17803 ("python-chardet" ,python-chardet)
17804 ("python-diff-match-patch" ,python-diff-match-patch)
17805 ("python-levenshtein" ,python-levenshtein)
17806 ("python-lxml" ,python-lxml)
17807 ("python-six" ,python-six)
17808 ("python-vobject" ,python-vobject)
17809 ("python-pyyaml" ,python-pyyaml)))
17810 (arguments
17811 ;; TODO: tests are not run, because they end with
17812 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
17813 ;; 'parse_funcs'
17814 ;; during test setup.
17815 `(#:tests? #f))
17816 (home-page "https://toolkit.translatehouse.org")
17817 (synopsis "Tools and API for translation and localization engineering")
17818 (description
17819 "Tools and API for translation and localization engineering. It contains
17820 several utilities, as well as an API for building localization tools.")
17821 (license license:gpl2+)))
17822
17823 (define-public python2-translate-toolkit
17824 (package-with-python2 python-translate-toolkit))
17825
17826 (define-public python-packaging
17827 (package
17828 (name "python-packaging")
17829 (version "20.0")
17830 (source
17831 (origin
17832 (method url-fetch)
17833 (uri (pypi-uri "packaging" version))
17834 ;; XXX: The URL in the patch file is wrong, it should be
17835 ;; <https://github.com/pypa/packaging/pull/256>.
17836 (patches (search-patches "python-packaging-test-arch.patch"))
17837 (sha256
17838 (base32
17839 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
17840 (build-system python-build-system)
17841 (arguments
17842 `(#:phases (modify-phases %standard-phases
17843 (replace 'check
17844 (lambda* (#:key tests? #:allow-other-keys)
17845 (if tests?
17846 (invoke "py.test" "-vv")
17847 (format #t "test suite not run~%"))
17848 #t)))))
17849 (native-inputs
17850 `(("python-pretend" ,python-pretend)
17851 ("python-pytest" ,python-pytest)))
17852 (propagated-inputs
17853 `(("python-pyparsing" ,python-pyparsing)
17854 ("python-six" ,python-six)))
17855 (home-page "https://github.com/pypa/packaging")
17856 (synopsis "Core utilities for Python packages")
17857 (description "Packaging is a Python module for dealing with Python packages.
17858 It offers an interface for working with package versions, names, and dependency
17859 information.")
17860 ;; From 'LICENSE': This software is made available under the terms of
17861 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
17862 ;; Contributions to this software is made under the terms of *both* these
17863 ;; licenses.
17864 (license (list license:asl2.0 license:bsd-2))))
17865
17866 (define-public python2-packaging
17867 (package-with-python2 python-packaging))
17868
17869 ;; Variants with minimal dependencies, for bootstrapping Pytest.
17870 (define-public python-packaging-bootstrap
17871 (hidden-package
17872 (package/inherit
17873 python-packaging
17874 (name "python-packaging-bootstrap")
17875 (arguments
17876 (substitute-keyword-arguments (package-arguments python-packaging)
17877 ((#:phases phases)
17878 `(modify-phases ,phases
17879 (add-after 'unpack 'fix-dependencies
17880 (lambda* (#:key tests? #:allow-other-keys)
17881 (substitute* "setup.py" (("\"six\"") ""))))))
17882 ((#:tests? _ #f) #f)))
17883 (native-inputs '())
17884 (propagated-inputs
17885 `(("python-pyparsing" ,python-pyparsing))))))
17886
17887 (define-public python2-packaging-bootstrap
17888 (hidden-package
17889 (package/inherit
17890 python2-packaging
17891 (name "python2-packaging-bootstrap")
17892 (native-inputs '())
17893 (propagated-inputs
17894 `(("python-pyparsing" ,python2-pyparsing)
17895 ("python-six" ,python2-six-bootstrap)))
17896 (arguments
17897 `(#:tests? #f
17898 ,@(package-arguments python2-packaging))))))
17899
17900 (define-public python-relatorio
17901 (package
17902 (name "python-relatorio")
17903 (version "0.10.0")
17904 (source
17905 (origin
17906 (method url-fetch)
17907 (uri (pypi-uri "relatorio" version))
17908 (sha256
17909 (base32
17910 "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
17911 (build-system python-build-system)
17912 (propagated-inputs
17913 `(("python-lxml" ,python-lxml)
17914 ("python-genshi" ,python-genshi)))
17915 (native-inputs
17916 `(("python-magic" ,python-magic)))
17917 (home-page "https://relatorio.tryton.org/")
17918 (synopsis "Templating library able to output ODT and PDF files")
17919 (description "Relatorio is a templating library which provides a way to
17920 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
17921 for more filetypes can be easily added by creating plugins for them.")
17922 (license license:gpl3+)))
17923
17924 (define-public python2-relatorio
17925 (package-with-python2 python-relatorio))
17926
17927 (define-public python-radon
17928 (package
17929 (name "python-radon")
17930 (version "4.1.0")
17931 (source
17932 (origin
17933 (method url-fetch)
17934 (uri (pypi-uri "radon" version))
17935 (sha256
17936 (base32
17937 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
17938 (build-system python-build-system)
17939 (arguments
17940 `(#:phases (modify-phases %standard-phases
17941 (add-after 'unpack 'relax-requirements
17942 (lambda _
17943 (substitute* "setup.py"
17944 ((".*'future'.*")
17945 "")
17946 (("colorama==0.4.1")
17947 "colorama>=0.4.1"))))
17948 (replace 'check
17949 (lambda _
17950 (invoke "python" "radon/tests/run.py"))))))
17951 (propagated-inputs
17952 `(("python-colorama" ,python-colorama)
17953 ("python-flake8-polyfill" ,python-flake8-polyfill)
17954 ("python-mando" ,python-mando)))
17955 (native-inputs
17956 `(("python-pytest" ,python-pytest)
17957 ("python-pytest-mock" ,python-pytest-mock)))
17958 (home-page "https://radon.readthedocs.org/")
17959 (synopsis "Code Metrics in Python")
17960 (description "Radon is a Python tool which computes various code metrics.
17961 Supported metrics are:
17962 @itemize @bullet
17963 @item raw metrics: SLOC, comment lines, blank lines, &c.
17964 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
17965 @item Halstead metrics (all of them)
17966 @item the Maintainability Index (a Visual Studio metric)
17967 @end itemize")
17968 (properties `((python2-variant . ,(delay python2-radon))))
17969 (license license:expat)))
17970
17971 (define-public python2-radon
17972 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
17973 (package/inherit base
17974 (propagated-inputs
17975 `(("python-configparser" ,python2-configparser)
17976 ("python-future" ,python2-future)
17977 ,@(package-propagated-inputs base))))))
17978
17979 (define-public python-sure
17980 (package
17981 (name "python-sure")
17982 (version "1.4.11")
17983 (source
17984 (origin
17985 (method url-fetch)
17986 (uri (pypi-uri "sure" version))
17987 (sha256
17988 (base32
17989 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
17990 (build-system python-build-system)
17991 (propagated-inputs
17992 `(("python-mock" ,python-mock)
17993 ("python-six" ,python-six)))
17994 (native-inputs
17995 `(("python-nose" ,python-nose)))
17996 (home-page "https://github.com/gabrielfalcao/sure")
17997 (synopsis "Automated testing library in python for python")
17998 (description
17999 "Sure is a python library that leverages a DSL for writing assertions.
18000 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
18001 (license license:gpl3+)))
18002
18003 (define-public python2-sure
18004 (package-with-python2 python-sure))
18005
18006 (define-public python2-couleur
18007 ;; This package does not seem to support python3 at all, hence,
18008 ;; only the python2 variant definition is provided.
18009 (package
18010 (name "python2-couleur")
18011 (version "0.6.2")
18012 (source
18013 (origin
18014 (method url-fetch)
18015 (uri (pypi-uri "couleur" version))
18016 (sha256
18017 (base32
18018 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
18019 (build-system python-build-system)
18020 (arguments
18021 `(#:python ,python-2))
18022 (home-page "https://github.com/gabrielfalcao/couleur")
18023 (synopsis
18024 "ANSI terminal tool for python, colored shell and other handy fancy features")
18025 (description
18026 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
18027 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
18028 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
18029 ;; https://github.com/gabrielfalcao/couleur/issues/11
18030 (license license:lgpl3+)))
18031
18032 (define-public python-misaka
18033 (package
18034 (name "python-misaka")
18035 (version "2.1.1")
18036 (source
18037 (origin
18038 (method url-fetch)
18039 (uri (pypi-uri "misaka" version))
18040 (sha256
18041 (base32
18042 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
18043 (build-system python-build-system)
18044 (arguments
18045 `(;; Line 37 of setup.py calls self.run_command('develop')
18046 ;; in the 'check' phase. This command seems to be trying
18047 ;; to write to
18048 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
18049 ;; for which it does not have the permission to write.
18050 #:tests? #f))
18051 (propagated-inputs
18052 `(("python-cffi" ,python-cffi)))
18053 (home-page "https://github.com/FSX/misaka")
18054 (synopsis "Python binding for Hoedown")
18055 (description
18056 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
18057 library written in C. It features a fast HTML renderer and functionality to make custom
18058 renderers (e.g. man pages or LaTeX).")
18059 (license license:expat)))
18060
18061 (define-public python2-misaka
18062 (package-with-python2 python-misaka))
18063
18064 (define-public python2-steadymark
18065 ;; This is forced into being a python2 only variant
18066 ;; due to its dependence on couleur that has no support
18067 ;; for python3
18068 (package
18069 (name "python2-steadymark")
18070 (version "0.7.3")
18071 (source
18072 (origin
18073 (method url-fetch)
18074 (uri (pypi-uri "steadymark" version))
18075 (sha256
18076 (base32
18077 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
18078 (build-system python-build-system)
18079 (native-inputs
18080 `(("python-couleur" ,python2-couleur)
18081 ("python-sure" ,python2-sure)
18082 ("python-misaka" ,python2-misaka)))
18083 (arguments
18084 `(#:python ,python-2
18085 #:phases
18086 (modify-phases %standard-phases
18087 (add-before 'build 'patch-setup-py
18088 (lambda _
18089 ;; Update requirements from dependency==version
18090 ;; to dependency>=version
18091 (substitute* "setup.py"
18092 (("==") ">="))
18093 #t)))))
18094 (home-page "https://github.com/gabrielfalcao/steadymark")
18095 (synopsis "Markdown-based test runner for python")
18096 (description
18097 "@code{Steadymark} allows documentation to be written in github-flavoured
18098 markdown. The documentation may contain snippets of code surrounded by python
18099 code blocks and @code{Steadymark} will find these snippets and run them, making
18100 sure that there are no old malfunctional examples in the documentation examples.")
18101 (license license:expat)))
18102
18103 (define-public python-jsonpointer
18104 (package
18105 (name "python-jsonpointer")
18106 (version "1.10")
18107 (source
18108 (origin
18109 (method url-fetch)
18110 (uri (pypi-uri "jsonpointer" version))
18111 (sha256
18112 (base32
18113 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
18114 (build-system python-build-system)
18115 (home-page "https://github.com/stefankoegl/python-json-pointer")
18116 (synopsis "Identify specific nodes in a JSON document")
18117 (description "@code{jsonpointer} allows you to access specific nodes
18118 by path in a JSON document (see RFC 6901).")
18119 (license license:bsd-3)))
18120
18121 (define-public python2-jsonpointer
18122 (package-with-python2 python-jsonpointer))
18123
18124 (define-public python-jsonpatch
18125 (package
18126 (name "python-jsonpatch")
18127 (version "1.16")
18128 (source
18129 (origin
18130 (method git-fetch)
18131 ;; pypi version lacks tests.js
18132 (uri (git-reference
18133 (url "https://github.com/stefankoegl/python-json-patch")
18134 (commit (string-append "v" version))))
18135 (file-name (git-file-name name version))
18136 (sha256
18137 (base32
18138 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18139 (build-system python-build-system)
18140 (propagated-inputs
18141 `(("python-jsonpointer" ,python-jsonpointer)))
18142 (home-page "https://github.com/stefankoegl/python-json-patch")
18143 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18144 (description "@code{jsonpatch} is a library and program that allows
18145 applying JSON Patches according to RFC 6902.")
18146 (license license:bsd-3)))
18147
18148 (define-public python2-jsonpatch
18149 (package-with-python2 python-jsonpatch))
18150
18151 (define-public python-jsonpatch-0.4
18152 (package (inherit python-jsonpatch)
18153 (name "python-jsonpatch")
18154 (version "0.4")
18155 (source
18156 (origin
18157 (method git-fetch)
18158 (uri (git-reference
18159 (url "https://github.com/stefankoegl/python-json-patch")
18160 (commit (string-append "v" version))))
18161 (file-name (git-file-name name version))
18162 (sha256
18163 (base32
18164 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18165
18166 (define-public python2-jsonpatch-0.4
18167 (package-with-python2 python-jsonpatch-0.4))
18168
18169 (define-public python-rfc3986
18170 (package
18171 (name "python-rfc3986")
18172 (version "1.4.0")
18173 (source (origin
18174 (method url-fetch)
18175 (uri (pypi-uri "rfc3986" version))
18176 (sha256
18177 (base32
18178 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18179 (build-system python-build-system)
18180 (arguments
18181 `(#:phases
18182 (modify-phases %standard-phases
18183 (replace 'check
18184 (lambda _
18185 (invoke "pytest" "-v"))))))
18186 (native-inputs
18187 `(("python-pytest" ,python-pytest)))
18188 (home-page "https://rfc3986.readthedocs.io/")
18189 (synopsis "Parse and validate URI references")
18190 (description
18191 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18192 validation and authority parsing. This module also supports RFC@tie{}6874
18193 which adds support for zone identifiers to IPv6 addresses.")
18194 (license license:asl2.0)))
18195
18196 (define-public python2-rfc3986
18197 (package-with-python2 python-rfc3986))
18198
18199 (define-public python-rfc3987
18200 (package
18201 (name "python-rfc3987")
18202 (version "1.3.7")
18203 (source
18204 (origin
18205 (method url-fetch)
18206 (uri (pypi-uri "rfc3987" version))
18207 (sha256
18208 (base32
18209 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18210 (build-system python-build-system)
18211 (home-page "https://pypi.org/project/rfc3987/")
18212 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18213 (description "@code{rfc3987} provides routines for parsing and
18214 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18215 (license license:gpl3+)))
18216
18217 (define-public python2-rfc3987
18218 (package-with-python2 python-rfc3987))
18219
18220 ;; The latest commit contains fixes for building with both python3 and python2.
18221 (define-public python-rfc6555
18222 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18223 (revision "1"))
18224 (package
18225 (name "python-rfc6555")
18226 (version (git-version "0.0.0" revision commit))
18227 (source (origin
18228 (method git-fetch)
18229 (uri (git-reference
18230 (url "https://github.com/sethmlarson/rfc6555")
18231 (commit commit)))
18232 (file-name (git-file-name name version))
18233 (sha256
18234 (base32
18235 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18236 (build-system python-build-system)
18237 (arguments
18238 '(#:phases
18239 (modify-phases %standard-phases
18240 (replace 'check
18241 (lambda* (#:key tests? #:allow-other-keys)
18242 (if tests?
18243 ;; Other tests require network access.
18244 (invoke "pytest" "tests/test_ipv6.py")
18245 #t))))))
18246 (native-inputs
18247 `(("python-pytest" ,python-pytest)))
18248 (home-page "https://pypi.org/project/rfc6555/")
18249 (synopsis "Python implementation of RFC 6555")
18250 (description
18251 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18252 6555. Provided with a single file and dead-simple API to allow easy vendoring
18253 and integration into other projects.")
18254 (license license:asl2.0))))
18255
18256 (define-public python-bagit
18257 (package
18258 (name "python-bagit")
18259 (version "1.7.0")
18260 (source
18261 (origin
18262 (method url-fetch)
18263 (uri (pypi-uri "bagit" version))
18264 (sha256
18265 (base32
18266 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18267 (build-system python-build-system)
18268 (native-inputs
18269 `(("python-setuptools-scm" ,python-setuptools-scm)
18270 ("python-coverage" ,python-coverage)
18271 ("python-mock" ,python-mock)))
18272 (home-page "https://libraryofcongress.github.io/bagit-python/")
18273 (synopsis "Create and validate BagIt packages")
18274 (description "Bagit is a Python library and command line utility for working
18275 with BagIt style packages. BagIt is a minimalist packaging format for digital
18276 preservation.")
18277 (license license:cc0)))
18278
18279 (define-public python-prov
18280 (package
18281 (name "python-prov")
18282 (version "2.0.0")
18283 (source
18284 (origin
18285 (method url-fetch)
18286 (uri (pypi-uri "prov" version))
18287 (sha256
18288 (base32
18289 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18290 (build-system python-build-system)
18291 (propagated-inputs
18292 `(("python-dateutil" ,python-dateutil)
18293 ("python-lxml" ,python-lxml)
18294 ("python-networkx" ,python-networkx)
18295 ("python-rdflib" ,python-rdflib)))
18296 (native-inputs
18297 `(("graphviz" ,graphviz)
18298 ("python-pydot" ,python-pydot)))
18299 (home-page "https://github.com/trungdong/prov")
18300 (synopsis
18301 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18302 (description
18303 "This package provides a library for W3C Provenance Data Model supporting
18304 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18305 (license license:expat)))
18306
18307 (define-public python-arcp
18308 (package
18309 (name "python-arcp")
18310 (version "0.2.1")
18311 (source
18312 (origin
18313 (method url-fetch)
18314 (uri (pypi-uri "arcp" version))
18315 (sha256
18316 (base32
18317 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
18318 (build-system python-build-system)
18319 (native-inputs
18320 `(("python-pytest" ,python-pytest)))
18321 (home-page "http://arcp.readthedocs.io/")
18322 (synopsis
18323 "Archive and Package URI parser and generator")
18324 (description
18325 "@acronym{arcp, Archive and Package} provides functions for creating
18326 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
18327 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
18328 consume or reference hypermedia resources bundled inside a file archive or an
18329 application package, as well as to resolve URIs for archive resources within a
18330 programmatic framework. This URI scheme provides mechanisms to generate a
18331 unique base URI to represent the root of the archive, so that relative URI
18332 references in a bundled resource can be resolved within the archive without
18333 having to extract the archive content on the local file system. An arcp URI can
18334 be used for purposes of isolation (e.g. when consuming multiple archives),
18335 security constraints (avoiding \"climb out\" from the archive), or for
18336 externally identiyfing sub-resources referenced by hypermedia formats.")
18337 (license license:asl2.0)))
18338
18339 (define-public python-shellescape
18340 (package
18341 (name "python-shellescape")
18342 (version "3.8.1")
18343 (source
18344 (origin
18345 (method git-fetch)
18346 (uri (git-reference
18347 (url "https://github.com/chrissimpkins/shellescape")
18348 (commit (string-append "v" version))))
18349 (file-name (git-file-name name version))
18350 (sha256
18351 (base32
18352 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
18353 (build-system python-build-system)
18354 (arguments
18355 '(#:phases
18356 (modify-phases %standard-phases
18357 (replace 'check
18358 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18359 (when tests?
18360 (add-installed-pythonpath inputs outputs)
18361 (invoke "python" "tests/test_shellescape.py"))
18362 #t)))))
18363 (native-inputs
18364 `(("python-pytest" ,python-pytest)))
18365 (home-page "https://github.com/chrissimpkins/shellescape")
18366 (synopsis
18367 "Shell escape a string to safely use it as a token in a shell command")
18368 (description
18369 "The shellescape Python module defines the @code{shellescape.quote()}
18370 function that returns a shell-escaped version of a Python string. This is a
18371 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
18372 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
18373 (license license:expat)))
18374
18375 (define-public python-validators
18376 (package
18377 (name "python-validators")
18378 (version "0.14.2")
18379 (source (origin
18380 (method url-fetch)
18381 (uri (pypi-uri "validators" version))
18382 (sha256
18383 (base32
18384 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
18385 (build-system python-build-system)
18386 (arguments
18387 '(#:phases (modify-phases %standard-phases
18388 (replace 'check
18389 (lambda _
18390 (invoke "pytest" "-vv"))))))
18391 (propagated-inputs
18392 `(("python-decorator" ,python-decorator)
18393 ("python-six" ,python-six)))
18394 (native-inputs
18395 `(("python-flake8" ,python-flake8)
18396 ("python-isort" ,python-isort)
18397 ("python-pytest" ,python-pytest)))
18398 (home-page "https://github.com/kvesteri/validators")
18399 (synopsis "Data validation library")
18400 (description
18401 "This package contains validators for different things such as email
18402 addresses, IP addresses, URLs, hashes and more. It has been designed to
18403 be easy to use and not require defining a schema or form just to validate
18404 some input.")
18405 (license license:expat)))
18406
18407 (define-public python2-validators
18408 (package-with-python2 python-validators))
18409
18410 (define-public python-validate-email
18411 (package
18412 (name "python-validate-email")
18413 (version "1.3")
18414 (source
18415 (origin
18416 (method url-fetch)
18417 (uri (pypi-uri "validate_email" version))
18418 (sha256
18419 (base32
18420 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
18421 (build-system python-build-system)
18422 (home-page "https://github.com/syrusakbary/validate_email")
18423 (synopsis "Verifies if an email address is valid and really exists")
18424 (description "@code{validate_email} can be used to verify if an email
18425 address is valid and really exists.")
18426 (license license:lgpl3+)))
18427
18428 (define-public python2-validate-email
18429 (package-with-python2 python-validate-email))
18430
18431 (define-public python-flex
18432 (package
18433 (name "python-flex")
18434 (version "6.10.0")
18435 (source
18436 (origin
18437 (method url-fetch)
18438 (uri (pypi-uri "flex" version))
18439 (sha256
18440 (base32
18441 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
18442 (build-system python-build-system)
18443 (propagated-inputs
18444 `(("python-click" ,python-click)
18445 ("python-iso8601" ,python-iso8601)
18446 ("python-jsonpointer" ,python-jsonpointer)
18447 ("python-pyyaml" ,python-pyyaml)
18448 ("python-requests" ,python-requests)
18449 ("python-rfc3987" ,python-rfc3987)
18450 ("python-six" ,python-six)
18451 ("python-validate-email" ,python-validate-email)))
18452 (home-page "https://github.com/pipermerriam/flex")
18453 (synopsis "Validates Swagger schemata")
18454 (description "@code{flex} can be used to validate Swagger schemata.")
18455 (license license:bsd-3)))
18456
18457 (define-public python2-flex
18458 (package-with-python2 python-flex))
18459
18460 (define-public python-marshmallow
18461 (package
18462 (name "python-marshmallow")
18463 (version "3.9.1")
18464 (source
18465 (origin
18466 (method url-fetch)
18467 (uri (pypi-uri "marshmallow" version))
18468 (sha256
18469 (base32
18470 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
18471 (build-system python-build-system)
18472 (propagated-inputs
18473 `(("python-dateutil" ,python-dateutil)
18474 ("python-simplejson" ,python-simplejson)))
18475 (native-inputs
18476 `(("python-pytest" ,python-pytest)
18477 ("python-pytz" ,python-pytz)))
18478 (home-page "https://github.com/marshmallow-code/marshmallow")
18479 (synopsis "Convert complex datatypes to and from native
18480 Python datatypes.")
18481 (description "@code{marshmallow} provides a library for converting
18482 complex datatypes to and from native Python datatypes.")
18483 (license license:expat)))
18484
18485 (define-public python-apispec
18486 (package
18487 (name "python-apispec")
18488 (version "4.0.0")
18489 (source
18490 (origin
18491 (method url-fetch)
18492 (uri (pypi-uri "apispec" version))
18493 (sha256
18494 (base32
18495 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
18496 (build-system python-build-system)
18497 (arguments
18498 '(#:phases (modify-phases %standard-phases
18499 (replace 'check
18500 (lambda _
18501 (invoke "pytest" "-vv"
18502 ;; Disable validation tests since they require
18503 ;; the optional 'prance' library which is not
18504 ;; yet in Guix.
18505 "-k" "not openapi_tools_validate"))))))
18506 (propagated-inputs
18507 `(("python-pyyaml" ,python-pyyaml)))
18508 (native-inputs
18509 `(("python-pytest" ,python-pytest)
18510 ("python-marshmallow" ,python-marshmallow)))
18511 (home-page "https://github.com/marshmallow-code/apispec")
18512 (synopsis "Swagger/OpenAPI specification generator")
18513 (description "@code{python-apispec} is a pluggable API specification
18514 generator. It currently supports the OpenAPI specification, formerly known
18515 as Swagger.")
18516 (license license:expat)))
18517
18518 (define-public python-flasgger
18519 (package
18520 (name "python-flasgger")
18521 (version "0.6.3")
18522 (source
18523 (origin
18524 (method git-fetch)
18525 (uri (git-reference
18526 (url "https://github.com/rochacbruno/flasgger")
18527 (commit version)))
18528 (file-name (git-file-name name version))
18529 (sha256
18530 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
18531 (build-system python-build-system)
18532 (arguments
18533 `(#:phases
18534 (modify-phases %standard-phases
18535 (replace 'check
18536 (lambda* (#:key inputs outputs #:allow-other-keys)
18537 (substitute* "Makefile"
18538 (("flake8 flasgger --ignore=F403")
18539 "flake8 flasgger --ignore=E731,F403"))
18540 (invoke "py.test"))))))
18541 (propagated-inputs
18542 `(("python-flask" ,python-flask)
18543 ("python-pyyaml" ,python-pyyaml)
18544 ("python-jsonschema" ,python-jsonschema)
18545 ("python-mistune" ,python-mistune)
18546 ("python-six" ,python-six)))
18547 (native-inputs
18548 `(("python-decorator" ,python-decorator)
18549 ("python-flake8" ,python-flake8)
18550 ("python-flask-restful" ,python-flask-restful)
18551 ("python-flex" ,python-flex)
18552 ("python-pytest" ,python-pytest)
18553 ("python-pytest-cov" ,python-pytest-cov)
18554 ("python-marshmallow" ,python-marshmallow)
18555 ("python-apispec" ,python-apispec)))
18556 (home-page "https://github.com/rochacbruno/flasgger/")
18557 (synopsis "Extract Swagger specs from your Flask project")
18558 (description "@code{python-flasgger} allows extracting Swagger specs
18559 from your Flask project. It is a fork of Flask-Swagger.")
18560 (license license:expat)))
18561
18562 (define-public python-swagger-spec-validator
18563 (package
18564 (name "python-swagger-spec-validator")
18565 (version "2.4.3")
18566 (source
18567 (origin
18568 (method url-fetch)
18569 (uri (pypi-uri "swagger-spec-validator" version))
18570 (sha256
18571 (base32
18572 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
18573 (build-system python-build-system)
18574 (propagated-inputs
18575 `(("python-jsonschema" ,python-jsonschema)
18576 ("python-pyyaml" ,python-pyyaml)
18577 ("python-six" ,python-six)))
18578 (home-page
18579 "https://github.com/Yelp/swagger_spec_validator")
18580 (synopsis "Validation of Swagger specifications")
18581 (description "@code{swagger_spec_validator} provides a library for
18582 validating Swagger API specifications.")
18583 (license license:asl2.0)))
18584
18585 (define-public python2-swagger-spec-validator
18586 (package-with-python2 python-swagger-spec-validator))
18587
18588 (define-public python-apache-libcloud
18589 (package
18590 (name "python-apache-libcloud")
18591 (version "3.1.0")
18592 (source
18593 (origin
18594 (method url-fetch)
18595 (uri (pypi-uri "apache-libcloud" version))
18596 (sha256
18597 (base32
18598 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
18599 (build-system python-build-system)
18600 (arguments
18601 `(#:phases
18602 (modify-phases %standard-phases
18603 (add-after 'unpack 'patch-ssh
18604 (lambda* (#:key inputs #:allow-other-keys)
18605 (substitute* "libcloud/compute/ssh.py"
18606 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
18607 "/bin/ssh" "'")))
18608 #t))
18609 (add-after 'unpack 'patch-tests
18610 (lambda _
18611 (substitute* "libcloud/test/compute/test_ssh_client.py"
18612 (("class ShellOutSSHClientTests")
18613 "@unittest.skip(\"Guix container doesn't have ssh service\")
18614 class ShellOutSSHClientTests"))
18615 #t))
18616 (add-before 'check 'copy-secret
18617 (lambda _
18618 (copy-file "libcloud/test/secrets.py-dist"
18619 "libcloud/test/secrets.py")
18620 #t)))))
18621 (inputs
18622 `(("openssh" ,openssh)))
18623 (propagated-inputs
18624 `(("python-paramiko" ,python-paramiko)
18625 ("python-requests" ,python-requests)))
18626 (native-inputs
18627 `(("python-lockfile" ,python-lockfile)
18628 ("python-mock" ,python-mock)
18629 ("python-pytest" ,python-pytest)
18630 ("python-pytest-runner" ,python-pytest-runner)
18631 ("python-requests-mock" ,python-requests-mock)))
18632 (home-page "https://libcloud.apache.org/")
18633 (synopsis "Unified Cloud API")
18634 (description "@code{libcloud} is a Python library for interacting with
18635 many of the popular cloud service providers using a unified API.")
18636 (license license:asl2.0)))
18637
18638 (define-public python-smmap
18639 (package
18640 (name "python-smmap")
18641 (version "3.0.1")
18642 (source
18643 (origin
18644 (method url-fetch)
18645 (uri (pypi-uri "smmap" version))
18646 (sha256
18647 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
18648 (build-system python-build-system)
18649 (native-inputs
18650 `(("python-nosexcover" ,python-nosexcover)))
18651 (home-page "https://github.com/Byron/smmap")
18652 (synopsis "Python sliding window memory map manager")
18653 (description "@code{smmap} is a pure Python implementation of a sliding
18654 window memory map manager.")
18655 (license license:bsd-3)))
18656
18657 (define-public python-smmap2
18658 (deprecated-package "python-smmap2" python-smmap))
18659
18660 (define-public python2-smmap
18661 (package-with-python2 python-smmap))
18662
18663 (define-public python2-smmap2
18664 (deprecated-package "python2-smmap2" python2-smmap))
18665
18666 (define-public python-regex
18667 (package
18668 (name "python-regex")
18669 (version "2020.6.8")
18670 (source (origin
18671 (method url-fetch)
18672 (uri (pypi-uri "regex" version))
18673 (sha256
18674 (base32
18675 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
18676 (build-system python-build-system)
18677 (arguments
18678 '(#:phases
18679 (modify-phases %standard-phases
18680 (replace 'check
18681 (lambda* (#:key inputs outputs #:allow-other-keys)
18682 (add-installed-pythonpath inputs outputs)
18683 (invoke "python" "-c"
18684 "from regex.test_regex import test_main; test_main()"))))))
18685 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
18686 (synopsis "Alternative regular expression module")
18687 (description "This regular expression implementation is backwards-
18688 compatible with the standard @code{re} module, but offers additional
18689 functionality like full case-folding for case-insensitive matches in Unicode.")
18690 (license license:psfl)))
18691
18692 (define-public python2-regex
18693 (package-with-python2 python-regex))
18694
18695 (define-public python-pyopengl
18696 (package
18697 (name "python-pyopengl")
18698 (version "3.1.5")
18699 (source
18700 (origin
18701 (method url-fetch)
18702 (uri (pypi-uri "PyOpenGL" version))
18703 (sha256
18704 (base32
18705 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
18706 (build-system python-build-system)
18707 (inputs
18708 `(("mesa" ,mesa)
18709 ("freeglut" ,freeglut)
18710 ("glu" ,glu)))
18711 (arguments
18712 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
18713 ;attribute 'OSMesa'
18714 #:phases
18715 (modify-phases %standard-phases
18716 (add-before 'build 'fix-paths
18717 (lambda* (#:key inputs outputs #:allow-other-keys)
18718 (substitute* '("OpenGL/platform/ctypesloader.py")
18719 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
18720 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
18721 (("'GL'")
18722 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
18723 (("'GLU'")
18724 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
18725 (("'glut',")
18726 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
18727 (("'GLESv1_CM'")
18728 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
18729 (("'GLESv2'")
18730 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
18731 ;; Not providing libgle. It seems to be very old.
18732 #t)))))
18733 (home-page "http://pyopengl.sourceforge.net")
18734 (synopsis "Standard OpenGL bindings for Python")
18735 (description
18736 "PyOpenGL is the most common cross platform Python binding to OpenGL and
18737 related APIs. The binding is created using the standard @code{ctypes}
18738 library.")
18739 (license license:bsd-3)))
18740
18741 (define-public python-pyopengl-accelerate
18742 (package
18743 (inherit python-pyopengl)
18744 (name "python-pyopengl-accelerate")
18745 (version "3.1.5")
18746 (source
18747 (origin
18748 (method url-fetch)
18749 (uri (pypi-uri "PyOpenGL-accelerate" version))
18750 (sha256
18751 (base32
18752 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
18753 (inputs
18754 `(("mesa" ,mesa)
18755 ("python-numpy" ,python-numpy))) ; for cython module
18756 ; numpy_formathandler, thus not propagated
18757 (arguments
18758 `(#:tests? #f
18759 #:phases
18760 (modify-phases %standard-phases
18761 (delete 'fix-paths))))
18762 (synopsis "Acceleration code for PyOpenGL")
18763 (description
18764 "This is the Cython-coded accelerator module for PyOpenGL.")))
18765
18766 (define-public python-rencode
18767 (package
18768 (name "python-rencode")
18769 (version "1.0.5")
18770 (source
18771 (origin
18772 (method url-fetch)
18773 (uri (pypi-uri "rencode" version))
18774 (sha256
18775 (base32
18776 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
18777 (build-system python-build-system)
18778 (arguments
18779 `(#:phases
18780 (modify-phases %standard-phases
18781 (add-before 'check 'delete-bogus-test
18782 ;; This test requires /home/aresch/Downloads, which is not provided by
18783 ;; the build environment.
18784 (lambda _
18785 (delete-file "rencode/t.py")
18786 #t)))))
18787 (native-inputs `(("pkg-config" ,pkg-config)
18788 ("python-cython" ,python-cython)))
18789 (home-page "https://github.com/aresch/rencode")
18790 (synopsis "Serialization of heterogeneous data structures")
18791 (description
18792 "The @code{rencode} module is a data structure serialization library,
18793 similar to @code{bencode} from the BitTorrent project. For complex,
18794 heterogeneous data structures with many small elements, r-encoding stake up
18795 significantly less space than b-encodings. This version of rencode is a
18796 complete rewrite in Cython to attempt to increase the performance over the
18797 pure Python module.")
18798 (license license:bsd-3)))
18799
18800 (define-public python2-rencode
18801 (package-with-python2 python-rencode))
18802
18803 (define-public python-xenon
18804 (package
18805 (name "python-xenon")
18806 (version "0.7.0")
18807 (source
18808 (origin
18809 (method url-fetch)
18810 (uri (pypi-uri "xenon" version))
18811 (sha256
18812 (base32
18813 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
18814 (build-system python-build-system)
18815 (native-inputs
18816 `(("python-pyyaml" ,python-pyyaml)
18817 ("python-radon" ,python-radon)
18818 ("python-requests" ,python-requests)
18819 ("python-flake8" ,python-flake8)
18820 ("python-tox" ,python-tox)))
18821 (arguments
18822 `(#:tests? #f ;test suite not shipped with the PyPI archive
18823 #:phases
18824 (modify-phases %standard-phases
18825 (add-before 'build 'patch-test-requirements
18826 (lambda _
18827 ;; Remove httpretty dependency for tests.
18828 (substitute* "setup.py"
18829 (("httpretty") ""))
18830 #t)))))
18831 (home-page "https://xenon.readthedocs.org/")
18832 (synopsis "Monitor code metrics for Python on your CI server")
18833 (description
18834 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
18835 Ideally, @code{xenon} is run every time code is committed. Through command
18836 line options, various thresholds can be set for the complexity of code. It
18837 will fail (i.e. it will exit with a non-zero exit code) when any of these
18838 requirements is not met.")
18839 (license license:expat)))
18840
18841 (define-public python-pysocks
18842 (package
18843 (name "python-pysocks")
18844 (version "1.7.1")
18845 (source
18846 (origin
18847 (method url-fetch)
18848 (uri (pypi-uri "PySocks" version))
18849 (sha256
18850 (base32
18851 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
18852 (build-system python-build-system)
18853 (arguments `(#:tests? #f))
18854 (home-page "https://github.com/Anorov/PySocks")
18855 (synopsis "SOCKS client module")
18856 (description "@code{pysocks} is an updated and semi-actively maintained
18857 version of @code{SocksiPy} with bug fixes and extra features.")
18858 (license license:bsd-3)))
18859
18860 (define-public python2-pysocks
18861 (package-with-python2 python-pysocks))
18862
18863 (define-public python-pydiff
18864 (package
18865 (name "python-pydiff")
18866 (version "0.2")
18867 (source
18868 (origin
18869 (method url-fetch)
18870 (uri (pypi-uri "pydiff" version))
18871 (sha256
18872 (base32
18873 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
18874 (build-system python-build-system)
18875 (home-page "https://github.com/myint/pydiff")
18876 (synopsis "Library to diff two Python files at the bytecode level")
18877 (description
18878 "@code{pydiff} makes it easy to look for actual code changes while
18879 ignoring formatting changes.")
18880 (license license:expat)))
18881
18882 (define-public python2-pydiff
18883 (package-with-python2 python-pydiff))
18884
18885 (define-public python-pydub
18886 (package
18887 (name "python-pydub")
18888 (version "0.24.1")
18889 (source
18890 (origin
18891 (method url-fetch)
18892 (uri (pypi-uri "pydub" version))
18893 (sha256
18894 (base32
18895 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
18896 (build-system python-build-system)
18897 (arguments
18898 `(#:phases
18899 (modify-phases %standard-phases
18900 (add-after 'unpack 'fix-ffmpeg-path
18901 (lambda* (#:key inputs #:allow-other-keys)
18902 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
18903 (substitute* '("pydub/utils.py")
18904 (("return \"ffmpeg\"")
18905 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
18906 (("return \"ffplay\"")
18907 (string-append "return \"" ffmpeg "/bin/ffplay\""))
18908 (("return \"ffprobe\"")
18909 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
18910 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
18911 #t))))))
18912 (home-page "https://pydub.com")
18913 (inputs
18914 `(("ffmpeg" ,ffmpeg)))
18915 (propagated-inputs
18916 `(("python-scipy" ,python-scipy)))
18917 (synopsis "Manipulate audio with a high level interface in Python")
18918 (description
18919 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
18920 @code{ffmpeg} to open various audio formats.")
18921 (license license:expat))) ; MIT license
18922
18923 (define-public python-tqdm
18924 (package
18925 (name "python-tqdm")
18926 (version "4.60.0")
18927 (source
18928 (origin
18929 (method url-fetch)
18930 (uri (pypi-uri "tqdm" version))
18931 (sha256
18932 (base32
18933 "1bjpy4mjg6ryp0ijvqi77vgs76l5hh3zrv3x4vmcwxrlbswvvppb"))))
18934 (build-system python-build-system)
18935 (arguments
18936 '(#:phases (modify-phases %standard-phases
18937 (replace 'check
18938 (lambda _
18939 (invoke "pytest" "-vv" "-k" "not perf"))))))
18940 (native-inputs
18941 `(("python-pytest" ,python-pytest)
18942 ("python-pytest-asyncio" ,python-pytest-asyncio)
18943 ("python-pytest-timeout" ,python-pytest-timeout)
18944 ("python-setuptools-scm" ,python-setuptools-scm)
18945 ("python-toml" ,python-toml)))
18946 (home-page "https://github.com/tqdm/tqdm")
18947 (synopsis "Fast, extensible progress meter")
18948 (description
18949 "Make loops show a progress bar on the console by just wrapping any
18950 iterable with @code{|tqdm(iterable)|}. Offers many options to define
18951 design and layout.")
18952 (license (list license:mpl2.0 license:expat))))
18953
18954 (define-public python2-tqdm
18955 (package-with-python2 python-tqdm))
18956
18957 (define-public python-pkginfo
18958 (package
18959 (name "python-pkginfo")
18960 (version "1.7.0")
18961 (source
18962 (origin
18963 (method url-fetch)
18964 (uri (pypi-uri "pkginfo" version))
18965 (sha256
18966 (base32
18967 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
18968 (build-system python-build-system)
18969 (arguments
18970 `(#:phases
18971 (modify-phases %standard-phases
18972 (add-before 'check 'patch-tests
18973 (lambda _
18974 (substitute* "pkginfo/tests/test_installed.py"
18975 (("test_ctor_w_package_no_PKG_INFO")
18976 "_test_ctor_w_package_no_PKG_INFO"))
18977 #t)))))
18978 (home-page
18979 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
18980 (synopsis
18981 "Query metadatdata from sdists, bdists, and installed packages")
18982 (description
18983 "API to query the distutils metadata written in @file{PKG-INFO} inside a
18984 source distriubtion (an sdist) or a binary distribution (e.g., created by
18985 running bdist_egg). It can also query the EGG-INFO directory of an installed
18986 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
18987 created by running @code{python setup.py develop}).")
18988 (license license:expat)))
18989
18990 (define-public python2-pkginfo
18991 (package-with-python2 python-pkginfo))
18992
18993 (define-public python-twine
18994 (package
18995 (name "python-twine")
18996 (version "1.15.0")
18997 (source
18998 (origin
18999 (method url-fetch)
19000 (uri (pypi-uri "twine" version))
19001 (sha256
19002 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
19003 (build-system python-build-system)
19004 (propagated-inputs
19005 `(("python-tqdm" ,python-tqdm)
19006 ("python-packaging" ,python-packaging)
19007 ("python-pkginfo" ,python-pkginfo)
19008 ("python-readme-renderer" ,python-readme-renderer)
19009 ("python-requests" ,python-requests)
19010 ("python-requests-toolbelt" ,python-requests-toolbelt)))
19011 (home-page "https://github.com/pypa/twine")
19012 (synopsis "Collection of utilities for interacting with PyPI")
19013 (description
19014 "@code{twine} currently supports registering projects and uploading
19015 distributions. It authenticates the user over HTTPS, allows them to pre-sign
19016 their files and supports any packaging format (including wheels).")
19017 (license license:asl2.0)))
19018
19019 (define-public python2-twine
19020 (package-with-python2 python-twine))
19021
19022 (define-public python-linecache2
19023 (package
19024 (name "python-linecache2")
19025 (version "1.0.0")
19026 (source
19027 (origin
19028 (method url-fetch)
19029 (uri (pypi-uri "linecache2" version))
19030 (sha256
19031 (base32
19032 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
19033 (build-system python-build-system)
19034 (arguments
19035 `(;; The tests depend on unittest2, and our version is a bit too old.
19036 #:tests? #f))
19037 (native-inputs
19038 `(("python-pbr" ,python-pbr-minimal)))
19039 (home-page
19040 "https://github.com/testing-cabal/linecache2")
19041 (synopsis "Backports of the linecache module")
19042 (description
19043 "The linecache module allows one to get any line from any file, while
19044 attempting to optimize internally, using a cache, the common case where many
19045 lines are read from a single file.")
19046 (license license:psfl)))
19047
19048 (define-public python2-linecache2
19049 (package-with-python2 python-linecache2))
19050
19051 (define-public python-traceback2
19052 (package
19053 (name "python-traceback2")
19054 (version "1.4.0")
19055 (source
19056 (origin
19057 (method url-fetch)
19058 (uri (pypi-uri "traceback2" version))
19059 (sha256
19060 (base32
19061 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
19062 (build-system python-build-system)
19063 (arguments
19064 `(;; python-traceback2 and python-unittest2 depend on one another.
19065 #:tests? #f))
19066 (native-inputs
19067 `(("python-pbr" ,python-pbr-minimal)))
19068 (propagated-inputs
19069 `(("python-linecache2" ,python-linecache2)
19070 ("python-six" ,python-six)))
19071 (home-page
19072 "https://github.com/testing-cabal/traceback2")
19073 (synopsis "Backports of the traceback module")
19074 (description
19075 "This module provides a standard interface to extract, format and print
19076 stack traces of Python programs. It exactly mimics the behavior of the Python
19077 interpreter when it prints a stack trace.")
19078 (license license:psfl)))
19079
19080 (define-public python2-traceback2
19081 (package-with-python2 python-traceback2))
19082
19083 (define-public python-ratelimiter
19084 (package
19085 (name "python-ratelimiter")
19086 (version "1.2.0")
19087 (source
19088 (origin
19089 (method url-fetch)
19090 (uri (pypi-uri "ratelimiter" version))
19091 (sha256
19092 (base32
19093 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
19094 (build-system python-build-system)
19095 (arguments
19096 '(#:tests? #f)) ; There are no tests in the pypi archive.
19097 (home-page "https://github.com/RazerM/ratelimiter")
19098 (synopsis "Simple rate limiting object")
19099 (description
19100 "The @code{ratelimiter} module ensures that an operation will not be
19101 executed more than a given number of times during a given period.")
19102 (license license:asl2.0)))
19103
19104 (define-public python2-ratelimiter
19105 (package-with-python2 python-ratelimiter))
19106
19107 (define-public python-dukpy
19108 (package
19109 (name "python-dukpy")
19110 (version "0.3")
19111 (source
19112 (origin
19113 (method git-fetch)
19114 (uri (git-reference
19115 (url "https://github.com/kovidgoyal/dukpy")
19116 (commit (string-append "v" version))))
19117 (file-name (git-file-name name version))
19118 (sha256
19119 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19120 (build-system python-build-system)
19121 (home-page "https://github.com/kovidgoyal/dukpy")
19122 (synopsis "Run JavaScript in python")
19123 (description
19124 "dukpy is a JavaScript runtime environment for Python using the duktape
19125 embeddable JavaScript engine.")
19126 ;; Dukpy is licensed under MIT like the embedded duktape library,
19127 ;; with 'errors.c' as GPL3.
19128 (license (list license:expat license:gpl3))))
19129
19130 (define-public python2-dukpy
19131 (package-with-python2 python-dukpy))
19132
19133 (define-public python-jsonrpclib-pelix
19134 (package
19135 (name "python-jsonrpclib-pelix")
19136 (version "0.3.2")
19137 (source
19138 (origin
19139 (method url-fetch)
19140 (uri (pypi-uri "jsonrpclib-pelix" version))
19141 (sha256
19142 (base32
19143 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19144 (build-system python-build-system)
19145 (arguments
19146 `(#:tests? #f)) ; no tests in PyPI tarball
19147 (home-page "https://github.com/tcalmant/jsonrpclib/")
19148 (synopsis "JSON-RPC 2.0 client library for Python")
19149 (description
19150 "This library implements the JSON-RPC v2.0
19151 specification (backwards-compatible) as a client library for Python. This
19152 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19153 services.")
19154 (license license:asl2.0)))
19155
19156 (define-public python2-jsonrpclib-pelix
19157 (package-with-python2 python-jsonrpclib-pelix))
19158
19159 (define-public python-setuptools-scm-git-archive
19160 (package
19161 (name "python-setuptools-scm-git-archive")
19162 (version "1.0")
19163 (source
19164 (origin
19165 (method url-fetch)
19166 (uri (pypi-uri "setuptools_scm_git_archive" version))
19167 (sha256
19168 (base32
19169 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19170 (build-system python-build-system)
19171 (native-inputs
19172 `(("python-pytest" ,python-pytest)))
19173 (propagated-inputs
19174 `(("python-setuptools-scm" ,python-setuptools-scm)))
19175 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19176 (synopsis "Setuptools_scm plugin for git archives")
19177 (description
19178 "The setuptools_scm_git_archive package is a plugin to
19179 setuptools_scm, which supports obtaining versions from git archives that
19180 belong to tagged versions.")
19181 (license license:expat)))
19182
19183 (define-public python2-setuptools-scm-git-archive
19184 (package-with-python2 python-setuptools-scm-git-archive))
19185
19186 (define-public python-setuptools-git
19187 (package
19188 (name "python-setuptools-git")
19189 (version "1.2")
19190 (source
19191 (origin
19192 (method url-fetch)
19193 (uri (pypi-uri "setuptools-git" version))
19194 (sha256
19195 (base32
19196 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19197 (build-system python-build-system)
19198 (arguments
19199 `(#:phases
19200 (modify-phases %standard-phases
19201 ;; This is needed for tests.
19202 (add-after 'unpack 'configure-git
19203 (lambda _
19204 (setenv "HOME" "/tmp")
19205 (invoke "git" "config" "--global" "user.email" "guix")
19206 (invoke "git" "config" "--global" "user.name" "guix")
19207 #t)))))
19208 (native-inputs
19209 `(("git" ,git-minimal)))
19210 (home-page "https://github.com/msabramo/setuptools-git")
19211 (synopsis "Setuptools revision control system plugin for Git")
19212 (description
19213 "This package provides a plugin for Setuptools for revision control with
19214 Git.")
19215 (license license:bsd-3)))
19216
19217 (define-public python-pyclipper
19218 (package
19219 (name "python-pyclipper")
19220 (version "1.1.0.post3")
19221 (source
19222 (origin
19223 (method url-fetch)
19224 (uri (pypi-uri "pyclipper" version ".zip"))
19225 (sha256
19226 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19227 (modules '((guix build utils)))
19228 (snippet
19229 '(begin
19230 ;; This file is generated by Cython.
19231 (delete-file "pyclipper/pyclipper.cpp") #t))))
19232 (build-system python-build-system)
19233 (arguments
19234 `(#:phases
19235 (modify-phases %standard-phases
19236 (add-before 'build 'cythonize-sources
19237 (lambda _
19238 (with-directory-excursion "pyclipper"
19239 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19240 (propagated-inputs
19241 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19242 (native-inputs
19243 `(("python-cython" ,python-cython)
19244 ("python-pytest" ,python-pytest)
19245 ("python-pytest-runner" ,python-pytest-runner)
19246 ("python-unittest2" ,python-unittest2)
19247 ("unzip" ,unzip)))
19248 (home-page "https://github.com/greginvm/pyclipper")
19249 (synopsis "Wrapper for Angus Johnson's Clipper library")
19250 (description
19251 "Pyclipper is a Cython wrapper for the C++ translation of the
19252 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19253 (license license:expat)))
19254
19255 (define-public python2-pyclipper
19256 (package-with-python2 python-pyclipper))
19257
19258 (define-public python2-booleanoperations
19259 (package
19260 (name "python2-booleanoperations")
19261 (version "0.7.1")
19262 (source
19263 (origin
19264 (method url-fetch)
19265 (uri (pypi-uri "booleanOperations" version ".zip"))
19266 (sha256
19267 (base32
19268 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19269 (build-system python-build-system)
19270 (arguments
19271 `(#:python ,python-2))
19272 (native-inputs
19273 `(("unzip" ,unzip)
19274 ("python2-pytest" ,python2-pytest)
19275 ("python2-pytest-runner" ,python2-pytest-runner)))
19276 (propagated-inputs
19277 `(("python-fonttools" ,python2-fonttools)
19278 ("python-pyclipper" ,python2-pyclipper)
19279 ("python-ufolib" ,python2-ufolib)))
19280 (home-page "https://github.com/typemytype/booleanOperations")
19281 (synopsis "Boolean operations on paths")
19282 (description
19283 "BooleanOperations provides a Python library that enables
19284 boolean operations on paths.")
19285 (license license:expat)))
19286
19287 (define-public python-tempdir
19288 (package
19289 (name "python-tempdir")
19290 (version "0.7.1")
19291 (source
19292 (origin
19293 (method url-fetch)
19294 (uri (pypi-uri "tempdir" version))
19295 (sha256
19296 (base32
19297 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19298 (build-system python-build-system)
19299 (home-page "https://pypi.org/project/tempdir/")
19300 (arguments
19301 ;; the package has no tests
19302 '(#:tests? #f))
19303 (synopsis "Python library for managing temporary directories")
19304 (description
19305 "This library manages temporary directories that are automatically
19306 deleted with all their contents when they are no longer needed. It is
19307 particularly convenient for use in tests.")
19308 (license license:expat)))
19309
19310 (define-public python2-tempdir
19311 (package-with-python2 python-tempdir))
19312
19313 (define-public python-activepapers
19314 (package
19315 (name "python-activepapers")
19316 (version "0.2.2")
19317 (source
19318 (origin
19319 (method url-fetch)
19320 (uri (pypi-uri "ActivePapers.Py" version))
19321 (sha256
19322 (base32
19323 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
19324 (build-system python-build-system)
19325 (arguments
19326 `(#:modules ((ice-9 ftw)
19327 (srfi srfi-1)
19328 (guix build utils)
19329 (guix build python-build-system))
19330
19331 #:phases
19332 (modify-phases %standard-phases
19333 (add-after 'unpack 'delete-python2-code
19334 (lambda _
19335 (for-each delete-file
19336 '("lib/activepapers/builtins2.py"
19337 "lib/activepapers/standardlib2.py"
19338 "lib/activepapers/utility2.py"))))
19339 (replace 'check
19340 (lambda _
19341 ;; Deactivate the test cases that download files
19342 (setenv "NO_NETWORK_ACCESS" "1")
19343 ;; For some strange reason, some tests fail if nosetests runs all
19344 ;; test modules in a single execution. They pass if each test
19345 ;; module is run individually.
19346 (for-each (lambda (filename)
19347 (invoke "nosetests"
19348 (string-append "tests/" filename)))
19349 (scandir "tests"
19350 (lambda (filename)
19351 (string-suffix? ".py" filename)))))))))
19352 (native-inputs
19353 `(("python-tempdir" ,python-tempdir)
19354 ("python-nose" ,python-nose)))
19355 (propagated-inputs
19356 `(("python-h5py" ,python-h5py)))
19357 (home-page "https://www.activepapers.org/")
19358 (synopsis "Executable papers for scientific computing")
19359 (description
19360 "ActivePapers is a tool for working with executable papers, which
19361 combine data, code, and documentation in single-file packages,
19362 suitable for publication as supplementary material or on repositories
19363 such as figshare or Zenodo.")
19364 (properties `((python2-variant . ,(delay python2-activepapers))))
19365 (license license:bsd-3)))
19366
19367 (define-public python2-activepapers
19368 (let ((base (package-with-python2
19369 (strip-python2-variant python-activepapers))))
19370 (package/inherit base
19371 (arguments
19372 (substitute-keyword-arguments (package-arguments base)
19373 ((#:phases phases)
19374 `(modify-phases ,phases
19375 (delete 'delete-python2-code)
19376 (add-after 'unpack 'delete-python3-code
19377 (lambda _
19378 (for-each delete-file
19379 '("lib/activepapers/builtins3.py"
19380 "lib/activepapers/standardlib3.py"
19381 "lib/activepapers/utility3.py")))))))))))
19382
19383 (define-public python-semver
19384 (package
19385 (name "python-semver")
19386 (version "2.9.0")
19387 (source
19388 (origin
19389 (method url-fetch)
19390 (uri (pypi-uri "semver" version))
19391 (sha256
19392 (base32
19393 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
19394 (build-system python-build-system)
19395 (arguments
19396 `(#:phases (modify-phases %standard-phases
19397 (replace 'check
19398 (lambda _
19399 (delete-file "setup.cfg")
19400 (invoke "py.test"))))))
19401 (native-inputs
19402 `(("python-pytest" ,python-pytest)))
19403 (home-page "https://github.com/k-bx/python-semver")
19404 (synopsis "Python helper for Semantic Versioning")
19405 (description "This package provides a Python library for
19406 @url{Semantic Versioning, http://semver.org/}.")
19407 (license license:bsd-3)))
19408
19409 (define-public python2-semver
19410 (package-with-python2 python-semver))
19411
19412 (define-public python-pyro4
19413 (package
19414 (name "python-pyro4")
19415 (version "4.77")
19416 (source
19417 (origin
19418 (method url-fetch)
19419 (uri (pypi-uri "Pyro4" version))
19420 (sha256
19421 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
19422 (build-system python-build-system)
19423 (arguments
19424 '(#:tests? #f)) ;FIXME: Some tests require network access.
19425 (native-inputs
19426 `(("python-cloudpickle" ,python-cloudpickle)
19427 ("python-dill" ,python-dill)
19428 ("python-msgpack" ,python-msgpack)))
19429 (propagated-inputs
19430 `(("python-serpent" ,python-serpent)))
19431 (home-page "https://pyro4.readthedocs.io")
19432 (synopsis "Distributed object middleware for Python")
19433 (description
19434 "Pyro enables you to build applications in which objects can talk to each
19435 other over the network. You can just use normal Python method calls to call
19436 objects on other machines, also known as remote procedure calls (RPC).")
19437 (license license:expat)))
19438
19439 (define-public python2-pyro
19440 (package
19441 (name "python2-pyro")
19442 (version "3.16")
19443 (source
19444 (origin
19445 (method url-fetch)
19446 (uri (pypi-uri "Pyro" version))
19447 (file-name (string-append "Pyro-" version ".tar.gz"))
19448 (sha256
19449 (base32
19450 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
19451 (build-system python-build-system)
19452 (arguments
19453 ;; Pyro is not compatible with Python 3
19454 `(#:python ,python-2
19455 ;; Pyro has no test cases for automatic execution
19456 #:tests? #f))
19457 (home-page "https://pythonhosted.org/Pyro/")
19458 (synopsis "Distributed object manager for Python")
19459 (description "Pyro is a Distributed Object Technology system
19460 written in Python that is designed to be easy to use. It resembles
19461 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
19462 which is a system and language independent Distributed Object Technology
19463 and has much more to offer than Pyro or RMI. Pyro 3.x is no
19464 longer maintained. New projects should use Pyro4 instead, which
19465 is the new Pyro version that is actively developed.")
19466 (license license:expat)))
19467
19468 (define-public python2-scientific
19469 (package
19470 (name "python2-scientific")
19471 (version "2.9.4")
19472 (source
19473 (origin
19474 (method git-fetch)
19475 (uri (git-reference
19476 (url "https://github.com/khinsen/ScientificPython")
19477 (commit (string-append "rel" version))))
19478 (file-name (git-file-name name version))
19479 (sha256
19480 (base32
19481 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
19482 (build-system python-build-system)
19483 (inputs
19484 `(("netcdf" ,netcdf)))
19485 (propagated-inputs
19486 `(("python-numpy" ,python2-numpy-1.8)
19487 ("python-pyro" ,python2-pyro)))
19488 (arguments
19489 ;; ScientificPython is not compatible with Python 3
19490 `(#:python ,python-2
19491 #:tests? #f ; No test suite
19492 #:phases
19493 (modify-phases %standard-phases
19494 (replace 'build
19495 (lambda* (#:key inputs #:allow-other-keys)
19496 (invoke "python" "setup.py" "build"
19497 (string-append "--netcdf_prefix="
19498 (assoc-ref inputs "netcdf"))))))))
19499 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
19500 (synopsis "Python modules for scientific computing")
19501 (description "ScientificPython is a collection of Python modules that are
19502 useful for scientific computing. Most modules are rather general (Geometry,
19503 physical units, automatic derivatives, ...) whereas others are more
19504 domain-specific (e.g. netCDF and PDB support). The library is currently
19505 not actively maintained and works only with Python 2 and NumPy < 1.9.")
19506 (license license:cecill-c)))
19507
19508 (define-public python2-mmtk
19509 (package
19510 (name "python2-mmtk")
19511 (version "2.7.12")
19512 (source
19513 (origin
19514 (method git-fetch)
19515 (uri (git-reference
19516 (url "https://github.com/khinsen/MMTK")
19517 (commit (string-append "rel" version))))
19518 (file-name (git-file-name name version))
19519 (sha256
19520 (base32
19521 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
19522 (build-system python-build-system)
19523 (native-inputs
19524 `(("netcdf" ,netcdf)))
19525 (propagated-inputs
19526 `(("python-scientific" ,python2-scientific)
19527 ("python-tkinter" ,python-2 "tk")))
19528 (arguments
19529 `(#:python ,python-2
19530 #:tests? #f
19531 #:phases
19532 (modify-phases %standard-phases
19533 (add-before 'build 'includes-from-scientific
19534 (lambda* (#:key inputs #:allow-other-keys)
19535 (mkdir-p "Include/Scientific")
19536 (copy-recursively
19537 (string-append
19538 (assoc-ref inputs "python-scientific")
19539 "/include/python2.7/Scientific")
19540 "Include/Scientific"))))))
19541 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
19542 (synopsis "Python library for molecular simulation")
19543 (description "MMTK is a library for molecular simulations with an emphasis
19544 on biomolecules. It provides widely used methods such as Molecular Dynamics
19545 and normal mode analysis, but also basic routines for implementing new methods
19546 for simulation and analysis. The library is currently not actively maintained
19547 and works only with Python 2 and NumPy < 1.9.")
19548 (license license:cecill-c)))
19549
19550 (define-public python-phonenumbers
19551 (package
19552 (name "python-phonenumbers")
19553 (version "8.9.1")
19554 (source
19555 (origin
19556 (method url-fetch)
19557 (uri (pypi-uri "phonenumbers" version))
19558 (sha256
19559 (base32
19560 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
19561 (build-system python-build-system)
19562 (home-page
19563 "https://github.com/daviddrysdale/python-phonenumbers")
19564 (synopsis
19565 "Python library for dealing with international phone numbers")
19566 (description
19567 "This package provides a Python port of Google's libphonenumber library.")
19568 (license license:asl2.0)))
19569
19570 (define-public python2-phonenumbers
19571 (package-with-python2 python-phonenumbers))
19572
19573 (define-public python-heapdict
19574 (package
19575 (name "python-heapdict")
19576 (version "1.0.1")
19577 (source
19578 (origin
19579 (method url-fetch)
19580 (uri (pypi-uri "HeapDict" version))
19581 (sha256
19582 (base32
19583 "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
19584 (build-system python-build-system)
19585 (home-page "http://stutzbachenterprises.com/")
19586 (synopsis "Heap with decrease-key and increase-key operations")
19587 (description
19588 "heapdict implements the MutableMapping ABC, meaning it works pretty much
19589 like a regular Python @code{dict}. It’s designed to be used as a priority
19590 queue.")
19591 (license license:bsd-3)))
19592
19593 (define-public python-zict
19594 (package
19595 (name "python-zict")
19596 (version "2.0.0")
19597 (source
19598 (origin
19599 (method url-fetch)
19600 (uri (pypi-uri "zict" version))
19601 (sha256
19602 (base32
19603 "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
19604 (build-system python-build-system)
19605 (propagated-inputs
19606 `(("python-heapdict" ,python-heapdict)))
19607 (native-inputs
19608 `(("python-pytest" ,python-pytest)))
19609 (home-page "https://zict.readthedocs.io/en/latest/")
19610 (synopsis "Composable mutable mapping tools")
19611 (description "This package provides abstract @code{MutableMapping} classes
19612 that consume and build on other @code{MutableMappings}. Several of these can
19613 be composed with one another to form intuitive interfaces over complex storage
19614 systems policies.")
19615 (license license:bsd-3)))
19616
19617 (define-public python-send2trash
19618 (package
19619 (name "python-send2trash")
19620 (version "1.5.0")
19621 (source
19622 (origin (method git-fetch)
19623 ;; Source tarball on PyPI doesn't include tests.
19624 (uri (git-reference
19625 (url "https://github.com/hsoft/send2trash")
19626 (commit version)))
19627 (file-name (git-file-name name version))
19628 (sha256
19629 (base32
19630 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
19631 (build-system python-build-system)
19632 (arguments
19633 '(#:phases
19634 (modify-phases %standard-phases
19635 (add-before 'check 'pre-check
19636 (lambda _
19637 (mkdir-p "/tmp/foo")
19638 (setenv "HOME" "/tmp/foo")
19639 #t)))))
19640 (home-page "https://github.com/hsoft/send2trash")
19641 (synopsis "Send files to the user's @file{~/Trash} directory")
19642 (description "This package provides a Python library to send files to the
19643 user's @file{~/Trash} directory.")
19644 (properties `((python2-variant . ,(delay python2-send2trash))))
19645 (license license:bsd-3)))
19646
19647 (define-public python2-send2trash
19648 (let ((base (package-with-python2
19649 (strip-python2-variant python-send2trash))))
19650 (package/inherit base
19651 (arguments
19652 (substitute-keyword-arguments (package-arguments python-send2trash)
19653 ((#:phases phases)
19654 `(modify-phases ,phases
19655 (add-before 'check 'setenv
19656 (lambda _
19657 (setenv "PYTHONPATH"
19658 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19659 #t)))))))))
19660
19661 (define-public python-pyfavicon
19662 (package
19663 (name "python-pyfavicon")
19664 (version "0.1.1")
19665 (source
19666 (origin
19667 (method url-fetch)
19668 (uri (pypi-uri "pyfavicon" version))
19669 (sha256
19670 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
19671 (build-system python-build-system)
19672 (arguments
19673 ;; There are no tests in the PyPI tarball and the tests from the
19674 ;; repository require online data.
19675 '(#:tests? #f))
19676 (propagated-inputs
19677 `(("python-aiohttp" ,python-aiohttp)
19678 ("python-beautifulsoup4" ,python-beautifulsoup4)
19679 ("python-pillow" ,python-pillow)))
19680 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
19681 (synopsis "Async favicon fetcher")
19682 (description
19683 "@code{pyfavicon} is an async favicon fetcher.")
19684 (license license:expat)))
19685
19686 (define-public python-yamllint
19687 (package
19688 (name "python-yamllint")
19689 (version "1.26.1")
19690 (source
19691 (origin
19692 (method url-fetch)
19693 (uri (pypi-uri "yamllint" version))
19694 (sha256
19695 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
19696 (build-system python-build-system)
19697 (propagated-inputs
19698 `(("python-pathspec" ,python-pathspec)
19699 ("python-pyyaml" ,python-pyyaml)
19700 ("python-setuptools" ,python-setuptools)))
19701 (home-page "https://github.com/adrienverge/yamllint")
19702 (synopsis "Linter for YAML files")
19703 (description
19704 "Yamllint is a linter for YAML files. yamllint does not only check for
19705 syntax validity, but for weirdnesses like key repetition and cosmetic problems
19706 such as lines length, trailing spaces, indentation, etc.")
19707 (license license:gpl3+)))
19708
19709 (define-public python-yapf
19710 (package
19711 (name "python-yapf")
19712 (version "0.29.0")
19713 (source
19714 (origin
19715 (method url-fetch)
19716 (uri (pypi-uri "yapf" version))
19717 (sha256
19718 (base32
19719 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
19720 (build-system python-build-system)
19721 (home-page "https://github.com/google/yapf")
19722 (synopsis "Formatter for Python code")
19723 (description "YAPF is a formatter for Python code. It's based off of
19724 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
19725 takes the code and reformats it to the best formatting that conforms to the
19726 style guide, even if the original code didn't violate the style guide.")
19727 (license license:asl2.0)))
19728
19729 (define-public python2-yapf
19730 (package-with-python2 python-yapf))
19731
19732 (define-public python-yq
19733 (package
19734 (name "python-yq")
19735 (version "2.11.1")
19736 (source
19737 (origin
19738 (method url-fetch)
19739 (uri (pypi-uri "yq" version))
19740 (sha256
19741 (base32
19742 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
19743 (build-system python-build-system)
19744 (arguments
19745 '(#:phases
19746 (modify-phases %standard-phases
19747 (add-after 'unpack 'patch
19748 (lambda* (#:key inputs #:allow-other-keys)
19749 (substitute* "yq/__init__.py"
19750 (("Popen\\(\\[\"jq")
19751 (string-append
19752 "Popen([\""
19753 (assoc-ref inputs "jq")
19754 "/bin/jq")))
19755 #t)))))
19756 (inputs
19757 `(("python-argcomplete" ,python-argcomplete)
19758 ("python-pyyaml" ,python-pyyaml)
19759 ("python-xmltodict" ,python-xmltodict)
19760 ("jq" ,jq)))
19761 (native-inputs
19762 `(("python-coverage" ,python-coverage)
19763 ("python-flake8" ,python-flake8)
19764 ("python-wheel" ,python-wheel)))
19765 (home-page "https://github.com/kislyuk/yq")
19766 (synopsis "Command-line YAML/XML processor")
19767 (description
19768 "This package provides @command{yq} and @command{xq} for processing YAML
19769 and XML respectively. The processing is done through @command{jq}, @command{jq}
19770 filters can be used to process the data as it passes through.")
19771 (license license:asl2.0)))
19772
19773 (define-public python-gyp
19774 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
19775 (revision "0"))
19776 (package
19777 (name "python-gyp")
19778 ;; Google does not release versions,
19779 ;; based on second most recent commit date.
19780 (version (git-version "0.0.0" revision commit))
19781 (source
19782 (origin
19783 ;; Google does not release tarballs,
19784 ;; git checkout is needed.
19785 (method git-fetch)
19786 (uri (git-reference
19787 (url "https://chromium.googlesource.com/external/gyp")
19788 (commit commit)))
19789 (file-name (git-file-name name version))
19790 (sha256
19791 (base32
19792 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
19793 (build-system python-build-system)
19794 (home-page "https://gyp.gsrc.io/")
19795 (synopsis "GYP is a Meta-Build system")
19796 (description
19797 "GYP builds build systems for large, cross platform applications.
19798 It can be used to generate XCode projects, Visual Studio projects, Ninja build
19799 files, and Makefiles.")
19800 (license license:bsd-3))))
19801
19802 (define-public python2-gyp
19803 (package-with-python2 python-gyp))
19804
19805 (define-public python-whatever
19806 (package
19807 (name "python-whatever")
19808 (version "0.6")
19809 (source
19810 (origin
19811 (method git-fetch)
19812 (uri (git-reference
19813 (url "https://github.com/Suor/whatever")
19814 (commit version)))
19815 (file-name (git-file-name name version))
19816 (sha256
19817 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
19818 (build-system python-build-system)
19819 (arguments
19820 `(#:phases
19821 (modify-phases %standard-phases
19822 (replace 'check
19823 (lambda _
19824 (invoke "py.test"))))))
19825 (native-inputs
19826 `(("python-pytest" ,python-pytest)))
19827 (home-page "https://github.com/Suor/whatever")
19828 (synopsis "Make anonymous functions by partial application of operators")
19829 (description "@code{whatever} provides an easy way to make anonymous
19830 functions by partial application of operators.")
19831 (license license:bsd-3)))
19832
19833 (define-public python2-whatever
19834 (package-with-python2 python-whatever))
19835
19836 (define-public python-funcy
19837 (package
19838 (name "python-funcy")
19839 (version "1.11")
19840 (source
19841 (origin
19842 (method git-fetch)
19843 (uri (git-reference
19844 (url "https://github.com/Suor/funcy")
19845 (commit version)))
19846 (sha256
19847 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
19848 (file-name (git-file-name name version))))
19849 (build-system python-build-system)
19850 (arguments
19851 `(#:phases
19852 (modify-phases %standard-phases
19853 (replace 'check
19854 (lambda _
19855 (invoke "py.test"))))))
19856 (native-inputs
19857 `(("python-pytest" ,python-pytest)
19858 ("python-whatever" ,python-whatever)))
19859 (home-page "https://github.com/Suor/funcy")
19860 (synopsis "Functional tools")
19861 (description "@code{funcy} is a library that provides functional tools.
19862 Examples are:
19863 @enumerate
19864 @item merge - Merges collections of the same type
19865 @item walk - Type-preserving map
19866 @item select - Selects a part of a collection
19867 @item take - Takes the first n items of a collection
19868 @item first - Takes the first item of a collection
19869 @item remove - Predicated-removes items of a collection
19870 @item concat - Concatenates two collections
19871 @item flatten - Flattens a collection with subcollections
19872 @item distinct - Returns only distinct items
19873 @item split - Predicated-splits a collection
19874 @item split_at - Splits a collection at a given item
19875 @item group_by - Groups items by group
19876 @item pairwise - Pairs off adjacent items
19877 @item partial - Partially-applies a function
19878 @item curry - Curries a function
19879 @item compose - Composes functions
19880 @item complement - Complements a predicate
19881 @item all_fn - \"all\" with predicate
19882 @end enumerate")
19883 (license license:bsd-3)))
19884
19885 (define-public python2-funcy
19886 (package-with-python2 python-funcy))
19887
19888 (define-public python-isoweek
19889 (package
19890 (name "python-isoweek")
19891 (version "1.3.3")
19892 (source
19893 (origin
19894 (method url-fetch)
19895 (uri (pypi-uri "isoweek" version))
19896 (sha256
19897 (base32
19898 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
19899 (build-system python-build-system)
19900 (home-page "https://github.com/gisle/isoweek")
19901 (synopsis "Objects representing a week")
19902 (description "The @code{isoweek} module provide the class Week that
19903 implements the week definition of ISO 8601. This standard also defines
19904 a notation for identifying weeks; yyyyWww (where the W is a literal).
19905 Week instances stringify to this form.")
19906 (license license:bsd-3)))
19907
19908 (define-public python2-isoweek
19909 (package-with-python2 python-isoweek))
19910
19911 (define-public python-pyzbar
19912 (package
19913 (name "python-pyzbar")
19914 (version "0.1.8")
19915 (source
19916 (origin
19917 ;; There's no source tarball on PyPI.
19918 (method git-fetch)
19919 (uri (git-reference
19920 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
19921 (commit (string-append "v" version))))
19922 (file-name (git-file-name name version))
19923 (sha256
19924 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
19925 (build-system python-build-system)
19926 (arguments
19927 `(#:phases
19928 (modify-phases %standard-phases
19929 (add-after 'unpack 'remove-failing-test
19930 (lambda _
19931 ;; This tests if find_library was called once, but we remove
19932 ;; the call in the stage below to make the library find libzbar.
19933 (delete-file "pyzbar/tests/test_zbar_library.py")
19934 #t))
19935 (add-before 'build 'set-library-file-name
19936 (lambda* (#:key inputs #:allow-other-keys)
19937 (let ((libzbar (assoc-ref inputs "zbar")))
19938 (substitute* "pyzbar/zbar_library.py"
19939 (("find_library\\('zbar'\\)")
19940 (string-append "'" libzbar "/lib/libzbar.so.0'")))
19941 #t))))))
19942 (native-inputs
19943 `(("pkg-config" ,pkg-config)
19944 ("python-numpy" ,python-numpy)
19945 ("python-pillow" ,python-pillow)))
19946 (inputs
19947 `(("zbar" ,zbar)))
19948 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
19949 (synopsis "Read one-dimensional barcodes and QR codes")
19950 (description
19951 "Read one-dimensional barcodes and QR codes using the zbar library.
19952
19953 Features:
19954
19955 @itemize
19956 @item Pure python
19957 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
19958 @item Decodes locations of barcodes
19959 @item No dependencies, other than the zbar library itself
19960 @end itemize")
19961 (license license:expat)))
19962
19963 (define-public python-tokenize-rt
19964 (package
19965 (name "python-tokenize-rt")
19966 (version "2.0.1")
19967 (source
19968 (origin
19969 (method url-fetch)
19970 (uri (pypi-uri "tokenize-rt" version))
19971 (sha256
19972 (base32
19973 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
19974 (build-system python-build-system)
19975 (home-page "https://github.com/asottile/tokenize-rt")
19976 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
19977 (description
19978 "This Python library is a wrapper around @code{tokenize} from the Python
19979 standard library. It provides two additional tokens @code{ESCAPED_NL} and
19980 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
19981 and @code{tokens_to_src} to roundtrip.")
19982 (license license:expat)))
19983
19984 (define-public python-future-fstrings
19985 (package
19986 (name "python-future-fstrings")
19987 (version "0.4.1")
19988 (source
19989 (origin
19990 (method url-fetch)
19991 (uri (pypi-uri "future_fstrings" version))
19992 (sha256
19993 (base32
19994 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
19995 (build-system python-build-system)
19996 (propagated-inputs
19997 `(("python-tokenize-rt" ,python-tokenize-rt)))
19998 (home-page "https://github.com/asottile/future-fstrings")
19999 (synopsis "Backport of fstrings to Python < 3.6")
20000 (description
20001 "This package provides a UTF-8 compatible encoding
20002 @code{future_fstrings}, which performs source manipulation. It decodes the
20003 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
20004 @code{f} strings.")
20005 (license license:expat)))
20006
20007 (define-public python-typed-ast
20008 (package
20009 (name "python-typed-ast")
20010 (version "1.4.2")
20011 (source
20012 (origin
20013 (method git-fetch)
20014 (uri (git-reference
20015 (url "https://github.com/python/typed_ast")
20016 (commit version)))
20017 (sha256
20018 (base32 "1wr6pkvvrq6rzjjw88pd5xy8fy06msam4hlxbkglvdmwh4c083l0"))
20019 (file-name (git-file-name name version))))
20020 (build-system python-build-system)
20021 (arguments
20022 `(#:phases
20023 (modify-phases %standard-phases
20024 (replace 'check
20025 (lambda _
20026 (invoke "pytest"))))))
20027 (native-inputs `(("python-pytest" ,python-pytest)))
20028 (home-page "https://github.com/python/typed_ast")
20029 (synopsis "Fork of Python @code{ast} modules with type comment support")
20030 (description "This package provides a parser similar to the standard
20031 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
20032 include PEP 484 type comments and are independent of the version of Python
20033 under which they are run. The @code{typed_ast} parsers produce the standard
20034 Python AST (plus type comments), and are both fast and correct, as they are
20035 based on the CPython 2.7 and 3.7 parsers.")
20036 ;; See the file "LICENSE" for the details.
20037 (license (list license:psfl
20038 license:asl2.0
20039 license:expat)))) ;ast27/Parser/spark.py
20040
20041 (define-public python-typer
20042 (package
20043 (name "python-typer")
20044 (version "0.3.2")
20045 (source
20046 (origin
20047 ;; Building `python-typer` from the git repository requires the `flit-core`
20048 ;; Python package that is not installed by `python-flit`.
20049 (method url-fetch)
20050 (uri (pypi-uri "typer" version))
20051 (sha256
20052 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
20053 (build-system python-build-system)
20054 (arguments
20055 `(#:phases
20056 (modify-phases %standard-phases
20057 (add-before 'check 'disable-failing-tests
20058 (lambda _
20059 (substitute* "tests/test_completion/test_completion.py"
20060 (("def test_show_completion")
20061 "def _test_show_completion")
20062 (("def test_install_completion")
20063 "def _test_install_completion"))
20064 (substitute* "tests/test_completion/test_completion_install.py"
20065 (("def test_completion_install_bash")
20066 "def _test_completion_install_bash")
20067 (("def test_completion_install_zsh")
20068 "def _test_completion_install_zsh")
20069 (("def test_completion_install_fish")
20070 "def _test_completion_install_fish")
20071 (("def test_completion_install_powershell")
20072 "def _test_completion_install_powershell"))
20073 #t))
20074 (replace 'check
20075 (lambda _
20076 (setenv "PYTHONPATH"
20077 (string-append (getcwd) ":"
20078 (getenv "PYTHONPATH")))
20079 (invoke "python" "-m" "pytest" "tests/")
20080 #t)))))
20081 (propagated-inputs
20082 `(("python-click" ,python-click)))
20083 (native-inputs
20084 `(("python-coverage" ,python-coverage)
20085 ("python-pytest" ,python-pytest)
20086 ("python-shellingham" ,python-shellingham)))
20087 (home-page "https://github.com/tiangolo/typer")
20088 (synopsis
20089 "Typer builds CLI based on Python type hints")
20090 (description
20091 "Typer is a library for building CLI applications. It's based on
20092 Python 3.6+ type hints.")
20093 ;; MIT license
20094 (license license:expat)))
20095
20096 (define-public python-typing
20097 (package
20098 (name "python-typing")
20099 (version "3.7.4.3")
20100 (source
20101 (origin
20102 (method url-fetch)
20103 (uri (pypi-uri "typing" version))
20104 (sha256
20105 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
20106 (build-system python-build-system)
20107 (home-page "https://docs.python.org/3/library/typing.html")
20108 (synopsis "Type hints for Python")
20109 (description "This is a backport of the standard library @code{typing}
20110 module to Python versions older than 3.5. Typing defines a standard notation
20111 for Python function and variable type annotations. The notation can be used
20112 for documenting code in a concise, standard format, and it has been designed
20113 to also be used by static and runtime type checkers, static analyzers, IDEs
20114 and other tools.")
20115 (license license:psfl)))
20116
20117 (define-public python2-typing
20118 (package-with-python2 python-typing))
20119
20120 (define-public python-typing-extensions
20121 (package
20122 (name "python-typing-extensions")
20123 (version "3.7.4.3")
20124 (source
20125 (origin
20126 (method url-fetch)
20127 (uri (pypi-uri "typing_extensions" version))
20128 (sha256
20129 (base32
20130 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20131 (build-system python-build-system)
20132 (home-page
20133 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20134 (synopsis "Experimental type hints for Python")
20135 (description
20136 "The typing_extensions module contains additional @code{typing} hints not
20137 yet present in the of the @code{typing} standard library.
20138 Included are implementations of:
20139 @enumerate
20140 @item ClassVar
20141 @item ContextManager
20142 @item Counter
20143 @item DefaultDict
20144 @item Deque
20145 @item NewType
20146 @item NoReturn
20147 @item overload
20148 @item Protocol
20149 @item runtime
20150 @item Text
20151 @item Type
20152 @item TYPE_CHECKING
20153 @item AsyncGenerator
20154 @end enumerate\n")
20155 (license license:psfl)))
20156
20157 (define-public bpython
20158 (package
20159 (name "bpython")
20160 (version "0.21")
20161 (source
20162 (origin
20163 (method url-fetch)
20164 (uri (pypi-uri "bpython" version))
20165 (sha256
20166 (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
20167 (build-system python-build-system)
20168 (arguments
20169 `(#:phases
20170 (modify-phases %standard-phases
20171 (add-after 'unpack 'remove-failing-test
20172 (lambda _
20173 ;; Remove failing test. FIXME: make it pass
20174 (delete-file "bpython/test/test_args.py")
20175 #t))
20176 (add-after 'wrap 'add-aliases
20177 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20178 (lambda* (#:key outputs #:allow-other-keys)
20179 (let ((out (assoc-ref outputs "out")))
20180 (for-each
20181 (lambda (old new)
20182 (symlink old (string-append out "/bin/" new)))
20183 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20184 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20185 #t)))))
20186 (propagated-inputs
20187 `(("python-pygments" ,python-pygments)
20188 ("python-requests" ,python-requests)
20189 ("python-curtsies" ,python-curtsies)
20190 ("python-greenlet" ,python-greenlet)
20191 ("python-six" ,python-six)
20192 ("python-cwcwidth" ,python-cwcwidth)
20193 ("python-pyxdg" ,python-pyxdg)
20194 ;; optional dependencies
20195 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20196 ("python-watchdog" ,python-watchdog)
20197 ("python-jedi" ,python-jedi)))
20198 (native-inputs
20199 `(("python-sphinx" ,python-sphinx)
20200 ("python-mock" ,python-mock)
20201 ("python-tox" ,python-tox)
20202 ("python-wheel" ,python-wheel)))
20203 (home-page "https://bpython-interpreter.org/")
20204 (synopsis "Fancy interface to the Python interpreter")
20205 (description "Bpython is a fancy interface to the Python
20206 interpreter. bpython's main features are
20207
20208 @enumerate
20209 @item in-line syntax highlighting,
20210 @item readline-like autocomplete with suggestions displayed as you type,
20211 @item expected parameter list for any Python function,
20212 @item \"rewind\" function to pop the last line of code from memory and
20213 re-evaluate,
20214 @item send the code you've entered off to a pastebin,
20215 @item save the code you've entered to a file, and
20216 @item auto-indentation.
20217 @end enumerate")
20218 (license license:expat)))
20219
20220 (define-public python-pyinotify
20221 (package
20222 (name "python-pyinotify")
20223 (version "0.9.6")
20224 (source (origin
20225 (method url-fetch)
20226 (uri (pypi-uri "pyinotify" version))
20227 (sha256
20228 (base32
20229 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20230 (build-system python-build-system)
20231 (arguments `(#:tests? #f)) ;no tests
20232 (home-page "https://github.com/seb-m/pyinotify")
20233 (synopsis "Python library for monitoring inotify events")
20234 (description
20235 "@code{pyinotify} provides a Python interface for monitoring
20236 file system events on Linux.")
20237 (license license:expat)))
20238
20239 (define-public python2-pyinotify
20240 (package-with-python2 python-pyinotify))
20241
20242 ;; Ada parser uses this version.
20243 (define-public python2-quex-0.67.3
20244 (package
20245 (name "python2-quex")
20246 (version "0.67.3")
20247 (source
20248 (origin
20249 (method url-fetch)
20250 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20251 (version-major+minor version)
20252 "/quex-" version ".zip"))
20253 (sha256
20254 (base32
20255 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20256 (build-system python-build-system)
20257 (native-inputs
20258 `(("unzip" ,unzip)))
20259 (arguments
20260 `(#:python ,python-2
20261 #:tests? #f
20262 #:phases
20263 (modify-phases %standard-phases
20264 (delete 'configure)
20265 (delete 'build)
20266 (replace 'install
20267 (lambda* (#:key outputs #:allow-other-keys)
20268 (let* ((out (assoc-ref outputs "out"))
20269 (share/quex (string-append out "/share/quex"))
20270 (bin (string-append out "/bin")))
20271 (copy-recursively "." share/quex)
20272 (mkdir-p bin)
20273 (symlink (string-append share/quex "/quex-exe.py")
20274 (string-append bin "/quex"))
20275 #t))))))
20276 (native-search-paths
20277 (list (search-path-specification
20278 (variable "QUEX_PATH")
20279 (files '("share/quex")))))
20280 (home-page "http://quex.sourceforge.net/")
20281 (synopsis "Lexical analyzer generator in Python")
20282 (description "@code{quex} is a lexical analyzer generator in Python.")
20283 (license license:lgpl2.1+))) ; Non-military
20284
20285 (define-public python2-quex
20286 (package (inherit python2-quex-0.67.3)
20287 (name "python2-quex")
20288 (version "0.68.1")
20289 (source
20290 (origin
20291 (method url-fetch)
20292 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20293 (sha256
20294 (base32
20295 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20296 (file-name (string-append name "-" version ".tar.gz"))))))
20297
20298 (define-public python-more-itertools
20299 (package
20300 (name "python-more-itertools")
20301 (version "8.2.0")
20302 (source
20303 (origin
20304 (method url-fetch)
20305 (uri (pypi-uri "more-itertools" version))
20306 (sha256
20307 (base32
20308 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
20309 (build-system python-build-system)
20310 (home-page "https://github.com/erikrose/more-itertools")
20311 (synopsis "More routines for operating on iterables, beyond itertools")
20312 (description "Python's built-in @code{itertools} module implements a
20313 number of iterator building blocks inspired by constructs from APL, Haskell,
20314 and SML. @code{more-itertools} includes additional building blocks for
20315 working with iterables.")
20316 (properties `((python2-variant . ,(delay python2-more-itertools))))
20317 (license license:expat)))
20318
20319 ;; The 5.x series are the last versions supporting Python 2.7.
20320 (define-public python2-more-itertools
20321 (package
20322 (inherit python-more-itertools)
20323 (name "python2-more-itertools")
20324 (version "5.0.0")
20325 (source (origin
20326 (method url-fetch)
20327 (uri (pypi-uri "more-itertools" version))
20328 (sha256
20329 (base32
20330 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
20331 (arguments
20332 `(#:python ,python-2))
20333 (propagated-inputs
20334 `(("python2-six" ,python2-six-bootstrap)))))
20335
20336 (define-public python-latexcodec
20337 (package
20338 (name "python-latexcodec")
20339 (version "1.0.7")
20340 (source
20341 (origin
20342 (method url-fetch)
20343 (uri (pypi-uri "latexcodec" version))
20344 (sha256
20345 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
20346 (build-system python-build-system)
20347 (inputs
20348 `(("python-six" ,python-six)))
20349 (home-page "https://readthedocs.org/projects/latexcodec/")
20350 (synopsis "Work with LaTeX code in Python")
20351 (description "Lexer and codec to work with LaTeX code in Python.")
20352 (license license:expat)))
20353
20354 (define-public python-pybtex
20355 (package
20356 (name "python-pybtex")
20357 (version "0.22.2")
20358 (source
20359 (origin
20360 (method url-fetch)
20361 (uri (pypi-uri "pybtex" version))
20362 (sha256
20363 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
20364 (build-system python-build-system)
20365 (native-inputs
20366 `(("python-nose" ,python-nose)))
20367 (inputs
20368 `(("python-latexcodec" ,python-latexcodec)
20369 ("python-pyyaml" ,python-pyyaml)
20370 ("python-six" ,python-six)))
20371 (arguments
20372 `(#:test-target "nosetests"))
20373 (home-page "https://pybtex.org/")
20374 (synopsis "BibTeX-compatible bibliography processor")
20375 (description "Pybtex is a BibTeX-compatible bibliography processor written
20376 in Python. You can simply type pybtex instead of bibtex.")
20377 (license license:expat)))
20378
20379 (define-public python-onetimepass
20380 (package
20381 (name "python-onetimepass")
20382 (version "1.0.1")
20383 (source
20384 (origin
20385 (method url-fetch)
20386 (uri (pypi-uri "onetimepass" version))
20387 (sha256
20388 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
20389 (build-system python-build-system)
20390 (propagated-inputs `(("python-six" ,python-six)))
20391 (home-page "https://github.com/tadeck/onetimepass/")
20392 (synopsis "One-time password library")
20393 (description "Python one-time password library for HMAC-based (HOTP) and
20394 time-based (TOTP) passwords.")
20395 (license license:expat)))
20396
20397 (define-public python-parso
20398 (package
20399 (name "python-parso")
20400 (version "0.8.2")
20401 (source
20402 (origin
20403 (method url-fetch)
20404 (uri (pypi-uri "parso" version))
20405 (sha256
20406 (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
20407 (native-inputs
20408 `(("python-pytest" ,python-pytest)))
20409 (build-system python-build-system)
20410 (arguments
20411 `(#:phases (modify-phases %standard-phases
20412 (replace 'check
20413 (lambda _ (invoke "pytest" "-vv"))))))
20414 (home-page "https://github.com/davidhalter/parso")
20415 (synopsis "Python Parser")
20416 (description "Parso is a Python parser that supports error recovery and
20417 round-trip parsing for different Python versions (in multiple Python versions).
20418 Parso is also able to list multiple syntax errors in your Python file.")
20419 (license license:expat)))
20420
20421 (define-public python2-parso
20422 (package-with-python2 python-parso))
20423
20424 (define-public python-async-generator
20425 (package
20426 (name "python-async-generator")
20427 (version "1.10")
20428 (source
20429 (origin
20430 (method url-fetch)
20431 (uri (pypi-uri "async_generator" version))
20432 (sha256
20433 (base32
20434 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
20435 (build-system python-build-system)
20436 (native-inputs
20437 `(("python-pytest" ,python-pytest)))
20438 (home-page "https://github.com/python-trio/async_generator")
20439 (synopsis "Async generators and context managers for Python 3.5+")
20440 (description "@code{async_generator} back-ports Python 3.6's native async
20441 generators and Python 3.7's context managers into Python 3.5.")
20442 ;; Dual licensed.
20443 (license (list license:expat license:asl2.0))))
20444
20445 (define-public python-async-timeout
20446 (package
20447 (name "python-async-timeout")
20448 (version "3.0.1")
20449 (source
20450 (origin
20451 (method url-fetch)
20452 (uri (pypi-uri "async-timeout" version))
20453 (sha256
20454 (base32
20455 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
20456 (build-system python-build-system)
20457 (home-page "https://github.com/aio-libs/async_timeout/")
20458 (synopsis "Timeout context manager for asyncio programs")
20459 (description "@code{async-timeout} provides a timeout timeout context
20460 manager compatible with @code{asyncio}.")
20461 (license license:asl2.0)))
20462
20463 (define-public python-glob2
20464 (package
20465 (name "python-glob2")
20466 (version "0.7")
20467 (source
20468 (origin
20469 (method git-fetch)
20470 (uri (git-reference
20471 (url "https://github.com/miracle2k/python-glob2")
20472 (commit (string-append "v" version))))
20473 (file-name (git-file-name name version))
20474 (sha256
20475 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
20476 (build-system python-build-system)
20477 (home-page "https://github.com/miracle2k/python-glob2/")
20478 (synopsis "Extended Version of the python buildin glob module")
20479 (description "This is an extended version of the Python
20480 @url{http://docs.python.org/library/glob.html, built-in glob module} which
20481 adds:
20482
20483 @itemize
20484 @item The ability to capture the text matched by glob patterns, and return
20485 those matches alongside the file names.
20486 @item A recursive @code{**} globbing syntax, akin for example to the
20487 @code{globstar} option of Bash.
20488 @item The ability to replace the file system functions used, in order to glob
20489 on virtual file systems.
20490 @item Compatible with Python 2 and Python 3 (tested with 3.3).
20491 @end itemize
20492
20493 Glob2 currently based on the glob code from Python 3.3.1.")
20494 (license license:bsd-2)))
20495
20496 (define-public python2-glob2
20497 (package-with-python2 python-glob2))
20498
20499 (define-public python-gipc
20500 (package
20501 (name "python-gipc")
20502 (version "0.6.0")
20503 (source
20504 (origin
20505 (method url-fetch)
20506 (uri (pypi-uri "gipc" version ".zip"))
20507 (sha256
20508 (base32
20509 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
20510 (build-system python-build-system)
20511 (native-inputs
20512 `(("unzip" ,unzip)))
20513 (propagated-inputs
20514 `(("python-gevent" ,python-gevent)))
20515 (home-page "https://gehrcke.de/gipc/")
20516 (synopsis "Child process management in the context of gevent")
20517 (description "Usage of Python's multiprocessing package in a
20518 gevent-powered application may raise problems. With @code{gipc},
20519 process-based child processes can safely be created anywhere within a
20520 gevent-powered application.")
20521 (license license:expat)))
20522
20523 (define-public python-beautifultable
20524 (package
20525 (name "python-beautifultable")
20526 (version "1.0.0")
20527 (source
20528 (origin
20529 (method url-fetch)
20530 (uri (pypi-uri "beautifultable" version))
20531 (sha256
20532 (base32
20533 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
20534 (build-system python-build-system)
20535 (propagated-inputs
20536 `(("python-wcwidth" ,python-wcwidth)))
20537 (arguments
20538 `(#:phases
20539 (modify-phases %standard-phases
20540 (add-after 'unpack 'patch-setup.py
20541 (lambda _
20542 (substitute* "setup.py"
20543 (("setup\\(")
20544 "setup(\n test_suite=\"test\",")))))))
20545 (home-page "https://github.com/pri22296/beautifultable")
20546 (synopsis "Print ASCII tables for terminals")
20547 (description "@code{python-beautifultable} provides a class for easily
20548 printing tabular data in a visually appealing ASCII format to a terminal.
20549
20550 Features include, but are not limited to:
20551 @itemize
20552 @item Full customization of the look and feel of the table
20553 @item Row and column accessors.
20554 @item Full support for colors using ANSI sequences or any library.
20555 @item Plenty of predefined styles and option to create custom ones.
20556 @item Support for Unicode characters.
20557 @item Supports streaming table when data is slow to retrieve.
20558 @end itemize")
20559 (license license:expat)))
20560
20561 (define-public python-globber
20562 (package
20563 (name "python-globber")
20564 (version "0.2.1")
20565 (source
20566 (origin
20567 (method git-fetch)
20568 (uri (git-reference
20569 (url "https://github.com/asharov/globber")
20570 (commit version)))
20571 (file-name (git-file-name name version))
20572 (sha256
20573 (base32
20574 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
20575 (build-system python-build-system)
20576 (home-page "https://github.com/asharov/globber")
20577 (synopsis "Library for string matching with glob patterns")
20578 (description
20579 "Globber is a Python library for matching file names against glob patterns.
20580 In contrast to other glob-matching libraries, it matches arbitrary strings and
20581 doesn't require the matched names to be existing files. In addition, it
20582 supports the globstar @code{**} operator to match an arbitrary number of
20583 path components.")
20584 (license license:asl2.0)))
20585
20586 (define-public python-git-hammer
20587 (package
20588 (name "python-git-hammer")
20589 (version "0.3.1")
20590 (source
20591 (origin
20592 (method git-fetch)
20593 (uri (git-reference
20594 (url "https://github.com/asharov/git-hammer")
20595 (commit version)))
20596 (file-name (git-file-name name version))
20597 (sha256
20598 (base32
20599 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
20600 (build-system python-build-system)
20601 (arguments
20602 `(#:phases
20603 (modify-phases %standard-phases
20604 (add-after 'unpack 'patch-setup.py
20605 (lambda _
20606 (substitute* "setup.py"
20607 (("setup\\(")
20608 "setup(\n test_suite=\"test\",")))))))
20609 (propagated-inputs
20610 `(("python-beautifultable" ,python-beautifultable)
20611 ("python-dateutil" ,python-dateutil)
20612 ("python-gitpython" ,python-gitpython)
20613 ("python-globber" ,python-globber)
20614 ("python-matplotlib" ,python-matplotlib)
20615 ("python-sqlalchemy" ,python-sqlalchemy)
20616 ("python-sqlalchemy-utils"
20617 ,python-sqlalchemy-utils)))
20618 (home-page "https://github.com/asharov/git-hammer")
20619 (synopsis "Provide statistics for git repositories")
20620 (description
20621 "Git Hammer is a statistics tool for projects in git repositories.
20622 Its major feature is tracking the number of lines authored by each person for every
20623 commit, but it also includes some other useful statistics.")
20624 (license license:asl2.0)))
20625
20626 (define-public python-fusepy
20627 (package
20628 (name "python-fusepy")
20629 (version "2.0.4")
20630 (source
20631 (origin
20632 (method url-fetch)
20633 (uri (pypi-uri "fusepy" version))
20634 (sha256
20635 (base32
20636 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
20637 (build-system python-build-system)
20638 (arguments
20639 `(#:phases
20640 (modify-phases %standard-phases
20641 (add-before 'build 'set-library-file-name
20642 (lambda* (#:key inputs #:allow-other-keys)
20643 (let ((fuse (assoc-ref inputs "fuse")))
20644 (substitute* "fuse.py"
20645 (("find_library\\('fuse'\\)")
20646 (string-append "'" fuse "/lib/libfuse.so'")))
20647 #t))))))
20648 (propagated-inputs
20649 `(("fuse" ,fuse)))
20650 (home-page "https://github.com/fusepy/fusepy")
20651 (synopsis "Simple ctypes bindings for FUSE")
20652 (description "Python module that provides a simple interface to FUSE and
20653 MacFUSE. The binding is created using the standard @code{ctypes} library.")
20654 (license license:isc)))
20655
20656 (define-public python2-fusepy
20657 (package-with-python2 python-fusepy))
20658
20659 (define-public python-fusepyng
20660 (package
20661 (name "python-fusepyng")
20662 (version "1.0.7")
20663 (source
20664 (origin
20665 (method url-fetch)
20666 (uri (pypi-uri "fusepyng" version))
20667 (sha256
20668 (base32
20669 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
20670 (build-system python-build-system)
20671 (arguments
20672 '(#:phases
20673 (modify-phases %standard-phases
20674 (add-after 'unpack 'set-libfuse-path
20675 (lambda* (#:key inputs #:allow-other-keys)
20676 (let ((fuse (assoc-ref inputs "fuse")))
20677 (substitute* "fusepyng.py"
20678 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
20679 (string-append "\"" fuse "/lib/libfuse.so\""))))
20680 #t)))))
20681 (inputs
20682 `(("fuse" ,fuse)))
20683 (propagated-inputs
20684 `(("python-paramiko" ,python-paramiko)))
20685 (home-page "https://github.com/rianhunter/fusepyng")
20686 (synopsis "Simple ctypes bindings for FUSE")
20687 (description "@code{fusepyng} is a Python module that provides a simple
20688 interface to FUSE on various operating systems. It's just one file and is
20689 implemented using @code{ctypes}.")
20690 (license license:isc)))
20691
20692 (define-public python-userspacefs
20693 (package
20694 (name "python-userspacefs")
20695 (version "2.0.3")
20696 (source
20697 (origin
20698 (method url-fetch)
20699 (uri (pypi-uri "userspacefs" version))
20700 (sha256
20701 (base32
20702 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
20703 (build-system python-build-system)
20704 (propagated-inputs
20705 `(("python-fusepyng" ,python-fusepyng)))
20706 (home-page "https://github.com/rianhunter/userspacefs")
20707 (synopsis "User-space file systems for Python")
20708 (description
20709 "@code{userspacefs} is a library that allows you to easily write
20710 user-space file systems in Python.")
20711 (license license:gpl3+)))
20712
20713 (define-public python-stone
20714 (package
20715 (name "python-stone")
20716 (version "3.2.1")
20717 (source
20718 (origin
20719 (method url-fetch)
20720 (uri (pypi-uri "stone" version))
20721 (sha256
20722 (base32
20723 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
20724 (build-system python-build-system)
20725 (arguments
20726 `(#:phases
20727 (modify-phases %standard-phases
20728 (add-after 'unpack 'change-version-requirements
20729 (lambda _
20730 ;; Match the requirement in test/requirements.txt
20731 (substitute* "setup.py"
20732 (("pytest < 5") "pytest < 7"))
20733 ;; We don't care about a coverage report.
20734 (substitute* "test/requirements.txt"
20735 (("coverage.*") "coverage\n"))))
20736 (replace 'check
20737 (lambda* (#:key tests? #:allow-other-keys)
20738 (when tests?
20739 ;; These tests don't import currectly.
20740 (delete-file "test/test_js_client.py")
20741 (delete-file "test/test_tsd_types.py")
20742 (delete-file "test/test_python_gen.py")
20743 (invoke "pytest")))))))
20744 (propagated-inputs
20745 `(("python-ply" ,python-ply)
20746 ("python-six" ,python-six)))
20747 (native-inputs
20748 `(("python-coverage" ,python-coverage)
20749 ("python-mock" ,python-mock)
20750 ("python-pytest" ,python-pytest)
20751 ("python-pytest-runner" ,python-pytest-runner)))
20752 (home-page "https://github.com/dropbox/stone")
20753 (synopsis "Official Api Spec Language for Dropbox")
20754 (description
20755 "Stone is an interface description language (IDL) for APIs.")
20756 (license license:expat)))
20757
20758 (define-public pybind11
20759 (package
20760 (name "pybind11")
20761 (version "2.6.2")
20762 (source (origin
20763 (method git-fetch)
20764 (uri (git-reference
20765 (url "https://github.com/pybind/pybind11")
20766 (commit (string-append "v" version))))
20767 (sha256
20768 (base32
20769 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
20770 (file-name (git-file-name name version))))
20771 (build-system cmake-build-system)
20772 (native-inputs
20773 `(("python" ,python-wrapper)
20774
20775 ;; The following dependencies are used for tests.
20776 ("python-pytest" ,python-pytest)
20777 ("catch" ,catch-framework2-1)
20778 ("eigen" ,eigen)))
20779 (arguments
20780 `(#:configure-flags
20781 (list (string-append "-DCATCH_INCLUDE_DIR="
20782 (assoc-ref %build-inputs "catch")
20783 "/include/catch"))
20784
20785 #:phases (modify-phases %standard-phases
20786 (add-after 'install 'install-python
20787 (lambda* (#:key outputs #:allow-other-keys)
20788 (let ((out (assoc-ref outputs "out")))
20789 (with-directory-excursion "../source"
20790 (setenv "PYBIND11_USE_CMAKE" "yes")
20791 (invoke "python" "setup.py" "install"
20792 "--single-version-externally-managed"
20793 "--root=/"
20794 (string-append "--prefix=" out)))))))
20795
20796 #:test-target "check"))
20797 (home-page "https://github.com/pybind/pybind11/")
20798 (synopsis "Seamless operability between C++11 and Python")
20799 (description
20800 "@code{pybind11} is a lightweight header-only library that exposes C++
20801 types in Python and vice versa, mainly to create Python bindings of existing
20802 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
20803 library: to minimize boilerplate code in traditional extension modules by
20804 inferring type information using compile-time introspection.")
20805 (license license:bsd-3)))
20806
20807 (define-public python-pooch
20808 (package
20809 (name "python-pooch")
20810 (version "1.3.0")
20811 (source
20812 (origin
20813 (method url-fetch)
20814 (uri (pypi-uri "pooch" version))
20815 (sha256
20816 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
20817 (build-system python-build-system)
20818 (arguments
20819 `(#:tests? #f)) ;requires online data
20820 (propagated-inputs
20821 `(("python-appdirs" ,python-appdirs)
20822 ("python-packaging" ,python-packaging)
20823 ("python-requests" ,python-requests)))
20824 (home-page "https://github.com/fatiando/pooch")
20825 (synopsis "Manage your Python library's sample data files")
20826 (description
20827 "Pooch manages your Python library's sample data files: it automatically
20828 downloads and stores them in a local directory, with support for versioning
20829 and corruption checks.")
20830 (license license:bsd-3)))
20831
20832 (define-public python-fasteners
20833 (package
20834 (name "python-fasteners")
20835 (version "0.15")
20836 (source
20837 (origin
20838 (method url-fetch)
20839 (uri (pypi-uri "fasteners" version))
20840 (sha256
20841 (base32
20842 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
20843 (build-system python-build-system)
20844 (propagated-inputs
20845 `(("python-monotonic" ,python-monotonic)
20846 ("python-six" ,python-six)))
20847 (native-inputs
20848 `(("python-testtools" ,python-testtools)))
20849 (home-page "https://github.com/harlowja/fasteners")
20850 (synopsis "Python package that provides useful locks")
20851 (description
20852 "This package provides a Python program that provides following locks:
20853
20854 @itemize
20855 @item Locking decorator
20856 @item Reader-writer locks
20857 @item Inter-process locks
20858 @item Generic helpers
20859 @end itemize\n")
20860 (license license:asl2.0)))
20861
20862 (define-public python-requests-file
20863 (package
20864 (name "python-requests-file")
20865 (version "1.4.3")
20866 (source
20867 (origin
20868 (method url-fetch)
20869 (uri (pypi-uri "requests-file" version))
20870 (sha256
20871 (base32
20872 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
20873 (build-system python-build-system)
20874 (propagated-inputs
20875 `(("python-requests" ,python-requests)
20876 ("python-six" ,python-six)))
20877 (home-page
20878 "https://github.com/dashea/requests-file")
20879 (synopsis "File transport adapter for Requests")
20880 (description
20881 "Requests-File is a transport adapter for use with the Requests Python
20882 library to allow local file system access via @code{file://} URLs.")
20883 (license license:asl2.0)))
20884
20885 (define-public python2-requests-file
20886 (package-with-python2 python-requests-file))
20887
20888 (define-public python-identify
20889 (package
20890 (name "python-identify")
20891 (version "1.4.25")
20892 (source
20893 (origin
20894 ;; There are no tests in the PyPI tarball.
20895 (method git-fetch)
20896 (uri (git-reference
20897 (url "https://github.com/chriskuehl/identify")
20898 (commit (string-append "v" version))))
20899 (file-name (git-file-name name version))
20900 (sha256
20901 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
20902 (build-system python-build-system)
20903 (arguments
20904 `(#:phases
20905 (modify-phases %standard-phases
20906 ;; system-error "utime" "~A" ("No such file or directory")
20907 (delete 'ensure-no-mtimes-pre-1980)
20908 (replace 'check
20909 (lambda* (#:key tests? #:allow-other-keys)
20910 (when tests?
20911 (invoke "pytest" "-vv")))))))
20912 (native-inputs
20913 `(("python-coverage" ,python-coverage)
20914 ("python-pytest" ,python-pytest)))
20915 (propagated-inputs
20916 `(("python-editdistance" ,python-editdistance)))
20917 (home-page "https://github.com/chriskuehl/identify")
20918 (synopsis "File identification library for Python")
20919 (description
20920 "@code{identify} is a file identification library for Python. Given
20921 a file (or some information about a file), return a set of standardized tags
20922 identifying what the file is.")
20923 (license license:expat)))
20924
20925 (define-public python-tldextract
20926 (package
20927 (name "python-tldextract")
20928 (version "2.2.0")
20929 (source
20930 (origin
20931 (method url-fetch)
20932 (uri (pypi-uri "tldextract" version))
20933 (sha256
20934 (base32
20935 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
20936 (build-system python-build-system)
20937 (native-inputs
20938 `(("python-pytest" ,python-pytest)
20939 ("python-responses" ,python-responses)))
20940 (propagated-inputs
20941 `(("python-idna" ,python-idna)
20942 ("python-requests" ,python-requests)
20943 ("python-requests-file" ,python-requests-file)))
20944 (home-page
20945 "https://github.com/john-kurkowski/tldextract")
20946 (synopsis
20947 "Separate the TLD from the registered domain and subdomains of a URL")
20948 (description
20949 "TLDExtract accurately separates the TLD from the registered domain and
20950 subdomains of a URL, using the Public Suffix List. By default, this includes
20951 the public ICANN TLDs and their exceptions. It can optionally support the
20952 Public Suffix List's private domains as well.")
20953 (license license:bsd-3)))
20954
20955 (define-public python2-tldextract
20956 (package-with-python2 python-tldextract))
20957
20958 (define-public python-tldr
20959 (package
20960 (name "python-tldr")
20961 (version "1.2.1")
20962 (source
20963 (origin
20964 ;; There's no test in PyPI.
20965 (method git-fetch)
20966 (uri (git-reference
20967 (url "https://github.com/tldr-pages/tldr-python-client")
20968 (commit version)))
20969 (file-name (git-file-name name version))
20970 (sha256
20971 (base32 "0n9wqvjxspm18vlxf9j9slrcydshk4rkv5nwkrqhfq606n6zvks4"))))
20972 (build-system python-build-system)
20973 (arguments
20974 `(#:phases
20975 (modify-phases %standard-phases
20976 (replace 'check
20977 (lambda* (#:key tests? #:allow-other-keys)
20978 (when tests?
20979 ;; This test fails. It tries to open a network socket.
20980 (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
20981 (native-inputs
20982 `(("python-pytest" ,python-pytest)
20983 ("python-pytest-runner" ,python-pytest-runner)))
20984 (inputs
20985 `(("python-argcomplete" ,python-argcomplete)
20986 ("python-colorama" ,python-colorama)
20987 ("python-termcolor" ,python-termcolor)))
20988 (home-page "https://github.com/tldr-pages/tldr-python-client")
20989 (synopsis "Python command-line client for tldr pages")
20990 (description "This package provides the @code{tldr} command allowing users
20991 to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
20992 effort to simplify the man pages with practical examples.")
20993 (license license:expat))) ; MIT license
20994
20995 (define-public python-nodeenv
20996 (package
20997 (name "python-nodeenv")
20998 (version "1.4.0")
20999 (source
21000 (origin
21001 ;; There's no tarball in PyPI.
21002 (method git-fetch)
21003 (uri (git-reference
21004 (url "https://github.com/ekalinin/nodeenv")
21005 (commit version)))
21006 (file-name (git-file-name name version))
21007 (sha256
21008 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
21009 (build-system python-build-system)
21010 (arguments
21011 `(#:phases
21012 (modify-phases %standard-phases
21013 (replace 'check
21014 (lambda _
21015 ;; This test fails. It tries to open a network socket.
21016 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
21017 (native-inputs
21018 `(("python-coverage" ,python-coverage)
21019 ("python-mock" ,python-mock)
21020 ("python-pytest" ,python-pytest)))
21021 (home-page "https://ekalinin.github.io/nodeenv/")
21022 (synopsis "Create isolated node.js environments")
21023 (description
21024 "Nodeenv (node.js virtual environment) is a tool to create isolated
21025 node.js environments. It creates an environment that has its own installation
21026 directories, that doesn't share libraries with other node.js virtual
21027 environments.")
21028 (license license:bsd-3)))
21029
21030 (define-public python-pynamecheap
21031 (package
21032 (name "python-pynamecheap")
21033 (version "0.0.3")
21034 (source
21035 (origin
21036 (method url-fetch)
21037 (uri (pypi-uri "PyNamecheap" version))
21038 (sha256
21039 (base32
21040 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
21041 (build-system python-build-system)
21042 (propagated-inputs
21043 `(("python-requests" ,python-requests)))
21044 (home-page
21045 "https://github.com/Bemmu/PyNamecheap")
21046 (synopsis
21047 "Namecheap API client in Python")
21048 (description
21049 "PyNamecheap is a Namecheap API client in Python.")
21050 (license license:expat)))
21051
21052 (define-public python2-pynamecheap
21053 (package-with-python2 python-pynamecheap))
21054
21055 (define-public python-dns-lexicon
21056 (package
21057 (name "python-dns-lexicon")
21058 (version "2.4.0")
21059 (source
21060 (origin
21061 (method url-fetch)
21062 (uri (pypi-uri "dns-lexicon" version))
21063 (sha256
21064 (base32
21065 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
21066 (build-system python-build-system)
21067 (arguments
21068 `(#:tests? #f)) ;requires internet access
21069 (propagated-inputs
21070 `(("python-future" ,python-future)
21071 ("python-pynamecheap" ,python-pynamecheap)
21072 ("python-requests" ,python-requests)
21073 ("python-tldextract" ,python-tldextract)
21074 ("python-urllib3" ,python-urllib3)))
21075 (home-page "https://github.com/AnalogJ/lexicon")
21076 (synopsis
21077 "Manipulate DNS records on various DNS providers")
21078 (description
21079 "Lexicon provides a way to manipulate DNS records on multiple DNS
21080 providers in a standardized way. It has a CLI but it can also be used as a
21081 Python library. It was designed to be used in automation, specifically with
21082 Let's Encrypt.")
21083 (license license:expat)))
21084
21085 (define-public python2-dns-lexicon
21086 (package-with-python2 python-dns-lexicon))
21087
21088 (define-public python-cfgv
21089 (package
21090 (name "python-cfgv")
21091 (version "3.1.0")
21092 (source
21093 (origin
21094 ;; There are no tests in the PyPI tarball.
21095 (method git-fetch)
21096 (uri (git-reference
21097 (url "https://github.com/asottile/cfgv")
21098 (commit (string-append "v" version))))
21099 (file-name (git-file-name name version))
21100 (sha256
21101 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
21102 (build-system python-build-system)
21103 (arguments
21104 `(#:phases
21105 (modify-phases %standard-phases
21106 (replace 'check
21107 (lambda _
21108 (invoke "pytest" "-vv"))))))
21109 (native-inputs
21110 `(("python-covdefaults" ,python-covdefaults)
21111 ("python-coverage" ,python-coverage)
21112 ("python-pytest" ,python-pytest)))
21113 (home-page "https://github.com/asottile/cfgv")
21114 (synopsis "Configuration validation library")
21115 (description
21116 "This library helps to validate configuration files and produce human
21117 readable error messages.")
21118 (license license:expat)))
21119
21120 (define-public python-commandlines
21121 (package
21122 (name "python-commandlines")
21123 (version "0.4.1")
21124 (source
21125 (origin
21126 (method url-fetch)
21127 (uri (pypi-uri "commandlines" version))
21128 (sha256
21129 (base32
21130 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
21131 (build-system python-build-system)
21132 (home-page "https://github.com/chrissimpkins/commandlines")
21133 (synopsis "Command line argument to object parsing library")
21134 (description
21135 "@code{Commandlines} is a Python library for command line application
21136 development that supports command line argument parsing, command string
21137 validation testing and application logic.")
21138 (license license:expat)))
21139
21140 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
21141 ;; python-numba. They have a very unflexible relationship.
21142 (define-public python-numba
21143 (package
21144 (name "python-numba")
21145 (version "0.51.2")
21146 (source
21147 (origin
21148 (method url-fetch)
21149 (uri (pypi-uri "numba" version))
21150 (sha256
21151 (base32
21152 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
21153 (build-system python-build-system)
21154 (arguments
21155 `(#:phases
21156 (modify-phases %standard-phases
21157 (add-after 'unpack 'disable-proprietary-features
21158 (lambda _
21159 (setenv "NUMBA_DISABLE_HSA" "1")
21160 (setenv "NUMBA_DISABLE_CUDA" "1")
21161 #t))
21162 (replace 'check
21163 (lambda* (#:key inputs outputs #:allow-other-keys)
21164 (add-installed-pythonpath inputs outputs)
21165 ;; Something is wrong with the PYTHONPATH when running the
21166 ;; tests from the build directory, as it complains about not being
21167 ;; able to import certain modules.
21168 (with-directory-excursion "/tmp"
21169 (setenv "HOME" (getcwd))
21170 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21171 (propagated-inputs
21172 `(("python-llvmlite" ,python-llvmlite)
21173 ("python-numpy" ,python-numpy)
21174 ("python-singledispatch" ,python-singledispatch)))
21175 (native-inputs ;for tests
21176 `(("python-jinja2" ,python-jinja2)
21177 ("python-pygments" ,python-pygments)))
21178 (home-page "https://numba.pydata.org")
21179 (synopsis "Compile Python code using LLVM")
21180 (description "Numba gives you the power to speed up your applications with
21181 high performance functions written directly in Python. With a few
21182 annotations, array-oriented and math-heavy Python code can be just-in-time
21183 compiled to native machine instructions, similar in performance to C, C++ and
21184 Fortran, without having to switch languages or Python interpreters.
21185
21186 Numba works by generating optimized machine code using the LLVM compiler
21187 infrastructure at import time, runtime, or statically (using the included pycc
21188 tool).")
21189 (license license:bsd-3)))
21190
21191 (define-public python-numcodecs
21192 (package
21193 (name "python-numcodecs")
21194 (version "0.6.4")
21195 (source
21196 (origin
21197 (method url-fetch)
21198 (uri (pypi-uri "numcodecs" version))
21199 (sha256
21200 (base32
21201 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21202 (build-system python-build-system)
21203 (propagated-inputs
21204 `(("python-numpy" ,python-numpy)
21205 ("python-msgpack" ,python-msgpack)))
21206 (native-inputs
21207 `(("python-pytest" ,python-pytest)
21208 ("python-setuptools-scm" ,python-setuptools-scm)))
21209 (home-page "https://github.com/zarr-developers/numcodecs")
21210 (synopsis "Buffer compression and transformation codecs")
21211 (description
21212 "This Python package provides buffer compression and transformation
21213 codecs for use in data storage and communication applications.")
21214 (license license:expat)))
21215
21216 (define-public python-asciitree
21217 (package
21218 (name "python-asciitree")
21219 (version "0.3.3")
21220 (source
21221 (origin
21222 (method url-fetch)
21223 (uri (pypi-uri "asciitree" version))
21224 (sha256
21225 (base32
21226 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21227 (build-system python-build-system)
21228 (home-page "https://github.com/mbr/asciitree")
21229 (synopsis "Draws ASCII trees")
21230 (description "This package draws tree structures using characters.")
21231 (license license:expat)))
21232
21233 (define-public python-zarr
21234 (package
21235 (name "python-zarr")
21236 (version "2.4.0")
21237 (source
21238 (origin
21239 (method url-fetch)
21240 (uri (pypi-uri "zarr" version))
21241 (sha256
21242 (base32
21243 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21244 (build-system python-build-system)
21245 (arguments
21246 `(#:phases
21247 (modify-phases %standard-phases
21248 (add-after 'unpack 'disable-service-tests
21249 (lambda _
21250 (setenv "ZARR_TEST_ABS" "0")
21251 (setenv "ZARR_TEST_MONGO" "0")
21252 (setenv "ZARR_TEST_REDIS" "0")
21253 #t))
21254 (replace 'check
21255 (lambda _
21256 (invoke "pytest" "-vv" "-k" "not lmdb")
21257 #t)))))
21258 (propagated-inputs
21259 `(("python-asciitree" ,python-asciitree)
21260 ("python-fasteners" ,python-fasteners)
21261 ("python-numcodecs" ,python-numcodecs)
21262 ("python-numpy" ,python-numpy)))
21263 (native-inputs
21264 `(("python-pytest" ,python-pytest)
21265 ("python-setuptools-scm" ,python-setuptools-scm)))
21266 (home-page "https://github.com/zarr-developers/zarr-python")
21267 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21268 (description
21269 "This package provides an implementation of chunked, compressed,
21270 N-dimensional arrays for Python.")
21271 (license license:expat)))
21272
21273 (define-public python-anndata
21274 (package
21275 (name "python-anndata")
21276 (version "0.7.6")
21277 (source
21278 (origin
21279 ;; The tarball from PyPi doesn't include tests.
21280 (method git-fetch)
21281 (uri (git-reference
21282 (url "https://github.com/theislab/anndata")
21283 (commit version)))
21284 (file-name (git-file-name name version))
21285 (sha256
21286 (base32
21287 "1q30bsfsq9xfqm8nmabg3bjh9gix3yng0170xiiyw1lin4xncf0q"))))
21288 (build-system python-build-system)
21289 (arguments
21290 `(#:phases
21291 (modify-phases %standard-phases
21292 (delete 'check)
21293 (add-before 'build 'relax-dependency-requirements
21294 (lambda _
21295 ;; We need to upgrade python-pandas to avoid
21296 ;; https://github.com/pandas-dev/pandas/issues/35446
21297 (substitute* "pyproject.toml"
21298 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21299 (replace 'build
21300 (lambda _
21301 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
21302 ;; ZIP does not support timestamps before 1980.
21303 (setenv "SOURCE_DATE_EPOCH" "315532800")
21304 (invoke "flit" "build")))
21305 (replace 'install
21306 (lambda* (#:key inputs outputs #:allow-other-keys)
21307 (add-installed-pythonpath inputs outputs)
21308 (let ((out (assoc-ref outputs "out")))
21309 (for-each (lambda (wheel)
21310 (format #true wheel)
21311 (invoke "python" "-m" "pip" "install"
21312 wheel (string-append "--prefix=" out)))
21313 (find-files "dist" "\\.whl$")))
21314 #t)))))
21315 (propagated-inputs
21316 `(("python-h5py" ,python-h5py)
21317 ("python-importlib-metadata" ,python-importlib-metadata)
21318 ("python-natsort" ,python-natsort)
21319 ("python-numcodecs" ,python-numcodecs)
21320 ("python-packaging" ,python-packaging)
21321 ("python-pandas" ,python-pandas)
21322 ("python-scipy" ,python-scipy)
21323 ("python-zarr" ,python-zarr)))
21324 (native-inputs
21325 `(("python-joblib" ,python-joblib)
21326 ("python-pytest" ,python-pytest)
21327 ("python-toml" ,python-toml)
21328 ("python-flit" ,python-flit)
21329 ("python-setuptools-scm" ,python-setuptools-scm)))
21330 (home-page "https://github.com/theislab/anndata")
21331 (synopsis "Annotated data for data analysis pipelines")
21332 (description "Anndata is a package for simple (functional) high-level APIs
21333 for data analysis pipelines. In this context, it provides an efficient,
21334 scalable way of keeping track of data together with learned annotations and
21335 reduces the code overhead typically encountered when using a mostly
21336 object-oriented library such as @code{scikit-learn}.")
21337 (license license:bsd-3)))
21338
21339 (define-public python-dill
21340 (package
21341 (name "python-dill")
21342 (version "0.3.1.1")
21343 (source
21344 (origin
21345 (method url-fetch)
21346 (uri (pypi-uri "dill" version))
21347 (sha256
21348 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
21349 (build-system python-build-system)
21350 (arguments
21351 `(#:phases
21352 (modify-phases %standard-phases
21353 (replace 'check
21354 (lambda _
21355 (with-directory-excursion "/tmp"
21356 (invoke "nosetests" "-v"))
21357 #t)))))
21358 (native-inputs
21359 `(("python-nose" ,python-nose)))
21360 (home-page "https://pypi.org/project/dill/")
21361 (synopsis "Serialize all of Python")
21362 (description "Dill extends Python's @code{pickle} module for serializing
21363 and de-serializing Python objects to the majority of the built-in Python
21364 types. Dill provides the user the same interface as the @code{pickle} module,
21365 and also includes some additional features. In addition to pickling Python
21366 objects, @code{dill} provides the ability to save the state of an interpreter
21367 session in a single command. Hence, it would be feasible to save a
21368 interpreter session, close the interpreter, ship the pickled file to another
21369 computer, open a new interpreter, unpickle the session and thus continue from
21370 the saved state of the original interpreter session.")
21371 (license license:bsd-3)))
21372
21373 (define-public python-multiprocess
21374 (package
21375 (name "python-multiprocess")
21376 (version "0.70.9")
21377 (source
21378 (origin
21379 (method url-fetch)
21380 (uri (pypi-uri "multiprocess" version))
21381 (sha256
21382 (base32
21383 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
21384 (build-system python-build-system)
21385 (arguments
21386 `(#:phases
21387 (modify-phases %standard-phases
21388 (add-after 'unpack 'disable-broken-tests
21389 (lambda _
21390 ;; This test is broken as there is no keyboard interrupt.
21391 (substitute* "py3.7/multiprocess/tests/__init__.py"
21392 (("^(.*)def test_wait_result"
21393 line indent)
21394 (string-append indent
21395 "@unittest.skip(\"Disabled by Guix\")\n"
21396 line)))
21397 #t))
21398 ;; Tests must be run after installation.
21399 (delete 'check)
21400 (add-after 'install 'check
21401 (lambda* (#:key inputs outputs #:allow-other-keys)
21402 (add-installed-pythonpath inputs outputs)
21403 (invoke "python" "-m" "multiprocess.tests")
21404 #t)))))
21405 (propagated-inputs
21406 `(("python-dill" ,python-dill)))
21407 (home-page "https://pypi.org/project/multiprocess/")
21408 (synopsis "Multiprocessing and multithreading in Python")
21409 (description
21410 "This package is a fork of the multiprocessing Python package, a package
21411 which supports the spawning of processes using the API of the standard
21412 library's @code{threading} module.")
21413 (license license:bsd-3)))
21414
21415 (define-public python-toolz
21416 (package
21417 (name "python-toolz")
21418 (version "0.11.1")
21419 (source
21420 (origin
21421 (method url-fetch)
21422 (uri (pypi-uri "toolz" version))
21423 (sha256
21424 (base32
21425 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
21426 (build-system python-build-system)
21427 (arguments
21428 `(#:phases
21429 (modify-phases %standard-phases
21430 (replace 'check
21431 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
21432 (when tests?
21433 (add-installed-pythonpath inputs outputs)
21434 (invoke "python" "-m" "pytest" "--doctest-modules"
21435 "--pyargs" "toolz")))))))
21436 (native-inputs
21437 `(("python-pytest" ,python-pytest)))
21438 (home-page "https://github.com/pytoolz/toolz/")
21439 (synopsis "List processing tools and functional utilities")
21440 (description
21441 "This package provides a set of utility functions for iterators,
21442 functions, and dictionaries.")
21443 (license license:bsd-3)))
21444
21445 (define-public python-cytoolz
21446 (package
21447 (name "python-cytoolz")
21448 (version "0.9.0.1")
21449 (source
21450 (origin
21451 (method url-fetch)
21452 (uri (pypi-uri "cytoolz" version))
21453 (sha256
21454 (base32
21455 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
21456 (build-system python-build-system)
21457 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
21458 ;; 'exceptions'"
21459 (arguments '(#:tests? #f))
21460 (propagated-inputs
21461 `(("python-toolz" ,python-toolz)))
21462 (native-inputs
21463 `(("python-cython" ,python-cython)))
21464 (home-page "https://github.com/pytoolz/cytoolz")
21465 (synopsis "High performance functional utilities")
21466 (description
21467 "The cytoolz package implements the same API as provided by toolz. The
21468 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
21469 that is accessible to other projects developed in Cython.")
21470 (license license:bsd-3)))
21471
21472 (define-public python-sortedcollections
21473 (package
21474 (name "python-sortedcollections")
21475 (version "2.1.0")
21476 (source
21477 (origin
21478 (method url-fetch)
21479 (uri (pypi-uri "sortedcollections" version))
21480 (sha256
21481 (base32
21482 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
21483 (build-system python-build-system)
21484 (propagated-inputs
21485 `(("python-sortedcontainers" ,python-sortedcontainers)))
21486 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
21487 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
21488 (synopsis "Python Sorted Collections")
21489 (description "Sorted Collections is a Python sorted collections library.")
21490 (license license:asl2.0)))
21491
21492 (define-public python-sortedcontainers
21493 (package
21494 (name "python-sortedcontainers")
21495 (version "2.1.0")
21496 (source
21497 (origin
21498 (method url-fetch)
21499 (uri (pypi-uri "sortedcontainers" version))
21500 (sha256
21501 (base32
21502 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
21503 (build-system python-build-system)
21504 (arguments
21505 ;; FIXME: Tests require many extra dependencies, and would introduce
21506 ;; a circular dependency on hypothesis, which uses this package.
21507 '(#:tests? #f))
21508 (propagated-inputs
21509 `(("python-appdirs" ,python-appdirs)
21510 ("python-distlib" ,python-distlib)
21511 ("python-filelock" ,python-filelock)
21512 ("python-six" ,python-six-bootstrap)))
21513 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
21514 (synopsis "Sorted List, Sorted Dict, Sorted Set")
21515 (description
21516 "This package provides a sorted collections library, written in
21517 pure-Python.")
21518 (license license:asl2.0)))
21519
21520 (define-public python2-sortedcontainers
21521 (package-with-python2 python-sortedcontainers))
21522
21523 (define python-cloudpickle-testpkg
21524 (package
21525 (name "python-cloudpickle-testpkg")
21526 (version "1.6.0")
21527 (source
21528 (origin
21529 ;; Archive on pypi does not include test infrastructure.
21530 (method git-fetch)
21531 (uri (git-reference
21532 (url "https://github.com/cloudpipe/cloudpickle")
21533 (commit (string-append "v" version))))
21534 (file-name (git-file-name name version))
21535 (sha256
21536 (base32
21537 "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
21538 (build-system python-build-system)
21539 (arguments
21540 '(#:phases
21541 (modify-phases %standard-phases
21542 (add-after 'unpack 'chdir
21543 (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
21544 (home-page "https://github.com/cloudpipe/cloudpickle")
21545 (synopsis "Extended pickling support for Python objects")
21546 (description
21547 "Cloudpickle makes it possible to serialize Python constructs not
21548 supported by the default pickle module from the Python standard library. It
21549 is especially useful for cluster computing where Python expressions are
21550 shipped over the network to execute on remote hosts, possibly close to the
21551 data.")
21552 (license license:bsd-3)))
21553
21554 (define-public python-cloudpickle
21555 (package
21556 (inherit python-cloudpickle-testpkg)
21557 (name "python-cloudpickle")
21558 (build-system python-build-system)
21559 (arguments
21560 '(#:phases
21561 (modify-phases %standard-phases
21562 (replace 'check
21563 (lambda* (#:key tests? #:allow-other-keys)
21564 (if tests?
21565 (invoke "pytest" "-s" "-vv")
21566 (format #t "test suite not run~%")))))))
21567 (native-inputs
21568 `(;; For tests.
21569 ("python-cloudpickle-testpkg" ,python-cloudpickle-testpkg)
21570 ("python-psutil" ,python-psutil)
21571 ("python-pytest" ,python-pytest)
21572 ("python-tornado" ,python-tornado-6)))
21573 (home-page "https://github.com/cloudpipe/cloudpickle")
21574 (synopsis "Extended pickling support for Python objects")
21575 (description
21576 "Cloudpickle makes it possible to serialize Python constructs not
21577 supported by the default pickle module from the Python standard library. It
21578 is especially useful for cluster computing where Python expressions are
21579 shipped over the network to execute on remote hosts, possibly close to the
21580 data.")
21581 (properties `((python2-variant . ,(delay python2-cloudpickle))))
21582 (license license:bsd-3)))
21583
21584 (define-public python2-cloudpickle
21585 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
21586 (package/inherit base
21587 (version "1.3.0")
21588 (source
21589 (origin
21590 (method url-fetch)
21591 (uri (pypi-uri "cloudpickle" version))
21592 (sha256
21593 (base32
21594 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
21595 (native-inputs
21596 `(;; For tests.
21597 ("python-mock" ,python2-mock)
21598 ("python-psutil" ,python2-psutil)
21599 ("python-pytest" ,python2-pytest)
21600 ("python-tornado" ,python2-tornado)))
21601 (propagated-inputs
21602 `(("python-futures" ,python2-futures)
21603 ,@(package-propagated-inputs base))))))
21604
21605 (define-public python-locket
21606 (package
21607 (name "python-locket")
21608 (version "0.2.0")
21609 (source
21610 (origin
21611 (method url-fetch)
21612 (uri (pypi-uri "locket" version))
21613 (sha256
21614 (base32
21615 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
21616 (build-system python-build-system)
21617 (home-page "https://github.com/mwilliamson/locket.py")
21618 (synopsis "File-based locks for Python")
21619 (description
21620 "Locket implements a lock that can be used by multiple processes provided
21621 they use the same path.")
21622 (license license:bsd-2)))
21623
21624 (define-public python2-locket
21625 (package-with-python2 python-locket))
21626
21627 (define-public python-blosc
21628 (package
21629 (name "python-blosc")
21630 (version "1.5.1")
21631 (source
21632 (origin
21633 (method url-fetch)
21634 (uri (pypi-uri "blosc" version))
21635 (sha256
21636 (base32
21637 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
21638 (build-system python-build-system)
21639 ;; FIXME: all tests pass, but then this error is printed:
21640 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
21641 (arguments '(#:tests? #f))
21642 (propagated-inputs
21643 `(("python-numpy" ,python-numpy)))
21644 (home-page "https://github.com/blosc/python-blosc")
21645 (synopsis "Python wrapper for the Blosc data compressor library")
21646 (description "Blosc is a high performance compressor optimized for binary
21647 data. It has been designed to transmit data to the processor cache faster
21648 than the traditional, non-compressed, direct memory fetch approach via a
21649 @code{memcpy()} system call.
21650
21651 Blosc works well for compressing numerical arrays that contains data with
21652 relatively low entropy, like sparse data, time series, grids with
21653 regular-spaced values, etc.
21654
21655 This Python package wraps the Blosc library.")
21656 (license license:bsd-3)))
21657
21658 (define-public python2-blosc
21659 (package-with-python2 python-blosc))
21660
21661 (define-public python-partd
21662 (package
21663 (name "python-partd")
21664 (version "1.2.0")
21665 (source
21666 (origin
21667 (method url-fetch)
21668 (uri (pypi-uri "partd" version))
21669 (sha256
21670 (base32
21671 "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
21672 (build-system python-build-system)
21673 (propagated-inputs
21674 `(("python-blosc" ,python-blosc)
21675 ("python-locket" ,python-locket)
21676 ("python-numpy" ,python-numpy)
21677 ("python-pandas" ,python-pandas)
21678 ("python-pyzmq" ,python-pyzmq)
21679 ("python-toolz" ,python-toolz)))
21680 (home-page "https://github.com/dask/partd/")
21681 (synopsis "Appendable key-value storage")
21682 (description "Partd stores key-value pairs. Values are raw bytes. We
21683 append on old values. Partd excels at shuffling operations.")
21684 (license license:bsd-3)))
21685
21686 (define-public python-fsspec
21687 (package
21688 (name "python-fsspec")
21689 (version "0.6.1")
21690 (source
21691 (origin
21692 (method url-fetch)
21693 (uri (pypi-uri "fsspec" version))
21694 (sha256
21695 (base32
21696 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
21697 (build-system python-build-system)
21698 (arguments '(#:tests? #f)) ; there are none
21699 (home-page "https://github.com/intake/filesystem_spec")
21700 (synopsis "File-system specification")
21701 (description "The purpose of this package is to produce a template or
21702 specification for a file-system interface, that specific implementations
21703 should follow, so that applications making use of them can rely on a common
21704 behavior and not have to worry about the specific internal implementation
21705 decisions with any given backend.")
21706 (license license:bsd-3)))
21707
21708 (define-public python-dask
21709 (package
21710 (name "python-dask")
21711 (version "2021.7.1")
21712 (source
21713 (origin
21714 (method url-fetch)
21715 (uri (pypi-uri "dask" version))
21716 (sha256
21717 (base32 "131c1bp193d7wp4gx09j6wark1c322c8sqjy22i0jaafl5rqfbz7"))))
21718 (build-system python-build-system)
21719 (arguments
21720 `(#:phases
21721 (modify-phases %standard-phases
21722 (add-after 'unpack 'disable-broken-tests
21723 (lambda _
21724 ;; This test is marked as xfail when pytest-xdist is used.
21725 (substitute* "dask/tests/test_threaded.py"
21726 (("def test_interrupt\\(\\)" m)
21727 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21728 m)))))
21729 (replace 'check
21730 (lambda _ (invoke "pytest" "-vv"))))))
21731 (propagated-inputs
21732 `(("python-cloudpickle" ,python-cloudpickle)
21733 ("python-fsspec" ,python-fsspec)
21734 ("python-numpy" ,python-numpy)
21735 ("python-packaging" ,python-packaging)
21736 ("python-pandas" ,python-pandas)
21737 ("python-partd" ,python-partd)
21738 ("python-toolz" ,python-toolz)
21739 ("python-pyyaml" ,python-pyyaml)))
21740 (native-inputs
21741 `(("python-pytest" ,python-pytest)
21742 ("python-pytest-runner" ,python-pytest-runner)))
21743 (home-page "https://github.com/dask/dask/")
21744 (synopsis "Parallel computing with task scheduling")
21745 (description
21746 "Dask is a flexible parallel computing library for analytics. It
21747 consists of two components: dynamic task scheduling optimized for computation,
21748 and large data collections like parallel arrays, dataframes, and lists that
21749 extend common interfaces like NumPy, Pandas, or Python iterators to
21750 larger-than-memory or distributed environments. These parallel collections
21751 run on top of the dynamic task schedulers. ")
21752 (license license:bsd-3)))
21753
21754 (define-public python-ilinkedlist
21755 (package
21756 (name "python-ilinkedlist")
21757 (version "0.4.0")
21758 (source
21759 (origin
21760 (method url-fetch)
21761 (uri (pypi-uri "ilinkedlist" version))
21762 (sha256
21763 (base32
21764 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
21765 (build-system python-build-system)
21766 (native-inputs `(("python-pytest" ,python-pytest)))
21767 (inputs `(("python" ,python)))
21768 (home-page "https://github.com/luther9/ilinkedlist-py")
21769 (synopsis "Immutable linked list library")
21770 (description
21771 "This is a implementation of immutable linked lists for Python. It
21772 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
21773 Since a linked list is treated as immutable, it is hashable, and its length
21774 can be retrieved in constant time. Some of the terminology is inspired by
21775 LISP. It is possible to create an improper list by creating a @code{Pair}
21776 with a non-list @code{cdr}.")
21777 (license license:gpl3+)))
21778
21779 (define-public python-readlike
21780 (package
21781 (name "python-readlike")
21782 (version "0.1.3")
21783 (source
21784 (origin
21785 (method url-fetch)
21786 (uri (pypi-uri "readlike" version))
21787 (sha256
21788 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
21789 (build-system python-build-system)
21790 (home-page "https://github.com/jangler/readlike")
21791 (synopsis "GNU Readline-like line editing module")
21792 (description
21793 "This Python module provides line editing functions similar to the default
21794 Emacs-style ones of GNU Readline. Unlike the Python standard library's
21795 @code{readline} package, this one allows access to those capabilities in settings
21796 outside of a standard command-line interface. It is especially well-suited to
21797 interfacing with Urwid, due to a shared syntax for describing key inputs.
21798
21799 Currently, all stateless Readline commands are implemented. Yanking and history
21800 are not supported.")
21801 (license license:expat)))
21802
21803 (define-public python2-readlike
21804 (package-with-python2 python-readlike))
21805
21806 (define-public python-reparser
21807 (package
21808 (name "python-reparser")
21809 (version "1.4.3")
21810 (source
21811 (origin
21812 (method url-fetch)
21813 (uri (pypi-uri "ReParser" version))
21814 (sha256
21815 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
21816 (build-system python-build-system)
21817 (home-page "https://github.com/xmikos/reparser")
21818 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
21819 (description
21820 "This Python library provides a simple lexer/parser for inline markup based
21821 on regular expressions.")
21822 (license license:expat)))
21823
21824 (define-public python2-reparser
21825 (let ((reparser (package-with-python2
21826 (strip-python2-variant python-reparser))))
21827 (package/inherit reparser
21828 (propagated-inputs
21829 `(("python2-enum34" ,python2-enum34)
21830 ,@(package-propagated-inputs reparser))))))
21831
21832 (define-public python-retrying
21833 (package
21834 (name "python-retrying")
21835 (version "1.3.3")
21836 (source
21837 (origin
21838 (method git-fetch)
21839 (uri (git-reference
21840 (url "https://github.com/rholder/retrying")
21841 (commit (string-append "v" version))))
21842 (file-name (git-file-name name version))
21843 (sha256
21844 (base32
21845 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
21846 (build-system python-build-system)
21847 (propagated-inputs
21848 `(("python-six" ,python-six)))
21849 (home-page "https://github.com/rholder/retrying")
21850 (synopsis "Library for adding retry behavior")
21851 (description "Retrying is a general-purpose retrying library to simplify
21852 the task of adding retry behavior to just about anything.
21853
21854 Features:
21855
21856 @itemize
21857 @item Generic Decorator API.
21858 @item Specify stop condition (i.e. limit by number of attempts).
21859 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
21860 @item Customize retrying on Exceptions.
21861 @item Customize retrying on expected returned result.
21862 @end itemize")
21863 (license license:asl2.0)))
21864
21865 (define-public python-pre-commit
21866 (package
21867 (name "python-pre-commit")
21868 (version "2.10.0")
21869 (source
21870 (origin
21871 (method url-fetch)
21872 (uri (pypi-uri "pre_commit" version))
21873 (sha256
21874 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
21875 (build-system python-build-system)
21876 (arguments
21877 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
21878 ;; attribute 'empty_template_setup'".
21879 `(#:tests? #false))
21880 (propagated-inputs
21881 `(("python-cfgv" ,python-cfgv)
21882 ("python-identify" ,python-identify)
21883 ("python-importlib-metadata" ,python-importlib-metadata)
21884 ("python-importlib-resources" ,python-importlib-resources)
21885 ("python-nodeenv" ,python-nodeenv)
21886 ("python-pyyaml" ,python-pyyaml)
21887 ("python-toml" ,python-toml)
21888 ("python-virtualenv" ,python-virtualenv)))
21889 (home-page "https://github.com/pre-commit/pre-commit")
21890 (synopsis "Framework for managing multi-language pre-commit hooks")
21891 (description
21892 "This package provides a framework for managing and maintaining
21893 multi-language pre-commit hooks.")
21894 (license license:expat)))
21895
21896 (define-public python-precis-i18n
21897 (package
21898 (name "python-precis-i18n")
21899 (version "1.0.0")
21900 (source
21901 (origin
21902 (method url-fetch)
21903 (uri (pypi-uri "precis_i18n" version))
21904 (sha256
21905 (base32
21906 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
21907 (build-system python-build-system)
21908 (home-page "https://github.com/byllyfish/precis_i18n")
21909 (synopsis "Implementation of the PRECIS framework")
21910 (description
21911 "This module implements the PRECIS Framework as described in RFC 8264,
21912 RFC 8265 and RFC 8266.")
21913 (license license:expat)))
21914
21915 (define-public python-absl-py
21916 (package
21917 (name "python-absl-py")
21918 (version "0.6.1")
21919 (source
21920 (origin
21921 (method url-fetch)
21922 (uri (pypi-uri "absl-py" version))
21923 (sha256
21924 (base32
21925 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
21926 (build-system python-build-system)
21927 (propagated-inputs
21928 `(("python-six" ,python-six)))
21929 (home-page "https://github.com/abseil/abseil-py")
21930 (synopsis "Abseil Python common libraries")
21931 (description
21932 "This package provides the Abseil Python Common Libraries, a collection
21933 of Python libraries for building Python applications.")
21934 (license license:asl2.0)))
21935
21936 (define-public python-astor
21937 (package
21938 (name "python-astor")
21939 (version "0.8.1")
21940 (source
21941 (origin
21942 (method url-fetch)
21943 (uri (pypi-uri "astor" version))
21944 (sha256
21945 (base32
21946 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
21947 (build-system python-build-system)
21948 ;; FIXME: There are two errors and two test failures.
21949 (arguments `(#:tests? #f))
21950 (home-page "https://github.com/berkerpeksag/astor")
21951 (synopsis "Read and write Python ASTs")
21952 (description "Astor is designed to allow easy manipulation of Python
21953 source via the Abstract Syntax Tree.")
21954 (license license:bsd-3)))
21955
21956 (define-public python2-astor
21957 (package-with-python2 python-astor))
21958
21959 (define-public python-astunparse
21960 (package
21961 (name "python-astunparse")
21962 (version "1.6.2")
21963 (source
21964 (origin
21965 (method url-fetch)
21966 (uri (pypi-uri "astunparse" version))
21967 (sha256
21968 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
21969 (build-system python-build-system)
21970 (arguments '(#:tests? #f)) ; there are none
21971 (propagated-inputs
21972 `(("python-six" ,python-six)
21973 ("python-wheel" ,python-wheel)))
21974 (home-page "https://github.com/simonpercivall/astunparse")
21975 (synopsis "AST unparser for Python")
21976 (description "This package provides an AST unparser for Python. It is a
21977 factored out version of @code{unparse} found in the Python source
21978 distribution.")
21979 (license license:bsd-3)))
21980
21981 (define-public python-gast
21982 (package
21983 (name "python-gast")
21984 (version "0.5.2")
21985 (source
21986 (origin
21987 (method url-fetch)
21988 (uri (pypi-uri "gast" version))
21989 (sha256
21990 (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
21991 (build-system python-build-system)
21992 (propagated-inputs
21993 `(("python-astunparse" ,python-astunparse)))
21994 (home-page "https://pypi.org/project/gast/")
21995 (synopsis "Generic Python AST that abstracts the underlying Python version")
21996 (description
21997 "GAST provides a compatibility layer between the AST of various Python
21998 versions, as produced by @code{ast.parse} from the standard @code{ast}
21999 module.")
22000 (license license:bsd-3)))
22001
22002 (define-public python-wikidata
22003 (package
22004 (name "python-wikidata")
22005 (version "0.6.1")
22006 (source
22007 (origin
22008 (method url-fetch)
22009 (uri (pypi-uri "Wikidata" version))
22010 (sha256
22011 (base32
22012 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
22013 (build-system python-build-system)
22014 (propagated-inputs
22015 `(("python-babel" ,python-babel)))
22016 (home-page "https://github.com/dahlia/wikidata")
22017 (synopsis "Wikidata client library")
22018 (description
22019 "This package provides a Python interface to
22020 @url{https://www.wikidata.org/, Wikidata}.")
22021 (properties '((upstream-name . "Wikidata")))
22022 (license license:gpl3+)))
22023
22024 (define-public python-doctest-ignore-unicode
22025 (package
22026 (name "python-doctest-ignore-unicode")
22027 (version "0.1.2")
22028 (source
22029 (origin
22030 (method url-fetch)
22031 (uri (pypi-uri "doctest-ignore-unicode" version))
22032 (sha256
22033 (base32
22034 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
22035 (build-system python-build-system)
22036 (native-inputs
22037 `(("python-nose" ,python-nose)))
22038 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
22039 (synopsis "Ignore Unicode literal prefixes in doctests")
22040 (description
22041 "This package adds support for a flag to ignore Unicode literal prefixes
22042 in doctests.")
22043 (license license:asl2.0)))
22044
22045 (define-public python-attr
22046 (package
22047 (name "python-attr")
22048 (version "0.3.1")
22049 (source
22050 (origin
22051 (method url-fetch)
22052 (uri (pypi-uri "attr" version))
22053 (sha256
22054 (base32
22055 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
22056 (build-system python-build-system)
22057 (home-page "https://github.com/denis-ryzhkov/attr")
22058 (synopsis "Decorator for attributes of target function or class")
22059 (description "Simple decorator to set attributes of target function or
22060 class in a @acronym{DRY, Don't Repeat Yourself} way.")
22061 (license license:expat)))
22062
22063 (define-public python-construct
22064 (package
22065 (name "python-construct")
22066 (version "2.10.56")
22067 (source
22068 (origin
22069 (method url-fetch)
22070 (uri (pypi-uri "construct" version))
22071 (sha256
22072 (base32
22073 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
22074 (build-system python-build-system)
22075 (arguments
22076 `(#:tests? #f)) ; No tests exist.
22077 (propagated-inputs
22078 `(("python-extras" ,python-extras)
22079 ("python-arrow" ,python-arrow)
22080 ("python-numpy" ,python-numpy)
22081 ("python-ruamel.yaml" ,python-ruamel.yaml)))
22082 (home-page "https://construct.readthedocs.io")
22083 (synopsis "Declarative and symmetrical parser and builder for binary data")
22084 (description
22085 "This package provides both simple, atomic constructs (such as
22086 integers of various sizes), as well as composite ones which allow you
22087 form hierarchical and sequential structures of increasing complexity.
22088 It features bit and byte granularity, easy debugging and testing, an
22089 easy-to-extend subclass system, and lots of primitive constructs to
22090 make your work easier.")
22091 (license license:expat)))
22092
22093 (define-public python-outcome
22094 (package
22095 (name "python-outcome")
22096 (version "1.0.1")
22097 (source
22098 (origin
22099 (method url-fetch)
22100 (uri (pypi-uri "outcome" version))
22101 (sha256
22102 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
22103 (build-system python-build-system)
22104 (arguments
22105 `(#:phases
22106 (modify-phases %standard-phases
22107 (replace 'check
22108 (lambda* (#:key inputs outputs #:allow-other-keys)
22109 (add-installed-pythonpath inputs outputs)
22110 (invoke "pytest" "-vv"))))))
22111 (native-inputs
22112 `(("python-pytest" ,python-pytest)
22113 ("python-pytest-cov" ,python-pytest-cov)
22114 ("python-pytest-asyncio" ,python-pytest-asyncio)))
22115 (propagated-inputs
22116 `(("python-async-generator" ,python-async-generator)
22117 ("python-attrs" ,python-attrs)))
22118 (home-page "https://github.com/python-trio/outcome")
22119 (synopsis "Capture the outcome of Python function calls")
22120 (description
22121 "Capture the outcome of Python function calls. Extracted from the Trio
22122 project.")
22123 ;; Either license applies.
22124 (license (list license:expat license:asl2.0))))
22125
22126 (define-public python-trio
22127 (package
22128 (name "python-trio")
22129 (version "0.17.0")
22130 (source
22131 (origin
22132 (method url-fetch)
22133 (uri (pypi-uri "trio" version))
22134 (sha256
22135 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
22136 (build-system python-build-system)
22137 (arguments
22138 `(#:phases
22139 (modify-phases %standard-phases
22140 (add-before 'check 'change-home
22141 (lambda _
22142 ;; Tests require a writable home.
22143 (setenv "HOME" "/tmp")
22144 #t))
22145 (replace 'check
22146 (lambda _
22147 (invoke "pytest" "-vv" "-k"
22148 (string-append
22149 ;; This test times out.
22150 "not test_ki_protection_works"
22151 ;; Assertion errors.
22152 " and not test_guest_mode_ki"
22153 " and not test_run_in_trio_thread_ki"
22154 ;; These try to raise KeyboardInterrupt which does not work
22155 ;; in the build environment.
22156 " and not test_ki_self"
22157 " and not test_ki_wakes_us_up"
22158 ;; Failure in name resolution.
22159 " and not test_getnameinfo"
22160 " and not test_SocketType_resolve"
22161 ;; OSError: protocol not found.
22162 " and not test_getprotobyname")))))))
22163 (native-inputs
22164 `(("python-astor" ,python-astor)
22165 ("python-ipython" ,python-ipython)
22166 ("python-jedi" ,python-jedi)
22167 ("python-pylint" ,python-pylint)
22168 ("python-pyopenssl" ,python-pyopenssl)
22169 ("python-pytest" ,python-pytest)
22170 ("python-pytest-cov" ,python-pytest-cov)
22171 ("python-trustme" ,python-trustme)))
22172 (propagated-inputs
22173 `(("python-attrs" ,python-attrs)
22174 ("python-idna" ,python-idna)
22175 ("python-outcome" ,python-outcome)
22176 ("python-sniffio" ,python-sniffio)
22177 ("python-sortedcontainers"
22178 ,python-sortedcontainers)))
22179 (home-page "https://github.com/python-trio/trio")
22180 (synopsis "Friendly Python library for async concurrency and I/O")
22181 (description
22182 "Trio strives to be a production-quality, async/await-native I/O library
22183 for Python. Like all async libraries, its main purpose is to help you write
22184 programs that do multiple things at the same time with parallelized I/O.")
22185 ;; Either license applies.
22186 (license (list license:expat license:asl2.0))))
22187
22188 (define-public python-trio-typing
22189 (package
22190 (name "python-trio-typing")
22191 (version "0.5.0")
22192 (source
22193 (origin
22194 (method url-fetch)
22195 (uri (pypi-uri "trio-typing" version))
22196 (sha256
22197 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22198 (build-system python-build-system)
22199 (arguments
22200 `(#:phases
22201 (modify-phases %standard-phases
22202 (replace 'check
22203 (lambda _
22204 (invoke "pytest" "-vv"))))))
22205 (native-inputs
22206 `(("python-attrs" ,python-attrs)
22207 ("python-pytest" ,python-pytest)))
22208 (propagated-inputs
22209 `(("python-mypy" ,python-mypy)
22210 ("python-mypy-extensions"
22211 ,python-mypy-extensions)
22212 ("python-trio" ,python-trio)
22213 ("python-typing-extensions"
22214 ,python-typing-extensions)))
22215 (home-page "https://github.com/python-trio/trio-typing")
22216 (synopsis "Static type checking support for Trio and related projects")
22217 (description
22218 "This package provides:
22219
22220 @itemize
22221 @item PEP 561 typing stubs packages for the Trio project packages:
22222
22223 @itemize
22224 @item trio (@code{trio-stubs})
22225 @item outcome (@code{outcome-stubs})
22226 @item async_generator (@code{async_generator-stubs})
22227 @end itemize
22228
22229 @item A package @code{trio_typing} containing types that Trio programs often
22230 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22231 a mypy plugin that smooths over some limitations in the basic type hints.
22232 @end itemize")
22233 ;; Either license applies.
22234 (license (list license:expat license:asl2.0))))
22235
22236 (define-public python-humanize
22237 (package
22238 (name "python-humanize")
22239 (version "0.5.1")
22240 (source
22241 (origin
22242 (method url-fetch)
22243 (uri (pypi-uri "humanize" version))
22244 (sha256
22245 (base32
22246 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22247 (arguments
22248 '(#:tests? #f)) ; tests not in pypi archive
22249 (build-system python-build-system)
22250 (home-page "https://github.com/jmoiron/humanize")
22251 (synopsis "Print numerical information in a human-readable form")
22252 (description "This package provides a Python module that displays numbers
22253 and dates in \"human readable\" forms. For example, it would display
22254 \"12345591313\" as \"12.3 billion\".")
22255 (license license:expat)))
22256
22257 (define-public python-txaio
22258 (package
22259 (name "python-txaio")
22260 (version "18.8.1")
22261 (source
22262 (origin
22263 (method url-fetch)
22264 (uri (pypi-uri "txaio" version))
22265 (sha256
22266 (base32
22267 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22268 (build-system python-build-system)
22269 (propagated-inputs
22270 `(("python-twisted" ,python-twisted)
22271 ("python-six" ,python-six)))
22272 (home-page "https://github.com/crossbario/txaio")
22273 (synopsis "Compatibility layer between Python asyncio and Twisted")
22274 (description "Txaio provides a compatibility layer between the Python
22275 @code{asyncio} module and @code{Twisted}.")
22276 (license license:expat)))
22277
22278 (define-public python-toolshed
22279 (package
22280 (name "python-toolshed")
22281 (version "0.4.6")
22282 (source
22283 (origin
22284 (method url-fetch)
22285 (uri (pypi-uri "toolshed" version))
22286 (sha256
22287 (base32
22288 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22289 (build-system python-build-system)
22290 (native-inputs
22291 `(("python-nose" ,python-nose)))
22292 (home-page "https://github.com/brentp/toolshed/")
22293 (synopsis "Collection of modules and functions for working with data")
22294 (description "This is a collection of well-tested, simple modules and
22295 functions that aim to reduce boilerplate when working with data.")
22296 (license license:bsd-2)))
22297
22298 (define-public python-annoy
22299 (package
22300 (name "python-annoy")
22301 (version "1.15.1")
22302 (source
22303 (origin
22304 (method url-fetch)
22305 (uri (pypi-uri "annoy" version))
22306 (sha256
22307 (base32
22308 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
22309 (build-system python-build-system)
22310 (native-inputs
22311 `(("python-nose" ,python-nose)))
22312 (home-page "https://github.com/spotify/annoy/")
22313 (synopsis "Approximate nearest neighbors library")
22314 (description
22315 "Annoy is a C++ library with Python bindings to search for points in
22316 space that are close to a given query point. It also creates large read-only
22317 file-based data structures that are @code{mmap}ped into memory so that many
22318 processes may share the same data.")
22319 (license license:asl2.0)))
22320
22321 (define-public python-croniter
22322 (package
22323 (name "python-croniter")
22324 (version "0.3.34")
22325 (source (origin
22326 (method url-fetch)
22327 (uri (pypi-uri "croniter" version))
22328 (sha256
22329 (base32
22330 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
22331 (build-system python-build-system)
22332 (propagated-inputs
22333 `(("python-dateutil" ,python-dateutil)
22334 ("python-natsort" ,python-natsort)))
22335 (home-page "https://github.com/kiorky/croniter")
22336 (synopsis "Iterate datetime objects with cron-like syntax")
22337 (description
22338 "@code{croniter} provides iteration for datetime object with cron-like
22339 format.")
22340 (license license:expat)))
22341
22342 (define-public python-crontab
22343 (package
22344 (name "python-crontab")
22345 (version "2.5.1")
22346 (source
22347 (origin
22348 (method url-fetch)
22349 (uri (pypi-uri name version))
22350 (sha256
22351 (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
22352 (build-system python-build-system)
22353 (arguments
22354 ;; Comptability tests fail so they are disabled.
22355 `(#:tests? #f))
22356 (inputs
22357 `(("python-dateutil" ,python-dateutil)))
22358 (home-page "https://gitlab.com/doctormo/python-crontab/")
22359 (synopsis "Module for reading and writing crontab files")
22360 (description "This Python module can read, write crontab files, and
22361 access the system cron automatically and simply using a direct API.")
22362 (license license:lgpl3+)))
22363
22364 (define-public python-pylzma
22365 (package
22366 (name "python-pylzma")
22367 (version "0.5.0")
22368 (source
22369 (origin
22370 (method url-fetch)
22371 (uri (pypi-uri "pylzma" version))
22372 (sha256
22373 (base32
22374 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
22375 (build-system python-build-system)
22376 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
22377 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
22378 (description "This package provides Python bindings for the LZMA library
22379 by Igor Pavlov.")
22380 (license license:lgpl2.1+)))
22381
22382 (define-public python2-pylzma
22383 (package-with-python2 python-pylzma))
22384
22385 (define-public python-ifaddr
22386 (package
22387 (name "python-ifaddr")
22388 (version "0.1.7")
22389 (source
22390 (origin
22391 (method url-fetch)
22392 (uri (pypi-uri "ifaddr" version))
22393 (sha256
22394 (base32
22395 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
22396 (build-system python-build-system)
22397 (arguments
22398 `(#:phases
22399 (modify-phases %standard-phases
22400 (replace 'check
22401 (lambda _ (invoke "nosetests"))))))
22402 (native-inputs
22403 `(("python-nose" ,python-nose)))
22404 (home-page "https://github.com/pydron/ifaddr")
22405 (synopsis "Network interface and IP address enumeration library")
22406 (description "This package provides a network interface and IP address
22407 enumeration library in Python.")
22408 (license license:expat)))
22409
22410 (define-public python-zeroconf
22411 (package
22412 (name "python-zeroconf")
22413 (version "0.28.8")
22414 (source
22415 (origin
22416 (method url-fetch)
22417 (uri (pypi-uri "zeroconf" version))
22418 (sha256
22419 (base32
22420 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
22421 (build-system python-build-system)
22422 (native-inputs
22423 `(("python-nose" ,python-nose)))
22424 (propagated-inputs
22425 `(("python-ifaddr" ,python-ifaddr)))
22426 (arguments
22427 `(#:phases
22428 (modify-phases %standard-phases
22429 (replace 'check
22430 (lambda _ ;; Networking isn't available for these tests.
22431 (invoke "nosetests" "-v"
22432 "--exclude" "test_integration_with_listener_ipv6"
22433 "--exclude" "test_launch_and_close_v6_only"
22434 "--exclude" "test_launch_and_close_v4_v6"
22435 "--exclude" "test_launch_and_close"))))))
22436 (home-page "https://github.com/jstasiak/python-zeroconf")
22437 (synopsis "Pure Python mDNS service discovery")
22438 (description
22439 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22440 compatible).")
22441 (license license:lgpl2.1+)))
22442
22443 (define-public python2-zeroconf
22444 (package
22445 (name "python2-zeroconf")
22446
22447 ;; This is the last version that supports Python 2.x.
22448 (version "0.19.1")
22449 (source
22450 (origin
22451 (method url-fetch)
22452 (uri (pypi-uri "zeroconf" version))
22453 (sha256
22454 (base32
22455 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
22456 (build-system python-build-system)
22457 (arguments
22458 `(#:python ,python-2
22459 #:phases
22460 (modify-phases %standard-phases
22461 (add-after 'unpack 'patch-requires
22462 (lambda* (#:key inputs #:allow-other-keys)
22463 (substitute* "setup.py"
22464 (("enum-compat")
22465 "enum34"))
22466 #t)))))
22467 (native-inputs
22468 `(("python2-six" ,python2-six)
22469 ("python2-enum32" ,python2-enum34)
22470 ("python2-netifaces" ,python2-netifaces)
22471 ("python2-typing" ,python2-typing)))
22472 (home-page "https://github.com/jstasiak/python-zeroconf")
22473 (synopsis "Pure Python mDNS service discovery")
22474 (description
22475 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22476 compatible).")
22477 (license license:lgpl2.1+)))
22478
22479 (define-public python-bsddb3
22480 (package
22481 (name "python-bsddb3")
22482 (version "6.2.9")
22483 (source
22484 (origin
22485 (method url-fetch)
22486 (uri (pypi-uri "bsddb3" version))
22487 (sha256
22488 (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
22489 (build-system python-build-system)
22490 (inputs
22491 `(("bdb" ,bdb)))
22492 (arguments
22493 '(#:phases
22494 (modify-phases %standard-phases
22495 (add-after 'unpack 'configure-locations
22496 (lambda* (#:key inputs #:allow-other-keys)
22497 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
22498 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
22499 #t))
22500 (replace 'check
22501 (lambda _
22502 (invoke "python3" "test3.py" "-v"))))))
22503 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
22504 (synopsis "Python bindings for Oracle Berkeley DB")
22505 (description
22506 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
22507 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
22508 Transaction objects, and each of these is exposed as a Python type in the
22509 bsddb3.db module. The database objects can use various access methods: btree,
22510 hash, recno, and queue. Complete support of Berkeley DB distributed
22511 transactions. Complete support for Berkeley DB Replication Manager.
22512 Complete support for Berkeley DB Base Replication. Support for RPC.")
22513 (license license:bsd-3)))
22514
22515 (define-public python-dbfread
22516 (package
22517 (name "python-dbfread")
22518 (version "2.0.7")
22519 (source (origin
22520 (method url-fetch)
22521 (uri (pypi-uri "dbfread" version))
22522 (sha256
22523 (base32
22524 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
22525 (build-system python-build-system)
22526 (native-inputs
22527 `(("python-pytest" ,python-pytest)))
22528 (home-page "https://dbfread.readthedocs.io")
22529 (synopsis "Read DBF Files with Python")
22530 (description
22531 "This library reads DBF files and returns the data as native Python data
22532 types for further processing. It is primarily intended for batch jobs and
22533 one-off scripts.")
22534 (license license:expat)))
22535
22536 (define-public python-cached-property
22537 (package
22538 (name "python-cached-property")
22539 (version "1.5.2")
22540 (source
22541 (origin
22542 (method url-fetch)
22543 (uri (pypi-uri "cached-property" version))
22544 (sha256
22545 (base32
22546 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
22547 (build-system python-build-system)
22548 (arguments
22549 `(#:phases
22550 (modify-phases %standard-phases
22551 ;; https://github.com/pydanny/cached-property/issues/131
22552 ;; recent versions of freezegun break one test
22553 (add-after 'unpack 'disable-broken-test
22554 (lambda _
22555 (substitute* "tests/test_cached_property.py"
22556 (("def test_threads_ttl_expiry\\(self\\)" m)
22557 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
22558 " " m)))
22559 #t)))))
22560 (native-inputs
22561 `(("python-freezegun" ,python-freezegun)))
22562 (home-page
22563 "https://github.com/pydanny/cached-property")
22564 (synopsis
22565 "Decorator for caching properties in classes")
22566 (description
22567 "This package provides a decorator which makes caching
22568 time-or-computationally-expensive properties quick and easy and works in Python
22569 2 or 3.")
22570 (license license:bsd-3)))
22571
22572 (define-public python-folium
22573 (package
22574 (name "python-folium")
22575 (version "0.12.1")
22576 (source
22577 (origin
22578 ;; PyPI has a ".whl" file but not a proper source release.
22579 ;; Thus, fetch code from Git.
22580 (method git-fetch)
22581 (uri (git-reference
22582 (url "https://github.com/python-visualization/folium")
22583 (commit (string-append "v" version))))
22584 (file-name (git-file-name name version))
22585 (sha256
22586 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
22587 (build-system python-build-system)
22588 (propagated-inputs
22589 `(("python-branca" ,python-branca)
22590 ("python-jinja2" ,python-jinja2)
22591 ("python-numpy" ,python-numpy)
22592 ("python-requests" ,python-requests)))
22593 (native-inputs
22594 `(("python-pytest" ,python-pytest)))
22595 (home-page "https://github.com/python-visualization/folium")
22596 (synopsis "Make beautiful maps with Leaflet.js & Python")
22597 (description "@code{folium} makes it easy to visualize data that’s been
22598 manipulated in Python on an interactive leaflet map. It enables both the
22599 binding of data to a map for @code{choropleth} visualizations as well as
22600 passing rich vector/raster/HTML visualizations as markers on the map.
22601
22602 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
22603 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
22604 supports Image, Video, GeoJSON and TopoJSON overlays.")
22605 (license license:expat)))
22606
22607 (define-public jube
22608 (package
22609 ;; This is a command-line tool, so no "python-" prefix.
22610 (name "jube")
22611 (version "2.2.2")
22612 (source (origin
22613 (method url-fetch)
22614 (uri (string-append
22615 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
22616 version))
22617 (sha256
22618 (base32
22619 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
22620 (file-name (string-append "jube-" version ".tar.gz"))))
22621 (build-system python-build-system)
22622 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
22623 (synopsis "Benchmarking environment")
22624 (description
22625 "JUBE helps perform and analyze benchmarks in a systematic way. For each
22626 benchmarked application, benchmark data is stored in a format that allows JUBE
22627 to deduct the desired information. This data can be parsed by automatic pre-
22628 and post-processing scripts that draw information and store it more densely
22629 for manual interpretation.")
22630 (license license:gpl3+)))
22631
22632 (define-public python-pyroutelib3
22633 (package
22634 (name "python-pyroutelib3")
22635 (version "1.3.post1")
22636 (source
22637 (origin
22638 (method url-fetch)
22639 (uri (pypi-uri "pyroutelib3" version))
22640 (sha256
22641 (base32
22642 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
22643 (build-system python-build-system)
22644 (propagated-inputs
22645 `(("python-dateutil" ,python-dateutil)))
22646 (home-page "https://github.com/MKuranowski/pyroutelib3")
22647 (synopsis "Library for simple routing on OSM data")
22648 (description "Library for simple routing on OSM data")
22649 (license license:gpl3+)))
22650
22651 (define-public python-bibtexparser
22652 (package
22653 (name "python-bibtexparser")
22654 (version "1.1.0")
22655 (source
22656 (origin
22657 (method url-fetch)
22658 (uri (pypi-uri "bibtexparser" version))
22659 (sha256
22660 (base32
22661 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
22662 (build-system python-build-system)
22663 (propagated-inputs
22664 `(("python-pyparsing" ,python-pyparsing)))
22665 (native-inputs
22666 `(("python-future" ,python-future)))
22667 (home-page "https://github.com/sciunto-org/python-bibtexparser")
22668 (synopsis "Python library to parse BibTeX files")
22669 (description "BibtexParser is a Python library to parse BibTeX files.")
22670 (license (list license:bsd-3 license:lgpl3))))
22671
22672 (define-public python-distro
22673 (package
22674 (name "python-distro")
22675 (version "1.4.0")
22676 (source
22677 (origin
22678 (method url-fetch)
22679 (uri (pypi-uri "distro" version))
22680 (sha256
22681 (base32
22682 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
22683 (build-system python-build-system)
22684 (native-inputs
22685 `(("python-pytest" ,python-pytest)))
22686 (home-page "https://github.com/nir0s/distro")
22687 (synopsis
22688 "OS platform information API")
22689 (description
22690 "@code{distro} provides information about the OS distribution it runs on,
22691 such as a reliable machine-readable ID, or version information.
22692
22693 It is the recommended replacement for Python's original
22694 `platform.linux_distribution` function (which will be removed in Python 3.8).
22695 @code{distro} also provides a command-line interface to output the platform
22696 information in various formats.")
22697 (license license:asl2.0)))
22698
22699 (define-public python-cairosvg
22700 (package
22701 (name "python-cairosvg")
22702 (version "2.5.0")
22703 (source
22704 (origin
22705 (method url-fetch)
22706 (uri (pypi-uri "CairoSVG" version))
22707 (sha256
22708 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
22709 (build-system python-build-system)
22710 (arguments
22711 `(#:phases
22712 (modify-phases %standard-phases
22713 (replace 'check
22714 (lambda _ (invoke "pytest"))))))
22715 (propagated-inputs
22716 `(("python-cairocffi" ,python-cairocffi)
22717 ("python-cssselect2" ,python-cssselect2)
22718 ("python-defusedxml" ,python-defusedxml)
22719 ("python-pillow" ,python-pillow)
22720 ("python-tinycss2" ,python-tinycss2)))
22721 (native-inputs
22722 `(("python-pytest-flake8" ,python-pytest-flake8)
22723 ("python-pytest-isort" ,python-pytest-isort)
22724 ("python-pytest-runner" ,python-pytest-runner)))
22725 (home-page "https://cairosvg.org/")
22726 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
22727 (description "CairoSVG is a SVG converter based on Cairo. It can export
22728 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
22729 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
22730 parsed, the result is drawn to a Cairo surface that can be exported to
22731 qvarious formats: PDF, PostScript, PNG and even SVG.")
22732 (license license:lgpl3+)))
22733
22734 (define-public python-pyphen
22735 (package
22736 (name "python-pyphen")
22737 (version "0.10.0")
22738 (source
22739 (origin
22740 (method url-fetch)
22741 (uri (pypi-uri "Pyphen" version))
22742 (sha256
22743 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
22744 (build-system python-build-system)
22745 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
22746 ;; embedded set provided by upstream - like Debian does.
22747 (home-page "https://github.com/Kozea/Pyphen")
22748 (synopsis "Pure Python module to hyphenate text")
22749 (description "Pyphen is a pure Python module to hyphenate text using
22750 existing Hunspell hyphenation dictionaries.")
22751 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
22752
22753 (define-public python-intelhex
22754 (package
22755 (name "python-intelhex")
22756 (version "2.2.1")
22757 (source
22758 (origin
22759 (method url-fetch)
22760 (uri (pypi-uri "intelhex" version))
22761 (sha256
22762 (base32
22763 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
22764 (build-system python-build-system)
22765 (arguments '(#:tests? #f)) ;issue with version
22766 (home-page "https://pypi.org/project/IntelHex/")
22767 (synopsis "Python library for Intel HEX files manipulations")
22768 (description "The Intel HEX file format is widely used in microprocessors
22769 and microcontrollers area (embedded systems etc.) as the de facto standard for
22770 representation of code to be programmed into microelectronic devices. This
22771 package provides an intelhex Python library to read, write, create from
22772 scratch and manipulate data from Intel HEX file format. It also includes
22773 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
22774 converters and more, those based on the library itself.")
22775 (license license:bsd-3)))
22776
22777 (define-public python-pykwalify
22778 (package
22779 (name "python-pykwalify")
22780 (version "1.7.0")
22781 (source
22782 (origin
22783 (method url-fetch)
22784 (uri (pypi-uri "pykwalify" version))
22785 (sha256
22786 (base32
22787 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
22788 (build-system python-build-system)
22789 (arguments '(#:tests? #f)) ;missing dependencies
22790 (propagated-inputs
22791 `(("python-dateutil" ,python-dateutil)
22792 ("python-docopt" ,python-docopt)
22793 ("python-pyyaml" ,python-pyyaml)))
22794 (home-page "https://github.com/grokzen/pykwalify")
22795 (synopsis
22796 "Python lib/cli for JSON/YAML schema validation")
22797 (description
22798 "This package provides a parser, schema validator, and data binding tool
22799 for YAML and JSON.")
22800 (license license:expat)))
22801
22802 (define-public python-dbusmock
22803 (package
22804 (name "python-dbusmock")
22805 (version "0.18.3")
22806 (source
22807 (origin
22808 (method url-fetch)
22809 (uri (pypi-uri "python-dbusmock" version))
22810 (sha256
22811 (base32
22812 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
22813 (build-system python-build-system)
22814 (arguments
22815 '(#:phases
22816 (modify-phases %standard-phases
22817 (add-after 'unpack 'patch-shell-path
22818 (lambda _
22819 (substitute* "tests/test_code.py"
22820 (("/bin/bash") (which "bash")))
22821 #t)))))
22822 (native-inputs
22823 `(;; For tests.
22824 ("dbus" ,dbus) ; for dbus-daemon
22825 ("python-nose" ,python-nose)
22826 ("which" ,which)))
22827 (propagated-inputs
22828 `(("python-dbus" ,python-dbus)
22829 ("python-pygobject" ,python-pygobject)))
22830 (home-page "https://github.com/martinpitt/python-dbusmock")
22831 (synopsis "Python library for mock D-Bus objects")
22832 (description "python-dbusmock allows for the easy creation of mock objects on
22833 D-Bus. This is useful for writing tests for software which talks to D-Bus
22834 services such as upower, systemd, logind, gnome-session or others, and it is
22835 hard (or impossible without root privileges) to set the state of the real
22836 services to what you expect in your tests.")
22837 (license license:lgpl3+)))
22838
22839 (define-public python-jsonplus
22840 (package
22841 (name "python-jsonplus")
22842 (version "0.8.0")
22843 (home-page "https://github.com/randomir/jsonplus")
22844 (source (origin
22845 (method url-fetch)
22846 (uri (pypi-uri "jsonplus" version))
22847 (sha256
22848 (base32
22849 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
22850 (build-system python-build-system)
22851 ;; XXX: No tests on PyPI, and the repository has no tags.
22852 (arguments '(#:tests? #f))
22853 (propagated-inputs
22854 `(("python-dateutil" ,python-dateutil)
22855 ("python-simplejson" ,python-simplejson)
22856 ("python-sortedcontainers" ,python-sortedcontainers)))
22857 (synopsis "Serialize Python types to/from JSON")
22858 (description
22859 "This package provides functionality to serialize arbitrary data types
22860 to and from JSON. Common data types are implemented and it is easy to
22861 register custom encoders and decoders.")
22862 (license license:expat)))
22863
22864 (define-public python-ujson
22865 (package
22866 (name "python-ujson")
22867 (version "4.0.2")
22868 (source
22869 (origin
22870 (method url-fetch)
22871 (uri (pypi-uri "ujson" version))
22872 (sha256
22873 (base32
22874 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
22875 (modules '((guix build utils)))
22876 (snippet
22877 '(begin (delete-file-recursively "deps") #t))))
22878 (build-system python-build-system)
22879 (arguments
22880 `(#:phases
22881 (modify-phases %standard-phases
22882 (add-after 'unpack 'link-to-system-double-conversion
22883 (lambda* (#:key inputs #:allow-other-keys)
22884 (let ((d-c (assoc-ref inputs "double-conversion")))
22885 (substitute* "setup.py"
22886 (("./deps/double-conversion/double-conversion\"")
22887 (string-append d-c "/include/double-conversion\""))
22888 (("-lstdc++" stdc)
22889 (string-append "-L" d-c "/lib\","
22890 " \"-ldouble-conversion\","
22891 " \"" stdc)))
22892 #t)))
22893 (replace 'check
22894 (lambda* (#:key inputs outputs #:allow-other-keys)
22895 (add-installed-pythonpath inputs outputs)
22896 (invoke "pytest"))))))
22897 (native-inputs
22898 `(("double-conversion" ,double-conversion)
22899 ("python-setuptools-scm" ,python-setuptools-scm)
22900 ("python-pytest" ,python-pytest)))
22901 (home-page "https://github.com/ultrajson/ultrajson")
22902 (synopsis "Ultra fast JSON encoder and decoder for Python")
22903 (description
22904 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
22905 bindings for Python 3.")
22906 (license license:bsd-3)))
22907
22908 (define-public python-iocapture
22909 ;; The latest release is more than a year older than this commit.
22910 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
22911 (revision "1"))
22912 (package
22913 (name "python-iocapture")
22914 (version "0.1.2")
22915 (source
22916 (origin
22917 (method git-fetch)
22918 (uri (git-reference
22919 (url "https://github.com/oinume/iocapture")
22920 (commit commit)))
22921 (file-name (git-file-name name version))
22922 (sha256
22923 (base32
22924 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
22925 (build-system python-build-system)
22926 (arguments
22927 `(#:phases
22928 (modify-phases %standard-phases
22929 (delete 'check)
22930 (add-after 'install 'check
22931 (lambda* (#:key inputs outputs #:allow-other-keys)
22932 (add-installed-pythonpath inputs outputs)
22933 (invoke "py.test" "-v" "tests")
22934 #t)))))
22935 (propagated-inputs
22936 `(("python-flexmock" ,python-flexmock)
22937 ("python-pytest" ,python-pytest)
22938 ("python-pytest-cov" ,python-pytest-cov)
22939 ("python-six" ,python-six)))
22940 (home-page "https://github.com/oinume/iocapture")
22941 (synopsis "Python capturing tool for stdout and stderr")
22942 (description
22943 "This package helps you to capture the standard out (stdout) and the
22944 standard error channel (stderr) in your program.")
22945 (license license:expat))))
22946
22947 (define-public python-anyio
22948 (package
22949 (name "python-anyio")
22950 (version "3.3.0")
22951 (source
22952 (origin
22953 (method url-fetch)
22954 (uri (pypi-uri "anyio" version))
22955 (sha256
22956 (base32
22957 "0x03hsprdrs86wjjkj96zm2jswy3a5bgyrknyi58pzz5hdsscmxf"))))
22958 (build-system python-build-system)
22959 (arguments
22960 `(#:phases
22961 (modify-phases %standard-phases
22962 (add-after 'unpack 'fix-compatibility
22963 (lambda _
22964 (substitute* "tests/test_taskgroups.py"
22965 (("import pytest")
22966 "import pytest\nimport _pytest\nfrom _pytest import logging")
22967 (("pytest.LogCaptureFixture")
22968 "_pytest.logging.LogCaptureFixture"))))
22969 (replace 'check
22970 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
22971 (when tests?
22972 (add-installed-pythonpath inputs outputs)
22973 (invoke "pytest" "-vv" "-p" "no:asyncio"
22974 "-m" "not network"
22975 "-k"
22976 (string-append
22977 "not test_is_block_device"
22978
22979 ;; These fail because of network (or specifically
22980 ;; IPv6 network) access.
22981 " and not test_accept"
22982 " and not test_accept_after_close"
22983 " and not test_close_during_receive"
22984 " and not test_close_from_other_task"
22985 " and not test_concurrent_receive"
22986 " and not test_concurrent_send"
22987 " and not test_connect_tcp_with_tls"
22988 " and not test_connect_tcp_with_tls_cert_check_fail"
22989 " and not test_connection_refused"
22990 " and not test_extra_attributes"
22991 " and not test_getaddrinfo"
22992 " and not test_getnameinfo"
22993 " and not test_happy_eyeballs"
22994 " and not test_iterate"
22995 " and not test_receive_after_close"
22996 " and not test_receive_timeout"
22997 " and not test_reuse_port"
22998 " and not test_run_process"
22999 " and not test_send_after_close"
23000 " and not test_send_after_eof"
23001 " and not test_send_after_peer_closed"
23002 " and not test_send_eof"
23003 " and not test_send_large_buffer"
23004 " and not test_send_receive"
23005 " and not test_socket_options"))))))))
23006 (propagated-inputs
23007 `(("python-idna" ,python-idna)
23008 ("python-sniffio" ,python-sniffio)
23009 ("python-typing-extensions" ,python-typing-extensions)))
23010 (native-inputs
23011 `(("python-coverage" ,python-coverage)
23012 ("python-hypothesis" ,python-hypothesis)
23013 ("python-iniconfig" ,python-iniconfig)
23014 ("python-mock" ,python-mock)
23015 ("python-pytest" ,python-pytest-6)
23016 ("python-pytest-mock" ,python-pytest-mock)
23017 ("python-pytest-trio" ,python-pytest-trio)
23018 ("python-setuptools-scm" ,python-setuptools-scm)
23019 ("python-trustme" ,python-trustme)
23020 ("python-uvloop" ,python-uvloop)))
23021 (home-page "https://github.com/agronholm/anyio")
23022 (synopsis "Compatibility layer for multiple asynchronous event loops")
23023 (description
23024 "AnyIO is an asynchronous networking and concurrency library that works
23025 on top of either asyncio or trio. It implements trio-like structured
23026 concurrency on top of asyncio, and works in harmony with the native SC of trio
23027 itself.")
23028 (license license:expat)))
23029
23030 (define-public python-argh
23031 ;; There are 21 commits since the latest release containing important
23032 ;; improvements.
23033 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
23034 (revision "1"))
23035 (package
23036 (name "python-argh")
23037 (version (git-version "0.26.2" revision commit))
23038 (source
23039 (origin
23040 (method git-fetch)
23041 (uri (git-reference
23042 (url "https://github.com/neithere/argh")
23043 (commit commit)))
23044 (file-name (git-file-name name version))
23045 (sha256
23046 (base32
23047 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
23048 (build-system python-build-system)
23049 (propagated-inputs
23050 `(("python-iocapture" ,python-iocapture)
23051 ("python-mock" ,python-mock)
23052 ("python-pytest" ,python-pytest)
23053 ("python-pytest-cov" ,python-pytest-cov)
23054 ("python-pytest-xdist" ,python-pytest-xdist)))
23055 (home-page "https://github.com/neithere/argh/")
23056 (synopsis "Argparse wrapper with natural syntax")
23057 (description
23058 "python-argh is a small library that provides several layers of
23059 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
23060 always possible to declare a command with the highest possible (and least
23061 flexible) layer and then tune the behaviour with any of the lower layers
23062 including the native API of @code{python-argparse}.")
23063 (license license:lgpl3+))))
23064
23065 (define-public python-ppft
23066 (package
23067 (name "python-ppft")
23068 (version "1.6.6.1")
23069 (source
23070 (origin
23071 (method url-fetch)
23072 (uri (pypi-uri "ppft" version))
23073 (sha256
23074 (base32
23075 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
23076 (build-system python-build-system)
23077 (arguments '(#:tests? #f)) ; there are none
23078 (propagated-inputs
23079 `(("python-six" ,python-six)))
23080 (home-page "https://pypi.org/project/ppft/")
23081 (synopsis "Fork of Parallel Python")
23082 (description
23083 "This package is a fork of Parallel Python. The Parallel Python
23084 module (@code{pp}) provides an easy and efficient way to create
23085 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
23086 computers and clusters. It features cross-platform portability and dynamic
23087 load balancing.")
23088 (license license:bsd-3)))
23089
23090 (define-public python-pox
23091 (package
23092 (name "python-pox")
23093 (version "0.2.7")
23094 (source
23095 (origin
23096 (method url-fetch)
23097 (uri (pypi-uri "pox" version))
23098 (sha256
23099 (base32
23100 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
23101 (build-system python-build-system)
23102 (arguments
23103 `(#:phases
23104 (modify-phases %standard-phases
23105 (replace 'check
23106 (lambda _
23107 (mkdir-p "/tmp/guix")
23108 (setenv "SHELL" "bash")
23109 (setenv "USERNAME" "guix")
23110 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
23111 (invoke "py.test" "-vv")
23112 #t)))))
23113 (native-inputs
23114 `(("python-pytest" ,python-pytest)
23115 ("which" ,which)))
23116 (home-page "https://pypi.org/project/pox/")
23117 (synopsis "Python utilities for file system exploration and automated builds")
23118 (description
23119 "Pox provides a collection of utilities for navigating and manipulating
23120 file systems. This module is designed to facilitate some of the low-level
23121 operating system interactions that are useful when exploring a file system on a
23122 remote host. Pox provides Python equivalents of several shell commands such
23123 as @command{which} and @command{find}. These commands allow automated
23124 discovery of what has been installed on an operating system, and where the
23125 essential tools are located.")
23126 (license license:bsd-3)))
23127
23128 (define-public python-pathos
23129 (package
23130 (name "python-pathos")
23131 (version "0.2.5")
23132 (source
23133 (origin
23134 (method url-fetch)
23135 (uri (pypi-uri "pathos" version))
23136 (sha256
23137 (base32
23138 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
23139 (build-system python-build-system)
23140 (arguments
23141 '(#:phases
23142 (modify-phases %standard-phases
23143 (replace 'check
23144 (lambda _
23145 (invoke "python" "./tests/__main__.py"))))))
23146 (propagated-inputs
23147 `(("python-dill" ,python-dill)
23148 ("python-multiprocess" ,python-multiprocess)
23149 ("python-pox" ,python-pox)
23150 ("python-ppft" ,python-ppft)))
23151 (native-inputs
23152 `(("python-pytest" ,python-pytest)))
23153 (home-page "https://pypi.org/project/pathos/")
23154 (synopsis
23155 "Parallel graph management and execution in heterogeneous computing")
23156 (description
23157 "Python-pathos is a framework for heterogeneous computing. It provides a
23158 consistent high-level interface for configuring and launching parallel
23159 computations across heterogeneous resources. Python-pathos provides configurable
23160 launchers for parallel and distributed computing, where each launcher contains
23161 the syntactic logic to configure and launch jobs in an execution environment.")
23162 (license license:bsd-3)))
23163
23164 (define-public python-flit
23165 (package
23166 (name "python-flit")
23167 (version "3.2.0")
23168 ;; We fetch the sources via git because on pypi the package is split into
23169 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
23170 (source (origin
23171 (method git-fetch)
23172 (uri (git-reference
23173 (url "https://github.com/takluyver/flit")
23174 (commit version)))
23175 (file-name (git-file-name name version))
23176 (sha256
23177 (base32
23178 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
23179 (build-system python-build-system)
23180 (arguments
23181 `(#:phases
23182 (modify-phases %standard-phases
23183 (add-before 'build 'bootstrap
23184 (lambda* (#:key inputs #:allow-other-keys)
23185 (let ((home (string-append (getcwd) "/home")))
23186 (mkdir-p home)
23187 (setenv "HOME" home))
23188 (for-each make-file-writable (find-files "."))
23189 (copy-recursively (assoc-ref inputs "python-testpath")
23190 (string-append (getcwd) "/testpath"))
23191 (substitute* "pyproject.toml"
23192 (("\"testpath\",") ""))
23193 (invoke "python" "bootstrap_dev.py")))
23194 (replace 'build
23195 (lambda _
23196 ;; A ZIP archive should be generated, but it fails with "ZIP does
23197 ;; not support timestamps before 1980". Luckily,
23198 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
23199 ;; 1980.
23200 (setenv "SOURCE_DATE_EPOCH" "315532800")
23201 (for-each (lambda (toml)
23202 (invoke "python3" "-m" "flit"
23203 "--debug" "--ini-file" toml
23204 "build"))
23205 '("testpath/pyproject.toml"
23206 "pyproject.toml"))
23207 (with-directory-excursion "flit_core"
23208 (invoke "python" "build_dists.py"))))
23209 (replace 'install
23210 (lambda* (#:key inputs outputs #:allow-other-keys)
23211 (add-installed-pythonpath inputs outputs)
23212 (let ((out (assoc-ref outputs "out")))
23213 (delete-file-recursively "./home")
23214 (for-each (lambda (wheel)
23215 (format #true wheel)
23216 (invoke "python" "-m" "pip" "install"
23217 wheel (string-append "--prefix=" out)))
23218 (append
23219 (find-files "flit_core/dist" "\\.whl$")
23220 (find-files "dist" "\\.whl$")))))))
23221 #:tests? #f)) ; XXX: Check requires network access.
23222 (propagated-inputs
23223 `(("python-pytoml" ,python-pytoml)
23224 ("python-toml" ,python-toml)))
23225 (native-inputs
23226 `(("python-docutils" ,python-docutils)
23227 ("python-responses" ,python-responses)
23228 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
23229 ("python-pytest" ,python-pytest)
23230 ("python-pytest-cov" ,python-pytest-cov)
23231 ("python-sphinx" ,python-sphinx)
23232 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
23233 ;; This package needs testpath, but testpath also needs flit...
23234 ("python-testpath"
23235 ,(let ((name "python-testpath")
23236 (version "0.4.4"))
23237 (origin
23238 (method git-fetch)
23239 (uri (git-reference
23240 (url "https://github.com/jupyter/testpath")
23241 (commit version)))
23242 (file-name (git-file-name name version))
23243 (sha256
23244 (base32
23245 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
23246 (home-page "https://flit.readthedocs.io/")
23247 (synopsis
23248 "Simple packaging tool for simple packages")
23249 (description
23250 "Flit is a simple way to put Python packages and modules on PyPI. Flit
23251 packages a single importable module or package at a time, using the import
23252 name as the name on PyPI. All subpackages and data files within a package
23253 are included automatically.")
23254 (license license:bsd-3)))
23255
23256 (define-public python-pathtools
23257 (package
23258 (name "python-pathtools")
23259 (version "0.1.2")
23260 (source
23261 (origin
23262 (method url-fetch)
23263 (uri (pypi-uri "pathtools" version))
23264 (sha256
23265 (base32
23266 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
23267 (build-system python-build-system)
23268 (home-page
23269 "https://github.com/gorakhargosh/pathtools")
23270 (synopsis "Path utilities for Python")
23271 (description "Pattern matching and various utilities for file systems
23272 paths.")
23273 (license license:expat)))
23274
23275 (define-public python-fastentrypoints
23276 (package
23277 (name "python-fastentrypoints")
23278 (version "0.12")
23279 (source
23280 (origin
23281 (method url-fetch)
23282 (uri (pypi-uri "fastentrypoints" version))
23283 (sha256
23284 (base32
23285 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
23286 (build-system python-build-system)
23287 (home-page
23288 "https://github.com/ninjaaron/fast-entry_points")
23289 (synopsis
23290 "Makes entry_points specified in setup.py load more quickly")
23291 (description
23292 "Using entry_points in your setup.py makes scripts that start really
23293 slowly because it imports pkg_resources. This package allows such setup
23294 scripts to load entry points more quickly.")
23295 (license license:bsd-3)))
23296
23297 (define-public python-funcparserlib
23298 (package
23299 (name "python-funcparserlib")
23300 (version "0.3.6")
23301 (source
23302 (origin
23303 (method url-fetch)
23304 (uri (pypi-uri "funcparserlib" version))
23305 (sha256
23306 (base32
23307 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
23308 (native-inputs
23309 `(("python-tox" ,python-tox)))
23310 (arguments
23311 `(#:phases
23312 (modify-phases %standard-phases
23313 (replace 'check
23314 (lambda _
23315 (invoke "tox"))))))
23316 (build-system python-build-system)
23317 (home-page
23318 "https://github.com/vlasovskikh/funcparserlib")
23319 (synopsis
23320 "Recursive descent parsing library based on functional combinators")
23321 (description
23322 "This package is a recursive descent parsing library for Python based on
23323 functional combinators. Parser combinators are just higher-order functions
23324 that take parsers as their arguments and return them as result values.")
23325 (license license:expat)))
23326
23327 (define-public python-speg
23328 (package
23329 (name "python-speg")
23330 (version "0.3")
23331 (source
23332 (origin
23333 (method url-fetch)
23334 (uri (pypi-uri "speg" version ".zip"))
23335 (sha256
23336 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
23337 (arguments
23338 `(#:tests? #f)) ;FIXME: tests fail, not sure why
23339 (native-inputs
23340 `(("unzip" ,unzip)))
23341 (build-system python-build-system)
23342 (home-page "https://github.com/avakar/speg")
23343 (synopsis "PEG-based parser interpreter with memoization")
23344 (description "This package is a PEG-based parser and interpreter with
23345 memoization.")
23346 (license license:expat)))
23347
23348 (define-public python-cson
23349 (package
23350 (name "python-cson")
23351 (version "0.8")
23352 (source
23353 (origin
23354 (method url-fetch)
23355 (uri (pypi-uri "cson" version))
23356 (sha256
23357 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
23358 (build-system python-build-system)
23359 (propagated-inputs
23360 `(("python-speg" ,python-speg)))
23361 (home-page "https://github.com/avakar/pycson")
23362 (synopsis "Parser for Coffeescript Object Notation (CSON)")
23363 (description "This package is a parser for Coffeescript Object
23364 Notation (CSON).")
23365 (license license:expat)))
23366
23367 (define-public python-asynctest
23368 (package
23369 (name "python-asynctest")
23370 (version "0.13.0")
23371 (source
23372 (origin
23373 (method url-fetch)
23374 (uri (pypi-uri "asynctest" version))
23375 (sha256
23376 (base32
23377 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
23378 (build-system python-build-system)
23379 (arguments
23380 '(#:phases
23381 (modify-phases %standard-phases
23382 (replace 'check
23383 (lambda _
23384 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
23385 (add-after 'unpack 'disable-tests
23386 (lambda* _
23387 ;; XXX: 7 tests fail out of 220. Disable them for now.
23388 (substitute* (list "test/test_selector.py"
23389 "test/test_mock.py")
23390 (("def test_events_watched_outside_test_are_ignored")
23391 "@unittest.skip('disabled by guix')
23392 def test_events_watched_outside_test_are_ignored")
23393 (("def test_awaited_from_autospec_mock.*" line)
23394 (string-append line " return True\n"))
23395 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
23396 (string-append line " return True\n"))
23397 (("def test_patch_coroutine_with_multiple_scopes.*" line)
23398 (string-append line " return True\n"))
23399 (("def test_multiple_patches_on_coroutine.*" line)
23400 (string-append line " return True\n"))
23401 (("def test_patch_coroutine_only_when_running.*" line)
23402 (string-append line " return True\n")))
23403 #t)))))
23404 (home-page "https://github.com/Martiusweb/asynctest")
23405 (synopsis "Extension of unittest for testing asyncio libraries")
23406 (description
23407 "The package asynctest is built on top of the standard unittest module
23408 and cuts down boilerplate code when testing libraries for asyncio.")
23409 (license license:asl2.0)))
23410
23411 (define-public python-aionotify
23412 (package
23413 (name "python-aionotify")
23414 (version "0.2.0")
23415 (source
23416 (origin
23417 ;; Source tarball on PyPi lacks tests
23418 (method git-fetch)
23419 (uri (git-reference
23420 (url "https://github.com/rbarrois/aionotify")
23421 (commit (string-append "v" version))))
23422 (file-name (git-file-name name version))
23423 (sha256
23424 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
23425 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
23426 (build-system python-build-system)
23427 (home-page "https://github.com/rbarrois/aionotify")
23428 (synopsis "Asyncio-powered inotify library")
23429 (description
23430 "@code{aionotify} is a simple, asyncio-based inotify library.")
23431 (license license:bsd-3)))
23432
23433 (define-public python-forbiddenfruit
23434 (package
23435 (name "python-forbiddenfruit")
23436 (version "0.1.3")
23437 (source
23438 (origin
23439 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
23440 (method git-fetch)
23441 (uri (git-reference
23442 (url "https://github.com/clarete/forbiddenfruit")
23443 (commit version)))
23444 (file-name (git-file-name name version))
23445 (sha256
23446 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
23447 (build-system python-build-system)
23448 (arguments
23449 '(#:phases
23450 (modify-phases %standard-phases
23451 (replace 'check
23452 (lambda _
23453 (invoke "make" "SKIP_DEPS=1"))))))
23454 (native-inputs
23455 `(("python-nose" ,python-nose)
23456 ("python-coverage" ,python-coverage)))
23457 (home-page "https://github.com/clarete/forbiddenfruit")
23458 (synopsis "Patch python built-in objects")
23459 (description "This project allows Python code to extend built-in types.")
23460 (license (list license:gpl3+ license:expat))))
23461
23462 (define-public python-k5test
23463 (package
23464 (name "python-k5test")
23465 (version "0.9.2")
23466 (source
23467 (origin
23468 (method url-fetch)
23469 (uri (pypi-uri "k5test" version))
23470 (sha256
23471 (base32
23472 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
23473 (build-system python-build-system)
23474 (propagated-inputs
23475 `(("python-six" ,python-six)
23476 ;; `which`, `kadmin.local` binaries called inside library
23477 ("which" ,which)
23478 ("mit-krb5" ,mit-krb5)))
23479 (native-inputs `(("mit-krb5" ,mit-krb5)))
23480 (arguments
23481 '(#:phases
23482 (modify-phases %standard-phases
23483 (add-after 'unpack 'apply-upstream-fixes
23484 (lambda* _
23485 (substitute* "k5test/realm.py"
23486 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
23487 (("'kadmin_local'") "'kadmin.local'")
23488 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
23489 (("\\.stop_daemon") "._stop_daemon")))))))
23490 (home-page "https://github.com/pythongssapi/k5test")
23491 (synopsis "Library for setting up self-contained Kerberos 5 environments")
23492 (description
23493 "@code{k5test} is a library for setting up self-contained Kerberos 5
23494 environments, and running Python unit tests inside those environments. It is
23495 based on the file of the same name found alongside the MIT Kerberos 5 unit
23496 tests.")
23497 (license license:isc)))
23498
23499 (define-public python-gssapi
23500 (package
23501 (name "python-gssapi")
23502 (version "1.6.12")
23503 (source
23504 (origin
23505 (method url-fetch)
23506 (uri (pypi-uri "gssapi" version))
23507 (sha256
23508 (base32
23509 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
23510 (build-system python-build-system)
23511 (propagated-inputs
23512 `(("python-decorator" ,python-decorator)
23513 ("python-six" ,python-six)))
23514 (inputs
23515 `(("mit-krb5" ,mit-krb5)))
23516 ;; for tests
23517 (native-inputs
23518 `(("python-parameterized" ,python-parameterized)
23519 ("python-k5test" ,python-k5test)
23520 ("python-nose" ,python-nose)))
23521 (home-page "https://github.com/pythongssapi/python-gssapi")
23522 (synopsis "Python GSSAPI Wrapper")
23523 (description
23524 "Python-GSSAPI provides both low-level and high level wrappers around the
23525 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
23526 also be usable with other GSSAPI mechanisms.")
23527 (license license:isc)))
23528
23529 (define-public python-check-manifest
23530 (package
23531 (name "python-check-manifest")
23532 (version "0.37")
23533 (source
23534 (origin
23535 (method url-fetch)
23536 (uri (pypi-uri "check-manifest" version))
23537 (sha256
23538 (base32
23539 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
23540 (build-system python-build-system)
23541 (native-inputs
23542 `(("python-mock" ,python-mock)
23543 ("git" ,git)))
23544 (home-page "https://github.com/mgedmin/check-manifest")
23545 (synopsis "Check MANIFEST.in in a Python source package for completeness")
23546 (description "Python package can include a MANIFEST.in file to help with
23547 sending package files to the Python Package Index. This package checks that
23548 file to ensure it completely and accurately describes your project.")
23549 (license license:expat)))
23550
23551 (define-public python-android-stringslib
23552 (package
23553 (name "python-android-stringslib")
23554 (version "0.1.2")
23555 (source
23556 (origin
23557 (method git-fetch)
23558 (uri (git-reference
23559 (url "https://framagit.org/tyreunom/python-android-strings-lib")
23560 (commit (string-append "v" version))))
23561 (file-name (git-file-name name version))
23562 (sha256
23563 (base32
23564 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
23565 (build-system python-build-system)
23566 (arguments
23567 `(#:tests? #f))
23568 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
23569 (synopsis "Android strings.xml support")
23570 (description "Android Strings Lib provides support for android's strings.xml
23571 files. These files are used to translate strings in android apps.")
23572 (license license:expat)))
23573
23574 (define-public python-watchdog
23575 (package
23576 (name "python-watchdog")
23577 (version "0.9.0")
23578 (source
23579 (origin
23580 (method url-fetch)
23581 (uri (pypi-uri "watchdog" version))
23582 (sha256
23583 (base32
23584 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
23585 (build-system python-build-system)
23586 (arguments
23587 `(#:phases
23588 (modify-phases %standard-phases
23589 (add-before 'check 'remove-failing
23590 (lambda _
23591 (delete-file "tests/test_inotify_buffer.py")
23592 (delete-file "tests/test_snapshot_diff.py")
23593 #t)))))
23594 (propagated-inputs
23595 `(("python-argh" ,python-argh)
23596 ("python-pathtools" ,python-pathtools)
23597 ("python-pyyaml" ,python-pyyaml)))
23598 (native-inputs
23599 `(("python-pytest-cov" ,python-pytest-cov)
23600 ("python-pytest-timeout" ,python-pytest-timeout)))
23601 (home-page "https://github.com/gorakhargosh/watchdog")
23602 (synopsis "File system events monitoring")
23603 (description "This package provides a way to monitor file system events
23604 such as a file modification and trigger an action. This is similar to inotify,
23605 but portable.")
23606 (license license:asl2.0)))
23607
23608 (define-public python-watchgod
23609 (package
23610 (name "python-watchgod")
23611 (version "0.6")
23612 (source
23613 (origin
23614 ;; There are no tests in the PyPI tarball.
23615 (method git-fetch)
23616 (uri (git-reference
23617 (url "https://github.com/samuelcolvin/watchgod")
23618 (commit (string-append "v" version))))
23619 (file-name (git-file-name name version))
23620 (sha256
23621 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
23622 (build-system python-build-system)
23623 (arguments
23624 `(#:phases
23625 (modify-phases %standard-phases
23626 (replace 'check
23627 (lambda* (#:key tests? #:allow-other-keys)
23628 (when tests?
23629 (invoke "pytest" "-vv")))))))
23630 (native-inputs
23631 `(("python-coverage" ,python-coverage)
23632 ("python-docutils" ,python-docutils)
23633 ("python-flake8" ,python-flake8)
23634 ("python-isort" ,python-isort)
23635 ("python-pycodestyle" ,python-pycodestyle)
23636 ("python-pyflakes" ,python-pyflakes)
23637 ("python-pygments" ,python-pygments)
23638 ("python-pytest" ,python-pytest)
23639 ("python-pytest-cov" ,python-pytest-cov)
23640 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
23641 ("python-pytest-mock" ,python-pytest-mock)
23642 ("python-pytest-sugar" ,python-pytest-sugar)
23643 ("python-pytest-toolbox" ,python-pytest-toolbox)))
23644 (home-page "https://github.com/samuelcolvin/watchgod")
23645 (synopsis "Simple, modern file watching and code reload in Python")
23646 (description
23647 "Simple, modern file watching and code reload in Python inspired by
23648 @code{watchdog}. Among the differences are a unified approach for each
23649 operating systems and an elegant approach to concurrency using threading.")
23650 (license license:expat)))
23651
23652 (define-public python-wget
23653 (package
23654 (name "python-wget")
23655 (version "3.2")
23656 (source
23657 (origin
23658 (method url-fetch)
23659 (uri (pypi-uri "wget" version ".zip"))
23660 (sha256
23661 (base32
23662 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
23663 (build-system python-build-system)
23664 (native-inputs `(("unzip" ,unzip)))
23665 (home-page "https://bitbucket.org/techtonik/python-wget/")
23666 (synopsis "Pure Python download utility")
23667 (description "The python-wget library provides an API to download files
23668 with features similar to the @command{wget} utility.")
23669 (license license:unlicense)))
23670
23671 (define-public offlate
23672 (package
23673 (name "offlate")
23674 (version "0.5")
23675 (source
23676 (origin
23677 (method git-fetch)
23678 (uri (git-reference
23679 (url "https://framagit.org/tyreunom/offlate")
23680 (commit version)))
23681 (file-name (git-file-name name version))
23682 (sha256
23683 (base32
23684 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
23685 (build-system python-build-system)
23686 (arguments
23687 ;; No tests
23688 `(#:tests? #f))
23689 (propagated-inputs
23690 `(("python-android-stringslib" ,python-android-stringslib)
23691 ("python-dateutil" ,python-dateutil)
23692 ("python-gitlab" ,python-gitlab)
23693 ("python-lxml" ,python-lxml)
23694 ("python-polib" ,python-polib)
23695 ("python-pyenchant" ,python-pyenchant)
23696 ("python-pygit2" ,python-pygit2)
23697 ("python-pygithub" ,python-pygithub)
23698 ("python-pyqt" ,python-pyqt)
23699 ("python-requests" ,python-requests)
23700 ("python-ruamel.yaml" ,python-ruamel.yaml)
23701 ("python-translation-finder" ,python-translation-finder)
23702 ("python-watchdog" ,python-watchdog)))
23703 (native-inputs
23704 `(("qttools" ,qttools)))
23705 (home-page "https://framagit.org/tyreunom/offlate")
23706 (synopsis "Offline translation interface for online translation tools")
23707 (description "Offlate offers a unified interface for different translation
23708 file formats, as well as many different online translation platforms. You can
23709 use it to get work from online platforms, specialized such as the Translation
23710 Project, or not such a gitlab instance when your upstream doesn't use any
23711 dedicated platform. The tool proposes a unified interface for any format and
23712 an upload option to send your work back to the platform.")
23713 (license license:gpl3+)))
23714
23715 (define-public python-titlecase
23716 (package
23717 (name "python-titlecase")
23718 (version "0.12.0")
23719 (source
23720 (origin
23721 (method url-fetch)
23722 (uri (pypi-uri "titlecase" version))
23723 (sha256
23724 (base32
23725 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
23726 (build-system python-build-system)
23727 (native-inputs
23728 `(("python-nose" ,python-nose)))
23729 (home-page "https://github.com/ppannuto/python-titlecase")
23730 (synopsis "Capitalize strings similar to book titles")
23731 (description
23732 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
23733 It capitalizes (predominantly English) strings in a way that is similar to
23734 book titles, using the New York Times Manual of Style to leave certain words
23735 lowercase.")
23736 (license license:expat)))
23737
23738 (define-public python-pypng
23739 (package
23740 (name "python-pypng")
23741 (version "0.0.20")
23742 (source
23743 (origin
23744 (method url-fetch)
23745 (uri (pypi-uri "pypng" version))
23746 (sha256
23747 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
23748 (build-system python-build-system)
23749 (home-page "https://github.com/drj11/pypng")
23750 (synopsis "Pure Python PNG image encoder/decoder")
23751 (description
23752 "The PyPNG module implements support for PNG images. It reads and writes
23753 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
23754 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
23755 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
23756 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
23757 A number of optional chunks can be specified (when writing) and
23758 understood (when reading): tRNS, bKGD, gAMA.
23759
23760 PyPNG is not a high level toolkit for image processing (like PIL) and does not
23761 aim at being a replacement or competitor. Its strength lies in fine-grained
23762 extensive support of PNG features. It can also read and write Netpbm PAM
23763 files, with a focus on its use as an intermediate format for implementing
23764 custom PNG processing.")
23765 (license license:expat)))
23766
23767 (define-public python-fuzzywuzzy
23768 (package
23769 (name "python-fuzzywuzzy")
23770 (version "0.18.0")
23771 (source
23772 (origin
23773 (method url-fetch)
23774 (uri (pypi-uri "fuzzywuzzy" version))
23775 (sha256
23776 (base32
23777 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
23778 (build-system python-build-system)
23779 (native-inputs
23780 `(("python-hypothesis" ,python-hypothesis)
23781 ("python-pycodestyle" ,python-pycodestyle)
23782 ("python-pytest" ,python-pytest)))
23783 (propagated-inputs
23784 `(("python-levenshtein" ,python-levenshtein)))
23785 (home-page "https://github.com/seatgeek/fuzzywuzzy")
23786 (synopsis "Fuzzy string matching in Python")
23787 (description "Approximate string matching using
23788 @emph{Levenshtein Distance} to calculate the differences between
23789 sequences.")
23790 (license license:gpl2)))
23791
23792 (define-public python2-fuzzywuzzy
23793 (package-with-python2 python-fuzzywuzzy))
23794
23795 (define-public python-block-tracing
23796 (package
23797 (name "python-block-tracing")
23798 (version "1.0.1")
23799 (source
23800 (origin
23801 (method url-fetch)
23802 (uri (pypi-uri "block_tracing" version))
23803 (sha256
23804 (base32
23805 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
23806 (build-system python-build-system)
23807 (arguments '(#:tests? #f)) ; no tests
23808 (home-page "https://github.com/rianhunter/block_tracing")
23809 (synopsis "Protect process memory")
23810 (description
23811 "@code{block_tracing} is a tiny Python library that can be used to
23812 prevent debuggers and other applications from inspecting the memory within
23813 your process.")
23814 (license license:expat)))
23815
23816 (define-public python-gcovr
23817 (package
23818 (name "python-gcovr")
23819 (version "4.2")
23820 (source
23821 (origin
23822 (method url-fetch)
23823 (uri (pypi-uri "gcovr" version))
23824 (sha256
23825 (base32
23826 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
23827 (build-system python-build-system)
23828 (propagated-inputs
23829 `(("python-lxml" ,python-lxml)
23830 ("python-jinja2" ,python-jinja2)))
23831 (home-page "https://gcovr.com/")
23832 (synopsis "Utility for generating code coverage results")
23833 (description
23834 "Gcovr provides a utility for managing the use of the GNU gcov
23835 utility and generating summarized code coverage results. It is inspired
23836 by the Python coverage.py package, which provides a similar utility for
23837 Python.")
23838 (license license:bsd-3)))
23839
23840 (define-public python-owslib
23841 (package
23842 (name "python-owslib")
23843 (version "0.19.2")
23844 (source
23845 (origin
23846 (method url-fetch)
23847 (uri (pypi-uri "OWSLib" version))
23848 (sha256
23849 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
23850 (build-system python-build-system)
23851 (arguments
23852 ;; TODO: package dependencies required for tests.
23853 '(#:tests? #f
23854 #:phases (modify-phases %standard-phases
23855 (delete 'sanity-check))))
23856 (synopsis "Interface for Open Geospatial Consortium web service")
23857 (description
23858 "OWSLib is a Python package for client programming with Open Geospatial
23859 Consortium (OGC) web service (hence OWS) interface standards, and their related
23860 content models.")
23861 (home-page "https://geopython.github.io/OWSLib/")
23862 (license license:bsd-3)))
23863
23864 (define-public python-docusign-esign
23865 (package
23866 (name "python-docusign-esign")
23867 (version "3.1.0")
23868 (source (origin
23869 (method url-fetch)
23870 (uri (pypi-uri "docusign_esign" version))
23871 (sha256
23872 (base32
23873 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
23874 (build-system python-build-system)
23875 ;; Testing requires undocumented setup changes, and so testing is disabled here.
23876 (arguments `(#:tests? #f))
23877 (propagated-inputs
23878 `(("python-certifi" ,python-certifi)
23879 ("python-six" ,python-six)
23880 ("python-dateutil" ,python-dateutil)
23881 ("python-urllib3" ,python-urllib3)
23882 ("python-pyjwt" ,python-pyjwt)
23883 ("python-cryptography" ,python-cryptography)
23884 ("python-nose" ,python-nose)))
23885 (synopsis "DocuSign Python Client")
23886 (description "The Official DocuSign Python Client Library used to interact
23887 with the eSign REST API. Send, sign, and approve documents using this client.")
23888 (home-page "https://www.docusign.com/devcenter")
23889 (license license:expat)))
23890
23891 (define-public python-xattr
23892 (package
23893 (name "python-xattr")
23894 (version "0.9.7")
23895 (source
23896 (origin
23897 (method url-fetch)
23898 (uri (pypi-uri "xattr" version))
23899 (sha256
23900 (base32
23901 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
23902 (build-system python-build-system)
23903 (propagated-inputs
23904 `(("python-cffi" ,python-cffi)))
23905 (home-page "https://github.com/xattr/xattr")
23906 (synopsis
23907 "Python wrapper for extended file system attributes")
23908 (description "This package provides a Python wrapper for using extended
23909 file system attributes. Extended attributes extend the basic attributes of files
23910 and directories in the file system. They are stored as name:data pairs
23911 associated with file system objects (files, directories, symlinks, etc).")
23912 (license license:expat)))
23913
23914 (define-public python-json-logger
23915 (package
23916 (name "python-json-logger")
23917 (version "0.1.11")
23918 (source
23919 (origin
23920 (method url-fetch)
23921 (uri (pypi-uri "python-json-logger" version))
23922 (sha256
23923 (base32
23924 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
23925 (build-system python-build-system)
23926 (home-page
23927 "https://github.com/madzak/python-json-logger")
23928 (synopsis "JSON log formatter in Python")
23929 (description "This library allows standard Python logging to output log data
23930 as JSON objects. With JSON we can make our logs more readable by machines and
23931 we can stop writing custom parsers for syslog-type records.")
23932 (license license:bsd-3)))
23933
23934 (define-public python-daiquiri
23935 (package
23936 (name "python-daiquiri")
23937 (version "2.1.1")
23938 (source
23939 (origin
23940 (method url-fetch)
23941 (uri (pypi-uri "daiquiri" version))
23942 (sha256
23943 (base32
23944 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
23945 (build-system python-build-system)
23946 (propagated-inputs
23947 `(("python-json-logger" ,python-json-logger)))
23948 (native-inputs
23949 `(("python-mock" ,python-mock)
23950 ("python-pytest" ,python-pytest)
23951 ("python-setuptools-scm" ,python-setuptools-scm)
23952 ("python-six" ,python-six)))
23953 (home-page "https://github.com/jd/daiquiri")
23954 (synopsis
23955 "Library to configure Python logging easily")
23956 (description "The daiquiri library provides an easy way to configure
23957 logging in Python. It also provides some custom formatters and handlers.")
23958 (license license:asl2.0)))
23959
23960 (define-public python-pifpaf
23961 (package
23962 (name "python-pifpaf")
23963 (version "2.5.0")
23964 (source
23965 (origin
23966 (method url-fetch)
23967 (uri (pypi-uri "pifpaf" version))
23968 (sha256
23969 (base32
23970 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
23971 (build-system python-build-system)
23972 (arguments
23973 '(#:phases
23974 (modify-phases %standard-phases
23975 (replace 'check
23976 (lambda _
23977 (invoke "python" "setup.py" "testr" "--slowest"
23978 "--testr-args=until-failure"))))))
23979 (propagated-inputs
23980 `(("python-click" ,python-click)
23981 ("python-daiquiri" ,python-daiquiri)
23982 ("python-fixtures" ,python-fixtures)
23983 ("python-jinja2" ,python-jinja2)
23984 ("python-pbr" ,python-pbr)
23985 ("python-psutil" ,python-psutil)
23986 ("python-six" ,python-six)
23987 ("python-xattr" ,python-xattr)))
23988 (native-inputs
23989 `(("python-mock" ,python-mock)
23990 ("python-os-testr" ,python-os-testr)
23991 ("python-requests" ,python-requests)
23992 ("python-testrepository" ,python-testrepository)
23993 ("python-testtools" ,python-testtools)))
23994 (home-page "https://github.com/jd/pifpaf")
23995 (synopsis "Tools and fixtures to manage daemons for testing in Python")
23996 (description "Pifpaf is a suite of fixtures and a command-line tool that
23997 starts and stops daemons for a quick throw-away usage. This is typically
23998 useful when needing these daemons to run integration testing. It originally
23999 evolved from its precursor @code{overtest}.")
24000 (license license:asl2.0)))
24001
24002 (define-public python-pytest-check-links
24003 (package
24004 (name "python-pytest-check-links")
24005 (version "0.3.0")
24006 (source
24007 (origin
24008 (method url-fetch)
24009 ;; URI uses underscores
24010 (uri (pypi-uri "pytest_check_links" version))
24011 (sha256
24012 (base32
24013 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
24014 (build-system python-build-system)
24015 (propagated-inputs
24016 `(("python-docutils" ,python-docutils)
24017 ("python-html5lib" ,python-html5lib)
24018 ("python-nbconvert" ,python-nbconvert)
24019 ("python-nbformat" ,python-nbformat)
24020 ("python-pytest" ,python-pytest)
24021 ("python-six" ,python-six)))
24022 (native-inputs
24023 `(("python-pbr-minimal" ,python-pbr-minimal)))
24024 (home-page "https://github.com/minrk/pytest-check-links")
24025 (synopsis "Check links in files")
24026 (description "This package provides a pytest plugin that checks URLs for
24027 HTML-containing files.")
24028 (license license:bsd-3)))
24029
24030 (define-public python-json5
24031 (package
24032 (name "python-json5")
24033 (version "0.8.5")
24034 (source
24035 (origin
24036 ;; sample.json5 is missing from PyPi source tarball
24037 (method git-fetch)
24038 (uri (git-reference
24039 (url "https://github.com/dpranke/pyjson5")
24040 (commit (string-append "v" version))))
24041 (file-name (git-file-name name version))
24042 (sha256
24043 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
24044 (build-system python-build-system)
24045 (home-page "https://github.com/dpranke/pyjson5")
24046 (synopsis
24047 "Python implementation of the JSON5 data format")
24048 (description
24049 "JSON5 extends the JSON data interchange format to make it slightly more
24050 usable as a configuration language. This Python package implements parsing and
24051 dumping of JSON5 data structures.")
24052 (license license:asl2.0)))
24053
24054 (define-public python-frozendict
24055 (package
24056 (name "python-frozendict")
24057 (version "1.2")
24058 (source
24059 (origin
24060 (method url-fetch)
24061 (uri (pypi-uri "frozendict" version))
24062 (sha256
24063 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
24064 (build-system python-build-system)
24065 (home-page "https://github.com/slezica/python-frozendict")
24066 (synopsis "Simple immutable mapping for Python")
24067 (description
24068 "@dfn{frozendict} is an immutable wrapper around dictionaries that
24069 implements the complete mapping interface. It can be used as a drop-in
24070 replacement for dictionaries where immutability is desired.")
24071 (license license:expat)))
24072
24073 (define-public python-unpaddedbase64
24074 (package
24075 (name "python-unpaddedbase64")
24076 (version "1.1.0")
24077 (source
24078 (origin
24079 (method git-fetch)
24080 (uri (git-reference
24081 (url "https://github.com/matrix-org/python-unpaddedbase64")
24082 (commit (string-append "v" version))))
24083 (file-name (git-file-name name version))
24084 (sha256
24085 (base32
24086 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
24087 (build-system python-build-system)
24088 (home-page "https://pypi.org/project/unpaddedbase64/")
24089 (synopsis "Encode and decode Base64 without “=” padding")
24090 (description
24091 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
24092 using “=” characters. However this conveys no benefit so many protocols
24093 choose to use Base64 without the “=” padding.")
24094 (license license:asl2.0)))
24095
24096 (define-public python-py-cpuinfo
24097 (package
24098 (name "python-py-cpuinfo")
24099 (version "5.0.0")
24100 (source
24101 (origin
24102 (method url-fetch)
24103 (uri (pypi-uri "py-cpuinfo" version))
24104 (sha256
24105 (base32
24106 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
24107 (build-system python-build-system)
24108 (home-page "https://github.com/workhorsy/py-cpuinfo")
24109 (synopsis "Get CPU info with Python")
24110 (description
24111 "This Python module returns the CPU info by using the best sources of
24112 information for your operating system.")
24113 (license license:expat)))
24114
24115 (define-public python-canonicaljson
24116 (package
24117 (name "python-canonicaljson")
24118 (version "1.4.0")
24119 (source
24120 (origin
24121 (method url-fetch)
24122 (uri (pypi-uri "canonicaljson" version))
24123 (sha256
24124 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
24125 (build-system python-build-system)
24126 (propagated-inputs
24127 `(("python-six" ,python-six)
24128 ("python-frozendict" ,python-frozendict)
24129 ("python-simplejson" ,python-simplejson)))
24130 (home-page "https://github.com/matrix-org/python-canonicaljson")
24131 (synopsis "Canonical JSON")
24132 (description
24133 "Deterministically encode JSON.
24134
24135 @itemize
24136 @item Encodes objects and arrays as RFC 7159 JSON.
24137 @item Sorts object keys so that you get the same result each time.
24138 @item Has no insignificant whitespace to make the output as small as possible.
24139 @item Escapes only the characters that must be escaped, U+0000 to
24140 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
24141 @item Uses the shortest escape sequence for each escaped character.
24142 @item Encodes the JSON as UTF-8.
24143 @item Can encode frozendict immutable dictionaries.
24144 @end itemize")
24145 (license license:asl2.0)))
24146
24147 (define-public python-signedjson
24148 (package
24149 (name "python-signedjson")
24150 (version "1.1.1")
24151 (source
24152 (origin
24153 (method url-fetch)
24154 (uri (pypi-uri "signedjson" version))
24155 (sha256
24156 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
24157 (build-system python-build-system)
24158 (propagated-inputs
24159 `(("python-canonicaljson" ,python-canonicaljson)
24160 ("python-importlib-metadata" ,python-importlib-metadata)
24161 ("python-pynacl" ,python-pynacl)
24162 ("python-typing-extensions" ,python-typing-extensions)
24163 ("python-unpaddedbase64" ,python-unpaddedbase64)))
24164 (native-inputs
24165 `(("python-setuptools-scm" ,python-setuptools-scm)))
24166 (home-page "https://github.com/matrix-org/python-signedjson")
24167 (synopsis "Sign JSON objects with ED25519 signatures")
24168 (description
24169 "Sign JSON objects with ED25519 signatures.
24170
24171 @itemize
24172 @item More than one entity can sign the same object.
24173 @item Each entity can sign the object with more than one key making it easier to
24174 rotate keys
24175 @item ED25519 can be replaced with a different algorithm.
24176 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
24177 key.
24178 @end itemize")
24179 (license license:asl2.0)))
24180
24181 (define-public python-daemonize
24182 (package
24183 (name "python-daemonize")
24184 (version "2.5.0")
24185 (source
24186 (origin
24187 (method url-fetch)
24188 (uri (pypi-uri "daemonize" version))
24189 (sha256
24190 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
24191 (build-system python-build-system)
24192 (home-page "https://github.com/thesharp/daemonize")
24193 (synopsis "Library for writing system daemons in Python")
24194 (description "Daemonize is a library for writing system daemons in Python.")
24195 (license license:expat)))
24196
24197 (define-public python-pymacaroons
24198 (package
24199 (name "python-pymacaroons")
24200 (version "0.13.0")
24201 (source
24202 (origin
24203 (method url-fetch)
24204 (uri (pypi-uri "pymacaroons" version))
24205 (sha256
24206 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
24207 (build-system python-build-system)
24208 (propagated-inputs
24209 `(("python-six" ,python-six)
24210 ("python-pynacl" ,python-pynacl)))
24211 (home-page "https://github.com/ecordell/pymacaroons")
24212 (synopsis "Python Macaroon Library")
24213 (description
24214 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
24215 tokens, macaroons embed caveats that define specific authorization
24216 requirements for the target service, the service that issued the root macaroon
24217 and which is capable of verifying the integrity of macaroons it receives.
24218
24219 Macaroons allow for delegation and attenuation of authorization. They are
24220 simple and fast to verify, and decouple authorization policy from the
24221 enforcement of that policy.")
24222 (license license:expat)))
24223
24224 (define-public python-ldap3
24225 (package
24226 (name "python-ldap3")
24227 (version "2.7")
24228 (home-page "https://github.com/cannatag/ldap3")
24229 (source
24230 (origin
24231 (method git-fetch)
24232 (uri (git-reference (url home-page)
24233 (commit (string-append "v" version))))
24234 (file-name (git-file-name name version))
24235 (sha256
24236 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
24237 (build-system python-build-system)
24238 (arguments
24239 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
24240 #:phases (modify-phases %standard-phases
24241 (replace 'check
24242 (lambda* (#:key tests? #:allow-other-keys)
24243 (when tests?
24244 (invoke "nosetests" "-s" "test"))
24245 #t)))))
24246 (native-inputs
24247 `(("python-nose" ,python-nose)))
24248 (propagated-inputs
24249 `(("python-gssapi" ,python-gssapi)
24250 ("python-pyasn1" ,python-pyasn1)))
24251 (synopsis "Python LDAP client")
24252 (description
24253 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
24254 library.")
24255 (license license:lgpl3+)))
24256
24257 (define-public python-boltons
24258 (package
24259 (name "python-boltons")
24260 (version "20.0.0")
24261 (source
24262 (origin
24263 (method url-fetch)
24264 (uri (pypi-uri "boltons" version))
24265 (sha256
24266 (base32
24267 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
24268 (build-system python-build-system)
24269 (home-page "https://github.com/mahmoud/boltons")
24270 (synopsis "Extensions to the Python standard library")
24271 (description
24272 "Boltons is a set of over 230 pure-Python utilities in the same spirit
24273 as — and yet conspicuously missing from — the standard library, including:
24274
24275 @itemize
24276 @item Atomic file saving, bolted on with fileutils
24277 @item A highly-optimized OrderedMultiDict, in dictutils
24278 @item Two types of PriorityQueue, in queueutils
24279 @item Chunked and windowed iteration, in iterutils
24280 @item Recursive data structure iteration and merging, with iterutils.remap
24281 @item Exponential backoff functionality, including jitter, through
24282 iterutils.backoff
24283 @item A full-featured TracebackInfo type, for representing stack traces, in
24284 tbutils
24285 @end itemize")
24286 (license license:bsd-3)))
24287
24288 (define-public python-eliot
24289 (package
24290 (name "python-eliot")
24291 (version "1.12.0")
24292 (source
24293 (origin
24294 (method url-fetch)
24295 (uri (pypi-uri "eliot" version))
24296 (sha256
24297 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
24298 (build-system python-build-system)
24299 (arguments
24300 `(#:phases
24301 (modify-phases %standard-phases
24302 (add-after 'unpack 'remove-journald-support
24303 (lambda _
24304 (for-each delete-file
24305 '("eliot/tests/test_journald.py"
24306 "eliot/journald.py"))
24307 #t))
24308 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
24309 ;; remove command-line tool's tests. TODO eliot-prettyprint should
24310 ;; be installed and these tests should pass.
24311 (lambda _
24312 (delete-file "eliot/tests/test_prettyprint.py")
24313 #t)))))
24314 (propagated-inputs
24315 `(("python-boltons" ,python-boltons)
24316 ("python-pyrsistent" ,python-pyrsistent)
24317 ("python-six" ,python-six)
24318 ("python-zope-interface" ,python-zope-interface)))
24319 (native-inputs
24320 `(("python-black" ,python-black)
24321 ("python-coverage" ,python-coverage)
24322 ("python-dask" ,python-dask)
24323 ("python-flake8" ,python-flake8)
24324 ("python-hypothesis" ,python-hypothesis)
24325 ("python-pytest" ,python-pytest)
24326 ("python-setuptools" ,python-setuptools)
24327 ("python-sphinx" ,python-sphinx)
24328 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24329 ("python-testtools" ,python-testtools)
24330 ("python-twine" ,python-twine)
24331 ("python-twisted" ,python-twisted)))
24332 (home-page "https://github.com/itamarst/eliot/")
24333 (synopsis "Eliot: the logging system that tells you why it happened")
24334 (description
24335 "@dfn{eliot} is a Python logging system that outputs causal chains of
24336 actions: actions can spawn other actions, and eventually they either succeed
24337 or fail. The resulting logs tell you the story of what your software did: what
24338 happened, and what caused it.")
24339 (license license:asl2.0)))
24340
24341 (define-public python-pem
24342 (package
24343 (name "python-pem")
24344 (version "20.1.0")
24345 (source
24346 (origin
24347 (method url-fetch)
24348 (uri (pypi-uri "pem" version))
24349 (sha256
24350 (base32
24351 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
24352 (build-system python-build-system)
24353 (native-inputs
24354 `(("python-certifi" ,python-certifi)
24355 ("python-coverage" ,python-coverage)
24356 ("python-pretend" ,python-pretend)
24357 ("python-pyopenssl" ,python-pyopenssl)
24358 ("python-pytest" ,python-pytest)
24359 ("python-sphinx" ,python-sphinx)
24360 ("python-twisted" ,python-twisted)))
24361 (home-page "https://pem.readthedocs.io/")
24362 (synopsis "Easy PEM file parsing in Python")
24363 (description
24364 "This package provides a Python module for parsing and splitting PEM files.")
24365 (license license:expat)))
24366
24367 (define-public python-txsni
24368 ;; We need a few commits on top of 0.1.9 for compatibility with newer
24369 ;; Python and OpenSSL.
24370 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
24371 (revision "0"))
24372 (package
24373 (name "python-txsni")
24374 (version (git-version "0.1.9" revision commit))
24375 (home-page "https://github.com/glyph/txsni")
24376 (source
24377 (origin
24378 (method git-fetch)
24379 (uri (git-reference (url home-page) (commit commit)))
24380 (file-name (git-file-name name version))
24381 (sha256
24382 (base32
24383 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
24384 (build-system python-build-system)
24385 (propagated-inputs
24386 `(("python-pyopenssl" ,python-pyopenssl)
24387 ("python-service-identity" ,python-service-identity)
24388 ("python-twisted" ,python-twisted)))
24389 (synopsis "Run TLS servers with Twisted")
24390 (description
24391 "This package provides an easy-to-use SNI endpoint for use
24392 with the Twisted web framework.")
24393 (license license:expat))))
24394
24395 (define-public python-txacme
24396 (package
24397 (name "python-txacme")
24398 (version "0.9.2")
24399 (source
24400 (origin
24401 (method url-fetch)
24402 (uri (pypi-uri "txacme" version))
24403 (sha256
24404 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
24405 (build-system python-build-system)
24406 (propagated-inputs
24407 `(("python-acme" ,python-acme)
24408 ("python-attrs" ,python-attrs)
24409 ("python-eliot" ,python-eliot)
24410 ("python-josepy" ,python-josepy)
24411 ("python-pem" ,python-pem)
24412 ("python-treq" ,python-treq)
24413 ("python-twisted" ,python-twisted)
24414 ("python-txsni" ,python-txsni)))
24415 (native-inputs
24416 `(("python-fixtures" ,python-fixtures)
24417 ("python-hypothesis" ,python-hypothesis)
24418 ("python-mock" ,python-mock)
24419 ("python-service-identity"
24420 ,python-service-identity)
24421 ("python-testrepository" ,python-testrepository)
24422 ("python-testscenarios" ,python-testscenarios)
24423 ("python-testtools" ,python-testtools)))
24424 (home-page "https://github.com/twisted/txacme")
24425 (synopsis "Twisted implexmentation of the ACME protocol")
24426 (description
24427 "ACME is Automatic Certificate Management Environment, a protocol that
24428 allows clients and certificate authorities to automate verification and
24429 certificate issuance. The ACME protocol is used by the free Let's Encrypt
24430 Certificate Authority.
24431
24432 txacme is an implementation of the protocol for Twisted, the event-driven
24433 networking engine for Python.")
24434 (license license:expat)))
24435
24436 (define-public python-pysaml2
24437 (package
24438 (name "python-pysaml2")
24439 (version "6.5.1")
24440 (source
24441 (origin
24442 (method url-fetch)
24443 (uri (pypi-uri "pysaml2" version))
24444 (sha256
24445 (base32
24446 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
24447 (build-system python-build-system)
24448 (propagated-inputs
24449 `(("python-cryptography" ,python-cryptography)
24450 ("python-dateutil" ,python-dateutil)
24451 ("python-defusedxml" ,python-defusedxml)
24452 ("python-importlib-resources"
24453 ,python-importlib-resources)
24454 ("python-pyopenssl" ,python-pyopenssl)
24455 ("python-pytz" ,python-pytz)
24456 ("python-requests" ,python-requests)
24457 ("python-six" ,python-six)
24458 ("python-xmlschema" ,python-xmlschema)))
24459 (home-page "https://idpy.org")
24460 (synopsis "Python implementation of SAML Version 2 Standard")
24461 (description
24462 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
24463 It contains all necessary pieces for building a SAML2 service provider or
24464 an identity provider. The distribution contains examples of both.
24465
24466 This package was originally written to work in a WSGI environment, but
24467 there are extensions that allow you to use it with other frameworks.")
24468 (license license:asl2.0)))
24469
24470 (define-public python-click-plugins
24471 (package
24472 (name "python-click-plugins")
24473 (version "1.1.1")
24474 (source
24475 (origin
24476 (method url-fetch)
24477 (uri (pypi-uri "click-plugins" version))
24478 (sha256
24479 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
24480 (build-system python-build-system)
24481 (native-inputs
24482 `(("python-pytest" ,python-pytest)))
24483 (propagated-inputs
24484 `(("python-click" ,python-click)))
24485 (synopsis "Extension for Click to register external CLI commands")
24486 (description "This package provides n extension module for Click to
24487 register external CLI commands via setuptools entry-points.")
24488 (home-page "https://github.com/click-contrib/click-plugins")
24489 (license license:bsd-3)))
24490
24491 (define-public python-diceware
24492 (package
24493 (name "python-diceware")
24494 (version "0.9.6")
24495 (source
24496 (origin
24497 (method url-fetch)
24498 (uri (pypi-uri "diceware" version))
24499 (sha256
24500 (base32
24501 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
24502 (build-system python-build-system)
24503 (native-inputs
24504 `(("python-coverage" ,python-coverage)
24505 ("python-pytest" ,python-pytest)
24506 ("python-pytest-runner" ,python-pytest-runner)))
24507 (home-page "https://github.com/ulif/diceware/")
24508 (synopsis "Generates memorable passphrases")
24509 (description "This package generates passphrases by concatenating words
24510 randomly picked from wordlists. It supports several sources of
24511 randomness (including real life dice) and different wordlists (including
24512 cryptographically signed ones).")
24513 (license license:gpl3+)))
24514
24515 (define-public python-dictdiffer
24516 (package
24517 (name "python-dictdiffer")
24518 (version "0.8.1")
24519 (source (origin
24520 (method url-fetch)
24521 (uri (pypi-uri "dictdiffer" version))
24522 (sha256
24523 (base32
24524 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
24525 (build-system python-build-system)
24526 (native-inputs
24527 `(("python-check-manifest" ,python-check-manifest)
24528 ("python-coverage" ,python-coverage)
24529 ("python-isort" ,python-isort)
24530 ("python-mock" ,python-mock)
24531 ("python-pydoctstyle" ,python-pydocstyle)
24532 ("python-pytest-cache" ,python-pytest-cache)
24533 ("python-pytest-cov" ,python-pytest-cov)
24534 ("python-pytest-pep8" ,python-pytest-pep8)
24535 ("python-pytest-runner" ,python-pytest-runner)
24536 ("python-pytest" ,python-pytest)
24537 ("python-setuptools-scm" ,python-setuptools-scm)
24538 ("python-tox" ,python-tox)))
24539 (home-page "https://github.com/inveniosoftware/dictdiffer")
24540 (synopsis "Diff and patch Python dictionary objects")
24541 (description
24542 "Dictdiffer is a Python module that helps you to diff and patch
24543 dictionaries.")
24544 (license license:expat)))
24545
24546 (define-public pyzo
24547 (package
24548 (name "pyzo")
24549 (version "4.11.2")
24550 (source
24551 (origin
24552 (method url-fetch)
24553 (uri (pypi-uri "pyzo" version))
24554 (sha256
24555 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
24556 (build-system python-build-system)
24557 (arguments
24558 `(#:phases
24559 (modify-phases %standard-phases
24560 (add-before 'check 'fix-home-directory
24561 (lambda _
24562 ;; Tests fail with "Permission denied: '/homeless-shelter'".
24563 (setenv "HOME" "/tmp")
24564 #t)))
24565 ;; Tests fail with "Uncaught Python exception: python: undefined
24566 ;; symbol: objc_getClass".
24567 #:tests? #f))
24568 (propagated-inputs
24569 `(("python-pyqt" ,python-pyqt)))
24570 (home-page "https://pyzo.org")
24571 (synopsis
24572 "Python IDE for scientific computing")
24573 (description
24574 "Pyzo is a Python IDE focused on interactivity and introspection,
24575 which makes it very suitable for scientific computing. Its practical
24576 design is aimed at simplicity and efficiency.
24577
24578 It consists of two main components, the editor and the shell, and uses
24579 a set of pluggable tools to help the programmer in various ways. Some
24580 example tools are source structure, project manager, interactive help,
24581 workspace...")
24582 (license license:bsd-2)))
24583
24584 (define-public python-osc
24585 (package
24586 (name "python-osc")
24587 (version "1.7.4")
24588 (source
24589 (origin
24590 (method url-fetch)
24591 (uri (pypi-uri "python-osc" version))
24592 (sha256
24593 (base32
24594 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
24595 (build-system python-build-system)
24596 (home-page "https://github.com/attwad/python-osc")
24597 (synopsis "Open Sound Control server and client implementations")
24598 (description
24599 "@code{python-osc} is a pure Python library with no external
24600 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
24601 Open Sound Control 1.0} specification.")
24602 (license license:unlicense)))
24603
24604 (define-public python-voluptuous
24605 (package
24606 (name "python-voluptuous")
24607 (version "0.11.7")
24608 (source
24609 (origin
24610 (method url-fetch)
24611 (uri (pypi-uri "voluptuous" version))
24612 (sha256
24613 (base32
24614 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
24615 (build-system python-build-system)
24616 (native-inputs
24617 `(("python-nose" ,python-nose)))
24618 (home-page "https://github.com/alecthomas/voluptuous")
24619 (synopsis "Python data validation library")
24620 (description
24621 "Voluptuous is a Python data validation library. It is primarily
24622 intended for validating data coming into Python as JSON, YAML, etc.")
24623 (license license:bsd-3)))
24624
24625 (define-public python-cmd2
24626 (package
24627 (name "python-cmd2")
24628 (version "1.0.2")
24629 (source
24630 (origin
24631 (method url-fetch)
24632 (uri (pypi-uri "cmd2" version))
24633 (sha256
24634 (base32
24635 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
24636 (build-system python-build-system)
24637 (propagated-inputs
24638 `(("python-attrs" ,python-attrs)
24639 ("python-colorama" ,python-colorama)
24640 ("python-pyperclip" ,python-pyperclip)
24641 ("python-wcwidth" ,python-wcwidth)))
24642 (native-inputs
24643 `(("python-codecov" ,python-codecov)
24644 ("python-coverage" ,python-coverage)
24645 ("python-doc8" ,python-doc8)
24646 ("python-flake8" ,python-flake8)
24647 ("python-invoke" ,python-invoke)
24648 ("python-mock" ,python-mock)
24649 ("python-pytest" ,python-pytest)
24650 ("python-pytest-cov" ,python-pytest-cov)
24651 ("python-pytest-mock" ,python-pytest-mock)
24652 ("python-setuptools-scm" ,python-setuptools-scm)
24653 ("python-sphinx" ,python-sphinx)
24654 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
24655 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24656 ("python-tox" ,python-tox)
24657 ("python-twine" ,python-twine)
24658 ("which" ,which)))
24659 (home-page "https://github.com/python-cmd2/cmd2")
24660 (synopsis "Tool for building interactive command line applications")
24661 (description
24662 "Cmd2 is a tool for building interactive command line applications in
24663 Python. Its goal is to make it quick and easy for developers to build
24664 feature-rich and user-friendly interactive command line applications. It
24665 provides a simple API which is an extension of Python's built-in @code{cmd}
24666 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
24667 make your life easier and eliminates much of the boilerplate code which would
24668 be necessary when using @code{cmd}.")
24669 (license license:expat)))
24670
24671 (define-public python-pytidylib
24672 (package
24673 (name "python-pytidylib")
24674 (version "0.3.2")
24675 (source (origin
24676 (method url-fetch)
24677 (uri (pypi-uri "pytidylib" version))
24678 (sha256
24679 (base32
24680 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
24681 (build-system python-build-system)
24682 (arguments
24683 '(#:phases
24684 (modify-phases %standard-phases
24685 (add-before 'build 'qualify-libtidy
24686 (lambda* (#:key inputs #:allow-other-keys)
24687 (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
24688 (substitute* "tidylib/tidy.py"
24689 (("ctypes\\.util\\.find_library\\('tidy'\\)")
24690 (format #f "'~a'" libtidy)))
24691 #t))))))
24692 (inputs `(("tidy" ,tidy)))
24693 (home-page "https://github.com/countergram/pytidylib")
24694 (synopsis "Python wrapper for HTML Tidy library")
24695 (description
24696 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
24697 allows you, from Python code, to “fix” invalid (X)HTML markup.")
24698 (license license:expat)))
24699
24700 (define-public python2-pytidylib
24701 (package-with-python2 python-pytidylib))
24702
24703 (define-public python-mujson
24704 (package
24705 (name "python-mujson")
24706 (version "1.4")
24707 (source
24708 (origin
24709 (method url-fetch)
24710 (uri (pypi-uri "mujson" version))
24711 (sha256
24712 (base32
24713 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
24714 (build-system python-build-system)
24715 (home-page "https://github.com/mattgiles/mujson")
24716 (synopsis "Use the fastest JSON functions available at import time")
24717 (description "This package selects the fastest JSON functions available
24718 at import time.")
24719 (license license:expat)))
24720
24721 (define-public python-bashlex
24722 (package
24723 (name "python-bashlex")
24724 (version "0.14")
24725 (source
24726 (origin
24727 (method url-fetch)
24728 (uri (pypi-uri "bashlex" version))
24729 (sha256
24730 (base32
24731 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
24732 (build-system python-build-system)
24733 (arguments
24734 `(#:phases
24735 (modify-phases %standard-phases
24736 (add-before 'build 'pregenerate-yacc-tables
24737 (lambda _
24738 ;; parser.py caches tables, which attempts to write to site lib
24739 ;; see https://github.com/idank/bashlex/issues/51
24740 (invoke "python" "-c" "import bashlex"))))))
24741 (home-page
24742 "https://github.com/idank/bashlex")
24743 (synopsis "Python parser for bash")
24744 (description "@code{bashlex} is a Python port of the parser used
24745 internally by GNU bash.
24746
24747 For the most part it's transliterated from C, the major differences are:
24748
24749 @itemize
24750 @item it does not execute anything
24751 @item it is reentrant
24752 @item it generates a complete AST
24753 @end itemize
24754 ")
24755 (license license:gpl3+)))
24756
24757 (define-public python-jinxed
24758 (package
24759 (name "python-jinxed")
24760 (version "1.0.0")
24761 (source
24762 (origin
24763 (method url-fetch)
24764 (uri (pypi-uri "jinxed" version))
24765 (sha256
24766 (base32
24767 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
24768 (build-system python-build-system)
24769 (arguments
24770 '(#:phases
24771 (modify-phases %standard-phases
24772 (add-before 'check 'set-environment-variables
24773 (lambda* (#:key inputs #:allow-other-keys)
24774 (let ((ncurses (assoc-ref inputs "ncurses")))
24775 (setenv "TERM" "LINUX")
24776 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
24777 #t))))
24778 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
24779 (native-inputs
24780 `(("ncurses" ,ncurses)))
24781 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
24782 (synopsis "Jinxed Terminal Library")
24783 (description
24784 "Jinxed is an implementation of a subset of the Python curses library.")
24785 (license license:mpl2.0)))
24786
24787 (define-public python-svgutils
24788 (package
24789 (name "python-svgutils")
24790 (version "0.3.4")
24791 (source
24792 (origin
24793 (method url-fetch)
24794 (uri (pypi-uri "svgutils" version))
24795 (sha256
24796 (base32
24797 "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
24798 (build-system python-build-system)
24799 (propagated-inputs
24800 `(("python-lxml" ,python-lxml)))
24801 (home-page "https://svgutils.readthedocs.io")
24802 (synopsis "Python SVG editor")
24803 (description "This is an utility package that helps with editing and
24804 concatenating SVG files. It is especially directed at scientists preparing
24805 final figures for submission to journals. So far it supports arbitrary
24806 placement and scaling of SVG figures and adding markers, such as labels.")
24807 (license license:expat)))
24808
24809 (define-public python-blessed
24810 (package
24811 (name "python-blessed")
24812 (version "1.17.8")
24813 (source
24814 (origin
24815 (method url-fetch)
24816 (uri (pypi-uri "blessed" version))
24817 (sha256
24818 (base32
24819 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
24820 (modules '((guix build utils)))
24821 (snippet
24822 '(begin
24823 ;; Don't get hung up on Windows test failures.
24824 (delete-file "blessed/win_terminal.py") #t))))
24825 (build-system python-build-system)
24826 (propagated-inputs
24827 `(("python-jinxed" ,python-jinxed)
24828 ("python-six" ,python-six)
24829 ("python-wcwidth" ,python-wcwidth)))
24830 (native-inputs
24831 `(("python-mock" ,python-mock)
24832 ("python-pytest" ,python-pytest)))
24833 (home-page "https://github.com/jquast/blessed")
24834 (synopsis "Wrapper around terminal capabilities")
24835 (description
24836 "Blessed is a thin, practical wrapper around terminal styling, screen
24837 positioning, and keyboard input.")
24838 (license license:expat)))
24839
24840 (define-public python-readme-renderer
24841 (package
24842 (name "python-readme-renderer")
24843 (version "26.0")
24844 (source
24845 (origin
24846 (method url-fetch)
24847 (uri (pypi-uri "readme_renderer" version))
24848 (sha256
24849 (base32
24850 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
24851 (build-system python-build-system)
24852 (propagated-inputs
24853 `(("python-bleach" ,python-bleach)
24854 ("python-docutils" ,python-docutils)
24855 ("python-pygments" ,python-pygments)
24856 ("python-six" ,python-six)))
24857 (native-inputs
24858 `(("python-mock" ,python-mock)
24859 ("python-pytest" ,python-pytest)))
24860 (home-page "https://github.com/pypa/readme_renderer")
24861 (synopsis "Render README files in Warehouse")
24862 (description
24863 "Readme Renderer is a library that will safely render arbitrary README
24864 files into HTML. It is designed to be used in Warehouse to render the
24865 @code{long_description} for packages. It can handle Markdown, reStructuredText,
24866 and plain text.")
24867 (license license:asl2.0)))
24868
24869 (define-public python-lazr-delegates
24870 (package
24871 (name "python-lazr-delegates")
24872 (version "2.0.4")
24873 (source
24874 (origin
24875 (method url-fetch)
24876 (uri (pypi-uri "lazr.delegates" version))
24877 (sha256
24878 (base32
24879 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
24880 (build-system python-build-system)
24881 (arguments
24882 '(#:phases
24883 (modify-phases %standard-phases
24884 (replace 'check
24885 (lambda _
24886 (invoke "python" "setup.py" "nosetests"))))))
24887 (native-inputs
24888 `(("python-nose" ,python-nose)))
24889 (propagated-inputs
24890 `(("python-zope-interface" ,python-zope-interface)))
24891 (home-page "https://launchpad.net/lazr.delegates")
24892 (synopsis "Easily write objects that delegate behavior")
24893 (description
24894 "The @code{lazr.delegates} package makes it easy to write objects that
24895 delegate behavior to another object. The new object adds some property or
24896 behavior on to the other object, while still providing the underlying interface,
24897 and delegating behavior.")
24898 (license license:lgpl3)))
24899
24900 (define-public python-lazr-config
24901 (package
24902 (name "python-lazr-config")
24903 (version "2.2.2")
24904 (source
24905 (origin
24906 (method url-fetch)
24907 (uri (pypi-uri "lazr.config" version))
24908 (sha256
24909 (base32
24910 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
24911 (build-system python-build-system)
24912 (arguments
24913 '(#:phases
24914 (modify-phases %standard-phases
24915 (replace 'check
24916 (lambda _
24917 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
24918 (native-inputs
24919 `(("python-nose" ,python-nose)))
24920 (propagated-inputs
24921 `(("python-lazr-delegates" ,python-lazr-delegates)
24922 ("python-zope-interface" ,python-zope-interface)))
24923 (home-page "https://launchpad.net/lazr.config")
24924 (synopsis "Create configuration schemas and process and validate configurations")
24925 (description
24926 "The LAZR config system is typically used to manage process configuration.
24927 Process configuration is for saying how things change when we run systems on
24928 different machines, or under different circumstances. This system uses ini-like
24929 file format of section, keys, and values. The config file supports inheritance
24930 to minimize duplication of information across files. The format supports schema
24931 validation.")
24932 (license license:lgpl3)))
24933
24934 (define-public python-flufl-bounce
24935 (package
24936 (name "python-flufl-bounce")
24937 (version "3.0.1")
24938 (source
24939 (origin
24940 (method url-fetch)
24941 (uri (pypi-uri "flufl.bounce" version))
24942 (sha256
24943 (base32
24944 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
24945 (build-system python-build-system)
24946 (propagated-inputs
24947 `(("python-atpublic" ,python-atpublic)
24948 ("python-zope-interface" ,python-zope-interface)))
24949 (native-inputs
24950 `(("python-nose2" ,python-nose2)))
24951 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
24952 (synopsis "Email bounce detectors")
24953 (description "The @code{flufl.bounce} library provides a set of heuristics
24954 and an API for detecting the original bouncing email addresses from a bounce
24955 message. Many formats found in the wild are supported, as are VERP and
24956 RFC 3464.")
24957 (license (list license:asl2.0
24958 license:lgpl3)))) ; only for setup_headers.py
24959
24960 (define-public python-flufl-i18n
24961 (package
24962 (name "python-flufl-i18n")
24963 (version "3.0")
24964 (source
24965 (origin
24966 (method url-fetch)
24967 (uri (pypi-uri "flufl.i18n" version))
24968 (sha256
24969 (base32
24970 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
24971 (build-system python-build-system)
24972 (propagated-inputs
24973 `(("python-atpublic" ,python-atpublic)))
24974 (home-page "https://flufli18n.readthedocs.io")
24975 (synopsis "API for Python internationalization")
24976 (description
24977 "This package provides a high-level, convenient API for managing
24978 internationalization/translation contexts in Python applications. There is a
24979 simple API for single-context applications, such as command line scripts which
24980 only need to translate into one language during the entire course of their
24981 execution. There is a more flexible, but still convenient API for multi-context
24982 applications, such as servers, which may need to switch language contexts for
24983 different tasks.")
24984 (license license:asl2.0)))
24985
24986 (define-public python-flufl-lock
24987 (package
24988 (name "python-flufl-lock")
24989 (version "4.0")
24990 (source
24991 (origin
24992 (method url-fetch)
24993 (uri (pypi-uri "flufl.lock" version))
24994 (sha256
24995 (base32
24996 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
24997 (build-system python-build-system)
24998 (propagated-inputs
24999 `(("python-atpublic" ,python-atpublic)
25000 ("python-psutil" ,python-psutil)))
25001 (home-page "https://flufllock.readthedocs.io")
25002 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
25003 (description
25004 "The @dfn{flufl.lock} package provides NFS-safe file locking with
25005 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
25006 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
25007 and have a maximum lifetime built-in.")
25008 (license (list license:asl2.0
25009 license:lgpl3)))) ; only for setup_helpers.py
25010
25011 (define-public python-flufl-testing
25012 (package
25013 (name "python-flufl-testing")
25014 (version "0.8")
25015 (source
25016 (origin
25017 (method url-fetch)
25018 (uri (pypi-uri "flufl.testing" version))
25019 (sha256
25020 (base32
25021 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
25022 (build-system python-build-system)
25023 (native-inputs
25024 `(("python-nose2" ,python-nose2)))
25025 (home-page "https://gitlab.com/warsaw/flufl.testing")
25026 (synopsis "Collection of test tool plugins")
25027 (description
25028 "This package contains a small collection of test tool plugins for
25029 @code{nose2} and @code{flake8}.")
25030 (license license:asl2.0)))
25031
25032 (define-public python-devtools
25033 (package
25034 (name "python-devtools")
25035 (version "0.6")
25036 (source
25037 (origin
25038 (method git-fetch)
25039 (uri (git-reference
25040 (url "https://github.com/samuelcolvin/python-devtools")
25041 (commit (string-append "v" version))))
25042 (file-name (git-file-name name version))
25043 (sha256
25044 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
25045 (build-system python-build-system)
25046 (native-inputs
25047 `(("python-pytest" ,python-pytest)
25048 ("python-pytest-mock" ,python-pytest-mock)))
25049 (propagated-inputs
25050 `(("python-pygments" ,python-pygments)))
25051 (arguments
25052 `(#:phases (modify-phases %standard-phases
25053 (replace 'check
25054 (lambda _
25055 (invoke "pytest")
25056 #t)))))
25057 (home-page "https://github.com/samuelcolvin/python-devtools")
25058 (synopsis "Debug command and development tools")
25059 (description
25060 "This package provides a debug print command and other development tools.
25061 It adds a simple and readable way to print stuff during development.")
25062 (license license:expat)))
25063
25064 (define-public python-dateparser
25065 (package
25066 (name "python-dateparser")
25067 (version "0.7.6")
25068 (source
25069 (origin
25070 (method url-fetch)
25071 (uri (pypi-uri "dateparser" version))
25072 (sha256
25073 (base32
25074 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
25075 (build-system python-build-system)
25076 (propagated-inputs
25077 `(("python-dateutil" ,python-dateutil)
25078 ("python-pytz" ,python-pytz)
25079 ("python-regex" ,python-regex)
25080 ("python-ruamel.yaml" ,python-ruamel.yaml)
25081 ("python-tzlocal" ,python-tzlocal)))
25082 (native-inputs
25083 `(("python-mock" ,python-mock)
25084 ("python-parameterized" ,python-parameterized)
25085 ("tzdata" ,tzdata-for-tests)))
25086 (arguments
25087 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
25088 #:tests? #f
25089 #:phases
25090 (modify-phases %standard-phases
25091 (add-before 'check 'set-check-environment
25092 (lambda* (#:key inputs #:allow-other-keys)
25093 (setenv "TZ" "UTC")
25094 (setenv "TZDIR"
25095 (search-input-directory inputs
25096 "share/zoneinfo")))))))
25097 (home-page "https://github.com/scrapinghub/dateparser")
25098 (synopsis
25099 "Date parsing library designed to parse dates from HTML pages")
25100 (description
25101 "@code{python-dateparser} provides modules to easily parse localized
25102 dates in almost any string formats commonly found on web pages.")
25103 (license license:bsd-3)))
25104
25105 (define-public python-dparse
25106 (package
25107 (name "python-dparse")
25108 (version "0.5.1")
25109 (source
25110 (origin
25111 (method url-fetch)
25112 (uri (pypi-uri "dparse" version))
25113 (sha256
25114 (base32
25115 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
25116 (build-system python-build-system)
25117 (native-inputs
25118 `(("python-pytest" ,python-pytest)))
25119 (propagated-inputs
25120 `(("python-packaging" ,python-packaging)
25121 ("python-pyyaml" ,python-pyyaml)
25122 ("python-toml" ,python-toml)))
25123 (home-page "https://github.com/pyupio/dparse")
25124 (synopsis "Parser for Python dependency files")
25125 (description "This package provides a parser for Python dependency files.")
25126 (license license:expat)))
25127
25128 (define-public python-dpath
25129 (package
25130 (name "python-dpath")
25131 (version "2.0.1")
25132 (source
25133 (origin
25134 (method url-fetch)
25135 (uri (pypi-uri "dpath" version))
25136 (sha256
25137 (base32
25138 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
25139 (build-system python-build-system)
25140 (native-inputs
25141 `(("python-hypothesis" ,python-hypothesis)
25142 ("python-mock" ,python-mock)
25143 ("python-nose" ,python-nose)))
25144 (arguments
25145 '(#:phases
25146 (modify-phases %standard-phases
25147 (replace 'check
25148 (lambda* (#:key inputs outputs #:allow-other-keys)
25149 (add-installed-pythonpath inputs outputs)
25150 ;; This invokation is taken from tox.ini.
25151 (invoke "nosetests" "-d" "-v" "tests/"))))))
25152 (home-page "https://github.com/akesterson/dpath-python")
25153 (synopsis "File-system-like pathing and searching for dictionaries")
25154 (description
25155 "@code{python-dpath} is a library for accessing and searching
25156 dictionaries via /slashed/paths ala xpath.
25157
25158 Basically it lets you glob over a dictionary as if it were a file system. It
25159 allows you to specify globs (ala the bash eglob syntax, through some advanced
25160 fnmatch.fnmatch magic) to access dictionary elements, and provides some
25161 facility for filtering those results.")
25162 (license license:expat)))
25163
25164 (define-public python-safety
25165 (package
25166 (name "python-safety")
25167 (version "1.9.0")
25168 (source
25169 (origin
25170 (method url-fetch)
25171 (uri (pypi-uri "safety" version))
25172 (sha256
25173 (base32
25174 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
25175 (build-system python-build-system)
25176 (arguments
25177 `(#:phases
25178 (modify-phases %standard-phases
25179 (add-after 'unpack 'disable-tests
25180 (lambda _
25181 (substitute* "tests/test_safety.py"
25182 ;; requires network
25183 (("def test_check_live") "def _test_check_live"))
25184 #t)))))
25185 (propagated-inputs
25186 `(("python-click" ,python-click)
25187 ("python-dparse" ,python-dparse)
25188 ("python-packaging" ,python-packaging)
25189 ("python-requests" ,python-requests)))
25190 (home-page "https://github.com/pyupio/safety")
25191 (synopsis "Check installed dependencies for known vulnerabilities")
25192 (description "Safety checks installed dependencies for known vulnerabilities.
25193 By default it uses the open Python vulnerability database Safety DB.")
25194 (license license:expat)))
25195
25196 (define-public python-pypandoc
25197 (package
25198 (name "python-pypandoc")
25199 (version "1.5")
25200 (source
25201 (origin
25202 (method url-fetch)
25203 (uri (pypi-uri "pypandoc" version))
25204 (sha256
25205 (base32
25206 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
25207 (build-system python-build-system)
25208 (inputs
25209 `(("pandoc" ,pandoc)
25210 ("pandoc-citeproc" ,pandoc-citeproc)))
25211 (propagated-inputs
25212 `(("wheel" ,python-wheel)))
25213 (native-inputs
25214 `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
25215 texlive-fonts-ec
25216 texlive-hyperref
25217 texlive-oberdiek
25218 texlive-lm
25219 texlive-xcolor)))))
25220 (arguments
25221 `(#:phases
25222 (modify-phases %standard-phases
25223 (add-before 'check 'disable-tests
25224 (lambda _
25225 ;; Disable test requiring network access
25226 (substitute* "tests.py"
25227 (("test_basic_conversion_from_http_url")
25228 "skip_test_basic_conversion_from_http_url"))
25229 #t)))))
25230 (home-page "https://github.com/bebraw/pypandoc")
25231 (synopsis "Python wrapper for pandoc")
25232 (description "pypandoc is a thin Python wrapper around pandoc
25233 and pandoc-citeproc.")
25234 (license license:expat)))
25235
25236 (define-public python-rnc2rng
25237 (package
25238 (name "python-rnc2rng")
25239 (version "2.6.4")
25240 (source
25241 (origin
25242 (method url-fetch)
25243 (uri (pypi-uri "rnc2rng" version))
25244 (sha256
25245 (base32
25246 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
25247 (build-system python-build-system)
25248 (propagated-inputs
25249 `(("python-rply" ,python-rply)))
25250 (arguments
25251 `(#:phases (modify-phases %standard-phases
25252 (replace 'check
25253 (lambda _
25254 (invoke "python" "test.py"))))))
25255 (home-page "https://github.com/djc/rnc2rng")
25256 (synopsis "Convert RELAX NG Compact to regular syntax")
25257 (description
25258 "This package provides the @command{rnc2rng} command-line tool as well as
25259 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
25260 equivalent schemata in the XML-based default RELAX NG syntax.")
25261 (license license:expat)))
25262
25263 (define-public python-telethon
25264 (package
25265 (name "python-telethon")
25266 (version "1.17.5")
25267 (source
25268 (origin
25269 (method git-fetch)
25270 (uri (git-reference
25271 (url "https://github.com/LonamiWebs/Telethon")
25272 (commit (string-append "v" version))))
25273 (file-name (git-file-name name version))
25274 (sha256
25275 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
25276 (build-system python-build-system)
25277 (arguments
25278 '(#:phases
25279 (modify-phases %standard-phases
25280 (replace 'check
25281 (lambda* (#:key tests? #:allow-other-keys)
25282 (when tests?
25283 (invoke "py.test" "-v"))
25284 #t)))))
25285 (propagated-inputs
25286 `(("python-rsa" ,python-rsa)
25287 ("python-pyaes" ,python-pyaes)))
25288 (native-inputs
25289 `(("python-pytest" ,python-pytest)
25290 ("python-pytest-asyncio" ,python-pytest-asyncio)
25291 ("python-pytest-trio" ,python-pytest-trio)))
25292 (home-page "https://docs.telethon.dev")
25293 (synopsis "Full-featured Telegram client library for Python 3")
25294 (description "This library is designed to make it easy to write Python
25295 programs that can interact with Telegram.")
25296 (license license:expat)))
25297
25298 (define-public python-citeproc-py
25299 (package
25300 (name "python-citeproc-py")
25301 (version "0.5.1")
25302 (source
25303 (origin
25304 (method url-fetch)
25305 (uri (pypi-uri "citeproc-py" version))
25306 (sha256
25307 (base32
25308 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
25309 (build-system python-build-system)
25310 (propagated-inputs
25311 `(("python-lxml" ,python-lxml)
25312 ("python-rnc2rng" ,python-rnc2rng)))
25313 (home-page
25314 "https://github.com/brechtm/citeproc-py")
25315 (synopsis "Citations and bibliography formatter")
25316 (description
25317 "Citeproc-py is a CSL processor for Python. It aims to implement the
25318 CSL 1.0.1 specification. citeproc-py can output styled citations and
25319 bibliographies in a number of different output formats. Currently supported
25320 are plain text, reStructuredText and HTML.")
25321 (license license:bsd-2)))
25322
25323 (define-public python-inform
25324 (package
25325 (name "python-inform")
25326 (version "1.23.0")
25327 (source
25328 (origin
25329 (method url-fetch)
25330 (uri (pypi-uri "inform" version))
25331 (sha256
25332 (base32
25333 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
25334 (build-system python-build-system)
25335 (arguments
25336 `(#:tests? #f)) ; PyPI tarball lacks tests
25337 (native-inputs
25338 `(("python-hypothesis" ,python-hypothesis)
25339 ("python-pytest-cov" ,python-pytest-cov)
25340 ("python-pytest-runner" ,python-pytest-runner)))
25341 (propagated-inputs
25342 `(("python-arrow" ,python-arrow)
25343 ("python-six" ,python-six)))
25344 (home-page "https://inform.readthedocs.io")
25345 (synopsis "Print & logging utilities for communicating with user")
25346 (description
25347 "Inform is designed to display messages from programs that are typically run from
25348 a console. It provides a collection of ‘print’ functions that allow you to simply and
25349 cleanly print different types of messages.")
25350 (license license:gpl3+)))
25351
25352 (define-public python-nestedtext
25353 (package
25354 (name "python-nestedtext")
25355 (version "1.0.0")
25356 (source
25357 (origin
25358 (method url-fetch)
25359 (uri (pypi-uri "nestedtext" version))
25360 (sha256
25361 (base32
25362 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
25363 (build-system python-build-system)
25364 (arguments
25365 `(#:tests? #f)) ; PyPI tarball lacks tests
25366 (propagated-inputs
25367 `(("python-inform" ,python-inform)))
25368 (home-page "https://nestedtext.org")
25369 (synopsis "Human readable and writable data interchange format")
25370 (description
25371 "NestedText is a file format for holding data that is to be entered, edited, or
25372 viewed by people. It allows data to be organized into a nested collection of
25373 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
25374 without the complexity and risk of YAML and without the syntactic clutter of JSON.
25375 NestedText is both simple and natural. Only a small number of concepts and rules must
25376 be kept in mind when creating it. It is easily created, modified, or viewed with
25377 a text editor and easily understood and used by both programmers and non-programmers.")
25378 (license license:expat))) ; MIT license
25379
25380 (define-public python-nest-asyncio
25381 (package
25382 (name "python-nest-asyncio")
25383 (version "1.5.1")
25384 (source
25385 (origin
25386 (method url-fetch)
25387 (uri (pypi-uri "nest_asyncio" version))
25388 (sha256
25389 (base32
25390 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
25391 (build-system python-build-system)
25392 (home-page "https://github.com/erdewit/nest_asyncio")
25393 (synopsis "Patch asyncio to allow nested event loops")
25394 (description
25395 "By design @code{asyncio} does not allow its event loop to be nested.
25396 This presents a practical problem: when in an environment where the event loop
25397 is already running it's impossible to run tasks and wait for the result. This
25398 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
25399 @code{loop.run_until_complete}.")
25400 (license license:bsd-3)))
25401
25402 (define-public python-simpervisor
25403 (package
25404 (name "python-simpervisor")
25405 (version "0.4")
25406 (source
25407 (origin
25408 ;; Tests not included in release.
25409 (method git-fetch)
25410 (uri (git-reference
25411 (url "https://github.com/yuvipanda/simpervisor")
25412 (commit (string-append "v" version))))
25413 (file-name (git-file-name name version))
25414 (sha256
25415 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
25416 (build-system python-build-system)
25417 (arguments
25418 `(#:tests? #f ; Test suite can't find aiohttp.
25419 #:phases
25420 (modify-phases %standard-phases
25421 (replace 'check
25422 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25423 (when tests?
25424 (add-installed-pythonpath inputs outputs)
25425 (invoke "pytest" "--maxfail" "3" "--verbose"))
25426 #t)))))
25427 (native-inputs
25428 `(("python-aiohttp" ,python-aiohttp)
25429 ("python-pytest" ,python-pytest)
25430 ("python-pytest-asyncio" ,python-pytest-asyncio)))
25431 (home-page "https://github.com/yuvipanda/simpervisor")
25432 (synopsis "Simple async process supervisor")
25433 (description
25434 "This package provides a simple async process supervisor in Python.")
25435 (license license:bsd-3)))
25436
25437 (define-public python-parallel
25438 (package
25439 (name "python-parallel")
25440 (version "1.6.4.4")
25441 (source
25442 (origin
25443 (method url-fetch)
25444 (uri (string-append
25445 "https://www.parallelpython.com/downloads/pp/pp-"
25446 version ".zip"))
25447 (sha256
25448 (base32
25449 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
25450 (native-inputs
25451 `(("unzip" ,unzip)))
25452 (build-system python-build-system)
25453 (arguments '(#:tests? #f)) ; No test suite.
25454 (home-page "https://www.parallelpython.com")
25455 (synopsis "Parallel and distributed programming for Python")
25456 (description "Parallel Python module (PP) provides an easy and efficient
25457 way to create parallel-enabled applications for SMP computers and clusters.
25458 PP module features cross-platform portability and dynamic load balancing.
25459 Thus applications written with PP will parallelize efficiently even on
25460 heterogeneous and multi-platform clusters (including clusters running other
25461 applications with variable CPU loads).")
25462 (license license:bsd-3)))
25463
25464 (define-public python2-parallel
25465 (package-with-python2 python-parallel))
25466
25467 (define-public python-djvulibre
25468 (package
25469 (name "python-djvulibre")
25470 (version "0.8.6")
25471 (source
25472 (origin
25473 (method url-fetch)
25474 (uri (pypi-uri "python-djvulibre" version))
25475 (sha256
25476 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
25477 (build-system python-build-system)
25478 (native-inputs
25479 `(("ghostscript" ,ghostscript)
25480 ("pkg-config" ,pkg-config)
25481 ("python-nose" ,python-nose)))
25482 (inputs
25483 `(("djvulibre" ,djvulibre)
25484 ("python-cython" ,python-cython)))
25485 (arguments
25486 `(#:phases
25487 (modify-phases %standard-phases
25488 (add-after 'unpack 'fix-tests
25489 (lambda _
25490 ;; Unit tests try to load the 'dllpath.py' and fail, because it
25491 ;; doesn't make sense on GNU/Linux.
25492 (delete-file "djvu/dllpath.py")
25493 #t)))))
25494 (synopsis "Python bindings for DjVuLibre")
25495 (description "This is a set of Python bindings for the DjVuLibre library.")
25496 (home-page "https://jwilk.net/software/python-djvulibre")
25497 (license license:gpl2)))
25498
25499 (define-public python2-djvulibre
25500 (package-with-python2 python-djvulibre))
25501
25502 (define-public python-versioneer
25503 (package
25504 (name "python-versioneer")
25505 (version "0.19")
25506 (source
25507 (origin
25508 (method url-fetch)
25509 (uri (pypi-uri "versioneer" version))
25510 (sha256
25511 (base32
25512 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
25513 (build-system python-build-system)
25514 (home-page
25515 "https://github.com/python-versioneer/python-versioneer")
25516 (synopsis
25517 "Version-string management for VCS-controlled trees")
25518 (description
25519 "@code{versioneer} is a tool for managing a recorded version number in
25520 distutils-based python projects. The goal is to remove the tedious and
25521 error-prone \"update the embedded version string\" step from your release
25522 process.")
25523 (license license:public-domain)))
25524
25525 (define-public python2-gamera
25526 (package
25527 (name "python2-gamera")
25528 (version "3.4.4")
25529 (source
25530 (origin
25531 (method url-fetch)
25532 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
25533 "gamera-" version ".tar.gz"))
25534 (sha256
25535 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
25536 (modules '((guix build utils)))
25537 (snippet
25538 '(begin
25539 ;; Remove bundled libraries.
25540 (for-each delete-file-recursively
25541 '("src/libpng-1.2.5"
25542 "src/libtiff"
25543 "src/zlib-1.2.8"))))))
25544 (build-system python-build-system)
25545 (inputs
25546 `(("libpng" ,libpng)
25547 ("libtiff" ,libtiff)
25548 ("zlib" ,zlib)))
25549 (arguments
25550 `(#:python ,python-2
25551 #:phases
25552 (modify-phases %standard-phases
25553 (add-after 'unpack 'disable-wx-support
25554 (lambda _
25555 (substitute* "setup.py"
25556 (("no_wx = False")
25557 "no_wx = True")))))))
25558 (synopsis "Framework for building document analysis applications")
25559 (description
25560 "Gamera is a toolkit for building document image recognition systems.")
25561 (home-page "https://gamera.informatik.hsnr.de/")
25562 (license license:gpl2+)))
25563
25564 (define-public python-contextvars
25565 (package
25566 (name "python-contextvars")
25567 (version "2.4")
25568 (source
25569 (origin
25570 (method url-fetch)
25571 (uri (pypi-uri "contextvars" version))
25572 (sha256
25573 (base32
25574 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
25575 (build-system python-build-system)
25576 (propagated-inputs
25577 `(("python-immutables" ,python-immutables)))
25578 (home-page
25579 "https://github.com/MagicStack/contextvars")
25580 (synopsis "PEP 567 Backport")
25581 (description "This package implements a backport of Python 3.7
25582 @code{contextvars} module (see PEP 567) for Python 3.6.")
25583 (license license:asl2.0)))
25584
25585 (define-public python-aiofiles
25586 (package
25587 (name "python-aiofiles")
25588 (version "0.6.0")
25589 (source
25590 (origin
25591 (method url-fetch)
25592 (uri (pypi-uri "aiofiles" version))
25593 (sha256
25594 (base32
25595 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
25596 (build-system python-build-system)
25597 (home-page "https://github.com/Tinche/aiofiles")
25598 (synopsis "File support for @code{asyncio}")
25599 (description "@code{python-aiofiles} is a library for handling local
25600 disk files in asyncio applications.")
25601 (license license:asl2.0)))
25602
25603 (define-public python-pyre-extensions
25604 (package
25605 (name "python-pyre-extensions")
25606 (version "0.0.18")
25607 (source
25608 (origin
25609 (method url-fetch)
25610 (uri (pypi-uri "pyre-extensions" version))
25611 (sha256
25612 (base32
25613 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
25614 (build-system python-build-system)
25615 (propagated-inputs
25616 `(("python-typing-extensions"
25617 ,python-typing-extensions)
25618 ("python-typing-inspect" ,python-typing-inspect)))
25619 (home-page "https://pyre-check.org")
25620 (synopsis
25621 "Type system extensions for use with @code{python-pyre}")
25622 (description
25623 "@code{python-pyre-extensions} defines extensions to the standard
25624 @code{typing} module that are supported by the Pyre typechecker.")
25625 (license license:expat)))
25626
25627 (define-public python-dataclasses
25628 (package
25629 (name "python-dataclasses")
25630 (version "0.8")
25631 (source
25632 (origin
25633 (method url-fetch)
25634 (uri (pypi-uri "dataclasses" version))
25635 (sha256
25636 (base32
25637 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
25638 (build-system python-build-system)
25639 (home-page
25640 "https://github.com/ericvsmith/dataclasses")
25641 (synopsis
25642 "Backport of the @code{dataclasses} module for Python 3.6")
25643 (description
25644 "This is an implementation of PEP 557, Data Classes. It is a
25645 backport of the @code{dataclasses} module for Python 3.6.")
25646 (license license:asl2.0)))
25647
25648 (define-public python-pywatchman
25649 (package
25650 (name "python-pywatchman")
25651 (version "1.4.1")
25652 (source
25653 (origin
25654 (method url-fetch)
25655 (uri (pypi-uri "pywatchman" version))
25656 (sha256
25657 (base32
25658 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
25659 (build-system python-build-system)
25660 (arguments
25661 `(#:tests? #f)) ;there are none
25662 (home-page
25663 "https://facebook.github.io/watchman/")
25664 (synopsis "Watchman client for python")
25665 (description "@code{python-pywatchman} is a library to connect and
25666 query Watchman to discover file changes.")
25667 (license license:bsd-3)))
25668
25669 (define-public python-helpdev
25670 (package
25671 (name "python-helpdev")
25672 (version "0.7.1")
25673 (source
25674 (origin
25675 (method url-fetch)
25676 (uri (pypi-uri "helpdev" version))
25677 (sha256
25678 (base32
25679 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
25680 (build-system python-build-system)
25681 (arguments
25682 `(#:phases
25683 (modify-phases %standard-phases
25684 (replace 'check
25685 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25686 (when tests?
25687 (add-installed-pythonpath inputs outputs)
25688 (invoke "pytest" "tests"))
25689 #t)))))
25690 (propagated-inputs
25691 `(("python-importlib-metadata" ,python-importlib-metadata)))
25692 (native-inputs
25693 `(("python-pytest" ,python-pytest)))
25694 (home-page "https://gitlab.com/dpizetta/helpdev")
25695 (synopsis
25696 "Extract information about the Python environment easily")
25697 (description
25698 "Helpdev is a library to easily extract information about the Python
25699 environment.")
25700 (license license:expat)))
25701
25702 (define-public python-logutils
25703 (package
25704 (name "python-logutils")
25705 (version "0.3.5")
25706 (source
25707 (origin
25708 (method url-fetch)
25709 (uri (pypi-uri "logutils" version))
25710 (sha256
25711 (base32
25712 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
25713 (build-system python-build-system)
25714 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
25715 (synopsis "Logging utilities")
25716 (description "This package provides a set of handlers for the Python
25717 standard library logging package. Some of these handlers are out-of-scope
25718 for the standard library, and so they are packaged here. Others are updated
25719 versions which have appeared in recent Python releases, but are usable with
25720 older versions of Python and so are packaged here.")
25721 (license license:bsd-3)))
25722
25723 (define-public python-helper
25724 (package
25725 (name "python-helper")
25726 (version "2.5.0")
25727 (source (origin
25728 (method url-fetch)
25729 (uri (pypi-uri "helper" version))
25730 (sha256
25731 (base32
25732 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
25733 (build-system python-build-system)
25734 (native-inputs
25735 `(("python-mock" ,python-mock)))
25736 (propagated-inputs
25737 `(("python-logutils" ,python-logutils)
25738 ("python-pyyaml" ,python-pyyaml)))
25739 (home-page "https://github.com/gmr/helper")
25740 (synopsis "Library for writing configurable applications and daemons")
25741 (description
25742 "This package provides procedures for quickly writing configurable
25743 applications and daemons.")
25744 (license license:bsd-3)))
25745
25746 (define-public python-qtsass
25747 (package
25748 (name "python-qtsass")
25749 (version "0.3.0")
25750 (source
25751 (origin
25752 ;; There are no tests in the PyPI tarball.
25753 (method git-fetch)
25754 (uri (git-reference
25755 (url "https://github.com/spyder-ide/qtsass/")
25756 (commit (string-append "v" version))))
25757 (file-name (git-file-name name version))
25758 (sha256
25759 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
25760 (build-system python-build-system)
25761 (arguments
25762 `(#:test-target "pytest"
25763 #:phases
25764 (modify-phases %standard-phases
25765 ;; Tests need to read and write files.
25766 (add-before 'check 'make-git-checkout-writable
25767 (lambda _
25768 (for-each make-file-writable (find-files "."))
25769 #t)))))
25770 (native-inputs
25771 `(("python-pytest" ,python-pytest)
25772 ("python-pytest-cov" ,python-pytest-cov)
25773 ("python-pytest-runner" ,python-pytest-runner)))
25774 (propagated-inputs
25775 `(("python-libsass" ,python-libsass)))
25776 (home-page "https://github.com/spyder-ide/qtsass")
25777 (synopsis "Compile SCSS files to valid Qt stylesheets")
25778 (description
25779 "Besides being used in web development, CSS is also the way to stylize
25780 Qt-based desktop applications. However, Qt's CSS has a few variations that
25781 prevent the direct use of SASS compiler.
25782
25783 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
25784 handling those variations.")
25785 (license license:expat)))
25786
25787 (define-public python-qdarkstyle
25788 (package
25789 (name "python-qdarkstyle")
25790 (version "2.8.1")
25791 (source
25792 (origin
25793 (method url-fetch)
25794 (uri (pypi-uri "QDarkStyle" version))
25795 (sha256
25796 (base32
25797 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
25798 (build-system python-build-system)
25799 (arguments
25800 `(;; Fails unable to detect valid Qt bindings even when
25801 ;; added as native-inputs.
25802 #:tests? #f))
25803 (propagated-inputs
25804 `(("python-helpdev" ,python-helpdev)
25805 ("python-qtpy" ,python-qtpy)))
25806 (home-page
25807 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
25808 (synopsis
25809 "Complete dark stylesheet for Python and Qt applications")
25810 (description "QDarkStyle is the most complete dark stylesheet for Python and
25811 Qt applications.")
25812 (license license:expat)))
25813
25814 (define-public python-bitstring
25815 (package
25816 (name "python-bitstring")
25817 (version "3.1.7")
25818 (source
25819 (origin
25820 (method url-fetch)
25821 (uri (pypi-uri "bitstring" version))
25822 (sha256
25823 (base32
25824 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
25825 (build-system python-build-system)
25826 (arguments
25827 `(#:phases
25828 (modify-phases %standard-phases
25829 (replace 'check
25830 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25831 (when tests?
25832 (add-installed-pythonpath inputs outputs)
25833 (with-directory-excursion "test"
25834 (invoke "pytest")))
25835 #t)))))
25836 (native-inputs
25837 `(("python-pytest" ,python-pytest)))
25838 (home-page "https://github.com/scott-griffiths/bitstring")
25839 (synopsis
25840 "Simple construction, analysis and modification of binary data")
25841 (description
25842 "Bitstring is a library for simple construction, analysis and modification
25843 of binary data.")
25844 (license license:expat)))
25845
25846 (define-public python-confuse
25847 (package
25848 (name "python-confuse")
25849 (version "1.5.0")
25850 (source
25851 (origin
25852 (method url-fetch)
25853 (uri (pypi-uri "confuse" version))
25854 (sha256
25855 (base32
25856 "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
25857 (build-system python-build-system)
25858 (propagated-inputs
25859 `(("python-pyyaml" ,python-pyyaml)))
25860 (home-page "https://github.com/beetbox/confuse")
25861 (synopsis "Painless YAML configuration")
25862 (description "Confuse is a configuration library for Python that uses
25863 YAML. It takes care of defaults, overrides, type checking, command-line
25864 integration, human-readable errors, and standard OS-specific locations.")
25865 (license license:expat)))
25866
25867 (define-public python-reflink
25868 (package
25869 (name "python-reflink")
25870 (version "0.2.1")
25871 (source
25872 (origin
25873 (method url-fetch)
25874 (uri (pypi-uri "reflink" version))
25875 (sha256
25876 (base32
25877 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
25878 (build-system python-build-system)
25879 (arguments
25880 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
25881 (propagated-inputs
25882 `(("python-cffi" ,python-cffi)))
25883 (native-inputs
25884 `(("python-pytest" ,python-pytest)
25885 ("python-pytest-runner" ,python-pytest-runner)))
25886 (home-page "https://gitlab.com/rubdos/pyreflink")
25887 (synopsis "Python wrapper around reflink system call")
25888 (description
25889 "Python reflink wraps around platform specific @code{reflink}
25890 implementations.")
25891 (license license:expat)))
25892
25893 (define-public python-pivy
25894 (package
25895 (name "python-pivy")
25896 (version "0.6.5")
25897 (source
25898 (origin
25899 (method git-fetch)
25900 (uri (git-reference
25901 (url "https://github.com/coin3d/pivy")
25902 (commit version)))
25903 (file-name (git-file-name name version))
25904 (sha256
25905 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
25906 (build-system python-build-system)
25907 (arguments
25908 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
25909 #:tests? #f
25910 #:phases
25911 (modify-phases %standard-phases
25912 (add-after 'unpack 'patch-cmake-include-dirs
25913 (lambda _
25914 ;; Patch buildsystem to respect Coin3D include directory
25915 (substitute* "CMakeLists.txt"
25916 (("\\$\\{SoQt_INCLUDE_DIRS}")
25917 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
25918 #t)))))
25919 (native-inputs
25920 `(("cmake" ,cmake)
25921 ("swig" ,swig)))
25922 (inputs
25923 `(("python-wrapper" ,python-wrapper)
25924 ("qtbase" ,qtbase-5)
25925 ("libxi" ,libxi)
25926 ("libice" ,libice)
25927 ("soqt" ,soqt)
25928 ("glew" ,glew)
25929 ("coin3D" ,coin3D-4)))
25930 (home-page "https://github.com/coin3d/pivy")
25931 (synopsis "Python bindings to Coin3D")
25932 (description
25933 "Pivy provides python bindings for Coin, a 3D graphics library with an
25934 Application Programming Interface based on the Open Inventor 2.1 API.")
25935 (license license:isc)))
25936
25937 (define-public python-crayons
25938 (package
25939 (name "python-crayons")
25940 (version "0.4.0")
25941 (source
25942 (origin
25943 (method url-fetch)
25944 (uri (pypi-uri "crayons" version))
25945 (sha256
25946 (base32
25947 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
25948 (build-system python-build-system)
25949 (propagated-inputs
25950 `(("python-colorama" ,python-colorama)))
25951 (home-page "https://github.com/MasterOdin/crayons")
25952 (synopsis "TextUI colors for Python")
25953 (description "This package gives you colored strings for the terminal.
25954 Crayons automatically wraps a given string in the foreground color and
25955 restores the original state after the string is printed.")
25956 (license license:expat)))
25957
25958 (define-public python-sane
25959 (package
25960 (name "python-sane")
25961 (version "2.9.1")
25962 (source
25963 (origin
25964 (method url-fetch)
25965 (uri (pypi-uri name version))
25966 (sha256
25967 (base32
25968 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
25969 (build-system python-build-system)
25970 (native-inputs
25971 `(("python-pytest" ,python-pytest)))
25972 (inputs
25973 `(("sane-backends" ,sane-backends)))
25974 (home-page "https://github.com/python-pillow/Sane")
25975 (synopsis "Python interface to the SANE scanner")
25976 (description "This package provides Python interface to the SANE scanner
25977 and frame grabber interface.")
25978 (license (license:non-copyleft
25979 ;; Yet another variant of the X/MIT license.
25980 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
25981
25982 (define-public python-screenkey
25983 (package
25984 (name "python-screenkey")
25985 (version "1.4")
25986 (source
25987 (origin
25988 (method git-fetch)
25989 (uri (git-reference
25990 (url "https://gitlab.com/screenkey/screenkey")
25991 (commit (string-append "v" version))))
25992 (file-name (git-file-name name version))
25993 (sha256
25994 (base32
25995 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
25996 (build-system python-build-system)
25997 (arguments
25998 `(#:phases
25999 (modify-phases %standard-phases
26000 (add-after 'unpack 'fix-dlopen-paths
26001 (lambda* (#:key inputs outputs #:allow-other-keys)
26002 (let* ((x11 (assoc-ref inputs "libx11"))
26003 (xtst (assoc-ref inputs "libxtst")))
26004 (substitute* "Screenkey/xlib.py"
26005 (("libX11.so.6")
26006 (string-append x11 "/lib/libX11.so.6")))
26007 (substitute* "Screenkey/xlib.py"
26008 (("libXtst.so.6")
26009 (string-append xtst "/lib/libXtst.so.6")))
26010 #t)))
26011 (add-after 'install 'wrap-screenkey
26012 (lambda* (#:key outputs #:allow-other-keys)
26013 (wrap-program
26014 (string-append (assoc-ref outputs "out") "/bin/screenkey")
26015 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
26016 `("GI_TYPELIB_PATH"
26017 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
26018 #t)))))
26019 (inputs
26020 `(("python-distutils-extra" ,python-distutils-extra)
26021 ("python-tokenize-rt" ,python-tokenize-rt)
26022 ("libx11" ,libx11)
26023 ("libxtst" ,libxtst)
26024 ("gtk+" ,gtk+)
26025 ("python-pygobject" ,python-pygobject)
26026 ("python-pycairo" ,python-pycairo)
26027 ("python-setuptools-git" ,python-setuptools-git)
26028 ("python-babel" ,python-babel)))
26029 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
26030 (synopsis
26031 "Screencast tool to display pressed keys")
26032 (description
26033 "A screencast tool to display your keys inspired by Screenflick.")
26034 (license license:gpl3+)))
26035
26036 (define-public python-jinja2-cli
26037 (package
26038 (name "python-jinja2-cli")
26039 (version "0.7.0")
26040 (source
26041 (origin
26042 (method url-fetch)
26043 (uri (pypi-uri "jinja2-cli" version))
26044 (sha256
26045 (base32
26046 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
26047 (build-system python-build-system)
26048 (propagated-inputs
26049 `(("python-jinja2" ,python-jinja2)))
26050 (native-inputs
26051 `(("python-flake8" ,python-flake8)
26052 ("python-jinja2" ,python-jinja2)
26053 ("python-pytest" ,python-pytest)))
26054 (home-page "https://github.com/mattrobenolt/jinja2-cli")
26055 (synopsis "Command-line interface to Jinja2")
26056 (description
26057 "This package provides a command-line interface (CLI) to the Jinja2
26058 template engine.")
26059 (license license:bsd-3)))
26060
26061 (define-public python-readability
26062 (package
26063 (name "python-readability")
26064 (version "0.3.1")
26065 (source
26066 (origin
26067 (method url-fetch)
26068 (uri (pypi-uri "readability" version))
26069 (sha256
26070 (base32
26071 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
26072 (build-system python-build-system)
26073 (home-page
26074 "https://github.com/andreasvc/readability/")
26075 (synopsis
26076 "Measure the readability of a given text using surface
26077 characteristics")
26078 (description
26079 "This package provides a Python library that is an implementation of
26080 traditional readability measures based on simple surface
26081 characteristics. These measures are basically linear regressions based on the
26082 number of words, syllables, and sentences.")
26083 (license license:asl2.0)))
26084
26085 (define-public python-listparser
26086 (package
26087 (name "python-listparser")
26088 (version "0.18")
26089 (source
26090 (origin
26091 (method url-fetch)
26092 (uri (pypi-uri "listparser" version))
26093 (sha256
26094 (base32
26095 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
26096 (build-system python-build-system)
26097 (home-page
26098 "https://github.com/kurtmckee/listparser")
26099 (synopsis
26100 "Parse subscription lists in Python")
26101 (description
26102 "This package provides a Python library that can parse OPML, FOAF, and
26103 iGoogle subscription lists.")
26104 (license license:expat)))
26105
26106 (define-public python-smartypants
26107 (package
26108 (name "python-smartypants")
26109 (version "2.0.1")
26110 (source
26111 (origin
26112 ;; There's no source tarball for 2.0.1 on PyPI.
26113 (method git-fetch)
26114 (uri (git-reference
26115 (url "https://github.com/leohemsted/smartypants.py")
26116 (commit (string-append "v" version))))
26117 (file-name (git-file-name name version))
26118 (sha256
26119 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
26120 (build-system python-build-system)
26121 (arguments
26122 '(#:phases
26123 (modify-phases %standard-phases
26124 (replace 'check
26125 ;; Its `setup.py test` doesn't report failure with exit status, so
26126 ;; we use `nose` instead.
26127 (lambda _
26128 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
26129 (native-inputs
26130 ;; For tests.
26131 `(("python-docutils" ,python-docutils)
26132 ("python-nose" ,python-nose)
26133 ("python-pygments" ,python-pygments)))
26134 (home-page "https://github.com/leohemsted/smartypants.py")
26135 (synopsis "Translate punctuation characters into smart quotes")
26136 (description
26137 "@command{smartpants} can perform the following transformations:
26138 @enumerate
26139 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
26140 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
26141 entities
26142 @item Dashes (-- and ---) into en- and em-dash entities
26143 @item Three consecutive dots (... or . . .) into an ellipsis entity
26144 @end enumerate")
26145 (license license:bsd-3)))
26146
26147 (define-public python-typogrify
26148 (package
26149 (name "python-typogrify")
26150 (version "2.0.7")
26151 (source (origin
26152 (method url-fetch)
26153 (uri (pypi-uri "typogrify" version))
26154 (sha256
26155 (base32
26156 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
26157 (build-system python-build-system)
26158 (arguments
26159 '(#:phases
26160 (modify-phases %standard-phases
26161 (replace 'check
26162 (lambda _
26163 (invoke "nosetests" "-v"))))))
26164 (propagated-inputs
26165 `(("python-smartypants" ,python-smartypants)))
26166 (native-inputs
26167 ;; For tests.
26168 `(("python-nose" ,python-nose)))
26169 (home-page "https://github.com/mintchaos/typogrify")
26170 (synopsis "Filters to transform text into typographically-improved HTML")
26171 (description
26172 "@code{typogrify} provides a set of custom filters that automatically
26173 apply various transformations to plain text in order to yield
26174 typographically-improved HTML. While often used in conjunction with Jinja and
26175 Django template systems, the filters can be used in any environment.")
26176 (license license:bsd-3)))
26177
26178 (define-public python-ld
26179 (package
26180 (name "python-ld")
26181 (version "0.5.0")
26182 (source
26183 (origin
26184 (method url-fetch)
26185 (uri (pypi-uri "ld" version))
26186 (sha256
26187 (base32
26188 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
26189 (build-system python-build-system)
26190 (propagated-inputs
26191 `(("python-six" ,python-six)))
26192 (home-page "https://github.com/nir0s/ld")
26193 (synopsis "OS platform information API")
26194 (description
26195 "The ld package provides information about the GNU/Linux distribution it
26196 runs on, such as a reliable machine-readable ID, or version information.")
26197 (license license:asl2.0)))
26198
26199 (define-public python-quicktions
26200 (package
26201 (name "python-quicktions")
26202 (version "1.11")
26203 (source
26204 (origin
26205 (method url-fetch)
26206 (uri (pypi-uri "quicktions" version))
26207 (sha256
26208 (base32
26209 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
26210 (modules '((guix build utils)))
26211 (snippet
26212 '(begin
26213 ;; This file is generated by Cython.
26214 (delete-file "src/quicktions.c") #t))))
26215 (build-system python-build-system)
26216 (arguments
26217 `(#:phases
26218 (modify-phases %standard-phases
26219 (add-before 'build 'cythonize-sources
26220 (lambda _
26221 (with-directory-excursion "src"
26222 (invoke "cython" "quicktions.pyx"))))
26223 (replace 'check
26224 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26225 (when tests?
26226 (add-installed-pythonpath inputs outputs)
26227 (invoke "pytest"))
26228 #t)))))
26229 (native-inputs
26230 `(("python-cython" ,python-cython)
26231 ("python-pytest" ,python-pytest)))
26232 (home-page "https://github.com/scoder/quicktions")
26233 (synopsis "Fast fractions data type for rational numbers")
26234 (description
26235 "This package provides fast fractions data type for rational numbers. It
26236 is the cythonized version of @code{fractions.Fraction}.")
26237 (license license:psfl)))
26238
26239 (define-public python-pathvalidate
26240 (package
26241 (name "python-pathvalidate")
26242 (version "2.4.1")
26243 (source
26244 (origin
26245 (method url-fetch)
26246 (uri (pypi-uri "pathvalidate" version))
26247 (sha256
26248 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
26249 (build-system python-build-system)
26250 (arguments
26251 '(#:tests? #f))
26252 ;; Tests disabled because of circular dependencies.
26253 ;; pathvalidate tests depend on pytest-md-report, which
26254 ;; depends on pathvalidate.
26255 (native-inputs
26256 `(("python-allpairspy" ,python-allpairspy)
26257 ("python-click" ,python-click)
26258 ("python-faker" ,python-faker)
26259 ("python-pytest" ,python-pytest)))
26260 (home-page "https://github.com/thombashi/pathvalidate")
26261 (synopsis "Sanitize strings representing paths")
26262 (description
26263 "@code{pathvalidate} is a Python library to sanitize/validate strings
26264 representing paths or filenames.")
26265 (license license:expat)))
26266
26267 (define-public python-escapism
26268 (package
26269 (name "python-escapism")
26270 (version "1.0.1")
26271 (source
26272 (origin
26273 (method url-fetch)
26274 (uri (pypi-uri "escapism" version))
26275 (sha256
26276 (base32
26277 "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
26278 (build-system python-build-system)
26279 (home-page "https://github.com/minrk/escapism")
26280 (synopsis "Simple, generic library for escaping strings")
26281 (description
26282 "This Python library provides a programming interface to, given a set of
26283 safe characters and an escape character, escape safe strings and unescape the
26284 result.")
26285 (license license:expat)))
26286
26287 (define-public python-recommonmark
26288 (package
26289 (name "python-recommonmark")
26290 (version "0.7.1")
26291 (source
26292 (origin
26293 (method url-fetch)
26294 (uri (pypi-uri "recommonmark" version))
26295 (sha256
26296 (base32
26297 "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
26298 (build-system python-build-system)
26299 (propagated-inputs
26300 `(("python-commonmark" ,python-commonmark)
26301 ("python-docutils" ,python-docutils)
26302 ("python-sphinx" ,python-sphinx)))
26303 (arguments
26304 '(#:phases (modify-phases %standard-phases
26305 (add-after 'unpack 'delete-test-sphinx
26306 (lambda* (#:key outputs #:allow-other-keys)
26307 (let* ((out (assoc-ref outputs "out")))
26308 (delete-file "tests/test_sphinx.py")))))))
26309 (home-page "https://github.com/readthedocs/recommonmark")
26310 (synopsis "Docutils-compatibility bridge to CommonMark")
26311 (description
26312 "This packages provides a docutils-compatibility bridge to CommonMark,
26313 enabling you to write CommonMark inside of Docutils & Sphinx projects.")
26314 (license license:expat)))
26315
26316 (define-public python-pyhull
26317 (package
26318 (name "python-pyhull")
26319 (version "2015.2.1")
26320 (source
26321 (origin
26322 (method url-fetch)
26323 (uri (pypi-uri "pyhull" version))
26324 (sha256
26325 (base32
26326 "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
26327 (build-system python-build-system)
26328 (propagated-inputs
26329 `(("python-numpy" ,python-numpy)))
26330 (home-page "https://github.com/materialsvirtuallab/pyhull")
26331 (synopsis "Python wrapper to Qhull")
26332 (description
26333 "This package provides a Python wrapper to @uref{http://www.qhull.org/,
26334 Qhull} for the computation of the convex hull, Delaunay triangulation, and
26335 Voronoi diagram.")
26336 (license license:expat)))
26337
26338 (define-public python-opcodes
26339 ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
26340 ;; version number, which is what we use here.
26341 (let ((commit "0f7c7d63f5e13ce5a89d9acc3934f1b6e247ec1f"))
26342 (package
26343 (name "python-opcodes")
26344 (version "0.3.14") ;from 'opcodes/__init__.py'
26345 (home-page "https://github.com/Maratyszcza/Opcodes")
26346 (source (origin
26347 (method git-fetch)
26348 (uri (git-reference (url home-page) (commit commit)))
26349 (file-name (git-file-name name version))
26350 (sha256
26351 (base32
26352 "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
26353 (build-system python-build-system)
26354 (synopsis "Database of processor instructions and opcodes")
26355 (description
26356 "This project documents instruction sets in a format convenient for
26357 tools development. An instruction set is represented by three files:
26358
26359 @itemize
26360 @item an XML file that describes instructions;
26361 @item an XSD file that describes the structure of the XML file;
26362 @item a Python module that reads the XML file and represents it as a set of
26363 Python objects;
26364 @end itemize
26365
26366 It currently provides descriptions for most user-mode x86, x86_64, and k1om
26367 instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
26368 and BMI2).")
26369 (license license:bsd-2))))
26370
26371 (define-public python-peachpy
26372 ;; There is no tag in this repo.
26373 (let ((commit "906d578266dc7188bf61e4cdbc9f8ea7d69edec0")
26374 (version "0.2.0") ;from 'peachpy/__init__.py'
26375 (revision "1"))
26376 (package
26377 (name "python-peachpy")
26378 (version (git-version version revision commit))
26379 (home-page "https://github.com/Maratyszcza/PeachPy")
26380 (source (origin
26381 (method git-fetch)
26382 (uri (git-reference (url home-page) (commit commit)))
26383 (file-name (git-file-name name version))
26384 (sha256
26385 (base32
26386 "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))))
26387 (build-system python-build-system)
26388 (arguments
26389 '(#:phases (modify-phases %standard-phases
26390 (replace 'check
26391 (lambda* (#:key tests? #:allow-other-keys)
26392 (when tests?
26393 (invoke "python" "setup.py" "nosetests")))))))
26394 (native-inputs
26395 `(("python-nose" ,python-nose)
26396 ("python-rednose" ,python-rednose)))
26397 (propagated-inputs
26398 `(("python-six" ,python-six)
26399 ("python-opcodes" ,python-opcodes)))
26400 (synopsis "Efficient assembly code generation in Python")
26401 (description
26402 "PeachPy is a Python framework for writing high-performance assembly kernels.
26403 PeachPy aims to simplify writing optimized assembly kernels while preserving
26404 all optimization opportunities of traditional assembly.
26405
26406 PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings
26407 for the Go language tool chain; it adapts to different calling conventions and
26408 application binary interfaces (ABIs); it takes care of register allocation; it
26409 supports x86_64 instructions up to AVX-512 and SHA.")
26410 (license license:bsd-2))))
26411
26412 (define-public python-sgmllib3k
26413 (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
26414 (revision "1"))
26415 (package
26416 (name "python-sgmllib3k")
26417 (version
26418 (git-version "1.0.0" revision commit))
26419 (source
26420 (origin
26421 (method git-fetch)
26422 (uri (git-reference
26423 (url "https://github.com/hsoft/sgmllib")
26424 (commit commit)))
26425 (file-name (git-file-name name version))
26426 (sha256
26427 (base32
26428 "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
26429 (build-system python-build-system)
26430 (home-page "https://github.com/hsoft/sgmllib")
26431 (synopsis "Python 3 port of sgmllib")
26432 (description "This package is a port of sgmllib that is no longer part
26433 of Python 3.")
26434 (license license:bsd-3))))
26435
26436 (define-public python-cwcwidth
26437 (package
26438 (name "python-cwcwidth")
26439 (version "0.1.4")
26440 (source
26441 (origin
26442 (method url-fetch)
26443 (uri (pypi-uri "cwcwidth" version))
26444 (sha256
26445 (base32
26446 "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
26447 (build-system python-build-system)
26448 (native-inputs
26449 `(("python-cython" ,python-cython)
26450 ("python-pytest" ,python-pytest)
26451 ("python-setuptools-scm" ,python-setuptools-scm)
26452 ("python-toml" ,python-toml)
26453 ("python-wheel" ,python-wheel)))
26454 (home-page
26455 "https://github.com/sebastinas/cwcwidth")
26456 (synopsis "Python bindings for wc(s)width")
26457 (description "This package provides bindings for wcwidth and wcswidth
26458 functions defined in POSIX.1-2001 and POSIX.1-2008.")
26459 (license license:expat)))
26460
26461 (define-public python-pyan3
26462 (package
26463 (name "python-pyan3")
26464 (version "1.2.0")
26465 (source
26466 (origin
26467 ;; Source tarball on PyPI lacks tests.
26468 (method git-fetch)
26469 (uri (git-reference
26470 (url "https://github.com/Technologicat/pyan")
26471 (commit (string-append "v" version))))
26472 (file-name (git-file-name name version))
26473 (sha256
26474 (base32
26475 "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
26476 (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
26477 "python-pyan3-fix-absolute-path-bug.patch"))))
26478 (build-system python-build-system)
26479 (arguments
26480 `(#:phases
26481 (modify-phases %standard-phases
26482 (replace 'check
26483 (lambda* (#:key tests? #:allow-other-keys)
26484 (when tests?
26485 ;; Extend PYTHONPATH so the built package will be found.
26486 (setenv "GUIX_PYTHONPATH"
26487 (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
26488 (invoke "pytest")))))))
26489 (native-inputs
26490 `(("python-pytest" ,python-pytest)
26491 ("python-pytest-cov" ,python-pytest-cov)
26492 ("python-wheel" ,python-wheel)))
26493 (propagated-inputs
26494 `(("python-jinja2" ,python-jinja2)))
26495 (home-page "https://github.com/Technologicat/pyan")
26496 (synopsis "Offline call graph generator for Python 3")
26497 (description "Pyan takes one or more Python source files, performs
26498 a (rather superficial) static analysis, and constructs a directed graph of the
26499 objects in the combined source, and how they define or use each other. The
26500 graph can be output for rendering by GraphViz or yEd.")
26501 (license license:gpl2)))
26502
26503 (define-public date2name
26504 (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
26505 (revision "1"))
26506 (package
26507 (name "date2name")
26508 (version (git-version "0.0" revision commit))
26509 (source
26510 (origin
26511 (method git-fetch)
26512 (uri (git-reference
26513 (url "https://github.com/novoid/date2name")
26514 (commit commit)))
26515 (file-name (git-file-name name version))
26516 (sha256
26517 (base32
26518 "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
26519 (build-system python-build-system)
26520 (arguments
26521 `(#:tests? #f ; no tests
26522 #:phases
26523 (modify-phases %standard-phases
26524 (delete 'build)
26525 (replace 'install
26526 (lambda* (#:key outputs #:allow-other-keys)
26527 (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
26528 (binary (string-append bindir "/date2name")))
26529 (mkdir-p bindir)
26530 (copy-file "date2name/__init__.py" binary)
26531 (chmod binary #o555)))))))
26532 (synopsis "Handling time-stamps and date-stamps in file names")
26533 (description "By default, date2name gets the modification time of matching
26534 files and directories and adds a datestamp in standard ISO 8601+ format
26535 YYYY-MM-DD at the beginning of the file or directory name.")
26536 (home-page "https://github.com/novoid/date2name")
26537 (license license:gpl3+))))