Update copyright assignments for Liliana Marie Prikler.
[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 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020, 2021 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
46 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
47 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
48 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
49 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
50 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
51 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
52 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
53 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
54 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
55 ;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
56 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
57 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
58 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
59 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
77 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
78 ;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
79 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
80 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
81 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
82 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
83 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
84 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
85 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
86 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
87 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
88 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
89 ;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
90 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
91 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
92 ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
93 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
94 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
95 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
96 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
97 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
98 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
99 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
100 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
101 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
102 ;;; Copyright © 2021 jgart <jgart@dismail.de>
103 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
104 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
105 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
106 ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
107 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
108 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
109 ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
110 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
111 ;;;
112 ;;; This file is part of GNU Guix.
113 ;;;
114 ;;; GNU Guix is free software; you can redistribute it and/or modify it
115 ;;; under the terms of the GNU General Public License as published by
116 ;;; the Free Software Foundation; either version 3 of the License, or (at
117 ;;; your option) any later version.
118 ;;;
119 ;;; GNU Guix is distributed in the hope that it will be useful, but
120 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
121 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122 ;;; GNU General Public License for more details.
123 ;;;
124 ;;; You should have received a copy of the GNU General Public License
125 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
126
127 (define-module (gnu packages python-xyz)
128 #:use-module ((guix licenses) #:prefix license:)
129 #:use-module (gnu packages)
130 #:use-module (gnu packages algebra)
131 #:use-module (gnu packages adns)
132 #:use-module (gnu packages aidc)
133 #:use-module (gnu packages attr)
134 #:use-module (gnu packages backup)
135 #:use-module (gnu packages bash)
136 #:use-module (gnu packages check)
137 #:use-module (gnu packages cmake)
138 #:use-module (gnu packages compression)
139 #:use-module (gnu packages crypto)
140 #:use-module (gnu packages databases)
141 #:use-module (gnu packages dbm)
142 #:use-module (gnu packages djvu)
143 #:use-module (gnu packages docker)
144 #:use-module (gnu packages enchant)
145 #:use-module (gnu packages file)
146 #:use-module (gnu packages fontutils)
147 #:use-module (gnu packages gcc)
148 #:use-module (gnu packages geo)
149 #:use-module (gnu packages ghostscript)
150 #:use-module (gnu packages gl)
151 #:use-module (gnu packages glib)
152 #:use-module (gnu packages gnome)
153 #:use-module (gnu packages gnupg)
154 #:use-module (gnu packages graphviz)
155 #:use-module (gnu packages graphics)
156 #:use-module (gnu packages gsasl)
157 #:use-module (gnu packages gstreamer)
158 #:use-module (gnu packages gtk)
159 #:use-module (gnu packages haskell-xyz)
160 #:use-module (gnu packages icu4c)
161 #:use-module (gnu packages image)
162 #:use-module (gnu packages imagemagick)
163 #:use-module (gnu packages jupyter)
164 #:use-module (gnu packages kerberos)
165 #:use-module (gnu packages libevent)
166 #:use-module (gnu packages libffi)
167 #:use-module (gnu packages libidn)
168 #:use-module (gnu packages linux)
169 #:use-module (gnu packages llvm)
170 #:use-module (gnu packages man)
171 #:use-module (gnu packages markup)
172 #:use-module (gnu packages maths)
173 #:use-module (gnu packages monitoring)
174 #:use-module (gnu packages multiprecision)
175 #:use-module (gnu packages networking)
176 #:use-module (gnu packages ncurses)
177 #:use-module (gnu packages openstack)
178 #:use-module (gnu packages pcre)
179 #:use-module (gnu packages pdf)
180 #:use-module (gnu packages perl)
181 #:use-module (gnu packages photo)
182 #:use-module (gnu packages pkg-config)
183 #:use-module (gnu packages python)
184 #:use-module (gnu packages python-build)
185 #:use-module (gnu packages python-check)
186 #:use-module (gnu packages python-compression)
187 #:use-module (gnu packages python-crypto)
188 #:use-module (gnu packages python-science)
189 #:use-module (gnu packages python-web)
190 #:use-module (gnu packages qt)
191 #:use-module (gnu packages rdf)
192 #:use-module (gnu packages readline)
193 #:use-module (gnu packages regex)
194 #:use-module (gnu packages sdl)
195 #:use-module (gnu packages scanner)
196 #:use-module (gnu packages search)
197 #:use-module (gnu packages serialization)
198 #:use-module (gnu packages shells)
199 #:use-module (gnu packages sphinx)
200 #:use-module (gnu packages ssh)
201 #:use-module (gnu packages swig)
202 #:use-module (gnu packages terminals)
203 #:use-module (gnu packages tex)
204 #:use-module (gnu packages texinfo)
205 #:use-module (gnu packages textutils)
206 #:use-module (gnu packages time)
207 #:use-module (gnu packages tls)
208 #:use-module (gnu packages version-control)
209 #:use-module (gnu packages video)
210 #:use-module (gnu packages web)
211 #:use-module (gnu packages wxwidgets)
212 #:use-module (gnu packages base)
213 #:use-module (gnu packages xml)
214 #:use-module (gnu packages xorg)
215 #:use-module (gnu packages xdisorg)
216 #:use-module (gnu packages tcl)
217 #:use-module (gnu packages bdw-gc)
218 #:use-module (gnu packages serialization)
219 #:use-module (guix packages)
220 #:use-module (guix download)
221 #:use-module (guix git-download)
222 #:use-module (guix hg-download)
223 #:use-module (guix utils)
224 #:use-module (guix build-system gnu)
225 #:use-module (guix build-system cmake)
226 #:use-module (guix build-system python)
227 #:use-module (guix build-system trivial)
228 #:use-module (srfi srfi-1)
229 #:use-module (srfi srfi-26))
230
231 (define-public python-ueberzug
232 (package
233 (name "python-ueberzug")
234 (version "18.1.9")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (pypi-uri "ueberzug" version))
239 (sha256
240 (base32
241 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
242 (build-system python-build-system)
243 (inputs
244 `(("libx11" ,libx11)
245 ("libxext" ,libxext)))
246 (propagated-inputs
247 `(("python-attrs" ,python-attrs)
248 ("python-docopt" ,python-docopt)
249 ("python-pillow" ,python-pillow)
250 ("python-xlib" ,python-xlib)))
251 (home-page "https://github.com/seebye/ueberzug")
252 (synopsis "Command line util to display images in combination with X11")
253 (description "Überzug is a command line util which allows to draw images on
254 terminals by using child windows. The advantages of using Überzug are:
255 @itemize
256 @item No race conditions as a new window is created to display images.
257 @item Expose events will be processed, so images will be redrawn on switch
258 workspaces.
259 @item Tmux support (excluding multi pane windows).
260 @item Terminals without the WINDOWID environment variable are supported.
261 @item Chars are used as position - and size unit.
262 @item No memory leak (/ unlimited cache).
263 @end itemize")
264 (license license:gpl3+)))
265
266 (define-public python-fire
267 (package
268 (name "python-fire")
269 (version "0.4.0")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "fire" version))
274 (sha256
275 (base32
276 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
277 (build-system python-build-system)
278 (native-inputs
279 `(("python-pytest", python-pytest)))
280 (arguments
281 '(#:phases
282 (modify-phases %standard-phases
283 (replace 'check
284 (lambda* (#:key tests? #:allow-other-keys)
285 (when tests?
286 (invoke "pytest")))))))
287 (inputs
288 `(("python-six", python-six)
289 ("python-termcolor", python-termcolor)))
290 (synopsis "Library for automatically generating command line interfaces")
291 (description
292 "Fire is a library for automatically generating command line interfaces
293 from absolutely any Python object. The following are the advantages:
294 @itemize
295 @item A simple way to create a CLI in Python.
296 @item A helpful tool for developing and debugging Python code.
297 @item Helps with exploring existing code or turning other people's code into a
298 command line interface.
299 @item Makes transitioning between Bash and Python easier.
300 @item Makes using a Python REPL easier by setting up the REPL with the modules
301 and variables you'll need already imported and created.
302 @end itemize")
303 (home-page "https://github.com/google/python-fire")
304 (license license:asl2.0)))
305
306 (define-public python-twodict
307 (package
308 (name "python-twodict")
309 (version "1.2")
310 (source
311 (origin
312 (method url-fetch)
313 (uri (pypi-uri "twodict" version))
314 (sha256
315 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
316 (build-system python-build-system)
317 (home-page "https://github.com/MrS0m30n3/twodict")
318 (synopsis "Two way ordered dictionary for Python")
319 (description "TwoDict is a custom dictionary in which you can get the
320 key:value relationship but you can also get the value:key relationship. It also
321 remembers the order in which the items were inserted and supports almost all the
322 features of the Python's built-in dict.")
323 (license license:unlicense)))
324
325 (define-public python2-twodict
326 (package
327 (inherit python-twodict)
328 (name "python2-twodict")
329 (version "1.2")
330 (source
331 (origin
332 (method url-fetch)
333 (uri (pypi-uri "twodict" version))
334 (sha256
335 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
336 (build-system python-build-system)
337 (arguments
338 `(#:python ,python-2))))
339
340 (define-public python-argopt
341 (package
342 (name "python-argopt")
343 (version "0.7.0")
344 (source (origin
345 (method url-fetch)
346 (uri (pypi-uri "argopt" version))
347 (sha256
348 (base32
349 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
350 (build-system python-build-system)
351 (native-inputs
352 `(("python-coverage" ,python-coverage)
353 ("python-nose" ,python-nose)
354 ("python-setuptools" ,python-setuptools) ; Won't build without this.
355 ("python-setuptools-scm" ,python-setuptools-scm)))
356 (propagated-inputs
357 `(("python-toml" ,python-toml)
358 ("python-flake8" ,python-flake8)))
359 (home-page "https://github.com/casperdcl/argopt")
360 (synopsis "Generate a command-line interface from a docstring")
361 (description "This package provides tools to define a command line interface
362 from a docstring rather than the other way around.")
363 (license license:mpl2.0)))
364
365 (define-public python-cachetools
366 (package
367 (name "python-cachetools")
368 (version "4.2.2")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "cachetools" version))
372 (sha256
373 (base32
374 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
375 (build-system python-build-system)
376 (home-page "https://github.com/tkem/cachetools/")
377 (synopsis "Extensible memoizing collections and decorators")
378 (description "This module provides various memoizing collections and
379 decorators, including variants of the Python standard library's
380 @code{lru_cache} function decorator.")
381 (license license:expat)))
382
383 (define-public python-colorful
384 (package
385 (name "python-colorful")
386 (version "0.5.4")
387 (source
388 (origin
389 (method url-fetch)
390 (uri
391 (pypi-uri "colorful" version))
392 (sha256
393 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
394 (build-system python-build-system)
395 ;; FIXME: tests cannot be computed:
396 ;; "Can't perform this operation for unregistered loader type"
397 (arguments
398 `(#:tests? #f))
399 (native-inputs
400 `(("python-coverage" ,python-coverage)
401 ("python-flake8" ,python-flake8)
402 ("python-pytest" ,python-pytest)))
403 (propagated-inputs
404 `(("python-colorama" ,python-colorama)))
405 (home-page "http://github.com/timofurrer/colorful")
406 (synopsis "Terminal string styling")
407 (description "Colorful provides an array of text styles, that can be used
408 as functions or string constants to form colored terminal output.")
409 (license license:expat)))
410
411 (define-public python-yaspin
412 (package
413 (name "python-yaspin")
414 (version "1.5.0")
415 (source
416 (origin
417 (method url-fetch)
418 (uri
419 (pypi-uri "yaspin" version))
420 (sha256
421 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
422 (build-system python-build-system)
423 (native-inputs
424 `(("python-pytest" ,python-pytest)))
425 (home-page "https://github.com/pavdmyt/yaspin")
426 (synopsis "Yet Another Terminal Spinner")
427 (description "Yaspin provides a terminal spinner to indicate the progress
428 during long operations.")
429 (license license:expat)))
430
431 (define-public python-lunr
432 (package
433 (name "python-lunr")
434 (version "0.6.0")
435 (source
436 (origin
437 (method url-fetch)
438 (uri
439 (pypi-uri "lunr" version))
440 (sha256
441 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
442 (build-system python-build-system)
443 (native-inputs
444 `(("python-mock" ,python-mock)
445 ("python-pytest" ,python-pytest)))
446 (propagated-inputs
447 `(("python-nltk" ,python-nltk-3.4)))
448 (home-page
449 "https://github.com/yeraydiazdiaz/lunr.py")
450 (synopsis "Full-text search library")
451 (description "This package provides python library for full-text search.
452 It indexes documents and provides a search interface for retrieving documents
453 that best match text queries.")
454 (license license:expat)))
455
456 (define-public python-mkdocs
457 (package
458 (name "python-mkdocs")
459 (version "1.1.2")
460 (source
461 (origin
462 (method url-fetch)
463 (uri
464 (pypi-uri "mkdocs" version))
465 (sha256
466 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
467 (build-system python-build-system)
468 (arguments
469 `(#:phases
470 (modify-phases %standard-phases
471 ;; Requirements refer to a specific version of dependencies,
472 ;; which are too old. So we patch to refer to any later version.
473 (add-after 'unpack 'patch-requirements
474 (lambda _
475 (substitute* "setup.py"
476 (("==") ">=")))))))
477 (propagated-inputs
478 `(("python-click" ,python-click)
479 ("python-jinja2" ,python-jinja2)
480 ("python-livereload" ,python-livereload)
481 ("python-lunr" ,python-lunr)
482 ("python-markdown" ,python-markdown)
483 ("python-pyyaml" ,python-pyyaml)
484 ("python-tornado" ,python-tornado)))
485 (home-page "https://www.mkdocs.org")
486 (synopsis "Project documentation with Markdown")
487 (description "MkDocs is a static site generator geared towards building
488 project documentation. Documentation source files are written in Markdown, and
489 configured with a single YAML configuration file.")
490 (license license:bsd-3)))
491
492 (define-public python-pymdown-extensions
493 (package
494 (name "python-pymdown-extensions")
495 (version "8.1.1")
496 (source
497 (origin
498 (method url-fetch)
499 (uri
500 (pypi-uri "pymdown-extensions" version))
501 (sha256
502 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
503 (build-system python-build-system)
504 ;; FIXME: "AssertionError: False is not true"
505 (arguments
506 `(#:tests? #f))
507 (propagated-inputs
508 `(("python-markdown" ,python-markdown)))
509 (home-page "https://github.com/facelessuser/pymdown-extensions")
510 (synopsis "Extension pack for Python Markdown")
511 (description "PyMdown Extensions is a collection of extensions for Python
512 Markdown. All extensions are found under the module namespace of pymdownx.")
513 (license license:expat)))
514
515 (define-public python-mkdocs-material
516 (package
517 (name "python-mkdocs-material")
518 (version "7.1.3")
519 (source
520 (origin
521 (method url-fetch)
522 (uri
523 (pypi-uri "mkdocs-material" version))
524 (sha256
525 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
526 (build-system python-build-system)
527 (arguments
528 `(#:phases
529 (modify-phases %standard-phases
530 ;; Requirement mkdocs-material-extensions
531 ;; in-turn requires mkdocs-material. This causes
532 ;; circular dependency, so we remove this requirement.
533 (add-after 'unpack 'patch-requirements
534 (lambda _
535 (substitute* "requirements.txt"
536 (("mkdocs-material-extensions.*$") "")))))))
537 (propagated-inputs
538 `(("python-markdown" ,python-markdown)
539 ("python-mkdocs" ,python-mkdocs)
540 ("python-pygments" ,python-pygments)
541 ("python-pymdown-extensions"
542 ,python-pymdown-extensions)))
543 (home-page "https://squidfunk.github.io/mkdocs-material/")
544 (synopsis "Material Design theme for MkDocs")
545 (description "This package provides a theme plugin for the static site
546 generator MkDocs.")
547 (license license:expat)))
548
549 (define-public python-slixmpp
550 (package
551 (name "python-slixmpp")
552 (version "1.5.2")
553 (source
554 (origin
555 (method git-fetch)
556 (uri
557 (git-reference
558 (url "https://lab.louiz.org/poezio/slixmpp.git")
559 (commit
560 (string-append "slix-" version))))
561 (file-name
562 (git-file-name name version))
563 (sha256
564 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
565 (build-system python-build-system)
566 (arguments
567 `(#:phases
568 (modify-phases %standard-phases
569 (add-after 'unpack 'patch
570 (lambda _
571 (substitute* "setup.py"
572 (("'CC', 'cc'")
573 "'CC', 'gcc'"))
574 #t)))))
575 (native-inputs
576 `(("cython" ,python-cython)
577 ("gnupg" ,gnupg)
578 ("pkg-config" ,pkg-config)))
579 (propagated-inputs
580 `(("python-aiodns" ,python-aiodns)
581 ("python-aiohttp" ,python-aiohttp)
582 ("python-pyasn1" ,python-pyasn1)
583 ("python-pyasn1-modules" ,python-pyasn1-modules)))
584 (inputs
585 `(("libidn" ,libidn)
586 ("python" ,python))) ; We are building a Python extension.
587 (synopsis "XMPP library without threads")
588 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
589 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
590 socket handling, the timers, the events dispatching) in order to remove all
591 threads.")
592 (home-page "https://lab.louiz.org/poezio/slixmpp")
593 (license license:expat)))
594
595 (define-public python-tenacity
596 (package
597 (name "python-tenacity")
598 (version "6.1.0")
599 (source (origin
600 (method url-fetch)
601 (uri (pypi-uri "tenacity" version))
602 (sha256
603 (base32
604 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-setuptools-scm" ,python-setuptools-scm)
608 ("python-sphinx" ,python-sphinx)
609 ("python-tornado" ,python-tornado)
610 ("python-pytest" ,python-pytest)))
611 (propagated-inputs
612 `(("python-six" ,python-six)))
613 (arguments
614 `(#:phases (modify-phases %standard-phases
615 (replace 'check
616 (lambda _
617 (invoke "pytest")
618 #t)))))
619 (home-page "https://github.com/jd/tenacity")
620 (synopsis "Retrying library for python")
621 (description "Tenacity is a general-purpose python library to simplify the
622 task of adding retry behavior to just about anything.")
623 (license license:asl2.0)))
624
625 (define-public python-pytelegrambotapi
626 (package
627 (name "python-pytelegrambotapi")
628 (version "3.7.4")
629 (source
630 (origin
631 (method git-fetch)
632 (uri (git-reference
633 (url "https://github.com/eternnoir/pyTelegramBotAPI")
634 (commit version)))
635 (file-name (git-file-name name version))
636 (sha256
637 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
638 (build-system python-build-system)
639 (arguments
640 `(#:phases
641 (modify-phases %standard-phases
642 (replace 'check
643 (lambda* (#:key tests? #:allow-other-keys)
644 (when tests?
645 (with-directory-excursion "tests"
646 (invoke "py.test")))
647 #t)))))
648 (propagated-inputs
649 `(("python-requests" ,python-requests)))
650 (native-inputs
651 `(("python-pytest" ,python-pytest)))
652 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
653 (synopsis "Python Telegram bot api")
654 (description "This package provides a simple, but extensible Python
655 implementation for the Telegram Bot API.")
656 (license license:gpl2)))
657
658 (define-public python-colorlog
659 (package
660 (name "python-colorlog")
661 (version "4.1.0")
662 (source (origin
663 (method url-fetch)
664 (uri (pypi-uri "colorlog" version))
665 (sha256
666 (base32
667 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
668 (build-system python-build-system)
669 (native-inputs
670 `(("python-pytest" ,python-pytest)))
671 (arguments
672 `(#:phases (modify-phases %standard-phases
673 (replace 'check
674 (lambda _
675 ;; Extend PYTHONPATH so the built package will be found.
676 (setenv "PYTHONPATH"
677 (string-append (getcwd) "/build/lib:"
678 (getenv "PYTHONPATH")))
679 (invoke "pytest" "-p" "no:logging")
680 #t)))))
681 (home-page "https://github.com/borntyping/python-colorlog")
682 (synopsis "Log formatting with colors for python")
683 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
684 with Python's logging module that outputs records using terminal colors.")
685 (license license:expat)))
686
687 (define-public python-pyprind
688 (package
689 (name "python-pyprind")
690 (version "2.11.3")
691 (source (origin
692 (method url-fetch)
693 (uri (pypi-uri "PyPrind" version))
694 (sha256
695 (base32
696 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
697 (build-system python-build-system)
698 (propagated-inputs
699 `(("python-psutil" ,python-psutil)))
700 (home-page "https://github.com/rasbt/pyprind")
701 (synopsis "Python Progress Bar and Percent Indicator Utility")
702 (description "The PyPrind (Python Progress Indicator) module provides a
703 progress bar and a percentage indicator object that let you track the progress
704 of a loop structure or other iterative computation.")
705 (license license:bsd-3)))
706
707 (define-public python-gphoto2
708 (package
709 (name "python-gphoto2")
710 (version "2.2.1")
711 (source (origin
712 (method url-fetch)
713 (uri (pypi-uri "gphoto2" version))
714 (sha256
715 (base32
716 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
717 (build-system python-build-system)
718 (native-inputs
719 `(("pkg-config" ,pkg-config)))
720 (inputs
721 `(("libgphoto2" ,libgphoto2)))
722 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
723 (synopsis "Python interface to libgphoto2")
724 (description "@code{python-gphoto2} is a comprehensive Python interface
725 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
726 automatically generate the interface code.")
727 (license license:gpl3+)))
728
729 (define-public python-colour
730 (package
731 (name "python-colour")
732 (version "0.1.5")
733 (source (origin
734 (method url-fetch)
735 (uri (pypi-uri "colour" version))
736 (sha256
737 (base32
738 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
739 (build-system python-build-system)
740 (native-inputs
741 `(("python-d2to1" ,python-d2to1)))
742 (home-page "https://github.com/vaab/colour")
743 (synopsis "Convert and manipulate various color representations")
744 (description "Pythonic way to manipulate color representations (HSL, RVB,
745 web, X11, ...).")
746 (license license:expat)))
747
748 (define-public python-d2to1
749 (package
750 (name "python-d2to1")
751 (version "0.2.12.post1")
752 (source (origin
753 (method url-fetch)
754 (uri (pypi-uri "d2to1" version))
755 (sha256
756 (base32
757 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
758 (build-system python-build-system)
759 (native-inputs
760 `(("python-nose" ,python-nose)))
761 (home-page "https://github.com/embray/d2to1")
762 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
763 in python")
764 (description "The python package d2to1 (the d is for distutils) allows
765 using distutils2-like setup.cfg files for a package's metadata with a
766 distribute/setuptools setup.py script.")
767 (license license:bsd-2)))
768
769 (define-public python-rawkit
770 (package
771 (name "python-rawkit")
772 (version "0.6.0")
773 (source (origin
774 (method url-fetch)
775 (uri (pypi-uri "rawkit" version))
776 (sha256
777 (base32
778 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
779 (build-system python-build-system)
780 (native-inputs
781 `(("python-pytest" ,python-pytest)
782 ("python-mock" ,python-mock)))
783 (inputs
784 `(("libraw" ,libraw)))
785 (home-page "https://rawkit.readthedocs.io")
786 (synopsis "Ctypes-based LibRaw binding for Python")
787 (description "The rawkit package provides two modules: rawkit and libraw.
788 The rawkit module provides a high-level Pythonic interface for developing raw
789 photos, while the libraw module provides a CTypes based interface for
790 interacting with the low-level LibRaw C APIs.")
791 (license license:expat)))
792
793 (define-public python-easygui
794 (package
795 (name "python-easygui")
796 (version "0.98.1")
797 (source (origin
798 (method url-fetch)
799 (uri (pypi-uri "easygui" version))
800 (sha256
801 (base32
802 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
803 (build-system python-build-system)
804 (propagated-inputs
805 `(("python-tkinter" ,python "tk")))
806 (home-page "https://github.com/robertlugg/easygui")
807 (synopsis "GUI programming module for Python")
808 (description "EasyGUI is a module for very simple, very easy GUI
809 programming in Python. EasyGUI is different from other GUI generators in that
810 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
811 simple function calls.")
812 (license license:bsd-3)))
813
814 (define-public python-pymd4c
815 (package
816 (name "python-pymd4c")
817 (version "0.4.6.0b1")
818 (source
819 (origin
820 (method url-fetch)
821 (uri (pypi-uri "pymd4c" version))
822 (sha256
823 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
824 (build-system python-build-system)
825 (inputs
826 `(("md4c" ,md4c)))
827 (native-inputs
828 `(("python-flake8" ,python-flake8)
829 ("python-pkgconfig" ,python-pkgconfig)
830 ("pkg-config" ,pkg-config)))
831 (home-page "https://github.com/dominickpastore/pymd4c")
832 (synopsis "Python bindings for MD4C")
833 (description
834 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
835 to CommonMark.")
836 (license license:expat)))
837
838 (define-public python-pymediainfo
839 (package
840 (name "python-pymediainfo")
841 (version "4.1")
842 (source
843 (origin
844 (method url-fetch)
845 (uri (pypi-uri "pymediainfo" version))
846 (sha256
847 (base32
848 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
849 (build-system python-build-system)
850 (native-inputs
851 `(("python-setuptools-scm" ,python-setuptools-scm)
852 ("python-pytest" ,python-pytest)))
853 (inputs
854 `(("libmediainfo" ,libmediainfo)))
855 (arguments
856 `(#:phases
857 (modify-phases %standard-phases
858 (add-after 'unpack 'patch-libmediainfo
859 (lambda _
860 (substitute* "pymediainfo/__init__.py"
861 (("libmediainfo.so.0")
862 (string-append (assoc-ref %build-inputs "libmediainfo")
863 "/lib/libmediainfo.so.0")))
864 #t))
865 (replace 'check
866 (lambda* (#:key tests? #:allow-other-keys)
867 (when tests?
868 ;; Extend PYTHONPATH so the built package will be found.
869 (setenv "PYTHONPATH"
870 (string-append (getcwd) "/build/lib:"
871 (getenv "PYTHONPATH")))
872 ;; Skip the only failing test "test_parse_url"
873 (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
874 (home-page
875 "https://github.com/sbraz/pymediainfo")
876 (synopsis
877 "Python wrapper for the mediainfo library")
878 (description
879 "Python wrapper for the mediainfo library to access the technical and tag
880 data for video and audio files.")
881 (license license:expat)))
882
883 (define-public python-psutil
884 (package
885 (name "python-psutil")
886 (version "5.8.0")
887 (source
888 (origin
889 (method url-fetch)
890 (uri (pypi-uri "psutil" version))
891 (sha256
892 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
893 (build-system python-build-system)
894 (arguments
895 ;; FIXME: some tests do not return and time out. Some tests fail because
896 ;; some processes survive kill().
897 '(#:tests? #f))
898 (home-page "https://github.com/giampaolo/psutil")
899 (synopsis "Library for retrieving information on running processes")
900 (description
901 "@code{psutil} (Python system and process utilities) is a library for
902 retrieving information on running processes and system utilization (CPU,
903 memory, disks, network) in Python. It is useful mainly for system monitoring,
904 profiling and limiting process resources and management of running processes.
905 It implements many functionalities offered by command line tools such as: ps,
906 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
907 iotop, uptime, pidof, tty, taskset, pmap.")
908 (properties `((python2-variant . ,(delay python2-psutil))))
909 (license license:bsd-3)))
910
911 (define-public python2-psutil
912 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
913 (package/inherit base
914 (propagated-inputs
915 `(("python2-enum34" ,python2-enum34) ;optional
916 ,@(package-propagated-inputs base))))))
917
918 (define-public python-shapely
919 (package
920 (name "python-shapely")
921 (version "1.7.1")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "Shapely" version))
926 (sha256
927 (base32
928 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
929 (modules '((guix build utils)))
930 (snippet
931 '(begin
932 (delete-file "shapely/speedups/_speedups.c")
933 (delete-file "shapely/vectorized/_vectorized.c")
934 #t))))
935 (build-system python-build-system)
936 (native-inputs
937 `(("python-cython" ,python-cython)
938 ("python-matplotlib" ,python-matplotlib)
939 ("python-pytest" ,python-pytest)
940 ("python-pytest-cov" ,python-pytest-cov)))
941 (inputs
942 `(("geos" ,geos)))
943 (propagated-inputs
944 `(("python-numpy" ,python-numpy)))
945 (arguments
946 `(#:phases
947 (modify-phases %standard-phases
948 (add-after 'unpack 'patch-geos-path
949 (lambda* (#:key inputs #:allow-other-keys)
950 (let ((geos (assoc-ref inputs "geos"))
951 (glibc (assoc-ref inputs ,(if (%current-target-system)
952 "cross-libc" "libc"))))
953 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
954 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
955 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
956 geos "/lib/libgeos_c.so'])"))
957 (("free = load_dll\\('c'\\)\\.free")
958 (string-append "free = load_dll('c', fallbacks=['"
959 glibc "/lib/libc.so.6']).free"))
960 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
961 (string-append "free = load_dll('c', fallbacks=['"
962 glibc "/lib/libc.so.6']).free"))))
963 #t)))))
964 (home-page "https://github.com/Toblerity/Shapely")
965 (synopsis "Library for the manipulation and analysis of geometric objects")
966 (description "Shapely is a Python package for manipulation and analysis of
967 planar geometric objects. It is based on the @code{GEOS} library.")
968 (license license:bsd-3)))
969
970 (define-public python-shortuuid
971 (package
972 (name "python-shortuuid")
973 (version "0.5.0")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "shortuuid" version))
978 (sha256
979 (base32
980 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
981 (build-system python-build-system)
982 (native-inputs
983 `(("python-pep8" ,python-pep8)))
984 (home-page "https://github.com/skorokithakis/shortuuid")
985 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
986 (description
987 "@code{shortuuid} is a Python library for generating concise, unambiguous
988 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
989 module and then similar looking characters are removed.")
990 (license license:bsd-3)))
991
992 (define-public python-logwrap
993 (package
994 (name "python-logwrap")
995 (version "8.2.0.post0")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (pypi-uri "logwrap" version))
1000 (sha256
1001 (base32
1002 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
1003 (build-system python-build-system)
1004 (arguments
1005 `(#:tests? #f ; Tests not included in pypi release.
1006 #:phases
1007 (modify-phases %standard-phases
1008 (replace 'check
1009 (lambda* (#:key tests? #:allow-other-keys)
1010 (when tests?
1011 (invoke "pytest"))
1012 #t)))))
1013 (native-inputs
1014 `(("python-cython" ,python-cython)
1015 ("python-pytest" ,python-pytest)
1016 ("python-setuptools-scm" ,python-setuptools-scm)
1017 ("python-toml" ,python-toml)
1018 ("python-wheel" ,python-wheel)))
1019 (home-page "https://github.com/python-useful-helpers/logwrap")
1020 (synopsis "Decorator for logging function arguments")
1021 (description "This package provides a decorator to log function arguments
1022 and function call return values in a human-readable way.")
1023 (license license:asl2.0)))
1024
1025 (define-public python-clyent
1026 (package
1027 (name "python-clyent")
1028 (version "1.2.1")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (pypi-uri "clyent" version))
1033 (sha256
1034 (base32
1035 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1036 (build-system python-build-system)
1037 (native-inputs
1038 `(("python-mock" ,python-mock)))
1039 (home-page "https://github.com/Anaconda-Platform/clyent")
1040 (synopsis "Command line client library")
1041 (description "Clyent is a Python command line utility library. It is used
1042 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1043 (license license:bsd-3)))
1044
1045 (define-public python2-clyent
1046 (package-with-python2 python-clyent))
1047
1048 (define-public python-babel
1049 (package
1050 (name "python-babel")
1051 (version "2.9.0")
1052 (source
1053 (origin
1054 (method url-fetch)
1055 (uri (pypi-uri "Babel" version))
1056 (sha256
1057 (base32
1058 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1059 (build-system python-build-system)
1060 (native-inputs
1061 `(("python-freezegun" ,python-freezegun)
1062 ("python-pytest" ,python-pytest)))
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 "http://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-5.23) ; use_true_random=... from >=5.19.0
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 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
1223 ;; on to import numpy. Somehow this works on their CI system.
1224 ;; Let's just manage PYTHONPATH here instead.
1225 (substitute* "runexamples.sh"
1226 (("export PYTHONPATH=.*") ""))
1227 (setenv "PYTHONPATH"
1228 (string-append (getcwd) ":"
1229 (getenv "PYTHONPATH")))
1230 (invoke "./runexamples.sh")
1231 (invoke "nosetests" "-v"))))))
1232 (home-page "https://github.com/fhs/python-hdf4")
1233 (synopsis "Python interface to the NCSA HDF4 library")
1234 (description
1235 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1236 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1237 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1238 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1239 (license license:expat)))
1240
1241 (define-public python-h5py
1242 (package
1243 (name "python-h5py")
1244 (version "2.10.0")
1245 (source
1246 (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "h5py" version))
1249 (sha256
1250 (base32
1251 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1252 (build-system python-build-system)
1253 (arguments
1254 `(#:tests? #f ; no test target
1255 #:phases
1256 (modify-phases %standard-phases
1257 (add-after 'unpack 'fix-hdf5-paths
1258 (lambda* (#:key inputs #:allow-other-keys)
1259 (let ((prefix (assoc-ref inputs "hdf5")))
1260 (substitute* "setup_build.py"
1261 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1262 (string-append "['" prefix "/lib" "']"))
1263 (("'/opt/local/include', '/usr/local/include'")
1264 (string-append "'" prefix "/include" "'")))
1265 (substitute* "setup_configure.py"
1266 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1267 (string-append "['" prefix "/lib" "']")))
1268 #t))))))
1269 (propagated-inputs
1270 `(("python-six" ,python-six)
1271 ("python-numpy" ,python-numpy)))
1272 (inputs
1273 `(("hdf5" ,hdf5-1.10)))
1274 (native-inputs
1275 `(("python-cython" ,python-cython)
1276 ("python-pkgconfig" ,python-pkgconfig)
1277 ("pkg-config" ,pkg-config)))
1278 (home-page "https://www.h5py.org/")
1279 (synopsis "Read and write HDF5 files from Python")
1280 (description
1281 "The h5py package provides both a high- and low-level interface to the
1282 HDF5 library from Python. The low-level interface is intended to be a
1283 complete wrapping of the HDF5 API, while the high-level component supports
1284 access to HDF5 files, datasets and groups using established Python and NumPy
1285 concepts.")
1286 (license license:bsd-3)))
1287
1288 (define-public python2-h5py
1289 (package-with-python2 python-h5py))
1290
1291 (define-public python-pyls-black
1292 (package
1293 (name "python-pyls-black")
1294 (version "0.4.6")
1295 (source
1296 (origin
1297 ;; There are no tests in the PyPI tarball.
1298 (method git-fetch)
1299 (uri (git-reference
1300 (url "https://github.com/rupert/pyls-black/")
1301 (commit (string-append "v" version))))
1302 (file-name (git-file-name name version))
1303 (sha256
1304 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1305 (build-system python-build-system)
1306 (arguments
1307 `(#:test-target "pytest"))
1308 (propagated-inputs
1309 `(("python-black" ,python-black)
1310 ("python-language-server"
1311 ,python-language-server)
1312 ("python-toml" ,python-toml)))
1313 (native-inputs
1314 `(("python-flake8" ,python-flake8)
1315 ("python-isort" ,python-isort)
1316 ("python-mypy" ,python-mypy)
1317 ("python-pytest" ,python-pytest)
1318 ("python-pytest-runner" ,python-pytest-runner)))
1319 (home-page "https://github.com/rupert/pyls-black")
1320 (synopsis "Black plugin for the Python Language Server")
1321 (description "Black plugin for the Python Language Server.")
1322 (license license:expat)))
1323
1324 (define-public python-sh
1325 (package
1326 (name "python-sh")
1327 (version "1.12.14")
1328 (source
1329 (origin
1330 (method url-fetch)
1331 (uri (pypi-uri "sh" version))
1332 (sha256
1333 (base32
1334 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1335 (build-system python-build-system)
1336 (arguments
1337 '(#:phases
1338 (modify-phases %standard-phases
1339 (replace 'check
1340 (lambda _
1341 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1342 (setenv "HOME" "/tmp")
1343 (invoke "python" "sh.py" "test"))))))
1344 (native-inputs
1345 `(("python-coverage" ,python-coverage)))
1346 (home-page "https://github.com/amoffat/sh")
1347 (synopsis "Python subprocess replacement")
1348 (description "This package provides a replacement for Python's
1349 @code{subprocess} feature.")
1350 (license license:expat)))
1351
1352 (define-public python-cftime
1353 (package
1354 (name "python-cftime")
1355 (version "1.0.4.2")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "cftime" version))
1360 (sha256
1361 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1362 (build-system python-build-system)
1363 (propagated-inputs
1364 `(("python-numpy" ,python-numpy)))
1365 (native-inputs
1366 `(("python-coveralls" ,python-coveralls)
1367 ("python-cython" ,python-cython)
1368 ("python-pytest-cov" ,python-pytest-cov)))
1369 (home-page "https://github.com/Unidata/cftime")
1370 (synopsis "Library for time handling")
1371 (description
1372 "This package provides time-handling functionality that used to be part
1373 of the netcdf4 package before.")
1374 ;; This package claims to include code under the GPLv3 but is released
1375 ;; under ISC.
1376 (license (list license:isc license:gpl3+))))
1377
1378 (define-public python-netcdf4
1379 (package
1380 (name "python-netcdf4")
1381 (version "1.5.3")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "netCDF4" version))
1386 (sha256
1387 (base32
1388 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1389 (build-system python-build-system)
1390 (arguments
1391 '(#:phases
1392 (modify-phases %standard-phases
1393 (add-after 'unpack 'configure-locations
1394 (lambda* (#:key inputs #:allow-other-keys)
1395 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1396 #t)))))
1397 (native-inputs
1398 `(("python-cython" ,python-cython)))
1399 (propagated-inputs
1400 `(("python-numpy" ,python-numpy)
1401 ("python-cftime" ,python-cftime)))
1402 (inputs
1403 `(("netcdf" ,netcdf)
1404 ("hdf4" ,hdf4)
1405 ("hdf5" ,hdf5)))
1406 (home-page "https://github.com/Unidata/netcdf4-python")
1407 (synopsis "Python/numpy interface to the netCDF library")
1408 (description "Netcdf4-python is a Python interface to the netCDF C
1409 library. netCDF version 4 has many features not found in earlier
1410 versions of the library and is implemented on top of HDF5. This module
1411 can read and write files in both the new netCDF 4 and the old netCDF 3
1412 format, and can create files that are readable by HDF5 clients. The
1413 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1414 to users of that module.")
1415 ;; The software is mainly ISC, but includes some files covered
1416 ;; by the Expat license.
1417 (license (list license:isc license:expat))))
1418
1419 (define-public python-ncclient
1420 (package
1421 (name "python-ncclient")
1422 (version "0.6.12")
1423 (source
1424 (origin
1425 (method git-fetch) ;no tests in PyPI release
1426 (uri (git-reference
1427 (url "https://github.com/ncclient/ncclient")
1428 (commit (string-append "v" version))))
1429 (file-name (git-file-name name version))
1430 (sha256
1431 (base32
1432 "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:phases (modify-phases %standard-phases
1436 (replace 'check
1437 (lambda* (#:key tests? #:allow-other-keys)
1438 (when tests?
1439 (invoke "pytest")))))))
1440 (native-inputs
1441 `(("python-pytest" ,python-pytest)))
1442 (propagated-inputs
1443 `(("python-lxml" ,python-lxml)
1444 ("python-paramiko" ,python-paramiko)))
1445 (home-page "https://github.com/ncclient/ncclient")
1446 (synopsis "Python library for NETCONF clients")
1447 (description "@code{ncclient} is a Python library that facilitates
1448 client-side scripting and application development around the NETCONF
1449 protocol.")
1450 (license license:asl2.0)))
1451
1452 (define-public python-license-expression
1453 (package
1454 (name "python-license-expression")
1455 (version "1.2")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (pypi-uri "license-expression" version))
1460 (sha256
1461 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1462 (build-system python-build-system)
1463 (propagated-inputs
1464 `(("python-boolean.py" ,python-boolean.py)))
1465 (home-page "https://github.com/nexB/license-expression")
1466 (synopsis "Apply boolean logic to license expressions")
1467 (description
1468 "This Python module defines a tiny language to evaluate and compare
1469 license expressions using boolean logic. Logical combinations of licenses can
1470 be tested for equality, containment, and equivalence. They can be normalised
1471 and simplified. It supports SPDX license expressions as well as other naming
1472 conventions and aliases in the same expression.")
1473 (license license:gpl2+)))
1474
1475 (define-public python-lockfile
1476 (package
1477 (name "python-lockfile")
1478 (version "0.12.2")
1479 (source
1480 (origin
1481 (method url-fetch)
1482 (uri (pypi-uri "lockfile" version))
1483 (sha256
1484 (base32
1485 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1486 (build-system python-build-system)
1487 (arguments '(#:test-target "check"))
1488 (native-inputs
1489 `(("python-pbr" ,python-pbr)))
1490 (home-page "https://launchpad.net/pylockfile")
1491 (synopsis "Platform-independent file locking module")
1492 (description
1493 "The lockfile package exports a LockFile class which provides a simple
1494 API for locking files.")
1495 (license license:expat)))
1496
1497 (define-public python-fb-re2
1498 (package
1499 (name "python-fb-re2")
1500 (version "1.0.7")
1501 (source
1502 (origin
1503 (method git-fetch)
1504 (uri (git-reference
1505 (url "https://github.com/facebook/pyre2")
1506 (commit (string-append "v" version))))
1507 (file-name (git-file-name name version))
1508 (sha256
1509 (base32
1510 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1511 (build-system python-build-system)
1512 (inputs
1513 `(("re2" ,re2)))
1514 (home-page "https://github.com/facebook/pyre2")
1515 (synopsis "Python wrapper for RE2")
1516 (description "This package provides a Python extension that wraps Google's
1517 RE2 regular expression library. It implements many of the features of
1518 Python's built-in @code{re} module with compatible interfaces.")
1519 (license license:bsd-3)))
1520
1521 (define-public python-filelock
1522 (package
1523 (name "python-filelock")
1524 (version "3.0.12")
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (pypi-uri "filelock" version))
1529 (sha256
1530 (base32
1531 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1532 (build-system python-build-system)
1533 (home-page
1534 "https://github.com/benediktschmitt/py-filelock")
1535 (synopsis "Platform independent file lock")
1536 (description "@code{filelock} contains a single module implementing
1537 a platform independent file lock in Python, which provides a simple way of
1538 inter-process communication.")
1539 (license license:unlicense)))
1540
1541 (define-public python-semantic-version
1542 (package
1543 (name "python-semantic-version")
1544 (version "2.8.5")
1545 (source
1546 (origin
1547 (method url-fetch)
1548 (uri (pypi-uri "semantic_version" version))
1549 (sha256
1550 (base32
1551 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1552 (build-system python-build-system)
1553 (home-page "https://github.com/rbarrois/python-semanticversion")
1554 (synopsis "Semantic versioning module for Python")
1555 (description
1556 "The @code{semantic_version} class is a small library for handling
1557 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1558
1559 It can compare versions, generate a new version that represents a bump in one of
1560 the version levels, and check whether any given string is a proper semantic
1561 version identifier.")
1562 (license license:bsd-3)))
1563
1564 (define-public python2-semantic-version
1565 (package-with-python2 python-semantic-version))
1566
1567 (define-public python-serpent
1568 (package
1569 (name "python-serpent")
1570 (version "1.28")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (pypi-uri "serpent" version))
1575 (sha256
1576 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1577 (build-system python-build-system)
1578 (native-inputs
1579 `(("python-attrs" ,python-attrs)
1580 ("python-pytz" ,python-pytz)))
1581 (home-page "https://github.com/irmen/Serpent")
1582 (synopsis "Serializer for literal Python expressions")
1583 (description
1584 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1585 serialization. It serializes an object tree into bytes (an utf-8 encoded
1586 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1587 to rebuild the original object tree.
1588
1589 Because only safe literals are encoded, it is safe to send serpent data to
1590 other machines, such as over the network.")
1591 (properties `((python2-variant . ,(delay python2-serpent))))
1592 (license license:expat)))
1593
1594 (define-public python2-serpent
1595 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1596 (package/inherit base
1597 (propagated-inputs
1598 `(("python-enum34" ,python2-enum34)
1599 ,@(package-propagated-inputs base))))))
1600
1601 (define-public python-setuptools
1602 (package
1603 (name "python-setuptools")
1604 (version "52.0.0")
1605 (source
1606 (origin
1607 (method url-fetch)
1608 (uri (pypi-uri "setuptools" version))
1609 (sha256
1610 (base32
1611 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1612 (modules '((guix build utils)))
1613 (snippet
1614 '(begin
1615 ;; Remove included binaries which are used to build self-extracting
1616 ;; installers for Windows.
1617 ;; TODO: Find some way to build them ourself so we can include them.
1618 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1619 #t))))
1620 (build-system python-build-system)
1621 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1622 ;; One could bootstrap with an internal untested setuptools.
1623 (arguments
1624 `(#:tests? #f))
1625 (home-page "https://pypi.org/project/setuptools/")
1626 (synopsis
1627 "Library designed to facilitate packaging Python projects")
1628 (description
1629 "Setuptools is a fully-featured, stable library designed to facilitate
1630 packaging Python projects, where packaging includes:
1631 Python package and module definitions,
1632 distribution package metadata,
1633 test hooks,
1634 project installation,
1635 platform-specific details,
1636 Python 3 support.")
1637 ;; TODO: setuptools now bundles the following libraries:
1638 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1639 (license (list license:psfl ; setuptools itself
1640 license:expat ; six, appdirs, pyparsing
1641 license:asl2.0 ; packaging is dual ASL2/BSD-2
1642 license:bsd-2))
1643 (properties `((python2-variant . ,(delay python2-setuptools))))))
1644
1645 ;; Newer versions of setuptools no longer support Python 2.
1646 (define-public python2-setuptools
1647 (package
1648 (name "python2-setuptools")
1649 (version "41.0.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "setuptools" version ".zip"))
1654 (sha256
1655 (base32
1656 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1657 (modules '((guix build utils)))
1658 (snippet
1659 '(begin
1660 ;; Remove included binaries which are used to build self-extracting
1661 ;; installers for Windows.
1662 ;; TODO: Find some way to build them ourself so we can include them.
1663 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1664 #t))))
1665 (build-system python-build-system)
1666 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1667 ;; One could bootstrap with an internal untested setuptools.
1668 (arguments
1669 `(#:tests? #f))
1670 (native-inputs
1671 `(("unzip" ,unzip)))
1672 (home-page "https://pypi.org/project/setuptools/")
1673 (synopsis
1674 "Library designed to facilitate packaging Python projects")
1675 (description
1676 "Setuptools is a fully-featured, stable library designed to facilitate
1677 packaging Python projects, where packaging includes:
1678 Python package and module definitions,
1679 distribution package metadata,
1680 test hooks,
1681 project installation,
1682 platform-specific details,
1683 Python 3 support.")
1684 ;; TODO: setuptools now bundles the following libraries:
1685 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1686 (license (list license:psfl ; setuptools itself
1687 license:expat ; six, appdirs, pyparsing
1688 license:asl2.0 ; packaging is dual ASL2/BSD-2
1689 license:bsd-2))))
1690
1691 (define-public python-setuptools-declarative-requirements
1692 (package
1693 (name "python-setuptools-declarative-requirements")
1694 (version "1.2.0")
1695 (source
1696 (origin
1697 (method url-fetch)
1698 (uri (pypi-uri
1699 "setuptools-declarative-requirements"
1700 version))
1701 (sha256
1702 (base32
1703 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1704 (build-system python-build-system)
1705 (native-inputs
1706 `(("python-pytest" ,python-pytest)
1707 ("python-setuptools-scm" ,python-setuptools-scm)))
1708 (propagated-inputs
1709 `(("python-toml" ,python-toml)
1710 ("python-wheel" ,python-wheel)))
1711 (home-page
1712 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1713 (synopsis "File support for setuptools declarative setup.cfg")
1714 (description
1715 "This package provides file support for setuptools declarative
1716 @code{setup.cfg}.")
1717 (license license:asl2.0)))
1718
1719 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1720 (define-public python-setuptools-for-tensorflow
1721 (hidden-package
1722 (package
1723 (inherit python-setuptools)
1724 (version "39.1.0")
1725 (source (origin
1726 (inherit (package-source python-setuptools))
1727 (uri (pypi-uri "setuptools" version ".zip"))
1728 (sha256
1729 (base32
1730 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1731
1732 (define-public python-uniseg
1733 (package
1734 (name "python-uniseg")
1735 (version "0.7.1")
1736 (source
1737 (origin
1738 (method url-fetch)
1739 (uri (pypi-uri "uniseg" version ".zip"))
1740 (sha256
1741 (base32
1742 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1743 (build-system python-build-system)
1744 (arguments
1745 '(#:tests? #f)) ; The test suite requires network access.
1746 (native-inputs
1747 `(("unzip" ,unzip)))
1748 (home-page
1749 "https://bitbucket.org/emptypage/uniseg-python")
1750 (synopsis
1751 "Python library to determine Unicode text segmentations")
1752 (description
1753 "Uniseg is a Python package used to determine Unicode text segmentations.
1754 Supported segmentations include:
1755 @enumerate
1756 @item @dfn{Code point} (any value in the Unicode codespace)
1757 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1758 multiple Unicode code points, e.g. \"G\" + acute-accent)
1759 @item Word break
1760 @item Sentence break
1761 @item Line break
1762 @end enumerate")
1763 (license license:expat)))
1764
1765 (define-public python2-uniseg
1766 (package-with-python2 python-uniseg))
1767
1768 (define-public python-humanfriendly
1769 (package
1770 (name "python-humanfriendly")
1771 (version "8.2")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (pypi-uri "humanfriendly" version))
1776 (sha256
1777 (base32
1778 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1779 (build-system python-build-system)
1780 (arguments
1781 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1782 #:tests? #f))
1783 (home-page "https://humanfriendly.readthedocs.io")
1784 (synopsis "Human-friendly input and output in Python")
1785 (description
1786 "The functions and classes in @code{humanfriendly} can be used to make
1787 text interfaces more user-friendly. It includes tools to parse and format
1788 numbers, file sizes, and timespans, timers for long-running operations, menus
1789 to allow the user to choose from a list of options, and terminal interaction
1790 helpers.")
1791 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1792 (license license:expat)))
1793
1794 (define-public python2-humanfriendly
1795 (let ((base (package-with-python2
1796 (strip-python2-variant python-humanfriendly))))
1797 (package/inherit base
1798 (propagated-inputs
1799 `(("python2-monotonic" ,python2-monotonic)
1800 ,@(package-propagated-inputs base))))))
1801
1802 (define-public python-textparser
1803 (package
1804 (name "python-textparser")
1805 (version "0.23.0")
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "textparser" version))
1810 (sha256
1811 (base32
1812 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1813 (build-system python-build-system)
1814 (home-page "https://github.com/eerimoq/textparser")
1815 (synopsis "Fast text parser for Python")
1816 (description "This library provides a text parser written in the Python
1817 language. It aims to be fast.")
1818 (license license:expat)))
1819
1820 (define-public python-aenum
1821 (package
1822 (name "python-aenum")
1823 (version "2.2.4")
1824 (source
1825 (origin
1826 (method url-fetch)
1827 (uri (pypi-uri "aenum" version))
1828 (sha256
1829 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1830 (build-system python-build-system)
1831 (arguments
1832 `(#:phases (modify-phases %standard-phases
1833 (replace 'check
1834 (lambda _
1835 (format #t "current working dir ~s~%" (getcwd))
1836 (setenv "PYTHONPATH"
1837 (string-append ".:" (getenv "PYTHONPATH")))
1838 ;; We must run the test suite module directly, as it
1839 ;; fails to define the 'tempdir' variable in scope for
1840 ;; the tests otherwise
1841 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1842 ;; issues/32/running-tests-with-python-setuppy-test).
1843 (invoke "python3" "aenum/test.py")
1844 ;; This one fails with "NameError: name
1845 ;; 'test_pickle_dump_load' is not defined" (see:
1846 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1847 ;; /error-running-the-test_v3py-test-suite).
1848 ;; (invoke "python3" "aenum/test_v3.py")
1849 #t)))))
1850 (home-page "https://bitbucket.org/stoneleaf/aenum")
1851 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1852 (description "The aenum library includes an @code{Enum} base class, a
1853 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1854 class.")
1855 (license license:bsd-3)))
1856
1857 (define-public python-can
1858 (package
1859 (name "python-can")
1860 (version "3.3.3")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "python-can" version))
1865 (sha256
1866 (base32
1867 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1868 (build-system python-build-system)
1869 (arguments
1870 `(#:phases (modify-phases %standard-phases
1871 (add-after 'unpack 'relax-version-requirements
1872 (lambda _
1873 (substitute* "setup.py"
1874 (("mock~=2\\.0") "mock")
1875 (("coverage<5") "coverage")
1876 (("pytest~=4\\.3") "pytest")
1877 (("hypothesis~=4\\.56") "hypothesis"))
1878 #t))
1879 (add-after 'unpack 'fix-broken-tests
1880 ;; The tests try to run two scripts it expects should be
1881 ;; in PATH, but they aren't at this time (see:
1882 ;; https://github.com/hardbyte/python-can/issues/805).
1883 (lambda _
1884 (substitute* "test/test_scripts.py"
1885 (("\"can_logger\\.py --help\"") "")
1886 (("\"can_player\\.py --help\"") ""))
1887 #t)))))
1888 (propagated-inputs
1889 `(("python-aenum" ,python-aenum)
1890 ("python-wrapt" ,python-wrapt)))
1891 (native-inputs
1892 `(("python-codecov" ,python-codecov)
1893 ("python-coverage" ,python-coverage)
1894 ("python-future" ,python-future)
1895 ("python-hypothesis" ,python-hypothesis)
1896 ("python-mock" ,python-mock)
1897 ("python-pyserial" ,python-pyserial)
1898 ("python-pytest" ,python-pytest)
1899 ("python-pytest-cov" ,python-pytest-cov)
1900 ("python-pytest-runner" ,python-pytest-runner)
1901 ("python-pytest-timeout" ,python-pytest-timeout)))
1902 (home-page "https://github.com/hardbyte/python-can")
1903 (synopsis "Controller Area Network (CAN) interface module for Python")
1904 (description "This package defines the @code{can} module, which provides
1905 controller area network (CAN) support for Python developers; providing common
1906 abstractions to different hardware devices, and a suite of utilities for
1907 sending and receiving messages on a CAN bus.")
1908 (license license:lgpl3+)))
1909
1910 (define-public python-caniusepython3
1911 (package
1912 (name "python-caniusepython3")
1913 (version "7.2.0")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "caniusepython3" version))
1918 (sha256
1919 (base32
1920 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1921 (build-system python-build-system)
1922 (arguments
1923 `(#:phases (modify-phases %standard-phases
1924 (add-after 'unpack 'relax-requirements
1925 (lambda _
1926 (substitute* "setup.py"
1927 ;; These are for compatibility with Python 2.
1928 ((".*'argparse', 'backports.functools_lru_cache',.*")
1929 ""))
1930 (substitute* "dev_requirements.txt"
1931 ((".*pylint.*") "")) ;not actually required
1932 #t))
1933 (replace 'check
1934 (lambda _
1935 (invoke "py.test" "-k" "not NetworkTests"))))))
1936 (propagated-inputs
1937 `(("python-distlib" ,python-distlib)
1938 ("python-packaging" ,python-packaging)
1939 ("python-requests" ,python-requests)))
1940 (native-inputs
1941 `(("python-mock" ,python-mock)
1942 ("python-pytest" ,python-pytest)))
1943 (home-page "https://github.com/brettcannon/caniusepython3")
1944 (synopsis "Check for Python 3-incompatible Python libraries")
1945 (description "The @command{caniusepython3} command scans your project and
1946 reports the Python 3-incompatible libraries it found. It can also be used as
1947 a library.")
1948 (license license:asl2.0)))
1949
1950 (define-public python-diskcache
1951 (package
1952 (name "python-diskcache")
1953 (version "4.1.0")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (pypi-uri "diskcache" version))
1958 (sha256
1959 (base32
1960 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1961 (build-system python-build-system)
1962 (arguments
1963 `(#:tests? #f)) ;test suite not included in the release
1964 (home-page "http://www.grantjenks.com/docs/diskcache/")
1965 (synopsis "Disk and file backed cache library")
1966 (description "DiskCache is a disk and file backed persistent cache.")
1967 (license license:asl2.0)))
1968
1969 (define-public python-bitstruct
1970 (package
1971 (name "python-bitstruct")
1972 (version "8.9.0")
1973 (source
1974 (origin
1975 (method url-fetch)
1976 (uri (pypi-uri "bitstruct" version))
1977 (sha256
1978 (base32
1979 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1980 (build-system python-build-system)
1981 (home-page "https://github.com/eerimoq/bitstruct")
1982 (synopsis "Python values to and C bit field structs converter")
1983 (description "This module performs conversions between Python values and C
1984 bit field structs represented as Python byte strings. It is intended to have
1985 a similar interface as the @code{struct} module from Python, but working on
1986 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1987 (license license:expat)))
1988
1989 (define-public python-cantools
1990 (package
1991 (name "python-cantools")
1992 (version "33.1.1")
1993 (source
1994 (origin
1995 ;; We take the sources from the Git repository as the documentation is
1996 ;; not included with the PyPI archive.
1997 (method git-fetch)
1998 (uri (git-reference
1999 (url "https://github.com/eerimoq/cantools")
2000 (commit version)))
2001 (file-name (git-file-name name version))
2002 (sha256
2003 (base32
2004 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
2005 (build-system python-build-system)
2006 (arguments
2007 `(#:phases
2008 (modify-phases %standard-phases
2009 (add-after 'build 'build-doc
2010 (lambda _
2011 ;; See: https://github.com/eerimoq/cantools/issues/190.
2012 (substitute* "README.rst"
2013 (("https://github.com/eerimoq/cantools/raw/master\
2014 /docs/monitor.png")
2015 "monitor.png"))
2016 (with-directory-excursion "docs"
2017 (invoke "make" "man" "info"))))
2018 (add-after 'install 'install-doc
2019 (lambda* (#:key outputs #:allow-other-keys)
2020 (let* ((out (assoc-ref outputs "out"))
2021 (info (string-append out "/share/info"))
2022 (man1 (string-append out "/share/man/man1")))
2023 (format #t "CWD: ~s~%" (getcwd))
2024 (install-file "docs/_build/texinfo/cantools.info" info)
2025 (install-file "docs/_build/man/cantools.1" man1)
2026 #t))))))
2027 (native-inputs
2028 `(("sphinx" ,python-sphinx)
2029 ("texinfo" ,texinfo)))
2030 (propagated-inputs
2031 `(("python-bitstruct" ,python-bitstruct)
2032 ("python-can" ,python-can)
2033 ("python-diskcache" ,python-diskcache)
2034 ("python-textparser" ,python-textparser)))
2035 (home-page "https://github.com/eerimoq/cantools")
2036 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
2037 (description "This package includes Controller Area Network (CAN) related
2038 tools that can be used to:
2039 @itemize
2040 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
2041 @item encode and decode CAN messages
2042 @item multiplex simple and extended signals
2043 @item diagnose DID encoding and decoding
2044 @item dump the CAN decoder output
2045 @item test CAN nodes
2046 @item generate C source code
2047 @item monitor the CAN bus
2048 @end itemize")
2049 (license license:expat)))
2050
2051 (define-public python-capturer
2052 (package
2053 (name "python-capturer")
2054 (version "2.4")
2055 (source
2056 (origin
2057 (method url-fetch)
2058 (uri (pypi-uri "capturer" version))
2059 (sha256
2060 (base32
2061 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2062 (build-system python-build-system)
2063 (arguments
2064 `(#:tests? #f))
2065 (propagated-inputs
2066 `(("python-humanfriendly" ,python-humanfriendly)))
2067 (home-page "https://capturer.readthedocs.io")
2068 (synopsis "Capture stdout and stderr streams of the current process")
2069 (description
2070 "The capturer package makes it easy to capture the stdout and stderr
2071 streams of the current process and subprocesses. Output can be relayed
2072 to the terminal in real time but is also available to the Python program
2073 for additional processing.")
2074 (license license:expat)))
2075
2076 (define-public python2-capturer
2077 (package-with-python2 python-capturer))
2078
2079 (define-public python-case
2080 (package
2081 (name "python-case")
2082 (version "1.5.3")
2083 (source
2084 (origin
2085 (method url-fetch)
2086 (uri (pypi-uri "case" version))
2087 (sha256
2088 (base32
2089 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2090 (build-system python-build-system)
2091 (propagated-inputs
2092 `(("python-mock" ,python-mock)
2093 ("python-nose" ,python-nose)
2094 ("python-six" ,python-six)
2095 ("python-unittest2" ,python-unittest2)))
2096 (native-inputs
2097 `(("python-coverage" ,python-coverage)))
2098 (home-page "https://github.com/celery/case")
2099 (synopsis "Unittest utilities and convenience methods")
2100 (description
2101 "The @code{case} package provides utilities on top of unittest, including
2102 some helpful Python 2 compatibility convenience methods.")
2103 (license license:bsd-3)))
2104
2105 (define-public python-verboselogs
2106 (package
2107 (name "python-verboselogs")
2108 (version "1.7")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "verboselogs" version))
2113 (sha256
2114 (base32
2115 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2116 (build-system python-build-system)
2117 (arguments
2118 `(#:phases
2119 (modify-phases %standard-phases
2120 (replace 'check
2121 (lambda _
2122 ;; Do not run pylint plugin test, as astroid is an old
2123 ;; unsupported version.
2124 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2125 "verboselogs/tests.py"))))))
2126 (native-inputs
2127 `(("python-mock" ,python-mock)
2128 ("python-pytest" ,python-pytest)))
2129 (home-page "https://verboselogs.readthedocs.io")
2130 (synopsis "Verbose logging level for Python's logging module")
2131 (description
2132 "The @code{verboselogs} package extends Python's @code{logging} module to
2133 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2134 (license license:expat)))
2135
2136 (define-public python2-verboselogs
2137 (package-with-python2 python-verboselogs))
2138
2139 (define-public python-coloredlogs
2140 (package
2141 (name "python-coloredlogs")
2142 (version "10.0")
2143 (source
2144 (origin
2145 (method url-fetch)
2146 (uri (pypi-uri "coloredlogs" version))
2147 (sha256
2148 (base32
2149 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2150 (build-system python-build-system)
2151 (arguments
2152 `(;Tests require some updated modules
2153 #:tests? #f))
2154 (propagated-inputs
2155 `(("python-capturer" ,python-capturer)))
2156 (home-page "https://coloredlogs.readthedocs.io")
2157 (synopsis "Colored stream handler for Python's logging module")
2158 (description
2159 "The @code{coloredlogs} package enables colored terminal output for
2160 Python's logging module. The @code{ColoredFormatter} class inherits from
2161 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2162 messages in color.")
2163 (license license:expat)))
2164
2165 (define-public python2-coloredlogs
2166 (package-with-python2 python-coloredlogs))
2167
2168 (define-public python-editorconfig
2169 (package
2170 (name "python-editorconfig")
2171 (version "0.12.2")
2172 (source
2173 (origin
2174 (method url-fetch)
2175 (uri (pypi-uri "EditorConfig" version))
2176 (sha256
2177 (base32
2178 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2179 (build-system python-build-system)
2180 (home-page "https://editorconfig.org/")
2181 (synopsis "EditorConfig bindings for python")
2182 (description "The EditorConfig project consists of a file format for
2183 defining coding styles and a collection of text editor plugins that enable
2184 editors to read the file format and adhere to defined styles. EditorConfig
2185 files are easily readable and they work nicely with version control systems.")
2186 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2187 (license (list license:bsd-2 license:psfl))))
2188
2189 (define-public dosage
2190 (package
2191 (name "dosage")
2192 (version "2.17")
2193 (source
2194 (origin
2195 (method url-fetch)
2196 (uri (pypi-uri "dosage" version))
2197 (sha256
2198 (base32
2199 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2200 (build-system python-build-system)
2201 (propagated-inputs
2202 `(("python2-backports-functools-lru-cache"
2203 ,python2-backports-functools-lru-cache)
2204 ("python2-backports-shutil-get-terminal-size"
2205 ,python2-backports-shutil-get-terminal-size)
2206 ("python-cached-property" ,python-cached-property)
2207 ("python-colorama" ,python-colorama)
2208 ("python-imagesize" ,python-imagesize)
2209 ("python-importlib-metadata" ,python-importlib-metadata)
2210 ("python-lxml" ,python-lxml)
2211 ("python-requests" ,python-requests)
2212 ("python-six" ,python-six)))
2213 (native-inputs
2214 `(("python-pytest-cov" ,python-pytest-cov)
2215 ("python-pytest-xdist" ,python-pytest-xdist)
2216 ("python-responses" ,python-responses)
2217 ("python-setuptools-scm" ,python-setuptools-scm)))
2218 (home-page "https://github.com/webcomics/dosage")
2219 (synopsis "Comic strip downloader and archiver")
2220 (description "Dosage is designed to keep a local copy of specific webcomics and other
2221 picture-based content such as Picture of the Day sites. With the @command{dosage}
2222 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2223 downloaded, or download a strip for a particular date or index, if possible.")
2224 (license license:expat)))
2225
2226 (define-public python-et-xmlfile
2227 (package
2228 (name "python-et-xmlfile")
2229 (version "1.0.1")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (pypi-uri "et_xmlfile" version))
2234 (sha256
2235 (base32
2236 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2237 (build-system python-build-system)
2238 (arguments
2239 `(#:phases (modify-phases %standard-phases
2240 (replace 'check
2241 (lambda _
2242 (invoke "pytest"))))))
2243 (native-inputs
2244 `(("python-pytest" ,python-pytest)
2245 ("python-lxml" ,python-lxml))) ;used for the tests
2246 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2247 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2248 (description "This Python library is based upon the @code{xmlfile} module
2249 from @code{lxml}. It aims to provide a low memory, compatible implementation
2250 of @code{xmlfile}.")
2251 (license license:expat)))
2252
2253 (define-public python2-et-xmlfile
2254 (package-with-python2 python-et-xmlfile))
2255
2256 (define-public python-openpyxl
2257 (package
2258 (name "python-openpyxl")
2259 (version "3.0.5")
2260 (source
2261 (origin
2262 ;; We use the upstream repository, as the tests are not included in the
2263 ;; PyPI releases.
2264 (method hg-fetch)
2265 (uri (hg-reference
2266 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2267 (changeset version)))
2268 (file-name (string-append name "-" version "-checkout"))
2269 (sha256
2270 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2271 (build-system python-build-system)
2272 (arguments
2273 `(#:phases (modify-phases %standard-phases
2274 (replace 'check
2275 (lambda _
2276 (invoke "pytest"))))))
2277 (native-inputs
2278 ;; For the test suite.
2279 `(("python-lxml" ,python-lxml)
2280 ("python-pillow" ,python-pillow)
2281 ("python-pytest" ,python-pytest)))
2282 (propagated-inputs
2283 `(("python-et-xmlfile" ,python-et-xmlfile)
2284 ("python-jdcal" ,python-jdcal)))
2285 (home-page "https://openpyxl.readthedocs.io")
2286 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2287 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2288 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2289 standard.")
2290 (properties `((python2-variant . ,(delay python2-openpyxl))))
2291 (license license:expat)))
2292
2293 (define-public python2-openpyxl
2294 (let ((base (package-with-python2
2295 (strip-python2-variant python-openpyxl))))
2296 (package
2297 (inherit base)
2298 ;; This is the latest version that has python2 support
2299 (version "2.6.4")
2300 (source
2301 (origin
2302 (method url-fetch)
2303 (uri (pypi-uri "openpyxl" version))
2304 (sha256
2305 (base32
2306 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2307 (arguments '(#:tests? #f))))) ; No test suite.
2308
2309 (define-public python-eventlet
2310 (package
2311 (name "python-eventlet")
2312 (version "0.25.1")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "eventlet" version))
2317 (sha256
2318 (base32
2319 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2320 (build-system python-build-system)
2321 (propagated-inputs
2322 `(("python-dnspython" ,python-dnspython)
2323 ("python-greenlet" ,python-greenlet)
2324 ("python-monotonic" ,python-monotonic)))
2325 (arguments
2326 ;; TODO: Requires unpackaged 'enum-compat'.
2327 '(#:tests? #f))
2328 (home-page "https://eventlet.net")
2329 (synopsis "Concurrent networking library for Python")
2330 (description
2331 "Eventlet is a concurrent networking library for Python that
2332 allows you to change how you run your code, not how you write it.
2333 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2334 Coroutines ensure that the developer uses a blocking style of programming
2335 that is similar to threading, but provide the benefits of non-blocking I/O.
2336 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2337 from the Python interpreter, or as a small part of a larger application.")
2338 (license license:expat)))
2339
2340 (define-public python-sinfo
2341 (package
2342 (name "python-sinfo")
2343 (version "0.3.4")
2344 (source (origin
2345 (method url-fetch)
2346 (uri (pypi-uri "sinfo" version))
2347 (sha256
2348 (base32
2349 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2350 (build-system python-build-system)
2351 (propagated-inputs
2352 `(("python-stdlib-list" ,python-stdlib-list)))
2353 (home-page "https://gitlab.com/joelostblom/session_info")
2354 (synopsis "Output module version information loaded in a Python session")
2355 (description "This package outputs version information for modules loaded
2356 in the current session, Python, and the OS.")
2357 (license license:bsd-3)))
2358
2359 (define-public python-six
2360 (package
2361 (name "python-six")
2362 (version "1.14.0")
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "six" version))
2367 (sha256
2368 (base32
2369 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
2370 (build-system python-build-system)
2371 (arguments
2372 `(#:phases
2373 (modify-phases %standard-phases
2374 (replace 'check
2375 (lambda _
2376 (invoke "py.test" "-v"))))))
2377 (native-inputs
2378 `(("python-pytest" ,python-pytest-bootstrap)))
2379 (home-page "https://pypi.org/project/six/")
2380 (synopsis "Python 2 and 3 compatibility utilities")
2381 (description
2382 "Six is a Python 2 and 3 compatibility library. It provides utility
2383 functions for smoothing over the differences between the Python versions with
2384 the goal of writing Python code that is compatible on both Python versions.
2385 Six supports every Python version since 2.5. It is contained in only one
2386 Python file, so it can be easily copied into your project.")
2387 (license license:x11)))
2388
2389 (define-public python2-six
2390 (package-with-python2 python-six))
2391
2392 (define-public python-six-bootstrap
2393 (package
2394 (inherit python-six)
2395 (name "python-six-bootstrap")
2396 (native-inputs `())
2397 (arguments `(#:tests? #f))))
2398
2399 (define-public python2-six-bootstrap
2400 (package-with-python2 python-six-bootstrap))
2401
2402 (define-public python-schedule
2403 (package
2404 (name "python-schedule")
2405 (version "0.4.3")
2406 (source
2407 (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "schedule" version))
2410 (sha256
2411 (base32
2412 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2413 (build-system python-build-system)
2414 (native-inputs
2415 `(("python-pytest" ,python-pytest)
2416 ("python-mock" ,python-mock)))
2417 (home-page "https://github.com/dbader/schedule")
2418 (synopsis "Schedule periodic function calls in Python")
2419 (description
2420 "Schedule is an in-process scheduler for periodic jobs that uses the
2421 builder pattern for configuration. Schedule lets you run Python functions (or
2422 any other callable) periodically at pre-determined intervals using a simple,
2423 human-friendly syntax.")
2424 (license license:expat)))
2425
2426 (define-public python2-schedule
2427 (package-with-python2 python-schedule))
2428
2429 (define-public python-scour
2430 (package
2431 (name "python-scour")
2432 (version "0.38.2")
2433 (source
2434 (origin
2435 (method git-fetch)
2436 (uri
2437 (git-reference
2438 (url "https://github.com/scour-project/scour")
2439 (commit
2440 (string-append "v" version))))
2441 (file-name (git-file-name name version))
2442 (sha256
2443 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2444 (propagated-inputs
2445 `(("python-six" ,python-six)))
2446 (build-system python-build-system)
2447 (home-page "https://github.com/scour-project/scour")
2448 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2449 (description "The goal of Scour is to output a file that renders
2450 identically at a fraction of the size by removing a lot of redundant
2451 information created by most SVG editors. Optimization options are typically
2452 lossless but can be tweaked for more aggressive cleaning.")
2453 (license license:asl2.0)))
2454
2455 (define-public python-mechanize
2456 (package
2457 (name "python-mechanize")
2458 (version "0.4.5")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "mechanize" version))
2463 (sha256
2464 (base32
2465 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2466 (build-system python-build-system)
2467 (propagated-inputs
2468 `(("python-html5lib" ,python-html5lib)))
2469 (home-page "https://github.com/python-mechanize/mechanize")
2470 (synopsis
2471 "Stateful programmatic web browsing in Python")
2472 (description
2473 "Mechanize implements stateful programmatic web browsing in Python,
2474 after Andy Lester’s Perl module WWW::Mechanize.")
2475 (license license:bsd-3)))
2476
2477 (define-public python2-mechanize
2478 (package-with-python2 python-mechanize))
2479
2480 (define-public python-simpleaudio
2481 (package
2482 (name "python-simpleaudio")
2483 (version "1.0.4")
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "simpleaudio" version))
2488 (sha256
2489 (base32
2490 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2491 (build-system python-build-system)
2492 (arguments
2493 `(#:tests? #f))
2494 (inputs
2495 `(("alsa-lib" ,alsa-lib)))
2496 (home-page
2497 "https://github.com/hamiltron/py-simple-audio")
2498 (synopsis "Simple, asynchronous audio playback for Python 3")
2499 (description
2500 "The @code{simplaudio} package provides cross-platform, dependency-free
2501 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2502 (license license:expat))) ; MIT license
2503
2504 (define-public python-simplejson
2505 (package
2506 (name "python-simplejson")
2507 (version "3.17.0")
2508 (source
2509 (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "simplejson" version))
2512 (sha256
2513 (base32
2514 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2515 (build-system python-build-system)
2516 (home-page "http://simplejson.readthedocs.org/en/latest/")
2517 (synopsis
2518 "Json library for Python")
2519 (description
2520 "JSON (JavaScript Object Notation) is a subset of JavaScript
2521 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2522 format.
2523
2524 Simplejson exposes an API familiar to users of the standard library marshal
2525 and pickle modules. It is the externally maintained version of the json
2526 library contained in Python 2.6, but maintains compatibility with Python 2.5
2527 and (currently) has significant performance advantages, even without using
2528 the optional C extension for speedups. Simplejson is also supported on
2529 Python 3.3+.")
2530 (license license:x11)))
2531
2532 (define-public python2-simplejson
2533 (package-with-python2 python-simplejson))
2534
2535
2536 (define-public python-pyicu
2537 (package
2538 (name "python-pyicu")
2539 (version "2.4.3")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "PyICU" version))
2544 (sha256
2545 (base32
2546 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2547 (build-system python-build-system)
2548 (inputs
2549 `(("icu4c" ,icu4c)))
2550 (native-inputs
2551 `(("python-pytest" ,python-pytest)
2552 ("python-six" ,python-six)))
2553 (home-page "https://github.com/ovalhub/pyicu")
2554 (synopsis "Python extension wrapping the ICU C++ API")
2555 (description
2556 "PyICU is a python extension wrapping the ICU C++ API.")
2557 (license license:x11)))
2558
2559 (define-public python2-pyicu
2560 (package-with-python2 python-pyicu))
2561
2562 (define-public python-dogtail
2563 (package
2564 (name "python-dogtail")
2565 (version "0.9.11")
2566 (source (origin
2567 (method url-fetch)
2568 (uri
2569 (string-append
2570 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2571 "dogtail-" version ".tar.gz"))
2572 (sha256
2573 (base32
2574 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2575 (build-system python-build-system)
2576 (arguments
2577 `(#:tests? #f ; TODO Launching dbus for the tests
2578 ; fails
2579 #:phases
2580 (modify-phases %standard-phases
2581 (replace 'check
2582 (lambda* (#:key tests? #:allow-other-keys)
2583 (when tests?
2584 (system "Xvfb :1 &")
2585 (setenv "DISPLAY" ":1")
2586 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2587 #t)))))
2588 (propagated-inputs
2589 `(("python-pygobject" ,python-pygobject)
2590 ("python-pycairo" ,python-pycairo)
2591 ("python-pyatspi" ,python-pyatspi)))
2592 (native-inputs
2593 `(("python-nose" ,python-nose)
2594 ("gtk+" ,gtk+)
2595 ("xvfb" ,xorg-server)
2596 ("dbus" ,dbus)
2597 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2598 ("gobject-introspection" ,gobject-introspection)))
2599 (home-page "https://gitlab.com/dogtail/dogtail/")
2600 (synopsis "GUI test tool and automation framework written in Python")
2601 (description
2602 "Dogtail is a GUI test tool and automation framework written in Python.
2603 It uses Accessibility (a11y) technologies to communicate with desktop
2604 applications. dogtail scripts are written in Python and executed like any
2605 other Python program.")
2606 (license license:gpl2+)))
2607
2608 (define-public python2-dogtail
2609 (package-with-python2 python-dogtail))
2610
2611 (define-public python-empy
2612 (package
2613 (name "python-empy")
2614 (version "3.3.3")
2615 (source (origin
2616 (method url-fetch)
2617 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2618 version ".tar.gz"))
2619 (sha256
2620 (base32
2621 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2622 (build-system python-build-system)
2623 (arguments
2624 `(#:tests? #f)) ; python2 only
2625 (home-page "http://www.alcyone.com/software/empy/")
2626 (synopsis "Templating system for Python")
2627 (description
2628 "EmPy is a system for embedding Python expressions and statements in
2629 template text; it takes an EmPy source file, processes it, and produces
2630 output. This is accomplished via expansions, which are special signals to the
2631 EmPy system and are set off by a special prefix (by default the at sign, @@).
2632 EmPy can expand arbitrary Python expressions and statements in this way, as
2633 well as a variety of special forms. Textual data not explicitly delimited in
2634 this way is sent unaffected to the output, allowing Python to be used in
2635 effect as a markup language. Also supported are callbacks via hooks,
2636 recording and playback via diversions, and dynamic, chainable filters. The
2637 system is highly configurable via command line options and embedded
2638 commands.")
2639 (license license:lgpl2.1+)))
2640
2641 (define-public python2-empy
2642 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2643 (package/inherit base
2644 (arguments `(,@(package-arguments base)
2645 #:tests? #t)))))
2646
2647 (define-public python2-element-tree
2648 (package
2649 (name "python2-element-tree")
2650 (version "1.2.6")
2651 (source (origin
2652 (method url-fetch)
2653 (uri (string-append
2654 "http://effbot.org/media/downloads/elementtree-"
2655 version "-20050316.tar.gz"))
2656 (sha256
2657 (base32
2658 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2659 (build-system python-build-system)
2660 (arguments
2661 `(#:python ,python-2 ; seems to be part of Python 3
2662 #:tests? #f)) ; no 'test' sub-command
2663 (synopsis "Toolkit for XML processing in Python")
2664 (description
2665 "ElementTree is a Python library supporting lightweight XML processing.")
2666 (home-page "https://effbot.org/zone/element-index.htm")
2667 (license (license:x11-style
2668 "http://docs.python.org/2/license.html"
2669 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2670
2671 (define-public python2-pybugz
2672 (package
2673 (name "python2-pybugz")
2674 (version "0.6.11")
2675 (source (origin
2676 (method url-fetch)
2677 (uri (string-append
2678 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2679 version ".tar.gz"))
2680 (sha256
2681 (base32
2682 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2683 (patches (search-patches "pybugz-stty.patch"
2684 "pybugz-encode-error.patch"))))
2685 (build-system python-build-system)
2686 (arguments
2687 `(#:python ,python-2 ; SyntaxError with Python 3
2688 #:tests? #f)) ; no 'test' sub-command
2689 (propagated-inputs
2690 `(("element-tree" ,python2-element-tree)))
2691 (synopsis "Python and command-line interface to Bugzilla")
2692 (description
2693 "PyBugz is a Python library and command-line tool to query the Bugzilla
2694 bug tracking system. It is meant as an aid to speed up interaction with the
2695 bug tracker.")
2696 (home-page "http://www.liquidx.net/pybugz/")
2697 (license license:gpl2)))
2698
2699 (define-public python2-enum
2700 (package
2701 (name "python2-enum")
2702 (version "0.4.6")
2703 (source (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "enum" version))
2706 (sha256
2707 (base32
2708 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2709 (build-system python-build-system)
2710 (arguments
2711 `(#:python ,python-2))
2712 (home-page "https://pypi.org/project/enum/")
2713 (synopsis "Robust enumerated type support in Python")
2714 (description
2715 "This provides a module for robust enumerations in Python. It has
2716 been superseded by the Python standard library and is provided only for
2717 compatibility.")
2718 ;; Choice of either license.
2719 (license (list license:gpl3+ license:psfl))))
2720
2721 (define-public python-enum34
2722 (package
2723 (name "python-enum34")
2724 (version "1.1.6")
2725 (source
2726 (origin
2727 (method url-fetch)
2728 (uri (pypi-uri "enum34" version))
2729 (sha256
2730 (base32
2731 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2732 (build-system python-build-system)
2733 (home-page "https://pypi.org/project/enum34/")
2734 (synopsis "Backported Python 3.4 Enum")
2735 (description
2736 "Enum34 is the new Python stdlib enum module available in Python 3.4
2737 backported for previous versions of Python from 2.4 to 3.3.")
2738 (license license:bsd-3)))
2739
2740 (define-public python2-enum34
2741 (package-with-python2 python-enum34))
2742
2743 (define-public python-parse-type
2744 (package
2745 (name "python-parse-type")
2746 (version "0.4.2")
2747 (source
2748 (origin
2749 (method url-fetch)
2750 (uri (pypi-uri "parse_type" version))
2751 (sha256
2752 (base32
2753 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2754 (build-system python-build-system)
2755 (propagated-inputs
2756 `(("python-six" ,python-six)
2757 ("python-parse" ,python-parse)))
2758 (native-inputs
2759 `(("python-pytest" ,python-pytest)
2760 ("python-pytest-runner" ,python-pytest-runner)))
2761 (home-page "https://github.com/jenisys/parse_type")
2762 (synopsis "Extended parse module")
2763 (description
2764 "Parse_type extends the python parse module.")
2765 (properties
2766 `((python2-variant . ,(delay python2-parse-type))))
2767 (license license:bsd-3)))
2768
2769 (define-public python2-parse-type
2770 (let ((base (package-with-python2
2771 (strip-python2-variant python-parse-type))))
2772 (package/inherit base
2773 (propagated-inputs
2774 `(("python2-enum34" ,python2-enum34)
2775 ,@(package-propagated-inputs base))))))
2776
2777 (define-public python-parse
2778 (package
2779 (name "python-parse")
2780 (version "1.18.0")
2781 (source
2782 (origin
2783 (method url-fetch)
2784 (uri (pypi-uri "parse" version))
2785 (sha256
2786 (base32
2787 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2788 (build-system python-build-system)
2789 (arguments
2790 `(#:phases
2791 (modify-phases %standard-phases
2792 (replace 'check
2793 (lambda _ (invoke "python" "test_parse.py"))))))
2794 (home-page "https://github.com/r1chardj0n3s/parse")
2795 (synopsis "Parse strings")
2796 (description
2797 "Parse strings using a specification based on the Python @code{format()}
2798 syntax.")
2799 (license license:x11)))
2800
2801 (define-public python-polib
2802 (package
2803 (name "python-polib")
2804 (version "1.1.0")
2805 (source (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "polib" version))
2808 (sha256
2809 (base32
2810 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2811 (build-system python-build-system)
2812 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2813 (synopsis "Manipulate, create and modify gettext files")
2814 (description "Polib can manipulate any gettext format (po, pot and mo)
2815 files. It can be used to create po files from scratch or to modify
2816 existing ones.")
2817 (license license:expat)))
2818
2819 (define-public python2-polib
2820 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2821 (package/inherit base
2822 (arguments `(,@(package-arguments base)
2823 ;; Tests don't work with python2.
2824 #:tests? #f)))))
2825
2826 (define-public python-poyo
2827 (package
2828 (name "python-poyo")
2829 (version "0.5.0")
2830 (source
2831 (origin
2832 (method url-fetch)
2833 (uri (pypi-uri "poyo" version))
2834 (sha256
2835 (base32
2836 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2837 (build-system python-build-system)
2838 (home-page "https://github.com/hackebrot/poyo")
2839 (synopsis "Lightweight YAML Parser for Python")
2840 (description
2841 "This package provides a lightweight YAML Parser for Python. It supports
2842 only a chosen subset of the YAML format that is required to parse cookiecutter
2843 user configuration files. It does not have support for serializing into YAML
2844 and is not compatible with JSON.")
2845 (license license:expat)))
2846
2847 (define-public scons
2848 (package
2849 (name "scons")
2850 (version "3.0.4")
2851 (source (origin
2852 (method git-fetch)
2853 (uri (git-reference
2854 (url "https://github.com/SCons/scons")
2855 (commit version)))
2856 (file-name (git-file-name name version))
2857 (sha256
2858 (base32
2859 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2860 (build-system python-build-system)
2861 (arguments
2862 `(#:use-setuptools? #f ; still relies on distutils
2863 #:tests? #f ; no 'python setup.py test' command
2864 #:phases
2865 (modify-phases %standard-phases
2866 (add-before 'build 'bootstrap
2867 (lambda _
2868 (substitute* "src/engine/SCons/compat/__init__.py"
2869 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2870 "sys.modules[new] = __import__(old)"))
2871 (substitute* "src/engine/SCons/Platform/__init__.py"
2872 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2873 "mod = __import__(full_name)"))
2874 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2875 (chdir "build/scons")
2876 #t)))))
2877 (home-page "https://scons.org/")
2878 (synopsis "Software construction tool written in Python")
2879 (description
2880 "SCons is a software construction tool. Think of SCons as an improved,
2881 cross-platform substitute for the classic Make utility with integrated
2882 functionality similar to autoconf/automake and compiler caches such as ccache.
2883 In short, SCons is an easier, more reliable and faster way to build
2884 software.")
2885 (license license:x11)))
2886
2887 (define-public scons-python2
2888 (package
2889 (inherit (package-with-python2 scons))
2890 (name "scons-python2")))
2891
2892 (define-public python-extension-helpers
2893 (package
2894 (name "python-extension-helpers")
2895 (version "0.1")
2896 (source
2897 (origin
2898 (method url-fetch)
2899 (uri (pypi-uri "extension-helpers" version))
2900 (sha256
2901 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2902 (build-system python-build-system)
2903 (native-inputs
2904 `(("coverage" ,python-coverage)
2905 ("pytest" ,python-pytest-astropy)
2906 ("pytest-cov" ,python-pytest-cov)
2907 ("setuptools-scm" ,python-setuptools-scm)))
2908 (home-page "https://github.com/astropy/astropy-helpers")
2909 (synopsis
2910 "Utilities for building and installing packages in the Astropy ecosystem")
2911 (description
2912 "The extension-helpers package includes many build, installation, and
2913 documentation-related tools used by the Astropy project.")
2914 (license license:bsd-3)))
2915
2916 (define-public python-extras
2917 (package
2918 (name "python-extras")
2919 (version "1.0.0")
2920 (source
2921 (origin
2922 (method url-fetch)
2923 (uri (pypi-uri "extras" version))
2924 (sha256
2925 (base32
2926 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2927 (build-system python-build-system)
2928 (arguments
2929 ;; FIXME: Circular dependency on testtools.
2930 '(#:tests? #f))
2931 (home-page "https://github.com/testing-cabal/extras")
2932 (synopsis "Useful extensions to the Python standard library")
2933 (description
2934 "Extras is a set of extensions to the Python standard library.")
2935 (license license:expat)))
2936
2937 (define-public python2-extras
2938 (package-with-python2 python-extras))
2939
2940 (define-public python-mimeparse
2941 (package
2942 (name "python-mimeparse")
2943 (version "1.6.0")
2944 (source
2945 (origin
2946 (method url-fetch)
2947 (uri (pypi-uri "python-mimeparse" version))
2948 (sha256
2949 (base32
2950 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2951 (build-system python-build-system)
2952 (arguments
2953 '(#:phases
2954 (modify-phases %standard-phases
2955 (replace 'check
2956 (lambda _
2957 (invoke "./mimeparse_test.py"))))))
2958 (home-page
2959 "https://github.com/dbtsai/python-mimeparse")
2960 (synopsis "Python library for parsing MIME types")
2961 (description
2962 "Mimeparse provides basic functions for parsing MIME type names and
2963 matching them against a list of media-ranges.")
2964 (license license:expat)))
2965
2966 (define-public python2-mimeparse
2967 (package-with-python2 python-mimeparse))
2968
2969 (define-public python-miniboa
2970 (package
2971 (name "python-miniboa")
2972 (version "1.0.8")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (pypi-uri "miniboa" version))
2977 (sha256
2978 (base32
2979 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
2980 (build-system python-build-system)
2981 (home-page "https://github.com/shmup/miniboa")
2982 (synopsis "Simple, single-threaded Telnet server")
2983 (description
2984 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2985 server.")
2986 (license license:asl2.0)))
2987
2988 (define-public python2-miniboa
2989 (package-with-python2 python-miniboa))
2990
2991 (define-public python-pafy
2992 (package
2993 (name "python-pafy")
2994 (version "0.5.3.1")
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "pafy" version))
2999 (sha256
3000 (base32
3001 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
3002 (build-system python-build-system)
3003 (arguments
3004 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
3005 (propagated-inputs
3006 ;; Youtube-dl is a python package which is imported in the file
3007 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
3008 `(("youtube-dl" ,youtube-dl)))
3009 (home-page "https://np1.github.io/pafy/")
3010 (synopsis "Retrieve YouTube content and metadata")
3011 (description
3012 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
3013 (license license:lgpl3+)))
3014
3015 (define-public python2-funcsigs
3016 (package
3017 (name "python2-funcsigs")
3018 (version "1.0.2")
3019 (source (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "funcsigs" version))
3022 (sha256
3023 (base32
3024 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
3025 (build-system python-build-system)
3026 (arguments
3027 `(#:python ,python-2))
3028 (native-inputs
3029 `(("python2-unittest2" ,python2-unittest2)))
3030 (home-page "http://funcsigs.readthedocs.org")
3031 (synopsis "Python function signatures from PEP362")
3032 (description
3033 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
3034 (license license:asl2.0)))
3035
3036 (define-public python2-funcsigs-bootstrap
3037 (package
3038 (inherit python2-funcsigs)
3039 (name "python2-funcsigs-bootstrap")
3040 (native-inputs `())
3041 (arguments
3042 `(#:tests? #f
3043 ,@(package-arguments python2-funcsigs)))))
3044
3045 (define-public python-py
3046 (package
3047 (name "python-py")
3048 (version "1.8.1")
3049 (source
3050 (origin
3051 (method url-fetch)
3052 (uri (pypi-uri "py" version))
3053 (sha256
3054 (base32
3055 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
3056 (build-system python-build-system)
3057 (arguments
3058 ;; FIXME: "ImportError: 'test' module incorrectly imported from
3059 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
3060 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
3061 ;; Is this module globally installed?"
3062 '(#:tests? #f))
3063 (native-inputs
3064 `(("python-setuptools-scm" ,python-setuptools-scm)))
3065 (home-page "https://github.com/pytest-dev/py")
3066 (synopsis "Python library for parsing, I/O, instrospection, and logging")
3067 (description
3068 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3069 code introspection, and logging.")
3070 (license license:expat)))
3071
3072 (define-public python-py-next
3073 (package
3074 (inherit python-py)
3075 (version "1.10.0")
3076 (source
3077 (origin
3078 (method url-fetch)
3079 (uri (pypi-uri "py" version))
3080 (sha256
3081 (base32
3082 "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))))
3083
3084 (define-public python2-py
3085 (package-with-python2 python-py))
3086
3087 ;; Recent versions of python-fixtures and python-testrepository need
3088 ;; python-pbr for packaging, which itself needs these two packages for
3089 ;; testing.
3090 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3091 ;; same source, just without any test dependencies and with tests disabled.
3092 ;; python-pbr-minmal is then used to package python-fixtures and
3093 ;; python-testrepository.
3094 ;; Strictly speaking we currently could remove the test-requirements from the
3095 ;; normal python-pbr package (and save this package) since test are disabled
3096 ;; there anyway. But this may change in future.
3097 (define-public python-pbr-minimal
3098 (package
3099 (name "python-pbr-minimal")
3100 (version "3.0.1")
3101 (source
3102 (origin
3103 (method url-fetch)
3104 (uri (pypi-uri "pbr" version))
3105 (sha256
3106 (base32
3107 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
3108 (build-system python-build-system)
3109 (arguments
3110 `(#:tests? #f))
3111 (home-page "https://docs.openstack.org/pbr/latest/")
3112 (synopsis "Minimal build of python-pbr used for bootstrapping")
3113 (description
3114 "Used only for bootstrapping python2-pbr, you should not need this.")
3115 (license license:asl2.0)))
3116
3117 (define-public python-pbr
3118 (package
3119 (inherit python-pbr-minimal)
3120 (name "python-pbr")
3121 (arguments
3122 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3123 (propagated-inputs
3124 `(("git" ,git))) ;; pbr actually uses the "git" binary.
3125 (native-inputs
3126 `(("python-fixtures" ,python-fixtures-bootstrap)
3127 ;; discover, coverage, hacking, subunit
3128 ("python-mock" ,python-mock)
3129 ("python-six" ,python-six)
3130 ("python-sphinx" ,python-sphinx)
3131 ("python-testrepository" ,python-testrepository-bootstrap)
3132 ("python-testresources" ,python-testresources-bootstrap)
3133 ("python-testscenarios" ,python-testscenarios-bootstrap)
3134 ("python-testtools" ,python-testtools-bootstrap)
3135 ("python-virtualenv" ,python-virtualenv)))
3136 (synopsis "Enhance the default behavior of Python’s setuptools")
3137 (description
3138 "Python Build Reasonableness (PBR) is a library that injects some useful
3139 and sensible default behaviors into your setuptools run. It will set
3140 versions, process requirements files and generate AUTHORS and ChangeLog file
3141 from git information.
3142 ")))
3143
3144 (define-public python-pyrsistent
3145 (package
3146 (name "python-pyrsistent")
3147 (version "0.16.0")
3148 (home-page "https://github.com/tobgu/pyrsistent")
3149 (source (origin
3150 (method url-fetch)
3151 (uri (pypi-uri "pyrsistent" version))
3152 (sha256
3153 (base32
3154 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3155 (build-system python-build-system)
3156 (arguments
3157 '(#:phases (modify-phases %standard-phases
3158 ;; The package works fine with newer Pytest and Hypothesis, but
3159 ;; has pinned older versions to stay compatible with Python 2.
3160 (add-before 'check 'loosen-pytest-requirement
3161 (lambda _
3162 (substitute* "setup.py"
3163 (("pytest<5") "pytest")
3164 (("hypothesis<5") "hypothesis"))
3165 #t)))))
3166 (native-inputs
3167 `(("python-hypothesis" ,python-hypothesis)
3168 ("python-pytest" ,python-pytest)
3169 ("python-pytest-runner" ,python-pytest-runner)))
3170 (propagated-inputs
3171 `(("python-six" ,python-six)))
3172 (synopsis "Persistent data structures for Python")
3173 (description
3174 "Pyrsistent is a number of persistent collections (by some referred to as
3175 functional data structures). Persistent in the sense that they are immutable.
3176
3177 All methods on a data structure that would normally mutate it instead return a
3178 new copy of the structure containing the requested updates. The original
3179 structure is left untouched.")
3180 (license license:expat)))
3181
3182 (define-public python2-pyrsistent
3183 (package-with-python2 python-pyrsistent))
3184
3185 (define-public python-exif-read
3186 (package
3187 (name "python-exif-read")
3188 (version "2.1.2")
3189 (source (origin
3190 (method url-fetch)
3191 (uri (pypi-uri "ExifRead" version))
3192 (sha256
3193 (base32
3194 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3195 (build-system python-build-system)
3196 (arguments `(#:tests? #f)) ; no tests
3197 (home-page "https://github.com/ianare/exif-py")
3198 (synopsis "Python library to extract EXIF data from image files")
3199 (description
3200 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3201 files.")
3202 (license license:bsd-3)))
3203
3204 (define-public python2-exif-read
3205 (package-with-python2 python-exif-read))
3206
3207 (define-public python-pyld
3208 (package
3209 (name "python-pyld")
3210 (version "1.0.5")
3211 (source (origin
3212 (method url-fetch)
3213 (uri (pypi-uri "PyLD" version))
3214 (sha256
3215 (base32
3216 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3217 (build-system python-build-system)
3218 (home-page "https://github.com/digitalbazaar/pyld")
3219 (synopsis "Python implementation of the JSON-LD specification")
3220 (description
3221 "PyLD is an implementation of the JSON-LD specification.")
3222 (license license:bsd-3)))
3223
3224 (define-public python2-pyld
3225 (package-with-python2 python-pyld))
3226
3227 (define-public python-cli-helpers
3228 (package
3229 (name "python-cli-helpers")
3230 (version "2.0.1")
3231 (source
3232 (origin
3233 ;; There's no source tarball on PyPI.
3234 (method git-fetch)
3235 (uri (git-reference
3236 (url "https://github.com/dbcli/cli_helpers")
3237 (commit (string-append "v" version))))
3238 (file-name (git-file-name name version))
3239 (sha256
3240 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3241 (build-system python-build-system)
3242 (native-inputs
3243 `(("python-pytest" ,python-pytest)))
3244 (propagated-inputs
3245 `(("python-wcwidth" ,python-wcwidth)
3246 ("python-configobj" ,python-configobj)
3247 ("python-tabulate" ,python-tabulate)
3248 ("python-terminaltables" ,python-terminaltables)))
3249 (home-page "https://github.com/dbcli/cli_helpers")
3250 (synopsis "Helpers for building command-line apps")
3251 (description
3252 "CLI Helpers is a Python package that makes it easy to perform common
3253 tasks when building command-line apps. It's a helper library for command-line
3254 interfaces.")
3255 (license license:bsd-3)))
3256
3257 (define-public python-click
3258 (package
3259 (name "python-click")
3260 (version "7.1.2")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "click" version))
3265 (sha256
3266 (base32
3267 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3268 (build-system python-build-system)
3269 (arguments
3270 `(#:phases
3271 (modify-phases %standard-phases
3272 (add-after 'unpack 'fix-paths
3273 (lambda* (#:key inputs #:allow-other-keys)
3274 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3275 "cross-libc" "libc"))))
3276 (substitute* "src/click/_unicodefun.py"
3277 (("'locale'")
3278 (string-append "'" glibc "/bin/locale'"))))
3279 #t))
3280 (replace 'check
3281 (lambda _
3282 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
3283 (invoke "python" "-m" "pytest"))))))
3284 (native-inputs
3285 `(("python-pytest" ,python-pytest)))
3286 (home-page "https://palletsprojects.com/p/click/")
3287 (synopsis "Command line library for Python")
3288 (description
3289 "Click is a Python package for creating command line interfaces in a
3290 composable way with as little code as necessary. Its name stands for
3291 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3292 with sensible defaults out of the box.")
3293 (license license:bsd-3)))
3294
3295 (define-public python2-click
3296 (package-with-python2 python-click))
3297
3298 (define-public python-click-5
3299 (package (inherit python-click)
3300 (name "python-click")
3301 (version "5.1")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "click" version))
3306 (sha256
3307 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3308 (arguments `())))
3309
3310 (define-public python-vcversioner
3311 (package
3312 (name "python-vcversioner")
3313 (version "2.16.0.0")
3314 (source
3315 (origin
3316 (method url-fetch)
3317 (uri (pypi-uri "vcversioner" version))
3318 (sha256
3319 (base32
3320 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3321 (build-system python-build-system)
3322 (synopsis "Python library for version number discovery")
3323 (description "Vcversioner is a Python library that inspects tagging
3324 information in a variety of version control systems in order to discover
3325 version numbers.")
3326 (home-page "https://github.com/habnabit/vcversioner")
3327 (license license:isc)))
3328
3329 (define-public python2-vcversioner
3330 (package-with-python2 python-vcversioner))
3331
3332 (define-public python-jdcal
3333 (package
3334 (name "python-jdcal")
3335 (version "1.4")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (pypi-uri "jdcal" version))
3340 (sha256
3341 (base32
3342 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3343 (build-system python-build-system)
3344 (arguments
3345 `(#:phases (modify-phases %standard-phases
3346 (replace 'check
3347 (lambda _
3348 (invoke "pytest"))))))
3349 (native-inputs
3350 `(("python-pytest" ,python-pytest)))
3351 (home-page "https://github.com/phn/jdcal")
3352 (synopsis "Functions to convert between Julian dates Gregorian dates")
3353 (description "This Python library provides functions for converting
3354 between Julian dates and Gregorian dates.")
3355 (license license:bsd-2)))
3356
3357 (define-public python2-jdcal
3358 (package-with-python2 python-jdcal))
3359
3360 (define-public python-jsondiff
3361 (package
3362 (name "python-jsondiff")
3363 (version "1.2.0")
3364 (source
3365 (origin
3366 (method url-fetch)
3367 (uri (pypi-uri "jsondiff" version))
3368 (sha256
3369 (base32
3370 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3371 (build-system python-build-system)
3372 (native-inputs
3373 `(("python-nose" ,python-nose)
3374 ("python-nose-random" ,python-nose-random)))
3375 (home-page
3376 "https://github.com/fzumstein/jsondiff")
3377 (synopsis "Compare JSON and JSON-like structures in Python")
3378 (description "@code{jsondiff} is a Python library which lets you
3379 compare, diff, and patch JSON and JSON-like structures in Python.")
3380 (license license:expat)))
3381
3382 (define-public python-jsonschema
3383 (package
3384 (name "python-jsonschema")
3385 (version "3.2.0")
3386 (source (origin
3387 (method url-fetch)
3388 (uri (pypi-uri "jsonschema" version))
3389 (sha256
3390 (base32
3391 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3392 (build-system python-build-system)
3393 (arguments
3394 '(#:phases
3395 (modify-phases %standard-phases
3396 (replace 'check
3397 (lambda* (#:key inputs outputs #:allow-other-keys)
3398 (add-installed-pythonpath inputs outputs)
3399 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3400 (invoke "trial" "jsonschema"))))))
3401 (native-inputs
3402 `(("python-setuptools_scm" ,python-setuptools-scm)
3403 ("python-twisted" ,python-twisted)))
3404 (propagated-inputs
3405 `(("python-attrs" ,python-attrs)
3406 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
3407 ("python-pyrsistent" ,python-pyrsistent)
3408 ("python-six" ,python-six)))
3409 (home-page "https://github.com/Julian/jsonschema")
3410 (synopsis "Implementation of JSON Schema for Python")
3411 (description
3412 "Jsonschema is an implementation of JSON Schema for Python.")
3413 (license license:expat)
3414 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3415
3416 (define-public python2-jsonschema
3417 (let ((jsonschema (package-with-python2
3418 (strip-python2-variant python-jsonschema))))
3419 (package/inherit jsonschema
3420 (propagated-inputs
3421 `(("python2-functools32" ,python2-functools32)
3422 ,@(package-propagated-inputs jsonschema))))))
3423
3424 (define-public python-schema
3425 (package
3426 (name "python-schema")
3427 (version "0.6.6")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "schema" version))
3432 (sha256
3433 (base32
3434 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3435 (build-system python-build-system)
3436 (native-inputs
3437 `(("python-pytest" ,python-pytest)))
3438 (home-page "https://github.com/keleshev/schema")
3439 (synopsis "Simple data validation library")
3440 (description
3441 "@code{python-schema} is a library for validating Python data
3442 structures, such as those obtained from config-files, forms, external
3443 services or command-line parsing, converted from JSON/YAML (or
3444 something else) to Python data-types.")
3445 (license license:psfl)))
3446
3447 (define-public python2-schema
3448 (package-with-python2 python-schema))
3449
3450 (define-public python-schema-0.5
3451 (package (inherit python-schema)
3452 (version "0.5.0")
3453 (source
3454 (origin
3455 (method url-fetch)
3456 (uri (pypi-uri "schema" version))
3457 (sha256
3458 (base32
3459 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3460
3461 (define-public python2-schema-0.5
3462 (package-with-python2 python-schema-0.5))
3463
3464 (define-public python-kitchen
3465 (package
3466 (name "python-kitchen")
3467 (version "1.2.5")
3468 (source
3469 (origin
3470 (method url-fetch)
3471 (uri (pypi-uri "kitchen" version))
3472 (sha256
3473 (base32
3474 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3475 (build-system python-build-system)
3476 (propagated-inputs
3477 `(("python-chardet" ,python-chardet)))
3478 (home-page "https://github.com/fedora-infra/kitchen")
3479 (synopsis "Python API for snippets")
3480 (description "@code{kitchen} module provides a python API for all sorts of
3481 little useful snippets of code that everybody ends up writing for their projects
3482 but never seem big enough to build an independent release. Use kitchen and stop
3483 cutting and pasting that code over and over.")
3484 (license (list license:lgpl2.1+
3485 ;; subprocess.py, test_subprocess.py,
3486 ;; kitchen/pycompat25/defaultdict.py:
3487 license:psfl))))
3488
3489 (define-public python2-kitchen
3490 (package-with-python2 python-kitchen))
3491
3492 (define-public python-roman
3493 (package
3494 (name "python-roman")
3495 (version "3.3")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (pypi-uri "roman" version))
3500 (sha256
3501 (base32
3502 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3503 (build-system python-build-system)
3504 (home-page "https://github.com/zopefoundation/roman")
3505 (synopsis "Integer to Roman numerals converter")
3506 (description
3507 "This package provides a small helper library to convert Arabic Numbers
3508 to Roman Numerals.")
3509 (license license:psfl)))
3510
3511 (define-public python-unidecode
3512 (package
3513 (name "python-unidecode")
3514 (version "1.1.1")
3515 (source (origin
3516 (method url-fetch)
3517 (uri (pypi-uri "Unidecode" version))
3518 (sha256
3519 (base32
3520 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3521 (build-system python-build-system)
3522 (home-page "https://pypi.org/project/Unidecode/")
3523 (synopsis "ASCII transliterations of Unicode text")
3524 (description
3525 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3526 useful when integrating with legacy code that doesn't support Unicode, or for
3527 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3528 machine identifiers from human-readable Unicode strings that should still be
3529 somewhat intelligible.")
3530 (license license:gpl2+)))
3531
3532 (define-public python2-unidecode
3533 (package-with-python2 python-unidecode))
3534
3535 (define-public python-text-unidecode
3536 (package
3537 (name "python-text-unidecode")
3538 (version "1.3")
3539 (source (origin
3540 (method url-fetch)
3541 (uri (pypi-uri "text-unidecode" version))
3542 (sha256
3543 (base32
3544 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3545 (build-system python-build-system)
3546 (arguments
3547 '(#:phases (modify-phases %standard-phases
3548 (replace 'check
3549 (lambda _
3550 (setenv "PYTHONPATH"
3551 (string-append "./build/lib:"
3552 (getenv "PYTHONPATH")))
3553 (invoke "pytest" "-vv"))))))
3554 (native-inputs
3555 `(("python-pytest" ,python-pytest)))
3556 (home-page "https://github.com/kmike/text-unidecode/")
3557 (synopsis "Decode Unicode data")
3558 (description
3559 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3560 Perl library. It can create ASCII representations of Unicode data. In general
3561 users should prefer the @code{python-unidecode} package which offers better
3562 memory usage and transliteration quality.")
3563 ;; The user can choose either license.
3564 (license (list license:clarified-artistic license:gpl2+))))
3565
3566 (define-public python2-text-unidecode
3567 (package-with-python2 python-text-unidecode))
3568
3569 (define-public python-pyjwt
3570 (package
3571 (name "python-pyjwt")
3572 (version "1.7.1")
3573 (source
3574 (origin
3575 (method url-fetch)
3576 (uri (pypi-uri "PyJWT" version))
3577 (sha256
3578 (base32
3579 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3580 (modules '((guix build utils)))
3581 (snippet
3582 '(begin
3583 (for-each delete-file-recursively
3584 (find-files "." "\\.pyc$"))
3585 #t))))
3586 (build-system python-build-system)
3587 (arguments
3588 '(#:phases (modify-phases %standard-phases
3589 (replace 'check
3590 (lambda _
3591 ;; Mimic upstream commit 3a20892442b34c7 to get
3592 ;; rid of dependency on pytest-runner < 5.0.
3593 ;; Remove substitution for PyJWT > 1.7.1.
3594 (substitute* "setup.py"
3595 ((".*pytest-runner.*")
3596 ""))
3597 (invoke "pytest" "-vv"))))))
3598 (native-inputs
3599 `(("python-pytest" ,python-pytest)
3600 ("python-pytest-cov" ,python-pytest-cov)))
3601 (home-page "https://github.com/progrium/pyjwt")
3602 (synopsis "JSON Web Token implementation in Python")
3603 (description
3604 "PyJWT is a JSON Web Token implementation written in Python.")
3605 (license license:expat)))
3606
3607 (define-public python2-pyjwt
3608 (package-with-python2 python-pyjwt))
3609
3610 (define-public python-pymsgbox
3611 (package
3612 (name "python-pymsgbox")
3613 (version "1.0.6")
3614 (source
3615 (origin
3616 (method git-fetch)
3617 (uri (git-reference
3618 ;; LICENSE.txt is not present on pypi
3619 (url "https://github.com/asweigart/PyMsgBox")
3620 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3621 (file-name (git-file-name name version))
3622 (sha256
3623 (base32
3624 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3625 (arguments
3626 ;; Circular dependency to run tests:
3627 ;; Tests need pyautogui, which depends on pymsgbox.
3628 '(#:tests? #f))
3629 (build-system python-build-system)
3630 (home-page "https://github.com/asweigart/PyMsgBox")
3631 (synopsis "Python module for JavaScript-like message boxes")
3632 (description
3633 "PyMsgBox is a simple, cross-platform, pure Python module for
3634 JavaScript-like message boxes. Types of dialog boxes include:
3635 @enumerate
3636 @item alert
3637 @item confirm
3638 @item prompt
3639 @item password
3640 @end enumerate
3641 ")
3642 (license license:bsd-3)))
3643
3644 (define-public python-pympler
3645 (package
3646 (name "python-pympler")
3647 (home-page "https://pythonhosted.org/Pympler/")
3648 (version "0.8")
3649 (source (origin
3650 (method url-fetch)
3651 (uri (pypi-uri "Pympler" version))
3652 (sha256
3653 (base32
3654 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3655 (build-system python-build-system)
3656 (arguments
3657 `(#:phases (modify-phases %standard-phases
3658 (delete 'check)
3659 (add-after 'install 'check
3660 (lambda* (#:key inputs outputs #:allow-other-keys)
3661 (add-installed-pythonpath inputs outputs)
3662 (invoke "python" "setup.py" "test"))))))
3663 (synopsis "Measure, monitor and analyze memory behavior")
3664 (description
3665 "Pympler is a development tool to measure, monitor and analyze
3666 the memory behavior of Python objects in a running Python application.
3667
3668 By pympling a Python application, detailed insight in the size and the
3669 lifetime of Python objects can be obtained. Undesirable or unexpected
3670 runtime behavior like memory bloat and other @samp{pymples} can easily
3671 be identified.
3672
3673 A web profiling frontend exposes process statistics, garbage
3674 visualisation and class tracker statistics.")
3675 (license license:asl2.0)))
3676
3677 (define-public python2-pympler
3678 (package-with-python2 python-pympler))
3679
3680 (define-public python-itsdangerous
3681 (package
3682 (name "python-itsdangerous")
3683 (version "1.1.0")
3684 (source
3685 (origin
3686 (method url-fetch)
3687 (uri (pypi-uri "itsdangerous" version))
3688 (sha256
3689 (base32
3690 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3691 (build-system python-build-system)
3692 (home-page "https://palletsprojects.com/p/itsdangerous/")
3693 (synopsis "Python library for passing data to/from untrusted environments")
3694 (description
3695 "Itsdangerous provides various helpers to pass trusted data to untrusted
3696 environments and back.")
3697 (license license:bsd-3)))
3698
3699 (define-public python2-itsdangerous
3700 (package-with-python2 python-itsdangerous))
3701
3702 (define-public python-pyyaml
3703 (package
3704 (name "python-pyyaml")
3705 (version "5.4.1")
3706 (source
3707 (origin
3708 (method url-fetch)
3709 (uri (pypi-uri "PyYAML" version))
3710 (sha256
3711 (base32
3712 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3713 (build-system python-build-system)
3714 (inputs
3715 `(("libyaml" ,libyaml)))
3716 (home-page "https://pyyaml.org")
3717 (synopsis "YAML parser and emitter for Python")
3718 (description
3719 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3720 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3721 API, and sensible error messages. PyYAML supports standard YAML tags and
3722 provides Python-specific tags that represent an arbitrary Python object.")
3723 (license license:expat)))
3724
3725 (define-public python2-pyyaml
3726 (package-with-python2 python-pyyaml))
3727
3728 (define-public python-vine
3729 (package
3730 (name "python-vine")
3731 (version "1.1.4")
3732 (source
3733 (origin
3734 (method url-fetch)
3735 (uri (pypi-uri "vine" version))
3736 (sha256
3737 (base32
3738 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3739 (build-system python-build-system)
3740 (native-inputs
3741 `(("python-pytest" ,python-pytest)
3742 ("python-case" ,python-case)))
3743 (home-page "https://github.com/celery/vine")
3744 (synopsis "Promises for Python")
3745 (description
3746 "@code{vine} provides a special implementation of promises in that it can
3747 be used both for \"promise of a value\" and lazy evaluation. The biggest
3748 upside for this is that everything in a promise can also be a promise,
3749 e.g. filters, callbacks and errbacks can all be promises.")
3750 (license license:bsd-3)))
3751
3752 (define-public python-virtualenv
3753 (package
3754 (name "python-virtualenv")
3755 (version "20.2.1")
3756 (source
3757 (origin
3758 (method url-fetch)
3759 (uri (pypi-uri "virtualenv" version))
3760 (sha256
3761 (base32
3762 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3763 (build-system python-build-system)
3764 (native-inputs
3765 `(("python-mock" ,python-mock)
3766 ("python-pytest" ,python-pytest)
3767 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3768 ;; be an input at all". However, removing the input makes the build error:
3769 ;; File "setup.py", line 4, in <module>
3770 ;; raise RuntimeError("setuptools >= 41 required to build")
3771 ("python-setuptools" ,python-setuptools)
3772 ("python-setuptools-scm" ,python-setuptools-scm)))
3773 (propagated-inputs
3774 `(("python-appdirs" ,python-appdirs)
3775 ("python-distlib" ,python-distlib/next)
3776 ("python-filelock" ,python-filelock)
3777 ("python-six" ,python-six)
3778 ("python-importlib-metadata" ,python-importlib-metadata)))
3779 (home-page "https://virtualenv.pypa.io/")
3780 (synopsis "Virtual Python environment builder")
3781 (description
3782 "Virtualenv is a tool to create isolated Python environments.")
3783 (license license:expat)))
3784
3785 (define-public python-markupsafe
3786 (package
3787 (name "python-markupsafe")
3788 (version "1.1.1")
3789 (source
3790 (origin
3791 (method url-fetch)
3792 (uri (pypi-uri "MarkupSafe" version))
3793 (sha256
3794 (base32
3795 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3796 (build-system python-build-system)
3797 (arguments
3798 `(#:modules ((ice-9 ftw)
3799 (srfi srfi-1)
3800 (srfi srfi-26)
3801 (guix build utils)
3802 (guix build python-build-system))
3803 #:phases (modify-phases %standard-phases
3804 (replace 'check
3805 (lambda _
3806 (let ((cwd (getcwd))
3807 (libdir (find (cut string-prefix? "lib." <>)
3808 (scandir "build"))))
3809 (setenv "PYTHONPATH"
3810 (string-append cwd "/build/" libdir ":"
3811 (getenv "PYTHONPATH")))
3812 (invoke "pytest" "-vv")))))))
3813 (native-inputs
3814 `(("python-pytest" ,python-pytest)))
3815 (home-page "https://github.com/mitsuhiko/markupsafe")
3816 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3817 (description
3818 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3819 for Python.")
3820 (license license:bsd-3)))
3821
3822 (define-public python2-markupsafe
3823 (package-with-python2 python-markupsafe))
3824
3825 (define-public python-jinja2
3826 (package
3827 (name "python-jinja2")
3828 (version "2.11.2")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "Jinja2" version))
3833 (sha256
3834 (base32
3835 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3836 (build-system python-build-system)
3837 (arguments
3838 '(#:phases (modify-phases %standard-phases
3839 (replace 'check
3840 (lambda* (#:key tests? #:allow-other-keys)
3841 (if tests?
3842 (begin
3843 (setenv "PYTHONPATH"
3844 (string-append "./build/lib:"
3845 (getenv "PYTHONPATH")))
3846 (invoke "pytest" "-vv"))
3847 (format #t "test suite not run~%"))
3848 #t)))))
3849 (native-inputs
3850 `(("python-pytest" ,python-pytest)))
3851 (propagated-inputs
3852 `(("python-markupsafe" ,python-markupsafe)))
3853 (home-page "http://jinja.pocoo.org/")
3854 (synopsis "Python template engine")
3855 (description
3856 "Jinja2 is a small but fast and easy to use stand-alone template engine
3857 written in pure Python.")
3858 (license license:bsd-3)))
3859
3860 (define-public python2-jinja2
3861 (package-with-python2 python-jinja2))
3862
3863 (define-public python-jinja2-time
3864 (package
3865 (name "python-jinja2-time")
3866 (version "0.2.0")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "jinja2-time" version))
3871 (sha256
3872 (base32
3873 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3874 (build-system python-build-system)
3875 (propagated-inputs
3876 `(("python-arrow" ,python-arrow)
3877 ("python-jinja2" ,python-jinja2)))
3878 (home-page
3879 "https://github.com/hackebrot/jinja2-time")
3880 (synopsis "Jinja2 Extension for Dates and Times")
3881 (description
3882 "This package provides an extension for the template engine Jinja2. It
3883 adds a 'now' tag providing a convenient access to the arrow.now() API from
3884 templates. A format string can be provided to control the output.")
3885 (license license:expat)))
3886
3887 (define-public python-pystache
3888 (package
3889 (name "python-pystache")
3890 (version "0.5.4")
3891 (source (origin
3892 (method url-fetch)
3893 (uri (pypi-uri "pystache" version))
3894 (sha256
3895 (base32
3896 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3897 (build-system python-build-system)
3898 (arguments
3899 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3900 (home-page "http://defunkt.io/pystache/")
3901 (synopsis "Python logic-less template engine")
3902 (description
3903 "Pystache is a Python implementation of the framework agnostic,
3904 logic-free templating system Mustache.")
3905 (license license:expat)
3906 (properties `((python2-variant . ,(delay python2-pystache))))))
3907
3908 (define-public python2-pystache
3909 (let ((base (package-with-python2
3910 (strip-python2-variant python-pystache))))
3911 (package/inherit base
3912 (arguments
3913 `(#:python ,python-2
3914 #:phases
3915 (modify-phases %standard-phases
3916 (replace 'check
3917 (lambda _
3918 (invoke "python" "test_pystache.py")))))))))
3919
3920 (define-public python-joblib
3921 (package
3922 (name "python-joblib")
3923 (version "0.14.1")
3924 (source (origin
3925 (method url-fetch)
3926 (uri (pypi-uri "joblib" version))
3927 (sha256
3928 (base32
3929 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3930 (build-system python-build-system)
3931 (arguments
3932 `(#:phases
3933 (modify-phases %standard-phases
3934 (replace 'check
3935 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3936 (native-inputs
3937 `(("python-pytest" ,python-pytest)))
3938 (home-page "https://joblib.readthedocs.io/")
3939 (synopsis "Using Python functions as pipeline jobs")
3940 (description
3941 "Joblib is a set of tools to provide lightweight pipelining in Python.
3942 In particular, joblib offers: transparent disk-caching of the output values
3943 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3944 logging and tracing of the execution.")
3945 (license license:bsd-3)))
3946
3947 (define-public python2-joblib
3948 (package-with-python2 python-joblib))
3949
3950 (define-public python-daemon
3951 (package
3952 (name "python-daemon")
3953 (version "2.2.3")
3954 (source
3955 (origin
3956 (method url-fetch)
3957 (uri (pypi-uri "python-daemon" version))
3958 (sha256
3959 (base32
3960 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3961 (build-system python-build-system)
3962 (arguments
3963 `(#:phases
3964 (modify-phases %standard-phases
3965 (add-before 'check 'disable-tests
3966 (lambda _
3967 ;; FIXME: Determine why test fails
3968 (substitute* "test/test_daemon.py"
3969 (("test_detaches_process_context")
3970 "skip_test_detaches_process_context"))
3971 #t)))))
3972 (propagated-inputs
3973 `(("python-lockfile" ,python-lockfile)))
3974 (native-inputs
3975 `(("python-unittest2" ,python-unittest2)
3976 ("python-testtools" ,python-testtools)
3977 ("python-testscenarios" ,python-testscenarios)
3978 ("python-mock" ,python-mock)
3979 ("python-docutils" ,python-docutils)))
3980 (home-page "https://pagure.io/python-daemon/")
3981 (synopsis "Python library for making a Unix daemon process")
3982 (description "Python-daemon is a library that assists a Python program to
3983 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3984
3985 This library provides a @code{DaemonContext} class that manages the following
3986 important tasks for becoming a daemon process:
3987 @enumerate
3988 @item Detach the process into its own process group.
3989 @item Set process environment appropriate for running inside a chroot.
3990 @item Renounce suid and sgid privileges.
3991 @item Close all open file descriptors.
3992 @item Change the working directory, uid, gid, and umask.
3993 @item Set appropriate signal handlers.
3994 @item Open new file descriptors for stdin, stdout, and stderr.
3995 @item Manage a specified PID lock file.
3996 @item Register cleanup functions for at-exit processing.
3997 @end enumerate")
3998 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3999 (license (list license:asl2.0 license:gpl3+))))
4000
4001 (define-public python-anytree
4002 (package
4003 (name "python-anytree")
4004 (version "2.8.0")
4005 (source (origin
4006 (method url-fetch)
4007 (uri (pypi-uri "anytree" version))
4008 (sha256
4009 (base32
4010 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
4011 (build-system python-build-system)
4012 (propagated-inputs
4013 `(("python-six" ,python-six)))
4014 (native-inputs
4015 `(;; For tests.
4016 ("graphviz" ,graphviz) ;for 'dot'
4017 ("python-nose" ,python-nose)))
4018 (home-page "https://github.com/c0fec0de/anytree")
4019 (synopsis "Lightweight tree data library")
4020 (description
4021 "@code{anytree} is a simple, lightweight, and extensible tree data
4022 structure for Python.")
4023 (license license:asl2.0)))
4024
4025 (define-public python-docutils
4026 (package
4027 (name "python-docutils")
4028 (version "0.16")
4029 (source
4030 (origin
4031 (method url-fetch)
4032 (uri (pypi-uri "docutils" version))
4033 (sha256
4034 (base32
4035 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
4036 (build-system python-build-system)
4037 (arguments
4038 '(#:phases (modify-phases %standard-phases
4039 (replace 'check
4040 (lambda* (#:key tests? #:allow-other-keys)
4041 (if tests?
4042 (invoke "python" "test/alltests.py")
4043 (format #t "test suite not run~%"))
4044 #t)))))
4045 (home-page "http://docutils.sourceforge.net/")
4046 (synopsis "Python Documentation Utilities")
4047 (description
4048 "Docutils is a modular system for processing documentation into useful
4049 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
4050 easy to use markup language, for input.
4051
4052 This package provides tools for converting @file{.rst} files to other formats
4053 via commands such as @command{rst2man}, as well as supporting Python code.")
4054 ;; Most of the source code is public domain, but some source files are
4055 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
4056 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
4057
4058 (define-public python2-docutils
4059 (package-with-python2 python-docutils))
4060
4061 ;; python2-sphinx fails its test suite with newer versions.
4062 (define-public python2-docutils-0.14
4063 (package
4064 (inherit python2-docutils)
4065 (version "0.14")
4066 (source (origin
4067 (method url-fetch)
4068 (uri (pypi-uri "docutils" version))
4069 (sha256
4070 (base32
4071 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4072
4073 (define-public python-restructuredtext-lint
4074 (package
4075 (name "python-restructuredtext-lint")
4076 (version "1.3.0")
4077 (source
4078 (origin
4079 (method url-fetch)
4080 (uri (pypi-uri "restructuredtext-lint" version))
4081 (sha256
4082 (base32
4083 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4084 (build-system python-build-system)
4085 (arguments
4086 `(#:phases
4087 (modify-phases %standard-phases
4088 (delete 'check)
4089 (add-after 'install 'check
4090 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4091 (when tests?
4092 (add-installed-pythonpath inputs outputs)
4093 (invoke "nosetests" "-v"))
4094 #t)))))
4095 (propagated-inputs
4096 `(("python-docutils" ,python-docutils)))
4097 (native-inputs
4098 `(("python-nose" ,python-nose)))
4099 (home-page "https://github.com/twolfson/restructuredtext-lint")
4100 (synopsis "reStructuredText linter")
4101 (description "This package provides a linter for the reStructuredText
4102 format.")
4103 (license license:unlicense)))
4104
4105 (define-public python-doc8
4106 (package
4107 (name "python-doc8")
4108 (version "0.8.0")
4109 (source
4110 (origin
4111 (method url-fetch)
4112 (uri (pypi-uri "doc8" version))
4113 (sha256
4114 (base32
4115 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4116 (build-system python-build-system)
4117 (arguments
4118 `(#:phases
4119 (modify-phases %standard-phases
4120 (delete 'check)
4121 (add-after 'install 'check
4122 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4123 (when tests?
4124 (add-installed-pythonpath inputs outputs)
4125 (invoke "pytest" "-v"))
4126 #t)))))
4127 (propagated-inputs
4128 `(("python-chardet" ,python-chardet)
4129 ("python-docutils" ,python-docutils)
4130 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
4131 ("python-six" ,python-six)
4132 ("python-stevedore" ,python-stevedore)))
4133 (native-inputs
4134 `(("python-testtools" ,python-testtools)
4135 ("python-pytest" ,python-pytest)))
4136 (home-page "https://launchpad.net/doc8")
4137 (synopsis
4138 "Style checker for Sphinx (or other) RST documentation")
4139 (description
4140 "Doc8 is an opinionated style checker for reStructured Text and plain
4141 text styles of documentation.")
4142 (license license:asl2.0)))
4143
4144 (define-public python-pygments
4145 (package
4146 (name "python-pygments")
4147 (version "2.7.3")
4148 (source
4149 (origin
4150 (method url-fetch)
4151 (uri (pypi-uri "Pygments" version))
4152 (sha256
4153 (base32
4154 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
4155 (replacement python-pygments/fixed)
4156 (build-system python-build-system)
4157 (arguments
4158 ;; FIXME: Tests require sphinx, which depends on this.
4159 '(#:tests? #f))
4160 (home-page "https://pygments.org/")
4161 (synopsis "Syntax highlighting")
4162 (description
4163 "Pygments is a syntax highlighting package written in Python.")
4164 (license license:bsd-2)
4165 (properties `((python2-variant . ,(delay python2-pygments))))))
4166
4167 (define python-pygments/fixed
4168 (package
4169 (inherit python-pygments)
4170 (version "2.7.4")
4171 (source
4172 (origin
4173 (method url-fetch)
4174 (uri (pypi-uri "Pygments" version))
4175 (sha256
4176 (base32
4177 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
4178
4179 ;; Pygments 2.6 and later does not support Python 2.
4180 (define-public python2-pygments
4181 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4182 (package
4183 (inherit base)
4184 (version "2.5.2")
4185 (source (origin
4186 (method url-fetch)
4187 (uri (pypi-uri "Pygments" version))
4188 (sha256
4189 (base32
4190 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4191
4192 (define-public python-pygments-github-lexers
4193 (package
4194 (name "python-pygments-github-lexers")
4195 (version "0.0.5")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "pygments-github-lexers" version))
4200 (sha256
4201 (base32
4202 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4203 (build-system python-build-system)
4204 (propagated-inputs
4205 `(("python-pygments" ,python-pygments)))
4206 (home-page "https://github.com/liluo/pygments-github-lexers")
4207 (synopsis "Pygments Github custom lexers")
4208 (description "This package installs Github custom lexers to Pygments.")
4209 (license license:bsd-3)))
4210
4211 (define-public python-bump2version
4212 (package
4213 (name "python-bump2version")
4214 (version "1.0.1")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "bump2version" version))
4219 (sha256
4220 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4221 (build-system python-build-system)
4222 (arguments
4223 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4224 ;; required: --new-version".
4225 `(#:tests? #false))
4226 (home-page "https://github.com/c4urself/bump2version")
4227 (synopsis "Version-bump your software with a single command!")
4228 (description
4229 "This package provides a small command line tool to simplify releasing
4230 software by updating all version strings in your source code by the correct
4231 increment. It also creates commits and tags.")
4232 (license license:expat)))
4233
4234 (define-public python-bumpversion
4235 (package
4236 (name "python-bumpversion")
4237 (version "0.5.3")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "bumpversion" version))
4242 (sha256
4243 (base32
4244 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4245 (build-system python-build-system)
4246 (home-page "https://github.com/peritus/bumpversion")
4247 (synopsis "Tool to bump software version")
4248 (description "This tool provides a command-line interface (CLI) to bump a
4249 software version simply.")
4250 (license license:expat)))
4251
4252 (define-public python-deprecated
4253 (package
4254 (name "python-deprecated")
4255 (version "1.2.5")
4256 (source
4257 (origin
4258 (method git-fetch)
4259 (uri (git-reference
4260 (url "https://github.com/tantale/deprecated")
4261 (commit (string-append "v" version))))
4262 (file-name (git-file-name name version))
4263 (sha256
4264 (base32
4265 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4266 (build-system python-build-system)
4267 (arguments
4268 `(#:phases (modify-phases %standard-phases
4269 (replace 'check
4270 (lambda _
4271 (invoke "pytest"))))))
4272 (propagated-inputs
4273 `(("python-wrapt" ,python-wrapt)))
4274 (native-inputs
4275 `(("python-bumpversion" ,python-bumpversion)
4276 ("python-pytest" ,python-pytest)
4277 ("python-pytest-cov" ,python-pytest-cov)
4278 ("python-sphinx" ,python-sphinx)
4279 ("python-tox" ,python-tox)))
4280 (home-page "https://github.com/tantale/deprecated")
4281 (synopsis "Python decorator to deprecate classes, functions or methods")
4282 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4283 to deprecate classes, functions or methods.")
4284 (license license:expat)))
4285
4286 (define-public python-pygithub
4287 (package
4288 (name "python-pygithub")
4289 (version "1.54.1")
4290 (source
4291 ;; We fetch from the Git repo because there are no tests in the PyPI
4292 ;; archive.
4293 (origin
4294 (method git-fetch)
4295 (uri (git-reference
4296 (url "https://github.com/PyGithub/PyGithub")
4297 (commit (string-append "v" version))))
4298 (file-name (git-file-name name version))
4299 (sha256
4300 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4301 (build-system python-build-system)
4302 (arguments
4303 `(#:phases
4304 (modify-phases %standard-phases
4305 (replace 'check
4306 (lambda* (#:key tests? #:allow-other-keys)
4307 (when tests?
4308 (invoke "pytest"))
4309 #t)))))
4310 (propagated-inputs
4311 `(("python-cryptography" ,python-cryptography)
4312 ("python-deprecated" ,python-deprecated)
4313 ("python-pyjwt" ,python-pyjwt)
4314 ("python-requests" ,python-requests)))
4315 (native-inputs
4316 `(("python-httpretty" ,python-httpretty)
4317 ("python-pytest" ,python-pytest)))
4318 (home-page "https://pygithub.readthedocs.io/en/latest/")
4319 (synopsis "Python library for the GitHub API")
4320 (description "This library allows managing GitHub resources such as
4321 repositories, user profiles, and organizations in your Python applications,
4322 using version 3 of the GitHub application programming interface (API).")
4323 (license license:lgpl3+)))
4324
4325 (define-public python-rellu
4326 (package
4327 (name "python-rellu")
4328 (version "0.7")
4329 (source
4330 (origin
4331 (method url-fetch)
4332 (uri (pypi-uri "rellu" version))
4333 (sha256
4334 (base32
4335 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4336 (build-system python-build-system)
4337 (propagated-inputs
4338 `(("python-invoke" ,python-invoke)
4339 ("python-pygithub" ,python-pygithub)))
4340 (home-page "https://github.com/robotframework/rellu")
4341 (synopsis "Utilities to create PyPI releases")
4342 (description "This collection of utilities contains tooling and templates
4343 to assist in creating releases on GitHub and publishing them on PyPI. It is
4344 designed to be used by Robot Framework and tools and libraries in its
4345 ecosystem, but can naturally be used also by other projects.")
4346 (license license:asl2.0)))
4347
4348 (define-public python-robotframework
4349 (package
4350 (name "python-robotframework")
4351 (version "3.2.2")
4352 ;; There are no tests in the PyPI archive.
4353 (source
4354 (origin
4355 (method git-fetch)
4356 (uri (git-reference
4357 (url "https://github.com/robotframework/robotframework")
4358 (commit (string-append "v" version))))
4359 (file-name (git-file-name name version))
4360 (sha256
4361 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
4362 (patches (search-patches
4363 "python-robotframework-source-date-epoch.patch"))))
4364 (build-system python-build-system)
4365 (arguments
4366 `(#:phases (modify-phases %standard-phases
4367 (add-before 'build 'build-and-install-doc
4368 (lambda* (#:key outputs #:allow-other-keys)
4369 (let* ((doc-output (assoc-ref outputs "doc"))
4370 (doc (string-append doc-output "/share/"
4371 ,name "-" ,version "/")))
4372 (invoke "invoke" "library-docs" "all")
4373 (mkdir-p doc)
4374 (copy-recursively "doc/libraries"
4375 (string-append doc "/libraries"))
4376 #t)))
4377 (replace 'check
4378 (lambda* (#:key inputs #:allow-other-keys)
4379 ;; Some tests require timezone data. Otherwise, they
4380 ;; look up /etc/localtime, which doesn't exist, and fail
4381 ;; with:
4382 ;;
4383 ;; OverflowError: mktime argument out of range
4384 (setenv "TZDIR"
4385 (string-append (assoc-ref inputs "tzdata")
4386 "/share/zoneinfo"))
4387 (setenv "TZ" "Europe/Paris")
4388
4389 (invoke "python" "utest/run.py"))))))
4390 (native-inputs
4391 `(("python-invoke" ,python-invoke)
4392 ("python-rellu" ,python-rellu)
4393 ("python:tk" ,python "tk") ;used when building the HTML doc
4394 ("tzdata" ,tzdata-for-tests)))
4395 (outputs '("out" "doc"))
4396 (home-page "https://robotframework.org")
4397 (synopsis "Generic automation framework")
4398 (description "Robot Framework is a generic automation framework for
4399 acceptance testing, acceptance test driven development (ATDD), and robotic
4400 process automation (RPA).")
4401 (license license:asl2.0)))
4402
4403 (define-public python-robotframework-lint
4404 ;; There is no properly tagged release; the commit below seems to correspond
4405 ;; to the 0.9 stable release available from PyPI. The tests are not
4406 ;; included in the PyPI archive, so we fetch the sources from the upstream
4407 ;; Git repo.
4408 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4409 (revision "0"))
4410 (package
4411 (name "python-robotframework-lint")
4412 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4413 revision commit))
4414 (source
4415 (origin
4416 (method git-fetch)
4417 (uri (git-reference
4418 (url "https://github.com/boakley/robotframework-lint")
4419 (commit commit)))
4420 (file-name (git-file-name name version))
4421 (sha256
4422 (base32
4423 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4424 (build-system python-build-system)
4425 (arguments
4426 `(#:phases
4427 (modify-phases %standard-phases
4428 (replace 'check
4429 (lambda _
4430 (invoke "python" "-m" "robot" "-A"
4431 "tests/conf/default.args" "tests"))))))
4432 (propagated-inputs
4433 `(("python-robotframework" ,python-robotframework)))
4434 (home-page "https://github.com/boakley/robotframework-lint/")
4435 (synopsis "Static analysis tool (linter) for Robot Framework")
4436 (description "This package provides the @code{rflint} command-line
4437 utility, a static analysis tool (linter) for Robot Framework source files.")
4438 (license license:asl2.0))))
4439
4440 (define-public python-robotframework-sshlibrary
4441 (package
4442 (name "python-robotframework-sshlibrary")
4443 (version "3.3.0")
4444 ;; There are no tests in the PyPI archive.
4445 (source
4446 (origin
4447 (method git-fetch)
4448 (uri (git-reference
4449 (url "https://github.com/robotframework/SSHLibrary")
4450 (commit (string-append "v" version))))
4451 (file-name (git-file-name name version))
4452 (sha256
4453 (base32
4454 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4455 (build-system python-build-system)
4456 (arguments
4457 `(#:phases
4458 (modify-phases %standard-phases
4459 (add-before 'build 'build-and-install-doc
4460 (lambda* (#:key outputs #:allow-other-keys)
4461 (let* ((doc-output (assoc-ref outputs "doc"))
4462 (doc (string-append doc-output "/share/"
4463 ,name "-" ,version "/")))
4464 (invoke "chmod" "-R" "+w" "docs")
4465 (invoke "invoke" "kw-docs" "project-docs")
4466 (mkdir-p doc)
4467 (for-each delete-file (find-files "docs" "\\.rst"))
4468 (copy-recursively "docs" doc)
4469 #t)))
4470 (replace 'check
4471 (lambda _
4472 ;; Some tests require an SSH server; we remove them.
4473 (delete-file "utest/test_client_api.py")
4474 (delete-file "utest/test_scp.py")
4475 (invoke "python" "utest/run.py"))))))
4476 (propagated-inputs
4477 `(("python-robotframework" ,python-robotframework)
4478 ("python-paramiko" ,python-paramiko)
4479 ("python-scp" ,python-scp)))
4480 (native-inputs
4481 `(("openssh" ,openssh)
4482 ("which" ,which)
4483 ;; To generate the documentation
4484 ("python-docutils" ,python-docutils)
4485 ("python-invoke" ,python-invoke)
4486 ("python-pygments" ,python-pygments)
4487 ("python-rellu" ,python-rellu)))
4488 (outputs '("out" "doc"))
4489 (home-page "https://github.com/robotframework/SSHLibrary")
4490 (synopsis "Robot Framework library for SSH and SFTP")
4491 (description "SSHLibrary is a Robot Framework library providing support
4492 for SSH and SFTP. It has the following main usages:
4493 @itemize @bullet
4494 @item Executing commands on the remote machine, either blocking or non-blocking.
4495 @item Writing and reading in an interactive shell.
4496 @item Transferring files and directories over SFTP.
4497 @item Ensuring that files and directories exist on the remote machine.
4498 @end itemize")
4499 (license license:asl2.0)))
4500
4501 (define-public python-rstr
4502 (package
4503 (name "python-rstr")
4504 (version "2.2.6")
4505 (source
4506 (origin
4507 (method url-fetch)
4508 (uri (pypi-uri "rstr" version))
4509 (sha256
4510 (base32
4511 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4512 (build-system python-build-system)
4513 (home-page "https://github.com/leapfrogonline/rstr")
4514 (synopsis "Generate random strings in Python")
4515 (description "This package provides a python module for generating
4516 random strings of various types. It could be useful for fuzz testing,
4517 generating dummy data, or other applications. It has no dependencies
4518 outside the standard library.")
4519 (license license:bsd-3)))
4520
4521 (define-public python-scp
4522 (package
4523 (name "python-scp")
4524 (version "0.13.3")
4525 (source
4526 (origin
4527 (method url-fetch)
4528 (uri (pypi-uri "scp" version))
4529 (sha256
4530 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4531 (build-system python-build-system)
4532 (arguments
4533 '(#:tests? #f)) ;tests require an SSH server
4534 (propagated-inputs
4535 `(("python-paramiko" ,python-paramiko)))
4536 (home-page "https://github.com/jbardin/scp.py")
4537 (synopsis "SCP protocol module for Python and Paramiko")
4538 (description "The scp module extends the Paramiko library to send and
4539 receive files via the SCP1 protocol, as implemented by the OpenSSH
4540 @command{scp} program.")
4541 (license license:gpl2+)))
4542
4543 (define-public python-rst.linker
4544 (package
4545 (name "python-rst.linker")
4546 (version "1.11")
4547 (source
4548 (origin
4549 (method url-fetch)
4550 (uri (pypi-uri "rst.linker" version))
4551 (sha256
4552 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4553 (build-system python-build-system)
4554 (propagated-inputs
4555 `(("python-dateutil" ,python-dateutil)
4556 ("python-six" ,python-six)))
4557 (native-inputs
4558 `(("python-setuptools-scm" ,python-setuptools-scm)))
4559 ;; Test would require path.py, which would introduce a cyclic dependence.
4560 (arguments `(#:tests? #f))
4561 ;; Note: As of version 1.7 the documentation is not worth building.
4562 (home-page "https://github.com/jaraco/rst.linker")
4563 (synopsis "Sphinx plugin to add links and timestamps")
4564 (description "rst.linker automatically replaces text by a
4565 reStructuredText external reference or timestamps. It's primary purpose is to
4566 augment the changelog, but it can be used for other documents, too.")
4567 (license license:expat)))
4568
4569 (define-public python2-rst.linker
4570 (package-with-python2 python-rst.linker))
4571
4572 (define-public python-sshpubkeys
4573 (package
4574 (name "python-sshpubkeys")
4575 (version "3.1.0")
4576 (home-page "https://github.com/ojarva/python-sshpubkeys")
4577 (source (origin
4578 (method git-fetch)
4579 (uri (git-reference
4580 (url home-page)
4581 (commit (string-append "v" version))))
4582 (file-name (git-file-name name version))
4583 (sha256
4584 (base32
4585 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4586 (build-system python-build-system)
4587 (propagated-inputs
4588 `(("python-cryptography" ,python-cryptography)
4589 ("python-ecdsa" ,python-ecdsa)))
4590 (synopsis "OpenSSH public key parser")
4591 (description
4592 "This package provides a library for parsing and validating OpenSSH
4593 public key files.")
4594 (license license:bsd-3)))
4595
4596 (define-public python-feedgenerator
4597 (package
4598 (name "python-feedgenerator")
4599 (version "1.9")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (pypi-uri "feedgenerator" version))
4604 (sha256
4605 (base32
4606 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4607 (modules '((guix build utils)))
4608 (snippet
4609 '(begin
4610 ;; Remove pre-compiled .pyc files from source.
4611 (for-each delete-file-recursively
4612 (find-files "." "__pycache__" #:directories? #t))
4613 (for-each delete-file (find-files "." "\\.pyc$"))
4614 #t))))
4615 (build-system python-build-system)
4616 (propagated-inputs
4617 `(("python-pytz" ,python-pytz)
4618 ("python-six" ,python-six)))
4619 (home-page "https://github.com/getpelican/feedgenerator")
4620 (synopsis
4621 "Standalone version of Django's Atom/RSS feed generator")
4622 (description
4623 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4624 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4625 (license license:bsd-3)))
4626
4627 (define-public python2-feedgenerator
4628 (package-with-python2 python-feedgenerator))
4629
4630 (define-public python-jsonrpc-server
4631 (package
4632 (name "python-jsonrpc-server")
4633 (version "0.4.0")
4634 (source
4635 (origin
4636 (method url-fetch)
4637 (uri (pypi-uri "python-jsonrpc-server" version))
4638 (sha256
4639 (base32
4640 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4641 (build-system python-build-system)
4642 (propagated-inputs
4643 `(("python-mock" ,python-mock)
4644 ("python-pytest" ,python-pytest)
4645 ("python-ujson" ,python-ujson)))
4646 (home-page
4647 "https://github.com/palantir/python-jsonrpc-server")
4648 (synopsis "JSON RPC 2.0 server library")
4649 (description
4650 "This package provides a JSON RPC 2.0 server library for Python.")
4651 (license license:expat)))
4652
4653 (define-public python-pydantic
4654 (package
4655 (name "python-pydantic")
4656 (version "1.8.2")
4657 (source
4658 (origin
4659 (method git-fetch)
4660 (uri (git-reference
4661 (url "https://github.com/samuelcolvin/pydantic")
4662 (commit (string-append "v" version))))
4663 (file-name (git-file-name name version))
4664 (sha256
4665 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4666 (build-system python-build-system)
4667 (arguments
4668 '(#:phases
4669 (modify-phases %standard-phases
4670 (add-before 'check 'disable-test
4671 (lambda _
4672 ;; Reported upstream:
4673 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4674 ;; Disable the faulty test as the fix is unclear.
4675 (substitute* "tests/test_validators.py"
4676 (("test_assert_raises_validation_error")
4677 "_test_assert_raises_validation_error"))
4678
4679 ;; These fail because of <https://bugs.python.org/issue40398>.
4680 ;; Remove after Python has been upgraded to >= 3.9.
4681 (substitute* "tests/test_generics.py"
4682 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4683 ""))
4684 (substitute* "tests/test_schema.py"
4685 (("test_unenforced_constraints_schema")
4686 "_test_unenforced_constraints_schema"))
4687
4688 ;; Disable tests for the Hypothesis plugin because it is tricky
4689 ;; to configure in the build container.
4690 (delete-file "tests/test_hypothesis_plugin.py")))
4691 (replace 'check
4692 (lambda _ (invoke "pytest" "-vv"))))))
4693 (native-inputs
4694 `(("python-pytest" ,python-pytest)
4695 ("python-pytest-mock" ,python-pytest-mock)))
4696 (propagated-inputs
4697 `(("python-typing-extensions" ,python-typing-extensions)))
4698 (home-page "https://github.com/samuelcolvin/pydantic")
4699 (synopsis "Python data validation and settings management")
4700 (description
4701 "Pydantic enforces type hints at runtime, and provides user friendly
4702 errors when data is invalid.")
4703 (license license:expat)))
4704
4705 (define-public python-pydocstyle
4706 (package
4707 (name "python-pydocstyle")
4708 (version "3.0.0")
4709 (source
4710 (origin
4711 (method url-fetch)
4712 (uri (pypi-uri "pydocstyle" version))
4713 (sha256
4714 (base32
4715 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4716 (build-system python-build-system)
4717 (propagated-inputs
4718 `(("python-six" ,python-six)
4719 ("python-snowballstemmer" ,python-snowballstemmer)))
4720 (home-page
4721 "https://github.com/PyCQA/pydocstyle/")
4722 (synopsis "Python docstring style checker")
4723 (description
4724 "This package provides a style checker for the Python Language
4725 Server (PLS).")
4726 (license license:expat)))
4727
4728 (define-public python-language-server
4729 (package
4730 (name "python-language-server")
4731 (version "0.36.2")
4732 (source
4733 (origin
4734 (method url-fetch)
4735 (uri (pypi-uri "python-language-server" version))
4736 (sha256
4737 (base32
4738 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4739 (build-system python-build-system)
4740 (arguments
4741 `(#:phases
4742 (modify-phases %standard-phases
4743 (add-after 'unpack 'relax-deps
4744 (lambda _
4745 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4746 "pycodestyle"))
4747 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4748 #t))
4749 (add-before 'check 'set-HOME
4750 (lambda _ (setenv "HOME" "/tmp") #t))
4751 (replace 'check
4752 (lambda _
4753 ;; Disable failing test.
4754 (invoke "python" "-m" "pytest" "-k"
4755 "not test_pyqt_completion"))))))
4756 (propagated-inputs
4757 `(("python-autopep8" ,python-autopep8)
4758 ("python-configparser" ,python-configparser)
4759 ("python-pydocstyle" ,python-pydocstyle)
4760 ("python-flake8" ,python-flake8)
4761 ("python-future" ,python-future)
4762 ("python-jedi" ,python-jedi)
4763 ("python-jsonrpc-server" ,python-jsonrpc-server)
4764 ("python-pluggy" ,python-pluggy)
4765 ("python-pycodestyle" ,python-pycodestyle)
4766 ("python-pyflakes" ,python-pyflakes)
4767 ("python-rope" ,python-rope)
4768 ("python-ujson" ,python-ujson)
4769 ("python-yapf" ,python-yapf)))
4770 (native-inputs
4771 `(("python-coverage" ,python-coverage)
4772 ("python-flaky" ,python-flaky)
4773 ("python-matplotlib" ,python-matplotlib)
4774 ("python-mock" ,python-mock)
4775 ("python-numpy" ,python-numpy)
4776 ("python-pandas" ,python-pandas)
4777 ("python-pylint" ,python-pylint)
4778 ("python-pytest" ,python-pytest)
4779 ("python-pytest-cov" ,python-pytest-cov)
4780 ("python-versioneer" ,python-versioneer)))
4781 (home-page "https://github.com/palantir/python-language-server")
4782 (synopsis "Python implementation of the Language Server Protocol")
4783 (description
4784 "The Python Language Server (pyls) is an implementation of the Python 3
4785 language specification for the Language Server Protocol (LSP). This tool is
4786 used in text editing environments to provide a complete and integrated
4787 feature-set for programming Python effectively.")
4788 (license license:expat)))
4789
4790 (define-public python-pathspec
4791 (package
4792 (name "python-pathspec")
4793 (version "0.7.0")
4794 (source
4795 (origin
4796 (method url-fetch)
4797 (uri (pypi-uri "pathspec" version))
4798 (sha256
4799 (base32
4800 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4801 (build-system python-build-system)
4802 (home-page "https://github.com/cpburnz/python-path-specification")
4803 (synopsis "Utility library for gitignore style pattern matching of file paths")
4804 (description
4805 "This package provides a utility library for gitignore style pattern
4806 matching of file paths.")
4807 (license license:mpl2.0)))
4808
4809 (define-public python-black
4810 (package
4811 (name "python-black")
4812 (version "20.8b1")
4813 (source
4814 (origin
4815 (method url-fetch)
4816 (uri (pypi-uri "black" version))
4817 (sha256
4818 (base32
4819 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4820 (build-system python-build-system)
4821 (arguments
4822 `(#:phases
4823 (modify-phases %standard-phases
4824 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4825 (lambda _
4826 (let ((python3 (which "python3")))
4827 (substitute* '("tests/data/fmtonoff.py"
4828 "tests/data/string_prefixes.py"
4829 "tests/data/function.py"
4830 "tests/data/python37.py")
4831 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4832 (string-append "#!" python3 (if (string? minor-version)
4833 minor-version
4834 "")))))
4835 #t))
4836 (add-after 'unpack 'disable-broken-tests
4837 (lambda* (#:key outputs inputs #:allow-other-keys)
4838 ;; Make installed package available for running the tests
4839 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4840 ":" (getenv "PATH")))
4841
4842 ;; These tests are supposed to be skipped when the blackd
4843 ;; dependencies are missing, but this doesn't quite work.
4844 (substitute* "tests/test_black.py"
4845 (("( *)class BlackDTestCase.*" match indent)
4846 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4847 indent "class BlackDTestCase(unittest.TestCase):\n"))
4848 (("web.Application") "False")
4849 (("@unittest_run_loop") ""))
4850
4851 ;; Patching the above file breaks the self test
4852 (substitute* "tests/test_black.py"
4853 (("( *)def test_self" match indent)
4854 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4855
4856 (substitute* "tests/test_black.py"
4857 (("( *)def test_python38" match indent)
4858 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4859 #t)))))
4860 (propagated-inputs
4861 `(("python-click" ,python-click)
4862 ("python-attrs" ,python-attrs)
4863 ("python-appdirs" ,python-appdirs)
4864 ("python-pathspec" ,python-pathspec)
4865 ("python-mypy-extensions" ,python-mypy-extensions)
4866 ("python-regex" ,python-regex)
4867 ("python-toml" ,python-toml)
4868 ("python-typed-ast" ,python-typed-ast)
4869 ("python-typing-extensions" ,python-typing-extensions)))
4870 (native-inputs
4871 `(("python-setuptools-scm" ,python-setuptools-scm)))
4872 (home-page "https://github.com/ambv/black")
4873 (synopsis "The uncompromising code formatter")
4874 (description "Black is the uncompromising Python code formatter.")
4875 (license license:expat)))
4876
4877 (define-public python-black-macchiato
4878 (package
4879 (name "python-black-macchiato")
4880 (version "1.3.0")
4881 (source
4882 (origin
4883 (method url-fetch)
4884 (uri (pypi-uri "black-macchiato" version))
4885 (sha256
4886 (base32
4887 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4888 (build-system python-build-system)
4889 (propagated-inputs
4890 `(("python-black" ,python-black)))
4891 (home-page "https://github.com/wbolster/black-macchiato")
4892 (synopsis "Partial @code{python-black} formatting")
4893 (description
4894 "This package is built on top the @{python-black} code formatter to
4895 enable formatting of partial files.")
4896 (license license:bsd-3)))
4897
4898 (define-public python-blinker
4899 (package
4900 (name "python-blinker")
4901 (version "1.4")
4902 (source
4903 (origin
4904 (method url-fetch)
4905 (uri (pypi-uri "blinker" version))
4906 (sha256
4907 (base32
4908 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4909 (build-system python-build-system)
4910 (home-page "https://pythonhosted.org/blinker/")
4911 (synopsis "Fast, simple object-to-object and broadcast signaling")
4912 (description
4913 "Blinker provides a fast dispatching system that allows any number of
4914 interested parties to subscribe to events, or \"signals\".")
4915 (license license:expat)))
4916
4917 (define-public python2-blinker
4918 (package-with-python2 python-blinker))
4919
4920 (define-public pelican
4921 (package
4922 (name "pelican")
4923 (version "4.2.0")
4924 (source
4925 (origin
4926 (method url-fetch)
4927 (uri (pypi-uri "pelican" version))
4928 (sha256
4929 (base32
4930 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4931 (build-system python-build-system)
4932 (propagated-inputs
4933 `(("python-blinker" ,python-blinker)
4934 ("python-dateutil" ,python-dateutil)
4935 ("python-docutils" ,python-docutils)
4936 ("python-feedgenerator" ,python-feedgenerator)
4937 ("python-jinja2" ,python-jinja2)
4938 ("python-markdown" ,python-markdown)
4939 ("python-pygments" ,python-pygments)
4940 ("python-pytz" ,python-pytz)
4941 ("python-six" ,python-six)
4942 ("python-unidecode" ,python-unidecode)))
4943 (home-page "https://getpelican.com/")
4944 (arguments
4945 `(;; XXX Requires a lot more packages to do unit tests :P
4946 #:tests? #f))
4947 (synopsis "Python-based static site publishing system")
4948 (description
4949 "Pelican is a tool to generate a static blog from reStructuredText,
4950 Markdown input files, and more. Pelican uses Jinja2 for templating
4951 and is very extensible.")
4952 (license license:agpl3+)))
4953
4954 (define-public mallard-ducktype
4955 (package
4956 (name "mallard-ducktype")
4957 (version "1.0.2")
4958 (source
4959 (origin
4960 (method git-fetch)
4961 ;; git-reference because tests are not included in pypi source tarball
4962 ;; https://issues.guix.gnu.org/issue/36755#2
4963 (uri (git-reference
4964 (url "https://github.com/projectmallard/mallard-ducktype")
4965 (commit version)))
4966 (file-name (git-file-name name version))
4967 (sha256
4968 (base32
4969 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4970 (build-system python-build-system)
4971 (arguments
4972 '(#:phases
4973 (modify-phases %standard-phases
4974 (replace 'check
4975 (lambda _
4976 (with-directory-excursion "tests"
4977 (invoke "sh" "runtests")))))))
4978 (home-page "http://projectmallard.org")
4979 (synopsis "Convert Ducktype to Mallard documentation markup")
4980 (description
4981 "Ducktype is a lightweight syntax that can represent all the semantics
4982 of the Mallard XML documentation system. Ducktype files can be converted to
4983 Mallard using the @command{ducktype} tool. The yelp-tools package
4984 provides additional functionality on the produced Mallard documents.")
4985 (license license:expat)))
4986
4987 (define-public python-cython
4988 (package
4989 (name "python-cython")
4990 (version "0.29.22")
4991 (source
4992 (origin
4993 (method url-fetch)
4994 (uri (pypi-uri "Cython" version))
4995 (sha256
4996 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4997 (build-system python-build-system)
4998 ;; we need the full python package and not just the python-wrapper
4999 ;; because we need libpython3.3m.so
5000 (inputs
5001 `(("python" ,python)))
5002 (arguments
5003 `(#:phases
5004 (modify-phases %standard-phases
5005 (add-before 'check 'set-HOME
5006 ;; some tests require access to "$HOME/.cython"
5007 (lambda _ (setenv "HOME" "/tmp") #t))
5008 (replace 'check
5009 (lambda _
5010 ;; Disable compiler optimizations to greatly reduce the running
5011 ;; time of the test suite.
5012 (setenv "CFLAGS" "-O0")
5013
5014 (invoke "python" "runtests.py" "-vv"
5015 "-j" (number->string (parallel-job-count))
5016 ;; XXX: On 32-bit architectures, running the parallel tests
5017 ;; fails on many-core systems, see
5018 ;; <https://github.com/cython/cython/issues/2807>.
5019 ,@(if (not (target-64bit?))
5020 '("-x" "run.parallel")
5021 '())))))))
5022 (home-page "https://cython.org/")
5023 (synopsis "C extensions for Python")
5024 (description "Cython is an optimising static compiler for both the Python
5025 programming language and the extended Cython programming language. It makes
5026 writing C extensions for Python as easy as Python itself.")
5027 (license license:asl2.0)
5028 (properties `((python2-variant . ,(delay python2-cython))))))
5029
5030 (define-public python2-cython
5031 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
5032 (package/inherit base
5033 (name "python2-cython")
5034 (inputs
5035 `(("python-2" ,python-2))) ;this is not automatically changed
5036 (arguments
5037 (substitute-keyword-arguments (package-arguments base)
5038 ((#:phases phases)
5039 `(modify-phases ,phases
5040 (add-before 'check 'adjust-test_embed
5041 (lambda _
5042 (substitute* "runtests.py"
5043 ;; test_embed goes great lengths to find the static libpythonX.Y.a
5044 ;; so it can give the right -L flag to GCC when embedding static
5045 ;; builds of Python. It is unaware that the Python "config"
5046 ;; directory (where the static library lives) was renamed in
5047 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
5048 ;; which works fine, because that is where the shared library is.
5049 ;;
5050 ;; It also appears to be unaware that the Makefile in Demos/embed
5051 ;; already unconditionally pass the static library location to GCC,
5052 ;; after checking sysconfig.get_config_var('LIBPL).
5053 ;;
5054 ;; The effect is that the linker is unable to resolve libexpat
5055 ;; symbols when building for Python 2, because neither the Python 2
5056 ;; shared library nor Expat is available. To fix it, we can either
5057 ;; add Expat as an input and make it visible to the linker, or just
5058 ;; prevent it from overriding the Python shared library location.
5059 ;; The end result is identical, so we take the easy route.
5060 ((" or libname not in os\\.listdir\\(libdir\\)")
5061 ""))
5062 #t)))))))))
5063
5064 ;; NOTE: when upgrading numpy please make sure that python-pandas and
5065 ;; python-scipy still build, as these three packages are often used together.
5066 (define-public python-numpy
5067 (package
5068 (name "python-numpy")
5069 (version "1.17.3")
5070 (source
5071 (origin
5072 (method url-fetch)
5073 (uri (string-append
5074 "https://github.com/numpy/numpy/releases/download/v"
5075 version "/numpy-" version ".tar.gz"))
5076 (sha256
5077 (base32
5078 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
5079 (build-system python-build-system)
5080 (inputs
5081 `(("openblas" ,openblas)))
5082 (native-inputs
5083 `(("python-cython" ,python-cython)
5084 ("python-pytest" ,python-pytest)
5085 ("gfortran" ,gfortran)))
5086 (arguments
5087 `(#:phases
5088 (modify-phases %standard-phases
5089 (add-before 'build 'configure-blas-lapack
5090 (lambda* (#:key inputs #:allow-other-keys)
5091 (call-with-output-file "site.cfg"
5092 (lambda (port)
5093 (format port
5094 "[openblas]
5095 libraries = openblas
5096 library_dirs = ~a/lib
5097 include_dirs = ~a/include
5098
5099 # backslash-n to make emacs happy
5100 \n[lapack]
5101 lapack_libs = lapack
5102 library_dirs = ~a/lib
5103 include_dirs = ~a/include
5104 "
5105 (assoc-ref inputs "openblas")
5106 (assoc-ref inputs "openblas")
5107 (assoc-ref inputs "lapack")
5108 (assoc-ref inputs "lapack"))))
5109 #t))
5110 (add-before 'build 'fix-executable-paths
5111 (lambda* (#:key inputs #:allow-other-keys)
5112 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5113 ;; instead of /bin/sh.
5114 (substitute* "numpy/distutils/exec_command.py"
5115 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
5116 (string-append match-start (assoc-ref inputs "bash") match-end)))
5117 ;; Use "gcc" executable, not "cc".
5118 (substitute* "numpy/distutils/system_info.py"
5119 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5120 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
5121 #t))
5122 ;; Tests can only be run after the library has been installed and not
5123 ;; within the source directory.
5124 (delete 'check)
5125 (add-after 'install 'check
5126 (lambda* (#:key outputs inputs #:allow-other-keys)
5127 ;; Make installed package available for running the tests
5128 (add-installed-pythonpath inputs outputs)
5129 ;; Make sure "f2py" etc is found.
5130 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5131 ":" (getenv "PATH")))
5132 (with-directory-excursion "/tmp"
5133 (invoke "python" "-c"
5134 "import numpy; numpy.test(verbose=2)")))))))
5135 (home-page "https://numpy.org")
5136 (synopsis "Fundamental package for scientific computing with Python")
5137 (description "NumPy is the fundamental package for scientific computing
5138 with Python. It contains among other things: a powerful N-dimensional array
5139 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5140 and Fortran code, useful linear algebra, Fourier transform, and random number
5141 capabilities.")
5142 (properties `((python2-variant . ,(delay python2-numpy))))
5143 (license license:bsd-3)))
5144
5145 ;; Numpy 1.16.x are the last versions that support Python 2.
5146 (define-public python2-numpy
5147 (let ((numpy (package-with-python2
5148 (strip-python2-variant python-numpy))))
5149 (package
5150 (inherit numpy)
5151 (version "1.16.5")
5152 (source (origin
5153 (method url-fetch)
5154 (uri (string-append
5155 "https://github.com/numpy/numpy/releases/download/v"
5156 version "/numpy-" version ".tar.gz"))
5157 (sha256
5158 (base32
5159 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5160
5161 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5162 ;; interest only for legacy code going back to NumPy's predecessor
5163 ;; Numeric.
5164 (define-public python2-numpy-1.8
5165 (package (inherit python2-numpy)
5166 (version "1.8.2")
5167 (source
5168 (origin
5169 (method git-fetch)
5170 (uri (git-reference
5171 (url "https://github.com/numpy/numpy")
5172 (commit (string-append "v" version))))
5173 (file-name (git-file-name "numpy" version))
5174 (sha256
5175 (base32
5176 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5177 (arguments
5178 (substitute-keyword-arguments (package-arguments python2-numpy)
5179 ((#:phases phases)
5180 `(modify-phases ,phases
5181 (replace 'configure-blas-lapack
5182 (lambda* (#:key inputs #:allow-other-keys)
5183 (call-with-output-file "site.cfg"
5184 (lambda (port)
5185 (format port
5186 "[openblas]
5187 libraries = openblas,lapack
5188 library_dirs = ~a/lib:~a/lib
5189 include_dirs = ~a/include:~a/include
5190 "
5191 (assoc-ref inputs "openblas")
5192 (assoc-ref inputs "lapack")
5193 (assoc-ref inputs "openblas")
5194 (assoc-ref inputs "lapack"))))
5195 #t))))))
5196 (native-inputs
5197 `(("python2-nose" ,python2-nose)))
5198 (description "NumPy is the fundamental package for scientific computing
5199 with Python. It contains among other things: a powerful N-dimensional array
5200 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5201 and Fortran code, useful linear algebra, Fourier transform, and random number
5202 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5203 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5204 Numeric.")
5205 (license license:bsd-3)))
5206
5207 (define-public python-munch
5208 (package
5209 (name "python-munch")
5210 (version "2.0.4")
5211 (source
5212 (origin
5213 (method url-fetch)
5214 (uri (pypi-uri "munch" version))
5215 (sha256
5216 (base32
5217 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5218 (build-system python-build-system)
5219 (home-page "https://github.com/Infinidat/munch")
5220 (synopsis "Dot-accessible dictionary")
5221 (description "Munch is a dot-accessible dictionary similar to JavaScript
5222 objects.")
5223 (license license:expat)))
5224
5225 (define-public python2-munch
5226 (package-with-python2 python-munch))
5227
5228 (define-public python-colormath
5229 (package
5230 (name "python-colormath")
5231 (version "3.0.0")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (pypi-uri "colormath" version))
5236 (sha256
5237 (base32
5238 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5239 (build-system python-build-system)
5240 (propagated-inputs
5241 `(("python-networkx" ,python-networkx)
5242 ("python-numpy" ,python-numpy)))
5243 (home-page "https://github.com/gtaylor/python-colormath")
5244 (synopsis "Color math and conversion library")
5245 (description
5246 "This is a Python library for color math and conversions.")
5247 (license license:bsd-3)))
5248
5249 (define-public python2-colormath
5250 (package-with-python2 python-colormath))
5251
5252 (define-public python-sparse
5253 (package
5254 (name "python-sparse")
5255 (version "0.12.0")
5256 (source
5257 (origin
5258 (method url-fetch)
5259 (uri (pypi-uri "sparse" version))
5260 (sha256
5261 (base32
5262 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5263 (build-system python-build-system)
5264 (arguments
5265 `(#:phases
5266 (modify-phases %standard-phases
5267 (replace 'check
5268 (lambda* (#:key tests? #:allow-other-keys)
5269 (when tests?
5270 (invoke "python" "-m" "pytest" "-v")))))))
5271 (propagated-inputs
5272 `(("python-numba" ,python-numba)
5273 ("python-numpy" ,python-numpy)
5274 ("python-scipy" ,python-scipy)))
5275 (native-inputs
5276 `(("python-dask" ,python-dask)
5277 ("python-pytest" ,python-pytest)
5278 ("python-pytest-black" ,python-pytest-black)
5279 ("python-pytest-cov" ,python-pytest-cov)))
5280 (home-page "https://github.com/pydata/sparse/")
5281 (synopsis "Library for multi-dimensional sparse arrays")
5282 (description
5283 "This package implements sparse arrays of arbitrary dimension on top of
5284 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5285 of the elements are zero. @code{python-sparse} generalizes the
5286 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5287 extends beyond just rows and columns to an arbitrary number of dimensions.
5288 Additionally, this project maintains compatibility with the
5289 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5290 used in @code{scipy.sparse}. These differences make this project useful in
5291 certain situations where @code{scipy.sparse} matrices are not well suited, but
5292 it should not be considered a full replacement. It lacks layouts that are not
5293 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5294 depends on @code{scipy.sparse} for some computations.")
5295 (license license:bsd-3)))
5296
5297 (define-public python-spectra
5298 (package
5299 (name "python-spectra")
5300 (version "0.0.11")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (pypi-uri "spectra" version))
5305 (sha256
5306 (base32
5307 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5308 (build-system python-build-system)
5309 (arguments
5310 `(#:phases
5311 (modify-phases %standard-phases
5312 (replace 'check
5313 (lambda _ (invoke "nosetests" "-v"))))))
5314 (propagated-inputs
5315 `(("python-colormath" ,python-colormath)))
5316 (native-inputs
5317 `(("python-nose" ,python-nose)))
5318 (home-page "https://github.com/jsvine/spectra")
5319 (synopsis "Color scales and color conversion")
5320 (description
5321 "This package provides a Python library intended to make color math,
5322 color scales, and color space conversion easy. It has support for:
5323
5324 @enumerate
5325 @item Color scales
5326 @item Color ranges
5327 @item Color blending
5328 @item Brightening/darkening colors
5329 @item Saturating/desaturating colors
5330 @item Conversion to/from multiple color spaces.
5331 @end enumerate\n")
5332 (license license:expat)))
5333
5334 (define-public python2-spectra
5335 (package-with-python2 python-spectra))
5336
5337 (define-public python-pyspnego
5338 (package
5339 (name "python-pyspnego")
5340 (version "0.1.6")
5341 (source
5342 (origin
5343 (method git-fetch) ;no tests in PyPI release
5344 (uri (git-reference
5345 (url "https://github.com/jborean93/pyspnego")
5346 (commit (string-append "v" version))))
5347 (file-name (git-file-name name version))
5348 (sha256
5349 (base32
5350 "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
5351 (build-system python-build-system)
5352 (arguments
5353 `(#:phases (modify-phases %standard-phases
5354 (replace 'check
5355 (lambda* (#:key tests? #:allow-other-keys)
5356 (when tests?
5357 (invoke "pytest")))))))
5358 (native-inputs
5359 `(("python-pytest" ,python-pytest)
5360 ("python-pytest-mock" ,python-pytest-mock)))
5361 (propagated-inputs
5362 `(("python-cryptography" ,python-cryptography)
5363 ("python-gssapi" ,python-gssapi)
5364 ("python-ruamel.yaml" ,python-ruamel.yaml)))
5365 (home-page "https://github.com/jborean93/pyspnego")
5366 (synopsis "Python SPNEGO library")
5367 (description "The @code{pyspnego} Python library handles Negotiate, NTLM,
5368 Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet
5369 parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human
5370 readable format.")
5371 (license license:expat)))
5372
5373 (define-public python-numpy-documentation
5374 (package
5375 (name "python-numpy-documentation")
5376 (version (package-version python-numpy))
5377 (source (package-source python-numpy))
5378 (build-system python-build-system)
5379 (native-inputs
5380 `(("python-matplotlib" ,python-matplotlib)
5381 ("python-numpy" ,python-numpy)
5382 ("pkg-config" ,pkg-config)
5383 ("python-sphinx" ,python-sphinx)
5384 ("python-numpydoc" ,python-numpydoc)
5385 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
5386 texlive-fonts-ec
5387 texlive-generic-ifxetex
5388 texlive-pdftex
5389 texlive-amsfonts/patched
5390 texlive-latex-capt-of
5391 texlive-latex-cmap
5392 texlive-latex-environ
5393 texlive-latex-eqparbox
5394 texlive-latex-etoolbox
5395 texlive-latex-expdlist
5396 texlive-latex-fancyhdr
5397 texlive-latex-fancyvrb
5398 texlive-latex-fncychap
5399 texlive-latex-float
5400 texlive-latex-framed
5401 texlive-latex-geometry
5402 texlive-latex-graphics
5403 texlive-latex-hyperref
5404 texlive-latex-mdwtools
5405 texlive-latex-multirow
5406 texlive-latex-needspace
5407 texlive-latex-oberdiek
5408 texlive-latex-parskip
5409 texlive-latex-preview
5410 texlive-latex-tabulary
5411 texlive-latex-threeparttable
5412 texlive-latex-titlesec
5413 texlive-latex-trimspaces
5414 texlive-latex-ucs
5415 texlive-latex-upquote
5416 texlive-latex-url
5417 texlive-latex-varwidth
5418 texlive-latex-wrapfig)))
5419 ("texinfo" ,texinfo)
5420 ("perl" ,perl)
5421 ("scipy-sphinx-theme"
5422 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5423 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5424 (method git-fetch)
5425 (uri (git-reference
5426 (url "https://github.com/scipy/scipy-sphinx-theme")
5427 (commit commit)))
5428 (file-name (git-file-name "python-scipy-sphinx-theme"
5429 (string-take commit 7)))
5430 (sha256
5431 (base32
5432 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5433 ,@(package-native-inputs python-numpy)))
5434 (arguments
5435 `(#:tests? #f ; we're only generating the documentation
5436 #:phases
5437 (modify-phases %standard-phases
5438 (delete 'build)
5439 (replace 'install
5440 (lambda* (#:key inputs outputs #:allow-other-keys)
5441 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5442 (doc (string-append
5443 data "/doc/" ,name "-"
5444 ,(package-version python-numpy)))
5445 (info-reader (string-append data "/info"))
5446 (html (string-append doc "/html"))
5447 (scipy-sphinx-theme "scipy-sphinx-theme")
5448 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5449 (pyver ,(string-append "PYVER=")))
5450
5451 ;; FIXME: this is needed to for texlive-union to generate
5452 ;; fonts, which are not found.
5453 (setenv "HOME" "/tmp")
5454
5455 (with-directory-excursion "doc"
5456 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5457 (mkdir-p html)
5458 (invoke "make" "html" pyver)
5459 (invoke "make" "latex" "PAPER=a4" pyver)
5460 (invoke "make" "-C" "build/latex"
5461 "all-pdf" "PAPER=a4" pyver)
5462 ;; FIXME: Generation of the info file fails.
5463 ;; (invoke "make" "info" pyver)
5464 ;; (mkdir-p info)
5465 ;; (copy-file "build/texinfo/numpy.info"
5466 ;; (string-append info "/numpy.info"))
5467 (for-each (lambda (file)
5468 (copy-file (string-append "build/latex" file)
5469 (string-append doc file)))
5470 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5471 (with-directory-excursion "build/html"
5472 (for-each (lambda (file)
5473 (let* ((dir (dirname file))
5474 (tgt-dir (string-append html "/" dir)))
5475 (unless (equal? "." dir)
5476 (mkdir-p tgt-dir))
5477 (install-file file html)))
5478 (find-files "." ".*")))))
5479 #t)))))
5480 (home-page (package-home-page python-numpy))
5481 (synopsis "Documentation for the python-numpy package")
5482 (description (package-description python-numpy))
5483 (license (package-license python-numpy))))
5484
5485 (define-public python-pygit2
5486 (package
5487 (name "python-pygit2")
5488 (version "1.6.0")
5489 (source
5490 (origin
5491 (method url-fetch)
5492 (uri (pypi-uri "pygit2" version))
5493 (sha256
5494 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5495 (build-system python-build-system)
5496 (arguments
5497 '(#:tests? #f)) ; tests don't run correctly in our environment
5498 (propagated-inputs
5499 `(("python-cached-property" ,python-cached-property)
5500 ("python-cffi" ,python-cffi)
5501 ("libgit2" ,libgit2)))
5502 (native-inputs
5503 `(("python-pytest" ,python-pytest)))
5504 (home-page "https://github.com/libgit2/pygit2")
5505 (synopsis "Python bindings for libgit2")
5506 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5507 library, libgit2 implements Git plumbing.")
5508 ;; GPL2.0 only, with linking exception.
5509 (license license:gpl2)))
5510
5511 (define-public python-patiencediff
5512 (package
5513 (name "python-patiencediff")
5514 (version "0.2.0")
5515 (source
5516 (origin
5517 (method url-fetch)
5518 (uri (pypi-uri "patiencediff" version))
5519 (sha256
5520 (base32
5521 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5522 (build-system python-build-system)
5523 (home-page "https://www.breezy-vcs.org/")
5524 (synopsis "Python implementation of the patiencediff algorithm")
5525 (description
5526 "This package contains a Python implementation of the @code{patiencediff}
5527 algorithm. Patiencediff provides a good balance of performance, nice output for
5528 humans, and implementation simplicity.")
5529 (license license:gpl2)))
5530
5531 (define-public python-wmctrl
5532 (package
5533 (name "python-wmctrl")
5534 (version "0.4")
5535 (source
5536 (origin
5537 (method url-fetch)
5538 (uri (pypi-uri "wmctrl" version))
5539 (sha256
5540 (base32
5541 "1q0l1sqnj5wma87k3dsgmsyph464syjc6fl8qcpa41nan1rgzjv6"))))
5542 (build-system python-build-system)
5543 (arguments
5544 `(#:phases (modify-phases %standard-phases
5545 (add-after 'unpack 'patch-paths
5546 (lambda* (#:key inputs #:allow-other-keys)
5547 (let ((wmctrl (assoc-ref inputs "wmctrl")))
5548 (substitute* "wmctrl.py"
5549 (("'wmctrl")
5550 (string-append "'" wmctrl "/bin/wmctrl")))))))))
5551 (inputs `(("wmctrl" ,wmctrl)))
5552 (home-page "https://github.com/antocuni/wmctrl")
5553 (synopsis "Tool to programmatically control Xorg windows")
5554 (description "This package provides a library for programmatically
5555 controlling Xorg windows using Python. The library relies on the
5556 @command{wmctrl} to do so.")
5557 (license license:expat)))
5558
5559 (define-public python-fancycompleter
5560 (package
5561 (name "python-fancycompleter")
5562 (version "0.9.1")
5563 (source
5564 (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "fancycompleter" version))
5567 (sha256
5568 (base32 "0wkj4h01pxa8prv59zl09a0i3w26k835bfpjgvyvsai4mswgxq09"))))
5569 (build-system python-build-system)
5570 (arguments
5571 `(#:phases (modify-phases %standard-phases
5572 (add-after 'unpack 'fix-setup.py
5573 (lambda _
5574 (substitute* "setup.py"
5575 ((".*setupmeta.*")
5576 "")
5577 (("versioning=.*")
5578 (string-append "version='" ,version "',"))
5579 ((".*pyrepl.*") ;broken on Python 3
5580 "")))))))
5581 (home-page "https://github.com/pdbpp/fancycompleter")
5582 (synopsis "TAB completion library for Python")
5583 (description "@code{fancycompleter} is a module that adds TAB completion
5584 to the interactive prompt. It is an extension of the @code{rlcompleter}
5585 module from the standard Python library.")
5586 (license license:bsd-3)))
5587
5588 (define-public python-pdbpp
5589 (package
5590 (name "python-pdbpp")
5591 (version "0.10.3")
5592 (source
5593 (origin
5594 (method url-fetch)
5595 (uri (pypi-uri "pdbpp" version))
5596 (sha256
5597 (base32
5598 "1xb9yvi30rb1cdpvfdk2kg79vh3anvkz91r8bwvfp3iqv97kzr6r"))))
5599 (build-system python-build-system)
5600 (arguments
5601 `(#:phases
5602 (modify-phases %standard-phases
5603 (replace 'check
5604 (lambda* (#:key tests? #:allow-other-keys)
5605 (when tests?
5606 (invoke "pytest"
5607 "-k"
5608 (string-append
5609 ;; These tests seem to require a real TTY.
5610 "not interaction_restores_previous_sigint_handler "
5611 "and not python_m_pdb_uses_pdbpp"))))))))
5612 (propagated-inputs
5613 `(("python-fancycompleter" ,python-fancycompleter)
5614 ("python-pygments" ,python-pygments)
5615 ("python-wmctrl" ,python-wmctrl)))
5616 (native-inputs
5617 `(("python-pytest" ,python-pytest)
5618 ("python-setuptools-scm" ,python-setuptools-scm)))
5619 (home-page "https://github.com/pdbpp/pdbpp")
5620 (synopsis "Drop-in replacement for pdb")
5621 (description "Pdb++ is a drop-in replacement for @code{pdb}. It
5622 includes the following improvements compared to @code{pdb}:
5623 @itemize
5624 @item auto-completion
5625 @item syntax highlighting of code listings
5626 @item sticky mode
5627 @item new commands to be used from the interactive (Pdb++) prompt
5628 @item smart command parsing
5629 @item additional convenience functions in the @code{pdb} module.
5630 @end itemize")
5631 (license license:bsd-3)))
5632
5633 (define-public python-pdftotext
5634 (package
5635 (name "python-pdftotext")
5636 (version "2.1.6")
5637 (source
5638 (origin
5639 (method url-fetch)
5640 (uri (pypi-uri "pdftotext" version))
5641 (sha256
5642 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5643 (build-system python-build-system)
5644 (inputs
5645 `(("poppler" ,poppler)))
5646 (home-page "https://github.com/jalan/pdftotext")
5647 (synopsis "Simple PDF text extraction")
5648 (description "Pdftotext is a Python library of PDF text extraction.")
5649 (license license:expat)))
5650
5651 (define-public python-pluginbase
5652 (package
5653 (name "python-pluginbase")
5654 (version "1.0.1")
5655 (source
5656 (origin
5657 (method url-fetch)
5658 (uri (pypi-uri "pluginbase" version))
5659 (sha256
5660 (base32
5661 "11z2vvbp13828y0x3w39f29p9r9xcix7h7c4fff2w8yfiylk6v7z"))))
5662 (build-system python-build-system)
5663 (arguments
5664 `(#:phases (modify-phases %standard-phases
5665 (replace 'check
5666 (lambda* (#:key tests? #:allow-other-keys)
5667 (when tests?
5668 (invoke "make" "test")))))))
5669 (native-inputs `(("python-pytest" ,python-pytest)))
5670 (home-page "https://github.com/mitsuhiko/pluginbase")
5671 (synopsis "Simple but flexible plugin system for Python")
5672 (description "PluginBase is a library useful in the development of
5673 flexible plugin systems in Python.")
5674 (license license:bsd-3)))
5675
5676 (define-public python-node-semver
5677 (package
5678 (name "python-node-semver")
5679 (version "0.8.1")
5680 (source
5681 (origin
5682 (method url-fetch)
5683 (uri (pypi-uri "node-semver" version))
5684 (sha256
5685 (base32
5686 "000ypfns5x72b41w5f9pk6k3jnr35scliqfbvmilyvv0178005i8"))))
5687 (build-system python-build-system)
5688 (native-inputs
5689 `(("python-pytest" ,python-pytest)))
5690 (home-page "https://github.com/podhmo/python-node-semver")
5691 (synopsis "Python port of node-semver")
5692 (description "This module provides a Python version of node-semver, a
5693 semantic version parser for Node.js.")
5694 (license license:expat)))
5695
5696 (define-public python-patch-ng
5697 (package
5698 (name "python-patch-ng")
5699 (version "1.17.4")
5700 (source
5701 (origin
5702 (method git-fetch) ;no tests in PyPI archive
5703 (uri (git-reference
5704 (url "https://github.com/conan-io/python-patch-ng")
5705 (commit version)))
5706 (file-name (git-file-name name version))
5707 (sha256
5708 (base32
5709 "0qxn4ss2s54qy87xrpcybz26kp2fwlaq41x4k9jcmp6d7p0w569m"))))
5710 (build-system python-build-system)
5711 (arguments
5712 `(#:phases (modify-phases %standard-phases
5713 (replace 'check
5714 (lambda* (#:key tests? #:allow-other-keys)
5715 (when tests?
5716 (invoke "tests/run_tests.py" "-v")))))))
5717 (home-page "https://github.com/conan-io/python-patch-ng")
5718 (synopsis "Python library to parse and apply unified diffs")
5719 (description "Patch NG (New Generation) is a command and Python library to
5720 parse and apply unified diffs. It has features such as:
5721 @itemize
5722 @item automatic correction of common patch formatting corruption
5723 @item patch format detection (SVN, Hg, Git)
5724 @item nice diffstat histogram.
5725 @end itemize")
5726 (license license:expat)))
5727
5728 (define-public python-pyparsing
5729 (package
5730 (name "python-pyparsing")
5731 (version "2.4.6")
5732 (source
5733 (origin
5734 (method url-fetch)
5735 (uri (pypi-uri "pyparsing" version))
5736 (sha256
5737 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5738 (build-system python-build-system)
5739 (outputs '("out" "doc"))
5740 (arguments
5741 `(#:tests? #f ; no test target
5742 #:phases
5743 (modify-phases %standard-phases
5744 (add-after 'install 'install-doc
5745 (lambda* (#:key outputs #:allow-other-keys)
5746 (let* ((doc (string-append (assoc-ref outputs "doc")
5747 "/share/doc/" ,name "-" ,version))
5748 (html-doc (string-append doc "/html"))
5749 (examples (string-append doc "/examples")))
5750 (mkdir-p html-doc)
5751 (mkdir-p examples)
5752 (for-each
5753 (lambda (dir tgt)
5754 (map (lambda (file)
5755 (install-file file tgt))
5756 (find-files dir ".*")))
5757 (list "docs" "htmldoc" "examples")
5758 (list doc html-doc examples))
5759 #t))))))
5760 (home-page "https://github.com/pyparsing/pyparsing")
5761 (synopsis "Python parsing class library")
5762 (description
5763 "The pyparsing module is an alternative approach to creating and
5764 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5765 of regular expressions. The pyparsing module provides a library of classes
5766 that client code uses to construct the grammar directly in Python code.")
5767 (license license:expat)))
5768
5769 (define-public python2-pyparsing
5770 (package-with-python2 python-pyparsing))
5771
5772 (define-public python-pyparsing-2.4.7
5773 (package
5774 (inherit python-pyparsing)
5775 (version "2.4.7")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "pyparsing" version))
5780 (sha256
5781 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5782
5783 (define-public python-numpydoc
5784 (package
5785 (name "python-numpydoc")
5786 (version "0.8.0")
5787 (source
5788 (origin
5789 (method url-fetch)
5790 (uri (pypi-uri "numpydoc" version))
5791 (sha256
5792 (base32
5793 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5794 (build-system python-build-system)
5795 (propagated-inputs
5796 `(("python-sphinx" ,python-sphinx)))
5797 (native-inputs
5798 `(("python-nose" ,python-nose)))
5799 (home-page "https://pypi.org/project/numpydoc/")
5800 (synopsis
5801 "Numpy's Sphinx extensions")
5802 (description
5803 "Sphinx extension to support docstrings in Numpy format.")
5804 (license license:bsd-2)
5805 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5806
5807 (define-public python2-numpydoc
5808 (let ((base (package-with-python2
5809 (strip-python2-variant python-numpydoc))))
5810 (package/inherit base
5811 (propagated-inputs
5812 `(("python2-jinja2" ,python2-jinja2)
5813 ,@(package-propagated-inputs base))))))
5814
5815 (define-public python-numexpr
5816 (package
5817 (name "python-numexpr")
5818 (version "2.7.3")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "numexpr" version))
5823 (sha256
5824 (base32
5825 "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
5826 (build-system python-build-system)
5827 (arguments `(#:tests? #f)) ; no tests included
5828 (propagated-inputs
5829 `(("python-numpy" ,python-numpy)))
5830 (home-page "https://github.com/pydata/numexpr")
5831 (synopsis "Fast numerical expression evaluator for NumPy")
5832 (description
5833 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5834 expressions that operate on arrays are accelerated and use less memory than
5835 doing the same calculation in Python. In addition, its multi-threaded
5836 capabilities can make use of all your cores, which may accelerate
5837 computations, most specially if they are not memory-bounded (e.g. those using
5838 transcendental functions).")
5839 (license license:expat)))
5840
5841 (define-public python2-numexpr
5842 (package-with-python2 python-numexpr))
5843
5844 (define-public python-cycler
5845 (package
5846 (name "python-cycler")
5847 (version "0.10.0")
5848 (source (origin
5849 (method url-fetch)
5850 (uri (pypi-uri "cycler" version))
5851 (sha256
5852 (base32
5853 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5854 (build-system python-build-system)
5855 (arguments
5856 ;; XXX: The current version requires 'coveralls' which we don't have.
5857 ;; Enable this for the next release which uses 'python-pytest'.
5858 '(#:tests? #f))
5859 (propagated-inputs
5860 `(("python-six" ,python-six)))
5861 (home-page "https://matplotlib.org/cycler/")
5862 (synopsis "Composable keyword argument iterator")
5863 (description
5864 "When using @code{matplotlib} and plotting more than one line, it is
5865 common to want to be able to want to be able to cycle over one or more artist
5866 styles; but the plotting logic can quickly become involved.
5867 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5868 @code{Cycler} class was developed.")
5869 (license license:bsd-3)))
5870
5871 (define-public python2-cycler
5872 (package-with-python2 python-cycler))
5873
5874 (define-public python-colorspacious
5875 (package
5876 (name "python-colorspacious")
5877 (version "1.1.2")
5878 (source
5879 (origin
5880 (method git-fetch)
5881 (uri (git-reference
5882 (url "https://github.com/njsmith/colorspacious")
5883 (commit (string-append "v" version))))
5884 (file-name (git-file-name name version))
5885 (sha256
5886 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5887 (build-system python-build-system)
5888 (propagated-inputs
5889 `(("python-numpy" ,python-numpy)))
5890 (native-inputs
5891 `(("python-nose" ,python-nose)))
5892 (arguments
5893 `(#:phases
5894 (modify-phases %standard-phases
5895 (replace 'check
5896 (lambda _
5897 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5898 (home-page "https://github.com/njsmith/colorspacious")
5899 (synopsis "Python library for colorspace conversions")
5900 (description "@code{colorspacious} is a Python library that lets you
5901 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5902 (license license:expat)))
5903
5904 (define-public python2-colorspacious
5905 (package-with-python2 python-colorspacious))
5906
5907 (define-public python-matplotlib
5908 (package
5909 (name "python-matplotlib")
5910 (version "3.1.2")
5911 (source
5912 (origin
5913 (method url-fetch)
5914 (uri (pypi-uri "matplotlib" version))
5915 (sha256
5916 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5917 (patches
5918 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5919 (build-system python-build-system)
5920 (propagated-inputs ; the following packages are all needed at run time
5921 `(("python-cycler" ,python-cycler)
5922 ("python-kiwisolver" ,python-kiwisolver)
5923 ("python-pyparsing" ,python-pyparsing)
5924 ("python-pygobject" ,python-pygobject)
5925 ("gobject-introspection" ,gobject-introspection)
5926 ("python-tkinter" ,python "tk")
5927 ("python-dateutil" ,python-dateutil)
5928 ("python-numpy" ,python-numpy)
5929 ("python-pillow" ,python-pillow)
5930 ("python-pytz" ,python-pytz)
5931 ("python-six" ,python-six)
5932 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5933 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5934 ;; object. For this reason we need to import both libraries.
5935 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5936 ("python-pycairo" ,python-pycairo)
5937 ("python-cairocffi" ,python-cairocffi)))
5938 (inputs
5939 `(("libpng" ,libpng)
5940 ("freetype" ,freetype)
5941 ("cairo" ,cairo)
5942 ("glib" ,glib)
5943 ;; FIXME: Add backends when available.
5944 ;("python-wxpython" ,python-wxpython)
5945 ("tcl" ,tcl)
5946 ("tk" ,tk)))
5947 (native-inputs
5948 `(("pkg-config" ,pkg-config)
5949 ("python-pytest" ,python-pytest)
5950 ("python-mock" ,python-mock)
5951 ("unzip" ,unzip)
5952 ("jquery-ui"
5953 ,(origin
5954 (method url-fetch)
5955 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5956 (sha256
5957 (base32
5958 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5959 (arguments
5960 `(#:phases
5961 (modify-phases %standard-phases
5962 ;; XXX We disable all image comparison tests because we're using a
5963 ;; newer version of FreeType than matplotlib expects. This leads to
5964 ;; minor differences throughout the tests.
5965 (add-after 'unpack 'fix-and-disable-failing-tests
5966 (lambda _
5967 (substitute* (append (find-files "lib/matplotlib/tests/"
5968 "test_.*\\.py$")
5969 (find-files "lib/mpl_toolkits/tests"
5970 "test_.*\\.py$"))
5971 (("^from matplotlib" match)
5972 (string-append "import pytest\n" match))
5973 (("( *)@image_comparison" match indent)
5974 (string-append indent
5975 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5976 match)))
5977 (substitute* "lib/matplotlib/tests/test_animation.py"
5978 (("/bin/sh") (which "sh")))
5979 (for-each delete-file
5980 ;; test_normal_axes, test_get_tightbbox_polar
5981 '("lib/matplotlib/tests/test_axes.py"
5982 ;; We don't use the webagg backend and this test forces it.
5983 "lib/matplotlib/tests/test_backend_webagg.py"
5984 ;; test_outward_ticks
5985 "lib/matplotlib/tests/test_tightlayout.py"
5986 ;; test_hidden_axes fails with minor extent
5987 ;; differences, possibly due to the use of a
5988 ;; different version of FreeType.
5989 "lib/matplotlib/tests/test_constrainedlayout.py"
5990 ;; Fontconfig returns no fonts.
5991 "lib/matplotlib/tests/test_font_manager.py"))
5992 #t))
5993 (add-before 'install 'install-jquery-ui
5994 (lambda* (#:key outputs inputs #:allow-other-keys)
5995 (let* ((python-version (python-version
5996 (assoc-ref inputs "python")))
5997 (dir (string-append (assoc-ref outputs "out")
5998 "/lib/python" python-version "/site-packages"
5999 "/matplotlib/backends/web_backend/")))
6000 (mkdir-p dir)
6001 (invoke "unzip"
6002 (assoc-ref inputs "jquery-ui")
6003 "-d" dir))
6004 #t))
6005 (replace 'check
6006 (lambda* (#:key outputs inputs #:allow-other-keys)
6007 (add-installed-pythonpath inputs outputs)
6008 (invoke "python" "tests.py" "-v"
6009 "-m" "not network and not webagg")))
6010 (add-before 'build 'configure-environment
6011 (lambda* (#:key outputs inputs #:allow-other-keys)
6012 (let ((cairo (assoc-ref inputs "cairo")))
6013 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
6014 ;; has not effect.
6015 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
6016 (setenv "HOME" (getcwd))
6017 ;; Fix rounding errors when using the x87 FPU.
6018 (when (string-prefix? "i686" ,(%current-system))
6019 (setenv "CFLAGS" "-ffloat-store"))
6020 (call-with-output-file "setup.cfg"
6021 (lambda (port)
6022 (format port "[directories]~%
6023 basedirlist = ~a,~a~%
6024 [packages]~%
6025 tests = True~%"
6026 (assoc-ref inputs "tcl")
6027 (assoc-ref inputs "tk")))))
6028 #t)))))
6029 (home-page "https://matplotlib.org/")
6030 (synopsis "2D plotting library for Python")
6031 (description
6032 "Matplotlib is a Python 2D plotting library which produces publication
6033 quality figures in a variety of hardcopy formats and interactive environments
6034 across platforms. Matplotlib can be used in Python scripts, the python and
6035 ipython shell, web application servers, and six graphical user interface
6036 toolkits.")
6037 (license license:psfl)
6038 (properties `((python2-variant . ,(delay python2-matplotlib))))))
6039
6040 (define-public python2-matplotlib
6041 (let ((matplotlib (package-with-python2
6042 (strip-python2-variant python-matplotlib))))
6043 (package (inherit matplotlib)
6044 (version "2.2.4")
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (pypi-uri "matplotlib" version))
6049 (sha256
6050 (base32
6051 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
6052 (arguments
6053 (substitute-keyword-arguments (package-arguments matplotlib)
6054 ((#:phases phases)
6055 `(modify-phases ,phases
6056 (replace 'install-jquery-ui
6057 (lambda* (#:key outputs inputs #:allow-other-keys)
6058 (let ((dir (string-append (assoc-ref outputs "out")
6059 "/lib/python2.7/site-packages/"
6060 "matplotlib/backends/web_backend/")))
6061 (mkdir-p dir)
6062 (invoke "unzip"
6063 (assoc-ref inputs "jquery-ui")
6064 "-d" dir))
6065 #t))
6066 (delete 'fix-and-disable-failing-tests)
6067 (delete 'check))))) ; These tests weren't run the the past.
6068 ;; Make sure to use special packages for Python 2 instead
6069 ;; of those automatically rewritten by package-with-python2.
6070 (propagated-inputs
6071 `(("python2-pycairo" ,python2-pycairo)
6072 ("python2-backports-functools-lru-cache"
6073 ,python2-backports-functools-lru-cache)
6074 ("python2-functools32" ,python2-functools32)
6075 ("python2-pygobject-2" ,python2-pygobject-2)
6076 ("python2-subprocess32" ,python2-subprocess32)
6077 ("python2-tkinter" ,python-2 "tk")
6078 ,@(fold alist-delete (package-propagated-inputs matplotlib)
6079 '("python-cairocffi"
6080 "python-pycairo"
6081 "python-pygobject"
6082 "python-tkinter")))))))
6083
6084 (define-public python-matplotlib-documentation
6085 (package
6086 (name "python-matplotlib-documentation")
6087 (version (package-version python-matplotlib))
6088 (source (package-source python-matplotlib))
6089 (build-system python-build-system)
6090 (native-inputs
6091 `(("python-matplotlib" ,python-matplotlib)
6092 ("python-colorspacious" ,python-colorspacious)
6093 ("python-sphinx" ,python-sphinx)
6094 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
6095 ("python-sphinx-gallery" ,python-sphinx-gallery)
6096 ("python-numpydoc" ,python-numpydoc)
6097 ("python-ipython" ,python-ipython)
6098 ("python-ipykernel" ,python-ipykernel)
6099 ("python-mock" ,python-mock)
6100 ("graphviz" ,graphviz)
6101 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
6102 texlive-latex-amsmath
6103 texlive-latex-enumitem
6104 texlive-latex-expdlist
6105 texlive-latex-geometry
6106 texlive-latex-preview
6107 texlive-latex-type1cm
6108 texlive-latex-ucs
6109
6110 texlive-pdftex
6111
6112 texlive-fonts-ec
6113 texlive-fonts-adobe-times
6114 texlive-fonts-txfonts)))
6115 ("texinfo" ,texinfo)
6116 ,@(package-native-inputs python-matplotlib)))
6117 (arguments
6118 `(#:tests? #f ; we're only generating documentation
6119 #:phases
6120 (modify-phases %standard-phases
6121 ;; The tests in python-matplotlib are run after the install phase, so
6122 ;; we need to delete the extra phase here.
6123 (delete 'check)
6124 (replace 'build
6125 (lambda _
6126 (chdir "doc")
6127 (setenv "PYTHONPATH"
6128 (string-append (getenv "PYTHONPATH")
6129 ":" (getcwd) "/../examples/units"))
6130 (substitute* "conf.py"
6131 ;; Don't use git.
6132 (("^SHA = check_output.*")
6133 (string-append "SHA = \"" ,version "\"\n"))
6134 ;; Don't fetch intersphinx files from the Internet
6135 (("^explicit_order_folders" m)
6136 (string-append "intersphinx_mapping = {}\n" m))
6137 (("'sphinx.ext.intersphinx',") "")
6138 ;; Disable URL embedding which requires internet access.
6139 (("'https://docs.scipy.org/doc/numpy'") "None")
6140 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
6141 (invoke "make"
6142 "SPHINXBUILD=sphinx-build"
6143 "SPHINXOPTS=" ; don't abort on warnings
6144 "html" "texinfo")))
6145 (replace 'install
6146 (lambda* (#:key inputs outputs #:allow-other-keys)
6147 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6148 (doc (string-append data "/doc/python-matplotlib-" ,version))
6149 (info (string-append data "/info"))
6150 (html (string-append doc "/html")))
6151 (mkdir-p html)
6152 (mkdir-p info)
6153 (copy-recursively "build/html" html)
6154 (symlink (string-append html "/_images")
6155 (string-append info "/matplotlib-figures"))
6156 (with-directory-excursion "build/texinfo"
6157 (substitute* "matplotlib.texi"
6158 (("@image\\{([^,]*)" all file)
6159 (string-append "@image{matplotlib-figures/" file)))
6160 (symlink (string-append html "/_images")
6161 "./matplotlib-figures")
6162 (invoke "makeinfo" "--no-split"
6163 "-o" "matplotlib.info" "matplotlib.texi"))
6164 (install-file "build/texinfo/matplotlib.info" info))
6165 #t)))))
6166 (home-page (package-home-page python-matplotlib))
6167 (synopsis "Documentation for the python-matplotlib package")
6168 (description (package-description python-matplotlib))
6169 (license (package-license python-matplotlib))))
6170
6171 (define-public python-matplotlib-venn
6172 (package
6173 (name "python-matplotlib-venn")
6174 (version "0.11.5")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "matplotlib-venn" version ".zip"))
6179 (sha256
6180 (base32
6181 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
6182 (build-system python-build-system)
6183 (arguments '(#:tests? #f)) ; tests are not included
6184 (propagated-inputs
6185 `(("python-matplotlib" ,python-matplotlib)
6186 ("python-numpy" ,python-numpy)
6187 ("python-scipy" ,python-scipy)))
6188 (native-inputs
6189 `(("unzip" ,unzip)))
6190 (home-page "https://github.com/konstantint/matplotlib-venn")
6191 (synopsis "Plot area-proportional Venn diagrams")
6192 (description
6193 "This package provides tools for plotting area-proportional two- and
6194 three-way Venn diagrams in @code{matplotlib}.")
6195 (license license:expat)))
6196
6197 (define-public python-pysnptools
6198 (package
6199 (name "python-pysnptools")
6200 (version "0.4.11")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "pysnptools" version))
6205 (sha256
6206 (base32
6207 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
6208 (build-system python-build-system)
6209 (arguments
6210 `(#:tests? #f ; no test data are included
6211 #:phases
6212 (modify-phases %standard-phases
6213 (replace 'check
6214 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6215 (if tests?
6216 (begin
6217 (add-installed-pythonpath inputs outputs)
6218 (invoke "python3" "pysnptools/test.py"))
6219 #t))))))
6220 (propagated-inputs
6221 `(("python-dill" ,python-dill)
6222 ("python-h5py" ,python-h5py)
6223 ("python-numpy" ,python-numpy)
6224 ("python-pandas" ,python-pandas)
6225 ("python-psutil" ,python-psutil)
6226 ("python-scipy" ,python-scipy)))
6227 (native-inputs
6228 `(("python-cython" ,python-cython)))
6229 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
6230 (synopsis "Library for reading and manipulating genetic data")
6231 (description
6232 "PySnpTools is a library for reading and manipulating genetic data. It
6233 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
6234 those files. It can also efficiently manipulate ranges of integers using set
6235 operators such as union, intersection, and difference.")
6236 (license license:asl2.0)))
6237
6238 (define-public python2-pysnptools
6239 (package-with-python2 python-pysnptools))
6240
6241 (define-public python-pykdtree
6242 (package
6243 (name "python-pykdtree")
6244 (version "1.3.4")
6245 (source
6246 (origin
6247 (method url-fetch)
6248 (uri (pypi-uri "pykdtree" version))
6249 (sha256
6250 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
6251 (build-system python-build-system)
6252 (native-inputs
6253 `(("python-nose" ,python-nose)))
6254 (propagated-inputs
6255 `(("python-numpy" ,python-numpy)))
6256 (home-page "https://github.com/storpipfugl/pykdtree")
6257 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
6258 (description
6259 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
6260 search in Python.")
6261 (license license:lgpl3+)))
6262
6263 (define-public python-wurlitzer
6264 (package
6265 (name "python-wurlitzer")
6266 (version "2.0.1")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "wurlitzer" version))
6271 (sha256
6272 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
6273 (build-system python-build-system)
6274 (arguments
6275 '(#:phases
6276 (modify-phases %standard-phases
6277 (replace 'check
6278 (lambda _
6279 (invoke "pytest" "-vv" "test.py"))))))
6280 (native-inputs
6281 `(("python-mock" ,python-mock)
6282 ("python-pytest" ,python-pytest)))
6283 (home-page "https://github.com/minrk/wurlitzer")
6284 (synopsis "Capture C-level output in context managers")
6285 (description
6286 "This library helps to redirect @code{sys.stdout} to a stream or a file
6287 while executing some piece of code, including C code running within a Python
6288 process.")
6289 (license license:expat)))
6290
6291 (define-public python-socksipy-branch
6292 (package
6293 (name "python-socksipy-branch")
6294 (version "1.01")
6295 (source
6296 (origin
6297 (method url-fetch)
6298 (uri (pypi-uri "SocksiPy-branch" version))
6299 (sha256
6300 (base32
6301 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
6302 (build-system python-build-system)
6303 (arguments
6304 `(#:tests? #f)) ; There are no tests
6305 (home-page "https://code.google.com/archive/p/socksipy-branch/")
6306 (synopsis "Python SOCKS module")
6307 (description
6308 "SocksiPy - A Python SOCKS client module. It provides a
6309 socket-like interface that supports connections to any TCP
6310 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
6311 The original version was developed by Dan Haim, this is a
6312 branch created by Mario Vilas to address some open issues,
6313 as the original project seems to have been abandoned circa 2007.")
6314 (license license:bsd-3)))
6315
6316 (define-public python2-socksipy-branch
6317 (package-with-python2 python-socksipy-branch))
6318
6319 (define-public python-socksipychain
6320 (package
6321 (name "python-socksipychain")
6322 (version "2.1.2")
6323 (source
6324 (origin
6325 (method git-fetch)
6326 (uri (git-reference
6327 (url "https://github.com/pagekite/PySocksipyChain")
6328 (commit (string-append "v" version))))
6329 (file-name (git-file-name name version))
6330 (sha256
6331 (base32
6332 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
6333 (build-system python-build-system)
6334 (arguments
6335 `(#:tests? #f)) ; Tests try to access the network.
6336 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
6337 (synopsis "Python SOCKS module with chained proxies support")
6338 (description
6339 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6340 adds support for arbitrary chaining of proxy servers and various modes of
6341 TLS/SSL encryption. It was developed for use in PageKite, and also includes
6342 a simple netcat replacement with chaining support.")
6343 (license license:bsd-3)))
6344
6345 (define-public python-pycodestyle
6346 (package
6347 (name "python-pycodestyle")
6348 (version "2.7.0")
6349 (source
6350 (origin
6351 (method url-fetch)
6352 (uri (pypi-uri "pycodestyle" version))
6353 (sha256
6354 (base32
6355 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
6356 (build-system python-build-system)
6357 (arguments
6358 `(#:phases
6359 (modify-phases %standard-phases
6360 (replace 'check
6361 (lambda _
6362 (invoke "pytest" "-vv"))))))
6363 (native-inputs
6364 `(("python-pytest" ,python-pytest)))
6365 (home-page "https://pycodestyle.readthedocs.io/")
6366 (synopsis "Python style guide checker")
6367 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6368 Python code against some of the style conventions in
6369 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6370 (license license:expat)))
6371
6372 (define-public python2-pycodestyle
6373 (package-with-python2 python-pycodestyle))
6374
6375 (define-public python-pycodestyle-2.6
6376 (package
6377 (inherit python-pycodestyle)
6378 (version "2.6.0")
6379 (source (origin
6380 (method url-fetch)
6381 (uri (pypi-uri "pycodestyle" version))
6382 (sha256
6383 (base32
6384 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6385
6386 (define-public python-multidict
6387 (package
6388 (name "python-multidict")
6389 (version "4.7.5")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (pypi-uri "multidict" version))
6394 (sha256
6395 (base32
6396 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6397 (build-system python-build-system)
6398 (arguments
6399 '(#:modules ((ice-9 ftw)
6400 (srfi srfi-1)
6401 (srfi srfi-26)
6402 (guix build utils)
6403 (guix build python-build-system))
6404 #:phases (modify-phases %standard-phases
6405 (replace 'check
6406 (lambda* (#:key tests? #:allow-other-keys)
6407 (if tests?
6408 (begin
6409 (let ((libdir (find (cut string-prefix? "lib." <>)
6410 (scandir "build"))))
6411 (setenv "PYTHONPATH"
6412 (string-append "./build/" libdir ":"
6413 (getenv "PYTHONPATH")))
6414 (invoke "pytest" "-vv")))
6415 (format #t "test suite not run~%"))
6416 #t)))))
6417 (native-inputs
6418 `(("python-pytest" ,python-pytest)
6419 ("python-pytest-cov" ,python-pytest-cov)))
6420 (home-page "https://github.com/aio-libs/multidict/")
6421 (synopsis "Multidict implementation")
6422 (description "Multidict is dict-like collection of key-value pairs
6423 where key might be occurred more than once in the container.")
6424 (license license:asl2.0)))
6425
6426 (define-public python-orderedmultidict
6427 (package
6428 (name "python-orderedmultidict")
6429 (version "1.0")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (pypi-uri "orderedmultidict" version))
6434 (sha256
6435 (base32
6436 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6437 (build-system python-build-system)
6438 (arguments
6439 `(#:phases
6440 (modify-phases %standard-phases
6441 (add-after 'unpack 'fix-tests
6442 (lambda _
6443 ;; The package uses nosetest for running the tests.
6444 ;; Adding this initfile allows to run the test suite
6445 ;; without requiring nosetest.
6446 (with-output-to-file "tests/__init__.py" newline)
6447 #t)))))
6448 (propagated-inputs
6449 `(("python-six" ,python-six)))
6450 (native-inputs
6451 `(("python-pycodestyle" ,python-pycodestyle)))
6452 (home-page "https://github.com/gruns/orderedmultidict")
6453 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6454 (description "This package contains a library for ordered multivalue
6455 dictionaries. A multivalue dictionary is a dictionary that can store
6456 multiple values for the same key. An ordered multivalue dictionary is a
6457 multivalue dictionary that retains the order of insertions and deletions.")
6458 (license license:unlicense)))
6459
6460 (define-public python2-orderedmultidict
6461 (package-with-python2 python-orderedmultidict))
6462
6463 (define-public python-autopep8
6464 (package
6465 (name "python-autopep8")
6466 (version "1.5.3")
6467 (source
6468 (origin
6469 (method url-fetch)
6470 (uri (pypi-uri "autopep8" version))
6471 (sha256
6472 (base32
6473 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6474 (build-system python-build-system)
6475 (propagated-inputs
6476 `(("python-pycodestyle" ,python-pycodestyle)
6477 ("python-toml" ,python-toml)))
6478 (home-page "https://github.com/hhatto/autopep8")
6479 (synopsis "Format Python code according to the PEP 8 style guide")
6480 (description
6481 "@code{autopep8} automatically formats Python code to conform to
6482 the PEP 8 style guide. It uses the pycodestyle utility to determine
6483 what parts of the code needs to be formatted. @code{autopep8} is
6484 capable of fixing most of the formatting issues that can be reported
6485 by pycodestyle.")
6486 (license (license:non-copyleft
6487 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6488
6489 (define-public python2-autopep8
6490 (package-with-python2 python-autopep8))
6491
6492 (define-public python-distlib
6493 (package
6494 (name "python-distlib")
6495 (version "0.3.0")
6496 (source
6497 (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "distlib" version ".zip"))
6500 (sha256
6501 (base32
6502 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
6503 (build-system python-build-system)
6504 (arguments
6505 `(#:phases
6506 (modify-phases %standard-phases
6507 (add-before 'build 'no-/bin/sh
6508 (lambda _
6509 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6510 (("/bin/sh") (which "sh")))
6511 #t))
6512 (add-before 'check 'prepare-test-env
6513 (lambda _
6514 (setenv "HOME" "/tmp")
6515 ;; NOTE: Any value works, the variable just has to be present.
6516 (setenv "SKIP_ONLINE" "1")
6517 #t)))))
6518 (native-inputs `(("unzip" ,unzip)))
6519 (home-page "https://bitbucket.org/pypa/distlib")
6520 (synopsis "Distribution utilities")
6521 (description "Distlib is a library which implements low-level functions that
6522 relate to packaging and distribution of Python software. It is intended to be
6523 used as the basis for third-party packaging tools.")
6524 (license license:psfl)))
6525
6526 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
6527 (define-public python-distlib/next
6528 (package
6529 (inherit python-distlib)
6530 (version "0.3.1")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (pypi-uri "distlib" version ".zip"))
6535 (sha256
6536 (base32
6537 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
6538
6539 (define-public python-distutils-extra
6540 (package
6541 (name "python-distutils-extra")
6542 (version "2.38")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6547 version "/+download/python-distutils-extra-"
6548 version ".tar.gz"))
6549 (sha256
6550 (base32
6551 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6552 (build-system python-build-system)
6553 (home-page "https://launchpad.net/python-distutils-extra/")
6554 (synopsis "Enhancements to Python's distutils")
6555 (description
6556 "The python-distutils-extra module enables you to easily integrate
6557 gettext support, themed icons, and scrollkeeper-based documentation into
6558 Python's distutils.")
6559 (license license:gpl2)))
6560
6561 (define-public python2-distutils-extra
6562 (package-with-python2 python-distutils-extra))
6563
6564 (define-public python2-elib.intl
6565 (package
6566 (name "python2-elib.intl")
6567 (version "0.0.3")
6568 (source
6569 (origin
6570 ;; This project doesn't tag releases or publish tarballs, so we take
6571 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6572 (method git-fetch)
6573 (uri (git-reference
6574 (url "https://github.com/dieterv/elib.intl")
6575 (commit "d09997cfef")))
6576 (file-name (string-append name "-" version "-checkout"))
6577 (sha256
6578 (base32
6579 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6580 (build-system python-build-system)
6581 (arguments
6582 ;; incompatible with Python 3 (exception syntax)
6583 `(#:python ,python-2
6584 #:tests? #f))
6585 (home-page "https://github.com/dieterv/elib.intl")
6586 (synopsis "Enhanced internationalization for Python")
6587 (description
6588 "The elib.intl module provides enhanced internationalization (I18N)
6589 services for your Python modules and applications.")
6590 (license license:lgpl3+)))
6591
6592 (define-public python-olefile
6593 (package
6594 (name "python-olefile")
6595 (version "0.46")
6596 (source
6597 (origin
6598 (method url-fetch)
6599 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6600 "download/v" version "/olefile-" version ".tar.gz"))
6601 (file-name (string-append name "-" version ".tar.gz"))
6602 (sha256
6603 (base32
6604 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6605 (build-system python-build-system)
6606 (home-page "https://www.decalage.info/python/olefileio")
6607 (synopsis "Read and write Microsoft OLE2 files.")
6608 (description
6609 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6610 Storage or Compound Document, Microsoft Office). It is an improved version of
6611 the OleFileIO module from PIL, the Python Image Library.")
6612 (license license:bsd-3)))
6613
6614 (define-public python2-olefile
6615 (package-with-python2 python-olefile))
6616
6617 (define-public python-pikepdf
6618 (package
6619 (name "python-pikepdf")
6620 (version "2.16.1")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "pikepdf" version))
6625 (sha256
6626 (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
6627 (build-system python-build-system)
6628 (arguments
6629 `(#:tests? #false)) ;require python-xmp-toolkit
6630 (native-inputs
6631 `(("pybind11" ,pybind11)
6632 ("python-setuptools" ,python-setuptools)
6633 ("python-setuptools-scm" ,python-setuptools-scm/next)
6634 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6635 ("python-toml" ,python-toml)
6636 ("python-wheel" ,python-wheel)))
6637 (inputs
6638 `(("qpdf" ,qpdf)))
6639 (propagated-inputs
6640 `(("python-lxml" ,python-lxml)
6641 ("python-pillow" ,python-pillow)))
6642 (home-page "https://github.com/pikepdf/pikepdf")
6643 (synopsis "Read and write PDFs with Python")
6644 (description
6645 "pikepdf is a Python library for reading and writing PDF files.")
6646 (license license:mpl2.0)))
6647
6648 (define-public python-pillow
6649 (package
6650 (name "python-pillow")
6651 (version "8.1.1")
6652 (source
6653 (origin
6654 (method url-fetch)
6655 (uri (pypi-uri "Pillow" version))
6656 (sha256
6657 (base32
6658 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6659 (build-system python-build-system)
6660 (native-inputs
6661 `(("python-pytest" ,python-pytest)))
6662 (inputs
6663 `(("freetype" ,freetype)
6664 ("lcms" ,lcms)
6665 ("libjpeg" ,libjpeg-turbo)
6666 ("libtiff" ,libtiff)
6667 ("libwebp" ,libwebp)
6668 ("openjpeg" ,openjpeg)
6669 ("zlib" ,zlib)))
6670 (propagated-inputs
6671 `(("python-olefile" ,python-olefile)))
6672 (arguments
6673 `(#:phases
6674 (modify-phases %standard-phases
6675 (add-after 'unpack 'patch-ldconfig
6676 (lambda _
6677 (substitute* "setup.py"
6678 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6679 (replace 'check
6680 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6681 (if tests?
6682 (begin
6683 (setenv "HOME" (getcwd))
6684 ;; Make installed package available for running the tests.
6685 (add-installed-pythonpath inputs outputs)
6686 (invoke "python" "selftest.py" "--installed")
6687 (invoke "python" "-m" "pytest" "-vv"))
6688 #t))))))
6689 (home-page "https://python-pillow.org")
6690 (synopsis "Fork of the Python Imaging Library")
6691 (description
6692 "The Python Imaging Library adds image processing capabilities to your
6693 Python interpreter. This library provides extensive file format support, an
6694 efficient internal representation, and fairly powerful image processing
6695 capabilities. The core image library is designed for fast access to data
6696 stored in a few basic pixel formats. It should provide a solid foundation for
6697 a general image processing tool.")
6698 (properties `((python2-variant . ,(delay python2-pillow))))
6699 (license (license:x11-style
6700 "http://www.pythonware.com/products/pil/license.htm"
6701 "The PIL Software License"))))
6702
6703 (define-public python2-pillow
6704 (package-with-python2
6705 (package
6706 (inherit (strip-python2-variant python-pillow))
6707 ;; Version 6 is the last series with Python 2 support.
6708 (version "6.2.2")
6709 (source
6710 (origin
6711 (method url-fetch)
6712 (uri (pypi-uri "Pillow" version))
6713 (sha256
6714 (base32
6715 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6716
6717 (define-public python-pillow-2.9
6718 (package
6719 (inherit python-pillow)
6720 (version "2.9.0")
6721 (source
6722 (origin
6723 (method url-fetch)
6724 (uri (pypi-uri "Pillow" version))
6725 (sha256
6726 (base32
6727 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6728 (arguments
6729 (substitute-keyword-arguments (package-arguments python-pillow)
6730 ((#:tests? _ #f) #f)))
6731 (properties '((hidden? #t)))))
6732
6733 (define-public python-pillow-simd
6734 (package
6735 (inherit python-pillow)
6736 (name "python-pillow-simd")
6737 (version "7.1.2")
6738 ;; The PyPI tarball does not include test files.
6739 (source
6740 (origin
6741 (method git-fetch)
6742 (uri (git-reference
6743 (url "https://github.com/uploadcare/pillow-simd")
6744 (commit version)))
6745 (file-name (git-file-name name version))
6746 (sha256
6747 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6748 (arguments
6749 (substitute-keyword-arguments
6750 (package-arguments python-pillow)
6751 ((#:phases phases)
6752 `(modify-phases ,phases
6753 (add-after 'unpack 'make-tests-writable
6754 (lambda _
6755 (for-each make-file-writable (find-files "Tests"))
6756 #t))))))
6757 (inputs
6758 `(("libraqm" ,libraqm)
6759 ("libimagequant" ,libimagequant)
6760 ,@(package-inputs python-pillow)))
6761 (home-page "https://github.com/uploadcare/pillow-simd")
6762 (synopsis "Fork of the Python Imaging Library (Pillow)")
6763 (description "This package is a fork of Pillow which adds support for SIMD
6764 parallelism.")))
6765
6766 (define-public python-imagecodecs
6767 (package
6768 (name "python-imagecodecs")
6769 (version "2021.3.31")
6770 (source
6771 (origin
6772 (method url-fetch)
6773 (uri (pypi-uri "imagecodecs" version))
6774 (sha256
6775 (base32
6776 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6777 (modules '((guix build utils)))
6778 (snippet
6779 '(begin
6780 ;; Unbundle 3rd party modules.
6781 (delete-file-recursively "3rdparty")
6782 ;; Delete pre-generated Cython files.
6783 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6784 #t))))
6785 (build-system python-build-system)
6786 (arguments
6787 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6788 #:phases
6789 (modify-phases %standard-phases
6790 (add-after 'unpack 'create-configuration
6791 (lambda* (#:key inputs #:allow-other-keys)
6792 ;; By default everything is enabled. We can selectively disable
6793 ;; extensions (and thus dependencies) by deleting them from the
6794 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6795 (call-with-output-file "imagecodecs_distributor_setup.py"
6796 (lambda (port)
6797 (format port "\
6798 def customize_build(EXTENSIONS, OPTIONS):
6799 del EXTENSIONS['aec']
6800 del EXTENSIONS['avif']
6801 del EXTENSIONS['bitshuffle']
6802 del EXTENSIONS['deflate']
6803 del EXTENSIONS['jpeg2k']
6804 del EXTENSIONS['jpeg12']
6805 del EXTENSIONS['jpegls']
6806 del EXTENSIONS['jpegxl']
6807 del EXTENSIONS['jpegxr']
6808 del EXTENSIONS['lerc']
6809 del EXTENSIONS['ljpeg']
6810 del EXTENSIONS['lzf']
6811 del EXTENSIONS['zfp']
6812 del EXTENSIONS['zopfli']
6813 OPTIONS['cythonize']
6814 ")))
6815 #t)))))
6816 (inputs
6817 `(("c-blosc" ,c-blosc)
6818 ("giflib" ,giflib)
6819 ("google-brotli" ,google-brotli)
6820 ("libjpeg-turbo" ,libjpeg-turbo)
6821 ("libpng" ,libpng)
6822 ("libtiff" ,libtiff)
6823 ("libwebp" ,libwebp)
6824 ("lz4" ,lz4)
6825 ("snappy" ,snappy)
6826 ("xz" ,xz)
6827 ("zlib" ,zlib)
6828 ("zstd" ,zstd "lib")))
6829 (propagated-inputs
6830 `(("python-numpy" ,python-numpy)))
6831 (native-inputs
6832 ;; For building.
6833 `(("python-cython" ,python-cython)
6834 ;; For testing. Incomplete.
6835 ;("python-numcodecs" ,python-numcodecs)
6836 ;("python-zarr" ,python-zarr)
6837 ;("python-pytest" ,python-pytest)
6838 ))
6839 (home-page "https://www.lfd.uci.edu/~gohlke/")
6840 (synopsis
6841 "Image transformation, compression, and decompression codecs")
6842 (description
6843 "Imagecodecs is a Python library that provides block-oriented, in-memory
6844 buffer transformation, compression, and decompression functions for use in the
6845 tifffile, czifile, and other scientific image input/output modules.")
6846 (license license:bsd-3)))
6847
6848 (define-public python-roifile
6849 (package
6850 (name "python-roifile")
6851 (version "2020.11.28")
6852 (source
6853 (origin
6854 (method url-fetch)
6855 (uri (pypi-uri "roifile" version))
6856 (sha256
6857 (base32
6858 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6859 (build-system python-build-system)
6860 (arguments `(#:tests? #f)) ; there are none
6861 (propagated-inputs
6862 `(("python-numpy" ,python-numpy)))
6863 (home-page "https://www.lfd.uci.edu/~gohlke/")
6864 (synopsis "Read and write ImageJ ROI format")
6865 (description "Roifile is a Python library to read, write, create, and plot
6866 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6867 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6868 (license license:bsd-3)))
6869
6870 (define-public python-tifffile
6871 (package
6872 (name "python-tifffile")
6873 (version "2021.4.8")
6874 (source
6875 (origin
6876 (method url-fetch)
6877 (uri (pypi-uri "tifffile" version))
6878 (sha256
6879 (base32
6880 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6881 (build-system python-build-system)
6882 ;; Tests require lfdfiles, which depends on tifffile
6883 (arguments `(#:tests? #f))
6884 (propagated-inputs
6885 `(("python-numpy" ,python-numpy)
6886 ("python-imagecodecs" ,python-imagecodecs)))
6887 (home-page "https://www.lfd.uci.edu/~gohlke/")
6888 (synopsis "Read and write TIFF(r) files")
6889 (description "This package lets you read image and metadata from many
6890 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6891 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6892 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6893 (license license:bsd-3)))
6894
6895 (define-public python-lfdfiles
6896 (package
6897 (name "python-lfdfiles")
6898 (version "2021.2.22")
6899 (source
6900 (origin
6901 (method url-fetch)
6902 (uri (pypi-uri "lfdfiles" version))
6903 (sha256
6904 (base32
6905 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6906 (modules '((guix build utils)))
6907 (snippet
6908 '(begin
6909 ;; Delete pre-generated Cython files.
6910 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6911 #t))))
6912 (build-system python-build-system)
6913 (arguments
6914 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6915 (propagated-inputs
6916 `(("python-click" ,python-click)
6917 ("python-numpy" ,python-numpy)
6918 ("python-tifffile" ,python-tifffile)))
6919 (native-inputs `(("python-cython" ,python-cython)))
6920 (home-page "https://www.lfd.uci.edu/~gohlke/")
6921 (synopsis "Work with LFD data files")
6922 (description
6923 "Lfdfiles is a Python library and console script for reading, writing,
6924 converting, and viewing many of the proprietary file formats used to store
6925 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6926 (license license:bsd-3)))
6927
6928 (define-public python-imageio
6929 (package
6930 (name "python-imageio")
6931 (version "2.8.0")
6932 (source
6933 (origin
6934 (method url-fetch)
6935 (uri (pypi-uri "imageio" version))
6936 (sha256
6937 (base32
6938 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6939 (build-system python-build-system)
6940 (arguments
6941 `(#:tests? #f ; many tests require online data
6942 #:phases
6943 (modify-phases %standard-phases
6944 (replace 'check
6945 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6946 (if tests?
6947 (begin
6948 ;; Make installed package available for running the tests.
6949 (add-installed-pythonpath inputs outputs)
6950 (invoke "pytest" "-vv"))
6951 #t))))))
6952 (propagated-inputs
6953 `(("python-numpy" ,python-numpy)
6954 ("python-pillow" ,python-pillow)
6955 ("python-psutil" ,python-psutil)))
6956 (native-inputs
6957 `(("python-pytest" ,python-pytest)))
6958 (home-page "https://imageio.github.io/")
6959 (synopsis "Library for reading and writing a wide range of image data")
6960 (description
6961 "Imageio is a Python library that provides an easy interface to read and
6962 write a wide range of image data, including animated images, video, volumetric
6963 data, and scientific formats.")
6964 (license license:bsd-2)))
6965
6966 (define-public python-pycparser
6967 (package
6968 (name "python-pycparser")
6969 (version "2.20")
6970 (source
6971 (origin
6972 (method url-fetch)
6973 (uri (pypi-uri "pycparser" version))
6974 (sha256
6975 (base32
6976 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6977 (outputs '("out" "doc"))
6978 (build-system python-build-system)
6979 (native-inputs
6980 `(("pkg-config" ,pkg-config)))
6981 (arguments
6982 `(#:phases
6983 (modify-phases %standard-phases
6984 (replace 'check
6985 (lambda _
6986 (with-directory-excursion "tests"
6987 (invoke "python" "all_tests.py"))
6988 #t))
6989 (add-after 'install 'install-doc
6990 (lambda* (#:key outputs #:allow-other-keys)
6991 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6992 (doc (string-append data "/doc/" ,name "-" ,version))
6993 (examples (string-append doc "/examples")))
6994 (mkdir-p examples)
6995 (for-each (lambda (file)
6996 (copy-file (string-append "." file)
6997 (string-append doc file)))
6998 '("/README.rst" "/CHANGES" "/LICENSE"))
6999 (copy-recursively "examples" examples)
7000 #t))))))
7001 (home-page "https://github.com/eliben/pycparser")
7002 (synopsis "C parser in Python")
7003 (description
7004 "Pycparser is a complete parser of the C language, written in pure Python
7005 using the PLY parsing library. It parses C code into an AST and can serve as
7006 a front-end for C compilers or analysis tools.")
7007 (license license:bsd-3)))
7008
7009 (define-public python2-pycparser
7010 (package-with-python2 python-pycparser))
7011
7012 (define-public python-xlsxwriter
7013 (package
7014 (name "python-xlsxwriter")
7015 (version "1.3.9")
7016 (source
7017 (origin
7018 ;; There are no tests in the PyPI tarball.
7019 (method git-fetch)
7020 (uri (git-reference
7021 (url "https://github.com/jmcnamara/XlsxWriter")
7022 (commit (string-append "RELEASE_" version))))
7023 (file-name (git-file-name name version))
7024 (sha256
7025 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
7026 (build-system python-build-system)
7027 (home-page "https://github.com/jmcnamara/XlsxWriter")
7028 (synopsis "Python module for creating Excel XLSX files")
7029 (description
7030 "XlsxWriter is a Python module that can be used to write text, numbers,
7031 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
7032 (license license:bsd-2)))
7033
7034 (define-public python-pywavelets
7035 (package
7036 (name "python-pywavelets")
7037 (version "1.1.1")
7038 (home-page "https://github.com/PyWavelets/pywt")
7039 (source (origin
7040 (method url-fetch)
7041 (uri (pypi-uri "PyWavelets" version))
7042 (sha256
7043 (base32
7044 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
7045 (build-system python-build-system)
7046 (arguments
7047 '(#:modules ((ice-9 ftw)
7048 (srfi srfi-1)
7049 (srfi srfi-26)
7050 (guix build utils)
7051 (guix build python-build-system))
7052 #:phases
7053 (modify-phases %standard-phases
7054 (replace 'check
7055 (lambda _
7056 (let ((cwd (getcwd))
7057 (libdir (find (cut string-prefix? "lib." <>)
7058 (scandir "build"))))
7059 (with-directory-excursion (string-append cwd "/build/" libdir)
7060 (invoke "pytest" "-vv"))))))))
7061 (native-inputs
7062 `(("python-matplotlib" ,python-matplotlib) ;for tests
7063 ("python-pytest" ,python-pytest)))
7064 (propagated-inputs
7065 `(("python-numpy" ,python-numpy)))
7066 (synopsis "Wavelet transforms in Python")
7067 (description
7068 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
7069 mathematical basis functions that are localized in both time and frequency.
7070 Wavelet transforms are time-frequency transforms employing wavelets. They are
7071 similar to Fourier transforms, the difference being that Fourier transforms are
7072 localized only in frequency instead of in time and frequency.")
7073 (license license:expat)))
7074
7075 (define-public python-pywal
7076 (package
7077 (name "python-pywal")
7078 (version "3.3.0")
7079 (source
7080 (origin
7081 (method git-fetch)
7082 (uri (git-reference
7083 (url "https://github.com/dylanaraps/pywal")
7084 (commit version)))
7085 (file-name (git-file-name name version))
7086 (sha256
7087 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
7088 (build-system python-build-system)
7089 (arguments
7090 `(#:phases
7091 (modify-phases %standard-phases
7092 (add-before 'check 'fix-home-directory
7093 (lambda _
7094 ;; Tests fail with "Permission denied: '/homeless-shelter'".
7095 (setenv "HOME" "/tmp")
7096 #t)))))
7097 (inputs
7098 `(("imagemagick" ,imagemagick)))
7099 (home-page "https://github.com/dylanaraps/pywal")
7100 (synopsis "Color palette generator and applicator")
7101 (description
7102 "Pywal is a tool that generates a color palette from the dominant colors
7103 in an image. It then applies the colors system-wide and on-the-fly in all of
7104 your favourite programs.")
7105 (license license:expat)))
7106
7107 (define-public python-pywinrm
7108 (package
7109 (name "python-pywinrm")
7110 (version "0.4.1")
7111 (source
7112 (origin
7113 (method url-fetch)
7114 (uri (pypi-uri "pywinrm" version))
7115 (sha256
7116 (base32
7117 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
7118 (build-system python-build-system)
7119 (propagated-inputs
7120 `(("python-six" ,python-six)
7121 ("python-requests_ntlm" ,python-requests_ntlm)
7122 ("python-xmltodict" ,python-xmltodict)
7123 ("python-kerberos" ,python-kerberos)))
7124 (native-inputs
7125 `(("python-mock" ,python-mock)
7126 ("python-pytest" ,python-pytest)))
7127 (home-page "https://github.com/diyan/pywinrm/")
7128 (synopsis
7129 "Python library for Windows Remote Management (WinRM)")
7130 (description
7131 "pywinrm is a Python client for the Windows Remote Management (WinRM)
7132 service. It allows you to invoke commands on target Windows machines from
7133 any machine that can run Python.")
7134 (license license:expat)))
7135
7136 (define-public python-xcffib
7137 (package
7138 (name "python-xcffib")
7139 (version "0.6.0")
7140 (source
7141 (origin
7142 (method url-fetch)
7143 (uri (pypi-uri "xcffib" version))
7144 (sha256
7145 (base32
7146 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
7147 (build-system python-build-system)
7148 (inputs
7149 `(("libxcb" ,libxcb)))
7150 (propagated-inputs
7151 `(("python-cffi" ,python-cffi) ; used at run time
7152 ("python-six" ,python-six)))
7153 (arguments
7154 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
7155 #:tests? #f
7156 #:phases
7157 (modify-phases %standard-phases
7158 (add-after 'unpack 'fix-libxcb-path
7159 (lambda* (#:key inputs #:allow-other-keys)
7160 (let ((libxcb (assoc-ref inputs "libxcb")))
7161 (substitute* '("xcffib/__init__.py")
7162 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
7163 #t)))
7164 (add-after 'install 'install-doc
7165 (lambda* (#:key outputs #:allow-other-keys)
7166 (let ((doc (string-append (assoc-ref outputs "out") "/share"
7167 "/doc/" ,name "-" ,version)))
7168 (mkdir-p doc)
7169 (copy-file "README.md"
7170 (string-append doc "/README.md"))
7171 #t))))))
7172 (home-page "https://github.com/tych0/xcffib")
7173 (synopsis "XCB Python bindings")
7174 (description
7175 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
7176 support for Python 3 and PyPy. It is based on cffi.")
7177 (license license:expat)))
7178
7179 (define-public python2-xcffib
7180 (package-with-python2 python-xcffib))
7181
7182 (define-public python-cairocffi
7183 (package
7184 (name "python-cairocffi")
7185 (version "1.2.0")
7186 (source
7187 (origin
7188 ;; The PyPI archive does not include the documentation, so use Git.
7189 (method git-fetch)
7190 (uri (git-reference
7191 (url "https://github.com/Kozea/cairocffi")
7192 (commit (string-append "v" version))))
7193 (file-name (git-file-name name version))
7194 (sha256
7195 (base32
7196 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
7197 (build-system python-build-system)
7198 (outputs '("out" "doc"))
7199 (inputs
7200 `(("glib" ,glib)
7201 ("gtk+" ,gtk+)
7202 ("gdk-pixbuf" ,gdk-pixbuf)
7203 ("cairo" ,cairo)))
7204 (native-inputs
7205 `(("python-numpy" ,python-numpy)
7206 ("python-pytest" ,python-pytest)
7207 ("python-pytest-cov" ,python-pytest-cov)
7208 ("python-pytest-runner" ,python-pytest-runner)
7209 ("python-sphinx" ,python-sphinx)
7210 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
7211 (propagated-inputs
7212 `(("python-xcffib" ,python-xcffib))) ; used at run time
7213 (arguments
7214 `(#:phases
7215 (modify-phases %standard-phases
7216 (add-after 'unpack 'patch-paths
7217 (lambda* (#:key inputs #:allow-other-keys)
7218 (substitute* "cairocffi/__init__.py"
7219 ;; Hack the dynamic library loading mechanism.
7220 (("find_library\\(library_name\\)")
7221 "\"found\"")
7222 (("filenames = \\(library_filename,\\) \\+ filenames")
7223 "pass")
7224 (("libcairo.so.2")
7225 (string-append (assoc-ref inputs "cairo")
7226 "/lib/libcairo.so.2")))
7227 (substitute* "cairocffi/pixbuf.py"
7228 (("libgdk_pixbuf-2.0.so.0")
7229 (string-append (assoc-ref inputs "gdk-pixbuf")
7230 "/lib/libgdk_pixbuf-2.0.so.0"))
7231 (("libgobject-2.0.so.0")
7232 (string-append (assoc-ref inputs "glib")
7233 "/lib/libgobject-2.0.so.0"))
7234 (("libglib-2.0.so.0")
7235 (string-append (assoc-ref inputs "glib")
7236 "/lib/libglib-2.0.so.0"))
7237 (("libgdk-3.so.0")
7238 (string-append (assoc-ref inputs "gtk+")
7239 "/lib/libgdk-3.so.0")))
7240 #t))
7241 (add-after 'unpack 'disable-linters
7242 ;; Their check fails; none of our business.
7243 (lambda _
7244 (substitute* "setup.cfg"
7245 ((".*pytest-flake8.*") "")
7246 ((".*pytest-isort.*") "")
7247 (("--flake8") "")
7248 (("--isort") ""))
7249 #t))
7250 (add-after 'install 'install-doc
7251 (lambda* (#:key inputs outputs #:allow-other-keys)
7252 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7253 (doc (string-append data "/doc/" ,name "-" ,version))
7254 (html (string-append doc "/html")))
7255 (setenv "LD_LIBRARY_PATH"
7256 (string-append (assoc-ref inputs "cairo") "/lib" ":"
7257 (assoc-ref inputs "gdk-pixbuf") "/lib"))
7258 (setenv "LANG" "en_US.UTF-8")
7259 (mkdir-p html)
7260 (for-each (lambda (file)
7261 (copy-file (string-append "." file)
7262 (string-append doc file)))
7263 '("/README.rst" "/NEWS.rst"))
7264 (system* "python" "setup.py" "build_sphinx")
7265 (copy-recursively "docs/_build/html" html)
7266 #t))))))
7267 (home-page "https://github.com/Kozea/cairocffi")
7268 (synopsis "Python bindings and object-oriented API for Cairo")
7269 (description
7270 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
7271 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
7272 graphics library with support for multiple backends including image buffers,
7273 PNG, PostScript, PDF, and SVG file output.")
7274 (license license:bsd-3)))
7275
7276 (define-public python-decorator
7277 (package
7278 (name "python-decorator")
7279 (version "5.0.9")
7280 (source
7281 (origin
7282 (method url-fetch)
7283 (uri (pypi-uri "decorator" version))
7284 (sha256
7285 (base32 "1mcy64hllgm938v8k1x2a4g0q9swsnrfnsvhz59kr28a6ajgpv3j"))))
7286 (build-system python-build-system)
7287 (home-page "https://pypi.org/project/decorator/")
7288 (synopsis "Python module to simplify usage of decorators")
7289 (description
7290 "The aim of the decorator module is to simplify the usage of decorators
7291 for the average programmer, and to popularize decorators usage giving examples
7292 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
7293 etc. The core of this module is a decorator factory.")
7294 (license license:expat)))
7295
7296 (define-public python2-decorator
7297 (package-with-python2 python-decorator))
7298
7299 (define-public python-drmaa
7300 (package
7301 (name "python-drmaa")
7302 (version "0.7.7")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (pypi-uri "drmaa" version))
7307 (sha256
7308 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
7309 (build-system python-build-system)
7310 ;; The test suite requires libdrmaa which is provided by the cluster
7311 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
7312 ;; should be set to the path of the libdrmaa library.
7313 (arguments '(#:tests? #f))
7314 (native-inputs
7315 `(("python-nose" ,python-nose)))
7316 (home-page "https://pypi.org/project/drmaa/")
7317 (synopsis "Python bindings for the DRMAA library")
7318 (description
7319 "A Python package for Distributed Resource Management (DRM) job
7320 submission and control. This package is an implementation of the DRMAA 1.0
7321 Python language binding specification.")
7322 (license license:bsd-3)))
7323
7324 (define-public python2-drmaa
7325 (package-with-python2 python-drmaa))
7326
7327 (define-public python-grako
7328 (package
7329 (name "python-grako")
7330 (version "3.99.9")
7331 (source
7332 (origin
7333 (method url-fetch)
7334 (uri
7335 (pypi-uri "grako" version ".zip"))
7336 (sha256
7337 (base32
7338 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
7339 (build-system python-build-system)
7340 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
7341 (native-inputs
7342 `(("unzip" ,unzip)
7343 ("python-pytest" ,python-pytest)
7344 ("python-pytest-runner" ,python-pytest-runner)))
7345 (home-page "https://bitbucket.org/neogeny/grako")
7346 (synopsis "EBNF parser generator")
7347 (description
7348 "Grako takes a grammar in a variation of EBNF as input, and outputs a
7349 memoizing PEG/Packrat parser in Python.")
7350 (license license:bsd-3)))
7351
7352 (define-public python2-grako
7353 (package-with-python2 python-grako))
7354
7355 (define-public python-grandalf
7356 (package
7357 (name "python-grandalf")
7358 (version "0.7")
7359 (source
7360 (origin
7361 ;; There's no source tarball on PyPI.
7362 (method git-fetch)
7363 (uri (git-reference
7364 (url "https://github.com/bdcht/grandalf")
7365 (commit (string-append "v" version))))
7366 (file-name (git-file-name name version))
7367 (sha256
7368 (base32
7369 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7370 (build-system python-build-system)
7371 (arguments
7372 '(#:phases
7373 (modify-phases %standard-phases
7374 (replace 'check
7375 (lambda _
7376 (invoke "python" "setup.py" "pytest"))))))
7377 (native-inputs
7378 `(("python-pytest" ,python-pytest)
7379 ("python-pytest-runner" ,python-pytest-runner)))
7380 (propagated-inputs
7381 `(("python-numpy" ,python-numpy)
7382 ("python-ply" ,python-ply)))
7383 (home-page "https://github.com/bdcht/grandalf")
7384 (synopsis "Graph and drawing algorithms framework")
7385 (description
7386 "Grandalf is a Python package made for experimentations with graphs
7387 drawing algorithms. It is written in pure Python, and currently implements
7388 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7389 minimization approach. While not as fast or featured as graphviz or other
7390 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7391 than thousands of nodes, while keeping the source code simple enough to tweak
7392 and hack any part of it for experimental purpose. With a total of about 1500
7393 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7394 in less than 600 lines. The energy minimization approach is comprised of only
7395 250 lines!
7396
7397 Grandalf does only 2 not-so-simple things:
7398 @itemize
7399 @item computing the nodes (x,y) coordinates (based on provided nodes
7400 dimensions, and a chosen layout)
7401 @item routing the edges with lines or nurbs
7402 @end itemize
7403
7404 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7405 will help you find where to draw things like nodes and edges, but it’s up to
7406 you to actually draw things with your favorite toolkit.")
7407 ;; The user can choose either license.
7408 (license (list license:gpl2 license:epl1.0))))
7409
7410 (define-public python-gridmap
7411 (package
7412 (name "python-gridmap")
7413 (version "0.14.0")
7414 (source
7415 (origin
7416 (method git-fetch)
7417 (uri (git-reference
7418 (url "https://github.com/pygridtools/gridmap")
7419 (commit (string-append "v" version))))
7420 (file-name (git-file-name name version))
7421 (sha256
7422 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7423 (build-system python-build-system)
7424 (arguments
7425 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7426 (propagated-inputs
7427 `(("python-psutil" ,python-psutil)
7428 ("python-drmaa" ,python-drmaa)
7429 ("python-pyzmq" ,python-pyzmq)))
7430 (home-page "https://github.com/pygridtools/gridmap")
7431 (synopsis "Create jobs on a cluster directly from Python")
7432 (description
7433 "Gridmap is a Python package to allow you to easily create jobs on the
7434 cluster directly from Python. You can directly map Python functions onto the
7435 cluster without needing to write any wrapper code yourself.")
7436 (license license:gpl3+)))
7437
7438 (define-public python-honcho
7439 (package
7440 (name "python-honcho")
7441 (version "1.0.1")
7442 (source
7443 (origin
7444 (method git-fetch)
7445 (uri (git-reference
7446 (url "https://github.com/nickstenning/honcho")
7447 (commit (string-append "v" version))))
7448 (file-name (git-file-name name version))
7449 (sha256
7450 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7451 (build-system python-build-system)
7452 (native-inputs
7453 `(("python-pytest" ,python-pytest)
7454 ("python-mock" ,python-mock)
7455 ("python-tox" ,python-tox)
7456 ("which" ,which))) ;for tests
7457 (propagated-inputs
7458 `(("python-jinja2" ,python-jinja2)))
7459 (arguments
7460 `(#:phases
7461 (modify-phases %standard-phases
7462 (delete 'check)
7463 (add-after 'install 'check
7464 (lambda* (#:key outputs inputs #:allow-other-keys)
7465 ;; fix honcho path in testsuite
7466 (substitute* "tests/conftest.py"
7467 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7468 "/bin/honcho" "'")))
7469 ;; It's easier to run tests after install.
7470 ;; Make installed package available for running the tests
7471 (add-installed-pythonpath inputs outputs)
7472 (invoke "py.test" "-v"))))))
7473 (home-page "https://github.com/nickstenning/honcho")
7474 (synopsis "Manage Procfile-based applications")
7475 (description
7476 "A Procfile is a file which describes how to run an application
7477 consisting of several processes. honcho starts all listed processes.
7478 The output of all running processes is collected by honcho and
7479 displayed.")
7480 (license license:expat)))
7481
7482 (define-public python-pebble
7483 (package
7484 (name "python-pebble")
7485 (version "4.6.1")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "Pebble" version))
7490 (sha256
7491 (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
7492 (build-system python-build-system)
7493 (native-inputs
7494 `(("python-pytest" ,python-pytest)))
7495 (arguments
7496 `(#:phases
7497 (modify-phases %standard-phases
7498 (replace 'check
7499 (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
7500 (home-page "https://github.com/noxdafox/pebble")
7501 (synopsis "Threading and multiprocessing for Python")
7502 (description
7503 "Pebble aims to help manage threads and processes in an easier way. It
7504 wraps Python's standard library threading and multiprocessing objects.")
7505 (license license:lgpl3+)))
7506
7507 (define-public python-pexpect
7508 (package
7509 (name "python-pexpect")
7510 (version "4.8.0")
7511 (source
7512 (origin
7513 (method url-fetch)
7514 (uri (pypi-uri "pexpect" version))
7515 (sha256
7516 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7517 (build-system python-build-system)
7518 (arguments
7519 `(#:phases
7520 (modify-phases %standard-phases
7521 (add-before 'check 'prepare-tests
7522 (lambda _
7523 (substitute* (find-files "tests")
7524 (("/bin/ls") (which "ls"))
7525 (("/bin/echo") (which "echo"))
7526 (("/bin/which") (which "which"))
7527 ;; Many tests try to use the /bin directory which
7528 ;; is not present in the build environment.
7529 ;; Use one that's non-empty and unlikely to change.
7530 (("/bin'") "/dev'")
7531 ;; Disable failing test. See upstream bug report
7532 ;; https://github.com/pexpect/pexpect/issues/568
7533 (("def test_bash") "def _test_bash"))
7534 ;; XXX: Socket connection test gets "Connection reset by peer".
7535 ;; Why does it not work? Delete for now.
7536 (delete-file "tests/test_socket.py")
7537 #t))
7538 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7539 (native-inputs
7540 `(("python-nose" ,python-nose)
7541 ("python-pytest" ,python-pytest)
7542 ("man-db" ,man-db)
7543 ("which" ,which)
7544 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7545 (propagated-inputs
7546 `(("python-ptyprocess" ,python-ptyprocess)))
7547 (home-page "http://pexpect.readthedocs.org/")
7548 (synopsis "Controlling interactive console applications")
7549 (description
7550 "Pexpect is a pure Python module for spawning child applications;
7551 controlling them; and responding to expected patterns in their output.
7552 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7553 child application and control it as if a human were typing commands.")
7554 (license license:isc)))
7555
7556 (define-public python2-pexpect
7557 (package-with-python2 python-pexpect))
7558
7559 (define-public python-setuptools-scm
7560 (package
7561 (name "python-setuptools-scm")
7562 (version "3.4.3")
7563 (source (origin
7564 (method url-fetch)
7565 (uri (pypi-uri "setuptools_scm" version))
7566 (sha256
7567 (base32
7568 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
7569 (build-system python-build-system)
7570 (home-page "https://github.com/pypa/setuptools_scm/")
7571 (synopsis "Manage Python package versions in SCM metadata")
7572 (description
7573 "Setuptools_scm handles managing your Python package versions in
7574 @dfn{software configuration management} (SCM) metadata instead of declaring
7575 them as the version argument or in a SCM managed file.")
7576 (license license:expat)))
7577
7578 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
7579 (define-public python-setuptools-scm/next
7580 (package
7581 (inherit python-setuptools-scm)
7582 (version "5.0.1")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "setuptools_scm" version))
7587 (sha256
7588 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
7589
7590 (define-public python2-setuptools-scm
7591 (package-with-python2 python-setuptools-scm))
7592
7593 (define-public python-sexpdata
7594 (package
7595 (name "python-sexpdata")
7596 (version "0.0.3")
7597 (source
7598 (origin
7599 (method url-fetch)
7600 (uri (pypi-uri "sexpdata" version))
7601 (sha256
7602 (base32
7603 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7604 (build-system python-build-system)
7605 (home-page "https://github.com/jd-boyd/sexpdata")
7606 (synopsis "S-expression parser for Python")
7607 (description
7608 "Sexpdata is an S-expression parser/serializer. It has load and dump
7609 functions like pickle, json or PyYAML module.")
7610 (license license:bsd-3)))
7611
7612 (define-public python-pathlib2
7613 (package
7614 (name "python-pathlib2")
7615 (version "2.3.3")
7616 (source
7617 (origin
7618 (method url-fetch)
7619 (uri (pypi-uri "pathlib2" version))
7620 (sha256
7621 (base32
7622 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7623 (build-system python-build-system)
7624 (propagated-inputs
7625 `(("python-scandir" ,python-scandir)
7626 ("python-six" ,python-six)))
7627 (home-page "https://pypi.org/project/pathlib2/")
7628 (synopsis "Object-oriented file system paths")
7629 (description "The goal of pathlib2 is to provide a backport of the
7630 standard @code{pathlib} module which tracks the standard library module, so
7631 all the newest features of the standard @code{pathlib} can be used also on
7632 older Python versions.")
7633 (license license:expat)))
7634
7635 (define-public python-importlib-resources
7636 (package
7637 (name "python-importlib-resources")
7638 (version "3.0.0")
7639 (source
7640 (origin
7641 (method url-fetch)
7642 (uri (pypi-uri "importlib_resources" version))
7643 (sha256
7644 (base32
7645 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7646 (build-system python-build-system)
7647 (native-inputs
7648 `(("python-setuptools-scm" ,python-setuptools-scm)
7649 ("python-toml" ,python-toml)))
7650 (home-page "http://importlib-resources.readthedocs.io/")
7651 (synopsis "Read resources from Python packages")
7652 (description
7653 "@code{importlib_resources} is a backport of Python 3's standard library
7654 @code{importlib.resources} module for Python 2.7, and Python 3.")
7655 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7656 (license license:asl2.0)))
7657
7658 (define-public python2-importlib-resources
7659 (package
7660 (name "python2-importlib-resources")
7661 (version "1.0.2")
7662 (source (origin
7663 (method url-fetch)
7664 (uri (pypi-uri "importlib_resources" version))
7665 (sha256
7666 (base32
7667 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7668 (build-system python-build-system)
7669 (arguments
7670 `(#:python ,python-2
7671 #:phases (modify-phases %standard-phases
7672 ;; The build system tests for python-wheel, but it is
7673 ;; not required for Guix nor the test suite. Just drop
7674 ;; it to make bootstrapping pytest easier.
7675 (add-after 'unpack 'drop-wheel-dependency
7676 (lambda _
7677 (substitute* "setup.cfg"
7678 (("^[[:blank:]]+wheel")
7679 ""))
7680 #t)))))
7681 (propagated-inputs
7682 `(("python-pathlib2" ,python2-pathlib2)
7683 ("python-typing" ,python2-typing)))
7684 (home-page "https://gitlab.com/python-devs/importlib_resources")
7685 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7686 (description
7687 "This package provides an implementation of @code{importlib.resources}
7688 for older versions of Python.")
7689 (license license:asl2.0)))
7690
7691 ;; For importlib-metadata-bootstrap below.
7692 (define-public python2-importlib-resources-bootstrap
7693 (hidden-package
7694 (package/inherit
7695 python2-importlib-resources
7696 (name "python2-importlib-resources-bootstrap")
7697 (propagated-inputs
7698 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7699 ("python-typing" ,python2-typing))))))
7700
7701 (define-public python-importlib-metadata
7702 (package
7703 (name "python-importlib-metadata")
7704 (version "1.5.0")
7705 (source
7706 (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "importlib_metadata" version))
7709 (sha256
7710 (base32
7711 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7712 (build-system python-build-system)
7713 (propagated-inputs
7714 `(("python-zipp" ,python-zipp)))
7715 (native-inputs
7716 `(("python-setuptools-scm" ,python-setuptools-scm)
7717 ("python-pyfakefs" ,python-pyfakefs)
7718 ("python-packaging" ,python-packaging)))
7719 (home-page "https://importlib-metadata.readthedocs.io/")
7720 (synopsis "Read metadata from Python packages")
7721 (description
7722 "@code{importlib_metadata} is a library which provides an API for
7723 accessing an installed Python package's metadata, such as its entry points or
7724 its top-level name. This functionality intends to replace most uses of
7725 @code{pkg_resources} entry point API and metadata API. Along with
7726 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7727 need to use the older and less efficient @code{pkg_resources} package.")
7728 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7729 (license license:asl2.0)))
7730
7731 (define-public python2-importlib-metadata
7732 (let ((base (package-with-python2 (strip-python2-variant
7733 python-importlib-metadata))))
7734 (package/inherit
7735 base
7736 (name "python2-importlib-metadata")
7737 (native-inputs
7738 `(("python-setuptools-scm" ,python2-setuptools-scm)
7739 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7740 ("python-packaging" ,python2-packaging-bootstrap)))
7741 (propagated-inputs
7742 `(("python-configparser" ,python2-configparser)
7743 ("python-contextlib2" ,python2-contextlib2)
7744 ("python-importlib-resources" ,python2-importlib-resources)
7745 ("python-pathlib2" ,python2-pathlib2)
7746 ,@(package-propagated-inputs base))))))
7747
7748 ;; This package is used by python2-pytest, and thus must not depend on it.
7749 (define-public python2-importlib-metadata-bootstrap
7750 (hidden-package
7751 (package/inherit
7752 python2-importlib-metadata
7753 (name "python2-importlib-metadata-bootstrap")
7754 (arguments
7755 `(#:tests? #f
7756 ,@(package-arguments python2-importlib-metadata)))
7757 (propagated-inputs
7758 `(("python-zipp" ,python2-zipp-bootstrap)
7759 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7760 ("python-configparser" ,python2-configparser)
7761 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7762 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7763
7764 (define-public python-importmagic
7765 (package
7766 (name "python-importmagic")
7767 (version "0.1.7")
7768 (source
7769 (origin
7770 (method url-fetch)
7771 (uri (pypi-uri "importmagic" version))
7772 (sha256
7773 (base32
7774 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7775 (build-system python-build-system)
7776 (home-page "https://github.com/alecthomas/importmagic")
7777 (synopsis "Library for adding, removing and managing Python imports")
7778 (description
7779 "Importmagic is a Python library for automatically managing imports by
7780 finding unresolved symbols in Python code and their corresponding imports.")
7781 (license license:bsd-3)))
7782
7783 (define-public python-inotify-simple
7784 (package
7785 (name "python-inotify-simple")
7786 (version "1.3.5")
7787 (source
7788 (origin
7789 (method git-fetch)
7790 (uri (git-reference
7791 (url "https://github.com/chrisjbillington/inotify_simple")
7792 (commit version)))
7793 (file-name (git-file-name name version))
7794 (sha256
7795 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7796 (build-system python-build-system)
7797 (home-page
7798 "https://github.com/chrisjbillington/inotify_simple")
7799 (synopsis "Simple wrapper around inotify library")
7800 (description
7801 "@code{inotify-simple} is a simple wrapper around inotify library.")
7802 (license license:bsd-3)))
7803
7804 (define-public python-jaraco-packaging
7805 (package
7806 (name "python-jaraco-packaging")
7807 (version "6.1")
7808 (source
7809 (origin
7810 (method url-fetch)
7811 (uri (pypi-uri "jaraco.packaging" version))
7812 (sha256
7813 (base32
7814 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7815 (build-system python-build-system)
7816 (propagated-inputs
7817 `(("python-pytest" ,python-pytest)
7818 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7819 ("python-pytest-flake8" ,python-pytest-flake8)
7820 ("python-rst.linker" ,python-rst.linker)
7821 ("python-setuptools" ,python-setuptools)
7822 ("python-setuptools-scm" ,python-setuptools-scm)
7823 ("python-six" ,python-six)
7824 ("python-sphinx" ,python-sphinx)))
7825 (home-page "https://github.com/jaraco/jaraco.packaging")
7826 (synopsis "Tools to supplement packaging Python releases")
7827 (description
7828 "This package provides various tools to supplement packaging Python
7829 releases.")
7830 (license license:expat)))
7831
7832 (define-public python-pathpy
7833 (package
7834 (name "python-pathpy")
7835 (version "11.5.1")
7836 (source
7837 (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "path.py" version))
7840 (sha256
7841 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7842 (outputs '("out" "doc"))
7843 (build-system python-build-system)
7844 (propagated-inputs
7845 `(("python-appdirs" ,python-appdirs)
7846 ("python-importlib-metadata" ,python-importlib-metadata)))
7847 (native-inputs
7848 `(("python-setuptools-scm" ,python-setuptools-scm)
7849 ("python-sphinx" ,python-sphinx)
7850 ("python-rst.linker" ,python-rst.linker)
7851 ("python-pytest" ,python-pytest)
7852 ("python-pytest-runner" ,python-pytest-runner)
7853 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7854 (arguments
7855 `(#:phases
7856 (modify-phases %standard-phases
7857 (add-after 'build 'build-doc
7858 (lambda _
7859 (setenv "LANG" "en_US.UTF-8")
7860 (invoke "python" "setup.py" "build_sphinx")))
7861 (add-after 'install 'install-doc
7862 (lambda* (#:key outputs #:allow-other-keys)
7863 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7864 (doc (string-append data "/doc/" ,name "-" ,version))
7865 (html (string-append doc "/html")))
7866 (mkdir-p html)
7867 (for-each (lambda (file)
7868 (copy-file file (string-append doc "/" file)))
7869 '("README.rst" "CHANGES.rst"))
7870 (copy-recursively "build/sphinx/html" html)
7871 #t)))
7872 (replace 'check
7873 (lambda _
7874 ;; The import time test aborts if an import takes longer than
7875 ;; 100ms. It may very well take a little longer than that.
7876 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7877 (home-page "https://github.com/jaraco/path.py")
7878 (synopsis "Python module wrapper for built-in os.path")
7879 (description
7880 "@code{path.py} implements path objects as first-class entities, allowing
7881 common operations on files to be invoked on those path objects directly.")
7882 (license license:expat)))
7883
7884 (define-public python-simplegeneric
7885 (package
7886 (name "python-simplegeneric")
7887 (version "0.8.1")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "simplegeneric" version ".zip"))
7892 (sha256
7893 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7894 (build-system python-build-system)
7895 (native-inputs
7896 `(("unzip" ,unzip)))
7897 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7898 (synopsis "Python module for simple generic functions")
7899 (description
7900 "The simplegeneric module lets you define simple single-dispatch generic
7901 functions, akin to Python’s built-in generic functions like @code{len()},
7902 @code{iter()} and so on. However, instead of using specially-named methods,
7903 these generic functions use simple lookup tables, akin to those used by
7904 e.g. @code{pickle.dump()} and other generic functions found in the Python
7905 standard library.")
7906 (license license:zpl2.1)))
7907
7908 (define-public python2-simplegeneric
7909 (package-with-python2 python-simplegeneric))
7910
7911 (define-public python-ipython-genutils
7912 ;; TODO: This package is retired, check if can be removed, see description.
7913 (package
7914 (name "python-ipython-genutils")
7915 (version "0.1.0")
7916 (source
7917 (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "ipython_genutils" version))
7920 (sha256
7921 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7922 (build-system python-build-system)
7923 (arguments `(#:tests? #f)) ; no tests
7924 (home-page "https://ipython.org")
7925 (synopsis "Vestigial utilities from IPython")
7926 (description
7927 "This package provides retired utilities from IPython. No packages
7928 outside IPython/Jupyter should depend on it.
7929
7930 This package shouldn't exist. It contains some common utilities shared by
7931 Jupyter and IPython projects during The Big Split. As soon as possible, those
7932 packages will remove their dependency on this, and this package will go
7933 away.")
7934 (license license:bsd-3)))
7935
7936 (define-public python2-ipython-genutils
7937 (package-with-python2 python-ipython-genutils))
7938
7939 (define-public python-ipyparallel
7940 (package
7941 (name "python-ipyparallel")
7942 (version "6.2.4")
7943 (source
7944 (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "ipyparallel" version))
7947 (sha256
7948 (base32
7949 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7950 (build-system python-build-system)
7951 (arguments
7952 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7953 #:phases
7954 (modify-phases %standard-phases
7955 (add-before 'check 'prepare-for-tests
7956 (lambda _
7957 (setenv "HOME" (getcwd))
7958 #t)))))
7959 (propagated-inputs
7960 `(("python-dateutil" ,python-dateutil)
7961 ("python-decorator" ,python-decorator)
7962 ("python-ipykernel" ,python-ipykernel)
7963 ("python-ipython" ,python-ipython)
7964 ("python-ipython-genutils" ,python-ipython-genutils)
7965 ("python-jupyter-client" ,python-jupyter-client)
7966 ("python-pyzmq" ,python-pyzmq)
7967 ("python-tornado" ,python-tornado)
7968 ("python-traitlets" ,python-traitlets)))
7969 (native-inputs
7970 `(("python-ipython" ,python-ipython)
7971 ("python-mock" ,python-mock)
7972 ("python-nose" ,python-nose)
7973 ("python-pytest" ,python-pytest)
7974 ("python-pytest-cov" ,python-pytest-cov)
7975 ("python-testpath" ,python-testpath)))
7976 (home-page "https://ipython.org/")
7977 (synopsis "Interactive Parallel Computing with IPython")
7978 (description
7979 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7980 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7981 CLI scripts:
7982 @enumerate
7983 @item ipcluster - start/stop a cluster
7984 @item ipcontroller - start a scheduler
7985 @item ipengine - start an engine
7986 @end enumerate")
7987 (license license:bsd-3)))
7988
7989 (define-public python-ipython-cluster-helper
7990 (package
7991 (name "python-ipython-cluster-helper")
7992 (version "0.6.4")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "ipython-cluster-helper" version))
7997 (sha256
7998 (base32
7999 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
8000 (modules '((guix build utils)))
8001 (snippet
8002 '(begin (substitute* "requirements.txt"
8003 (("ipython.*") "ipython\n"))
8004 #t))))
8005 (build-system python-build-system)
8006 (arguments
8007 `(#:tests? #f ; Test suite can't find IPython.
8008 #:phases
8009 (modify-phases %standard-phases
8010 (replace 'check
8011 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8012 (if tests?
8013 (begin
8014 (setenv "HOME" (getcwd))
8015 (add-installed-pythonpath inputs outputs)
8016 (invoke "python" "example/example.py" "--local"))
8017 #t))))))
8018 (propagated-inputs
8019 `(("python-ipyparallel" ,python-ipyparallel)
8020 ("python-ipython" ,python-ipython)
8021 ("python-netifaces" ,python-netifaces)
8022 ("python-pyzmq" ,python-pyzmq)
8023 ("python-setuptools" ,python-setuptools)
8024 ("python-six" ,python-six)))
8025 (home-page "https://github.com/roryk/ipython-cluster-helper")
8026 (synopsis
8027 "Simplify IPython cluster start up and use for multiple schedulers")
8028 (description
8029 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
8030 profile, launches a cluster and returns a view. On program exit it shuts the
8031 cluster down and deletes the throwaway profile.")
8032 (license license:expat)))
8033
8034 (define-public python-traitlets
8035 (package
8036 (name "python-traitlets")
8037 (version "4.3.3")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "traitlets" version))
8042 (sha256
8043 (base32
8044 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
8045 (build-system python-build-system)
8046 (arguments
8047 `(#:phases
8048 (modify-phases %standard-phases
8049 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
8050 (propagated-inputs
8051 `(("python-ipython-genutils" ,python-ipython-genutils)
8052 ("python-decorator" ,python-decorator)
8053 ("python-six" ,python-six)))
8054 (native-inputs
8055 `(("python-pytest" ,python-pytest)))
8056 (properties `((python2-variant . ,(delay python2-traitlets))))
8057 (home-page "https://ipython.org")
8058 (synopsis "Configuration system for Python applications")
8059 (description
8060 "Traitlets is a framework that lets Python classes have attributes with
8061 type checking, dynamically calculated default values, and ‘on change’
8062 callbacks. The package also includes a mechanism to use traitlets for
8063 configuration, loading values from files or from command line arguments. This
8064 is a distinct layer on top of traitlets, so you can use traitlets in your code
8065 without using the configuration machinery.")
8066 (license license:bsd-3)))
8067
8068 (define-public python2-traitlets
8069 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
8070 (package/inherit traitlets
8071 (propagated-inputs
8072 `(("python2-enum34" ,python2-enum34)
8073 ,@(package-propagated-inputs traitlets))))))
8074
8075 (define-public python-jupyter-core
8076 (package
8077 (name "python-jupyter-core")
8078 (version "4.7.1")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (string-append (pypi-uri "jupyter_core" version)))
8083 (sha256
8084 (base32
8085 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
8086 (build-system python-build-system)
8087 (arguments
8088 `(#:phases
8089 (modify-phases %standard-phases
8090 (replace 'check
8091 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8092 (when tests?
8093 ; Some tests write to $HOME.
8094 (setenv "HOME" "/tmp")
8095 ; Some tests load the installed package.
8096 (add-installed-pythonpath inputs outputs)
8097 (invoke "pytest" "-vv"))))
8098 (add-after 'unpack 'patch-testsuite
8099 (lambda _
8100 ;; test_not_on_path() and test_path_priority() try to run a test
8101 ;; that loads jupyter_core, so we need PYTHONPATH
8102 (substitute* "jupyter_core/tests/test_command.py"
8103 (("env = \\{'PATH': ''\\}")
8104 "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
8105 (("env = \\{'PATH': str\\(b\\)\\}")
8106 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
8107 #t))
8108 ;; Migration is running whenever etc/jupyter exists, but the
8109 ;; Guix-managed directory will never contain any migratable IPython
8110 ;; config files and cannot be written to anyway, so just pretend we
8111 ;; already did that.
8112 (add-after 'install 'disable-migration
8113 (lambda* (#:key outputs #:allow-other-keys)
8114 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
8115 (invoke "touch"
8116 (string-append
8117 (assoc-ref outputs "out")
8118 "/etc/jupyter/migrated")))))))
8119 (propagated-inputs
8120 `(("python-traitlets" ,python-traitlets)))
8121 (native-inputs
8122 `(("python-six" ,python-six)
8123 ("python-pytest" ,python-pytest)))
8124 ;; This package provides the `jupyter` binary and thus also exports the
8125 ;; search paths.
8126 (native-search-paths
8127 (list (search-path-specification
8128 (variable "JUPYTER_CONFIG_DIR")
8129 (files '("etc/jupyter")))
8130 (search-path-specification
8131 (variable "JUPYTER_PATH")
8132 (files '("share/jupyter")))))
8133 (home-page "https://jupyter.org/")
8134 (synopsis "Jupyter base package")
8135 (description
8136 "Jupyter core is the base package on which Jupyter projects rely.")
8137 (license license:bsd-3)))
8138
8139 (define-public python-jupyter-client
8140 (package
8141 (name "python-jupyter-client")
8142 (version "6.1.12")
8143 (source
8144 (origin
8145 (method url-fetch)
8146 (uri (pypi-uri "jupyter_client" version))
8147 (sha256
8148 (base32
8149 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
8150 (build-system python-build-system)
8151 (arguments
8152 `(#:phases
8153 (modify-phases %standard-phases
8154 (add-after 'unpack 'set-tool-file-names
8155 (lambda* (#:key inputs #:allow-other-keys)
8156 (let ((iproute (assoc-ref inputs "iproute")))
8157 (substitute* "jupyter_client/localinterfaces.py"
8158 (("'ip'")
8159 (string-append "'" iproute "/sbin/ip'")))
8160 #t)))
8161 (replace 'check
8162 (lambda* (#:key tests? #:allow-other-keys)
8163 (when tests?
8164 ;; Some tests try to write to $HOME.
8165 (setenv "HOME" "/tmp")
8166 (invoke "pytest" "-vv")))))))
8167 (inputs
8168 `(("iproute" ,iproute)))
8169 (propagated-inputs
8170 `(("python-dateutil" ,python-dateutil)
8171 ("python-jupyter-core" ,python-jupyter-core)
8172 ("python-pyzmq" ,python-pyzmq)
8173 ("python-tornado" ,python-tornado-6)
8174 ("python-traitlets" ,python-traitlets)))
8175 (native-inputs
8176 `(("python-pytest" ,python-pytest)
8177 ("python-pytest-asyncio" ,python-pytest-asyncio)
8178 ("python-pytest-timeout" ,python-pytest-timeout)
8179 ("python-async-generator" ,python-async-generator)
8180 ("python-mock" ,python-mock)
8181 ("python-msgpack" ,python-msgpack)
8182 ("python-ipython" ,python-ipython)
8183 ("python-ipykernel" ,python-ipykernel-bootstrap)))
8184 (home-page "https://jupyter.org/")
8185 (synopsis "Jupyter protocol implementation and client libraries")
8186 (description
8187 "The @code{jupyter_client} package contains the reference implementation
8188 of the Jupyter protocol. It also provides client and kernel management APIs
8189 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
8190 installing @code{kernelspec}s for use with Jupyter frontends.")
8191 (license license:bsd-3)))
8192
8193 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
8194 ;; and jupyter-client by removing the former from its native-inputs and
8195 ;; disabling tests.
8196 (define-public python-jupyter-client-bootstrap
8197 (let ((base python-jupyter-client))
8198 (hidden-package
8199 (package
8200 (inherit base)
8201 (name "python-jupyter-client-bootstrap")
8202 (arguments
8203 `(#:tests? #f
8204 ,@(package-arguments base)))
8205 (native-inputs `())))))
8206
8207 (define-public python-ipykernel
8208 (package
8209 (name "python-ipykernel")
8210 (version "5.5.3")
8211 (source
8212 (origin
8213 (method url-fetch)
8214 (uri (pypi-uri "ipykernel" version))
8215 (sha256
8216 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
8217 (build-system python-build-system)
8218 (arguments
8219 `(#:phases
8220 (modify-phases %standard-phases
8221 (replace 'check
8222 (lambda _
8223 (setenv "HOME" "/tmp")
8224 (invoke "pytest" "-v")
8225 #t))
8226 (add-after 'install 'set-python-file-name
8227 (lambda* (#:key outputs #:allow-other-keys)
8228 ;; Record the absolute file name of the 'python' executable in
8229 ;; 'kernel.json'.
8230 (let ((out (assoc-ref outputs "out")))
8231 (substitute* (string-append out "/share/jupyter"
8232 "/kernels/python3/kernel.json")
8233 (("\"python\"")
8234 (string-append "\"" (which "python") "\"")))
8235 #t))))))
8236 (propagated-inputs
8237 `(("python-ipython" ,python-ipython)
8238 ("python-tornado" ,python-tornado-6)
8239 ("python-traitlets" ,python-traitlets)
8240 ;; imported at runtime during connect
8241 ("python-jupyter-client" ,python-jupyter-client)))
8242 (native-inputs
8243 `(("python-flaky" ,python-flaky)
8244 ("python-nose" ,python-nose)
8245 ("python-pytest" ,python-pytest)))
8246 (home-page "https://ipython.org")
8247 (synopsis "IPython Kernel for Jupyter")
8248 (description
8249 "This package provides the IPython kernel for Jupyter.")
8250 (license license:bsd-3)))
8251
8252 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
8253 ;; break the cycle between ipykernel and jupyter-client.
8254 (define-public python-ipykernel-bootstrap
8255 (let ((parent python-ipykernel))
8256 (hidden-package
8257 (package
8258 (inherit parent)
8259 (name "python-ipykernel-bootstrap")
8260 (propagated-inputs
8261 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
8262 ,@(fold alist-delete (package-propagated-inputs parent)
8263 '("python-jupyter-client"))))))))
8264
8265 (define-public python-pari-jupyter
8266 (package
8267 (name "python-pari-jupyter")
8268 (version "1.3.2")
8269 (source
8270 (origin
8271 (method url-fetch)
8272 (uri (pypi-uri "pari_jupyter" version))
8273 (sha256
8274 (base32
8275 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
8276 (build-system python-build-system)
8277 (propagated-inputs
8278 `(("python-ipykernel" ,python-ipykernel)))
8279 (inputs
8280 `(("pari-gp" ,pari-gp)
8281 ("readline" ,readline)))
8282 (arguments
8283 `(#:tests? #f)) ; no test suite
8284 (home-page
8285 "https://github.com/jdemeyer/pari_jupyter")
8286 (synopsis "A Jupyter kernel for PARI/GP")
8287 (description "The package provides a PARI/GP kernel for Jupyter.")
8288 (license license:gpl3+)))
8289
8290 (define-public python-backcall
8291 (package
8292 (name "python-backcall")
8293 (version "0.2.0")
8294 (source
8295 (origin
8296 (method url-fetch)
8297 (uri (pypi-uri "backcall" version))
8298 (sha256
8299 (base32
8300 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
8301 (build-system python-build-system)
8302 (home-page "https://github.com/takluyver/backcall/")
8303 (synopsis "Specifications for callback functions passed in to an API")
8304 (description
8305 "If your code lets other people supply callback functions, it's important
8306 to specify the function signature you expect, and check that functions support
8307 that. Adding extra parameters later would break other peoples code unless
8308 you're careful. The @code{backcall} package provides a way of specifying the
8309 callback signature using a prototype function.")
8310 (license license:bsd-3)))
8311
8312 (define-public python-ipython
8313 (package
8314 (name "python-ipython")
8315 (version "7.9.0")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "ipython" version ".tar.gz"))
8320 (sha256
8321 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8322 (build-system python-build-system)
8323 (propagated-inputs
8324 `(("python-backcall" ,python-backcall)
8325 ("python-pyzmq" ,python-pyzmq)
8326 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
8327 ("python-terminado" ,python-terminado)
8328 ("python-matplotlib" ,python-matplotlib)
8329 ("python-numpy" ,python-numpy)
8330 ("python-numpydoc" ,python-numpydoc)
8331 ("python-jedi" ,python-jedi)
8332 ("python-jinja2" ,python-jinja2)
8333 ("python-mistune" ,python-mistune)
8334 ("python-pexpect" ,python-pexpect)
8335 ("python-pickleshare" ,python-pickleshare)
8336 ("python-simplegeneric" ,python-simplegeneric)
8337 ("python-jsonschema" ,python-jsonschema)
8338 ("python-traitlets" ,python-traitlets)
8339 ("python-nbformat" ,python-nbformat)
8340 ("python-pygments" ,python-pygments)))
8341 (inputs
8342 `(("readline" ,readline)
8343 ("which" ,which)))
8344 (native-inputs
8345 `(("graphviz" ,graphviz)
8346 ("pkg-config" ,pkg-config)
8347 ("python-requests" ,python-requests) ;; for tests
8348 ("python-testpath" ,python-testpath)
8349 ("python-nose" ,python-nose)))
8350 (arguments
8351 `(#:phases
8352 (modify-phases %standard-phases
8353 (add-after 'unpack 'make-docs-reproducible
8354 (lambda _
8355 (substitute* "IPython/sphinxext/ipython_directive.py"
8356 ((".*import datetime") "")
8357 ((".*datetime.datetime.now\\(\\)") "")
8358 (("%timeit") "# %timeit"))
8359 #t))
8360 ;; Tests can only be run after the library has been installed and not
8361 ;; within the source directory.
8362 (delete 'check)
8363 (add-after 'install 'check
8364 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8365 (if tests?
8366 (begin
8367 ;; Make installed package available for running the tests
8368 (add-installed-pythonpath inputs outputs)
8369 (setenv "HOME" "/tmp/") ;; required by a test
8370 ;; We only test the core because one of the other tests
8371 ;; tries to import ipykernel.
8372 (invoke "python" "IPython/testing/iptest.py"
8373 "-v" "IPython/core/tests"))
8374 #t)))
8375 (add-before 'check 'fix-tests
8376 (lambda* (#:key inputs #:allow-other-keys)
8377 (substitute* "./IPython/utils/_process_posix.py"
8378 (("/usr/bin/env', 'which") (which "which")))
8379 (substitute* "./IPython/core/tests/test_inputtransformer.py"
8380 (("#!/usr/bin/env python")
8381 (string-append "#!" (which "python"))))
8382 ;; This test introduces a circular dependency on ipykernel
8383 ;; (which depends on ipython).
8384 (delete-file "IPython/core/tests/test_display.py")
8385 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
8386 (delete-file "IPython/core/tests/test_interactiveshell.py")
8387 #t)))))
8388 (home-page "https://ipython.org")
8389 (synopsis "IPython is a tool for interactive computing in Python")
8390 (description
8391 "IPython provides a rich architecture for interactive computing with:
8392 Powerful interactive shells, a browser-based notebook, support for interactive
8393 data visualization, embeddable interpreters and tools for parallel
8394 computing.")
8395 (license license:bsd-3)))
8396
8397 (define-public python-ipython-documentation
8398 (package
8399 (inherit python-ipython)
8400 (name "python-ipython-documentation")
8401 (version (package-version python-ipython))
8402 (arguments
8403 `(#:phases
8404 (modify-phases %standard-phases
8405 (delete 'build)
8406 (delete 'check)
8407 (replace 'install
8408 (lambda* (#:key outputs #:allow-other-keys)
8409 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8410 (doc (string-append data "/doc/" ,name "-" ,version))
8411 (html (string-append doc "/html"))
8412 (man1 (string-append data "/man/man1"))
8413 (info (string-append data "/info"))
8414 (examples (string-append doc "/examples"))
8415 (python-arg (string-append "PYTHON=" (which "python"))))
8416 (setenv "LANG" "en_US.utf8")
8417 (with-directory-excursion "docs"
8418 ;; FIXME: pdf fails to build
8419 ;;(system* "make" "pdf" "PAPER=a4")
8420 (system* "make" python-arg "html")
8421 ;; FIXME: the generated texi file contains ^@^@, which trips
8422 ;; up the parser.
8423 ;; (system* "make" python-arg "info")
8424 )
8425 (copy-recursively "docs/man" man1)
8426 (copy-recursively "examples" examples)
8427 (copy-recursively "docs/build/html" html)
8428 ;; (copy-file "docs/build/latex/ipython.pdf"
8429 ;; (string-append doc "/ipython.pdf"))
8430 (mkdir-p info)
8431 ;; (copy-file "docs/build/texinfo/ipython.info"
8432 ;; (string-append info "/ipython.info"))
8433 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8434 #t)))))
8435 (inputs
8436 `(("python-ipython" ,python-ipython)
8437 ("python-ipykernel" ,python-ipykernel)))
8438 (native-inputs
8439 `(("python-sphinx" ,python-sphinx)
8440 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8441 ;; FIXME: It's possible that a smaller union would work just as well.
8442 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
8443 texlive-fonts-ec
8444 texlive-generic-ifxetex
8445 texlive-pdftex
8446 texlive-latex-capt-of
8447 texlive-latex-cmap
8448 texlive-latex-environ
8449 texlive-latex-eqparbox
8450 texlive-latex-etoolbox
8451 texlive-latex-expdlist
8452 texlive-latex-fancyhdr
8453 texlive-latex-fancyvrb
8454 texlive-latex-fncychap
8455 texlive-latex-float
8456 texlive-latex-framed
8457 texlive-latex-geometry
8458 texlive-latex-graphics
8459 texlive-latex-hyperref
8460 texlive-latex-mdwtools
8461 texlive-latex-multirow
8462 texlive-latex-needspace
8463 texlive-latex-oberdiek
8464 texlive-latex-parskip
8465 texlive-latex-preview
8466 texlive-latex-tabulary
8467 texlive-latex-threeparttable
8468 texlive-latex-titlesec
8469 texlive-latex-trimspaces
8470 texlive-latex-ucs
8471 texlive-latex-upquote
8472 texlive-latex-url
8473 texlive-latex-varwidth
8474 texlive-latex-wrapfig)))
8475 ("texinfo" ,texinfo)))))
8476
8477 (define-public python-urwid
8478 (package
8479 (name "python-urwid")
8480 (version "2.1.2")
8481 (source
8482 (origin
8483 (method url-fetch)
8484 (uri (pypi-uri "urwid" version))
8485 (sha256
8486 (base32
8487 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8488 (build-system python-build-system)
8489 (home-page "http://urwid.org")
8490 (synopsis "Console user interface library for Python")
8491 (description
8492 "Urwid is a curses-based UI/widget library for Python. It includes many
8493 features useful for text console applications.")
8494 (properties `((python2-variant . ,(delay python2-urwid))))
8495 (license license:lgpl2.1+)))
8496
8497 (define-public python2-urwid
8498 (let ((base (package-with-python2
8499 (strip-python2-variant python-urwid))))
8500 (package
8501 (inherit base)
8502 (version "2.1.0")
8503 (source
8504 (origin
8505 (method url-fetch)
8506 (uri (pypi-uri "urwid" version))
8507 (sha256
8508 (base32
8509 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8510
8511 (define-public python-urwid-readline
8512 (package
8513 (name "python-urwid-readline")
8514 (version "0.12")
8515 (source
8516 (origin
8517 (method git-fetch)
8518 (uri (git-reference
8519 (url "https://github.com/rr-/urwid_readline")
8520 (commit version)))
8521 (file-name (git-file-name name version))
8522 (sha256
8523 (base32
8524 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8525 (build-system python-build-system)
8526 (arguments
8527 `(#:phases
8528 (modify-phases %standard-phases
8529 (replace 'check
8530 (lambda* (#:key tests? #:allow-other-keys)
8531 (when tests?
8532 (invoke "python" "-m" "pytest"))
8533 #t)))))
8534 (propagated-inputs
8535 `(("python-urwid" ,python-urwid)))
8536 (native-inputs
8537 `(("python-pytest" ,python-pytest)))
8538 (home-page "https://github.com/rr-/urwid_readline")
8539 (synopsis "Text input widget for urwid that supports readline shortcuts")
8540 (description
8541 "This package provides a textbox edit widget for @code{python-urwid} that
8542 supports @code{readline} shortcuts.")
8543 (license license:expat)))
8544
8545 (define-public python-textdistance
8546 (package
8547 (name "python-textdistance")
8548 (version "4.2.1")
8549 (source
8550 (origin
8551 ;; There are no tests in the PyPI tarball.
8552 (method git-fetch)
8553 (uri (git-reference
8554 (url "https://github.com/life4/textdistance")
8555 (commit (string-append "v." version))))
8556 (file-name (git-file-name name version))
8557 (sha256
8558 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8559 (build-system python-build-system)
8560 (arguments
8561 `(#:test-target "pytest"
8562 #:phases
8563 (modify-phases %standard-phases
8564 (add-after 'unpack 'delete-external-test
8565 (lambda _
8566 ;; All tests in this file require external libraries.
8567 (delete-file "tests/test_external.py")
8568 #t)))))
8569 (native-inputs
8570 `(("python-hypothesis" ,python-hypothesis)
8571 ("python-isort" ,python-isort)
8572 ("python-numpy" ,python-numpy)
8573 ("python-pytest" ,python-pytest)
8574 ("python-pytest-runner" ,python-pytest-runner)
8575 ("python-tabulate" ,python-tabulate)))
8576 (home-page "https://github.com/life4/textdistance")
8577 (synopsis "Compute distance between the two texts")
8578 (description "@code{textdistance} is a pure Python library for comparing
8579 distance between two or more sequences by many algorithms.")
8580 (license license:expat)))
8581
8582 (define-public python-urwidtrees
8583 (package
8584 (name "python-urwidtrees")
8585 (version "1.0.2")
8586 (source
8587 (origin
8588 (method git-fetch)
8589 ;; package author intends on distributing via github rather than pypi:
8590 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8591 (uri (git-reference
8592 (url "https://github.com/pazz/urwidtrees")
8593 (commit version)))
8594 (file-name (git-file-name name version))
8595 (sha256
8596 (base32
8597 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8598 (build-system python-build-system)
8599 (arguments
8600 '(#:use-setuptools? #f
8601 #:tests? #f)) ; no tests
8602 (propagated-inputs `(("python-urwid" ,python-urwid)))
8603 (home-page "https://github.com/pazz/urwidtrees")
8604 (synopsis "Tree widgets for urwid")
8605 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8606 toolkit. Use it to build trees of widgets.")
8607 (license license:gpl3+)))
8608
8609 (define-public python2-urwidtrees
8610 (package-with-python2 python-urwidtrees))
8611
8612 (define-public python-ua-parser
8613 (package
8614 (name "python-ua-parser")
8615 (version "0.8.0")
8616 (source
8617 (origin
8618 (method url-fetch)
8619 (uri (pypi-uri "ua-parser" version))
8620 (sha256
8621 (base32
8622 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8623 (build-system python-build-system)
8624 (arguments
8625 `(#:tests? #f)) ;no test suite in release
8626 (native-inputs
8627 `(("python-pyyaml" ,python-pyyaml)))
8628 (home-page "https://github.com/ua-parser/uap-python")
8629 (synopsis "User agent parser")
8630 (description
8631 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8632 (license license:asl2.0)))
8633
8634 (define-public python2-ua-parser
8635 (package-with-python2 python-ua-parser))
8636
8637 (define-public python-user-agents
8638 (package
8639 (name "python-user-agents")
8640 (version "1.1.0")
8641 (source
8642 (origin
8643 (method url-fetch)
8644 (uri (pypi-uri "user-agents" version))
8645 (sha256
8646 (base32
8647 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8648 (build-system python-build-system)
8649 (arguments
8650 `(#:tests? #f)) ;missing devices.json test file in release
8651 (propagated-inputs
8652 `(("python-ua-parser" ,python-ua-parser)))
8653 (home-page "https://github.com/selwin/python-user-agents")
8654 (synopsis "User Agent strings parsing library")
8655 (description
8656 "A library to identify devices (phones, tablets) and their capabilities by
8657 parsing (browser/HTTP) user agent strings.")
8658 (license license:expat)))
8659
8660 (define-public python2-user-agents
8661 (package-with-python2 python-user-agents))
8662
8663 (define-public python-dbus
8664 (package
8665 (name "python-dbus")
8666 (version "1.2.16")
8667 (source
8668 (origin
8669 (method url-fetch)
8670 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8671 "dbus-python-" version ".tar.gz"))
8672 (sha256
8673 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8674 (build-system gnu-build-system)
8675 (native-inputs
8676 `(("pkg-config" ,pkg-config)))
8677 (inputs
8678 `(("python" ,python-wrapper)
8679 ("dbus-glib" ,dbus-glib)))
8680 (synopsis "Python bindings for D-bus")
8681 (description "python-dbus provides bindings for libdbus, the reference
8682 implementation of D-Bus.")
8683 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8684 (license license:expat)))
8685
8686 (define-public python2-dbus
8687 (package/inherit python-dbus
8688 (name "python2-dbus")
8689 (inputs `(("python" ,python-2)
8690 ,@(alist-delete "python"
8691 (package-inputs python-dbus)
8692 equal?)))))
8693
8694 (define-public python-notify2
8695 (package
8696 (name "python-notify2")
8697 (version "0.3.1")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (pypi-uri "notify2" version))
8702 (sha256
8703 (base32
8704 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8705 (build-system python-build-system)
8706 (arguments `(#:tests? #f)) ; tests depend on system state
8707 (native-inputs
8708 `(("python-dbus" ,python-dbus)))
8709 (home-page "https://bitbucket.org/takluyver/pynotify2")
8710 (synopsis "Python interface to D-Bus notifications")
8711 (description
8712 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8713 It is a reimplementation of pynotify in pure Python, and an alternative to
8714 the GObject Introspection bindings to libnotify for non-GTK applications.")
8715 (license (list license:bsd-2
8716 license:lgpl2.1+))))
8717
8718 (define-public python2-notify2
8719 (package-with-python2 python-notify2))
8720
8721 ;; beautifulsoup4 has a totally different namespace than 3.x,
8722 ;; and pypi seems to put it under its own name, so I guess we should too
8723 (define-public python-beautifulsoup4
8724 (package
8725 (name "python-beautifulsoup4")
8726 (version "4.9.3")
8727 (source
8728 (origin
8729 (method url-fetch)
8730 (uri (pypi-uri "beautifulsoup4" version))
8731 (sha256
8732 (base32
8733 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8734 (build-system python-build-system)
8735 (arguments
8736 `(#:phases
8737 (modify-phases %standard-phases
8738 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8739 ;; must use this conversion script when building with Python 3. The
8740 ;; conversion script also runs the tests.
8741 ;; For more information, see the file 'convert-py3k' in the source
8742 ;; distribution.
8743 (replace 'check
8744 (lambda _ (invoke "./convert-py3k"))))))
8745 (propagated-inputs
8746 `(("python-soupsieve" ,python-soupsieve)))
8747 (home-page
8748 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8749 (synopsis
8750 "Python screen-scraping library")
8751 (description
8752 "Beautiful Soup is a Python library designed for rapidly setting up
8753 screen-scraping projects. It offers Pythonic idioms for navigating,
8754 searching, and modifying a parse tree, providing a toolkit for
8755 dissecting a document and extracting what you need. It automatically
8756 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8757 (license license:expat)
8758 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8759
8760 (define-public python2-beautifulsoup4
8761 (let ((base (package-with-python2
8762 (strip-python2-variant python-beautifulsoup4))))
8763 (package/inherit base
8764 (arguments `(#:python ,python-2)))))
8765
8766 (define-public python-soupsieve
8767 (package
8768 (name "python-soupsieve")
8769 (version "2.2.1")
8770 (source
8771 (origin
8772 (method url-fetch)
8773 (uri (pypi-uri "soupsieve" version))
8774 (sha256
8775 (base32
8776 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8777 (build-system python-build-system)
8778 (arguments `(#:tests? #f))
8779 ;;XXX: 2 tests fail currently despite claming they were to be
8780 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8781 ;;don't want to create a circular dependency.
8782 (home-page "https://github.com/facelessuser/soupsieve")
8783 (synopsis "CSS selector library")
8784 (description
8785 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8786 Soup 4. It aims to provide selecting, matching, and filtering using modern
8787 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8788 specifications up through the latest CSS level 4 drafts and beyond (though
8789 some are not yet implemented).")
8790 (properties `((python2-variant . ,(delay python2-soupsieve))))
8791 (license license:expat)))
8792
8793 ;; This is the last version that supports python-2
8794 (define-public python2-soupsieve
8795 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8796 (package
8797 (inherit base)
8798 (version "1.9.6")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "soupsieve" version))
8803 (sha256
8804 (base32
8805 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8806 (propagated-inputs
8807 `(("python2-backports-functools-lru-cache"
8808 ,python2-backports-functools-lru-cache)
8809 ,@(package-propagated-inputs base))))))
8810
8811 (define-public python-netifaces
8812 (package
8813 (name "python-netifaces")
8814 (version "0.10.9")
8815 (source
8816 (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "netifaces" version))
8819 (sha256
8820 (base32
8821 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8822 (build-system python-build-system)
8823 (home-page "https://github.com/al45tair/netifaces")
8824 (synopsis
8825 "Python module for portable network interface information")
8826 (description
8827 "Netifaces is a Python module providing information on network
8828 interfaces in an easy and portable manner.")
8829 (license license:expat)))
8830
8831 (define-public python2-netifaces
8832 (package-with-python2 python-netifaces))
8833
8834 (define-public python-networkx
8835 (package
8836 (name "python-networkx")
8837 (version "2.6.2")
8838 (source
8839 (origin
8840 (method url-fetch)
8841 (uri (pypi-uri "networkx" version))
8842 (sha256
8843 (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
8844 (build-system python-build-system)
8845 (arguments
8846 '(#:phases (modify-phases %standard-phases
8847 (replace 'check
8848 (lambda* (#:key tests? #:allow-other-keys)
8849 (if tests?
8850 (invoke "pytest" "-vv" "--pyargs" "networkx")
8851 (format #t "test suite not run~%"))
8852 #t)))))
8853 ;; python-decorator is needed at runtime.
8854 (propagated-inputs
8855 `(("python-decorator" ,python-decorator)))
8856 (native-inputs
8857 `(("python-pytest" ,python-pytest)))
8858 (home-page "https://networkx.github.io/")
8859 (synopsis "Python module for creating and manipulating graphs and networks")
8860 (description
8861 "NetworkX is a Python package for the creation, manipulation, and study
8862 of the structure, dynamics, and functions of complex networks.")
8863 (properties `((python2-variant . ,(delay python2-networkx))))
8864 (license license:bsd-3)))
8865
8866 ;; NetworkX 2.2 is the last version with support for Python 2.
8867 (define-public python2-networkx
8868 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8869 (package
8870 (inherit base)
8871 (version "2.2")
8872 (source (origin
8873 (method url-fetch)
8874 (uri (pypi-uri "networkx" version ".zip"))
8875 (sha256
8876 (base32
8877 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8878 (arguments
8879 `(#:python ,python-2))
8880 (native-inputs
8881 `(("python-nose" ,python2-nose)
8882 ("unzip" ,unzip))))))
8883
8884 (define-public python-datrie
8885 (package
8886 (name "python-datrie")
8887 (version "0.8.2")
8888 (source
8889 (origin
8890 (method url-fetch)
8891 (uri (pypi-uri "datrie" version))
8892 (sha256
8893 (base32
8894 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8895 (build-system python-build-system)
8896 (native-inputs
8897 `(("python-cython" ,python-cython)
8898 ("python-hypothesis" ,python-hypothesis)
8899 ("python-pytest" ,python-pytest)
8900 ("python-pytest-runner" ,python-pytest-runner)))
8901 (home-page "https://github.com/kmike/datrie")
8902 (synopsis "Fast, efficiently stored trie for Python")
8903 (description
8904 "This package provides a fast, efficiently stored trie implementation for
8905 Python.")
8906 (license license:lgpl2.1+)))
8907
8908 (define-public python-amply
8909 (package
8910 (name "python-amply")
8911 (version "0.1.4")
8912 (source
8913 (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "amply" version))
8916 (sha256
8917 (base32
8918 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8919 (build-system python-build-system)
8920 (propagated-inputs
8921 `(("python-docutils" ,python-docutils)
8922 ("python-pyparsing" ,python-pyparsing)))
8923 (native-inputs
8924 `(("python-setuptools-scm" ,python-setuptools-scm)))
8925 (home-page "https://github.com/willu47/amply")
8926 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8927 (description
8928 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8929 structures.")
8930 (license license:epl1.0)))
8931
8932 (define-public python-pulp
8933 (package
8934 (name "python-pulp")
8935 (version "2.4")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "PuLP" version))
8940 (sha256
8941 (base32
8942 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8943 (build-system python-build-system)
8944 (propagated-inputs
8945 `(("python-amply" ,python-amply)))
8946 (home-page "https://github.com/coin-or/pulp")
8947 (synopsis "Linear Programming modeler")
8948 (description
8949 "PuLP is a Linear Programming modeler written in Python. PuLP can
8950 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8951 solve linear problems.")
8952 (license license:expat)))
8953
8954 (define-public python-toposort
8955 (package
8956 (name "python-toposort")
8957 (version "1.6")
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "toposort" version))
8962 (sha256
8963 (base32
8964 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8965 (build-system python-build-system)
8966 (home-page "https://gitlab.com/ericvsmith/toposort")
8967 (synopsis "Topological sort algorithm")
8968 (description
8969 "This package provides an implementation of a topological sort
8970 algorithm.")
8971 (license license:asl2.0)))
8972
8973 (define-public python-three-merge
8974 (package
8975 (name "python-three-merge")
8976 (version "0.1.1")
8977 (source
8978 (origin
8979 ;; There are no tests in the PyPI tarball.
8980 (method git-fetch)
8981 (uri (git-reference
8982 (url "https://github.com/spyder-ide/three-merge")
8983 (commit (string-append "v" version))))
8984 (file-name (git-file-name name version))
8985 (sha256
8986 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
8987 (build-system python-build-system)
8988 (arguments
8989 `(#:test-target "pytest"))
8990 (propagated-inputs
8991 `(("python-diff-match-patch" ,python-diff-match-patch)))
8992 (native-inputs
8993 `(("python-flaky" ,python-flaky)
8994 ("python-pytest" ,python-pytest)
8995 ("python-pytest-cov" ,python-pytest-cov)
8996 ("python-pytest-runner" ,python-pytest-runner)
8997 ("python-pytest-timeout" ,python-pytest-timeout)))
8998 (home-page "https://github.com/spyder-ide/three-merge")
8999 (synopsis "Library for merging two strings with respect to a base one")
9000 (description
9001 "This package provides a Python library to perform a 3-way merge between
9002 strings, based on @code{diff-match-patch}. This library performs merges at a
9003 character level, as opposed to most VCS systems, which opt for a line-based
9004 approach.")
9005 (license license:expat)))
9006
9007 (define-public snakemake
9008 (package
9009 (name "snakemake")
9010 (version "5.32.2")
9011 (source
9012 (origin
9013 (method url-fetch)
9014 (uri (pypi-uri "snakemake" version))
9015 (sha256
9016 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
9017 (build-system python-build-system)
9018 (arguments
9019 ;; TODO: Package missing test dependencies.
9020 '(#:tests? #f
9021 #:phases
9022 (modify-phases %standard-phases
9023 ;; For cluster execution Snakemake will call Python. Since there is
9024 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
9025 ;; this by calling the snakemake wrapper instead.
9026 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
9027 (lambda* (#:key outputs #:allow-other-keys)
9028 (substitute* "snakemake/executors/__init__.py"
9029 (("\\{sys.executable\\} -m snakemake")
9030 (string-append (assoc-ref outputs "out")
9031 "/bin/snakemake")))
9032 #t)))))
9033 (propagated-inputs
9034 `(("python-appdirs" ,python-appdirs)
9035 ("python-configargparse" ,python-configargparse)
9036 ("python-datrie" ,python-datrie)
9037 ("python-docutils" ,python-docutils)
9038 ("python-gitpython" ,python-gitpython)
9039 ("python-jinja2" ,python-jinja2)
9040 ("python-jsonschema" ,python-jsonschema)
9041 ("python-nbformat" ,python-nbformat)
9042 ("python-networkx" ,python-networkx)
9043 ("python-psutil" ,python-psutil)
9044 ("python-pulp" ,python-pulp)
9045 ("python-pyyaml" ,python-pyyaml)
9046 ("python-ratelimiter" ,python-ratelimiter)
9047 ("python-requests" ,python-requests)
9048 ("python-toposort" ,python-toposort)
9049 ("python-wrapt" ,python-wrapt)))
9050 (home-page "https://snakemake.readthedocs.io")
9051 (synopsis "Python-based execution environment for make-like workflows")
9052 (description
9053 "Snakemake aims to reduce the complexity of creating workflows by
9054 providing a clean and modern domain specific specification language (DSL) in
9055 Python style, together with a fast and comfortable execution environment.")
9056 (license license:expat)))
9057
9058 (define-public python-pyqrcode
9059 (package
9060 (name "python-pyqrcode")
9061 (version "1.2.1")
9062 (source
9063 (origin
9064 (method url-fetch)
9065 (uri (pypi-uri "PyQRCode" version))
9066 (sha256
9067 (base32
9068 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
9069 (build-system python-build-system)
9070 (home-page
9071 "https://github.com/mnooner256/pyqrcode")
9072 (synopsis "QR code generator")
9073 (description
9074 "Pyqrcode is a QR code generator written purely in Python with
9075 SVG, EPS, PNG and terminal output.")
9076 (license license:bsd-3)))
9077
9078 (define-public python-seaborn
9079 (package
9080 (name "python-seaborn")
9081 (version "0.11.1")
9082 (source
9083 (origin
9084 (method url-fetch)
9085 (uri (pypi-uri "seaborn" version))
9086 (sha256
9087 (base32 "1b81p9s6li3b606ivgbynrh102fclwlw74m8qxzsii9pv6p8xrs4"))
9088 (patches (search-patches "python-seaborn-kde-test.patch"))))
9089 (build-system python-build-system)
9090 (arguments
9091 `(#:phases
9092 (modify-phases %standard-phases
9093 (add-before 'check 'start-xserver
9094 (lambda _
9095 ;; There must be a running X server and make check doesn't
9096 ;; start one. Therefore we must do it.
9097 (system "Xvfb :1 &")
9098 (setenv "DISPLAY" ":1")))
9099 (replace 'check
9100 (lambda* (#:key tests? #:allow-other-keys)
9101 (when tests?
9102 (invoke "pytest" "seaborn")))))))
9103 (propagated-inputs
9104 `(("python-pandas" ,python-pandas)
9105 ("python-matplotlib" ,python-matplotlib)
9106 ("python-numpy" ,python-numpy)
9107 ("python-scipy" ,python-scipy)))
9108 (native-inputs
9109 `(("python-pytest" ,python-pytest)
9110 ("xorg-server" ,xorg-server-for-tests)))
9111 (home-page "https://seaborn.pydata.org/")
9112 (synopsis "Statistical data visualization")
9113 (description
9114 "Seaborn is a library for making attractive and informative statistical
9115 graphics in Python. It is built on top of matplotlib and tightly integrated
9116 with the PyData stack, including support for numpy and pandas data structures
9117 and statistical routines from scipy and statsmodels.")
9118 (properties `((python2-variant . ,(delay python2-seaborn))))
9119 (license license:bsd-3)))
9120
9121 ;; 0.9.1 is the last release with support for Python 2.
9122 (define-public python2-seaborn
9123 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
9124 (package
9125 (inherit base)
9126 (version "0.9.1")
9127 (source (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "seaborn" version))
9130 (sha256
9131 (base32
9132 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
9133
9134 (define-public python-mpmath
9135 (package
9136 (name "python-mpmath")
9137 (version "1.1.0")
9138 (source (origin
9139 (method url-fetch)
9140 (uri (pypi-uri "mpmath" version))
9141 (file-name (git-file-name name version))
9142 (sha256
9143 (base32
9144 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
9145 (build-system python-build-system)
9146 (native-inputs
9147 `(("python-pytest" ,python-pytest)))
9148 (arguments
9149 '(#:phases
9150 (modify-phases %standard-phases
9151 (replace 'check
9152 (lambda _
9153 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
9154 (home-page "https://mpmath.org")
9155 (synopsis "Arbitrary-precision floating-point arithmetic in python")
9156 (description
9157 "@code{mpmath} can be used as an arbitrary-precision substitute for
9158 Python's float/complex types and math/cmath modules, but also does much
9159 more advanced mathematics.")
9160 (license license:bsd-3)))
9161
9162 (define-public python2-mpmath
9163 (package-with-python2 python-mpmath))
9164
9165 (define-public python-bigfloat
9166 (package
9167 (name "python-bigfloat")
9168 (version "0.3.0")
9169 (source
9170 (origin
9171 (method url-fetch)
9172 (uri (pypi-uri "bigfloat" version))
9173 (sha256
9174 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
9175 (build-system python-build-system)
9176 (inputs
9177 `(("mpfr" ,mpfr)))
9178 (home-page "https://github.com/mdickinson/bigfloat")
9179 (synopsis "Arbitrary precision floating-point arithmetic for Python")
9180 (description
9181 "This package provides a Python interface to the MPFR library for
9182 multiprecision arithmetic.")
9183 (license license:lgpl3+)))
9184
9185 (define-public python-sympy
9186 (package
9187 (name "python-sympy")
9188 (version "1.7.1")
9189 (source
9190 (origin
9191 (method url-fetch)
9192 (uri (pypi-uri "sympy" version))
9193 (sha256
9194 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
9195 (build-system python-build-system)
9196 (arguments
9197 `(#:phases
9198 (modify-phases %standard-phases
9199 (replace 'check
9200 (lambda* (#:key outputs #:allow-other-keys)
9201 (invoke
9202 (or (which "python3") (which "python"))
9203 "-c" "import sympy; sympy.test(\"/core\")"))))))
9204 (propagated-inputs
9205 `(("python-mpmath" ,python-mpmath)))
9206 (home-page "https://www.sympy.org/")
9207 (synopsis "Python library for symbolic mathematics")
9208 (description
9209 "SymPy is a Python library for symbolic mathematics. It aims to become a
9210 full-featured computer algebra system (CAS) while keeping the code as simple
9211 as possible in order to be comprehensible and easily extensible.")
9212 (license license:bsd-3)))
9213
9214 (define-public python2-sympy
9215 (package
9216 (inherit (package-with-python2 python-sympy))
9217 (version "1.5.1") ; last release for python2
9218 (source
9219 (origin
9220 (method url-fetch)
9221 (uri (pypi-uri "sympy" version))
9222 (sha256
9223 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
9224
9225 (define-public python-q
9226 (package
9227 (name "python-q")
9228 (version "2.6")
9229 (source
9230 (origin
9231 (method url-fetch)
9232 (uri (pypi-uri "q" version))
9233 (sha256
9234 (base32
9235 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
9236 (build-system python-build-system)
9237 (home-page "https://github.com/zestyping/q")
9238 (synopsis "Quick-and-dirty debugging output for tired programmers")
9239 (description
9240 "q is a Python module for \"print\" style of debugging Python code. It
9241 provides convenient short API for print out of values, tracebacks, and
9242 falling into the Python interpreter.")
9243 (license license:asl2.0)))
9244
9245 (define-public python2-q
9246 (package-with-python2 python-q))
9247
9248 (define-public python-xlib
9249 (package
9250 (name "python-xlib")
9251 (version "0.29")
9252 (source
9253 (origin
9254 (method git-fetch)
9255 (uri (git-reference
9256 (url "https://github.com/python-xlib/python-xlib")
9257 (commit version)))
9258 (file-name (git-file-name name version))
9259 (sha256
9260 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
9261 (build-system python-build-system)
9262 (arguments
9263 `(#:phases
9264 (modify-phases %standard-phases
9265 (add-before 'check 'start-xserver
9266 (lambda* (#:key inputs #:allow-other-keys)
9267 (let ((xorg-server (assoc-ref inputs "xorg-server")))
9268 ;; There must be a running X server and make check doesn't
9269 ;; start one. Therefore we must do it.
9270 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
9271 (setenv "DISPLAY" ":1")
9272 #t))))))
9273 (native-inputs
9274 `(("python-mock" ,python-mock)
9275 ("python-setuptools-scm" ,python-setuptools-scm)
9276 ("xorg-server" ,xorg-server)))
9277 (propagated-inputs
9278 `(("python-six" ,python-six)))
9279 (home-page "https://github.com/python-xlib/python-xlib")
9280 (synopsis "Python X11 client library")
9281 (description
9282 "The Python X Library is intended to be a fully functional
9283 X client library for Python programs. It is useful to implement
9284 low-level X clients. It is written entirely in Python.")
9285 (license license:gpl2+)))
9286
9287 (define-public python2-xlib
9288 (package-with-python2 python-xlib))
9289
9290 (define-public python-singledispatch
9291 (package
9292 (name "python-singledispatch")
9293 (version "3.4.0.3")
9294 (source
9295 (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "singledispatch" version))
9298 (sha256
9299 (base32
9300 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
9301 (build-system python-build-system)
9302 (native-inputs
9303 `(("python-six" ,python-six))) ; required for conversion, not at run-time
9304 (home-page
9305 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
9306 (synopsis "Backport of singledispatch feature from Python 3.4")
9307 (description
9308 "This library brings functools.singledispatch from Python 3.4 to Python
9309 2.6-3.3.")
9310 (license license:expat)))
9311
9312 (define-public python2-singledispatch
9313 (package-with-python2 python-singledispatch))
9314
9315 ;; the python- version can be removed with python-3.5
9316 (define-public python-backports-abc
9317 (package
9318 (name "python-backports-abc")
9319 (version "0.5")
9320 (source
9321 (origin
9322 (method url-fetch)
9323 (uri (pypi-uri "backports_abc" version))
9324 (sha256
9325 (base32
9326 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9327 (build-system python-build-system)
9328 (home-page "https://github.com/cython/backports_abc")
9329 (synopsis "Backport of additions to the 'collections.abc' module")
9330 (description
9331 "Python-backports-abc provides a backport of additions to the
9332 @code{collections.abc} module in Python-3.5.")
9333 (license license:psfl)))
9334
9335 (define-public python2-backports-abc
9336 (package-with-python2 python-backports-abc))
9337
9338 (define-public python-backports-csv
9339 (package
9340 (name "python-backports-csv")
9341 (version "1.0.7")
9342 (source
9343 (origin
9344 (method url-fetch)
9345 (uri (pypi-uri "backports.csv" version))
9346 (sha256
9347 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9348 (build-system python-build-system)
9349 (home-page "https://github.com/ryanhiebert/backports.csv")
9350 (synopsis "Backport of Python 3's csv module for Python 2")
9351 (description
9352 "Provides a backport of Python 3's @code{csv} module for parsing
9353 comma separated values. The API of the @code{csv} module in Python 2
9354 is drastically different from the @code{csv} module in Python 3.
9355 This is due, for the most part, to the difference between str in
9356 Python 2 and Python 3.")
9357 (license license:psfl)))
9358
9359 (define-public python2-backports-csv
9360 (package-with-python2 python-backports-csv))
9361
9362 (define-public python2-backports-shutil-get-terminal-size
9363 (package
9364 (name "python2-backports-shutil-get-terminal-size")
9365 (version "1.0.0")
9366 (source
9367 (origin
9368 (method url-fetch)
9369 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9370 (sha256
9371 (base32
9372 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9373 (build-system python-build-system)
9374 (arguments
9375 `(#:python ,python-2
9376 #:phases
9377 (modify-phases %standard-phases
9378 (replace 'check
9379 (lambda _
9380 (setenv "PYTHONPATH" (string-append "./build/lib:"
9381 (getenv "PYTHONPATH")))
9382 (invoke "py.test" "-v"))))))
9383 (native-inputs
9384 `(("python2-pytest" ,python2-pytest)))
9385 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9386 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9387 (description
9388 "This package provides a backport of the @code{get_terminal_size
9389 function} from Python 3.3's @code{shutil}.
9390 Unlike the original version it is written in pure Python rather than C,
9391 so it might be a tiny bit slower.")
9392 (license license:expat)))
9393
9394 (define-public python-waf
9395 (package
9396 (name "python-waf")
9397 (version "2.0.19")
9398 (source (origin
9399 (method url-fetch)
9400 (uri (string-append "https://waf.io/"
9401 "waf-" version ".tar.bz2"))
9402 (sha256
9403 (base32
9404 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9405 (build-system python-build-system)
9406 (arguments
9407 '(#:phases
9408 (modify-phases %standard-phases
9409 (replace 'build
9410 (lambda _
9411 ;; XXX: Find a way to add all extra tools.
9412 (let ((tools '("gccdeps"
9413 "clang_compilation_database")))
9414 (invoke "python" "waf-light" "configure" "build"
9415 (string-append "--tools="
9416 (string-join tools ","))))))
9417 (replace 'check
9418 (lambda _
9419 (invoke "python" "waf" "--version")))
9420 (replace 'install
9421 (lambda* (#:key outputs #:allow-other-keys)
9422 (let ((out (assoc-ref outputs "out")))
9423 (install-file "waf" (string-append out "/bin")))
9424 #t))
9425 ;; waf breaks when it is wrapped.
9426 (delete 'wrap))))
9427 (home-page "https://waf.io/")
9428 (synopsis "Python-based build system")
9429 (description
9430 "Waf is a Python-based framework for configuring, compiling and installing
9431 applications.")
9432 (license license:bsd-3)))
9433
9434 (define-public python2-waf
9435 (package-with-python2 python-waf))
9436
9437 (define-public python-pyzmq
9438 (package
9439 (name "python-pyzmq")
9440 (version "22.1.0")
9441 (source
9442 (origin
9443 (method url-fetch)
9444 (uri (pypi-uri "pyzmq" version))
9445 (sha256
9446 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9447 (build-system python-build-system)
9448 (arguments
9449 `(#:configure-flags
9450 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9451 #:phases
9452 (modify-phases %standard-phases
9453 (add-before 'check 'build-extensions
9454 (lambda _
9455 ;; Cython extensions have to be built before running the tests.
9456 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9457 (inputs
9458 `(("zeromq" ,zeromq)))
9459 (native-inputs
9460 `(("pkg-config" ,pkg-config)
9461 ("python-cython" ,python-cython)
9462 ("python-pytest" ,python-pytest)))
9463 (home-page "https://github.com/zeromq/pyzmq")
9464 (synopsis "Python bindings for 0MQ")
9465 (description
9466 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9467 (license license:bsd-4)))
9468
9469 (define-public python-pep8
9470 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9471 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9472 ;; some dependents' test suites, and nothing more.
9473 (package
9474 (name "python-pep8")
9475 (version "1.7.0")
9476 (source
9477 (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "pep8" version))
9480 (sha256
9481 (base32
9482 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9483 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9484 (build-system python-build-system)
9485 (home-page "https://pep8.readthedocs.org/")
9486 (synopsis "Python style guide checker")
9487 (description
9488 "This tools checks Python code against some of the style conventions in
9489 PEP 8.")
9490 (license license:expat)))
9491
9492 (define-public python2-pep8
9493 (package-with-python2 python-pep8))
9494
9495 (define-public python-pep8-naming
9496 (package
9497 (name "python-pep8-naming")
9498 (version "0.12.0")
9499 (source
9500 (origin
9501 (method url-fetch)
9502 (uri (pypi-uri "pep8-naming" version))
9503 (sha256
9504 (base32
9505 "04kyh9hkpyc8jzj16d1kkk29b5n8miqdvbs0zm035n1z5z5kx6hz"))))
9506 (build-system python-build-system)
9507 (propagated-inputs
9508 `(("python-flake8" ,python-flake8)
9509 ("python-flake8-polyfill" ,python-flake8-polyfill)))
9510 (home-page "https://github.com/PyCQA/pep8-naming")
9511 (synopsis "Check PEP-8 naming conventions")
9512 (description
9513 "This package provides the @code{pep8-naming} Python module, a
9514 plugin for flake8 to check PEP-8 naming conventions.")
9515 (license license:expat)))
9516
9517 (define-public python-pep517
9518 (package
9519 (inherit python-pep517-bootstrap)
9520 (name "python-pep517")
9521 (arguments
9522 '(#:phases
9523 (modify-phases %standard-phases
9524 (replace 'check
9525 (lambda* (#:key tests? #:allow-other-keys)
9526 (delete-file "pytest.ini")
9527 ;; This test tries to connect to the internet
9528 (delete-file "tests/test_meta.py")
9529 (if tests?
9530 (invoke "pytest")
9531 #t))))))
9532 (native-inputs
9533 `(("python-mock" ,python-mock)
9534 ("python-pytest" ,python-pytest)
9535 ("python-testpath" ,python-testpath)))
9536 (properties `((python2-variant . ,(delay python2-pep517))))))
9537
9538 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9539 (define-public python2-pep517
9540 (let ((base (package-with-python2
9541 (strip-python2-variant python-pep517))))
9542 (package/inherit base
9543 (name "python2-pep517")
9544 (arguments
9545 `(#:tests? #f
9546 ,@(package-arguments base)))
9547 (native-inputs `()))))
9548
9549 (define-public python-pyflakes
9550 (package
9551 (name "python-pyflakes")
9552 (version "2.3.1")
9553 (source
9554 (origin
9555 (method url-fetch)
9556 (uri (pypi-uri "pyflakes" version))
9557 (sha256
9558 (base32
9559 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9560 (build-system python-build-system)
9561 (home-page
9562 "https://github.com/pyflakes/pyflakes")
9563 (synopsis "Passive checker of Python programs")
9564 (description
9565 "Pyflakes statically checks Python source code for common errors.")
9566 (license license:expat)))
9567
9568 (define-public python2-pyflakes
9569 (package-with-python2 python-pyflakes))
9570
9571 (define-public python-pyflakes-2.2
9572 (package
9573 (inherit python-pyflakes)
9574 (version "2.2.0")
9575 (source (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "pyflakes" version))
9578 (sha256
9579 (base32
9580 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9581
9582 (define-public python-mccabe
9583 (package
9584 (name "python-mccabe")
9585 (version "0.6.1")
9586 (source
9587 (origin
9588 (method url-fetch)
9589 (uri (pypi-uri "mccabe" version))
9590 (sha256
9591 (base32
9592 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9593 (build-system python-build-system)
9594 (native-inputs
9595 `(("python-pytest" ,python-pytest-bootstrap)
9596 ("python-pytest-runner" ,python-pytest-runner)))
9597 (home-page "https://github.com/flintwork/mccabe")
9598 (synopsis "McCabe checker, plugin for flake8")
9599 (description
9600 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
9601 complexity of Python source code.")
9602 (license license:expat)))
9603
9604 (define-public python2-mccabe
9605 (package-with-python2 python-mccabe))
9606
9607 (define-public python-flake8
9608 (package
9609 (name "python-flake8")
9610 (version "3.9.1")
9611 (source (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "flake8" version))
9614 (sha256
9615 (base32
9616 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9617 (build-system python-build-system)
9618 (arguments
9619 `(#:phases
9620 (modify-phases %standard-phases
9621 (replace 'check
9622 (lambda* (#:key inputs outputs #:allow-other-keys)
9623 (add-installed-pythonpath inputs outputs)
9624 (invoke "pytest" "-v"))))))
9625 (propagated-inputs
9626 `(("python-pycodestyle" ,python-pycodestyle)
9627 ("python-entrypoints" ,python-entrypoints)
9628 ("python-pyflakes" ,python-pyflakes)
9629 ("python-mccabe" ,python-mccabe)))
9630 (native-inputs
9631 `(("python-mock" ,python-mock)
9632 ("python-pytest" ,python-pytest)))
9633 (home-page "https://gitlab.com/pycqa/flake8")
9634 (synopsis
9635 "The modular source code checker: pep8, pyflakes and co")
9636 (description
9637 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9638 (properties `((python2-variant . ,(delay python2-flake8))))
9639 (license license:expat)))
9640
9641 (define-public python2-flake8
9642 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9643 (package/inherit base
9644 (propagated-inputs
9645 `(("python2-configparser" ,python2-configparser)
9646 ("python2-enum34" ,python2-enum34)
9647 ("python2-functools32" ,python2-functools32)
9648 ("python2-typing" ,python2-typing)
9649 ,@(package-propagated-inputs base))))))
9650
9651 (define-public python-flake8-3.8
9652 (package
9653 (inherit python-flake8)
9654 (version "3.8.4")
9655 (source (origin
9656 (method url-fetch)
9657 (uri (pypi-uri "flake8" version))
9658 (sha256
9659 (base32
9660 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9661 (propagated-inputs
9662 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9663 ("python-entrypoints" ,python-entrypoints)
9664 ("python-pyflakes" ,python-pyflakes-2.2)
9665 ("python-mccabe" ,python-mccabe)))))
9666
9667 (define-public python-flake8-bugbear
9668 (package
9669 (name "python-flake8-bugbear")
9670 (version "20.1.4")
9671 (source
9672 (origin
9673 (method url-fetch)
9674 (uri (pypi-uri "flake8-bugbear" version))
9675 (sha256
9676 (base32
9677 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9678 (build-system python-build-system)
9679 (arguments
9680 '(#:phases
9681 (modify-phases %standard-phases
9682 (add-before 'check 'disable-test
9683 (lambda _
9684 ;; This test fails on slow computers.
9685 (substitute* "tests/test_bugbear.py"
9686 (("def test_does_not_crash_on_any_valid_code")
9687 "def _test_does_not_crash_on_any_valid_code")))))))
9688 (native-inputs
9689 `(("python-hypothesis" ,python-hypothesis)
9690 ("python-hypothesmith" ,python-hypothesmith)))
9691 (propagated-inputs
9692 `(("python-attrs" ,python-attrs)
9693 ("python-flake8" ,python-flake8)))
9694 (home-page "https://github.com/PyCQA/flake8-bugbear")
9695 (synopsis
9696 "Flake8 plugin for finding likely bugs and design problems in your program")
9697 (description
9698 "This package contains a plugin for Flake8 finding likely bugs and
9699 design problems in your program. It contains warnings that don't belong
9700 in pyflakes and pycodestyle.")
9701 (license license:expat)))
9702
9703 (define-public python-flake8-continuation
9704 (package
9705 (name "python-flake8-continuation")
9706 (version "1.0.5")
9707 (source
9708 (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "flake8-continuation" version))
9711 (sha256
9712 (base32
9713 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9714 (build-system python-build-system)
9715 (propagated-inputs
9716 `(("python-flake8" ,python-flake8)
9717 ("python-pycodestyle" ,python-pycodestyle)
9718 ("python-six" ,python-six)))
9719 (home-page "https://github.com/planetlabs/flake8-continuation")
9720 (synopsis "Flake8 Line Continuation Plugin")
9721 (description "A Flake8 plugin that checks for the line continuation
9722 style to be in the preferred method according to PEP-8, specifically:
9723 @quotation
9724 The preferred way of wrapping long lines is by using Python's implied
9725 line continuation inside parentheses, brackets and braces. Long lines
9726 can be broken over multiple lines by wrapping expressions in parentheses.
9727 These should be used in preference to using a backslash for line continuation.
9728 @end quotation")
9729 (license license:asl2.0)))
9730
9731 (define-public python-flake8-implicit-str-concat
9732 (package
9733 (name "python-flake8-implicit-str-concat")
9734 (version "0.2.0")
9735 (source
9736 (origin
9737 (method url-fetch)
9738 (uri (pypi-uri "flake8_implicit_str_concat" version))
9739 (sha256
9740 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9741 (build-system python-build-system)
9742 (propagated-inputs
9743 `(("python-attrs" ,python-attrs)
9744 ("python-more-itertools" ,python-more-itertools)))
9745 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9746 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9747 (description
9748 "This is a plugin for the Python code checking tool Flake8 to encourage
9749 correct string literal concatenation.
9750
9751 It looks for style problems like implicitly concatenated string literals on
9752 the same line (which can be introduced by the code formatting tool Black), or
9753 unnecessary plus operators for explicit string literal concatenation.")
9754 (license license:expat)))
9755
9756 (define-public python-flake8-polyfill
9757 (package
9758 (name "python-flake8-polyfill")
9759 (version "1.0.2")
9760 (source
9761 (origin
9762 (method url-fetch)
9763 (uri (pypi-uri "flake8-polyfill" version))
9764 (sha256
9765 (base32
9766 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9767 (build-system python-build-system)
9768 (arguments
9769 '(#:phases
9770 (modify-phases %standard-phases
9771 (replace 'check
9772 (lambda _
9773 ;; Be compatible with Pytest 4:
9774 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9775 (substitute* "setup.cfg"
9776 (("\\[pytest\\]")
9777 "[tool:pytest]"))
9778
9779 (setenv "PYTHONPATH"
9780 (string-append (getcwd) "/build/lib:"
9781 (getenv "PYTHONPATH")))
9782 (invoke "py.test" "-v"))))))
9783 (native-inputs
9784 `(("python-flake8" ,python-flake8)
9785 ("python-mock" ,python-mock)
9786 ("python-pep8" ,python-pep8)
9787 ("python-pycodestyle" ,python-pycodestyle)
9788 ("python-pytest" ,python-pytest)))
9789 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9790 (synopsis "Polyfill package for Flake8 plugins")
9791 (description
9792 "This package that provides some compatibility helpers for Flake8
9793 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
9794 (license license:expat)))
9795
9796 (define-public python2-flake8-polyfill
9797 (package-with-python2 python-flake8-polyfill))
9798
9799 (define-public python-flake8-print
9800 (package
9801 (name "python-flake8-print")
9802 (version "4.0.0")
9803 (source
9804 (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "flake8-print" version))
9807 (sha256
9808 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
9809 (build-system python-build-system)
9810 (propagated-inputs
9811 `(("python-flake8" ,python-flake8)
9812 ("python-pycodestyle" ,python-pycodestyle)
9813 ("python-six" ,python-six)))
9814 (home-page "https://github.com/jbkahn/flake8-print")
9815 (synopsis "Print statement checker plugin for Flake8")
9816 (description
9817 "This plugin for Flake8 checks for @code{print} statements in Python
9818 files.")
9819 (license license:expat)))
9820
9821 (define-public python-flake8-pyi
9822 (package
9823 (name "python-flake8-pyi")
9824 (version "20.5.0")
9825 (source
9826 (origin
9827 (method url-fetch)
9828 (uri (pypi-uri "flake8-pyi" version))
9829 (sha256
9830 (base32
9831 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
9832 (build-system python-build-system)
9833 (propagated-inputs
9834 `(("python-attrs" ,python-attrs)
9835 ("python-flake8" ,python-flake8)
9836 ("python-pyflakes" ,python-pyflakes)))
9837 (home-page "https://github.com/ambv/flake8-pyi")
9838 (synopsis
9839 "Flake8 plugin that provides specializations for type hinting stub files")
9840 (description
9841 "This package contains a plugin that provides specializations for
9842 type hinting stub files, especially interesting for linting typeshed. It
9843 adds the @file{.pyi} extension to the default value of the @code{--filename}
9844 command-line argument to Flake8. This means stubs are linted by default with
9845 this plugin enabled, without needing to explicitly list every file. It
9846 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9847 expressions after the entire file has been read. This enables support for
9848 first-class forward references that stub files use.")
9849 (license license:expat)))
9850
9851 (define-public python-flake8-pie
9852 (package
9853 (name "python-flake8-pie")
9854 (version "0.5.0")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "flake8-pie" version))
9859 (sha256
9860 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9861 (build-system python-build-system)
9862 (home-page "https://github.com/sbdchd/flake8-pie")
9863 (synopsis "Flake8 extension that implements lints")
9864 (description
9865 "This package provides a flake8 extension that implements miscellaneous
9866 lints.")
9867 (license license:bsd-2)))
9868
9869 (define-public python-flake8-quotes
9870 (package
9871 (name "python-flake8-quotes")
9872 (version "3.2.0")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "flake8-quotes" version))
9877 (sha256
9878 (base32
9879 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9880 (build-system python-build-system)
9881 (propagated-inputs
9882 `(("python-flake8" ,python-flake8)))
9883 (home-page "https://github.com/zheller/flake8-quotes/")
9884 (synopsis "Flake8 lint for quotes")
9885 (description "This package provides a Flake8 lint for quotes.")
9886 (license license:expat)))
9887
9888 (define-public python-flake8-todo
9889 (package
9890 (name "python-flake8-todo")
9891 (version "0.7")
9892 (source
9893 (origin
9894 (method url-fetch)
9895 (uri (pypi-uri "flake8-todo" version))
9896 (sha256
9897 (base32
9898 "05arm0sch3r8248035kilmf01z0mxsahw6vpbbz0d343zy8m8k3f"))))
9899 (build-system python-build-system)
9900 (propagated-inputs
9901 `(("python-pycodestyle" ,python-pycodestyle)))
9902 (home-page "https://github.com/schlamar/flake8-todo")
9903 (synopsis "TODO notes checker, plugin for flake8")
9904 (description
9905 "This package provides the @code{flake8-todo} Python module, a
9906 TODO notes checker plugin for flake8.")
9907 (license license:expat)))
9908
9909 (define-public python-autoflake
9910 (package
9911 (name "python-autoflake")
9912 (version "1.3.1")
9913 (source
9914 (origin
9915 (method url-fetch)
9916 (uri (pypi-uri "autoflake" version))
9917 (sha256
9918 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9919 (build-system python-build-system)
9920 (propagated-inputs
9921 `(("python-pyflakes" ,python-pyflakes)))
9922 (home-page "https://github.com/myint/autoflake")
9923 (synopsis "Removes unused imports and unused variables")
9924 (description
9925 "@code{autoflake} removes unused imports and unused variables from Python
9926 code as reported by @code{pyflakes}.
9927
9928 By default, it only removes unused imports for modules that are part of the
9929 standard library. Removal of unused variables is also disabled by default.
9930 It also removes useless @code{pass} statements.")
9931 (license license:expat)))
9932
9933 (define-public python-mistune
9934 (package
9935 (name "python-mistune")
9936 (version "0.8.4")
9937 (source
9938 (origin
9939 (method url-fetch)
9940 (uri (pypi-uri "mistune" version))
9941 (sha256
9942 (base32
9943 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9944 (build-system python-build-system)
9945 (native-inputs
9946 `(("python-nose" ,python-nose)
9947 ("python-cython" ,python-cython)))
9948 (home-page "https://github.com/lepture/mistune")
9949 (synopsis "Markdown parser in pure Python")
9950 (description "This package provides a fast markdown parser in pure
9951 Python.")
9952 (license license:bsd-3)))
9953
9954 (define-public python2-mistune
9955 (package-with-python2 python-mistune))
9956
9957 (define-public python-markdown
9958 (package
9959 (name "python-markdown")
9960 (version "3.3.4")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "Markdown" version))
9965 (sha256
9966 (base32
9967 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9968 (build-system python-build-system)
9969 (native-inputs
9970 `(("python-nose" ,python-nose)
9971 ("python-pyyaml" ,python-pyyaml)))
9972 (home-page "https://python-markdown.github.io/")
9973 (synopsis "Python implementation of Markdown")
9974 (description
9975 "This package provides a Python implementation of John Gruber's
9976 Markdown. The library features international input, various Markdown
9977 extensions, and several HTML output formats. A command line wrapper
9978 markdown_py is also provided to convert Markdown files to HTML.")
9979 (properties `((python2-variant . ,(delay python2-markdown))))
9980 (license license:bsd-3)))
9981
9982 ;; Markdown 3.2 dropped support for Python 2.
9983 (define-public python2-markdown
9984 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9985 (package
9986 (inherit base)
9987 (version "3.1.1")
9988 (source (origin
9989 (method url-fetch)
9990 (uri (pypi-uri "Markdown" version))
9991 (sha256
9992 (base32
9993 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9994
9995 (define-public python-ptyprocess
9996 (package
9997 (name "python-ptyprocess")
9998 (version "0.5.2")
9999 (source
10000 (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "ptyprocess" version))
10003 (sha256
10004 (base32
10005 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
10006 (build-system python-build-system)
10007 (native-inputs
10008 `(("python-nose" ,python-nose)))
10009 (arguments
10010 `(#:phases
10011 (modify-phases %standard-phases
10012 (replace 'check
10013 (lambda _ (invoke "nosetests"))))))
10014 (home-page "https://github.com/pexpect/ptyprocess")
10015 (synopsis "Run a subprocess in a pseudo terminal")
10016 (description
10017 "This package provides a Python library used to launch a subprocess in a
10018 pseudo terminal (pty), and interact with both the process and its pty.")
10019 (license license:isc)))
10020
10021 (define-public python2-ptyprocess
10022 (package-with-python2 python-ptyprocess))
10023
10024 (define-public python-cram
10025 (package
10026 (name "python-cram")
10027 (version "0.7")
10028 (home-page "https://bitheap.org/cram/")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (list (string-append home-page "cram-"
10032 version ".tar.gz")
10033 (pypi-uri "cram" version)))
10034 (sha256
10035 (base32
10036 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
10037 (arguments
10038 '(#:phases
10039 (modify-phases %standard-phases
10040 (add-after 'unpack 'patch-source
10041 (lambda _
10042 (substitute* (find-files "cram" ".*\\.py$")
10043 ;; Replace default shell path.
10044 (("/bin/sh") (which "sh")))
10045 (substitute* (find-files "tests" ".*\\.t$")
10046 (("md5") "md5sum")
10047 (("/bin/bash") (which "bash"))
10048 (("/bin/sh") (which "sh")))
10049 (substitute* "cram/_test.py"
10050 ;; This hack works around a bug triggered by substituting
10051 ;; the /bin/sh paths. "tests/usage.t" compares the output of
10052 ;; "cram -h", which breaks the output at 80 characters. This
10053 ;; causes the line showing the default shell to break into two
10054 ;; lines, but the test expects a single line...
10055 (("env\\['COLUMNS'\\] = '80'")
10056 "env['COLUMNS'] = '160'"))
10057
10058 (substitute* "Makefile"
10059 ;; Recent versions of python-coverage have caused the test
10060 ;; coverage to decrease (as of version 0.7). Allow that.
10061 (("--fail-under=100")
10062 "--fail-under=90"))
10063
10064 #t))
10065 (replace 'check
10066 ;; The test phase uses the built library and executable.
10067 (lambda* (#:key inputs outputs #:allow-other-keys)
10068 (add-installed-pythonpath inputs outputs)
10069 (setenv "PATH" (string-append (getenv "PATH") ":"
10070 (assoc-ref outputs "out") "/bin"))
10071 (invoke "make" "test"))))))
10072 (build-system python-build-system)
10073 (native-inputs
10074 `(("python-coverage" ,python-coverage)
10075 ("which" ,which)))
10076 (synopsis "Simple testing framework for command line applications")
10077 (description
10078 "Cram is a functional testing framework for command line applications.
10079 Cram tests look like snippets of interactive shell sessions. Cram runs each
10080 command and compares the command output in the test with the command’s actual
10081 output.")
10082 (license license:gpl2+)))
10083
10084 (define-public python2-cram
10085 (package-with-python2 python-cram))
10086
10087 (define-public python-crashtest
10088 (package
10089 (name "python-crashtest")
10090 (version "0.3.1")
10091 (source
10092 (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "crashtest" version))
10095 (sha256
10096 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
10097 (build-system python-build-system)
10098 (home-page "https://github.com/sdispater/crashtest")
10099 (synopsis "Manage Python errors with ease")
10100 (description
10101 "Python library that makes exceptions handling and inspection easier.")
10102 (license license:expat)))
10103
10104 (define-public python-stdlib-list
10105 (package
10106 (name "python-stdlib-list")
10107 (version "0.8.0")
10108 (source (origin
10109 (method url-fetch)
10110 (uri (pypi-uri "stdlib-list" version))
10111 (sha256
10112 (base32
10113 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
10114 (build-system python-build-system)
10115 (arguments
10116 `(#:tests? #f)) ; Tests require more dependencies.
10117 (native-inputs
10118 `(("python-sphinx" ,python-sphinx)))
10119 (home-page "https://github.com/jackmaney/python-stdlib-list")
10120 (synopsis "Python Standard Libraries")
10121 (description "This package contains a list of Python Standard Libraries.")
10122 (license license:expat)))
10123
10124 (define-public python-straight-plugin
10125 (package
10126 (name "python-straight-plugin")
10127 (version "1.4.1")
10128 (source
10129 (origin
10130 (method url-fetch)
10131 (uri (pypi-uri "straight.plugin" version))
10132 (sha256
10133 (base32
10134 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
10135 (build-system python-build-system)
10136 (home-page "https://github.com/ironfroggy/straight.plugin")
10137 (synopsis "Simple namespaced plugin facility")
10138 (description "Straight Plugin provides a type of plugin you can create from
10139 almost any existing Python modules, and an easy way for outside developers to
10140 add functionality and customization to your projects with their own plugins.")
10141 (license license:expat)))
10142
10143 (define-public python2-straight-plugin
10144 (package-with-python2 python-straight-plugin))
10145
10146 (define-public python-fonttools
10147 (package
10148 (name "python-fonttools")
10149 (version "4.6.0")
10150 (source (origin
10151 (method url-fetch)
10152 (uri (pypi-uri "fonttools" version ".zip"))
10153 (sha256
10154 (base32
10155 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
10156 (build-system python-build-system)
10157 (native-inputs
10158 `(("unzip" ,unzip)
10159 ("python-pytest" ,python-pytest)
10160 ("python-pytest-runner" ,python-pytest-runner)))
10161 (home-page "https://github.com/fonttools/fonttools")
10162 (synopsis "Tools to manipulate font files")
10163 (description
10164 "FontTools/TTX is a library to manipulate font files from Python. It
10165 supports reading and writing of TrueType/OpenType fonts, reading and writing
10166 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
10167 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
10168 from an XML-based format.")
10169 (license license:expat)))
10170
10171 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
10172 (define-public python2-fonttools
10173 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
10174 (package
10175 (inherit base)
10176 (version "3.44.0")
10177 (source (origin
10178 (method url-fetch)
10179 (uri (pypi-uri "fonttools" version ".zip"))
10180 (sha256
10181 (base32
10182 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
10183
10184 (define-public python-ly
10185 (package
10186 (name "python-ly")
10187 (version "0.9.5")
10188 (source
10189 (origin
10190 (method url-fetch)
10191 (uri (pypi-uri name version))
10192 (sha256
10193 (base32
10194 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
10195 (build-system python-build-system)
10196 (arguments
10197 ;; FIXME: Some tests need network access.
10198 '(#:tests? #f))
10199 (synopsis "Tool and library for manipulating LilyPond files")
10200 (description "This package provides a Python library to parse, manipulate
10201 or create documents in LilyPond format. A command line program ly is also
10202 provided that can be used to do various manipulations with LilyPond files.")
10203 (home-page "https://pypi.org/project/python-ly/")
10204 (license license:gpl2+)))
10205
10206 (define-public python-appdirs
10207 (package
10208 (name "python-appdirs")
10209 (version "1.4.3")
10210 (source
10211 (origin
10212 (method url-fetch)
10213 (uri (pypi-uri "appdirs" version))
10214 (sha256
10215 (base32
10216 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
10217 (build-system python-build-system)
10218 (home-page "https://github.com/ActiveState/appdirs")
10219 (synopsis
10220 "Determine platform-specific dirs, e.g. a \"user data dir\"")
10221 (description
10222 "This module provides a portable way of finding out where user data
10223 should be stored on various operating systems.")
10224 (license license:expat)))
10225
10226 (define-public python2-appdirs
10227 (package-with-python2 python-appdirs))
10228
10229 (define-public python-gorilla
10230 (package
10231 (name "python-gorilla")
10232 (version "0.3.0")
10233 (source (origin
10234 (method url-fetch)
10235 (uri (pypi-uri "gorilla" version))
10236 (sha256
10237 (base32
10238 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
10239 (build-system python-build-system)
10240 (home-page "https://github.com/christophercrouzet/gorilla")
10241 (synopsis "Convenient monkey patching with Python")
10242 (description
10243 "Gorilla is a Python library that provides a convenient approach to
10244 monkey patching. Monkey patching is the process of modifying module and
10245 class attributes at runtime with the purpose of replacing or extending
10246 third-party code.")
10247 (license license:expat)))
10248
10249 (define-public python-llfuse
10250 (package
10251 (name "python-llfuse")
10252 (version "1.3.8")
10253 (source (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "llfuse" version))
10256 (sha256
10257 (base32
10258 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
10259 (build-system python-build-system)
10260 (inputs
10261 `(("fuse" ,fuse)
10262 ("attr" ,attr)))
10263 (native-inputs
10264 `(("pkg-config" ,pkg-config)))
10265 (synopsis "Python bindings for FUSE")
10266 (description
10267 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
10268 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
10269 (license license:lgpl2.0+)
10270 (properties `((python2-variant . ,(delay python2-llfuse))))))
10271
10272 (define-public python2-llfuse
10273 (let ((base (package-with-python2
10274 (strip-python2-variant python-llfuse))))
10275 (package/inherit base
10276 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
10277
10278 (define-public python-msgpack
10279 (package
10280 (name "python-msgpack")
10281 (version "1.0.0")
10282 (source (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "msgpack" version))
10285 (sha256
10286 (base32
10287 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
10288 (build-system python-build-system)
10289 (arguments
10290 `(#:modules ((guix build utils)
10291 (guix build python-build-system)
10292 (ice-9 ftw)
10293 (srfi srfi-1)
10294 (srfi srfi-26))
10295 #:phases
10296 (modify-phases %standard-phases
10297 (replace 'check
10298 (lambda _
10299 (let ((cwd (getcwd)))
10300 (setenv "PYTHONPATH"
10301 (string-append cwd "/build/"
10302 (find (cut string-prefix? "lib" <>)
10303 (scandir (string-append cwd "/build")))
10304 ":"
10305 (getenv "PYTHONPATH")))
10306 (invoke "pytest" "-v" "test")))))))
10307 (native-inputs
10308 `(("python-pytest" ,python-pytest)))
10309 (synopsis "MessagePack (de)serializer")
10310 (description "MessagePack is a fast, compact binary serialization format,
10311 suitable for similar data to JSON. This package provides CPython bindings for
10312 reading and writing MessagePack data.")
10313 (home-page "https://pypi.org/project/msgpack/")
10314 (license license:asl2.0)))
10315
10316 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
10317 ;; release 0.5. Some packages like borg still call it by the old name for now.
10318 ;; <https://bugs.gnu.org/30662>
10319 (define-public python-msgpack-transitional
10320 (package
10321 (inherit python-msgpack)
10322 (name "python-msgpack-transitional")
10323 (version "0.5.6")
10324 (source (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "msgpack" version))
10327 (sha256
10328 (base32
10329 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
10330 (arguments
10331 (substitute-keyword-arguments (package-arguments python-msgpack)
10332 ((#:phases phases)
10333 `(modify-phases ,phases
10334 (add-after 'unpack 'configure-transitional
10335 (lambda _
10336 ;; Keep using the old name.
10337 (substitute* "setup.py"
10338 (("TRANSITIONAL = False")
10339 "TRANSITIONAL = 1"))
10340 #t))))))))
10341
10342 (define-public python2-msgpack
10343 (package-with-python2 python-msgpack))
10344
10345 (define-public python-netaddr
10346 (package
10347 (name "python-netaddr")
10348 (version "0.8.0")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "netaddr" version))
10353 (sha256
10354 (base32
10355 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
10356 (build-system python-build-system)
10357 (arguments `(#:tests? #f)) ;; No tests.
10358 (home-page "https://github.com/drkjam/netaddr/")
10359 (synopsis "Pythonic manipulation of network addresses")
10360 (description
10361 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
10362 and MAC network addresses.")
10363 (license license:bsd-3)))
10364
10365 (define-public python2-netaddr
10366 (package-with-python2 python-netaddr))
10367
10368 (define-public python2-pyroute2
10369 (package
10370 (name "python2-pyroute2")
10371 (version "0.5.6")
10372 (source
10373 (origin
10374 (method url-fetch)
10375 (uri (pypi-uri "pyroute2" version))
10376 (sha256
10377 (base32
10378 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10379 (build-system python-build-system)
10380 (arguments
10381 `(#:python ,python-2)) ;Python 3.x is not supported
10382 (home-page "https://github.com/svinota/pyroute2")
10383 (synopsis "Python netlink library")
10384 (description
10385 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10386 Supported netlink families and protocols include:
10387 @itemize
10388 @item rtnl, network settings - addresses, routes, traffic controls
10389 @item nfnetlink - netfilter API: ipset, nftables, ...
10390 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10391 @item devlink - manage and monitor devlink-enabled hardware
10392 @item generic - generic netlink families
10393 @itemize
10394 @item nl80211 - wireless functions API (basic support)
10395 @item taskstats - extended process statistics
10396 @item acpi_events - ACPI events monitoring
10397 @item thermal_events - thermal events monitoring
10398 @item VFS_DQUOT - disk quota events monitoring
10399 @end itemize
10400 @end itemize")
10401 (license license:gpl2+)))
10402
10403 (define-public python-wrapt
10404 (package
10405 (name "python-wrapt")
10406 (version "1.11.2")
10407 (source
10408 (origin
10409 (method url-fetch)
10410 (uri (pypi-uri "wrapt" version))
10411 (sha256
10412 (base32
10413 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10414 (build-system python-build-system)
10415 (arguments
10416 ;; Tests are not included in the tarball, they are only available in the
10417 ;; git repository.
10418 `(#:tests? #f))
10419 (home-page "https://github.com/GrahamDumpleton/wrapt")
10420 (synopsis "Module for decorators, wrappers and monkey patching")
10421 (description
10422 "The aim of the wrapt module is to provide a transparent object proxy for
10423 Python, which can be used as the basis for the construction of function
10424 wrappers and decorator functions.")
10425 (license license:bsd-2)))
10426
10427 (define-public python2-wrapt
10428 (package-with-python2 python-wrapt))
10429
10430 (define-public python-commentjson
10431 (package
10432 (name "python-commentjson")
10433 (version "0.9.0")
10434 (source (origin
10435 ;; The PyPI release is missing some test files.
10436 (method git-fetch)
10437 (uri (git-reference
10438 (url "https://github.com/vaidik/commentjson")
10439 (commit (string-append "v" version))))
10440 (file-name (git-file-name name version))
10441 (sha256
10442 (base32
10443 "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
10444 (build-system python-build-system)
10445 (arguments
10446 `(#:modules ((guix build python-build-system)
10447 (guix build utils)
10448 (ice-9 ftw)
10449 (ice-9 textual-ports))
10450 #:phases
10451 (modify-phases %standard-phases
10452 (add-after 'unpack 'relax-requirements
10453 (lambda _
10454 (substitute* "setup.py"
10455 (("lark-parser>=0.7.1,<0.8.0")
10456 "lark-parser>=0.7.1"))))
10457 (add-after 'unpack 'delete-unspported-tests
10458 ;; Some tests rely on the 'test' module of Python itself,
10459 ;; which is not available with the Python package in Guix;
10460 ;; remove them.
10461 (lambda _
10462 ;; XXX: Copied from (guix build dub-build-system).
10463 (define (grep string file-name)
10464 (string-contains (call-with-input-file file-name get-string-all)
10465 string))
10466
10467 (with-directory-excursion "commentjson/tests/test_json"
10468 (let* ((dot? (lambda (x) (member x '("." ".."))))
10469 (test-files (scandir "." (negate dot?))))
10470 (for-each delete-file
10471 (filter (lambda (f) (grep "from test." f))
10472 test-files)))))))))
10473 (propagated-inputs
10474 `(("python-lark-parser" ,python-lark-parser)))
10475 (native-inputs
10476 `(("python-six" ,python-six)))
10477 (home-page "https://github.com/vaidik/commentjson")
10478 (synopsis "Python library for adding comments to JSON files")
10479 (description "Comment JSON is a Python package that helps you create JSON
10480 files with Python and JavaScript style inline comments. Its API is very
10481 similar to the Python standard library's @code{json} module.")
10482 (license license:expat)))
10483
10484 (define-public python-resolvelib
10485 (package
10486 (name "python-resolvelib")
10487 (version "0.7.1")
10488 (source
10489 (origin
10490 ;; Tests are missing from the PyPI release.
10491 (method git-fetch)
10492 (uri (git-reference
10493 (url "https://github.com/sarugaku/resolvelib")
10494 (commit version)))
10495 (file-name (git-file-name name version))
10496 (sha256
10497 (base32
10498 "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
10499 (build-system python-build-system)
10500 (arguments
10501 `(#:phases
10502 (modify-phases %standard-phases
10503 (replace 'check
10504 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10505 (when tests?
10506 (add-installed-pythonpath inputs outputs)
10507 (invoke "pytest")))))))
10508 (native-inputs
10509 `(("python-commentjson" ,python-commentjson)
10510 ("python-packaging" ,python-packaging)
10511 ("python-pytest" ,python-pytest)))
10512 (home-page "https://github.com/sarugaku/resolvelib")
10513 (synopsis "Abstract dependencies resolver")
10514 (description "The ResolveLib library provides a @code{Resolver} class that
10515 includes dependency resolution logic.")
10516 (license license:isc)))
10517
10518 ;;; This older version is required by ansible-core.
10519 (define-public python-resolvelib-0.5
10520 (package/inherit python-resolvelib
10521 (name "python-resolvelib")
10522 (version "0.5.4")
10523 (source
10524 (origin
10525 (method git-fetch)
10526 (uri (git-reference
10527 (url "https://github.com/sarugaku/resolvelib")
10528 (commit version)))
10529 (file-name (git-file-name name version))
10530 (sha256
10531 (base32
10532 "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
10533
10534 (define-public python-commonmark
10535 (package
10536 (name "python-commonmark")
10537 (version "0.9.1")
10538 (source
10539 (origin
10540 (method url-fetch)
10541 (uri (pypi-uri "commonmark" version))
10542 (sha256
10543 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10544 (build-system python-build-system)
10545 (arguments
10546 `(#:phases
10547 (modify-phases %standard-phases
10548 (replace 'check
10549 (lambda* (#:key inputs outputs #:allow-other-keys)
10550 (add-installed-pythonpath inputs outputs)
10551 (invoke "python" "setup.py" "test"))))))
10552 (home-page "https://github.com/readthedocs/commonmark.py")
10553 (synopsis "Python parser for the CommonMark Markdown spec")
10554 (description
10555 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10556 Markdown parser and renderer for the CommonMark specification, using only
10557 native modules.")
10558 (license license:bsd-3)))
10559
10560 (define-public python-xlrd
10561 (package
10562 (name "python-xlrd")
10563 (version "1.2.0")
10564 (source (origin
10565 (method url-fetch)
10566 (uri (pypi-uri "xlrd" version))
10567 (sha256
10568 (base32
10569 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10570 (build-system python-build-system)
10571 (arguments
10572 `(#:phases
10573 (modify-phases %standard-phases
10574 ;; Some tests depend on writing a temporary file to the user's home
10575 ;; directory.
10576 (add-after 'unpack 'fix-tests
10577 (lambda _
10578 (delete-file "tests/test_open_workbook.py")
10579 #t)))))
10580 (home-page "http://www.python-excel.org/")
10581 (synopsis "Library for extracting data from Excel files")
10582 (description "This package provides a library to extract data from
10583 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10584 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10585 Unicode-aware. It is not intended as an end-user tool.")
10586 (license license:bsd-3)))
10587
10588 (define-public python2-xlrd
10589 (package-with-python2 python-xlrd))
10590
10591 (define-public python-xlwt
10592 (package
10593 (name "python-xlwt")
10594 (version "1.3.0")
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "xlwt" version))
10599 (sha256
10600 (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
10601 (build-system python-build-system)
10602 (arguments
10603 `(#:phases
10604 (modify-phases %standard-phases
10605 (replace 'check
10606 (lambda* (#:key tests? #:allow-other-keys)
10607 (when tests?
10608 (setenv "PYTHONPATH"
10609 (string-append (getcwd) "/build/lib:"
10610 (getenv "PYTHONPATH")))
10611 (invoke "nosetests" "-v")))))))
10612 (native-inputs
10613 `(("nose" ,python-nose)))
10614 (home-page "http://www.python-excel.org/")
10615 (synopsis "Library for creating spreadsheet Excel files")
10616 (description "@code{xlwt} is a library for writing data and formatting
10617 information to older Excel files (i.e. .xls). The package itself is pure
10618 Python with no dependencies on modules or packages outside the standard Python
10619 distribution. It is not intended as an end-user tool.")
10620 (license license:bsd-3)))
10621
10622 (define-public python-immutables
10623 (package
10624 (name "python-immutables")
10625 (version "0.14")
10626 (source
10627 (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "immutables" version))
10630 (sha256
10631 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10632 (build-system python-build-system)
10633 (home-page "https://github.com/MagicStack/immutables")
10634 (synopsis "High-performance immutable mapping type for Python")
10635 (description
10636 "An immutable mapping type for Python. The underlying datastructure is a
10637 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10638 functional languages.")
10639 (license license:asl2.0)))
10640
10641 (define-public python-prettytable
10642 (package
10643 (name "python-prettytable")
10644 (version "0.7.2")
10645 (source
10646 (origin
10647 (method url-fetch)
10648 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10649 (sha256
10650 (base32
10651 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10652 (build-system python-build-system)
10653 (home-page "https://code.google.com/archive/p/prettytable/")
10654 (synopsis "Display tabular data in an ASCII table format")
10655 (description
10656 "A library designed to represent tabular data in visually appealing ASCII
10657 tables. PrettyTable allows for selection of which columns are to be printed,
10658 independent alignment of columns (left or right justified or centred) and
10659 printing of sub-tables by specifying a row range.")
10660 (license license:bsd-3)))
10661
10662 (define-public python2-prettytable
10663 (package-with-python2 python-prettytable))
10664
10665 (define-public python-curio
10666 (package
10667 (name "python-curio")
10668 (version "1.2")
10669 (source
10670 (origin
10671 (method url-fetch)
10672 (uri (pypi-uri "curio" version))
10673 (sha256
10674 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
10675 (build-system python-build-system)
10676 (arguments
10677 `(#:phases
10678 (modify-phases %standard-phases
10679 (replace 'check
10680 (lambda* (#:key inputs outputs #:allow-other-keys)
10681 (add-installed-pythonpath inputs outputs)
10682 (invoke "pytest" "-vv" "-k"
10683 ;; Tries to open an outgoing connection.
10684 "not test_ssl_outgoing"))))))
10685 (native-inputs
10686 `(("python-pytest" ,python-pytest)))
10687 (home-page "https://github.com/dabeaz/curio")
10688 (synopsis "Coroutine-based library for concurrent Python")
10689 (description
10690 "Curio is a coroutine-based library for concurrent Python systems
10691 programming. It provides standard programming abstractions such as as
10692 tasks, sockets, files, locks, and queues.")
10693 (license license:bsd-3)))
10694
10695 (define-public python-tables
10696 (package
10697 (name "python-tables")
10698 (version "3.6.1")
10699 (source
10700 (origin
10701 (method url-fetch)
10702 (uri (pypi-uri "tables" version))
10703 (sha256
10704 (base32
10705 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10706 (modules '((guix build utils)))
10707 (snippet
10708 '(begin
10709 ;; Remove pre-compiled .pyc files from source.
10710 (for-each delete-file-recursively
10711 (find-files "." "__pycache__" #:directories? #t))
10712 (for-each delete-file (find-files "." "\\.pyc$"))
10713 #t))))
10714 (build-system python-build-system)
10715 (arguments
10716 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10717 ;; or "check", so we must override the build and check phases.
10718 #:phases
10719 (modify-phases %standard-phases
10720 (add-after 'unpack 'use-gcc
10721 (lambda _
10722 (substitute* "setup.py"
10723 (("^( +)compiler = new_compiler\\(\\)" line indent)
10724 (string-append line
10725 "\n"
10726 indent
10727 "compiler.set_executables(compiler='gcc',"
10728 "compiler_so='gcc',"
10729 "linker_exe='gcc',"
10730 "linker_so='gcc -shared')")))
10731 #t))
10732 (add-after 'unpack 'disable-tuning
10733 (lambda _
10734 (substitute* "setup.py"
10735 (("cpu_flags = .*")
10736 "cpu_flags = ['sse2']\n"))
10737 #t))
10738 (replace 'build
10739 (lambda* (#:key inputs #:allow-other-keys)
10740 (invoke "python" "setup.py" "build"
10741 (string-append "--hdf5="
10742 (assoc-ref inputs "hdf5")))))
10743 (replace 'check
10744 (lambda* (#:key inputs #:allow-other-keys)
10745 (invoke "python" "setup.py" "check"
10746 (string-append "--hdf5="
10747 (assoc-ref inputs "hdf5"))))))))
10748 (propagated-inputs
10749 `(("python-numexpr" ,python-numexpr)
10750 ("python-numpy" ,python-numpy)))
10751 (native-inputs
10752 `(("python-cython" ,python-cython)
10753 ("pkg-config" ,pkg-config)))
10754 (inputs
10755 `(("hdf5" ,hdf5-1.10)
10756 ("bzip2" ,bzip2)
10757 ("zlib" ,zlib)))
10758 (home-page "https://www.pytables.org/")
10759 (synopsis "Hierarchical datasets for Python")
10760 (description "PyTables is a package for managing hierarchical datasets and
10761 designed to efficiently cope with extremely large amounts of data.")
10762 (license license:bsd-3)))
10763
10764 (define-public python-sniffio
10765 (package
10766 (name "python-sniffio")
10767 (version "1.2.0")
10768 (source
10769 (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "sniffio" version))
10772 (sha256
10773 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10774 (build-system python-build-system)
10775 (arguments
10776 `(#:phases
10777 (modify-phases %standard-phases
10778 (replace 'check
10779 (lambda _
10780 (invoke "pytest" "-vv"))))))
10781 (native-inputs
10782 `(("python-curio" ,python-curio)
10783 ("python-pytest" ,python-pytest)
10784 ("python-pytest-cov" ,python-pytest-cov)))
10785 (home-page "https://github.com/python-trio/sniffio")
10786 (synopsis "Detect which async library a program is running under")
10787 (description "This package detects which async library a program is
10788 running under. It supports multiple async I/O packages, like Trio, and
10789 asyncio.")
10790 ;; Either license applies.
10791 (license (list license:expat license:asl2.0))))
10792
10793 (define-public python-pytest-black
10794 (package
10795 (name "python-pytest-black")
10796 (version "0.3.8")
10797 (source
10798 (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "pytest-black" version))
10801 (sha256
10802 (base32
10803 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
10804 (build-system python-build-system)
10805 (propagated-inputs
10806 `(("python-pytest" ,python-pytest)
10807 ("python-black" ,python-black)
10808 ("python-toml" ,python-toml)))
10809 (native-inputs
10810 `(("python-setuptools-scm" ,python-setuptools-scm)))
10811 (home-page "https://github.com/shopkeep/pytest-black")
10812 (synopsis "Pytest plugin to enable format checking with black")
10813 (description
10814 "This package provides a pytest plugin to enable format checking with the
10815 Python code formatter \"black\".")
10816 (license license:expat)))
10817
10818 (define-public python-get-version
10819 (package
10820 (name "python-get-version")
10821 (version "2.1")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (pypi-uri "get_version" version))
10826 (sha256
10827 (base32
10828 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
10829 (build-system python-build-system)
10830 (propagated-inputs
10831 `(("python-pygments" ,python-pygments)
10832 ("python-pytest" ,python-pytest)
10833 ("python-pytest-black" ,python-pytest-black)
10834 ("python-pytest-cov" ,python-pytest-cov)
10835 ("python-setuptools" ,python-setuptools)
10836 ("python-testpath" ,python-testpath)))
10837 (home-page "https://github.com/flying-sheep/get_version")
10838 (synopsis "Version helper in the spirit of versioneer")
10839 (description
10840 "This package provides a version helper that lets you automatically use
10841 the latest @code{vX.X.X} Git tag as the version in your Python package. It
10842 also supports getting the version from Python source distributions or, once
10843 your package is installed, via @code{pkg_resources} (part of
10844 @code{setuptools}).")
10845 (license license:gpl3+)))
10846
10847 (define-public python-legacy-api-wrap
10848 (package
10849 (name "python-legacy-api-wrap")
10850 (version "1.2")
10851 (source
10852 (origin
10853 (method url-fetch)
10854 (uri (pypi-uri "legacy-api-wrap" version))
10855 (sha256
10856 (base32
10857 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
10858 (build-system python-build-system)
10859 (propagated-inputs
10860 `(("python-get-version" ,python-get-version)
10861 ("python-pytest" ,python-pytest)
10862 ("python-pytest-black" ,python-pytest-black)
10863 ("python-pytest-cov" ,python-pytest-cov)
10864 ("python-setuptools" ,python-setuptools)))
10865 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
10866 (synopsis "Legacy API wrapper")
10867 (description "This module defines a decorator to wrap legacy APIs. The
10868 primary use case is APIs defined before keyword-only parameters existed.")
10869 (license license:gpl3+)))
10870
10871 (define-public python-langdetect
10872 (package
10873 (name "python-langdetect")
10874 (version "1.0.9")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "langdetect" version))
10879 (sha256
10880 (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
10881 (build-system python-build-system)
10882 (propagated-inputs
10883 `(("python-six" ,python-six)))
10884 (home-page "https://github.com/Mimino666/langdetect")
10885 (synopsis "Language detection library")
10886 (description
10887 "This library is a port of Nakatani Shuyo's language-detection library
10888 (version from 03/03/2014) to Python.")
10889 (license license:expat)))
10890
10891 (define-public python-pyasn1
10892 (package
10893 (name "python-pyasn1")
10894 (version "0.4.8")
10895 (source
10896 (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "pyasn1" version))
10899 (sha256
10900 (base32
10901 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
10902 (build-system python-build-system)
10903 (home-page "http://pyasn1.sourceforge.net/")
10904 (synopsis "ASN.1 types and codecs")
10905 (description
10906 "This is an implementation of ASN.1 types and codecs in Python. It is
10907 suitable for a wide range of protocols based on the ASN.1 specification.")
10908 (license license:bsd-2)))
10909
10910 (define-public python2-pyasn1
10911 (package-with-python2 python-pyasn1))
10912
10913 (define-public python-pyasn1-modules
10914 (package
10915 (name "python-pyasn1-modules")
10916 (version "0.2.2")
10917 (source
10918 (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "pyasn1-modules" version))
10921 (sha256
10922 (base32
10923 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
10924 (build-system python-build-system)
10925 (propagated-inputs
10926 `(("python-pyasn1" ,python-pyasn1)))
10927 (home-page "https://sourceforge.net/projects/pyasn1/")
10928 (synopsis "ASN.1 codec implementations")
10929 (description
10930 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
10931 implementations of ASN.1-based codecs and protocols.")
10932 (license license:bsd-3)))
10933
10934 (define-public python2-pyasn1-modules
10935 (package-with-python2 python-pyasn1-modules))
10936
10937 (define-public python2-ipaddress
10938 (package
10939 (name "python2-ipaddress")
10940 (version "1.0.23")
10941 (source (origin
10942 (method url-fetch)
10943 (uri (pypi-uri "ipaddress" version))
10944 (sha256
10945 (base32
10946 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
10947 (build-system python-build-system)
10948 (arguments
10949 `(#:python ,python-2))
10950 (home-page "https://github.com/phihag/ipaddress")
10951 (synopsis "IP address manipulation library")
10952 (description
10953 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
10954 in Python. This library is used to create, poke at, and manipulate IPv4 and
10955 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
10956 module to older versions of Python.")
10957 (license license:psfl)))
10958
10959 (define-public python-asn1tools
10960 (package
10961 (name "python-asn1tools")
10962 (version "0.158.0")
10963 (source
10964 (origin
10965 (method url-fetch)
10966 (uri (pypi-uri "asn1tools" version))
10967 (sha256
10968 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
10969 (build-system python-build-system)
10970 (propagated-inputs
10971 `(("python-bitstruct" ,python-bitstruct)
10972 ("python-diskcache" ,python-diskcache)
10973 ("python-prompt-toolkit" ,python-prompt-toolkit)
10974 ("python-pyparsing" ,python-pyparsing)))
10975 (home-page "https://github.com/eerimoq/asn1tools")
10976 (synopsis "ASN.1 parsing, encoding and decoding")
10977 (description "This package provides ASN.1 parsing, encoding and decoding
10978 for Python, including constraints checking. It supports several
10979 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
10980 for OER and UPER.")
10981 (license license:expat)))
10982
10983 (define-public python2-ipaddr
10984 (package
10985 (name "python2-ipaddr")
10986 (version "2.1.11")
10987 (source
10988 (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "ipaddr" version))
10991 (sha256
10992 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
10993 (build-system python-build-system)
10994 (arguments
10995 `(#:python ,python-2 ;version 2 only
10996 #:phases
10997 (modify-phases %standard-phases
10998 (replace 'check
10999 (lambda _ (invoke "python" "ipaddr_test.py"))))))
11000 (home-page "https://github.com/google/ipaddr-py")
11001 (synopsis "IP address manipulation library")
11002 (description
11003 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
11004 IPv6 addresses and networks.
11005
11006 For new implementations you may prefer to use the standard module
11007 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
11008 versions of Python.")
11009 (license license:asl2.0)))
11010
11011 (define-public python-idna
11012 (package
11013 (name "python-idna")
11014 (version "2.10")
11015 (source
11016 (origin
11017 (method url-fetch)
11018 (uri (pypi-uri "idna" version))
11019 (sha256
11020 (base32
11021 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
11022 (build-system python-build-system)
11023 (home-page "https://github.com/kjd/idna")
11024 (synopsis "Internationalized domain names in applications")
11025 (description
11026 "This is a library to support the Internationalised Domain Names in
11027 Applications (IDNA) protocol as specified in RFC 5891. This version of the
11028 protocol is often referred to as “IDNA2008” and can produce different results
11029 from the earlier standard from 2003. The library is also intended to act as a
11030 suitable drop-in replacement for the “encodings.idna” module that comes with
11031 the Python standard library but currently only supports the older 2003
11032 specification.")
11033 (license license:bsd-4)))
11034
11035 (define-public python-idna-2.7
11036 (package (inherit python-idna)
11037 (version "2.7")
11038 (source (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "idna" version))
11041 (sha256
11042 (base32
11043 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
11044
11045
11046 (define-public python2-idna
11047 (package-with-python2 python-idna))
11048
11049 (define-public python-libsass
11050 (package
11051 (name "python-libsass")
11052 (version "0.20.1")
11053 (source
11054 (origin
11055 ;; PyPI tarball is missing some test files.
11056 (method git-fetch)
11057 (uri (git-reference
11058 (url "https://github.com/sass/libsass-python")
11059 (commit version)))
11060 (file-name (git-file-name name version))
11061 (sha256
11062 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
11063 (build-system python-build-system)
11064 (arguments
11065 `(#:phases
11066 (modify-phases %standard-phases
11067 ;; Use Guix package of libsass instead of compiling from a checkout.
11068 (add-before 'build 'set-libsass
11069 (lambda _
11070 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
11071 #t))
11072 (replace 'check
11073 (lambda* (#:key inputs outputs #:allow-other-keys)
11074 (add-installed-pythonpath inputs outputs)
11075 (invoke "pytest" "sasstests.py"))))))
11076 (native-inputs
11077 `(("python-pytest" ,python-pytest)
11078 ("python-werkzeug" ,python-werkzeug)))
11079 (inputs
11080 `(("libsass" ,libsass)))
11081 (propagated-inputs
11082 `(("python-six" ,python-six)))
11083 (home-page "https://sass.github.io/libsass-python/")
11084 (synopsis "Straightforward binding of libsass for Python")
11085 (description
11086 "This package provides a simple Python extension module @code{sass} which
11087 is binding LibSass.")
11088 (license license:expat)))
11089
11090 (define-public python-idna-ssl
11091 (package
11092 (name "python-idna-ssl")
11093 (version "1.0.1")
11094 (source
11095 (origin
11096 (method url-fetch)
11097 (uri (pypi-uri "idna-ssl" version))
11098 (sha256
11099 (base32
11100 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
11101 (build-system python-build-system)
11102 (arguments
11103 `(#:tests? #f)) ;circular dependency with python-aiohttp
11104 (home-page "https://github.com/aio-libs/idna-ssl")
11105 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
11106 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
11107 domains support.")
11108 (license license:expat)))
11109
11110 (define-public python-pretend
11111 (package
11112 (name "python-pretend")
11113 (version "1.0.9")
11114 (source
11115 (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "pretend" version))
11118 (sha256
11119 (base32
11120 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
11121 (build-system python-build-system)
11122 (home-page "https://github.com/alex/pretend")
11123 (synopsis "Library for stubbing in Python")
11124 (description
11125 "Pretend is a library to make stubbing with Python easier. Stubbing is a
11126 technique for writing tests. You may hear the term mixed up with mocks,
11127 fakes, or doubles. Basically, a stub is an object that returns pre-canned
11128 responses, rather than doing any computation.")
11129 (license license:bsd-3)))
11130
11131 (define-public python2-pretend
11132 (package-with-python2 python-pretend))
11133
11134 (define-public python-pip
11135 (package
11136 (name "python-pip")
11137 (version "20.2.4")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "pip" version))
11142 (sha256
11143 (base32
11144 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
11145 (build-system python-build-system)
11146 (arguments
11147 '(#:tests? #f)) ; there are no tests in the pypi archive.
11148 (home-page "https://pip.pypa.io/")
11149 (synopsis "Package manager for Python software")
11150 (description
11151 "Pip is a package manager for Python software, that finds packages on the
11152 Python Package Index (PyPI).")
11153 (license license:expat)))
11154
11155 (define-public python2-pip
11156 (package-with-python2 python-pip))
11157
11158 (define-public python-tlsh
11159 (package
11160 (name "python-tlsh")
11161 (version "3.4.5")
11162 (home-page "https://github.com/trendmicro/tlsh")
11163 (source
11164 (origin
11165 (method git-fetch)
11166 (uri (git-reference
11167 (url "https://github.com/trendmicro/tlsh")
11168 (commit (string-append "v" version))))
11169 (file-name (git-file-name name version))
11170 (sha256
11171 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
11172 (build-system cmake-build-system)
11173 (arguments
11174 '(#:out-of-source? #f
11175 #:phases (modify-phases %standard-phases
11176 (replace
11177 'install
11178 (lambda* (#:key outputs #:allow-other-keys)
11179 ;; Build and install the Python bindings. The underlying
11180 ;; C++ library is apparently not meant to be installed.
11181 (let ((out (assoc-ref outputs "out")))
11182 (with-directory-excursion "py_ext"
11183 (and (system* "python" "setup.py" "build")
11184 (system* "python" "setup.py" "install"
11185 (string-append "--prefix=" out))))))))))
11186 (inputs `(("python" ,python-wrapper))) ;for the bindings
11187 (synopsis "Fuzzy matching library for Python")
11188 (description
11189 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
11190 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
11191 value which can be used for similarity comparisons. Similar objects have
11192 similar hash values, which allows for the detection of similar objects by
11193 comparing their hash values. The byte stream should have a sufficient amount
11194 of complexity; for example, a byte stream of identical bytes will not generate
11195 a hash value.")
11196 (license license:asl2.0)))
11197
11198 (define-public python2-tlsh
11199 (package/inherit python-tlsh
11200 (name "python2-tlsh")
11201 (inputs `(("python" ,python-2)))))
11202
11203 (define-public python-termcolor
11204 (package
11205 (name "python-termcolor")
11206 (version "1.1.0")
11207 (source
11208 (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "termcolor" version))
11211 (sha256
11212 (base32
11213 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
11214 (build-system python-build-system)
11215 (arguments
11216 ;; There are no tests.
11217 `(#:tests? #f))
11218 (home-page "https://pypi.org/project/termcolor/")
11219 (synopsis "ANSII Color formatting for terminal output")
11220 (description
11221 "This package provides ANSII Color formatting for output in terminals.")
11222 (license license:expat)))
11223
11224 (define-public python2-termcolor
11225 (package-with-python2 python-termcolor))
11226
11227 (define-public python-terminaltables
11228 (package
11229 (name "python-terminaltables")
11230 (version "3.1.0")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "terminaltables" version))
11235 (sha256
11236 (base32
11237 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
11238 (build-system python-build-system)
11239 (home-page "https://github.com/Robpol86/terminaltables")
11240 (synopsis
11241 "Generate simple tables in terminals from a nested list of strings")
11242 (description
11243 "This package makes it easy to draw tables in terminal/console
11244 applications from a list of lists of strings. It supports multi-line rows.")
11245 (license license:expat)))
11246
11247 (define-public python-libarchive-c
11248 (package
11249 (name "python-libarchive-c")
11250 (version "2.9")
11251 (source (origin
11252 (method url-fetch)
11253 (uri (pypi-uri "libarchive-c" version))
11254 (sha256
11255 (base32
11256 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
11257 (build-system python-build-system)
11258 (arguments
11259 '(#:phases (modify-phases %standard-phases
11260 (add-before
11261 'build 'reference-libarchive
11262 (lambda* (#:key inputs #:allow-other-keys)
11263 ;; Retain the absolute file name of libarchive.so.
11264 (let ((libarchive (assoc-ref inputs "libarchive")))
11265 (substitute* "libarchive/ffi.py"
11266 (("find_library\\('archive'\\)")
11267 (string-append "'" libarchive
11268 "/lib/libarchive.so'"))))))
11269 (replace 'check
11270 (lambda _ (invoke "pytest" "-vv"))))))
11271 (native-inputs
11272 `(("python-mock" ,python-mock)
11273 ("python-pytest" ,python-pytest)))
11274 (inputs
11275 `(("libarchive" ,libarchive)))
11276 (home-page "https://github.com/Changaco/python-libarchive-c")
11277 (synopsis "Python interface to libarchive")
11278 (description
11279 "This package provides Python bindings to libarchive, a C library to
11280 access possibly compressed archives in many different formats. It uses
11281 Python's @code{ctypes} foreign function interface (FFI).")
11282 (license license:lgpl2.0+)))
11283
11284 (define-public python2-libarchive-c
11285 (package-with-python2 python-libarchive-c))
11286
11287 (define-public python-file
11288 (package/inherit file
11289 (name "python-file")
11290 (build-system python-build-system)
11291 (arguments
11292 '(#:tests? #f ;no tests
11293 #:configure-flags '("--single-version-externally-managed" "--root=/")
11294 #:phases (modify-phases %standard-phases
11295 (add-before 'build 'change-directory
11296 (lambda _
11297 (chdir "python")
11298 #t))
11299 (add-before 'build 'set-library-file-name
11300 (lambda* (#:key inputs #:allow-other-keys)
11301 (let ((file (assoc-ref inputs "file")))
11302 (substitute* "magic.py"
11303 (("find_library\\('magic'\\)")
11304 (string-append "'" file "/lib/libmagic.so'")))
11305 #t))))))
11306 (inputs `(("file" ,file)))
11307 (native-inputs (if (%current-target-system)
11308 `(("self" ,this-package))
11309 '()))
11310 (synopsis "Python bindings to the libmagic file type guesser")
11311 (description "This package provides Python bindings to the libmagic file
11312 type guesser.
11313
11314 Note that this module and the @code{python-magic} module both provide a
11315 @file{magic.py} file; these two modules, which are different and were
11316 developed separately, both serve the same purpose: provide Python bindings for
11317 libmagic.")))
11318
11319 (define-public python2-file
11320 (package-with-python2 python-file))
11321
11322 (define-public python-debian
11323 (package
11324 (name "python-debian")
11325 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
11326 (version "0.1.36")
11327 (source
11328 (origin
11329 ;; Use git-fetch, as pypi doesn't include test suite.
11330 (method git-fetch)
11331 (uri (git-reference
11332 (url home-page)
11333 (commit version)))
11334 (file-name (git-file-name name version))
11335 (sha256
11336 (base32
11337 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
11338 (build-system python-build-system)
11339 (arguments
11340 `(#:phases (modify-phases %standard-phases
11341 (add-after 'unpack 'remove-debian-specific-tests
11342 ;; python-apt, apt and dpkg are not yet available in guix,
11343 ;; and these tests heavily depend on them.
11344 (lambda _
11345 (delete-file "lib/debian/tests/test_deb822.py")
11346 (delete-file "lib/debian/tests/test_debfile.py")
11347 #t)))))
11348 (propagated-inputs
11349 `(("python-six" ,python-six)
11350 ("python-chardet" ,python-chardet)))
11351 (synopsis "Debian package related modules")
11352 (description
11353 ;; XXX: Use @enumerate instead of @itemize to work around
11354 ;; <http://bugs.gnu.org/21772>.
11355 "This package provides Python modules that abstract many formats of
11356 Debian-related files, such as:
11357
11358 @enumerate
11359 @item Debtags information;
11360 @item @file{debian/changelog} files;
11361 @item packages files, pdiffs;
11362 @item control files of single or multiple RFC822-style paragraphs---e.g.
11363 @file{debian/control}, @file{.changes}, @file{.dsc};
11364 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
11365 contained files and meta-information.
11366 @end enumerate\n")
11367
11368 ;; Modules are either GPLv2+ or GPLv3+.
11369 (license license:gpl3+)))
11370
11371 (define-public python-json-spec
11372 (package
11373 (name "python-json-spec")
11374 (version "0.10.1")
11375 (source
11376 (origin
11377 (method url-fetch)
11378 (uri (pypi-uri "json-spec" version))
11379 (sha256
11380 (base32
11381 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
11382 (build-system python-build-system)
11383 (propagated-inputs
11384 `(("python-pathlib" ,python-pathlib)
11385 ("python-six" ,python-six)))
11386 (native-inputs
11387 `(("python-pytest" ,python-pytest)))
11388 (home-page "http://py.errorist.io/json-spec")
11389 (synopsis
11390 "JSON Schema, JSON Pointer and JSON Reference for Python")
11391 (description
11392 "This Python library implements several JSON specs, like JSON Schema,
11393 JSON Reference and JSON Pointer.")
11394 (license license:bsd-3)))
11395
11396 (define-public python-fastjsonschema
11397 (package
11398 (name "python-fastjsonschema")
11399 (version "2.15.1")
11400 (source
11401 (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "fastjsonschema" version))
11404 (sha256
11405 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
11406 (build-system python-build-system)
11407 (arguments
11408 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
11409 #:phases
11410 (modify-phases %standard-phases
11411 (replace 'check
11412 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11413 (when tests?
11414 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
11415 (native-inputs
11416 `(("python-colorama" ,python-colorama)
11417 ("python-json-spec" ,python-json-spec)
11418 ("python-jsonschema" ,python-jsonschema)
11419 ("python-pylint" ,python-pylint)
11420 ("python-pytest" ,python-pytest-6)
11421 ("python-pytest-benchmark"
11422 ,python-pytest-benchmark)
11423 ("python-pytest-cache" ,python-pytest-cache)
11424 ("python-validictory" ,python-validictory)))
11425 (home-page
11426 "https://github.com/horejsek/python-fastjsonschema")
11427 (synopsis
11428 "Fast Python implementation of JSON schema")
11429 (description
11430 "This library implements validation of JSON documents by JSON schema for
11431 drafts 04, 06 and 07.")
11432 (license license:bsd-3)))
11433
11434 (define-public python-nbformat
11435 (package
11436 (name "python-nbformat")
11437 (version "5.1.3")
11438 ;; The PyPi release tarball lacks some test cases and test data.
11439 (source (origin
11440 (method git-fetch)
11441 (uri (git-reference
11442 (url "https://github.com/jupyter/nbformat.git")
11443 (commit version)))
11444 (sha256
11445 (base32
11446 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
11447 (file-name (git-file-name name version))))
11448 (build-system python-build-system)
11449 (arguments
11450 `(#:phases
11451 (modify-phases %standard-phases
11452 (replace 'check
11453 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
11454 (when tests?
11455 (invoke "pytest" "-vv")))))))
11456 (propagated-inputs
11457 `(("python-ipython-genutils" ,python-ipython-genutils)
11458 ("python-jsonschema" ,python-jsonschema)
11459 ("python-jupyter-core" ,python-jupyter-core)
11460 ("python-traitlets" ,python-traitlets)))
11461 (native-inputs
11462 `(("python-pytest" ,python-pytest)
11463 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
11464 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
11465 ; testing only.
11466 ("python-testpath" ,python-testpath)))
11467 (home-page "https://jupyter.org")
11468 (synopsis "Jupyter Notebook format")
11469 (description "This package provides the reference implementation of the
11470 Jupyter Notebook format and Python APIs for working with notebooks.")
11471 (license license:bsd-3)))
11472
11473 (define-public python-bleach
11474 (package
11475 (name "python-bleach")
11476 (version "3.1.5")
11477 (source
11478 (origin
11479 (method url-fetch)
11480 (uri (pypi-uri "bleach" version))
11481 (sha256
11482 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
11483 (build-system python-build-system)
11484 (propagated-inputs
11485 `(("python-webencodings" ,python-webencodings)
11486 ("python-six" ,python-six)))
11487 (native-inputs
11488 `(("python-datrie" ,python-datrie)
11489 ("python-genshi" ,python-genshi)
11490 ("python-lxml" ,python-lxml)
11491 ("python-pytest" ,python-pytest)))
11492 (home-page "https://github.com/mozilla/bleach")
11493 (synopsis "Whitelist-based HTML-sanitizing tool")
11494 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
11495 (license license:asl2.0)))
11496
11497 (define-public python2-bleach
11498 (package-with-python2 python-bleach))
11499
11500 (define-public python-entrypoints
11501 (package
11502 (name "python-entrypoints")
11503 (version "0.3")
11504 (source
11505 (origin
11506 (method url-fetch)
11507 (uri (pypi-uri "entrypoints" version))
11508 (sha256
11509 (base32
11510 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11511 (build-system python-build-system)
11512 ;; The package does not come with a setup.py file, so we have to generate
11513 ;; one ourselves.
11514 (arguments
11515 `(#:tests? #f
11516 #:phases
11517 (modify-phases %standard-phases
11518 (add-after 'unpack 'create-setup.py
11519 (lambda _
11520 (call-with-output-file "setup.py"
11521 (lambda (port)
11522 (format port "\
11523 from setuptools import setup
11524 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11525 " ,version))))))))
11526 (home-page "https://github.com/takluyver/entrypoints")
11527 (synopsis "Discover and load entry points from installed Python packages")
11528 (description "Entry points are a way for Python packages to advertise
11529 objects with some common interface. The most common examples are
11530 @code{console_scripts} entry points, which define shell commands by
11531 identifying a Python function to run. The @code{entrypoints} module contains
11532 functions to find and load entry points.")
11533 (license license:expat)))
11534
11535 (define-public python2-entrypoints
11536 (package-with-python2 python-entrypoints))
11537
11538 (define-public python-epc
11539 (package
11540 (name "python-epc")
11541 (version "0.0.5")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "epc" version))
11546 (sha256
11547 (base32
11548 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11549 (build-system python-build-system)
11550 (propagated-inputs
11551 `(("python-sexpdata" ,python-sexpdata)))
11552 (native-inputs
11553 `(("python-nose" ,python-nose)))
11554 (home-page "https://github.com/tkf/python-epc")
11555 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11556 (description
11557 "Python-EPC can call elisp functions from Python and Python functions
11558 from elisp.")
11559 (license license:gpl3)))
11560
11561 (define-public python-forex-python
11562 (package
11563 (name "python-forex-python")
11564 (version "1.5")
11565 (source
11566 (origin
11567 (method url-fetch)
11568 (uri (pypi-uri "forex-python" version))
11569 (sha256
11570 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11571 (build-system python-build-system)
11572 (arguments
11573 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11574 ;; repository require online data.
11575 `(#:tests? #f))
11576 (propagated-inputs
11577 `(("python-requests" ,python-requests)
11578 ("python-simplejson" ,python-simplejson)))
11579 (home-page "https://github.com/MicroPyramid/forex-python")
11580 (synopsis "Foreign exchange rates and currency conversion")
11581 (description
11582 "@code{python-forex-python} can be used to manipulate foreign
11583 exchange rates and to operate currency conversions.
11584
11585 Features:
11586 @itemize
11587 @item List all currency rates.
11588 @item BitCoin price for all currencies.
11589 @item Converting amount to BitCoins.
11590 @item Get historical rates for any day since 1999.
11591 @item Conversion rate for one currency(ex; USD to INR).
11592 @item Convert amount from one currency to other.('USD 10$' to INR).
11593 @item Currency symbols.
11594 @item Currency names.
11595 @end itemize")
11596 (license license:expat)))
11597
11598 (define-public python-simpleeval
11599 (package
11600 (name "python-simpleeval")
11601 (version "0.9.10")
11602 (source
11603 (origin
11604 (method url-fetch)
11605 (uri (pypi-uri "simpleeval" version))
11606 (sha256
11607 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11608 (build-system python-build-system)
11609 (home-page "https://github.com/danthedeckie/simpleeval")
11610 (synopsis "Simple, safe single expression evaluator library")
11611 (description
11612 "This package provides a quick single file library for easily adding
11613 evaluatable expressions into python projects. Say you want to allow a user
11614 to set an alarm volume, which could depend on the time of day, alarm level,
11615 how many previous alarms had gone off, and if there is music playing at the
11616 time.")
11617 (license license:expat)))
11618
11619 (define-public python-nbconvert
11620 (package
11621 (name "python-nbconvert")
11622 (version "6.0.7")
11623 (source
11624 (origin
11625 (method url-fetch)
11626 (uri (pypi-uri "nbconvert" version))
11627 (sha256
11628 (base32
11629 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11630 (build-system python-build-system)
11631 (arguments
11632 `(#:phases
11633 (modify-phases %standard-phases
11634 (add-after 'unpack 'fix-paths-and-tests
11635 (lambda _
11636 ;; Use pandoc binary from input.
11637 (substitute* "nbconvert/utils/pandoc.py"
11638 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11639 ;; Same for LaTeX.
11640 (substitute* "nbconvert/exporters/pdf.py"
11641 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11642 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11643 ;; Make sure tests are not skipped.
11644 (substitute* (find-files "." "test_.+\\.py$")
11645 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11646 ;; Pandoc is never missing, disable test.
11647 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11648 (("import os" all) (string-append all "\nimport pytest"))
11649 (("(.+)(def test_pandoc_available)" all indent def)
11650 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11651 indent def)))
11652 ;; Not installing pyppeteer, delete test.
11653 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11654 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11655 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11656 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11657 indent def)))))
11658 (replace 'check
11659 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11660 (when tests?
11661 ;; Some tests invoke the installed nbconvert binary.
11662 (add-installed-pythonpath inputs outputs)
11663 ;; Tries to write to this path.
11664 (unsetenv "JUPYTER_CONFIG_DIR")
11665 ;; Tests depend on templates installed to output.
11666 (setenv "JUPYTER_PATH"
11667 (string-append
11668 (assoc-ref outputs "out")
11669 "/share/jupyter:"
11670 (getenv "JUPYTER_PATH")))
11671 ;; Some tests need HOME
11672 (setenv "HOME" "/tmp")
11673 (invoke "pytest" "-vv")))))))
11674 (inputs
11675 `(("pandoc" ,pandoc)
11676 ;; XXX: Disabled, needs substitute*.
11677 ;;("inkscape" ,inkscape)
11678 ))
11679 (native-inputs
11680 `(("python-ipykernel" ,python-ipykernel)
11681 ;; XXX: Disabled, not in guix.
11682 ;;("python-pyppeteer" ,python-pyppeteer)
11683 ("python-pytest" ,python-pytest)
11684 ("python-pytest-cov" ,python-pytest-cov)
11685 ("python-pytest-dependency" ,python-pytest-dependency)
11686 ("texlive" ,(texlive-union (list texlive-adjustbox
11687 texlive-amsfonts/patched
11688 texlive-booktabs
11689 texlive-caption
11690 texlive-eurosym
11691 texlive-fonts-rsfs
11692 texlive-generic-ulem
11693 texlive-iftex
11694 texlive-jknappen
11695 texlive-latex-amsmath
11696 texlive-latex-enumitem
11697 texlive-latex-fancyvrb
11698 texlive-latex-float
11699 texlive-latex-fontspec
11700 texlive-latex-geometry
11701 texlive-latex-hyperref
11702 texlive-latex-jknapltx
11703 texlive-latex-ms
11704 texlive-latex-oberdiek
11705 texlive-latex-parskip
11706 texlive-latex-trimspaces
11707 texlive-latex-upquote
11708 texlive-latex-ucs
11709 texlive-lm
11710 texlive-mathpazo
11711 texlive-tcolorbox
11712 texlive-titling
11713 texlive-tools
11714 texlive-xcolor
11715 texlive-zapfding)))))
11716 (propagated-inputs
11717 `(("python-bleach" ,python-bleach)
11718 ("python-defusedxml" ,python-defusedxml)
11719 ("python-entrypoints" ,python-entrypoints)
11720 ("python-jinja2" ,python-jinja2)
11721 ("python-jupyter-core" ,python-jupyter-core)
11722 ("python-mistune" ,python-mistune)
11723 ("python-nbclient" ,python-nbclient)
11724 ("python-nbformat" ,python-nbformat)
11725 ("python-pandocfilters" ,python-pandocfilters)
11726 ("python-pygments" ,python-pygments)
11727 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11728 ("python-testpath" ,python-testpath)
11729 ("python-traitlets" ,python-traitlets)
11730 ;; Required, even if [serve] is not used.
11731 ("python-tornado" ,python-tornado-6)))
11732 (home-page "https://jupyter.org")
11733 (synopsis "Converting Jupyter Notebooks")
11734 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11735 notebooks to various other formats via Jinja templates. It allows you to
11736 convert an @code{.ipynb} notebook file into various static formats including:
11737
11738 @enumerate
11739 @item HTML
11740 @item LaTeX
11741 @item PDF
11742 @item Reveal JS
11743 @item Markdown (md)
11744 @item ReStructured Text (rst)
11745 @item executable script
11746 @end enumerate\n")
11747 (license license:bsd-3)))
11748
11749 (define-public python-notebook
11750 (package
11751 (name "python-notebook")
11752 (version "6.3.0")
11753 (source (origin
11754 (method url-fetch)
11755 (uri (pypi-uri "notebook" version))
11756 (sha256
11757 (base32
11758 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11759 (build-system python-build-system)
11760 (arguments
11761 `(#:phases
11762 (modify-phases %standard-phases
11763 (replace 'check
11764 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11765 ;; These tests require a browser
11766 (delete-file-recursively "notebook/tests/selenium")
11767 (when tests?
11768 (add-installed-pythonpath inputs outputs)
11769 ;; Some tests do not expect all files to be installed in the
11770 ;; same directory, but JUPYTER_PATH contains multiple entries.
11771 (unsetenv "JUPYTER_PATH")
11772 ;; Some tests need HOME
11773 (setenv "HOME" "/tmp")
11774 (with-directory-excursion "/tmp"
11775 (invoke "pytest" "-vv"
11776 ;; TODO: This tests fails because nbconvert does not
11777 ;; list "python" as a format.
11778 "-k" "not test_list_formats"))))))))
11779 (propagated-inputs
11780 `(("python-argon2-cffi" ,python-argon2-cffi)
11781 ("python-ipykernel" ,python-ipykernel)
11782 ("python-ipython-genutils" ,python-ipython-genutils)
11783 ("python-jinja2" ,python-jinja2)
11784 ("python-jupyter-client" ,python-jupyter-client)
11785 ("python-jupyter-core" ,python-jupyter-core)
11786 ("python-nbconvert" ,python-nbconvert)
11787 ("python-nbformat" ,python-nbformat)
11788 ("python-prometheus-client" ,python-prometheus-client)
11789 ("python-pyzmq" ,python-pyzmq)
11790 ("python-send2trash" ,python-send2trash)
11791 ("python-terminado" ,python-terminado)
11792 ("python-tornado" ,python-tornado-6)
11793 ("python-traitlets" ,python-traitlets)))
11794 (native-inputs
11795 `(("python-coverage" ,python-coverage)
11796 ("python-nbval" ,python-nbval)
11797 ("python-pytest" ,python-pytest)
11798 ("python-pytest-cov" ,python-pytest-cov)
11799 ("python-requests" ,python-requests)
11800 ("python-requests-unixsocket" ,python-requests-unixsocket)))
11801 (home-page "https://jupyter.org/")
11802 (synopsis "Web-based notebook environment for interactive computing")
11803 (description
11804 "The Jupyter HTML notebook is a web-based notebook environment for
11805 interactive computing.")
11806 (license license:bsd-3)))
11807
11808 (define-public python-widgetsnbextension
11809 (package
11810 (name "python-widgetsnbextension")
11811 (version "3.5.1")
11812 (source
11813 (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "widgetsnbextension" version))
11816 (sha256
11817 (base32
11818 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
11819 (build-system python-build-system)
11820 (propagated-inputs
11821 `(("python-notebook" ,python-notebook)))
11822 (home-page "https://ipython.org")
11823 (synopsis "IPython HTML widgets for Jupyter")
11824 (description "This package provides interactive HTML widgets for Jupyter
11825 notebooks.")
11826 (license license:bsd-3)))
11827
11828 (define-public python-ipywidgets
11829 (package
11830 (name "python-ipywidgets")
11831 (version "7.6.3")
11832 (source
11833 (origin
11834 (method url-fetch)
11835 (uri (pypi-uri "ipywidgets" version))
11836 (sha256
11837 (base32
11838 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
11839 (build-system python-build-system)
11840 (propagated-inputs
11841 `(("python-ipykernel" ,python-ipykernel)
11842 ("python-ipython" ,python-ipython)
11843 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
11844 ("python-nbformat" ,python-nbformat)
11845 ("python-traitlets" ,python-traitlets)
11846 ("python-widgetsnbextension" ,python-widgetsnbextension)))
11847 (native-inputs
11848 `(("python-mock" ,python-mock)
11849 ("python-pytest" ,python-pytest)
11850 ("python-pytest-cov" ,python-pytest-cov)))
11851 (home-page "https://ipython.org")
11852 (synopsis "IPython HTML widgets for Jupyter")
11853 (description "Ipywidgets are interactive HTML widgets for Jupyter
11854 notebooks and the IPython kernel. Notebooks come alive when interactive
11855 widgets are used. Users gain control of their data and can visualize changes
11856 in the data.")
11857 (license license:bsd-3)))
11858
11859 (define-public python-jupyter-console
11860 (package
11861 (name "python-jupyter-console")
11862 (version "6.1.0")
11863 (source
11864 (origin
11865 (method url-fetch)
11866 (uri (pypi-uri "jupyter_console" version))
11867 (sha256
11868 (base32
11869 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
11870 (build-system python-build-system)
11871 (propagated-inputs
11872 `(("python-ipykernel" ,python-ipykernel)
11873 ("python-jupyter-client" ,python-jupyter-client)
11874 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
11875 ("python-pygments" ,python-pygments)))
11876 (native-inputs
11877 `(("python-nose" ,python-nose)))
11878 (home-page "https://jupyter.org")
11879 (synopsis "Jupyter terminal console")
11880 (description "This package provides a terminal-based console frontend for
11881 Jupyter kernels. It also allows for console-based interaction with non-Python
11882 Jupyter kernels such as IJulia and IRKernel.")
11883 (license license:bsd-3)))
11884
11885 ;; The python-ipython and python-jupyter-console require each other. To get
11886 ;; the functionality in both packages working, strip down the
11887 ;; python-jupyter-console package when using it as an input to python-ipython.
11888 (define python-jupyter-console-minimal
11889 (package/inherit python-jupyter-console
11890 (name "python-jupyter-console-minimal")
11891 (arguments
11892 (substitute-keyword-arguments
11893 (package-arguments python-jupyter-console)
11894 ((#:phases phases)
11895 `(modify-phases ,phases
11896 (add-after 'install 'delete-bin
11897 (lambda* (#:key outputs #:allow-other-keys)
11898 ;; Delete the bin files, to avoid conflicts in profiles
11899 ;; where python-ipython and python-jupyter-console are
11900 ;; both present.
11901 (delete-file-recursively
11902 (string-append
11903 (assoc-ref outputs "out") "/bin"))))))))
11904 ;; Remove the python-ipython propagated input, to avoid the cycle
11905 (propagated-inputs
11906 (alist-delete
11907 "python-ipython"
11908 (package-propagated-inputs python-jupyter-console)))))
11909
11910 (define-public python-qtconsole
11911 (package
11912 (name "python-qtconsole")
11913 (version "4.4.3")
11914 (source
11915 (origin
11916 (method url-fetch)
11917 (uri (pypi-uri "qtconsole" version))
11918 (sha256
11919 (base32
11920 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
11921 (build-system python-build-system)
11922 (arguments
11923 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
11924 ;; but we only have the LTS version 5.x. This means that there might be
11925 ;; runtime errors, but since this is a dependency of the Jupyter package,
11926 ;; and Jupyter can be used without the qtconsole we can overlook this for
11927 ;; now.
11928 `(#:tests? #f
11929 #:phases
11930 (modify-phases %standard-phases
11931 (add-before 'check 'pre-check
11932 (lambda _
11933 (setenv "QT_QPA_PLATFORM" "offscreen")
11934 #t)))))
11935 (propagated-inputs
11936 `(("python-ipykernel" ,python-ipykernel)
11937 ("python-ipython" ,python-ipython)))
11938 (native-inputs
11939 `(("python-pytest" ,python-pytest)))
11940 (home-page "https://jupyter.org")
11941 (synopsis "Jupyter Qt console")
11942 (description "This package provides a Qt-based console for Jupyter with
11943 support for rich media output.")
11944 (license license:bsd-3)))
11945
11946 (define-public python-jsbeautifier
11947 (package
11948 (name "python-jsbeautifier")
11949 (version "1.10.2")
11950 (home-page "https://github.com/beautify-web/js-beautify")
11951 (source (origin
11952 (method git-fetch)
11953 (uri (git-reference
11954 (url home-page)
11955 (commit (string-append "v" version))))
11956 (file-name (git-file-name name version))
11957 (sha256
11958 (base32
11959 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
11960 (build-system python-build-system)
11961 (arguments
11962 `(#:phases (modify-phases %standard-phases
11963 (add-after 'unpack 'chdir
11964 (lambda _
11965 ;; The upstream Git repository contains all the code,
11966 ;; but this package only builds the python code.
11967 (chdir "python")
11968 #t))
11969 (add-after 'unpack 'patch-python-six-requirements
11970 (lambda _
11971 (substitute* "python/setup.py"
11972 (("six>=1.12.0")
11973 "six>=1.11.0"))
11974 #t)))))
11975 (propagated-inputs
11976 `(("python-editorconfig" ,python-editorconfig)
11977 ("python-six" ,python-six)))
11978 (native-inputs
11979 `(("python-pytest" ,python-pytest)))
11980 (synopsis "JavaScript unobfuscator and beautifier")
11981 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
11982 popular online obfuscators.")
11983 (license license:expat)))
11984
11985 (define-public jupyter
11986 (package
11987 (name "jupyter")
11988 (version "1.0.0")
11989 (source
11990 (origin
11991 (method url-fetch)
11992 (uri (pypi-uri "jupyter" version))
11993 (sha256
11994 (base32
11995 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
11996 (build-system python-build-system)
11997 (arguments '(#:tests? #f)) ; there are none.
11998 (propagated-inputs
11999 `(("python-ipykernel" ,python-ipykernel)
12000 ("python-ipywidgets" ,python-ipywidgets)
12001 ("python-jupyter-console" ,python-jupyter-console)
12002 ("python-nbconvert" ,python-nbconvert)
12003 ("python-notebook" ,python-notebook)
12004 ("python-qtconsole" ,python-qtconsole)))
12005 (home-page "https://jupyter.org")
12006 (synopsis "Web application for interactive documents")
12007 (description
12008 "The Jupyter Notebook is a web application that allows you to create and
12009 share documents that contain live code, equations, visualizations and
12010 explanatory text. Uses include: data cleaning and transformation, numerical
12011 simulation, statistical modeling, machine learning and much more.")
12012 (license license:bsd-3)))
12013
12014 (define-public python-chardet
12015 (package
12016 (name "python-chardet")
12017 (version "3.0.4")
12018 (source
12019 (origin
12020 (method url-fetch)
12021 (uri (pypi-uri "chardet" version))
12022 (sha256
12023 (base32
12024 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
12025 (native-inputs
12026 `(("python-hypothesis" ,python-hypothesis)
12027 ("python-pytest" ,python-pytest)
12028 ("python-pytest-runner" ,python-pytest-runner)))
12029 (build-system python-build-system)
12030 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
12031 (arguments `(#:tests? #f))
12032 (home-page "https://github.com/chardet/chardet")
12033 (synopsis "Universal encoding detector for Python 2 and 3")
12034 (description
12035 "This package provides @code{chardet}, a Python module that can
12036 automatically detect a wide range of file encodings.")
12037 (license license:lgpl2.1+)))
12038
12039 (define-public python2-chardet
12040 (package-with-python2 python-chardet))
12041
12042 (define-public python-charset-normalizer
12043 (package
12044 (name "python-charset-normalizer")
12045 (version "2.0.5")
12046 (source
12047 (origin
12048 (method url-fetch)
12049 (uri (pypi-uri "charset-normalizer" version))
12050 (sha256
12051 (base32 "0rr3iv2xw4rz5ijnfqk229fw85cq6p6rhqqsilm0ldzncblfg63h"))))
12052 (build-system python-build-system)
12053 (native-inputs
12054 `(("python-pytest" ,python-pytest)))
12055 (home-page "https://github.com/ousret/charset_normalizer")
12056 (synopsis "Universal Charset Detector, alternative to Chardet")
12057 (description "This library helps you read text from an unknown charset
12058 encoding. Motivated by @code{chardet}, it tries to resolve the issue by
12059 taking a new approach. All IANA character set names for which the Python core
12060 library provides codecs are supported.")
12061 (license license:expat)))
12062
12063 (define-public python-docopt
12064 (package
12065 (name "python-docopt")
12066 (version "0.6.2")
12067 (source
12068 (origin
12069 (method git-fetch)
12070 ;; The release on PyPI does not include tests.
12071 (uri (git-reference
12072 (url "https://github.com/docopt/docopt")
12073 (commit version)))
12074 (file-name (git-file-name name version))
12075 (sha256
12076 (base32
12077 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
12078 (build-system python-build-system)
12079 (native-inputs
12080 `(("python-pytest" ,python-pytest)))
12081 (arguments
12082 `(#:phases
12083 (modify-phases %standard-phases
12084 (replace 'check
12085 (lambda _ (invoke "py.test"))))))
12086 (home-page "http://docopt.org")
12087 (synopsis "Command-line interface description language for Python")
12088 (description "This library allows the user to define a command-line
12089 interface from a program's help message rather than specifying it
12090 programmatically with command-line parsers like @code{getopt} and
12091 @code{argparse}.")
12092 (license license:expat)))
12093
12094 (define-public python2-docopt
12095 (package-with-python2 python-docopt))
12096
12097 (define-public python-pythondialog
12098 (package
12099 (name "python-pythondialog")
12100 (version "3.4.0")
12101 (source
12102 (origin
12103 (method url-fetch)
12104 (uri (pypi-uri "pythondialog" version))
12105 (sha256
12106 (base32
12107 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
12108 (build-system python-build-system)
12109 (arguments
12110 `(#:phases
12111 (modify-phases %standard-phases
12112 (add-after 'unpack 'patch-path
12113 (lambda* (#:key inputs #:allow-other-keys)
12114 (let* ((dialog (assoc-ref inputs "dialog")))
12115 ;; Since this library really wants to grovel the search path, we
12116 ;; must hardcode dialog's store path into it.
12117 (substitute* "dialog.py"
12118 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
12119 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
12120 #t))))
12121 #:tests? #f)) ; no test suite
12122 (propagated-inputs
12123 `(("dialog" ,dialog)))
12124 (home-page "http://pythondialog.sourceforge.net/")
12125 (synopsis "Python interface to the UNIX dialog utility")
12126 (description "A Python wrapper for the dialog utility. Its purpose is to
12127 provide an easy to use, pythonic and comprehensive Python interface to dialog.
12128 This allows one to make simple text-mode user interfaces on Unix-like systems")
12129 (license license:lgpl2.1)
12130 (properties `((python2-variant . ,(delay python2-pythondialog))))))
12131
12132 (define-public python2-pythondialog
12133 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
12134 (package
12135 (inherit base)
12136 (version (package-version python-pythondialog))
12137 (source (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "python2-pythondialog" version))
12140 (sha256
12141 (base32
12142 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
12143
12144 (define-public python-configobj
12145 (package
12146 (name "python-configobj")
12147 (version "5.0.6")
12148 (source (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "configobj" version))
12151 (sha256
12152 (base32
12153 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
12154 ;; Patch setup.py so it looks for python-setuptools, which is
12155 ;; required to parse the keyword 'install_requires' in setup.py.
12156 (patches (search-patches "python-configobj-setuptools.patch"))))
12157 (build-system python-build-system)
12158 (propagated-inputs
12159 `(("python-six" ,python-six)))
12160 (synopsis "Config file reading, writing and validation")
12161 (description "ConfigObj is a simple but powerful config file reader and
12162 writer: an ini file round tripper. Its main feature is that it is very easy to
12163 use, with a straightforward programmer’s interface and a simple syntax for
12164 config files.")
12165 (home-page "https://github.com/DiffSK/configobj")
12166 (license license:bsd-3)))
12167
12168 (define-public python2-configobj
12169 (package-with-python2 python-configobj))
12170
12171 (define-public python-configargparse
12172 (package
12173 (name "python-configargparse")
12174 (version "1.2.3")
12175 (source (origin
12176 (method url-fetch)
12177 (uri (pypi-uri "ConfigArgParse" version))
12178 (sha256
12179 (base32
12180 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
12181 (build-system python-build-system)
12182 (native-inputs
12183 `(("python-pyyaml" ,python-pyyaml)))
12184 (arguments
12185 `(#:phases
12186 (modify-phases %standard-phases
12187 (replace 'check
12188 (lambda _
12189 ;; Bypass setuptools-shim because one test relies on "setup.py"
12190 ;; being the first argument passed to the python call.
12191 ;;
12192 ;; NOTE: Many tests do not run because they rely on Python's
12193 ;; built-in test.test_argparse, but we remove the unit tests from
12194 ;; our Python installation.
12195 (invoke "python" "setup.py" "test"))))))
12196 (synopsis "Replacement for argparse")
12197 (description "A drop-in replacement for argparse that allows options to also
12198 be set via config files and/or environment variables.")
12199 (home-page "https://github.com/bw2/ConfigArgParse")
12200 (license license:expat)))
12201
12202 (define-public python-argparse-manpage
12203 (package
12204 (name "python-argparse-manpage")
12205 (version "1.1")
12206 (source
12207 (origin
12208 (method url-fetch)
12209 (uri (pypi-uri "argparse-manpage" version))
12210 (sha256
12211 (base32
12212 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
12213 (build-system python-build-system)
12214 (home-page "https://github.com/praiskup/argparse-manpage")
12215 (synopsis "Build manual page from Python's ArgumentParser object")
12216 (description
12217 "This package provides tools to build manual pages from Python's
12218 @code{ArgumentParser} object.")
12219 (license license:asl2.0)))
12220
12221 (define-public python-contextlib2
12222 (package
12223 (name "python-contextlib2")
12224 (version "0.6.0.post1")
12225 (source
12226 (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "contextlib2" version))
12229 (sha256
12230 (base32
12231 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
12232 (build-system python-build-system)
12233 (home-page "https://contextlib2.readthedocs.org/")
12234 (synopsis "Tools for decorators and context managers")
12235 (description "This module is primarily a backport of the Python
12236 3.2 contextlib to earlier Python versions. Like contextlib, it
12237 provides utilities for common tasks involving decorators and context
12238 managers. It also contains additional features that are not part of
12239 the standard library.")
12240 (properties `((python2-variant . ,(delay python2-contextlib2))))
12241 (license license:psfl)))
12242
12243 (define-public python2-contextlib2
12244 (let ((base (package-with-python2
12245 (strip-python2-variant python-contextlib2))))
12246 (package/inherit base
12247 (arguments
12248 (substitute-keyword-arguments (package-arguments base)
12249 ((#:phases phases)
12250 `(modify-phases ,phases
12251 (replace 'check
12252 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
12253 (native-inputs
12254 `(("python2-unittest2" ,python2-unittest2))))))
12255
12256 ;; This package is used by python2-pytest via python2-importlib-metadata,
12257 ;; and thus can not depend on python-unittest2 (which depends on pytest).
12258 (define-public python2-contextlib2-bootstrap
12259 (hidden-package
12260 (package/inherit
12261 python2-contextlib2
12262 (name "python2-contextlib2-bootstrap")
12263 (arguments
12264 `(#:tests? #f
12265 ,@(package-arguments python2-contextlib2)))
12266 (native-inputs '()))))
12267
12268 (define-public python-texttable
12269 (package
12270 (name "python-texttable")
12271 (version "1.6.2")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 (uri (pypi-uri "texttable" version))
12276 (sha256
12277 (base32
12278 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
12279 (build-system python-build-system)
12280 (arguments
12281 `(#:phases
12282 (modify-phases %standard-phases
12283 (replace 'check
12284 (lambda _ (invoke "pytest" "tests.py"))))))
12285 (native-inputs
12286 `(("python-pytest" ,python-pytest)))
12287 (home-page "https://github.com/foutaise/texttable/")
12288 (synopsis "Python module for creating simple ASCII tables")
12289 (description "Texttable is a Python module for creating simple ASCII
12290 tables.")
12291 (license license:expat)))
12292
12293 (define-public python2-texttable
12294 (package-with-python2 python-texttable))
12295
12296 (define-public python-atomicwrites
12297 (package
12298 (name "python-atomicwrites")
12299 (version "1.3.0")
12300 (source (origin
12301 (method url-fetch)
12302 (uri (pypi-uri "atomicwrites" version))
12303 (sha256
12304 (base32
12305 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
12306 (build-system python-build-system)
12307 (synopsis "Atomic file writes in Python")
12308 (description "Library for atomic file writes using platform dependent tools
12309 for atomic file system operations.")
12310 (home-page "https://github.com/untitaker/python-atomicwrites")
12311 (license license:expat)))
12312
12313 (define-public python2-atomicwrites
12314 (package-with-python2 python-atomicwrites))
12315
12316 (define-public python-qstylizer
12317 (package
12318 (name "python-qstylizer")
12319 (version "0.1.10")
12320 (source
12321 (origin
12322 (method git-fetch)
12323 (uri (git-reference
12324 (url "https://github.com/blambright/qstylizer")
12325 (commit version)))
12326 (file-name (git-file-name name version))
12327 (sha256
12328 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
12329 (build-system python-build-system)
12330 (arguments
12331 `(#:test-target "pytest"
12332 #:phases
12333 (modify-phases %standard-phases
12334 (add-before 'build 'set-pbr-version
12335 (lambda _
12336 (setenv "PBR_VERSION" "3.0.1"))))))
12337 (native-inputs
12338 `(("python-pbr" ,python-pbr)
12339 ("python-pytest" ,python-pytest)
12340 ("python-pytest-catchlog" ,python-pytest-catchlog)
12341 ("python-pytest-cov" ,python-pytest-cov)
12342 ("python-pytest-mock" ,python-pytest-mock)
12343 ("python-pytest-runner" ,python-pytest-runner)
12344 ("python-pytest-xdist" ,python-pytest-xdist)))
12345 (propagated-inputs
12346 `(("python-inflection" ,python-inflection)
12347 ("python-tinycss" ,python-tinycss)))
12348 (home-page "https://github.com/blambright/qstylizer")
12349 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
12350 (description "@code{qstylizer} is a Python package designed to help with
12351 the construction of PyQt/PySide stylesheets.")
12352 (license license:expat)))
12353
12354 (define-public python-click-threading
12355 (package
12356 (name "python-click-threading")
12357 (version "0.4.4")
12358 (source (origin
12359 (method url-fetch)
12360 (uri (pypi-uri "click-threading" version))
12361 (sha256
12362 (base32
12363 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
12364 (build-system python-build-system)
12365 (propagated-inputs
12366 `(("python-click" ,python-click)))
12367 (synopsis "Utilities for multithreading in Click")
12368 (description "This package provides utilities for multithreading in Click
12369 applications.")
12370 (home-page "https://github.com/click-contrib/click-threading")
12371 (license license:expat)))
12372
12373 (define-public python-click-log
12374 (package
12375 (name "python-click-log")
12376 (version "0.3.2")
12377 (source (origin
12378 (method url-fetch)
12379 (uri (pypi-uri "click-log" version))
12380 (sha256
12381 (base32
12382 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
12383 (build-system python-build-system)
12384 (propagated-inputs
12385 `(("python-click" ,python-click)))
12386 (synopsis "Logging for click applications")
12387 (description "This package provides a Python library for logging Click
12388 applications.")
12389 (home-page "https://github.com/click-contrib/click-log")
12390 (license license:expat)))
12391
12392 (define-public python-click-default-group
12393 (package
12394 (name "python-click-default-group")
12395 (version "1.2.2")
12396 (source (origin
12397 (method url-fetch)
12398 (uri (pypi-uri "click-default-group" version))
12399 (sha256
12400 (base32
12401 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
12402 (build-system python-build-system)
12403 (arguments
12404 `(#:tests? #f)) ; no target
12405 (propagated-inputs
12406 `(("python-click" ,python-click)))
12407 (synopsis "Extends click.Group")
12408 (description "This package extends click.Group to invoke a command without
12409 explicit subcommand name.")
12410 (home-page "https://github.com/click-contrib/click-default-group")
12411 (license license:bsd-3)))
12412
12413 (define-public python-structlog
12414 (package
12415 (name "python-structlog")
12416 (version "20.2.0")
12417 (source
12418 (origin
12419 (method url-fetch)
12420 (uri (pypi-uri "structlog" version))
12421 (sha256
12422 (base32
12423 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
12424 (build-system python-build-system)
12425 (arguments
12426 `(#:phases
12427 (modify-phases %standard-phases
12428 (replace 'check
12429 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
12430 (when tests?
12431 (add-installed-pythonpath inputs outputs)
12432 (invoke "pytest"))
12433 #t)))))
12434 (native-inputs
12435 `(("python-coverage" ,python-coverage)
12436 ("python-freezegun" ,python-freezegun)
12437 ("python-pretend" ,python-pretend)
12438 ("python-pytest" ,python-pytest)
12439 ("python-pytest-asyncio" ,python-pytest-asyncio)
12440 ("python-simplejson" ,python-simplejson)
12441 ("python-twisted" ,python-twisted)))
12442 (home-page "https://www.structlog.org/")
12443 (synopsis "Structured Logging for Python")
12444 (description "@code{structlog} changes logging in Python by adding structure
12445 to your log entries.")
12446 (license (list license:asl2.0 license:expat))))
12447
12448 (define-public python-apipkg
12449 (package
12450 (name "python-apipkg")
12451 (version "1.5")
12452 (source (origin
12453 (method url-fetch)
12454 (uri (pypi-uri "apipkg" version))
12455 (sha256
12456 (base32
12457 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
12458 (build-system python-build-system)
12459 (native-inputs
12460 `(("python-pytest" ,python-pytest)
12461 ("python-setuptools-scm" ,python-setuptools-scm)))
12462 (synopsis "Namespace control and lazy-import mechanism")
12463 (description "With apipkg you can control the exported namespace of a Python
12464 package and greatly reduce the number of imports for your users. It is a small
12465 pure Python module that works on virtually all Python versions.")
12466 (home-page "https://github.com/pytest-dev/apipkg")
12467 (license license:expat)))
12468
12469 (define-public python-execnet
12470 (package
12471 (name "python-execnet")
12472 (version "1.9.0")
12473 (source (origin
12474 (method url-fetch)
12475 (uri (pypi-uri "execnet" version))
12476 (sha256
12477 (base32
12478 "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
12479 (patches (search-patches "python-execnet-read-only-fix.patch"))))
12480 (build-system python-build-system)
12481 (arguments
12482 `(#:phases
12483 (modify-phases %standard-phases
12484 (replace 'check
12485 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
12486 (when tests?
12487 (add-installed-pythonpath inputs outputs)
12488 (invoke "pytest" "-vv")))))))
12489 (native-inputs
12490 `(("python-pytest" ,python-pytest)
12491 ("python-setuptools-scm" ,python-setuptools-scm)))
12492 (synopsis "Rapid multi-Python deployment")
12493 (description "Execnet provides a share-nothing model with
12494 channel-send/receive communication for distributing execution across many
12495 Python interpreters across version, platform and network barriers. It has a
12496 minimal and fast API targeting the following uses:
12497 @enumerate
12498 @item distribute tasks to (many) local or remote CPUs
12499 @item write and deploy hybrid multi-process applications
12500 @item write scripts to administer multiple environments
12501 @end enumerate")
12502 (home-page "https://codespeak.net/execnet/")
12503 (license license:expat)))
12504
12505 (define-public python2-execnet
12506 (package-with-python2 python-execnet))
12507
12508 (define-public python-icalendar
12509 (package
12510 (name "python-icalendar")
12511 (version "4.0.7")
12512 (source (origin
12513 (method url-fetch)
12514 (uri (pypi-uri "icalendar" version))
12515 (sha256
12516 (base32
12517 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
12518 (build-system python-build-system)
12519 (propagated-inputs
12520 `(("python-dateutil" ,python-dateutil)
12521 ("python-pytz" ,python-pytz)))
12522 (synopsis "Python library for parsing iCalendar files")
12523 (description "The icalendar package is a parser/generator of iCalendar
12524 files for use with Python.")
12525 (home-page "https://github.com/collective/icalendar")
12526 (license license:bsd-2)))
12527
12528 (define-public python-args
12529 (package
12530 (name "python-args")
12531 (version "0.1.0")
12532 (source (origin
12533 (method url-fetch)
12534 (uri (pypi-uri "args" version))
12535 (sha256
12536 (base32
12537 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12538 (build-system python-build-system)
12539 (home-page "https://github.com/kennethreitz/args")
12540 (synopsis "Command-line argument parser")
12541 (description
12542 "This library provides a Python module to parse command-line arguments.")
12543 (license license:bsd-3)))
12544
12545 (define-public python2-args
12546 (package-with-python2 python-args))
12547
12548 (define-public python-clint
12549 (package
12550 (name "python-clint")
12551 (version "0.5.1")
12552 (source (origin
12553 (method url-fetch)
12554 (uri (pypi-uri "clint" version))
12555 (sha256
12556 (base32
12557 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12558 (build-system python-build-system)
12559 (arguments
12560 '(#:phases
12561 (modify-phases %standard-phases
12562 (replace 'check
12563 (lambda _ (invoke "py.test" "-v"))))))
12564 (native-inputs
12565 `(("python-pytest" ,python-pytest)))
12566 (propagated-inputs
12567 `(("python-args" ,python-args)))
12568 (home-page "https://github.com/kennethreitz/clint")
12569 (synopsis "Command-line interface tools")
12570 (description
12571 "Clint is a Python module filled with a set of tools for developing
12572 command-line applications, including tools for colored and indented
12573 output, progress bar display, and pipes.")
12574 (license license:isc)))
12575
12576 (define-public python2-clint
12577 (package-with-python2 python-clint))
12578
12579 (define-public python-rply
12580 (package
12581 (name "python-rply")
12582 (version "0.7.8")
12583 (source (origin
12584 (method url-fetch)
12585 (uri (pypi-uri "rply" version))
12586 (sha256
12587 (base32
12588 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12589 (build-system python-build-system)
12590 (propagated-inputs
12591 `(("python-appdirs" ,python-appdirs)))
12592 (home-page "https://github.com/alex/rply")
12593 (synopsis "Parser generator for Python")
12594 (description
12595 "This package provides a pure Python based parser generator, that also
12596 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12597 with a new public API, and RPython support.")
12598 (license license:bsd-3)))
12599
12600 (define-public python2-rply
12601 (package-with-python2 python-rply))
12602
12603 (define-public python-hy
12604 (package
12605 (name "python-hy")
12606 (version "0.18.0")
12607 (source (origin
12608 (method url-fetch)
12609 (uri (pypi-uri "hy" version))
12610 (sha256
12611 (base32
12612 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12613 (build-system python-build-system)
12614 (arguments
12615 '(#:phases
12616 (modify-phases %standard-phases
12617 (add-before 'install 'set-HOME
12618 (lambda _
12619 (setenv "HOME" "/tmp") #t))
12620 (replace 'check
12621 (lambda _
12622 ;; Tests require write access to HOME.
12623 (setenv "HOME" "/tmp")
12624 (invoke "nosetests"))))))
12625 (native-inputs
12626 `(("python-coverage" ,python-coverage)
12627 ("python-nose" ,python-nose)))
12628 (propagated-inputs
12629 `(("python-astor" ,python-astor)
12630 ("python-colorama" ,python-colorama)
12631 ("python-rply" ,python-rply)
12632 ("python-funcparserlib"
12633 ,python-funcparserlib)))
12634 (home-page "http://hylang.org/")
12635 (synopsis "Lisp frontend to Python")
12636 (description
12637 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12638 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12639 Python at your fingertips, in Lisp form.")
12640 (license license:expat)))
12641
12642 (define-public python-hissp
12643 (package
12644 (name "python-hissp")
12645 (version "0.2.0")
12646 (source
12647 (origin
12648 (method url-fetch)
12649 (uri (pypi-uri "hissp" version))
12650 (sha256
12651 (base32
12652 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12653 (build-system python-build-system)
12654 (home-page "https://github.com/gilch/hissp")
12655 (synopsis "It's Python with a Lissp")
12656 (description "Hissp is a modular Lisp implementation that compiles to a
12657 functional subset of Python—Syntactic macro metaprogramming with full access
12658 to the Python ecosystem.")
12659 (license license:asl2.0)))
12660
12661 (define-public python2-functools32
12662 (package
12663 (name "python2-functools32")
12664 (version "3.2.3-2")
12665 (source
12666 (origin
12667 (method url-fetch)
12668 (uri (pypi-uri "functools32" version))
12669 (sha256
12670 (base32
12671 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12672 (build-system python-build-system)
12673 (arguments
12674 `(#:python ,python-2
12675 #:tests? #f)) ; no test target
12676 (home-page "https://github.com/MiCHiLU/python-functools32")
12677 (synopsis
12678 "Backport of the functools module from Python 3.2.3")
12679 (description
12680 "This package is a backport of the @code{functools} module from Python
12681 3.2.3 for use with older versions of Python and PyPy.")
12682 (license license:expat)))
12683
12684 (define-public python2-subprocess32
12685 (package
12686 (name "python2-subprocess32")
12687 (version "3.2.7")
12688 (source (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "subprocess32" version))
12691 (sha256
12692 (base32
12693 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12694 (patches
12695 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12696 (build-system python-build-system)
12697 (arguments
12698 `(#:python ,python-2
12699 ;; The test suite fails with Python > 2.7.13:
12700 ;; import test.support
12701 ;; ImportError: No module named support
12702 #:tests? #f
12703 #:phases
12704 (modify-phases %standard-phases
12705 (add-after 'unpack 'patch-/bin/sh
12706 (lambda _
12707 (substitute* '("subprocess32.py"
12708 "test_subprocess32.py")
12709 (("/bin/sh") (which "sh")))
12710 #t)))))
12711 (home-page "https://github.com/google/python-subprocess32")
12712 (synopsis "Backport of the subprocess module from Python 3.2")
12713 (description
12714 "This is a backport of the @code{subprocess} standard library module
12715 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12716 new features. On POSIX systems it is guaranteed to be reliable when used
12717 in threaded applications. It includes timeout support from Python 3.3 but
12718 otherwise matches 3.2’s API.")
12719 (license license:psfl)))
12720
12721 (define-public python2-futures
12722 (package
12723 (name "python2-futures")
12724 (version "3.2.0")
12725 (source
12726 (origin
12727 (method url-fetch)
12728 (uri (pypi-uri "futures" version))
12729 (sha256
12730 (base32
12731 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12732 (build-system python-build-system)
12733 (arguments
12734 `(#:python ,python-2
12735 #:phases
12736 (modify-phases %standard-phases
12737 (replace 'check
12738 (lambda _
12739 (invoke "python" "test_futures.py")
12740 #t)))))
12741 (home-page "https://github.com/agronholm/pythonfutures")
12742 (synopsis
12743 "Backport of the concurrent.futures package from Python 3.2")
12744 (description
12745 "The concurrent.futures module provides a high-level interface for
12746 asynchronously executing callables. This package backports the
12747 concurrent.futures package from Python 3.2")
12748 (license license:bsd-3)))
12749
12750 (define-public python-promise
12751 (package
12752 (name "python-promise")
12753 (version "0.4.2")
12754 (source
12755 (origin
12756 (method url-fetch)
12757 (uri (pypi-uri "promise" version))
12758 (sha256
12759 (base32
12760 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12761 (build-system python-build-system)
12762 ;; Tests wants python-futures, which is a python2 only program, and
12763 ;; can't be found by python-promise at test time.
12764 (arguments `(#:tests? #f))
12765 (home-page "https://github.com/syrusakbary/promise")
12766 (synopsis "Promises/A+ implementation for Python")
12767 (description
12768 "Promises/A+ implementation for Python")
12769 (properties `((python2-variant . ,(delay python2-promise))))
12770 (license license:expat)))
12771
12772 (define-public python2-promise
12773 (let ((promise (package-with-python2
12774 (strip-python2-variant python-promise))))
12775 (package/inherit promise
12776 (arguments (substitute-keyword-arguments (package-arguments promise)
12777 ((#:tests? _) #t)))
12778 (native-inputs
12779 `(("python2-futures" ,python2-futures)
12780 ("python2-pytest" ,python2-pytest)
12781 ,@(package-native-inputs promise))))))
12782
12783 (define-public python-progressbar2
12784 (package
12785 (name "python-progressbar2")
12786 (version "3.51.3")
12787 (source
12788 (origin
12789 (method url-fetch)
12790 (uri (pypi-uri "progressbar2" version))
12791 (sha256
12792 (base32
12793 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
12794 (build-system python-build-system)
12795 (propagated-inputs
12796 `(("python-six" ,python-six)
12797 ("python-utils" ,python-utils)))
12798 (native-inputs
12799 `(("python-flake8" ,python-flake8)
12800 ("python-freezegun" ,python-freezegun)
12801 ("python-pycodestyle" ,python-pycodestyle)
12802 ("python-pytest" ,python-pytest)
12803 ("python-pytest-cache" ,python-pytest-cache)
12804 ("python-pytest-cov" ,python-pytest-cov)
12805 ("python-pytest-flakes" ,python-pytest-flakes)
12806 ("python-pytest-pep8" ,python-pytest-pep8)
12807 ("python-sphinx" ,python-sphinx)))
12808 (home-page "https://github.com/WoLpH/python-progressbar")
12809 (synopsis "Text progress bar library for Python")
12810 (description
12811 "This package provides a Python progressbar library to provide
12812 visual (yet text based) progress to long running operations.")
12813 (license license:bsd-3)))
12814
12815 (define-public python-progressbar33
12816 (package
12817 (name "python-progressbar33")
12818 (version "2.4")
12819 (source
12820 (origin
12821 (method url-fetch)
12822 (uri (pypi-uri "progressbar33" version))
12823 (sha256
12824 (base32
12825 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
12826 (build-system python-build-system)
12827 (home-page "https://github.com/germangh/python-progressbar")
12828 (synopsis "Text progress bar library for Python")
12829 (description
12830 "This package provides a text progress bar library for Python. This
12831 version only differs from the original @code{progressbar} package in that it
12832 uses relative package imports instead of absolute imports, which is necessary
12833 for the module to work under Python 3.3.")
12834 ;; Either or both of these licenses may be selected.
12835 (license (list license:lgpl2.1+ license:bsd-3))))
12836
12837 (define-public python-colorama
12838 (package
12839 (name "python-colorama")
12840 (version "0.4.4")
12841 (source
12842 (origin
12843 (method url-fetch)
12844 (uri (pypi-uri "colorama" version))
12845 (sha256
12846 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
12847 (build-system python-build-system)
12848 (synopsis "Colored terminal text rendering for Python")
12849 (description "Colorama is a Python library for rendering colored terminal
12850 text.")
12851 (home-page "https://pypi.org/project/colorama/")
12852 (license license:bsd-3)))
12853
12854 (define-public python2-colorama
12855 (package-with-python2 python-colorama))
12856
12857 (define-public python-moto
12858 (package
12859 (name "python-moto")
12860 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
12861 (version "1.3.16.dev134")
12862 (source (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "moto" version))
12865 (sha256
12866 (base32
12867 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
12868 (build-system python-build-system)
12869 (arguments
12870 `(#:phases (modify-phases %standard-phases
12871 (add-after 'unpack 'patch-hardcoded-executable-names
12872 (lambda _
12873 (substitute* "moto/batch/models.py"
12874 (("/bin/sh")
12875 (which "sh")))
12876 (substitute* (find-files "tests" "\\.py$")
12877 (("#!/bin/bash")
12878 (string-append "#!" (which "bash"))))
12879 #t))
12880 (replace 'check
12881 (lambda _
12882 (setenv "PYTHONPATH" (string-append "./build/lib:"
12883 (getenv "PYTHONPATH")))
12884 (invoke "pytest" "-vv" "-m" "not network"
12885 ;; These tests require Docker.
12886 "-k" "not test_terminate_job \
12887 and not test_invoke_function_from_sqs_exception"))))))
12888 (native-inputs
12889 `(("python-flask" ,python-flask)
12890 ("python-flask-cors" ,python-flask-cors)
12891 ("python-freezegun" ,python-freezegun)
12892 ("python-parameterized" ,python-parameterized)
12893 ("python-pytest" ,python-pytest)
12894 ("python-sure" ,python-sure)))
12895 (propagated-inputs
12896 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
12897 ("python-boto" ,python-boto)
12898 ("python-boto3" ,python-boto3)
12899 ("python-botocore" ,python-botocore)
12900 ("python-cfn-lint" ,python-cfn-lint)
12901 ("python-cryptography" ,python-cryptography)
12902 ("python-dateutil" ,python-dateutil)
12903 ("python-docker" ,python-docker)
12904 ("python-idna" ,python-idna)
12905 ("python-jinja2" ,python-jinja2)
12906 ("python-jose" ,python-jose)
12907 ("python-jsondiff" ,python-jsondiff)
12908 ("python-mock" ,python-mock)
12909 ("python-pytz" ,python-pytz)
12910 ("python-pyyaml" ,python-pyyaml)
12911 ("python-requests" ,python-requests)
12912 ("python-responses" ,python-responses)
12913 ("python-six" ,python-six)
12914 ("python-sshpubkeys" ,python-sshpubkeys)
12915 ("python-werkzeug" ,python-werkzeug)
12916 ("python-xmltodict" ,python-xmltodict)))
12917 (home-page "https://github.com/spulec/moto")
12918 (synopsis "Mock out the boto library")
12919 (description
12920 "@code{moto} is a library designed to easily mock out the
12921 @code{boto} library.")
12922 (license license:asl2.0)))
12923
12924 (define-public python-rsa
12925 (package
12926 (name "python-rsa")
12927 (version "3.4.2")
12928 (source
12929 (origin
12930 (method url-fetch)
12931 (uri (pypi-uri "rsa" version))
12932 (sha256
12933 (base32
12934 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
12935 (build-system python-build-system)
12936 (propagated-inputs
12937 `(("python-pyasn1" ,python-pyasn1)))
12938 (synopsis "Pure-Python RSA implementation")
12939 (description "Python-RSA is a pure-Python RSA implementation. It supports
12940 encryption and decryption, signing and verifying signatures, and key
12941 generation according to PKCS#1 version 1.5. It can be used as a Python
12942 library as well as on the command line.")
12943 (home-page "https://stuvel.eu/rsa")
12944 (license license:asl2.0)))
12945
12946 (define-public python2-rsa
12947 (package-with-python2 python-rsa))
12948
12949 (define-public python-pluggy
12950 (package
12951 (name "python-pluggy")
12952 (version "0.13.1")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (pypi-uri "pluggy" version))
12957 (sha256
12958 (base32
12959 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
12960 (build-system python-build-system)
12961 (native-inputs
12962 `(("python-setuptools-scm" ,python-setuptools-scm)))
12963 (synopsis "Plugin and hook calling mechanism for Python")
12964 (description "Pluggy is an extraction of the plugin manager as used by
12965 Pytest but stripped of Pytest specific details.")
12966 (home-page "https://pypi.org/project/pluggy/")
12967 (properties `((python2-variant . ,(delay python2-pluggy))))
12968 (license license:expat)))
12969
12970 (define-public python2-pluggy
12971 (let ((base (package-with-python2 (strip-python2-variant
12972 python-pluggy))))
12973 (package/inherit
12974 base
12975 (propagated-inputs
12976 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
12977
12978 ;; This package requires python2-importlib-metadata, but that package
12979 ;; ends up needing python2-pluggy via python2-pytest, so we need this
12980 ;; variant to solve the circular dependency.
12981 (define-public python2-pluggy-bootstrap
12982 (hidden-package
12983 (package/inherit
12984 python2-pluggy
12985 (name "python2-pluggy-bootstrap")
12986 (arguments
12987 `(#:tests? #f
12988 ,@(package-arguments python2-pluggy)))
12989 (propagated-inputs
12990 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
12991
12992 (define-public python-plumbum
12993 (package
12994 (name "python-plumbum")
12995 (version "1.7.0")
12996 (source
12997 (origin
12998 (method url-fetch)
12999 (uri (pypi-uri "plumbum" version))
13000 (sha256
13001 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
13002 (build-system python-build-system)
13003 (arguments
13004 `(#:tests? #f)) ;no tests
13005 (native-inputs
13006 ;; XXX: Not actually used since there are no tests but required for
13007 ;; build.
13008 `(("python-pytest" ,python-pytest)))
13009 (home-page "https://plumbum.readthedocs.io")
13010 (synopsis "Python shell combinators library")
13011 (description
13012 "Plumbum is a library of tools for replacing shell scripts with Python
13013 code.")
13014 (license license:expat)))
13015
13016 (define-public python-deprecation
13017 (package
13018 (name "python-deprecation")
13019 (version "2.1.0")
13020 (source
13021 (origin
13022 (method url-fetch)
13023 (uri (pypi-uri "deprecation" version))
13024 (sha256
13025 (base32
13026 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
13027 (build-system python-build-system)
13028 (propagated-inputs
13029 `(("python-packaging" ,python-packaging)))
13030 (native-inputs
13031 `(("python-unittest2" ,python-unittest2)))
13032 (home-page "https://deprecation.readthedocs.io/")
13033 (synopsis "Python library to handle automated deprecations")
13034 (description
13035 "This is a library that enables automated deprecations. It offers the
13036 @code{deprecated()} decorator to wrap functions, providing proper warnings
13037 both in documentation and via Python’s warnings system, as well as the
13038 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
13039 that deprecated code is eventually removed.")
13040 (license license:asl2.0)))
13041
13042 (define-public python-tox
13043 (package
13044 (name "python-tox")
13045 (version "3.20.0")
13046 (source
13047 (origin
13048 (method url-fetch)
13049 (uri (pypi-uri "tox" version))
13050 (sha256
13051 (base32
13052 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
13053 (build-system python-build-system)
13054 (arguments
13055 ;; FIXME: Tests require pytest-timeout, which itself requires
13056 ;; pytest>=2.8.0 for installation.
13057 '(#:tests? #f))
13058 (propagated-inputs
13059 `(("python-filelock" ,python-filelock)
13060 ("python-packaging" ,python-packaging)
13061 ("python-pluggy" ,python-pluggy)
13062 ("python-py" ,python-py)
13063 ("python-six" ,python-six)
13064 ("python-toml" ,python-toml)
13065 ("python-virtualenv" ,python-virtualenv)))
13066 (native-inputs
13067 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
13068 ("python-pytest" ,python-pytest) ; >= 2.3.5
13069 ("python-setuptools-scm" ,python-setuptools-scm)))
13070 (home-page "https://tox.readthedocs.io")
13071 (synopsis "Virtualenv-based automation of test activities")
13072 (description "Tox is a generic virtualenv management and test command line
13073 tool. It can be used to check that a package installs correctly with
13074 different Python versions and interpreters, or run tests in each type of
13075 supported environment, or act as a frontend to continuous integration
13076 servers.")
13077 (license license:expat)))
13078
13079 (define-public python-jmespath
13080 (package
13081 (name "python-jmespath")
13082 (version "0.9.4")
13083 (source
13084 (origin
13085 (method url-fetch)
13086 (uri (pypi-uri "jmespath" version))
13087 (sha256
13088 (base32
13089 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
13090 (build-system python-build-system)
13091 (native-inputs
13092 `(("python-nose" ,python-nose)))
13093 (synopsis "JSON Matching Expressions")
13094 (description "JMESPath (pronounced “james path”) is a Python library that
13095 allows one to declaratively specify how to extract elements from a JSON
13096 document.")
13097 (home-page "https://github.com/jmespath/jmespath.py")
13098 (license license:expat)))
13099
13100 (define-public python2-jmespath
13101 (package-with-python2 python-jmespath))
13102
13103 (define-public python-symengine
13104 (package
13105 (name "python-symengine")
13106 (version "0.6.1")
13107 (source
13108 (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "symengine" version))
13111 (sha256
13112 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
13113 (build-system python-build-system)
13114 (native-inputs
13115 `(("cmake" ,cmake)
13116 ("python-cython" ,python-cython)))
13117 (inputs
13118 `(("symengine" ,symengine)))
13119 (home-page "https://github.com/symengine/symengine.py")
13120 (synopsis "Python library providing wrappers to SymEngine")
13121 (description
13122 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
13123 manipulation library.")
13124 (license license:expat)))
13125
13126 (define-public python-uncertainties
13127 (package
13128 (name "python-uncertainties")
13129 (version "3.1.5")
13130 (source
13131 (origin
13132 (method url-fetch)
13133 (uri (pypi-uri "uncertainties" version))
13134 (sha256
13135 (base32
13136 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
13137 (build-system python-build-system)
13138 ;; While there are test files, there is no "tests" directory, so the tests
13139 ;; fail.
13140 (arguments '(#:tests? #false))
13141 (propagated-inputs
13142 `(("python-future" ,python-future)))
13143 (native-inputs
13144 `(("python-nose" ,python-nose)
13145 ("python-numpy" ,python-numpy)))
13146 (home-page "https://uncertainties-python-package.readthedocs.io/")
13147 (synopsis "Calculations with uncertainties")
13148 (description
13149 "The uncertainties package transparently handles calculations with
13150 numbers with uncertainties. It can also yield the derivatives of any
13151 expression.")
13152 (license license:bsd-3)))
13153
13154 (define-public python-asteval
13155 (package
13156 (name "python-asteval")
13157 (version "0.9.23")
13158 (source
13159 (origin
13160 (method url-fetch)
13161 (uri (pypi-uri "asteval" version))
13162 (sha256
13163 (base32
13164 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
13165 (build-system python-build-system)
13166 (native-inputs
13167 `(("python-pytest" ,python-pytest)))
13168 (home-page "https://github.com/newville/asteval")
13169 (synopsis "Minimalistic evaluator of Python expressions")
13170 (description
13171 "This package provides a minimalistic evaluator of Python expression
13172 using the @code{ast} module")
13173 (license license:expat)))
13174
13175 (define-public python-lmfit
13176 (package
13177 (name "python-lmfit")
13178 (version "1.0.2")
13179 (source
13180 (origin
13181 (method url-fetch)
13182 (uri (pypi-uri "lmfit" version))
13183 (sha256
13184 (base32
13185 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
13186 (build-system python-build-system)
13187 (propagated-inputs
13188 `(("python-asteval" ,python-asteval)
13189 ("python-numpy" ,python-numpy)
13190 ("python-scipy" ,python-scipy)
13191 ("python-uncertainties" ,python-uncertainties)))
13192 (native-inputs
13193 `(("python-pytest" ,python-pytest)))
13194 (home-page "https://lmfit.github.io/lmfit-py/")
13195 (synopsis "Least-Squares minimization with bounds and constraints")
13196 (description
13197 "Lmfit provides a high-level interface to non-linear optimization and
13198 curve fitting problems for Python. It builds on and extends many of the
13199 optimization methods of @code{scipy.optimize}. Initially inspired by (and
13200 named for) extending the Levenberg-Marquardt method from
13201 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
13202 enhancements to optimization and data fitting problems.")
13203 (license license:bsd-3)))
13204
13205 (define-public python-boto
13206 (package
13207 (name "python-boto")
13208 (version "2.49.0")
13209 (source (origin
13210 (method url-fetch)
13211 (uri (pypi-uri "boto" version))
13212 (sha256
13213 (base32
13214 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
13215 (build-system python-build-system)
13216 (arguments
13217 ;; XXX: This package is unmaintained and has problems with newer versions
13218 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
13219 ;; subset of this library, so keep it around for now, but disable tests.
13220 '(#:tests? #f))
13221 (propagated-inputs
13222 `(("python-paramiko" ,python-paramiko)
13223 ("python-requests" ,python-requests)))
13224 (home-page "https://github.com/boto/boto")
13225 (synopsis "Python interfaces for Amazon Web Services")
13226 (description
13227 "This package provides various facilities for interacting with Amazon
13228 Web Services through Python.
13229
13230 This software is unmaintained, and new projects should use @code{boto3} instead.")
13231 (license license:expat)))
13232
13233 (define-public python-botocore
13234 ;; Note: When updating botocore, also make sure that boto3 and awscli
13235 ;; are compatible.
13236 (package
13237 (name "python-botocore")
13238 (version "1.19.22")
13239 (source
13240 (origin
13241 (method url-fetch)
13242 (uri (pypi-uri "botocore" version))
13243 (sha256
13244 (base32
13245 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
13246 (build-system python-build-system)
13247 (arguments
13248 ;; FIXME: Many tests are failing.
13249 '(#:tests? #f))
13250 (propagated-inputs
13251 `(("python-dateutil" ,python-dateutil)
13252 ("python-jmespath" ,python-jmespath)
13253 ("python-urllib3" ,python-urllib3)))
13254 (home-page "https://github.com/boto/botocore")
13255 (synopsis "Low-level interface to AWS")
13256 (description "Botocore is a Python library that provides a low-level
13257 interface to the Amazon Web Services (AWS) API.")
13258 (license license:asl2.0)))
13259
13260 (define-public python2-botocore
13261 (package-with-python2 python-botocore))
13262
13263 (define-public python-boto3
13264 (package
13265 (name "python-boto3")
13266 (version "1.16.22")
13267 (home-page "https://github.com/boto/boto3")
13268 (source (origin
13269 (method git-fetch)
13270 (uri (git-reference (url home-page) (commit version)))
13271 (file-name (git-file-name name version))
13272 (sha256
13273 (base32
13274 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
13275 (arguments
13276 `(#:phases
13277 (modify-phases %standard-phases
13278 (add-after 'unpack 'delete-network-tests
13279 ;; Deleting integration tests because they are trying to connect to AWS.
13280 (lambda _
13281 (delete-file-recursively "tests/integration")
13282 #t)))))
13283 (build-system python-build-system)
13284 (native-inputs
13285 `(("python-nose" ,python-nose)
13286 ("python-mock" ,python-mock)))
13287 (propagated-inputs
13288 `(("python-botocore" ,python-botocore)
13289 ("python-jmespath" ,python-jmespath)
13290 ("python-s3transfer" ,python-s3transfer)))
13291 (synopsis "AWS SDK for Python")
13292 (description
13293 "Boto3 is a Python library for writing programs that interact with
13294 @acronym{AWS,Amazon Web Services}.")
13295 (license license:asl2.0)))
13296
13297 (define-public python-pyfiglet
13298 (package
13299 (name "python-pyfiglet")
13300 (version "0.8.post1")
13301 (source
13302 (origin
13303 (method url-fetch)
13304 (uri (pypi-uri "pyfiglet" version))
13305 (sha256
13306 (base32
13307 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
13308 (build-system python-build-system)
13309 (home-page "https://github.com/pwaller/pyfiglet")
13310 (synopsis "Draw ASCII art big letters in Python")
13311 (description "This module lets you draw large letter from ordinary characters
13312 in pure Python.")
13313 (license license:expat)))
13314
13315 (define-public python-xdo
13316 (package
13317 (name "python-xdo")
13318 (version "0.3")
13319 (source (origin
13320 (method url-fetch)
13321 (uri (string-append
13322 "http://http.debian.net/debian/pool/main/p/python-xdo/"
13323 "python-xdo_" version ".orig.tar.gz"))
13324 (sha256
13325 (base32
13326 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
13327 (build-system python-build-system)
13328 (arguments
13329 '(#:phases
13330 (modify-phases %standard-phases
13331 (add-before 'install 'patch-libxdo-path
13332 ;; Hardcode the path of dynamically loaded libxdo library.
13333 (lambda* (#:key inputs #:allow-other-keys)
13334 (let ((libxdo (string-append
13335 (assoc-ref inputs "xdotool")
13336 "/lib/libxdo.so")))
13337 (substitute* "xdo/_xdo.py"
13338 (("find_library\\(\"xdo\"\\)")
13339 (simple-format #f "\"~a\"" libxdo)))
13340 #t))))
13341 #:tests? #f)) ; no tests provided
13342 (propagated-inputs
13343 `(("python-six" ,python-six)))
13344 (inputs
13345 `(("xdotool" ,xdotool)
13346 ("libX11" ,libx11)))
13347 (home-page "https://tracker.debian.org/pkg/python-xdo")
13348 (synopsis "Python library for simulating X11 keyboard/mouse input")
13349 (description "Provides bindings to libxdo for manipulating X11 via simulated
13350 input. (Note that this is mostly a legacy library; you may wish to look at
13351 python-xdo for newer bindings.)")
13352 (license license:bsd-3)))
13353
13354 (define-public python2-xdo
13355 (package-with-python2 python-xdo))
13356
13357 (define-public python-mako
13358 (package
13359 (name "python-mako")
13360 (version "1.1.3")
13361 (source
13362 (origin
13363 (method url-fetch)
13364 (uri (pypi-uri "Mako" version))
13365 (sha256
13366 (base32
13367 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
13368 (build-system python-build-system)
13369 (arguments
13370 `(#:phases (modify-phases %standard-phases
13371 (replace 'check
13372 (lambda* (#:key tests? #:allow-other-keys)
13373 (if tests?
13374 (invoke "nosetests" "-v")
13375 (format #t "test suite not run~%"))
13376 #t)))))
13377 (propagated-inputs
13378 `(("python-markupsafe" ,python-markupsafe)))
13379 (native-inputs
13380 `(("python-mock" ,python-mock)
13381 ("python-nose" ,python-nose)))
13382 (home-page "https://www.makotemplates.org/")
13383 (synopsis "Templating language for Python")
13384 (description "Mako is a templating language for Python that compiles
13385 templates into Python modules.")
13386 (license license:expat)))
13387
13388 (define-public python2-mako
13389 (package-with-python2 python-mako))
13390
13391 (define-public python-waitress
13392 (package
13393 (name "python-waitress")
13394 (version "1.1.0")
13395 (source
13396 (origin
13397 (method url-fetch)
13398 (uri (pypi-uri "waitress" version))
13399 (patches (search-patches "python-waitress-fix-tests.patch"))
13400 (sha256
13401 (base32
13402 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
13403 (build-system python-build-system)
13404 (home-page "https://github.com/Pylons/waitress")
13405 (synopsis "Waitress WSGI server")
13406 (description "Waitress is meant to be a production-quality pure-Python WSGI
13407 server with very acceptable performance.")
13408 (license license:zpl2.1)))
13409
13410 (define-public python2-waitress
13411 (package-with-python2 python-waitress))
13412
13413 (define-public python-whichcraft
13414 (package
13415 (name "python-whichcraft")
13416 (version "0.6.1")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "whichcraft" version))
13421 (sha256
13422 (base32
13423 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
13424 (build-system python-build-system)
13425 (native-inputs
13426 `(("python-pytest" ,python-pytest)))
13427 (home-page "https://github.com/pydanny/whichcraft")
13428 (synopsis "Cross-platform cross-python shutil.which functionality")
13429 (description
13430 "This package provides a shim of the shutil.which function that's
13431 designed to work across multiple versions of Python.")
13432 (license license:bsd-3)))
13433
13434 (define-public python-cookiecutter
13435 (package
13436 (name "python-cookiecutter")
13437 (version "1.7.3")
13438 (source
13439 (origin
13440 (method url-fetch)
13441 (uri (pypi-uri "cookiecutter" version))
13442 (sha256
13443 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
13444 (build-system python-build-system)
13445 (native-inputs
13446 `(("python-freezegun" ,python-freezegun)
13447 ("python-pytest" ,python-pytest)
13448 ("python-pytest-catchlog" ,python-pytest-catchlog)
13449 ("python-pytest-cov" ,python-pytest-cov)
13450 ("python-pytest-mock" ,python-pytest-mock)))
13451 (propagated-inputs
13452 `(("python-binaryornot" ,python-binaryornot)
13453 ("python-click" ,python-click)
13454 ("python-future" ,python-future)
13455 ("python-jinja2" ,python-jinja2)
13456 ("python-jinja2-time" ,python-jinja2-time)
13457 ("python-poyo" ,python-poyo)
13458 ("python-requests" ,python-requests)
13459 ("python-slugify" ,python-slugify)
13460 ("python-text-unidecode" ,python-text-unidecode)
13461 ("python-whichcraft" ,python-whichcraft)))
13462 (home-page "https://github.com/cookiecutter/cookiecutter")
13463 (synopsis
13464 "Command-line utility that creates projects from project templates")
13465 (description
13466 "This package provides a command-line utility that creates projects from
13467 project templates, e.g. creating a Python package project from a Python package
13468 project template.")
13469 (license license:bsd-3)))
13470
13471 (define-public python-pyquery
13472 (package
13473 (name "python-pyquery")
13474 (version "1.2.17")
13475 (source
13476 (origin
13477 (method url-fetch)
13478 (uri (pypi-uri "pyquery" version))
13479 (sha256
13480 (base32
13481 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
13482 (build-system python-build-system)
13483 (native-inputs
13484 `(("python-webob" ,python-webob)
13485 ("python-webtest" ,python-webtest)))
13486 (propagated-inputs
13487 `(("python-lxml" ,python-lxml)
13488 ("python-cssselect" ,python-cssselect)))
13489 (home-page "https://github.com/gawel/pyquery")
13490 (synopsis "Make jQuery-like queries on xml documents")
13491 (description "pyquery allows you to make jQuery queries on xml documents.
13492 The API is as much as possible the similar to jQuery. pyquery uses lxml for
13493 fast xml and html manipulation.")
13494 (license license:bsd-3)))
13495
13496 (define-public python-anyjson
13497 (package
13498 (name "python-anyjson")
13499 (version "0.3.3")
13500 (source
13501 (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "anyjson" version))
13504 (sha256
13505 (base32
13506 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
13507 (build-system python-build-system)
13508 (arguments
13509 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
13510 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
13511 ;; whatever) so this transformation needs to be done before the tests
13512 ;; can be run. Maybe we could add a build step to transform beforehand
13513 ;; but it could be annoying/difficult.
13514 ;; We can enable tests for the Python 2 version, though, and do below.
13515 #:tests? #f))
13516 (home-page "https://bitbucket.org/runeh/anyjson/")
13517 (synopsis
13518 "Wraps best available JSON implementation in a common interface")
13519 (description
13520 "Anyjson loads whichever is the fastest JSON module installed
13521 and provides a uniform API regardless of which JSON implementation is used.")
13522 (license license:bsd-3)
13523 (properties `((python2-variant . ,(delay python2-anyjson))))))
13524
13525 (define-public python2-anyjson
13526 (let ((anyjson (package-with-python2
13527 (strip-python2-variant python-anyjson))))
13528 (package/inherit anyjson
13529 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13530 #:tests? #t
13531 ,@(package-arguments anyjson)))
13532 (native-inputs `(("python2-nose" ,python2-nose))))))
13533
13534 (define-public python-amqp
13535 (package
13536 (name "python-amqp")
13537 (version "2.3.2")
13538 (source
13539 (origin
13540 (method url-fetch)
13541 (uri (pypi-uri "amqp" version))
13542 (sha256
13543 (base32
13544 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13545 (build-system python-build-system)
13546 (native-inputs
13547 `(("python-case" ,python-case)
13548 ("python-pytest-sugar" ,python-pytest-sugar)
13549 ("python-mock" ,python-mock)))
13550 (propagated-inputs
13551 `(("python-vine" ,python-vine)))
13552 (home-page "https://github.com/celery/py-amqp")
13553 (synopsis
13554 "Low-level AMQP client for Python (fork of amqplib)")
13555 (description
13556 "This is a fork of amqplib which was originally written by Barry Pederson.
13557 It is maintained by the Celery project, and used by kombu as a pure python
13558 alternative when librabbitmq is not available.")
13559 (license license:lgpl2.1+)
13560 (properties `((python2-variant . ,(delay python2-amqp))))))
13561
13562 (define-public python2-amqp
13563 (let ((amqp (package-with-python2
13564 (strip-python2-variant python-amqp))))
13565 (package/inherit amqp
13566 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13567 ;; unmaintained. Weirdly, does not do this on the python 3
13568 ;; version?
13569 #:tests? #f
13570 ,@(package-arguments amqp))))))
13571
13572 (define-public python-txamqp
13573 (package
13574 (name "python-txamqp")
13575 (version "0.8.2")
13576 (source
13577 (origin
13578 (method url-fetch)
13579 (uri (pypi-uri "txAMQP" version))
13580 (sha256
13581 (base32
13582 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13583 (build-system python-build-system)
13584 (propagated-inputs
13585 `(("python-six" ,python-six)
13586 ("python-twisted" ,python-twisted)))
13587 (home-page "https://github.com/txamqp/txamqp")
13588 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13589 (description
13590 "This package provides a Python library for communicating with AMQP peers
13591 and brokers using the asynchronous networking framework Twisted. It contains
13592 all the necessary code to connect, send and receive messages to/from an
13593 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13594 also includes support for using Thrift RPC over AMQP in Twisted
13595 applications.")
13596 (license license:asl2.0)))
13597
13598 (define-public python2-txamqp
13599 (package-with-python2 python-txamqp))
13600
13601 (define-public python-kombu
13602 (package
13603 (name "python-kombu")
13604 (version "4.2.2")
13605 (source
13606 (origin
13607 (method url-fetch)
13608 (uri (pypi-uri "kombu" version))
13609 (sha256
13610 (base32
13611 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13612 (build-system python-build-system)
13613 (native-inputs
13614 `(("python-mock" ,python-mock)
13615 ("python-case" ,python-case)
13616 ("python-pyro4" ,python-pyro4)
13617 ("python-pytest-sugar" ,python-pytest-sugar)
13618 ("python-pytz" ,python-pytz)))
13619 (propagated-inputs
13620 `(("python-anyjson" ,python-anyjson)
13621 ("python-amqp" ,python-amqp)
13622 ("python-redis" ,python-redis)))
13623 (home-page "https://kombu.readthedocs.io")
13624 (synopsis "Message passing library for Python")
13625 (description "The aim of Kombu is to make messaging in Python as easy as
13626 possible by providing an idiomatic high-level interface for the AMQ protocol,
13627 and also provide proven and tested solutions to common messaging problems.
13628 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13629 message orientation, queuing, routing, reliability and security, for which the
13630 RabbitMQ messaging server is the most popular implementation.")
13631 (license license:bsd-3)
13632 (properties `((python2-variant . ,(delay python2-kombu))))))
13633
13634 (define-public python2-kombu
13635 (let ((kombu (package-with-python2
13636 (strip-python2-variant python-kombu))))
13637 (package/inherit kombu
13638 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13639 ;; It works fine on the python3 variant.
13640 #:tests? #f
13641 ,@(package-arguments kombu)))
13642 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13643 ,@(package-native-inputs kombu))))))
13644
13645 (define-public python-billiard
13646 (package
13647 (name "python-billiard")
13648 (version "3.5.0.5")
13649 (source
13650 (origin
13651 (method url-fetch)
13652 (uri (pypi-uri "billiard" version))
13653 (sha256
13654 (base32
13655 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13656 (build-system python-build-system)
13657 (native-inputs
13658 `(("python-case" ,python-case)
13659 ("python-pytest" ,python-pytest)))
13660 (home-page "https://github.com/celery/billiard")
13661 (synopsis
13662 "Python multiprocessing fork with improvements and bugfixes")
13663 (description
13664 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13665 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13666 pyprocessing package. This standalone variant is intended to be compatible with
13667 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13668 (license license:bsd-3)
13669 (properties `((python2-variant . ,(delay python2-billiard))))))
13670
13671 (define-public python2-billiard
13672 (let ((billiard (package-with-python2
13673 (strip-python2-variant python-billiard))))
13674 (package/inherit billiard
13675 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13676 ("python2-mock" ,python2-mock)
13677 ,@(package-native-inputs billiard))))))
13678
13679 (define-public python-celery
13680 (package
13681 (name "python-celery")
13682 (version "4.2.1")
13683 (source
13684 (origin
13685 (method url-fetch)
13686 (uri (pypi-uri "celery" version))
13687 (sha256
13688 (base32
13689 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13690 (build-system python-build-system)
13691 (arguments
13692 '(;; TODO The tests fail with Python 3.7
13693 ;; https://github.com/celery/celery/issues/4849
13694 #:tests? #f
13695 #:phases
13696 (modify-phases %standard-phases
13697 (add-after 'unpack 'patch-requirements
13698 (lambda _
13699 (substitute* "requirements/test.txt"
13700 (("pytest>=3\\.0,<3\\.3")
13701 "pytest>=3.0"))
13702 #t)))))
13703 (native-inputs
13704 `(("python-case" ,python-case)
13705 ("python-pytest" ,python-pytest)))
13706 (propagated-inputs
13707 `(("python-pytz" ,python-pytz)
13708 ("python-billiard" ,python-billiard)
13709 ("python-kombu" ,python-kombu)))
13710 (home-page "https://celeryproject.org")
13711 (synopsis "Distributed Task Queue")
13712 (description "Celery is an asynchronous task queue/job queue based on
13713 distributed message passing. It is focused on real-time operation, but
13714 supports scheduling as well. The execution units, called tasks, are executed
13715 concurrently on a single or more worker servers using multiprocessing,
13716 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13717 synchronously (wait until ready).")
13718 (license license:bsd-3)
13719 (properties `((python2-variant . ,(delay python2-celery))))))
13720
13721 (define-public python2-celery
13722 (let ((celery (package-with-python2
13723 (strip-python2-variant python-celery))))
13724 (package/inherit celery
13725 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13726 ("python2-mock" ,python2-mock)
13727 ,@(package-native-inputs celery))))))
13728
13729 (define-public python-translitcodec
13730 (package
13731 (name "python-translitcodec")
13732 (version "0.4.0")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "translitcodec" version))
13737 (sha256
13738 (base32
13739 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13740 (build-system python-build-system)
13741 (arguments
13742 `(#:tests? #f)) ; no tests provided
13743 (home-page
13744 "https://github.com/claudep/translitcodec")
13745 (synopsis
13746 "Unicode to 8-bit charset transliteration codec")
13747 (description
13748 "This package contains codecs for transliterating ISO 10646 texts into
13749 best-effort representations using smaller coded character sets (ASCII,
13750 ISO 8859, etc.).")
13751 (license license:expat)))
13752
13753 (define-public python2-translitcodec
13754 (package-with-python2 python-translitcodec))
13755
13756 (define-public python-anyqt
13757 (package
13758 (name "python-anyqt")
13759 (version "0.0.11")
13760 (source
13761 (origin
13762 (method url-fetch)
13763 (uri (pypi-uri "AnyQt" version))
13764 (sha256
13765 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13766 (build-system python-build-system)
13767 (arguments
13768 `(#:tests? #f ;there are no tests
13769 #:phases
13770 (modify-phases %standard-phases
13771 (add-after 'unpack 'delete-files
13772 ;; Delete files related to other operating systems.
13773 (lambda _
13774 (delete-file "AnyQt/QtMacExtras.py")
13775 (delete-file "AnyQt/QtWinExtras.py")
13776 #t)))))
13777 (home-page "https://github.com/ales-erjavec/anyqt")
13778 (synopsis "PyQt4/PyQt5 compatibility layer")
13779 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
13780 (license license:gpl3)))
13781
13782 (define-public python-pyqtgraph
13783 (package
13784 (name "python-pyqtgraph")
13785 (version "0.12.1")
13786 (source
13787 (origin
13788 (method url-fetch)
13789 (uri (pypi-uri "pyqtgraph" version))
13790 (sha256
13791 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
13792 (build-system python-build-system)
13793 (arguments
13794 `(#:phases
13795 (modify-phases %standard-phases
13796 (add-before 'check 'set-home-and-qpa
13797 (lambda _
13798 (setenv "HOME" "/tmp")
13799 (setenv "QT_QPA_PLATFORM" "offscreen")
13800 #t))
13801 (replace 'check
13802 (lambda* (#:key inputs outputs #:allow-other-keys)
13803 (add-installed-pythonpath inputs outputs)
13804 (invoke "pytest" "-vv" "-k"
13805 ;; These tests try to download online data.
13806 (string-append "not test_PolyLineROI"
13807 " and not test_getArrayRegion_axisorder"
13808 " and not test_getArrayRegion"
13809 " and not test_PlotCurveItem"
13810 " and not test_NonUniformImage_colormap"
13811 " and not test_NonUniformImage_lut"
13812 " and not test_ImageItem_axisorder"
13813 " and not test_ImageItem")))))))
13814 (native-inputs
13815 `(("python-pytest" ,python-pytest)
13816 ("python-pytest-cov" ,python-pytest-cov)
13817 ("python-pytest-xdist" ,python-pytest-xdist)))
13818 (inputs
13819 `(("qtbase" ,qtbase-5)))
13820 (propagated-inputs
13821 `(("python-h5py" ,python-h5py)
13822 ("python-numpy" ,python-numpy)
13823 ("python-pyopengl" ,python-pyopengl)
13824 ("python-scipy" ,python-scipy)
13825 ("python-pyqt" ,python-pyqt)))
13826 (home-page "http://www.pyqtgraph.org")
13827 (synopsis "Scientific graphics and GUI library for Python")
13828 (description
13829 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
13830 and PySide6. It is intended for use in mathematics, scientific or engineering
13831 applications.")
13832 (license license:expat)))
13833
13834 (define-public python-qasync
13835 (package
13836 (name "python-qasync")
13837 (version "0.15.0")
13838 (source
13839 (origin
13840 ;; There are no tests in the PyPI tarball.
13841 (method git-fetch)
13842 (uri (git-reference
13843 (url "https://github.com/CabbageDevelopment/qasync/")
13844 (commit (string-append "v" version))))
13845 (file-name (git-file-name name version))
13846 (sha256
13847 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
13848 (build-system python-build-system)
13849 (arguments
13850 `(#:test-target "pytest"
13851 #:phases
13852 (modify-phases %standard-phases
13853 (add-before 'check 'set-qpa
13854 (lambda _
13855 (setenv "QT_QPA_PLATFORM" "offscreen")
13856 #t)))))
13857 (native-inputs
13858 `(("python-pytest" ,python-pytest)
13859 ("python-pytest-runner" ,python-pytest-runner)))
13860 (propagated-inputs
13861 `(("python-pyqt" ,python-pyqt)))
13862 (home-page "https://github.com/CabbageDevelopment/qasync")
13863 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
13864 (description
13865 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
13866 by providing an implementation of the PEP 3156 event-loop.")
13867 (license license:bsd-2)))
13868
13869 (define-public python-editor
13870 (package
13871 (name "python-editor")
13872 (version "1.0.4")
13873 (source
13874 (origin
13875 (method url-fetch)
13876 (uri (pypi-uri "python-editor" version))
13877 (sha256
13878 (base32
13879 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
13880 (build-system python-build-system)
13881 (arguments
13882 '(#:tests? #f)) ;XXX: needs a TTY and an editor
13883 (home-page "https://github.com/fmoo/python-editor")
13884 (synopsis "Programmatically open an editor, capture the result")
13885 (description
13886 "python-editor is a library that provides the editor module for
13887 programmatically interfacing with your system's $EDITOR.")
13888 (license license:asl2.0)))
13889
13890 (define-public python2-editor
13891 (package-with-python2 python-editor))
13892
13893 (define-public python-multiprocessing-logging
13894 (package
13895 (name "python-multiprocessing-logging")
13896 (version "0.3.1")
13897 (home-page "https://github.com/jruere/multiprocessing-logging")
13898 (source (origin
13899 (method git-fetch)
13900 (uri (git-reference
13901 (url home-page)
13902 (commit (string-append "v" version))))
13903 (file-name (git-file-name name version))
13904 (sha256
13905 (base32
13906 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
13907 (build-system python-build-system)
13908 (synopsis "Manage logs from multiple processes")
13909 (description
13910 "This Python module implements a multiprocessing-aware @code{Handler}
13911 that, when set on the root @code{Logger}, will tunnel log records to the
13912 main process so that they are handled correctly.")
13913 (license license:lgpl3+)))
13914
13915 (define-public python-vobject
13916 (package
13917 (name "python-vobject")
13918 (version "0.9.6.1")
13919 (source (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "vobject" version))
13922 (sha256
13923 (base32
13924 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
13925 (build-system python-build-system)
13926 (arguments
13927 '(;; The test suite relies on some non-portable Windows interfaces.
13928 #:tests? #f))
13929 (propagated-inputs
13930 `(("python-dateutil" ,python-dateutil)
13931 ("python-pyicu" ,python-pyicu)))
13932 (synopsis "Parse and generate vCard and vCalendar files")
13933 (description "Vobject is intended to be a full featured Python package for
13934 parsing and generating vCard and vCalendar files. Currently, iCalendar files
13935 are supported and well tested. vCard 3.0 files are supported, and all data
13936 should be imported, but only a few components are understood in a sophisticated
13937 way.")
13938 (home-page "https://eventable.github.io/vobject/")
13939 (license license:asl2.0)))
13940
13941 (define-public python2-vobject
13942 (package-with-python2 python-vobject))
13943
13944 (define-public python-munkres
13945 (package
13946 (name "python-munkres")
13947 (version "1.1.4")
13948 (source (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "munkres" version))
13951 (sha256
13952 (base32
13953 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w"))))
13954 (build-system python-build-system)
13955 (native-inputs `(("python-pytest" ,python-pytest-6)))
13956 (home-page "https://software.clapper.org/munkres/")
13957 (synopsis "Implementation of the Munkres algorithm")
13958 (description "The Munkres module provides an implementation of the Munkres
13959 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
13960 useful for solving the Assignment Problem.")
13961 (license license:bsd-3)))
13962
13963 (define-public python2-munkres
13964 (package-with-python2 python-munkres))
13965
13966 (define-public python-whoosh
13967 (package
13968 (name "python-whoosh")
13969 (version "2.7.4")
13970 (source
13971 (origin
13972 (method url-fetch)
13973 (uri (pypi-uri "Whoosh" version))
13974 (sha256
13975 (base32
13976 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
13977 (build-system python-build-system)
13978 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
13979 (native-inputs
13980 `(("python-pytest" ,python-pytest)))
13981 (home-page "https://bitbucket.org/mchaput/whoosh")
13982 (synopsis "Full text indexing, search, and spell checking library")
13983 (description
13984 "Whoosh is a fast, pure-Python full text indexing, search, and spell
13985 checking library.")
13986 (license license:bsd-2)))
13987
13988 (define-public python2-whoosh
13989 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
13990 (package/inherit whoosh
13991 (propagated-inputs
13992 `(("python2-backport-ssl-match-hostname"
13993 ,python2-backport-ssl-match-hostname)
13994 ,@(package-propagated-inputs whoosh))))))
13995
13996 (define-public python-pathlib
13997 (package
13998 (name "python-pathlib")
13999 (version "1.0.1")
14000 (source (origin
14001 (method url-fetch)
14002 (uri (pypi-uri "pathlib" version))
14003 (sha256
14004 (base32
14005 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
14006 (build-system python-build-system)
14007 ;; The tests depend on the internal "test" module, which does not provide
14008 ;; a stable interface.
14009 (arguments `(#:tests? #f))
14010 (home-page "https://pathlib.readthedocs.org/")
14011 (synopsis "Object-oriented file system paths")
14012 (description "Pathlib offers a set of classes to handle file system paths.
14013 It offers the following advantages over using string objects:
14014
14015 @enumerate
14016 @item No more cumbersome use of os and os.path functions. Everything can
14017 be done easily through operators, attribute accesses, and method calls.
14018 @item Embodies the semantics of different path types. For example,
14019 comparing Windows paths ignores casing.
14020 @item Well-defined semantics, eliminating any inconsistencies or
14021 ambiguities (forward vs. backward slashes, etc.).
14022 @end enumerate
14023
14024 Note: In Python 3.4, pathlib is now part of the standard library. For other
14025 Python versions please consider python-pathlib2 instead, which tracks the
14026 standard library module. This module (python-pathlib) isn't maintained
14027 anymore.")
14028 (license license:expat)))
14029
14030 (define-public python2-pathlib
14031 (package-with-python2 python-pathlib))
14032
14033 (define-public python2-pathlib2
14034 (package
14035 (name "python2-pathlib2")
14036 (version "2.3.5")
14037 (source (origin
14038 (method url-fetch)
14039 (uri (pypi-uri "pathlib2" version))
14040 (sha256
14041 (base32
14042 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
14043 (build-system python-build-system)
14044 ;; We only need the the Python 2 variant, since for Python 3 our minimum
14045 ;; version is 3.4 which already includes this package as part of the
14046 ;; standard library.
14047 (arguments
14048 `(#:python ,python-2))
14049 (propagated-inputs
14050 `(("python2-scandir" ,python2-scandir)
14051 ("python2-six" ,python2-six)))
14052 (home-page "https://pypi.org/project/pathlib2/")
14053 (synopsis "Object-oriented file system paths - backport of standard
14054 pathlib module")
14055 (description "The goal of pathlib2 is to provide a backport of standard
14056 pathlib module which tracks the standard library module, so all the newest
14057 features of the standard pathlib can be used also on older Python versions.
14058
14059 Pathlib offers a set of classes to handle file system paths. It offers the
14060 following advantages over using string objects:
14061
14062 @enumerate
14063 @item No more cumbersome use of os and os.path functions. Everything can
14064 be done easily through operators, attribute accesses, and method calls.
14065 @item Embodies the semantics of different path types. For example,
14066 comparing Windows paths ignores casing.
14067 @item Well-defined semantics, eliminating any inconsistencies or
14068 ambiguities (forward vs. backward slashes, etc.).
14069 @end enumerate")
14070 (license license:expat)))
14071
14072 (define-public python2-pathlib2-bootstrap
14073 (hidden-package
14074 (package
14075 (inherit python2-pathlib2)
14076 (name "python2-pathlib2-bootstrap")
14077 (propagated-inputs
14078 `(("python2-scandir" ,python2-scandir)
14079 ("python2-six" ,python2-six-bootstrap))))))
14080
14081 (define-public python-jellyfish
14082 (package
14083 (name "python-jellyfish")
14084 (version "0.8.8")
14085 (source (origin
14086 (method url-fetch)
14087 (uri (pypi-uri "jellyfish" version))
14088 (sha256
14089 (base32
14090 "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
14091 (build-system python-build-system)
14092 (arguments
14093 `(#:tests? #f ; XXX: Tests cannot find C coded version.
14094 #:phases
14095 (modify-phases %standard-phases
14096 (replace 'check
14097 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14098 (when tests?
14099 (add-installed-pythonpath inputs outputs)
14100 (invoke "pytest" "-vv" "jellyfish/test.py")))))))
14101 (native-inputs
14102 `(("python-pytest" ,python-pytest)))
14103 (home-page "https://github.com/jamesturk/jellyfish")
14104 (synopsis "Approximate and phonetic matching of strings")
14105 (description "Jellyfish uses a variety of string comparison and phonetic
14106 encoding algorithms to do fuzzy string matching.")
14107 (license license:bsd-2)))
14108
14109 (define-public python2-unicodecsv
14110 (package
14111 (name "python2-unicodecsv")
14112 (version "0.14.1")
14113 (source (origin
14114 (method git-fetch)
14115 ;; The test suite is not included in the PyPi release.
14116 ;; https://github.com/jdunck/python-unicodecsv/issues/19
14117 (uri (git-reference
14118 (url "https://github.com/jdunck/python-unicodecsv")
14119 (commit version)))
14120 (file-name (git-file-name name version))
14121 (sha256
14122 (base32
14123 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
14124 (build-system python-build-system)
14125 (arguments
14126 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
14127 #:python ,python-2))
14128 (native-inputs
14129 `(("python2-unittest2" ,python2-unittest2)))
14130 (home-page "https://github.com/jdunck/python-unicodecsv")
14131 (synopsis "Unicode CSV module for Python 2")
14132 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
14133 module, adding support for Unicode strings.")
14134 (license license:bsd-2)))
14135
14136 (define-public python-pdfminer-six
14137 (package
14138 (name "python-pdfminer-six")
14139 (version "20201018")
14140 ;; There are no tests in the PyPI tarball.
14141 (source
14142 (origin
14143 (method git-fetch)
14144 (uri (git-reference
14145 (url "https://github.com/pdfminer/pdfminer.six")
14146 (commit version)))
14147 (file-name (git-file-name name version))
14148 (sha256
14149 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
14150 (build-system python-build-system)
14151 (arguments
14152 `(#:phases
14153 (modify-phases %standard-phases
14154 ;; Tests write to the source tree.
14155 (add-after 'unpack 'make-git-checkout-writable
14156 (lambda _
14157 (for-each make-file-writable (find-files "."))
14158 #t))
14159 (replace 'check
14160 (lambda _
14161 (invoke "make" "test")))
14162 (add-before 'reset-gzip-timestamps 'make-files-writable
14163 (lambda* (#:key outputs #:allow-other-keys)
14164 (let ((out (assoc-ref outputs "out")))
14165 (for-each make-file-writable
14166 (find-files out "\\.gz$"))
14167 #t))))))
14168 (propagated-inputs
14169 `(("python-chardet" ,python-chardet)
14170 ("python-cryptography" ,python-cryptography)
14171 ("python-sortedcontainers" ,python-sortedcontainers)))
14172 (native-inputs
14173 `(("python-nose" ,python-nose)
14174 ("python-tox" ,python-tox)))
14175 (home-page "https://github.com/pdfminer/pdfminer.six")
14176 (synopsis "PDF parser and analyzer")
14177 (description "@code{pdfminer.six} is a community maintained fork of
14178 the original PDFMiner. It is a tool for extracting information from PDF
14179 documents. It focuses on getting and analyzing text data. Pdfminer.six
14180 extracts the text from a page directly from the sourcecode of the PDF. It
14181 can also be used to get the exact location, font or color of the text.")
14182 (license license:expat)))
14183
14184 (define-public python-rarfile
14185 (package
14186 (name "python-rarfile")
14187 (version "4.0")
14188 (source (origin
14189 (method url-fetch)
14190 (uri (pypi-uri "rarfile" version))
14191 (sha256
14192 (base32
14193 "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
14194 (build-system python-build-system)
14195 (arguments
14196 `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
14197 #:phases
14198 (modify-phases %standard-phases
14199 (add-after 'unpack 'patch
14200 (lambda* (#:key inputs #:allow-other-keys)
14201 (substitute* "rarfile.py"
14202 ;; Disable unrar and unar, which are unavailable on Guix.
14203 (("(unrar|unar)=True" all tool) (string-append tool "=False"))
14204 ;; Hardcode path to bsdtar
14205 (("\"bsdtar\"")
14206 (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
14207 #t))
14208 (replace 'check
14209 (lambda* (#:key inputs tests? #:allow-other-keys)
14210 (when tests?
14211 (invoke "pytest" "-vv")))))))
14212 (native-inputs `(("python-pytest" ,python-pytest)))
14213 (inputs `(("libarchive" ,libarchive)))
14214 (home-page "https://github.com/markokr/rarfile")
14215 (synopsis "RAR archive reader for Python")
14216 (description "This is Python module for RAR archive reading. The interface
14217 is made as zipfile like as possible.")
14218 (license license:isc)))
14219
14220 (define-public python-rich
14221 (package
14222 (name "python-rich")
14223 (version "10.2.2")
14224 (source (origin
14225 (method url-fetch)
14226 (uri (pypi-uri "rich" version))
14227 (sha256
14228 (base32
14229 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
14230 (build-system python-build-system)
14231 (arguments
14232 `(#:phases
14233 (modify-phases %standard-phases
14234 (replace 'check
14235 (lambda* (#:key inputs tests? #:allow-other-keys)
14236 (when tests?
14237 (copy-recursively (string-append
14238 (assoc-ref inputs "tests") "/tests")
14239 "tests")
14240 (invoke "python" "-m" "pytest" "-vv")))))))
14241 (propagated-inputs
14242 `(("python-attrs" ,python-attrs)
14243 ("python-colorama" ,python-colorama)
14244 ("python-commonmark" ,python-commonmark)
14245 ("python-ipywidgets" ,python-ipywidgets)
14246 ("python-pygments" ,python-pygments)
14247 ("python-typing-extensions" ,python-typing-extensions)))
14248 (native-inputs
14249 `(("python-pytest" ,python-pytest)
14250 ("tests"
14251 ;; The release on pypi comes without tests. We can't build from this
14252 ;; checkout, though, because installation requires an invocation of
14253 ;; poetry.
14254 ,(origin
14255 (method git-fetch)
14256 (uri (git-reference
14257 (url "https://github.com/willmcgugan/rich")
14258 (commit (string-append "v" version))))
14259 (file-name (git-file-name name version))
14260 (sha256
14261 (base32
14262 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
14263 (home-page "https://github.com/willmcgugan/rich")
14264 (synopsis "Render rich text and more to the terminal")
14265 (description
14266 "This is a Python package for rendering rich text, tables, progress bars,
14267 syntax highlighting, markdown and more to the terminal.")
14268 (license license:expat)))
14269
14270 (define-public python-magic
14271 (package
14272 (name "python-magic")
14273 (version "0.4.15")
14274 (source
14275 (origin
14276 (method url-fetch)
14277 (uri (pypi-uri "python-magic" version))
14278 (sha256
14279 (base32
14280 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
14281 (file-name (string-append name "-" version "-checkout"))))
14282 (build-system python-build-system)
14283 (arguments
14284 ;; The tests are unreliable, so don't run them. The tests fail
14285 ;; under Python3 because they were written for Python2 and
14286 ;; contain import statements that do not work in Python3. One of
14287 ;; the tests fails under Python2 because its assertions are
14288 ;; overly stringent; it relies on comparing output strings which
14289 ;; are brittle and can change depending on the version of
14290 ;; libmagic being used and the system on which the test is
14291 ;; running. In my case, under GuixSD 0.10.0, only one test
14292 ;; failed, and it seems to have failed only because the version
14293 ;; of libmagic that is packaged in Guix outputs a slightly
14294 ;; different (but not wrong) string than the one that the test
14295 ;; expected.
14296 '(#:tests? #f
14297 #:phases (modify-phases %standard-phases
14298 ;; Replace a specific method call with a hard-coded
14299 ;; path to the necessary libmagic.so file in the
14300 ;; store. If we don't do this, then the method call
14301 ;; will fail to find the libmagic.so file, which in
14302 ;; turn will cause any application using
14303 ;; python-magic to fail.
14304 (add-before 'build 'hard-code-path-to-libmagic
14305 (lambda* (#:key inputs #:allow-other-keys)
14306 (let ((file (assoc-ref inputs "file")))
14307 (substitute* "magic.py"
14308 (("ctypes.util.find_library\\('magic'\\)")
14309 (string-append "'" file "/lib/libmagic.so'")))
14310 #t)))
14311 (add-before 'install 'disable-egg-compression
14312 (lambda _
14313 (let ((port (open-file "setup.cfg" "a")))
14314 (display "\n[easy_install]\nzip_ok = 0\n"
14315 port)
14316 (close-port port)
14317 #t))))))
14318 (inputs
14319 ;; python-magic needs to be able to find libmagic.so.
14320 `(("file" ,file)))
14321 (home-page
14322 "https://github.com/ahupp/python-magic")
14323 (synopsis
14324 "File type identification using libmagic")
14325 (description
14326 "This module uses ctypes to access the libmagic file type
14327 identification library. It makes use of the local magic database and
14328 supports both textual and MIME-type output. Note that this module and
14329 the python-file module both provide a \"magic.py\" file; these two
14330 modules, which are different and were developed separately, both serve
14331 the same purpose: to provide Python bindings for libmagic.")
14332 (license license:expat)))
14333
14334 (define-public python2-magic
14335 (package-with-python2 python-magic))
14336
14337 (define-public python2-s3cmd
14338 (package
14339 (name "python2-s3cmd")
14340 (version "1.6.1")
14341 (source
14342 (origin
14343 (method url-fetch)
14344 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
14345 "s3cmd-" version ".tar.gz"))
14346 (sha256
14347 (base32
14348 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
14349 (build-system python-build-system)
14350 (arguments
14351 ;; s3cmd is written for python2 only and contains no tests.
14352 `(#:python ,python-2
14353 #:tests? #f))
14354 (propagated-inputs
14355 `(("python2-dateutil" ,python2-dateutil)
14356 ;; The python-file package also provides a magic.py module.
14357 ;; This is an unfortunate state of affairs; however, s3cmd
14358 ;; fails to install if it cannot find specifically the
14359 ;; python-magic package. Thus we include it, instead of using
14360 ;; python-file. Ironically, s3cmd sometimes works better
14361 ;; without libmagic bindings at all:
14362 ;; https://github.com/s3tools/s3cmd/issues/198
14363 ("python2-magic" ,python2-magic)))
14364 (home-page "https://s3tools.org/s3cmd")
14365 (synopsis "Command line tool for S3-compatible storage services")
14366 (description
14367 "S3cmd is a command line tool for uploading, retrieving and managing data
14368 in storage services that are compatible with the Amazon Simple Storage
14369 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
14370 GnuPG encryption, and more. It also supports management of Amazon's
14371 CloudFront content delivery network.")
14372 (license license:gpl2+)))
14373
14374 (define-public python-pkgconfig
14375 (package
14376 (name "python-pkgconfig")
14377 (version "1.3.1")
14378 (source
14379 (origin
14380 (method url-fetch)
14381 (uri (pypi-uri "pkgconfig" version))
14382 (sha256
14383 (base32
14384 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
14385 (build-system python-build-system)
14386 (native-inputs
14387 `(("python-nose" ,python-nose)))
14388 (inputs
14389 `(("pkg-config" ,pkg-config)))
14390 (arguments
14391 `(#:phases
14392 (modify-phases %standard-phases
14393 (add-before 'build 'patch
14394 ;; Hard-code the path to pkg-config.
14395 (lambda _
14396 (substitute* "pkgconfig/pkgconfig.py"
14397 (("cmd = 'pkg-config")
14398 (string-append "cmd = '" (which "pkg-config"))))
14399 #t))
14400 (replace 'check
14401 (lambda _
14402 (invoke "nosetests" "test.py"))))))
14403 (home-page "https://github.com/matze/pkgconfig")
14404 (synopsis "Python interface for pkg-config")
14405 (description "This module provides a Python interface to pkg-config. It
14406 can be used to find all pkg-config packages, check if a package exists,
14407 check if a package meets certain version requirements, query CFLAGS and
14408 LDFLAGS and parse the output to build extensions with setup.py.")
14409 (license license:expat)))
14410
14411 (define-public python2-pkgconfig
14412 (package-with-python2 python-pkgconfig))
14413
14414 (define-public python-bz2file
14415 (package
14416 (name "python-bz2file")
14417 (version "0.98")
14418 (source
14419 (origin
14420 (method url-fetch)
14421 (uri (pypi-uri "bz2file" version))
14422 (sha256
14423 (base32
14424 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
14425 (build-system python-build-system)
14426 (arguments
14427 `(#:tests? #f)) ; Tests use deprecated python modules.
14428 (home-page "https://github.com/nvawda/bz2file")
14429 (synopsis "Read and write bzip2-compressed files")
14430 (description
14431 "Bz2file is a Python library for reading and writing bzip2-compressed
14432 files. It contains a drop-in replacement for the I/O interface in the
14433 standard library's @code{bz2} module, including features from the latest
14434 development version of CPython that are not available in older releases.")
14435 (license license:asl2.0)))
14436
14437 (define-public python2-bz2file
14438 (package-with-python2 python-bz2file))
14439
14440 (define-public python-future
14441 (package
14442 (name "python-future")
14443 (version "0.17.1")
14444 (source
14445 (origin
14446 (method url-fetch)
14447 (uri (pypi-uri "future" version))
14448 (sha256
14449 (base32
14450 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
14451 (build-system python-build-system)
14452 ;; Many tests connect to the network or are otherwise flawed.
14453 ;; https://github.com/PythonCharmers/python-future/issues/210
14454 (arguments
14455 `(#:tests? #f))
14456 (home-page "https://python-future.org")
14457 (synopsis "Single-source support for Python 3 and 2")
14458 (description
14459 "@code{python-future} is the missing compatibility layer between Python 2 and
14460 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
14461 to support both Python 2 and Python 3 with minimal overhead.")
14462 (license license:expat)))
14463
14464 (define-public python2-future
14465 (package-with-python2 python-future))
14466
14467 (define-public python-cysignals
14468 (package
14469 (name "python-cysignals")
14470 (version "1.9.0")
14471 (source
14472 (origin
14473 (method url-fetch)
14474 (uri (pypi-uri "cysignals" version))
14475 (sha256
14476 (base32
14477 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
14478 (build-system python-build-system)
14479 (native-inputs
14480 `(("python-cython" ,python-cython)
14481 ("python-sphinx" ,python-sphinx)))
14482 (inputs
14483 `(("pari-gp" ,pari-gp)))
14484 (arguments
14485 `(#:modules ((guix build python-build-system)
14486 ((guix build gnu-build-system) #:prefix gnu:)
14487 (guix build utils))
14488 ;; FIXME: Tests are executed after installation and currently fail
14489 ;; when not installing into standard locations; the author is working
14490 ;; on a fix.
14491 #:tests? #f
14492 #:phases
14493 (modify-phases %standard-phases
14494 (add-before
14495 'build 'configure
14496 (assoc-ref gnu:%standard-phases 'configure)))))
14497 (home-page
14498 "https://github.com/sagemath/cysignals")
14499 (synopsis
14500 "Handling of interrupts and signals for Cython")
14501 (description
14502 "The cysignals package provides mechanisms to handle interrupts (and
14503 other signals and errors) in Cython code, using two related approaches,
14504 for mixed Cython/Python code or external C libraries and pure Cython code,
14505 respectively.")
14506 (license license:lgpl3+)))
14507
14508 (define-public python2-cysignals
14509 (package-with-python2 python-cysignals))
14510
14511 (define-public python2-shedskin
14512 (package
14513 (name "python2-shedskin")
14514 (version "0.9.4")
14515 (source
14516 (origin
14517 (method url-fetch)
14518 (uri (string-append "https://github.com/shedskin/shedskin/"
14519 "releases/download/v" version
14520 "/shedskin-" version ".tgz"))
14521 (sha256
14522 (base32
14523 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
14524 (build-system python-build-system)
14525 (arguments
14526 `(#:python ,python-2
14527 #:phases (modify-phases %standard-phases
14528 (add-after 'unpack 'fix-resulting-include-libs
14529 (lambda* (#:key inputs #:allow-other-keys)
14530 (let ((libgc (assoc-ref inputs "libgc"))
14531 (pcre (assoc-ref inputs "pcre")))
14532 (substitute* "shedskin/makefile.py"
14533 (("variable == 'CCFLAGS':[ ]*")
14534 (string-append "variable == 'CCFLAGS':\n"
14535 " line += ' -I " pcre "/include"
14536 " -I " libgc "/include'"))
14537 (("variable == 'LFLAGS':[ ]*")
14538 (string-append "variable == 'LFLAGS':\n"
14539 " line += ' -L" pcre "/lib"
14540 " -L " libgc "/lib'")))
14541 #t))))))
14542 (inputs `(("pcre" ,pcre)
14543 ("libgc" ,libgc)))
14544 (home-page "https://shedskin.github.io/")
14545 (synopsis "Experimental Python-2 to C++ Compiler")
14546 (description (string-append "This is an experimental compiler for a subset of
14547 Python. It generates C++ code and a Makefile."))
14548 (license (list license:gpl3 license:bsd-3 license:expat))))
14549
14550 (define-public python-rope
14551 (package
14552 (name "python-rope")
14553 (version "0.19.0")
14554 (source
14555 (origin
14556 (method url-fetch)
14557 (uri (pypi-uri "rope" version))
14558 (sha256
14559 (base32
14560 "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4"))))
14561 (build-system python-build-system)
14562 (home-page "https://github.com/python-rope/rope")
14563 (synopsis "Refactoring library for Python")
14564 (description "Rope is a refactoring library for Python. It facilitates
14565 the renaming, moving and extracting of attributes, functions, modules, fields
14566 and parameters in Python 2 source code. These refactorings can also be applied
14567 to occurrences in strings and comments.")
14568 (license license:lgpl3+)))
14569
14570 (define-public python-py3status
14571 (package
14572 (name "python-py3status")
14573 (version "3.21")
14574 (source
14575 (origin
14576 (method url-fetch)
14577 (uri (pypi-uri "py3status" version))
14578 (sha256
14579 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14580 (build-system python-build-system)
14581 (inputs
14582 `(("file" ,file)))
14583 (arguments
14584 '(#:phases
14585 (modify-phases %standard-phases
14586 ;; 'file' is used for detection of configuration file encoding
14587 ;; let's make link the dependency to particular input
14588 (add-before 'build 'patch-file-path
14589 (lambda* (#:key inputs #:allow-other-keys)
14590 (let ((file-path (assoc-ref inputs "file")))
14591 (substitute* "py3status/parse_config.py"
14592 (("\\[\"file\", \"-b\"")
14593 (string-append "['" file-path "/bin/file', '-b'")))
14594 #t))))
14595 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14596 (home-page "https://github.com/ultrabug/py3status")
14597 (synopsis "Extensible i3status wrapper written in Python")
14598 (description "py3status is an i3status wrapper which extends i3status
14599 functionality in a modular way, allowing you to extend your panel with your
14600 own code, responding to click events and updating clock every second.")
14601 (license license:bsd-3)))
14602
14603 (define-public python-tblib
14604 (package
14605 (name "python-tblib")
14606 (version "1.6.0")
14607 (source (origin
14608 (method url-fetch)
14609 (uri (pypi-uri "tblib" version))
14610 (sha256
14611 (base32
14612 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14613 (build-system python-build-system)
14614 (arguments
14615 `(#:phases
14616 (modify-phases %standard-phases
14617 (replace 'check
14618 (lambda _
14619 ;; Upstream runs tests after installation and the package itself
14620 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
14621 ;; found.
14622 (setenv "PYTHONPATH"
14623 (string-append (getcwd) "/build/lib:"
14624 (getenv "PYTHONPATH")))
14625 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14626 (native-inputs
14627 `(("python-pytest" ,python-pytest)
14628 ("python-six" ,python-six)))
14629 (home-page "https://github.com/ionelmc/python-tblib")
14630 (synopsis "Traceback serialization library")
14631 (description
14632 "Traceback serialization allows you to:
14633
14634 @enumerate
14635 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14636 different processes. This allows better error handling when running code over
14637 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14638
14639 @item Parse traceback strings and raise with the parsed tracebacks.
14640 @end enumerate\n")
14641 (license license:bsd-3)))
14642
14643 (define-public python2-tblib
14644 (package-with-python2 python-tblib))
14645
14646 (define-public python-greenlet
14647 (package
14648 (name "python-greenlet")
14649 (version "1.1.1")
14650 (source (origin
14651 (method url-fetch)
14652 (uri (pypi-uri "greenlet" version))
14653 (sha256
14654 (base32
14655 "10gllbrcbazxck84nr7dw3js3gq0rxrsr4kkvy5hg542rms2gwn0"))))
14656 (build-system python-build-system)
14657 (home-page "https://greenlet.readthedocs.io/")
14658 (synopsis "Lightweight in-process concurrent programming")
14659 (description
14660 "Greenlet package is a spin-off of Stackless, a version of CPython
14661 that supports micro-threads called \"tasklets\". Tasklets run
14662 pseudo-concurrently (typically in a single or a few OS-level threads) and
14663 are synchronized with data exchanges on \"channels\".")
14664 (license (list license:psfl license:expat))))
14665
14666 (define-public python-objgraph
14667 (package
14668 (name "python-objgraph")
14669 (version "3.4.1")
14670 (source
14671 (origin
14672 (method url-fetch)
14673 (uri (pypi-uri "objgraph" version))
14674 (sha256
14675 (base32
14676 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14677 (build-system python-build-system)
14678 (propagated-inputs
14679 `(("python-graphviz" ,python-graphviz)))
14680 (native-inputs
14681 `(("python-mock" ,python-mock)
14682 ("graphviz" ,graphviz)))
14683 (home-page "https://mg.pov.lt/objgraph/")
14684 (synopsis "Draw Python object reference graphs with graphviz")
14685 (description
14686 "This package provides tools to draw Python object reference graphs with
14687 graphviz.")
14688 (license license:expat)))
14689
14690 (define-public python2-objgraph
14691 (package-with-python2 python-objgraph))
14692
14693 (define-public python-gevent
14694 (package
14695 (name "python-gevent")
14696 (version "21.1.2")
14697 (source (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "gevent" version))
14700 (sha256
14701 (base32
14702 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14703 (modules '((guix build utils)))
14704 (snippet
14705 '(begin
14706 ;; unbunding libev and c-ares
14707 (delete-file-recursively "deps")))))
14708 (build-system python-build-system)
14709 (arguments
14710 `(#:modules ((ice-9 ftw)
14711 (ice-9 match)
14712 (srfi srfi-26)
14713 (guix build utils)
14714 (guix build python-build-system))
14715 #:phases (modify-phases %standard-phases
14716 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14717 (lambda _
14718 (substitute* "src/gevent/subprocess.py"
14719 (("/bin/sh") (which "sh")))
14720 (for-each (lambda (file)
14721 (substitute* file
14722 (("/bin/sh") (which "sh"))
14723 (("/bin/true") (which "true"))))
14724 (find-files "src/greentest" "\\.py$"))))
14725 (add-before 'build 'do-not-use-bundled-sources
14726 (lambda _
14727 (setenv "GEVENTSETUP_EMBED" "0")
14728
14729 ;; Prevent building bundled libev.
14730 (substitute* "setup.py"
14731 (("run_make=_BUILDING")
14732 "run_make=False"))))
14733 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14734 (lambda* (#:key inputs #:allow-other-keys)
14735 (let ((greenlet (string-append
14736 (assoc-ref inputs "python-greenlet")
14737 "/include")))
14738 (match (scandir greenlet
14739 (lambda (item)
14740 (string-prefix? "python" item)))
14741 ((python)
14742 (setenv "C_INCLUDE_PATH"
14743 (string-append greenlet "/" python ":"
14744 (or (getenv "C_INCLUDE_PATH")
14745 ""))))))))
14746 (add-before 'check 'pretend-to-be-CI
14747 (lambda _
14748 ;; A few tests are skipped due to network constraints or
14749 ;; get longer timeouts when running in a CI environment.
14750 ;; Piggy-back on that, as we need the same adjustments.
14751 (setenv "TRAVIS" "1")
14752 (setenv "APPVEYOR" "1")))
14753 (add-before 'check 'adjust-tests
14754 (lambda _
14755 (let ((disabled-tests
14756 '(;; These tests relies on networking which is
14757 ;; not available in the build container.
14758 "test__getaddrinfo_import.py"
14759 "test__server_pywsgi.py"
14760 ;; XXX: These tests borrow functionality from the
14761 ;; Python builtin 'test' module, but it is not
14762 ;; installed with the Guix Python distribution.
14763 "test_smtpd.py"
14764 "test_wsgiref.py"
14765 "test_urllib2.py"
14766 "test_thread.py"
14767 "test_threading.py"
14768 "test__threading_2.py"
14769 ;; These tests rely on KeyboardInterrupts which do not
14770 ;; work inside the build container for some reason
14771 ;; (lack of controlling terminal?).
14772 "test_subprocess.py"
14773 "test__issues461_471.py"
14774 ;; TODO: Patch out the tests that use getprotobyname, etc
14775 ;; instead of disabling all the tests from these files.
14776 "test__resolver_dnspython.py"
14777 "test__doctests.py"
14778 "test__all__.py"
14779 "test___config.py"
14780 "test__execmodules.py")))
14781 (call-with-output-file "skipped_tests.txt"
14782 (lambda (port)
14783 (format port "~a~%"
14784 (string-join disabled-tests "\n")))))))
14785 (replace 'check
14786 (lambda _
14787 ;; Make sure the build directory is on PYTHONPATH.
14788 (setenv "PYTHONPATH"
14789 (string-append
14790 (getenv "PYTHONPATH") ":"
14791 (getcwd) "/build/"
14792 (car (scandir "build" (cut string-prefix? "lib." <>)))))
14793
14794 ;; Use the build daemons configured number of workers.
14795 (setenv "NWORKERS" (number->string (parallel-job-count)))
14796
14797 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
14798 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
14799 (propagated-inputs
14800 `(("python-greenlet" ,python-greenlet)
14801 ("python-objgraph" ,python-objgraph)
14802 ("python-zope.event" ,python-zope-event)
14803 ("python-zope.interface" ,python-zope-interface)))
14804 (native-inputs
14805 `(("python-six" ,python-six)
14806
14807 ;; For tests.
14808 ("python-dnspython" ,python-dnspython)
14809 ("python-psutil" ,python-psutil)))
14810 (inputs
14811 `(("c-ares" ,c-ares)
14812 ("libev" ,libev)))
14813 (home-page "https://www.gevent.org/")
14814 (synopsis "Coroutine-based network library")
14815 (description
14816 "@code{gevent} is a coroutine-based Python networking library that uses
14817 @code{greenlet} to provide a high-level synchronous API on top of the
14818 @code{libev} event loop.")
14819 (license license:expat)))
14820
14821 (define-public python-fastimport
14822 (package
14823 (name "python-fastimport")
14824 (version "0.9.9")
14825 (source
14826 (origin
14827 (method url-fetch)
14828 (uri (pypi-uri "fastimport" version))
14829 (sha256
14830 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
14831 (build-system python-build-system)
14832 (home-page "https://github.com/jelmer/python-fastimport")
14833 (synopsis "VCS fastimport parser and generator in Python")
14834 (description "This package provides a parser for and generator of the Git
14835 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
14836 format.")
14837 (license license:gpl2+)))
14838
14839 (define-public python-twisted
14840 (package
14841 (name "python-twisted")
14842 (version "19.7.0")
14843 (source (origin
14844 (method url-fetch)
14845 (uri (pypi-uri "Twisted" version ".tar.bz2"))
14846 (sha256
14847 (base32
14848 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
14849 (build-system python-build-system)
14850 (arguments
14851 '(#:tests? #f)) ; FIXME: some tests fail
14852 (propagated-inputs
14853 `(("python-zope-interface" ,python-zope-interface)
14854 ("python-pyhamcrest" ,python-pyhamcrest)
14855 ("python-incremental" ,python-incremental)
14856 ("python-hyperlink" ,python-hyperlink)
14857 ("python-constantly" ,python-constantly)
14858 ("python-automat" ,python-automat)))
14859 (home-page "https://twistedmatrix.com/")
14860 (synopsis "Asynchronous networking framework written in Python")
14861 (description
14862 "Twisted is an extensible framework for Python programming, with special
14863 focus on event-based network programming and multiprotocol integration.")
14864 (license license:expat)))
14865
14866 (define-public python2-twisted
14867 (package-with-python2 python-twisted))
14868
14869 (define-public python-pika
14870 (package
14871 (name "python-pika")
14872 (version "1.2.0")
14873 (source
14874 (origin
14875 (method git-fetch)
14876 (uri (git-reference
14877 (url "https://github.com/pika/pika")
14878 (commit version)))
14879 (file-name (git-file-name name version))
14880 (sha256
14881 (base32
14882 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
14883 (build-system python-build-system)
14884 (arguments
14885 '(#:phases (modify-phases %standard-phases
14886 (add-before 'check 'disable-live-tests
14887 (lambda _
14888 ;; Disable tests that require RabbitMQ, which is not
14889 ;; yet available in Guix.
14890 (substitute* "setup.cfg"
14891 (("tests/unit,tests/acceptance")
14892 "tests/unit"))
14893 (with-directory-excursion "tests"
14894 (for-each delete-file
14895 '("unit/base_connection_tests.py"
14896 "unit/threaded_test_wrapper_test.py")))))
14897 (replace 'check
14898 (lambda _
14899 (invoke "nosetests"))))))
14900 (native-inputs
14901 `(("python-mock" ,python-mock)
14902 ("python-nose" ,python-nose)
14903
14904 ;; These are optional at runtime, and provided here for tests.
14905 ("python-gevent" ,python-gevent)
14906 ("python-tornado" ,python-tornado)
14907 ("python-twisted" ,python-twisted)))
14908 (home-page "https://pika.readthedocs.org")
14909 (synopsis "Pure Python AMQP Client Library")
14910 (description
14911 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
14912 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
14913 network support library.")
14914 (license license:bsd-3)))
14915
14916 (define-public python-ply
14917 (package
14918 (name "python-ply")
14919 (version "3.11")
14920 (source
14921 (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "ply" version))
14924 (sha256
14925 (base32
14926 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
14927 (build-system python-build-system)
14928 (home-page "http://www.dabeaz.com/ply/")
14929 (synopsis "Python Lex & Yacc")
14930 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
14931 It uses LR parsing and does extensive error checking.")
14932 (license license:bsd-3)))
14933
14934 (define-public python-tabulate
14935 (package
14936 (name "python-tabulate")
14937 (version "0.8.9")
14938 (source (origin
14939 (method url-fetch)
14940 (uri (pypi-uri "tabulate" version))
14941 (sha256
14942 (base32
14943 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
14944 (build-system python-build-system)
14945 (arguments
14946 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
14947 ;; and the latest release is not tagged in the upstream repository.
14948 '(#:tests? #f))
14949 (home-page "https://bitbucket.org/astanin/python-tabulate")
14950 (synopsis "Pretty-print tabular data")
14951 (description
14952 "Tabulate is a library and command-line utility to pretty-print tabular
14953 data in Python.")
14954 (license license:expat)))
14955
14956 (define-public python2-tabulate
14957 (package-with-python2 python-tabulate))
14958
14959 (define-public python-kazoo
14960 (package
14961 (name "python-kazoo")
14962 (version "2.4.0")
14963 (source
14964 (origin
14965 (method url-fetch)
14966 (uri (pypi-uri "kazoo" version))
14967 (sha256
14968 (base32
14969 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
14970 (build-system python-build-system)
14971 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
14972 (propagated-inputs
14973 `(("python-six" ,python-six)))
14974 (home-page "https://kazoo.readthedocs.org")
14975 (synopsis "High-level Zookeeper client library")
14976 (description
14977 "Kazoo is a Python client library for the Apache Zookeeper distributed
14978 application service. It is designed to be easy to use and to avoid common
14979 programming errors.")
14980 (license license:asl2.0)))
14981
14982 (define-public python2-kazoo
14983 (package-with-python2 python-kazoo))
14984
14985 (define-public python-pykafka
14986 (package
14987 (name "python-pykafka")
14988 (version "2.4.0")
14989 (source (origin
14990 (method url-fetch)
14991 (uri (pypi-uri "pykafka" version))
14992 (sha256
14993 (base32
14994 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
14995 (build-system python-build-system)
14996 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
14997 (propagated-inputs
14998 `(("python-gevent" ,python-gevent)
14999 ("python-kazoo" ,python-kazoo)
15000 ("python-tabulate" ,python-tabulate)))
15001 (inputs
15002 `(("librdkafka" ,librdkafka)))
15003 (home-page "https://pykafka.readthedocs.io/")
15004 (synopsis "Apache Kafka client for Python")
15005 (description
15006 "PyKafka is a client for the Apache Kafka distributed messaging system.
15007 It includes Python implementations of Kafka producers and consumers, which
15008 are optionally backed by a C extension built on librdkafka.")
15009 (license license:asl2.0)))
15010
15011 (define-public python-wcwidth
15012 (package
15013 (name "python-wcwidth")
15014 (version "0.1.8")
15015 (source (origin
15016 (method url-fetch)
15017 (uri (pypi-uri "wcwidth" version))
15018 (sha256
15019 (base32
15020 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
15021 (build-system python-build-system)
15022 (home-page "https://github.com/jquast/wcwidth")
15023 (synopsis "Measure number of terminal column cells of wide-character codes")
15024 (description "Wcwidth measures the number of terminal column cells of
15025 wide-character codes. It is useful for those implementing a terminal emulator,
15026 or programs that carefully produce output to be interpreted by one. It is a
15027 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
15028 specified in POSIX.1-2001 and POSIX.1-2008.")
15029 (license license:expat)))
15030
15031 (define-public python2-wcwidth
15032 (package-with-python2 python-wcwidth))
15033
15034 (define-public python2-jsonrpclib
15035 (package
15036 (name "python2-jsonrpclib")
15037 (version "0.1.7")
15038 (source (origin
15039 (method url-fetch)
15040 (uri (pypi-uri "jsonrpclib" version))
15041 (sha256
15042 (base32
15043 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
15044 (build-system python-build-system)
15045 (arguments
15046 `(#:tests? #f
15047 #:python ,python-2))
15048 (home-page "https://github.com/joshmarshall/jsonrpclib/")
15049 (synopsis "Implementation of JSON-RPC specification for Python")
15050 (description
15051 "This library is an implementation of the JSON-RPC specification.
15052 It supports both the original 1.0 specification, as well as the
15053 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
15054 etc.")
15055 (license license:asl2.0)))
15056
15057 (define-public python-chai
15058 (package
15059 (name "python-chai")
15060 (version "1.1.2")
15061 (source (origin
15062 (method url-fetch)
15063 (uri (pypi-uri "chai" version))
15064 (sha256
15065 (base32
15066 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
15067 (build-system python-build-system)
15068 (home-page "https://github.com/agoragames/chai")
15069 (synopsis "Mocking framework for Python")
15070 (description
15071 "Chai provides an api for mocking, stubbing and spying your python
15072 objects, patterned after the Mocha library for Ruby.")
15073 (license license:bsd-3)))
15074
15075 (define-public python2-chai
15076 (package-with-python2 python-chai))
15077
15078 (define-public python-inflection
15079 (package
15080 (name "python-inflection")
15081 (version "0.3.1")
15082 (source
15083 (origin (method url-fetch)
15084 (uri (pypi-uri "inflection" version))
15085 (sha256
15086 (base32
15087 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
15088 (build-system python-build-system)
15089 (native-inputs
15090 `(("python-pytest" ,python-pytest)))
15091 (home-page "https://github.com/jpvanhal/inflection")
15092 (synopsis "Python string transformation library")
15093 (description
15094 "Inflection is a string transformation library. It singularizes
15095 and pluralizes English words, and transforms strings from CamelCase to
15096 underscored string.")
15097 (license license:expat)))
15098
15099 (define-public python2-inflection
15100 (package-with-python2 python-inflection))
15101
15102 (define-public python-pylev
15103 (package
15104 (name "python-pylev")
15105 (version "1.3.0")
15106 (source (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "pylev" version))
15109 (sha256
15110 (base32
15111 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
15112 (build-system python-build-system)
15113 (home-page "https://github.com/toastdriven/pylev")
15114 (synopsis "Levenshtein distance implementation in Python")
15115 (description "Pure Python Levenshtein implementation, based off the
15116 Wikipedia code samples at
15117 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
15118 (license license:bsd-3)))
15119
15120 (define-public python2-pylev
15121 (package-with-python2 python-pylev))
15122
15123 (define-public python-cleo
15124 (package
15125 (name "python-cleo")
15126 (version "0.8.1")
15127 (source (origin
15128 (method url-fetch)
15129 (uri (pypi-uri "cleo" version))
15130 (sha256
15131 (base32
15132 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
15133 (build-system python-build-system)
15134 (native-inputs
15135 `( ;; For testing
15136 ("python-mock" ,python-mock)
15137 ("python-pytest-mock" ,python-pytest-mock)
15138 ("python-pytest" ,python-pytest)))
15139 (propagated-inputs
15140 `(("python-backpack" ,python-backpack)
15141 ("python-clikit" ,python-clikit)
15142 ("python-pastel" ,python-pastel)
15143 ("python-pylev" ,python-pylev)))
15144 (home-page "https://github.com/sdispater/cleo")
15145 (synopsis "Command-line arguments library for Python")
15146 (description
15147 "Cleo allows you to create command-line commands with signature in
15148 docstring and colored output.")
15149 (license license:expat)))
15150
15151 (define-public python2-cleo
15152 (package-with-python2 python-cleo))
15153
15154 (define-public python-tomlkit
15155 (package
15156 (name "python-tomlkit")
15157 (version "0.7.0")
15158 (source
15159 (origin
15160 (method url-fetch)
15161 (uri (pypi-uri "tomlkit" version))
15162 (sha256
15163 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
15164 (build-system python-build-system)
15165 (native-inputs
15166 `(("python-pytest" ,python-pytest)
15167 ("python-pyyaml" ,python-pyyaml)))
15168 (home-page "https://github.com/sdispater/tomlkit")
15169 (synopsis "Style-preserving TOML library")
15170 (description
15171 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
15172 preserves all comments, indentations, whitespace and internal element ordering,
15173 and makes them accessible and editable via an intuitive API. It can also
15174 create new TOML documents from scratch using the provided helpers. Part of the
15175 implementation has been adapted, improved, and fixed from Molten.")
15176 (license license:expat)))
15177
15178 (define-public python-shellingham
15179 (package
15180 (name "python-shellingham")
15181 (version "1.3.2")
15182 (source
15183 (origin
15184 (method url-fetch)
15185 (uri (pypi-uri "shellingham" version))
15186 (sha256
15187 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
15188 (build-system python-build-system)
15189 (arguments
15190 `(#:phases
15191 (modify-phases %standard-phases
15192 (add-after 'unpack 'restore-setup.py
15193 ;; setup.py will return in the next release.
15194 ;; <https://github.com/sarugaku/shellingham/issues/33>
15195 (lambda _
15196 (with-output-to-file "setup.py"
15197 (lambda _
15198 (display "from setuptools import setup\nsetup()\n")))
15199 #t)))))
15200 (home-page "https://github.com/sarugaku/shellingham")
15201 (synopsis "Tool to detect surrounding shell")
15202 (description
15203 "Shellingham detects what shell the current Python executable is
15204 running in.")
15205 (license license:isc)))
15206
15207 (define-public python-memcached
15208 (package
15209 (name "python-memcached")
15210 (version "1.59")
15211 (source
15212 (origin
15213 (method url-fetch)
15214 (uri (pypi-uri "python-memcached" version))
15215 (sha256
15216 (base32
15217 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
15218 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
15219 (build-system python-build-system)
15220 (propagated-inputs `(("python-six" ,python-six)))
15221 (home-page
15222 "https://github.com/linsomniac/python-memcached")
15223 (synopsis "Pure python memcached client")
15224 (description
15225 "This software is a pure Python interface to the memcached memory cache
15226 daemon. It is the client side software which allows storing values in one or
15227 more, possibly remote, memcached servers.")
15228 (license license:psfl)))
15229
15230 (define-public python-clikit
15231 (package
15232 (name "python-clikit")
15233 (version "0.6.2")
15234 (source
15235 (origin
15236 (method url-fetch)
15237 (uri (pypi-uri "clikit" version))
15238 (sha256
15239 (base32
15240 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
15241 (build-system python-build-system)
15242 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
15243 (propagated-inputs
15244 `(("python-crashtest" ,python-crashtest)
15245 ("python-pastel" ,python-pastel)
15246 ("python-pylev" ,python-pylev)))
15247 (home-page "https://github.com/sdispater/clikit")
15248 (synopsis "Group of utilities to build command line interfaces")
15249 (description
15250 "CliKit is a group of utilities to build testable command line
15251 interfaces.")
15252 (properties `((python2-variant . ,(delay python2-clikit))))
15253 (license license:expat)))
15254
15255 (define-public python2-clikit
15256 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
15257 (package/inherit
15258 base
15259 (propagated-inputs
15260 `(("python-enum34" ,python2-enum34)
15261 ("python-typing" ,python2-typing)
15262 ,@(package-propagated-inputs base))))))
15263
15264 (define-public python-msgpack-python
15265 (package
15266 (name "python-msgpack-python")
15267 (version "0.5.6")
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (pypi-uri "msgpack-python" version))
15272 (sha256
15273 (base32
15274 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
15275 (build-system python-build-system)
15276 (home-page "https://msgpack.org/")
15277 (synopsis "Package to deserialize messages in MessagePack binary format")
15278 (description
15279 "MessagePack is an efficient binary serialization format. It lets you
15280 exchange data among multiple languages like JSON. But it's faster and
15281 smaller. Small integers are encoded into a single byte, and typical short
15282 strings require only one extra byte in addition to the strings themselves.")
15283 (license license:asl2.0)))
15284
15285 (define-public python-cachy
15286 (package
15287 (name "python-cachy")
15288 (version "0.3.0")
15289 (source
15290 (origin
15291 (method url-fetch)
15292 (uri (pypi-uri "cachy" version))
15293 (sha256
15294 (base32
15295 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
15296 (build-system python-build-system)
15297 (arguments
15298 '(#:phases
15299 (modify-phases %standard-phases
15300 (replace 'check
15301 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
15302 "pytest"))))))
15303 (native-inputs
15304 `(("memcached" ,memcached)
15305 ("python-fakeredis" ,python-fakeredis)
15306 ("python-flexmock" ,python-flexmock)
15307 ("python-pifpaf" ,python-pifpaf)
15308 ("python-pytest" ,python-pytest)))
15309 (propagated-inputs
15310 `(("python-memcached" ,python-memcached)
15311 ("python-msgpack-python" ,python-msgpack-python)
15312 ("python-redis" ,python-redis)))
15313 (home-page "https://github.com/sdispater/cachy")
15314 (synopsis "Simple yet effective caching library")
15315 (description
15316 "Cachy provides a simple yet effective caching library. A simple but
15317 powerful API: thread-safety; decorator syntax; support for memcached, redis,
15318 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
15319 (license license:expat)))
15320
15321 (define-public poetry
15322 (package
15323 (name "poetry")
15324 (version "1.1.5")
15325 ;; Poetry can only be built from source with Poetry.
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "poetry" version))
15330 (sha256
15331 (base32
15332 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
15333 (build-system python-build-system)
15334 (arguments
15335 `(#:tests? #f ;; Pypi does not have tests.
15336 #:phases
15337 (modify-phases %standard-phases
15338 (add-before 'build 'patch-setup-py
15339 (lambda _
15340 (substitute* "setup.py"
15341 ;; Allow newer versions of python-keyring.
15342 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
15343 ;; TODO: remove after the next release cycle,
15344 ;; when packaging has been updated.
15345 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
15346 #t)))))
15347 (propagated-inputs
15348 `(("python-cachecontrol" ,python-cachecontrol)
15349 ("python-cachy" ,python-cachy)
15350 ("python-cleo" ,python-cleo)
15351 ("python-clikit" ,python-clikit)
15352 ("python-html5lib" ,python-html5lib)
15353 ("python-keyring" ,python-keyring)
15354 ("python-msgpack-transitional" ,python-msgpack-transitional)
15355 ("python-packaging" ,python-packaging)
15356 ("python-pexpect" ,python-pexpect)
15357 ("python-pip" ,python-pip)
15358 ("python-pkginfo" ,python-pkginfo)
15359 ("python-poetry-core" ,python-poetry-core)
15360 ("python-requests" ,python-requests)
15361 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
15362 ("python-shellingham" ,python-shellingham)
15363 ("python-tomlkit" ,python-tomlkit)
15364 ("python-virtualenv" ,python-virtualenv)))
15365 (home-page "https://python-poetry.org")
15366 (synopsis "Python dependency management and packaging made easy")
15367 (description "Poetry is a tool for dependency management and packaging
15368 in Python. It allows you to declare the libraries your project depends on and
15369 it will manage (install/update) them for you.")
15370 (license license:expat)))
15371
15372 (define-public python-lark-parser
15373 (package
15374 (name "python-lark-parser")
15375 (version "0.9.0")
15376 (source (origin
15377 (method url-fetch)
15378 (uri (pypi-uri "lark-parser" version))
15379 (sha256
15380 (base32
15381 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
15382 (build-system python-build-system)
15383 (home-page "https://github.com/lark-parser/lark")
15384 (synopsis "Multi-language parser for Python")
15385 (description
15386 "Lark is a parser built with a focus on ergonomics, performance and
15387 resilience. Lark can parse all context-free languages. That means it is
15388 capable of parsing almost any programming language out there, and to
15389 some degree most natural languages too.")
15390 (license license:expat)))
15391
15392 (define-public python-libcst
15393 (package
15394 (name "python-libcst")
15395 (version "0.3.8")
15396 (source (origin
15397 (method url-fetch)
15398 (uri (pypi-uri "libcst" version))
15399 (sha256
15400 (base32
15401 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
15402 (build-system python-build-system)
15403 (arguments
15404 `(#:phases
15405 (modify-phases %standard-phases
15406 (add-after 'unpack 'remove-failing-tests
15407 (lambda _
15408 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
15409 (delete-file "libcst/tests/test_fuzz.py")
15410 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
15411 (delete-file "libcst/tests/test_pyre_integration.py")
15412 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
15413 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
15414 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
15415 #t))
15416 (add-before 'check 'generate-test-data
15417 (lambda _
15418 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
15419 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
15420 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
15421 (replace 'check
15422 (lambda _
15423 (invoke "python" "-m" "unittest")
15424 #t)))))
15425 (native-inputs
15426 `(("python-black" ,python-black)
15427 ("python-isort" ,python-isort)))
15428 (propagated-inputs
15429 `(("python-typing-extensions" ,python-typing-extensions)
15430 ("python-typing-inspect" ,python-typing-inspect)
15431 ("python-pyyaml" ,python-pyyaml)))
15432 (home-page "https://github.com/Instagram/LibCST")
15433 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
15434 (description
15435 "LibCST parses Python source code as a CST tree that keeps all
15436 formatting details (comments, whitespaces, parentheses, etc). It's useful
15437 for building automated refactoring (codemod) applications and linters.
15438 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
15439 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
15440 naming node types and fields, LibCST creates a lossless CST that looks and
15441 feels like an AST.")
15442 (license (list license:expat
15443 ;; Some files unde libcst/_parser/ are under Python Software
15444 ;; Foundation license (see LICENSE file for details)
15445 license:psfl
15446 ;; libcst/_add_slots.py
15447 license:asl2.0))))
15448
15449 (define-public python-typing-inspect
15450 (package
15451 (name "python-typing-inspect")
15452 (version "0.6.0")
15453 (source (origin
15454 (method url-fetch)
15455 (uri (pypi-uri "typing_inspect" version))
15456 (sha256
15457 (base32
15458 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
15459 (build-system python-build-system)
15460 (propagated-inputs
15461 `(("python-mypy-extensions" ,python-mypy-extensions)
15462 ("python-typing-extensions" ,python-typing-extensions)))
15463 (home-page "https://github.com/ilevkivskyi/typing_inspect")
15464 (synopsis "API for inspection of types in the Python @code{typing} module")
15465 (description
15466 "The @code{typing_inspect} module defines experimental API for runtime
15467 inspection of types defined in the Python standard typing module.")
15468 (license license:expat)))
15469
15470 (define-public python-lazy-object-proxy
15471 (package
15472 (name "python-lazy-object-proxy")
15473 (version "1.5.1")
15474 (source (origin
15475 (method url-fetch)
15476 (uri (pypi-uri "lazy-object-proxy" version))
15477 (sha256
15478 (base32
15479 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
15480 (native-inputs
15481 `(("python-setuptools-scm" ,python-setuptools-scm)))
15482 (build-system python-build-system)
15483 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
15484 (synopsis "Lazy object proxy for python")
15485 (description
15486 "Lazy object proxy is an object that wraps a callable but defers the call
15487 until the object is actually required, and caches the result of said call.")
15488 (license license:bsd-2)))
15489
15490 (define-public python2-lazy-object-proxy
15491 (package-with-python2 python-lazy-object-proxy))
15492
15493 (define-public python-dnspython
15494 (package
15495 (name "python-dnspython")
15496 (version "2.1.0")
15497 (source (origin
15498 (method url-fetch)
15499 (uri (pypi-uri "dnspython" version ".zip"))
15500 (sha256
15501 (base32
15502 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15503 (build-system python-build-system)
15504 (native-inputs `(("unzip" ,unzip)))
15505 (arguments '(#:tests? #f)) ; XXX: requires internet access
15506 (home-page "https://www.dnspython.org")
15507 (synopsis "DNS toolkit for Python")
15508 (description
15509 "dnspython is a DNS toolkit for Python. It supports almost all record
15510 types. It can be used for queries, zone transfers, and dynamic updates.
15511 It supports TSIG authenticated messages and EDNS0.")
15512 (license license:expat)))
15513
15514 (define-public python-dnspython-1.16
15515 (package
15516 (inherit python-dnspython)
15517 (version "1.16.0")
15518 (source (origin
15519 (method url-fetch)
15520 (uri (string-append "http://www.dnspython.org/kits/"
15521 version "/dnspython-" version ".tar.gz"))
15522 (sha256
15523 (base32
15524 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15525 (native-inputs '())))
15526
15527 (define-public python2-dnspython-1.16
15528 (package-with-python2 python-dnspython-1.16))
15529
15530 (define-public python-py3dns
15531 (package
15532 (name "python-py3dns")
15533 (version "3.2.1")
15534 (source
15535 (origin
15536 (method url-fetch)
15537 (uri (pypi-uri "py3dns" version))
15538 (sha256
15539 (base32
15540 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15541 (build-system python-build-system)
15542 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15543 ;; removing functionality so we copy from Nix and "just don't build it".
15544 (arguments
15545 `(#:phases
15546 (modify-phases %standard-phases
15547 (add-after 'unpack 'patch-source
15548 (lambda _
15549 (substitute* "setup.py"
15550 (("import DNS") "")
15551 (("DNS.__version__") (string-append "\"" ,version "\"")))
15552 #t)))
15553 #:tests? #f)) ; Also skip the tests.
15554 (home-page "https://launchpad.net/py3dns")
15555 (synopsis "Python 3 DNS library")
15556 (description "This Python 3 module provides a DNS API for looking up DNS
15557 entries from within Python 3 modules and applications. This module is a
15558 simple, lightweight implementation.")
15559 (license license:psfl)))
15560
15561 (define-public python-email-validator
15562 (package
15563 (name "python-email-validator")
15564 (version "1.0.2")
15565 (source
15566 (origin (method url-fetch)
15567 (uri (pypi-uri "email_validator" version))
15568 (sha256
15569 (base32
15570 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15571 (build-system python-build-system)
15572 (arguments
15573 '(#:phases
15574 (modify-phases %standard-phases
15575 (add-before 'build 'use-dnspython
15576 (lambda _
15577 (substitute* "setup.py"
15578 (("dnspython3") "dnspython"))
15579 #t)))))
15580 (propagated-inputs
15581 `(("python-dnspython" ,python-dnspython)
15582 ("python-idna" ,python-idna)))
15583 (home-page "https://github.com/JoshData/python-email-validator")
15584 (synopsis "Email address validation library for Python")
15585 (description
15586 "This library validates email address syntax and deliverability.")
15587 (license license:cc0)))
15588
15589 (define-public python2-email-validator
15590 (package-with-python2 python-email-validator))
15591
15592 (define-public python-ukpostcodeparser
15593 (package
15594 (name "python-ukpostcodeparser")
15595 (version "1.0.3")
15596 (source (origin
15597 (method url-fetch)
15598 (uri (pypi-uri "UkPostcodeParser" version))
15599 (sha256
15600 (base32
15601 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
15602 (build-system python-build-system)
15603 (home-page "https://github.com/hamstah/ukpostcodeparser")
15604 (synopsis "UK Postcode parser for Python")
15605 (description
15606 "This library provides the @code{parse_uk_postcode} function for
15607 parsing UK postcodes.")
15608 (license license:expat)))
15609
15610 (define-public python2-ukpostcodeparser
15611 (package-with-python2 python-ukpostcodeparser))
15612
15613 (define-public python-faker
15614 (package
15615 (name "python-faker")
15616 (version "4.0.2")
15617 (source (origin
15618 (method url-fetch)
15619 (uri (pypi-uri "Faker" version))
15620 (sha256
15621 (base32
15622 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
15623 (build-system python-build-system)
15624 (arguments
15625 '(#:phases
15626 (modify-phases %standard-phases
15627 (replace 'check
15628 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15629 (native-inputs
15630 `(;; For testing
15631 ("python-freezegun" ,python-freezegun)
15632 ("python-pytest" ,python-pytest)
15633 ("python-random2" ,python-random2)
15634 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15635 ("python-validators" ,python-validators)))
15636 (propagated-inputs
15637 `(("python-dateutil" ,python-dateutil)
15638 ("python-text-unidecode" ,python-text-unidecode)))
15639 (home-page "https://github.com/joke2k/faker")
15640 (synopsis "Python package that generates fake data")
15641 (description
15642 "Faker is a Python package that generates fake data such as names,
15643 addresses, and phone numbers.")
15644 (license license:expat)
15645 (properties `((python2-variant . ,(delay python2-faker))))))
15646
15647 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15648 (define-public python2-faker
15649 (let ((base (package-with-python2 (strip-python2-variant
15650 python-faker))))
15651 (package
15652 (inherit base)
15653 (version "3.0.1")
15654 (source (origin
15655 (method url-fetch)
15656 (uri (pypi-uri "Faker" version))
15657 (sha256
15658 (base32
15659 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15660 (native-inputs
15661 `(("python-mock" ,python2-mock)
15662 ,@(package-native-inputs base)))
15663 (propagated-inputs
15664 `(("python2-ipaddress" ,python2-ipaddress)
15665 ("python2-six" ,python2-six)
15666 ,@(package-propagated-inputs base))))))
15667
15668 (define-public python-pyaml
15669 (package
15670 (name "python-pyaml")
15671 (version "18.11.0")
15672 (source (origin
15673 (method url-fetch)
15674 (uri (pypi-uri "pyaml" version))
15675 (sha256
15676 (base32
15677 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15678 (build-system python-build-system)
15679 (native-inputs
15680 `(("python-unidecode" ,python-unidecode)))
15681 (propagated-inputs
15682 `(("python-pyyaml" ,python-pyyaml)))
15683 (home-page "https://github.com/mk-fg/pretty-yaml")
15684 (synopsis "YAML pretty-print library for Python")
15685 (description
15686 "pyaml is a PyYAML based python module to produce pretty and readable
15687 YAML-serialized data.")
15688 (license license:wtfpl2)))
15689
15690 (define-public python2-pyaml
15691 (package-with-python2 python-pyaml))
15692
15693 (define-public python-backpack
15694 (package
15695 (name "python-backpack")
15696 (version "0.1")
15697 (source
15698 (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "backpack" version))
15701 (sha256
15702 (base32
15703 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15704 (build-system python-build-system)
15705 (native-inputs
15706 `(("python-pytest" ,python-pytest)
15707 ("python-nose" ,python-nose)))
15708 (propagated-inputs
15709 `(("python-simplejson" ,python-simplejson)))
15710 (home-page "https://github.com/sdispater/backpack")
15711 (synopsis "Utilities for working with Python collections")
15712 (description "Backpack provides some useful utilities for working with
15713 collections of data.")
15714 (license license:expat)))
15715
15716 (define-public python2-backpack
15717 (package-with-python2 python-backpack))
15718
15719 (define-public python-prompt-toolkit
15720 (package
15721 (name "python-prompt-toolkit")
15722 (version "3.0.18")
15723 (source
15724 (origin
15725 (method url-fetch)
15726 (uri (pypi-uri "prompt_toolkit" version))
15727 (sha256
15728 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15729 (build-system python-build-system)
15730 (arguments
15731 `(#:phases
15732 (modify-phases %standard-phases
15733 (delete 'check)
15734 (add-after 'install 'post-install-check
15735 (lambda* (#:key inputs outputs #:allow-other-keys)
15736 ;; HOME is needed for the test
15737 ;; "test_pathcompleter_can_expanduser".
15738 (setenv "HOME" "/tmp")
15739 (add-installed-pythonpath inputs outputs)
15740 (invoke "py.test"))))))
15741 (propagated-inputs
15742 `(("python-wcwidth" ,python-wcwidth)))
15743 (native-inputs
15744 `(("python-pytest" ,python-pytest)))
15745 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
15746 (synopsis "Library for building command line interfaces in Python")
15747 (description
15748 "Prompt-Toolkit is a library for building interactive command line
15749 interfaces in Python. It's like GNU Readline but it also features syntax
15750 highlighting while typing, out-of-the-box multi-line input editing, advanced
15751 code completion, incremental search, support for Chinese double-width
15752 characters, mouse support, and auto suggestions.")
15753 (license license:bsd-3)
15754 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
15755
15756 (define-public python-prompt-toolkit-2
15757 (package (inherit python-prompt-toolkit)
15758 (name "python-prompt-toolkit")
15759 (version "2.0.7")
15760 (source
15761 (origin
15762 (method url-fetch)
15763 (uri (pypi-uri "prompt_toolkit" version))
15764 (sha256
15765 (base32
15766 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
15767 (propagated-inputs
15768 `(("python-wcwidth" ,python-wcwidth)
15769 ("python-six" ,python-six)
15770 ("python-pygments" ,python-pygments)))
15771 (properties '())))
15772
15773 (define-public python2-prompt-toolkit
15774 (package-with-python2 python-prompt-toolkit-2))
15775
15776 (define-public python-prompt-toolkit-1
15777 (package (inherit python-prompt-toolkit-2)
15778 (version "1.0.15")
15779 (source
15780 (origin
15781 (method url-fetch)
15782 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
15783 (sha256
15784 (base32
15785 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
15786
15787 (define-public python2-prompt-toolkit-1
15788 (package-with-python2 python-prompt-toolkit-1))
15789
15790 (define-public python-jedi
15791 (package
15792 (name "python-jedi")
15793 (version "0.17.2")
15794 (source
15795 (origin
15796 (method url-fetch)
15797 (uri (pypi-uri "jedi" version))
15798 (sha256
15799 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
15800 (build-system python-build-system)
15801 (arguments
15802 `(#:phases
15803 (modify-phases %standard-phases
15804 (replace 'check
15805 (lambda* (#:key tests? #:allow-other-keys)
15806 (when tests?
15807 (setenv "HOME" "/tmp")
15808 (invoke "python" "-m" "pytest" "-vv"))
15809 #t)))))
15810 (native-inputs
15811 `(("python-pytest" ,python-pytest)
15812 ("python-docopt" ,python-docopt)))
15813 (propagated-inputs
15814 `(("python-parso" ,python-parso)))
15815 (home-page "https://github.com/davidhalter/jedi")
15816 (synopsis "Autocompletion and static analysis library for Python")
15817 (description
15818 "Jedi is a static analysis tool for Python that can be used in Integrated
15819 Development Environments (@dfn{IDE}s) and text editors. It understands Python
15820 on a deeper level than many other static analysis frameworks for Python.
15821
15822 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
15823 well.")
15824 (license license:expat)))
15825
15826 (define-public python2-jedi
15827 (package-with-python2 python-jedi))
15828
15829 (define-public ptpython
15830 (package
15831 (name "ptpython")
15832 (version "3.0.17")
15833 (source (origin
15834 (method url-fetch)
15835 (uri (pypi-uri "ptpython" version))
15836 (sha256
15837 (base32
15838 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
15839 (build-system python-build-system)
15840 (arguments
15841 `(#:tests? #f)) ;there are no tests
15842 (propagated-inputs
15843 `(("python-appdirs" ,python-appdirs)
15844 ("python-black" ,python-black)
15845 ("python-jedi" ,python-jedi)
15846 ("python-prompt-toolkit" ,python-prompt-toolkit)
15847 ("python-pygments" ,python-pygments)))
15848 (home-page "https://github.com/jonathanslenders/ptpython")
15849 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
15850 (description
15851 "ptpython is a Python read-eval-print loop with IDE-like features.
15852 It supports syntax highlighting, multiline editing, autocompletion, mouse,
15853 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
15854 etc.")
15855 (license license:bsd-3)
15856 (properties `((python2-variant . ,(delay ptpython-2))))))
15857
15858 (define-public ptpython-2
15859 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
15860 (package/inherit base
15861 (name "ptpython2"))))
15862
15863 (define-public python-easyprocess
15864 (package
15865 (name "python-easyprocess")
15866 (version "0.3")
15867 (source
15868 (origin
15869 (method url-fetch)
15870 (uri (pypi-uri "EasyProcess" version))
15871 (sha256
15872 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
15873 (build-system python-build-system)
15874 (arguments
15875 ;; Tests require pyvirtualdisplay, which requires this package.
15876 `(#:tests? #f))
15877 (home-page "https://github.com/ponty/easyprocess")
15878 (synopsis "Python subprocess interface")
15879 (description
15880 "@code{easyprocess} is an easy to use Python subprocess interface.")
15881 (license license:bsd-3)))
15882
15883 (define-public python-entrypoint2
15884 (package
15885 (name "python-entrypoint2")
15886 (version "0.2.4")
15887 (source
15888 (origin
15889 (method url-fetch)
15890 (uri (pypi-uri "entrypoint2" version))
15891 (sha256
15892 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
15893 (build-system python-build-system)
15894 (arguments
15895 `(#:test-target "pytest"))
15896 (native-inputs
15897 `(("python-easyprocess" ,python-easyprocess)
15898 ("python-pytest" ,python-pytest)
15899 ("python-pytest-runner" ,python-pytest-runner)))
15900 (home-page "https://github.com/ponty/entrypoint2")
15901 (synopsis "Command-line interface for Python modules")
15902 (description
15903 "@code{entrypoint2} is an easy to use command-line interface for Python
15904 modules based on @code{argparse}. It translates function signature and
15905 documentation to argparse configuration.")
15906 (license license:bsd-3)))
15907
15908 (define-public python-pyvirtualdisplay
15909 (package
15910 (name "python-pyvirtualdisplay")
15911 (version "2.1")
15912 (source
15913 (origin
15914 (method url-fetch)
15915 (uri (pypi-uri "PyVirtualDisplay" version))
15916 (sha256
15917 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
15918 (build-system python-build-system)
15919 (arguments
15920 ;; Tests fail with:
15921 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
15922 `(#:tests? #f))
15923 (native-inputs
15924 `(("python-entrypoint2" ,python-entrypoint2)
15925 ("python-psutil" ,python-psutil)
15926 ("python-pytest" ,python-pytest)
15927 ("python-pytest-runner" ,python-pytest-runner)))
15928 (propagated-inputs
15929 `(("python-easyprocess" ,python-easyprocess)
15930 ("python-pillow" ,python-pillow)))
15931 (home-page "https://github.com/ponty/pyvirtualdisplay")
15932 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
15933 (description
15934 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
15935 (license license:bsd-3)))
15936
15937 (define-public python-stem
15938 (package
15939 (name "python-stem")
15940 (version "1.8.0")
15941 (source
15942 (origin
15943 (method url-fetch)
15944 (uri (pypi-uri "stem" version))
15945 (sha256
15946 (base32
15947 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
15948 (build-system python-build-system)
15949 (arguments
15950 `(#:phases
15951 (modify-phases %standard-phases
15952 (replace 'check
15953 (lambda _
15954 (invoke "./run_tests.py" "--unit")
15955 #t)))))
15956 (native-inputs
15957 `(("python-mock" ,python-mock)
15958 ("python-pycodestyle" ,python-pycodestyle)
15959 ("python-pyflakes" ,python-pyflakes)))
15960 (home-page "https://stem.torproject.org/")
15961 (synopsis
15962 "Python controller library that allows applications to interact with Tor")
15963 (description
15964 "Stem is a Python controller library for Tor. With it you can use Tor's
15965 control protocol to script against the Tor process and read descriptor data
15966 relays publish about themselves.")
15967 (license license:lgpl3)))
15968
15969 (define-public python-pyserial
15970 (package
15971 (name "python-pyserial")
15972 (version "3.5")
15973 (source
15974 (origin
15975 (method url-fetch)
15976 (uri (pypi-uri "pyserial" version))
15977 (sha256
15978 (base32
15979 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
15980 (build-system python-build-system)
15981 (arguments
15982 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
15983 ;; #:phases
15984 ;; (modify-phases %standard-phases
15985 ;; (replace 'check
15986 ;; (lambda _
15987 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
15988 (home-page
15989 "https://github.com/pyserial/pyserial")
15990 (synopsis "Python Serial Port Bindings")
15991 (description "@code{pyserial} provide serial port bindings for Python. It
15992 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
15993 and/or Xon/Xoff. The port is accessed in RAW mode.")
15994 (license license:bsd-3)))
15995
15996 (define-public python2-pyserial
15997 (package-with-python2 python-pyserial))
15998
15999 (define-public python-kivy
16000 (package
16001 (name "python-kivy")
16002 (version "1.10.1")
16003 (source
16004 (origin
16005 (method url-fetch)
16006 (uri (pypi-uri "Kivy" version))
16007 (file-name (string-append name "-" version ".tar.gz"))
16008 (sha256
16009 (base32
16010 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
16011 (build-system python-build-system)
16012 (arguments
16013 `(#:tests? #f ; Tests require many optional packages
16014 #:phases
16015 (modify-phases %standard-phases
16016 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
16017 (lambda* (#:key inputs #:allow-other-keys)
16018 (setenv "KIVY_SDL2_PATH"
16019 (string-append (assoc-ref inputs "sdl-union")
16020 "/include/SDL2"))
16021 #t)))))
16022 (native-inputs
16023 `(("pkg-config" ,pkg-config)
16024 ("python-cython" ,python-cython)))
16025 (inputs
16026 `(("gstreamer" ,gstreamer)
16027 ("mesa" ,mesa)
16028 ("sdl-union"
16029 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
16030 (home-page "https://kivy.org")
16031 (synopsis
16032 "Multitouch application framework")
16033 (description
16034 "A software library for rapid development of
16035 hardware-accelerated multitouch applications.")
16036 (license license:expat)))
16037
16038 (define-public python2-kivy
16039 (package-with-python2 python-kivy))
16040
16041 (define-public python-binaryornot
16042 (package
16043 (name "python-binaryornot")
16044 (version "0.4.4")
16045 (source (origin
16046 (method url-fetch)
16047 (uri (pypi-uri "binaryornot" version))
16048 (sha256
16049 (base32
16050 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
16051 (build-system python-build-system)
16052 (arguments
16053 `(#:phases
16054 (modify-phases %standard-phases
16055 (add-after 'unpack 'patch-tests
16056 (lambda _
16057 ;; TypeError: binary() got an unexpected keyword argument
16058 ;; 'average_size'.
16059 (substitute* "tests/test_check.py"
16060 (("average_size=512") ""))
16061 #t)))))
16062 (propagated-inputs
16063 `(("python-chardet" ,python-chardet)
16064 ("python-hypothesis" ,python-hypothesis)))
16065 (home-page "https://github.com/audreyr/binaryornot")
16066 (synopsis "Package to check if a file is binary or text")
16067 (description "Ultra-lightweight pure Python package to check if a file is
16068 binary or text.")
16069 (license license:bsd-3)
16070 (properties `((python2-variant . ,(delay python2-binaryornot))))))
16071
16072 (define-public python2-binaryornot
16073 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
16074 (package/inherit base
16075 (propagated-inputs
16076 `(("python2-enum34" ,python2-enum34)
16077 ,@(package-propagated-inputs base))))))
16078
16079 (define-public python-binwalk
16080 (package
16081 (name "python-binwalk")
16082 (version "2.2.0")
16083 (source
16084 (origin
16085 (method git-fetch)
16086 (uri (git-reference
16087 (url "https://github.com/ReFirmLabs/binwalk")
16088 (commit (string-append "v" version))))
16089 (file-name (git-file-name name version))
16090 (sha256
16091 (base32
16092 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
16093 (build-system python-build-system)
16094 (arguments
16095 `(#:phases
16096 (modify-phases %standard-phases
16097 (add-before 'check 'set-pythonpath
16098 (lambda _
16099 (setenv "PYTHONPATH"
16100 (string-append
16101 (getcwd) "/src/"
16102 ":" (getenv "PYTHONPATH")))
16103 (setenv "HOME" "")
16104 #t)))))
16105 (native-inputs
16106 `(("python-coverage" ,python-coverage)
16107 ("python-nose" ,python-nose)))
16108 (home-page "https://github.com/ReFirmLabs/binwalk")
16109 (synopsis "Firmware analysis tool")
16110 (description "Binwalk is a tool for analyzing, reverse engineering, and
16111 extracting firmware images")
16112 (license license:expat)))
16113
16114 (define-public python-nltk
16115 (package
16116 (name "python-nltk")
16117 (version "3.6.2")
16118 (source (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "nltk" version ".zip"))
16121 (sha256
16122 (base32
16123 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
16124 (build-system python-build-system)
16125 (arguments
16126 '(;; The tests require some extra resources to be downloaded.
16127 ;; TODO Try packaging these resources.
16128 #:tests? #f))
16129 (propagated-inputs
16130 `(("python-click" ,python-click)
16131 ("python-joblib" ,python-joblib)
16132 ("python-regex" ,python-regex)
16133 ("python-tqdm" ,python-tqdm)))
16134 (native-inputs
16135 `(("unzip" ,unzip)))
16136 (home-page "http://nltk.org/")
16137 (synopsis "Natural Language Toolkit")
16138 (description "It provides interfaces to over 50 corpora and lexical
16139 resources such as WordNet, along with a suite of text processing libraries
16140 for classification, tokenization, stemming, tagging, parsing, and semantic
16141 reasoning, wrappers for natural language processing libraries.")
16142 (license license:asl2.0)))
16143
16144 ;; Versions >=3.5 breaks backward-compatibility,
16145 ;; so we keep version 3.4.x around for a while.
16146 (define-public python-nltk-3.4
16147 (package
16148 (inherit python-nltk)
16149 (version "3.4.5")
16150 (source
16151 (origin
16152 (method url-fetch)
16153 (uri (pypi-uri "nltk" version ".zip"))
16154 (sha256
16155 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
16156 (propagated-inputs `(("python-six" ,python-six)))))
16157
16158 (define-public python2-nltk
16159 (package-with-python2 python-nltk))
16160
16161 (define-public python-pymongo
16162 (package
16163 (name "python-pymongo")
16164 (version "3.7.2")
16165 (source (origin
16166 (method url-fetch)
16167 (uri (pypi-uri "pymongo" version))
16168 (sha256
16169 (base32
16170 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
16171 (build-system python-build-system)
16172 (propagated-inputs
16173 `(("python-certifi" ,python-certifi)))
16174 (home-page "https://github.com/mongodb/mongo-python-driver")
16175 (synopsis "Python driver for MongoDB")
16176 (description "Python driver for MongoDB.")
16177 (license license:asl2.0)))
16178
16179 (define-public python2-pymongo
16180 (package-with-python2 python-pymongo))
16181
16182 (define-public python-consul
16183 (package
16184 (name "python-consul")
16185 (version "0.6.1")
16186 (source
16187 (origin
16188 (method url-fetch)
16189 (uri (pypi-uri "python-consul" version))
16190 (sha256
16191 (base32
16192 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
16193 (build-system python-build-system)
16194 (arguments
16195 '(#:tests? #f)) ; The tests are not distributed
16196 (propagated-inputs
16197 `(("python-requests" ,python-requests)
16198 ("python-six" ,python-six)))
16199 (home-page "https://github.com/cablehead/python-consul")
16200 (synopsis "Python client for Consul")
16201 (description
16202 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
16203 discovery, monitoring and configuration.")
16204 (license license:expat)))
16205
16206 (define-public python2-consul
16207 (package-with-python2 python-consul))
16208
16209 (define-public python-schematics
16210 (package
16211 (name "python-schematics")
16212 (version "1.1.1")
16213 (source
16214 (origin
16215 (method git-fetch)
16216 (uri (git-reference
16217 (url "https://github.com/schematics/schematics")
16218 (commit (string-append "v" version))))
16219 (file-name (git-file-name name version))
16220 (sha256
16221 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
16222 (build-system python-build-system)
16223 (propagated-inputs
16224 `(("python-six" ,python-six)))
16225 (arguments
16226 ;; The tests require a bunch of not very nice packages with fixed
16227 ;; version requirements (e.g. python-coveralls).
16228 `(#:tests? #f))
16229 (home-page "https://github.com/schematics/schematics")
16230 (synopsis "Python Data Structures for Humans")
16231 (description "Python Data Structures for Humans.")
16232 (license license:bsd-3)))
16233
16234 (define-public python2-schematics
16235 (package-with-python2 python-schematics))
16236
16237 (define-public python-odfpy
16238 (package
16239 (name "python-odfpy")
16240 (version "1.4.1")
16241 (source (origin
16242 (method url-fetch)
16243 (uri (pypi-uri "odfpy" version))
16244 (sha256
16245 (base32
16246 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
16247 (arguments
16248 `(#:phases
16249 (modify-phases %standard-phases
16250 (replace 'check
16251 (lambda _
16252 (setenv "PYTHONPATH" (string-append "./build/lib:"
16253 (getenv "PYTHONPATH")))
16254 (invoke "pytest" "-vv"))))))
16255 (build-system python-build-system)
16256 (native-inputs
16257 `(("python-pytest" ,python-pytest)))
16258 (propagated-inputs
16259 `(("python-defusedxml" ,python-defusedxml)))
16260 (home-page "https://github.com/eea/odfpy")
16261 (synopsis "Python API and tools to manipulate OpenDocument files")
16262 (description "Collection of libraries and utility programs written in
16263 Python to manipulate OpenDocument 1.2 files.")
16264 (license
16265 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
16266 ;; number of files with other licenses.
16267 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
16268
16269 (define-public python2-odfpy
16270 (package-with-python2 python-odfpy))
16271
16272 (define-public python-natsort
16273 (package
16274 (name "python-natsort")
16275 (version "7.1.1")
16276 (source (origin
16277 (method url-fetch)
16278 (uri (pypi-uri "natsort" version))
16279 (sha256
16280 (base32
16281 "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
16282 (build-system python-build-system)
16283 (arguments
16284 `(#:modules ((guix build utils)
16285 (guix build python-build-system)
16286 (srfi srfi-1)
16287 (srfi srfi-26)
16288 (ice-9 ftw))
16289 #:phases
16290 (modify-phases %standard-phases
16291 (replace 'check
16292 (lambda _
16293 (let ((cwd (getcwd)))
16294 (setenv "PYTHONPATH"
16295 (string-append
16296 cwd "/build/"
16297 (find (cut string-prefix? "lib" <>)
16298 (scandir (string-append cwd "/build")))
16299 ":"
16300 (getenv "PYTHONPATH")))
16301 (invoke "pytest" "-v")))))))
16302 (native-inputs
16303 `(("python-hypothesis" ,python-hypothesis)
16304 ("python-pytest-cov" ,python-pytest-cov)
16305 ("python-pytest-mock" ,python-pytest-mock)
16306 ("python-pytest" ,python-pytest)))
16307 (propagated-inputs ; TODO: Add python-fastnumbers.
16308 `(("python-pyicu" ,python-pyicu)))
16309 (home-page "https://github.com/SethMMorton/natsort")
16310 (synopsis "Natural sorting for python and shell")
16311 (description
16312 "Natsort lets you apply natural sorting on lists instead of
16313 lexicographical. If you use the built-in @code{sorted} method in python
16314 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
16315 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
16316 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
16317 identifies numbers and sorts them separately from strings. It can also sort
16318 version numbers, real numbers, mixed types and more, and comes with a shell
16319 command @command{natsort} that exposes this functionality in the command line.")
16320 (license license:expat)))
16321
16322 (define-public glances
16323 (package
16324 (name "glances")
16325 (version "3.1.7")
16326 (source
16327 (origin
16328 (method url-fetch)
16329 (uri (pypi-uri "Glances" version))
16330 (sha256
16331 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
16332 (modules '((guix build utils)))
16333 (snippet
16334 '(begin
16335 ;; Glances phones PyPI for weekly update checks by default.
16336 ;; Disable these. The user can re-enable them if desired.
16337 (substitute* "glances/outdated.py"
16338 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
16339 (string-append indentation
16340 "self.args.disable_check_update = True\n"
16341 line)))
16342 #t))))
16343 (build-system python-build-system)
16344 (propagated-inputs
16345 `(("python-future" ,python-future)
16346 ("python-psutil" ,python-psutil)))
16347 (home-page "https://github.com/nicolargo/glances")
16348 (synopsis "Cross-platform curses-based monitoring tool")
16349 (description
16350 "Glances is a curses-based monitoring tool for a wide variety of platforms.
16351 Glances uses the PsUtil library to get information from your system. It
16352 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
16353 (license license:lgpl3+)))
16354
16355 (define-public python-glances
16356 (deprecated-package "python-glances" glances))
16357
16358 (define-public python-graphql-core
16359 (package
16360 (name "python-graphql-core")
16361 (version "3.1.2")
16362 (source
16363 (origin
16364 (method url-fetch)
16365 (uri (pypi-uri "graphql-core" version))
16366 (sha256
16367 (base32
16368 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
16369 (build-system python-build-system)
16370 (arguments
16371 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
16372 #:phases
16373 (modify-phases %standard-phases
16374 (add-after 'unpack 'patch-hardcoded-version
16375 (lambda _ (substitute*
16376 "setup.py"
16377 (("'gevent==1.1rc1'") "'gevent'"))
16378 #t)))))
16379 (native-inputs
16380 `(("python-gevent" ,python-gevent)
16381 ("python-mock" ,python-mock)
16382 ("python-pytest-mock" ,python-pytest-mock)))
16383 (propagated-inputs
16384 `(("python-promise" ,python-promise)
16385 ("python-six" ,python-six)))
16386 (home-page "https://github.com/graphql-python/graphql-core")
16387 (synopsis "GraphQL implementation for Python")
16388 (description
16389 "GraphQL implementation for Python. GraphQL is a data query language and
16390 runtime designed and used to request and deliver data to mobile and web apps.
16391 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
16392 to Python.")
16393 (license license:expat)))
16394
16395 (define-public python-graphql-relay
16396 (package
16397 (name "python-graphql-relay")
16398 (version "0.4.5")
16399 (source
16400 (origin
16401 (method url-fetch)
16402 (uri (pypi-uri "graphql-relay" version))
16403 (sha256
16404 (base32
16405 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
16406 (build-system python-build-system)
16407 (arguments
16408 '(#:tests? #f)) ; The tests are not distributed
16409 (propagated-inputs
16410 `(("python-graphql-core" ,python-graphql-core)
16411 ("python-promise" ,python-promise)
16412 ("python-six" ,python-six)))
16413 (home-page "https://github.com/graphql-python/graphql-relay-py")
16414 (synopsis "Relay implementation for Python")
16415 (description
16416 "This is a library to allow the easy creation of Relay-compliant servers
16417 using the GraphQL Python reference implementation of a GraphQL server. It
16418 should be noted that the code is a exact port of the original
16419 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
16420 from Facebook.")
16421 (license license:expat)))
16422
16423 (define-public python-graphene
16424 (package
16425 (name "python-graphene")
16426 (version "0.10.2")
16427 (source
16428 (origin
16429 (method url-fetch)
16430 (uri (pypi-uri "graphene" version))
16431 (sha256
16432 (base32
16433 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
16434 (build-system python-build-system)
16435 (propagated-inputs
16436 `(("python-graphql-core" ,python-graphql-core)
16437 ("python-graphql-relay" ,python-graphql-relay)
16438 ("python-iso8601" ,python-iso8601)
16439 ("python-promise" ,python-promise)
16440 ("python-six" ,python-six)))
16441 (arguments
16442 `(#:tests? #f)) ; no tests/ in the PyPI tarball
16443 (home-page "https://graphene-python.org/")
16444 (synopsis "GraphQL Framework for Python")
16445 (description
16446 "Graphene is a Python library for building GraphQL schemas/types.
16447 A GraphQL schema describes your data model, and provides a GraphQL server
16448 with an associated set of resolve methods that know how to fetch data.")
16449 (license license:expat)))
16450
16451 (define-public python-nautilus
16452 (package
16453 (name "python-nautilus")
16454 (version "0.4.9")
16455 (source
16456 (origin
16457 (method url-fetch)
16458 (uri (pypi-uri "nautilus" version))
16459 (sha256
16460 (base32
16461 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
16462 (build-system python-build-system)
16463 (arguments `(#:tests? #f)) ; fails to import test modules
16464 (propagated-inputs
16465 `(("python-bcrypt" ,python-bcrypt)
16466 ("python-click" ,python-click)
16467 ("python-consul" ,python-consul)
16468 ("python-graphene" ,python-graphene)
16469 ("python-jinja2" ,python-jinja2)
16470 ("python-peewee" ,python-peewee)
16471 ("python-pika" ,python-pika)
16472 ("python-tornado" ,python-tornado)
16473 ("python-wtforms" ,python-wtforms)))
16474 (native-inputs
16475 `(("python-nose2" ,python-nose2)))
16476 (home-page "https://github.com/AlecAivazis/nautilus")
16477 (synopsis "Library for creating microservice applications")
16478 (description
16479 "Nautilus is a framework for flux based microservices that looks to
16480 provide extendible implementations of common aspects of a cloud so that you can
16481 focus on building massively scalable web applications.")
16482 (license license:expat)))
16483
16484 (define-public python-random2
16485 (package
16486 (name "python-random2")
16487 (version "1.0.1")
16488 (source (origin
16489 (method url-fetch)
16490 (uri (pypi-uri "random2" version ".zip"))
16491 (sha256
16492 (base32
16493 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
16494 (build-system python-build-system)
16495 (native-inputs `(("unzip" ,unzip)))
16496 (home-page "http://pypi.python.org/pypi/random2")
16497 (synopsis "Python 3 version of the Python 2 @code{random} module")
16498 (description
16499 "This package provides a Python 3 ported version of Python 2.7’s
16500 @code{random} module. It has also been back-ported to work in Python 2.6.
16501
16502 In Python 3, the implementation of @code{randrange()} was changed, so that
16503 even with the same seed you get different sequences in Python 2 and 3.
16504
16505 This package closes that gap, allowing stable random number generation
16506 between the different Python versions.")
16507 (license license:psfl)))
16508
16509 (define-public python2-random2
16510 (package-with-python2 python-random2))
16511
16512 (define-public python-snowballstemmer
16513 (package
16514 (name "python-snowballstemmer")
16515 (version "2.0.0")
16516 (source (origin
16517 (method url-fetch)
16518 (uri (pypi-uri "snowballstemmer" version))
16519 (sha256
16520 (base32
16521 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16522 (build-system python-build-system)
16523 (arguments
16524 `(;; No tests exist
16525 #:tests? #f))
16526 (home-page "https://github.com/shibukawa/snowball_py")
16527 (synopsis "Snowball stemming library collection for Python")
16528 (description "This package provides 16 word stemmer algorithms generated
16529 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16530 English stemmer.")
16531 (license license:bsd-3)))
16532
16533 (define-public python2-snowballstemmer
16534 (package-with-python2 python-snowballstemmer))
16535
16536 (define-public python-setproctitle
16537 (package
16538 (name "python-setproctitle")
16539 (version "1.1.10")
16540 (source
16541 (origin
16542 (method url-fetch)
16543 (uri (pypi-uri "setproctitle" version))
16544 (sha256
16545 (base32
16546 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16547 (build-system python-build-system)
16548 (arguments
16549 '(#:phases
16550 (modify-phases %standard-phases
16551 (add-before 'check 'patch-Makefile
16552 ;; Stricly this is only required for the python2 variant.
16553 ;; But adding a phase in an inherited package seems to be
16554 ;; cumbersum. So we patch even for python3.
16555 (lambda _
16556 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16557 (when nose
16558 (substitute* "Makefile"
16559 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16560 (string-append nose "/bin/nosetests "))))
16561 #t)))
16562 (replace 'check
16563 (lambda _
16564 (setenv "PYTHON" (or (which "python3") (which "python")))
16565 (setenv "PYCONFIG" (if (which "python3-config")
16566 "python3-config --embed"
16567 "python-config"))
16568 (setenv "CC" "gcc")
16569 ;; No need to extend PYTHONPATH to find the built package, since
16570 ;; the Makefile will build anyway
16571 (invoke "make" "check"))))))
16572 (native-inputs
16573 `(("procps" ,procps))) ; required for tests
16574 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16575 (synopsis
16576 "Setproctitle implementation for Python to customize the process title")
16577 (description "The library allows a process to change its title (as displayed
16578 by system tools such as ps and top).
16579
16580 Changing the title is mostly useful in multi-process systems, for
16581 example when a master process is forked: changing the children's title
16582 allows identifying the task each process is busy with. The technique
16583 is used by PostgreSQL and the OpenSSH Server for example.")
16584 (license license:bsd-3)
16585 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16586
16587 (define-public python2-setproctitle
16588 (let ((base (package-with-python2
16589 (strip-python2-variant python-setproctitle))))
16590 (package/inherit base
16591 (native-inputs `(("python2-nose" ,python2-nose)
16592 ,@(package-native-inputs base))))))
16593
16594 (define-public python-validictory
16595 (package
16596 (name "python-validictory")
16597 (version "1.0.1")
16598 (source
16599 (origin
16600 (method url-fetch)
16601 (uri (pypi-uri "validictory" version))
16602 (sha256
16603 (base32
16604 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16605 (build-system python-build-system)
16606 (arguments
16607 '(#:phases
16608 (modify-phases %standard-phases
16609 (add-after 'unpack 'bootstrap
16610 ;; Move the tests out of the package directory to avoid
16611 ;; packaging them.
16612 (lambda* _
16613 (rename-file "validictory/tests" "tests")
16614 (delete-file "tests/__init__.py")))
16615 (replace 'check
16616 (lambda _
16617 ;; Extend PYTHONPATH so the built package will be found.
16618 (setenv "PYTHONPATH"
16619 (string-append (getcwd) "/build/lib:"
16620 (getenv "PYTHONPATH")))
16621 (invoke "py.test" "-vv" ))))))
16622 (native-inputs
16623 `(("python-pytest" ,python-pytest)))
16624 (home-page
16625 "https://github.com/jamesturk/validictory")
16626 (synopsis "General purpose Python data validator")
16627 (description "It allows validation of arbitrary Python data structures.
16628
16629 The schema format is based on the JSON Schema
16630 proposal (http://json-schema.org), so combined with json the library is also
16631 useful as a validator for JSON data.")
16632 (license license:expat)))
16633
16634 (define-public python2-validictory
16635 (package-with-python2 python-validictory))
16636
16637 (define-public python-pyelftools
16638 (package
16639 (name "python-pyelftools")
16640 (version "0.25")
16641 (source
16642 (origin
16643 (method url-fetch)
16644 (uri (pypi-uri "pyelftools" version))
16645 (sha256
16646 (base32
16647 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
16648 (build-system python-build-system)
16649 (arguments
16650 `(#:phases
16651 (modify-phases %standard-phases
16652 (add-before 'check 'set-pythonpath
16653 (lambda _
16654 (setenv "PYTHONPATH"
16655 (string-append
16656 (getcwd) "/test/"
16657 ":" (getenv "PYTHONPATH")))
16658 #t)))))
16659 (home-page
16660 "https://github.com/eliben/pyelftools")
16661 (synopsis
16662 "Analyze binary and library file information")
16663 (description "This Python library provides interfaces for parsing and
16664 analyzing two binary and library file formats; the Executable and Linking
16665 Format (ELF), and debugging information in the Debugging With Attributed
16666 Record Format (DWARF).")
16667 (license license:public-domain)))
16668
16669 (define-public python-pyev
16670 (package
16671 (name "python-pyev")
16672 (version "0.9.0")
16673 (source
16674 (origin
16675 (method url-fetch)
16676 (uri (pypi-uri "pyev" version))
16677 (sha256
16678 (base32
16679 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
16680 (build-system python-build-system)
16681 (arguments
16682 `(#:tests? #f ; no test suite
16683 #:phases
16684 (modify-phases %standard-phases
16685 (add-after 'unpack 'patch
16686 (lambda* (#:key inputs #:allow-other-keys)
16687 (let ((libev (string-append (assoc-ref inputs "libev")
16688 "/lib/libev.so.4")))
16689 (substitute* "setup.py"
16690 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
16691 (string-append "libev_dll_name = \"" libev "\"")))))))))
16692 (inputs
16693 `(("libev" ,libev)))
16694 (home-page "https://github.com/gabrielfalcao/pyev")
16695 (synopsis "Python libev interface")
16696 (description "Pyev provides a Python interface to libev.")
16697 (license license:gpl3)))
16698
16699 (define-public python2-pyev
16700 (package-with-python2 python-pyev))
16701
16702 (define-public python-imagesize
16703 (package
16704 (name "python-imagesize")
16705 (version "1.2.0")
16706 (source
16707 (origin
16708 (method url-fetch)
16709 (uri (pypi-uri "imagesize" version))
16710 (sha256
16711 (base32
16712 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
16713 (build-system python-build-system)
16714 (home-page "https://github.com/shibukawa/imagesize_py")
16715 (synopsis "Gets image size of files in various formats in Python")
16716 (description
16717 "This package allows determination of image size from
16718 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
16719 (license license:expat)))
16720
16721 (define-public python2-imagesize
16722 (package-with-python2 python-imagesize))
16723
16724 (define-public python-termstyle
16725 (package
16726 (name "python-termstyle")
16727 (version "0.1.11")
16728 (source
16729 (origin
16730 (method url-fetch)
16731 (uri (pypi-uri "termstyle" version))
16732 (sha256
16733 (base32
16734 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
16735 (build-system python-build-system)
16736 (arguments
16737 '(#:phases
16738 (modify-phases %standard-phases
16739 (replace 'check
16740 (lambda _
16741 (invoke "python" "test3.py"))))))
16742 (home-page "https://github.com/gfxmonk/termstyle")
16743 (synopsis "Console text coloring for Python")
16744 (description "This package provides console text coloring for Python.")
16745 (license license:bsd-3)))
16746
16747 (define-public python-argcomplete
16748 (package
16749 (name "python-argcomplete")
16750 (version "1.11.1")
16751 (source
16752 (origin
16753 (method url-fetch)
16754 (uri (pypi-uri "argcomplete" version))
16755 (sha256
16756 (base32
16757 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
16758 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
16759 (build-system python-build-system)
16760 (native-inputs
16761 `(("python-coverage" ,python-coverage)
16762 ("python-flake8" ,python-flake8)
16763 ("python-pexpect" ,python-pexpect)
16764 ("python-wheel" ,python-wheel)
16765 ("tcsh" ,tcsh)
16766 ("fish" ,fish)
16767 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
16768 (home-page "https://github.com/kislyuk/argcomplete")
16769 (synopsis "Shell tab completion for Python argparse")
16770 (description "argcomplete provides extensible command line tab completion
16771 of arguments and options for Python scripts using @code{argparse}. It's
16772 particularly useful for programs with many options or sub-parsers that can
16773 dynamically suggest completions; for example, when browsing resources over the
16774 network.")
16775 (license license:asl2.0)
16776 (properties `((python2-variant . ,(delay python2-argcomplete))))))
16777
16778 (define-public python2-argcomplete
16779 (let ((variant (package-with-python2
16780 (strip-python2-variant python-argcomplete))))
16781 (package/inherit variant
16782 (arguments
16783 (substitute-keyword-arguments (package-arguments variant)
16784 ((#:phases phases '%standard-phases)
16785 `(modify-phases ,phases
16786 (add-after 'unpack 'set-my-HOME
16787 (lambda _ (setenv "HOME" "/tmp")))))))
16788 (native-inputs
16789 `(("python2-importlib-metadata" ,python2-importlib-metadata)
16790 ,@(package-native-inputs variant))))))
16791
16792 (define-public python-csscompressor
16793 (package
16794 (name "python-csscompressor")
16795 (version "0.9.5")
16796 (source
16797 (origin
16798 (method url-fetch)
16799 (uri (pypi-uri "csscompressor" version))
16800 (sha256
16801 (base32
16802 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
16803 (build-system python-build-system)
16804 (arguments
16805 '(#:phases
16806 (modify-phases %standard-phases
16807 (replace 'check
16808 (lambda _
16809 (invoke "py.test"))))))
16810 (native-inputs
16811 `(("python-pytest" ,python-pytest)))
16812 (home-page "https://github.com/sprymix/csscompressor")
16813 (synopsis "Python port of YUI CSS Compressor")
16814 (description
16815 "This package provides a python port of YUI CSS Compressor.")
16816 (license license:bsd-3)))
16817
16818 (define-public python-rcssmin
16819 (package
16820 (name "python-rcssmin")
16821 (version "1.0.6")
16822 (source
16823 (origin
16824 (method url-fetch)
16825 (uri (pypi-uri "rcssmin" version))
16826 (sha256
16827 (base32
16828 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
16829 (build-system python-build-system)
16830 (arguments
16831 '(#:phases
16832 (modify-phases %standard-phases
16833 (replace 'check
16834 (lambda _
16835 (invoke "python" "run_tests.py" "tests"))))))
16836 (home-page "http://opensource.perlig.de/rcssmin/")
16837 (synopsis "CSS Minifier")
16838 (description "The minifier is based on the semantics of the YUI compressor,
16839 which itself is based on the rule list by Isaac Schlueter.")
16840 (license license:asl2.0)))
16841
16842 (define-public python-rjsmin
16843 (package
16844 (name "python-rjsmin")
16845 (version "1.1.0")
16846 (source
16847 (origin
16848 (method url-fetch)
16849 (uri (pypi-uri "rjsmin" version))
16850 (sha256
16851 (base32
16852 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
16853 (modules '((guix build utils)))
16854 (snippet
16855 '(begin
16856 (for-each delete-file (find-files "bench" "\\.js$"))
16857 #t))))
16858 (build-system python-build-system)
16859 (arguments
16860 '(#:tests? #f ; Not all test files included.
16861 #:phases
16862 (modify-phases %standard-phases
16863 (replace 'check
16864 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16865 (add-installed-pythonpath inputs outputs)
16866 (if tests?
16867 (invoke "py.test" "-vv" "tests")
16868 #t))))))
16869 (native-inputs
16870 `(("python-pytest" ,python-pytest)))
16871 (home-page "http://opensource.perlig.de/rjsmin/")
16872 (synopsis "Javascript Minifier")
16873 (description "@code{rJSmin} is a javascript minifier written in Python. The
16874 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
16875 is a re-implementation aiming for speed, so it can be used at runtime (rather
16876 than during a preprocessing step).")
16877 (license license:asl2.0)))
16878
16879 (define-public python-xopen
16880 (package
16881 (name "python-xopen")
16882 (version "0.5.0")
16883 (source
16884 (origin
16885 (method url-fetch)
16886 (uri (pypi-uri "xopen" version))
16887 (sha256
16888 (base32
16889 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
16890 (build-system python-build-system)
16891 (propagated-inputs
16892 `(("python-setuptools-scm" ,python-setuptools-scm)))
16893 (home-page "https://github.com/marcelm/xopen/")
16894 (synopsis "Open compressed files transparently")
16895 (description "This module provides an @code{xopen} function that works like
16896 Python's built-in @code{open} function, but can also deal with compressed files.
16897 Supported compression formats are gzip, bzip2 and, xz, and are automatically
16898 recognized by their file extensions. The focus is on being as efficient as
16899 possible on all supported Python versions.")
16900 (license license:expat)))
16901
16902 (define-public python2-xopen
16903 (let ((base (package-with-python2
16904 (strip-python2-variant python-xopen))))
16905 (package/inherit base
16906 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
16907 ,@(package-propagated-inputs base))))))
16908
16909 (define-public python-cheetah
16910 (package
16911 (name "python-cheetah")
16912 (version "3.2.4")
16913 (source
16914 (origin
16915 (method url-fetch)
16916 (uri (pypi-uri "Cheetah3" version))
16917 (sha256
16918 (base32
16919 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
16920 (build-system python-build-system)
16921 (arguments
16922 `(#:modules ((guix build utils)
16923 (guix build python-build-system)
16924 (ice-9 ftw)
16925 (srfi srfi-1)
16926 (srfi srfi-26))
16927 #:phases (modify-phases %standard-phases
16928 (add-after 'unpack 'use-absolute-python
16929 (lambda _
16930 (substitute* "Cheetah/CheetahWrapper.py"
16931 (("#!/usr/bin/env python")
16932 (string-append "#!" (which "python"))))
16933 #t))
16934 (add-after 'unpack 'fix-tests
16935 (lambda _
16936 (substitute* "Cheetah/Tests/ImportHooks.py"
16937 (("os.path.dirname\\(__file__\\)")
16938 (string-append "'" (getcwd) "/Cheetah/Tests'")))
16939 #t))
16940 (replace 'check
16941 (lambda _
16942 (let ((cwd (getcwd)))
16943 (setenv "PYTHONPATH"
16944 (string-append
16945 cwd "/build/"
16946 (find (cut string-prefix? "lib" <>)
16947 (scandir (string-append cwd "/build")))
16948 ":" (getenv "PYTHONPATH")))
16949 (setenv "PATH"
16950 (string-append (getenv "PATH")
16951 ":" cwd "/bin"))
16952 (setenv "TMPDIR" "/tmp")
16953
16954 (substitute* "Cheetah/Tests/Test.py"
16955 (("unittest.TextTestRunner\\(\\)")
16956 "unittest.TextTestRunner(verbosity=2)"))
16957
16958 (invoke "python" "Cheetah/Tests/Test.py")))))))
16959 (propagated-inputs
16960 `(("python-markdown" ,python-markdown))) ;optional
16961 (home-page "https://cheetahtemplate.org/")
16962 (synopsis "Template engine")
16963 (description "Cheetah is a text-based template engine and Python code
16964 generator.
16965
16966 Cheetah can be used as a standalone templating utility or referenced as
16967 a library from other Python applications. It has many potential uses,
16968 but web developers looking for a viable alternative to ASP, JSP, PHP and
16969 PSP are expected to be its principle user group.
16970
16971 Features:
16972 @enumerate
16973 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
16974 text-based format.
16975 @item Cleanly separates content, graphic design, and program code.
16976 @item Blends the power and flexibility of Python with a simple template language
16977 that non-programmers can understand.
16978 @item Gives template writers full access to any Python data structure, module,
16979 function, object, or method in their templates.
16980 @item Makes code reuse easy by providing an object-orientated interface to
16981 templates that is accessible from Python code or other Cheetah templates.
16982 One template can subclass another and selectively reimplement sections of it.
16983 @item Provides a simple, yet powerful, caching mechanism that can dramatically
16984 improve the performance of a dynamic website.
16985 @item Compiles templates into optimized, yet readable, Python code.
16986 @end enumerate")
16987 (license (license:x11-style "file://LICENSE"))))
16988
16989 (define-public python2-cheetah
16990 (package-with-python2 python-cheetah))
16991
16992 (define-public python-dulwich
16993 (package
16994 (name "python-dulwich")
16995 (version "0.19.16")
16996 (source
16997 (origin
16998 (method url-fetch)
16999 (uri (list (string-append "https://www.dulwich.io/releases/"
17000 "dulwich-" version ".tar.gz")
17001 (pypi-uri "dulwich" version)))
17002 (sha256
17003 (base32
17004 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
17005 (build-system python-build-system)
17006 (arguments
17007 `(#:phases
17008 (modify-phases %standard-phases
17009 (add-before 'check 'fix-tests
17010 (lambda* (#:key inputs #:allow-other-keys)
17011 ;; The tests use Popen with a custom environment which doesn't
17012 ;; include PATH.
17013 (substitute* "dulwich/tests/compat/utils.py"
17014 (("'git'") (string-append "'"
17015 (which "git")
17016 "'")))
17017 (substitute* '("dulwich/tests/test_repository.py"
17018 "dulwich/tests/test_hooks.py")
17019 (("#!/bin/sh") (string-append "#!" (which "sh"))))
17020 (setenv "TEST_RUNNER" "unittest")
17021 (setenv "PYTHONHASHSEED" "random")
17022 #t)))))
17023 (propagated-inputs
17024 `(("python-fastimport" ,python-fastimport)
17025 ("python-urllib3" ,python-urllib3)))
17026 (native-inputs
17027 `(("python-mock" ,python-mock)
17028 ("python-geventhttpclient" ,python-geventhttpclient)
17029 ("git" ,git)))
17030 (home-page "https://www.dulwich.io/")
17031 (synopsis "Git implementation in Python")
17032 (description "Dulwich is an implementation of the Git file formats and
17033 protocols written in pure Python.")
17034 ;; Can be used with either license.
17035 (license (list license:asl2.0 license:gpl2+))))
17036
17037 (define-public python-pbkdf2
17038 (package
17039 (name "python-pbkdf2")
17040 (version "1.3")
17041 (source
17042 (origin
17043 (method url-fetch)
17044 (uri (pypi-uri "pbkdf2" version))
17045 (sha256
17046 (base32
17047 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
17048 (build-system python-build-system)
17049 (arguments
17050 '(#:phases
17051 (modify-phases %standard-phases
17052 (replace 'check
17053 (lambda _
17054 (setenv "PYTHONPATH"
17055 (string-append (getcwd) "/build/lib:"
17056 (getenv "PYTHONPATH")))
17057 (invoke "python" "test/test_pbkdf2.py"))))))
17058 (propagated-inputs
17059 `(("python-pycrypto" ,python-pycrypto))) ; optional
17060 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
17061 (synopsis "Password-based key derivation")
17062 (description "This module implements the password-based key derivation
17063 function, PBKDF2, specified in RSA PKCS#5 v2.0.
17064
17065 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
17066 is part of the RSA Public Key Cryptography Standards series. The provided
17067 implementation takes a password or a passphrase and a salt value (and
17068 optionally a iteration count, a digest module, and a MAC module) and provides
17069 a file-like object from which an arbitrarily-sized key can be read.")
17070 (license license:expat)))
17071
17072 (define-public python2-pbkdf2
17073 (package-with-python2 python-pbkdf2))
17074
17075 (define-public python-qrcode
17076 (package
17077 (name "python-qrcode")
17078 (version "6.1")
17079 (source
17080 (origin
17081 (method url-fetch)
17082 (uri (pypi-uri "qrcode" version))
17083 (sha256
17084 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
17085 (build-system python-build-system)
17086 (arguments
17087 ;; FIXME: Tests require packaging 'pymaging'.
17088 '(#:tests? #f))
17089 (propagated-inputs
17090 `(("python-lxml" ,python-lxml) ; for SVG output
17091 ("python-pillow" ,python-pillow) ; for PNG output
17092 ("python-six" ,python-six)))
17093 (home-page "https://github.com/lincolnloop/python-qrcode")
17094 (synopsis "QR Code image generator")
17095 (description "This package provides a pure Python QR Code generator
17096 module. It uses the Python Imaging Library (PIL) to allow for the generation
17097 of QR Codes.
17098
17099 In addition this package provides a command line tool to generate QR codes and
17100 either write these QR codes to a file or do the output as ascii art at the
17101 console.")
17102 (license license:bsd-3)))
17103
17104 (define-public python2-qrcode
17105 (package-with-python2 python-qrcode))
17106
17107 (define-public python-rst2ansi
17108 (package
17109 (name "python-rst2ansi")
17110 (version "0.1.5")
17111 (source
17112 (origin
17113 (method url-fetch)
17114 (uri (pypi-uri "rst2ansi" version))
17115 (sha256
17116 (base32
17117 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
17118 (build-system python-build-system)
17119 (propagated-inputs
17120 `(("python-docutils" ,python-docutils)))
17121 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
17122 (synopsis "Convert RST to ANSI-decorated console output")
17123 (description
17124 "Python module dedicated to rendering RST (reStructuredText) documents
17125 to ansi-escaped strings suitable for display in a terminal.")
17126 (license license:expat)))
17127
17128 (define-public python-ansi2html
17129 (package
17130 (name "python-ansi2html")
17131 (version "1.2.0")
17132 (source
17133 (origin
17134 (method url-fetch)
17135 (uri (pypi-uri "ansi2html" version))
17136 (sha256
17137 (base32
17138 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
17139 (build-system python-build-system)
17140 (native-inputs
17141 `(("python-mock" ,python-mock)
17142 ("python-nose" ,python-nose)))
17143 (propagated-inputs
17144 `(("python-six" ,python-six)))
17145 (home-page "https://github.com/ralphbean/ansi2html")
17146 (synopsis "Convert ANSI-decorated console output to HTML")
17147 (description
17148 "@command{ansi2html} is a Python library and command line utility for
17149 converting text with ANSI color codes to HTML or LaTeX.")
17150 (license license:gpl3+)))
17151
17152 (define-public python2-ansi2html
17153 (package-with-python2 python-ansi2html))
17154
17155 (define-public python-easy-ansi
17156 (package
17157 (name "python-easy-ansi")
17158 (version "0.3")
17159 (source
17160 (origin
17161 (method git-fetch)
17162 (uri (git-reference
17163 (url "https://gitlab.com/joeysbytes/easy-ansi")
17164 (commit (string-append "v" version))))
17165 (file-name (git-file-name name version))
17166 (sha256
17167 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
17168 (build-system python-build-system)
17169 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
17170 (synopsis "Terminal framework API")
17171 (description
17172 "Easy ANSI is a terminal framework API to give you an easy way to use
17173 colors, cursor control movements, and line/box drawing. It is not meant as a
17174 replacement to more full-featured frameworks (such as curses or urwid), but as
17175 a tool to quickly create nice-looking screens in your terminal window. You
17176 can even create animations with the cursor controls.")
17177 (license license:expat)))
17178
17179 (define-public python-ddt
17180 (package
17181 (name "python-ddt")
17182 (version "1.4.2")
17183 (source
17184 (origin
17185 (method url-fetch)
17186 (uri (pypi-uri "ddt" version))
17187 (sha256
17188 (base32
17189 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
17190 (build-system python-build-system)
17191 (native-inputs
17192 `(("python-pytest" ,python-pytest)))
17193 (propagated-inputs
17194 `(("python-pyyaml" ,python-pyyaml)))
17195 (home-page "https://github.com/datadriventests/ddt")
17196 (synopsis "Data-Driven Tests")
17197 (description
17198 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
17199 running it with different test data, and make it appear as multiple test
17200 cases.")
17201 (license license:expat)))
17202
17203 (define-public python-pycountry
17204 (package
17205 (name "python-pycountry")
17206 (version "18.5.26")
17207 (source
17208 (origin
17209 (method url-fetch)
17210 (uri (pypi-uri "pycountry" version))
17211 (sha256
17212 (base32
17213 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
17214 (build-system python-build-system)
17215 (home-page "https://bitbucket.org/flyingcircus/pycountry")
17216 (synopsis "ISO databases for languages, countries, currencies, etc.")
17217 (description
17218 "@code{pycountry} provides the ISO databases for the standards:
17219 @enumerate
17220 @item 639-3 (Languages)
17221 @item 3166 (Countries)
17222 @item 3166-3 (Deleted Countries)
17223 @item 3166-2 (Subdivisions of countries)
17224 @item 4217 (Currencies)
17225 @item 15924 (Scripts)
17226 @end enumerate
17227 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
17228 through a Python API.")
17229 (license license:lgpl2.1+)))
17230
17231 (define-public python2-pycountry
17232 (package-with-python2 python-pycountry))
17233
17234 (define-public python-pycosat
17235 (package
17236 (name "python-pycosat")
17237 (version "0.6.3")
17238 (source
17239 (origin
17240 (method url-fetch)
17241 (uri (pypi-uri "pycosat" version ".zip"))
17242 (sha256
17243 (base32
17244 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
17245 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
17246 (build-system python-build-system)
17247 (native-inputs
17248 `(("unzip" ,unzip)))
17249 (home-page "https://github.com/ContinuumIO/pycosat")
17250 (synopsis "Bindings to picosat (a SAT solver)")
17251 (description
17252 "This package provides efficient Python bindings to @code{picosat} on
17253 the C level. When importing pycosat, the @code{picosat} solver becomes part
17254 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
17255 Problem} (SAT) solver.")
17256 (license license:expat)))
17257
17258 (define-public python2-pycosat
17259 (package-with-python2 python-pycosat))
17260
17261 (define-public python2-ruamel.ordereddict
17262 (package
17263 (name "python2-ruamel.ordereddict")
17264 (version "0.4.9")
17265 (source
17266 (origin
17267 (method url-fetch)
17268 (uri (pypi-uri "ruamel.ordereddict" version))
17269 (sha256
17270 (base32
17271 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
17272 (build-system python-build-system)
17273 (arguments
17274 `(#:python ,python-2
17275 #:phases
17276 (modify-phases %standard-phases
17277 (delete 'check)
17278 (add-after 'install 'check
17279 (lambda* (#:key inputs outputs #:allow-other-keys)
17280 (add-installed-pythonpath inputs outputs)
17281 (invoke "python" "test/testordereddict.py"))))))
17282 (home-page "https://bitbucket.org/ruamel/ordereddict")
17283 (synopsis "Version of dict that keeps keys in insertion order")
17284 (description
17285 "This is an implementation of an ordered dictionary with @dfn{Key
17286 Insertion Order} (KIO: updates of values do not affect the position of the
17287 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
17288 removed and put at the back). The standard library module @code{OrderedDict},
17289 implemented later, implements a subset of @code{ordereddict} functionality.
17290 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
17291 Order} (KSO, no sorting function can be specified, but a transform can be
17292 specified to apply on the key before comparison (e.g. @code{string.lower})).")
17293 (license license:expat)))
17294
17295 (define-public python-pypeg2
17296 (package
17297 (name "python-pypeg2")
17298 (version "2.15.2")
17299 (source
17300 (origin
17301 (method url-fetch)
17302 (uri (pypi-uri "pyPEG2" version))
17303 (sha256
17304 (base32
17305 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
17306 (build-system python-build-system)
17307 (propagated-inputs `(("python-lxml" ,python-lxml)))
17308 (arguments
17309 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
17310 '(#:tests? #f))
17311 (home-page "https://fdik.org/pyPEG/")
17312 (synopsis "Parsing Expression Grammars in Python")
17313 (description "PyPEG is an intrinsic parser interpreter framework for
17314 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
17315 parse many formal languages.")
17316 (license license:gpl2)))
17317
17318 (define-public python-incremental
17319 (package
17320 (name "python-incremental")
17321 (version "17.5.0")
17322 (source
17323 (origin
17324 (method url-fetch)
17325 (uri (pypi-uri "incremental" version))
17326 (sha256
17327 (base32
17328 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
17329 (build-system python-build-system)
17330 (home-page "https://github.com/hawkowl/incremental")
17331 (synopsis "Library for versioning Python projects")
17332 (description "Incremental is a small library that versions your Python
17333 projects.")
17334 (license license:expat)))
17335
17336 (define-public python2-incremental
17337 (package-with-python2 python-incremental))
17338
17339 (define-public python-invoke
17340 (package
17341 (name "python-invoke")
17342 (home-page "https://www.pyinvoke.org/")
17343 (version "1.5.0")
17344 (source (origin
17345 (method url-fetch)
17346 (uri (pypi-uri "invoke" version))
17347 (sha256
17348 (base32
17349 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
17350 (build-system python-build-system)
17351 (arguments
17352 ;; XXX: Requires many dependencies that are not yet in Guix.
17353 `(#:tests? #f
17354 #:phases
17355 (modify-phases %standard-phases
17356 (add-after 'unpack 'fix-bash-path
17357 (lambda* (#:key inputs #:allow-other-keys)
17358 (let ((bash (assoc-ref inputs "bash")))
17359 (substitute* "invoke/config.py"
17360 (("shell = \"/bin/bash\"")
17361 (string-append "shell = \"" bash "/bin/bash\""))
17362 )
17363 #t))))))
17364 (inputs
17365 `(("bash" ,bash-minimal)))
17366 (synopsis "Pythonic task execution")
17367 (description
17368 "Invoke is a Python task execution tool and library, drawing inspiration
17369 from various sources to arrive at a powerful and clean feature set. It is
17370 evolved from the Fabric project, but focuses on local and abstract concerns
17371 instead of servers and network commands.")
17372 (license license:bsd-3)))
17373
17374 (define-public python2-invoke
17375 (package-with-python2 python-invoke))
17376
17377 (define-public python-automat
17378 (package
17379 (name "python-automat")
17380 (version "20.2.0")
17381 (source (origin
17382 (method url-fetch)
17383 (uri (pypi-uri "Automat" version))
17384 (sha256
17385 (base32
17386 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
17387 (build-system python-build-system)
17388 ;; We disable the tests because they require python-twisted, while
17389 ;; python-twisted depends on python-automat. Twisted is optional, but the
17390 ;; tests fail if it is not available. Also see
17391 ;; <https://github.com/glyph/automat/issues/71>.
17392 (arguments '(#:tests? #f))
17393 (native-inputs
17394 `(("python-m2r" ,python-m2r)
17395 ("python-setuptools-scm" ,python-setuptools-scm)
17396 ("python-graphviz" ,python-graphviz)))
17397 (propagated-inputs
17398 `(("python-six" ,python-six)
17399 ("python-attrs" ,python-attrs)))
17400 (home-page "https://github.com/glyph/Automat")
17401 (synopsis "Self-service finite-state machines")
17402 (description "Automat is a library for concise, idiomatic Python
17403 expression of finite-state automata (particularly deterministic finite-state
17404 transducers).")
17405 (license license:expat)))
17406
17407 (define-public python2-automat
17408 (package-with-python2 python-automat))
17409
17410 (define-public python-m2r
17411 (package
17412 (name "python-m2r")
17413 (version "0.2.1")
17414 (source (origin
17415 (method url-fetch)
17416 (uri (pypi-uri "m2r" version))
17417 (sha256
17418 (base32
17419 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
17420 (build-system python-build-system)
17421 (propagated-inputs
17422 `(("python-docutils" ,python-docutils)
17423 ("python-mistune" ,python-mistune)))
17424 (native-inputs
17425 `(("python-pygments" ,python-pygments)
17426 ("python-mock" ,python-mock)))
17427 (home-page "https://github.com/miyakogi/m2r")
17428 (synopsis "Markdown to reStructuredText converter")
17429 (description "M2R converts a markdown file including reST markups to valid
17430 reST format.")
17431 (license license:expat)))
17432
17433 (define-public python2-m2r
17434 (package-with-python2 python-m2r))
17435
17436 (define-public python-constantly
17437 (package
17438 (name "python-constantly")
17439 (version "15.1.0")
17440 (source (origin
17441 (method url-fetch)
17442 (uri (pypi-uri "constantly" version))
17443 (sha256
17444 (base32
17445 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
17446 (build-system python-build-system)
17447 (home-page "https://github.com/twisted/constantly")
17448 (synopsis "Symbolic constants in Python")
17449 (description "Constantly is a Python library that provides symbolic
17450 constant support. It includes collections and constants with text, numeric,
17451 and bit flag values.")
17452 (license license:expat)))
17453
17454 (define-public python2-constantly
17455 (package-with-python2 python-constantly))
17456
17457 (define-public python-attrs
17458 (package
17459 (name "python-attrs")
17460 (version "21.2.0")
17461 (source (origin
17462 (method url-fetch)
17463 (uri (pypi-uri "attrs" version))
17464 (sha256
17465 (base32
17466 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
17467 (build-system python-build-system)
17468 (arguments
17469 `(#:modules ((guix build utils)
17470 (guix build python-build-system)
17471 (ice-9 ftw)
17472 (srfi srfi-1)
17473 (srfi srfi-26))
17474 #:phases
17475 (modify-phases %standard-phases
17476 (replace 'check
17477 (lambda* (#:key tests? #:allow-other-keys)
17478 (when tests?
17479 (let ((cwd (getcwd)))
17480 (setenv "PYTHONPATH"
17481 (string-append
17482 cwd "/build/"
17483 (find (cut string-prefix? "lib" <>)
17484 (scandir (string-append cwd "/build")))
17485 ":"
17486 (getenv "PYTHONPATH")))
17487 (invoke "python" "-m" "pytest"))))))))
17488 (native-inputs
17489 `(("python-coverage" ,python-coverage)
17490 ("python-hypothesis" ,python-hypothesis)
17491 ("python-pympler" ,python-pympler)
17492 ("python-pytest" ,python-pytest)
17493 ("python-six" ,python-six)
17494 ("python-sphinx" ,python-sphinx)
17495 ("python-zope-interface" ,python-zope-interface)))
17496 (home-page "https://github.com/python-attrs/attrs/")
17497 (synopsis "Attributes without boilerplate")
17498 (description "@code{attrs} is a Python package with class decorators that
17499 ease the chores of implementing the most common attribute-related object
17500 protocols.")
17501 (license license:expat)))
17502
17503 (define-public python2-attrs
17504 (package-with-python2 python-attrs))
17505
17506 (define-public python-attrs-bootstrap
17507 (package
17508 (inherit python-attrs)
17509 (name "python-attrs-bootstrap")
17510 (version "19.3.0")
17511 (source (origin
17512 (method url-fetch)
17513 (uri (pypi-uri "attrs" version))
17514 (sha256
17515 (base32
17516 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
17517 (native-inputs `())
17518 (arguments `(#:tests? #f))))
17519
17520 (define-public python2-attrs-bootstrap
17521 (package-with-python2 python-attrs-bootstrap))
17522
17523 (define-public python-cliapp
17524 (package
17525 (name "python-cliapp")
17526 (version "1.20180812.1")
17527 (source
17528 (origin
17529 (method url-fetch)
17530 (uri (string-append
17531 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17532 version ".tar.gz"))
17533 (sha256
17534 (base32
17535 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17536 (build-system python-build-system)
17537 (arguments
17538 `(;; XXX: The tests only do style and coverage checks, which
17539 ;; fails due to deprecation warnings, etc.
17540 #:tests? #f))
17541 (native-inputs
17542 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17543 ("python-pep8" ,python-pep8)))
17544 (propagated-inputs
17545 `(("python-pyaml" ,python-pyaml)))
17546 (home-page "https://liw.fi/cliapp/")
17547 (synopsis "Python framework for command line programs")
17548 (description "@code{cliapp} is a Python framework for command line
17549 programs. It contains the typical stuff such programs need to do, such
17550 as parsing the command line for options, and iterating over input files.")
17551 (license license:gpl2+)))
17552
17553 (define-public python2-cliapp
17554 (package-with-python2 python-cliapp))
17555
17556 (define-public python-ttystatus
17557 (package
17558 (name "python-ttystatus")
17559 (version "0.38")
17560 (source
17561 (origin
17562 (method git-fetch)
17563 (uri (git-reference
17564 (url "http://git.liw.fi/ttystatus")
17565 ;; There are no tags after ttystatus-0.36.
17566 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17567 (sha256
17568 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17569 (file-name (git-file-name name version))))
17570 (build-system python-build-system)
17571 (native-inputs
17572 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17573 ("python-pep8" ,python-pep8)))
17574 (arguments
17575 `(#:phases
17576 (modify-phases %standard-phases
17577 ;; check phase needs to be run before the build phase. If not,
17578 ;; coverage-test-runner looks for tests for the built source files,
17579 ;; and fails.
17580 (delete 'check)
17581 (add-before 'build 'check
17582 (lambda _ (invoke "make" "check"))))))
17583 (home-page "https://liw.fi/ttystatus/")
17584 (synopsis "Python library for showing progress reporting and
17585 status updates on terminals")
17586 (description "@code{ttystatus} is a Python library for showing progress
17587 reporting and status updates on terminals, for command line programs.
17588 Output is automatically adapted to the width of the terminal: truncated
17589 if it does not fit, and resized if the terminal size changes.")
17590 (license license:gpl3+)))
17591
17592 (define-public python2-ttystatus
17593 (package-with-python2 python-ttystatus))
17594
17595 (define-public python2-tracing
17596 (package
17597 (name "python2-tracing")
17598 (version "0.10")
17599 (source
17600 (origin
17601 (method url-fetch)
17602 (uri (string-append
17603 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17604 version ".tar.gz"))
17605 (sha256
17606 (base32
17607 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17608 (build-system python-build-system)
17609 (arguments
17610 `(#:python ,python-2))
17611 (home-page "https://liw.fi/tracing/")
17612 (synopsis "Python debug logging helper")
17613 (description "@code{python2-tracing} is a python library for
17614 logging debug messages. It provides a way to turn debugging messages
17615 on and off, based on the filename they occur in. It is much faster
17616 than using @code{logging.Filter} to accomplish the same thing, which
17617 matters when code is run in production mode. The actual logging still
17618 happens using the @code{logging} library.")
17619 (license license:gpl3+)))
17620
17621 (define-public python-astroid
17622 (package
17623 (name "python-astroid")
17624 (version "2.4.2")
17625 (source
17626 (origin
17627 (method url-fetch)
17628 (uri (pypi-uri "astroid" version))
17629 (sha256
17630 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
17631 (modules '((guix build utils)))
17632 (snippet
17633 '(begin
17634 ;; Check to see if the version pinning has been removed.
17635 (substitute* "astroid/__pkginfo__.py"
17636 (("==1\\.4\\.\\*") ">=1.4.0"))
17637 #t))))
17638 (build-system python-build-system)
17639 (propagated-inputs
17640 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17641 ("python-six" ,python-six)
17642 ("python-wrapt" ,python-wrapt)))
17643 (native-inputs
17644 `(("python-dateutil" ,python-dateutil)
17645 ("python-pytest" ,python-pytest)
17646 ("python-pytest-runner" ,python-pytest-runner)))
17647 (home-page "https://github.com/PyCQA/astroid")
17648 (synopsis "Common base representation of python source code for pylint and
17649 other projects")
17650 (description "@code{python-astroid} provides a common base representation
17651 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17652
17653 It provides a compatible representation which comes from the _ast module. It
17654 rebuilds the tree generated by the builtin _ast module by recursively walking
17655 down the AST and building an extended ast. The new node classes have
17656 additional methods and attributes for different usages. They include some
17657 support for static inference and local name scopes. Furthermore, astroid
17658 builds partial trees by inspecting living objects.")
17659 (license license:lgpl2.1+)
17660 (properties `((python2-variant . ,(delay python2-astroid))))))
17661
17662 (define-public python2-astroid
17663 (let ((base (package-with-python2
17664 (strip-python2-variant python-astroid))))
17665 (package (inherit base)
17666 ;; Version 2.x removes python2 support.
17667 (version "1.6.5")
17668 (source
17669 (origin
17670 (method url-fetch)
17671 (uri (pypi-uri "astroid" version))
17672 (sha256
17673 (base32
17674 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17675 (arguments
17676 (substitute-keyword-arguments (package-arguments base)
17677 ((#:phases phases)
17678 `(modify-phases ,phases
17679 (add-after 'unpack 'remove-spurious-test
17680 (lambda _
17681 ;; https://github.com/PyCQA/astroid/issues/276
17682 (delete-file "astroid/tests/unittest_brain.py")
17683 #t))
17684 (replace 'check
17685 (lambda _
17686 (invoke"python" "-m" "unittest" "discover"
17687 "-p" "unittest*.py")))))))
17688 (native-inputs `())
17689 (propagated-inputs
17690 `(("python2-backports-functools-lru-cache"
17691 ,python2-backports-functools-lru-cache)
17692 ("python2-enum34" ,python2-enum34)
17693 ("python2-singledispatch" ,python2-singledispatch)
17694 ,@(alist-delete "python-typed-ast"
17695 (package-propagated-inputs base)))))))
17696
17697 (define-public python-isbnlib
17698 (package
17699 (name "python-isbnlib")
17700 (version "3.10.4")
17701 (source
17702 (origin
17703 (method url-fetch)
17704 (uri (pypi-uri "isbnlib" version))
17705 (sha256
17706 (base32
17707 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
17708 (build-system python-build-system)
17709 (arguments '(#:tests? #f)) ; No test
17710 (home-page "https://github.com/xlcnd/isbnlib")
17711 (synopsis "Python library to work with ISBN strings")
17712 (description "@code{python-isbnlib} is a (pure) python library that provides
17713 several useful methods and functions to validate, clean, transform, hyphenate and
17714 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
17715 version, is suitable to be include as a dependency in other projects.")
17716 (license license:lgpl3+)))
17717
17718 (define-public python-isort
17719 (package
17720 (name "python-isort")
17721 (version "4.3.4")
17722 (source
17723 (origin
17724 (method git-fetch)
17725 (uri (git-reference
17726 ;; Tests pass only from the Github sources
17727 (url "https://github.com/timothycrosley/isort")
17728 (commit version)))
17729 (file-name (git-file-name name version))
17730 (sha256
17731 (base32
17732 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
17733 (build-system python-build-system)
17734 (native-inputs
17735 `(("python-mock" ,python-mock)
17736 ("python-pytest" ,python-pytest)))
17737 (home-page "https://github.com/timothycrosley/isort")
17738 (synopsis "Python utility/library to sort python imports")
17739 (description "@code{python-isort} is a python utility/library to sort
17740 imports alphabetically, and automatically separated into sections. It
17741 provides a command line utility, a python library and plugins for various
17742 editors.")
17743 (license license:expat)
17744 (properties `((python2-variant . ,(delay python2-isort))))))
17745
17746 (define-public python2-isort
17747 (let ((base (package-with-python2
17748 (strip-python2-variant python-isort))))
17749 (package/inherit base
17750 (native-inputs
17751 `(("python2-futures" ,python2-futures)
17752 ,@(package-native-inputs base))))))
17753
17754 (define-public python2-backports-functools-lru-cache
17755 (package
17756 (name "python2-backports-functools-lru-cache")
17757 (version "1.6.1")
17758 (source
17759 (origin
17760 (method url-fetch)
17761 ;; only the pypi tarballs contain the necessary metadata
17762 (uri (pypi-uri "backports.functools_lru_cache" version))
17763 (sha256
17764 (base32
17765 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
17766 (build-system python-build-system)
17767 (native-inputs
17768 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
17769 (arguments
17770 `(#:python ,python-2))
17771 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
17772 (synopsis "Backport of functools.lru_cache from Python 3.3")
17773 (description "@code{python2-backports-functools-lru-cache} is a backport
17774 of @code{functools.lru_cache} from python 3.3.")
17775 (license license:expat)))
17776
17777 (define-public python-configparser
17778 (package
17779 (name "python-configparser")
17780 (version "4.0.2")
17781 (source
17782 (origin
17783 (method url-fetch)
17784 (uri (pypi-uri "configparser" version))
17785 (sha256
17786 (base32
17787 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
17788 (native-inputs
17789 `(("python-setuptools_scm" ,python-setuptools-scm)))
17790 (build-system python-build-system)
17791 (home-page "https://github.com/jaraco/configparser/")
17792 (synopsis "Backport of configparser from python 3.5")
17793 (description "@code{python-configparser} is a backport of
17794 @code{configparser} from Python 3.5 so that it can be used directly
17795 in other versions.")
17796 (license license:expat)))
17797
17798 (define-public python2-configparser
17799 (package-with-python2 python-configparser))
17800
17801 (define-public python-iniconfig
17802 (package
17803 (name "python-iniconfig")
17804 (version "1.1.1")
17805 (source
17806 (origin
17807 (method url-fetch)
17808 (uri (pypi-uri "iniconfig" version))
17809 (sha256
17810 (base32
17811 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
17812 (build-system python-build-system)
17813 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
17814 (synopsis "Simple INI-file parser")
17815 (description "The @code{iniconfig} package provides a small and simple
17816 INI-file parser module having a unique set of features; @code{iniconfig}
17817 @itemize
17818 @item maintains the order of sections and entries;
17819 @item supports multi-line values with or without line-continuations;
17820 @item supports \"#\" comments everywhere;
17821 @item raises errors with proper line-numbers;
17822 @item raises an error when two sections have the same name.
17823 @end itemize")
17824 (license license:expat)))
17825
17826 (define-public python-mamba
17827 (package
17828 (name "python-mamba")
17829 (version "0.11.2")
17830 (source (origin
17831 (method url-fetch)
17832 (uri (pypi-uri "mamba" version))
17833 (sha256
17834 (base32
17835 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
17836 (build-system python-build-system)
17837 (arguments `(#:tests? #f)) ; No test
17838 (propagated-inputs
17839 `(("python-clint" ,python-clint)
17840 ("python-coverage" ,python-coverage)))
17841 (home-page "https://nestorsalceda.com/mamba/")
17842 (synopsis "Test runner for Python")
17843 (description
17844 "Mamba is a Behaviour-Driven Development tool for Python developers.
17845 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
17846 (license license:expat)))
17847
17848 (define-public python-mando
17849 (package
17850 (name "python-mando")
17851 (version "0.6.4")
17852 (source (origin
17853 (method url-fetch)
17854 (uri (pypi-uri "mando" version))
17855 (sha256
17856 (base32
17857 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
17858 (build-system python-build-system)
17859 (propagated-inputs
17860 `(("python-rst2ansi" ,python-rst2ansi)
17861 ("python-six" ,python-six)))
17862 (native-inputs
17863 `(("python-pytest" ,python-pytest)))
17864 (home-page "https://mando.readthedocs.org/")
17865 (synopsis
17866 "Wrapper around argparse, allowing creation of complete CLI applications")
17867 (description
17868 "This package is a wrapper around argparse, allowing you to write complete CLI
17869 applications in seconds while maintaining all the flexibility.")
17870 (license license:expat)))
17871
17872 (define-public python2-mando
17873 (package-with-python2 python-mando))
17874
17875 (define-public python2-argparse
17876 (package
17877 (name "python2-argparse")
17878 (version "1.4.0")
17879 (source
17880 (origin
17881 (method url-fetch)
17882 (uri (pypi-uri "argparse" version))
17883 (sha256
17884 (base32
17885 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
17886 (build-system python-build-system)
17887 (arguments
17888 `(#:python ,python-2))
17889 (home-page "https://github.com/ThomasWaldmann/argparse/")
17890 (synopsis "Python command-line parsing library")
17891 (description
17892 "This package is mostly for people who want to have @code{argparse} on
17893 older Pythons because it was not part of the standard library back then.")
17894 (license license:psfl)))
17895
17896 (define-public python-mwclient
17897 (package
17898 (name "python-mwclient")
17899 (version "0.10.1")
17900 (source
17901 (origin
17902 (method git-fetch)
17903 ;; The PyPI version wouldn't contain tests.
17904 (uri (git-reference
17905 (url "https://github.com/mwclient/mwclient")
17906 (commit (string-append "v" version))))
17907 (file-name (git-file-name name version))
17908 (sha256
17909 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
17910 (build-system python-build-system)
17911 (propagated-inputs
17912 `(("python-requests-oauthlib" ,python-requests-oauthlib)
17913 ("python-six" ,python-six)))
17914 (native-inputs
17915 `(("python-mock" ,python-mock)
17916 ("python-pytest" ,python-pytest)
17917 ("python-pytest-cov" ,python-pytest-cov)
17918 ("python-pytest-runner" ,python-pytest-runner)
17919 ("python-responses" ,python-responses)))
17920 (home-page "https://github.com/btongminh/mwclient")
17921 (synopsis "MediaWiki API client")
17922 (description "This package provides a MediaWiki API client.")
17923 (license license:expat)))
17924
17925 (define-public python-utils
17926 (package
17927 (name "python-utils")
17928 (version "2.4.0")
17929 (source (origin
17930 (method url-fetch)
17931 (uri (pypi-uri "python-utils" version))
17932 (sha256
17933 (base32
17934 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
17935 (build-system python-build-system)
17936 (arguments
17937 `(#:phases
17938 (modify-phases %standard-phases
17939 (replace 'check
17940 (lambda* (#:key inputs outputs #:allow-other-keys)
17941 (add-installed-pythonpath inputs outputs)
17942 (delete-file "pytest.ini")
17943 (invoke "pytest" "-vv"))))))
17944 (native-inputs
17945 `(("pytest-runner" ,python-pytest-runner)
17946 ("pytest" ,python-pytest)
17947 ("six" ,python-six)))
17948 (home-page "https://github.com/WoLpH/python-utils")
17949 (synopsis "Convenient utilities not included with the standard Python install")
17950 (description
17951 "Python Utils is a collection of small Python functions and classes which
17952 make common patterns shorter and easier.")
17953 (license license:bsd-2)))
17954
17955 (define-public python-diff-match-patch
17956 (package
17957 (name "python-diff-match-patch")
17958 (version "20121119")
17959 (source
17960 (origin
17961 (method url-fetch)
17962 (uri (pypi-uri "diff-match-patch" version))
17963 (sha256
17964 (base32
17965 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
17966 (build-system python-build-system)
17967 (home-page "https://code.google.com/p/google-diff-match-patch")
17968 (synopsis "Synchronize plain text")
17969 (description "Diff Match and Patch libraries offer robust algorithms to
17970 perform the operations required for synchronizing plain text.")
17971 (license license:asl2.0)))
17972
17973 (define-public python2-diff-match-patch
17974 (package-with-python2 python-diff-match-patch))
17975
17976 (define-public python-dirsync
17977 (package
17978 (name "python-dirsync")
17979 (version "2.2.5")
17980 (source
17981 (origin
17982 (method url-fetch)
17983 (uri (pypi-uri "dirsync" version))
17984 (sha256
17985 (base32
17986 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
17987 (build-system python-build-system)
17988 (propagated-inputs
17989 `(("six" ,python-six)))
17990 (home-page "https://github.com/tkhyn/dirsync")
17991 (synopsis "Advanced directory tree synchronisation tool")
17992 (description "Advanced directory tree synchronisation tool.")
17993 (license license:expat)))
17994
17995 (define-public python2-dirsync
17996 (package-with-python2 python-dirsync))
17997
17998 (define-public python-levenshtein
17999 (package
18000 (name "python-levenshtein")
18001 (version "0.12.0")
18002 (source
18003 (origin
18004 (method url-fetch)
18005 (uri (pypi-uri "python-Levenshtein" version))
18006 (sha256
18007 (base32
18008 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
18009 (build-system python-build-system)
18010 (home-page "https://github.com/ztane/python-Levenshtein")
18011 (synopsis "Fast computation of Levenshtein distance and string similarity")
18012 (description
18013 "The Levenshtein Python C extension module contains functions for fast computation of
18014 @enumerate
18015 @item Levenshtein (edit) distance, and edit operations
18016 @item string similarity
18017 @item approximate median strings, and generally string averaging
18018 @item string sequence and set similarity
18019 @end enumerate
18020 It supports both normal and Unicode strings.")
18021 (license license:gpl2+)))
18022
18023 (define-public python2-levenshtein
18024 (package-with-python2 python-levenshtein))
18025
18026 (define-public python-scandir
18027 (package
18028 (name "python-scandir")
18029 (version "1.10.0")
18030 (source
18031 (origin
18032 (method url-fetch)
18033 (uri (pypi-uri "scandir" version))
18034 (sha256
18035 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
18036 (build-system python-build-system)
18037 (arguments
18038 `(#:phases (modify-phases %standard-phases
18039 (replace 'check
18040 (lambda _
18041 (invoke "python" "test/run_tests.py"))))))
18042 (home-page "https://github.com/benhoyt/scandir")
18043 (synopsis "Directory iteration function")
18044 (description
18045 "Directory iteration function like os.listdir(), except that instead of
18046 returning a list of bare filenames, it yields DirEntry objects that include
18047 file type and stat information along with the name. Using scandir() increases
18048 the speed of os.walk() by 2-20 times (depending on the platform and file
18049 system) by avoiding unnecessary calls to os.stat() in most cases.
18050
18051 This package is part of the Python standard library since version 3.5.")
18052 (license license:bsd-3)))
18053
18054 (define-public python2-scandir
18055 (package-with-python2 python-scandir))
18056
18057 (define-public python2-stemming
18058 (package
18059 (name "python2-stemming")
18060 (version "1.0.1")
18061 (source
18062 (origin
18063 (method url-fetch)
18064 (uri (pypi-uri "stemming" version))
18065 (sha256
18066 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
18067 (build-system python-build-system)
18068 (arguments
18069 `(#:python ,python-2))
18070 (home-page "https://bitbucket.org/mchaput/stemming/overview")
18071 (synopsis "Python implementations of various stemming algorithms")
18072 (description
18073 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
18074 stemming algorithms for English. These implementations are straightforward and
18075 efficient, unlike some Python versions of the same algorithms available on the
18076 Web. This package is an extraction of the stemming code included in the Whoosh
18077 search engine.")
18078 (license license:public-domain)))
18079
18080 (define-public python-factory-boy
18081 (package
18082 (name "python-factory-boy")
18083 (version "2.8.1")
18084 (source
18085 (origin
18086 (method url-fetch)
18087 (uri (pypi-uri "factory_boy" version))
18088 (sha256
18089 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
18090 (build-system python-build-system)
18091 (arguments
18092 ;; Tests are not included in the tarball.
18093 `(#:tests? #f))
18094 (propagated-inputs
18095 `(("faker" ,python-faker)))
18096 (home-page "https://github.com/benhoyt/scandir")
18097 (synopsis "Versatile test fixtures replacement")
18098 (description
18099 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
18100
18101 As a fixtures replacement tool, it aims to replace static, hard to maintain
18102 fixtures with easy-to-use factories for complex object.
18103
18104 Instead of building an exhaustive test setup with every possible combination
18105 of corner cases, factory_boy allows you to use objects customized for the
18106 current test, while only declaring the test-specific fields")
18107 (license license:expat)))
18108
18109 (define-public python2-factory-boy
18110 (package-with-python2 python-factory-boy))
18111
18112 (define-public python-translate-toolkit
18113 (package
18114 (name "python-translate-toolkit")
18115 (version "2.1.0")
18116 (source
18117 (origin
18118 (method url-fetch)
18119 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
18120 (sha256
18121 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
18122 (build-system python-build-system)
18123 (native-inputs
18124 `(("python-pytest" ,python-pytest)
18125 ("python-sphinx" ,python-sphinx)))
18126 (propagated-inputs
18127 `(("python-babel" ,python-babel)
18128 ("python-beautifulsoup4" ,python-beautifulsoup4)
18129 ("python-chardet" ,python-chardet)
18130 ("python-diff-match-patch" ,python-diff-match-patch)
18131 ("python-levenshtein" ,python-levenshtein)
18132 ("python-lxml" ,python-lxml)
18133 ("python-six" ,python-six)
18134 ("python-vobject" ,python-vobject)
18135 ("python-pyyaml" ,python-pyyaml)))
18136 (arguments
18137 ;; TODO: tests are not run, because they end with
18138 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
18139 ;; 'parse_funcs'
18140 ;; during test setup.
18141 `(#:tests? #f))
18142 (home-page "https://toolkit.translatehouse.org")
18143 (synopsis "Tools and API for translation and localization engineering")
18144 (description
18145 "Tools and API for translation and localization engineering. It contains
18146 several utilities, as well as an API for building localization tools.")
18147 (license license:gpl2+)))
18148
18149 (define-public python2-translate-toolkit
18150 (package-with-python2 python-translate-toolkit))
18151
18152 (define-public python-packaging
18153 (package
18154 (name "python-packaging")
18155 (version "20.0")
18156 (source
18157 (origin
18158 (method url-fetch)
18159 (uri (pypi-uri "packaging" version))
18160 ;; XXX: The URL in the patch file is wrong, it should be
18161 ;; <https://github.com/pypa/packaging/pull/256>.
18162 (patches (search-patches "python-packaging-test-arch.patch"))
18163 (sha256
18164 (base32
18165 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
18166 (build-system python-build-system)
18167 (arguments
18168 `(#:phases (modify-phases %standard-phases
18169 (replace 'check
18170 (lambda* (#:key tests? #:allow-other-keys)
18171 (if tests?
18172 (invoke "py.test" "-vv")
18173 (format #t "test suite not run~%"))
18174 #t)))))
18175 (native-inputs
18176 `(("python-pretend" ,python-pretend)
18177 ("python-pytest" ,python-pytest)))
18178 (propagated-inputs
18179 `(("python-pyparsing" ,python-pyparsing)
18180 ("python-six" ,python-six)))
18181 (home-page "https://github.com/pypa/packaging")
18182 (synopsis "Core utilities for Python packages")
18183 (description "Packaging is a Python module for dealing with Python packages.
18184 It offers an interface for working with package versions, names, and dependency
18185 information.")
18186 ;; From 'LICENSE': This software is made available under the terms of
18187 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
18188 ;; Contributions to this software is made under the terms of *both* these
18189 ;; licenses.
18190 (license (list license:asl2.0 license:bsd-2))))
18191
18192 (define-public python2-packaging
18193 (package-with-python2 python-packaging))
18194
18195 ;; Variants with minimal dependencies, for bootstrapping Pytest.
18196 (define-public python-packaging-bootstrap
18197 (hidden-package
18198 (package/inherit
18199 python-packaging
18200 (name "python-packaging-bootstrap")
18201 (native-inputs '())
18202 (propagated-inputs
18203 `(("python-pyparsing" ,python-pyparsing)))
18204 (arguments '(#:tests? #f)))))
18205
18206 (define-public python2-packaging-bootstrap
18207 (hidden-package
18208 (package/inherit
18209 python2-packaging
18210 (name "python2-packaging-bootstrap")
18211 (native-inputs '())
18212 (propagated-inputs
18213 `(("python-pyparsing" ,python2-pyparsing)))
18214 (arguments
18215 `(#:tests? #f
18216 ,@(package-arguments python2-packaging))))))
18217
18218 (define-public python-relatorio
18219 (package
18220 (name "python-relatorio")
18221 (version "0.10.0")
18222 (source
18223 (origin
18224 (method url-fetch)
18225 (uri (pypi-uri "relatorio" version))
18226 (sha256
18227 (base32
18228 "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
18229 (build-system python-build-system)
18230 (propagated-inputs
18231 `(("python-lxml" ,python-lxml)
18232 ("python-genshi" ,python-genshi)))
18233 (native-inputs
18234 `(("python-magic" ,python-magic)))
18235 (home-page "https://relatorio.tryton.org/")
18236 (synopsis "Templating library able to output ODT and PDF files")
18237 (description "Relatorio is a templating library which provides a way to
18238 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
18239 for more filetypes can be easily added by creating plugins for them.")
18240 (license license:gpl3+)))
18241
18242 (define-public python2-relatorio
18243 (package-with-python2 python-relatorio))
18244
18245 (define-public python-radon
18246 (package
18247 (name "python-radon")
18248 (version "4.1.0")
18249 (source
18250 (origin
18251 (method url-fetch)
18252 (uri (pypi-uri "radon" version))
18253 (sha256
18254 (base32
18255 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
18256 (build-system python-build-system)
18257 (arguments
18258 `(#:phases (modify-phases %standard-phases
18259 (replace 'check
18260 (lambda _
18261 (invoke "python" "radon/tests/run.py"))))))
18262 (propagated-inputs
18263 `(("python-colorama" ,python-colorama)
18264 ("python-flake8-polyfill" ,python-flake8-polyfill)
18265 ("python-mando" ,python-mando)))
18266 (native-inputs
18267 `(("python-pytest" ,python-pytest)
18268 ("python-pytest-mock" ,python-pytest-mock)))
18269 (home-page "https://radon.readthedocs.org/")
18270 (synopsis "Code Metrics in Python")
18271 (description "Radon is a Python tool which computes various code metrics.
18272 Supported metrics are:
18273 @itemize @bullet
18274 @item raw metrics: SLOC, comment lines, blank lines, &c.
18275 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
18276 @item Halstead metrics (all of them)
18277 @item the Maintainability Index (a Visual Studio metric)
18278 @end itemize")
18279 (properties `((python2-variant . ,(delay python2-radon))))
18280 (license license:expat)))
18281
18282 (define-public python2-radon
18283 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
18284 (package/inherit base
18285 (propagated-inputs
18286 `(("python-configparser" ,python2-configparser)
18287 ("python-future" ,python2-future)
18288 ,@(package-propagated-inputs base))))))
18289
18290 (define-public python-sure
18291 (package
18292 (name "python-sure")
18293 (version "1.4.11")
18294 (source
18295 (origin
18296 (method url-fetch)
18297 (uri (pypi-uri "sure" version))
18298 (sha256
18299 (base32
18300 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
18301 (build-system python-build-system)
18302 (propagated-inputs
18303 `(("python-mock" ,python-mock)
18304 ("python-six" ,python-six)))
18305 (native-inputs
18306 `(("python-nose" ,python-nose)))
18307 (home-page "https://github.com/gabrielfalcao/sure")
18308 (synopsis "Automated testing library in python for python")
18309 (description
18310 "Sure is a python library that leverages a DSL for writing assertions.
18311 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
18312 (license license:gpl3+)))
18313
18314 (define-public python2-sure
18315 (package-with-python2 python-sure))
18316
18317 (define-public python2-couleur
18318 ;; This package does not seem to support python3 at all, hence,
18319 ;; only the python2 variant definition is provided.
18320 (package
18321 (name "python2-couleur")
18322 (version "0.6.2")
18323 (source
18324 (origin
18325 (method url-fetch)
18326 (uri (pypi-uri "couleur" version))
18327 (sha256
18328 (base32
18329 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
18330 (build-system python-build-system)
18331 (arguments
18332 `(#:python ,python-2))
18333 (home-page "https://github.com/gabrielfalcao/couleur")
18334 (synopsis
18335 "ANSI terminal tool for python, colored shell and other handy fancy features")
18336 (description
18337 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
18338 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
18339 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
18340 ;; https://github.com/gabrielfalcao/couleur/issues/11
18341 (license license:lgpl3+)))
18342
18343 (define-public python-misaka
18344 (package
18345 (name "python-misaka")
18346 (version "2.1.1")
18347 (source
18348 (origin
18349 (method url-fetch)
18350 (uri (pypi-uri "misaka" version))
18351 (sha256
18352 (base32
18353 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
18354 (build-system python-build-system)
18355 (arguments
18356 `(;; Line 37 of setup.py calls self.run_command('develop')
18357 ;; in the 'check' phase. This command seems to be trying
18358 ;; to write to
18359 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
18360 ;; for which it does not have the permission to write.
18361 #:tests? #f))
18362 (propagated-inputs
18363 `(("python-cffi" ,python-cffi)))
18364 (home-page "https://github.com/FSX/misaka")
18365 (synopsis "Python binding for Hoedown")
18366 (description
18367 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
18368 library written in C. It features a fast HTML renderer and functionality to make custom
18369 renderers (e.g. man pages or LaTeX).")
18370 (license license:expat)))
18371
18372 (define-public python2-misaka
18373 (package-with-python2 python-misaka))
18374
18375 (define-public python2-steadymark
18376 ;; This is forced into being a python2 only variant
18377 ;; due to its dependence on couleur that has no support
18378 ;; for python3
18379 (package
18380 (name "python2-steadymark")
18381 (version "0.7.3")
18382 (source
18383 (origin
18384 (method url-fetch)
18385 (uri (pypi-uri "steadymark" version))
18386 (sha256
18387 (base32
18388 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
18389 (build-system python-build-system)
18390 (native-inputs
18391 `(("python-couleur" ,python2-couleur)
18392 ("python-sure" ,python2-sure)
18393 ("python-misaka" ,python2-misaka)))
18394 (arguments
18395 `(#:python ,python-2
18396 #:phases
18397 (modify-phases %standard-phases
18398 (add-before 'build 'patch-setup-py
18399 (lambda _
18400 ;; Update requirements from dependency==version
18401 ;; to dependency>=version
18402 (substitute* "setup.py"
18403 (("==") ">="))
18404 #t)))))
18405 (home-page "https://github.com/gabrielfalcao/steadymark")
18406 (synopsis "Markdown-based test runner for python")
18407 (description
18408 "@code{Steadymark} allows documentation to be written in github-flavoured
18409 markdown. The documentation may contain snippets of code surrounded by python
18410 code blocks and @code{Steadymark} will find these snippets and run them, making
18411 sure that there are no old malfunctional examples in the documentation examples.")
18412 (license license:expat)))
18413
18414 (define-public python-jsonpointer
18415 (package
18416 (name "python-jsonpointer")
18417 (version "1.10")
18418 (source
18419 (origin
18420 (method url-fetch)
18421 (uri (pypi-uri "jsonpointer" version))
18422 (sha256
18423 (base32
18424 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
18425 (build-system python-build-system)
18426 (home-page "https://github.com/stefankoegl/python-json-pointer")
18427 (synopsis "Identify specific nodes in a JSON document")
18428 (description "@code{jsonpointer} allows you to access specific nodes
18429 by path in a JSON document (see RFC 6901).")
18430 (license license:bsd-3)))
18431
18432 (define-public python2-jsonpointer
18433 (package-with-python2 python-jsonpointer))
18434
18435 (define-public python-jsonpatch
18436 (package
18437 (name "python-jsonpatch")
18438 (version "1.16")
18439 (source
18440 (origin
18441 (method git-fetch)
18442 ;; pypi version lacks tests.js
18443 (uri (git-reference
18444 (url "https://github.com/stefankoegl/python-json-patch")
18445 (commit (string-append "v" version))))
18446 (file-name (git-file-name name version))
18447 (sha256
18448 (base32
18449 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18450 (build-system python-build-system)
18451 (propagated-inputs
18452 `(("python-jsonpointer" ,python-jsonpointer)))
18453 (home-page "https://github.com/stefankoegl/python-json-patch")
18454 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18455 (description "@code{jsonpatch} is a library and program that allows
18456 applying JSON Patches according to RFC 6902.")
18457 (license license:bsd-3)))
18458
18459 (define-public python2-jsonpatch
18460 (package-with-python2 python-jsonpatch))
18461
18462 (define-public python-jsonpatch-0.4
18463 (package (inherit python-jsonpatch)
18464 (name "python-jsonpatch")
18465 (version "0.4")
18466 (source
18467 (origin
18468 (method git-fetch)
18469 (uri (git-reference
18470 (url "https://github.com/stefankoegl/python-json-patch")
18471 (commit (string-append "v" version))))
18472 (file-name (git-file-name name version))
18473 (sha256
18474 (base32
18475 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18476
18477 (define-public python2-jsonpatch-0.4
18478 (package-with-python2 python-jsonpatch-0.4))
18479
18480 (define-public python-rfc3986
18481 (package
18482 (name "python-rfc3986")
18483 (version "1.4.0")
18484 (source (origin
18485 (method url-fetch)
18486 (uri (pypi-uri "rfc3986" version))
18487 (sha256
18488 (base32
18489 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18490 (build-system python-build-system)
18491 (arguments
18492 `(#:modules ((guix build utils)
18493 (guix build python-build-system)
18494 (ice-9 ftw)
18495 (srfi srfi-1)
18496 (srfi srfi-26))
18497 #:phases
18498 (modify-phases %standard-phases
18499 (replace 'check
18500 (lambda _
18501 (let ((cwd (getcwd)))
18502 (setenv "PYTHONPATH"
18503 (string-append cwd "/build/"
18504 (find (cut string-prefix? "lib" <>)
18505 (scandir (string-append cwd "/build")))
18506 ":"
18507 (getenv "PYTHONPATH")))
18508 (invoke "pytest" "-v")))))))
18509 (native-inputs
18510 `(("python-pytest" ,python-pytest)))
18511 (home-page "https://rfc3986.readthedocs.io/")
18512 (synopsis "Parse and validate URI references")
18513 (description
18514 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18515 validation and authority parsing. This module also supports RFC@tie{}6874
18516 which adds support for zone identifiers to IPv6 addresses.")
18517 (license license:asl2.0)))
18518
18519 (define-public python2-rfc3986
18520 (package-with-python2 python-rfc3986))
18521
18522 (define-public python-rfc3987
18523 (package
18524 (name "python-rfc3987")
18525 (version "1.3.7")
18526 (source
18527 (origin
18528 (method url-fetch)
18529 (uri (pypi-uri "rfc3987" version))
18530 (sha256
18531 (base32
18532 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18533 (build-system python-build-system)
18534 (home-page "https://pypi.org/project/rfc3987/")
18535 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18536 (description "@code{rfc3987} provides routines for parsing and
18537 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18538 (license license:gpl3+)))
18539
18540 (define-public python2-rfc3987
18541 (package-with-python2 python-rfc3987))
18542
18543 ;; The latest commit contains fixes for building with both python3 and python2.
18544 (define-public python-rfc6555
18545 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18546 (revision "1"))
18547 (package
18548 (name "python-rfc6555")
18549 (version (git-version "0.0.0" revision commit))
18550 (source (origin
18551 (method git-fetch)
18552 (uri (git-reference
18553 (url "https://github.com/sethmlarson/rfc6555")
18554 (commit commit)))
18555 (file-name (git-file-name name version))
18556 (sha256
18557 (base32
18558 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18559 (build-system python-build-system)
18560 (arguments
18561 '(#:phases
18562 (modify-phases %standard-phases
18563 (replace 'check
18564 (lambda* (#:key tests? #:allow-other-keys)
18565 (if tests?
18566 ;; Other tests require network access.
18567 (invoke "pytest" "tests/test_ipv6.py")
18568 #t))))))
18569 (native-inputs
18570 `(("python-pytest" ,python-pytest)))
18571 (home-page "https://pypi.org/project/rfc6555/")
18572 (synopsis "Python implementation of RFC 6555")
18573 (description
18574 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18575 6555. Provided with a single file and dead-simple API to allow easy vendoring
18576 and integration into other projects.")
18577 (license license:asl2.0))))
18578
18579 (define-public python-bagit
18580 (package
18581 (name "python-bagit")
18582 (version "1.7.0")
18583 (source
18584 (origin
18585 (method url-fetch)
18586 (uri (pypi-uri "bagit" version))
18587 (sha256
18588 (base32
18589 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18590 (build-system python-build-system)
18591 (native-inputs
18592 `(("python-setuptools-scm" ,python-setuptools-scm)
18593 ("python-coverage" ,python-coverage)
18594 ("python-mock" ,python-mock)))
18595 (home-page "https://libraryofcongress.github.io/bagit-python/")
18596 (synopsis "Create and validate BagIt packages")
18597 (description "Bagit is a Python library and command line utility for working
18598 with BagIt style packages. BagIt is a minimalist packaging format for digital
18599 preservation.")
18600 (license license:cc0)))
18601
18602 (define-public python-prov
18603 (package
18604 (name "python-prov")
18605 (version "2.0.0")
18606 (source
18607 (origin
18608 (method url-fetch)
18609 (uri (pypi-uri "prov" version))
18610 (sha256
18611 (base32
18612 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18613 (build-system python-build-system)
18614 (propagated-inputs
18615 `(("python-dateutil" ,python-dateutil)
18616 ("python-lxml" ,python-lxml)
18617 ("python-networkx" ,python-networkx)
18618 ("python-rdflib" ,python-rdflib)))
18619 (native-inputs
18620 `(("graphviz" ,graphviz)
18621 ("python-pydot" ,python-pydot)))
18622 (home-page "https://github.com/trungdong/prov")
18623 (synopsis
18624 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18625 (description
18626 "This package provides a library for W3C Provenance Data Model supporting
18627 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18628 (license license:expat)))
18629
18630 (define-public python-arcp
18631 (package
18632 (name "python-arcp")
18633 (version "0.2.1")
18634 (source
18635 (origin
18636 (method url-fetch)
18637 (uri (pypi-uri "arcp" version))
18638 (sha256
18639 (base32
18640 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
18641 (build-system python-build-system)
18642 (native-inputs
18643 `(("python-pytest" ,python-pytest)))
18644 (home-page "http://arcp.readthedocs.io/")
18645 (synopsis
18646 "Archive and Package URI parser and generator")
18647 (description
18648 "@acronym{arcp, Archive and Package} provides functions for creating
18649 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
18650 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
18651 consume or reference hypermedia resources bundled inside a file archive or an
18652 application package, as well as to resolve URIs for archive resources within a
18653 programmatic framework. This URI scheme provides mechanisms to generate a
18654 unique base URI to represent the root of the archive, so that relative URI
18655 references in a bundled resource can be resolved within the archive without
18656 having to extract the archive content on the local file system. An arcp URI can
18657 be used for purposes of isolation (e.g. when consuming multiple archives),
18658 security constraints (avoiding \"climb out\" from the archive), or for
18659 externally identiyfing sub-resources referenced by hypermedia formats.")
18660 (license license:asl2.0)))
18661
18662 (define-public python-shellescape
18663 (package
18664 (name "python-shellescape")
18665 (version "3.8.1")
18666 (source
18667 (origin
18668 (method git-fetch)
18669 (uri (git-reference
18670 (url "https://github.com/chrissimpkins/shellescape")
18671 (commit (string-append "v" version))))
18672 (file-name (git-file-name name version))
18673 (sha256
18674 (base32
18675 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
18676 (build-system python-build-system)
18677 (arguments
18678 '(#:phases
18679 (modify-phases %standard-phases
18680 (replace 'check
18681 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18682 (when tests?
18683 (add-installed-pythonpath inputs outputs)
18684 (invoke "python" "tests/test_shellescape.py"))
18685 #t)))))
18686 (native-inputs
18687 `(("python-pytest" ,python-pytest)))
18688 (home-page "https://github.com/chrissimpkins/shellescape")
18689 (synopsis
18690 "Shell escape a string to safely use it as a token in a shell command")
18691 (description
18692 "The shellescape Python module defines the @code{shellescape.quote()}
18693 function that returns a shell-escaped version of a Python string. This is a
18694 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
18695 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
18696 (license license:expat)))
18697
18698 (define-public python-validators
18699 (package
18700 (name "python-validators")
18701 (version "0.14.2")
18702 (source (origin
18703 (method url-fetch)
18704 (uri (pypi-uri "validators" version))
18705 (sha256
18706 (base32
18707 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
18708 (build-system python-build-system)
18709 (arguments
18710 '(#:phases (modify-phases %standard-phases
18711 (replace 'check
18712 (lambda _
18713 (invoke "pytest" "-vv"))))))
18714 (propagated-inputs
18715 `(("python-decorator" ,python-decorator)
18716 ("python-six" ,python-six)))
18717 (native-inputs
18718 `(("python-flake8" ,python-flake8)
18719 ("python-isort" ,python-isort)
18720 ("python-pytest" ,python-pytest)))
18721 (home-page "https://github.com/kvesteri/validators")
18722 (synopsis "Data validation library")
18723 (description
18724 "This package contains validators for different things such as email
18725 addresses, IP addresses, URLs, hashes and more. It has been designed to
18726 be easy to use and not require defining a schema or form just to validate
18727 some input.")
18728 (license license:expat)))
18729
18730 (define-public python2-validators
18731 (package-with-python2 python-validators))
18732
18733 (define-public python-validate-email
18734 (package
18735 (name "python-validate-email")
18736 (version "1.3")
18737 (source
18738 (origin
18739 (method url-fetch)
18740 (uri (pypi-uri "validate_email" version))
18741 (sha256
18742 (base32
18743 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
18744 (build-system python-build-system)
18745 (home-page "https://github.com/syrusakbary/validate_email")
18746 (synopsis "Verifies if an email address is valid and really exists")
18747 (description "@code{validate_email} can be used to verify if an email
18748 address is valid and really exists.")
18749 (license license:lgpl3+)))
18750
18751 (define-public python2-validate-email
18752 (package-with-python2 python-validate-email))
18753
18754 (define-public python-flex
18755 (package
18756 (name "python-flex")
18757 (version "6.10.0")
18758 (source
18759 (origin
18760 (method url-fetch)
18761 (uri (pypi-uri "flex" version))
18762 (sha256
18763 (base32
18764 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
18765 (build-system python-build-system)
18766 (propagated-inputs
18767 `(("python-click" ,python-click)
18768 ("python-iso8601" ,python-iso8601)
18769 ("python-jsonpointer" ,python-jsonpointer)
18770 ("python-pyyaml" ,python-pyyaml)
18771 ("python-requests" ,python-requests)
18772 ("python-rfc3987" ,python-rfc3987)
18773 ("python-six" ,python-six)
18774 ("python-validate-email" ,python-validate-email)))
18775 (home-page "https://github.com/pipermerriam/flex")
18776 (synopsis "Validates Swagger schemata")
18777 (description "@code{flex} can be used to validate Swagger schemata.")
18778 (license license:bsd-3)))
18779
18780 (define-public python2-flex
18781 (package-with-python2 python-flex))
18782
18783 (define-public python-marshmallow
18784 (package
18785 (name "python-marshmallow")
18786 (version "3.9.1")
18787 (source
18788 (origin
18789 (method url-fetch)
18790 (uri (pypi-uri "marshmallow" version))
18791 (sha256
18792 (base32
18793 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
18794 (build-system python-build-system)
18795 (propagated-inputs
18796 `(("python-dateutil" ,python-dateutil)
18797 ("python-simplejson" ,python-simplejson)))
18798 (native-inputs
18799 `(("python-pytest" ,python-pytest)
18800 ("python-pytz" ,python-pytz)))
18801 (home-page "https://github.com/marshmallow-code/marshmallow")
18802 (synopsis "Convert complex datatypes to and from native
18803 Python datatypes.")
18804 (description "@code{marshmallow} provides a library for converting
18805 complex datatypes to and from native Python datatypes.")
18806 (license license:expat)))
18807
18808 (define-public python-apispec
18809 (package
18810 (name "python-apispec")
18811 (version "4.0.0")
18812 (source
18813 (origin
18814 (method url-fetch)
18815 (uri (pypi-uri "apispec" version))
18816 (sha256
18817 (base32
18818 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
18819 (build-system python-build-system)
18820 (arguments
18821 '(#:phases (modify-phases %standard-phases
18822 (add-after 'unpack 'disable-prance-tests
18823 (lambda _
18824 ;; Disable validation tests since they require the
18825 ;; optional 'prance' library which is not yet in Guix.
18826 (substitute* "tests/test_ext_marshmallow_openapi.py"
18827 (("def test_openapi_tools_validate.*" all)
18828 (string-append "@pytest.mark.xfail\n" all)))))
18829 (replace 'check
18830 (lambda _
18831 (setenv "PYTHONPATH"
18832 (string-append "./build/lib:"
18833 (getenv "PYTHONPATH")))
18834 (invoke "pytest" "-vv"))))))
18835 (propagated-inputs
18836 `(("python-pyyaml" ,python-pyyaml)))
18837 (native-inputs
18838 `(("python-pytest" ,python-pytest)
18839 ("python-marshmallow" ,python-marshmallow)))
18840 (home-page "https://github.com/marshmallow-code/apispec")
18841 (synopsis "Swagger/OpenAPI specification generator")
18842 (description "@code{python-apispec} is a pluggable API specification
18843 generator. It currently supports the OpenAPI specification, formerly known
18844 as Swagger.")
18845 (license license:expat)))
18846
18847 (define-public python-flasgger
18848 (package
18849 (name "python-flasgger")
18850 (version "0.6.3")
18851 (source
18852 (origin
18853 (method git-fetch)
18854 (uri (git-reference
18855 (url "https://github.com/rochacbruno/flasgger")
18856 (commit version)))
18857 (file-name (git-file-name name version))
18858 (sha256
18859 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
18860 (build-system python-build-system)
18861 (arguments
18862 `(#:phases
18863 (modify-phases %standard-phases
18864 (replace 'check
18865 (lambda* (#:key inputs outputs #:allow-other-keys)
18866 (substitute* "Makefile"
18867 (("flake8 flasgger --ignore=F403")
18868 "flake8 flasgger --ignore=E731,F403"))
18869 (setenv "PYTHONPATH" (string-append (getcwd)
18870 ":"
18871 (getenv "PYTHONPATH")))
18872 (invoke "py.test"))))))
18873 (propagated-inputs
18874 `(("python-flask" ,python-flask)
18875 ("python-pyyaml" ,python-pyyaml)
18876 ("python-jsonschema" ,python-jsonschema)
18877 ("python-mistune" ,python-mistune)
18878 ("python-six" ,python-six)))
18879 (native-inputs
18880 `(("python-decorator" ,python-decorator)
18881 ("python-flake8" ,python-flake8)
18882 ("python-flask-restful" ,python-flask-restful)
18883 ("python-flex" ,python-flex)
18884 ("python-pytest" ,python-pytest)
18885 ("python-pytest-cov" ,python-pytest-cov)
18886 ("python-marshmallow" ,python-marshmallow)
18887 ("python-apispec" ,python-apispec)))
18888 (home-page "https://github.com/rochacbruno/flasgger/")
18889 (synopsis "Extract Swagger specs from your Flask project")
18890 (description "@code{python-flasgger} allows extracting Swagger specs
18891 from your Flask project. It is a fork of Flask-Swagger.")
18892 (license license:expat)))
18893
18894 (define-public python-swagger-spec-validator
18895 (package
18896 (name "python-swagger-spec-validator")
18897 (version "2.4.3")
18898 (source
18899 (origin
18900 (method url-fetch)
18901 (uri (pypi-uri "swagger-spec-validator" version))
18902 (sha256
18903 (base32
18904 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
18905 (build-system python-build-system)
18906 (propagated-inputs
18907 `(("python-jsonschema" ,python-jsonschema)
18908 ("python-pyyaml" ,python-pyyaml)
18909 ("python-six" ,python-six)))
18910 (home-page
18911 "https://github.com/Yelp/swagger_spec_validator")
18912 (synopsis "Validation of Swagger specifications")
18913 (description "@code{swagger_spec_validator} provides a library for
18914 validating Swagger API specifications.")
18915 (license license:asl2.0)))
18916
18917 (define-public python2-swagger-spec-validator
18918 (package-with-python2 python-swagger-spec-validator))
18919
18920 (define-public python-apache-libcloud
18921 (package
18922 (name "python-apache-libcloud")
18923 (version "3.1.0")
18924 (source
18925 (origin
18926 (method url-fetch)
18927 (uri (pypi-uri "apache-libcloud" version))
18928 (sha256
18929 (base32
18930 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
18931 (build-system python-build-system)
18932 (arguments
18933 `(#:phases
18934 (modify-phases %standard-phases
18935 (add-after 'unpack 'patch-ssh
18936 (lambda* (#:key inputs #:allow-other-keys)
18937 (substitute* "libcloud/compute/ssh.py"
18938 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
18939 "/bin/ssh" "'")))
18940 #t))
18941 (add-after 'unpack 'patch-tests
18942 (lambda _
18943 (substitute* "libcloud/test/compute/test_ssh_client.py"
18944 (("class ShellOutSSHClientTests")
18945 "@unittest.skip(\"Guix container doesn't have ssh service\")
18946 class ShellOutSSHClientTests"))
18947 #t))
18948 (add-before 'check 'copy-secret
18949 (lambda _
18950 (copy-file "libcloud/test/secrets.py-dist"
18951 "libcloud/test/secrets.py")
18952 #t)))))
18953 (inputs
18954 `(("openssh" ,openssh)))
18955 (propagated-inputs
18956 `(("python-paramiko" ,python-paramiko)
18957 ("python-requests" ,python-requests)))
18958 (native-inputs
18959 `(("python-lockfile" ,python-lockfile)
18960 ("python-mock" ,python-mock)
18961 ("python-pytest" ,python-pytest)
18962 ("python-pytest-runner" ,python-pytest-runner)
18963 ("python-requests-mock" ,python-requests-mock)))
18964 (home-page "https://libcloud.apache.org/")
18965 (synopsis "Unified Cloud API")
18966 (description "@code{libcloud} is a Python library for interacting with
18967 many of the popular cloud service providers using a unified API.")
18968 (license license:asl2.0)))
18969
18970 (define-public python-smmap
18971 (package
18972 (name "python-smmap")
18973 (version "3.0.1")
18974 (source
18975 (origin
18976 (method url-fetch)
18977 (uri (pypi-uri "smmap" version))
18978 (sha256
18979 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
18980 (build-system python-build-system)
18981 (native-inputs
18982 `(("python-nosexcover" ,python-nosexcover)))
18983 (home-page "https://github.com/Byron/smmap")
18984 (synopsis "Python sliding window memory map manager")
18985 (description "@code{smmap} is a pure Python implementation of a sliding
18986 window memory map manager.")
18987 (license license:bsd-3)))
18988
18989 (define-public python-smmap2
18990 (deprecated-package "python-smmap2" python-smmap))
18991
18992 (define-public python2-smmap
18993 (package-with-python2 python-smmap))
18994
18995 (define-public python2-smmap2
18996 (deprecated-package "python2-smmap2" python2-smmap))
18997
18998 (define-public python-regex
18999 (package
19000 (name "python-regex")
19001 (version "2020.6.8")
19002 (source (origin
19003 (method url-fetch)
19004 (uri (pypi-uri "regex" version))
19005 (sha256
19006 (base32
19007 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
19008 (build-system python-build-system)
19009 (arguments
19010 '(#:phases
19011 (modify-phases %standard-phases
19012 (replace 'check
19013 (lambda* (#:key inputs outputs #:allow-other-keys)
19014 (add-installed-pythonpath inputs outputs)
19015 (invoke "python" "-c"
19016 "from regex.test_regex import test_main; test_main()"))))))
19017 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
19018 (synopsis "Alternative regular expression module")
19019 (description "This regular expression implementation is backwards-
19020 compatible with the standard @code{re} module, but offers additional
19021 functionality like full case-folding for case-insensitive matches in Unicode.")
19022 (license license:psfl)))
19023
19024 (define-public python2-regex
19025 (package-with-python2 python-regex))
19026
19027 (define-public python-pyopengl
19028 (package
19029 (name "python-pyopengl")
19030 (version "3.1.5")
19031 (source
19032 (origin
19033 (method url-fetch)
19034 (uri (pypi-uri "PyOpenGL" version))
19035 (sha256
19036 (base32
19037 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
19038 (build-system python-build-system)
19039 (inputs
19040 `(("mesa" ,mesa)
19041 ("freeglut" ,freeglut)
19042 ("glu" ,glu)))
19043 (arguments
19044 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
19045 ;attribute 'OSMesa'
19046 #:phases
19047 (modify-phases %standard-phases
19048 (add-before 'build 'fix-paths
19049 (lambda* (#:key inputs outputs #:allow-other-keys)
19050 (substitute* '("OpenGL/platform/ctypesloader.py")
19051 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
19052 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
19053 (("'GL'")
19054 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
19055 (("'GLU'")
19056 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
19057 (("'glut',")
19058 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
19059 (("'GLESv1_CM'")
19060 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
19061 (("'GLESv2'")
19062 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
19063 ;; Not providing libgle. It seems to be very old.
19064 #t)))))
19065 (home-page "http://pyopengl.sourceforge.net")
19066 (synopsis "Standard OpenGL bindings for Python")
19067 (description
19068 "PyOpenGL is the most common cross platform Python binding to OpenGL and
19069 related APIs. The binding is created using the standard @code{ctypes}
19070 library.")
19071 (license license:bsd-3)))
19072
19073 (define-public python-pyopengl-accelerate
19074 (package
19075 (inherit python-pyopengl)
19076 (name "python-pyopengl-accelerate")
19077 (version "3.1.5")
19078 (source
19079 (origin
19080 (method url-fetch)
19081 (uri (pypi-uri "PyOpenGL-accelerate" version))
19082 (sha256
19083 (base32
19084 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
19085 (inputs
19086 `(("mesa" ,mesa)
19087 ("python-numpy" ,python-numpy))) ; for cython module
19088 ; numpy_formathandler, thus not propagated
19089 (arguments
19090 `(#:tests? #f
19091 #:phases
19092 (modify-phases %standard-phases
19093 (delete 'fix-paths))))
19094 (synopsis "Acceleration code for PyOpenGL")
19095 (description
19096 "This is the Cython-coded accelerator module for PyOpenGL.")))
19097
19098 (define-public python-rencode
19099 (package
19100 (name "python-rencode")
19101 (version "1.0.5")
19102 (source
19103 (origin
19104 (method url-fetch)
19105 (uri (pypi-uri "rencode" version))
19106 (sha256
19107 (base32
19108 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
19109 (build-system python-build-system)
19110 (arguments
19111 `(#:phases
19112 (modify-phases %standard-phases
19113 (add-before 'check 'delete-bogus-test
19114 ;; This test requires /home/aresch/Downloads, which is not provided by
19115 ;; the build environment.
19116 (lambda _
19117 (delete-file "rencode/t.py")
19118 #t)))))
19119 (native-inputs `(("pkg-config" ,pkg-config)
19120 ("python-cython" ,python-cython)))
19121 (home-page "https://github.com/aresch/rencode")
19122 (synopsis "Serialization of heterogeneous data structures")
19123 (description
19124 "The @code{rencode} module is a data structure serialization library,
19125 similar to @code{bencode} from the BitTorrent project. For complex,
19126 heterogeneous data structures with many small elements, r-encoding stake up
19127 significantly less space than b-encodings. This version of rencode is a
19128 complete rewrite in Cython to attempt to increase the performance over the
19129 pure Python module.")
19130 (license license:bsd-3)))
19131
19132 (define-public python2-rencode
19133 (package-with-python2 python-rencode))
19134
19135 (define-public python-xenon
19136 (package
19137 (name "python-xenon")
19138 (version "0.7.0")
19139 (source
19140 (origin
19141 (method url-fetch)
19142 (uri (pypi-uri "xenon" version))
19143 (sha256
19144 (base32
19145 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
19146 (build-system python-build-system)
19147 (native-inputs
19148 `(("python-pyyaml" ,python-pyyaml)
19149 ("python-radon" ,python-radon)
19150 ("python-requests" ,python-requests)
19151 ("python-flake8" ,python-flake8)
19152 ("python-tox" ,python-tox)))
19153 (arguments
19154 `(#:tests? #f ;test suite not shipped with the PyPI archive
19155 #:phases
19156 (modify-phases %standard-phases
19157 (add-before 'build 'patch-test-requirements
19158 (lambda _
19159 ;; Remove httpretty dependency for tests.
19160 (substitute* "setup.py"
19161 (("httpretty") ""))
19162 #t)))))
19163 (home-page "https://xenon.readthedocs.org/")
19164 (synopsis "Monitor code metrics for Python on your CI server")
19165 (description
19166 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
19167 Ideally, @code{xenon} is run every time code is committed. Through command
19168 line options, various thresholds can be set for the complexity of code. It
19169 will fail (i.e. it will exit with a non-zero exit code) when any of these
19170 requirements is not met.")
19171 (license license:expat)))
19172
19173 (define-public python-pysocks
19174 (package
19175 (name "python-pysocks")
19176 (version "1.7.1")
19177 (source
19178 (origin
19179 (method url-fetch)
19180 (uri (pypi-uri "PySocks" version))
19181 (sha256
19182 (base32
19183 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
19184 (build-system python-build-system)
19185 (arguments `(#:tests? #f))
19186 (home-page "https://github.com/Anorov/PySocks")
19187 (synopsis "SOCKS client module")
19188 (description "@code{pysocks} is an updated and semi-actively maintained
19189 version of @code{SocksiPy} with bug fixes and extra features.")
19190 (license license:bsd-3)))
19191
19192 (define-public python2-pysocks
19193 (package-with-python2 python-pysocks))
19194
19195 (define-public python-pydiff
19196 (package
19197 (name "python-pydiff")
19198 (version "0.2")
19199 (source
19200 (origin
19201 (method url-fetch)
19202 (uri (pypi-uri "pydiff" version))
19203 (sha256
19204 (base32
19205 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
19206 (build-system python-build-system)
19207 (home-page "https://github.com/myint/pydiff")
19208 (synopsis "Library to diff two Python files at the bytecode level")
19209 (description
19210 "@code{pydiff} makes it easy to look for actual code changes while
19211 ignoring formatting changes.")
19212 (license license:expat)))
19213
19214 (define-public python2-pydiff
19215 (package-with-python2 python-pydiff))
19216
19217 (define-public python-pydub
19218 (package
19219 (name "python-pydub")
19220 (version "0.24.1")
19221 (source
19222 (origin
19223 (method url-fetch)
19224 (uri (pypi-uri "pydub" version))
19225 (sha256
19226 (base32
19227 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
19228 (build-system python-build-system)
19229 (arguments
19230 `(#:phases
19231 (modify-phases %standard-phases
19232 (add-after 'unpack 'fix-ffmpeg-path
19233 (lambda* (#:key inputs #:allow-other-keys)
19234 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
19235 (substitute* '("pydub/utils.py")
19236 (("return \"ffmpeg\"")
19237 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
19238 (("return \"ffplay\"")
19239 (string-append "return \"" ffmpeg "/bin/ffplay\""))
19240 (("return \"ffprobe\"")
19241 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
19242 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
19243 #t))))))
19244 (home-page "https://pydub.com")
19245 (inputs
19246 `(("ffmpeg" ,ffmpeg)))
19247 (propagated-inputs
19248 `(("python-scipy" ,python-scipy)))
19249 (synopsis "Manipulate audio with a high level interface in Python")
19250 (description
19251 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
19252 @code{ffmpeg} to open various audio formats.")
19253 (license license:expat))) ; MIT license
19254
19255 (define-public python-tqdm
19256 (package
19257 (name "python-tqdm")
19258 (version "4.43.0")
19259 (source
19260 (origin
19261 (method url-fetch)
19262 (uri (pypi-uri "tqdm" version))
19263 (sha256
19264 (base32
19265 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
19266 (build-system python-build-system)
19267 (arguments
19268 '(#:phases (modify-phases %standard-phases
19269 (replace 'check
19270 (lambda* (#:key inputs outputs #:allow-other-keys)
19271 (add-installed-pythonpath inputs outputs)
19272 ;; This invokation is taken from tox.ini.
19273 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
19274 "-d" "-v" "tqdm/"))))))
19275 (native-inputs
19276 `(("python-nose" ,python-nose)))
19277 (home-page "https://github.com/tqdm/tqdm")
19278 (synopsis "Fast, extensible progress meter")
19279 (description
19280 "Make loops show a progress bar on the console by just wrapping any
19281 iterable with @code{|tqdm(iterable)|}. Offers many options to define
19282 design and layout.")
19283 (license (list license:mpl2.0 license:expat))))
19284
19285 (define-public python2-tqdm
19286 (package-with-python2 python-tqdm))
19287
19288 (define-public python-pkginfo
19289 (package
19290 (name "python-pkginfo")
19291 (version "1.7.0")
19292 (source
19293 (origin
19294 (method url-fetch)
19295 (uri (pypi-uri "pkginfo" version))
19296 (sha256
19297 (base32
19298 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
19299 (build-system python-build-system)
19300 (arguments
19301 `(#:phases
19302 (modify-phases %standard-phases
19303 (add-before 'check 'patch-tests
19304 (lambda _
19305 (substitute* "pkginfo/tests/test_installed.py"
19306 (("test_ctor_w_package_no_PKG_INFO")
19307 "_test_ctor_w_package_no_PKG_INFO"))
19308 #t)))))
19309 (home-page
19310 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
19311 (synopsis
19312 "Query metadatdata from sdists, bdists, and installed packages")
19313 (description
19314 "API to query the distutils metadata written in @file{PKG-INFO} inside a
19315 source distriubtion (an sdist) or a binary distribution (e.g., created by
19316 running bdist_egg). It can also query the EGG-INFO directory of an installed
19317 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
19318 created by running @code{python setup.py develop}).")
19319 (license license:expat)))
19320
19321 (define-public python2-pkginfo
19322 (package-with-python2 python-pkginfo))
19323
19324 (define-public python-twine
19325 (package
19326 (name "python-twine")
19327 (version "1.15.0")
19328 (source
19329 (origin
19330 (method url-fetch)
19331 (uri (pypi-uri "twine" version))
19332 (sha256
19333 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
19334 (build-system python-build-system)
19335 (propagated-inputs
19336 `(("python-tqdm" ,python-tqdm)
19337 ("python-packaging" ,python-packaging)
19338 ("python-pkginfo" ,python-pkginfo)
19339 ("python-readme-renderer" ,python-readme-renderer)
19340 ("python-requests" ,python-requests)
19341 ("python-requests-toolbelt" ,python-requests-toolbelt)))
19342 (home-page "https://github.com/pypa/twine")
19343 (synopsis "Collection of utilities for interacting with PyPI")
19344 (description
19345 "@code{twine} currently supports registering projects and uploading
19346 distributions. It authenticates the user over HTTPS, allows them to pre-sign
19347 their files and supports any packaging format (including wheels).")
19348 (license license:asl2.0)))
19349
19350 (define-public python2-twine
19351 (package-with-python2 python-twine))
19352
19353 (define-public python-linecache2
19354 (package
19355 (name "python-linecache2")
19356 (version "1.0.0")
19357 (source
19358 (origin
19359 (method url-fetch)
19360 (uri (pypi-uri "linecache2" version))
19361 (sha256
19362 (base32
19363 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
19364 (build-system python-build-system)
19365 (arguments
19366 `(;; The tests depend on unittest2, and our version is a bit too old.
19367 #:tests? #f))
19368 (native-inputs
19369 `(("python-pbr" ,python-pbr-minimal)))
19370 (home-page
19371 "https://github.com/testing-cabal/linecache2")
19372 (synopsis "Backports of the linecache module")
19373 (description
19374 "The linecache module allows one to get any line from any file, while
19375 attempting to optimize internally, using a cache, the common case where many
19376 lines are read from a single file.")
19377 (license license:psfl)))
19378
19379 (define-public python2-linecache2
19380 (package-with-python2 python-linecache2))
19381
19382 (define-public python-traceback2
19383 (package
19384 (name "python-traceback2")
19385 (version "1.4.0")
19386 (source
19387 (origin
19388 (method url-fetch)
19389 (uri (pypi-uri "traceback2" version))
19390 (sha256
19391 (base32
19392 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
19393 (build-system python-build-system)
19394 (arguments
19395 `(;; python-traceback2 and python-unittest2 depend on one another.
19396 #:tests? #f))
19397 (native-inputs
19398 `(("python-pbr" ,python-pbr-minimal)))
19399 (propagated-inputs
19400 `(("python-linecache2" ,python-linecache2)))
19401 (home-page
19402 "https://github.com/testing-cabal/traceback2")
19403 (synopsis "Backports of the traceback module")
19404 (description
19405 "This module provides a standard interface to extract, format and print
19406 stack traces of Python programs. It exactly mimics the behavior of the Python
19407 interpreter when it prints a stack trace.")
19408 (license license:psfl)))
19409
19410 (define-public python2-traceback2
19411 (package-with-python2 python-traceback2))
19412
19413 (define-public python-ratelimiter
19414 (package
19415 (name "python-ratelimiter")
19416 (version "1.2.0")
19417 (source
19418 (origin
19419 (method url-fetch)
19420 (uri (pypi-uri "ratelimiter" version))
19421 (sha256
19422 (base32
19423 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
19424 (build-system python-build-system)
19425 (arguments
19426 '(#:tests? #f)) ; There are no tests in the pypi archive.
19427 (home-page "https://github.com/RazerM/ratelimiter")
19428 (synopsis "Simple rate limiting object")
19429 (description
19430 "The @code{ratelimiter} module ensures that an operation will not be
19431 executed more than a given number of times during a given period.")
19432 (license license:asl2.0)))
19433
19434 (define-public python2-ratelimiter
19435 (package-with-python2 python-ratelimiter))
19436
19437 (define-public python-dukpy
19438 (package
19439 (name "python-dukpy")
19440 (version "0.3")
19441 (source
19442 (origin
19443 (method git-fetch)
19444 (uri (git-reference
19445 (url "https://github.com/kovidgoyal/dukpy")
19446 (commit (string-append "v" version))))
19447 (file-name (git-file-name name version))
19448 (sha256
19449 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19450 (build-system python-build-system)
19451 (home-page "https://github.com/kovidgoyal/dukpy")
19452 (synopsis "Run JavaScript in python")
19453 (description
19454 "dukpy is a JavaScript runtime environment for Python using the duktape
19455 embeddable JavaScript engine.")
19456 ;; Dukpy is licensed under MIT like the embedded duktape library,
19457 ;; with 'errors.c' as GPL3.
19458 (license (list license:expat license:gpl3))))
19459
19460 (define-public python2-dukpy
19461 (package-with-python2 python-dukpy))
19462
19463 (define-public python-jsonrpclib-pelix
19464 (package
19465 (name "python-jsonrpclib-pelix")
19466 (version "0.3.2")
19467 (source
19468 (origin
19469 (method url-fetch)
19470 (uri (pypi-uri "jsonrpclib-pelix" version))
19471 (sha256
19472 (base32
19473 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19474 (build-system python-build-system)
19475 (arguments
19476 `(#:tests? #f)) ; no tests in PyPI tarball
19477 (home-page "https://github.com/tcalmant/jsonrpclib/")
19478 (synopsis "JSON-RPC 2.0 client library for Python")
19479 (description
19480 "This library implements the JSON-RPC v2.0
19481 specification (backwards-compatible) as a client library for Python. This
19482 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19483 services.")
19484 (license license:asl2.0)))
19485
19486 (define-public python2-jsonrpclib-pelix
19487 (package-with-python2 python-jsonrpclib-pelix))
19488
19489 (define-public python-setuptools-scm-git-archive
19490 (package
19491 (name "python-setuptools-scm-git-archive")
19492 (version "1.0")
19493 (source
19494 (origin
19495 (method url-fetch)
19496 (uri (pypi-uri "setuptools_scm_git_archive" version))
19497 (sha256
19498 (base32
19499 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19500 (build-system python-build-system)
19501 (native-inputs
19502 `(("python-pytest" ,python-pytest)))
19503 (propagated-inputs
19504 `(("python-setuptools-scm" ,python-setuptools-scm)))
19505 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19506 (synopsis "Setuptools_scm plugin for git archives")
19507 (description
19508 "The setuptools_scm_git_archive package is a plugin to
19509 setuptools_scm, which supports obtaining versions from git archives that
19510 belong to tagged versions.")
19511 (license license:expat)))
19512
19513 (define-public python2-setuptools-scm-git-archive
19514 (package-with-python2 python-setuptools-scm-git-archive))
19515
19516 (define-public python-setuptools-git
19517 (package
19518 (name "python-setuptools-git")
19519 (version "1.2")
19520 (source
19521 (origin
19522 (method url-fetch)
19523 (uri (pypi-uri "setuptools-git" version))
19524 (sha256
19525 (base32
19526 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19527 (build-system python-build-system)
19528 (arguments
19529 `(#:phases
19530 (modify-phases %standard-phases
19531 ;; This is needed for tests.
19532 (add-after 'unpack 'configure-git
19533 (lambda _
19534 (setenv "HOME" "/tmp")
19535 (invoke "git" "config" "--global" "user.email" "guix")
19536 (invoke "git" "config" "--global" "user.name" "guix")
19537 #t)))))
19538 (native-inputs
19539 `(("git" ,git-minimal)))
19540 (home-page "https://github.com/msabramo/setuptools-git")
19541 (synopsis "Setuptools revision control system plugin for Git")
19542 (description
19543 "This package provides a plugin for Setuptools for revision control with
19544 Git.")
19545 (license license:bsd-3)))
19546
19547 (define-public python-pyclipper
19548 (package
19549 (name "python-pyclipper")
19550 (version "1.1.0.post3")
19551 (source
19552 (origin
19553 (method url-fetch)
19554 (uri (pypi-uri "pyclipper" version ".zip"))
19555 (sha256
19556 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19557 (modules '((guix build utils)))
19558 (snippet
19559 '(begin
19560 ;; This file is generated by Cython.
19561 (delete-file "pyclipper/pyclipper.cpp") #t))))
19562 (build-system python-build-system)
19563 (arguments
19564 `(#:phases
19565 (modify-phases %standard-phases
19566 (add-before 'build 'cythonize-sources
19567 (lambda _
19568 (with-directory-excursion "pyclipper"
19569 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19570 (propagated-inputs
19571 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19572 (native-inputs
19573 `(("python-cython" ,python-cython)
19574 ("python-pytest" ,python-pytest)
19575 ("python-pytest-runner" ,python-pytest-runner)
19576 ("python-unittest2" ,python-unittest2)
19577 ("unzip" ,unzip)))
19578 (home-page "https://github.com/greginvm/pyclipper")
19579 (synopsis "Wrapper for Angus Johnson's Clipper library")
19580 (description
19581 "Pyclipper is a Cython wrapper for the C++ translation of the
19582 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19583 (license license:expat)))
19584
19585 (define-public python2-pyclipper
19586 (package-with-python2 python-pyclipper))
19587
19588 (define-public python2-booleanoperations
19589 (package
19590 (name "python2-booleanoperations")
19591 (version "0.7.1")
19592 (source
19593 (origin
19594 (method url-fetch)
19595 (uri (pypi-uri "booleanOperations" version ".zip"))
19596 (sha256
19597 (base32
19598 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19599 (build-system python-build-system)
19600 (arguments
19601 `(#:python ,python-2))
19602 (native-inputs
19603 `(("unzip" ,unzip)
19604 ("python2-pytest" ,python2-pytest)
19605 ("python2-pytest-runner" ,python2-pytest-runner)))
19606 (propagated-inputs
19607 `(("python-fonttools" ,python2-fonttools)
19608 ("python-pyclipper" ,python2-pyclipper)
19609 ("python-ufolib" ,python2-ufolib)))
19610 (home-page "https://github.com/typemytype/booleanOperations")
19611 (synopsis "Boolean operations on paths")
19612 (description
19613 "BooleanOperations provides a Python library that enables
19614 boolean operations on paths.")
19615 (license license:expat)))
19616
19617 (define-public python-tempdir
19618 (package
19619 (name "python-tempdir")
19620 (version "0.7.1")
19621 (source
19622 (origin
19623 (method url-fetch)
19624 (uri (pypi-uri "tempdir" version))
19625 (sha256
19626 (base32
19627 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19628 (build-system python-build-system)
19629 (home-page "https://pypi.org/project/tempdir/")
19630 (arguments
19631 ;; the package has no tests
19632 '(#:tests? #f))
19633 (synopsis "Python library for managing temporary directories")
19634 (description
19635 "This library manages temporary directories that are automatically
19636 deleted with all their contents when they are no longer needed. It is
19637 particularly convenient for use in tests.")
19638 (license license:expat)))
19639
19640 (define-public python2-tempdir
19641 (package-with-python2 python-tempdir))
19642
19643 (define-public python-activepapers
19644 (package
19645 (name "python-activepapers")
19646 (version "0.2.2")
19647 (source
19648 (origin
19649 (method url-fetch)
19650 (uri (pypi-uri "ActivePapers.Py" version))
19651 (sha256
19652 (base32
19653 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
19654 (build-system python-build-system)
19655 (arguments
19656 `(#:modules ((ice-9 ftw)
19657 (srfi srfi-1)
19658 (guix build utils)
19659 (guix build python-build-system))
19660
19661 #:phases
19662 (modify-phases %standard-phases
19663 (add-after 'unpack 'delete-python2-code
19664 (lambda _
19665 (for-each delete-file
19666 '("lib/activepapers/builtins2.py"
19667 "lib/activepapers/standardlib2.py"
19668 "lib/activepapers/utility2.py"))))
19669 (replace 'check
19670 (lambda _
19671 ;; Deactivate the test cases that download files
19672 (setenv "NO_NETWORK_ACCESS" "1")
19673 ;; For some strange reason, some tests fail if nosetests runs all
19674 ;; test modules in a single execution. They pass if each test
19675 ;; module is run individually.
19676 (for-each (lambda (filename)
19677 (invoke "nosetests"
19678 (string-append "tests/" filename)))
19679 (scandir "tests"
19680 (lambda (filename)
19681 (string-suffix? ".py" filename)))))))))
19682 (native-inputs
19683 `(("python-tempdir" ,python-tempdir)
19684 ("python-nose" ,python-nose)))
19685 (propagated-inputs
19686 `(("python-h5py" ,python-h5py)))
19687 (home-page "https://www.activepapers.org/")
19688 (synopsis "Executable papers for scientific computing")
19689 (description
19690 "ActivePapers is a tool for working with executable papers, which
19691 combine data, code, and documentation in single-file packages,
19692 suitable for publication as supplementary material or on repositories
19693 such as figshare or Zenodo.")
19694 (properties `((python2-variant . ,(delay python2-activepapers))))
19695 (license license:bsd-3)))
19696
19697 (define-public python2-activepapers
19698 (let ((base (package-with-python2
19699 (strip-python2-variant python-activepapers))))
19700 (package/inherit base
19701 (arguments
19702 (substitute-keyword-arguments (package-arguments base)
19703 ((#:phases phases)
19704 `(modify-phases ,phases
19705 (delete 'delete-python2-code)
19706 (add-after 'unpack 'delete-python3-code
19707 (lambda _
19708 (for-each delete-file
19709 '("lib/activepapers/builtins3.py"
19710 "lib/activepapers/standardlib3.py"
19711 "lib/activepapers/utility3.py")))))))))))
19712
19713 (define-public python-semver
19714 (package
19715 (name "python-semver")
19716 (version "2.9.0")
19717 (source
19718 (origin
19719 (method url-fetch)
19720 (uri (pypi-uri "semver" version))
19721 (sha256
19722 (base32
19723 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
19724 (build-system python-build-system)
19725 (arguments
19726 `(#:phases (modify-phases %standard-phases
19727 (replace 'check
19728 (lambda _
19729 (delete-file "setup.cfg")
19730 (invoke "py.test"))))))
19731 (native-inputs
19732 `(("python-pytest" ,python-pytest)))
19733 (home-page "https://github.com/k-bx/python-semver")
19734 (synopsis "Python helper for Semantic Versioning")
19735 (description "This package provides a Python library for
19736 @url{Semantic Versioning, http://semver.org/}.")
19737 (license license:bsd-3)))
19738
19739 (define-public python2-semver
19740 (package-with-python2 python-semver))
19741
19742 (define-public python-pyro4
19743 (package
19744 (name "python-pyro4")
19745 (version "4.77")
19746 (source
19747 (origin
19748 (method url-fetch)
19749 (uri (pypi-uri "Pyro4" version))
19750 (sha256
19751 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
19752 (build-system python-build-system)
19753 (arguments
19754 '(#:tests? #f)) ;FIXME: Some tests require network access.
19755 (native-inputs
19756 `(("python-cloudpickle" ,python-cloudpickle)
19757 ("python-dill" ,python-dill)
19758 ("python-msgpack" ,python-msgpack)))
19759 (propagated-inputs
19760 `(("python-serpent" ,python-serpent)))
19761 (home-page "https://pyro4.readthedocs.io")
19762 (synopsis "Distributed object middleware for Python")
19763 (description
19764 "Pyro enables you to build applications in which objects can talk to each
19765 other over the network. You can just use normal Python method calls to call
19766 objects on other machines, also known as remote procedure calls (RPC).")
19767 (license license:expat)))
19768
19769 (define-public python2-pyro
19770 (package
19771 (name "python2-pyro")
19772 (version "3.16")
19773 (source
19774 (origin
19775 (method url-fetch)
19776 (uri (pypi-uri "Pyro" version))
19777 (file-name (string-append "Pyro-" version ".tar.gz"))
19778 (sha256
19779 (base32
19780 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
19781 (build-system python-build-system)
19782 (arguments
19783 ;; Pyro is not compatible with Python 3
19784 `(#:python ,python-2
19785 ;; Pyro has no test cases for automatic execution
19786 #:tests? #f))
19787 (home-page "https://pythonhosted.org/Pyro/")
19788 (synopsis "Distributed object manager for Python")
19789 (description "Pyro is a Distributed Object Technology system
19790 written in Python that is designed to be easy to use. It resembles
19791 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
19792 which is a system and language independent Distributed Object Technology
19793 and has much more to offer than Pyro or RMI. Pyro 3.x is no
19794 longer maintained. New projects should use Pyro4 instead, which
19795 is the new Pyro version that is actively developed.")
19796 (license license:expat)))
19797
19798 (define-public python2-scientific
19799 (package
19800 (name "python2-scientific")
19801 (version "2.9.4")
19802 (source
19803 (origin
19804 (method git-fetch)
19805 (uri (git-reference
19806 (url "https://github.com/khinsen/ScientificPython")
19807 (commit (string-append "rel" version))))
19808 (file-name (git-file-name name version))
19809 (sha256
19810 (base32
19811 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
19812 (build-system python-build-system)
19813 (inputs
19814 `(("netcdf" ,netcdf)))
19815 (propagated-inputs
19816 `(("python-numpy" ,python2-numpy-1.8)
19817 ("python-pyro" ,python2-pyro)))
19818 (arguments
19819 ;; ScientificPython is not compatible with Python 3
19820 `(#:python ,python-2
19821 #:tests? #f ; No test suite
19822 #:phases
19823 (modify-phases %standard-phases
19824 (replace 'build
19825 (lambda* (#:key inputs #:allow-other-keys)
19826 (invoke "python" "setup.py" "build"
19827 (string-append "--netcdf_prefix="
19828 (assoc-ref inputs "netcdf"))))))))
19829 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
19830 (synopsis "Python modules for scientific computing")
19831 (description "ScientificPython is a collection of Python modules that are
19832 useful for scientific computing. Most modules are rather general (Geometry,
19833 physical units, automatic derivatives, ...) whereas others are more
19834 domain-specific (e.g. netCDF and PDB support). The library is currently
19835 not actively maintained and works only with Python 2 and NumPy < 1.9.")
19836 (license license:cecill-c)))
19837
19838 (define-public python2-mmtk
19839 (package
19840 (name "python2-mmtk")
19841 (version "2.7.12")
19842 (source
19843 (origin
19844 (method git-fetch)
19845 (uri (git-reference
19846 (url "https://github.com/khinsen/MMTK")
19847 (commit (string-append "rel" version))))
19848 (file-name (git-file-name name version))
19849 (sha256
19850 (base32
19851 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
19852 (build-system python-build-system)
19853 (native-inputs
19854 `(("netcdf" ,netcdf)))
19855 (propagated-inputs
19856 `(("python-scientific" ,python2-scientific)
19857 ("python-tkinter" ,python-2 "tk")))
19858 (arguments
19859 `(#:python ,python-2
19860 #:tests? #f
19861 #:phases
19862 (modify-phases %standard-phases
19863 (add-before 'build 'includes-from-scientific
19864 (lambda* (#:key inputs #:allow-other-keys)
19865 (mkdir-p "Include/Scientific")
19866 (copy-recursively
19867 (string-append
19868 (assoc-ref inputs "python-scientific")
19869 "/include/python2.7/Scientific")
19870 "Include/Scientific"))))))
19871 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
19872 (synopsis "Python library for molecular simulation")
19873 (description "MMTK is a library for molecular simulations with an emphasis
19874 on biomolecules. It provides widely used methods such as Molecular Dynamics
19875 and normal mode analysis, but also basic routines for implementing new methods
19876 for simulation and analysis. The library is currently not actively maintained
19877 and works only with Python 2 and NumPy < 1.9.")
19878 (license license:cecill-c)))
19879
19880 (define-public python-phonenumbers
19881 (package
19882 (name "python-phonenumbers")
19883 (version "8.9.1")
19884 (source
19885 (origin
19886 (method url-fetch)
19887 (uri (pypi-uri "phonenumbers" version))
19888 (sha256
19889 (base32
19890 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
19891 (build-system python-build-system)
19892 (home-page
19893 "https://github.com/daviddrysdale/python-phonenumbers")
19894 (synopsis
19895 "Python library for dealing with international phone numbers")
19896 (description
19897 "This package provides a Python port of Google's libphonenumber library.")
19898 (license license:asl2.0)))
19899
19900 (define-public python2-phonenumbers
19901 (package-with-python2 python-phonenumbers))
19902
19903 (define-public python-heapdict
19904 (package
19905 (name "python-heapdict")
19906 (version "1.0.1")
19907 (source
19908 (origin
19909 (method url-fetch)
19910 (uri (pypi-uri "HeapDict" version))
19911 (sha256
19912 (base32
19913 "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
19914 (build-system python-build-system)
19915 (home-page "http://stutzbachenterprises.com/")
19916 (synopsis "Heap with decrease-key and increase-key operations")
19917 (description
19918 "heapdict implements the MutableMapping ABC, meaning it works pretty much
19919 like a regular Python @code{dict}. It’s designed to be used as a priority
19920 queue.")
19921 (license license:bsd-3)))
19922
19923 (define-public python-zict
19924 (package
19925 (name "python-zict")
19926 (version "2.0.0")
19927 (source
19928 (origin
19929 (method url-fetch)
19930 (uri (pypi-uri "zict" version))
19931 (sha256
19932 (base32
19933 "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
19934 (build-system python-build-system)
19935 (propagated-inputs
19936 `(("python-heapdict" ,python-heapdict)))
19937 (native-inputs
19938 `(("python-pytest" ,python-pytest)))
19939 (home-page "https://zict.readthedocs.io/en/latest/")
19940 (synopsis "Composable mutable mapping tools")
19941 (description "This package provides abstract @code{MutableMapping} classes
19942 that consume and build on other @code{MutableMappings}. Several of these can
19943 be composed with one another to form intuitive interfaces over complex storage
19944 systems policies.")
19945 (license license:bsd-3)))
19946
19947 (define-public python-send2trash
19948 (package
19949 (name "python-send2trash")
19950 (version "1.5.0")
19951 (source
19952 (origin (method git-fetch)
19953 ;; Source tarball on PyPI doesn't include tests.
19954 (uri (git-reference
19955 (url "https://github.com/hsoft/send2trash")
19956 (commit version)))
19957 (file-name (git-file-name name version))
19958 (sha256
19959 (base32
19960 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
19961 (build-system python-build-system)
19962 (arguments
19963 '(#:phases
19964 (modify-phases %standard-phases
19965 (add-before 'check 'pre-check
19966 (lambda _
19967 (mkdir-p "/tmp/foo")
19968 (setenv "HOME" "/tmp/foo")
19969 #t)))))
19970 (home-page "https://github.com/hsoft/send2trash")
19971 (synopsis "Send files to the user's @file{~/Trash} directory")
19972 (description "This package provides a Python library to send files to the
19973 user's @file{~/Trash} directory.")
19974 (properties `((python2-variant . ,(delay python2-send2trash))))
19975 (license license:bsd-3)))
19976
19977 (define-public python2-send2trash
19978 (let ((base (package-with-python2
19979 (strip-python2-variant python-send2trash))))
19980 (package/inherit base
19981 (arguments
19982 (substitute-keyword-arguments (package-arguments python-send2trash)
19983 ((#:phases phases)
19984 `(modify-phases ,phases
19985 (add-before 'check 'setenv
19986 (lambda _
19987 (setenv "PYTHONPATH"
19988 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19989 #t)))))))))
19990
19991 (define-public python-pyfavicon
19992 (package
19993 (name "python-pyfavicon")
19994 (version "0.1.1")
19995 (source
19996 (origin
19997 (method url-fetch)
19998 (uri (pypi-uri "pyfavicon" version))
19999 (sha256
20000 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
20001 (build-system python-build-system)
20002 (arguments
20003 ;; There are no tests in the PyPI tarball and the tests from the
20004 ;; repository require online data.
20005 '(#:tests? #f))
20006 (propagated-inputs
20007 `(("python-aiohttp" ,python-aiohttp)
20008 ("python-beautifulsoup4" ,python-beautifulsoup4)
20009 ("python-pillow" ,python-pillow)))
20010 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
20011 (synopsis "Async favicon fetcher")
20012 (description
20013 "@code{pyfavicon} is an async favicon fetcher.")
20014 (license license:expat)))
20015
20016 (define-public python-yamllint
20017 (package
20018 (name "python-yamllint")
20019 (version "1.26.1")
20020 (source
20021 (origin
20022 (method url-fetch)
20023 (uri (pypi-uri "yamllint" version))
20024 (sha256
20025 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
20026 (build-system python-build-system)
20027 (propagated-inputs
20028 `(("python-pathspec" ,python-pathspec)
20029 ("python-pyyaml" ,python-pyyaml)
20030 ("python-setuptools" ,python-setuptools)))
20031 (home-page "https://github.com/adrienverge/yamllint")
20032 (synopsis "Linter for YAML files")
20033 (description
20034 "Yamllint is a linter for YAML files. yamllint does not only check for
20035 syntax validity, but for weirdnesses like key repetition and cosmetic problems
20036 such as lines length, trailing spaces, indentation, etc.")
20037 (license license:gpl3+)))
20038
20039 (define-public python-yapf
20040 (package
20041 (name "python-yapf")
20042 (version "0.29.0")
20043 (source
20044 (origin
20045 (method url-fetch)
20046 (uri (pypi-uri "yapf" version))
20047 (sha256
20048 (base32
20049 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
20050 (build-system python-build-system)
20051 (home-page "https://github.com/google/yapf")
20052 (synopsis "Formatter for Python code")
20053 (description "YAPF is a formatter for Python code. It's based off of
20054 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
20055 takes the code and reformats it to the best formatting that conforms to the
20056 style guide, even if the original code didn't violate the style guide.")
20057 (license license:asl2.0)))
20058
20059 (define-public python2-yapf
20060 (package-with-python2 python-yapf))
20061
20062 (define-public python-yq
20063 (package
20064 (name "python-yq")
20065 (version "2.11.1")
20066 (source
20067 (origin
20068 (method url-fetch)
20069 (uri (pypi-uri "yq" version))
20070 (sha256
20071 (base32
20072 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
20073 (build-system python-build-system)
20074 (arguments
20075 '(#:phases
20076 (modify-phases %standard-phases
20077 (add-after 'unpack 'patch
20078 (lambda* (#:key inputs #:allow-other-keys)
20079 (substitute* "yq/__init__.py"
20080 (("Popen\\(\\[\"jq")
20081 (string-append
20082 "Popen([\""
20083 (assoc-ref inputs "jq")
20084 "/bin/jq")))
20085 #t)))))
20086 (inputs
20087 `(("python-argcomplete" ,python-argcomplete)
20088 ("python-pyyaml" ,python-pyyaml)
20089 ("python-xmltodict" ,python-xmltodict)
20090 ("jq" ,jq)))
20091 (native-inputs
20092 `(("python-coverage" ,python-coverage)
20093 ("python-flake8" ,python-flake8)
20094 ("python-wheel" ,python-wheel)))
20095 (home-page "https://github.com/kislyuk/yq")
20096 (synopsis "Command-line YAML/XML processor")
20097 (description
20098 "This package provides @command{yq} and @command{xq} for processing YAML
20099 and XML respectively. The processing is done through @command{jq}, @command{jq}
20100 filters can be used to process the data as it passes through.")
20101 (license license:asl2.0)))
20102
20103 (define-public python-gyp
20104 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
20105 (revision "0"))
20106 (package
20107 (name "python-gyp")
20108 ;; Google does not release versions,
20109 ;; based on second most recent commit date.
20110 (version (git-version "0.0.0" revision commit))
20111 (source
20112 (origin
20113 ;; Google does not release tarballs,
20114 ;; git checkout is needed.
20115 (method git-fetch)
20116 (uri (git-reference
20117 (url "https://chromium.googlesource.com/external/gyp")
20118 (commit commit)))
20119 (file-name (git-file-name name version))
20120 (sha256
20121 (base32
20122 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
20123 (build-system python-build-system)
20124 (home-page "https://gyp.gsrc.io/")
20125 (synopsis "GYP is a Meta-Build system")
20126 (description
20127 "GYP builds build systems for large, cross platform applications.
20128 It can be used to generate XCode projects, Visual Studio projects, Ninja build
20129 files, and Makefiles.")
20130 (license license:bsd-3))))
20131
20132 (define-public python2-gyp
20133 (package-with-python2 python-gyp))
20134
20135 (define-public python-whatever
20136 (package
20137 (name "python-whatever")
20138 (version "0.6")
20139 (source
20140 (origin
20141 (method git-fetch)
20142 (uri (git-reference
20143 (url "https://github.com/Suor/whatever")
20144 (commit version)))
20145 (file-name (git-file-name name version))
20146 (sha256
20147 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
20148 (build-system python-build-system)
20149 (arguments
20150 `(#:phases
20151 (modify-phases %standard-phases
20152 (replace 'check
20153 (lambda _
20154 (invoke "py.test"))))))
20155 (native-inputs
20156 `(("python-pytest" ,python-pytest)))
20157 (home-page "https://github.com/Suor/whatever")
20158 (synopsis "Make anonymous functions by partial application of operators")
20159 (description "@code{whatever} provides an easy way to make anonymous
20160 functions by partial application of operators.")
20161 (license license:bsd-3)))
20162
20163 (define-public python2-whatever
20164 (package-with-python2 python-whatever))
20165
20166 (define-public python-funcy
20167 (package
20168 (name "python-funcy")
20169 (version "1.11")
20170 (source
20171 (origin
20172 (method git-fetch)
20173 (uri (git-reference
20174 (url "https://github.com/Suor/funcy")
20175 (commit version)))
20176 (sha256
20177 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
20178 (file-name (git-file-name name version))))
20179 (build-system python-build-system)
20180 (arguments
20181 `(#:phases
20182 (modify-phases %standard-phases
20183 (replace 'check
20184 (lambda _
20185 (invoke "py.test"))))))
20186 (native-inputs
20187 `(("python-pytest" ,python-pytest)
20188 ("python-whatever" ,python-whatever)))
20189 (home-page "https://github.com/Suor/funcy")
20190 (synopsis "Functional tools")
20191 (description "@code{funcy} is a library that provides functional tools.
20192 Examples are:
20193 @enumerate
20194 @item merge - Merges collections of the same type
20195 @item walk - Type-preserving map
20196 @item select - Selects a part of a collection
20197 @item take - Takes the first n items of a collection
20198 @item first - Takes the first item of a collection
20199 @item remove - Predicated-removes items of a collection
20200 @item concat - Concatenates two collections
20201 @item flatten - Flattens a collection with subcollections
20202 @item distinct - Returns only distinct items
20203 @item split - Predicated-splits a collection
20204 @item split_at - Splits a collection at a given item
20205 @item group_by - Groups items by group
20206 @item pairwise - Pairs off adjacent items
20207 @item partial - Partially-applies a function
20208 @item curry - Curries a function
20209 @item compose - Composes functions
20210 @item complement - Complements a predicate
20211 @item all_fn - \"all\" with predicate
20212 @end enumerate")
20213 (license license:bsd-3)))
20214
20215 (define-public python2-funcy
20216 (package-with-python2 python-funcy))
20217
20218 (define-public python-isoweek
20219 (package
20220 (name "python-isoweek")
20221 (version "1.3.3")
20222 (source
20223 (origin
20224 (method url-fetch)
20225 (uri (pypi-uri "isoweek" version))
20226 (sha256
20227 (base32
20228 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
20229 (build-system python-build-system)
20230 (home-page "https://github.com/gisle/isoweek")
20231 (synopsis "Objects representing a week")
20232 (description "The @code{isoweek} module provide the class Week that
20233 implements the week definition of ISO 8601. This standard also defines
20234 a notation for identifying weeks; yyyyWww (where the W is a literal).
20235 Week instances stringify to this form.")
20236 (license license:bsd-3)))
20237
20238 (define-public python2-isoweek
20239 (package-with-python2 python-isoweek))
20240
20241 (define-public python-pyzbar
20242 (package
20243 (name "python-pyzbar")
20244 (version "0.1.8")
20245 (source
20246 (origin
20247 ;; There's no source tarball on PyPI.
20248 (method git-fetch)
20249 (uri (git-reference
20250 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
20251 (commit (string-append "v" version))))
20252 (file-name (git-file-name name version))
20253 (sha256
20254 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
20255 (build-system python-build-system)
20256 (arguments
20257 `(#:phases
20258 (modify-phases %standard-phases
20259 (add-after 'unpack 'remove-failing-test
20260 (lambda _
20261 ;; This tests if find_library was called once, but we remove
20262 ;; the call in the stage below to make the library find libzbar.
20263 (delete-file "pyzbar/tests/test_zbar_library.py")
20264 #t))
20265 (add-before 'build 'set-library-file-name
20266 (lambda* (#:key inputs #:allow-other-keys)
20267 (let ((libzbar (assoc-ref inputs "zbar")))
20268 (substitute* "pyzbar/zbar_library.py"
20269 (("find_library\\('zbar'\\)")
20270 (string-append "'" libzbar "/lib/libzbar.so.0'")))
20271 #t))))))
20272 (native-inputs
20273 `(("pkg-config" ,pkg-config)
20274 ("python-numpy" ,python-numpy)
20275 ("python-pillow" ,python-pillow)))
20276 (inputs
20277 `(("zbar" ,zbar)))
20278 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
20279 (synopsis "Read one-dimensional barcodes and QR codes")
20280 (description
20281 "Read one-dimensional barcodes and QR codes using the zbar library.
20282
20283 Features:
20284
20285 @itemize
20286 @item Pure python
20287 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
20288 @item Decodes locations of barcodes
20289 @item No dependencies, other than the zbar library itself
20290 @end itemize")
20291 (license license:expat)))
20292
20293 (define-public python-tokenize-rt
20294 (package
20295 (name "python-tokenize-rt")
20296 (version "2.0.1")
20297 (source
20298 (origin
20299 (method url-fetch)
20300 (uri (pypi-uri "tokenize-rt" version))
20301 (sha256
20302 (base32
20303 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
20304 (build-system python-build-system)
20305 (home-page "https://github.com/asottile/tokenize-rt")
20306 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
20307 (description
20308 "This Python library is a wrapper around @code{tokenize} from the Python
20309 standard library. It provides two additional tokens @code{ESCAPED_NL} and
20310 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
20311 and @code{tokens_to_src} to roundtrip.")
20312 (license license:expat)))
20313
20314 (define-public python-future-fstrings
20315 (package
20316 (name "python-future-fstrings")
20317 (version "0.4.1")
20318 (source
20319 (origin
20320 (method url-fetch)
20321 (uri (pypi-uri "future_fstrings" version))
20322 (sha256
20323 (base32
20324 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
20325 (build-system python-build-system)
20326 (propagated-inputs
20327 `(("python-tokenize-rt" ,python-tokenize-rt)))
20328 (home-page "https://github.com/asottile/future-fstrings")
20329 (synopsis "Backport of fstrings to Python < 3.6")
20330 (description
20331 "This package provides a UTF-8 compatible encoding
20332 @code{future_fstrings}, which performs source manipulation. It decodes the
20333 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
20334 @code{f} strings.")
20335 (license license:expat)))
20336
20337 (define-public python-typed-ast
20338 (package
20339 (name "python-typed-ast")
20340 (version "1.4.0")
20341 (source
20342 (origin
20343 (method git-fetch)
20344 (uri (git-reference
20345 (url "https://github.com/python/typed_ast")
20346 (commit version)))
20347 (sha256
20348 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
20349 (file-name (git-file-name name version))))
20350 (build-system python-build-system)
20351 (arguments
20352 `(#:modules ((guix build utils)
20353 (guix build python-build-system)
20354 (ice-9 ftw)
20355 (srfi srfi-1)
20356 (srfi srfi-26))
20357 #:phases
20358 (modify-phases %standard-phases
20359 (replace 'check
20360 (lambda _
20361 (let ((cwd (getcwd)))
20362 (setenv "PYTHONPATH"
20363 (string-append cwd "/build/"
20364 (find (cut string-prefix? "lib" <>)
20365 (scandir (string-append cwd "/build")))
20366 ":"
20367 (getenv "PYTHONPATH"))))
20368 (invoke "pytest")
20369 #t)))))
20370 (native-inputs `(("python-pytest" ,python-pytest)))
20371 (home-page "https://github.com/python/typed_ast")
20372 (synopsis "Fork of Python @code{ast} modules with type comment support")
20373 (description "This package provides a parser similar to the standard
20374 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
20375 include PEP 484 type comments and are independent of the version of Python
20376 under which they are run. The @code{typed_ast} parsers produce the standard
20377 Python AST (plus type comments), and are both fast and correct, as they are
20378 based on the CPython 2.7 and 3.7 parsers.")
20379 ;; See the file "LICENSE" for the details.
20380 (license (list license:psfl
20381 license:asl2.0
20382 license:expat)))) ;ast27/Parser/spark.py
20383
20384 (define-public python-typer
20385 (package
20386 (name "python-typer")
20387 (version "0.3.2")
20388 (source
20389 (origin
20390 ;; Building `python-typer` from the git repository requires the `flit-core`
20391 ;; Python package that is not installed by `python-flit`.
20392 (method url-fetch)
20393 (uri (pypi-uri "typer" version))
20394 (sha256
20395 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
20396 (build-system python-build-system)
20397 (arguments
20398 `(#:phases
20399 (modify-phases %standard-phases
20400 (add-before 'check 'disable-failing-tests
20401 (lambda _
20402 (substitute* "tests/test_completion/test_completion.py"
20403 (("def test_show_completion")
20404 "def _test_show_completion")
20405 (("def test_install_completion")
20406 "def _test_install_completion"))
20407 (substitute* "tests/test_completion/test_completion_install.py"
20408 (("def test_completion_install_bash")
20409 "def _test_completion_install_bash")
20410 (("def test_completion_install_zsh")
20411 "def _test_completion_install_zsh")
20412 (("def test_completion_install_fish")
20413 "def _test_completion_install_fish")
20414 (("def test_completion_install_powershell")
20415 "def _test_completion_install_powershell"))
20416 #t))
20417 (replace 'check
20418 (lambda _
20419 (setenv "PYTHONPATH"
20420 (string-append (getcwd) ":"
20421 (getenv "PYTHONPATH")))
20422 (invoke "python" "-m" "pytest" "tests/")
20423 #t)))))
20424 (propagated-inputs
20425 `(("python-click" ,python-click)))
20426 (native-inputs
20427 `(("python-coverage" ,python-coverage)
20428 ("python-pytest" ,python-pytest)
20429 ("python-shellingham" ,python-shellingham)))
20430 (home-page "https://github.com/tiangolo/typer")
20431 (synopsis
20432 "Typer builds CLI based on Python type hints")
20433 (description
20434 "Typer is a library for building CLI applications. It's based on
20435 Python 3.6+ type hints.")
20436 ;; MIT license
20437 (license license:expat)))
20438
20439 (define-public python-typing
20440 (package
20441 (name "python-typing")
20442 (version "3.7.4.3")
20443 (source
20444 (origin
20445 (method url-fetch)
20446 (uri (pypi-uri "typing" version))
20447 (sha256
20448 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
20449 (build-system python-build-system)
20450 (home-page "https://docs.python.org/3/library/typing.html")
20451 (synopsis "Type hints for Python")
20452 (description "This is a backport of the standard library @code{typing}
20453 module to Python versions older than 3.5. Typing defines a standard notation
20454 for Python function and variable type annotations. The notation can be used
20455 for documenting code in a concise, standard format, and it has been designed
20456 to also be used by static and runtime type checkers, static analyzers, IDEs
20457 and other tools.")
20458 (license license:psfl)))
20459
20460 (define-public python2-typing
20461 (package-with-python2 python-typing))
20462
20463 (define-public python-typing-extensions
20464 (package
20465 (name "python-typing-extensions")
20466 (version "3.7.4.3")
20467 (source
20468 (origin
20469 (method url-fetch)
20470 (uri (pypi-uri "typing_extensions" version))
20471 (sha256
20472 (base32
20473 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20474 (build-system python-build-system)
20475 (home-page
20476 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20477 (synopsis "Experimental type hints for Python")
20478 (description
20479 "The typing_extensions module contains additional @code{typing} hints not
20480 yet present in the of the @code{typing} standard library.
20481 Included are implementations of:
20482 @enumerate
20483 @item ClassVar
20484 @item ContextManager
20485 @item Counter
20486 @item DefaultDict
20487 @item Deque
20488 @item NewType
20489 @item NoReturn
20490 @item overload
20491 @item Protocol
20492 @item runtime
20493 @item Text
20494 @item Type
20495 @item TYPE_CHECKING
20496 @item AsyncGenerator
20497 @end enumerate\n")
20498 (license license:psfl)))
20499
20500 (define-public bpython
20501 (package
20502 (name "bpython")
20503 (version "0.20.1")
20504 (source
20505 (origin
20506 (method url-fetch)
20507 (uri (pypi-uri "bpython" version))
20508 (sha256
20509 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
20510 (build-system python-build-system)
20511 (arguments
20512 `(#:phases
20513 (modify-phases %standard-phases
20514 (add-after 'unpack 'remove-failing-test
20515 (lambda _
20516 ;; Remove failing test. FIXME: make it pass
20517 (delete-file "bpython/test/test_args.py")
20518 #t))
20519 (add-after 'wrap 'add-aliases
20520 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20521 (lambda* (#:key outputs #:allow-other-keys)
20522 (let ((out (assoc-ref outputs "out")))
20523 (for-each
20524 (lambda (old new)
20525 (symlink old (string-append out "/bin/" new)))
20526 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20527 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20528 #t)))))
20529 (propagated-inputs
20530 `(("python-pygments" ,python-pygments)
20531 ("python-requests" ,python-requests)
20532 ("python-curtsies" ,python-curtsies)
20533 ("python-greenlet" ,python-greenlet)
20534 ("python-six" ,python-six)
20535 ("python-wcwidth" ,python-wcwidth)
20536 ;; optional dependencies
20537 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20538 ("python-watchdog" ,python-watchdog)
20539 ("python-jedi" ,python-jedi)))
20540 (native-inputs
20541 `(("python-sphinx" ,python-sphinx)
20542 ("python-mock" ,python-mock)))
20543 (home-page "https://bpython-interpreter.org/")
20544 (synopsis "Fancy interface to the Python interpreter")
20545 (description "Bpython is a fancy interface to the Python
20546 interpreter. bpython's main features are
20547
20548 @enumerate
20549 @item in-line syntax highlighting,
20550 @item readline-like autocomplete with suggestions displayed as you type,
20551 @item expected parameter list for any Python function,
20552 @item \"rewind\" function to pop the last line of code from memory and
20553 re-evaluate,
20554 @item send the code you've entered off to a pastebin,
20555 @item save the code you've entered to a file, and
20556 @item auto-indentation.
20557 @end enumerate")
20558 (license license:expat)))
20559
20560 (define-public python-pyinotify
20561 (package
20562 (name "python-pyinotify")
20563 (version "0.9.6")
20564 (source (origin
20565 (method url-fetch)
20566 (uri (pypi-uri "pyinotify" version))
20567 (sha256
20568 (base32
20569 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20570 (build-system python-build-system)
20571 (arguments `(#:tests? #f)) ;no tests
20572 (home-page "https://github.com/seb-m/pyinotify")
20573 (synopsis "Python library for monitoring inotify events")
20574 (description
20575 "@code{pyinotify} provides a Python interface for monitoring
20576 file system events on Linux.")
20577 (license license:expat)))
20578
20579 (define-public python2-pyinotify
20580 (package-with-python2 python-pyinotify))
20581
20582 ;; Ada parser uses this version.
20583 (define-public python2-quex-0.67.3
20584 (package
20585 (name "python2-quex")
20586 (version "0.67.3")
20587 (source
20588 (origin
20589 (method url-fetch)
20590 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20591 (version-major+minor version)
20592 "/quex-" version ".zip"))
20593 (sha256
20594 (base32
20595 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20596 (build-system python-build-system)
20597 (native-inputs
20598 `(("unzip" ,unzip)))
20599 (arguments
20600 `(#:python ,python-2
20601 #:tests? #f
20602 #:phases
20603 (modify-phases %standard-phases
20604 (delete 'configure)
20605 (delete 'build)
20606 (replace 'install
20607 (lambda* (#:key outputs #:allow-other-keys)
20608 (let* ((out (assoc-ref outputs "out"))
20609 (share/quex (string-append out "/share/quex"))
20610 (bin (string-append out "/bin")))
20611 (copy-recursively "." share/quex)
20612 (mkdir-p bin)
20613 (symlink (string-append share/quex "/quex-exe.py")
20614 (string-append bin "/quex"))
20615 #t))))))
20616 (native-search-paths
20617 (list (search-path-specification
20618 (variable "QUEX_PATH")
20619 (files '("share/quex")))))
20620 (home-page "http://quex.sourceforge.net/")
20621 (synopsis "Lexical analyzer generator in Python")
20622 (description "@code{quex} is a lexical analyzer generator in Python.")
20623 (license license:lgpl2.1+))) ; Non-military
20624
20625 (define-public python2-quex
20626 (package (inherit python2-quex-0.67.3)
20627 (name "python2-quex")
20628 (version "0.68.1")
20629 (source
20630 (origin
20631 (method url-fetch)
20632 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20633 (sha256
20634 (base32
20635 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20636 (file-name (string-append name "-" version ".tar.gz"))))))
20637
20638 (define-public python-more-itertools
20639 (package
20640 (name "python-more-itertools")
20641 (version "8.2.0")
20642 (source
20643 (origin
20644 (method url-fetch)
20645 (uri (pypi-uri "more-itertools" version))
20646 (sha256
20647 (base32
20648 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
20649 (build-system python-build-system)
20650 (home-page "https://github.com/erikrose/more-itertools")
20651 (synopsis "More routines for operating on iterables, beyond itertools")
20652 (description "Python's built-in @code{itertools} module implements a
20653 number of iterator building blocks inspired by constructs from APL, Haskell,
20654 and SML. @code{more-itertools} includes additional building blocks for
20655 working with iterables.")
20656 (properties `((python2-variant . ,(delay python2-more-itertools))))
20657 (license license:expat)))
20658
20659 ;; The 5.x series are the last versions supporting Python 2.7.
20660 (define-public python2-more-itertools
20661 (package
20662 (inherit python-more-itertools)
20663 (name "python2-more-itertools")
20664 (version "5.0.0")
20665 (source (origin
20666 (method url-fetch)
20667 (uri (pypi-uri "more-itertools" version))
20668 (sha256
20669 (base32
20670 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
20671 (arguments
20672 `(#:python ,python-2))
20673 (propagated-inputs
20674 `(("python2-six" ,python2-six-bootstrap)))))
20675
20676 (define-public python-latexcodec
20677 (package
20678 (name "python-latexcodec")
20679 (version "1.0.7")
20680 (source
20681 (origin
20682 (method url-fetch)
20683 (uri (pypi-uri "latexcodec" version))
20684 (sha256
20685 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
20686 (build-system python-build-system)
20687 (inputs
20688 `(("python-six" ,python-six)))
20689 (home-page "https://readthedocs.org/projects/latexcodec/")
20690 (synopsis "Work with LaTeX code in Python")
20691 (description "Lexer and codec to work with LaTeX code in Python.")
20692 (license license:expat)))
20693
20694 (define-public python-pybtex
20695 (package
20696 (name "python-pybtex")
20697 (version "0.22.2")
20698 (source
20699 (origin
20700 (method url-fetch)
20701 (uri (pypi-uri "pybtex" version))
20702 (sha256
20703 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
20704 (build-system python-build-system)
20705 (native-inputs
20706 `(("python-nose" ,python-nose)))
20707 (inputs
20708 `(("python-latexcodec" ,python-latexcodec)
20709 ("python-pyyaml" ,python-pyyaml)
20710 ("python-six" ,python-six)))
20711 (arguments
20712 `(#:test-target "nosetests"))
20713 (home-page "https://pybtex.org/")
20714 (synopsis "BibTeX-compatible bibliography processor")
20715 (description "Pybtex is a BibTeX-compatible bibliography processor written
20716 in Python. You can simply type pybtex instead of bibtex.")
20717 (license license:expat)))
20718
20719 (define-public python-onetimepass
20720 (package
20721 (name "python-onetimepass")
20722 (version "1.0.1")
20723 (source
20724 (origin
20725 (method url-fetch)
20726 (uri (pypi-uri "onetimepass" version))
20727 (sha256
20728 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
20729 (build-system python-build-system)
20730 (propagated-inputs `(("python-six" ,python-six)))
20731 (home-page "https://github.com/tadeck/onetimepass/")
20732 (synopsis "One-time password library")
20733 (description "Python one-time password library for HMAC-based (HOTP) and
20734 time-based (TOTP) passwords.")
20735 (license license:expat)))
20736
20737 (define-public python-parso
20738 (package
20739 (name "python-parso")
20740 (version "0.7.1")
20741 (source
20742 (origin
20743 (method url-fetch)
20744 (uri (pypi-uri "parso" version))
20745 (sha256
20746 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
20747 (native-inputs
20748 `(("python-pytest" ,python-pytest)))
20749 (build-system python-build-system)
20750 (arguments
20751 `(#:phases (modify-phases %standard-phases
20752 (replace 'check
20753 (lambda _ (invoke "pytest" "-vv"))))))
20754 (home-page "https://github.com/davidhalter/parso")
20755 (synopsis "Python Parser")
20756 (description "Parso is a Python parser that supports error recovery and
20757 round-trip parsing for different Python versions (in multiple Python versions).
20758 Parso is also able to list multiple syntax errors in your Python file.")
20759 (license license:expat)))
20760
20761 (define-public python2-parso
20762 (package-with-python2 python-parso))
20763
20764 (define-public python-async-generator
20765 (package
20766 (name "python-async-generator")
20767 (version "1.10")
20768 (source
20769 (origin
20770 (method url-fetch)
20771 (uri (pypi-uri "async_generator" version))
20772 (sha256
20773 (base32
20774 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
20775 (build-system python-build-system)
20776 (native-inputs
20777 `(("python-pytest" ,python-pytest)))
20778 (home-page "https://github.com/python-trio/async_generator")
20779 (synopsis "Async generators and context managers for Python 3.5+")
20780 (description "@code{async_generator} back-ports Python 3.6's native async
20781 generators and Python 3.7's context managers into Python 3.5.")
20782 ;; Dual licensed.
20783 (license (list license:expat license:asl2.0))))
20784
20785 (define-public python-async-timeout
20786 (package
20787 (name "python-async-timeout")
20788 (version "3.0.1")
20789 (source
20790 (origin
20791 (method url-fetch)
20792 (uri (pypi-uri "async-timeout" version))
20793 (sha256
20794 (base32
20795 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
20796 (build-system python-build-system)
20797 (home-page "https://github.com/aio-libs/async_timeout/")
20798 (synopsis "Timeout context manager for asyncio programs")
20799 (description "@code{async-timeout} provides a timeout timeout context
20800 manager compatible with @code{asyncio}.")
20801 (license license:asl2.0)))
20802
20803 (define-public python-glob2
20804 (package
20805 (name "python-glob2")
20806 (version "0.7")
20807 (source
20808 (origin
20809 (method git-fetch)
20810 (uri (git-reference
20811 (url "https://github.com/miracle2k/python-glob2")
20812 (commit (string-append "v" version))))
20813 (file-name (git-file-name name version))
20814 (sha256
20815 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
20816 (build-system python-build-system)
20817 (home-page "https://github.com/miracle2k/python-glob2/")
20818 (synopsis "Extended Version of the python buildin glob module")
20819 (description "This is an extended version of the Python
20820 @url{http://docs.python.org/library/glob.html, built-in glob module} which
20821 adds:
20822
20823 @itemize
20824 @item The ability to capture the text matched by glob patterns, and return
20825 those matches alongside the file names.
20826 @item A recursive @code{**} globbing syntax, akin for example to the
20827 @code{globstar} option of Bash.
20828 @item The ability to replace the file system functions used, in order to glob
20829 on virtual file systems.
20830 @item Compatible with Python 2 and Python 3 (tested with 3.3).
20831 @end itemize
20832
20833 Glob2 currently based on the glob code from Python 3.3.1.")
20834 (license license:bsd-2)))
20835
20836 (define-public python2-glob2
20837 (package-with-python2 python-glob2))
20838
20839 (define-public python-gipc
20840 (package
20841 (name "python-gipc")
20842 (version "0.6.0")
20843 (source
20844 (origin
20845 (method url-fetch)
20846 (uri (pypi-uri "gipc" version ".zip"))
20847 (sha256
20848 (base32
20849 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
20850 (build-system python-build-system)
20851 (native-inputs
20852 `(("unzip" ,unzip)))
20853 (propagated-inputs
20854 `(("python-gevent" ,python-gevent)))
20855 (home-page "https://gehrcke.de/gipc/")
20856 (synopsis "Child process management in the context of gevent")
20857 (description "Usage of Python's multiprocessing package in a
20858 gevent-powered application may raise problems. With @code{gipc},
20859 process-based child processes can safely be created anywhere within a
20860 gevent-powered application.")
20861 (license license:expat)))
20862
20863 (define-public python-beautifultable
20864 (package
20865 (name "python-beautifultable")
20866 (version "1.0.0")
20867 (source
20868 (origin
20869 (method url-fetch)
20870 (uri (pypi-uri "beautifultable" version))
20871 (sha256
20872 (base32
20873 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
20874 (build-system python-build-system)
20875 (propagated-inputs
20876 `(("python-wcwidth" ,python-wcwidth)))
20877 (arguments
20878 `(#:phases
20879 (modify-phases %standard-phases
20880 (add-after 'unpack 'patch-setup.py
20881 (lambda _
20882 (substitute* "setup.py"
20883 (("setup\\(")
20884 "setup(\n test_suite=\"test\",")))))))
20885 (home-page "https://github.com/pri22296/beautifultable")
20886 (synopsis "Print ASCII tables for terminals")
20887 (description "@code{python-beautifultable} provides a class for easily
20888 printing tabular data in a visually appealing ASCII format to a terminal.
20889
20890 Features include, but are not limited to:
20891 @itemize
20892 @item Full customization of the look and feel of the table
20893 @item Row and column accessors.
20894 @item Full support for colors using ANSI sequences or any library.
20895 @item Plenty of predefined styles and option to create custom ones.
20896 @item Support for Unicode characters.
20897 @item Supports streaming table when data is slow to retrieve.
20898 @end itemize")
20899 (license license:expat)))
20900
20901 (define-public python-globber
20902 (package
20903 (name "python-globber")
20904 (version "0.2.1")
20905 (source
20906 (origin
20907 (method git-fetch)
20908 (uri (git-reference
20909 (url "https://github.com/asharov/globber")
20910 (commit version)))
20911 (file-name (git-file-name name version))
20912 (sha256
20913 (base32
20914 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
20915 (build-system python-build-system)
20916 (home-page "https://github.com/asharov/globber")
20917 (synopsis "Library for string matching with glob patterns")
20918 (description
20919 "Globber is a Python library for matching file names against glob patterns.
20920 In contrast to other glob-matching libraries, it matches arbitrary strings and
20921 doesn't require the matched names to be existing files. In addition, it
20922 supports the globstar @code{**} operator to match an arbitrary number of
20923 path components.")
20924 (license license:asl2.0)))
20925
20926 (define-public python-git-hammer
20927 (package
20928 (name "python-git-hammer")
20929 (version "0.3.1")
20930 (source
20931 (origin
20932 (method git-fetch)
20933 (uri (git-reference
20934 (url "https://github.com/asharov/git-hammer")
20935 (commit version)))
20936 (file-name (git-file-name name version))
20937 (sha256
20938 (base32
20939 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
20940 (build-system python-build-system)
20941 (arguments
20942 `(#:phases
20943 (modify-phases %standard-phases
20944 (add-after 'unpack 'patch-setup.py
20945 (lambda _
20946 (substitute* "setup.py"
20947 (("setup\\(")
20948 "setup(\n test_suite=\"test\",")))))))
20949 (propagated-inputs
20950 `(("python-beautifultable" ,python-beautifultable)
20951 ("python-dateutil" ,python-dateutil)
20952 ("python-gitpython" ,python-gitpython)
20953 ("python-globber" ,python-globber)
20954 ("python-matplotlib" ,python-matplotlib)
20955 ("python-sqlalchemy" ,python-sqlalchemy)
20956 ("python-sqlalchemy-utils"
20957 ,python-sqlalchemy-utils)))
20958 (home-page "https://github.com/asharov/git-hammer")
20959 (synopsis "Provide statistics for git repositories")
20960 (description
20961 "Git Hammer is a statistics tool for projects in git repositories.
20962 Its major feature is tracking the number of lines authored by each person for every
20963 commit, but it also includes some other useful statistics.")
20964 (license license:asl2.0)))
20965
20966 (define-public python-fusepy
20967 (package
20968 (name "python-fusepy")
20969 (version "2.0.4")
20970 (source
20971 (origin
20972 (method url-fetch)
20973 (uri (pypi-uri "fusepy" version))
20974 (sha256
20975 (base32
20976 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
20977 (build-system python-build-system)
20978 (arguments
20979 `(#:phases
20980 (modify-phases %standard-phases
20981 (add-before 'build 'set-library-file-name
20982 (lambda* (#:key inputs #:allow-other-keys)
20983 (let ((fuse (assoc-ref inputs "fuse")))
20984 (substitute* "fuse.py"
20985 (("find_library\\('fuse'\\)")
20986 (string-append "'" fuse "/lib/libfuse.so'")))
20987 #t))))))
20988 (propagated-inputs
20989 `(("fuse" ,fuse)))
20990 (home-page "https://github.com/fusepy/fusepy")
20991 (synopsis "Simple ctypes bindings for FUSE")
20992 (description "Python module that provides a simple interface to FUSE and
20993 MacFUSE. The binding is created using the standard @code{ctypes} library.")
20994 (license license:isc)))
20995
20996 (define-public python2-fusepy
20997 (package-with-python2 python-fusepy))
20998
20999 (define-public python-fusepyng
21000 (package
21001 (name "python-fusepyng")
21002 (version "1.0.7")
21003 (source
21004 (origin
21005 (method url-fetch)
21006 (uri (pypi-uri "fusepyng" version))
21007 (sha256
21008 (base32
21009 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
21010 (build-system python-build-system)
21011 (arguments
21012 '(#:phases
21013 (modify-phases %standard-phases
21014 (add-after 'unpack 'set-libfuse-path
21015 (lambda* (#:key inputs #:allow-other-keys)
21016 (let ((fuse (assoc-ref inputs "fuse")))
21017 (substitute* "fusepyng.py"
21018 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
21019 (string-append "\"" fuse "/lib/libfuse.so\""))))
21020 #t)))))
21021 (inputs
21022 `(("fuse" ,fuse)))
21023 (propagated-inputs
21024 `(("python-paramiko" ,python-paramiko)))
21025 (home-page "https://github.com/rianhunter/fusepyng")
21026 (synopsis "Simple ctypes bindings for FUSE")
21027 (description "@code{fusepyng} is a Python module that provides a simple
21028 interface to FUSE on various operating systems. It's just one file and is
21029 implemented using @code{ctypes}.")
21030 (license license:isc)))
21031
21032 (define-public python-userspacefs
21033 (package
21034 (name "python-userspacefs")
21035 (version "2.0.3")
21036 (source
21037 (origin
21038 (method url-fetch)
21039 (uri (pypi-uri "userspacefs" version))
21040 (sha256
21041 (base32
21042 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
21043 (build-system python-build-system)
21044 (propagated-inputs
21045 `(("python-fusepyng" ,python-fusepyng)))
21046 (home-page "https://github.com/rianhunter/userspacefs")
21047 (synopsis "User-space file systems for Python")
21048 (description
21049 "@code{userspacefs} is a library that allows you to easily write
21050 user-space file systems in Python.")
21051 (license license:gpl3+)))
21052
21053 (define-public python-stone
21054 (package
21055 (name "python-stone")
21056 (version "3.2.1")
21057 (source
21058 (origin
21059 (method url-fetch)
21060 (uri (pypi-uri "stone" version))
21061 (sha256
21062 (base32
21063 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
21064 (build-system python-build-system)
21065 (arguments
21066 `(#:phases
21067 (modify-phases %standard-phases
21068 (add-after 'unpack 'change-version-requirements
21069 (lambda _
21070 ;; Match the requirement in test/requirements.txt
21071 (substitute* "setup.py"
21072 (("pytest < 5") "pytest < 7"))
21073 ;; We don't care about a coverage report.
21074 (substitute* "test/requirements.txt"
21075 (("coverage.*") "coverage\n"))
21076 #t))
21077 (replace 'check
21078 (lambda* (#:key tests? #:allow-other-keys)
21079 (when tests?
21080 ;; These tests don't import currectly.
21081 (delete-file "test/test_js_client.py")
21082 (delete-file "test/test_tsd_types.py")
21083 (delete-file "test/test_python_gen.py")
21084 (setenv "PYTHONPATH"
21085 (string-append (getcwd) ":"
21086 (getenv "PYTHONPATH")))
21087 (invoke "pytest"))
21088 #t)))))
21089 (propagated-inputs
21090 `(("python-ply" ,python-ply)
21091 ("python-six" ,python-six)))
21092 (native-inputs
21093 `(("python-coverage" ,python-coverage)
21094 ("python-mock" ,python-mock)
21095 ("python-pytest" ,python-pytest)
21096 ("python-pytest-runner" ,python-pytest-runner)))
21097 (home-page "https://github.com/dropbox/stone")
21098 (synopsis "Official Api Spec Language for Dropbox")
21099 (description
21100 "Stone is an interface description language (IDL) for APIs.")
21101 (license license:expat)))
21102
21103 (define-public pybind11
21104 (package
21105 (name "pybind11")
21106 (version "2.6.2")
21107 (source (origin
21108 (method git-fetch)
21109 (uri (git-reference
21110 (url "https://github.com/pybind/pybind11")
21111 (commit (string-append "v" version))))
21112 (sha256
21113 (base32
21114 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
21115 (file-name (git-file-name name version))))
21116 (build-system cmake-build-system)
21117 (native-inputs
21118 `(("python" ,python-wrapper)
21119
21120 ;; The following dependencies are used for tests.
21121 ("python-pytest" ,python-pytest)
21122 ("catch" ,catch-framework2-1)
21123 ("eigen" ,eigen)))
21124 (arguments
21125 `(#:configure-flags
21126 (list (string-append "-DCATCH_INCLUDE_DIR="
21127 (assoc-ref %build-inputs "catch")
21128 "/include/catch"))
21129
21130 #:phases (modify-phases %standard-phases
21131 (add-after 'install 'install-python
21132 (lambda* (#:key outputs #:allow-other-keys)
21133 (let ((out (assoc-ref outputs "out")))
21134 (with-directory-excursion "../source"
21135 (setenv "PYBIND11_USE_CMAKE" "yes")
21136 (invoke "python" "setup.py" "install"
21137 "--single-version-externally-managed"
21138 "--root=/"
21139 (string-append "--prefix=" out)))))))
21140
21141 #:test-target "check"))
21142 (home-page "https://github.com/pybind/pybind11/")
21143 (synopsis "Seamless operability between C++11 and Python")
21144 (description
21145 "@code{pybind11} is a lightweight header-only library that exposes C++
21146 types in Python and vice versa, mainly to create Python bindings of existing
21147 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
21148 library: to minimize boilerplate code in traditional extension modules by
21149 inferring type information using compile-time introspection.")
21150 (license license:bsd-3)))
21151
21152 (define-public python-pooch
21153 (package
21154 (name "python-pooch")
21155 (version "1.3.0")
21156 (source
21157 (origin
21158 (method url-fetch)
21159 (uri (pypi-uri "pooch" version))
21160 (sha256
21161 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
21162 (build-system python-build-system)
21163 (arguments
21164 `(#:tests? #f)) ;requires online data
21165 (propagated-inputs
21166 `(("python-appdirs" ,python-appdirs)
21167 ("python-packaging" ,python-packaging)
21168 ("python-requests" ,python-requests)))
21169 (home-page "https://github.com/fatiando/pooch")
21170 (synopsis "Manage your Python library's sample data files")
21171 (description
21172 "Pooch manages your Python library's sample data files: it automatically
21173 downloads and stores them in a local directory, with support for versioning
21174 and corruption checks.")
21175 (license license:bsd-3)))
21176
21177 (define-public python-fasteners
21178 (package
21179 (name "python-fasteners")
21180 (version "0.15")
21181 (source
21182 (origin
21183 (method url-fetch)
21184 (uri (pypi-uri "fasteners" version))
21185 (sha256
21186 (base32
21187 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
21188 (build-system python-build-system)
21189 (propagated-inputs
21190 `(("python-monotonic" ,python-monotonic)
21191 ("python-six" ,python-six)))
21192 (native-inputs
21193 `(("python-testtools" ,python-testtools)))
21194 (home-page "https://github.com/harlowja/fasteners")
21195 (synopsis "Python package that provides useful locks")
21196 (description
21197 "This package provides a Python program that provides following locks:
21198
21199 @itemize
21200 @item Locking decorator
21201 @item Reader-writer locks
21202 @item Inter-process locks
21203 @item Generic helpers
21204 @end itemize\n")
21205 (license license:asl2.0)))
21206
21207 (define-public python-requests-file
21208 (package
21209 (name "python-requests-file")
21210 (version "1.4.3")
21211 (source
21212 (origin
21213 (method url-fetch)
21214 (uri (pypi-uri "requests-file" version))
21215 (sha256
21216 (base32
21217 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
21218 (build-system python-build-system)
21219 (propagated-inputs
21220 `(("python-requests" ,python-requests)
21221 ("python-six" ,python-six)))
21222 (home-page
21223 "https://github.com/dashea/requests-file")
21224 (synopsis "File transport adapter for Requests")
21225 (description
21226 "Requests-File is a transport adapter for use with the Requests Python
21227 library to allow local file system access via @code{file://} URLs.")
21228 (license license:asl2.0)))
21229
21230 (define-public python2-requests-file
21231 (package-with-python2 python-requests-file))
21232
21233 (define-public python-identify
21234 (package
21235 (name "python-identify")
21236 (version "1.4.25")
21237 (source
21238 (origin
21239 ;; There are no tests in the PyPI tarball.
21240 (method git-fetch)
21241 (uri (git-reference
21242 (url "https://github.com/chriskuehl/identify")
21243 (commit (string-append "v" version))))
21244 (file-name (git-file-name name version))
21245 (sha256
21246 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
21247 (build-system python-build-system)
21248 (arguments
21249 `(#:phases
21250 (modify-phases %standard-phases
21251 (replace 'check
21252 (lambda _
21253 (invoke "pytest" "-vv"))))))
21254 (native-inputs
21255 `(("python-coverage" ,python-coverage)
21256 ("python-pytest" ,python-pytest)))
21257 (propagated-inputs
21258 `(("python-editdistance" ,python-editdistance)))
21259 (home-page "https://github.com/chriskuehl/identify")
21260 (synopsis "File identification library for Python")
21261 (description
21262 "@code{identify} is a file identification library for Python. Given
21263 a file (or some information about a file), return a set of standardized tags
21264 identifying what the file is.")
21265 (license license:expat)))
21266
21267 (define-public python-tldextract
21268 (package
21269 (name "python-tldextract")
21270 (version "2.2.0")
21271 (source
21272 (origin
21273 (method url-fetch)
21274 (uri (pypi-uri "tldextract" version))
21275 (sha256
21276 (base32
21277 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
21278 (build-system python-build-system)
21279 (native-inputs
21280 `(("python-pytest" ,python-pytest)
21281 ("python-responses" ,python-responses)))
21282 (propagated-inputs
21283 `(("python-idna" ,python-idna)
21284 ("python-requests" ,python-requests)
21285 ("python-requests-file" ,python-requests-file)))
21286 (home-page
21287 "https://github.com/john-kurkowski/tldextract")
21288 (synopsis
21289 "Separate the TLD from the registered domain and subdomains of a URL")
21290 (description
21291 "TLDExtract accurately separates the TLD from the registered domain and
21292 subdomains of a URL, using the Public Suffix List. By default, this includes
21293 the public ICANN TLDs and their exceptions. It can optionally support the
21294 Public Suffix List's private domains as well.")
21295 (license license:bsd-3)))
21296
21297 (define-public python2-tldextract
21298 (package-with-python2 python-tldextract))
21299
21300 (define-public python-tldr
21301 (package
21302 (name "python-tldr")
21303 (version "1.2.1")
21304 (source
21305 (origin
21306 ;; There's no test in PyPI.
21307 (method git-fetch)
21308 (uri (git-reference
21309 (url "https://github.com/tldr-pages/tldr-python-client")
21310 (commit version)))
21311 (file-name (git-file-name name version))
21312 (sha256
21313 (base32 "0n9wqvjxspm18vlxf9j9slrcydshk4rkv5nwkrqhfq606n6zvks4"))))
21314 (build-system python-build-system)
21315 (arguments
21316 `(#:phases
21317 (modify-phases %standard-phases
21318 (replace 'check
21319 (lambda* (#:key tests? #:allow-other-keys)
21320 (when tests?
21321 ;; This test fails. It tries to open a network socket.
21322 (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
21323 (native-inputs
21324 `(("python-pytest" ,python-pytest)
21325 ("python-pytest-runner" ,python-pytest-runner)))
21326 (inputs
21327 `(("python-argcomplete" ,python-argcomplete)
21328 ("python-colorama" ,python-colorama)
21329 ("python-termcolor" ,python-termcolor)))
21330 (home-page "https://github.com/tldr-pages/tldr-python-client")
21331 (synopsis "Python command-line client for tldr pages")
21332 (description "This package provides the @code{tldr} command allowing users
21333 to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
21334 effort to simplify the man pages with practical examples.")
21335 (license license:expat))) ; MIT license
21336
21337 (define-public python-nodeenv
21338 (package
21339 (name "python-nodeenv")
21340 (version "1.4.0")
21341 (source
21342 (origin
21343 ;; There's no tarball in PyPI.
21344 (method git-fetch)
21345 (uri (git-reference
21346 (url "https://github.com/ekalinin/nodeenv")
21347 (commit version)))
21348 (file-name (git-file-name name version))
21349 (sha256
21350 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
21351 (build-system python-build-system)
21352 (arguments
21353 `(#:phases
21354 (modify-phases %standard-phases
21355 (replace 'check
21356 (lambda _
21357 ;; This test fails. It tries to open a network socket.
21358 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
21359 (native-inputs
21360 `(("python-coverage" ,python-coverage)
21361 ("python-mock" ,python-mock)
21362 ("python-pytest" ,python-pytest)))
21363 (home-page "https://ekalinin.github.io/nodeenv/")
21364 (synopsis "Create isolated node.js environments")
21365 (description
21366 "Nodeenv (node.js virtual environment) is a tool to create isolated
21367 node.js environments. It creates an environment that has its own installation
21368 directories, that doesn't share libraries with other node.js virtual
21369 environments.")
21370 (license license:bsd-3)))
21371
21372 (define-public python-pynamecheap
21373 (package
21374 (name "python-pynamecheap")
21375 (version "0.0.3")
21376 (source
21377 (origin
21378 (method url-fetch)
21379 (uri (pypi-uri "PyNamecheap" version))
21380 (sha256
21381 (base32
21382 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
21383 (build-system python-build-system)
21384 (propagated-inputs
21385 `(("python-requests" ,python-requests)))
21386 (home-page
21387 "https://github.com/Bemmu/PyNamecheap")
21388 (synopsis
21389 "Namecheap API client in Python")
21390 (description
21391 "PyNamecheap is a Namecheap API client in Python.")
21392 (license license:expat)))
21393
21394 (define-public python2-pynamecheap
21395 (package-with-python2 python-pynamecheap))
21396
21397 (define-public python-dns-lexicon
21398 (package
21399 (name "python-dns-lexicon")
21400 (version "2.4.0")
21401 (source
21402 (origin
21403 (method url-fetch)
21404 (uri (pypi-uri "dns-lexicon" version))
21405 (sha256
21406 (base32
21407 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
21408 (build-system python-build-system)
21409 (arguments
21410 `(#:tests? #f)) ;requires internet access
21411 (propagated-inputs
21412 `(("python-future" ,python-future)
21413 ("python-pynamecheap" ,python-pynamecheap)
21414 ("python-requests" ,python-requests)
21415 ("python-tldextract" ,python-tldextract)
21416 ("python-urllib3" ,python-urllib3)))
21417 (home-page "https://github.com/AnalogJ/lexicon")
21418 (synopsis
21419 "Manipulate DNS records on various DNS providers")
21420 (description
21421 "Lexicon provides a way to manipulate DNS records on multiple DNS
21422 providers in a standardized way. It has a CLI but it can also be used as a
21423 Python library. It was designed to be used in automation, specifically with
21424 Let's Encrypt.")
21425 (license license:expat)))
21426
21427 (define-public python2-dns-lexicon
21428 (package-with-python2 python-dns-lexicon))
21429
21430 (define-public python-cfgv
21431 (package
21432 (name "python-cfgv")
21433 (version "3.1.0")
21434 (source
21435 (origin
21436 ;; There are no tests in the PyPI tarball.
21437 (method git-fetch)
21438 (uri (git-reference
21439 (url "https://github.com/asottile/cfgv")
21440 (commit (string-append "v" version))))
21441 (file-name (git-file-name name version))
21442 (sha256
21443 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
21444 (build-system python-build-system)
21445 (arguments
21446 `(#:phases
21447 (modify-phases %standard-phases
21448 (replace 'check
21449 (lambda _
21450 (invoke "pytest" "-vv"))))))
21451 (native-inputs
21452 `(("python-covdefaults" ,python-covdefaults)
21453 ("python-coverage" ,python-coverage)
21454 ("python-pytest" ,python-pytest)))
21455 (home-page "https://github.com/asottile/cfgv")
21456 (synopsis "Configuration validation library")
21457 (description
21458 "This library helps to validate configuration files and produce human
21459 readable error messages.")
21460 (license license:expat)))
21461
21462 (define-public python-commandlines
21463 (package
21464 (name "python-commandlines")
21465 (version "0.4.1")
21466 (source
21467 (origin
21468 (method url-fetch)
21469 (uri (pypi-uri "commandlines" version))
21470 (sha256
21471 (base32
21472 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
21473 (build-system python-build-system)
21474 (home-page "https://github.com/chrissimpkins/commandlines")
21475 (synopsis "Command line argument to object parsing library")
21476 (description
21477 "@code{Commandlines} is a Python library for command line application
21478 development that supports command line argument parsing, command string
21479 validation testing and application logic.")
21480 (license license:expat)))
21481
21482 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
21483 ;; python-numba. They have a very unflexible relationship.
21484 (define-public python-numba
21485 (package
21486 (name "python-numba")
21487 (version "0.51.2")
21488 (source
21489 (origin
21490 (method url-fetch)
21491 (uri (pypi-uri "numba" version))
21492 (sha256
21493 (base32
21494 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
21495 (build-system python-build-system)
21496 (arguments
21497 `(#:phases
21498 (modify-phases %standard-phases
21499 (add-after 'unpack 'disable-proprietary-features
21500 (lambda _
21501 (setenv "NUMBA_DISABLE_HSA" "1")
21502 (setenv "NUMBA_DISABLE_CUDA" "1")
21503 #t))
21504 (replace 'check
21505 (lambda* (#:key inputs outputs #:allow-other-keys)
21506 (add-installed-pythonpath inputs outputs)
21507 ;; Something is wrong with the PYTHONPATH when running the
21508 ;; tests from the build directory, as it complains about not being
21509 ;; able to import certain modules.
21510 (with-directory-excursion "/tmp"
21511 (setenv "HOME" (getcwd))
21512 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21513 (propagated-inputs
21514 `(("python-llvmlite" ,python-llvmlite)
21515 ("python-numpy" ,python-numpy)
21516 ("python-singledispatch" ,python-singledispatch)))
21517 (native-inputs ;for tests
21518 `(("python-jinja2" ,python-jinja2)
21519 ("python-pygments" ,python-pygments)))
21520 (home-page "https://numba.pydata.org")
21521 (synopsis "Compile Python code using LLVM")
21522 (description "Numba gives you the power to speed up your applications with
21523 high performance functions written directly in Python. With a few
21524 annotations, array-oriented and math-heavy Python code can be just-in-time
21525 compiled to native machine instructions, similar in performance to C, C++ and
21526 Fortran, without having to switch languages or Python interpreters.
21527
21528 Numba works by generating optimized machine code using the LLVM compiler
21529 infrastructure at import time, runtime, or statically (using the included pycc
21530 tool).")
21531 (license license:bsd-3)))
21532
21533 (define-public python-numcodecs
21534 (package
21535 (name "python-numcodecs")
21536 (version "0.6.4")
21537 (source
21538 (origin
21539 (method url-fetch)
21540 (uri (pypi-uri "numcodecs" version))
21541 (sha256
21542 (base32
21543 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21544 (build-system python-build-system)
21545 (propagated-inputs
21546 `(("python-numpy" ,python-numpy)
21547 ("python-msgpack" ,python-msgpack)))
21548 (native-inputs
21549 `(("python-pytest" ,python-pytest)
21550 ("python-setuptools-scm" ,python-setuptools-scm)))
21551 (home-page "https://github.com/zarr-developers/numcodecs")
21552 (synopsis "Buffer compression and transformation codecs")
21553 (description
21554 "This Python package provides buffer compression and transformation
21555 codecs for use in data storage and communication applications.")
21556 (license license:expat)))
21557
21558 (define-public python-asciitree
21559 (package
21560 (name "python-asciitree")
21561 (version "0.3.3")
21562 (source
21563 (origin
21564 (method url-fetch)
21565 (uri (pypi-uri "asciitree" version))
21566 (sha256
21567 (base32
21568 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21569 (build-system python-build-system)
21570 (home-page "https://github.com/mbr/asciitree")
21571 (synopsis "Draws ASCII trees")
21572 (description "This package draws tree structures using characters.")
21573 (license license:expat)))
21574
21575 (define-public python-zarr
21576 (package
21577 (name "python-zarr")
21578 (version "2.4.0")
21579 (source
21580 (origin
21581 (method url-fetch)
21582 (uri (pypi-uri "zarr" version))
21583 (sha256
21584 (base32
21585 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21586 (build-system python-build-system)
21587 (arguments
21588 `(#:phases
21589 (modify-phases %standard-phases
21590 (add-after 'unpack 'disable-service-tests
21591 (lambda _
21592 (setenv "ZARR_TEST_ABS" "0")
21593 (setenv "ZARR_TEST_MONGO" "0")
21594 (setenv "ZARR_TEST_REDIS" "0")
21595 #t))
21596 (replace 'check
21597 (lambda _
21598 (invoke "pytest" "-vv" "-k" "not lmdb")
21599 #t)))))
21600 (propagated-inputs
21601 `(("python-asciitree" ,python-asciitree)
21602 ("python-fasteners" ,python-fasteners)
21603 ("python-numcodecs" ,python-numcodecs)
21604 ("python-numpy" ,python-numpy)))
21605 (native-inputs
21606 `(("python-pytest" ,python-pytest)
21607 ("python-setuptools-scm" ,python-setuptools-scm)))
21608 (home-page "https://github.com/zarr-developers/zarr-python")
21609 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21610 (description
21611 "This package provides an implementation of chunked, compressed,
21612 N-dimensional arrays for Python.")
21613 (license license:expat)))
21614
21615 (define-public python-anndata
21616 (package
21617 (name "python-anndata")
21618 (version "0.7.6")
21619 (source
21620 (origin
21621 ;; The tarball from PyPi doesn't include tests.
21622 (method git-fetch)
21623 (uri (git-reference
21624 (url "https://github.com/theislab/anndata")
21625 (commit version)))
21626 (file-name (git-file-name name version))
21627 (sha256
21628 (base32
21629 "1q30bsfsq9xfqm8nmabg3bjh9gix3yng0170xiiyw1lin4xncf0q"))))
21630 (build-system python-build-system)
21631 (arguments
21632 `(#:phases
21633 (modify-phases %standard-phases
21634 (delete 'check)
21635 (add-before 'build 'relax-dependency-requirements
21636 (lambda _
21637 ;; We need to upgrade python-pandas to avoid
21638 ;; https://github.com/pandas-dev/pandas/issues/35446
21639 (substitute* "pyproject.toml"
21640 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21641 (replace 'build
21642 (lambda _
21643 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
21644 ;; ZIP does not support timestamps before 1980.
21645 (setenv "SOURCE_DATE_EPOCH" "315532800")
21646 (invoke "flit" "build")))
21647 (replace 'install
21648 (lambda* (#:key inputs outputs #:allow-other-keys)
21649 (add-installed-pythonpath inputs outputs)
21650 (let ((out (assoc-ref outputs "out")))
21651 (for-each (lambda (wheel)
21652 (format #true wheel)
21653 (invoke "python" "-m" "pip" "install"
21654 wheel (string-append "--prefix=" out)))
21655 (find-files "dist" "\\.whl$")))
21656 #t)))))
21657 (propagated-inputs
21658 `(("python-h5py" ,python-h5py)
21659 ("python-importlib-metadata" ,python-importlib-metadata)
21660 ("python-natsort" ,python-natsort)
21661 ("python-numcodecs" ,python-numcodecs)
21662 ("python-packaging" ,python-packaging)
21663 ("python-pandas" ,python-pandas)
21664 ("python-scipy" ,python-scipy)
21665 ("python-zarr" ,python-zarr)))
21666 (native-inputs
21667 `(("python-joblib" ,python-joblib)
21668 ("python-pytest" ,python-pytest)
21669 ("python-toml" ,python-toml)
21670 ("python-flit" ,python-flit)
21671 ("python-setuptools-scm" ,python-setuptools-scm)))
21672 (home-page "https://github.com/theislab/anndata")
21673 (synopsis "Annotated data for data analysis pipelines")
21674 (description "Anndata is a package for simple (functional) high-level APIs
21675 for data analysis pipelines. In this context, it provides an efficient,
21676 scalable way of keeping track of data together with learned annotations and
21677 reduces the code overhead typically encountered when using a mostly
21678 object-oriented library such as @code{scikit-learn}.")
21679 (license license:bsd-3)))
21680
21681 (define-public python-dill
21682 (package
21683 (name "python-dill")
21684 (version "0.3.1.1")
21685 (source
21686 (origin
21687 (method url-fetch)
21688 (uri (pypi-uri "dill" version))
21689 (sha256
21690 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
21691 (build-system python-build-system)
21692 (arguments
21693 `(#:phases
21694 (modify-phases %standard-phases
21695 (replace 'check
21696 (lambda _
21697 (with-directory-excursion "/tmp"
21698 (invoke "nosetests" "-v"))
21699 #t)))))
21700 (native-inputs
21701 `(("python-nose" ,python-nose)))
21702 (home-page "https://pypi.org/project/dill/")
21703 (synopsis "Serialize all of Python")
21704 (description "Dill extends Python's @code{pickle} module for serializing
21705 and de-serializing Python objects to the majority of the built-in Python
21706 types. Dill provides the user the same interface as the @code{pickle} module,
21707 and also includes some additional features. In addition to pickling Python
21708 objects, @code{dill} provides the ability to save the state of an interpreter
21709 session in a single command. Hence, it would be feasible to save a
21710 interpreter session, close the interpreter, ship the pickled file to another
21711 computer, open a new interpreter, unpickle the session and thus continue from
21712 the saved state of the original interpreter session.")
21713 (license license:bsd-3)))
21714
21715 (define-public python-multiprocess
21716 (package
21717 (name "python-multiprocess")
21718 (version "0.70.9")
21719 (source
21720 (origin
21721 (method url-fetch)
21722 (uri (pypi-uri "multiprocess" version))
21723 (sha256
21724 (base32
21725 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
21726 (build-system python-build-system)
21727 (arguments
21728 `(#:phases
21729 (modify-phases %standard-phases
21730 (add-after 'unpack 'disable-broken-tests
21731 (lambda _
21732 ;; This test is broken as there is no keyboard interrupt.
21733 (substitute* "py3.7/multiprocess/tests/__init__.py"
21734 (("^(.*)def test_wait_result"
21735 line indent)
21736 (string-append indent
21737 "@unittest.skip(\"Disabled by Guix\")\n"
21738 line)))
21739 #t))
21740 ;; Tests must be run after installation.
21741 (delete 'check)
21742 (add-after 'install 'check
21743 (lambda* (#:key inputs outputs #:allow-other-keys)
21744 (add-installed-pythonpath inputs outputs)
21745 (invoke "python" "-m" "multiprocess.tests")
21746 #t)))))
21747 (propagated-inputs
21748 `(("python-dill" ,python-dill)))
21749 (home-page "https://pypi.org/project/multiprocess/")
21750 (synopsis "Multiprocessing and multithreading in Python")
21751 (description
21752 "This package is a fork of the multiprocessing Python package, a package
21753 which supports the spawning of processes using the API of the standard
21754 library's @code{threading} module.")
21755 (license license:bsd-3)))
21756
21757 (define-public python-toolz
21758 (package
21759 (name "python-toolz")
21760 (version "0.11.1")
21761 (source
21762 (origin
21763 (method url-fetch)
21764 (uri (pypi-uri "toolz" version))
21765 (sha256
21766 (base32
21767 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
21768 (build-system python-build-system)
21769 (arguments
21770 `(#:phases
21771 (modify-phases %standard-phases
21772 (replace 'check
21773 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
21774 (when tests?
21775 (add-installed-pythonpath inputs outputs)
21776 (invoke "python" "-m" "pytest" "--doctest-modules"
21777 "--pyargs" "toolz")))))))
21778 (native-inputs
21779 `(("python-pytest" ,python-pytest)))
21780 (home-page "https://github.com/pytoolz/toolz/")
21781 (synopsis "List processing tools and functional utilities")
21782 (description
21783 "This package provides a set of utility functions for iterators,
21784 functions, and dictionaries.")
21785 (license license:bsd-3)))
21786
21787 (define-public python-cytoolz
21788 (package
21789 (name "python-cytoolz")
21790 (version "0.9.0.1")
21791 (source
21792 (origin
21793 (method url-fetch)
21794 (uri (pypi-uri "cytoolz" version))
21795 (sha256
21796 (base32
21797 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
21798 (build-system python-build-system)
21799 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
21800 ;; 'exceptions'"
21801 (arguments '(#:tests? #f))
21802 (propagated-inputs
21803 `(("python-toolz" ,python-toolz)))
21804 (native-inputs
21805 `(("python-cython" ,python-cython)))
21806 (home-page "https://github.com/pytoolz/cytoolz")
21807 (synopsis "High performance functional utilities")
21808 (description
21809 "The cytoolz package implements the same API as provided by toolz. The
21810 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
21811 that is accessible to other projects developed in Cython.")
21812 (license license:bsd-3)))
21813
21814 (define-public python-sortedcollections
21815 (package
21816 (name "python-sortedcollections")
21817 (version "2.1.0")
21818 (source
21819 (origin
21820 (method url-fetch)
21821 (uri (pypi-uri "sortedcollections" version))
21822 (sha256
21823 (base32
21824 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
21825 (build-system python-build-system)
21826 (propagated-inputs
21827 `(("python-sortedcontainers" ,python-sortedcontainers)))
21828 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
21829 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
21830 (synopsis "Python Sorted Collections")
21831 (description "Sorted Collections is a Python sorted collections library.")
21832 (license license:asl2.0)))
21833
21834 (define-public python-sortedcontainers
21835 (package
21836 (name "python-sortedcontainers")
21837 (version "2.1.0")
21838 (source
21839 (origin
21840 (method url-fetch)
21841 (uri (pypi-uri "sortedcontainers" version))
21842 (sha256
21843 (base32
21844 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
21845 (build-system python-build-system)
21846 (arguments
21847 ;; FIXME: Tests require many extra dependencies, and would introduce
21848 ;; a circular dependency on hypothesis, which uses this package.
21849 '(#:tests? #f))
21850 (propagated-inputs
21851 `(("python-appdirs" ,python-appdirs)
21852 ("python-distlib" ,python-distlib)
21853 ("python-filelock" ,python-filelock)
21854 ("python-six" ,python-six-bootstrap)))
21855 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
21856 (synopsis "Sorted List, Sorted Dict, Sorted Set")
21857 (description
21858 "This package provides a sorted collections library, written in
21859 pure-Python.")
21860 (license license:asl2.0)))
21861
21862 (define-public python2-sortedcontainers
21863 (package-with-python2 python-sortedcontainers))
21864
21865 (define python-cloudpickle-testpkg
21866 (package
21867 (name "python-cloudpickle-testpkg")
21868 (version "1.6.0")
21869 (source
21870 (origin
21871 ;; Archive on pypi does not include test infrastructure.
21872 (method git-fetch)
21873 (uri (git-reference
21874 (url "https://github.com/cloudpipe/cloudpickle")
21875 (commit (string-append "v" version))))
21876 (file-name (git-file-name name version))
21877 (sha256
21878 (base32
21879 "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
21880 (build-system python-build-system)
21881 (arguments
21882 '(#:phases
21883 (modify-phases %standard-phases
21884 (add-after 'unpack 'chdir
21885 (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
21886 (home-page "https://github.com/cloudpipe/cloudpickle")
21887 (synopsis "Extended pickling support for Python objects")
21888 (description
21889 "Cloudpickle makes it possible to serialize Python constructs not
21890 supported by the default pickle module from the Python standard library. It
21891 is especially useful for cluster computing where Python expressions are
21892 shipped over the network to execute on remote hosts, possibly close to the
21893 data.")
21894 (license license:bsd-3)))
21895
21896 (define-public python-cloudpickle
21897 (package
21898 (inherit python-cloudpickle-testpkg)
21899 (name "python-cloudpickle")
21900 (build-system python-build-system)
21901 (arguments
21902 '(#:phases
21903 (modify-phases %standard-phases
21904 (add-before 'check 'do-not-override-PYTHONPATH
21905 (lambda _
21906 ;; Append to PYTHONPATH instead of overriding it so
21907 ;; that dependencies from Guix can be found.
21908 (substitute* "tests/testutils.py"
21909 (("env\\['PYTHONPATH'\\] = pythonpath")
21910 "env['PYTHONPATH'] += os.pathsep + pythonpath"))))
21911 (replace 'check
21912 (lambda* (#:key tests? #:allow-other-keys)
21913 (if tests?
21914 (invoke "pytest" "-s" "-vv")
21915 (format #t "test suite not run~%")))))))
21916 (native-inputs
21917 `(;; For tests.
21918 ("python-cloudpickle-testpkg" ,python-cloudpickle-testpkg)
21919 ("python-psutil" ,python-psutil)
21920 ("python-pytest" ,python-pytest)
21921 ("python-tornado" ,python-tornado-6)))
21922 (home-page "https://github.com/cloudpipe/cloudpickle")
21923 (synopsis "Extended pickling support for Python objects")
21924 (description
21925 "Cloudpickle makes it possible to serialize Python constructs not
21926 supported by the default pickle module from the Python standard library. It
21927 is especially useful for cluster computing where Python expressions are
21928 shipped over the network to execute on remote hosts, possibly close to the
21929 data.")
21930 (properties `((python2-variant . ,(delay python2-cloudpickle))))
21931 (license license:bsd-3)))
21932
21933 (define-public python2-cloudpickle
21934 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
21935 (package/inherit base
21936 (version "1.3.0")
21937 (source
21938 (origin
21939 (method url-fetch)
21940 (uri (pypi-uri "cloudpickle" version))
21941 (sha256
21942 (base32
21943 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
21944 (native-inputs
21945 `(;; For tests.
21946 ("python-mock" ,python2-mock)
21947 ("python-psutil" ,python2-psutil)
21948 ("python-pytest" ,python2-pytest)
21949 ("python-tornado" ,python2-tornado)))
21950 (propagated-inputs
21951 `(("python-futures" ,python2-futures)
21952 ,@(package-propagated-inputs base))))))
21953
21954 (define-public python-locket
21955 (package
21956 (name "python-locket")
21957 (version "0.2.0")
21958 (source
21959 (origin
21960 (method url-fetch)
21961 (uri (pypi-uri "locket" version))
21962 (sha256
21963 (base32
21964 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
21965 (build-system python-build-system)
21966 (home-page "https://github.com/mwilliamson/locket.py")
21967 (synopsis "File-based locks for Python")
21968 (description
21969 "Locket implements a lock that can be used by multiple processes provided
21970 they use the same path.")
21971 (license license:bsd-2)))
21972
21973 (define-public python2-locket
21974 (package-with-python2 python-locket))
21975
21976 (define-public python-blosc
21977 (package
21978 (name "python-blosc")
21979 (version "1.5.1")
21980 (source
21981 (origin
21982 (method url-fetch)
21983 (uri (pypi-uri "blosc" version))
21984 (sha256
21985 (base32
21986 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
21987 (build-system python-build-system)
21988 ;; FIXME: all tests pass, but then this error is printed:
21989 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
21990 (arguments '(#:tests? #f))
21991 (propagated-inputs
21992 `(("python-numpy" ,python-numpy)))
21993 (home-page "https://github.com/blosc/python-blosc")
21994 (synopsis "Python wrapper for the Blosc data compressor library")
21995 (description "Blosc is a high performance compressor optimized for binary
21996 data. It has been designed to transmit data to the processor cache faster
21997 than the traditional, non-compressed, direct memory fetch approach via a
21998 @code{memcpy()} system call.
21999
22000 Blosc works well for compressing numerical arrays that contains data with
22001 relatively low entropy, like sparse data, time series, grids with
22002 regular-spaced values, etc.
22003
22004 This Python package wraps the Blosc library.")
22005 (license license:bsd-3)))
22006
22007 (define-public python2-blosc
22008 (package-with-python2 python-blosc))
22009
22010 (define-public python-partd
22011 (package
22012 (name "python-partd")
22013 (version "1.2.0")
22014 (source
22015 (origin
22016 (method url-fetch)
22017 (uri (pypi-uri "partd" version))
22018 (sha256
22019 (base32
22020 "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
22021 (build-system python-build-system)
22022 (propagated-inputs
22023 `(("python-blosc" ,python-blosc)
22024 ("python-locket" ,python-locket)
22025 ("python-numpy" ,python-numpy)
22026 ("python-pandas" ,python-pandas)
22027 ("python-pyzmq" ,python-pyzmq)
22028 ("python-toolz" ,python-toolz)))
22029 (home-page "https://github.com/dask/partd/")
22030 (synopsis "Appendable key-value storage")
22031 (description "Partd stores key-value pairs. Values are raw bytes. We
22032 append on old values. Partd excels at shuffling operations.")
22033 (license license:bsd-3)))
22034
22035 (define-public python-fsspec
22036 (package
22037 (name "python-fsspec")
22038 (version "0.6.1")
22039 (source
22040 (origin
22041 (method url-fetch)
22042 (uri (pypi-uri "fsspec" version))
22043 (sha256
22044 (base32
22045 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
22046 (build-system python-build-system)
22047 (arguments '(#:tests? #f)) ; there are none
22048 (home-page "https://github.com/intake/filesystem_spec")
22049 (synopsis "File-system specification")
22050 (description "The purpose of this package is to produce a template or
22051 specification for a file-system interface, that specific implementations
22052 should follow, so that applications making use of them can rely on a common
22053 behavior and not have to worry about the specific internal implementation
22054 decisions with any given backend.")
22055 (license license:bsd-3)))
22056
22057 (define-public python-dask
22058 (package
22059 (name "python-dask")
22060 (version "2021.7.1")
22061 (source
22062 (origin
22063 (method url-fetch)
22064 (uri (pypi-uri "dask" version))
22065 (sha256
22066 (base32 "131c1bp193d7wp4gx09j6wark1c322c8sqjy22i0jaafl5rqfbz7"))))
22067 (build-system python-build-system)
22068 (arguments
22069 `(#:phases
22070 (modify-phases %standard-phases
22071 (add-after 'unpack 'disable-broken-tests
22072 (lambda _
22073 ;; This test is marked as xfail when pytest-xdist is used.
22074 (substitute* "dask/tests/test_threaded.py"
22075 (("def test_interrupt\\(\\)" m)
22076 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
22077 m)))))
22078 (replace 'check
22079 (lambda _ (invoke "pytest" "-vv"))))))
22080 (propagated-inputs
22081 `(("python-cloudpickle" ,python-cloudpickle)
22082 ("python-fsspec" ,python-fsspec)
22083 ("python-numpy" ,python-numpy)
22084 ("python-packaging" ,python-packaging)
22085 ("python-pandas" ,python-pandas)
22086 ("python-partd" ,python-partd)
22087 ("python-toolz" ,python-toolz)
22088 ("python-pyyaml" ,python-pyyaml)))
22089 (native-inputs
22090 `(("python-pytest" ,python-pytest)
22091 ("python-pytest-runner" ,python-pytest-runner)))
22092 (home-page "https://github.com/dask/dask/")
22093 (synopsis "Parallel computing with task scheduling")
22094 (description
22095 "Dask is a flexible parallel computing library for analytics. It
22096 consists of two components: dynamic task scheduling optimized for computation,
22097 and large data collections like parallel arrays, dataframes, and lists that
22098 extend common interfaces like NumPy, Pandas, or Python iterators to
22099 larger-than-memory or distributed environments. These parallel collections
22100 run on top of the dynamic task schedulers. ")
22101 (license license:bsd-3)))
22102
22103 (define-public python-ilinkedlist
22104 (package
22105 (name "python-ilinkedlist")
22106 (version "0.4.0")
22107 (source
22108 (origin
22109 (method url-fetch)
22110 (uri (pypi-uri "ilinkedlist" version))
22111 (sha256
22112 (base32
22113 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
22114 (build-system python-build-system)
22115 (native-inputs `(("python-pytest" ,python-pytest)))
22116 (inputs `(("python" ,python)))
22117 (home-page "https://github.com/luther9/ilinkedlist-py")
22118 (synopsis "Immutable linked list library")
22119 (description
22120 "This is a implementation of immutable linked lists for Python. It
22121 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
22122 Since a linked list is treated as immutable, it is hashable, and its length
22123 can be retrieved in constant time. Some of the terminology is inspired by
22124 LISP. It is possible to create an improper list by creating a @code{Pair}
22125 with a non-list @code{cdr}.")
22126 (license license:gpl3+)))
22127
22128 (define-public python-readlike
22129 (package
22130 (name "python-readlike")
22131 (version "0.1.3")
22132 (source
22133 (origin
22134 (method url-fetch)
22135 (uri (pypi-uri "readlike" version))
22136 (sha256
22137 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
22138 (build-system python-build-system)
22139 (home-page "https://github.com/jangler/readlike")
22140 (synopsis "GNU Readline-like line editing module")
22141 (description
22142 "This Python module provides line editing functions similar to the default
22143 Emacs-style ones of GNU Readline. Unlike the Python standard library's
22144 @code{readline} package, this one allows access to those capabilities in settings
22145 outside of a standard command-line interface. It is especially well-suited to
22146 interfacing with Urwid, due to a shared syntax for describing key inputs.
22147
22148 Currently, all stateless Readline commands are implemented. Yanking and history
22149 are not supported.")
22150 (license license:expat)))
22151
22152 (define-public python2-readlike
22153 (package-with-python2 python-readlike))
22154
22155 (define-public python-reparser
22156 (package
22157 (name "python-reparser")
22158 (version "1.4.3")
22159 (source
22160 (origin
22161 (method url-fetch)
22162 (uri (pypi-uri "ReParser" version))
22163 (sha256
22164 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
22165 (build-system python-build-system)
22166 (home-page "https://github.com/xmikos/reparser")
22167 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
22168 (description
22169 "This Python library provides a simple lexer/parser for inline markup based
22170 on regular expressions.")
22171 (license license:expat)))
22172
22173 (define-public python2-reparser
22174 (let ((reparser (package-with-python2
22175 (strip-python2-variant python-reparser))))
22176 (package/inherit reparser
22177 (propagated-inputs
22178 `(("python2-enum34" ,python2-enum34)
22179 ,@(package-propagated-inputs reparser))))))
22180
22181 (define-public python-retrying
22182 (package
22183 (name "python-retrying")
22184 (version "1.3.3")
22185 (source
22186 (origin
22187 (method git-fetch)
22188 (uri (git-reference
22189 (url "https://github.com/rholder/retrying")
22190 (commit (string-append "v" version))))
22191 (file-name (git-file-name name version))
22192 (sha256
22193 (base32
22194 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
22195 (build-system python-build-system)
22196 (propagated-inputs
22197 `(("python-six" ,python-six)))
22198 (home-page "https://github.com/rholder/retrying")
22199 (synopsis "Library for adding retry behavior")
22200 (description "Retrying is a general-purpose retrying library to simplify
22201 the task of adding retry behavior to just about anything.
22202
22203 Features:
22204
22205 @itemize
22206 @item Generic Decorator API.
22207 @item Specify stop condition (i.e. limit by number of attempts).
22208 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
22209 @item Customize retrying on Exceptions.
22210 @item Customize retrying on expected returned result.
22211 @end itemize")
22212 (license license:asl2.0)))
22213
22214 (define-public python-pre-commit
22215 (package
22216 (name "python-pre-commit")
22217 (version "2.10.0")
22218 (source
22219 (origin
22220 (method url-fetch)
22221 (uri (pypi-uri "pre_commit" version))
22222 (sha256
22223 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
22224 (build-system python-build-system)
22225 (arguments
22226 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
22227 ;; attribute 'empty_template_setup'".
22228 `(#:tests? #false))
22229 (propagated-inputs
22230 `(("python-cfgv" ,python-cfgv)
22231 ("python-identify" ,python-identify)
22232 ("python-importlib-metadata" ,python-importlib-metadata)
22233 ("python-importlib-resources" ,python-importlib-resources)
22234 ("python-nodeenv" ,python-nodeenv)
22235 ("python-pyyaml" ,python-pyyaml)
22236 ("python-toml" ,python-toml)
22237 ("python-virtualenv" ,python-virtualenv)))
22238 (home-page "https://github.com/pre-commit/pre-commit")
22239 (synopsis "Framework for managing multi-language pre-commit hooks")
22240 (description
22241 "This package provides a framework for managing and maintaining
22242 multi-language pre-commit hooks.")
22243 (license license:expat)))
22244
22245 (define-public python-precis-i18n
22246 (package
22247 (name "python-precis-i18n")
22248 (version "1.0.0")
22249 (source
22250 (origin
22251 (method url-fetch)
22252 (uri (pypi-uri "precis_i18n" version))
22253 (sha256
22254 (base32
22255 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
22256 (build-system python-build-system)
22257 (home-page "https://github.com/byllyfish/precis_i18n")
22258 (synopsis "Implementation of the PRECIS framework")
22259 (description
22260 "This module implements the PRECIS Framework as described in RFC 8264,
22261 RFC 8265 and RFC 8266.")
22262 (license license:expat)))
22263
22264 (define-public python-absl-py
22265 (package
22266 (name "python-absl-py")
22267 (version "0.6.1")
22268 (source
22269 (origin
22270 (method url-fetch)
22271 (uri (pypi-uri "absl-py" version))
22272 (sha256
22273 (base32
22274 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
22275 (build-system python-build-system)
22276 (propagated-inputs
22277 `(("python-six" ,python-six)))
22278 (home-page "https://github.com/abseil/abseil-py")
22279 (synopsis "Abseil Python common libraries")
22280 (description
22281 "This package provides the Abseil Python Common Libraries, a collection
22282 of Python libraries for building Python applications.")
22283 (license license:asl2.0)))
22284
22285 (define-public python-astor
22286 (package
22287 (name "python-astor")
22288 (version "0.8.1")
22289 (source
22290 (origin
22291 (method url-fetch)
22292 (uri (pypi-uri "astor" version))
22293 (sha256
22294 (base32
22295 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
22296 (build-system python-build-system)
22297 ;; FIXME: There are two errors and two test failures.
22298 (arguments `(#:tests? #f))
22299 (home-page "https://github.com/berkerpeksag/astor")
22300 (synopsis "Read and write Python ASTs")
22301 (description "Astor is designed to allow easy manipulation of Python
22302 source via the Abstract Syntax Tree.")
22303 (license license:bsd-3)))
22304
22305 (define-public python2-astor
22306 (package-with-python2 python-astor))
22307
22308 (define-public python-astunparse
22309 (package
22310 (name "python-astunparse")
22311 (version "1.6.2")
22312 (source
22313 (origin
22314 (method url-fetch)
22315 (uri (pypi-uri "astunparse" version))
22316 (sha256
22317 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
22318 (build-system python-build-system)
22319 (arguments '(#:tests? #f)) ; there are none
22320 (propagated-inputs
22321 `(("python-six" ,python-six)
22322 ("python-wheel" ,python-wheel)))
22323 (home-page "https://github.com/simonpercivall/astunparse")
22324 (synopsis "AST unparser for Python")
22325 (description "This package provides an AST unparser for Python. It is a
22326 factored out version of @code{unparse} found in the Python source
22327 distribution.")
22328 (license license:bsd-3)))
22329
22330 (define-public python-gast
22331 (package
22332 (name "python-gast")
22333 (version "0.3.3")
22334 (source
22335 (origin
22336 (method url-fetch)
22337 (uri (pypi-uri "gast" version))
22338 (sha256
22339 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
22340 (build-system python-build-system)
22341 (propagated-inputs
22342 `(("python-astunparse" ,python-astunparse)))
22343 (home-page "https://pypi.org/project/gast/")
22344 (synopsis "Generic Python AST that abstracts the underlying Python version")
22345 (description
22346 "GAST provides a compatibility layer between the AST of various Python
22347 versions, as produced by @code{ast.parse} from the standard @code{ast}
22348 module.")
22349 (license license:bsd-3)))
22350
22351 (define-public python-wikidata
22352 (package
22353 (name "python-wikidata")
22354 (version "0.6.1")
22355 (source
22356 (origin
22357 (method url-fetch)
22358 (uri (pypi-uri "Wikidata" version))
22359 (sha256
22360 (base32
22361 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
22362 (build-system python-build-system)
22363 (propagated-inputs
22364 `(("python-babel" ,python-babel)))
22365 (home-page "https://github.com/dahlia/wikidata")
22366 (synopsis "Wikidata client library")
22367 (description
22368 "This package provides a Python interface to
22369 @url{https://www.wikidata.org/, Wikidata}.")
22370 (properties '((upstream-name . "Wikidata")))
22371 (license license:gpl3+)))
22372
22373 (define-public python-doctest-ignore-unicode
22374 (package
22375 (name "python-doctest-ignore-unicode")
22376 (version "0.1.2")
22377 (source
22378 (origin
22379 (method url-fetch)
22380 (uri (pypi-uri "doctest-ignore-unicode" version))
22381 (sha256
22382 (base32
22383 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
22384 (build-system python-build-system)
22385 (native-inputs
22386 `(("python-nose" ,python-nose)))
22387 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
22388 (synopsis "Ignore Unicode literal prefixes in doctests")
22389 (description
22390 "This package adds support for a flag to ignore Unicode literal prefixes
22391 in doctests.")
22392 (license license:asl2.0)))
22393
22394 (define-public python-attr
22395 (package
22396 (name "python-attr")
22397 (version "0.3.1")
22398 (source
22399 (origin
22400 (method url-fetch)
22401 (uri (pypi-uri "attr" version))
22402 (sha256
22403 (base32
22404 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
22405 (build-system python-build-system)
22406 (home-page "https://github.com/denis-ryzhkov/attr")
22407 (synopsis "Decorator for attributes of target function or class")
22408 (description "Simple decorator to set attributes of target function or
22409 class in a @acronym{DRY, Don't Repeat Yourself} way.")
22410 (license license:expat)))
22411
22412 (define-public python-construct
22413 (package
22414 (name "python-construct")
22415 (version "2.10.56")
22416 (source
22417 (origin
22418 (method url-fetch)
22419 (uri (pypi-uri "construct" version))
22420 (sha256
22421 (base32
22422 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
22423 (build-system python-build-system)
22424 (arguments
22425 `(#:tests? #f)) ; No tests exist.
22426 (propagated-inputs
22427 `(("python-extras" ,python-extras)
22428 ("python-arrow" ,python-arrow)
22429 ("python-numpy" ,python-numpy)
22430 ("python-ruamel.yaml" ,python-ruamel.yaml)))
22431 (home-page "https://construct.readthedocs.io")
22432 (synopsis "Declarative and symmetrical parser and builder for binary data")
22433 (description
22434 "This package provides both simple, atomic constructs (such as
22435 integers of various sizes), as well as composite ones which allow you
22436 form hierarchical and sequential structures of increasing complexity.
22437 It features bit and byte granularity, easy debugging and testing, an
22438 easy-to-extend subclass system, and lots of primitive constructs to
22439 make your work easier.")
22440 (license license:expat)))
22441
22442 (define-public python-outcome
22443 (package
22444 (name "python-outcome")
22445 (version "1.0.1")
22446 (source
22447 (origin
22448 (method url-fetch)
22449 (uri (pypi-uri "outcome" version))
22450 (sha256
22451 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
22452 (build-system python-build-system)
22453 (arguments
22454 `(#:phases
22455 (modify-phases %standard-phases
22456 (replace 'check
22457 (lambda* (#:key inputs outputs #:allow-other-keys)
22458 (add-installed-pythonpath inputs outputs)
22459 (invoke "pytest" "-vv"))))))
22460 (native-inputs
22461 `(("python-pytest" ,python-pytest)
22462 ("python-pytest-cov" ,python-pytest-cov)
22463 ("python-pytest-asyncio" ,python-pytest-asyncio)))
22464 (propagated-inputs
22465 `(("python-async-generator" ,python-async-generator)
22466 ("python-attrs" ,python-attrs)))
22467 (home-page "https://github.com/python-trio/outcome")
22468 (synopsis "Capture the outcome of Python function calls")
22469 (description
22470 "Capture the outcome of Python function calls. Extracted from the Trio
22471 project.")
22472 ;; Either license applies.
22473 (license (list license:expat license:asl2.0))))
22474
22475 (define-public python-trio
22476 (package
22477 (name "python-trio")
22478 (version "0.17.0")
22479 (source
22480 (origin
22481 (method url-fetch)
22482 (uri (pypi-uri "trio" version))
22483 (sha256
22484 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
22485 (build-system python-build-system)
22486 (arguments
22487 `(#:phases
22488 (modify-phases %standard-phases
22489 (add-before 'check 'change-home
22490 (lambda _
22491 ;; Tests require a writable home.
22492 (setenv "HOME" "/tmp")
22493 #t))
22494 (replace 'check
22495 (lambda _
22496 (invoke "pytest" "-vv" "-k"
22497 (string-append
22498 ;; This test times out.
22499 "not test_ki_protection_works"
22500 ;; Assertion errors.
22501 " and not test_guest_mode_ki"
22502 " and not test_run_in_trio_thread_ki"
22503 ;; These try to raise KeyboardInterrupt which does not work
22504 ;; in the build environment.
22505 " and not test_ki_self"
22506 " and not test_ki_wakes_us_up"
22507 ;; Failure in name resolution.
22508 " and not test_getnameinfo"
22509 " and not test_SocketType_resolve"
22510 ;; OSError: protocol not found.
22511 " and not test_getprotobyname")))))))
22512 (native-inputs
22513 `(("python-astor" ,python-astor)
22514 ("python-ipython" ,python-ipython)
22515 ("python-jedi" ,python-jedi)
22516 ("python-pylint" ,python-pylint)
22517 ("python-pyopenssl" ,python-pyopenssl)
22518 ("python-pytest" ,python-pytest)
22519 ("python-pytest-cov" ,python-pytest-cov)
22520 ("python-trustme" ,python-trustme)))
22521 (propagated-inputs
22522 `(("python-attrs" ,python-attrs)
22523 ("python-idna" ,python-idna)
22524 ("python-outcome" ,python-outcome)
22525 ("python-sniffio" ,python-sniffio)
22526 ("python-sortedcontainers"
22527 ,python-sortedcontainers)))
22528 (home-page "https://github.com/python-trio/trio")
22529 (synopsis "Friendly Python library for async concurrency and I/O")
22530 (description
22531 "Trio strives to be a production-quality, async/await-native I/O library
22532 for Python. Like all async libraries, its main purpose is to help you write
22533 programs that do multiple things at the same time with parallelized I/O.")
22534 ;; Either license applies.
22535 (license (list license:expat license:asl2.0))))
22536
22537 (define-public python-trio-typing
22538 (package
22539 (name "python-trio-typing")
22540 (version "0.5.0")
22541 (source
22542 (origin
22543 (method url-fetch)
22544 (uri (pypi-uri "trio-typing" version))
22545 (sha256
22546 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22547 (build-system python-build-system)
22548 (arguments
22549 `(#:phases
22550 (modify-phases %standard-phases
22551 (replace 'check
22552 (lambda _
22553 (invoke "pytest" "-vv"))))))
22554 (native-inputs
22555 `(("python-attrs" ,python-attrs)
22556 ("python-pytest" ,python-pytest)))
22557 (propagated-inputs
22558 `(("python-mypy" ,python-mypy)
22559 ("python-mypy-extensions"
22560 ,python-mypy-extensions)
22561 ("python-trio" ,python-trio)
22562 ("python-typing-extensions"
22563 ,python-typing-extensions)))
22564 (home-page "https://github.com/python-trio/trio-typing")
22565 (synopsis "Static type checking support for Trio and related projects")
22566 (description
22567 "This package provides:
22568
22569 @itemize
22570 @item PEP 561 typing stubs packages for the Trio project packages:
22571
22572 @itemize
22573 @item trio (@code{trio-stubs})
22574 @item outcome (@code{outcome-stubs})
22575 @item async_generator (@code{async_generator-stubs})
22576 @end itemize
22577
22578 @item A package @code{trio_typing} containing types that Trio programs often
22579 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22580 a mypy plugin that smooths over some limitations in the basic type hints.
22581 @end itemize")
22582 ;; Either license applies.
22583 (license (list license:expat license:asl2.0))))
22584
22585 (define-public python-humanize
22586 (package
22587 (name "python-humanize")
22588 (version "0.5.1")
22589 (source
22590 (origin
22591 (method url-fetch)
22592 (uri (pypi-uri "humanize" version))
22593 (sha256
22594 (base32
22595 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22596 (arguments
22597 '(#:tests? #f)) ; tests not in pypi archive
22598 (build-system python-build-system)
22599 (home-page "https://github.com/jmoiron/humanize")
22600 (synopsis "Print numerical information in a human-readable form")
22601 (description "This package provides a Python module that displays numbers
22602 and dates in \"human readable\" forms. For example, it would display
22603 \"12345591313\" as \"12.3 billion\".")
22604 (license license:expat)))
22605
22606 (define-public python-txaio
22607 (package
22608 (name "python-txaio")
22609 (version "18.8.1")
22610 (source
22611 (origin
22612 (method url-fetch)
22613 (uri (pypi-uri "txaio" version))
22614 (sha256
22615 (base32
22616 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22617 (build-system python-build-system)
22618 (propagated-inputs
22619 `(("python-twisted" ,python-twisted)
22620 ("python-six" ,python-six)))
22621 (home-page "https://github.com/crossbario/txaio")
22622 (synopsis "Compatibility layer between Python asyncio and Twisted")
22623 (description "Txaio provides a compatibility layer between the Python
22624 @code{asyncio} module and @code{Twisted}.")
22625 (license license:expat)))
22626
22627 (define-public python-toolshed
22628 (package
22629 (name "python-toolshed")
22630 (version "0.4.6")
22631 (source
22632 (origin
22633 (method url-fetch)
22634 (uri (pypi-uri "toolshed" version))
22635 (sha256
22636 (base32
22637 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22638 (build-system python-build-system)
22639 (native-inputs
22640 `(("python-nose" ,python-nose)))
22641 (home-page "https://github.com/brentp/toolshed/")
22642 (synopsis "Collection of modules and functions for working with data")
22643 (description "This is a collection of well-tested, simple modules and
22644 functions that aim to reduce boilerplate when working with data.")
22645 (license license:bsd-2)))
22646
22647 (define-public python-annoy
22648 (package
22649 (name "python-annoy")
22650 (version "1.15.1")
22651 (source
22652 (origin
22653 (method url-fetch)
22654 (uri (pypi-uri "annoy" version))
22655 (sha256
22656 (base32
22657 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
22658 (build-system python-build-system)
22659 (native-inputs
22660 `(("python-nose" ,python-nose)))
22661 (home-page "https://github.com/spotify/annoy/")
22662 (synopsis "Approximate nearest neighbors library")
22663 (description
22664 "Annoy is a C++ library with Python bindings to search for points in
22665 space that are close to a given query point. It also creates large read-only
22666 file-based data structures that are @code{mmap}ped into memory so that many
22667 processes may share the same data.")
22668 (license license:asl2.0)))
22669
22670 (define-public python-croniter
22671 (package
22672 (name "python-croniter")
22673 (version "0.3.34")
22674 (source (origin
22675 (method url-fetch)
22676 (uri (pypi-uri "croniter" version))
22677 (sha256
22678 (base32
22679 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
22680 (build-system python-build-system)
22681 (propagated-inputs
22682 `(("python-dateutil" ,python-dateutil)
22683 ("python-natsort" ,python-natsort)))
22684 (home-page "https://github.com/kiorky/croniter")
22685 (synopsis "Iterate datetime objects with cron-like syntax")
22686 (description
22687 "@code{croniter} provides iteration for datetime object with cron-like
22688 format.")
22689 (license license:expat)))
22690
22691 (define-public python-crontab
22692 (package
22693 (name "python-crontab")
22694 (version "2.5.1")
22695 (source
22696 (origin
22697 (method url-fetch)
22698 (uri (pypi-uri name version))
22699 (sha256
22700 (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
22701 (build-system python-build-system)
22702 (arguments
22703 ;; Comptability tests fail so they are disabled.
22704 `(#:tests? #f))
22705 (inputs
22706 `(("python-dateutil" ,python-dateutil)))
22707 (home-page "https://gitlab.com/doctormo/python-crontab/")
22708 (synopsis "Module for reading and writing crontab files")
22709 (description "This Python module can read, write crontab files, and
22710 access the system cron automatically and simply using a direct API.")
22711 (license license:lgpl3+)))
22712
22713 (define-public python-pylzma
22714 (package
22715 (name "python-pylzma")
22716 (version "0.5.0")
22717 (source
22718 (origin
22719 (method url-fetch)
22720 (uri (pypi-uri "pylzma" version))
22721 (sha256
22722 (base32
22723 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
22724 (build-system python-build-system)
22725 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
22726 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
22727 (description "This package provides Python bindings for the LZMA library
22728 by Igor Pavlov.")
22729 (license license:lgpl2.1+)))
22730
22731 (define-public python2-pylzma
22732 (package-with-python2 python-pylzma))
22733
22734 (define-public python-ifaddr
22735 (package
22736 (name "python-ifaddr")
22737 (version "0.1.7")
22738 (source
22739 (origin
22740 (method url-fetch)
22741 (uri (pypi-uri "ifaddr" version))
22742 (sha256
22743 (base32
22744 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
22745 (build-system python-build-system)
22746 (arguments
22747 `(#:phases
22748 (modify-phases %standard-phases
22749 (replace 'check
22750 (lambda _ (invoke "nosetests"))))))
22751 (native-inputs
22752 `(("python-nose" ,python-nose)))
22753 (home-page "https://github.com/pydron/ifaddr")
22754 (synopsis "Network interface and IP address enumeration library")
22755 (description "This package provides a network interface and IP address
22756 enumeration library in Python.")
22757 (license license:expat)))
22758
22759 (define-public python-zeroconf
22760 (package
22761 (name "python-zeroconf")
22762 (version "0.28.8")
22763 (source
22764 (origin
22765 (method url-fetch)
22766 (uri (pypi-uri "zeroconf" version))
22767 (sha256
22768 (base32
22769 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
22770 (build-system python-build-system)
22771 (native-inputs
22772 `(("python-nose" ,python-nose)))
22773 (propagated-inputs
22774 `(("python-ifaddr" ,python-ifaddr)))
22775 (arguments
22776 `(#:phases
22777 (modify-phases %standard-phases
22778 (replace 'check
22779 (lambda _ ;; Networking isn't available for these tests.
22780 (invoke "nosetests" "-v"
22781 "--exclude" "test_integration_with_listener_ipv6"
22782 "--exclude" "test_launch_and_close_v6_only"
22783 "--exclude" "test_launch_and_close_v4_v6"
22784 "--exclude" "test_launch_and_close"))))))
22785 (home-page "https://github.com/jstasiak/python-zeroconf")
22786 (synopsis "Pure Python mDNS service discovery")
22787 (description
22788 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22789 compatible).")
22790 (license license:lgpl2.1+)))
22791
22792 (define-public python2-zeroconf
22793 (package
22794 (name "python2-zeroconf")
22795
22796 ;; This is the last version that supports Python 2.x.
22797 (version "0.19.1")
22798 (source
22799 (origin
22800 (method url-fetch)
22801 (uri (pypi-uri "zeroconf" version))
22802 (sha256
22803 (base32
22804 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
22805 (build-system python-build-system)
22806 (arguments
22807 `(#:python ,python-2
22808 #:phases
22809 (modify-phases %standard-phases
22810 (add-after 'unpack 'patch-requires
22811 (lambda* (#:key inputs #:allow-other-keys)
22812 (substitute* "setup.py"
22813 (("enum-compat")
22814 "enum34"))
22815 #t)))))
22816 (native-inputs
22817 `(("python2-six" ,python2-six)
22818 ("python2-enum32" ,python2-enum34)
22819 ("python2-netifaces" ,python2-netifaces)
22820 ("python2-typing" ,python2-typing)))
22821 (home-page "https://github.com/jstasiak/python-zeroconf")
22822 (synopsis "Pure Python mDNS service discovery")
22823 (description
22824 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22825 compatible).")
22826 (license license:lgpl2.1+)))
22827
22828 (define-public python-bsddb3
22829 (package
22830 (name "python-bsddb3")
22831 (version "6.2.6")
22832 (source
22833 (origin
22834 (method url-fetch)
22835 (uri (pypi-uri "bsddb3" version))
22836 (sha256
22837 (base32
22838 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
22839 (build-system python-build-system)
22840 (inputs
22841 `(("bdb" ,bdb)))
22842 (arguments
22843 '(#:phases
22844 (modify-phases %standard-phases
22845 (add-after 'unpack 'configure-locations
22846 (lambda* (#:key inputs #:allow-other-keys)
22847 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
22848 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
22849 #t))
22850 (replace 'check
22851 (lambda _
22852 (invoke "python3" "test3.py" "-v"))))))
22853 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
22854 (synopsis "Python bindings for Oracle Berkeley DB")
22855 (description
22856 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
22857 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
22858 Transaction objects, and each of these is exposed as a Python type in the
22859 bsddb3.db module. The database objects can use various access methods: btree,
22860 hash, recno, and queue. Complete support of Berkeley DB distributed
22861 transactions. Complete support for Berkeley DB Replication Manager.
22862 Complete support for Berkeley DB Base Replication. Support for RPC.")
22863 (license license:bsd-3)))
22864
22865 (define-public python-dbfread
22866 (package
22867 (name "python-dbfread")
22868 (version "2.0.7")
22869 (source (origin
22870 (method url-fetch)
22871 (uri (pypi-uri "dbfread" version))
22872 (sha256
22873 (base32
22874 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
22875 (build-system python-build-system)
22876 (native-inputs
22877 `(("python-pytest" ,python-pytest)))
22878 (home-page "https://dbfread.readthedocs.io")
22879 (synopsis "Read DBF Files with Python")
22880 (description
22881 "This library reads DBF files and returns the data as native Python data
22882 types for further processing. It is primarily intended for batch jobs and
22883 one-off scripts.")
22884 (license license:expat)))
22885
22886 (define-public python-cached-property
22887 (package
22888 (name "python-cached-property")
22889 (version "1.5.2")
22890 (source
22891 (origin
22892 (method url-fetch)
22893 (uri (pypi-uri "cached-property" version))
22894 (sha256
22895 (base32
22896 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
22897 (build-system python-build-system)
22898 (arguments
22899 `(#:phases
22900 (modify-phases %standard-phases
22901 ;; https://github.com/pydanny/cached-property/issues/131
22902 ;; recent versions of freezegun break one test
22903 (add-after 'unpack 'disable-broken-test
22904 (lambda _
22905 (substitute* "tests/test_cached_property.py"
22906 (("def test_threads_ttl_expiry\\(self\\)" m)
22907 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
22908 " " m)))
22909 #t)))))
22910 (native-inputs
22911 `(("python-freezegun" ,python-freezegun)))
22912 (home-page
22913 "https://github.com/pydanny/cached-property")
22914 (synopsis
22915 "Decorator for caching properties in classes")
22916 (description
22917 "This package provides a decorator which makes caching
22918 time-or-computationally-expensive properties quick and easy and works in Python
22919 2 or 3.")
22920 (license license:bsd-3)))
22921
22922 (define-public python-folium
22923 (package
22924 (name "python-folium")
22925 (version "0.12.1")
22926 (source
22927 (origin
22928 ;; PyPI has a ".whl" file but not a proper source release.
22929 ;; Thus, fetch code from Git.
22930 (method git-fetch)
22931 (uri (git-reference
22932 (url "https://github.com/python-visualization/folium")
22933 (commit (string-append "v" version))))
22934 (file-name (git-file-name name version))
22935 (sha256
22936 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
22937 (build-system python-build-system)
22938 (propagated-inputs
22939 `(("python-branca" ,python-branca)
22940 ("python-jinja2" ,python-jinja2)
22941 ("python-numpy" ,python-numpy)
22942 ("python-requests" ,python-requests)))
22943 (native-inputs
22944 `(("python-pytest" ,python-pytest)))
22945 (home-page "https://github.com/python-visualization/folium")
22946 (synopsis "Make beautiful maps with Leaflet.js & Python")
22947 (description "@code{folium} makes it easy to visualize data that’s been
22948 manipulated in Python on an interactive leaflet map. It enables both the
22949 binding of data to a map for @code{choropleth} visualizations as well as
22950 passing rich vector/raster/HTML visualizations as markers on the map.
22951
22952 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
22953 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
22954 supports Image, Video, GeoJSON and TopoJSON overlays.")
22955 (license license:expat)))
22956
22957 (define-public jube
22958 (package
22959 ;; This is a command-line tool, so no "python-" prefix.
22960 (name "jube")
22961 (version "2.2.2")
22962 (source (origin
22963 (method url-fetch)
22964 (uri (string-append
22965 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
22966 version))
22967 (sha256
22968 (base32
22969 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
22970 (file-name (string-append "jube-" version ".tar.gz"))))
22971 (build-system python-build-system)
22972 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
22973 (synopsis "Benchmarking environment")
22974 (description
22975 "JUBE helps perform and analyze benchmarks in a systematic way. For each
22976 benchmarked application, benchmark data is stored in a format that allows JUBE
22977 to deduct the desired information. This data can be parsed by automatic pre-
22978 and post-processing scripts that draw information and store it more densely
22979 for manual interpretation.")
22980 (license license:gpl3+)))
22981
22982 (define-public python-pyroutelib3
22983 (package
22984 (name "python-pyroutelib3")
22985 (version "1.3.post1")
22986 (source
22987 (origin
22988 (method url-fetch)
22989 (uri (pypi-uri "pyroutelib3" version))
22990 (sha256
22991 (base32
22992 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
22993 (build-system python-build-system)
22994 (propagated-inputs
22995 `(("python-dateutil" ,python-dateutil)))
22996 (home-page "https://github.com/MKuranowski/pyroutelib3")
22997 (synopsis "Library for simple routing on OSM data")
22998 (description "Library for simple routing on OSM data")
22999 (license license:gpl3+)))
23000
23001 (define-public python-bibtexparser
23002 (package
23003 (name "python-bibtexparser")
23004 (version "1.1.0")
23005 (source
23006 (origin
23007 (method url-fetch)
23008 (uri (pypi-uri "bibtexparser" version))
23009 (sha256
23010 (base32
23011 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
23012 (build-system python-build-system)
23013 (propagated-inputs
23014 `(("python-pyparsing" ,python-pyparsing)))
23015 (native-inputs
23016 `(("python-future" ,python-future)))
23017 (home-page "https://github.com/sciunto-org/python-bibtexparser")
23018 (synopsis "Python library to parse BibTeX files")
23019 (description "BibtexParser is a Python library to parse BibTeX files.")
23020 (license (list license:bsd-3 license:lgpl3))))
23021
23022 (define-public python-distro
23023 (package
23024 (name "python-distro")
23025 (version "1.4.0")
23026 (source
23027 (origin
23028 (method url-fetch)
23029 (uri (pypi-uri "distro" version))
23030 (sha256
23031 (base32
23032 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
23033 (build-system python-build-system)
23034 (native-inputs
23035 `(("python-pytest" ,python-pytest)))
23036 (home-page "https://github.com/nir0s/distro")
23037 (synopsis
23038 "OS platform information API")
23039 (description
23040 "@code{distro} provides information about the OS distribution it runs on,
23041 such as a reliable machine-readable ID, or version information.
23042
23043 It is the recommended replacement for Python's original
23044 `platform.linux_distribution` function (which will be removed in Python 3.8).
23045 @code{distro} also provides a command-line interface to output the platform
23046 information in various formats.")
23047 (license license:asl2.0)))
23048
23049 (define-public python-cairosvg
23050 (package
23051 (name "python-cairosvg")
23052 (version "2.5.0")
23053 (source
23054 (origin
23055 (method url-fetch)
23056 (uri (pypi-uri "CairoSVG" version))
23057 (sha256
23058 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
23059 (build-system python-build-system)
23060 (arguments
23061 `(#:phases
23062 (modify-phases %standard-phases
23063 (replace 'check
23064 (lambda _ (invoke "pytest"))))))
23065 (propagated-inputs
23066 `(("python-cairocffi" ,python-cairocffi)
23067 ("python-cssselect2" ,python-cssselect2)
23068 ("python-defusedxml" ,python-defusedxml)
23069 ("python-pillow" ,python-pillow)
23070 ("python-tinycss2" ,python-tinycss2)))
23071 (native-inputs
23072 `(("python-pytest-flake8" ,python-pytest-flake8)
23073 ("python-pytest-isort" ,python-pytest-isort)
23074 ("python-pytest-runner" ,python-pytest-runner)))
23075 (home-page "https://cairosvg.org/")
23076 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
23077 (description "CairoSVG is a SVG converter based on Cairo. It can export
23078 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
23079 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
23080 parsed, the result is drawn to a Cairo surface that can be exported to
23081 qvarious formats: PDF, PostScript, PNG and even SVG.")
23082 (license license:lgpl3+)))
23083
23084 (define-public python-pyphen
23085 (package
23086 (name "python-pyphen")
23087 (version "0.10.0")
23088 (source
23089 (origin
23090 (method url-fetch)
23091 (uri (pypi-uri "Pyphen" version))
23092 (sha256
23093 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
23094 (build-system python-build-system)
23095 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
23096 ;; embedded set provided by upstream - like Debian does.
23097 (home-page "https://github.com/Kozea/Pyphen")
23098 (synopsis "Pure Python module to hyphenate text")
23099 (description "Pyphen is a pure Python module to hyphenate text using
23100 existing Hunspell hyphenation dictionaries.")
23101 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
23102
23103 (define-public python-intelhex
23104 (package
23105 (name "python-intelhex")
23106 (version "2.2.1")
23107 (source
23108 (origin
23109 (method url-fetch)
23110 (uri (pypi-uri "intelhex" version))
23111 (sha256
23112 (base32
23113 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
23114 (build-system python-build-system)
23115 (arguments '(#:tests? #f)) ;issue with version
23116 (home-page "https://pypi.org/project/IntelHex/")
23117 (synopsis "Python library for Intel HEX files manipulations")
23118 (description "The Intel HEX file format is widely used in microprocessors
23119 and microcontrollers area (embedded systems etc.) as the de facto standard for
23120 representation of code to be programmed into microelectronic devices. This
23121 package provides an intelhex Python library to read, write, create from
23122 scratch and manipulate data from Intel HEX file format. It also includes
23123 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
23124 converters and more, those based on the library itself.")
23125 (license license:bsd-3)))
23126
23127 (define-public python-pykwalify
23128 (package
23129 (name "python-pykwalify")
23130 (version "1.7.0")
23131 (source
23132 (origin
23133 (method url-fetch)
23134 (uri (pypi-uri "pykwalify" version))
23135 (sha256
23136 (base32
23137 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
23138 (build-system python-build-system)
23139 (arguments '(#:tests? #f)) ;missing dependencies
23140 (propagated-inputs
23141 `(("python-dateutil" ,python-dateutil)
23142 ("python-docopt" ,python-docopt)
23143 ("python-pyyaml" ,python-pyyaml)))
23144 (home-page "https://github.com/grokzen/pykwalify")
23145 (synopsis
23146 "Python lib/cli for JSON/YAML schema validation")
23147 (description
23148 "This package provides a parser, schema validator, and data binding tool
23149 for YAML and JSON.")
23150 (license license:expat)))
23151
23152 (define-public python-dbusmock
23153 (package
23154 (name "python-dbusmock")
23155 (version "0.18.3")
23156 (source
23157 (origin
23158 (method url-fetch)
23159 (uri (pypi-uri "python-dbusmock" version))
23160 (sha256
23161 (base32
23162 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
23163 (build-system python-build-system)
23164 (arguments
23165 '(#:phases
23166 (modify-phases %standard-phases
23167 (add-after 'unpack 'patch-shell-path
23168 (lambda _
23169 (substitute* "tests/test_code.py"
23170 (("/bin/bash") (which "bash")))
23171 #t)))))
23172 (native-inputs
23173 `(;; For tests.
23174 ("dbus" ,dbus) ; for dbus-daemon
23175 ("python-nose" ,python-nose)
23176 ("which" ,which)))
23177 (propagated-inputs
23178 `(("python-dbus" ,python-dbus)
23179 ("python-pygobject" ,python-pygobject)))
23180 (home-page "https://github.com/martinpitt/python-dbusmock")
23181 (synopsis "Python library for mock D-Bus objects")
23182 (description "python-dbusmock allows for the easy creation of mock objects on
23183 D-Bus. This is useful for writing tests for software which talks to D-Bus
23184 services such as upower, systemd, logind, gnome-session or others, and it is
23185 hard (or impossible without root privileges) to set the state of the real
23186 services to what you expect in your tests.")
23187 (license license:lgpl3+)))
23188
23189 (define-public python-jsonplus
23190 (package
23191 (name "python-jsonplus")
23192 (version "0.8.0")
23193 (home-page "https://github.com/randomir/jsonplus")
23194 (source (origin
23195 (method url-fetch)
23196 (uri (pypi-uri "jsonplus" version))
23197 (sha256
23198 (base32
23199 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
23200 (build-system python-build-system)
23201 ;; XXX: No tests on PyPI, and the repository has no tags.
23202 (arguments '(#:tests? #f))
23203 (propagated-inputs
23204 `(("python-dateutil" ,python-dateutil)
23205 ("python-simplejson" ,python-simplejson)
23206 ("python-sortedcontainers" ,python-sortedcontainers)))
23207 (synopsis "Serialize Python types to/from JSON")
23208 (description
23209 "This package provides functionality to serialize arbitrary data types
23210 to and from JSON. Common data types are implemented and it is easy to
23211 register custom encoders and decoders.")
23212 (license license:expat)))
23213
23214 (define-public python-ujson
23215 (package
23216 (name "python-ujson")
23217 (version "4.0.2")
23218 (source
23219 (origin
23220 (method url-fetch)
23221 (uri (pypi-uri "ujson" version))
23222 (sha256
23223 (base32
23224 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
23225 (modules '((guix build utils)))
23226 (snippet
23227 '(begin (delete-file-recursively "deps") #t))))
23228 (build-system python-build-system)
23229 (arguments
23230 `(#:phases
23231 (modify-phases %standard-phases
23232 (add-after 'unpack 'link-to-system-double-conversion
23233 (lambda* (#:key inputs #:allow-other-keys)
23234 (let ((d-c (assoc-ref inputs "double-conversion")))
23235 (substitute* "setup.py"
23236 (("./deps/double-conversion/double-conversion\"")
23237 (string-append d-c "/include/double-conversion\""))
23238 (("-lstdc++" stdc)
23239 (string-append "-L" d-c "/lib\","
23240 " \"-ldouble-conversion\","
23241 " \"" stdc)))
23242 #t)))
23243 (replace 'check
23244 (lambda* (#:key inputs outputs #:allow-other-keys)
23245 (add-installed-pythonpath inputs outputs)
23246 (invoke "pytest"))))))
23247 (native-inputs
23248 `(("double-conversion" ,double-conversion)
23249 ("python-setuptools-scm" ,python-setuptools-scm)
23250 ("python-pytest" ,python-pytest)))
23251 (home-page "https://github.com/ultrajson/ultrajson")
23252 (synopsis "Ultra fast JSON encoder and decoder for Python")
23253 (description
23254 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
23255 bindings for Python 3.")
23256 (license license:bsd-3)))
23257
23258 (define-public python-iocapture
23259 ;; The latest release is more than a year older than this commit.
23260 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
23261 (revision "1"))
23262 (package
23263 (name "python-iocapture")
23264 (version "0.1.2")
23265 (source
23266 (origin
23267 (method git-fetch)
23268 (uri (git-reference
23269 (url "https://github.com/oinume/iocapture")
23270 (commit commit)))
23271 (file-name (git-file-name name version))
23272 (sha256
23273 (base32
23274 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
23275 (build-system python-build-system)
23276 (arguments
23277 `(#:phases
23278 (modify-phases %standard-phases
23279 (delete 'check)
23280 (add-after 'install 'check
23281 (lambda* (#:key inputs outputs #:allow-other-keys)
23282 (add-installed-pythonpath inputs outputs)
23283 (invoke "py.test" "-v" "tests")
23284 #t)))))
23285 (propagated-inputs
23286 `(("python-flexmock" ,python-flexmock)
23287 ("python-pytest" ,python-pytest)
23288 ("python-pytest-cov" ,python-pytest-cov)
23289 ("python-six" ,python-six)))
23290 (home-page "https://github.com/oinume/iocapture")
23291 (synopsis "Python capturing tool for stdout and stderr")
23292 (description
23293 "This package helps you to capture the standard out (stdout) and the
23294 standard error channel (stderr) in your program.")
23295 (license license:expat))))
23296
23297 (define-public python-anyio
23298 (package
23299 (name "python-anyio")
23300 (version "3.3.0")
23301 (source
23302 (origin
23303 (method url-fetch)
23304 (uri (pypi-uri "anyio" version))
23305 (sha256
23306 (base32
23307 "0x03hsprdrs86wjjkj96zm2jswy3a5bgyrknyi58pzz5hdsscmxf"))))
23308 (build-system python-build-system)
23309 (arguments
23310 `(#:phases
23311 (modify-phases %standard-phases
23312 (add-after 'unpack 'fix-compatibility
23313 (lambda _
23314 (substitute* "tests/test_taskgroups.py"
23315 (("import pytest")
23316 "import pytest\nimport _pytest\nfrom _pytest import logging")
23317 (("pytest.LogCaptureFixture")
23318 "_pytest.logging.LogCaptureFixture"))))
23319 (replace 'check
23320 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
23321 (when tests?
23322 (add-installed-pythonpath inputs outputs)
23323 (invoke "pytest" "-vv" "-p" "no:asyncio"
23324 "-m" "not network"
23325 "-k"
23326 (string-append
23327 "not test_is_block_device"
23328
23329 ;; These fail because of network (or specifically
23330 ;; IPv6 network) access.
23331 " and not test_accept"
23332 " and not test_accept_after_close"
23333 " and not test_close_during_receive"
23334 " and not test_close_from_other_task"
23335 " and not test_concurrent_receive"
23336 " and not test_concurrent_send"
23337 " and not test_connect_tcp_with_tls"
23338 " and not test_connect_tcp_with_tls_cert_check_fail"
23339 " and not test_connection_refused"
23340 " and not test_extra_attributes"
23341 " and not test_getaddrinfo"
23342 " and not test_getnameinfo"
23343 " and not test_happy_eyeballs"
23344 " and not test_iterate"
23345 " and not test_receive_after_close"
23346 " and not test_receive_timeout"
23347 " and not test_reuse_port"
23348 " and not test_run_process"
23349 " and not test_send_after_close"
23350 " and not test_send_after_eof"
23351 " and not test_send_after_peer_closed"
23352 " and not test_send_eof"
23353 " and not test_send_large_buffer"
23354 " and not test_send_receive"
23355 " and not test_socket_options"))))))))
23356 (propagated-inputs
23357 `(("python-idna" ,python-idna)
23358 ("python-sniffio" ,python-sniffio)
23359 ("python-typing-extensions" ,python-typing-extensions)))
23360 (native-inputs
23361 `(("python-coverage" ,python-coverage)
23362 ("python-hypothesis" ,python-hypothesis)
23363 ("python-iniconfig" ,python-iniconfig)
23364 ("python-mock" ,python-mock)
23365 ("python-pytest" ,python-pytest-6)
23366 ("python-pytest-mock" ,python-pytest-mock)
23367 ("python-pytest-trio" ,python-pytest-trio)
23368 ("python-setuptools-scm" ,python-setuptools-scm)
23369 ("python-trustme" ,python-trustme)
23370 ("python-uvloop" ,python-uvloop)))
23371 (home-page "https://github.com/agronholm/anyio")
23372 (synopsis "Compatibility layer for multiple asynchronous event loops")
23373 (description
23374 "AnyIO is an asynchronous networking and concurrency library that works
23375 on top of either asyncio or trio. It implements trio-like structured
23376 concurrency on top of asyncio, and works in harmony with the native SC of trio
23377 itself.")
23378 (license license:expat)))
23379
23380 (define-public python-argh
23381 ;; There are 21 commits since the latest release containing important
23382 ;; improvements.
23383 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
23384 (revision "1"))
23385 (package
23386 (name "python-argh")
23387 (version (git-version "0.26.2" revision commit))
23388 (source
23389 (origin
23390 (method git-fetch)
23391 (uri (git-reference
23392 (url "https://github.com/neithere/argh")
23393 (commit commit)))
23394 (file-name (git-file-name name version))
23395 (sha256
23396 (base32
23397 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
23398 (build-system python-build-system)
23399 (propagated-inputs
23400 `(("python-iocapture" ,python-iocapture)
23401 ("python-mock" ,python-mock)
23402 ("python-pytest" ,python-pytest)
23403 ("python-pytest-cov" ,python-pytest-cov)
23404 ("python-pytest-xdist" ,python-pytest-xdist)))
23405 (home-page "https://github.com/neithere/argh/")
23406 (synopsis "Argparse wrapper with natural syntax")
23407 (description
23408 "python-argh is a small library that provides several layers of
23409 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
23410 always possible to declare a command with the highest possible (and least
23411 flexible) layer and then tune the behaviour with any of the lower layers
23412 including the native API of @code{python-argparse}.")
23413 (license license:lgpl3+))))
23414
23415 (define-public python-ppft
23416 (package
23417 (name "python-ppft")
23418 (version "1.6.6.1")
23419 (source
23420 (origin
23421 (method url-fetch)
23422 (uri (pypi-uri "ppft" version))
23423 (sha256
23424 (base32
23425 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
23426 (build-system python-build-system)
23427 (arguments '(#:tests? #f)) ; there are none
23428 (propagated-inputs
23429 `(("python-six" ,python-six)))
23430 (home-page "https://pypi.org/project/ppft/")
23431 (synopsis "Fork of Parallel Python")
23432 (description
23433 "This package is a fork of Parallel Python. The Parallel Python
23434 module (@code{pp}) provides an easy and efficient way to create
23435 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
23436 computers and clusters. It features cross-platform portability and dynamic
23437 load balancing.")
23438 (license license:bsd-3)))
23439
23440 (define-public python-pox
23441 (package
23442 (name "python-pox")
23443 (version "0.2.7")
23444 (source
23445 (origin
23446 (method url-fetch)
23447 (uri (pypi-uri "pox" version))
23448 (sha256
23449 (base32
23450 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
23451 (build-system python-build-system)
23452 (arguments
23453 `(#:phases
23454 (modify-phases %standard-phases
23455 (replace 'check
23456 (lambda _
23457 (mkdir-p "/tmp/guix")
23458 (setenv "SHELL" "bash")
23459 (setenv "USERNAME" "guix")
23460 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
23461 (invoke "py.test" "-vv")
23462 #t)))))
23463 (native-inputs
23464 `(("python-pytest" ,python-pytest)
23465 ("which" ,which)))
23466 (home-page "https://pypi.org/project/pox/")
23467 (synopsis "Python utilities for file system exploration and automated builds")
23468 (description
23469 "Pox provides a collection of utilities for navigating and manipulating
23470 file systems. This module is designed to facilitate some of the low-level
23471 operating system interactions that are useful when exploring a file system on a
23472 remote host. Pox provides Python equivalents of several shell commands such
23473 as @command{which} and @command{find}. These commands allow automated
23474 discovery of what has been installed on an operating system, and where the
23475 essential tools are located.")
23476 (license license:bsd-3)))
23477
23478 (define-public python-pathos
23479 (package
23480 (name "python-pathos")
23481 (version "0.2.5")
23482 (source
23483 (origin
23484 (method url-fetch)
23485 (uri (pypi-uri "pathos" version))
23486 (sha256
23487 (base32
23488 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
23489 (build-system python-build-system)
23490 (arguments
23491 '(#:phases
23492 (modify-phases %standard-phases
23493 (replace 'check
23494 (lambda _
23495 (setenv "PYTHONPATH"
23496 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
23497 (invoke "python" "./tests/__main__.py"))))))
23498 (propagated-inputs
23499 `(("python-dill" ,python-dill)
23500 ("python-multiprocess" ,python-multiprocess)
23501 ("python-pox" ,python-pox)
23502 ("python-ppft" ,python-ppft)))
23503 (native-inputs
23504 `(("python-pytest" ,python-pytest)))
23505 (home-page "https://pypi.org/project/pathos/")
23506 (synopsis
23507 "Parallel graph management and execution in heterogeneous computing")
23508 (description
23509 "Python-pathos is a framework for heterogeneous computing. It provides a
23510 consistent high-level interface for configuring and launching parallel
23511 computations across heterogeneous resources. Python-pathos provides configurable
23512 launchers for parallel and distributed computing, where each launcher contains
23513 the syntactic logic to configure and launch jobs in an execution environment.")
23514 (license license:bsd-3)))
23515
23516 (define-public python-flit
23517 (package
23518 (name "python-flit")
23519 (version "3.2.0")
23520 ;; We fetch the sources via git because on pypi the package is split into
23521 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
23522 (source (origin
23523 (method git-fetch)
23524 (uri (git-reference
23525 (url "https://github.com/takluyver/flit")
23526 (commit version)))
23527 (file-name (git-file-name name version))
23528 (sha256
23529 (base32
23530 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
23531 (build-system python-build-system)
23532 (arguments
23533 `(#:phases
23534 (modify-phases %standard-phases
23535 (add-before 'build 'bootstrap
23536 (lambda* (#:key inputs #:allow-other-keys)
23537 (let ((home (string-append (getcwd) "/home")))
23538 (mkdir-p home)
23539 (setenv "HOME" home))
23540 (for-each make-file-writable (find-files "."))
23541 (copy-recursively (assoc-ref inputs "python-testpath")
23542 (string-append (getcwd) "/testpath"))
23543 (substitute* "pyproject.toml"
23544 (("\"testpath\",") ""))
23545 (invoke "python" "bootstrap_dev.py")))
23546 (replace 'build
23547 (lambda _
23548 ;; A ZIP archive should be generated, but it fails with "ZIP does
23549 ;; not support timestamps before 1980". Luckily,
23550 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
23551 ;; 1980.
23552 (setenv "SOURCE_DATE_EPOCH" "315532800")
23553 (for-each (lambda (toml)
23554 (invoke "python3" "-m" "flit"
23555 "--debug" "--ini-file" toml
23556 "build"))
23557 '("testpath/pyproject.toml"
23558 "pyproject.toml"))
23559 (with-directory-excursion "flit_core"
23560 (invoke "python" "build_dists.py"))))
23561 (replace 'install
23562 (lambda* (#:key inputs outputs #:allow-other-keys)
23563 (add-installed-pythonpath inputs outputs)
23564 (let ((out (assoc-ref outputs "out")))
23565 (delete-file-recursively "./home")
23566 (for-each (lambda (wheel)
23567 (format #true wheel)
23568 (invoke "python" "-m" "pip" "install"
23569 wheel (string-append "--prefix=" out)))
23570 (append
23571 (find-files "flit_core/dist" "\\.whl$")
23572 (find-files "dist" "\\.whl$")))))))
23573 #:tests? #f)) ; XXX: Check requires network access.
23574 (propagated-inputs
23575 `(("python-pytoml" ,python-pytoml)
23576 ("python-toml" ,python-toml)))
23577 (native-inputs
23578 `(("python-docutils" ,python-docutils)
23579 ("python-responses" ,python-responses)
23580 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
23581 ("python-pytest" ,python-pytest)
23582 ("python-pytest-cov" ,python-pytest-cov)
23583 ("python-sphinx" ,python-sphinx)
23584 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
23585 ;; This package needs testpath, but testpath also needs flit...
23586 ("python-testpath"
23587 ,(let ((name "python-testpath")
23588 (version "0.4.4"))
23589 (origin
23590 (method git-fetch)
23591 (uri (git-reference
23592 (url "https://github.com/jupyter/testpath")
23593 (commit version)))
23594 (file-name (git-file-name name version))
23595 (sha256
23596 (base32
23597 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
23598 (home-page "https://flit.readthedocs.io/")
23599 (synopsis
23600 "Simple packaging tool for simple packages")
23601 (description
23602 "Flit is a simple way to put Python packages and modules on PyPI. Flit
23603 packages a single importable module or package at a time, using the import
23604 name as the name on PyPI. All subpackages and data files within a package
23605 are included automatically.")
23606 (license license:bsd-3)))
23607
23608 (define-public python-pathtools
23609 (package
23610 (name "python-pathtools")
23611 (version "0.1.2")
23612 (source
23613 (origin
23614 (method url-fetch)
23615 (uri (pypi-uri "pathtools" version))
23616 (sha256
23617 (base32
23618 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
23619 (build-system python-build-system)
23620 (home-page
23621 "https://github.com/gorakhargosh/pathtools")
23622 (synopsis "Path utilities for Python")
23623 (description "Pattern matching and various utilities for file systems
23624 paths.")
23625 (license license:expat)))
23626
23627 (define-public python-fastentrypoints
23628 (package
23629 (name "python-fastentrypoints")
23630 (version "0.12")
23631 (source
23632 (origin
23633 (method url-fetch)
23634 (uri (pypi-uri "fastentrypoints" version))
23635 (sha256
23636 (base32
23637 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
23638 (build-system python-build-system)
23639 (home-page
23640 "https://github.com/ninjaaron/fast-entry_points")
23641 (synopsis
23642 "Makes entry_points specified in setup.py load more quickly")
23643 (description
23644 "Using entry_points in your setup.py makes scripts that start really
23645 slowly because it imports pkg_resources. This package allows such setup
23646 scripts to load entry points more quickly.")
23647 (license license:bsd-3)))
23648
23649 (define-public python-funcparserlib
23650 (package
23651 (name "python-funcparserlib")
23652 (version "0.3.6")
23653 (source
23654 (origin
23655 (method url-fetch)
23656 (uri (pypi-uri "funcparserlib" version))
23657 (sha256
23658 (base32
23659 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
23660 (native-inputs
23661 `(("python-tox" ,python-tox)))
23662 (arguments
23663 `(#:phases
23664 (modify-phases %standard-phases
23665 (replace 'check
23666 (lambda _
23667 (invoke "tox"))))))
23668 (build-system python-build-system)
23669 (home-page
23670 "https://github.com/vlasovskikh/funcparserlib")
23671 (synopsis
23672 "Recursive descent parsing library based on functional combinators")
23673 (description
23674 "This package is a recursive descent parsing library for Python based on
23675 functional combinators. Parser combinators are just higher-order functions
23676 that take parsers as their arguments and return them as result values.")
23677 (license license:expat)))
23678
23679 (define-public python-speg
23680 (package
23681 (name "python-speg")
23682 (version "0.3")
23683 (source
23684 (origin
23685 (method url-fetch)
23686 (uri (pypi-uri "speg" version ".zip"))
23687 (sha256
23688 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
23689 (arguments
23690 `(#:tests? #f)) ;FIXME: tests fail, not sure why
23691 (native-inputs
23692 `(("unzip" ,unzip)))
23693 (build-system python-build-system)
23694 (home-page "https://github.com/avakar/speg")
23695 (synopsis "PEG-based parser interpreter with memoization")
23696 (description "This package is a PEG-based parser and interpreter with
23697 memoization.")
23698 (license license:expat)))
23699
23700 (define-public python-cson
23701 (package
23702 (name "python-cson")
23703 (version "0.8")
23704 (source
23705 (origin
23706 (method url-fetch)
23707 (uri (pypi-uri "cson" version))
23708 (sha256
23709 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
23710 (build-system python-build-system)
23711 (propagated-inputs
23712 `(("python-speg" ,python-speg)))
23713 (home-page "https://github.com/avakar/pycson")
23714 (synopsis "Parser for Coffeescript Object Notation (CSON)")
23715 (description "This package is a parser for Coffeescript Object
23716 Notation (CSON).")
23717 (license license:expat)))
23718
23719 (define-public python-asynctest
23720 (package
23721 (name "python-asynctest")
23722 (version "0.13.0")
23723 (source
23724 (origin
23725 (method url-fetch)
23726 (uri (pypi-uri "asynctest" version))
23727 (sha256
23728 (base32
23729 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
23730 (build-system python-build-system)
23731 (arguments
23732 '(#:phases
23733 (modify-phases %standard-phases
23734 (replace 'check
23735 (lambda _
23736 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
23737 (add-after 'unpack 'disable-tests
23738 (lambda* _
23739 ;; XXX: 7 tests fail out of 220. Disable them for now.
23740 (substitute* (list "test/test_selector.py"
23741 "test/test_mock.py")
23742 (("def test_events_watched_outside_test_are_ignored")
23743 "@unittest.skip('disabled by guix')
23744 def test_events_watched_outside_test_are_ignored")
23745 (("def test_awaited_from_autospec_mock.*" line)
23746 (string-append line " return True\n"))
23747 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
23748 (string-append line " return True\n"))
23749 (("def test_patch_coroutine_with_multiple_scopes.*" line)
23750 (string-append line " return True\n"))
23751 (("def test_multiple_patches_on_coroutine.*" line)
23752 (string-append line " return True\n"))
23753 (("def test_patch_coroutine_only_when_running.*" line)
23754 (string-append line " return True\n")))
23755 #t)))))
23756 (home-page "https://github.com/Martiusweb/asynctest")
23757 (synopsis "Extension of unittest for testing asyncio libraries")
23758 (description
23759 "The package asynctest is built on top of the standard unittest module
23760 and cuts down boilerplate code when testing libraries for asyncio.")
23761 (license license:asl2.0)))
23762
23763 (define-public python-aionotify
23764 (package
23765 (name "python-aionotify")
23766 (version "0.2.0")
23767 (source
23768 (origin
23769 ;; Source tarball on PyPi lacks tests
23770 (method git-fetch)
23771 (uri (git-reference
23772 (url "https://github.com/rbarrois/aionotify")
23773 (commit (string-append "v" version))))
23774 (file-name (git-file-name name version))
23775 (sha256
23776 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
23777 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
23778 (build-system python-build-system)
23779 (home-page "https://github.com/rbarrois/aionotify")
23780 (synopsis "Asyncio-powered inotify library")
23781 (description
23782 "@code{aionotify} is a simple, asyncio-based inotify library.")
23783 (license license:bsd-3)))
23784
23785 (define-public python-forbiddenfruit
23786 (package
23787 (name "python-forbiddenfruit")
23788 (version "0.1.3")
23789 (source
23790 (origin
23791 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
23792 (method git-fetch)
23793 (uri (git-reference
23794 (url "https://github.com/clarete/forbiddenfruit")
23795 (commit version)))
23796 (file-name (git-file-name name version))
23797 (sha256
23798 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
23799 (build-system python-build-system)
23800 (arguments
23801 '(#:phases
23802 (modify-phases %standard-phases
23803 (replace 'check
23804 (lambda _
23805 (invoke "make" "SKIP_DEPS=1"))))))
23806 (native-inputs
23807 `(("python-nose" ,python-nose)
23808 ("python-coverage" ,python-coverage)))
23809 (home-page "https://github.com/clarete/forbiddenfruit")
23810 (synopsis "Patch python built-in objects")
23811 (description "This project allows Python code to extend built-in types.")
23812 (license (list license:gpl3+ license:expat))))
23813
23814 (define-public python-k5test
23815 (package
23816 (name "python-k5test")
23817 (version "0.9.2")
23818 (source
23819 (origin
23820 (method url-fetch)
23821 (uri (pypi-uri "k5test" version))
23822 (sha256
23823 (base32
23824 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
23825 (build-system python-build-system)
23826 (propagated-inputs
23827 `(("python-six" ,python-six)
23828 ;; `which`, `kadmin.local` binaries called inside library
23829 ("which" ,which)
23830 ("mit-krb5" ,mit-krb5)))
23831 (native-inputs `(("mit-krb5" ,mit-krb5)))
23832 (arguments
23833 '(#:phases
23834 (modify-phases %standard-phases
23835 (add-after 'unpack 'apply-upstream-fixes
23836 (lambda* _
23837 (substitute* "k5test/realm.py"
23838 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
23839 (("'kadmin_local'") "'kadmin.local'")
23840 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
23841 (("\\.stop_daemon") "._stop_daemon")))))))
23842 (home-page "https://github.com/pythongssapi/k5test")
23843 (synopsis "Library for setting up self-contained Kerberos 5 environments")
23844 (description
23845 "@code{k5test} is a library for setting up self-contained Kerberos 5
23846 environments, and running Python unit tests inside those environments. It is
23847 based on the file of the same name found alongside the MIT Kerberos 5 unit
23848 tests.")
23849 (license license:isc)))
23850
23851 (define-public python-gssapi
23852 (package
23853 (name "python-gssapi")
23854 (version "1.6.12")
23855 (source
23856 (origin
23857 (method url-fetch)
23858 (uri (pypi-uri "gssapi" version))
23859 (sha256
23860 (base32
23861 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
23862 (build-system python-build-system)
23863 (propagated-inputs
23864 `(("python-decorator" ,python-decorator)
23865 ("python-six" ,python-six)))
23866 (inputs
23867 `(("mit-krb5" ,mit-krb5)))
23868 ;; for tests
23869 (native-inputs
23870 `(("python-parameterized" ,python-parameterized)
23871 ("python-k5test" ,python-k5test)
23872 ("python-nose" ,python-nose)))
23873 (home-page "https://github.com/pythongssapi/python-gssapi")
23874 (synopsis "Python GSSAPI Wrapper")
23875 (description
23876 "Python-GSSAPI provides both low-level and high level wrappers around the
23877 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
23878 also be usable with other GSSAPI mechanisms.")
23879 (license license:isc)))
23880
23881 (define-public python-check-manifest
23882 (package
23883 (name "python-check-manifest")
23884 (version "0.37")
23885 (source
23886 (origin
23887 (method url-fetch)
23888 (uri (pypi-uri "check-manifest" version))
23889 (sha256
23890 (base32
23891 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
23892 (build-system python-build-system)
23893 (native-inputs
23894 `(("python-mock" ,python-mock)
23895 ("git" ,git)))
23896 (home-page "https://github.com/mgedmin/check-manifest")
23897 (synopsis "Check MANIFEST.in in a Python source package for completeness")
23898 (description "Python package can include a MANIFEST.in file to help with
23899 sending package files to the Python Package Index. This package checks that
23900 file to ensure it completely and accurately describes your project.")
23901 (license license:expat)))
23902
23903 (define-public python-android-stringslib
23904 (package
23905 (name "python-android-stringslib")
23906 (version "0.1.2")
23907 (source
23908 (origin
23909 (method git-fetch)
23910 (uri (git-reference
23911 (url "https://framagit.org/tyreunom/python-android-strings-lib")
23912 (commit (string-append "v" version))))
23913 (file-name (git-file-name name version))
23914 (sha256
23915 (base32
23916 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
23917 (build-system python-build-system)
23918 (arguments
23919 `(#:tests? #f))
23920 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
23921 (synopsis "Android strings.xml support")
23922 (description "Android Strings Lib provides support for android's strings.xml
23923 files. These files are used to translate strings in android apps.")
23924 (license license:expat)))
23925
23926 (define-public python-watchdog
23927 (package
23928 (name "python-watchdog")
23929 (version "0.9.0")
23930 (source
23931 (origin
23932 (method url-fetch)
23933 (uri (pypi-uri "watchdog" version))
23934 (sha256
23935 (base32
23936 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
23937 (build-system python-build-system)
23938 (arguments
23939 `(#:phases
23940 (modify-phases %standard-phases
23941 (add-before 'check 'remove-failing
23942 (lambda _
23943 (delete-file "tests/test_inotify_buffer.py")
23944 (delete-file "tests/test_snapshot_diff.py")
23945 #t)))))
23946 (propagated-inputs
23947 `(("python-argh" ,python-argh)
23948 ("python-pathtools" ,python-pathtools)
23949 ("python-pyyaml" ,python-pyyaml)))
23950 (native-inputs
23951 `(("python-pytest-cov" ,python-pytest-cov)
23952 ("python-pytest-timeout" ,python-pytest-timeout)))
23953 (home-page "https://github.com/gorakhargosh/watchdog")
23954 (synopsis "File system events monitoring")
23955 (description "This package provides a way to monitor file system events
23956 such as a file modification and trigger an action. This is similar to inotify,
23957 but portable.")
23958 (license license:asl2.0)))
23959
23960 (define-public python-watchgod
23961 (package
23962 (name "python-watchgod")
23963 (version "0.6")
23964 (source
23965 (origin
23966 ;; There are no tests in the PyPI tarball.
23967 (method git-fetch)
23968 (uri (git-reference
23969 (url "https://github.com/samuelcolvin/watchgod")
23970 (commit (string-append "v" version))))
23971 (file-name (git-file-name name version))
23972 (sha256
23973 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
23974 (build-system python-build-system)
23975 (arguments
23976 `(#:phases
23977 (modify-phases %standard-phases
23978 (replace 'check
23979 (lambda* (#:key tests? #:allow-other-keys)
23980 (when tests?
23981 (invoke "pytest" "-vv")))))))
23982 (native-inputs
23983 `(("python-coverage" ,python-coverage)
23984 ("python-docutils" ,python-docutils)
23985 ("python-flake8" ,python-flake8)
23986 ("python-isort" ,python-isort)
23987 ("python-pycodestyle" ,python-pycodestyle)
23988 ("python-pyflakes" ,python-pyflakes)
23989 ("python-pygments" ,python-pygments)
23990 ("python-pytest" ,python-pytest)
23991 ("python-pytest-cov" ,python-pytest-cov)
23992 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
23993 ("python-pytest-mock" ,python-pytest-mock)
23994 ("python-pytest-sugar" ,python-pytest-sugar)
23995 ("python-pytest-toolbox" ,python-pytest-toolbox)))
23996 (home-page "https://github.com/samuelcolvin/watchgod")
23997 (synopsis "Simple, modern file watching and code reload in Python")
23998 (description
23999 "Simple, modern file watching and code reload in Python inspired by
24000 @code{watchdog}. Among the differences are a unified approach for each
24001 operating systems and an elegant approach to concurrency using threading.")
24002 (license license:expat)))
24003
24004 (define-public python-wget
24005 (package
24006 (name "python-wget")
24007 (version "3.2")
24008 (source
24009 (origin
24010 (method url-fetch)
24011 (uri (pypi-uri "wget" version ".zip"))
24012 (sha256
24013 (base32
24014 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
24015 (build-system python-build-system)
24016 (native-inputs `(("unzip" ,unzip)))
24017 (home-page "https://bitbucket.org/techtonik/python-wget/")
24018 (synopsis "Pure Python download utility")
24019 (description "The python-wget library provides an API to download files
24020 with features similar to the @command{wget} utility.")
24021 (license license:unlicense)))
24022
24023 (define-public offlate
24024 (package
24025 (name "offlate")
24026 (version "0.5")
24027 (source
24028 (origin
24029 (method git-fetch)
24030 (uri (git-reference
24031 (url "https://framagit.org/tyreunom/offlate")
24032 (commit version)))
24033 (file-name (git-file-name name version))
24034 (sha256
24035 (base32
24036 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
24037 (build-system python-build-system)
24038 (arguments
24039 ;; No tests
24040 `(#:tests? #f))
24041 (propagated-inputs
24042 `(("python-android-stringslib" ,python-android-stringslib)
24043 ("python-dateutil" ,python-dateutil)
24044 ("python-gitlab" ,python-gitlab)
24045 ("python-lxml" ,python-lxml)
24046 ("python-polib" ,python-polib)
24047 ("python-pyenchant" ,python-pyenchant)
24048 ("python-pygit2" ,python-pygit2)
24049 ("python-pygithub" ,python-pygithub)
24050 ("python-pyqt" ,python-pyqt)
24051 ("python-requests" ,python-requests)
24052 ("python-ruamel.yaml" ,python-ruamel.yaml)
24053 ("python-translation-finder" ,python-translation-finder)
24054 ("python-watchdog" ,python-watchdog)))
24055 (native-inputs
24056 `(("qttools" ,qttools)))
24057 (home-page "https://framagit.org/tyreunom/offlate")
24058 (synopsis "Offline translation interface for online translation tools")
24059 (description "Offlate offers a unified interface for different translation
24060 file formats, as well as many different online translation platforms. You can
24061 use it to get work from online platforms, specialized such as the Translation
24062 Project, or not such a gitlab instance when your upstream doesn't use any
24063 dedicated platform. The tool proposes a unified interface for any format and
24064 an upload option to send your work back to the platform.")
24065 (license license:gpl3+)))
24066
24067 (define-public python-titlecase
24068 (package
24069 (name "python-titlecase")
24070 (version "0.12.0")
24071 (source
24072 (origin
24073 (method url-fetch)
24074 (uri (pypi-uri "titlecase" version))
24075 (sha256
24076 (base32
24077 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
24078 (build-system python-build-system)
24079 (native-inputs
24080 `(("python-nose" ,python-nose)))
24081 (home-page "https://github.com/ppannuto/python-titlecase")
24082 (synopsis "Capitalize strings similar to book titles")
24083 (description
24084 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
24085 It capitalizes (predominantly English) strings in a way that is similar to
24086 book titles, using the New York Times Manual of Style to leave certain words
24087 lowercase.")
24088 (license license:expat)))
24089
24090 (define-public python-pypng
24091 (package
24092 (name "python-pypng")
24093 (version "0.0.20")
24094 (source
24095 (origin
24096 (method url-fetch)
24097 (uri (pypi-uri "pypng" version))
24098 (sha256
24099 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
24100 (build-system python-build-system)
24101 (home-page "https://github.com/drj11/pypng")
24102 (synopsis "Pure Python PNG image encoder/decoder")
24103 (description
24104 "The PyPNG module implements support for PNG images. It reads and writes
24105 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
24106 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
24107 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
24108 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
24109 A number of optional chunks can be specified (when writing) and
24110 understood (when reading): tRNS, bKGD, gAMA.
24111
24112 PyPNG is not a high level toolkit for image processing (like PIL) and does not
24113 aim at being a replacement or competitor. Its strength lies in fine-grained
24114 extensive support of PNG features. It can also read and write Netpbm PAM
24115 files, with a focus on its use as an intermediate format for implementing
24116 custom PNG processing.")
24117 (license license:expat)))
24118
24119 (define-public python-fuzzywuzzy
24120 (package
24121 (name "python-fuzzywuzzy")
24122 (version "0.18.0")
24123 (source
24124 (origin
24125 (method url-fetch)
24126 (uri (pypi-uri "fuzzywuzzy" version))
24127 (sha256
24128 (base32
24129 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
24130 (build-system python-build-system)
24131 (native-inputs
24132 `(("python-hypothesis" ,python-hypothesis)
24133 ("python-pycodestyle" ,python-pycodestyle)
24134 ("python-pytest" ,python-pytest)))
24135 (propagated-inputs
24136 `(("python-levenshtein" ,python-levenshtein)))
24137 (home-page "https://github.com/seatgeek/fuzzywuzzy")
24138 (synopsis "Fuzzy string matching in Python")
24139 (description "Approximate string matching using
24140 @emph{Levenshtein Distance} to calculate the differences between
24141 sequences.")
24142 (license license:gpl2)))
24143
24144 (define-public python2-fuzzywuzzy
24145 (package-with-python2 python-fuzzywuzzy))
24146
24147 (define-public python-block-tracing
24148 (package
24149 (name "python-block-tracing")
24150 (version "1.0.1")
24151 (source
24152 (origin
24153 (method url-fetch)
24154 (uri (pypi-uri "block_tracing" version))
24155 (sha256
24156 (base32
24157 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
24158 (build-system python-build-system)
24159 (arguments '(#:tests? #f)) ; no tests
24160 (home-page "https://github.com/rianhunter/block_tracing")
24161 (synopsis "Protect process memory")
24162 (description
24163 "@code{block_tracing} is a tiny Python library that can be used to
24164 prevent debuggers and other applications from inspecting the memory within
24165 your process.")
24166 (license license:expat)))
24167
24168 (define-public python-gcovr
24169 (package
24170 (name "python-gcovr")
24171 (version "4.2")
24172 (source
24173 (origin
24174 (method url-fetch)
24175 (uri (pypi-uri "gcovr" version))
24176 (sha256
24177 (base32
24178 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
24179 (build-system python-build-system)
24180 (propagated-inputs
24181 `(("python-lxml" ,python-lxml)
24182 ("python-jinja2" ,python-jinja2)))
24183 (home-page "https://gcovr.com/")
24184 (synopsis "Utility for generating code coverage results")
24185 (description
24186 "Gcovr provides a utility for managing the use of the GNU gcov
24187 utility and generating summarized code coverage results. It is inspired
24188 by the Python coverage.py package, which provides a similar utility for
24189 Python.")
24190 (license license:bsd-3)))
24191
24192 (define-public python-owslib
24193 (package
24194 (name "python-owslib")
24195 (version "0.19.2")
24196 (source
24197 (origin
24198 (method url-fetch)
24199 (uri (pypi-uri "OWSLib" version))
24200 (sha256
24201 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
24202 (build-system python-build-system)
24203 (arguments
24204 '(#:tests? #f)) ; TODO: package dependencies required for tests.
24205 (synopsis "Interface for Open Geospatial Consortium web service")
24206 (description
24207 "OWSLib is a Python package for client programming with Open Geospatial
24208 Consortium (OGC) web service (hence OWS) interface standards, and their related
24209 content models.")
24210 (home-page "https://geopython.github.io/OWSLib/")
24211 (license license:bsd-3)))
24212
24213 (define-public python-docusign-esign
24214 (package
24215 (name "python-docusign-esign")
24216 (version "3.1.0")
24217 (source (origin
24218 (method url-fetch)
24219 (uri (pypi-uri "docusign_esign" version))
24220 (sha256
24221 (base32
24222 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
24223 (build-system python-build-system)
24224 ;; Testing requires undocumented setup changes, and so testing is disabled here.
24225 (arguments `(#:tests? #f))
24226 (propagated-inputs
24227 `(("python-certifi" ,python-certifi)
24228 ("python-six" ,python-six)
24229 ("python-dateutil" ,python-dateutil)
24230 ("python-urllib3" ,python-urllib3)
24231 ("python-pyjwt" ,python-pyjwt)
24232 ("python-cryptography" ,python-cryptography)
24233 ("python-nose" ,python-nose)))
24234 (synopsis "DocuSign Python Client")
24235 (description "The Official DocuSign Python Client Library used to interact
24236 with the eSign REST API. Send, sign, and approve documents using this client.")
24237 (home-page "https://www.docusign.com/devcenter")
24238 (license license:expat)))
24239
24240 (define-public python-xattr
24241 (package
24242 (name "python-xattr")
24243 (version "0.9.7")
24244 (source
24245 (origin
24246 (method url-fetch)
24247 (uri (pypi-uri "xattr" version))
24248 (sha256
24249 (base32
24250 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
24251 (build-system python-build-system)
24252 (propagated-inputs
24253 `(("python-cffi" ,python-cffi)))
24254 (home-page "https://github.com/xattr/xattr")
24255 (synopsis
24256 "Python wrapper for extended file system attributes")
24257 (description "This package provides a Python wrapper for using extended
24258 file system attributes. Extended attributes extend the basic attributes of files
24259 and directories in the file system. They are stored as name:data pairs
24260 associated with file system objects (files, directories, symlinks, etc).")
24261 (license license:expat)))
24262
24263 (define-public python-json-logger
24264 (package
24265 (name "python-json-logger")
24266 (version "0.1.11")
24267 (source
24268 (origin
24269 (method url-fetch)
24270 (uri (pypi-uri "python-json-logger" version))
24271 (sha256
24272 (base32
24273 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
24274 (build-system python-build-system)
24275 (home-page
24276 "https://github.com/madzak/python-json-logger")
24277 (synopsis "JSON log formatter in Python")
24278 (description "This library allows standard Python logging to output log data
24279 as JSON objects. With JSON we can make our logs more readable by machines and
24280 we can stop writing custom parsers for syslog-type records.")
24281 (license license:bsd-3)))
24282
24283 (define-public python-daiquiri
24284 (package
24285 (name "python-daiquiri")
24286 (version "2.1.1")
24287 (source
24288 (origin
24289 (method url-fetch)
24290 (uri (pypi-uri "daiquiri" version))
24291 (sha256
24292 (base32
24293 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
24294 (build-system python-build-system)
24295 (propagated-inputs
24296 `(("python-json-logger" ,python-json-logger)))
24297 (native-inputs
24298 `(("python-mock" ,python-mock)
24299 ("python-pytest" ,python-pytest)
24300 ("python-setuptools-scm" ,python-setuptools-scm)
24301 ("python-six" ,python-six)))
24302 (home-page "https://github.com/jd/daiquiri")
24303 (synopsis
24304 "Library to configure Python logging easily")
24305 (description "The daiquiri library provides an easy way to configure
24306 logging in Python. It also provides some custom formatters and handlers.")
24307 (license license:asl2.0)))
24308
24309 (define-public python-pifpaf
24310 (package
24311 (name "python-pifpaf")
24312 (version "2.5.0")
24313 (source
24314 (origin
24315 (method url-fetch)
24316 (uri (pypi-uri "pifpaf" version))
24317 (sha256
24318 (base32
24319 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
24320 (build-system python-build-system)
24321 (arguments
24322 '(#:phases
24323 (modify-phases %standard-phases
24324 (replace 'check
24325 (lambda _
24326 (invoke "python" "setup.py" "testr" "--slowest"
24327 "--testr-args=until-failure"))))))
24328 (propagated-inputs
24329 `(("python-click" ,python-click)
24330 ("python-daiquiri" ,python-daiquiri)
24331 ("python-fixtures" ,python-fixtures)
24332 ("python-jinja2" ,python-jinja2)
24333 ("python-pbr" ,python-pbr)
24334 ("python-psutil" ,python-psutil)
24335 ("python-six" ,python-six)
24336 ("python-xattr" ,python-xattr)))
24337 (native-inputs
24338 `(("python-mock" ,python-mock)
24339 ("python-os-testr" ,python-os-testr)
24340 ("python-requests" ,python-requests)
24341 ("python-testrepository" ,python-testrepository)
24342 ("python-testtools" ,python-testtools)))
24343 (home-page "https://github.com/jd/pifpaf")
24344 (synopsis "Tools and fixtures to manage daemons for testing in Python")
24345 (description "Pifpaf is a suite of fixtures and a command-line tool that
24346 starts and stops daemons for a quick throw-away usage. This is typically
24347 useful when needing these daemons to run integration testing. It originally
24348 evolved from its precursor @code{overtest}.")
24349 (license license:asl2.0)))
24350
24351 (define-public python-pytest-check-links
24352 (package
24353 (name "python-pytest-check-links")
24354 (version "0.3.0")
24355 (source
24356 (origin
24357 (method url-fetch)
24358 ;; URI uses underscores
24359 (uri (pypi-uri "pytest_check_links" version))
24360 (sha256
24361 (base32
24362 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
24363 (build-system python-build-system)
24364 (propagated-inputs
24365 `(("python-docutils" ,python-docutils)
24366 ("python-html5lib" ,python-html5lib)
24367 ("python-nbconvert" ,python-nbconvert)
24368 ("python-nbformat" ,python-nbformat)
24369 ("python-pytest" ,python-pytest)
24370 ("python-six" ,python-six)))
24371 (native-inputs
24372 `(("python-pbr-minimal" ,python-pbr-minimal)))
24373 (home-page "https://github.com/minrk/pytest-check-links")
24374 (synopsis "Check links in files")
24375 (description "This package provides a pytest plugin that checks URLs for
24376 HTML-containing files.")
24377 (license license:bsd-3)))
24378
24379 (define-public python-json5
24380 (package
24381 (name "python-json5")
24382 (version "0.8.5")
24383 (source
24384 (origin
24385 ;; sample.json5 is missing from PyPi source tarball
24386 (method git-fetch)
24387 (uri (git-reference
24388 (url "https://github.com/dpranke/pyjson5")
24389 (commit (string-append "v" version))))
24390 (file-name (git-file-name name version))
24391 (sha256
24392 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
24393 (build-system python-build-system)
24394 (home-page "https://github.com/dpranke/pyjson5")
24395 (synopsis
24396 "Python implementation of the JSON5 data format")
24397 (description
24398 "JSON5 extends the JSON data interchange format to make it slightly more
24399 usable as a configuration language. This Python package implements parsing and
24400 dumping of JSON5 data structures.")
24401 (license license:asl2.0)))
24402
24403 (define-public python-frozendict
24404 (package
24405 (name "python-frozendict")
24406 (version "1.2")
24407 (source
24408 (origin
24409 (method url-fetch)
24410 (uri (pypi-uri "frozendict" version))
24411 (sha256
24412 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
24413 (build-system python-build-system)
24414 (home-page "https://github.com/slezica/python-frozendict")
24415 (synopsis "Simple immutable mapping for Python")
24416 (description
24417 "@dfn{frozendict} is an immutable wrapper around dictionaries that
24418 implements the complete mapping interface. It can be used as a drop-in
24419 replacement for dictionaries where immutability is desired.")
24420 (license license:expat)))
24421
24422 (define-public python-unpaddedbase64
24423 (package
24424 (name "python-unpaddedbase64")
24425 (version "1.1.0")
24426 (source
24427 (origin
24428 (method git-fetch)
24429 (uri (git-reference
24430 (url "https://github.com/matrix-org/python-unpaddedbase64")
24431 (commit (string-append "v" version))))
24432 (file-name (git-file-name name version))
24433 (sha256
24434 (base32
24435 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
24436 (build-system python-build-system)
24437 (home-page "https://pypi.org/project/unpaddedbase64/")
24438 (synopsis "Encode and decode Base64 without “=” padding")
24439 (description
24440 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
24441 using “=” characters. However this conveys no benefit so many protocols
24442 choose to use Base64 without the “=” padding.")
24443 (license license:asl2.0)))
24444
24445 (define-public python-py-cpuinfo
24446 (package
24447 (name "python-py-cpuinfo")
24448 (version "5.0.0")
24449 (source
24450 (origin
24451 (method url-fetch)
24452 (uri (pypi-uri "py-cpuinfo" version))
24453 (sha256
24454 (base32
24455 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
24456 (build-system python-build-system)
24457 (home-page "https://github.com/workhorsy/py-cpuinfo")
24458 (synopsis "Get CPU info with Python")
24459 (description
24460 "This Python module returns the CPU info by using the best sources of
24461 information for your operating system.")
24462 (license license:expat)))
24463
24464 (define-public python-canonicaljson
24465 (package
24466 (name "python-canonicaljson")
24467 (version "1.4.0")
24468 (source
24469 (origin
24470 (method url-fetch)
24471 (uri (pypi-uri "canonicaljson" version))
24472 (sha256
24473 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
24474 (build-system python-build-system)
24475 (propagated-inputs
24476 `(("python-six" ,python-six)
24477 ("python-frozendict" ,python-frozendict)
24478 ("python-simplejson" ,python-simplejson)))
24479 (home-page "https://github.com/matrix-org/python-canonicaljson")
24480 (synopsis "Canonical JSON")
24481 (description
24482 "Deterministically encode JSON.
24483
24484 @itemize
24485 @item Encodes objects and arrays as RFC 7159 JSON.
24486 @item Sorts object keys so that you get the same result each time.
24487 @item Has no insignificant whitespace to make the output as small as possible.
24488 @item Escapes only the characters that must be escaped, U+0000 to
24489 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
24490 @item Uses the shortest escape sequence for each escaped character.
24491 @item Encodes the JSON as UTF-8.
24492 @item Can encode frozendict immutable dictionaries.
24493 @end itemize")
24494 (license license:asl2.0)))
24495
24496 (define-public python-signedjson
24497 (package
24498 (name "python-signedjson")
24499 (version "1.1.1")
24500 (source
24501 (origin
24502 (method url-fetch)
24503 (uri (pypi-uri "signedjson" version))
24504 (sha256
24505 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
24506 (build-system python-build-system)
24507 (propagated-inputs
24508 `(("python-canonicaljson" ,python-canonicaljson)
24509 ("python-importlib-metadata" ,python-importlib-metadata)
24510 ("python-pynacl" ,python-pynacl)
24511 ("python-typing-extensions" ,python-typing-extensions)
24512 ("python-unpaddedbase64" ,python-unpaddedbase64)))
24513 (native-inputs
24514 `(("python-setuptools-scm" ,python-setuptools-scm)))
24515 (home-page "https://github.com/matrix-org/python-signedjson")
24516 (synopsis "Sign JSON objects with ED25519 signatures")
24517 (description
24518 "Sign JSON objects with ED25519 signatures.
24519
24520 @itemize
24521 @item More than one entity can sign the same object.
24522 @item Each entity can sign the object with more than one key making it easier to
24523 rotate keys
24524 @item ED25519 can be replaced with a different algorithm.
24525 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
24526 key.
24527 @end itemize")
24528 (license license:asl2.0)))
24529
24530 (define-public python-daemonize
24531 (package
24532 (name "python-daemonize")
24533 (version "2.5.0")
24534 (source
24535 (origin
24536 (method url-fetch)
24537 (uri (pypi-uri "daemonize" version))
24538 (sha256
24539 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
24540 (build-system python-build-system)
24541 (home-page "https://github.com/thesharp/daemonize")
24542 (synopsis "Library for writing system daemons in Python")
24543 (description "Daemonize is a library for writing system daemons in Python.")
24544 (license license:expat)))
24545
24546 (define-public python-pymacaroons
24547 (package
24548 (name "python-pymacaroons")
24549 (version "0.13.0")
24550 (source
24551 (origin
24552 (method url-fetch)
24553 (uri (pypi-uri "pymacaroons" version))
24554 (sha256
24555 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
24556 (build-system python-build-system)
24557 (propagated-inputs
24558 `(("python-six" ,python-six)
24559 ("python-pynacl" ,python-pynacl)))
24560 (home-page "https://github.com/ecordell/pymacaroons")
24561 (synopsis "Python Macaroon Library")
24562 (description
24563 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
24564 tokens, macaroons embed caveats that define specific authorization
24565 requirements for the target service, the service that issued the root macaroon
24566 and which is capable of verifying the integrity of macaroons it receives.
24567
24568 Macaroons allow for delegation and attenuation of authorization. They are
24569 simple and fast to verify, and decouple authorization policy from the
24570 enforcement of that policy.")
24571 (license license:expat)))
24572
24573 (define-public python-ldap3
24574 (package
24575 (name "python-ldap3")
24576 (version "2.7")
24577 (home-page "https://github.com/cannatag/ldap3")
24578 (source
24579 (origin
24580 (method git-fetch)
24581 (uri (git-reference (url home-page)
24582 (commit (string-append "v" version))))
24583 (file-name (git-file-name name version))
24584 (sha256
24585 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
24586 (build-system python-build-system)
24587 (arguments
24588 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
24589 #:phases (modify-phases %standard-phases
24590 (replace 'check
24591 (lambda* (#:key tests? #:allow-other-keys)
24592 (when tests?
24593 (invoke "nosetests" "-s" "test"))
24594 #t)))))
24595 (native-inputs
24596 `(("python-nose" ,python-nose)))
24597 (propagated-inputs
24598 `(("python-gssapi" ,python-gssapi)
24599 ("python-pyasn1" ,python-pyasn1)))
24600 (synopsis "Python LDAP client")
24601 (description
24602 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
24603 library.")
24604 (license license:lgpl3+)))
24605
24606 (define-public python-boltons
24607 (package
24608 (name "python-boltons")
24609 (version "20.0.0")
24610 (source
24611 (origin
24612 (method url-fetch)
24613 (uri (pypi-uri "boltons" version))
24614 (sha256
24615 (base32
24616 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
24617 (build-system python-build-system)
24618 (home-page "https://github.com/mahmoud/boltons")
24619 (synopsis "Extensions to the Python standard library")
24620 (description
24621 "Boltons is a set of over 230 pure-Python utilities in the same spirit
24622 as — and yet conspicuously missing from — the standard library, including:
24623
24624 @itemize
24625 @item Atomic file saving, bolted on with fileutils
24626 @item A highly-optimized OrderedMultiDict, in dictutils
24627 @item Two types of PriorityQueue, in queueutils
24628 @item Chunked and windowed iteration, in iterutils
24629 @item Recursive data structure iteration and merging, with iterutils.remap
24630 @item Exponential backoff functionality, including jitter, through
24631 iterutils.backoff
24632 @item A full-featured TracebackInfo type, for representing stack traces, in
24633 tbutils
24634 @end itemize")
24635 (license license:bsd-3)))
24636
24637 (define-public python-eliot
24638 (package
24639 (name "python-eliot")
24640 (version "1.12.0")
24641 (source
24642 (origin
24643 (method url-fetch)
24644 (uri (pypi-uri "eliot" version))
24645 (sha256
24646 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
24647 (build-system python-build-system)
24648 (arguments
24649 `(#:phases
24650 (modify-phases %standard-phases
24651 (add-after 'unpack 'remove-journald-support
24652 (lambda _
24653 (for-each delete-file
24654 '("eliot/tests/test_journald.py"
24655 "eliot/journald.py"))
24656 #t))
24657 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
24658 ;; remove command-line tool's tests. TODO eliot-prettyprint should
24659 ;; be installed and these tests should pass.
24660 (lambda _
24661 (delete-file "eliot/tests/test_prettyprint.py")
24662 #t)))))
24663 (propagated-inputs
24664 `(("python-boltons" ,python-boltons)
24665 ("python-pyrsistent" ,python-pyrsistent)
24666 ("python-six" ,python-six)
24667 ("python-zope-interface" ,python-zope-interface)))
24668 (native-inputs
24669 `(("python-black" ,python-black)
24670 ("python-coverage" ,python-coverage)
24671 ("python-dask" ,python-dask)
24672 ("python-flake8" ,python-flake8)
24673 ("python-hypothesis" ,python-hypothesis)
24674 ("python-pytest" ,python-pytest)
24675 ("python-setuptools" ,python-setuptools)
24676 ("python-sphinx" ,python-sphinx)
24677 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24678 ("python-testtools" ,python-testtools)
24679 ("python-twine" ,python-twine)
24680 ("python-twisted" ,python-twisted)))
24681 (home-page "https://github.com/itamarst/eliot/")
24682 (synopsis "Eliot: the logging system that tells you why it happened")
24683 (description
24684 "@dfn{eliot} is a Python logging system that outputs causal chains of
24685 actions: actions can spawn other actions, and eventually they either succeed
24686 or fail. The resulting logs tell you the story of what your software did: what
24687 happened, and what caused it.")
24688 (license license:asl2.0)))
24689
24690 (define-public python-pem
24691 (package
24692 (name "python-pem")
24693 (version "20.1.0")
24694 (source
24695 (origin
24696 (method url-fetch)
24697 (uri (pypi-uri "pem" version))
24698 (sha256
24699 (base32
24700 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
24701 (build-system python-build-system)
24702 (native-inputs
24703 `(("python-certifi" ,python-certifi)
24704 ("python-coverage" ,python-coverage)
24705 ("python-pretend" ,python-pretend)
24706 ("python-pyopenssl" ,python-pyopenssl)
24707 ("python-pytest" ,python-pytest)
24708 ("python-sphinx" ,python-sphinx)
24709 ("python-twisted" ,python-twisted)))
24710 (home-page "https://pem.readthedocs.io/")
24711 (synopsis "Easy PEM file parsing in Python")
24712 (description
24713 "This package provides a Python module for parsing and splitting PEM files.")
24714 (license license:expat)))
24715
24716 (define-public python-txsni
24717 ;; We need a few commits on top of 0.1.9 for compatibility with newer
24718 ;; Python and OpenSSL.
24719 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
24720 (revision "0"))
24721 (package
24722 (name "python-txsni")
24723 (version (git-version "0.1.9" revision commit))
24724 (home-page "https://github.com/glyph/txsni")
24725 (source
24726 (origin
24727 (method git-fetch)
24728 (uri (git-reference (url home-page) (commit commit)))
24729 (file-name (git-file-name name version))
24730 (sha256
24731 (base32
24732 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
24733 (build-system python-build-system)
24734 (propagated-inputs
24735 `(("python-pyopenssl" ,python-pyopenssl)
24736 ("python-service-identity" ,python-service-identity)
24737 ("python-twisted" ,python-twisted)))
24738 (synopsis "Run TLS servers with Twisted")
24739 (description
24740 "This package provides an easy-to-use SNI endpoint for use
24741 with the Twisted web framework.")
24742 (license license:expat))))
24743
24744 (define-public python-txacme
24745 (package
24746 (name "python-txacme")
24747 (version "0.9.2")
24748 (source
24749 (origin
24750 (method url-fetch)
24751 (uri (pypi-uri "txacme" version))
24752 (sha256
24753 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
24754 (build-system python-build-system)
24755 (propagated-inputs
24756 `(("python-acme" ,python-acme)
24757 ("python-attrs" ,python-attrs)
24758 ("python-eliot" ,python-eliot)
24759 ("python-josepy" ,python-josepy)
24760 ("python-pem" ,python-pem)
24761 ("python-treq" ,python-treq)
24762 ("python-twisted" ,python-twisted)
24763 ("python-txsni" ,python-txsni)))
24764 (native-inputs
24765 `(("python-fixtures" ,python-fixtures)
24766 ("python-hypothesis" ,python-hypothesis)
24767 ("python-mock" ,python-mock)
24768 ("python-service-identity"
24769 ,python-service-identity)
24770 ("python-testrepository" ,python-testrepository)
24771 ("python-testscenarios" ,python-testscenarios)
24772 ("python-testtools" ,python-testtools)))
24773 (home-page "https://github.com/twisted/txacme")
24774 (synopsis "Twisted implexmentation of the ACME protocol")
24775 (description
24776 "ACME is Automatic Certificate Management Environment, a protocol that
24777 allows clients and certificate authorities to automate verification and
24778 certificate issuance. The ACME protocol is used by the free Let's Encrypt
24779 Certificate Authority.
24780
24781 txacme is an implementation of the protocol for Twisted, the event-driven
24782 networking engine for Python.")
24783 (license license:expat)))
24784
24785 (define-public python-pysaml2
24786 (package
24787 (name "python-pysaml2")
24788 (version "6.5.1")
24789 (source
24790 (origin
24791 (method url-fetch)
24792 (uri (pypi-uri "pysaml2" version))
24793 (sha256
24794 (base32
24795 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
24796 (build-system python-build-system)
24797 (propagated-inputs
24798 `(("python-cryptography" ,python-cryptography)
24799 ("python-dateutil" ,python-dateutil)
24800 ("python-defusedxml" ,python-defusedxml)
24801 ("python-importlib-resources"
24802 ,python-importlib-resources)
24803 ("python-pyopenssl" ,python-pyopenssl)
24804 ("python-pytz" ,python-pytz)
24805 ("python-requests" ,python-requests)
24806 ("python-six" ,python-six)
24807 ("python-xmlschema" ,python-xmlschema)))
24808 (home-page "https://idpy.org")
24809 (synopsis "Python implementation of SAML Version 2 Standard")
24810 (description
24811 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
24812 It contains all necessary pieces for building a SAML2 service provider or
24813 an identity provider. The distribution contains examples of both.
24814
24815 This package was originally written to work in a WSGI environment, but
24816 there are extensions that allow you to use it with other frameworks.")
24817 (license license:asl2.0)))
24818
24819 (define-public python-click-plugins
24820 (package
24821 (name "python-click-plugins")
24822 (version "1.1.1")
24823 (source
24824 (origin
24825 (method url-fetch)
24826 (uri (pypi-uri "click-plugins" version))
24827 (sha256
24828 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
24829 (build-system python-build-system)
24830 (native-inputs
24831 `(("python-pytest" ,python-pytest)))
24832 (propagated-inputs
24833 `(("python-click" ,python-click)))
24834 (synopsis "Extension for Click to register external CLI commands")
24835 (description "This package provides n extension module for Click to
24836 register external CLI commands via setuptools entry-points.")
24837 (home-page "https://github.com/click-contrib/click-plugins")
24838 (license license:bsd-3)))
24839
24840 (define-public python-diceware
24841 (package
24842 (name "python-diceware")
24843 (version "0.9.6")
24844 (source
24845 (origin
24846 (method url-fetch)
24847 (uri (pypi-uri "diceware" version))
24848 (sha256
24849 (base32
24850 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
24851 (build-system python-build-system)
24852 (native-inputs
24853 `(("python-coverage" ,python-coverage)
24854 ("python-pytest" ,python-pytest)
24855 ("python-pytest-runner" ,python-pytest-runner)))
24856 (home-page "https://github.com/ulif/diceware/")
24857 (synopsis "Generates memorable passphrases")
24858 (description "This package generates passphrases by concatenating words
24859 randomly picked from wordlists. It supports several sources of
24860 randomness (including real life dice) and different wordlists (including
24861 cryptographically signed ones).")
24862 (license license:gpl3+)))
24863
24864 (define-public python-dictdiffer
24865 (package
24866 (name "python-dictdiffer")
24867 (version "0.8.1")
24868 (source (origin
24869 (method url-fetch)
24870 (uri (pypi-uri "dictdiffer" version))
24871 (sha256
24872 (base32
24873 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
24874 (build-system python-build-system)
24875 (native-inputs
24876 `(("python-check-manifest" ,python-check-manifest)
24877 ("python-coverage" ,python-coverage)
24878 ("python-isort" ,python-isort)
24879 ("python-mock" ,python-mock)
24880 ("python-pydoctstyle" ,python-pydocstyle)
24881 ("python-pytest-cache" ,python-pytest-cache)
24882 ("python-pytest-cov" ,python-pytest-cov)
24883 ("python-pytest-pep8" ,python-pytest-pep8)
24884 ("python-pytest-runner" ,python-pytest-runner)
24885 ("python-pytest" ,python-pytest)
24886 ("python-setuptools-scm" ,python-setuptools-scm)
24887 ("python-tox" ,python-tox)))
24888 (home-page "https://github.com/inveniosoftware/dictdiffer")
24889 (synopsis "Diff and patch Python dictionary objects")
24890 (description
24891 "Dictdiffer is a Python module that helps you to diff and patch
24892 dictionaries.")
24893 (license license:expat)))
24894
24895 (define-public pyzo
24896 (package
24897 (name "pyzo")
24898 (version "4.11.2")
24899 (source
24900 (origin
24901 (method url-fetch)
24902 (uri (pypi-uri "pyzo" version))
24903 (sha256
24904 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
24905 (build-system python-build-system)
24906 (arguments
24907 `(#:phases
24908 (modify-phases %standard-phases
24909 (add-before 'check 'fix-home-directory
24910 (lambda _
24911 ;; Tests fail with "Permission denied: '/homeless-shelter'".
24912 (setenv "HOME" "/tmp")
24913 #t)))
24914 ;; Tests fail with "Uncaught Python exception: python: undefined
24915 ;; symbol: objc_getClass".
24916 #:tests? #f))
24917 (propagated-inputs
24918 `(("python-pyqt" ,python-pyqt)))
24919 (home-page "https://pyzo.org")
24920 (synopsis
24921 "Python IDE for scientific computing")
24922 (description
24923 "Pyzo is a Python IDE focused on interactivity and introspection,
24924 which makes it very suitable for scientific computing. Its practical
24925 design is aimed at simplicity and efficiency.
24926
24927 It consists of two main components, the editor and the shell, and uses
24928 a set of pluggable tools to help the programmer in various ways. Some
24929 example tools are source structure, project manager, interactive help,
24930 workspace...")
24931 (license license:bsd-2)))
24932
24933 (define-public python-osc
24934 (package
24935 (name "python-osc")
24936 (version "1.7.4")
24937 (source
24938 (origin
24939 (method url-fetch)
24940 (uri (pypi-uri "python-osc" version))
24941 (sha256
24942 (base32
24943 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
24944 (build-system python-build-system)
24945 (home-page "https://github.com/attwad/python-osc")
24946 (synopsis "Open Sound Control server and client implementations")
24947 (description
24948 "@code{python-osc} is a pure Python library with no external
24949 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
24950 Open Sound Control 1.0} specification.")
24951 (license license:unlicense)))
24952
24953 (define-public python-voluptuous
24954 (package
24955 (name "python-voluptuous")
24956 (version "0.11.7")
24957 (source
24958 (origin
24959 (method url-fetch)
24960 (uri (pypi-uri "voluptuous" version))
24961 (sha256
24962 (base32
24963 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
24964 (build-system python-build-system)
24965 (native-inputs
24966 `(("python-nose" ,python-nose)))
24967 (home-page "https://github.com/alecthomas/voluptuous")
24968 (synopsis "Python data validation library")
24969 (description
24970 "Voluptuous is a Python data validation library. It is primarily
24971 intended for validating data coming into Python as JSON, YAML, etc.")
24972 (license license:bsd-3)))
24973
24974 (define-public python-cmd2
24975 (package
24976 (name "python-cmd2")
24977 (version "1.0.2")
24978 (source
24979 (origin
24980 (method url-fetch)
24981 (uri (pypi-uri "cmd2" version))
24982 (sha256
24983 (base32
24984 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
24985 (build-system python-build-system)
24986 (propagated-inputs
24987 `(("python-attrs" ,python-attrs)
24988 ("python-colorama" ,python-colorama)
24989 ("python-pyperclip" ,python-pyperclip)
24990 ("python-wcwidth" ,python-wcwidth)))
24991 (native-inputs
24992 `(("python-codecov" ,python-codecov)
24993 ("python-coverage" ,python-coverage)
24994 ("python-doc8" ,python-doc8)
24995 ("python-flake8" ,python-flake8)
24996 ("python-invoke" ,python-invoke)
24997 ("python-mock" ,python-mock)
24998 ("python-pytest" ,python-pytest)
24999 ("python-pytest-cov" ,python-pytest-cov)
25000 ("python-pytest-mock" ,python-pytest-mock)
25001 ("python-setuptools-scm" ,python-setuptools-scm)
25002 ("python-sphinx" ,python-sphinx)
25003 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
25004 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
25005 ("python-tox" ,python-tox)
25006 ("python-twine" ,python-twine)
25007 ("which" ,which)))
25008 (home-page "https://github.com/python-cmd2/cmd2")
25009 (synopsis "Tool for building interactive command line applications")
25010 (description
25011 "Cmd2 is a tool for building interactive command line applications in
25012 Python. Its goal is to make it quick and easy for developers to build
25013 feature-rich and user-friendly interactive command line applications. It
25014 provides a simple API which is an extension of Python's built-in @code{cmd}
25015 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
25016 make your life easier and eliminates much of the boilerplate code which would
25017 be necessary when using @code{cmd}.")
25018 (license license:expat)))
25019
25020 (define-public python-pytidylib
25021 (package
25022 (name "python-pytidylib")
25023 (version "0.3.2")
25024 (source (origin
25025 (method url-fetch)
25026 (uri (pypi-uri "pytidylib" version))
25027 (sha256
25028 (base32
25029 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
25030 (build-system python-build-system)
25031 (arguments
25032 '(#:phases
25033 (modify-phases %standard-phases
25034 (add-before 'build 'qualify-libtidy
25035 (lambda* (#:key inputs #:allow-other-keys)
25036 (let ((libtidy (string-append (assoc-ref inputs "tidy")
25037 "/lib/libtidy.so")))
25038 (substitute* "tidylib/tidy.py"
25039 (("ctypes\\.util\\.find_library\\('tidy'\\)")
25040 (format #f "'~a'" libtidy)))
25041 #t))))))
25042 (inputs `(("tidy" ,tidy)))
25043 (home-page "https://github.com/countergram/pytidylib")
25044 (synopsis "Python wrapper for HTML Tidy library")
25045 (description
25046 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
25047 allows you, from Python code, to “fix” invalid (X)HTML markup.")
25048 (license license:expat)))
25049
25050 (define-public python2-pytidylib
25051 (package-with-python2 python-pytidylib))
25052
25053 (define-public python-mujson
25054 (package
25055 (name "python-mujson")
25056 (version "1.4")
25057 (source
25058 (origin
25059 (method url-fetch)
25060 (uri (pypi-uri "mujson" version))
25061 (sha256
25062 (base32
25063 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
25064 (build-system python-build-system)
25065 (home-page "https://github.com/mattgiles/mujson")
25066 (synopsis "Use the fastest JSON functions available at import time")
25067 (description "This package selects the fastest JSON functions available
25068 at import time.")
25069 (license license:expat)))
25070
25071 (define-public python-bashlex
25072 (package
25073 (name "python-bashlex")
25074 (version "0.14")
25075 (source
25076 (origin
25077 (method url-fetch)
25078 (uri (pypi-uri "bashlex" version))
25079 (sha256
25080 (base32
25081 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
25082 (build-system python-build-system)
25083 (arguments
25084 `(#:phases
25085 (modify-phases %standard-phases
25086 (add-before 'build 'pregenerate-yacc-tables
25087 (lambda _
25088 ;; parser.py caches tables, which attempts to write to site lib
25089 ;; see https://github.com/idank/bashlex/issues/51
25090 (invoke "python" "-c" "import bashlex"))))))
25091 (home-page
25092 "https://github.com/idank/bashlex")
25093 (synopsis "Python parser for bash")
25094 (description "@code{bashlex} is a Python port of the parser used
25095 internally by GNU bash.
25096
25097 For the most part it's transliterated from C, the major differences are:
25098
25099 @itemize
25100 @item it does not execute anything
25101 @item it is reentrant
25102 @item it generates a complete AST
25103 @end itemize
25104 ")
25105 (license license:gpl3+)))
25106
25107 (define-public python-jinxed
25108 (package
25109 (name "python-jinxed")
25110 (version "1.0.0")
25111 (source
25112 (origin
25113 (method url-fetch)
25114 (uri (pypi-uri "jinxed" version))
25115 (sha256
25116 (base32
25117 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
25118 (build-system python-build-system)
25119 (arguments
25120 '(#:phases
25121 (modify-phases %standard-phases
25122 (add-before 'check 'set-environment-variables
25123 (lambda* (#:key inputs #:allow-other-keys)
25124 (let ((ncurses (assoc-ref inputs "ncurses")))
25125 (setenv "TERM" "LINUX")
25126 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
25127 #t))))
25128 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
25129 (native-inputs
25130 `(("ncurses" ,ncurses)))
25131 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
25132 (synopsis "Jinxed Terminal Library")
25133 (description
25134 "Jinxed is an implementation of a subset of the Python curses library.")
25135 (license license:mpl2.0)))
25136
25137 (define-public python-svgutils
25138 (package
25139 (name "python-svgutils")
25140 (version "0.3.4")
25141 (source
25142 (origin
25143 (method url-fetch)
25144 (uri (pypi-uri "svgutils" version))
25145 (sha256
25146 (base32
25147 "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
25148 (build-system python-build-system)
25149 (propagated-inputs
25150 `(("python-lxml" ,python-lxml)))
25151 (home-page "https://svgutils.readthedocs.io")
25152 (synopsis "Python SVG editor")
25153 (description "This is an utility package that helps with editing and
25154 concatenating SVG files. It is especially directed at scientists preparing
25155 final figures for submission to journals. So far it supports arbitrary
25156 placement and scaling of SVG figures and adding markers, such as labels.")
25157 (license license:expat)))
25158
25159 (define-public python-blessed
25160 (package
25161 (name "python-blessed")
25162 (version "1.17.8")
25163 (source
25164 (origin
25165 (method url-fetch)
25166 (uri (pypi-uri "blessed" version))
25167 (sha256
25168 (base32
25169 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
25170 (modules '((guix build utils)))
25171 (snippet
25172 '(begin
25173 ;; Don't get hung up on Windows test failures.
25174 (delete-file "blessed/win_terminal.py") #t))))
25175 (build-system python-build-system)
25176 (propagated-inputs
25177 `(("python-jinxed" ,python-jinxed)
25178 ("python-six" ,python-six)
25179 ("python-wcwidth" ,python-wcwidth)))
25180 (native-inputs
25181 `(("python-mock" ,python-mock)
25182 ("python-pytest" ,python-pytest)))
25183 (home-page "https://github.com/jquast/blessed")
25184 (synopsis "Wrapper around terminal capabilities")
25185 (description
25186 "Blessed is a thin, practical wrapper around terminal styling, screen
25187 positioning, and keyboard input.")
25188 (license license:expat)))
25189
25190 (define-public python-readme-renderer
25191 (package
25192 (name "python-readme-renderer")
25193 (version "26.0")
25194 (source
25195 (origin
25196 (method url-fetch)
25197 (uri (pypi-uri "readme_renderer" version))
25198 (sha256
25199 (base32
25200 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
25201 (build-system python-build-system)
25202 (propagated-inputs
25203 `(("python-bleach" ,python-bleach)
25204 ("python-docutils" ,python-docutils)
25205 ("python-pygments" ,python-pygments)
25206 ("python-six" ,python-six)))
25207 (native-inputs
25208 `(("python-mock" ,python-mock)
25209 ("python-pytest" ,python-pytest)))
25210 (home-page "https://github.com/pypa/readme_renderer")
25211 (synopsis "Render README files in Warehouse")
25212 (description
25213 "Readme Renderer is a library that will safely render arbitrary README
25214 files into HTML. It is designed to be used in Warehouse to render the
25215 @code{long_description} for packages. It can handle Markdown, reStructuredText,
25216 and plain text.")
25217 (license license:asl2.0)))
25218
25219 (define-public python-lazr-delegates
25220 (package
25221 (name "python-lazr-delegates")
25222 (version "2.0.4")
25223 (source
25224 (origin
25225 (method url-fetch)
25226 (uri (pypi-uri "lazr.delegates" version))
25227 (sha256
25228 (base32
25229 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
25230 (build-system python-build-system)
25231 (arguments
25232 '(#:phases
25233 (modify-phases %standard-phases
25234 (replace 'check
25235 (lambda _
25236 (invoke "python" "setup.py" "nosetests"))))))
25237 (native-inputs
25238 `(("python-nose" ,python-nose)))
25239 (propagated-inputs
25240 `(("python-zope-interface" ,python-zope-interface)))
25241 (home-page "https://launchpad.net/lazr.delegates")
25242 (synopsis "Easily write objects that delegate behavior")
25243 (description
25244 "The @code{lazr.delegates} package makes it easy to write objects that
25245 delegate behavior to another object. The new object adds some property or
25246 behavior on to the other object, while still providing the underlying interface,
25247 and delegating behavior.")
25248 (license license:lgpl3)))
25249
25250 (define-public python-lazr-config
25251 (package
25252 (name "python-lazr-config")
25253 (version "2.2.2")
25254 (source
25255 (origin
25256 (method url-fetch)
25257 (uri (pypi-uri "lazr.config" version))
25258 (sha256
25259 (base32
25260 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
25261 (build-system python-build-system)
25262 (arguments
25263 '(#:phases
25264 (modify-phases %standard-phases
25265 (replace 'check
25266 (lambda _
25267 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
25268 (native-inputs
25269 `(("python-nose" ,python-nose)))
25270 (propagated-inputs
25271 `(("python-lazr-delegates" ,python-lazr-delegates)
25272 ("python-zope-interface" ,python-zope-interface)))
25273 (home-page "https://launchpad.net/lazr.config")
25274 (synopsis "Create configuration schemas and process and validate configurations")
25275 (description
25276 "The LAZR config system is typically used to manage process configuration.
25277 Process configuration is for saying how things change when we run systems on
25278 different machines, or under different circumstances. This system uses ini-like
25279 file format of section, keys, and values. The config file supports inheritance
25280 to minimize duplication of information across files. The format supports schema
25281 validation.")
25282 (license license:lgpl3)))
25283
25284 (define-public python-flufl-bounce
25285 (package
25286 (name "python-flufl-bounce")
25287 (version "3.0.1")
25288 (source
25289 (origin
25290 (method url-fetch)
25291 (uri (pypi-uri "flufl.bounce" version))
25292 (sha256
25293 (base32
25294 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
25295 (build-system python-build-system)
25296 (propagated-inputs
25297 `(("python-atpublic" ,python-atpublic)
25298 ("python-zope-interface" ,python-zope-interface)))
25299 (native-inputs
25300 `(("python-nose2" ,python-nose2)))
25301 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
25302 (synopsis "Email bounce detectors")
25303 (description "The @code{flufl.bounce} library provides a set of heuristics
25304 and an API for detecting the original bouncing email addresses from a bounce
25305 message. Many formats found in the wild are supported, as are VERP and
25306 RFC 3464.")
25307 (license (list license:asl2.0
25308 license:lgpl3)))) ; only for setup_headers.py
25309
25310 (define-public python-flufl-i18n
25311 (package
25312 (name "python-flufl-i18n")
25313 (version "3.0")
25314 (source
25315 (origin
25316 (method url-fetch)
25317 (uri (pypi-uri "flufl.i18n" version))
25318 (sha256
25319 (base32
25320 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
25321 (build-system python-build-system)
25322 (propagated-inputs
25323 `(("python-atpublic" ,python-atpublic)))
25324 (home-page "https://flufli18n.readthedocs.io")
25325 (synopsis "API for Python internationalization")
25326 (description
25327 "This package provides a high-level, convenient API for managing
25328 internationalization/translation contexts in Python applications. There is a
25329 simple API for single-context applications, such as command line scripts which
25330 only need to translate into one language during the entire course of their
25331 execution. There is a more flexible, but still convenient API for multi-context
25332 applications, such as servers, which may need to switch language contexts for
25333 different tasks.")
25334 (license license:asl2.0)))
25335
25336 (define-public python-flufl-lock
25337 (package
25338 (name "python-flufl-lock")
25339 (version "4.0")
25340 (source
25341 (origin
25342 (method url-fetch)
25343 (uri (pypi-uri "flufl.lock" version))
25344 (sha256
25345 (base32
25346 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
25347 (build-system python-build-system)
25348 (propagated-inputs
25349 `(("python-atpublic" ,python-atpublic)
25350 ("python-psutil" ,python-psutil)))
25351 (home-page "https://flufllock.readthedocs.io")
25352 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
25353 (description
25354 "The @dfn{flufl.lock} package provides NFS-safe file locking with
25355 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
25356 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
25357 and have a maximum lifetime built-in.")
25358 (license (list license:asl2.0
25359 license:lgpl3)))) ; only for setup_helpers.py
25360
25361 (define-public python-flufl-testing
25362 (package
25363 (name "python-flufl-testing")
25364 (version "0.8")
25365 (source
25366 (origin
25367 (method url-fetch)
25368 (uri (pypi-uri "flufl.testing" version))
25369 (sha256
25370 (base32
25371 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
25372 (build-system python-build-system)
25373 (native-inputs
25374 `(("python-nose2" ,python-nose2)))
25375 (home-page "https://gitlab.com/warsaw/flufl.testing")
25376 (synopsis "Collection of test tool plugins")
25377 (description
25378 "This package contains a small collection of test tool plugins for
25379 @code{nose2} and @code{flake8}.")
25380 (license license:asl2.0)))
25381
25382 (define-public python-devtools
25383 (package
25384 (name "python-devtools")
25385 (version "0.6")
25386 (source
25387 (origin
25388 (method git-fetch)
25389 (uri (git-reference
25390 (url "https://github.com/samuelcolvin/python-devtools")
25391 (commit (string-append "v" version))))
25392 (file-name (git-file-name name version))
25393 (sha256
25394 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
25395 (build-system python-build-system)
25396 (native-inputs
25397 `(("python-pytest" ,python-pytest)
25398 ("python-pytest-mock" ,python-pytest-mock)))
25399 (propagated-inputs
25400 `(("python-pygments" ,python-pygments)))
25401 (arguments
25402 `(#:phases (modify-phases %standard-phases
25403 (replace 'check
25404 (lambda _
25405 (invoke "pytest")
25406 #t)))))
25407 (home-page "https://github.com/samuelcolvin/python-devtools")
25408 (synopsis "Debug command and development tools")
25409 (description
25410 "This package provides a debug print command and other development tools.
25411 It adds a simple and readable way to print stuff during development.")
25412 (license license:expat)))
25413
25414 (define-public python-dateparser
25415 (package
25416 (name "python-dateparser")
25417 (version "0.7.6")
25418 (source
25419 (origin
25420 (method url-fetch)
25421 (uri (pypi-uri "dateparser" version))
25422 (sha256
25423 (base32
25424 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
25425 (build-system python-build-system)
25426 (propagated-inputs
25427 `(("python-dateutil" ,python-dateutil)
25428 ("python-pytz" ,python-pytz)
25429 ("python-regex" ,python-regex)
25430 ("python-ruamel.yaml" ,python-ruamel.yaml)
25431 ("python-tzlocal" ,python-tzlocal)))
25432 (native-inputs
25433 `(("python-mock" ,python-mock)
25434 ("python-parameterized" ,python-parameterized)
25435 ("tzdata" ,tzdata-for-tests)))
25436 (arguments
25437 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
25438 #:tests? #f
25439 #:phases
25440 (modify-phases %standard-phases
25441 (add-before 'check 'set-check-environment
25442 (lambda* (#:key inputs #:allow-other-keys)
25443 (setenv "TZ" "UTC")
25444 (setenv "TZDIR"
25445 (string-append (assoc-ref inputs "tzdata")
25446 "/share/zoneinfo"))
25447 #t)))))
25448 (home-page "https://github.com/scrapinghub/dateparser")
25449 (synopsis
25450 "Date parsing library designed to parse dates from HTML pages")
25451 (description
25452 "@code{python-dateparser} provides modules to easily parse localized
25453 dates in almost any string formats commonly found on web pages.")
25454 (license license:bsd-3)))
25455
25456 (define-public python-dparse
25457 (package
25458 (name "python-dparse")
25459 (version "0.5.1")
25460 (source
25461 (origin
25462 (method url-fetch)
25463 (uri (pypi-uri "dparse" version))
25464 (sha256
25465 (base32
25466 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
25467 (build-system python-build-system)
25468 (native-inputs
25469 `(("python-pytest" ,python-pytest)))
25470 (propagated-inputs
25471 `(("python-packaging" ,python-packaging)
25472 ("python-pyyaml" ,python-pyyaml)
25473 ("python-toml" ,python-toml)))
25474 (home-page "https://github.com/pyupio/dparse")
25475 (synopsis "Parser for Python dependency files")
25476 (description "This package provides a parser for Python dependency files.")
25477 (license license:expat)))
25478
25479 (define-public python-dpath
25480 (package
25481 (name "python-dpath")
25482 (version "2.0.1")
25483 (source
25484 (origin
25485 (method url-fetch)
25486 (uri (pypi-uri "dpath" version))
25487 (sha256
25488 (base32
25489 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
25490 (build-system python-build-system)
25491 (native-inputs
25492 `(("python-hypothesis" ,python-hypothesis)
25493 ("python-mock" ,python-mock)
25494 ("python-nose" ,python-nose)))
25495 (arguments
25496 '(#:phases
25497 (modify-phases %standard-phases
25498 (replace 'check
25499 (lambda* (#:key inputs outputs #:allow-other-keys)
25500 (add-installed-pythonpath inputs outputs)
25501 ;; This invokation is taken from tox.ini.
25502 (invoke "nosetests" "-d" "-v" "tests/"))))))
25503 (home-page "https://github.com/akesterson/dpath-python")
25504 (synopsis "File-system-like pathing and searching for dictionaries")
25505 (description
25506 "@code{python-dpath} is a library for accessing and searching
25507 dictionaries via /slashed/paths ala xpath.
25508
25509 Basically it lets you glob over a dictionary as if it were a file system. It
25510 allows you to specify globs (ala the bash eglob syntax, through some advanced
25511 fnmatch.fnmatch magic) to access dictionary elements, and provides some
25512 facility for filtering those results.")
25513 (license license:expat)))
25514
25515 (define-public python-safety
25516 (package
25517 (name "python-safety")
25518 (version "1.9.0")
25519 (source
25520 (origin
25521 (method url-fetch)
25522 (uri (pypi-uri "safety" version))
25523 (sha256
25524 (base32
25525 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
25526 (build-system python-build-system)
25527 (arguments
25528 `(#:phases
25529 (modify-phases %standard-phases
25530 (add-after 'unpack 'disable-tests
25531 (lambda _
25532 (substitute* "tests/test_safety.py"
25533 ;; requires network
25534 (("def test_check_live") "def _test_check_live"))
25535 #t)))))
25536 (propagated-inputs
25537 `(("python-click" ,python-click)
25538 ("python-dparse" ,python-dparse)
25539 ("python-packaging" ,python-packaging)
25540 ("python-requests" ,python-requests)))
25541 (home-page "https://github.com/pyupio/safety")
25542 (synopsis "Check installed dependencies for known vulnerabilities")
25543 (description "Safety checks installed dependencies for known vulnerabilities.
25544 By default it uses the open Python vulnerability database Safety DB.")
25545 (license license:expat)))
25546
25547 (define-public python-pypandoc
25548 (package
25549 (name "python-pypandoc")
25550 (version "1.5")
25551 (source
25552 (origin
25553 (method url-fetch)
25554 (uri (pypi-uri "pypandoc" version))
25555 (sha256
25556 (base32
25557 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
25558 (build-system python-build-system)
25559 (inputs
25560 `(("pandoc" ,pandoc)
25561 ("pandoc-citeproc" ,pandoc-citeproc)))
25562 (propagated-inputs
25563 `(("wheel" ,python-wheel)))
25564 (native-inputs
25565 `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
25566 texlive-fonts-ec
25567 texlive-latex-hyperref
25568 texlive-latex-oberdiek
25569 texlive-lm
25570 texlive-xcolor)))))
25571 (arguments
25572 `(#:phases
25573 (modify-phases %standard-phases
25574 (add-before 'check 'disable-tests
25575 (lambda _
25576 ;; Disable test requiring network access
25577 (substitute* "tests.py"
25578 (("test_basic_conversion_from_http_url")
25579 "skip_test_basic_conversion_from_http_url"))
25580 ;; Needed by texlive-union to generate fonts
25581 (setenv "HOME" "/tmp")
25582 #t)))))
25583 (home-page "https://github.com/bebraw/pypandoc")
25584 (synopsis "Python wrapper for pandoc")
25585 (description "pypandoc is a thin Python wrapper around pandoc
25586 and pandoc-citeproc.")
25587 (license license:expat)))
25588
25589 (define-public python-rnc2rng
25590 (package
25591 (name "python-rnc2rng")
25592 (version "2.6.4")
25593 (source
25594 (origin
25595 (method url-fetch)
25596 (uri (pypi-uri "rnc2rng" version))
25597 (sha256
25598 (base32
25599 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
25600 (build-system python-build-system)
25601 (propagated-inputs
25602 `(("python-rply" ,python-rply)))
25603 (arguments
25604 `(#:phases (modify-phases %standard-phases
25605 (replace 'check
25606 (lambda _
25607 (invoke "python" "test.py"))))))
25608 (home-page "https://github.com/djc/rnc2rng")
25609 (synopsis "Convert RELAX NG Compact to regular syntax")
25610 (description
25611 "This package provides the @command{rnc2rng} command-line tool as well as
25612 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
25613 equivalent schemata in the XML-based default RELAX NG syntax.")
25614 (license license:expat)))
25615
25616 (define-public python-telethon
25617 (package
25618 (name "python-telethon")
25619 (version "1.17.5")
25620 (source
25621 (origin
25622 (method git-fetch)
25623 (uri (git-reference
25624 (url "https://github.com/LonamiWebs/Telethon")
25625 (commit (string-append "v" version))))
25626 (file-name (git-file-name name version))
25627 (sha256
25628 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
25629 (build-system python-build-system)
25630 (arguments
25631 '(#:phases
25632 (modify-phases %standard-phases
25633 (replace 'check
25634 (lambda* (#:key tests? #:allow-other-keys)
25635 (when tests?
25636 (invoke "py.test" "-v"))
25637 #t)))))
25638 (propagated-inputs
25639 `(("python-rsa" ,python-rsa)
25640 ("python-pyaes" ,python-pyaes)))
25641 (native-inputs
25642 `(("python-pytest" ,python-pytest)
25643 ("python-pytest-asyncio" ,python-pytest-asyncio)
25644 ("python-pytest-trio" ,python-pytest-trio)))
25645 (home-page "https://docs.telethon.dev")
25646 (synopsis "Full-featured Telegram client library for Python 3")
25647 (description "This library is designed to make it easy to write Python
25648 programs that can interact with Telegram.")
25649 (license license:expat)))
25650
25651 (define-public python-citeproc-py
25652 (package
25653 (name "python-citeproc-py")
25654 (version "0.5.1")
25655 (source
25656 (origin
25657 (method url-fetch)
25658 (uri (pypi-uri "citeproc-py" version))
25659 (sha256
25660 (base32
25661 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
25662 (build-system python-build-system)
25663 (propagated-inputs
25664 `(("python-lxml" ,python-lxml)
25665 ("python-rnc2rng" ,python-rnc2rng)))
25666 (home-page
25667 "https://github.com/brechtm/citeproc-py")
25668 (synopsis "Citations and bibliography formatter")
25669 (description
25670 "Citeproc-py is a CSL processor for Python. It aims to implement the
25671 CSL 1.0.1 specification. citeproc-py can output styled citations and
25672 bibliographies in a number of different output formats. Currently supported
25673 are plain text, reStructuredText and HTML.")
25674 (license license:bsd-2)))
25675
25676 (define-public python-inform
25677 (package
25678 (name "python-inform")
25679 (version "1.23.0")
25680 (source
25681 (origin
25682 (method url-fetch)
25683 (uri (pypi-uri "inform" version))
25684 (sha256
25685 (base32
25686 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
25687 (build-system python-build-system)
25688 (arguments
25689 `(#:tests? #f)) ; PyPI tarball lacks tests
25690 (native-inputs
25691 `(("python-hypothesis" ,python-hypothesis)
25692 ("python-pytest-cov" ,python-pytest-cov)
25693 ("python-pytest-runner" ,python-pytest-runner)))
25694 (propagated-inputs
25695 `(("python-arrow" ,python-arrow)
25696 ("python-six" ,python-six)))
25697 (home-page "https://inform.readthedocs.io")
25698 (synopsis "Print & logging utilities for communicating with user")
25699 (description
25700 "Inform is designed to display messages from programs that are typically run from
25701 a console. It provides a collection of ‘print’ functions that allow you to simply and
25702 cleanly print different types of messages.")
25703 (license license:gpl3+)))
25704
25705 (define-public python-nestedtext
25706 (package
25707 (name "python-nestedtext")
25708 (version "1.0.0")
25709 (source
25710 (origin
25711 (method url-fetch)
25712 (uri (pypi-uri "nestedtext" version))
25713 (sha256
25714 (base32
25715 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
25716 (build-system python-build-system)
25717 (arguments
25718 `(#:tests? #f)) ; PyPI tarball lacks tests
25719 (propagated-inputs
25720 `(("python-inform" ,python-inform)))
25721 (home-page "https://nestedtext.org")
25722 (synopsis "Human readable and writable data interchange format")
25723 (description
25724 "NestedText is a file format for holding data that is to be entered, edited, or
25725 viewed by people. It allows data to be organized into a nested collection of
25726 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
25727 without the complexity and risk of YAML and without the syntactic clutter of JSON.
25728 NestedText is both simple and natural. Only a small number of concepts and rules must
25729 be kept in mind when creating it. It is easily created, modified, or viewed with
25730 a text editor and easily understood and used by both programmers and non-programmers.")
25731 (license license:expat))) ; MIT license
25732
25733 (define-public python-nest-asyncio
25734 (package
25735 (name "python-nest-asyncio")
25736 (version "1.5.1")
25737 (source
25738 (origin
25739 (method url-fetch)
25740 (uri (pypi-uri "nest_asyncio" version))
25741 (sha256
25742 (base32
25743 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
25744 (build-system python-build-system)
25745 (home-page "https://github.com/erdewit/nest_asyncio")
25746 (synopsis "Patch asyncio to allow nested event loops")
25747 (description
25748 "By design @code{asyncio} does not allow its event loop to be nested.
25749 This presents a practical problem: when in an environment where the event loop
25750 is already running it's impossible to run tasks and wait for the result. This
25751 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
25752 @code{loop.run_until_complete}.")
25753 (license license:bsd-3)))
25754
25755 (define-public python-simpervisor
25756 (package
25757 (name "python-simpervisor")
25758 (version "0.4")
25759 (source
25760 (origin
25761 ;; Tests not included in release.
25762 (method git-fetch)
25763 (uri (git-reference
25764 (url "https://github.com/yuvipanda/simpervisor")
25765 (commit (string-append "v" version))))
25766 (file-name (git-file-name name version))
25767 (sha256
25768 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
25769 (build-system python-build-system)
25770 (arguments
25771 `(#:tests? #f ; Test suite can't find aiohttp.
25772 #:phases
25773 (modify-phases %standard-phases
25774 (replace 'check
25775 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25776 (when tests?
25777 (add-installed-pythonpath inputs outputs)
25778 (invoke "pytest" "--maxfail" "3" "--verbose"))
25779 #t)))))
25780 (native-inputs
25781 `(("python-aiohttp" ,python-aiohttp)
25782 ("python-pytest" ,python-pytest)
25783 ("python-pytest-asyncio" ,python-pytest-asyncio)))
25784 (home-page "https://github.com/yuvipanda/simpervisor")
25785 (synopsis "Simple async process supervisor")
25786 (description
25787 "This package provides a simple async process supervisor in Python.")
25788 (license license:bsd-3)))
25789
25790 (define-public python-parallel
25791 (package
25792 (name "python-parallel")
25793 (version "1.6.4.4")
25794 (source
25795 (origin
25796 (method url-fetch)
25797 (uri (string-append
25798 "https://www.parallelpython.com/downloads/pp/pp-"
25799 version ".zip"))
25800 (sha256
25801 (base32
25802 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
25803 (native-inputs
25804 `(("unzip" ,unzip)))
25805 (build-system python-build-system)
25806 (arguments '(#:tests? #f)) ; No test suite.
25807 (home-page "https://www.parallelpython.com")
25808 (synopsis "Parallel and distributed programming for Python")
25809 (description "Parallel Python module (PP) provides an easy and efficient
25810 way to create parallel-enabled applications for SMP computers and clusters.
25811 PP module features cross-platform portability and dynamic load balancing.
25812 Thus applications written with PP will parallelize efficiently even on
25813 heterogeneous and multi-platform clusters (including clusters running other
25814 applications with variable CPU loads).")
25815 (license license:bsd-3)))
25816
25817 (define-public python2-parallel
25818 (package-with-python2 python-parallel))
25819
25820 (define-public python-djvulibre
25821 (package
25822 (name "python-djvulibre")
25823 (version "0.8.6")
25824 (source
25825 (origin
25826 (method url-fetch)
25827 (uri (pypi-uri "python-djvulibre" version))
25828 (sha256
25829 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
25830 (build-system python-build-system)
25831 (native-inputs
25832 `(("ghostscript" ,ghostscript)
25833 ("pkg-config" ,pkg-config)
25834 ("python-nose" ,python-nose)))
25835 (inputs
25836 `(("djvulibre" ,djvulibre)
25837 ("python-cython" ,python-cython)))
25838 (arguments
25839 `(#:phases
25840 (modify-phases %standard-phases
25841 (add-after 'unpack 'fix-tests
25842 (lambda _
25843 ;; Unit tests try to load the 'dllpath.py' and fail, because it
25844 ;; doesn't make sense on GNU/Linux.
25845 (delete-file "djvu/dllpath.py")
25846 #t)))))
25847 (synopsis "Python bindings for DjVuLibre")
25848 (description "This is a set of Python bindings for the DjVuLibre library.")
25849 (home-page "https://jwilk.net/software/python-djvulibre")
25850 (license license:gpl2)))
25851
25852 (define-public python2-djvulibre
25853 (package-with-python2 python-djvulibre))
25854
25855 (define-public python-versioneer
25856 (package
25857 (name "python-versioneer")
25858 (version "0.19")
25859 (source
25860 (origin
25861 (method url-fetch)
25862 (uri (pypi-uri "versioneer" version))
25863 (sha256
25864 (base32
25865 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
25866 (build-system python-build-system)
25867 (home-page
25868 "https://github.com/python-versioneer/python-versioneer")
25869 (synopsis
25870 "Version-string management for VCS-controlled trees")
25871 (description
25872 "@code{versioneer} is a tool for managing a recorded version number in
25873 distutils-based python projects. The goal is to remove the tedious and
25874 error-prone \"update the embedded version string\" step from your release
25875 process.")
25876 (license license:public-domain)))
25877
25878 (define-public python2-gamera
25879 (package
25880 (name "python2-gamera")
25881 (version "3.4.4")
25882 (source
25883 (origin
25884 (method url-fetch)
25885 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
25886 "gamera-" version ".tar.gz"))
25887 (sha256
25888 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
25889 (modules '((guix build utils)))
25890 (snippet
25891 '(begin
25892 ;; Remove bundled libraries.
25893 (for-each delete-file-recursively
25894 '("src/libpng-1.2.5"
25895 "src/libtiff"
25896 "src/zlib-1.2.8"))))))
25897 (build-system python-build-system)
25898 (inputs
25899 `(("libpng" ,libpng)
25900 ("libtiff" ,libtiff)
25901 ("python2-wxpython" ,python2-wxpython)
25902 ("zlib" ,zlib)))
25903 (arguments
25904 `(#:python ,python-2))
25905 (synopsis "Framework for building document analysis applications")
25906 (description
25907 "Gamera is a toolkit for building document image recognition systems.")
25908 (home-page "https://gamera.informatik.hsnr.de/")
25909 (license license:gpl2+)))
25910
25911 (define-public python-contextvars
25912 (package
25913 (name "python-contextvars")
25914 (version "2.4")
25915 (source
25916 (origin
25917 (method url-fetch)
25918 (uri (pypi-uri "contextvars" version))
25919 (sha256
25920 (base32
25921 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
25922 (build-system python-build-system)
25923 (propagated-inputs
25924 `(("python-immutables" ,python-immutables)))
25925 (home-page
25926 "https://github.com/MagicStack/contextvars")
25927 (synopsis "PEP 567 Backport")
25928 (description "This package implements a backport of Python 3.7
25929 @code{contextvars} module (see PEP 567) for Python 3.6.")
25930 (license license:asl2.0)))
25931
25932 (define-public python-aiofiles
25933 (package
25934 (name "python-aiofiles")
25935 (version "0.6.0")
25936 (source
25937 (origin
25938 (method url-fetch)
25939 (uri (pypi-uri "aiofiles" version))
25940 (sha256
25941 (base32
25942 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
25943 (build-system python-build-system)
25944 (home-page "https://github.com/Tinche/aiofiles")
25945 (synopsis "File support for @code{asyncio}")
25946 (description "@code{python-aiofiles} is a library for handling local
25947 disk files in asyncio applications.")
25948 (license license:asl2.0)))
25949
25950 (define-public python-pyre-extensions
25951 (package
25952 (name "python-pyre-extensions")
25953 (version "0.0.18")
25954 (source
25955 (origin
25956 (method url-fetch)
25957 (uri (pypi-uri "pyre-extensions" version))
25958 (sha256
25959 (base32
25960 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
25961 (build-system python-build-system)
25962 (propagated-inputs
25963 `(("python-typing-extensions"
25964 ,python-typing-extensions)
25965 ("python-typing-inspect" ,python-typing-inspect)))
25966 (home-page "https://pyre-check.org")
25967 (synopsis
25968 "Type system extensions for use with @code{python-pyre}")
25969 (description
25970 "@code{python-pyre-extensions} defines extensions to the standard
25971 @code{typing} module that are supported by the Pyre typechecker.")
25972 (license license:expat)))
25973
25974 (define-public python-dataclasses
25975 (package
25976 (name "python-dataclasses")
25977 (version "0.8")
25978 (source
25979 (origin
25980 (method url-fetch)
25981 (uri (pypi-uri "dataclasses" version))
25982 (sha256
25983 (base32
25984 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
25985 (build-system python-build-system)
25986 (home-page
25987 "https://github.com/ericvsmith/dataclasses")
25988 (synopsis
25989 "Backport of the @code{dataclasses} module for Python 3.6")
25990 (description
25991 "This is an implementation of PEP 557, Data Classes. It is a
25992 backport of the @code{dataclasses} module for Python 3.6.")
25993 (license license:asl2.0)))
25994
25995 (define-public python-pywatchman
25996 (package
25997 (name "python-pywatchman")
25998 (version "1.4.1")
25999 (source
26000 (origin
26001 (method url-fetch)
26002 (uri (pypi-uri "pywatchman" version))
26003 (sha256
26004 (base32
26005 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
26006 (build-system python-build-system)
26007 (arguments
26008 `(#:tests? #f)) ;there are none
26009 (home-page
26010 "https://facebook.github.io/watchman/")
26011 (synopsis "Watchman client for python")
26012 (description "@code{python-pywatchman} is a library to connect and
26013 query Watchman to discover file changes.")
26014 (license license:bsd-3)))
26015
26016 (define-public python-helpdev
26017 (package
26018 (name "python-helpdev")
26019 (version "0.7.1")
26020 (source
26021 (origin
26022 (method url-fetch)
26023 (uri (pypi-uri "helpdev" version))
26024 (sha256
26025 (base32
26026 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
26027 (build-system python-build-system)
26028 (arguments
26029 `(#:phases
26030 (modify-phases %standard-phases
26031 (replace 'check
26032 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
26033 (when tests?
26034 (add-installed-pythonpath inputs outputs)
26035 (invoke "pytest" "tests"))
26036 #t)))))
26037 (propagated-inputs
26038 `(("python-importlib-metadata" ,python-importlib-metadata)))
26039 (native-inputs
26040 `(("python-pytest" ,python-pytest)))
26041 (home-page "https://gitlab.com/dpizetta/helpdev")
26042 (synopsis
26043 "Extract information about the Python environment easily")
26044 (description
26045 "Helpdev is a library to easily extract information about the Python
26046 environment.")
26047 (license license:expat)))
26048
26049 (define-public python-logutils
26050 (package
26051 (name "python-logutils")
26052 (version "0.3.5")
26053 (source
26054 (origin
26055 (method url-fetch)
26056 (uri (pypi-uri "logutils" version))
26057 (sha256
26058 (base32
26059 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
26060 (build-system python-build-system)
26061 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
26062 (synopsis "Logging utilities")
26063 (description "This package provides a set of handlers for the Python
26064 standard library logging package. Some of these handlers are out-of-scope
26065 for the standard library, and so they are packaged here. Others are updated
26066 versions which have appeared in recent Python releases, but are usable with
26067 older versions of Python and so are packaged here.")
26068 (license license:bsd-3)))
26069
26070 (define-public python-helper
26071 (package
26072 (name "python-helper")
26073 (version "2.5.0")
26074 (source (origin
26075 (method url-fetch)
26076 (uri (pypi-uri "helper" version))
26077 (sha256
26078 (base32
26079 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
26080 (build-system python-build-system)
26081 (native-inputs
26082 `(("python-mock" ,python-mock)))
26083 (propagated-inputs
26084 `(("python-logutils" ,python-logutils)
26085 ("python-pyyaml" ,python-pyyaml)))
26086 (home-page "https://github.com/gmr/helper")
26087 (synopsis "Library for writing configurable applications and daemons")
26088 (description
26089 "This package provides procedures for quickly writing configurable
26090 applications and daemons.")
26091 (license license:bsd-3)))
26092
26093 (define-public python-qtsass
26094 (package
26095 (name "python-qtsass")
26096 (version "0.3.0")
26097 (source
26098 (origin
26099 ;; There are no tests in the PyPI tarball.
26100 (method git-fetch)
26101 (uri (git-reference
26102 (url "https://github.com/spyder-ide/qtsass/")
26103 (commit (string-append "v" version))))
26104 (file-name (git-file-name name version))
26105 (sha256
26106 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
26107 (build-system python-build-system)
26108 (arguments
26109 `(#:test-target "pytest"
26110 #:phases
26111 (modify-phases %standard-phases
26112 ;; Tests need to read and write files.
26113 (add-before 'check 'make-git-checkout-writable
26114 (lambda _
26115 (for-each make-file-writable (find-files "."))
26116 #t)))))
26117 (native-inputs
26118 `(("python-pytest" ,python-pytest)
26119 ("python-pytest-cov" ,python-pytest-cov)
26120 ("python-pytest-runner" ,python-pytest-runner)))
26121 (propagated-inputs
26122 `(("python-libsass" ,python-libsass)))
26123 (home-page "https://github.com/spyder-ide/qtsass")
26124 (synopsis "Compile SCSS files to valid Qt stylesheets")
26125 (description
26126 "Besides being used in web development, CSS is also the way to stylize
26127 Qt-based desktop applications. However, Qt's CSS has a few variations that
26128 prevent the direct use of SASS compiler.
26129
26130 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
26131 handling those variations.")
26132 (license license:expat)))
26133
26134 (define-public python-qdarkstyle
26135 (package
26136 (name "python-qdarkstyle")
26137 (version "2.8.1")
26138 (source
26139 (origin
26140 (method url-fetch)
26141 (uri (pypi-uri "QDarkStyle" version))
26142 (sha256
26143 (base32
26144 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
26145 (build-system python-build-system)
26146 (arguments
26147 `(;; Fails unable to detect valid Qt bindings even when
26148 ;; added as native-inputs.
26149 #:tests? #f))
26150 (propagated-inputs
26151 `(("python-helpdev" ,python-helpdev)
26152 ("python-qtpy" ,python-qtpy)))
26153 (home-page
26154 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
26155 (synopsis
26156 "Complete dark stylesheet for Python and Qt applications")
26157 (description "QDarkStyle is the most complete dark stylesheet for Python and
26158 Qt applications.")
26159 (license license:expat)))
26160
26161 (define-public python-bitstring
26162 (package
26163 (name "python-bitstring")
26164 (version "3.1.7")
26165 (source
26166 (origin
26167 (method url-fetch)
26168 (uri (pypi-uri "bitstring" version))
26169 (sha256
26170 (base32
26171 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
26172 (build-system python-build-system)
26173 (arguments
26174 `(#:phases
26175 (modify-phases %standard-phases
26176 (replace 'check
26177 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26178 (when tests?
26179 (add-installed-pythonpath inputs outputs)
26180 (with-directory-excursion "test"
26181 (invoke "pytest")))
26182 #t)))))
26183 (native-inputs
26184 `(("python-pytest" ,python-pytest)))
26185 (home-page "https://github.com/scott-griffiths/bitstring")
26186 (synopsis
26187 "Simple construction, analysis and modification of binary data")
26188 (description
26189 "Bitstring is a library for simple construction, analysis and modification
26190 of binary data.")
26191 (license license:expat)))
26192
26193 (define-public python-confuse
26194 (package
26195 (name "python-confuse")
26196 (version "1.5.0")
26197 (source
26198 (origin
26199 (method url-fetch)
26200 (uri (pypi-uri "confuse" version))
26201 (sha256
26202 (base32
26203 "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
26204 (build-system python-build-system)
26205 (propagated-inputs
26206 `(("python-pyyaml" ,python-pyyaml)))
26207 (home-page "https://github.com/beetbox/confuse")
26208 (synopsis "Painless YAML configuration")
26209 (description "Confuse is a configuration library for Python that uses
26210 YAML. It takes care of defaults, overrides, type checking, command-line
26211 integration, human-readable errors, and standard OS-specific locations.")
26212 (license license:expat)))
26213
26214 (define-public python-reflink
26215 (package
26216 (name "python-reflink")
26217 (version "0.2.1")
26218 (source
26219 (origin
26220 (method url-fetch)
26221 (uri (pypi-uri "reflink" version))
26222 (sha256
26223 (base32
26224 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
26225 (build-system python-build-system)
26226 (arguments
26227 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
26228 (propagated-inputs
26229 `(("python-cffi" ,python-cffi)))
26230 (native-inputs
26231 `(("python-pytest" ,python-pytest)
26232 ("python-pytest-runner" ,python-pytest-runner)))
26233 (home-page "https://gitlab.com/rubdos/pyreflink")
26234 (synopsis "Python wrapper around reflink system call")
26235 (description
26236 "Python reflink wraps around platform specific @code{reflink}
26237 implementations.")
26238 (license license:expat)))
26239
26240 (define-public python-pivy
26241 (package
26242 (name "python-pivy")
26243 (version "0.6.5")
26244 (source
26245 (origin
26246 (method git-fetch)
26247 (uri (git-reference
26248 (url "https://github.com/coin3d/pivy")
26249 (commit version)))
26250 (file-name (git-file-name name version))
26251 (sha256
26252 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
26253 (build-system python-build-system)
26254 (arguments
26255 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
26256 #:tests? #f
26257 #:phases
26258 (modify-phases %standard-phases
26259 (add-after 'unpack 'patch-cmake-include-dirs
26260 (lambda _
26261 ;; Patch buildsystem to respect Coin3D include directory
26262 (substitute* "CMakeLists.txt"
26263 (("\\$\\{SoQt_INCLUDE_DIRS}")
26264 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
26265 #t)))))
26266 (native-inputs
26267 `(("cmake" ,cmake)
26268 ("swig" ,swig)))
26269 (inputs
26270 `(("python-wrapper" ,python-wrapper)
26271 ("qtbase" ,qtbase-5)
26272 ("libxi" ,libxi)
26273 ("libice" ,libice)
26274 ("soqt" ,soqt)
26275 ("glew" ,glew)
26276 ("coin3D" ,coin3D-4)))
26277 (home-page "https://github.com/coin3d/pivy")
26278 (synopsis "Python bindings to Coin3D")
26279 (description
26280 "Pivy provides python bindings for Coin, a 3D graphics library with an
26281 Application Programming Interface based on the Open Inventor 2.1 API.")
26282 (license license:isc)))
26283
26284 (define-public python-crayons
26285 (package
26286 (name "python-crayons")
26287 (version "0.4.0")
26288 (source
26289 (origin
26290 (method url-fetch)
26291 (uri (pypi-uri "crayons" version))
26292 (sha256
26293 (base32
26294 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
26295 (build-system python-build-system)
26296 (propagated-inputs
26297 `(("python-colorama" ,python-colorama)))
26298 (home-page "https://github.com/MasterOdin/crayons")
26299 (synopsis "TextUI colors for Python")
26300 (description "This package gives you colored strings for the terminal.
26301 Crayons automatically wraps a given string in the foreground color and
26302 restores the original state after the string is printed.")
26303 (license license:expat)))
26304
26305 (define-public python-sane
26306 (package
26307 (name "python-sane")
26308 (version "2.9.1")
26309 (source
26310 (origin
26311 (method url-fetch)
26312 (uri (pypi-uri name version))
26313 (sha256
26314 (base32
26315 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
26316 (build-system python-build-system)
26317 (native-inputs
26318 `(("python-pytest" ,python-pytest)))
26319 (inputs
26320 `(("sane-backends" ,sane-backends)))
26321 (home-page "https://github.com/python-pillow/Sane")
26322 (synopsis "Python interface to the SANE scanner")
26323 (description "This package provides Python interface to the SANE scanner
26324 and frame grabber interface.")
26325 (license (license:non-copyleft
26326 ;; Yet another variant of the X/MIT license.
26327 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
26328
26329 (define-public python-screenkey
26330 (package
26331 (name "python-screenkey")
26332 (version "1.4")
26333 (source
26334 (origin
26335 (method git-fetch)
26336 (uri (git-reference
26337 (url "https://gitlab.com/screenkey/screenkey")
26338 (commit (string-append "v" version))))
26339 (file-name (git-file-name name version))
26340 (sha256
26341 (base32
26342 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
26343 (build-system python-build-system)
26344 (arguments
26345 `(#:phases
26346 (modify-phases %standard-phases
26347 (add-after 'unpack 'fix-dlopen-paths
26348 (lambda* (#:key inputs outputs #:allow-other-keys)
26349 (let* ((x11 (assoc-ref inputs "libx11"))
26350 (xtst (assoc-ref inputs "libxtst")))
26351 (substitute* "Screenkey/xlib.py"
26352 (("libX11.so.6")
26353 (string-append x11 "/lib/libX11.so.6")))
26354 (substitute* "Screenkey/xlib.py"
26355 (("libXtst.so.6")
26356 (string-append xtst "/lib/libXtst.so.6")))
26357 #t)))
26358 (add-after 'install 'wrap-screenkey
26359 (lambda* (#:key outputs #:allow-other-keys)
26360 (wrap-program
26361 (string-append (assoc-ref outputs "out") "/bin/screenkey")
26362 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
26363 `("GI_TYPELIB_PATH"
26364 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
26365 #t)))))
26366 (inputs
26367 `(("python-distutils-extra" ,python-distutils-extra)
26368 ("python-tokenize-rt" ,python-tokenize-rt)
26369 ("libx11" ,libx11)
26370 ("libxtst" ,libxtst)
26371 ("gtk+" ,gtk+)
26372 ("python-pygobject" ,python-pygobject)
26373 ("python-pycairo" ,python-pycairo)
26374 ("python-setuptools-git" ,python-setuptools-git)
26375 ("python-babel" ,python-babel)))
26376 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
26377 (synopsis
26378 "Screencast tool to display pressed keys")
26379 (description
26380 "A screencast tool to display your keys inspired by Screenflick.")
26381 (license license:gpl3+)))
26382
26383 (define-public python-jinja2-cli
26384 (package
26385 (name "python-jinja2-cli")
26386 (version "0.7.0")
26387 (source
26388 (origin
26389 (method url-fetch)
26390 (uri (pypi-uri "jinja2-cli" version))
26391 (sha256
26392 (base32
26393 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
26394 (build-system python-build-system)
26395 (propagated-inputs
26396 `(("python-jinja2" ,python-jinja2)))
26397 (native-inputs
26398 `(("python-flake8" ,python-flake8)
26399 ("python-jinja2" ,python-jinja2)
26400 ("python-pytest" ,python-pytest)))
26401 (home-page "https://github.com/mattrobenolt/jinja2-cli")
26402 (synopsis "Command-line interface to Jinja2")
26403 (description
26404 "This package provides a command-line interface (CLI) to the Jinja2
26405 template engine.")
26406 (license license:bsd-3)))
26407
26408 (define-public python-readability
26409 (package
26410 (name "python-readability")
26411 (version "0.3.1")
26412 (source
26413 (origin
26414 (method url-fetch)
26415 (uri (pypi-uri "readability" version))
26416 (sha256
26417 (base32
26418 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
26419 (build-system python-build-system)
26420 (home-page
26421 "https://github.com/andreasvc/readability/")
26422 (synopsis
26423 "Measure the readability of a given text using surface
26424 characteristics")
26425 (description
26426 "This package provides a Python library that is an implementation of
26427 traditional readability measures based on simple surface
26428 characteristics. These measures are basically linear regressions based on the
26429 number of words, syllables, and sentences.")
26430 (license license:asl2.0)))
26431
26432 (define-public python-listparser
26433 (package
26434 (name "python-listparser")
26435 (version "0.18")
26436 (source
26437 (origin
26438 (method url-fetch)
26439 (uri (pypi-uri "listparser" version))
26440 (sha256
26441 (base32
26442 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
26443 (build-system python-build-system)
26444 (home-page
26445 "https://github.com/kurtmckee/listparser")
26446 (synopsis
26447 "Parse subscription lists in Python")
26448 (description
26449 "This package provides a Python library that can parse OPML, FOAF, and
26450 iGoogle subscription lists.")
26451 (license license:expat)))
26452
26453 (define-public python-smartypants
26454 (package
26455 (name "python-smartypants")
26456 (version "2.0.1")
26457 (source
26458 (origin
26459 ;; There's no source tarball for 2.0.1 on PyPI.
26460 (method git-fetch)
26461 (uri (git-reference
26462 (url "https://github.com/leohemsted/smartypants.py")
26463 (commit (string-append "v" version))))
26464 (file-name (git-file-name name version))
26465 (sha256
26466 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
26467 (build-system python-build-system)
26468 (arguments
26469 '(#:phases
26470 (modify-phases %standard-phases
26471 (replace 'check
26472 ;; Its `setup.py test` doesn't report failure with exit status, so
26473 ;; we use `nose` instead.
26474 (lambda _
26475 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
26476 (native-inputs
26477 ;; For tests.
26478 `(("python-docutils" ,python-docutils)
26479 ("python-nose" ,python-nose)
26480 ("python-pygments" ,python-pygments)))
26481 (home-page "https://github.com/leohemsted/smartypants.py")
26482 (synopsis "Translate punctuation characters into smart quotes")
26483 (description
26484 "@command{smartpants} can perform the following transformations:
26485 @enumerate
26486 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
26487 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
26488 entities
26489 @item Dashes (-- and ---) into en- and em-dash entities
26490 @item Three consecutive dots (... or . . .) into an ellipsis entity
26491 @end enumerate")
26492 (license license:bsd-3)))
26493
26494 (define-public python-typogrify
26495 (package
26496 (name "python-typogrify")
26497 (version "2.0.7")
26498 (source (origin
26499 (method url-fetch)
26500 (uri (pypi-uri "typogrify" version))
26501 (sha256
26502 (base32
26503 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
26504 (build-system python-build-system)
26505 (arguments
26506 '(#:phases
26507 (modify-phases %standard-phases
26508 (replace 'check
26509 (lambda _
26510 (invoke "nosetests" "-v"))))))
26511 (propagated-inputs
26512 `(("python-smartypants" ,python-smartypants)))
26513 (native-inputs
26514 ;; For tests.
26515 `(("python-nose" ,python-nose)))
26516 (home-page "https://github.com/mintchaos/typogrify")
26517 (synopsis "Filters to transform text into typographically-improved HTML")
26518 (description
26519 "@code{typogrify} provides a set of custom filters that automatically
26520 apply various transformations to plain text in order to yield
26521 typographically-improved HTML. While often used in conjunction with Jinja and
26522 Django template systems, the filters can be used in any environment.")
26523 (license license:bsd-3)))
26524
26525 (define-public python-ld
26526 (package
26527 (name "python-ld")
26528 (version "0.5.0")
26529 (source
26530 (origin
26531 (method url-fetch)
26532 (uri (pypi-uri "ld" version))
26533 (sha256
26534 (base32
26535 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
26536 (build-system python-build-system)
26537 (propagated-inputs
26538 `(("python-six" ,python-six)))
26539 (home-page "https://github.com/nir0s/ld")
26540 (synopsis "OS platform information API")
26541 (description
26542 "The ld package provides information about the GNU/Linux distribution it
26543 runs on, such as a reliable machine-readable ID, or version information.")
26544 (license license:asl2.0)))
26545
26546 (define-public python-quicktions
26547 (package
26548 (name "python-quicktions")
26549 (version "1.11")
26550 (source
26551 (origin
26552 (method url-fetch)
26553 (uri (pypi-uri "quicktions" version))
26554 (sha256
26555 (base32
26556 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
26557 (modules '((guix build utils)))
26558 (snippet
26559 '(begin
26560 ;; This file is generated by Cython.
26561 (delete-file "src/quicktions.c") #t))))
26562 (build-system python-build-system)
26563 (arguments
26564 `(#:phases
26565 (modify-phases %standard-phases
26566 (add-before 'build 'cythonize-sources
26567 (lambda _
26568 (with-directory-excursion "src"
26569 (invoke "cython" "quicktions.pyx"))))
26570 (replace 'check
26571 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
26572 (when tests?
26573 (add-installed-pythonpath inputs outputs)
26574 (invoke "pytest"))
26575 #t)))))
26576 (native-inputs
26577 `(("python-cython" ,python-cython)
26578 ("python-pytest" ,python-pytest)))
26579 (home-page "https://github.com/scoder/quicktions")
26580 (synopsis "Fast fractions data type for rational numbers")
26581 (description
26582 "This package provides fast fractions data type for rational numbers. It
26583 is the cythonized version of @code{fractions.Fraction}.")
26584 (license license:psfl)))
26585
26586 (define-public python-pathvalidate
26587 (package
26588 (name "python-pathvalidate")
26589 (version "2.4.1")
26590 (source
26591 (origin
26592 (method url-fetch)
26593 (uri (pypi-uri "pathvalidate" version))
26594 (sha256
26595 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
26596 (build-system python-build-system)
26597 (arguments
26598 '(#:tests? #f))
26599 ;; Tests disabled because of circular dependencies.
26600 ;; pathvalidate tests depend on pytest-md-report, which
26601 ;; depends on pathvalidate.
26602 (native-inputs
26603 `(("python-allpairspy" ,python-allpairspy)
26604 ("python-click" ,python-click)
26605 ("python-faker" ,python-faker)
26606 ("python-pytest" ,python-pytest)))
26607 (home-page "https://github.com/thombashi/pathvalidate")
26608 (synopsis "Sanitize strings representing paths")
26609 (description
26610 "@code{pathvalidate} is a Python library to sanitize/validate strings
26611 representing paths or filenames.")
26612 (license license:expat)))
26613
26614 (define-public python-escapism
26615 (package
26616 (name "python-escapism")
26617 (version "1.0.1")
26618 (source
26619 (origin
26620 (method url-fetch)
26621 (uri (pypi-uri "escapism" version))
26622 (sha256
26623 (base32
26624 "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
26625 (build-system python-build-system)
26626 (home-page "https://github.com/minrk/escapism")
26627 (synopsis "Simple, generic library for escaping strings")
26628 (description
26629 "This Python library provides a programming interface to, given a set of
26630 safe characters and an escape character, escape safe strings and unescape the
26631 result.")
26632 (license license:expat)))
26633
26634 (define-public python-recommonmark
26635 (package
26636 (name "python-recommonmark")
26637 (version "0.7.1")
26638 (source
26639 (origin
26640 (method url-fetch)
26641 (uri (pypi-uri "recommonmark" version))
26642 (sha256
26643 (base32
26644 "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
26645 (build-system python-build-system)
26646 (propagated-inputs
26647 `(("python-commonmark" ,python-commonmark)
26648 ("python-docutils" ,python-docutils)
26649 ("python-sphinx" ,python-sphinx)))
26650 (arguments
26651 '(#:phases (modify-phases %standard-phases
26652 (add-after 'unpack 'delete-test-sphinx
26653 (lambda* (#:key outputs #:allow-other-keys)
26654 (let* ((out (assoc-ref outputs "out")))
26655 (delete-file "tests/test_sphinx.py")))))))
26656 (home-page "https://github.com/readthedocs/recommonmark")
26657 (synopsis "Docutils-compatibility bridge to CommonMark")
26658 (description
26659 "This packages provides a docutils-compatibility bridge to CommonMark,
26660 enabling you to write CommonMark inside of Docutils & Sphinx projects.")
26661 (license license:expat)))
26662
26663 (define-public python-pyhull
26664 (package
26665 (name "python-pyhull")
26666 (version "2015.2.1")
26667 (source
26668 (origin
26669 (method url-fetch)
26670 (uri (pypi-uri "pyhull" version))
26671 (sha256
26672 (base32
26673 "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
26674 (build-system python-build-system)
26675 (propagated-inputs
26676 `(("python-numpy" ,python-numpy)))
26677 (home-page "https://github.com/materialsvirtuallab/pyhull")
26678 (synopsis "Python wrapper to Qhull")
26679 (description
26680 "This package provides a Python wrapper to @uref{http://www.qhull.org/,
26681 Qhull} for the computation of the convex hull, Delaunay triangulation, and
26682 Voronoi diagram.")
26683 (license license:expat)))
26684
26685 (define-public python-opcodes
26686 ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
26687 ;; version number, which is what we use here.
26688 (let ((commit "0f7c7d63f5e13ce5a89d9acc3934f1b6e247ec1f"))
26689 (package
26690 (name "python-opcodes")
26691 (version "0.3.14") ;from 'opcodes/__init__.py'
26692 (home-page "https://github.com/Maratyszcza/Opcodes")
26693 (source (origin
26694 (method git-fetch)
26695 (uri (git-reference (url home-page) (commit commit)))
26696 (file-name (git-file-name name version))
26697 (sha256
26698 (base32
26699 "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
26700 (build-system python-build-system)
26701 (synopsis "Database of processor instructions and opcodes")
26702 (description
26703 "This project documents instruction sets in a format convenient for
26704 tools development. An instruction set is represented by three files:
26705
26706 @itemize
26707 @item an XML file that describes instructions;
26708 @item an XSD file that describes the structure of the XML file;
26709 @item a Python module that reads the XML file and represents it as a set of
26710 Python objects;
26711 @end itemize
26712
26713 It currently provides descriptions for most user-mode x86, x86_64, and k1om
26714 instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
26715 and BMI2).")
26716 (license license:bsd-2))))
26717
26718 (define-public python-peachpy
26719 ;; There is no tag in this repo.
26720 (let ((commit "906d578266dc7188bf61e4cdbc9f8ea7d69edec0")
26721 (version "0.2.0") ;from 'peachpy/__init__.py'
26722 (revision "1"))
26723 (package
26724 (name "python-peachpy")
26725 (version (git-version version revision commit))
26726 (home-page "https://github.com/Maratyszcza/PeachPy")
26727 (source (origin
26728 (method git-fetch)
26729 (uri (git-reference (url home-page) (commit commit)))
26730 (file-name (git-file-name name version))
26731 (sha256
26732 (base32
26733 "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))))
26734 (build-system python-build-system)
26735 (arguments
26736 '(#:phases (modify-phases %standard-phases
26737 (replace 'check
26738 (lambda* (#:key tests? #:allow-other-keys)
26739 (when tests?
26740 (invoke "python" "setup.py" "nosetests")))))))
26741 (native-inputs
26742 `(("python-nose" ,python-nose)
26743 ("python-rednose" ,python-rednose)))
26744 (propagated-inputs
26745 `(("python-six" ,python-six)
26746 ("python-opcodes" ,python-opcodes)))
26747 (synopsis "Efficient assembly code generation in Python")
26748 (description
26749 "PeachPy is a Python framework for writing high-performance assembly kernels.
26750 PeachPy aims to simplify writing optimized assembly kernels while preserving
26751 all optimization opportunities of traditional assembly.
26752
26753 PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings
26754 for the Go language tool chain; it adapts to different calling conventions and
26755 application binary interfaces (ABIs); it takes care of register allocation; it
26756 supports x86_64 instructions up to AVX-512 and SHA.")
26757 (license license:bsd-2))))
26758
26759 (define-public python-pyan3
26760 (package
26761 (name "python-pyan3")
26762 (version "1.2.0")
26763 (source
26764 (origin
26765 ;; Source tarball on PyPI lacks tests.
26766 (method git-fetch)
26767 (uri (git-reference
26768 (url "https://github.com/Technologicat/pyan")
26769 (commit (string-append "v" version))))
26770 (file-name (git-file-name name version))
26771 (sha256
26772 (base32
26773 "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
26774 (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
26775 "python-pyan3-fix-absolute-path-bug.patch"))))
26776 (build-system python-build-system)
26777 (arguments
26778 `(#:phases
26779 (modify-phases %standard-phases
26780 (replace 'check
26781 (lambda* (#:key tests? #:allow-other-keys)
26782 (when tests?
26783 ;; Extend PYTHONPATH so the built package will be found.
26784 (setenv "PYTHONPATH"
26785 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
26786 (invoke "pytest")))))))
26787 (native-inputs
26788 `(("python-pytest" ,python-pytest)
26789 ("python-pytest-cov" ,python-pytest-cov)
26790 ("python-wheel" ,python-wheel)))
26791 (propagated-inputs
26792 `(("python-jinja2" ,python-jinja2)))
26793 (home-page "https://github.com/Technologicat/pyan")
26794 (synopsis "Offline call graph generator for Python 3")
26795 (description "Pyan takes one or more Python source files, performs
26796 a (rather superficial) static analysis, and constructs a directed graph of the
26797 objects in the combined source, and how they define or use each other. The
26798 graph can be output for rendering by GraphViz or yEd.")
26799 (license license:gpl2)))
26800
26801 (define-public date2name
26802 (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
26803 (revision "1"))
26804 (package
26805 (name "date2name")
26806 (version (git-version "0.0" revision commit))
26807 (source
26808 (origin
26809 (method git-fetch)
26810 (uri (git-reference
26811 (url "https://github.com/novoid/date2name")
26812 (commit commit)))
26813 (file-name (git-file-name name version))
26814 (sha256
26815 (base32
26816 "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
26817 (build-system python-build-system)
26818 (arguments
26819 `(#:tests? #f ; no tests
26820 #:phases
26821 (modify-phases %standard-phases
26822 (delete 'build)
26823 (replace 'install
26824 (lambda* (#:key outputs #:allow-other-keys)
26825 (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
26826 (binary (string-append bindir "/date2name")))
26827 (mkdir-p bindir)
26828 (copy-file "date2name/__init__.py" binary)
26829 (chmod binary #o555)))))))
26830 (synopsis "Handling time-stamps and date-stamps in file names")
26831 (description "By default, date2name gets the modification time of matching
26832 files and directories and adds a datestamp in standard ISO 8601+ format
26833 YYYY-MM-DD at the beginning of the file or directory name.")
26834 (home-page "https://github.com/novoid/date2name")
26835 (license license:gpl3+))))
26836
26837 (define-public python-braintree
26838 (package
26839 (name "python-braintree")
26840 (version "4.12.0")
26841 (source
26842 (origin
26843 (method url-fetch)
26844 (uri (pypi-uri "braintree" version))
26845 (sha256
26846 (base32 "19kli85q18p80nsn8fm4ql6axpr7bllfqg5chv2ywhr8zr8bssll"))))
26847 (build-system python-build-system)
26848 (propagated-inputs
26849 `(("python-requests" ,python-requests)))
26850 (home-page
26851 "https://developers.braintreepayments.com/python/sdk/server/overview")
26852 (synopsis "Braintree Python Library")
26853 (description "The Braintree Python SDK provides integration access to the
26854 Braintree Gateway. Braintree is a US-based payments service provider.")
26855 (license license:expat)))
26856
26857 (define-public python-markuppy
26858 (package
26859 (name "python-markuppy")
26860 (version "1.14")
26861 (source
26862 (origin
26863 (method url-fetch)
26864 (uri (pypi-uri "MarkupPy" version))
26865 (sha256
26866 (base32 "0pqdmpxbr8iq22b4css2gz5z6s01ddpzyj25x27kgbs2lp0f5phs"))))
26867 (build-system python-build-system)
26868 (home-page "https://github.com/tylerbakke/MarkupPy")
26869 (synopsis "A pythonic HTML/XML generator")
26870 (description "This Python module attempts to make it easier to generate
26871 HTML/XML from a Python program in an intuitive, lightweight, customizable and
26872 pythonic way.")
26873 (license license:expat)))
26874
26875 (define-public python-tablib
26876 (package
26877 (name "python-tablib")
26878 (version "3.0.0")
26879 (source
26880 (origin
26881 (method url-fetch)
26882 (uri (pypi-uri "tablib" version))
26883 (sha256
26884 (base32 "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q"))))
26885 (build-system python-build-system)
26886 (arguments
26887 '(#:phases
26888 (modify-phases %standard-phases
26889 (replace 'check
26890 (lambda* (#:key tests? #:allow-other-keys)
26891 (when tests?
26892 (setenv "PYTHONPATH"
26893 (string-append (getcwd) "/build/lib:"
26894 (getenv "PYTHONPATH")))
26895 (invoke "pytest")))))))
26896 (native-inputs
26897 `(("python-pandas" ,python-pandas) ;; required for test-suite
26898 ("python-pytest" ,python-pytest)
26899 ("python-pytest-cov" ,python-pytest-cov)
26900 ("python-setuptools-scm" ,python-setuptools-scm)))
26901 (propagated-inputs
26902 `(("python-markuppy" ,python-markuppy)
26903 ("python-odfpy" ,python-odfpy)
26904 ("python-openpyxl" ,python-openpyxl)
26905 ("python-pyyaml" ,python-pyyaml)
26906 ("python-tabulate" ,python-tabulate)
26907 ("python-xlrd" ,python-xlrd)
26908 ("python-xlwt" ,python-xlwt)))
26909 (home-page "https://tablib.readthedocs.io")
26910 (synopsis "Format agnostic tabular data library")
26911 (description "@code{tablib} is a format-agnostic tabular dataset library,
26912 written in Python. Supported output formats are Excel (Sets + Books),
26913 JSON (Sets + Books), YAML (Sets + Books), HTML (Sets), Jira (Sets),
26914 TSV (Sets), ODS (Sets), CSV (Sets), and DBF (Sets).
26915
26916 @code{tablib} also supports Pandas DataFrames (Sets). Anyhow, since pandas is
26917 quite huge, this Guix package doesn't depend on pandas. In case, just also
26918 install @code{python-pandas}.")
26919 (license license:expat)))
26920
26921 (define-public python-csb43
26922 (package
26923 (name "python-csb43")
26924 (version "0.9.1")
26925 (source
26926 (origin
26927 (method url-fetch)
26928 (uri (pypi-uri "csb43" version))
26929 (sha256
26930 (base32 "0r0csl9npncnkfafg3rg6xr38d1qr0sxvq7wn7mg9bq41hvvh1si"))))
26931 (build-system python-build-system)
26932 (native-inputs
26933 `(("python-lxml" ,python-lxml)))
26934 (propagated-inputs
26935 `(("python-pycountry" ,python-pycountry)
26936 ("python-pyyaml" ,python-pyyaml)
26937 ("python-tablib" ,python-tablib)))
26938 (home-page "https://bitbucket.org/wmj/csb43")
26939 (synopsis "Tools for converting from the Spanish banks' format CSB norm
26940 43 (CSB43)")
26941 (description "This package provides tools to convert files in the format
26942 used by multiple Spanish banks (standard 43 of the Spanish Banking Council
26943 [CSB43] / Spanish Banking Association [AEB43]) to other formats.
26944
26945 Supported output formats are: OFX, HomeBank CSV, HTML, JSON, ODS (OpenDocument
26946 spreadsheet), CSV, TSV, XLS, XLSX (Microsoft Excel spreadsheet), and YAML.")
26947 (license license:lgpl3)))
26948
26949 (define-public python-febelfin-coda
26950 (package
26951 (name "python-febelfin-coda")
26952 (version "0.1.0")
26953 (source
26954 (origin
26955 (method url-fetch)
26956 (uri (pypi-uri "febelfin-coda" version))
26957 (sha256
26958 (base32 "10nf4hdwldqgdmh4g613vx55sbsw1x1yzpvs3crwlggbp75fjjfi"))))
26959 (build-system python-build-system)
26960 (home-page "https://coda.b2ck.com/")
26961 (synopsis "A module to parse Belgian CODA files")
26962 (description "This package provides a module to parse Coded statement of
26963 account (CODA) files as defined be the Belgian Febelfin bank standard.")
26964 (license license:bsd-3)))
26965
26966 (define-public python-ofxparse
26967 (package
26968 (name "python-ofxparse")
26969 (version "0.21")
26970 (source
26971 (origin
26972 (method url-fetch)
26973 (uri (pypi-uri "ofxparse" version))
26974 (sha256
26975 (base32 "19y4sp5l9jqiqzzlbqdfiab42qx7d84n4xm4s7jfq397666vcyh5"))))
26976 (build-system python-build-system)
26977 (arguments
26978 '(#:phases
26979 (modify-phases %standard-phases
26980 (replace 'check
26981 (lambda* (#:key tests? #:allow-other-keys)
26982 (when tests?
26983 (invoke "nosetests" "-v")))))))
26984 (native-inputs
26985 `(("python-nose" ,python-nose)))
26986 (propagated-inputs
26987 `(("python-beautifulsoup4" ,python-beautifulsoup4)
26988 ("python-lxml" ,python-lxml)
26989 ("python-six" ,python-six)))
26990 (home-page "http://sites.google.com/site/ofxparse")
26991 (synopsis "Tools for working with the OFX (Open Financial Exchange) file
26992 format")
26993 (description "@code{ofxparse} is a parser for Open Financial
26994 Exchange (.ofx) format files. OFX files are available from almost any online
26995 banking site, so they work well if you want to pull together your finances
26996 from multiple sources. Online trading accounts also often provide account
26997 statements in OFX files.")
26998 (license license:expat)))
26999
27000 (define-public python-stripe
27001 (package
27002 (name "python-stripe")
27003 (version "2.60.0")
27004 (source
27005 (origin
27006 (method url-fetch)
27007 (uri (pypi-uri "stripe" version))
27008 (sha256
27009 (base32 "0258lzh4qikhinfggnlfh5aklcvg7lrvl8giqrh0yf0l61wvfrl9"))))
27010 (build-system python-build-system)
27011 (arguments
27012 '(#:tests? #f)) ;; tests require network
27013 (propagated-inputs
27014 `(("python-requests" ,python-requests)))
27015 (home-page "https://github.com/stripe/stripe-python")
27016 (synopsis "Python bindings for the Stripe financial services' API")
27017 (description "This package provides access to the Stripe financial
27018 services' API. It includes a pre-defined set of classes for API resources
27019 that initialize themselves dynamically from API responses which makes it
27020 compatible with a wide range of versions of the Stripe API.")
27021 (license license:expat)))
27022
27023 (define-public python-platformdirs
27024 (package
27025 (name "python-platformdirs")
27026 (version "2.2.0")
27027 (source
27028 (origin
27029 (method url-fetch)
27030 (uri (pypi-uri "platformdirs" version))
27031 (sha256
27032 (base32 "07hq5qrp7pqj63iczg01wbf5ii6f0ncd0dq5mzkdhsslmg9slbb3"))))
27033 (build-system python-build-system)
27034 (native-inputs
27035 `(("python-appdirs" ,python-appdirs)
27036 ("python-pytest" ,python-pytest)
27037 ("python-pytest-cov" ,python-pytest-cov)
27038 ("python-pytest-mock" ,python-pytest-mock)))
27039 (home-page "https://github.com/platformdirs/platformdirs")
27040 (synopsis "Determine the appropriate platform-specific directories")
27041 (description "When writing applications, finding the right location to
27042 store user data and configuration varies per platform. Even for
27043 single-platform apps, there may by plenty of nuances in figuring out the right
27044 location. This small Python module determines the appropriate
27045 platform-specific directories, e.g. the ``user data dir''.")
27046 (license license:expat)))
27047
27048 (define-public python-box
27049 (package
27050 (name "python-box")
27051 (version "5.3.0")
27052 (source
27053 (origin
27054 (method url-fetch)
27055 (uri (pypi-uri "python-box" version))
27056 (sha256
27057 (base32
27058 "0jhrdif57khx2hsw1q6a9x42knwcvq8ijgqyq1jmll6y6ifyzm2f"))))
27059 (build-system python-build-system)
27060 (propagated-inputs
27061 `(("python-msgpack" ,python-msgpack)
27062 ("python-ruamel.yaml" ,python-ruamel.yaml)
27063 ("python-toml" ,python-toml)))
27064 (home-page "https://github.com/cdgriffith/Box")
27065 (synopsis "Advanced Python dictionaries with dot notation access")
27066 (description
27067 "This package provides the @code{python-box} Python module.
27068 It implements advanced Python dictionaries with dot notation access.")
27069 (license license:expat)))