181729b2bbbdd3b45348f292077eef0ef4871d5e
[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 Christopher Allan 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 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
103 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
104 ;;; Copyright © 2021 jgart <jgart@dismail.de>
105 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
106 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
107 ;;;
108 ;;; This file is part of GNU Guix.
109 ;;;
110 ;;; GNU Guix is free software; you can redistribute it and/or modify it
111 ;;; under the terms of the GNU General Public License as published by
112 ;;; the Free Software Foundation; either version 3 of the License, or (at
113 ;;; your option) any later version.
114 ;;;
115 ;;; GNU Guix is distributed in the hope that it will be useful, but
116 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
117 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118 ;;; GNU General Public License for more details.
119 ;;;
120 ;;; You should have received a copy of the GNU General Public License
121 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
122
123 (define-module (gnu packages python-xyz)
124 #:use-module ((guix licenses) #:prefix license:)
125 #:use-module (gnu packages)
126 #:use-module (gnu packages algebra)
127 #:use-module (gnu packages adns)
128 #:use-module (gnu packages aidc)
129 #:use-module (gnu packages attr)
130 #:use-module (gnu packages backup)
131 #:use-module (gnu packages bash)
132 #:use-module (gnu packages check)
133 #:use-module (gnu packages cmake)
134 #:use-module (gnu packages compression)
135 #:use-module (gnu packages crypto)
136 #:use-module (gnu packages databases)
137 #:use-module (gnu packages dbm)
138 #:use-module (gnu packages djvu)
139 #:use-module (gnu packages docker)
140 #:use-module (gnu packages enchant)
141 #:use-module (gnu packages file)
142 #:use-module (gnu packages fontutils)
143 #:use-module (gnu packages gcc)
144 #:use-module (gnu packages geo)
145 #:use-module (gnu packages ghostscript)
146 #:use-module (gnu packages gl)
147 #:use-module (gnu packages glib)
148 #:use-module (gnu packages gnome)
149 #:use-module (gnu packages gnupg)
150 #:use-module (gnu packages graphviz)
151 #:use-module (gnu packages graphics)
152 #:use-module (gnu packages gsasl)
153 #:use-module (gnu packages gstreamer)
154 #:use-module (gnu packages gtk)
155 #:use-module (gnu packages haskell-xyz)
156 #:use-module (gnu packages icu4c)
157 #:use-module (gnu packages image)
158 #:use-module (gnu packages imagemagick)
159 #:use-module (gnu packages jupyter)
160 #:use-module (gnu packages kerberos)
161 #:use-module (gnu packages libevent)
162 #:use-module (gnu packages libffi)
163 #:use-module (gnu packages libidn)
164 #:use-module (gnu packages linux)
165 #:use-module (gnu packages llvm)
166 #:use-module (gnu packages man)
167 #:use-module (gnu packages markup)
168 #:use-module (gnu packages maths)
169 #:use-module (gnu packages monitoring)
170 #:use-module (gnu packages multiprecision)
171 #:use-module (gnu packages networking)
172 #:use-module (gnu packages ncurses)
173 #:use-module (gnu packages openstack)
174 #:use-module (gnu packages pcre)
175 #:use-module (gnu packages pdf)
176 #:use-module (gnu packages perl)
177 #:use-module (gnu packages photo)
178 #:use-module (gnu packages pkg-config)
179 #:use-module (gnu packages python)
180 #:use-module (gnu packages python-build)
181 #:use-module (gnu packages python-check)
182 #:use-module (gnu packages python-compression)
183 #:use-module (gnu packages python-crypto)
184 #:use-module (gnu packages python-science)
185 #:use-module (gnu packages python-web)
186 #:use-module (gnu packages qt)
187 #:use-module (gnu packages rdf)
188 #:use-module (gnu packages readline)
189 #:use-module (gnu packages regex)
190 #:use-module (gnu packages sdl)
191 #:use-module (gnu packages search)
192 #:use-module (gnu packages scanner)
193 #:use-module (gnu packages shells)
194 #:use-module (gnu packages sphinx)
195 #:use-module (gnu packages ssh)
196 #:use-module (gnu packages swig)
197 #:use-module (gnu packages terminals)
198 #:use-module (gnu packages tex)
199 #:use-module (gnu packages texinfo)
200 #:use-module (gnu packages textutils)
201 #:use-module (gnu packages time)
202 #:use-module (gnu packages tls)
203 #:use-module (gnu packages version-control)
204 #:use-module (gnu packages video)
205 #:use-module (gnu packages web)
206 #:use-module (gnu packages wxwidgets)
207 #:use-module (gnu packages base)
208 #:use-module (gnu packages xml)
209 #:use-module (gnu packages xorg)
210 #:use-module (gnu packages xdisorg)
211 #:use-module (gnu packages tcl)
212 #:use-module (gnu packages bdw-gc)
213 #:use-module (gnu packages serialization)
214 #:use-module (guix packages)
215 #:use-module (guix download)
216 #:use-module (guix git-download)
217 #:use-module (guix hg-download)
218 #:use-module (guix utils)
219 #:use-module (guix build-system gnu)
220 #:use-module (guix build-system cmake)
221 #:use-module (guix build-system python)
222 #:use-module (guix build-system trivial)
223 #:use-module (srfi srfi-1)
224 #:use-module (srfi srfi-26))
225
226 (define-public python-ueberzug
227 (package
228 (name "python-ueberzug")
229 (version "18.1.9")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (pypi-uri "ueberzug" version))
234 (sha256
235 (base32
236 "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
237 (build-system python-build-system)
238 (inputs
239 `(("libx11" ,libx11)
240 ("libxext" ,libxext)))
241 (propagated-inputs
242 `(("python-attrs" ,python-attrs)
243 ("python-docopt" ,python-docopt)
244 ("python-pillow" ,python-pillow)
245 ("python-xlib" ,python-xlib)))
246 (home-page "https://github.com/seebye/ueberzug")
247 (synopsis "Command line util to display images in combination with X11")
248 (description "Überzug is a command line util which allows to draw images on
249 terminals by using child windows. The advantages of using Überzug are:
250 @itemize
251 @item No race conditions as a new window is created to display images.
252 @item Expose events will be processed, so images will be redrawn on switch
253 workspaces.
254 @item Tmux support (excluding multi pane windows).
255 @item Terminals without the WINDOWID environment variable are supported.
256 @item Chars are used as position - and size unit.
257 @item No memory leak (/ unlimited cache).
258 @end itemize")
259 (license license:gpl3+)))
260
261 (define-public python-fire
262 (package
263 (name "python-fire")
264 (version "0.4.0")
265 (source
266 (origin
267 (method url-fetch)
268 (uri (pypi-uri "fire" version))
269 (sha256
270 (base32
271 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
272 (build-system python-build-system)
273 (native-inputs
274 `(("python-pytest", python-pytest)))
275 (arguments
276 '(#:phases
277 (modify-phases %standard-phases
278 (replace 'check
279 (lambda* (#:key tests? #:allow-other-keys)
280 (when tests?
281 (invoke "pytest")))))))
282 (inputs
283 `(("python-six", python-six)
284 ("python-termcolor", python-termcolor)))
285 (synopsis "Library for automatically generating command line interfaces")
286 (description
287 "Fire is a library for automatically generating command line interfaces
288 from absolutely any Python object. The following are the advantages:
289 @itemize
290 @item A simple way to create a CLI in Python.
291 @item A helpful tool for developing and debugging Python code.
292 @item Helps with exploring existing code or turning other people's code into a
293 command line interface.
294 @item Makes transitioning between Bash and Python easier.
295 @item Makes using a Python REPL easier by setting up the REPL with the modules
296 and variables you'll need already imported and created.
297 @end itemize")
298 (home-page "https://github.com/google/python-fire")
299 (license license:asl2.0)))
300
301 (define-public python-twodict
302 (package
303 (name "python-twodict")
304 (version "1.2")
305 (source
306 (origin
307 (method url-fetch)
308 (uri (pypi-uri "twodict" version))
309 (sha256
310 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
311 (build-system python-build-system)
312 (home-page "https://github.com/MrS0m30n3/twodict")
313 (synopsis "Two way ordered dictionary for Python")
314 (description "TwoDict is a custom dictionary in which you can get the
315 key:value relationship but you can also get the value:key relationship. It also
316 remembers the order in which the items were inserted and supports almost all the
317 features of the Python's built-in dict.")
318 (license license:unlicense)))
319
320 (define-public python2-twodict
321 (package
322 (inherit python-twodict)
323 (name "python2-twodict")
324 (version "1.2")
325 (source
326 (origin
327 (method url-fetch)
328 (uri (pypi-uri "twodict" version))
329 (sha256
330 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
331 (build-system python-build-system)
332 (arguments
333 `(#:python ,python-2))))
334
335 (define-public python-argopt
336 (package
337 (name "python-argopt")
338 (version "0.7.0")
339 (source (origin
340 (method url-fetch)
341 (uri (pypi-uri "argopt" version))
342 (sha256
343 (base32
344 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
345 (build-system python-build-system)
346 (native-inputs
347 `(("python-coverage" ,python-coverage)
348 ("python-nose" ,python-nose)
349 ("python-setuptools" ,python-setuptools) ; Won't build without this.
350 ("python-setuptools-scm" ,python-setuptools-scm)))
351 (propagated-inputs
352 `(("python-toml" ,python-toml)
353 ("python-flake8" ,python-flake8)))
354 (home-page "https://github.com/casperdcl/argopt")
355 (synopsis "Generate a command-line interface from a docstring")
356 (description "This package provides tools to define a command line interface
357 from a docstring rather than the other way around.")
358 (license license:mpl2.0)))
359
360 (define-public python-cachetools
361 (package
362 (name "python-cachetools")
363 (version "4.2.2")
364 (source (origin
365 (method url-fetch)
366 (uri (pypi-uri "cachetools" version))
367 (sha256
368 (base32
369 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
370 (build-system python-build-system)
371 (home-page "https://github.com/tkem/cachetools/")
372 (synopsis "Extensible memoizing collections and decorators")
373 (description "This module provides various memoizing collections and
374 decorators, including variants of the Python standard library's
375 @code{lru_cache} function decorator.")
376 (license license:expat)))
377
378 (define-public python-colorful
379 (package
380 (name "python-colorful")
381 (version "0.5.4")
382 (source
383 (origin
384 (method url-fetch)
385 (uri
386 (pypi-uri "colorful" version))
387 (sha256
388 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
389 (build-system python-build-system)
390 ;; FIXME: tests cannot be computed:
391 ;; "Can't perform this operation for unregistered loader type"
392 (arguments
393 `(#:tests? #f))
394 (native-inputs
395 `(("python-coverage" ,python-coverage)
396 ("python-flake8" ,python-flake8)
397 ("python-pytest" ,python-pytest)))
398 (propagated-inputs
399 `(("python-colorama" ,python-colorama)))
400 (home-page "http://github.com/timofurrer/colorful")
401 (synopsis "Terminal string styling")
402 (description "Colorful provides an array of text styles, that can be used
403 as functions or string constants to form colored terminal output.")
404 (license license:expat)))
405
406 (define-public python-yaspin
407 (package
408 (name "python-yaspin")
409 (version "1.5.0")
410 (source
411 (origin
412 (method url-fetch)
413 (uri
414 (pypi-uri "yaspin" version))
415 (sha256
416 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
417 (build-system python-build-system)
418 (native-inputs
419 `(("python-pytest" ,python-pytest)))
420 (home-page "https://github.com/pavdmyt/yaspin")
421 (synopsis "Yet Another Terminal Spinner")
422 (description "Yaspin provides a terminal spinner to indicate the progress
423 during long operations.")
424 (license license:expat)))
425
426 (define-public python-lunr
427 (package
428 (name "python-lunr")
429 (version "0.6.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri
434 (pypi-uri "lunr" version))
435 (sha256
436 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
437 (build-system python-build-system)
438 (native-inputs
439 `(("python-mock" ,python-mock)
440 ("python-pytest" ,python-pytest)))
441 (propagated-inputs
442 `(("python-nltk" ,python-nltk-3.4)))
443 (home-page
444 "https://github.com/yeraydiazdiaz/lunr.py")
445 (synopsis "Full-text search library")
446 (description "This package provides python library for full-text search.
447 It indexes documents and provides a search interface for retrieving documents
448 that best match text queries.")
449 (license license:expat)))
450
451 (define-public python-mkdocs
452 (package
453 (name "python-mkdocs")
454 (version "1.1.2")
455 (source
456 (origin
457 (method url-fetch)
458 (uri
459 (pypi-uri "mkdocs" version))
460 (sha256
461 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
462 (build-system python-build-system)
463 (arguments
464 `(#:phases
465 (modify-phases %standard-phases
466 ;; Requirements refer to a specific version of dependencies,
467 ;; which are too old. So we patch to refer to any later version.
468 (add-after 'unpack 'patch-requirements
469 (lambda _
470 (substitute* "setup.py"
471 (("==") ">=")))))))
472 (propagated-inputs
473 `(("python-click" ,python-click)
474 ("python-jinja2" ,python-jinja2)
475 ("python-livereload" ,python-livereload)
476 ("python-lunr" ,python-lunr)
477 ("python-markdown" ,python-markdown)
478 ("python-pyyaml" ,python-pyyaml)
479 ("python-tornado" ,python-tornado)))
480 (home-page "https://www.mkdocs.org")
481 (synopsis "Project documentation with Markdown")
482 (description "MkDocs is a static site generator geared towards building
483 project documentation. Documentation source files are written in Markdown, and
484 configured with a single YAML configuration file.")
485 (license license:bsd-3)))
486
487 (define-public python-pymdown-extensions
488 (package
489 (name "python-pymdown-extensions")
490 (version "8.1.1")
491 (source
492 (origin
493 (method url-fetch)
494 (uri
495 (pypi-uri "pymdown-extensions" version))
496 (sha256
497 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
498 (build-system python-build-system)
499 ;; FIXME: "AssertionError: False is not true"
500 (arguments
501 `(#:tests? #f))
502 (propagated-inputs
503 `(("python-markdown" ,python-markdown)))
504 (home-page "https://github.com/facelessuser/pymdown-extensions")
505 (synopsis "Extension pack for Python Markdown")
506 (description "PyMdown Extensions is a collection of extensions for Python
507 Markdown. All extensions are found under the module namespace of pymdownx.")
508 (license license:expat)))
509
510 (define-public python-mkdocs-material
511 (package
512 (name "python-mkdocs-material")
513 (version "7.1.3")
514 (source
515 (origin
516 (method url-fetch)
517 (uri
518 (pypi-uri "mkdocs-material" version))
519 (sha256
520 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
521 (build-system python-build-system)
522 (arguments
523 `(#:phases
524 (modify-phases %standard-phases
525 ;; Requirement mkdocs-material-extensions
526 ;; in-turn requires mkdocs-material. This causes
527 ;; circular dependency, so we remove this requirement.
528 (add-after 'unpack 'patch-requirements
529 (lambda _
530 (substitute* "requirements.txt"
531 (("mkdocs-material-extensions.*$") "")))))))
532 (propagated-inputs
533 `(("python-markdown" ,python-markdown)
534 ("python-mkdocs" ,python-mkdocs)
535 ("python-pygments" ,python-pygments)
536 ("python-pymdown-extensions"
537 ,python-pymdown-extensions)))
538 (home-page "https://squidfunk.github.io/mkdocs-material/")
539 (synopsis "Material Design theme for MkDocs")
540 (description "This package provides a theme plugin for the static site
541 generator MkDocs.")
542 (license license:expat)))
543
544 (define-public python-slixmpp
545 (package
546 (name "python-slixmpp")
547 (version "1.5.2")
548 (source
549 (origin
550 (method git-fetch)
551 (uri
552 (git-reference
553 (url "https://lab.louiz.org/poezio/slixmpp.git")
554 (commit
555 (string-append "slix-" version))))
556 (file-name
557 (git-file-name name version))
558 (sha256
559 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
560 (build-system python-build-system)
561 (arguments
562 `(#:phases
563 (modify-phases %standard-phases
564 (add-after 'unpack 'patch
565 (lambda _
566 (substitute* "setup.py"
567 (("'CC', 'cc'")
568 "'CC', 'gcc'"))
569 #t)))))
570 (native-inputs
571 `(("cython" ,python-cython)
572 ("gnupg" ,gnupg)
573 ("pkg-config" ,pkg-config)))
574 (propagated-inputs
575 `(("python-aiodns" ,python-aiodns)
576 ("python-aiohttp" ,python-aiohttp)
577 ("python-pyasn1" ,python-pyasn1)
578 ("python-pyasn1-modules" ,python-pyasn1-modules)))
579 (inputs
580 `(("libidn" ,libidn)
581 ("python" ,python))) ; We are building a Python extension.
582 (synopsis "XMPP library without threads")
583 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
584 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
585 socket handling, the timers, the events dispatching) in order to remove all
586 threads.")
587 (home-page "https://lab.louiz.org/poezio/slixmpp")
588 (license license:expat)))
589
590 (define-public python-tenacity
591 (package
592 (name "python-tenacity")
593 (version "6.1.0")
594 (source (origin
595 (method url-fetch)
596 (uri (pypi-uri "tenacity" version))
597 (sha256
598 (base32
599 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
600 (build-system python-build-system)
601 (native-inputs
602 `(("python-setuptools-scm" ,python-setuptools-scm)
603 ("python-sphinx" ,python-sphinx)
604 ("python-tornado" ,python-tornado)
605 ("python-pytest" ,python-pytest)))
606 (propagated-inputs
607 `(("python-six" ,python-six)))
608 (arguments
609 `(#:phases (modify-phases %standard-phases
610 (replace 'check
611 (lambda _
612 (invoke "pytest")
613 #t)))))
614 (home-page "https://github.com/jd/tenacity")
615 (synopsis "Retrying library for python")
616 (description "Tenacity is a general-purpose python library to simplify the
617 task of adding retry behavior to just about anything.")
618 (license license:asl2.0)))
619
620 (define-public python-pytelegrambotapi
621 (package
622 (name "python-pytelegrambotapi")
623 (version "3.7.4")
624 (source
625 (origin
626 (method git-fetch)
627 (uri (git-reference
628 (url "https://github.com/eternnoir/pyTelegramBotAPI")
629 (commit version)))
630 (file-name (git-file-name name version))
631 (sha256
632 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
633 (build-system python-build-system)
634 (arguments
635 `(#:phases
636 (modify-phases %standard-phases
637 (replace 'check
638 (lambda* (#:key tests? #:allow-other-keys)
639 (when tests?
640 (with-directory-excursion "tests"
641 (invoke "py.test")))
642 #t)))))
643 (propagated-inputs
644 `(("python-requests" ,python-requests)))
645 (native-inputs
646 `(("python-pytest" ,python-pytest)))
647 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
648 (synopsis "Python Telegram bot api")
649 (description "This package provides a simple, but extensible Python
650 implementation for the Telegram Bot API.")
651 (license license:gpl2)))
652
653 (define-public python-colorlog
654 (package
655 (name "python-colorlog")
656 (version "4.1.0")
657 (source (origin
658 (method url-fetch)
659 (uri (pypi-uri "colorlog" version))
660 (sha256
661 (base32
662 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
663 (build-system python-build-system)
664 (native-inputs
665 `(("python-pytest" ,python-pytest)))
666 (arguments
667 `(#:phases (modify-phases %standard-phases
668 (replace 'check
669 (lambda _
670 ;; Extend PYTHONPATH so the built package will be found.
671 (setenv "PYTHONPATH"
672 (string-append (getcwd) "/build/lib:"
673 (getenv "PYTHONPATH")))
674 (invoke "pytest" "-p" "no:logging")
675 #t)))))
676 (home-page "https://github.com/borntyping/python-colorlog")
677 (synopsis "Log formatting with colors for python")
678 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
679 with Python's logging module that outputs records using terminal colors.")
680 (license license:expat)))
681
682 (define-public python-pyprind
683 (package
684 (name "python-pyprind")
685 (version "2.11.3")
686 (source (origin
687 (method url-fetch)
688 (uri (pypi-uri "PyPrind" version))
689 (sha256
690 (base32
691 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
692 (build-system python-build-system)
693 (propagated-inputs
694 `(("python-psutil" ,python-psutil)))
695 (home-page "https://github.com/rasbt/pyprind")
696 (synopsis "Python Progress Bar and Percent Indicator Utility")
697 (description "The PyPrind (Python Progress Indicator) module provides a
698 progress bar and a percentage indicator object that let you track the progress
699 of a loop structure or other iterative computation.")
700 (license license:bsd-3)))
701
702 (define-public python-gphoto2
703 (package
704 (name "python-gphoto2")
705 (version "2.2.1")
706 (source (origin
707 (method url-fetch)
708 (uri (pypi-uri "gphoto2" version))
709 (sha256
710 (base32
711 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
712 (build-system python-build-system)
713 (native-inputs
714 `(("pkg-config" ,pkg-config)))
715 (inputs
716 `(("libgphoto2" ,libgphoto2)))
717 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
718 (synopsis "Python interface to libgphoto2")
719 (description "@code{python-gphoto2} is a comprehensive Python interface
720 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
721 automatically generate the interface code.")
722 (license license:gpl3+)))
723
724 (define-public python-colour
725 (package
726 (name "python-colour")
727 (version "0.1.5")
728 (source (origin
729 (method url-fetch)
730 (uri (pypi-uri "colour" version))
731 (sha256
732 (base32
733 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
734 (build-system python-build-system)
735 (native-inputs
736 `(("python-d2to1" ,python-d2to1)))
737 (home-page "https://github.com/vaab/colour")
738 (synopsis "Convert and manipulate various color representations")
739 (description "Pythonic way to manipulate color representations (HSL, RVB,
740 web, X11, ...).")
741 (license license:expat)))
742
743 (define-public python-d2to1
744 (package
745 (name "python-d2to1")
746 (version "0.2.12.post1")
747 (source (origin
748 (method url-fetch)
749 (uri (pypi-uri "d2to1" version))
750 (sha256
751 (base32
752 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
753 (build-system python-build-system)
754 (native-inputs
755 `(("python-nose" ,python-nose)))
756 (home-page "https://github.com/embray/d2to1")
757 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
758 in python")
759 (description "The python package d2to1 (the d is for distutils) allows
760 using distutils2-like setup.cfg files for a package's metadata with a
761 distribute/setuptools setup.py script.")
762 (license license:bsd-2)))
763
764 (define-public python-rawkit
765 (package
766 (name "python-rawkit")
767 (version "0.6.0")
768 (source (origin
769 (method url-fetch)
770 (uri (pypi-uri "rawkit" version))
771 (sha256
772 (base32
773 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
774 (build-system python-build-system)
775 (native-inputs
776 `(("python-pytest" ,python-pytest)
777 ("python-mock" ,python-mock)))
778 (inputs
779 `(("libraw" ,libraw)))
780 (home-page "https://rawkit.readthedocs.io")
781 (synopsis "Ctypes-based LibRaw binding for Python")
782 (description "The rawkit package provides two modules: rawkit and libraw.
783 The rawkit module provides a high-level Pythonic interface for developing raw
784 photos, while the libraw module provides a CTypes based interface for
785 interacting with the low-level LibRaw C APIs.")
786 (license license:expat)))
787
788 (define-public python-easygui
789 (package
790 (name "python-easygui")
791 (version "0.98.1")
792 (source (origin
793 (method url-fetch)
794 (uri (pypi-uri "easygui" version))
795 (sha256
796 (base32
797 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
798 (build-system python-build-system)
799 (propagated-inputs
800 `(("python-tkinter" ,python "tk")))
801 (home-page "https://github.com/robertlugg/easygui")
802 (synopsis "GUI programming module for Python")
803 (description "EasyGUI is a module for very simple, very easy GUI
804 programming in Python. EasyGUI is different from other GUI generators in that
805 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
806 simple function calls.")
807 (license license:bsd-3)))
808
809 (define-public python-pymd4c
810 (package
811 (name "python-pymd4c")
812 (version "0.4.6.0b1")
813 (source
814 (origin
815 (method url-fetch)
816 (uri (pypi-uri "pymd4c" version))
817 (sha256
818 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
819 (build-system python-build-system)
820 (inputs
821 `(("md4c" ,md4c)))
822 (native-inputs
823 `(("python-flake8" ,python-flake8)
824 ("python-pkgconfig" ,python-pkgconfig)
825 ("pkg-config" ,pkg-config)))
826 (home-page "https://github.com/dominickpastore/pymd4c")
827 (synopsis "Python bindings for MD4C")
828 (description
829 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
830 to CommonMark.")
831 (license license:expat)))
832
833 (define-public python-pymediainfo
834 (package
835 (name "python-pymediainfo")
836 (version "4.1")
837 (source
838 (origin
839 (method url-fetch)
840 (uri (pypi-uri "pymediainfo" version))
841 (sha256
842 (base32
843 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
844 (build-system python-build-system)
845 (native-inputs
846 `(("python-setuptools-scm" ,python-setuptools-scm)
847 ("python-pytest" ,python-pytest)))
848 (inputs
849 `(("libmediainfo" ,libmediainfo)))
850 (arguments
851 `(#:phases
852 (modify-phases %standard-phases
853 (add-after 'unpack 'patch-libmediainfo
854 (lambda _
855 (substitute* "pymediainfo/__init__.py"
856 (("libmediainfo.so.0")
857 (string-append (assoc-ref %build-inputs "libmediainfo")
858 "/lib/libmediainfo.so.0")))
859 #t))
860 (replace 'check
861 (lambda* (#:key tests? #:allow-other-keys)
862 (when tests?
863 ;; Extend PYTHONPATH so the built package will be found.
864 (setenv "PYTHONPATH"
865 (string-append (getcwd) "/build/lib:"
866 (getenv "PYTHONPATH")))
867 ;; Skip the only failing test "test_parse_url"
868 (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
869 (home-page
870 "https://github.com/sbraz/pymediainfo")
871 (synopsis
872 "Python wrapper for the mediainfo library")
873 (description
874 "Python wrapper for the mediainfo library to access the technical and tag
875 data for video and audio files.")
876 (license license:expat)))
877
878 (define-public python-psutil
879 (package
880 (name "python-psutil")
881 (version "5.8.0")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (pypi-uri "psutil" version))
886 (sha256
887 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
888 (build-system python-build-system)
889 (arguments
890 ;; FIXME: some tests do not return and time out. Some tests fail because
891 ;; some processes survive kill().
892 '(#:tests? #f))
893 (home-page "https://github.com/giampaolo/psutil")
894 (synopsis "Library for retrieving information on running processes")
895 (description
896 "@code{psutil} (Python system and process utilities) is a library for
897 retrieving information on running processes and system utilization (CPU,
898 memory, disks, network) in Python. It is useful mainly for system monitoring,
899 profiling and limiting process resources and management of running processes.
900 It implements many functionalities offered by command line tools such as: ps,
901 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
902 iotop, uptime, pidof, tty, taskset, pmap.")
903 (properties `((python2-variant . ,(delay python2-psutil))))
904 (license license:bsd-3)))
905
906 (define-public python2-psutil
907 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
908 (package/inherit base
909 (propagated-inputs
910 `(("python2-enum34" ,python2-enum34) ;optional
911 ,@(package-propagated-inputs base))))))
912
913 (define-public python-shapely
914 (package
915 (name "python-shapely")
916 (version "1.7.1")
917 (source
918 (origin
919 (method url-fetch)
920 (uri (pypi-uri "Shapely" version))
921 (sha256
922 (base32
923 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
924 (modules '((guix build utils)))
925 (snippet
926 '(begin
927 (delete-file "shapely/speedups/_speedups.c")
928 (delete-file "shapely/vectorized/_vectorized.c")
929 #t))))
930 (build-system python-build-system)
931 (native-inputs
932 `(("python-cython" ,python-cython)
933 ("python-matplotlib" ,python-matplotlib)
934 ("python-pytest" ,python-pytest)
935 ("python-pytest-cov" ,python-pytest-cov)))
936 (inputs
937 `(("geos" ,geos)))
938 (propagated-inputs
939 `(("python-numpy" ,python-numpy)))
940 (arguments
941 `(#:phases
942 (modify-phases %standard-phases
943 (add-after 'unpack 'patch-geos-path
944 (lambda* (#:key inputs #:allow-other-keys)
945 (let ((geos (assoc-ref inputs "geos"))
946 (glibc (assoc-ref inputs ,(if (%current-target-system)
947 "cross-libc" "libc"))))
948 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
949 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
950 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
951 geos "/lib/libgeos_c.so'])"))
952 (("free = load_dll\\('c'\\)\\.free")
953 (string-append "free = load_dll('c', fallbacks=['"
954 glibc "/lib/libc.so.6']).free"))
955 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
956 (string-append "free = load_dll('c', fallbacks=['"
957 glibc "/lib/libc.so.6']).free"))))
958 #t)))))
959 (home-page "https://github.com/Toblerity/Shapely")
960 (synopsis "Library for the manipulation and analysis of geometric objects")
961 (description "Shapely is a Python package for manipulation and analysis of
962 planar geometric objects. It is based on the @code{GEOS} library.")
963 (license license:bsd-3)))
964
965 (define-public python-shortuuid
966 (package
967 (name "python-shortuuid")
968 (version "0.5.0")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "shortuuid" version))
973 (sha256
974 (base32
975 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
976 (build-system python-build-system)
977 (native-inputs
978 `(("python-pep8" ,python-pep8)))
979 (home-page "https://github.com/skorokithakis/shortuuid")
980 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
981 (description
982 "@code{shortuuid} is a Python library for generating concise, unambiguous
983 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
984 module and then similar looking characters are removed.")
985 (license license:bsd-3)))
986
987 (define-public python-logwrap
988 (package
989 (name "python-logwrap")
990 (version "8.2.0.post0")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "logwrap" version))
995 (sha256
996 (base32
997 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:tests? #f ; Tests not included in pypi release.
1001 #:phases
1002 (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda* (#:key tests? #:allow-other-keys)
1005 (when tests?
1006 (invoke "pytest"))
1007 #t)))))
1008 (native-inputs
1009 `(("python-cython" ,python-cython)
1010 ("python-pytest" ,python-pytest)
1011 ("python-setuptools-scm" ,python-setuptools-scm)
1012 ("python-toml" ,python-toml)
1013 ("python-wheel" ,python-wheel)))
1014 (home-page "https://github.com/python-useful-helpers/logwrap")
1015 (synopsis "Decorator for logging function arguments")
1016 (description "This package provides a decorator to log function arguments
1017 and function call return values in a human-readable way.")
1018 (license license:asl2.0)))
1019
1020 (define-public python-clyent
1021 (package
1022 (name "python-clyent")
1023 (version "1.2.1")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (pypi-uri "clyent" version))
1028 (sha256
1029 (base32
1030 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
1031 (build-system python-build-system)
1032 (native-inputs
1033 `(("python-mock" ,python-mock)))
1034 (home-page "https://github.com/Anaconda-Platform/clyent")
1035 (synopsis "Command line client library")
1036 (description "Clyent is a Python command line utility library. It is used
1037 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1038 (license license:bsd-3)))
1039
1040 (define-public python2-clyent
1041 (package-with-python2 python-clyent))
1042
1043 (define-public python-babel
1044 (package
1045 (name "python-babel")
1046 (version "2.9.0")
1047 (source
1048 (origin
1049 (method url-fetch)
1050 (uri (pypi-uri "Babel" version))
1051 (sha256
1052 (base32
1053 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1054 (build-system python-build-system)
1055 (native-inputs
1056 `(("python-freezegun" ,python-freezegun)
1057 ("python-pytest" ,python-pytest)))
1058 (propagated-inputs
1059 `(("python-pytz" ,python-pytz)))
1060 (arguments
1061 `(#:phases (modify-phases %standard-phases
1062 (replace 'check
1063 (lambda _
1064 (invoke "pytest" "-vv"))))))
1065 (home-page "http://babel.pocoo.org/")
1066 (synopsis
1067 "Tools for internationalizing Python applications")
1068 (description
1069 "Babel is composed of two major parts:
1070 - tools to build and work with gettext message catalogs
1071 - a Python interface to the CLDR (Common Locale Data Repository), providing
1072 access to various locale display names, localized number and date formatting,
1073 etc. ")
1074 (license license:bsd-3)))
1075
1076 (define-public python2-babel
1077 (package-with-python2 python-babel))
1078
1079 (define-public python2-backport-ssl-match-hostname
1080 (package
1081 (name "python2-backport-ssl-match-hostname")
1082 (version "3.5.0.1")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "backports.ssl_match_hostname" version))
1087 (sha256
1088 (base32
1089 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1090 (build-system python-build-system)
1091 (arguments
1092 `(#:python ,python-2
1093 #:tests? #f)) ; no test target
1094 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
1095 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
1096 (description
1097 "This backport brings the ssl.match_hostname() function to users of
1098 earlier versions of Python. The function checks the hostname in the
1099 certificate returned by the server to which a connection has been established,
1100 and verifies that it matches the intended target hostname.")
1101 (license license:psfl)))
1102
1103 (define-public python-bidict
1104 (package
1105 (name "python-bidict")
1106 (version "0.21.2")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (pypi-uri "bidict" version))
1111 (sha256
1112 (base32
1113 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1114 (build-system python-build-system)
1115 (native-inputs
1116 `(("python-coverage" ,python-coverage)
1117 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
1118 ("python-pre-commit" ,python-pre-commit)
1119 ("python-py" ,python-py)
1120 ("python-pytest" ,python-pytest)
1121 ("python-pytest-benchmark" ,python-pytest-benchmark)
1122 ("python-pytest-cov" ,python-pytest-cov)
1123 ("python-setuptools-scm" ,python-setuptools-scm)
1124 ("python-sortedcollections" ,python-sortedcollections)
1125 ("python-sortedcontainers" ,python-sortedcontainers)
1126 ("python-sphinx" ,python-sphinx)
1127 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
1128 ("python-tox" ,python-tox)))
1129 (arguments
1130 `(#:phases (modify-phases %standard-phases
1131 (add-after 'unpack 'relax-reqs
1132 (lambda _
1133 (substitute* "setup.py"
1134 (("sortedcollections < 2") "sortedcollections"))
1135 #t))
1136 (replace 'check
1137 (lambda _ (invoke "./run_tests.py"))))))
1138 (home-page "https://bidict.readthedocs.io")
1139 (synopsis "Bidirectional mapping library")
1140 (description "The @code{bidict} library provides several data structures
1141 for working with bidirectional mappings in Python.")
1142 (license license:mpl2.0)))
1143
1144 (define-public python-bitarray
1145 (package
1146 (name "python-bitarray")
1147 (version "1.4.0")
1148 (source (origin
1149 (method url-fetch)
1150 (uri (pypi-uri "bitarray" version))
1151 (sha256
1152 (base32
1153 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1154 (build-system python-build-system)
1155 (home-page "https://github.com/ilanschnell/bitarray")
1156 (synopsis "Efficient arrays of booleans")
1157 (description "This package provides an object type which efficiently
1158 represents an array of booleans. Bitarrays are sequence types and behave very
1159 much like usual lists. Eight bits are represented by one byte in a contiguous
1160 block of memory. The user can select between two representations:
1161 little-endian and big-endian. All of the functionality is implemented in C.
1162 Methods for accessing the machine representation are provided. This can be
1163 useful when bit level access to binary files is required, such as portable
1164 bitmap image files. Also, when dealing with compressed data which uses
1165 variable bit length encoding, you may find this module useful.")
1166 (license license:psfl)))
1167
1168 (define-public python-boolean.py
1169 (package
1170 (name "python-boolean.py")
1171 (version "3.6")
1172 (source
1173 (origin
1174 ;; There's no source tarball on PyPI.
1175 (method git-fetch)
1176 (uri (git-reference
1177 (url "https://github.com/bastikr/boolean.py")
1178 (commit (string-append "v" version))))
1179 (file-name (git-file-name name version))
1180 (sha256
1181 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1182 (build-system python-build-system)
1183 (home-page "https://github.com/bastikr/boolean.py")
1184 (synopsis "Boolean algebra in one Python module")
1185 (description
1186 "This is a small Python library that implements boolean algebra.
1187 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1188 @code{Symbol} class that can take on one of these two values. Calculations
1189 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1190 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1191 Expressions are constructed from parsed strings or directly in Python.")
1192 (license license:bsd-2)))
1193
1194 (define-public python-hdf4
1195 (package
1196 (name "python-hdf4")
1197 (version "0.9")
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (pypi-uri name version))
1202 (sha256
1203 (base32
1204 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1205 (build-system python-build-system)
1206 (native-inputs `(("nose" ,python-nose)))
1207 (propagated-inputs `(("numpy" ,python-numpy)))
1208 (inputs
1209 `(("hdf4" ,hdf4)
1210 ("libjpeg" ,libjpeg-turbo)
1211 ("zlib" ,zlib)))
1212 (arguments
1213 `(#:phases
1214 (modify-phases %standard-phases
1215 (replace 'check
1216 (lambda _
1217 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
1218 ;; on to import numpy. Somehow this works on their CI system.
1219 ;; Let's just manage PYTHONPATH here instead.
1220 (substitute* "runexamples.sh"
1221 (("export PYTHONPATH=.*") ""))
1222 (setenv "PYTHONPATH"
1223 (string-append (getcwd) ":"
1224 (getenv "PYTHONPATH")))
1225 (invoke "./runexamples.sh")
1226 (invoke "nosetests" "-v"))))))
1227 (home-page "https://github.com/fhs/python-hdf4")
1228 (synopsis "Python interface to the NCSA HDF4 library")
1229 (description
1230 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1231 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1232 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1233 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1234 (license license:expat)))
1235
1236 (define-public python-h5py
1237 (package
1238 (name "python-h5py")
1239 (version "2.10.0")
1240 (source
1241 (origin
1242 (method url-fetch)
1243 (uri (pypi-uri "h5py" version))
1244 (sha256
1245 (base32
1246 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1247 (build-system python-build-system)
1248 (arguments
1249 `(#:tests? #f ; no test target
1250 #:phases
1251 (modify-phases %standard-phases
1252 (add-after 'unpack 'fix-hdf5-paths
1253 (lambda* (#:key inputs #:allow-other-keys)
1254 (let ((prefix (assoc-ref inputs "hdf5")))
1255 (substitute* "setup_build.py"
1256 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1257 (string-append "['" prefix "/lib" "']"))
1258 (("'/opt/local/include', '/usr/local/include'")
1259 (string-append "'" prefix "/include" "'")))
1260 (substitute* "setup_configure.py"
1261 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1262 (string-append "['" prefix "/lib" "']")))
1263 #t))))))
1264 (propagated-inputs
1265 `(("python-six" ,python-six)
1266 ("python-numpy" ,python-numpy)))
1267 (inputs
1268 `(("hdf5" ,hdf5-1.10)))
1269 (native-inputs
1270 `(("python-cython" ,python-cython)
1271 ("python-pkgconfig" ,python-pkgconfig)
1272 ("pkg-config" ,pkg-config)))
1273 (home-page "https://www.h5py.org/")
1274 (synopsis "Read and write HDF5 files from Python")
1275 (description
1276 "The h5py package provides both a high- and low-level interface to the
1277 HDF5 library from Python. The low-level interface is intended to be a
1278 complete wrapping of the HDF5 API, while the high-level component supports
1279 access to HDF5 files, datasets and groups using established Python and NumPy
1280 concepts.")
1281 (license license:bsd-3)))
1282
1283 (define-public python2-h5py
1284 (package-with-python2 python-h5py))
1285
1286 (define-public python-pyls-black
1287 (package
1288 (name "python-pyls-black")
1289 (version "0.4.6")
1290 (source
1291 (origin
1292 ;; There are no tests in the PyPI tarball.
1293 (method git-fetch)
1294 (uri (git-reference
1295 (url "https://github.com/rupert/pyls-black/")
1296 (commit (string-append "v" version))))
1297 (file-name (git-file-name name version))
1298 (sha256
1299 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1300 (build-system python-build-system)
1301 (arguments
1302 `(#:test-target "pytest"))
1303 (propagated-inputs
1304 `(("python-black" ,python-black)
1305 ("python-language-server"
1306 ,python-language-server)
1307 ("python-toml" ,python-toml)))
1308 (native-inputs
1309 `(("python-flake8" ,python-flake8)
1310 ("python-isort" ,python-isort)
1311 ("python-mypy" ,python-mypy)
1312 ("python-pytest" ,python-pytest)
1313 ("python-pytest-runner" ,python-pytest-runner)))
1314 (home-page "https://github.com/rupert/pyls-black")
1315 (synopsis "Black plugin for the Python Language Server")
1316 (description "Black plugin for the Python Language Server.")
1317 (license license:expat)))
1318
1319 (define-public python-sh
1320 (package
1321 (name "python-sh")
1322 (version "1.12.14")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (pypi-uri "sh" version))
1327 (sha256
1328 (base32
1329 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1330 (build-system python-build-system)
1331 (arguments
1332 '(#:phases
1333 (modify-phases %standard-phases
1334 (replace 'check
1335 (lambda _
1336 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1337 (setenv "HOME" "/tmp")
1338 (invoke "python" "sh.py" "test"))))))
1339 (native-inputs
1340 `(("python-coverage" ,python-coverage)))
1341 (home-page "https://github.com/amoffat/sh")
1342 (synopsis "Python subprocess replacement")
1343 (description "This package provides a replacement for Python's
1344 @code{subprocess} feature.")
1345 (license license:expat)))
1346
1347 (define-public python-cftime
1348 (package
1349 (name "python-cftime")
1350 (version "1.0.4.2")
1351 (source
1352 (origin
1353 (method url-fetch)
1354 (uri (pypi-uri "cftime" version))
1355 (sha256
1356 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1357 (build-system python-build-system)
1358 (propagated-inputs
1359 `(("python-numpy" ,python-numpy)))
1360 (native-inputs
1361 `(("python-coveralls" ,python-coveralls)
1362 ("python-cython" ,python-cython)
1363 ("python-pytest-cov" ,python-pytest-cov)))
1364 (home-page "https://github.com/Unidata/cftime")
1365 (synopsis "Library for time handling")
1366 (description
1367 "This package provides time-handling functionality that used to be part
1368 of the netcdf4 package before.")
1369 ;; This package claims to include code under the GPLv3 but is released
1370 ;; under ISC.
1371 (license (list license:isc license:gpl3+))))
1372
1373 (define-public python-netcdf4
1374 (package
1375 (name "python-netcdf4")
1376 (version "1.5.3")
1377 (source
1378 (origin
1379 (method url-fetch)
1380 (uri (pypi-uri "netCDF4" version))
1381 (sha256
1382 (base32
1383 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1384 (build-system python-build-system)
1385 (arguments
1386 '(#:phases
1387 (modify-phases %standard-phases
1388 (add-after 'unpack 'configure-locations
1389 (lambda* (#:key inputs #:allow-other-keys)
1390 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1391 #t)))))
1392 (native-inputs
1393 `(("python-cython" ,python-cython)))
1394 (propagated-inputs
1395 `(("python-numpy" ,python-numpy)
1396 ("python-cftime" ,python-cftime)))
1397 (inputs
1398 `(("netcdf" ,netcdf)
1399 ("hdf4" ,hdf4)
1400 ("hdf5" ,hdf5)))
1401 (home-page "https://github.com/Unidata/netcdf4-python")
1402 (synopsis "Python/numpy interface to the netCDF library")
1403 (description "Netcdf4-python is a Python interface to the netCDF C
1404 library. netCDF version 4 has many features not found in earlier
1405 versions of the library and is implemented on top of HDF5. This module
1406 can read and write files in both the new netCDF 4 and the old netCDF 3
1407 format, and can create files that are readable by HDF5 clients. The
1408 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1409 to users of that module.")
1410 ;; The software is mainly ISC, but includes some files covered
1411 ;; by the Expat license.
1412 (license (list license:isc license:expat))))
1413
1414 (define-public python-license-expression
1415 (package
1416 (name "python-license-expression")
1417 (version "1.2")
1418 (source
1419 (origin
1420 (method url-fetch)
1421 (uri (pypi-uri "license-expression" version))
1422 (sha256
1423 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1424 (build-system python-build-system)
1425 (propagated-inputs
1426 `(("python-boolean.py" ,python-boolean.py)))
1427 (home-page "https://github.com/nexB/license-expression")
1428 (synopsis "Apply boolean logic to license expressions")
1429 (description
1430 "This Python module defines a tiny language to evaluate and compare
1431 license expressions using boolean logic. Logical combinations of licenses can
1432 be tested for equality, containment, and equivalence. They can be normalised
1433 and simplified. It supports SPDX license expressions as well as other naming
1434 conventions and aliases in the same expression.")
1435 (license license:gpl2+)))
1436
1437 (define-public python-lockfile
1438 (package
1439 (name "python-lockfile")
1440 (version "0.12.2")
1441 (source
1442 (origin
1443 (method url-fetch)
1444 (uri (pypi-uri "lockfile" version))
1445 (sha256
1446 (base32
1447 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1448 (build-system python-build-system)
1449 (arguments '(#:test-target "check"))
1450 (native-inputs
1451 `(("python-pbr" ,python-pbr)))
1452 (home-page "https://launchpad.net/pylockfile")
1453 (synopsis "Platform-independent file locking module")
1454 (description
1455 "The lockfile package exports a LockFile class which provides a simple
1456 API for locking files.")
1457 (license license:expat)))
1458
1459 (define-public python-fb-re2
1460 (package
1461 (name "python-fb-re2")
1462 (version "1.0.7")
1463 (source
1464 (origin
1465 (method git-fetch)
1466 (uri (git-reference
1467 (url "https://github.com/facebook/pyre2")
1468 (commit (string-append "v" version))))
1469 (file-name (git-file-name name version))
1470 (sha256
1471 (base32
1472 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1473 (build-system python-build-system)
1474 (inputs
1475 `(("re2" ,re2)))
1476 (home-page "https://github.com/facebook/pyre2")
1477 (synopsis "Python wrapper for RE2")
1478 (description "This package provides a Python extension that wraps Google's
1479 RE2 regular expression library. It implements many of the features of
1480 Python's built-in @code{re} module with compatible interfaces.")
1481 (license license:bsd-3)))
1482
1483 (define-public python-filelock
1484 (package
1485 (name "python-filelock")
1486 (version "3.0.12")
1487 (source
1488 (origin
1489 (method url-fetch)
1490 (uri (pypi-uri "filelock" version))
1491 (sha256
1492 (base32
1493 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1494 (build-system python-build-system)
1495 (home-page
1496 "https://github.com/benediktschmitt/py-filelock")
1497 (synopsis "Platform independent file lock")
1498 (description "@code{filelock} contains a single module implementing
1499 a platform independent file lock in Python, which provides a simple way of
1500 inter-process communication.")
1501 (license license:unlicense)))
1502
1503 (define-public python-semantic-version
1504 (package
1505 (name "python-semantic-version")
1506 (version "2.8.5")
1507 (source
1508 (origin
1509 (method url-fetch)
1510 (uri (pypi-uri "semantic_version" version))
1511 (sha256
1512 (base32
1513 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1514 (build-system python-build-system)
1515 (home-page "https://github.com/rbarrois/python-semanticversion")
1516 (synopsis "Semantic versioning module for Python")
1517 (description
1518 "The @code{semantic_version} class is a small library for handling
1519 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1520
1521 It can compare versions, generate a new version that represents a bump in one of
1522 the version levels, and check whether any given string is a proper semantic
1523 version identifier.")
1524 (license license:bsd-3)))
1525
1526 (define-public python2-semantic-version
1527 (package-with-python2 python-semantic-version))
1528
1529 (define-public python-serpent
1530 (package
1531 (name "python-serpent")
1532 (version "1.28")
1533 (source
1534 (origin
1535 (method url-fetch)
1536 (uri (pypi-uri "serpent" version))
1537 (sha256
1538 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1539 (build-system python-build-system)
1540 (native-inputs
1541 `(("python-attrs" ,python-attrs)
1542 ("python-pytz" ,python-pytz)))
1543 (home-page "https://github.com/irmen/Serpent")
1544 (synopsis "Serializer for literal Python expressions")
1545 (description
1546 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1547 serialization. It serializes an object tree into bytes (an utf-8 encoded
1548 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1549 to rebuild the original object tree.
1550
1551 Because only safe literals are encoded, it is safe to send serpent data to
1552 other machines, such as over the network.")
1553 (properties `((python2-variant . ,(delay python2-serpent))))
1554 (license license:expat)))
1555
1556 (define-public python2-serpent
1557 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1558 (package/inherit base
1559 (propagated-inputs
1560 `(("python-enum34" ,python2-enum34)
1561 ,@(package-propagated-inputs base))))))
1562
1563 (define-public python-setuptools
1564 (package
1565 (name "python-setuptools")
1566 (version "52.0.0")
1567 (source
1568 (origin
1569 (method url-fetch)
1570 (uri (pypi-uri "setuptools" version))
1571 (sha256
1572 (base32
1573 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1574 (modules '((guix build utils)))
1575 (snippet
1576 '(begin
1577 ;; Remove included binaries which are used to build self-extracting
1578 ;; installers for Windows.
1579 ;; TODO: Find some way to build them ourself so we can include them.
1580 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1581 #t))))
1582 (build-system python-build-system)
1583 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1584 ;; One could bootstrap with an internal untested setuptools.
1585 (arguments
1586 `(#:tests? #f))
1587 (home-page "https://pypi.org/project/setuptools/")
1588 (synopsis
1589 "Library designed to facilitate packaging Python projects")
1590 (description
1591 "Setuptools is a fully-featured, stable library designed to facilitate
1592 packaging Python projects, where packaging includes:
1593 Python package and module definitions,
1594 distribution package metadata,
1595 test hooks,
1596 project installation,
1597 platform-specific details,
1598 Python 3 support.")
1599 ;; TODO: setuptools now bundles the following libraries:
1600 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1601 (license (list license:psfl ; setuptools itself
1602 license:expat ; six, appdirs, pyparsing
1603 license:asl2.0 ; packaging is dual ASL2/BSD-2
1604 license:bsd-2))
1605 (properties `((python2-variant . ,(delay python2-setuptools))))))
1606
1607 ;; Newer versions of setuptools no longer support Python 2.
1608 (define-public python2-setuptools
1609 (package
1610 (name "python2-setuptools")
1611 (version "41.0.1")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (pypi-uri "setuptools" version ".zip"))
1616 (sha256
1617 (base32
1618 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1619 (modules '((guix build utils)))
1620 (snippet
1621 '(begin
1622 ;; Remove included binaries which are used to build self-extracting
1623 ;; installers for Windows.
1624 ;; TODO: Find some way to build them ourself so we can include them.
1625 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1626 #t))))
1627 (build-system python-build-system)
1628 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1629 ;; One could bootstrap with an internal untested setuptools.
1630 (arguments
1631 `(#:tests? #f))
1632 (native-inputs
1633 `(("unzip" ,unzip)))
1634 (home-page "https://pypi.org/project/setuptools/")
1635 (synopsis
1636 "Library designed to facilitate packaging Python projects")
1637 (description
1638 "Setuptools is a fully-featured, stable library designed to facilitate
1639 packaging Python projects, where packaging includes:
1640 Python package and module definitions,
1641 distribution package metadata,
1642 test hooks,
1643 project installation,
1644 platform-specific details,
1645 Python 3 support.")
1646 ;; TODO: setuptools now bundles the following libraries:
1647 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1648 (license (list license:psfl ; setuptools itself
1649 license:expat ; six, appdirs, pyparsing
1650 license:asl2.0 ; packaging is dual ASL2/BSD-2
1651 license:bsd-2))))
1652
1653 (define-public python-setuptools-declarative-requirements
1654 (package
1655 (name "python-setuptools-declarative-requirements")
1656 (version "1.2.0")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri
1661 "setuptools-declarative-requirements"
1662 version))
1663 (sha256
1664 (base32
1665 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1666 (build-system python-build-system)
1667 (native-inputs
1668 `(("python-pytest" ,python-pytest)
1669 ("python-setuptools-scm" ,python-setuptools-scm)))
1670 (propagated-inputs
1671 `(("python-toml" ,python-toml)
1672 ("python-wheel" ,python-wheel)))
1673 (home-page
1674 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1675 (synopsis "File support for setuptools declarative setup.cfg")
1676 (description
1677 "This package provides file support for setuptools declarative
1678 @code{setup.cfg}.")
1679 (license license:asl2.0)))
1680
1681 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1682 (define-public python-setuptools-for-tensorflow
1683 (hidden-package
1684 (package
1685 (inherit python-setuptools)
1686 (version "39.1.0")
1687 (source (origin
1688 (inherit (package-source python-setuptools))
1689 (uri (pypi-uri "setuptools" version ".zip"))
1690 (sha256
1691 (base32
1692 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1693
1694 (define-public python-uniseg
1695 (package
1696 (name "python-uniseg")
1697 (version "0.7.1")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "uniseg" version ".zip"))
1702 (sha256
1703 (base32
1704 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1705 (build-system python-build-system)
1706 (arguments
1707 '(#:tests? #f)) ; The test suite requires network access.
1708 (native-inputs
1709 `(("unzip" ,unzip)))
1710 (home-page
1711 "https://bitbucket.org/emptypage/uniseg-python")
1712 (synopsis
1713 "Python library to determine Unicode text segmentations")
1714 (description
1715 "Uniseg is a Python package used to determine Unicode text segmentations.
1716 Supported segmentations include:
1717 @enumerate
1718 @item @dfn{Code point} (any value in the Unicode codespace)
1719 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1720 multiple Unicode code points, e.g. \"G\" + acute-accent)
1721 @item Word break
1722 @item Sentence break
1723 @item Line break
1724 @end enumerate")
1725 (license license:expat)))
1726
1727 (define-public python2-uniseg
1728 (package-with-python2 python-uniseg))
1729
1730 (define-public python-humanfriendly
1731 (package
1732 (name "python-humanfriendly")
1733 (version "8.2")
1734 (source
1735 (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "humanfriendly" version))
1738 (sha256
1739 (base32
1740 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1741 (build-system python-build-system)
1742 (arguments
1743 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1744 #:tests? #f))
1745 (home-page "https://humanfriendly.readthedocs.io")
1746 (synopsis "Human-friendly input and output in Python")
1747 (description
1748 "The functions and classes in @code{humanfriendly} can be used to make
1749 text interfaces more user-friendly. It includes tools to parse and format
1750 numbers, file sizes, and timespans, timers for long-running operations, menus
1751 to allow the user to choose from a list of options, and terminal interaction
1752 helpers.")
1753 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1754 (license license:expat)))
1755
1756 (define-public python2-humanfriendly
1757 (let ((base (package-with-python2
1758 (strip-python2-variant python-humanfriendly))))
1759 (package/inherit base
1760 (propagated-inputs
1761 `(("python2-monotonic" ,python2-monotonic)
1762 ,@(package-propagated-inputs base))))))
1763
1764 (define-public python-textparser
1765 (package
1766 (name "python-textparser")
1767 (version "0.23.0")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (pypi-uri "textparser" version))
1772 (sha256
1773 (base32
1774 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1775 (build-system python-build-system)
1776 (home-page "https://github.com/eerimoq/textparser")
1777 (synopsis "Fast text parser for Python")
1778 (description "This library provides a text parser written in the Python
1779 language. It aims to be fast.")
1780 (license license:expat)))
1781
1782 (define-public python-aenum
1783 (package
1784 (name "python-aenum")
1785 (version "2.2.4")
1786 (source
1787 (origin
1788 (method url-fetch)
1789 (uri (pypi-uri "aenum" version))
1790 (sha256
1791 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1792 (build-system python-build-system)
1793 (arguments
1794 `(#:phases (modify-phases %standard-phases
1795 (replace 'check
1796 (lambda _
1797 (format #t "current working dir ~s~%" (getcwd))
1798 (setenv "PYTHONPATH"
1799 (string-append ".:" (getenv "PYTHONPATH")))
1800 ;; We must run the test suite module directly, as it
1801 ;; fails to define the 'tempdir' variable in scope for
1802 ;; the tests otherwise
1803 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1804 ;; issues/32/running-tests-with-python-setuppy-test).
1805 (invoke "python3" "aenum/test.py")
1806 ;; This one fails with "NameError: name
1807 ;; 'test_pickle_dump_load' is not defined" (see:
1808 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1809 ;; /error-running-the-test_v3py-test-suite).
1810 ;; (invoke "python3" "aenum/test_v3.py")
1811 #t)))))
1812 (home-page "https://bitbucket.org/stoneleaf/aenum")
1813 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1814 (description "The aenum library includes an @code{Enum} base class, a
1815 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1816 class.")
1817 (license license:bsd-3)))
1818
1819 (define-public python-can
1820 (package
1821 (name "python-can")
1822 (version "3.3.3")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (pypi-uri "python-can" version))
1827 (sha256
1828 (base32
1829 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1830 (build-system python-build-system)
1831 (arguments
1832 `(#:phases (modify-phases %standard-phases
1833 (add-after 'unpack 'relax-version-requirements
1834 (lambda _
1835 (substitute* "setup.py"
1836 (("mock~=2\\.0") "mock")
1837 (("coverage<5") "coverage")
1838 (("pytest~=4\\.3") "pytest")
1839 (("hypothesis~=4\\.56") "hypothesis"))
1840 #t))
1841 (add-after 'unpack 'fix-broken-tests
1842 ;; The tests try to run two scripts it expects should be
1843 ;; in PATH, but they aren't at this time (see:
1844 ;; https://github.com/hardbyte/python-can/issues/805).
1845 (lambda _
1846 (substitute* "test/test_scripts.py"
1847 (("\"can_logger\\.py --help\"") "")
1848 (("\"can_player\\.py --help\"") ""))
1849 #t)))))
1850 (propagated-inputs
1851 `(("python-aenum" ,python-aenum)
1852 ("python-wrapt" ,python-wrapt)))
1853 (native-inputs
1854 `(("python-codecov" ,python-codecov)
1855 ("python-coverage" ,python-coverage)
1856 ("python-future" ,python-future)
1857 ("python-hypothesis" ,python-hypothesis)
1858 ("python-mock" ,python-mock)
1859 ("python-pyserial" ,python-pyserial)
1860 ("python-pytest" ,python-pytest)
1861 ("python-pytest-cov" ,python-pytest-cov)
1862 ("python-pytest-runner" ,python-pytest-runner)
1863 ("python-pytest-timeout" ,python-pytest-timeout)))
1864 (home-page "https://github.com/hardbyte/python-can")
1865 (synopsis "Controller Area Network (CAN) interface module for Python")
1866 (description "This package defines the @code{can} module, which provides
1867 controller area network (CAN) support for Python developers; providing common
1868 abstractions to different hardware devices, and a suite of utilities for
1869 sending and receiving messages on a CAN bus.")
1870 (license license:lgpl3+)))
1871
1872 (define-public python-caniusepython3
1873 (package
1874 (name "python-caniusepython3")
1875 (version "7.2.0")
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "caniusepython3" version))
1880 (sha256
1881 (base32
1882 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1883 (build-system python-build-system)
1884 (arguments
1885 `(#:phases (modify-phases %standard-phases
1886 (add-after 'unpack 'relax-requirements
1887 (lambda _
1888 (substitute* "setup.py"
1889 ;; These are for compatibility with Python 2.
1890 ((".*'argparse', 'backports.functools_lru_cache',.*")
1891 ""))
1892 (substitute* "dev_requirements.txt"
1893 ((".*pylint.*") "")) ;not actually required
1894 #t))
1895 (replace 'check
1896 (lambda _
1897 (invoke "py.test" "-k" "not NetworkTests"))))))
1898 (propagated-inputs
1899 `(("python-distlib" ,python-distlib)
1900 ("python-packaging" ,python-packaging)
1901 ("python-requests" ,python-requests)))
1902 (native-inputs
1903 `(("python-mock" ,python-mock)
1904 ("python-pytest" ,python-pytest)))
1905 (home-page "https://github.com/brettcannon/caniusepython3")
1906 (synopsis "Check for Python 3-incompatible Python libraries")
1907 (description "The @command{caniusepython3} command scans your project and
1908 reports the Python 3-incompatible libraries it found. It can also be used as
1909 a library.")
1910 (license license:asl2.0)))
1911
1912 (define-public python-diskcache
1913 (package
1914 (name "python-diskcache")
1915 (version "4.1.0")
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (pypi-uri "diskcache" version))
1920 (sha256
1921 (base32
1922 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1923 (build-system python-build-system)
1924 (arguments
1925 `(#:tests? #f)) ;test suite not included in the release
1926 (home-page "http://www.grantjenks.com/docs/diskcache/")
1927 (synopsis "Disk and file backed cache library")
1928 (description "DiskCache is a disk and file backed persistent cache.")
1929 (license license:asl2.0)))
1930
1931 (define-public python-bitstruct
1932 (package
1933 (name "python-bitstruct")
1934 (version "8.9.0")
1935 (source
1936 (origin
1937 (method url-fetch)
1938 (uri (pypi-uri "bitstruct" version))
1939 (sha256
1940 (base32
1941 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1942 (build-system python-build-system)
1943 (home-page "https://github.com/eerimoq/bitstruct")
1944 (synopsis "Python values to and C bit field structs converter")
1945 (description "This module performs conversions between Python values and C
1946 bit field structs represented as Python byte strings. It is intended to have
1947 a similar interface as the @code{struct} module from Python, but working on
1948 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1949 (license license:expat)))
1950
1951 (define-public python-cantools
1952 (package
1953 (name "python-cantools")
1954 (version "33.1.1")
1955 (source
1956 (origin
1957 ;; We take the sources from the Git repository as the documentation is
1958 ;; not included with the PyPI archive.
1959 (method git-fetch)
1960 (uri (git-reference
1961 (url "https://github.com/eerimoq/cantools")
1962 (commit version)))
1963 (file-name (git-file-name name version))
1964 (sha256
1965 (base32
1966 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1967 (build-system python-build-system)
1968 (arguments
1969 `(#:phases
1970 (modify-phases %standard-phases
1971 (add-after 'build 'build-doc
1972 (lambda _
1973 ;; See: https://github.com/eerimoq/cantools/issues/190.
1974 (substitute* "README.rst"
1975 (("https://github.com/eerimoq/cantools/raw/master\
1976 /docs/monitor.png")
1977 "monitor.png"))
1978 (with-directory-excursion "docs"
1979 (invoke "make" "man" "info"))))
1980 (add-after 'install 'install-doc
1981 (lambda* (#:key outputs #:allow-other-keys)
1982 (let* ((out (assoc-ref outputs "out"))
1983 (info (string-append out "/share/info"))
1984 (man1 (string-append out "/share/man/man1")))
1985 (format #t "CWD: ~s~%" (getcwd))
1986 (install-file "docs/_build/texinfo/cantools.info" info)
1987 (install-file "docs/_build/man/cantools.1" man1)
1988 #t))))))
1989 (native-inputs
1990 `(("sphinx" ,python-sphinx)
1991 ("texinfo" ,texinfo)))
1992 (propagated-inputs
1993 `(("python-bitstruct" ,python-bitstruct)
1994 ("python-can" ,python-can)
1995 ("python-diskcache" ,python-diskcache)
1996 ("python-textparser" ,python-textparser)))
1997 (home-page "https://github.com/eerimoq/cantools")
1998 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1999 (description "This package includes Controller Area Network (CAN) related
2000 tools that can be used to:
2001 @itemize
2002 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
2003 @item encode and decode CAN messages
2004 @item multiplex simple and extended signals
2005 @item diagnose DID encoding and decoding
2006 @item dump the CAN decoder output
2007 @item test CAN nodes
2008 @item generate C source code
2009 @item monitor the CAN bus
2010 @end itemize")
2011 (license license:expat)))
2012
2013 (define-public python-capturer
2014 (package
2015 (name "python-capturer")
2016 (version "2.4")
2017 (source
2018 (origin
2019 (method url-fetch)
2020 (uri (pypi-uri "capturer" version))
2021 (sha256
2022 (base32
2023 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
2024 (build-system python-build-system)
2025 (arguments
2026 `(#:tests? #f))
2027 (propagated-inputs
2028 `(("python-humanfriendly" ,python-humanfriendly)))
2029 (home-page "https://capturer.readthedocs.io")
2030 (synopsis "Capture stdout and stderr streams of the current process")
2031 (description
2032 "The capturer package makes it easy to capture the stdout and stderr
2033 streams of the current process and subprocesses. Output can be relayed
2034 to the terminal in real time but is also available to the Python program
2035 for additional processing.")
2036 (license license:expat)))
2037
2038 (define-public python2-capturer
2039 (package-with-python2 python-capturer))
2040
2041 (define-public python-case
2042 (package
2043 (name "python-case")
2044 (version "1.5.3")
2045 (source
2046 (origin
2047 (method url-fetch)
2048 (uri (pypi-uri "case" version))
2049 (sha256
2050 (base32
2051 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2052 (build-system python-build-system)
2053 (propagated-inputs
2054 `(("python-mock" ,python-mock)
2055 ("python-nose" ,python-nose)
2056 ("python-six" ,python-six)
2057 ("python-unittest2" ,python-unittest2)))
2058 (native-inputs
2059 `(("python-coverage" ,python-coverage)))
2060 (home-page "https://github.com/celery/case")
2061 (synopsis "Unittest utilities and convenience methods")
2062 (description
2063 "The @code{case} package provides utilities on top of unittest, including
2064 some helpful Python 2 compatibility convenience methods.")
2065 (license license:bsd-3)))
2066
2067 (define-public python-verboselogs
2068 (package
2069 (name "python-verboselogs")
2070 (version "1.7")
2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (pypi-uri "verboselogs" version))
2075 (sha256
2076 (base32
2077 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2078 (build-system python-build-system)
2079 (arguments
2080 `(#:phases
2081 (modify-phases %standard-phases
2082 (replace 'check
2083 (lambda _
2084 ;; Do not run pylint plugin test, as astroid is an old
2085 ;; unsupported version.
2086 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2087 "verboselogs/tests.py"))))))
2088 (native-inputs
2089 `(("python-mock" ,python-mock)
2090 ("python-pytest" ,python-pytest)))
2091 (home-page "https://verboselogs.readthedocs.io")
2092 (synopsis "Verbose logging level for Python's logging module")
2093 (description
2094 "The @code{verboselogs} package extends Python's @code{logging} module to
2095 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2096 (license license:expat)))
2097
2098 (define-public python2-verboselogs
2099 (package-with-python2 python-verboselogs))
2100
2101 (define-public python-coloredlogs
2102 (package
2103 (name "python-coloredlogs")
2104 (version "10.0")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "coloredlogs" version))
2109 (sha256
2110 (base32
2111 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2112 (build-system python-build-system)
2113 (arguments
2114 `(;Tests require some updated modules
2115 #:tests? #f))
2116 (propagated-inputs
2117 `(("python-capturer" ,python-capturer)))
2118 (home-page "https://coloredlogs.readthedocs.io")
2119 (synopsis "Colored stream handler for Python's logging module")
2120 (description
2121 "The @code{coloredlogs} package enables colored terminal output for
2122 Python's logging module. The @code{ColoredFormatter} class inherits from
2123 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2124 messages in color.")
2125 (license license:expat)))
2126
2127 (define-public python2-coloredlogs
2128 (package-with-python2 python-coloredlogs))
2129
2130 (define-public python-editorconfig
2131 (package
2132 (name "python-editorconfig")
2133 (version "0.12.2")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "EditorConfig" version))
2138 (sha256
2139 (base32
2140 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2141 (build-system python-build-system)
2142 (home-page "https://editorconfig.org/")
2143 (synopsis "EditorConfig bindings for python")
2144 (description "The EditorConfig project consists of a file format for
2145 defining coding styles and a collection of text editor plugins that enable
2146 editors to read the file format and adhere to defined styles. EditorConfig
2147 files are easily readable and they work nicely with version control systems.")
2148 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2149 (license (list license:bsd-2 license:psfl))))
2150
2151 (define-public dosage
2152 (package
2153 (name "dosage")
2154 (version "2.17")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "dosage" version))
2159 (sha256
2160 (base32
2161 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2162 (build-system python-build-system)
2163 (propagated-inputs
2164 `(("python2-backports-functools-lru-cache"
2165 ,python2-backports-functools-lru-cache)
2166 ("python2-backports-shutil-get-terminal-size"
2167 ,python2-backports-shutil-get-terminal-size)
2168 ("python-cached-property" ,python-cached-property)
2169 ("python-colorama" ,python-colorama)
2170 ("python-imagesize" ,python-imagesize)
2171 ("python-importlib-metadata" ,python-importlib-metadata)
2172 ("python-lxml" ,python-lxml)
2173 ("python-requests" ,python-requests)
2174 ("python-six" ,python-six)))
2175 (native-inputs
2176 `(("python-pytest-cov" ,python-pytest-cov)
2177 ("python-pytest-xdist" ,python-pytest-xdist)
2178 ("python-responses" ,python-responses)
2179 ("python-setuptools-scm" ,python-setuptools-scm)))
2180 (home-page "https://github.com/webcomics/dosage")
2181 (synopsis "Comic strip downloader and archiver")
2182 (description "Dosage is designed to keep a local copy of specific webcomics and other
2183 picture-based content such as Picture of the Day sites. With the @command{dosage}
2184 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2185 downloaded, or download a strip for a particular date or index, if possible.")
2186 (license license:expat)))
2187
2188 (define-public python-et-xmlfile
2189 (package
2190 (name "python-et-xmlfile")
2191 (version "1.0.1")
2192 (source
2193 (origin
2194 (method url-fetch)
2195 (uri (pypi-uri "et_xmlfile" version))
2196 (sha256
2197 (base32
2198 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2199 (build-system python-build-system)
2200 (arguments
2201 `(#:phases (modify-phases %standard-phases
2202 (replace 'check
2203 (lambda _
2204 (invoke "pytest"))))))
2205 (native-inputs
2206 `(("python-pytest" ,python-pytest)
2207 ("python-lxml" ,python-lxml))) ;used for the tests
2208 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2209 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2210 (description "This Python library is based upon the @code{xmlfile} module
2211 from @code{lxml}. It aims to provide a low memory, compatible implementation
2212 of @code{xmlfile}.")
2213 (license license:expat)))
2214
2215 (define-public python2-et-xmlfile
2216 (package-with-python2 python-et-xmlfile))
2217
2218 (define-public python-openpyxl
2219 (package
2220 (name "python-openpyxl")
2221 (version "3.0.5")
2222 (source
2223 (origin
2224 ;; We use the upstream repository, as the tests are not included in the
2225 ;; PyPI releases.
2226 (method hg-fetch)
2227 (uri (hg-reference
2228 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2229 (changeset version)))
2230 (file-name (string-append name "-" version "-checkout"))
2231 (sha256
2232 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2233 (build-system python-build-system)
2234 (arguments
2235 `(#:phases (modify-phases %standard-phases
2236 (replace 'check
2237 (lambda _
2238 (invoke "pytest"))))))
2239 (native-inputs
2240 ;; For the test suite.
2241 `(("python-lxml" ,python-lxml)
2242 ("python-pillow" ,python-pillow)
2243 ("python-pytest" ,python-pytest)))
2244 (propagated-inputs
2245 `(("python-et-xmlfile" ,python-et-xmlfile)
2246 ("python-jdcal" ,python-jdcal)))
2247 (home-page "https://openpyxl.readthedocs.io")
2248 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2249 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2250 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2251 standard.")
2252 (properties `((python2-variant . ,(delay python2-openpyxl))))
2253 (license license:expat)))
2254
2255 (define-public python2-openpyxl
2256 (let ((base (package-with-python2
2257 (strip-python2-variant python-openpyxl))))
2258 (package
2259 (inherit base)
2260 ;; This is the latest version that has python2 support
2261 (version "2.6.4")
2262 (source
2263 (origin
2264 (method url-fetch)
2265 (uri (pypi-uri "openpyxl" version))
2266 (sha256
2267 (base32
2268 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2269 (arguments '(#:tests? #f))))) ; No test suite.
2270
2271 (define-public python-eventlet
2272 (package
2273 (name "python-eventlet")
2274 (version "0.25.1")
2275 (source
2276 (origin
2277 (method url-fetch)
2278 (uri (pypi-uri "eventlet" version))
2279 (sha256
2280 (base32
2281 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2282 (build-system python-build-system)
2283 (propagated-inputs
2284 `(("python-dnspython" ,python-dnspython)
2285 ("python-greenlet" ,python-greenlet)
2286 ("python-monotonic" ,python-monotonic)))
2287 (arguments
2288 ;; TODO: Requires unpackaged 'enum-compat'.
2289 '(#:tests? #f))
2290 (home-page "https://eventlet.net")
2291 (synopsis "Concurrent networking library for Python")
2292 (description
2293 "Eventlet is a concurrent networking library for Python that
2294 allows you to change how you run your code, not how you write it.
2295 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2296 Coroutines ensure that the developer uses a blocking style of programming
2297 that is similar to threading, but provide the benefits of non-blocking I/O.
2298 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2299 from the Python interpreter, or as a small part of a larger application.")
2300 (license license:expat)))
2301
2302 (define-public python-sinfo
2303 (package
2304 (name "python-sinfo")
2305 (version "0.3.4")
2306 (source (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "sinfo" version))
2309 (sha256
2310 (base32
2311 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2312 (build-system python-build-system)
2313 (propagated-inputs
2314 `(("python-stdlib-list" ,python-stdlib-list)))
2315 (home-page "https://gitlab.com/joelostblom/session_info")
2316 (synopsis "Output module version information loaded in a Python session")
2317 (description "This package outputs version information for modules loaded
2318 in the current session, Python, and the OS.")
2319 (license license:bsd-3)))
2320
2321 (define-public python-six
2322 (package
2323 (name "python-six")
2324 (version "1.14.0")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (pypi-uri "six" version))
2329 (sha256
2330 (base32
2331 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
2332 (build-system python-build-system)
2333 (arguments
2334 `(#:phases
2335 (modify-phases %standard-phases
2336 (replace 'check
2337 (lambda _
2338 (invoke "py.test" "-v"))))))
2339 (native-inputs
2340 `(("python-pytest" ,python-pytest-bootstrap)))
2341 (home-page "https://pypi.org/project/six/")
2342 (synopsis "Python 2 and 3 compatibility utilities")
2343 (description
2344 "Six is a Python 2 and 3 compatibility library. It provides utility
2345 functions for smoothing over the differences between the Python versions with
2346 the goal of writing Python code that is compatible on both Python versions.
2347 Six supports every Python version since 2.5. It is contained in only one
2348 Python file, so it can be easily copied into your project.")
2349 (license license:x11)))
2350
2351 (define-public python2-six
2352 (package-with-python2 python-six))
2353
2354 (define-public python-six-bootstrap
2355 (package
2356 (inherit python-six)
2357 (name "python-six-bootstrap")
2358 (native-inputs `())
2359 (arguments `(#:tests? #f))))
2360
2361 (define-public python2-six-bootstrap
2362 (package-with-python2 python-six-bootstrap))
2363
2364 (define-public python-schedule
2365 (package
2366 (name "python-schedule")
2367 (version "0.4.3")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (pypi-uri "schedule" version))
2372 (sha256
2373 (base32
2374 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2375 (build-system python-build-system)
2376 (native-inputs
2377 `(("python-pytest" ,python-pytest)
2378 ("python-mock" ,python-mock)))
2379 (home-page "https://github.com/dbader/schedule")
2380 (synopsis "Schedule periodic function calls in Python")
2381 (description
2382 "Schedule is an in-process scheduler for periodic jobs that uses the
2383 builder pattern for configuration. Schedule lets you run Python functions (or
2384 any other callable) periodically at pre-determined intervals using a simple,
2385 human-friendly syntax.")
2386 (license license:expat)))
2387
2388 (define-public python2-schedule
2389 (package-with-python2 python-schedule))
2390
2391 (define-public python-scour
2392 (package
2393 (name "python-scour")
2394 (version "0.38.2")
2395 (source
2396 (origin
2397 (method git-fetch)
2398 (uri
2399 (git-reference
2400 (url "https://github.com/scour-project/scour")
2401 (commit
2402 (string-append "v" version))))
2403 (file-name (git-file-name name version))
2404 (sha256
2405 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2406 (propagated-inputs
2407 `(("python-six" ,python-six)))
2408 (build-system python-build-system)
2409 (home-page "https://github.com/scour-project/scour")
2410 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2411 (description "The goal of Scour is to output a file that renders
2412 identically at a fraction of the size by removing a lot of redundant
2413 information created by most SVG editors. Optimization options are typically
2414 lossless but can be tweaked for more aggressive cleaning.")
2415 (license license:asl2.0)))
2416
2417 (define-public python-mechanize
2418 (package
2419 (name "python-mechanize")
2420 (version "0.4.5")
2421 (source
2422 (origin
2423 (method url-fetch)
2424 (uri (pypi-uri "mechanize" version))
2425 (sha256
2426 (base32
2427 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2428 (build-system python-build-system)
2429 (propagated-inputs
2430 `(("python-html5lib" ,python-html5lib)))
2431 (home-page "https://github.com/python-mechanize/mechanize")
2432 (synopsis
2433 "Stateful programmatic web browsing in Python")
2434 (description
2435 "Mechanize implements stateful programmatic web browsing in Python,
2436 after Andy Lester’s Perl module WWW::Mechanize.")
2437 (license license:bsd-3)))
2438
2439 (define-public python2-mechanize
2440 (package-with-python2 python-mechanize))
2441
2442 (define-public python-simpleaudio
2443 (package
2444 (name "python-simpleaudio")
2445 (version "1.0.4")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "simpleaudio" version))
2450 (sha256
2451 (base32
2452 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2453 (build-system python-build-system)
2454 (arguments
2455 `(#:tests? #f))
2456 (inputs
2457 `(("alsa-lib" ,alsa-lib)))
2458 (home-page
2459 "https://github.com/hamiltron/py-simple-audio")
2460 (synopsis "Simple, asynchronous audio playback for Python 3")
2461 (description
2462 "The @code{simplaudio} package provides cross-platform, dependency-free
2463 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2464 (license license:expat))) ; MIT license
2465
2466 (define-public python-simplejson
2467 (package
2468 (name "python-simplejson")
2469 (version "3.17.0")
2470 (source
2471 (origin
2472 (method url-fetch)
2473 (uri (pypi-uri "simplejson" version))
2474 (sha256
2475 (base32
2476 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2477 (build-system python-build-system)
2478 (home-page "http://simplejson.readthedocs.org/en/latest/")
2479 (synopsis
2480 "Json library for Python")
2481 (description
2482 "JSON (JavaScript Object Notation) is a subset of JavaScript
2483 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2484 format.
2485
2486 Simplejson exposes an API familiar to users of the standard library marshal
2487 and pickle modules. It is the externally maintained version of the json
2488 library contained in Python 2.6, but maintains compatibility with Python 2.5
2489 and (currently) has significant performance advantages, even without using
2490 the optional C extension for speedups. Simplejson is also supported on
2491 Python 3.3+.")
2492 (license license:x11)))
2493
2494 (define-public python2-simplejson
2495 (package-with-python2 python-simplejson))
2496
2497
2498 (define-public python-pyicu
2499 (package
2500 (name "python-pyicu")
2501 (version "2.4.3")
2502 (source
2503 (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "PyICU" version))
2506 (sha256
2507 (base32
2508 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2509 (build-system python-build-system)
2510 (inputs
2511 `(("icu4c" ,icu4c)))
2512 (native-inputs
2513 `(("python-pytest" ,python-pytest)
2514 ("python-six" ,python-six)))
2515 (home-page "https://github.com/ovalhub/pyicu")
2516 (synopsis "Python extension wrapping the ICU C++ API")
2517 (description
2518 "PyICU is a python extension wrapping the ICU C++ API.")
2519 (license license:x11)))
2520
2521 (define-public python2-pyicu
2522 (package-with-python2 python-pyicu))
2523
2524 (define-public python-dogtail
2525 (package
2526 (name "python-dogtail")
2527 (version "0.9.11")
2528 (source (origin
2529 (method url-fetch)
2530 (uri
2531 (string-append
2532 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2533 "dogtail-" version ".tar.gz"))
2534 (sha256
2535 (base32
2536 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2537 (build-system python-build-system)
2538 (arguments
2539 `(#:tests? #f ; TODO Launching dbus for the tests
2540 ; fails
2541 #:phases
2542 (modify-phases %standard-phases
2543 (replace 'check
2544 (lambda* (#:key tests? #:allow-other-keys)
2545 (when tests?
2546 (system "Xvfb :1 &")
2547 (setenv "DISPLAY" ":1")
2548 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2549 #t)))))
2550 (propagated-inputs
2551 `(("python-pygobject" ,python-pygobject)
2552 ("python-pycairo" ,python-pycairo)
2553 ("python-pyatspi" ,python-pyatspi)))
2554 (native-inputs
2555 `(("python-nose" ,python-nose)
2556 ("gtk+" ,gtk+)
2557 ("xvfb" ,xorg-server)
2558 ("dbus" ,dbus)
2559 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2560 ("gobject-introspection" ,gobject-introspection)))
2561 (home-page "https://gitlab.com/dogtail/dogtail/")
2562 (synopsis "GUI test tool and automation framework written in Python")
2563 (description
2564 "Dogtail is a GUI test tool and automation framework written in Python.
2565 It uses Accessibility (a11y) technologies to communicate with desktop
2566 applications. dogtail scripts are written in Python and executed like any
2567 other Python program.")
2568 (license license:gpl2+)))
2569
2570 (define-public python2-dogtail
2571 (package-with-python2 python-dogtail))
2572
2573 (define-public python-empy
2574 (package
2575 (name "python-empy")
2576 (version "3.3.3")
2577 (source (origin
2578 (method url-fetch)
2579 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2580 version ".tar.gz"))
2581 (sha256
2582 (base32
2583 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2584 (build-system python-build-system)
2585 (arguments
2586 `(#:tests? #f)) ; python2 only
2587 (home-page "http://www.alcyone.com/software/empy/")
2588 (synopsis "Templating system for Python")
2589 (description
2590 "EmPy is a system for embedding Python expressions and statements in
2591 template text; it takes an EmPy source file, processes it, and produces
2592 output. This is accomplished via expansions, which are special signals to the
2593 EmPy system and are set off by a special prefix (by default the at sign, @@).
2594 EmPy can expand arbitrary Python expressions and statements in this way, as
2595 well as a variety of special forms. Textual data not explicitly delimited in
2596 this way is sent unaffected to the output, allowing Python to be used in
2597 effect as a markup language. Also supported are callbacks via hooks,
2598 recording and playback via diversions, and dynamic, chainable filters. The
2599 system is highly configurable via command line options and embedded
2600 commands.")
2601 (license license:lgpl2.1+)))
2602
2603 (define-public python2-empy
2604 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2605 (package/inherit base
2606 (arguments `(,@(package-arguments base)
2607 #:tests? #t)))))
2608
2609 (define-public python2-element-tree
2610 (package
2611 (name "python2-element-tree")
2612 (version "1.2.6")
2613 (source (origin
2614 (method url-fetch)
2615 (uri (string-append
2616 "http://effbot.org/media/downloads/elementtree-"
2617 version "-20050316.tar.gz"))
2618 (sha256
2619 (base32
2620 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2621 (build-system python-build-system)
2622 (arguments
2623 `(#:python ,python-2 ; seems to be part of Python 3
2624 #:tests? #f)) ; no 'test' sub-command
2625 (synopsis "Toolkit for XML processing in Python")
2626 (description
2627 "ElementTree is a Python library supporting lightweight XML processing.")
2628 (home-page "https://effbot.org/zone/element-index.htm")
2629 (license (license:x11-style
2630 "http://docs.python.org/2/license.html"
2631 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2632
2633 (define-public python2-pybugz
2634 (package
2635 (name "python2-pybugz")
2636 (version "0.6.11")
2637 (source (origin
2638 (method url-fetch)
2639 (uri (string-append
2640 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2641 version ".tar.gz"))
2642 (sha256
2643 (base32
2644 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2645 (patches (search-patches "pybugz-stty.patch"
2646 "pybugz-encode-error.patch"))))
2647 (build-system python-build-system)
2648 (arguments
2649 `(#:python ,python-2 ; SyntaxError with Python 3
2650 #:tests? #f)) ; no 'test' sub-command
2651 (propagated-inputs
2652 `(("element-tree" ,python2-element-tree)))
2653 (synopsis "Python and command-line interface to Bugzilla")
2654 (description
2655 "PyBugz is a Python library and command-line tool to query the Bugzilla
2656 bug tracking system. It is meant as an aid to speed up interaction with the
2657 bug tracker.")
2658 (home-page "http://www.liquidx.net/pybugz/")
2659 (license license:gpl2)))
2660
2661 (define-public python2-enum
2662 (package
2663 (name "python2-enum")
2664 (version "0.4.6")
2665 (source (origin
2666 (method url-fetch)
2667 (uri (pypi-uri "enum" version))
2668 (sha256
2669 (base32
2670 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2671 (build-system python-build-system)
2672 (arguments
2673 `(#:python ,python-2))
2674 (home-page "https://pypi.org/project/enum/")
2675 (synopsis "Robust enumerated type support in Python")
2676 (description
2677 "This provides a module for robust enumerations in Python. It has
2678 been superseded by the Python standard library and is provided only for
2679 compatibility.")
2680 ;; Choice of either license.
2681 (license (list license:gpl3+ license:psfl))))
2682
2683 (define-public python-enum34
2684 (package
2685 (name "python-enum34")
2686 (version "1.1.6")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "enum34" version))
2691 (sha256
2692 (base32
2693 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2694 (build-system python-build-system)
2695 (home-page "https://pypi.org/project/enum34/")
2696 (synopsis "Backported Python 3.4 Enum")
2697 (description
2698 "Enum34 is the new Python stdlib enum module available in Python 3.4
2699 backported for previous versions of Python from 2.4 to 3.3.")
2700 (license license:bsd-3)))
2701
2702 (define-public python2-enum34
2703 (package-with-python2 python-enum34))
2704
2705 (define-public python-parse-type
2706 (package
2707 (name "python-parse-type")
2708 (version "0.4.2")
2709 (source
2710 (origin
2711 (method url-fetch)
2712 (uri (pypi-uri "parse_type" version))
2713 (sha256
2714 (base32
2715 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2716 (build-system python-build-system)
2717 (propagated-inputs
2718 `(("python-six" ,python-six)
2719 ("python-parse" ,python-parse)))
2720 (native-inputs
2721 `(("python-pytest" ,python-pytest)
2722 ("python-pytest-runner" ,python-pytest-runner)))
2723 (home-page "https://github.com/jenisys/parse_type")
2724 (synopsis "Extended parse module")
2725 (description
2726 "Parse_type extends the python parse module.")
2727 (properties
2728 `((python2-variant . ,(delay python2-parse-type))))
2729 (license license:bsd-3)))
2730
2731 (define-public python2-parse-type
2732 (let ((base (package-with-python2
2733 (strip-python2-variant python-parse-type))))
2734 (package/inherit base
2735 (propagated-inputs
2736 `(("python2-enum34" ,python2-enum34)
2737 ,@(package-propagated-inputs base))))))
2738
2739 (define-public python-parse
2740 (package
2741 (name "python-parse")
2742 (version "1.18.0")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "parse" version))
2747 (sha256
2748 (base32
2749 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2750 (build-system python-build-system)
2751 (arguments
2752 `(#:phases
2753 (modify-phases %standard-phases
2754 (replace 'check
2755 (lambda _ (invoke "python" "test_parse.py"))))))
2756 (home-page "https://github.com/r1chardj0n3s/parse")
2757 (synopsis "Parse strings")
2758 (description
2759 "Parse strings using a specification based on the Python @code{format()}
2760 syntax.")
2761 (license license:x11)))
2762
2763 (define-public python-polib
2764 (package
2765 (name "python-polib")
2766 (version "1.1.0")
2767 (source (origin
2768 (method url-fetch)
2769 (uri (pypi-uri "polib" version))
2770 (sha256
2771 (base32
2772 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2773 (build-system python-build-system)
2774 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2775 (synopsis "Manipulate, create and modify gettext files")
2776 (description "Polib can manipulate any gettext format (po, pot and mo)
2777 files. It can be used to create po files from scratch or to modify
2778 existing ones.")
2779 (license license:expat)))
2780
2781 (define-public python2-polib
2782 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2783 (package/inherit base
2784 (arguments `(,@(package-arguments base)
2785 ;; Tests don't work with python2.
2786 #:tests? #f)))))
2787
2788 (define-public python-poyo
2789 (package
2790 (name "python-poyo")
2791 (version "0.5.0")
2792 (source
2793 (origin
2794 (method url-fetch)
2795 (uri (pypi-uri "poyo" version))
2796 (sha256
2797 (base32
2798 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2799 (build-system python-build-system)
2800 (home-page "https://github.com/hackebrot/poyo")
2801 (synopsis "Lightweight YAML Parser for Python")
2802 (description
2803 "This package provides a lightweight YAML Parser for Python. It supports
2804 only a chosen subset of the YAML format that is required to parse cookiecutter
2805 user configuration files. It does not have support for serializing into YAML
2806 and is not compatible with JSON.")
2807 (license license:expat)))
2808
2809 (define-public scons
2810 (package
2811 (name "scons")
2812 (version "3.0.4")
2813 (source (origin
2814 (method git-fetch)
2815 (uri (git-reference
2816 (url "https://github.com/SCons/scons")
2817 (commit version)))
2818 (file-name (git-file-name name version))
2819 (sha256
2820 (base32
2821 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2822 (build-system python-build-system)
2823 (arguments
2824 `(#:use-setuptools? #f ; still relies on distutils
2825 #:tests? #f ; no 'python setup.py test' command
2826 #:phases
2827 (modify-phases %standard-phases
2828 (add-before 'build 'bootstrap
2829 (lambda _
2830 (substitute* "src/engine/SCons/compat/__init__.py"
2831 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2832 "sys.modules[new] = __import__(old)"))
2833 (substitute* "src/engine/SCons/Platform/__init__.py"
2834 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2835 "mod = __import__(full_name)"))
2836 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2837 (chdir "build/scons")
2838 #t)))))
2839 (home-page "https://scons.org/")
2840 (synopsis "Software construction tool written in Python")
2841 (description
2842 "SCons is a software construction tool. Think of SCons as an improved,
2843 cross-platform substitute for the classic Make utility with integrated
2844 functionality similar to autoconf/automake and compiler caches such as ccache.
2845 In short, SCons is an easier, more reliable and faster way to build
2846 software.")
2847 (license license:x11)))
2848
2849 (define-public scons-python2
2850 (package
2851 (inherit (package-with-python2 scons))
2852 (name "scons-python2")))
2853
2854 (define-public python-extension-helpers
2855 (package
2856 (name "python-extension-helpers")
2857 (version "0.1")
2858 (source
2859 (origin
2860 (method url-fetch)
2861 (uri (pypi-uri "extension-helpers" version))
2862 (sha256
2863 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2864 (build-system python-build-system)
2865 (native-inputs
2866 `(("coverage" ,python-coverage)
2867 ("pytest" ,python-pytest-astropy)
2868 ("pytest-cov" ,python-pytest-cov)
2869 ("setuptools-scm" ,python-setuptools-scm)))
2870 (home-page "https://github.com/astropy/astropy-helpers")
2871 (synopsis
2872 "Utilities for building and installing packages in the Astropy ecosystem")
2873 (description
2874 "The extension-helpers package includes many build, installation, and
2875 documentation-related tools used by the Astropy project.")
2876 (license license:bsd-3)))
2877
2878 (define-public python-extras
2879 (package
2880 (name "python-extras")
2881 (version "1.0.0")
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (pypi-uri "extras" version))
2886 (sha256
2887 (base32
2888 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2889 (build-system python-build-system)
2890 (arguments
2891 ;; FIXME: Circular dependency on testtools.
2892 '(#:tests? #f))
2893 (home-page "https://github.com/testing-cabal/extras")
2894 (synopsis "Useful extensions to the Python standard library")
2895 (description
2896 "Extras is a set of extensions to the Python standard library.")
2897 (license license:expat)))
2898
2899 (define-public python2-extras
2900 (package-with-python2 python-extras))
2901
2902 (define-public python-mimeparse
2903 (package
2904 (name "python-mimeparse")
2905 (version "1.6.0")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (pypi-uri "python-mimeparse" version))
2910 (sha256
2911 (base32
2912 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2913 (build-system python-build-system)
2914 (arguments
2915 '(#:phases
2916 (modify-phases %standard-phases
2917 (replace 'check
2918 (lambda _
2919 (invoke "./mimeparse_test.py"))))))
2920 (home-page
2921 "https://github.com/dbtsai/python-mimeparse")
2922 (synopsis "Python library for parsing MIME types")
2923 (description
2924 "Mimeparse provides basic functions for parsing MIME type names and
2925 matching them against a list of media-ranges.")
2926 (license license:expat)))
2927
2928 (define-public python2-mimeparse
2929 (package-with-python2 python-mimeparse))
2930
2931 (define-public python-miniboa
2932 (package
2933 (name "python-miniboa")
2934 (version "1.0.8")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (pypi-uri "miniboa" version))
2939 (sha256
2940 (base32
2941 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
2942 (build-system python-build-system)
2943 (home-page "https://github.com/shmup/miniboa")
2944 (synopsis "Simple, single-threaded Telnet server")
2945 (description
2946 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2947 server.")
2948 (license license:asl2.0)))
2949
2950 (define-public python2-miniboa
2951 (package-with-python2 python-miniboa))
2952
2953 (define-public python-pafy
2954 (package
2955 (name "python-pafy")
2956 (version "0.5.3.1")
2957 (source
2958 (origin
2959 (method url-fetch)
2960 (uri (pypi-uri "pafy" version))
2961 (sha256
2962 (base32
2963 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2964 (build-system python-build-system)
2965 (arguments
2966 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2967 (propagated-inputs
2968 ;; Youtube-dl is a python package which is imported in the file
2969 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2970 `(("youtube-dl" ,youtube-dl)))
2971 (home-page "https://np1.github.io/pafy/")
2972 (synopsis "Retrieve YouTube content and metadata")
2973 (description
2974 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2975 (license license:lgpl3+)))
2976
2977 (define-public python2-funcsigs
2978 (package
2979 (name "python2-funcsigs")
2980 (version "1.0.2")
2981 (source (origin
2982 (method url-fetch)
2983 (uri (pypi-uri "funcsigs" version))
2984 (sha256
2985 (base32
2986 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2987 (build-system python-build-system)
2988 (arguments
2989 `(#:python ,python-2))
2990 (native-inputs
2991 `(("python2-unittest2" ,python2-unittest2)))
2992 (home-page "http://funcsigs.readthedocs.org")
2993 (synopsis "Python function signatures from PEP362")
2994 (description
2995 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2996 (license license:asl2.0)))
2997
2998 (define-public python2-funcsigs-bootstrap
2999 (package
3000 (inherit python2-funcsigs)
3001 (name "python2-funcsigs-bootstrap")
3002 (native-inputs `())
3003 (arguments
3004 `(#:tests? #f
3005 ,@(package-arguments python2-funcsigs)))))
3006
3007 (define-public python-py
3008 (package
3009 (name "python-py")
3010 (version "1.8.1")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "py" version))
3015 (sha256
3016 (base32
3017 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
3018 (build-system python-build-system)
3019 (arguments
3020 ;; FIXME: "ImportError: 'test' module incorrectly imported from
3021 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
3022 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
3023 ;; Is this module globally installed?"
3024 '(#:tests? #f))
3025 (native-inputs
3026 `(("python-setuptools-scm" ,python-setuptools-scm)))
3027 (home-page "https://github.com/pytest-dev/py")
3028 (synopsis "Python library for parsing, I/O, instrospection, and logging")
3029 (description
3030 "Py is a Python library for file name parsing, .ini file parsing, I/O,
3031 code introspection, and logging.")
3032 (license license:expat)))
3033
3034 (define-public python-py-next
3035 (package
3036 (inherit python-py)
3037 (version "1.9.0")
3038 (source
3039 (origin
3040 (method url-fetch)
3041 (uri (pypi-uri "py" version))
3042 (sha256
3043 (base32
3044 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
3045
3046 (define-public python2-py
3047 (package-with-python2 python-py))
3048
3049 ;; Recent versions of python-fixtures and python-testrepository need
3050 ;; python-pbr for packaging, which itself needs these two packages for
3051 ;; testing.
3052 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3053 ;; same source, just without any test dependencies and with tests disabled.
3054 ;; python-pbr-minmal is then used to package python-fixtures and
3055 ;; python-testrepository.
3056 ;; Strictly speaking we currently could remove the test-requirements from the
3057 ;; normal python-pbr package (and save this package) since test are disabled
3058 ;; there anyway. But this may change in future.
3059 (define-public python-pbr-minimal
3060 (package
3061 (name "python-pbr-minimal")
3062 (version "3.0.1")
3063 (source
3064 (origin
3065 (method url-fetch)
3066 (uri (pypi-uri "pbr" version))
3067 (sha256
3068 (base32
3069 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
3070 (build-system python-build-system)
3071 (arguments
3072 `(#:tests? #f))
3073 (home-page "https://docs.openstack.org/pbr/latest/")
3074 (synopsis "Minimal build of python-pbr used for bootstrapping")
3075 (description
3076 "Used only for bootstrapping python2-pbr, you should not need this.")
3077 (license license:asl2.0)))
3078
3079 (define-public python-pbr
3080 (package
3081 (inherit python-pbr-minimal)
3082 (name "python-pbr")
3083 (arguments
3084 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3085 (propagated-inputs
3086 `(("git" ,git))) ;; pbr actually uses the "git" binary.
3087 (native-inputs
3088 `(("python-fixtures" ,python-fixtures-bootstrap)
3089 ;; discover, coverage, hacking, subunit
3090 ("python-mock" ,python-mock)
3091 ("python-six" ,python-six)
3092 ("python-sphinx" ,python-sphinx)
3093 ("python-testrepository" ,python-testrepository-bootstrap)
3094 ("python-testresources" ,python-testresources-bootstrap)
3095 ("python-testscenarios" ,python-testscenarios-bootstrap)
3096 ("python-testtools" ,python-testtools-bootstrap)
3097 ("python-virtualenv" ,python-virtualenv)))
3098 (synopsis "Enhance the default behavior of Python’s setuptools")
3099 (description
3100 "Python Build Reasonableness (PBR) is a library that injects some useful
3101 and sensible default behaviors into your setuptools run. It will set
3102 versions, process requirements files and generate AUTHORS and ChangeLog file
3103 from git information.
3104 ")))
3105
3106 (define-public python-pyrsistent
3107 (package
3108 (name "python-pyrsistent")
3109 (version "0.16.0")
3110 (home-page "https://github.com/tobgu/pyrsistent")
3111 (source (origin
3112 (method url-fetch)
3113 (uri (pypi-uri "pyrsistent" version))
3114 (sha256
3115 (base32
3116 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3117 (build-system python-build-system)
3118 (arguments
3119 '(#:phases (modify-phases %standard-phases
3120 ;; The package works fine with newer Pytest and Hypothesis, but
3121 ;; has pinned older versions to stay compatible with Python 2.
3122 (add-before 'check 'loosen-pytest-requirement
3123 (lambda _
3124 (substitute* "setup.py"
3125 (("pytest<5") "pytest")
3126 (("hypothesis<5") "hypothesis"))
3127 #t)))))
3128 (native-inputs
3129 `(("python-hypothesis" ,python-hypothesis)
3130 ("python-pytest" ,python-pytest)
3131 ("python-pytest-runner" ,python-pytest-runner)))
3132 (propagated-inputs
3133 `(("python-six" ,python-six)))
3134 (synopsis "Persistent data structures for Python")
3135 (description
3136 "Pyrsistent is a number of persistent collections (by some referred to as
3137 functional data structures). Persistent in the sense that they are immutable.
3138
3139 All methods on a data structure that would normally mutate it instead return a
3140 new copy of the structure containing the requested updates. The original
3141 structure is left untouched.")
3142 (license license:expat)))
3143
3144 (define-public python2-pyrsistent
3145 (package-with-python2 python-pyrsistent))
3146
3147 (define-public python-exif-read
3148 (package
3149 (name "python-exif-read")
3150 (version "2.1.2")
3151 (source (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "ExifRead" version))
3154 (sha256
3155 (base32
3156 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3157 (build-system python-build-system)
3158 (arguments `(#:tests? #f)) ; no tests
3159 (home-page "https://github.com/ianare/exif-py")
3160 (synopsis "Python library to extract EXIF data from image files")
3161 (description
3162 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3163 files.")
3164 (license license:bsd-3)))
3165
3166 (define-public python2-exif-read
3167 (package-with-python2 python-exif-read))
3168
3169 (define-public python-pyld
3170 (package
3171 (name "python-pyld")
3172 (version "1.0.5")
3173 (source (origin
3174 (method url-fetch)
3175 (uri (pypi-uri "PyLD" version))
3176 (sha256
3177 (base32
3178 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3179 (build-system python-build-system)
3180 (home-page "https://github.com/digitalbazaar/pyld")
3181 (synopsis "Python implementation of the JSON-LD specification")
3182 (description
3183 "PyLD is an implementation of the JSON-LD specification.")
3184 (license license:bsd-3)))
3185
3186 (define-public python2-pyld
3187 (package-with-python2 python-pyld))
3188
3189 (define-public python-cli-helpers
3190 (package
3191 (name "python-cli-helpers")
3192 (version "2.0.1")
3193 (source
3194 (origin
3195 ;; There's no source tarball on PyPI.
3196 (method git-fetch)
3197 (uri (git-reference
3198 (url "https://github.com/dbcli/cli_helpers")
3199 (commit (string-append "v" version))))
3200 (file-name (git-file-name name version))
3201 (sha256
3202 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3203 (build-system python-build-system)
3204 (native-inputs
3205 `(("python-pytest" ,python-pytest)))
3206 (propagated-inputs
3207 `(("python-wcwidth" ,python-wcwidth)
3208 ("python-configobj" ,python-configobj)
3209 ("python-tabulate" ,python-tabulate)
3210 ("python-terminaltables" ,python-terminaltables)))
3211 (home-page "https://github.com/dbcli/cli_helpers")
3212 (synopsis "Helpers for building command-line apps")
3213 (description
3214 "CLI Helpers is a Python package that makes it easy to perform common
3215 tasks when building command-line apps. It's a helper library for command-line
3216 interfaces.")
3217 (license license:bsd-3)))
3218
3219 (define-public python-click
3220 (package
3221 (name "python-click")
3222 (version "7.1.2")
3223 (source
3224 (origin
3225 (method url-fetch)
3226 (uri (pypi-uri "click" version))
3227 (sha256
3228 (base32
3229 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3230 (build-system python-build-system)
3231 (arguments
3232 `(#:phases
3233 (modify-phases %standard-phases
3234 (add-after 'unpack 'fix-paths
3235 (lambda* (#:key inputs #:allow-other-keys)
3236 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3237 "cross-libc" "libc"))))
3238 (substitute* "src/click/_unicodefun.py"
3239 (("'locale'")
3240 (string-append "'" glibc "/bin/locale'"))))
3241 #t))
3242 (replace 'check
3243 (lambda _
3244 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
3245 (invoke "python" "-m" "pytest"))))))
3246 (native-inputs
3247 `(("python-pytest" ,python-pytest)))
3248 (home-page "https://palletsprojects.com/p/click/")
3249 (synopsis "Command line library for Python")
3250 (description
3251 "Click is a Python package for creating command line interfaces in a
3252 composable way with as little code as necessary. Its name stands for
3253 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3254 with sensible defaults out of the box.")
3255 (license license:bsd-3)))
3256
3257 (define-public python2-click
3258 (package-with-python2 python-click))
3259
3260 (define-public python-click-5
3261 (package (inherit python-click)
3262 (name "python-click")
3263 (version "5.1")
3264 (source
3265 (origin
3266 (method url-fetch)
3267 (uri (pypi-uri "click" version))
3268 (sha256
3269 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3270 (arguments `())))
3271
3272 (define-public python-vcversioner
3273 (package
3274 (name "python-vcversioner")
3275 (version "2.16.0.0")
3276 (source
3277 (origin
3278 (method url-fetch)
3279 (uri (pypi-uri "vcversioner" version))
3280 (sha256
3281 (base32
3282 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3283 (build-system python-build-system)
3284 (synopsis "Python library for version number discovery")
3285 (description "Vcversioner is a Python library that inspects tagging
3286 information in a variety of version control systems in order to discover
3287 version numbers.")
3288 (home-page "https://github.com/habnabit/vcversioner")
3289 (license license:isc)))
3290
3291 (define-public python2-vcversioner
3292 (package-with-python2 python-vcversioner))
3293
3294 (define-public python-jdcal
3295 (package
3296 (name "python-jdcal")
3297 (version "1.4")
3298 (source
3299 (origin
3300 (method url-fetch)
3301 (uri (pypi-uri "jdcal" version))
3302 (sha256
3303 (base32
3304 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3305 (build-system python-build-system)
3306 (arguments
3307 `(#:phases (modify-phases %standard-phases
3308 (replace 'check
3309 (lambda _
3310 (invoke "pytest"))))))
3311 (native-inputs
3312 `(("python-pytest" ,python-pytest)))
3313 (home-page "https://github.com/phn/jdcal")
3314 (synopsis "Functions to convert between Julian dates Gregorian dates")
3315 (description "This Python library provides functions for converting
3316 between Julian dates and Gregorian dates.")
3317 (license license:bsd-2)))
3318
3319 (define-public python2-jdcal
3320 (package-with-python2 python-jdcal))
3321
3322 (define-public python-jsondiff
3323 (package
3324 (name "python-jsondiff")
3325 (version "1.2.0")
3326 (source
3327 (origin
3328 (method url-fetch)
3329 (uri (pypi-uri "jsondiff" version))
3330 (sha256
3331 (base32
3332 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3333 (build-system python-build-system)
3334 (native-inputs
3335 `(("python-nose" ,python-nose)
3336 ("python-nose-random" ,python-nose-random)))
3337 (home-page
3338 "https://github.com/fzumstein/jsondiff")
3339 (synopsis "Compare JSON and JSON-like structures in Python")
3340 (description "@code{jsondiff} is a Python library which lets you
3341 compare, diff, and patch JSON and JSON-like structures in Python.")
3342 (license license:expat)))
3343
3344 (define-public python-jsonschema
3345 (package
3346 (name "python-jsonschema")
3347 (version "3.2.0")
3348 (source (origin
3349 (method url-fetch)
3350 (uri (pypi-uri "jsonschema" version))
3351 (sha256
3352 (base32
3353 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3354 (build-system python-build-system)
3355 (arguments
3356 '(#:phases
3357 (modify-phases %standard-phases
3358 (replace 'check
3359 (lambda* (#:key inputs outputs #:allow-other-keys)
3360 (add-installed-pythonpath inputs outputs)
3361 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3362 (invoke "trial" "jsonschema"))))))
3363 (native-inputs
3364 `(("python-setuptools_scm" ,python-setuptools-scm)
3365 ("python-twisted" ,python-twisted)))
3366 (propagated-inputs
3367 `(("python-attrs" ,python-attrs)
3368 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
3369 ("python-pyrsistent" ,python-pyrsistent)
3370 ("python-six" ,python-six)))
3371 (home-page "https://github.com/Julian/jsonschema")
3372 (synopsis "Implementation of JSON Schema for Python")
3373 (description
3374 "Jsonschema is an implementation of JSON Schema for Python.")
3375 (license license:expat)
3376 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3377
3378 (define-public python2-jsonschema
3379 (let ((jsonschema (package-with-python2
3380 (strip-python2-variant python-jsonschema))))
3381 (package/inherit jsonschema
3382 (propagated-inputs
3383 `(("python2-functools32" ,python2-functools32)
3384 ,@(package-propagated-inputs jsonschema))))))
3385
3386 (define-public python-schema
3387 (package
3388 (name "python-schema")
3389 (version "0.6.6")
3390 (source
3391 (origin
3392 (method url-fetch)
3393 (uri (pypi-uri "schema" version))
3394 (sha256
3395 (base32
3396 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3397 (build-system python-build-system)
3398 (native-inputs
3399 `(("python-pytest" ,python-pytest)))
3400 (home-page "https://github.com/keleshev/schema")
3401 (synopsis "Simple data validation library")
3402 (description
3403 "@code{python-schema} is a library for validating Python data
3404 structures, such as those obtained from config-files, forms, external
3405 services or command-line parsing, converted from JSON/YAML (or
3406 something else) to Python data-types.")
3407 (license license:psfl)))
3408
3409 (define-public python2-schema
3410 (package-with-python2 python-schema))
3411
3412 (define-public python-schema-0.5
3413 (package (inherit python-schema)
3414 (version "0.5.0")
3415 (source
3416 (origin
3417 (method url-fetch)
3418 (uri (pypi-uri "schema" version))
3419 (sha256
3420 (base32
3421 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3422
3423 (define-public python2-schema-0.5
3424 (package-with-python2 python-schema-0.5))
3425
3426 (define-public python-kitchen
3427 (package
3428 (name "python-kitchen")
3429 (version "1.2.5")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "kitchen" version))
3434 (sha256
3435 (base32
3436 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3437 (build-system python-build-system)
3438 (propagated-inputs
3439 `(("python-chardet" ,python-chardet)))
3440 (home-page "https://github.com/fedora-infra/kitchen")
3441 (synopsis "Python API for snippets")
3442 (description "@code{kitchen} module provides a python API for all sorts of
3443 little useful snippets of code that everybody ends up writing for their projects
3444 but never seem big enough to build an independent release. Use kitchen and stop
3445 cutting and pasting that code over and over.")
3446 (license (list license:lgpl2.1+
3447 ;; subprocess.py, test_subprocess.py,
3448 ;; kitchen/pycompat25/defaultdict.py:
3449 license:psfl))))
3450
3451 (define-public python2-kitchen
3452 (package-with-python2 python-kitchen))
3453
3454 (define-public python-roman
3455 (package
3456 (name "python-roman")
3457 (version "3.3")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "roman" version))
3462 (sha256
3463 (base32
3464 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3465 (build-system python-build-system)
3466 (home-page "https://github.com/zopefoundation/roman")
3467 (synopsis "Integer to Roman numerals converter")
3468 (description
3469 "This package provides a small helper library to convert Arabic Numbers
3470 to Roman Numerals.")
3471 (license license:psfl)))
3472
3473 (define-public python-unidecode
3474 (package
3475 (name "python-unidecode")
3476 (version "1.1.1")
3477 (source (origin
3478 (method url-fetch)
3479 (uri (pypi-uri "Unidecode" version))
3480 (sha256
3481 (base32
3482 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3483 (build-system python-build-system)
3484 (home-page "https://pypi.org/project/Unidecode/")
3485 (synopsis "ASCII transliterations of Unicode text")
3486 (description
3487 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3488 useful when integrating with legacy code that doesn't support Unicode, or for
3489 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3490 machine identifiers from human-readable Unicode strings that should still be
3491 somewhat intelligible.")
3492 (license license:gpl2+)))
3493
3494 (define-public python2-unidecode
3495 (package-with-python2 python-unidecode))
3496
3497 (define-public python-text-unidecode
3498 (package
3499 (name "python-text-unidecode")
3500 (version "1.3")
3501 (source (origin
3502 (method url-fetch)
3503 (uri (pypi-uri "text-unidecode" version))
3504 (sha256
3505 (base32
3506 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3507 (build-system python-build-system)
3508 (arguments
3509 '(#:phases (modify-phases %standard-phases
3510 (replace 'check
3511 (lambda _
3512 (setenv "PYTHONPATH"
3513 (string-append "./build/lib:"
3514 (getenv "PYTHONPATH")))
3515 (invoke "pytest" "-vv"))))))
3516 (native-inputs
3517 `(("python-pytest" ,python-pytest)))
3518 (home-page "https://github.com/kmike/text-unidecode/")
3519 (synopsis "Decode Unicode data")
3520 (description
3521 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3522 Perl library. It can create ASCII representations of Unicode data. In general
3523 users should prefer the @code{python-unidecode} package which offers better
3524 memory usage and transliteration quality.")
3525 ;; The user can choose either license.
3526 (license (list license:clarified-artistic license:gpl2+))))
3527
3528 (define-public python2-text-unidecode
3529 (package-with-python2 python-text-unidecode))
3530
3531 (define-public python-pyjwt
3532 (package
3533 (name "python-pyjwt")
3534 (version "1.7.1")
3535 (source
3536 (origin
3537 (method url-fetch)
3538 (uri (pypi-uri "PyJWT" version))
3539 (sha256
3540 (base32
3541 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3542 (modules '((guix build utils)))
3543 (snippet
3544 '(begin
3545 (for-each delete-file-recursively
3546 (find-files "." "\\.pyc$"))
3547 #t))))
3548 (build-system python-build-system)
3549 (arguments
3550 '(#:phases (modify-phases %standard-phases
3551 (replace 'check
3552 (lambda _
3553 ;; Mimic upstream commit 3a20892442b34c7 to get
3554 ;; rid of dependency on pytest-runner < 5.0.
3555 ;; Remove substitution for PyJWT > 1.7.1.
3556 (substitute* "setup.py"
3557 ((".*pytest-runner.*")
3558 ""))
3559 (invoke "pytest" "-vv"))))))
3560 (native-inputs
3561 `(("python-pytest" ,python-pytest)
3562 ("python-pytest-cov" ,python-pytest-cov)))
3563 (home-page "https://github.com/progrium/pyjwt")
3564 (synopsis "JSON Web Token implementation in Python")
3565 (description
3566 "PyJWT is a JSON Web Token implementation written in Python.")
3567 (license license:expat)))
3568
3569 (define-public python2-pyjwt
3570 (package-with-python2 python-pyjwt))
3571
3572 (define-public python-pymsgbox
3573 (package
3574 (name "python-pymsgbox")
3575 (version "1.0.6")
3576 (source
3577 (origin
3578 (method git-fetch)
3579 (uri (git-reference
3580 ;; LICENSE.txt is not present on pypi
3581 (url "https://github.com/asweigart/PyMsgBox")
3582 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3583 (file-name (git-file-name name version))
3584 (sha256
3585 (base32
3586 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3587 (arguments
3588 ;; Circular dependency to run tests:
3589 ;; Tests need pyautogui, which depends on pymsgbox.
3590 '(#:tests? #f))
3591 (build-system python-build-system)
3592 (home-page "https://github.com/asweigart/PyMsgBox")
3593 (synopsis "Python module for JavaScript-like message boxes")
3594 (description
3595 "PyMsgBox is a simple, cross-platform, pure Python module for
3596 JavaScript-like message boxes. Types of dialog boxes include:
3597 @enumerate
3598 @item alert
3599 @item confirm
3600 @item prompt
3601 @item password
3602 @end enumerate
3603 ")
3604 (license license:bsd-3)))
3605
3606 (define-public python-pympler
3607 (package
3608 (name "python-pympler")
3609 (home-page "https://pythonhosted.org/Pympler/")
3610 (version "0.8")
3611 (source (origin
3612 (method url-fetch)
3613 (uri (pypi-uri "Pympler" version))
3614 (sha256
3615 (base32
3616 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3617 (build-system python-build-system)
3618 (arguments
3619 `(#:phases (modify-phases %standard-phases
3620 (delete 'check)
3621 (add-after 'install 'check
3622 (lambda* (#:key inputs outputs #:allow-other-keys)
3623 (add-installed-pythonpath inputs outputs)
3624 (invoke "python" "setup.py" "test"))))))
3625 (synopsis "Measure, monitor and analyze memory behavior")
3626 (description
3627 "Pympler is a development tool to measure, monitor and analyze
3628 the memory behavior of Python objects in a running Python application.
3629
3630 By pympling a Python application, detailed insight in the size and the
3631 lifetime of Python objects can be obtained. Undesirable or unexpected
3632 runtime behavior like memory bloat and other @samp{pymples} can easily
3633 be identified.
3634
3635 A web profiling frontend exposes process statistics, garbage
3636 visualisation and class tracker statistics.")
3637 (license license:asl2.0)))
3638
3639 (define-public python2-pympler
3640 (package-with-python2 python-pympler))
3641
3642 (define-public python-itsdangerous
3643 (package
3644 (name "python-itsdangerous")
3645 (version "1.1.0")
3646 (source
3647 (origin
3648 (method url-fetch)
3649 (uri (pypi-uri "itsdangerous" version))
3650 (sha256
3651 (base32
3652 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3653 (build-system python-build-system)
3654 (home-page "https://palletsprojects.com/p/itsdangerous/")
3655 (synopsis "Python library for passing data to/from untrusted environments")
3656 (description
3657 "Itsdangerous provides various helpers to pass trusted data to untrusted
3658 environments and back.")
3659 (license license:bsd-3)))
3660
3661 (define-public python2-itsdangerous
3662 (package-with-python2 python-itsdangerous))
3663
3664 (define-public python-pyyaml
3665 (package
3666 (name "python-pyyaml")
3667 (version "5.4.1")
3668 (source
3669 (origin
3670 (method url-fetch)
3671 (uri (pypi-uri "PyYAML" version))
3672 (sha256
3673 (base32
3674 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3675 (build-system python-build-system)
3676 (inputs
3677 `(("libyaml" ,libyaml)))
3678 (home-page "https://pyyaml.org")
3679 (synopsis "YAML parser and emitter for Python")
3680 (description
3681 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3682 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3683 API, and sensible error messages. PyYAML supports standard YAML tags and
3684 provides Python-specific tags that represent an arbitrary Python object.")
3685 (license license:expat)))
3686
3687 (define-public python2-pyyaml
3688 (package-with-python2 python-pyyaml))
3689
3690 (define-public python-vine
3691 (package
3692 (name "python-vine")
3693 (version "1.1.4")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (pypi-uri "vine" version))
3698 (sha256
3699 (base32
3700 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3701 (build-system python-build-system)
3702 (native-inputs
3703 `(("python-pytest" ,python-pytest)
3704 ("python-case" ,python-case)))
3705 (home-page "https://github.com/celery/vine")
3706 (synopsis "Promises for Python")
3707 (description
3708 "@code{vine} provides a special implementation of promises in that it can
3709 be used both for \"promise of a value\" and lazy evaluation. The biggest
3710 upside for this is that everything in a promise can also be a promise,
3711 e.g. filters, callbacks and errbacks can all be promises.")
3712 (license license:bsd-3)))
3713
3714 (define-public python-virtualenv
3715 (package
3716 (name "python-virtualenv")
3717 (version "20.2.1")
3718 (source
3719 (origin
3720 (method url-fetch)
3721 (uri (pypi-uri "virtualenv" version))
3722 (sha256
3723 (base32
3724 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3725 (build-system python-build-system)
3726 (native-inputs
3727 `(("python-mock" ,python-mock)
3728 ("python-pytest" ,python-pytest)
3729 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3730 ;; be an input at all". However, removing the input makes the build error:
3731 ;; File "setup.py", line 4, in <module>
3732 ;; raise RuntimeError("setuptools >= 41 required to build")
3733 ("python-setuptools" ,python-setuptools)
3734 ("python-setuptools-scm" ,python-setuptools-scm)))
3735 (propagated-inputs
3736 `(("python-appdirs" ,python-appdirs)
3737 ("python-distlib" ,python-distlib/next)
3738 ("python-filelock" ,python-filelock)
3739 ("python-six" ,python-six)
3740 ("python-importlib-metadata" ,python-importlib-metadata)))
3741 (home-page "https://virtualenv.pypa.io/")
3742 (synopsis "Virtual Python environment builder")
3743 (description
3744 "Virtualenv is a tool to create isolated Python environments.")
3745 (license license:expat)))
3746
3747 (define-public python-markupsafe
3748 (package
3749 (name "python-markupsafe")
3750 (version "1.1.1")
3751 (source
3752 (origin
3753 (method url-fetch)
3754 (uri (pypi-uri "MarkupSafe" version))
3755 (sha256
3756 (base32
3757 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3758 (build-system python-build-system)
3759 (arguments
3760 `(#:modules ((ice-9 ftw)
3761 (srfi srfi-1)
3762 (srfi srfi-26)
3763 (guix build utils)
3764 (guix build python-build-system))
3765 #:phases (modify-phases %standard-phases
3766 (replace 'check
3767 (lambda _
3768 (let ((cwd (getcwd))
3769 (libdir (find (cut string-prefix? "lib." <>)
3770 (scandir "build"))))
3771 (setenv "PYTHONPATH"
3772 (string-append cwd "/build/" libdir ":"
3773 (getenv "PYTHONPATH")))
3774 (invoke "pytest" "-vv")))))))
3775 (native-inputs
3776 `(("python-pytest" ,python-pytest)))
3777 (home-page "https://github.com/mitsuhiko/markupsafe")
3778 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3779 (description
3780 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3781 for Python.")
3782 (license license:bsd-3)))
3783
3784 (define-public python2-markupsafe
3785 (package-with-python2 python-markupsafe))
3786
3787 (define-public python-jinja2
3788 (package
3789 (name "python-jinja2")
3790 (version "2.11.2")
3791 (source
3792 (origin
3793 (method url-fetch)
3794 (uri (pypi-uri "Jinja2" version))
3795 (sha256
3796 (base32
3797 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3798 (build-system python-build-system)
3799 (arguments
3800 '(#:phases (modify-phases %standard-phases
3801 (replace 'check
3802 (lambda* (#:key tests? #:allow-other-keys)
3803 (if tests?
3804 (begin
3805 (setenv "PYTHONPATH"
3806 (string-append "./build/lib:"
3807 (getenv "PYTHONPATH")))
3808 (invoke "pytest" "-vv"))
3809 (format #t "test suite not run~%"))
3810 #t)))))
3811 (native-inputs
3812 `(("python-pytest" ,python-pytest)))
3813 (propagated-inputs
3814 `(("python-markupsafe" ,python-markupsafe)))
3815 (home-page "http://jinja.pocoo.org/")
3816 (synopsis "Python template engine")
3817 (description
3818 "Jinja2 is a small but fast and easy to use stand-alone template engine
3819 written in pure Python.")
3820 (license license:bsd-3)))
3821
3822 (define-public python2-jinja2
3823 (package-with-python2 python-jinja2))
3824
3825 (define-public python-jinja2-time
3826 (package
3827 (name "python-jinja2-time")
3828 (version "0.2.0")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "jinja2-time" version))
3833 (sha256
3834 (base32
3835 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3836 (build-system python-build-system)
3837 (propagated-inputs
3838 `(("python-arrow" ,python-arrow)
3839 ("python-jinja2" ,python-jinja2)))
3840 (home-page
3841 "https://github.com/hackebrot/jinja2-time")
3842 (synopsis "Jinja2 Extension for Dates and Times")
3843 (description
3844 "This package provides an extension for the template engine Jinja2. It
3845 adds a 'now' tag providing a convenient access to the arrow.now() API from
3846 templates. A format string can be provided to control the output.")
3847 (license license:expat)))
3848
3849 (define-public python-pystache
3850 (package
3851 (name "python-pystache")
3852 (version "0.5.4")
3853 (source (origin
3854 (method url-fetch)
3855 (uri (pypi-uri "pystache" version))
3856 (sha256
3857 (base32
3858 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3859 (build-system python-build-system)
3860 (arguments
3861 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3862 (home-page "http://defunkt.io/pystache/")
3863 (synopsis "Python logic-less template engine")
3864 (description
3865 "Pystache is a Python implementation of the framework agnostic,
3866 logic-free templating system Mustache.")
3867 (license license:expat)
3868 (properties `((python2-variant . ,(delay python2-pystache))))))
3869
3870 (define-public python2-pystache
3871 (let ((base (package-with-python2
3872 (strip-python2-variant python-pystache))))
3873 (package/inherit base
3874 (arguments
3875 `(#:python ,python-2
3876 #:phases
3877 (modify-phases %standard-phases
3878 (replace 'check
3879 (lambda _
3880 (invoke "python" "test_pystache.py")))))))))
3881
3882 (define-public python-joblib
3883 (package
3884 (name "python-joblib")
3885 (version "0.14.1")
3886 (source (origin
3887 (method url-fetch)
3888 (uri (pypi-uri "joblib" version))
3889 (sha256
3890 (base32
3891 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3892 (build-system python-build-system)
3893 (arguments
3894 `(#:phases
3895 (modify-phases %standard-phases
3896 (replace 'check
3897 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3898 (native-inputs
3899 `(("python-pytest" ,python-pytest)))
3900 (home-page "https://joblib.readthedocs.io/")
3901 (synopsis "Using Python functions as pipeline jobs")
3902 (description
3903 "Joblib is a set of tools to provide lightweight pipelining in Python.
3904 In particular, joblib offers: transparent disk-caching of the output values
3905 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3906 logging and tracing of the execution.")
3907 (license license:bsd-3)))
3908
3909 (define-public python2-joblib
3910 (package-with-python2 python-joblib))
3911
3912 (define-public python-daemon
3913 (package
3914 (name "python-daemon")
3915 (version "2.2.3")
3916 (source
3917 (origin
3918 (method url-fetch)
3919 (uri (pypi-uri "python-daemon" version))
3920 (sha256
3921 (base32
3922 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3923 (build-system python-build-system)
3924 (arguments
3925 `(#:phases
3926 (modify-phases %standard-phases
3927 (add-before 'check 'disable-tests
3928 (lambda _
3929 ;; FIXME: Determine why test fails
3930 (substitute* "test/test_daemon.py"
3931 (("test_detaches_process_context")
3932 "skip_test_detaches_process_context"))
3933 #t)))))
3934 (propagated-inputs
3935 `(("python-lockfile" ,python-lockfile)))
3936 (native-inputs
3937 `(("python-unittest2" ,python-unittest2)
3938 ("python-testtools" ,python-testtools)
3939 ("python-testscenarios" ,python-testscenarios)
3940 ("python-mock" ,python-mock)
3941 ("python-docutils" ,python-docutils)))
3942 (home-page "https://pagure.io/python-daemon/")
3943 (synopsis "Python library for making a Unix daemon process")
3944 (description "Python-daemon is a library that assists a Python program to
3945 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3946
3947 This library provides a @code{DaemonContext} class that manages the following
3948 important tasks for becoming a daemon process:
3949 @enumerate
3950 @item Detach the process into its own process group.
3951 @item Set process environment appropriate for running inside a chroot.
3952 @item Renounce suid and sgid privileges.
3953 @item Close all open file descriptors.
3954 @item Change the working directory, uid, gid, and umask.
3955 @item Set appropriate signal handlers.
3956 @item Open new file descriptors for stdin, stdout, and stderr.
3957 @item Manage a specified PID lock file.
3958 @item Register cleanup functions for at-exit processing.
3959 @end enumerate")
3960 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3961 (license (list license:asl2.0 license:gpl3+))))
3962
3963 (define-public python-anytree
3964 (package
3965 (name "python-anytree")
3966 (version "2.8.0")
3967 (source (origin
3968 (method url-fetch)
3969 (uri (pypi-uri "anytree" version))
3970 (sha256
3971 (base32
3972 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3973 (build-system python-build-system)
3974 (propagated-inputs
3975 `(("python-six" ,python-six)))
3976 (native-inputs
3977 `(;; For tests.
3978 ("graphviz" ,graphviz) ;for 'dot'
3979 ("python-nose" ,python-nose)))
3980 (home-page "https://github.com/c0fec0de/anytree")
3981 (synopsis "Lightweight tree data library")
3982 (description
3983 "@code{anytree} is a simple, lightweight, and extensible tree data
3984 structure for Python.")
3985 (license license:asl2.0)))
3986
3987 (define-public python-docutils
3988 (package
3989 (name "python-docutils")
3990 (version "0.16")
3991 (source
3992 (origin
3993 (method url-fetch)
3994 (uri (pypi-uri "docutils" version))
3995 (sha256
3996 (base32
3997 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3998 (build-system python-build-system)
3999 (arguments
4000 '(#:phases (modify-phases %standard-phases
4001 (replace 'check
4002 (lambda* (#:key tests? #:allow-other-keys)
4003 (if tests?
4004 (invoke "python" "test/alltests.py")
4005 (format #t "test suite not run~%"))
4006 #t)))))
4007 (home-page "http://docutils.sourceforge.net/")
4008 (synopsis "Python Documentation Utilities")
4009 (description
4010 "Docutils is a modular system for processing documentation into useful
4011 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
4012 easy to use markup language, for input.
4013
4014 This package provides tools for converting @file{.rst} files to other formats
4015 via commands such as @command{rst2man}, as well as supporting Python code.")
4016 ;; Most of the source code is public domain, but some source files are
4017 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
4018 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
4019
4020 (define-public python2-docutils
4021 (package-with-python2 python-docutils))
4022
4023 ;; python2-sphinx fails its test suite with newer versions.
4024 (define-public python2-docutils-0.14
4025 (package
4026 (inherit python2-docutils)
4027 (version "0.14")
4028 (source (origin
4029 (method url-fetch)
4030 (uri (pypi-uri "docutils" version))
4031 (sha256
4032 (base32
4033 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
4034
4035 (define-public python-restructuredtext-lint
4036 (package
4037 (name "python-restructuredtext-lint")
4038 (version "1.3.0")
4039 (source
4040 (origin
4041 (method url-fetch)
4042 (uri (pypi-uri "restructuredtext-lint" version))
4043 (sha256
4044 (base32
4045 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4046 (build-system python-build-system)
4047 (arguments
4048 `(#:phases
4049 (modify-phases %standard-phases
4050 (delete 'check)
4051 (add-after 'install 'check
4052 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4053 (when tests?
4054 (add-installed-pythonpath inputs outputs)
4055 (invoke "nosetests" "-v"))
4056 #t)))))
4057 (propagated-inputs
4058 `(("python-docutils" ,python-docutils)))
4059 (native-inputs
4060 `(("python-nose" ,python-nose)))
4061 (home-page "https://github.com/twolfson/restructuredtext-lint")
4062 (synopsis "reStructuredText linter")
4063 (description "This package provides a linter for the reStructuredText
4064 format.")
4065 (license license:unlicense)))
4066
4067 (define-public python-doc8
4068 (package
4069 (name "python-doc8")
4070 (version "0.8.0")
4071 (source
4072 (origin
4073 (method url-fetch)
4074 (uri (pypi-uri "doc8" version))
4075 (sha256
4076 (base32
4077 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4078 (build-system python-build-system)
4079 (arguments
4080 `(#:phases
4081 (modify-phases %standard-phases
4082 (delete 'check)
4083 (add-after 'install 'check
4084 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4085 (when tests?
4086 (add-installed-pythonpath inputs outputs)
4087 (invoke "pytest" "-v"))
4088 #t)))))
4089 (propagated-inputs
4090 `(("python-chardet" ,python-chardet)
4091 ("python-docutils" ,python-docutils)
4092 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
4093 ("python-six" ,python-six)
4094 ("python-stevedore" ,python-stevedore)))
4095 (native-inputs
4096 `(("python-testtools" ,python-testtools)
4097 ("python-pytest" ,python-pytest)))
4098 (home-page "https://launchpad.net/doc8")
4099 (synopsis
4100 "Style checker for Sphinx (or other) RST documentation")
4101 (description
4102 "Doc8 is an opinionated style checker for reStructured Text and plain
4103 text styles of documentation.")
4104 (license license:asl2.0)))
4105
4106 (define-public python-pygments
4107 (package
4108 (name "python-pygments")
4109 (version "2.7.3")
4110 (source
4111 (origin
4112 (method url-fetch)
4113 (uri (pypi-uri "Pygments" version))
4114 (sha256
4115 (base32
4116 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
4117 (replacement python-pygments/fixed)
4118 (build-system python-build-system)
4119 (arguments
4120 ;; FIXME: Tests require sphinx, which depends on this.
4121 '(#:tests? #f))
4122 (home-page "https://pygments.org/")
4123 (synopsis "Syntax highlighting")
4124 (description
4125 "Pygments is a syntax highlighting package written in Python.")
4126 (license license:bsd-2)
4127 (properties `((python2-variant . ,(delay python2-pygments))))))
4128
4129 (define python-pygments/fixed
4130 (package
4131 (inherit python-pygments)
4132 (version "2.7.4")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (pypi-uri "Pygments" version))
4137 (sha256
4138 (base32
4139 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
4140
4141 ;; Pygments 2.6 and later does not support Python 2.
4142 (define-public python2-pygments
4143 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4144 (package
4145 (inherit base)
4146 (version "2.5.2")
4147 (source (origin
4148 (method url-fetch)
4149 (uri (pypi-uri "Pygments" version))
4150 (sha256
4151 (base32
4152 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4153
4154 (define-public python-pygments-github-lexers
4155 (package
4156 (name "python-pygments-github-lexers")
4157 (version "0.0.5")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (pypi-uri "pygments-github-lexers" version))
4162 (sha256
4163 (base32
4164 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4165 (build-system python-build-system)
4166 (propagated-inputs
4167 `(("python-pygments" ,python-pygments)))
4168 (home-page "https://github.com/liluo/pygments-github-lexers")
4169 (synopsis "Pygments Github custom lexers")
4170 (description "This package installs Github custom lexers to Pygments.")
4171 (license license:bsd-3)))
4172
4173 (define-public python-bump2version
4174 (package
4175 (name "python-bump2version")
4176 (version "1.0.1")
4177 (source
4178 (origin
4179 (method url-fetch)
4180 (uri (pypi-uri "bump2version" version))
4181 (sha256
4182 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4183 (build-system python-build-system)
4184 (arguments
4185 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4186 ;; required: --new-version".
4187 `(#:tests? #false))
4188 (home-page "https://github.com/c4urself/bump2version")
4189 (synopsis "Version-bump your software with a single command!")
4190 (description
4191 "This package provides a small command line tool to simplify releasing
4192 software by updating all version strings in your source code by the correct
4193 increment. It also creates commits and tags.")
4194 (license license:expat)))
4195
4196 (define-public python-bumpversion
4197 (package
4198 (name "python-bumpversion")
4199 (version "0.5.3")
4200 (source
4201 (origin
4202 (method url-fetch)
4203 (uri (pypi-uri "bumpversion" version))
4204 (sha256
4205 (base32
4206 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4207 (build-system python-build-system)
4208 (home-page "https://github.com/peritus/bumpversion")
4209 (synopsis "Tool to bump software version")
4210 (description "This tool provides a command-line interface (CLI) to bump a
4211 software version simply.")
4212 (license license:expat)))
4213
4214 (define-public python-deprecated
4215 (package
4216 (name "python-deprecated")
4217 (version "1.2.5")
4218 (source
4219 (origin
4220 (method git-fetch)
4221 (uri (git-reference
4222 (url "https://github.com/tantale/deprecated")
4223 (commit (string-append "v" version))))
4224 (file-name (git-file-name name version))
4225 (sha256
4226 (base32
4227 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4228 (build-system python-build-system)
4229 (arguments
4230 `(#:phases (modify-phases %standard-phases
4231 (replace 'check
4232 (lambda _
4233 (invoke "pytest"))))))
4234 (propagated-inputs
4235 `(("python-wrapt" ,python-wrapt)))
4236 (native-inputs
4237 `(("python-bumpversion" ,python-bumpversion)
4238 ("python-pytest" ,python-pytest)
4239 ("python-pytest-cov" ,python-pytest-cov)
4240 ("python-sphinx" ,python-sphinx)
4241 ("python-tox" ,python-tox)))
4242 (home-page "https://github.com/tantale/deprecated")
4243 (synopsis "Python decorator to deprecate classes, functions or methods")
4244 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4245 to deprecate classes, functions or methods.")
4246 (license license:expat)))
4247
4248 (define-public python-pygithub
4249 (package
4250 (name "python-pygithub")
4251 (version "1.54.1")
4252 (source
4253 ;; We fetch from the Git repo because there are no tests in the PyPI
4254 ;; archive.
4255 (origin
4256 (method git-fetch)
4257 (uri (git-reference
4258 (url "https://github.com/PyGithub/PyGithub")
4259 (commit (string-append "v" version))))
4260 (file-name (git-file-name name version))
4261 (sha256
4262 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4263 (build-system python-build-system)
4264 (arguments
4265 `(#:phases
4266 (modify-phases %standard-phases
4267 (replace 'check
4268 (lambda* (#:key tests? #:allow-other-keys)
4269 (when tests?
4270 (invoke "pytest"))
4271 #t)))))
4272 (propagated-inputs
4273 `(("python-cryptography" ,python-cryptography)
4274 ("python-deprecated" ,python-deprecated)
4275 ("python-pyjwt" ,python-pyjwt)
4276 ("python-requests" ,python-requests)))
4277 (native-inputs
4278 `(("python-httpretty" ,python-httpretty)
4279 ("python-pytest" ,python-pytest)))
4280 (home-page "https://pygithub.readthedocs.io/en/latest/")
4281 (synopsis "Python library for the GitHub API")
4282 (description "This library allows managing GitHub resources such as
4283 repositories, user profiles, and organizations in your Python applications,
4284 using version 3 of the GitHub application programming interface (API).")
4285 (license license:lgpl3+)))
4286
4287 (define-public python-rellu
4288 (package
4289 (name "python-rellu")
4290 (version "0.7")
4291 (source
4292 (origin
4293 (method url-fetch)
4294 (uri (pypi-uri "rellu" version))
4295 (sha256
4296 (base32
4297 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4298 (build-system python-build-system)
4299 (propagated-inputs
4300 `(("python-invoke" ,python-invoke)
4301 ("python-pygithub" ,python-pygithub)))
4302 (home-page "https://github.com/robotframework/rellu")
4303 (synopsis "Utilities to create PyPI releases")
4304 (description "This collection of utilities contains tooling and templates
4305 to assist in creating releases on GitHub and publishing them on PyPI. It is
4306 designed to be used by Robot Framework and tools and libraries in its
4307 ecosystem, but can naturally be used also by other projects.")
4308 (license license:asl2.0)))
4309
4310 (define-public python-robotframework
4311 (package
4312 (name "python-robotframework")
4313 (version "3.2.2")
4314 ;; There are no tests in the PyPI archive.
4315 (source
4316 (origin
4317 (method git-fetch)
4318 (uri (git-reference
4319 (url "https://github.com/robotframework/robotframework")
4320 (commit (string-append "v" version))))
4321 (file-name (git-file-name name version))
4322 (sha256
4323 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
4324 (patches (search-patches
4325 "python-robotframework-source-date-epoch.patch"))))
4326 (build-system python-build-system)
4327 (arguments
4328 `(#:phases (modify-phases %standard-phases
4329 (add-before 'build 'build-and-install-doc
4330 (lambda* (#:key outputs #:allow-other-keys)
4331 (let* ((doc-output (assoc-ref outputs "doc"))
4332 (doc (string-append doc-output "/share/"
4333 ,name "-" ,version "/")))
4334 (invoke "invoke" "library-docs" "all")
4335 (mkdir-p doc)
4336 (copy-recursively "doc/libraries"
4337 (string-append doc "/libraries"))
4338 #t)))
4339 (replace 'check
4340 (lambda* (#:key inputs #:allow-other-keys)
4341 ;; Some tests require timezone data. Otherwise, they
4342 ;; look up /etc/localtime, which doesn't exist, and fail
4343 ;; with:
4344 ;;
4345 ;; OverflowError: mktime argument out of range
4346 (setenv "TZDIR"
4347 (string-append (assoc-ref inputs "tzdata")
4348 "/share/zoneinfo"))
4349 (setenv "TZ" "Europe/Paris")
4350
4351 (invoke "python" "utest/run.py"))))))
4352 (native-inputs
4353 `(("python-invoke" ,python-invoke)
4354 ("python-rellu" ,python-rellu)
4355 ("python:tk" ,python "tk") ;used when building the HTML doc
4356 ("tzdata" ,tzdata-for-tests)))
4357 (outputs '("out" "doc"))
4358 (home-page "https://robotframework.org")
4359 (synopsis "Generic automation framework")
4360 (description "Robot Framework is a generic automation framework for
4361 acceptance testing, acceptance test driven development (ATDD), and robotic
4362 process automation (RPA).")
4363 (license license:asl2.0)))
4364
4365 (define-public python-robotframework-lint
4366 ;; There is no properly tagged release; the commit below seems to correspond
4367 ;; to the 0.9 stable release available from PyPI. The tests are not
4368 ;; included in the PyPI archive, so we fetch the sources from the upstream
4369 ;; Git repo.
4370 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4371 (revision "0"))
4372 (package
4373 (name "python-robotframework-lint")
4374 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4375 revision commit))
4376 (source
4377 (origin
4378 (method git-fetch)
4379 (uri (git-reference
4380 (url "https://github.com/boakley/robotframework-lint")
4381 (commit commit)))
4382 (file-name (git-file-name name version))
4383 (sha256
4384 (base32
4385 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4386 (build-system python-build-system)
4387 (arguments
4388 `(#:phases
4389 (modify-phases %standard-phases
4390 (replace 'check
4391 (lambda _
4392 (invoke "python" "-m" "robot" "-A"
4393 "tests/conf/default.args" "tests"))))))
4394 (propagated-inputs
4395 `(("python-robotframework" ,python-robotframework)))
4396 (home-page "https://github.com/boakley/robotframework-lint/")
4397 (synopsis "Static analysis tool (linter) for Robot Framework")
4398 (description "This package provides the @code{rflint} command-line
4399 utility, a static analysis tool (linter) for Robot Framework source files.")
4400 (license license:asl2.0))))
4401
4402 (define-public python-robotframework-sshlibrary
4403 (package
4404 (name "python-robotframework-sshlibrary")
4405 (version "3.3.0")
4406 ;; There are no tests in the PyPI archive.
4407 (source
4408 (origin
4409 (method git-fetch)
4410 (uri (git-reference
4411 (url "https://github.com/robotframework/SSHLibrary")
4412 (commit (string-append "v" version))))
4413 (file-name (git-file-name name version))
4414 (sha256
4415 (base32
4416 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4417 (build-system python-build-system)
4418 (arguments
4419 `(#:phases
4420 (modify-phases %standard-phases
4421 (add-before 'build 'build-and-install-doc
4422 (lambda* (#:key outputs #:allow-other-keys)
4423 (let* ((doc-output (assoc-ref outputs "doc"))
4424 (doc (string-append doc-output "/share/"
4425 ,name "-" ,version "/")))
4426 (invoke "chmod" "-R" "+w" "docs")
4427 (invoke "invoke" "kw-docs" "project-docs")
4428 (mkdir-p doc)
4429 (for-each delete-file (find-files "docs" "\\.rst"))
4430 (copy-recursively "docs" doc)
4431 #t)))
4432 (replace 'check
4433 (lambda _
4434 ;; Some tests require an SSH server; we remove them.
4435 (delete-file "utest/test_client_api.py")
4436 (delete-file "utest/test_scp.py")
4437 (invoke "python" "utest/run.py"))))))
4438 (propagated-inputs
4439 `(("python-robotframework" ,python-robotframework)
4440 ("python-paramiko" ,python-paramiko)
4441 ("python-scp" ,python-scp)))
4442 (native-inputs
4443 `(("openssh" ,openssh)
4444 ("which" ,which)
4445 ;; To generate the documentation
4446 ("python-docutils" ,python-docutils)
4447 ("python-invoke" ,python-invoke)
4448 ("python-pygments" ,python-pygments)
4449 ("python-rellu" ,python-rellu)))
4450 (outputs '("out" "doc"))
4451 (home-page "https://github.com/robotframework/SSHLibrary")
4452 (synopsis "Robot Framework library for SSH and SFTP")
4453 (description "SSHLibrary is a Robot Framework library providing support
4454 for SSH and SFTP. It has the following main usages:
4455 @itemize @bullet
4456 @item Executing commands on the remote machine, either blocking or non-blocking.
4457 @item Writing and reading in an interactive shell.
4458 @item Transferring files and directories over SFTP.
4459 @item Ensuring that files and directories exist on the remote machine.
4460 @end itemize")
4461 (license license:asl2.0)))
4462
4463 (define-public python-rstr
4464 (package
4465 (name "python-rstr")
4466 (version "2.2.6")
4467 (source
4468 (origin
4469 (method url-fetch)
4470 (uri (pypi-uri "rstr" version))
4471 (sha256
4472 (base32
4473 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4474 (build-system python-build-system)
4475 (home-page "https://github.com/leapfrogonline/rstr")
4476 (synopsis "Generate random strings in Python")
4477 (description "This package provides a python module for generating
4478 random strings of various types. It could be useful for fuzz testing,
4479 generating dummy data, or other applications. It has no dependencies
4480 outside the standard library.")
4481 (license license:bsd-3)))
4482
4483 (define-public python-scp
4484 (package
4485 (name "python-scp")
4486 (version "0.13.3")
4487 (source
4488 (origin
4489 (method url-fetch)
4490 (uri (pypi-uri "scp" version))
4491 (sha256
4492 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4493 (build-system python-build-system)
4494 (arguments
4495 '(#:tests? #f)) ;tests require an SSH server
4496 (propagated-inputs
4497 `(("python-paramiko" ,python-paramiko)))
4498 (home-page "https://github.com/jbardin/scp.py")
4499 (synopsis "SCP protocol module for Python and Paramiko")
4500 (description "The scp module extends the Paramiko library to send and
4501 receive files via the SCP1 protocol, as implemented by the OpenSSH
4502 @command{scp} program.")
4503 (license license:gpl2+)))
4504
4505 (define-public python-rst.linker
4506 (package
4507 (name "python-rst.linker")
4508 (version "1.11")
4509 (source
4510 (origin
4511 (method url-fetch)
4512 (uri (pypi-uri "rst.linker" version))
4513 (sha256
4514 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4515 (build-system python-build-system)
4516 (propagated-inputs
4517 `(("python-dateutil" ,python-dateutil)
4518 ("python-six" ,python-six)))
4519 (native-inputs
4520 `(("python-setuptools-scm" ,python-setuptools-scm)))
4521 ;; Test would require path.py, which would introduce a cyclic dependence.
4522 (arguments `(#:tests? #f))
4523 ;; Note: As of version 1.7 the documentation is not worth building.
4524 (home-page "https://github.com/jaraco/rst.linker")
4525 (synopsis "Sphinx plugin to add links and timestamps")
4526 (description "rst.linker automatically replaces text by a
4527 reStructuredText external reference or timestamps. It's primary purpose is to
4528 augment the changelog, but it can be used for other documents, too.")
4529 (license license:expat)))
4530
4531 (define-public python2-rst.linker
4532 (package-with-python2 python-rst.linker))
4533
4534 (define-public python-sshpubkeys
4535 (package
4536 (name "python-sshpubkeys")
4537 (version "3.1.0")
4538 (home-page "https://github.com/ojarva/python-sshpubkeys")
4539 (source (origin
4540 (method git-fetch)
4541 (uri (git-reference
4542 (url home-page)
4543 (commit (string-append "v" version))))
4544 (file-name (git-file-name name version))
4545 (sha256
4546 (base32
4547 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4548 (build-system python-build-system)
4549 (propagated-inputs
4550 `(("python-cryptography" ,python-cryptography)
4551 ("python-ecdsa" ,python-ecdsa)))
4552 (synopsis "OpenSSH public key parser")
4553 (description
4554 "This package provides a library for parsing and validating OpenSSH
4555 public key files.")
4556 (license license:bsd-3)))
4557
4558 (define-public python-feedgenerator
4559 (package
4560 (name "python-feedgenerator")
4561 (version "1.9")
4562 (source
4563 (origin
4564 (method url-fetch)
4565 (uri (pypi-uri "feedgenerator" version))
4566 (sha256
4567 (base32
4568 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4569 (modules '((guix build utils)))
4570 (snippet
4571 '(begin
4572 ;; Remove pre-compiled .pyc files from source.
4573 (for-each delete-file-recursively
4574 (find-files "." "__pycache__" #:directories? #t))
4575 (for-each delete-file (find-files "." "\\.pyc$"))
4576 #t))))
4577 (build-system python-build-system)
4578 (propagated-inputs
4579 `(("python-pytz" ,python-pytz)
4580 ("python-six" ,python-six)))
4581 (home-page "https://github.com/getpelican/feedgenerator")
4582 (synopsis
4583 "Standalone version of Django's Atom/RSS feed generator")
4584 (description
4585 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4586 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4587 (license license:bsd-3)))
4588
4589 (define-public python2-feedgenerator
4590 (package-with-python2 python-feedgenerator))
4591
4592 (define-public python-jsonrpc-server
4593 (package
4594 (name "python-jsonrpc-server")
4595 (version "0.4.0")
4596 (source
4597 (origin
4598 (method url-fetch)
4599 (uri (pypi-uri "python-jsonrpc-server" version))
4600 (sha256
4601 (base32
4602 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4603 (build-system python-build-system)
4604 (propagated-inputs
4605 `(("python-mock" ,python-mock)
4606 ("python-pytest" ,python-pytest)
4607 ("python-ujson" ,python-ujson)))
4608 (home-page
4609 "https://github.com/palantir/python-jsonrpc-server")
4610 (synopsis "JSON RPC 2.0 server library")
4611 (description
4612 "This package provides a JSON RPC 2.0 server library for Python.")
4613 (license license:expat)))
4614
4615 (define-public python-pydantic
4616 (package
4617 (name "python-pydantic")
4618 (version "1.8.2")
4619 (source
4620 (origin
4621 (method git-fetch)
4622 (uri (git-reference
4623 (url "https://github.com/samuelcolvin/pydantic")
4624 (commit (string-append "v" version))))
4625 (file-name (git-file-name name version))
4626 (sha256
4627 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4628 (build-system python-build-system)
4629 (arguments
4630 '(#:phases
4631 (modify-phases %standard-phases
4632 (add-before 'check 'disable-test
4633 (lambda _
4634 ;; Reported upstream:
4635 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4636 ;; Disable the faulty test as the fix is unclear.
4637 (substitute* "tests/test_validators.py"
4638 (("test_assert_raises_validation_error")
4639 "_test_assert_raises_validation_error"))
4640
4641 ;; These fail because of <https://bugs.python.org/issue40398>.
4642 ;; Remove after Python has been upgraded to >= 3.9.
4643 (substitute* "tests/test_generics.py"
4644 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4645 ""))
4646 (substitute* "tests/test_schema.py"
4647 (("test_unenforced_constraints_schema")
4648 "_test_unenforced_constraints_schema"))
4649
4650 ;; Disable tests for the Hypothesis plugin because it is tricky
4651 ;; to configure in the build container.
4652 (delete-file "tests/test_hypothesis_plugin.py")))
4653 (replace 'check
4654 (lambda _ (invoke "pytest" "-vv"))))))
4655 (native-inputs
4656 `(("python-pytest" ,python-pytest)
4657 ("python-pytest-mock" ,python-pytest-mock)))
4658 (propagated-inputs
4659 `(("python-typing-extensions" ,python-typing-extensions)))
4660 (home-page "https://github.com/samuelcolvin/pydantic")
4661 (synopsis "Python data validation and settings management")
4662 (description
4663 "Pydantic enforces type hints at runtime, and provides user friendly
4664 errors when data is invalid.")
4665 (license license:expat)))
4666
4667 (define-public python-pydocstyle
4668 (package
4669 (name "python-pydocstyle")
4670 (version "3.0.0")
4671 (source
4672 (origin
4673 (method url-fetch)
4674 (uri (pypi-uri "pydocstyle" version))
4675 (sha256
4676 (base32
4677 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4678 (build-system python-build-system)
4679 (propagated-inputs
4680 `(("python-six" ,python-six)
4681 ("python-snowballstemmer" ,python-snowballstemmer)))
4682 (home-page
4683 "https://github.com/PyCQA/pydocstyle/")
4684 (synopsis "Python docstring style checker")
4685 (description
4686 "This package provides a style checker for the Python Language
4687 Server (PLS).")
4688 (license license:expat)))
4689
4690 (define-public python-language-server
4691 (package
4692 (name "python-language-server")
4693 (version "0.36.2")
4694 (source
4695 (origin
4696 (method url-fetch)
4697 (uri (pypi-uri "python-language-server" version))
4698 (sha256
4699 (base32
4700 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4701 (build-system python-build-system)
4702 (arguments
4703 `(#:phases
4704 (modify-phases %standard-phases
4705 (add-after 'unpack 'relax-deps
4706 (lambda _
4707 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4708 "pycodestyle"))
4709 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4710 #t))
4711 (add-before 'check 'set-HOME
4712 (lambda _ (setenv "HOME" "/tmp") #t))
4713 (replace 'check
4714 (lambda _
4715 ;; Disable failing test.
4716 (invoke "python" "-m" "pytest" "-k"
4717 "not test_pyqt_completion"))))))
4718 (propagated-inputs
4719 `(("python-autopep8" ,python-autopep8)
4720 ("python-configparser" ,python-configparser)
4721 ("python-pydocstyle" ,python-pydocstyle)
4722 ("python-flake8" ,python-flake8)
4723 ("python-future" ,python-future)
4724 ("python-jedi" ,python-jedi)
4725 ("python-jsonrpc-server" ,python-jsonrpc-server)
4726 ("python-pluggy" ,python-pluggy)
4727 ("python-pycodestyle" ,python-pycodestyle)
4728 ("python-pyflakes" ,python-pyflakes)
4729 ("python-rope" ,python-rope)
4730 ("python-ujson" ,python-ujson)
4731 ("python-yapf" ,python-yapf)))
4732 (native-inputs
4733 `(("python-coverage" ,python-coverage)
4734 ("python-flaky" ,python-flaky)
4735 ("python-matplotlib" ,python-matplotlib)
4736 ("python-mock" ,python-mock)
4737 ("python-numpy" ,python-numpy)
4738 ("python-pandas" ,python-pandas)
4739 ("python-pylint" ,python-pylint)
4740 ("python-pytest" ,python-pytest)
4741 ("python-pytest-cov" ,python-pytest-cov)
4742 ("python-versioneer" ,python-versioneer)))
4743 (home-page "https://github.com/palantir/python-language-server")
4744 (synopsis "Python implementation of the Language Server Protocol")
4745 (description
4746 "The Python Language Server (pyls) is an implementation of the Python 3
4747 language specification for the Language Server Protocol (LSP). This tool is
4748 used in text editing environments to provide a complete and integrated
4749 feature-set for programming Python effectively.")
4750 (license license:expat)))
4751
4752 (define-public python-pathspec
4753 (package
4754 (name "python-pathspec")
4755 (version "0.7.0")
4756 (source
4757 (origin
4758 (method url-fetch)
4759 (uri (pypi-uri "pathspec" version))
4760 (sha256
4761 (base32
4762 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4763 (build-system python-build-system)
4764 (home-page "https://github.com/cpburnz/python-path-specification")
4765 (synopsis "Utility library for gitignore style pattern matching of file paths")
4766 (description
4767 "This package provides a utility library for gitignore style pattern
4768 matching of file paths.")
4769 (license license:mpl2.0)))
4770
4771 (define-public python-black
4772 (package
4773 (name "python-black")
4774 (version "20.8b1")
4775 (source
4776 (origin
4777 (method url-fetch)
4778 (uri (pypi-uri "black" version))
4779 (sha256
4780 (base32
4781 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4782 (build-system python-build-system)
4783 (arguments
4784 `(#:phases
4785 (modify-phases %standard-phases
4786 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4787 (lambda _
4788 (let ((python3 (which "python3")))
4789 (substitute* '("tests/data/fmtonoff.py"
4790 "tests/data/string_prefixes.py"
4791 "tests/data/function.py"
4792 "tests/data/python37.py")
4793 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4794 (string-append "#!" python3 (if (string? minor-version)
4795 minor-version
4796 "")))))
4797 #t))
4798 (add-after 'unpack 'disable-broken-tests
4799 (lambda* (#:key outputs inputs #:allow-other-keys)
4800 ;; Make installed package available for running the tests
4801 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4802 ":" (getenv "PATH")))
4803
4804 ;; These tests are supposed to be skipped when the blackd
4805 ;; dependencies are missing, but this doesn't quite work.
4806 (substitute* "tests/test_black.py"
4807 (("( *)class BlackDTestCase.*" match indent)
4808 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4809 indent "class BlackDTestCase(unittest.TestCase):\n"))
4810 (("web.Application") "False")
4811 (("@unittest_run_loop") ""))
4812
4813 ;; Patching the above file breaks the self test
4814 (substitute* "tests/test_black.py"
4815 (("( *)def test_self" match indent)
4816 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4817
4818 (substitute* "tests/test_black.py"
4819 (("( *)def test_python38" match indent)
4820 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4821 #t)))))
4822 (propagated-inputs
4823 `(("python-click" ,python-click)
4824 ("python-attrs" ,python-attrs)
4825 ("python-appdirs" ,python-appdirs)
4826 ("python-pathspec" ,python-pathspec)
4827 ("python-mypy-extensions" ,python-mypy-extensions)
4828 ("python-regex" ,python-regex)
4829 ("python-toml" ,python-toml)
4830 ("python-typed-ast" ,python-typed-ast)
4831 ("python-typing-extensions" ,python-typing-extensions)))
4832 (native-inputs
4833 `(("python-setuptools-scm" ,python-setuptools-scm)))
4834 (home-page "https://github.com/ambv/black")
4835 (synopsis "The uncompromising code formatter")
4836 (description "Black is the uncompromising Python code formatter.")
4837 (license license:expat)))
4838
4839 (define-public python-black-macchiato
4840 (package
4841 (name "python-black-macchiato")
4842 (version "1.3.0")
4843 (source
4844 (origin
4845 (method url-fetch)
4846 (uri (pypi-uri "black-macchiato" version))
4847 (sha256
4848 (base32
4849 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4850 (build-system python-build-system)
4851 (propagated-inputs
4852 `(("python-black" ,python-black)))
4853 (home-page "https://github.com/wbolster/black-macchiato")
4854 (synopsis "Partial @code{python-black} formatting")
4855 (description
4856 "This package is built on top the @{python-black} code formatter to
4857 enable formatting of partial files.")
4858 (license license:bsd-3)))
4859
4860 (define-public python-blinker
4861 (package
4862 (name "python-blinker")
4863 (version "1.4")
4864 (source
4865 (origin
4866 (method url-fetch)
4867 (uri (pypi-uri "blinker" version))
4868 (sha256
4869 (base32
4870 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4871 (build-system python-build-system)
4872 (home-page "https://pythonhosted.org/blinker/")
4873 (synopsis "Fast, simple object-to-object and broadcast signaling")
4874 (description
4875 "Blinker provides a fast dispatching system that allows any number of
4876 interested parties to subscribe to events, or \"signals\".")
4877 (license license:expat)))
4878
4879 (define-public python2-blinker
4880 (package-with-python2 python-blinker))
4881
4882 (define-public pelican
4883 (package
4884 (name "pelican")
4885 (version "4.2.0")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (pypi-uri "pelican" version))
4890 (sha256
4891 (base32
4892 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4893 (build-system python-build-system)
4894 (propagated-inputs
4895 `(("python-blinker" ,python-blinker)
4896 ("python-dateutil" ,python-dateutil)
4897 ("python-docutils" ,python-docutils)
4898 ("python-feedgenerator" ,python-feedgenerator)
4899 ("python-jinja2" ,python-jinja2)
4900 ("python-markdown" ,python-markdown)
4901 ("python-pygments" ,python-pygments)
4902 ("python-pytz" ,python-pytz)
4903 ("python-six" ,python-six)
4904 ("python-unidecode" ,python-unidecode)))
4905 (home-page "https://getpelican.com/")
4906 (arguments
4907 `(;; XXX Requires a lot more packages to do unit tests :P
4908 #:tests? #f))
4909 (synopsis "Python-based static site publishing system")
4910 (description
4911 "Pelican is a tool to generate a static blog from reStructuredText,
4912 Markdown input files, and more. Pelican uses Jinja2 for templating
4913 and is very extensible.")
4914 (license license:agpl3+)))
4915
4916 (define-public mallard-ducktype
4917 (package
4918 (name "mallard-ducktype")
4919 (version "1.0.2")
4920 (source
4921 (origin
4922 (method git-fetch)
4923 ;; git-reference because tests are not included in pypi source tarball
4924 ;; https://issues.guix.gnu.org/issue/36755#2
4925 (uri (git-reference
4926 (url "https://github.com/projectmallard/mallard-ducktype")
4927 (commit version)))
4928 (file-name (git-file-name name version))
4929 (sha256
4930 (base32
4931 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4932 (build-system python-build-system)
4933 (arguments
4934 '(#:phases
4935 (modify-phases %standard-phases
4936 (replace 'check
4937 (lambda _
4938 (with-directory-excursion "tests"
4939 (invoke "sh" "runtests")))))))
4940 (home-page "http://projectmallard.org")
4941 (synopsis "Convert Ducktype to Mallard documentation markup")
4942 (description
4943 "Ducktype is a lightweight syntax that can represent all the semantics
4944 of the Mallard XML documentation system. Ducktype files can be converted to
4945 Mallard using the @command{ducktype} tool. The yelp-tools package
4946 provides additional functionality on the produced Mallard documents.")
4947 (license license:expat)))
4948
4949 (define-public python-cython
4950 (package
4951 (name "python-cython")
4952 (version "0.29.22")
4953 (source
4954 (origin
4955 (method url-fetch)
4956 (uri (pypi-uri "Cython" version))
4957 (sha256
4958 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4959 (build-system python-build-system)
4960 ;; we need the full python package and not just the python-wrapper
4961 ;; because we need libpython3.3m.so
4962 (inputs
4963 `(("python" ,python)))
4964 (arguments
4965 `(#:phases
4966 (modify-phases %standard-phases
4967 (add-before 'check 'set-HOME
4968 ;; some tests require access to "$HOME/.cython"
4969 (lambda _ (setenv "HOME" "/tmp") #t))
4970 (replace 'check
4971 (lambda _
4972 ;; Disable compiler optimizations to greatly reduce the running
4973 ;; time of the test suite.
4974 (setenv "CFLAGS" "-O0")
4975
4976 (invoke "python" "runtests.py" "-vv"
4977 "-j" (number->string (parallel-job-count))
4978 ;; XXX: On 32-bit architectures, running the parallel tests
4979 ;; fails on many-core systems, see
4980 ;; <https://github.com/cython/cython/issues/2807>.
4981 ,@(if (not (target-64bit?))
4982 '("-x" "run.parallel")
4983 '())))))))
4984 (home-page "https://cython.org/")
4985 (synopsis "C extensions for Python")
4986 (description "Cython is an optimising static compiler for both the Python
4987 programming language and the extended Cython programming language. It makes
4988 writing C extensions for Python as easy as Python itself.")
4989 (license license:asl2.0)
4990 (properties `((python2-variant . ,(delay python2-cython))))))
4991
4992 (define-public python2-cython
4993 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4994 (package/inherit base
4995 (name "python2-cython")
4996 (inputs
4997 `(("python-2" ,python-2))) ;this is not automatically changed
4998 (arguments
4999 (substitute-keyword-arguments (package-arguments base)
5000 ((#:phases phases)
5001 `(modify-phases ,phases
5002 (add-before 'check 'adjust-test_embed
5003 (lambda _
5004 (substitute* "runtests.py"
5005 ;; test_embed goes great lengths to find the static libpythonX.Y.a
5006 ;; so it can give the right -L flag to GCC when embedding static
5007 ;; builds of Python. It is unaware that the Python "config"
5008 ;; directory (where the static library lives) was renamed in
5009 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
5010 ;; which works fine, because that is where the shared library is.
5011 ;;
5012 ;; It also appears to be unaware that the Makefile in Demos/embed
5013 ;; already unconditionally pass the static library location to GCC,
5014 ;; after checking sysconfig.get_config_var('LIBPL).
5015 ;;
5016 ;; The effect is that the linker is unable to resolve libexpat
5017 ;; symbols when building for Python 2, because neither the Python 2
5018 ;; shared library nor Expat is available. To fix it, we can either
5019 ;; add Expat as an input and make it visible to the linker, or just
5020 ;; prevent it from overriding the Python shared library location.
5021 ;; The end result is identical, so we take the easy route.
5022 ((" or libname not in os\\.listdir\\(libdir\\)")
5023 ""))
5024 #t)))))))))
5025
5026 ;; NOTE: when upgrading numpy please make sure that python-pandas and
5027 ;; python-scipy still build, as these three packages are often used together.
5028 (define-public python-numpy
5029 (package
5030 (name "python-numpy")
5031 (version "1.17.3")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (string-append
5036 "https://github.com/numpy/numpy/releases/download/v"
5037 version "/numpy-" version ".tar.gz"))
5038 (sha256
5039 (base32
5040 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
5041 (build-system python-build-system)
5042 (inputs
5043 `(("openblas" ,openblas)))
5044 (native-inputs
5045 `(("python-cython" ,python-cython)
5046 ("python-pytest" ,python-pytest)
5047 ("gfortran" ,gfortran)))
5048 (arguments
5049 `(#:phases
5050 (modify-phases %standard-phases
5051 (add-before 'build 'configure-blas-lapack
5052 (lambda* (#:key inputs #:allow-other-keys)
5053 (call-with-output-file "site.cfg"
5054 (lambda (port)
5055 (format port
5056 "[openblas]
5057 libraries = openblas
5058 library_dirs = ~a/lib
5059 include_dirs = ~a/include
5060
5061 # backslash-n to make emacs happy
5062 \n[lapack]
5063 lapack_libs = lapack
5064 library_dirs = ~a/lib
5065 include_dirs = ~a/include
5066 "
5067 (assoc-ref inputs "openblas")
5068 (assoc-ref inputs "openblas")
5069 (assoc-ref inputs "lapack")
5070 (assoc-ref inputs "lapack"))))
5071 #t))
5072 (add-before 'build 'fix-executable-paths
5073 (lambda* (#:key inputs #:allow-other-keys)
5074 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5075 ;; instead of /bin/sh.
5076 (substitute* "numpy/distutils/exec_command.py"
5077 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
5078 (string-append match-start (assoc-ref inputs "bash") match-end)))
5079 ;; Use "gcc" executable, not "cc".
5080 (substitute* "numpy/distutils/system_info.py"
5081 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5082 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
5083 #t))
5084 ;; Tests can only be run after the library has been installed and not
5085 ;; within the source directory.
5086 (delete 'check)
5087 (add-after 'install 'check
5088 (lambda* (#:key outputs inputs #:allow-other-keys)
5089 ;; Make installed package available for running the tests
5090 (add-installed-pythonpath inputs outputs)
5091 ;; Make sure "f2py" etc is found.
5092 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5093 ":" (getenv "PATH")))
5094 (with-directory-excursion "/tmp"
5095 (invoke "python" "-c"
5096 "import numpy; numpy.test(verbose=2)")))))))
5097 (home-page "https://numpy.org")
5098 (synopsis "Fundamental package for scientific computing with Python")
5099 (description "NumPy is the fundamental package for scientific computing
5100 with Python. It contains among other things: a powerful N-dimensional array
5101 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5102 and Fortran code, useful linear algebra, Fourier transform, and random number
5103 capabilities.")
5104 (properties `((python2-variant . ,(delay python2-numpy))))
5105 (license license:bsd-3)))
5106
5107 ;; Numpy 1.16.x are the last versions that support Python 2.
5108 (define-public python2-numpy
5109 (let ((numpy (package-with-python2
5110 (strip-python2-variant python-numpy))))
5111 (package
5112 (inherit numpy)
5113 (version "1.16.5")
5114 (source (origin
5115 (method url-fetch)
5116 (uri (string-append
5117 "https://github.com/numpy/numpy/releases/download/v"
5118 version "/numpy-" version ".tar.gz"))
5119 (sha256
5120 (base32
5121 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5122
5123 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5124 ;; interest only for legacy code going back to NumPy's predecessor
5125 ;; Numeric.
5126 (define-public python2-numpy-1.8
5127 (package (inherit python2-numpy)
5128 (version "1.8.2")
5129 (source
5130 (origin
5131 (method git-fetch)
5132 (uri (git-reference
5133 (url "https://github.com/numpy/numpy")
5134 (commit (string-append "v" version))))
5135 (file-name (git-file-name "numpy" version))
5136 (sha256
5137 (base32
5138 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5139 (arguments
5140 (substitute-keyword-arguments (package-arguments python2-numpy)
5141 ((#:phases phases)
5142 `(modify-phases ,phases
5143 (replace 'configure-blas-lapack
5144 (lambda* (#:key inputs #:allow-other-keys)
5145 (call-with-output-file "site.cfg"
5146 (lambda (port)
5147 (format port
5148 "[openblas]
5149 libraries = openblas,lapack
5150 library_dirs = ~a/lib:~a/lib
5151 include_dirs = ~a/include:~a/include
5152 "
5153 (assoc-ref inputs "openblas")
5154 (assoc-ref inputs "lapack")
5155 (assoc-ref inputs "openblas")
5156 (assoc-ref inputs "lapack"))))
5157 #t))))))
5158 (native-inputs
5159 `(("python2-nose" ,python2-nose)))
5160 (description "NumPy is the fundamental package for scientific computing
5161 with Python. It contains among other things: a powerful N-dimensional array
5162 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5163 and Fortran code, useful linear algebra, Fourier transform, and random number
5164 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5165 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5166 Numeric.")
5167 (license license:bsd-3)))
5168
5169 (define-public python-munch
5170 (package
5171 (name "python-munch")
5172 (version "2.0.4")
5173 (source
5174 (origin
5175 (method url-fetch)
5176 (uri (pypi-uri "munch" version))
5177 (sha256
5178 (base32
5179 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5180 (build-system python-build-system)
5181 (home-page "https://github.com/Infinidat/munch")
5182 (synopsis "Dot-accessible dictionary")
5183 (description "Munch is a dot-accessible dictionary similar to JavaScript
5184 objects.")
5185 (license license:expat)))
5186
5187 (define-public python2-munch
5188 (package-with-python2 python-munch))
5189
5190 (define-public python-colormath
5191 (package
5192 (name "python-colormath")
5193 (version "3.0.0")
5194 (source
5195 (origin
5196 (method url-fetch)
5197 (uri (pypi-uri "colormath" version))
5198 (sha256
5199 (base32
5200 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5201 (build-system python-build-system)
5202 (propagated-inputs
5203 `(("python-networkx" ,python-networkx)
5204 ("python-numpy" ,python-numpy)))
5205 (home-page "https://github.com/gtaylor/python-colormath")
5206 (synopsis "Color math and conversion library")
5207 (description
5208 "This is a Python library for color math and conversions.")
5209 (license license:bsd-3)))
5210
5211 (define-public python2-colormath
5212 (package-with-python2 python-colormath))
5213
5214 (define-public python-sparse
5215 (package
5216 (name "python-sparse")
5217 (version "0.12.0")
5218 (source
5219 (origin
5220 (method url-fetch)
5221 (uri (pypi-uri "sparse" version))
5222 (sha256
5223 (base32
5224 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5225 (build-system python-build-system)
5226 (arguments
5227 `(#:phases
5228 (modify-phases %standard-phases
5229 (replace 'check
5230 (lambda* (#:key tests? #:allow-other-keys)
5231 (when tests?
5232 (invoke "python" "-m" "pytest" "-v")))))))
5233 (propagated-inputs
5234 `(("python-numba" ,python-numba)
5235 ("python-numpy" ,python-numpy)
5236 ("python-scipy" ,python-scipy)))
5237 (native-inputs
5238 `(("python-dask" ,python-dask)
5239 ("python-pytest" ,python-pytest)
5240 ("python-pytest-black" ,python-pytest-black)
5241 ("python-pytest-cov" ,python-pytest-cov)))
5242 (home-page "https://github.com/pydata/sparse/")
5243 (synopsis "Library for multi-dimensional sparse arrays")
5244 (description
5245 "This package implements sparse arrays of arbitrary dimension on top of
5246 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5247 of the elements are zero. @code{python-sparse} generalizes the
5248 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5249 extends beyond just rows and columns to an arbitrary number of dimensions.
5250 Additionally, this project maintains compatibility with the
5251 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5252 used in @code{scipy.sparse}. These differences make this project useful in
5253 certain situations where @code{scipy.sparse} matrices are not well suited, but
5254 it should not be considered a full replacement. It lacks layouts that are not
5255 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5256 depends on @code{scipy.sparse} for some computations.")
5257 (license license:bsd-3)))
5258
5259 (define-public python-spectra
5260 (package
5261 (name "python-spectra")
5262 (version "0.0.11")
5263 (source
5264 (origin
5265 (method url-fetch)
5266 (uri (pypi-uri "spectra" version))
5267 (sha256
5268 (base32
5269 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5270 (build-system python-build-system)
5271 (arguments
5272 `(#:phases
5273 (modify-phases %standard-phases
5274 (replace 'check
5275 (lambda _ (invoke "nosetests" "-v"))))))
5276 (propagated-inputs
5277 `(("python-colormath" ,python-colormath)))
5278 (native-inputs
5279 `(("python-nose" ,python-nose)))
5280 (home-page "https://github.com/jsvine/spectra")
5281 (synopsis "Color scales and color conversion")
5282 (description
5283 "This package provides a Python library intended to make color math,
5284 color scales, and color space conversion easy. It has support for:
5285
5286 @enumerate
5287 @item Color scales
5288 @item Color ranges
5289 @item Color blending
5290 @item Brightening/darkening colors
5291 @item Saturating/desaturating colors
5292 @item Conversion to/from multiple color spaces.
5293 @end enumerate\n")
5294 (license license:expat)))
5295
5296 (define-public python2-spectra
5297 (package-with-python2 python-spectra))
5298
5299 (define-public python-numpy-documentation
5300 (package
5301 (name "python-numpy-documentation")
5302 (version (package-version python-numpy))
5303 (source (package-source python-numpy))
5304 (build-system python-build-system)
5305 (native-inputs
5306 `(("python-matplotlib" ,python-matplotlib)
5307 ("python-numpy" ,python-numpy)
5308 ("pkg-config" ,pkg-config)
5309 ("python-sphinx" ,python-sphinx)
5310 ("python-numpydoc" ,python-numpydoc)
5311 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
5312 texlive-fonts-ec
5313 texlive-generic-ifxetex
5314 texlive-generic-pdftex
5315 texlive-amsfonts/patched
5316 texlive-latex-capt-of
5317 texlive-latex-cmap
5318 texlive-latex-environ
5319 texlive-latex-eqparbox
5320 texlive-latex-etoolbox
5321 texlive-latex-expdlist
5322 texlive-latex-fancyhdr
5323 texlive-latex-fancyvrb
5324 texlive-latex-fncychap
5325 texlive-latex-float
5326 texlive-latex-framed
5327 texlive-latex-geometry
5328 texlive-latex-graphics
5329 texlive-latex-hyperref
5330 texlive-latex-mdwtools
5331 texlive-latex-multirow
5332 texlive-latex-needspace
5333 texlive-latex-oberdiek
5334 texlive-latex-parskip
5335 texlive-latex-preview
5336 texlive-latex-tabulary
5337 texlive-latex-threeparttable
5338 texlive-latex-titlesec
5339 texlive-latex-trimspaces
5340 texlive-latex-ucs
5341 texlive-latex-upquote
5342 texlive-latex-url
5343 texlive-latex-varwidth
5344 texlive-latex-wrapfig)))
5345 ("texinfo" ,texinfo)
5346 ("perl" ,perl)
5347 ("scipy-sphinx-theme"
5348 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5349 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5350 (method git-fetch)
5351 (uri (git-reference
5352 (url "https://github.com/scipy/scipy-sphinx-theme")
5353 (commit commit)))
5354 (file-name (git-file-name "python-scipy-sphinx-theme"
5355 (string-take commit 7)))
5356 (sha256
5357 (base32
5358 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5359 ,@(package-native-inputs python-numpy)))
5360 (arguments
5361 `(#:tests? #f ; we're only generating the documentation
5362 #:phases
5363 (modify-phases %standard-phases
5364 (delete 'build)
5365 (replace 'install
5366 (lambda* (#:key inputs outputs #:allow-other-keys)
5367 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5368 (doc (string-append
5369 data "/doc/" ,name "-"
5370 ,(package-version python-numpy)))
5371 (info-reader (string-append data "/info"))
5372 (html (string-append doc "/html"))
5373 (scipy-sphinx-theme "scipy-sphinx-theme")
5374 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5375 (pyver ,(string-append "PYVER=")))
5376
5377 ;; FIXME: this is needed to for texlive-union to generate
5378 ;; fonts, which are not found.
5379 (setenv "HOME" "/tmp")
5380
5381 (with-directory-excursion "doc"
5382 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5383 (mkdir-p html)
5384 (invoke "make" "html" pyver)
5385 (invoke "make" "latex" "PAPER=a4" pyver)
5386 (invoke "make" "-C" "build/latex"
5387 "all-pdf" "PAPER=a4" pyver)
5388 ;; FIXME: Generation of the info file fails.
5389 ;; (invoke "make" "info" pyver)
5390 ;; (mkdir-p info)
5391 ;; (copy-file "build/texinfo/numpy.info"
5392 ;; (string-append info "/numpy.info"))
5393 (for-each (lambda (file)
5394 (copy-file (string-append "build/latex" file)
5395 (string-append doc file)))
5396 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5397 (with-directory-excursion "build/html"
5398 (for-each (lambda (file)
5399 (let* ((dir (dirname file))
5400 (tgt-dir (string-append html "/" dir)))
5401 (unless (equal? "." dir)
5402 (mkdir-p tgt-dir))
5403 (install-file file html)))
5404 (find-files "." ".*")))))
5405 #t)))))
5406 (home-page (package-home-page python-numpy))
5407 (synopsis "Documentation for the python-numpy package")
5408 (description (package-description python-numpy))
5409 (license (package-license python-numpy))))
5410
5411 (define-public python-pygit2
5412 (package
5413 (name "python-pygit2")
5414 (version "1.6.0")
5415 (source
5416 (origin
5417 (method url-fetch)
5418 (uri (pypi-uri "pygit2" version))
5419 (sha256
5420 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5421 (build-system python-build-system)
5422 (arguments
5423 '(#:tests? #f)) ; tests don't run correctly in our environment
5424 (propagated-inputs
5425 `(("python-cached-property" ,python-cached-property)
5426 ("python-cffi" ,python-cffi)
5427 ("libgit2" ,libgit2)))
5428 (native-inputs
5429 `(("python-pytest" ,python-pytest)))
5430 (home-page "https://github.com/libgit2/pygit2")
5431 (synopsis "Python bindings for libgit2")
5432 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5433 library, libgit2 implements Git plumbing.")
5434 ;; GPL2.0 only, with linking exception.
5435 (license license:gpl2)))
5436
5437 (define-public python-patiencediff
5438 (package
5439 (name "python-patiencediff")
5440 (version "0.2.0")
5441 (source
5442 (origin
5443 (method url-fetch)
5444 (uri (pypi-uri "patiencediff" version))
5445 (sha256
5446 (base32
5447 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5448 (build-system python-build-system)
5449 (home-page "https://www.breezy-vcs.org/")
5450 (synopsis "Python implementation of the patiencediff algorithm")
5451 (description
5452 "This package contains a Python implementation of the @code{patiencediff}
5453 algorithm. Patiencediff provides a good balance of performance, nice output for
5454 humans, and implementation simplicity.")
5455 (license license:gpl2)))
5456
5457 (define-public python-pdftotext
5458 (package
5459 (name "python-pdftotext")
5460 (version "2.1.6")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "pdftotext" version))
5465 (sha256
5466 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5467 (build-system python-build-system)
5468 (inputs
5469 `(("poppler" ,poppler)))
5470 (home-page "https://github.com/jalan/pdftotext")
5471 (synopsis "Simple PDF text extraction")
5472 (description "Pdftotext is a Python library of PDF text extraction.")
5473 (license license:expat)))
5474
5475 (define-public python-pyparsing
5476 (package
5477 (name "python-pyparsing")
5478 (version "2.4.6")
5479 (source
5480 (origin
5481 (method url-fetch)
5482 (uri (pypi-uri "pyparsing" version))
5483 (sha256
5484 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5485 (build-system python-build-system)
5486 (outputs '("out" "doc"))
5487 (arguments
5488 `(#:tests? #f ; no test target
5489 #:phases
5490 (modify-phases %standard-phases
5491 (add-after 'install 'install-doc
5492 (lambda* (#:key outputs #:allow-other-keys)
5493 (let* ((doc (string-append (assoc-ref outputs "doc")
5494 "/share/doc/" ,name "-" ,version))
5495 (html-doc (string-append doc "/html"))
5496 (examples (string-append doc "/examples")))
5497 (mkdir-p html-doc)
5498 (mkdir-p examples)
5499 (for-each
5500 (lambda (dir tgt)
5501 (map (lambda (file)
5502 (install-file file tgt))
5503 (find-files dir ".*")))
5504 (list "docs" "htmldoc" "examples")
5505 (list doc html-doc examples))
5506 #t))))))
5507 (home-page "https://github.com/pyparsing/pyparsing")
5508 (synopsis "Python parsing class library")
5509 (description
5510 "The pyparsing module is an alternative approach to creating and
5511 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5512 of regular expressions. The pyparsing module provides a library of classes
5513 that client code uses to construct the grammar directly in Python code.")
5514 (license license:expat)))
5515
5516 (define-public python2-pyparsing
5517 (package-with-python2 python-pyparsing))
5518
5519 (define-public python-pyparsing-2.4.7
5520 (package
5521 (inherit python-pyparsing)
5522 (version "2.4.7")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (pypi-uri "pyparsing" version))
5527 (sha256
5528 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5529
5530 (define-public python-numpydoc
5531 (package
5532 (name "python-numpydoc")
5533 (version "0.8.0")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 (uri (pypi-uri "numpydoc" version))
5538 (sha256
5539 (base32
5540 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5541 (build-system python-build-system)
5542 (propagated-inputs
5543 `(("python-sphinx" ,python-sphinx)))
5544 (native-inputs
5545 `(("python-nose" ,python-nose)))
5546 (home-page "https://pypi.org/project/numpydoc/")
5547 (synopsis
5548 "Numpy's Sphinx extensions")
5549 (description
5550 "Sphinx extension to support docstrings in Numpy format.")
5551 (license license:bsd-2)
5552 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5553
5554 (define-public python2-numpydoc
5555 (let ((base (package-with-python2
5556 (strip-python2-variant python-numpydoc))))
5557 (package/inherit base
5558 (propagated-inputs
5559 `(("python2-jinja2" ,python2-jinja2)
5560 ,@(package-propagated-inputs base))))))
5561
5562 (define-public python-numexpr
5563 (package
5564 (name "python-numexpr")
5565 (version "2.6.5")
5566 (source
5567 (origin
5568 (method url-fetch)
5569 (uri (pypi-uri "numexpr" version))
5570 (sha256
5571 (base32
5572 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5573 (build-system python-build-system)
5574 (arguments `(#:tests? #f)) ; no tests included
5575 (propagated-inputs
5576 `(("python-numpy" ,python-numpy)))
5577 (home-page "https://github.com/pydata/numexpr")
5578 (synopsis "Fast numerical expression evaluator for NumPy")
5579 (description
5580 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5581 expressions that operate on arrays are accelerated and use less memory than
5582 doing the same calculation in Python. In addition, its multi-threaded
5583 capabilities can make use of all your cores, which may accelerate
5584 computations, most specially if they are not memory-bounded (e.g. those using
5585 transcendental functions).")
5586 (license license:expat)))
5587
5588 (define-public python2-numexpr
5589 (package-with-python2 python-numexpr))
5590
5591 (define-public python-cycler
5592 (package
5593 (name "python-cycler")
5594 (version "0.10.0")
5595 (source (origin
5596 (method url-fetch)
5597 (uri (pypi-uri "cycler" version))
5598 (sha256
5599 (base32
5600 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5601 (build-system python-build-system)
5602 (arguments
5603 ;; XXX: The current version requires 'coveralls' which we don't have.
5604 ;; Enable this for the next release which uses 'python-pytest'.
5605 '(#:tests? #f))
5606 (propagated-inputs
5607 `(("python-six" ,python-six)))
5608 (home-page "https://matplotlib.org/cycler/")
5609 (synopsis "Composable keyword argument iterator")
5610 (description
5611 "When using @code{matplotlib} and plotting more than one line, it is
5612 common to want to be able to want to be able to cycle over one or more artist
5613 styles; but the plotting logic can quickly become involved.
5614 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5615 @code{Cycler} class was developed.")
5616 (license license:bsd-3)))
5617
5618 (define-public python2-cycler
5619 (package-with-python2 python-cycler))
5620
5621 (define-public python-colorspacious
5622 (package
5623 (name "python-colorspacious")
5624 (version "1.1.2")
5625 (source
5626 (origin
5627 (method git-fetch)
5628 (uri (git-reference
5629 (url "https://github.com/njsmith/colorspacious")
5630 (commit (string-append "v" version))))
5631 (file-name (git-file-name name version))
5632 (sha256
5633 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5634 (build-system python-build-system)
5635 (propagated-inputs
5636 `(("python-numpy" ,python-numpy)))
5637 (native-inputs
5638 `(("python-nose" ,python-nose)))
5639 (arguments
5640 `(#:phases
5641 (modify-phases %standard-phases
5642 (replace 'check
5643 (lambda _
5644 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5645 (home-page "https://github.com/njsmith/colorspacious")
5646 (synopsis "Python library for colorspace conversions")
5647 (description "@code{colorspacious} is a Python library that lets you
5648 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5649 (license license:expat)))
5650
5651 (define-public python2-colorspacious
5652 (package-with-python2 python-colorspacious))
5653
5654 (define-public python-matplotlib
5655 (package
5656 (name "python-matplotlib")
5657 (version "3.1.2")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "matplotlib" version))
5662 (sha256
5663 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5664 (patches
5665 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5666 (build-system python-build-system)
5667 (propagated-inputs ; the following packages are all needed at run time
5668 `(("python-cycler" ,python-cycler)
5669 ("python-kiwisolver" ,python-kiwisolver)
5670 ("python-pyparsing" ,python-pyparsing)
5671 ("python-pygobject" ,python-pygobject)
5672 ("gobject-introspection" ,gobject-introspection)
5673 ("python-tkinter" ,python "tk")
5674 ("python-dateutil" ,python-dateutil)
5675 ("python-numpy" ,python-numpy)
5676 ("python-pillow" ,python-pillow)
5677 ("python-pytz" ,python-pytz)
5678 ("python-six" ,python-six)
5679 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5680 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5681 ;; object. For this reason we need to import both libraries.
5682 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5683 ("python-pycairo" ,python-pycairo)
5684 ("python-cairocffi" ,python-cairocffi)))
5685 (inputs
5686 `(("libpng" ,libpng)
5687 ("freetype" ,freetype)
5688 ("cairo" ,cairo)
5689 ("glib" ,glib)
5690 ;; FIXME: Add backends when available.
5691 ;("python-wxpython" ,python-wxpython)
5692 ("tcl" ,tcl)
5693 ("tk" ,tk)))
5694 (native-inputs
5695 `(("pkg-config" ,pkg-config)
5696 ("python-pytest" ,python-pytest)
5697 ("python-mock" ,python-mock)
5698 ("unzip" ,unzip)
5699 ("jquery-ui"
5700 ,(origin
5701 (method url-fetch)
5702 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5703 (sha256
5704 (base32
5705 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5706 (arguments
5707 `(#:phases
5708 (modify-phases %standard-phases
5709 ;; XXX We disable all image comparison tests because we're using a
5710 ;; newer version of FreeType than matplotlib expects. This leads to
5711 ;; minor differences throughout the tests.
5712 (add-after 'unpack 'fix-and-disable-failing-tests
5713 (lambda _
5714 (substitute* (append (find-files "lib/matplotlib/tests/"
5715 "test_.*\\.py$")
5716 (find-files "lib/mpl_toolkits/tests"
5717 "test_.*\\.py$"))
5718 (("^from matplotlib" match)
5719 (string-append "import pytest\n" match))
5720 (("( *)@image_comparison" match indent)
5721 (string-append indent
5722 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5723 match)))
5724 (substitute* "lib/matplotlib/tests/test_animation.py"
5725 (("/bin/sh") (which "sh")))
5726 (for-each delete-file
5727 ;; test_normal_axes, test_get_tightbbox_polar
5728 '("lib/matplotlib/tests/test_axes.py"
5729 ;; We don't use the webagg backend and this test forces it.
5730 "lib/matplotlib/tests/test_backend_webagg.py"
5731 ;; test_outward_ticks
5732 "lib/matplotlib/tests/test_tightlayout.py"
5733 ;; test_hidden_axes fails with minor extent
5734 ;; differences, possibly due to the use of a
5735 ;; different version of FreeType.
5736 "lib/matplotlib/tests/test_constrainedlayout.py"
5737 ;; Fontconfig returns no fonts.
5738 "lib/matplotlib/tests/test_font_manager.py"))
5739 #t))
5740 (add-before 'install 'install-jquery-ui
5741 (lambda* (#:key outputs inputs #:allow-other-keys)
5742 (let* ((python-version (python-version
5743 (assoc-ref inputs "python")))
5744 (dir (string-append (assoc-ref outputs "out")
5745 "/lib/python" python-version "/site-packages"
5746 "/matplotlib/backends/web_backend/")))
5747 (mkdir-p dir)
5748 (invoke "unzip"
5749 (assoc-ref inputs "jquery-ui")
5750 "-d" dir))
5751 #t))
5752 (replace 'check
5753 (lambda* (#:key outputs inputs #:allow-other-keys)
5754 (add-installed-pythonpath inputs outputs)
5755 (invoke "python" "tests.py" "-v"
5756 "-m" "not network and not webagg")))
5757 (add-before 'build 'configure-environment
5758 (lambda* (#:key outputs inputs #:allow-other-keys)
5759 (let ((cairo (assoc-ref inputs "cairo")))
5760 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5761 ;; has not effect.
5762 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5763 (setenv "HOME" (getcwd))
5764 ;; Fix rounding errors when using the x87 FPU.
5765 (when (string-prefix? "i686" ,(%current-system))
5766 (setenv "CFLAGS" "-ffloat-store"))
5767 (call-with-output-file "setup.cfg"
5768 (lambda (port)
5769 (format port "[directories]~%
5770 basedirlist = ~a,~a~%
5771 [packages]~%
5772 tests = True~%"
5773 (assoc-ref inputs "tcl")
5774 (assoc-ref inputs "tk")))))
5775 #t)))))
5776 (home-page "https://matplotlib.org/")
5777 (synopsis "2D plotting library for Python")
5778 (description
5779 "Matplotlib is a Python 2D plotting library which produces publication
5780 quality figures in a variety of hardcopy formats and interactive environments
5781 across platforms. Matplotlib can be used in Python scripts, the python and
5782 ipython shell, web application servers, and six graphical user interface
5783 toolkits.")
5784 (license license:psfl)
5785 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5786
5787 (define-public python2-matplotlib
5788 (let ((matplotlib (package-with-python2
5789 (strip-python2-variant python-matplotlib))))
5790 (package (inherit matplotlib)
5791 (version "2.2.4")
5792 (source
5793 (origin
5794 (method url-fetch)
5795 (uri (pypi-uri "matplotlib" version))
5796 (sha256
5797 (base32
5798 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5799 (arguments
5800 (substitute-keyword-arguments (package-arguments matplotlib)
5801 ((#:phases phases)
5802 `(modify-phases ,phases
5803 (replace 'install-jquery-ui
5804 (lambda* (#:key outputs inputs #:allow-other-keys)
5805 (let ((dir (string-append (assoc-ref outputs "out")
5806 "/lib/python2.7/site-packages/"
5807 "matplotlib/backends/web_backend/")))
5808 (mkdir-p dir)
5809 (invoke "unzip"
5810 (assoc-ref inputs "jquery-ui")
5811 "-d" dir))
5812 #t))
5813 (delete 'fix-and-disable-failing-tests)
5814 (delete 'check))))) ; These tests weren't run the the past.
5815 ;; Make sure to use special packages for Python 2 instead
5816 ;; of those automatically rewritten by package-with-python2.
5817 (propagated-inputs
5818 `(("python2-pycairo" ,python2-pycairo)
5819 ("python2-backports-functools-lru-cache"
5820 ,python2-backports-functools-lru-cache)
5821 ("python2-functools32" ,python2-functools32)
5822 ("python2-pygobject-2" ,python2-pygobject-2)
5823 ("python2-subprocess32" ,python2-subprocess32)
5824 ("python2-tkinter" ,python-2 "tk")
5825 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5826 '("python-cairocffi"
5827 "python-pycairo"
5828 "python-pygobject"
5829 "python-tkinter")))))))
5830
5831 (define-public python-matplotlib-documentation
5832 (package
5833 (name "python-matplotlib-documentation")
5834 (version (package-version python-matplotlib))
5835 (source (package-source python-matplotlib))
5836 (build-system python-build-system)
5837 (native-inputs
5838 `(("python-matplotlib" ,python-matplotlib)
5839 ("python-colorspacious" ,python-colorspacious)
5840 ("python-sphinx" ,python-sphinx)
5841 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5842 ("python-sphinx-gallery" ,python-sphinx-gallery)
5843 ("python-numpydoc" ,python-numpydoc)
5844 ("python-ipython" ,python-ipython)
5845 ("python-ipykernel" ,python-ipykernel)
5846 ("python-mock" ,python-mock)
5847 ("graphviz" ,graphviz)
5848 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
5849 texlive-latex-amsmath
5850 texlive-latex-enumitem
5851 texlive-latex-expdlist
5852 texlive-latex-geometry
5853 texlive-latex-preview
5854 texlive-latex-type1cm
5855 texlive-latex-ucs
5856
5857 texlive-generic-pdftex
5858
5859 texlive-fonts-ec
5860 texlive-fonts-adobe-times
5861 texlive-fonts-txfonts)))
5862 ("texinfo" ,texinfo)
5863 ,@(package-native-inputs python-matplotlib)))
5864 (arguments
5865 `(#:tests? #f ; we're only generating documentation
5866 #:phases
5867 (modify-phases %standard-phases
5868 ;; The tests in python-matplotlib are run after the install phase, so
5869 ;; we need to delete the extra phase here.
5870 (delete 'check)
5871 (replace 'build
5872 (lambda _
5873 (chdir "doc")
5874 (setenv "PYTHONPATH"
5875 (string-append (getenv "PYTHONPATH")
5876 ":" (getcwd) "/../examples/units"))
5877 (substitute* "conf.py"
5878 ;; Don't use git.
5879 (("^SHA = check_output.*")
5880 (string-append "SHA = \"" ,version "\"\n"))
5881 ;; Don't fetch intersphinx files from the Internet
5882 (("^explicit_order_folders" m)
5883 (string-append "intersphinx_mapping = {}\n" m))
5884 (("'sphinx.ext.intersphinx',") "")
5885 ;; Disable URL embedding which requires internet access.
5886 (("'https://docs.scipy.org/doc/numpy'") "None")
5887 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5888 (invoke "make"
5889 "SPHINXBUILD=sphinx-build"
5890 "SPHINXOPTS=" ; don't abort on warnings
5891 "html" "texinfo")))
5892 (replace 'install
5893 (lambda* (#:key inputs outputs #:allow-other-keys)
5894 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5895 (doc (string-append data "/doc/python-matplotlib-" ,version))
5896 (info (string-append data "/info"))
5897 (html (string-append doc "/html")))
5898 (mkdir-p html)
5899 (mkdir-p info)
5900 (copy-recursively "build/html" html)
5901 (symlink (string-append html "/_images")
5902 (string-append info "/matplotlib-figures"))
5903 (with-directory-excursion "build/texinfo"
5904 (substitute* "matplotlib.texi"
5905 (("@image\\{([^,]*)" all file)
5906 (string-append "@image{matplotlib-figures/" file)))
5907 (symlink (string-append html "/_images")
5908 "./matplotlib-figures")
5909 (invoke "makeinfo" "--no-split"
5910 "-o" "matplotlib.info" "matplotlib.texi"))
5911 (install-file "build/texinfo/matplotlib.info" info))
5912 #t)))))
5913 (home-page (package-home-page python-matplotlib))
5914 (synopsis "Documentation for the python-matplotlib package")
5915 (description (package-description python-matplotlib))
5916 (license (package-license python-matplotlib))))
5917
5918 (define-public python-matplotlib-venn
5919 (package
5920 (name "python-matplotlib-venn")
5921 (version "0.11.5")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5926 (sha256
5927 (base32
5928 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5929 (build-system python-build-system)
5930 (arguments '(#:tests? #f)) ; tests are not included
5931 (propagated-inputs
5932 `(("python-matplotlib" ,python-matplotlib)
5933 ("python-numpy" ,python-numpy)
5934 ("python-scipy" ,python-scipy)))
5935 (native-inputs
5936 `(("unzip" ,unzip)))
5937 (home-page "https://github.com/konstantint/matplotlib-venn")
5938 (synopsis "Plot area-proportional Venn diagrams")
5939 (description
5940 "This package provides tools for plotting area-proportional two- and
5941 three-way Venn diagrams in @code{matplotlib}.")
5942 (license license:expat)))
5943
5944 (define-public python-pysnptools
5945 (package
5946 (name "python-pysnptools")
5947 (version "0.4.11")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "pysnptools" version))
5952 (sha256
5953 (base32
5954 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5955 (build-system python-build-system)
5956 (arguments
5957 `(#:tests? #f ; no test data are included
5958 #:phases
5959 (modify-phases %standard-phases
5960 (replace 'check
5961 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5962 (if tests?
5963 (begin
5964 (add-installed-pythonpath inputs outputs)
5965 (invoke "python3" "pysnptools/test.py"))
5966 #t))))))
5967 (propagated-inputs
5968 `(("python-dill" ,python-dill)
5969 ("python-h5py" ,python-h5py)
5970 ("python-numpy" ,python-numpy)
5971 ("python-pandas" ,python-pandas)
5972 ("python-psutil" ,python-psutil)
5973 ("python-scipy" ,python-scipy)))
5974 (native-inputs
5975 `(("python-cython" ,python-cython)))
5976 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5977 (synopsis "Library for reading and manipulating genetic data")
5978 (description
5979 "PySnpTools is a library for reading and manipulating genetic data. It
5980 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5981 those files. It can also efficiently manipulate ranges of integers using set
5982 operators such as union, intersection, and difference.")
5983 (license license:asl2.0)))
5984
5985 (define-public python2-pysnptools
5986 (package-with-python2 python-pysnptools))
5987
5988 (define-public python-pykdtree
5989 (package
5990 (name "python-pykdtree")
5991 (version "1.3.4")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "pykdtree" version))
5996 (sha256
5997 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
5998 (build-system python-build-system)
5999 (native-inputs
6000 `(("python-nose" ,python-nose)))
6001 (propagated-inputs
6002 `(("python-numpy" ,python-numpy)))
6003 (home-page "https://github.com/storpipfugl/pykdtree")
6004 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
6005 (description
6006 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
6007 search in Python.")
6008 (license license:lgpl3+)))
6009
6010 (define-public python-wurlitzer
6011 (package
6012 (name "python-wurlitzer")
6013 (version "2.0.1")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "wurlitzer" version))
6018 (sha256
6019 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
6020 (build-system python-build-system)
6021 (arguments
6022 '(#:phases
6023 (modify-phases %standard-phases
6024 (replace 'check
6025 (lambda _
6026 (invoke "pytest" "-vv" "test.py"))))))
6027 (native-inputs
6028 `(("python-mock" ,python-mock)
6029 ("python-pytest" ,python-pytest)))
6030 (home-page "https://github.com/minrk/wurlitzer")
6031 (synopsis "Capture C-level output in context managers")
6032 (description
6033 "This library helps to redirect @code{sys.stdout} to a stream or a file
6034 while executing some piece of code, including C code running within a Python
6035 process.")
6036 (license license:expat)))
6037
6038 (define-public python-socksipy-branch
6039 (package
6040 (name "python-socksipy-branch")
6041 (version "1.01")
6042 (source
6043 (origin
6044 (method url-fetch)
6045 (uri (pypi-uri "SocksiPy-branch" version))
6046 (sha256
6047 (base32
6048 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
6049 (build-system python-build-system)
6050 (arguments
6051 `(#:tests? #f)) ; There are no tests
6052 (home-page "https://code.google.com/archive/p/socksipy-branch/")
6053 (synopsis "Python SOCKS module")
6054 (description
6055 "SocksiPy - A Python SOCKS client module. It provides a
6056 socket-like interface that supports connections to any TCP
6057 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
6058 The original version was developed by Dan Haim, this is a
6059 branch created by Mario Vilas to address some open issues,
6060 as the original project seems to have been abandoned circa 2007.")
6061 (license license:bsd-3)))
6062
6063 (define-public python2-socksipy-branch
6064 (package-with-python2 python-socksipy-branch))
6065
6066 (define-public python-socksipychain
6067 (package
6068 (name "python-socksipychain")
6069 (version "2.1.2")
6070 (source
6071 (origin
6072 (method git-fetch)
6073 (uri (git-reference
6074 (url "https://github.com/pagekite/PySocksipyChain")
6075 (commit (string-append "v" version))))
6076 (file-name (git-file-name name version))
6077 (sha256
6078 (base32
6079 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
6080 (build-system python-build-system)
6081 (arguments
6082 `(#:tests? #f)) ; Tests try to access the network.
6083 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
6084 (synopsis "Python SOCKS module with chained proxies support")
6085 (description
6086 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6087 adds support for arbitrary chaining of proxy servers and various modes of
6088 TLS/SSL encryption. It was developed for use in PageKite, and also includes
6089 a simple netcat replacement with chaining support.")
6090 (license license:bsd-3)))
6091
6092 (define-public python-pycodestyle
6093 (package
6094 (name "python-pycodestyle")
6095 (version "2.7.0")
6096 (source
6097 (origin
6098 (method url-fetch)
6099 (uri (pypi-uri "pycodestyle" version))
6100 (sha256
6101 (base32
6102 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
6103 (build-system python-build-system)
6104 (arguments
6105 `(#:phases
6106 (modify-phases %standard-phases
6107 (replace 'check
6108 (lambda _
6109 (invoke "pytest" "-vv"))))))
6110 (native-inputs
6111 `(("python-pytest" ,python-pytest)))
6112 (home-page "https://pycodestyle.readthedocs.io/")
6113 (synopsis "Python style guide checker")
6114 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6115 Python code against some of the style conventions in
6116 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6117 (license license:expat)))
6118
6119 (define-public python2-pycodestyle
6120 (package-with-python2 python-pycodestyle))
6121
6122 (define-public python-pycodestyle-2.6
6123 (package
6124 (inherit python-pycodestyle)
6125 (version "2.6.0")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (pypi-uri "pycodestyle" version))
6129 (sha256
6130 (base32
6131 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6132
6133 (define-public python-multidict
6134 (package
6135 (name "python-multidict")
6136 (version "4.7.5")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (pypi-uri "multidict" version))
6141 (sha256
6142 (base32
6143 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6144 (build-system python-build-system)
6145 (arguments
6146 '(#:modules ((ice-9 ftw)
6147 (srfi srfi-1)
6148 (srfi srfi-26)
6149 (guix build utils)
6150 (guix build python-build-system))
6151 #:phases (modify-phases %standard-phases
6152 (replace 'check
6153 (lambda* (#:key tests? #:allow-other-keys)
6154 (if tests?
6155 (begin
6156 (let ((libdir (find (cut string-prefix? "lib." <>)
6157 (scandir "build"))))
6158 (setenv "PYTHONPATH"
6159 (string-append "./build/" libdir ":"
6160 (getenv "PYTHONPATH")))
6161 (invoke "pytest" "-vv")))
6162 (format #t "test suite not run~%"))
6163 #t)))))
6164 (native-inputs
6165 `(("python-pytest" ,python-pytest)
6166 ("python-pytest-cov" ,python-pytest-cov)))
6167 (home-page "https://github.com/aio-libs/multidict/")
6168 (synopsis "Multidict implementation")
6169 (description "Multidict is dict-like collection of key-value pairs
6170 where key might be occurred more than once in the container.")
6171 (license license:asl2.0)))
6172
6173 (define-public python-orderedmultidict
6174 (package
6175 (name "python-orderedmultidict")
6176 (version "1.0")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "orderedmultidict" version))
6181 (sha256
6182 (base32
6183 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6184 (build-system python-build-system)
6185 (arguments
6186 `(#:phases
6187 (modify-phases %standard-phases
6188 (add-after 'unpack 'fix-tests
6189 (lambda _
6190 ;; The package uses nosetest for running the tests.
6191 ;; Adding this initfile allows to run the test suite
6192 ;; without requiring nosetest.
6193 (with-output-to-file "tests/__init__.py" newline)
6194 #t)))))
6195 (propagated-inputs
6196 `(("python-six" ,python-six)))
6197 (native-inputs
6198 `(("python-pycodestyle" ,python-pycodestyle)))
6199 (home-page "https://github.com/gruns/orderedmultidict")
6200 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6201 (description "This package contains a library for ordered multivalue
6202 dictionaries. A multivalue dictionary is a dictionary that can store
6203 multiple values for the same key. An ordered multivalue dictionary is a
6204 multivalue dictionary that retains the order of insertions and deletions.")
6205 (license license:unlicense)))
6206
6207 (define-public python2-orderedmultidict
6208 (package-with-python2 python-orderedmultidict))
6209
6210 (define-public python-autopep8
6211 (package
6212 (name "python-autopep8")
6213 (version "1.5.3")
6214 (source
6215 (origin
6216 (method url-fetch)
6217 (uri (pypi-uri "autopep8" version))
6218 (sha256
6219 (base32
6220 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6221 (build-system python-build-system)
6222 (propagated-inputs
6223 `(("python-pycodestyle" ,python-pycodestyle)
6224 ("python-toml" ,python-toml)))
6225 (home-page "https://github.com/hhatto/autopep8")
6226 (synopsis "Format Python code according to the PEP 8 style guide")
6227 (description
6228 "@code{autopep8} automatically formats Python code to conform to
6229 the PEP 8 style guide. It uses the pycodestyle utility to determine
6230 what parts of the code needs to be formatted. @code{autopep8} is
6231 capable of fixing most of the formatting issues that can be reported
6232 by pycodestyle.")
6233 (license (license:non-copyleft
6234 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6235
6236 (define-public python2-autopep8
6237 (package-with-python2 python-autopep8))
6238
6239 (define-public python-distlib
6240 (package
6241 (name "python-distlib")
6242 (version "0.3.0")
6243 (source
6244 (origin
6245 (method url-fetch)
6246 (uri (pypi-uri "distlib" version ".zip"))
6247 (sha256
6248 (base32
6249 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
6250 (build-system python-build-system)
6251 (arguments
6252 `(#:phases
6253 (modify-phases %standard-phases
6254 (add-before 'build 'no-/bin/sh
6255 (lambda _
6256 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6257 (("/bin/sh") (which "sh")))
6258 #t))
6259 (add-before 'check 'prepare-test-env
6260 (lambda _
6261 (setenv "HOME" "/tmp")
6262 ;; NOTE: Any value works, the variable just has to be present.
6263 (setenv "SKIP_ONLINE" "1")
6264 #t)))))
6265 (native-inputs `(("unzip" ,unzip)))
6266 (home-page "https://bitbucket.org/pypa/distlib")
6267 (synopsis "Distribution utilities")
6268 (description "Distlib is a library which implements low-level functions that
6269 relate to packaging and distribution of Python software. It is intended to be
6270 used as the basis for third-party packaging tools.")
6271 (license license:psfl)))
6272
6273 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
6274 (define-public python-distlib/next
6275 (package
6276 (inherit python-distlib)
6277 (version "0.3.1")
6278 (source
6279 (origin
6280 (method url-fetch)
6281 (uri (pypi-uri "distlib" version ".zip"))
6282 (sha256
6283 (base32
6284 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
6285
6286 (define-public python-distutils-extra
6287 (package
6288 (name "python-distutils-extra")
6289 (version "2.38")
6290 (source
6291 (origin
6292 (method url-fetch)
6293 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6294 version "/+download/python-distutils-extra-"
6295 version ".tar.gz"))
6296 (sha256
6297 (base32
6298 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6299 (build-system python-build-system)
6300 (home-page "https://launchpad.net/python-distutils-extra/")
6301 (synopsis "Enhancements to Python's distutils")
6302 (description
6303 "The python-distutils-extra module enables you to easily integrate
6304 gettext support, themed icons, and scrollkeeper-based documentation into
6305 Python's distutils.")
6306 (license license:gpl2)))
6307
6308 (define-public python2-distutils-extra
6309 (package-with-python2 python-distutils-extra))
6310
6311 (define-public python2-elib.intl
6312 (package
6313 (name "python2-elib.intl")
6314 (version "0.0.3")
6315 (source
6316 (origin
6317 ;; This project doesn't tag releases or publish tarballs, so we take
6318 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6319 (method git-fetch)
6320 (uri (git-reference
6321 (url "https://github.com/dieterv/elib.intl")
6322 (commit "d09997cfef")))
6323 (file-name (string-append name "-" version "-checkout"))
6324 (sha256
6325 (base32
6326 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6327 (build-system python-build-system)
6328 (arguments
6329 ;; incompatible with Python 3 (exception syntax)
6330 `(#:python ,python-2
6331 #:tests? #f))
6332 (home-page "https://github.com/dieterv/elib.intl")
6333 (synopsis "Enhanced internationalization for Python")
6334 (description
6335 "The elib.intl module provides enhanced internationalization (I18N)
6336 services for your Python modules and applications.")
6337 (license license:lgpl3+)))
6338
6339 (define-public python-olefile
6340 (package
6341 (name "python-olefile")
6342 (version "0.46")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6347 "download/v" version "/olefile-" version ".tar.gz"))
6348 (file-name (string-append name "-" version ".tar.gz"))
6349 (sha256
6350 (base32
6351 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6352 (build-system python-build-system)
6353 (home-page "https://www.decalage.info/python/olefileio")
6354 (synopsis "Read and write Microsoft OLE2 files.")
6355 (description
6356 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6357 Storage or Compound Document, Microsoft Office). It is an improved version of
6358 the OleFileIO module from PIL, the Python Image Library.")
6359 (license license:bsd-3)))
6360
6361 (define-public python2-olefile
6362 (package-with-python2 python-olefile))
6363
6364 (define-public python-pikepdf
6365 (package
6366 (name "python-pikepdf")
6367 (version "2.14.2")
6368 (source
6369 (origin
6370 (method url-fetch)
6371 (uri (pypi-uri "pikepdf" version))
6372 (sha256
6373 (base32 "01f173af5j0fmrzg6czfr92d331bqdbs3dkch7p41ykyv4fsv6kn"))))
6374 (build-system python-build-system)
6375 (arguments
6376 `(#:tests? #false)) ;require python-xmp-toolkit
6377 (native-inputs
6378 `(("pybind11" ,pybind11)
6379 ("python-setuptools" ,python-setuptools)
6380 ("python-setuptools-scm" ,python-setuptools-scm/next)
6381 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6382 ("python-toml" ,python-toml)
6383 ("python-wheel" ,python-wheel)))
6384 (inputs
6385 `(("qpdf" ,qpdf)))
6386 (propagated-inputs
6387 `(("python-lxml" ,python-lxml)
6388 ("python-pillow" ,python-pillow)))
6389 (home-page "https://github.com/pikepdf/pikepdf")
6390 (synopsis "Read and write PDFs with Python")
6391 (description
6392 "pikepdf is a Python library for reading and writing PDF files.")
6393 (license license:mpl2.0)))
6394
6395 (define-public python-pillow
6396 (package
6397 (name "python-pillow")
6398 (version "8.1.1")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "Pillow" version))
6403 (sha256
6404 (base32
6405 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6406 (build-system python-build-system)
6407 (native-inputs
6408 `(("python-pytest" ,python-pytest)))
6409 (inputs
6410 `(("freetype" ,freetype)
6411 ("lcms" ,lcms)
6412 ("libjpeg" ,libjpeg-turbo)
6413 ("libtiff" ,libtiff)
6414 ("libwebp" ,libwebp)
6415 ("openjpeg" ,openjpeg)
6416 ("zlib" ,zlib)))
6417 (propagated-inputs
6418 `(("python-olefile" ,python-olefile)))
6419 (arguments
6420 `(#:phases
6421 (modify-phases %standard-phases
6422 (add-after 'unpack 'patch-ldconfig
6423 (lambda _
6424 (substitute* "setup.py"
6425 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6426 (replace 'check
6427 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6428 (if tests?
6429 (begin
6430 (setenv "HOME" (getcwd))
6431 ;; Make installed package available for running the tests.
6432 (add-installed-pythonpath inputs outputs)
6433 (invoke "python" "selftest.py" "--installed")
6434 (invoke "python" "-m" "pytest" "-vv"))
6435 #t))))))
6436 (home-page "https://python-pillow.org")
6437 (synopsis "Fork of the Python Imaging Library")
6438 (description
6439 "The Python Imaging Library adds image processing capabilities to your
6440 Python interpreter. This library provides extensive file format support, an
6441 efficient internal representation, and fairly powerful image processing
6442 capabilities. The core image library is designed for fast access to data
6443 stored in a few basic pixel formats. It should provide a solid foundation for
6444 a general image processing tool.")
6445 (properties `((python2-variant . ,(delay python2-pillow))))
6446 (license (license:x11-style
6447 "http://www.pythonware.com/products/pil/license.htm"
6448 "The PIL Software License"))))
6449
6450 (define-public python2-pillow
6451 (package-with-python2
6452 (package
6453 (inherit (strip-python2-variant python-pillow))
6454 ;; Version 6 is the last series with Python 2 support.
6455 (version "6.2.2")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "Pillow" version))
6460 (sha256
6461 (base32
6462 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6463
6464 (define-public python-pillow-2.9
6465 (package
6466 (inherit python-pillow)
6467 (version "2.9.0")
6468 (source
6469 (origin
6470 (method url-fetch)
6471 (uri (pypi-uri "Pillow" version))
6472 (sha256
6473 (base32
6474 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6475 (arguments
6476 (substitute-keyword-arguments (package-arguments python-pillow)
6477 ((#:tests? _ #f) #f)))
6478 (properties '((hidden? #t)))))
6479
6480 (define-public python-pillow-simd
6481 (package
6482 (inherit python-pillow)
6483 (name "python-pillow-simd")
6484 (version "7.1.2")
6485 ;; The PyPI tarball does not include test files.
6486 (source
6487 (origin
6488 (method git-fetch)
6489 (uri (git-reference
6490 (url "https://github.com/uploadcare/pillow-simd")
6491 (commit version)))
6492 (file-name (git-file-name name version))
6493 (sha256
6494 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6495 (arguments
6496 (substitute-keyword-arguments
6497 (package-arguments python-pillow)
6498 ((#:phases phases)
6499 `(modify-phases ,phases
6500 (add-after 'unpack 'make-tests-writable
6501 (lambda _
6502 (for-each make-file-writable (find-files "Tests"))
6503 #t))))))
6504 (inputs
6505 `(("libraqm" ,libraqm)
6506 ("libimagequant" ,libimagequant)
6507 ,@(package-inputs python-pillow)))
6508 (home-page "https://github.com/uploadcare/pillow-simd")
6509 (synopsis "Fork of the Python Imaging Library (Pillow)")
6510 (description "This package is a fork of Pillow which adds support for SIMD
6511 parallelism.")))
6512
6513 (define-public python-imagecodecs
6514 (package
6515 (name "python-imagecodecs")
6516 (version "2021.3.31")
6517 (source
6518 (origin
6519 (method url-fetch)
6520 (uri (pypi-uri "imagecodecs" version))
6521 (sha256
6522 (base32
6523 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6524 (modules '((guix build utils)))
6525 (snippet
6526 '(begin
6527 ;; Unbundle 3rd party modules.
6528 (delete-file-recursively "3rdparty")
6529 ;; Delete pre-generated Cython files.
6530 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6531 #t))))
6532 (build-system python-build-system)
6533 (arguments
6534 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6535 #:phases
6536 (modify-phases %standard-phases
6537 (add-after 'unpack 'create-configuration
6538 (lambda* (#:key inputs #:allow-other-keys)
6539 ;; By default everything is enabled. We can selectively disable
6540 ;; extensions (and thus dependencies) by deleting them from the
6541 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6542 (call-with-output-file "imagecodecs_distributor_setup.py"
6543 (lambda (port)
6544 (format port "\
6545 def customize_build(EXTENSIONS, OPTIONS):
6546 del EXTENSIONS['aec']
6547 del EXTENSIONS['avif']
6548 del EXTENSIONS['bitshuffle']
6549 del EXTENSIONS['deflate']
6550 del EXTENSIONS['jpeg2k']
6551 del EXTENSIONS['jpeg12']
6552 del EXTENSIONS['jpegls']
6553 del EXTENSIONS['jpegxl']
6554 del EXTENSIONS['jpegxr']
6555 del EXTENSIONS['lerc']
6556 del EXTENSIONS['ljpeg']
6557 del EXTENSIONS['lzf']
6558 del EXTENSIONS['zfp']
6559 del EXTENSIONS['zopfli']
6560 OPTIONS['cythonize']
6561 ")))
6562 #t)))))
6563 (inputs
6564 `(("c-blosc" ,c-blosc)
6565 ("giflib" ,giflib)
6566 ("google-brotli" ,google-brotli)
6567 ("libjpeg-turbo" ,libjpeg-turbo)
6568 ("libpng" ,libpng)
6569 ("libtiff" ,libtiff)
6570 ("libwebp" ,libwebp)
6571 ("lz4" ,lz4)
6572 ("snappy" ,snappy)
6573 ("xz" ,xz)
6574 ("zlib" ,zlib)
6575 ("zstd" ,zstd "lib")))
6576 (propagated-inputs
6577 `(("python-numpy" ,python-numpy)))
6578 (native-inputs
6579 ;; For building.
6580 `(("python-cython" ,python-cython)
6581 ;; For testing. Incomplete.
6582 ;("python-numcodecs" ,python-numcodecs)
6583 ;("python-zarr" ,python-zarr)
6584 ;("python-pytest" ,python-pytest)
6585 ))
6586 (home-page "https://www.lfd.uci.edu/~gohlke/")
6587 (synopsis
6588 "Image transformation, compression, and decompression codecs")
6589 (description
6590 "Imagecodecs is a Python library that provides block-oriented, in-memory
6591 buffer transformation, compression, and decompression functions for use in the
6592 tifffile, czifile, and other scientific image input/output modules.")
6593 (license license:bsd-3)))
6594
6595 (define-public python-roifile
6596 (package
6597 (name "python-roifile")
6598 (version "2020.11.28")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "roifile" version))
6603 (sha256
6604 (base32
6605 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6606 (build-system python-build-system)
6607 (arguments `(#:tests? #f)) ; there are none
6608 (propagated-inputs
6609 `(("python-numpy" ,python-numpy)))
6610 (home-page "https://www.lfd.uci.edu/~gohlke/")
6611 (synopsis "Read and write ImageJ ROI format")
6612 (description "Roifile is a Python library to read, write, create, and plot
6613 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6614 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6615 (license license:bsd-3)))
6616
6617 (define-public python-tifffile
6618 (package
6619 (name "python-tifffile")
6620 (version "2021.4.8")
6621 (source
6622 (origin
6623 (method url-fetch)
6624 (uri (pypi-uri "tifffile" version))
6625 (sha256
6626 (base32
6627 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6628 (build-system python-build-system)
6629 ;; Tests require lfdfiles, which depends on tifffile
6630 (arguments `(#:tests? #f))
6631 (propagated-inputs
6632 `(("python-numpy" ,python-numpy)
6633 ("python-imagecodecs" ,python-imagecodecs)))
6634 (home-page "https://www.lfd.uci.edu/~gohlke/")
6635 (synopsis "Read and write TIFF(r) files")
6636 (description "This package lets you read image and metadata from many
6637 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6638 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6639 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6640 (license license:bsd-3)))
6641
6642 (define-public python-lfdfiles
6643 (package
6644 (name "python-lfdfiles")
6645 (version "2021.2.22")
6646 (source
6647 (origin
6648 (method url-fetch)
6649 (uri (pypi-uri "lfdfiles" version))
6650 (sha256
6651 (base32
6652 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6653 (modules '((guix build utils)))
6654 (snippet
6655 '(begin
6656 ;; Delete pre-generated Cython files.
6657 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6658 #t))))
6659 (build-system python-build-system)
6660 (arguments
6661 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6662 (propagated-inputs
6663 `(("python-click" ,python-click)
6664 ("python-numpy" ,python-numpy)
6665 ("python-tifffile" ,python-tifffile)))
6666 (native-inputs `(("python-cython" ,python-cython)))
6667 (home-page "https://www.lfd.uci.edu/~gohlke/")
6668 (synopsis "Work with LFD data files")
6669 (description
6670 "Lfdfiles is a Python library and console script for reading, writing,
6671 converting, and viewing many of the proprietary file formats used to store
6672 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6673 (license license:bsd-3)))
6674
6675 (define-public python-imageio
6676 (package
6677 (name "python-imageio")
6678 (version "2.8.0")
6679 (source
6680 (origin
6681 (method url-fetch)
6682 (uri (pypi-uri "imageio" version))
6683 (sha256
6684 (base32
6685 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6686 (build-system python-build-system)
6687 (arguments
6688 `(#:tests? #f ; many tests require online data
6689 #:phases
6690 (modify-phases %standard-phases
6691 (replace 'check
6692 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6693 (if tests?
6694 (begin
6695 ;; Make installed package available for running the tests.
6696 (add-installed-pythonpath inputs outputs)
6697 (invoke "pytest" "-vv"))
6698 #t))))))
6699 (propagated-inputs
6700 `(("python-numpy" ,python-numpy)
6701 ("python-pillow" ,python-pillow)
6702 ("python-psutil" ,python-psutil)))
6703 (native-inputs
6704 `(("python-pytest" ,python-pytest)))
6705 (home-page "https://imageio.github.io/")
6706 (synopsis "Library for reading and writing a wide range of image data")
6707 (description
6708 "Imageio is a Python library that provides an easy interface to read and
6709 write a wide range of image data, including animated images, video, volumetric
6710 data, and scientific formats.")
6711 (license license:bsd-2)))
6712
6713 (define-public python-pycparser
6714 (package
6715 (name "python-pycparser")
6716 (version "2.20")
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "pycparser" version))
6721 (sha256
6722 (base32
6723 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6724 (outputs '("out" "doc"))
6725 (build-system python-build-system)
6726 (native-inputs
6727 `(("pkg-config" ,pkg-config)))
6728 (arguments
6729 `(#:phases
6730 (modify-phases %standard-phases
6731 (replace 'check
6732 (lambda _
6733 (with-directory-excursion "tests"
6734 (invoke "python" "all_tests.py"))
6735 #t))
6736 (add-after 'install 'install-doc
6737 (lambda* (#:key outputs #:allow-other-keys)
6738 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6739 (doc (string-append data "/doc/" ,name "-" ,version))
6740 (examples (string-append doc "/examples")))
6741 (mkdir-p examples)
6742 (for-each (lambda (file)
6743 (copy-file (string-append "." file)
6744 (string-append doc file)))
6745 '("/README.rst" "/CHANGES" "/LICENSE"))
6746 (copy-recursively "examples" examples)
6747 #t))))))
6748 (home-page "https://github.com/eliben/pycparser")
6749 (synopsis "C parser in Python")
6750 (description
6751 "Pycparser is a complete parser of the C language, written in pure Python
6752 using the PLY parsing library. It parses C code into an AST and can serve as
6753 a front-end for C compilers or analysis tools.")
6754 (license license:bsd-3)))
6755
6756 (define-public python2-pycparser
6757 (package-with-python2 python-pycparser))
6758
6759 (define-public python-xlsxwriter
6760 (package
6761 (name "python-xlsxwriter")
6762 (version "1.3.9")
6763 (source
6764 (origin
6765 ;; There are no tests in the PyPI tarball.
6766 (method git-fetch)
6767 (uri (git-reference
6768 (url "https://github.com/jmcnamara/XlsxWriter")
6769 (commit (string-append "RELEASE_" version))))
6770 (file-name (git-file-name name version))
6771 (sha256
6772 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6773 (build-system python-build-system)
6774 (home-page "https://github.com/jmcnamara/XlsxWriter")
6775 (synopsis "Python module for creating Excel XLSX files")
6776 (description
6777 "XlsxWriter is a Python module that can be used to write text, numbers,
6778 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6779 (license license:bsd-2)))
6780
6781 (define-public python-pywavelets
6782 (package
6783 (name "python-pywavelets")
6784 (version "1.1.1")
6785 (home-page "https://github.com/PyWavelets/pywt")
6786 (source (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "PyWavelets" version))
6789 (sha256
6790 (base32
6791 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6792 (build-system python-build-system)
6793 (arguments
6794 '(#:modules ((ice-9 ftw)
6795 (srfi srfi-1)
6796 (srfi srfi-26)
6797 (guix build utils)
6798 (guix build python-build-system))
6799 #:phases
6800 (modify-phases %standard-phases
6801 (replace 'check
6802 (lambda _
6803 (let ((cwd (getcwd))
6804 (libdir (find (cut string-prefix? "lib." <>)
6805 (scandir "build"))))
6806 (with-directory-excursion (string-append cwd "/build/" libdir)
6807 (invoke "pytest" "-vv"))))))))
6808 (native-inputs
6809 `(("python-matplotlib" ,python-matplotlib) ;for tests
6810 ("python-pytest" ,python-pytest)))
6811 (propagated-inputs
6812 `(("python-numpy" ,python-numpy)))
6813 (synopsis "Wavelet transforms in Python")
6814 (description
6815 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6816 mathematical basis functions that are localized in both time and frequency.
6817 Wavelet transforms are time-frequency transforms employing wavelets. They are
6818 similar to Fourier transforms, the difference being that Fourier transforms are
6819 localized only in frequency instead of in time and frequency.")
6820 (license license:expat)))
6821
6822 (define-public python-pywal
6823 (package
6824 (name "python-pywal")
6825 (version "3.3.0")
6826 (source
6827 (origin
6828 (method git-fetch)
6829 (uri (git-reference
6830 (url "https://github.com/dylanaraps/pywal")
6831 (commit version)))
6832 (file-name (git-file-name name version))
6833 (sha256
6834 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6835 (build-system python-build-system)
6836 (arguments
6837 `(#:phases
6838 (modify-phases %standard-phases
6839 (add-before 'check 'fix-home-directory
6840 (lambda _
6841 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6842 (setenv "HOME" "/tmp")
6843 #t)))))
6844 (inputs
6845 `(("imagemagick" ,imagemagick)))
6846 (home-page "https://github.com/dylanaraps/pywal")
6847 (synopsis "Color palette generator and applicator")
6848 (description
6849 "Pywal is a tool that generates a color palette from the dominant colors
6850 in an image. It then applies the colors system-wide and on-the-fly in all of
6851 your favourite programs.")
6852 (license license:expat)))
6853
6854 (define-public python-pywinrm
6855 (package
6856 (name "python-pywinrm")
6857 (version "0.4.1")
6858 (source
6859 (origin
6860 (method url-fetch)
6861 (uri (pypi-uri "pywinrm" version))
6862 (sha256
6863 (base32
6864 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6865 (build-system python-build-system)
6866 (propagated-inputs
6867 `(("python-six" ,python-six)
6868 ("python-requests_ntlm" ,python-requests_ntlm)
6869 ("python-xmltodict" ,python-xmltodict)
6870 ("python-kerberos" ,python-kerberos)))
6871 (native-inputs
6872 `(("python-mock" ,python-mock)
6873 ("python-pytest" ,python-pytest)))
6874 (home-page "https://github.com/diyan/pywinrm/")
6875 (synopsis
6876 "Python library for Windows Remote Management (WinRM)")
6877 (description
6878 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6879 service. It allows you to invoke commands on target Windows machines from
6880 any machine that can run Python.")
6881 (license license:expat)))
6882
6883 (define-public python-xcffib
6884 (package
6885 (name "python-xcffib")
6886 (version "0.6.0")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "xcffib" version))
6891 (sha256
6892 (base32
6893 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6894 (build-system python-build-system)
6895 (inputs
6896 `(("libxcb" ,libxcb)))
6897 (propagated-inputs
6898 `(("python-cffi" ,python-cffi) ; used at run time
6899 ("python-six" ,python-six)))
6900 (arguments
6901 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6902 #:tests? #f
6903 #:phases
6904 (modify-phases %standard-phases
6905 (add-after 'unpack 'fix-libxcb-path
6906 (lambda* (#:key inputs #:allow-other-keys)
6907 (let ((libxcb (assoc-ref inputs "libxcb")))
6908 (substitute* '("xcffib/__init__.py")
6909 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6910 #t)))
6911 (add-after 'install 'install-doc
6912 (lambda* (#:key outputs #:allow-other-keys)
6913 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6914 "/doc/" ,name "-" ,version)))
6915 (mkdir-p doc)
6916 (copy-file "README.md"
6917 (string-append doc "/README.md"))
6918 #t))))))
6919 (home-page "https://github.com/tych0/xcffib")
6920 (synopsis "XCB Python bindings")
6921 (description
6922 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6923 support for Python 3 and PyPy. It is based on cffi.")
6924 (license license:expat)))
6925
6926 (define-public python2-xcffib
6927 (package-with-python2 python-xcffib))
6928
6929 (define-public python-cairocffi
6930 (package
6931 (name "python-cairocffi")
6932 (version "1.2.0")
6933 (source
6934 (origin
6935 ;; The PyPI archive does not include the documentation, so use Git.
6936 (method git-fetch)
6937 (uri (git-reference
6938 (url "https://github.com/Kozea/cairocffi")
6939 (commit (string-append "v" version))))
6940 (file-name (git-file-name name version))
6941 (sha256
6942 (base32
6943 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6944 (build-system python-build-system)
6945 (outputs '("out" "doc"))
6946 (inputs
6947 `(("glib" ,glib)
6948 ("gtk+" ,gtk+)
6949 ("gdk-pixbuf" ,gdk-pixbuf)
6950 ("cairo" ,cairo)))
6951 (native-inputs
6952 `(("python-numpy" ,python-numpy)
6953 ("python-pytest" ,python-pytest)
6954 ("python-pytest-cov" ,python-pytest-cov)
6955 ("python-pytest-runner" ,python-pytest-runner)
6956 ("python-sphinx" ,python-sphinx)
6957 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6958 (propagated-inputs
6959 `(("python-xcffib" ,python-xcffib))) ; used at run time
6960 (arguments
6961 `(#:phases
6962 (modify-phases %standard-phases
6963 (add-after 'unpack 'patch-paths
6964 (lambda* (#:key inputs #:allow-other-keys)
6965 (substitute* "cairocffi/__init__.py"
6966 ;; Hack the dynamic library loading mechanism.
6967 (("find_library\\(library_name\\)")
6968 "\"found\"")
6969 (("filenames = \\(library_filename,\\) \\+ filenames")
6970 "pass")
6971 (("libcairo.so.2")
6972 (string-append (assoc-ref inputs "cairo")
6973 "/lib/libcairo.so.2")))
6974 (substitute* "cairocffi/pixbuf.py"
6975 (("libgdk_pixbuf-2.0.so.0")
6976 (string-append (assoc-ref inputs "gdk-pixbuf")
6977 "/lib/libgdk_pixbuf-2.0.so.0"))
6978 (("libgobject-2.0.so.0")
6979 (string-append (assoc-ref inputs "glib")
6980 "/lib/libgobject-2.0.so.0"))
6981 (("libglib-2.0.so.0")
6982 (string-append (assoc-ref inputs "glib")
6983 "/lib/libglib-2.0.so.0"))
6984 (("libgdk-3.so.0")
6985 (string-append (assoc-ref inputs "gtk+")
6986 "/lib/libgdk-3.so.0")))
6987 #t))
6988 (add-after 'unpack 'disable-linters
6989 ;; Their check fails; none of our business.
6990 (lambda _
6991 (substitute* "setup.cfg"
6992 ((".*pytest-flake8.*") "")
6993 ((".*pytest-isort.*") "")
6994 (("--flake8") "")
6995 (("--isort") ""))
6996 #t))
6997 (add-after 'install 'install-doc
6998 (lambda* (#:key inputs outputs #:allow-other-keys)
6999 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7000 (doc (string-append data "/doc/" ,name "-" ,version))
7001 (html (string-append doc "/html")))
7002 (setenv "LD_LIBRARY_PATH"
7003 (string-append (assoc-ref inputs "cairo") "/lib" ":"
7004 (assoc-ref inputs "gdk-pixbuf") "/lib"))
7005 (setenv "LANG" "en_US.UTF-8")
7006 (mkdir-p html)
7007 (for-each (lambda (file)
7008 (copy-file (string-append "." file)
7009 (string-append doc file)))
7010 '("/README.rst" "/NEWS.rst"))
7011 (system* "python" "setup.py" "build_sphinx")
7012 (copy-recursively "docs/_build/html" html)
7013 #t))))))
7014 (home-page "https://github.com/Kozea/cairocffi")
7015 (synopsis "Python bindings and object-oriented API for Cairo")
7016 (description
7017 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
7018 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
7019 graphics library with support for multiple backends including image buffers,
7020 PNG, PostScript, PDF, and SVG file output.")
7021 (license license:bsd-3)))
7022
7023 (define-public python-decorator
7024 (package
7025 (name "python-decorator")
7026 (version "4.3.0")
7027 (source
7028 (origin
7029 (method url-fetch)
7030 (uri (pypi-uri "decorator" version))
7031 (sha256
7032 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
7033 (build-system python-build-system)
7034 (home-page "https://pypi.org/project/decorator/")
7035 (synopsis "Python module to simplify usage of decorators")
7036 (description
7037 "The aim of the decorator module is to simplify the usage of decorators
7038 for the average programmer, and to popularize decorators usage giving examples
7039 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
7040 etc. The core of this module is a decorator factory.")
7041 (license license:expat)))
7042
7043 (define-public python2-decorator
7044 (package-with-python2 python-decorator))
7045
7046 (define-public python-drmaa
7047 (package
7048 (name "python-drmaa")
7049 (version "0.7.7")
7050 (source
7051 (origin
7052 (method url-fetch)
7053 (uri (pypi-uri "drmaa" version))
7054 (sha256
7055 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
7056 (build-system python-build-system)
7057 ;; The test suite requires libdrmaa which is provided by the cluster
7058 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
7059 ;; should be set to the path of the libdrmaa library.
7060 (arguments '(#:tests? #f))
7061 (native-inputs
7062 `(("python-nose" ,python-nose)))
7063 (home-page "https://pypi.org/project/drmaa/")
7064 (synopsis "Python bindings for the DRMAA library")
7065 (description
7066 "A Python package for Distributed Resource Management (DRM) job
7067 submission and control. This package is an implementation of the DRMAA 1.0
7068 Python language binding specification.")
7069 (license license:bsd-3)))
7070
7071 (define-public python2-drmaa
7072 (package-with-python2 python-drmaa))
7073
7074 (define-public python-grako
7075 (package
7076 (name "python-grako")
7077 (version "3.99.9")
7078 (source
7079 (origin
7080 (method url-fetch)
7081 (uri
7082 (pypi-uri "grako" version ".zip"))
7083 (sha256
7084 (base32
7085 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
7086 (build-system python-build-system)
7087 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
7088 (native-inputs
7089 `(("unzip" ,unzip)
7090 ("python-pytest" ,python-pytest)
7091 ("python-pytest-runner" ,python-pytest-runner)))
7092 (home-page "https://bitbucket.org/neogeny/grako")
7093 (synopsis "EBNF parser generator")
7094 (description
7095 "Grako takes a grammar in a variation of EBNF as input, and outputs a
7096 memoizing PEG/Packrat parser in Python.")
7097 (license license:bsd-3)))
7098
7099 (define-public python2-grako
7100 (package-with-python2 python-grako))
7101
7102 (define-public python-grandalf
7103 (package
7104 (name "python-grandalf")
7105 (version "0.7")
7106 (source
7107 (origin
7108 ;; There's no source tarball on PyPI.
7109 (method git-fetch)
7110 (uri (git-reference
7111 (url "https://github.com/bdcht/grandalf")
7112 (commit (string-append "v" version))))
7113 (file-name (git-file-name name version))
7114 (sha256
7115 (base32
7116 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7117 (build-system python-build-system)
7118 (arguments
7119 '(#:phases
7120 (modify-phases %standard-phases
7121 (replace 'check
7122 (lambda _
7123 (invoke "python" "setup.py" "pytest"))))))
7124 (native-inputs
7125 `(("python-pytest" ,python-pytest)
7126 ("python-pytest-runner" ,python-pytest-runner)))
7127 (propagated-inputs
7128 `(("python-numpy" ,python-numpy)
7129 ("python-ply" ,python-ply)))
7130 (home-page "https://github.com/bdcht/grandalf")
7131 (synopsis "Graph and drawing algorithms framework")
7132 (description
7133 "Grandalf is a Python package made for experimentations with graphs
7134 drawing algorithms. It is written in pure Python, and currently implements
7135 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7136 minimization approach. While not as fast or featured as graphviz or other
7137 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7138 than thousands of nodes, while keeping the source code simple enough to tweak
7139 and hack any part of it for experimental purpose. With a total of about 1500
7140 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7141 in less than 600 lines. The energy minimization approach is comprised of only
7142 250 lines!
7143
7144 Grandalf does only 2 not-so-simple things:
7145 @itemize
7146 @item computing the nodes (x,y) coordinates (based on provided nodes
7147 dimensions, and a chosen layout)
7148 @item routing the edges with lines or nurbs
7149 @end itemize
7150
7151 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7152 will help you find where to draw things like nodes and edges, but it’s up to
7153 you to actually draw things with your favorite toolkit.")
7154 ;; The user can choose either license.
7155 (license (list license:gpl2 license:epl1.0))))
7156
7157 (define-public python-gridmap
7158 (package
7159 (name "python-gridmap")
7160 (version "0.14.0")
7161 (source
7162 (origin
7163 (method git-fetch)
7164 (uri (git-reference
7165 (url "https://github.com/pygridtools/gridmap")
7166 (commit (string-append "v" version))))
7167 (file-name (git-file-name name version))
7168 (sha256
7169 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7170 (build-system python-build-system)
7171 (arguments
7172 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7173 (propagated-inputs
7174 `(("python-psutil" ,python-psutil)
7175 ("python-drmaa" ,python-drmaa)
7176 ("python-pyzmq" ,python-pyzmq)))
7177 (home-page "https://github.com/pygridtools/gridmap")
7178 (synopsis "Create jobs on a cluster directly from Python")
7179 (description
7180 "Gridmap is a Python package to allow you to easily create jobs on the
7181 cluster directly from Python. You can directly map Python functions onto the
7182 cluster without needing to write any wrapper code yourself.")
7183 (license license:gpl3+)))
7184
7185 (define-public python-honcho
7186 (package
7187 (name "python-honcho")
7188 (version "1.0.1")
7189 (source
7190 (origin
7191 (method git-fetch)
7192 (uri (git-reference
7193 (url "https://github.com/nickstenning/honcho")
7194 (commit (string-append "v" version))))
7195 (file-name (git-file-name name version))
7196 (sha256
7197 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7198 (build-system python-build-system)
7199 (native-inputs
7200 `(("python-pytest" ,python-pytest)
7201 ("python-mock" ,python-mock)
7202 ("python-tox" ,python-tox)
7203 ("which" ,which))) ;for tests
7204 (propagated-inputs
7205 `(("python-jinja2" ,python-jinja2)))
7206 (arguments
7207 `(#:phases
7208 (modify-phases %standard-phases
7209 (delete 'check)
7210 (add-after 'install 'check
7211 (lambda* (#:key outputs inputs #:allow-other-keys)
7212 ;; fix honcho path in testsuite
7213 (substitute* "tests/conftest.py"
7214 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7215 "/bin/honcho" "'")))
7216 ;; It's easier to run tests after install.
7217 ;; Make installed package available for running the tests
7218 (add-installed-pythonpath inputs outputs)
7219 (invoke "py.test" "-v"))))))
7220 (home-page "https://github.com/nickstenning/honcho")
7221 (synopsis "Manage Procfile-based applications")
7222 (description
7223 "A Procfile is a file which describes how to run an application
7224 consisting of several processes. honcho starts all listed processes.
7225 The output of all running processes is collected by honcho and
7226 displayed.")
7227 (license license:expat)))
7228
7229 (define-public python-pexpect
7230 (package
7231 (name "python-pexpect")
7232 (version "4.8.0")
7233 (source
7234 (origin
7235 (method url-fetch)
7236 (uri (pypi-uri "pexpect" version))
7237 (sha256
7238 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7239 (build-system python-build-system)
7240 (arguments
7241 `(#:phases
7242 (modify-phases %standard-phases
7243 (add-before 'check 'prepare-tests
7244 (lambda _
7245 (substitute* (find-files "tests")
7246 (("/bin/ls") (which "ls"))
7247 (("/bin/echo") (which "echo"))
7248 (("/bin/which") (which "which"))
7249 ;; Many tests try to use the /bin directory which
7250 ;; is not present in the build environment.
7251 ;; Use one that's non-empty and unlikely to change.
7252 (("/bin'") "/dev'")
7253 ;; Disable failing test. See upstream bug report
7254 ;; https://github.com/pexpect/pexpect/issues/568
7255 (("def test_bash") "def _test_bash"))
7256 ;; XXX: Socket connection test gets "Connection reset by peer".
7257 ;; Why does it not work? Delete for now.
7258 (delete-file "tests/test_socket.py")
7259 #t))
7260 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7261 (native-inputs
7262 `(("python-nose" ,python-nose)
7263 ("python-pytest" ,python-pytest)
7264 ("man-db" ,man-db)
7265 ("which" ,which)
7266 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7267 (propagated-inputs
7268 `(("python-ptyprocess" ,python-ptyprocess)))
7269 (home-page "http://pexpect.readthedocs.org/")
7270 (synopsis "Controlling interactive console applications")
7271 (description
7272 "Pexpect is a pure Python module for spawning child applications;
7273 controlling them; and responding to expected patterns in their output.
7274 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7275 child application and control it as if a human were typing commands.")
7276 (license license:isc)))
7277
7278 (define-public python2-pexpect
7279 (package-with-python2 python-pexpect))
7280
7281 (define-public python-setuptools-scm
7282 (package
7283 (name "python-setuptools-scm")
7284 (version "3.4.3")
7285 (source (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "setuptools_scm" version))
7288 (sha256
7289 (base32
7290 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
7291 (build-system python-build-system)
7292 (home-page "https://github.com/pypa/setuptools_scm/")
7293 (synopsis "Manage Python package versions in SCM metadata")
7294 (description
7295 "Setuptools_scm handles managing your Python package versions in
7296 @dfn{software configuration management} (SCM) metadata instead of declaring
7297 them as the version argument or in a SCM managed file.")
7298 (license license:expat)))
7299
7300 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
7301 (define-public python-setuptools-scm/next
7302 (package
7303 (inherit python-setuptools-scm)
7304 (version "5.0.1")
7305 (source
7306 (origin
7307 (method url-fetch)
7308 (uri (pypi-uri "setuptools_scm" version))
7309 (sha256
7310 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
7311
7312 (define-public python2-setuptools-scm
7313 (package-with-python2 python-setuptools-scm))
7314
7315 (define-public python-sexpdata
7316 (package
7317 (name "python-sexpdata")
7318 (version "0.0.3")
7319 (source
7320 (origin
7321 (method url-fetch)
7322 (uri (pypi-uri "sexpdata" version))
7323 (sha256
7324 (base32
7325 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7326 (build-system python-build-system)
7327 (home-page "https://github.com/jd-boyd/sexpdata")
7328 (synopsis "S-expression parser for Python")
7329 (description
7330 "Sexpdata is an S-expression parser/serializer. It has load and dump
7331 functions like pickle, json or PyYAML module.")
7332 (license license:bsd-3)))
7333
7334 (define-public python-pathlib2
7335 (package
7336 (name "python-pathlib2")
7337 (version "2.3.3")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (pypi-uri "pathlib2" version))
7342 (sha256
7343 (base32
7344 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7345 (build-system python-build-system)
7346 (propagated-inputs
7347 `(("python-scandir" ,python-scandir)
7348 ("python-six" ,python-six)))
7349 (home-page "https://pypi.org/project/pathlib2/")
7350 (synopsis "Object-oriented file system paths")
7351 (description "The goal of pathlib2 is to provide a backport of the
7352 standard @code{pathlib} module which tracks the standard library module, so
7353 all the newest features of the standard @code{pathlib} can be used also on
7354 older Python versions.")
7355 (license license:expat)))
7356
7357 (define-public python-importlib-resources
7358 (package
7359 (name "python-importlib-resources")
7360 (version "3.0.0")
7361 (source
7362 (origin
7363 (method url-fetch)
7364 (uri (pypi-uri "importlib_resources" version))
7365 (sha256
7366 (base32
7367 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7368 (build-system python-build-system)
7369 (native-inputs
7370 `(("python-setuptools-scm" ,python-setuptools-scm)
7371 ("python-toml" ,python-toml)))
7372 (home-page "http://importlib-resources.readthedocs.io/")
7373 (synopsis "Read resources from Python packages")
7374 (description
7375 "@code{importlib_resources} is a backport of Python 3's standard library
7376 @code{importlib.resources} module for Python 2.7, and Python 3.")
7377 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7378 (license license:asl2.0)))
7379
7380 (define-public python2-importlib-resources
7381 (package
7382 (name "python2-importlib-resources")
7383 (version "1.0.2")
7384 (source (origin
7385 (method url-fetch)
7386 (uri (pypi-uri "importlib_resources" version))
7387 (sha256
7388 (base32
7389 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7390 (build-system python-build-system)
7391 (arguments
7392 `(#:python ,python-2
7393 #:phases (modify-phases %standard-phases
7394 ;; The build system tests for python-wheel, but it is
7395 ;; not required for Guix nor the test suite. Just drop
7396 ;; it to make bootstrapping pytest easier.
7397 (add-after 'unpack 'drop-wheel-dependency
7398 (lambda _
7399 (substitute* "setup.cfg"
7400 (("^[[:blank:]]+wheel")
7401 ""))
7402 #t)))))
7403 (propagated-inputs
7404 `(("python-pathlib2" ,python2-pathlib2)
7405 ("python-typing" ,python2-typing)))
7406 (home-page "https://gitlab.com/python-devs/importlib_resources")
7407 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7408 (description
7409 "This package provides an implementation of @code{importlib.resources}
7410 for older versions of Python.")
7411 (license license:asl2.0)))
7412
7413 ;; For importlib-metadata-bootstrap below.
7414 (define-public python2-importlib-resources-bootstrap
7415 (hidden-package
7416 (package/inherit
7417 python2-importlib-resources
7418 (name "python2-importlib-resources-bootstrap")
7419 (propagated-inputs
7420 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7421 ("python-typing" ,python2-typing))))))
7422
7423 (define-public python-importlib-metadata
7424 (package
7425 (name "python-importlib-metadata")
7426 (version "1.5.0")
7427 (source
7428 (origin
7429 (method url-fetch)
7430 (uri (pypi-uri "importlib_metadata" version))
7431 (sha256
7432 (base32
7433 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7434 (build-system python-build-system)
7435 (propagated-inputs
7436 `(("python-zipp" ,python-zipp)))
7437 (native-inputs
7438 `(("python-setuptools-scm" ,python-setuptools-scm)
7439 ("python-pyfakefs" ,python-pyfakefs)
7440 ("python-packaging" ,python-packaging)))
7441 (home-page "https://importlib-metadata.readthedocs.io/")
7442 (synopsis "Read metadata from Python packages")
7443 (description
7444 "@code{importlib_metadata} is a library which provides an API for
7445 accessing an installed Python package's metadata, such as its entry points or
7446 its top-level name. This functionality intends to replace most uses of
7447 @code{pkg_resources} entry point API and metadata API. Along with
7448 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7449 need to use the older and less efficient @code{pkg_resources} package.")
7450 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7451 (license license:asl2.0)))
7452
7453 (define-public python2-importlib-metadata
7454 (let ((base (package-with-python2 (strip-python2-variant
7455 python-importlib-metadata))))
7456 (package/inherit
7457 base
7458 (name "python2-importlib-metadata")
7459 (native-inputs
7460 `(("python-setuptools-scm" ,python2-setuptools-scm)
7461 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7462 ("python-packaging" ,python2-packaging-bootstrap)))
7463 (propagated-inputs
7464 `(("python-configparser" ,python2-configparser)
7465 ("python-contextlib2" ,python2-contextlib2)
7466 ("python-importlib-resources" ,python2-importlib-resources)
7467 ("python-pathlib2" ,python2-pathlib2)
7468 ,@(package-propagated-inputs base))))))
7469
7470 ;; This package is used by python2-pytest, and thus must not depend on it.
7471 (define-public python2-importlib-metadata-bootstrap
7472 (hidden-package
7473 (package/inherit
7474 python2-importlib-metadata
7475 (name "python2-importlib-metadata-bootstrap")
7476 (arguments
7477 `(#:tests? #f
7478 ,@(package-arguments python2-importlib-metadata)))
7479 (propagated-inputs
7480 `(("python-zipp" ,python2-zipp-bootstrap)
7481 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7482 ("python-configparser" ,python2-configparser)
7483 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7484 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7485
7486 (define-public python-importmagic
7487 (package
7488 (name "python-importmagic")
7489 (version "0.1.7")
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "importmagic" version))
7494 (sha256
7495 (base32
7496 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7497 (build-system python-build-system)
7498 (home-page "https://github.com/alecthomas/importmagic")
7499 (synopsis "Library for adding, removing and managing Python imports")
7500 (description
7501 "Importmagic is a Python library for automatically managing imports by
7502 finding unresolved symbols in Python code and their corresponding imports.")
7503 (license license:bsd-3)))
7504
7505 (define-public python-inotify-simple
7506 (package
7507 (name "python-inotify-simple")
7508 (version "1.3.5")
7509 (source
7510 (origin
7511 (method git-fetch)
7512 (uri (git-reference
7513 (url "https://github.com/chrisjbillington/inotify_simple")
7514 (commit version)))
7515 (file-name (git-file-name name version))
7516 (sha256
7517 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7518 (build-system python-build-system)
7519 (home-page
7520 "https://github.com/chrisjbillington/inotify_simple")
7521 (synopsis "Simple wrapper around inotify library")
7522 (description
7523 "@code{inotify-simple} is a simple wrapper around inotify library.")
7524 (license license:bsd-3)))
7525
7526 (define-public python-jaraco-packaging
7527 (package
7528 (name "python-jaraco-packaging")
7529 (version "6.1")
7530 (source
7531 (origin
7532 (method url-fetch)
7533 (uri (pypi-uri "jaraco.packaging" version))
7534 (sha256
7535 (base32
7536 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7537 (build-system python-build-system)
7538 (propagated-inputs
7539 `(("python-pytest" ,python-pytest)
7540 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7541 ("python-pytest-flake8" ,python-pytest-flake8)
7542 ("python-rst.linker" ,python-rst.linker)
7543 ("python-setuptools" ,python-setuptools)
7544 ("python-setuptools-scm" ,python-setuptools-scm)
7545 ("python-six" ,python-six)
7546 ("python-sphinx" ,python-sphinx)))
7547 (home-page "https://github.com/jaraco/jaraco.packaging")
7548 (synopsis "Tools to supplement packaging Python releases")
7549 (description
7550 "This package provides various tools to supplement packaging Python
7551 releases.")
7552 (license license:expat)))
7553
7554 (define-public python-pathpy
7555 (package
7556 (name "python-pathpy")
7557 (version "11.5.1")
7558 (source
7559 (origin
7560 (method url-fetch)
7561 (uri (pypi-uri "path.py" version))
7562 (sha256
7563 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7564 (outputs '("out" "doc"))
7565 (build-system python-build-system)
7566 (propagated-inputs
7567 `(("python-appdirs" ,python-appdirs)
7568 ("python-importlib-metadata" ,python-importlib-metadata)))
7569 (native-inputs
7570 `(("python-setuptools-scm" ,python-setuptools-scm)
7571 ("python-sphinx" ,python-sphinx)
7572 ("python-rst.linker" ,python-rst.linker)
7573 ("python-pytest" ,python-pytest)
7574 ("python-pytest-runner" ,python-pytest-runner)
7575 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7576 (arguments
7577 `(#:phases
7578 (modify-phases %standard-phases
7579 (add-after 'build 'build-doc
7580 (lambda _
7581 (setenv "LANG" "en_US.UTF-8")
7582 (invoke "python" "setup.py" "build_sphinx")))
7583 (add-after 'install 'install-doc
7584 (lambda* (#:key outputs #:allow-other-keys)
7585 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7586 (doc (string-append data "/doc/" ,name "-" ,version))
7587 (html (string-append doc "/html")))
7588 (mkdir-p html)
7589 (for-each (lambda (file)
7590 (copy-file file (string-append doc "/" file)))
7591 '("README.rst" "CHANGES.rst"))
7592 (copy-recursively "build/sphinx/html" html)
7593 #t)))
7594 (replace 'check
7595 (lambda _
7596 ;; The import time test aborts if an import takes longer than
7597 ;; 100ms. It may very well take a little longer than that.
7598 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7599 (home-page "https://github.com/jaraco/path.py")
7600 (synopsis "Python module wrapper for built-in os.path")
7601 (description
7602 "@code{path.py} implements path objects as first-class entities, allowing
7603 common operations on files to be invoked on those path objects directly.")
7604 (license license:expat)))
7605
7606 (define-public python-simplegeneric
7607 (package
7608 (name "python-simplegeneric")
7609 (version "0.8.1")
7610 (source
7611 (origin
7612 (method url-fetch)
7613 (uri (pypi-uri "simplegeneric" version ".zip"))
7614 (sha256
7615 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7616 (build-system python-build-system)
7617 (native-inputs
7618 `(("unzip" ,unzip)))
7619 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7620 (synopsis "Python module for simple generic functions")
7621 (description
7622 "The simplegeneric module lets you define simple single-dispatch generic
7623 functions, akin to Python’s built-in generic functions like @code{len()},
7624 @code{iter()} and so on. However, instead of using specially-named methods,
7625 these generic functions use simple lookup tables, akin to those used by
7626 e.g. @code{pickle.dump()} and other generic functions found in the Python
7627 standard library.")
7628 (license license:zpl2.1)))
7629
7630 (define-public python2-simplegeneric
7631 (package-with-python2 python-simplegeneric))
7632
7633 (define-public python-ipython-genutils
7634 ;; TODO: This package is retired, check if can be removed, see description.
7635 (package
7636 (name "python-ipython-genutils")
7637 (version "0.1.0")
7638 (source
7639 (origin
7640 (method url-fetch)
7641 (uri (pypi-uri "ipython_genutils" version))
7642 (sha256
7643 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7644 (build-system python-build-system)
7645 (arguments `(#:tests? #f)) ; no tests
7646 (home-page "https://ipython.org")
7647 (synopsis "Vestigial utilities from IPython")
7648 (description
7649 "This package provides retired utilities from IPython. No packages
7650 outside IPython/Jupyter should depend on it.
7651
7652 This package shouldn't exist. It contains some common utilities shared by
7653 Jupyter and IPython projects during The Big Split. As soon as possible, those
7654 packages will remove their dependency on this, and this package will go
7655 away.")
7656 (license license:bsd-3)))
7657
7658 (define-public python2-ipython-genutils
7659 (package-with-python2 python-ipython-genutils))
7660
7661 (define-public python-ipyparallel
7662 (package
7663 (name "python-ipyparallel")
7664 (version "6.2.4")
7665 (source
7666 (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "ipyparallel" version))
7669 (sha256
7670 (base32
7671 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7672 (build-system python-build-system)
7673 (arguments
7674 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7675 #:phases
7676 (modify-phases %standard-phases
7677 (add-before 'check 'prepare-for-tests
7678 (lambda _
7679 (setenv "HOME" (getcwd))
7680 #t)))))
7681 (propagated-inputs
7682 `(("python-dateutil" ,python-dateutil)
7683 ("python-decorator" ,python-decorator)
7684 ("python-ipykernel" ,python-ipykernel)
7685 ("python-ipython" ,python-ipython)
7686 ("python-ipython-genutils" ,python-ipython-genutils)
7687 ("python-jupyter-client" ,python-jupyter-client)
7688 ("python-pyzmq" ,python-pyzmq)
7689 ("python-tornado" ,python-tornado)
7690 ("python-traitlets" ,python-traitlets)))
7691 (native-inputs
7692 `(("python-ipython" ,python-ipython)
7693 ("python-mock" ,python-mock)
7694 ("python-nose" ,python-nose)
7695 ("python-pytest" ,python-pytest)
7696 ("python-pytest-cov" ,python-pytest-cov)
7697 ("python-testpath" ,python-testpath)))
7698 (home-page "https://ipython.org/")
7699 (synopsis "Interactive Parallel Computing with IPython")
7700 (description
7701 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7702 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7703 CLI scripts:
7704 @enumerate
7705 @item ipcluster - start/stop a cluster
7706 @item ipcontroller - start a scheduler
7707 @item ipengine - start an engine
7708 @end enumerate")
7709 (license license:bsd-3)))
7710
7711 (define-public python-ipython-cluster-helper
7712 (package
7713 (name "python-ipython-cluster-helper")
7714 (version "0.6.4")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "ipython-cluster-helper" version))
7719 (sha256
7720 (base32
7721 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7722 (modules '((guix build utils)))
7723 (snippet
7724 '(begin (substitute* "requirements.txt"
7725 (("ipython.*") "ipython\n"))
7726 #t))))
7727 (build-system python-build-system)
7728 (arguments
7729 `(#:tests? #f ; Test suite can't find IPython.
7730 #:phases
7731 (modify-phases %standard-phases
7732 (replace 'check
7733 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7734 (if tests?
7735 (begin
7736 (setenv "HOME" (getcwd))
7737 (add-installed-pythonpath inputs outputs)
7738 (invoke "python" "example/example.py" "--local"))
7739 #t))))))
7740 (propagated-inputs
7741 `(("python-ipyparallel" ,python-ipyparallel)
7742 ("python-ipython" ,python-ipython)
7743 ("python-netifaces" ,python-netifaces)
7744 ("python-pyzmq" ,python-pyzmq)
7745 ("python-setuptools" ,python-setuptools)
7746 ("python-six" ,python-six)))
7747 (home-page "https://github.com/roryk/ipython-cluster-helper")
7748 (synopsis
7749 "Simplify IPython cluster start up and use for multiple schedulers")
7750 (description
7751 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7752 profile, launches a cluster and returns a view. On program exit it shuts the
7753 cluster down and deletes the throwaway profile.")
7754 (license license:expat)))
7755
7756 (define-public python-traitlets
7757 (package
7758 (name "python-traitlets")
7759 (version "4.3.3")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "traitlets" version))
7764 (sha256
7765 (base32
7766 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7767 (build-system python-build-system)
7768 (arguments
7769 `(#:phases
7770 (modify-phases %standard-phases
7771 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7772 (propagated-inputs
7773 `(("python-ipython-genutils" ,python-ipython-genutils)
7774 ("python-decorator" ,python-decorator)
7775 ("python-six" ,python-six)))
7776 (native-inputs
7777 `(("python-pytest" ,python-pytest)))
7778 (properties `((python2-variant . ,(delay python2-traitlets))))
7779 (home-page "https://ipython.org")
7780 (synopsis "Configuration system for Python applications")
7781 (description
7782 "Traitlets is a framework that lets Python classes have attributes with
7783 type checking, dynamically calculated default values, and ‘on change’
7784 callbacks. The package also includes a mechanism to use traitlets for
7785 configuration, loading values from files or from command line arguments. This
7786 is a distinct layer on top of traitlets, so you can use traitlets in your code
7787 without using the configuration machinery.")
7788 (license license:bsd-3)))
7789
7790 (define-public python2-traitlets
7791 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7792 (package/inherit traitlets
7793 (propagated-inputs
7794 `(("python2-enum34" ,python2-enum34)
7795 ,@(package-propagated-inputs traitlets))))))
7796
7797 (define-public python-jupyter-core
7798 (package
7799 (name "python-jupyter-core")
7800 (version "4.7.1")
7801 (source
7802 (origin
7803 (method url-fetch)
7804 (uri (string-append (pypi-uri "jupyter_core" version)))
7805 (sha256
7806 (base32
7807 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7808 (build-system python-build-system)
7809 (arguments
7810 `(#:phases
7811 (modify-phases %standard-phases
7812 (replace 'check
7813 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7814 (when tests?
7815 ; Some tests write to $HOME.
7816 (setenv "HOME" "/tmp")
7817 ; Some tests load the installed package.
7818 (add-installed-pythonpath inputs outputs)
7819 (invoke "pytest" "-vv"))))
7820 (add-after 'unpack 'patch-testsuite
7821 (lambda _
7822 ;; test_not_on_path() and test_path_priority() try to run a test
7823 ;; that loads jupyter_core, so we need PYTHONPATH
7824 (substitute* "jupyter_core/tests/test_command.py"
7825 (("env = \\{'PATH': ''\\}")
7826 "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
7827 (("env = \\{'PATH': str\\(b\\)\\}")
7828 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
7829 #t))
7830 ;; Migration is running whenever etc/jupyter exists, but the
7831 ;; Guix-managed directory will never contain any migratable IPython
7832 ;; config files and cannot be written to anyway, so just pretend we
7833 ;; already did that.
7834 (add-after 'install 'disable-migration
7835 (lambda* (#:key outputs #:allow-other-keys)
7836 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
7837 (invoke "touch"
7838 (string-append
7839 (assoc-ref outputs "out")
7840 "/etc/jupyter/migrated")))))))
7841 (propagated-inputs
7842 `(("python-traitlets" ,python-traitlets)))
7843 (native-inputs
7844 `(("python-six" ,python-six)
7845 ("python-pytest" ,python-pytest)))
7846 ;; This package provides the `jupyter` binary and thus also exports the
7847 ;; search paths.
7848 (native-search-paths
7849 (list (search-path-specification
7850 (variable "JUPYTER_CONFIG_DIR")
7851 (files '("etc/jupyter")))
7852 (search-path-specification
7853 (variable "JUPYTER_PATH")
7854 (files '("share/jupyter")))))
7855 (home-page "https://jupyter.org/")
7856 (synopsis "Jupyter base package")
7857 (description
7858 "Jupyter core is the base package on which Jupyter projects rely.")
7859 (license license:bsd-3)))
7860
7861 (define-public python-jupyter-client
7862 (package
7863 (name "python-jupyter-client")
7864 (version "6.1.12")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "jupyter_client" version))
7869 (sha256
7870 (base32
7871 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7872 (build-system python-build-system)
7873 (arguments
7874 `(#:phases
7875 (modify-phases %standard-phases
7876 (add-after 'unpack 'set-tool-file-names
7877 (lambda* (#:key inputs #:allow-other-keys)
7878 (let ((iproute (assoc-ref inputs "iproute")))
7879 (substitute* "jupyter_client/localinterfaces.py"
7880 (("'ip'")
7881 (string-append "'" iproute "/sbin/ip'")))
7882 #t)))
7883 (replace 'check
7884 (lambda* (#:key tests? #:allow-other-keys)
7885 (when tests?
7886 ;; Some tests try to write to $HOME.
7887 (setenv "HOME" "/tmp")
7888 (invoke "pytest" "-vv")))))))
7889 (inputs
7890 `(("iproute" ,iproute)))
7891 (propagated-inputs
7892 `(("python-dateutil" ,python-dateutil)
7893 ("python-jupyter-core" ,python-jupyter-core)
7894 ("python-pyzmq" ,python-pyzmq)
7895 ("python-tornado" ,python-tornado-6)
7896 ("python-traitlets" ,python-traitlets)))
7897 (native-inputs
7898 `(("python-pytest" ,python-pytest)
7899 ("python-pytest-asyncio" ,python-pytest-asyncio)
7900 ("python-pytest-timeout" ,python-pytest-timeout)
7901 ("python-async-generator" ,python-async-generator)
7902 ("python-mock" ,python-mock)
7903 ("python-msgpack" ,python-msgpack)
7904 ("python-ipython" ,python-ipython)
7905 ("python-ipykernel" ,python-ipykernel-bootstrap)))
7906 (home-page "https://jupyter.org/")
7907 (synopsis "Jupyter protocol implementation and client libraries")
7908 (description
7909 "The @code{jupyter_client} package contains the reference implementation
7910 of the Jupyter protocol. It also provides client and kernel management APIs
7911 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7912 installing @code{kernelspec}s for use with Jupyter frontends.")
7913 (license license:bsd-3)))
7914
7915 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
7916 ;; and jupyter-client by removing the former from its native-inputs and
7917 ;; disabling tests.
7918 (define-public python-jupyter-client-bootstrap
7919 (let ((base python-jupyter-client))
7920 (hidden-package
7921 (package
7922 (inherit base)
7923 (name "python-jupyter-client-bootstrap")
7924 (arguments
7925 `(#:tests? #f
7926 ,@(package-arguments base)))
7927 (native-inputs `())))))
7928
7929 (define-public python-ipykernel
7930 (package
7931 (name "python-ipykernel")
7932 (version "5.5.3")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "ipykernel" version))
7937 (sha256
7938 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7939 (build-system python-build-system)
7940 (arguments
7941 `(#:phases
7942 (modify-phases %standard-phases
7943 (replace 'check
7944 (lambda _
7945 (setenv "HOME" "/tmp")
7946 (invoke "pytest" "-v")
7947 #t))
7948 (add-after 'install 'set-python-file-name
7949 (lambda* (#:key outputs #:allow-other-keys)
7950 ;; Record the absolute file name of the 'python' executable in
7951 ;; 'kernel.json'.
7952 (let ((out (assoc-ref outputs "out")))
7953 (substitute* (string-append out "/share/jupyter"
7954 "/kernels/python3/kernel.json")
7955 (("\"python\"")
7956 (string-append "\"" (which "python") "\"")))
7957 #t))))))
7958 (propagated-inputs
7959 `(("python-ipython" ,python-ipython)
7960 ("python-tornado" ,python-tornado-6)
7961 ("python-traitlets" ,python-traitlets)
7962 ;; imported at runtime during connect
7963 ("python-jupyter-client" ,python-jupyter-client)))
7964 (native-inputs
7965 `(("python-flaky" ,python-flaky)
7966 ("python-nose" ,python-nose)
7967 ("python-pytest" ,python-pytest)))
7968 (home-page "https://ipython.org")
7969 (synopsis "IPython Kernel for Jupyter")
7970 (description
7971 "This package provides the IPython kernel for Jupyter.")
7972 (license license:bsd-3)))
7973
7974 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
7975 ;; break the cycle between ipykernel and jupyter-client.
7976 (define-public python-ipykernel-bootstrap
7977 (let ((parent python-ipykernel))
7978 (hidden-package
7979 (package
7980 (inherit parent)
7981 (name "python-ipykernel-bootstrap")
7982 (propagated-inputs
7983 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
7984 ,@(fold alist-delete (package-propagated-inputs parent)
7985 '("python-jupyter-client"))))))))
7986
7987 (define-public python-pari-jupyter
7988 (package
7989 (name "python-pari-jupyter")
7990 (version "1.3.2")
7991 (source
7992 (origin
7993 (method url-fetch)
7994 (uri (pypi-uri "pari_jupyter" version))
7995 (sha256
7996 (base32
7997 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7998 (build-system python-build-system)
7999 (propagated-inputs
8000 `(("python-ipykernel" ,python-ipykernel)))
8001 (inputs
8002 `(("pari-gp" ,pari-gp)
8003 ("readline" ,readline)))
8004 (arguments
8005 `(#:tests? #f)) ; no test suite
8006 (home-page
8007 "https://github.com/jdemeyer/pari_jupyter")
8008 (synopsis "A Jupyter kernel for PARI/GP")
8009 (description "The package provides a PARI/GP kernel for Jupyter.")
8010 (license license:gpl3+)))
8011
8012 (define-public python-backcall
8013 (package
8014 (name "python-backcall")
8015 (version "0.2.0")
8016 (source
8017 (origin
8018 (method url-fetch)
8019 (uri (pypi-uri "backcall" version))
8020 (sha256
8021 (base32
8022 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
8023 (build-system python-build-system)
8024 (home-page "https://github.com/takluyver/backcall/")
8025 (synopsis "Specifications for callback functions passed in to an API")
8026 (description
8027 "If your code lets other people supply callback functions, it's important
8028 to specify the function signature you expect, and check that functions support
8029 that. Adding extra parameters later would break other peoples code unless
8030 you're careful. The @code{backcall} package provides a way of specifying the
8031 callback signature using a prototype function.")
8032 (license license:bsd-3)))
8033
8034 (define-public python-ipython
8035 (package
8036 (name "python-ipython")
8037 (version "7.9.0")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "ipython" version ".tar.gz"))
8042 (sha256
8043 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8044 (build-system python-build-system)
8045 (propagated-inputs
8046 `(("python-backcall" ,python-backcall)
8047 ("python-pyzmq" ,python-pyzmq)
8048 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
8049 ("python-terminado" ,python-terminado)
8050 ("python-matplotlib" ,python-matplotlib)
8051 ("python-numpy" ,python-numpy)
8052 ("python-numpydoc" ,python-numpydoc)
8053 ("python-jedi" ,python-jedi)
8054 ("python-jinja2" ,python-jinja2)
8055 ("python-mistune" ,python-mistune)
8056 ("python-pexpect" ,python-pexpect)
8057 ("python-pickleshare" ,python-pickleshare)
8058 ("python-simplegeneric" ,python-simplegeneric)
8059 ("python-jsonschema" ,python-jsonschema)
8060 ("python-traitlets" ,python-traitlets)
8061 ("python-nbformat" ,python-nbformat)
8062 ("python-pygments" ,python-pygments)))
8063 (inputs
8064 `(("readline" ,readline)
8065 ("which" ,which)))
8066 (native-inputs
8067 `(("graphviz" ,graphviz)
8068 ("pkg-config" ,pkg-config)
8069 ("python-requests" ,python-requests) ;; for tests
8070 ("python-testpath" ,python-testpath)
8071 ("python-nose" ,python-nose)))
8072 (arguments
8073 `(#:phases
8074 (modify-phases %standard-phases
8075 (add-after 'unpack 'make-docs-reproducible
8076 (lambda _
8077 (substitute* "IPython/sphinxext/ipython_directive.py"
8078 ((".*import datetime") "")
8079 ((".*datetime.datetime.now\\(\\)") "")
8080 (("%timeit") "# %timeit"))
8081 #t))
8082 ;; Tests can only be run after the library has been installed and not
8083 ;; within the source directory.
8084 (delete 'check)
8085 (add-after 'install 'check
8086 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8087 (if tests?
8088 (begin
8089 ;; Make installed package available for running the tests
8090 (add-installed-pythonpath inputs outputs)
8091 (setenv "HOME" "/tmp/") ;; required by a test
8092 ;; We only test the core because one of the other tests
8093 ;; tries to import ipykernel.
8094 (invoke "python" "IPython/testing/iptest.py"
8095 "-v" "IPython/core/tests"))
8096 #t)))
8097 (add-before 'check 'fix-tests
8098 (lambda* (#:key inputs #:allow-other-keys)
8099 (substitute* "./IPython/utils/_process_posix.py"
8100 (("/usr/bin/env', 'which") (which "which")))
8101 (substitute* "./IPython/core/tests/test_inputtransformer.py"
8102 (("#!/usr/bin/env python")
8103 (string-append "#!" (which "python"))))
8104 ;; This test introduces a circular dependency on ipykernel
8105 ;; (which depends on ipython).
8106 (delete-file "IPython/core/tests/test_display.py")
8107 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
8108 (delete-file "IPython/core/tests/test_interactiveshell.py")
8109 #t)))))
8110 (home-page "https://ipython.org")
8111 (synopsis "IPython is a tool for interactive computing in Python")
8112 (description
8113 "IPython provides a rich architecture for interactive computing with:
8114 Powerful interactive shells, a browser-based notebook, support for interactive
8115 data visualization, embeddable interpreters and tools for parallel
8116 computing.")
8117 (license license:bsd-3)))
8118
8119 (define-public python-ipython-documentation
8120 (package
8121 (inherit python-ipython)
8122 (name "python-ipython-documentation")
8123 (version (package-version python-ipython))
8124 (arguments
8125 `(#:phases
8126 (modify-phases %standard-phases
8127 (delete 'build)
8128 (delete 'check)
8129 (replace 'install
8130 (lambda* (#:key outputs #:allow-other-keys)
8131 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8132 (doc (string-append data "/doc/" ,name "-" ,version))
8133 (html (string-append doc "/html"))
8134 (man1 (string-append data "/man/man1"))
8135 (info (string-append data "/info"))
8136 (examples (string-append doc "/examples"))
8137 (python-arg (string-append "PYTHON=" (which "python"))))
8138 (setenv "LANG" "en_US.utf8")
8139 (with-directory-excursion "docs"
8140 ;; FIXME: pdf fails to build
8141 ;;(system* "make" "pdf" "PAPER=a4")
8142 (system* "make" python-arg "html")
8143 ;; FIXME: the generated texi file contains ^@^@, which trips
8144 ;; up the parser.
8145 ;; (system* "make" python-arg "info")
8146 )
8147 (copy-recursively "docs/man" man1)
8148 (copy-recursively "examples" examples)
8149 (copy-recursively "docs/build/html" html)
8150 ;; (copy-file "docs/build/latex/ipython.pdf"
8151 ;; (string-append doc "/ipython.pdf"))
8152 (mkdir-p info)
8153 ;; (copy-file "docs/build/texinfo/ipython.info"
8154 ;; (string-append info "/ipython.info"))
8155 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8156 #t)))))
8157 (inputs
8158 `(("python-ipython" ,python-ipython)
8159 ("python-ipykernel" ,python-ipykernel)))
8160 (native-inputs
8161 `(("python-sphinx" ,python-sphinx)
8162 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8163 ;; FIXME: It's possible that a smaller union would work just as well.
8164 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
8165 texlive-fonts-ec
8166 texlive-generic-ifxetex
8167 texlive-generic-pdftex
8168 texlive-latex-capt-of
8169 texlive-latex-cmap
8170 texlive-latex-environ
8171 texlive-latex-eqparbox
8172 texlive-latex-etoolbox
8173 texlive-latex-expdlist
8174 texlive-latex-fancyhdr
8175 texlive-latex-fancyvrb
8176 texlive-latex-fncychap
8177 texlive-latex-float
8178 texlive-latex-framed
8179 texlive-latex-geometry
8180 texlive-latex-graphics
8181 texlive-latex-hyperref
8182 texlive-latex-mdwtools
8183 texlive-latex-multirow
8184 texlive-latex-needspace
8185 texlive-latex-oberdiek
8186 texlive-latex-parskip
8187 texlive-latex-preview
8188 texlive-latex-tabulary
8189 texlive-latex-threeparttable
8190 texlive-latex-titlesec
8191 texlive-latex-trimspaces
8192 texlive-latex-ucs
8193 texlive-latex-upquote
8194 texlive-latex-url
8195 texlive-latex-varwidth
8196 texlive-latex-wrapfig)))
8197 ("texinfo" ,texinfo)))))
8198
8199 (define-public python-urwid
8200 (package
8201 (name "python-urwid")
8202 (version "2.1.2")
8203 (source
8204 (origin
8205 (method url-fetch)
8206 (uri (pypi-uri "urwid" version))
8207 (sha256
8208 (base32
8209 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8210 (build-system python-build-system)
8211 (home-page "http://urwid.org")
8212 (synopsis "Console user interface library for Python")
8213 (description
8214 "Urwid is a curses-based UI/widget library for Python. It includes many
8215 features useful for text console applications.")
8216 (properties `((python2-variant . ,(delay python2-urwid))))
8217 (license license:lgpl2.1+)))
8218
8219 (define-public python2-urwid
8220 (let ((base (package-with-python2
8221 (strip-python2-variant python-urwid))))
8222 (package
8223 (inherit base)
8224 (version "2.1.0")
8225 (source
8226 (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "urwid" version))
8229 (sha256
8230 (base32
8231 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8232
8233 (define-public python-urwid-readline
8234 (package
8235 (name "python-urwid-readline")
8236 (version "0.12")
8237 (source
8238 (origin
8239 (method git-fetch)
8240 (uri (git-reference
8241 (url "https://github.com/rr-/urwid_readline")
8242 (commit version)))
8243 (file-name (git-file-name name version))
8244 (sha256
8245 (base32
8246 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8247 (build-system python-build-system)
8248 (arguments
8249 `(#:phases
8250 (modify-phases %standard-phases
8251 (replace 'check
8252 (lambda* (#:key tests? #:allow-other-keys)
8253 (when tests?
8254 (invoke "python" "-m" "pytest"))
8255 #t)))))
8256 (propagated-inputs
8257 `(("python-urwid" ,python-urwid)))
8258 (native-inputs
8259 `(("python-pytest" ,python-pytest)))
8260 (home-page "https://github.com/rr-/urwid_readline")
8261 (synopsis "Text input widget for urwid that supports readline shortcuts")
8262 (description
8263 "This package provides a textbox edit widget for @code{python-urwid} that
8264 supports @code{readline} shortcuts.")
8265 (license license:expat)))
8266
8267 (define-public python-textdistance
8268 (package
8269 (name "python-textdistance")
8270 (version "4.2.1")
8271 (source
8272 (origin
8273 ;; There are no tests in the PyPI tarball.
8274 (method git-fetch)
8275 (uri (git-reference
8276 (url "https://github.com/life4/textdistance")
8277 (commit (string-append "v." version))))
8278 (file-name (git-file-name name version))
8279 (sha256
8280 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8281 (build-system python-build-system)
8282 (arguments
8283 `(#:test-target "pytest"
8284 #:phases
8285 (modify-phases %standard-phases
8286 (add-after 'unpack 'delete-external-test
8287 (lambda _
8288 ;; All tests in this file require external libraries.
8289 (delete-file "tests/test_external.py")
8290 #t)))))
8291 (native-inputs
8292 `(("python-hypothesis" ,python-hypothesis)
8293 ("python-isort" ,python-isort)
8294 ("python-numpy" ,python-numpy)
8295 ("python-pytest" ,python-pytest)
8296 ("python-pytest-runner" ,python-pytest-runner)
8297 ("python-tabulate" ,python-tabulate)))
8298 (home-page "https://github.com/life4/textdistance")
8299 (synopsis "Compute distance between the two texts")
8300 (description "@code{textdistance} is a pure Python library for comparing
8301 distance between two or more sequences by many algorithms.")
8302 (license license:expat)))
8303
8304 (define-public python-urwidtrees
8305 (package
8306 (name "python-urwidtrees")
8307 (version "1.0.2")
8308 (source
8309 (origin
8310 (method git-fetch)
8311 ;; package author intends on distributing via github rather than pypi:
8312 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8313 (uri (git-reference
8314 (url "https://github.com/pazz/urwidtrees")
8315 (commit version)))
8316 (file-name (git-file-name name version))
8317 (sha256
8318 (base32
8319 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8320 (build-system python-build-system)
8321 (arguments
8322 '(#:use-setuptools? #f
8323 #:tests? #f)) ; no tests
8324 (propagated-inputs `(("python-urwid" ,python-urwid)))
8325 (home-page "https://github.com/pazz/urwidtrees")
8326 (synopsis "Tree widgets for urwid")
8327 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8328 toolkit. Use it to build trees of widgets.")
8329 (license license:gpl3+)))
8330
8331 (define-public python2-urwidtrees
8332 (package-with-python2 python-urwidtrees))
8333
8334 (define-public python-ua-parser
8335 (package
8336 (name "python-ua-parser")
8337 (version "0.8.0")
8338 (source
8339 (origin
8340 (method url-fetch)
8341 (uri (pypi-uri "ua-parser" version))
8342 (sha256
8343 (base32
8344 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8345 (build-system python-build-system)
8346 (arguments
8347 `(#:tests? #f)) ;no test suite in release
8348 (native-inputs
8349 `(("python-pyyaml" ,python-pyyaml)))
8350 (home-page "https://github.com/ua-parser/uap-python")
8351 (synopsis "User agent parser")
8352 (description
8353 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8354 (license license:asl2.0)))
8355
8356 (define-public python2-ua-parser
8357 (package-with-python2 python-ua-parser))
8358
8359 (define-public python-user-agents
8360 (package
8361 (name "python-user-agents")
8362 (version "1.1.0")
8363 (source
8364 (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "user-agents" version))
8367 (sha256
8368 (base32
8369 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8370 (build-system python-build-system)
8371 (arguments
8372 `(#:tests? #f)) ;missing devices.json test file in release
8373 (propagated-inputs
8374 `(("python-ua-parser" ,python-ua-parser)))
8375 (home-page "https://github.com/selwin/python-user-agents")
8376 (synopsis "User Agent strings parsing library")
8377 (description
8378 "A library to identify devices (phones, tablets) and their capabilities by
8379 parsing (browser/HTTP) user agent strings.")
8380 (license license:expat)))
8381
8382 (define-public python2-user-agents
8383 (package-with-python2 python-user-agents))
8384
8385 (define-public python-dbus
8386 (package
8387 (name "python-dbus")
8388 (version "1.2.16")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8393 "dbus-python-" version ".tar.gz"))
8394 (sha256
8395 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8396 (build-system gnu-build-system)
8397 (native-inputs
8398 `(("pkg-config" ,pkg-config)))
8399 (inputs
8400 `(("python" ,python-wrapper)
8401 ("dbus-glib" ,dbus-glib)))
8402 (synopsis "Python bindings for D-bus")
8403 (description "python-dbus provides bindings for libdbus, the reference
8404 implementation of D-Bus.")
8405 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8406 (license license:expat)))
8407
8408 (define-public python2-dbus
8409 (package/inherit python-dbus
8410 (name "python2-dbus")
8411 (inputs `(("python" ,python-2)
8412 ,@(alist-delete "python"
8413 (package-inputs python-dbus)
8414 equal?)))))
8415
8416 (define-public python-notify2
8417 (package
8418 (name "python-notify2")
8419 (version "0.3.1")
8420 (source
8421 (origin
8422 (method url-fetch)
8423 (uri (pypi-uri "notify2" version))
8424 (sha256
8425 (base32
8426 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8427 (build-system python-build-system)
8428 (arguments `(#:tests? #f)) ; tests depend on system state
8429 (native-inputs
8430 `(("python-dbus" ,python-dbus)))
8431 (home-page "https://bitbucket.org/takluyver/pynotify2")
8432 (synopsis "Python interface to D-Bus notifications")
8433 (description
8434 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8435 It is a reimplementation of pynotify in pure Python, and an alternative to
8436 the GObject Introspection bindings to libnotify for non-GTK applications.")
8437 (license (list license:bsd-2
8438 license:lgpl2.1+))))
8439
8440 (define-public python2-notify2
8441 (package-with-python2 python-notify2))
8442
8443 ;; beautifulsoup4 has a totally different namespace than 3.x,
8444 ;; and pypi seems to put it under its own name, so I guess we should too
8445 (define-public python-beautifulsoup4
8446 (package
8447 (name "python-beautifulsoup4")
8448 (version "4.9.3")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "beautifulsoup4" version))
8453 (sha256
8454 (base32
8455 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8456 (build-system python-build-system)
8457 (arguments
8458 `(#:phases
8459 (modify-phases %standard-phases
8460 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8461 ;; must use this conversion script when building with Python 3. The
8462 ;; conversion script also runs the tests.
8463 ;; For more information, see the file 'convert-py3k' in the source
8464 ;; distribution.
8465 (replace 'check
8466 (lambda _ (invoke "./convert-py3k"))))))
8467 (propagated-inputs
8468 `(("python-soupsieve" ,python-soupsieve)))
8469 (home-page
8470 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8471 (synopsis
8472 "Python screen-scraping library")
8473 (description
8474 "Beautiful Soup is a Python library designed for rapidly setting up
8475 screen-scraping projects. It offers Pythonic idioms for navigating,
8476 searching, and modifying a parse tree, providing a toolkit for
8477 dissecting a document and extracting what you need. It automatically
8478 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8479 (license license:expat)
8480 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8481
8482 (define-public python2-beautifulsoup4
8483 (let ((base (package-with-python2
8484 (strip-python2-variant python-beautifulsoup4))))
8485 (package/inherit base
8486 (arguments `(#:python ,python-2)))))
8487
8488 (define-public python-soupsieve
8489 (package
8490 (name "python-soupsieve")
8491 (version "2.2.1")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "soupsieve" version))
8496 (sha256
8497 (base32
8498 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8499 (build-system python-build-system)
8500 (arguments `(#:tests? #f))
8501 ;;XXX: 2 tests fail currently despite claming they were to be
8502 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8503 ;;don't want to create a circular dependency.
8504 (home-page "https://github.com/facelessuser/soupsieve")
8505 (synopsis "CSS selector library")
8506 (description
8507 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8508 Soup 4. It aims to provide selecting, matching, and filtering using modern
8509 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8510 specifications up through the latest CSS level 4 drafts and beyond (though
8511 some are not yet implemented).")
8512 (properties `((python2-variant . ,(delay python2-soupsieve))))
8513 (license license:expat)))
8514
8515 ;; This is the last version that supports python-2
8516 (define-public python2-soupsieve
8517 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8518 (package
8519 (inherit base)
8520 (version "1.9.6")
8521 (source
8522 (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "soupsieve" version))
8525 (sha256
8526 (base32
8527 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8528 (propagated-inputs
8529 `(("python2-backports-functools-lru-cache"
8530 ,python2-backports-functools-lru-cache)
8531 ,@(package-propagated-inputs base))))))
8532
8533 (define-public python-netifaces
8534 (package
8535 (name "python-netifaces")
8536 (version "0.10.9")
8537 (source
8538 (origin
8539 (method url-fetch)
8540 (uri (pypi-uri "netifaces" version))
8541 (sha256
8542 (base32
8543 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8544 (build-system python-build-system)
8545 (home-page "https://github.com/al45tair/netifaces")
8546 (synopsis
8547 "Python module for portable network interface information")
8548 (description
8549 "Netifaces is a Python module providing information on network
8550 interfaces in an easy and portable manner.")
8551 (license license:expat)))
8552
8553 (define-public python2-netifaces
8554 (package-with-python2 python-netifaces))
8555
8556 (define-public python-networkx
8557 (package
8558 (name "python-networkx")
8559 (version "2.5.1")
8560 (source
8561 (origin
8562 (method url-fetch)
8563 (uri (pypi-uri "networkx" version))
8564 (sha256
8565 (base32 "0ni3pdisdr8vfp5m9sw8jzr7jwzgqqmc9hq327vrf4n4ra2xb70h"))))
8566 (build-system python-build-system)
8567 (arguments
8568 '(#:phases (modify-phases %standard-phases
8569 (replace 'check
8570 (lambda* (#:key tests? #:allow-other-keys)
8571 (if tests?
8572 (invoke "pytest" "-vv" "--pyargs" "networkx")
8573 (format #t "test suite not run~%"))
8574 #t)))))
8575 ;; python-decorator is needed at runtime.
8576 (propagated-inputs
8577 `(("python-decorator" ,python-decorator)))
8578 (native-inputs
8579 `(("python-pytest" ,python-pytest)))
8580 (home-page "https://networkx.github.io/")
8581 (synopsis "Python module for creating and manipulating graphs and networks")
8582 (description
8583 "NetworkX is a Python package for the creation, manipulation, and study
8584 of the structure, dynamics, and functions of complex networks.")
8585 (properties `((python2-variant . ,(delay python2-networkx))))
8586 (license license:bsd-3)))
8587
8588 ;; NetworkX 2.2 is the last version with support for Python 2.
8589 (define-public python2-networkx
8590 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8591 (package
8592 (inherit base)
8593 (version "2.2")
8594 (source (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "networkx" version ".zip"))
8597 (sha256
8598 (base32
8599 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8600 (arguments
8601 `(#:python ,python-2))
8602 (native-inputs
8603 `(("python-nose" ,python2-nose)
8604 ("unzip" ,unzip))))))
8605
8606 (define-public python-datrie
8607 (package
8608 (name "python-datrie")
8609 (version "0.8.2")
8610 (source
8611 (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "datrie" version))
8614 (sha256
8615 (base32
8616 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8617 (build-system python-build-system)
8618 (native-inputs
8619 `(("python-cython" ,python-cython)
8620 ("python-hypothesis" ,python-hypothesis)
8621 ("python-pytest" ,python-pytest)
8622 ("python-pytest-runner" ,python-pytest-runner)))
8623 (home-page "https://github.com/kmike/datrie")
8624 (synopsis "Fast, efficiently stored trie for Python")
8625 (description
8626 "This package provides a fast, efficiently stored trie implementation for
8627 Python.")
8628 (license license:lgpl2.1+)))
8629
8630 (define-public python-amply
8631 (package
8632 (name "python-amply")
8633 (version "0.1.4")
8634 (source
8635 (origin
8636 (method url-fetch)
8637 (uri (pypi-uri "amply" version))
8638 (sha256
8639 (base32
8640 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8641 (build-system python-build-system)
8642 (propagated-inputs
8643 `(("python-docutils" ,python-docutils)
8644 ("python-pyparsing" ,python-pyparsing)))
8645 (native-inputs
8646 `(("python-setuptools-scm" ,python-setuptools-scm)))
8647 (home-page "https://github.com/willu47/amply")
8648 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8649 (description
8650 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8651 structures.")
8652 (license license:epl1.0)))
8653
8654 (define-public python-pulp
8655 (package
8656 (name "python-pulp")
8657 (version "2.4")
8658 (source
8659 (origin
8660 (method url-fetch)
8661 (uri (pypi-uri "PuLP" version))
8662 (sha256
8663 (base32
8664 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8665 (build-system python-build-system)
8666 (propagated-inputs
8667 `(("python-amply" ,python-amply)))
8668 (home-page "https://github.com/coin-or/pulp")
8669 (synopsis "Linear Programming modeler")
8670 (description
8671 "PuLP is a Linear Programming modeler written in Python. PuLP can
8672 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8673 solve linear problems.")
8674 (license license:expat)))
8675
8676 (define-public python-toposort
8677 (package
8678 (name "python-toposort")
8679 (version "1.6")
8680 (source
8681 (origin
8682 (method url-fetch)
8683 (uri (pypi-uri "toposort" version))
8684 (sha256
8685 (base32
8686 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8687 (build-system python-build-system)
8688 (home-page "https://gitlab.com/ericvsmith/toposort")
8689 (synopsis "Topological sort algorithm")
8690 (description
8691 "This package provides an implementation of a topological sort
8692 algorithm.")
8693 (license license:asl2.0)))
8694
8695 (define-public python-three-merge
8696 (package
8697 (name "python-three-merge")
8698 (version "0.1.1")
8699 (source
8700 (origin
8701 ;; There are no tests in the PyPI tarball.
8702 (method git-fetch)
8703 (uri (git-reference
8704 (url "https://github.com/spyder-ide/three-merge")
8705 (commit (string-append "v" version))))
8706 (file-name (git-file-name name version))
8707 (sha256
8708 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
8709 (build-system python-build-system)
8710 (arguments
8711 `(#:test-target "pytest"))
8712 (propagated-inputs
8713 `(("python-diff-match-patch" ,python-diff-match-patch)))
8714 (native-inputs
8715 `(("python-flaky" ,python-flaky)
8716 ("python-pytest" ,python-pytest)
8717 ("python-pytest-cov" ,python-pytest-cov)
8718 ("python-pytest-runner" ,python-pytest-runner)
8719 ("python-pytest-timeout" ,python-pytest-timeout)))
8720 (home-page "https://github.com/spyder-ide/three-merge")
8721 (synopsis "Library for merging two strings with respect to a base one")
8722 (description
8723 "This package provides a Python library to perform a 3-way merge between
8724 strings, based on @code{diff-match-patch}. This library performs merges at a
8725 character level, as opposed to most VCS systems, which opt for a line-based
8726 approach.")
8727 (license license:expat)))
8728
8729 (define-public snakemake
8730 (package
8731 (name "snakemake")
8732 (version "5.32.2")
8733 (source
8734 (origin
8735 (method url-fetch)
8736 (uri (pypi-uri "snakemake" version))
8737 (sha256
8738 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8739 (build-system python-build-system)
8740 (arguments
8741 ;; TODO: Package missing test dependencies.
8742 '(#:tests? #f
8743 #:phases
8744 (modify-phases %standard-phases
8745 ;; For cluster execution Snakemake will call Python. Since there is
8746 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8747 ;; this by calling the snakemake wrapper instead.
8748 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8749 (lambda* (#:key outputs #:allow-other-keys)
8750 (substitute* "snakemake/executors/__init__.py"
8751 (("\\{sys.executable\\} -m snakemake")
8752 (string-append (assoc-ref outputs "out")
8753 "/bin/snakemake")))
8754 #t)))))
8755 (propagated-inputs
8756 `(("python-appdirs" ,python-appdirs)
8757 ("python-configargparse" ,python-configargparse)
8758 ("python-datrie" ,python-datrie)
8759 ("python-docutils" ,python-docutils)
8760 ("python-gitpython" ,python-gitpython)
8761 ("python-jinja2" ,python-jinja2)
8762 ("python-jsonschema" ,python-jsonschema)
8763 ("python-nbformat" ,python-nbformat)
8764 ("python-networkx" ,python-networkx)
8765 ("python-psutil" ,python-psutil)
8766 ("python-pulp" ,python-pulp)
8767 ("python-pyyaml" ,python-pyyaml)
8768 ("python-ratelimiter" ,python-ratelimiter)
8769 ("python-requests" ,python-requests)
8770 ("python-toposort" ,python-toposort)
8771 ("python-wrapt" ,python-wrapt)))
8772 (home-page "https://snakemake.readthedocs.io")
8773 (synopsis "Python-based execution environment for make-like workflows")
8774 (description
8775 "Snakemake aims to reduce the complexity of creating workflows by
8776 providing a clean and modern domain specific specification language (DSL) in
8777 Python style, together with a fast and comfortable execution environment.")
8778 (license license:expat)))
8779
8780 (define-public python-pyqrcode
8781 (package
8782 (name "python-pyqrcode")
8783 (version "1.2.1")
8784 (source
8785 (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "PyQRCode" version))
8788 (sha256
8789 (base32
8790 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8791 (build-system python-build-system)
8792 (home-page
8793 "https://github.com/mnooner256/pyqrcode")
8794 (synopsis "QR code generator")
8795 (description
8796 "Pyqrcode is a QR code generator written purely in Python with
8797 SVG, EPS, PNG and terminal output.")
8798 (license license:bsd-3)))
8799
8800 (define-public python-seaborn
8801 (package
8802 (name "python-seaborn")
8803 (version "0.11.1")
8804 (source
8805 (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "seaborn" version))
8808 (sha256
8809 (base32 "1b81p9s6li3b606ivgbynrh102fclwlw74m8qxzsii9pv6p8xrs4"))
8810 (patches (search-patches "python-seaborn-kde-test.patch"))))
8811 (build-system python-build-system)
8812 (arguments
8813 `(#:phases
8814 (modify-phases %standard-phases
8815 (add-before 'check 'start-xserver
8816 (lambda _
8817 ;; There must be a running X server and make check doesn't
8818 ;; start one. Therefore we must do it.
8819 (system "Xvfb :1 &")
8820 (setenv "DISPLAY" ":1")))
8821 (replace 'check
8822 (lambda* (#:key tests? #:allow-other-keys)
8823 (when tests?
8824 (invoke "pytest" "seaborn")))))))
8825 (propagated-inputs
8826 `(("python-pandas" ,python-pandas)
8827 ("python-matplotlib" ,python-matplotlib)
8828 ("python-numpy" ,python-numpy)
8829 ("python-scipy" ,python-scipy)))
8830 (native-inputs
8831 `(("python-pytest" ,python-pytest)
8832 ("xorg-server" ,xorg-server-for-tests)))
8833 (home-page "https://seaborn.pydata.org/")
8834 (synopsis "Statistical data visualization")
8835 (description
8836 "Seaborn is a library for making attractive and informative statistical
8837 graphics in Python. It is built on top of matplotlib and tightly integrated
8838 with the PyData stack, including support for numpy and pandas data structures
8839 and statistical routines from scipy and statsmodels.")
8840 (properties `((python2-variant . ,(delay python2-seaborn))))
8841 (license license:bsd-3)))
8842
8843 ;; 0.9.1 is the last release with support for Python 2.
8844 (define-public python2-seaborn
8845 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8846 (package
8847 (inherit base)
8848 (version "0.9.1")
8849 (source (origin
8850 (method url-fetch)
8851 (uri (pypi-uri "seaborn" version))
8852 (sha256
8853 (base32
8854 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8855
8856 (define-public python-mpmath
8857 (package
8858 (name "python-mpmath")
8859 (version "1.1.0")
8860 (source (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "mpmath" version))
8863 (file-name (git-file-name name version))
8864 (sha256
8865 (base32
8866 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8867 (build-system python-build-system)
8868 (native-inputs
8869 `(("python-pytest" ,python-pytest)))
8870 (arguments
8871 '(#:phases
8872 (modify-phases %standard-phases
8873 (replace 'check
8874 (lambda _
8875 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8876 (home-page "https://mpmath.org")
8877 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8878 (description
8879 "@code{mpmath} can be used as an arbitrary-precision substitute for
8880 Python's float/complex types and math/cmath modules, but also does much
8881 more advanced mathematics.")
8882 (license license:bsd-3)))
8883
8884 (define-public python2-mpmath
8885 (package-with-python2 python-mpmath))
8886
8887 (define-public python-bigfloat
8888 (package
8889 (name "python-bigfloat")
8890 (version "0.3.0")
8891 (source
8892 (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "bigfloat" version))
8895 (sha256
8896 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8897 (build-system python-build-system)
8898 (inputs
8899 `(("mpfr" ,mpfr)))
8900 (home-page "https://github.com/mdickinson/bigfloat")
8901 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8902 (description
8903 "This package provides a Python interface to the MPFR library for
8904 multiprecision arithmetic.")
8905 (license license:lgpl3+)))
8906
8907 (define-public python-sympy
8908 (package
8909 (name "python-sympy")
8910 (version "1.7.1")
8911 (source
8912 (origin
8913 (method url-fetch)
8914 (uri (pypi-uri "sympy" version))
8915 (sha256
8916 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8917 (build-system python-build-system)
8918 (arguments
8919 `(#:phases
8920 (modify-phases %standard-phases
8921 (replace 'check
8922 (lambda* (#:key outputs #:allow-other-keys)
8923 (invoke
8924 (or (which "python3") (which "python"))
8925 "-c" "import sympy; sympy.test(\"/core\")"))))))
8926 (propagated-inputs
8927 `(("python-mpmath" ,python-mpmath)))
8928 (home-page "https://www.sympy.org/")
8929 (synopsis "Python library for symbolic mathematics")
8930 (description
8931 "SymPy is a Python library for symbolic mathematics. It aims to become a
8932 full-featured computer algebra system (CAS) while keeping the code as simple
8933 as possible in order to be comprehensible and easily extensible.")
8934 (license license:bsd-3)))
8935
8936 (define-public python2-sympy
8937 (package
8938 (inherit (package-with-python2 python-sympy))
8939 (version "1.5.1") ; last release for python2
8940 (source
8941 (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "sympy" version))
8944 (sha256
8945 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8946
8947 (define-public python-q
8948 (package
8949 (name "python-q")
8950 (version "2.6")
8951 (source
8952 (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "q" version))
8955 (sha256
8956 (base32
8957 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8958 (build-system python-build-system)
8959 (home-page "https://github.com/zestyping/q")
8960 (synopsis "Quick-and-dirty debugging output for tired programmers")
8961 (description
8962 "q is a Python module for \"print\" style of debugging Python code. It
8963 provides convenient short API for print out of values, tracebacks, and
8964 falling into the Python interpreter.")
8965 (license license:asl2.0)))
8966
8967 (define-public python2-q
8968 (package-with-python2 python-q))
8969
8970 (define-public python-xlib
8971 (package
8972 (name "python-xlib")
8973 (version "0.29")
8974 (source
8975 (origin
8976 (method git-fetch)
8977 (uri (git-reference
8978 (url "https://github.com/python-xlib/python-xlib")
8979 (commit version)))
8980 (file-name (git-file-name name version))
8981 (sha256
8982 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8983 (build-system python-build-system)
8984 (arguments
8985 `(#:phases
8986 (modify-phases %standard-phases
8987 (add-before 'check 'start-xserver
8988 (lambda* (#:key inputs #:allow-other-keys)
8989 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8990 ;; There must be a running X server and make check doesn't
8991 ;; start one. Therefore we must do it.
8992 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8993 (setenv "DISPLAY" ":1")
8994 #t))))))
8995 (native-inputs
8996 `(("python-mock" ,python-mock)
8997 ("python-setuptools-scm" ,python-setuptools-scm)
8998 ("xorg-server" ,xorg-server)))
8999 (propagated-inputs
9000 `(("python-six" ,python-six)))
9001 (home-page "https://github.com/python-xlib/python-xlib")
9002 (synopsis "Python X11 client library")
9003 (description
9004 "The Python X Library is intended to be a fully functional
9005 X client library for Python programs. It is useful to implement
9006 low-level X clients. It is written entirely in Python.")
9007 (license license:gpl2+)))
9008
9009 (define-public python2-xlib
9010 (package-with-python2 python-xlib))
9011
9012 (define-public python-singledispatch
9013 (package
9014 (name "python-singledispatch")
9015 (version "3.4.0.3")
9016 (source
9017 (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "singledispatch" version))
9020 (sha256
9021 (base32
9022 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
9023 (build-system python-build-system)
9024 (native-inputs
9025 `(("python-six" ,python-six))) ; required for conversion, not at run-time
9026 (home-page
9027 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
9028 (synopsis "Backport of singledispatch feature from Python 3.4")
9029 (description
9030 "This library brings functools.singledispatch from Python 3.4 to Python
9031 2.6-3.3.")
9032 (license license:expat)))
9033
9034 (define-public python2-singledispatch
9035 (package-with-python2 python-singledispatch))
9036
9037 ;; the python- version can be removed with python-3.5
9038 (define-public python-backports-abc
9039 (package
9040 (name "python-backports-abc")
9041 (version "0.5")
9042 (source
9043 (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "backports_abc" version))
9046 (sha256
9047 (base32
9048 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9049 (build-system python-build-system)
9050 (home-page "https://github.com/cython/backports_abc")
9051 (synopsis "Backport of additions to the 'collections.abc' module")
9052 (description
9053 "Python-backports-abc provides a backport of additions to the
9054 @code{collections.abc} module in Python-3.5.")
9055 (license license:psfl)))
9056
9057 (define-public python2-backports-abc
9058 (package-with-python2 python-backports-abc))
9059
9060 (define-public python-backports-csv
9061 (package
9062 (name "python-backports-csv")
9063 (version "1.0.7")
9064 (source
9065 (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "backports.csv" version))
9068 (sha256
9069 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9070 (build-system python-build-system)
9071 (home-page "https://github.com/ryanhiebert/backports.csv")
9072 (synopsis "Backport of Python 3's csv module for Python 2")
9073 (description
9074 "Provides a backport of Python 3's @code{csv} module for parsing
9075 comma separated values. The API of the @code{csv} module in Python 2
9076 is drastically different from the @code{csv} module in Python 3.
9077 This is due, for the most part, to the difference between str in
9078 Python 2 and Python 3.")
9079 (license license:psfl)))
9080
9081 (define-public python2-backports-csv
9082 (package-with-python2 python-backports-csv))
9083
9084 (define-public python2-backports-shutil-get-terminal-size
9085 (package
9086 (name "python2-backports-shutil-get-terminal-size")
9087 (version "1.0.0")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9092 (sha256
9093 (base32
9094 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9095 (build-system python-build-system)
9096 (arguments
9097 `(#:python ,python-2
9098 #:phases
9099 (modify-phases %standard-phases
9100 (replace 'check
9101 (lambda _
9102 (setenv "PYTHONPATH" (string-append "./build/lib:"
9103 (getenv "PYTHONPATH")))
9104 (invoke "py.test" "-v"))))))
9105 (native-inputs
9106 `(("python2-pytest" ,python2-pytest)))
9107 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9108 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9109 (description
9110 "This package provides a backport of the @code{get_terminal_size
9111 function} from Python 3.3's @code{shutil}.
9112 Unlike the original version it is written in pure Python rather than C,
9113 so it might be a tiny bit slower.")
9114 (license license:expat)))
9115
9116 (define-public python-waf
9117 (package
9118 (name "python-waf")
9119 (version "2.0.19")
9120 (source (origin
9121 (method url-fetch)
9122 (uri (string-append "https://waf.io/"
9123 "waf-" version ".tar.bz2"))
9124 (sha256
9125 (base32
9126 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9127 (build-system python-build-system)
9128 (arguments
9129 '(#:phases
9130 (modify-phases %standard-phases
9131 (replace 'build
9132 (lambda _
9133 ;; XXX: Find a way to add all extra tools.
9134 (let ((tools '("gccdeps"
9135 "clang_compilation_database")))
9136 (invoke "python" "waf-light" "configure" "build"
9137 (string-append "--tools="
9138 (string-join tools ","))))))
9139 (replace 'check
9140 (lambda _
9141 (invoke "python" "waf" "--version")))
9142 (replace 'install
9143 (lambda* (#:key outputs #:allow-other-keys)
9144 (let ((out (assoc-ref outputs "out")))
9145 (install-file "waf" (string-append out "/bin")))
9146 #t))
9147 ;; waf breaks when it is wrapped.
9148 (delete 'wrap))))
9149 (home-page "https://waf.io/")
9150 (synopsis "Python-based build system")
9151 (description
9152 "Waf is a Python-based framework for configuring, compiling and installing
9153 applications.")
9154 (license license:bsd-3)))
9155
9156 (define-public python2-waf
9157 (package-with-python2 python-waf))
9158
9159 (define-public python-pyzmq
9160 (package
9161 (name "python-pyzmq")
9162 (version "22.1.0")
9163 (source
9164 (origin
9165 (method url-fetch)
9166 (uri (pypi-uri "pyzmq" version))
9167 (sha256
9168 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9169 (build-system python-build-system)
9170 (arguments
9171 `(#:configure-flags
9172 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9173 #:phases
9174 (modify-phases %standard-phases
9175 (add-before 'check 'build-extensions
9176 (lambda _
9177 ;; Cython extensions have to be built before running the tests.
9178 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9179 (inputs
9180 `(("zeromq" ,zeromq)))
9181 (native-inputs
9182 `(("pkg-config" ,pkg-config)
9183 ("python-cython" ,python-cython)
9184 ("python-pytest" ,python-pytest)))
9185 (home-page "https://github.com/zeromq/pyzmq")
9186 (synopsis "Python bindings for 0MQ")
9187 (description
9188 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9189 (license license:bsd-4)))
9190
9191 (define-public python-pep8
9192 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9193 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9194 ;; some dependents' test suites, and nothing more.
9195 (package
9196 (name "python-pep8")
9197 (version "1.7.0")
9198 (source
9199 (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "pep8" version))
9202 (sha256
9203 (base32
9204 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9205 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9206 (build-system python-build-system)
9207 (home-page "https://pep8.readthedocs.org/")
9208 (synopsis "Python style guide checker")
9209 (description
9210 "This tools checks Python code against some of the style conventions in
9211 PEP 8.")
9212 (license license:expat)))
9213
9214 (define-public python2-pep8
9215 (package-with-python2 python-pep8))
9216
9217 (define-public python-pep517
9218 (package
9219 (inherit python-pep517-bootstrap)
9220 (name "python-pep517")
9221 (arguments
9222 '(#:phases
9223 (modify-phases %standard-phases
9224 (replace 'check
9225 (lambda* (#:key tests? #:allow-other-keys)
9226 (delete-file "pytest.ini")
9227 ;; This test tries to connect to the internet
9228 (delete-file "tests/test_meta.py")
9229 (if tests?
9230 (invoke "pytest")
9231 #t))))))
9232 (native-inputs
9233 `(("python-mock" ,python-mock)
9234 ("python-pytest" ,python-pytest)
9235 ("python-testpath" ,python-testpath)))
9236 (properties `((python2-variant . ,(delay python2-pep517))))))
9237
9238 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9239 (define-public python2-pep517
9240 (let ((base (package-with-python2
9241 (strip-python2-variant python-pep517))))
9242 (package/inherit base
9243 (name "python2-pep517")
9244 (arguments
9245 `(#:tests? #f
9246 ,@(package-arguments base)))
9247 (native-inputs `()))))
9248
9249 (define-public python-pyflakes
9250 (package
9251 (name "python-pyflakes")
9252 (version "2.3.1")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "pyflakes" version))
9257 (sha256
9258 (base32
9259 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9260 (build-system python-build-system)
9261 (home-page
9262 "https://github.com/pyflakes/pyflakes")
9263 (synopsis "Passive checker of Python programs")
9264 (description
9265 "Pyflakes statically checks Python source code for common errors.")
9266 (license license:expat)))
9267
9268 (define-public python2-pyflakes
9269 (package-with-python2 python-pyflakes))
9270
9271 (define-public python-pyflakes-2.2
9272 (package
9273 (inherit python-pyflakes)
9274 (version "2.2.0")
9275 (source (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "pyflakes" version))
9278 (sha256
9279 (base32
9280 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9281
9282 (define-public python-mccabe
9283 (package
9284 (name "python-mccabe")
9285 (version "0.6.1")
9286 (source
9287 (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "mccabe" version))
9290 (sha256
9291 (base32
9292 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9293 (build-system python-build-system)
9294 (native-inputs
9295 `(("python-pytest" ,python-pytest-bootstrap)
9296 ("python-pytest-runner" ,python-pytest-runner)))
9297 (home-page "https://github.com/flintwork/mccabe")
9298 (synopsis "McCabe checker, plugin for flake8")
9299 (description
9300 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
9301 complexity of Python source code.")
9302 (license license:expat)))
9303
9304 (define-public python2-mccabe
9305 (package-with-python2 python-mccabe))
9306
9307 (define-public python-flake8
9308 (package
9309 (name "python-flake8")
9310 (version "3.9.1")
9311 (source (origin
9312 (method url-fetch)
9313 (uri (pypi-uri "flake8" version))
9314 (sha256
9315 (base32
9316 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9317 (build-system python-build-system)
9318 (arguments
9319 `(#:phases
9320 (modify-phases %standard-phases
9321 (replace 'check
9322 (lambda* (#:key inputs outputs #:allow-other-keys)
9323 (add-installed-pythonpath inputs outputs)
9324 (invoke "pytest" "-v"))))))
9325 (propagated-inputs
9326 `(("python-pycodestyle" ,python-pycodestyle)
9327 ("python-entrypoints" ,python-entrypoints)
9328 ("python-pyflakes" ,python-pyflakes)
9329 ("python-mccabe" ,python-mccabe)))
9330 (native-inputs
9331 `(("python-mock" ,python-mock)
9332 ("python-pytest" ,python-pytest)))
9333 (home-page "https://gitlab.com/pycqa/flake8")
9334 (synopsis
9335 "The modular source code checker: pep8, pyflakes and co")
9336 (description
9337 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9338 (properties `((python2-variant . ,(delay python2-flake8))))
9339 (license license:expat)))
9340
9341 (define-public python2-flake8
9342 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9343 (package/inherit base
9344 (propagated-inputs
9345 `(("python2-configparser" ,python2-configparser)
9346 ("python2-enum34" ,python2-enum34)
9347 ("python2-functools32" ,python2-functools32)
9348 ("python2-typing" ,python2-typing)
9349 ,@(package-propagated-inputs base))))))
9350
9351 (define-public python-flake8-3.8
9352 (package
9353 (inherit python-flake8)
9354 (version "3.8.4")
9355 (source (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "flake8" version))
9358 (sha256
9359 (base32
9360 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9361 (propagated-inputs
9362 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9363 ("python-entrypoints" ,python-entrypoints)
9364 ("python-pyflakes" ,python-pyflakes-2.2)
9365 ("python-mccabe" ,python-mccabe)))))
9366
9367 (define-public python-flake8-bugbear
9368 (package
9369 (name "python-flake8-bugbear")
9370 (version "20.1.4")
9371 (source
9372 (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "flake8-bugbear" version))
9375 (sha256
9376 (base32
9377 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9378 (build-system python-build-system)
9379 (arguments
9380 '(#:phases
9381 (modify-phases %standard-phases
9382 (add-before 'check 'disable-test
9383 (lambda _
9384 ;; This test fails on slow computers.
9385 (substitute* "tests/test_bugbear.py"
9386 (("def test_does_not_crash_on_any_valid_code")
9387 "def _test_does_not_crash_on_any_valid_code")))))))
9388 (native-inputs
9389 `(("python-hypothesis" ,python-hypothesis)
9390 ("python-hypothesmith" ,python-hypothesmith)))
9391 (propagated-inputs
9392 `(("python-attrs" ,python-attrs)
9393 ("python-flake8" ,python-flake8)))
9394 (home-page "https://github.com/PyCQA/flake8-bugbear")
9395 (synopsis
9396 "Flake8 plugin for finding likely bugs and design problems in your program")
9397 (description
9398 "This package contains a plugin for Flake8 finding likely bugs and
9399 design problems in your program. It contains warnings that don't belong
9400 in pyflakes and pycodestyle.")
9401 (license license:expat)))
9402
9403 (define-public python-flake8-continuation
9404 (package
9405 (name "python-flake8-continuation")
9406 (version "1.0.5")
9407 (source
9408 (origin
9409 (method url-fetch)
9410 (uri (pypi-uri "flake8-continuation" version))
9411 (sha256
9412 (base32
9413 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9414 (build-system python-build-system)
9415 (propagated-inputs
9416 `(("python-flake8" ,python-flake8)
9417 ("python-pycodestyle" ,python-pycodestyle)
9418 ("python-six" ,python-six)))
9419 (home-page "https://github.com/planetlabs/flake8-continuation")
9420 (synopsis "Flake8 Line Continuation Plugin")
9421 (description "A Flake8 plugin that checks for the line continuation
9422 style to be in the preferred method according to PEP-8, specifically:
9423 @quotation
9424 The preferred way of wrapping long lines is by using Python's implied
9425 line continuation inside parentheses, brackets and braces. Long lines
9426 can be broken over multiple lines by wrapping expressions in parentheses.
9427 These should be used in preference to using a backslash for line continuation.
9428 @end quotation")
9429 (license license:asl2.0)))
9430
9431 (define-public python-flake8-implicit-str-concat
9432 (package
9433 (name "python-flake8-implicit-str-concat")
9434 (version "0.2.0")
9435 (source
9436 (origin
9437 (method url-fetch)
9438 (uri (pypi-uri "flake8_implicit_str_concat" version))
9439 (sha256
9440 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9441 (build-system python-build-system)
9442 (propagated-inputs
9443 `(("python-attrs" ,python-attrs)
9444 ("python-more-itertools" ,python-more-itertools)))
9445 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9446 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9447 (description
9448 "This is a plugin for the Python code checking tool Flake8 to encourage
9449 correct string literal concatenation.
9450
9451 It looks for style problems like implicitly concatenated string literals on
9452 the same line (which can be introduced by the code formatting tool Black), or
9453 unnecessary plus operators for explicit string literal concatenation.")
9454 (license license:expat)))
9455
9456 (define-public python-flake8-polyfill
9457 (package
9458 (name "python-flake8-polyfill")
9459 (version "1.0.2")
9460 (source
9461 (origin
9462 (method url-fetch)
9463 (uri (pypi-uri "flake8-polyfill" version))
9464 (sha256
9465 (base32
9466 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9467 (build-system python-build-system)
9468 (arguments
9469 '(#:phases
9470 (modify-phases %standard-phases
9471 (replace 'check
9472 (lambda _
9473 ;; Be compatible with Pytest 4:
9474 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9475 (substitute* "setup.cfg"
9476 (("\\[pytest\\]")
9477 "[tool:pytest]"))
9478
9479 (setenv "PYTHONPATH"
9480 (string-append (getcwd) "/build/lib:"
9481 (getenv "PYTHONPATH")))
9482 (invoke "py.test" "-v"))))))
9483 (native-inputs
9484 `(("python-flake8" ,python-flake8)
9485 ("python-mock" ,python-mock)
9486 ("python-pep8" ,python-pep8)
9487 ("python-pycodestyle" ,python-pycodestyle)
9488 ("python-pytest" ,python-pytest)))
9489 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9490 (synopsis "Polyfill package for Flake8 plugins")
9491 (description
9492 "This package that provides some compatibility helpers for Flake8
9493 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
9494 (license license:expat)))
9495
9496 (define-public python2-flake8-polyfill
9497 (package-with-python2 python-flake8-polyfill))
9498
9499 (define-public python-flake8-print
9500 (package
9501 (name "python-flake8-print")
9502 (version "4.0.0")
9503 (source
9504 (origin
9505 (method url-fetch)
9506 (uri (pypi-uri "flake8-print" version))
9507 (sha256
9508 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
9509 (build-system python-build-system)
9510 (propagated-inputs
9511 `(("python-flake8" ,python-flake8)
9512 ("python-pycodestyle" ,python-pycodestyle)
9513 ("python-six" ,python-six)))
9514 (home-page "https://github.com/jbkahn/flake8-print")
9515 (synopsis "Print statement checker plugin for Flake8")
9516 (description
9517 "This plugin for Flake8 checks for @code{print} statements in Python
9518 files.")
9519 (license license:expat)))
9520
9521 (define-public python-flake8-pyi
9522 (package
9523 (name "python-flake8-pyi")
9524 (version "20.5.0")
9525 (source
9526 (origin
9527 (method url-fetch)
9528 (uri (pypi-uri "flake8-pyi" version))
9529 (sha256
9530 (base32
9531 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
9532 (build-system python-build-system)
9533 (propagated-inputs
9534 `(("python-attrs" ,python-attrs)
9535 ("python-flake8" ,python-flake8)
9536 ("python-pyflakes" ,python-pyflakes)))
9537 (home-page "https://github.com/ambv/flake8-pyi")
9538 (synopsis
9539 "Flake8 plugin that provides specializations for type hinting stub files")
9540 (description
9541 "This package contains a plugin that provides specializations for
9542 type hinting stub files, especially interesting for linting typeshed. It
9543 adds the @file{.pyi} extension to the default value of the @code{--filename}
9544 command-line argument to Flake8. This means stubs are linted by default with
9545 this plugin enabled, without needing to explicitly list every file. It
9546 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9547 expressions after the entire file has been read. This enables support for
9548 first-class forward references that stub files use.")
9549 (license license:expat)))
9550
9551 (define-public python-flake8-pie
9552 (package
9553 (name "python-flake8-pie")
9554 (version "0.5.0")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "flake8-pie" version))
9559 (sha256
9560 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9561 (build-system python-build-system)
9562 (home-page "https://github.com/sbdchd/flake8-pie")
9563 (synopsis "Flake8 extension that implements lints")
9564 (description
9565 "This package provides a flake8 extension that implements miscellaneous
9566 lints.")
9567 (license license:bsd-2)))
9568
9569 (define-public python-flake8-quotes
9570 (package
9571 (name "python-flake8-quotes")
9572 (version "3.2.0")
9573 (source
9574 (origin
9575 (method url-fetch)
9576 (uri (pypi-uri "flake8-quotes" version))
9577 (sha256
9578 (base32
9579 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9580 (build-system python-build-system)
9581 (propagated-inputs
9582 `(("python-flake8" ,python-flake8)))
9583 (home-page "https://github.com/zheller/flake8-quotes/")
9584 (synopsis "Flake8 lint for quotes")
9585 (description "This package provides a Flake8 lint for quotes.")
9586 (license license:expat)))
9587
9588 (define-public python-autoflake
9589 (package
9590 (name "python-autoflake")
9591 (version "1.3.1")
9592 (source
9593 (origin
9594 (method url-fetch)
9595 (uri (pypi-uri "autoflake" version))
9596 (sha256
9597 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9598 (build-system python-build-system)
9599 (propagated-inputs
9600 `(("python-pyflakes" ,python-pyflakes)))
9601 (home-page "https://github.com/myint/autoflake")
9602 (synopsis "Removes unused imports and unused variables")
9603 (description
9604 "@code{autoflake} removes unused imports and unused variables from Python
9605 code as reported by @code{pyflakes}.
9606
9607 By default, it only removes unused imports for modules that are part of the
9608 standard library. Removal of unused variables is also disabled by default.
9609 It also removes useless @code{pass} statements.")
9610 (license license:expat)))
9611
9612 (define-public python-mistune
9613 (package
9614 (name "python-mistune")
9615 (version "0.8.4")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "mistune" version))
9620 (sha256
9621 (base32
9622 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9623 (build-system python-build-system)
9624 (native-inputs
9625 `(("python-nose" ,python-nose)
9626 ("python-cython" ,python-cython)))
9627 (home-page "https://github.com/lepture/mistune")
9628 (synopsis "Markdown parser in pure Python")
9629 (description "This package provides a fast markdown parser in pure
9630 Python.")
9631 (license license:bsd-3)))
9632
9633 (define-public python2-mistune
9634 (package-with-python2 python-mistune))
9635
9636 (define-public python-markdown
9637 (package
9638 (name "python-markdown")
9639 (version "3.3.4")
9640 (source
9641 (origin
9642 (method url-fetch)
9643 (uri (pypi-uri "Markdown" version))
9644 (sha256
9645 (base32
9646 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9647 (build-system python-build-system)
9648 (native-inputs
9649 `(("python-nose" ,python-nose)
9650 ("python-pyyaml" ,python-pyyaml)))
9651 (home-page "https://python-markdown.github.io/")
9652 (synopsis "Python implementation of Markdown")
9653 (description
9654 "This package provides a Python implementation of John Gruber's
9655 Markdown. The library features international input, various Markdown
9656 extensions, and several HTML output formats. A command line wrapper
9657 markdown_py is also provided to convert Markdown files to HTML.")
9658 (properties `((python2-variant . ,(delay python2-markdown))))
9659 (license license:bsd-3)))
9660
9661 ;; Markdown 3.2 dropped support for Python 2.
9662 (define-public python2-markdown
9663 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9664 (package
9665 (inherit base)
9666 (version "3.1.1")
9667 (source (origin
9668 (method url-fetch)
9669 (uri (pypi-uri "Markdown" version))
9670 (sha256
9671 (base32
9672 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9673
9674 (define-public python-ptyprocess
9675 (package
9676 (name "python-ptyprocess")
9677 (version "0.5.2")
9678 (source
9679 (origin
9680 (method url-fetch)
9681 (uri (pypi-uri "ptyprocess" version))
9682 (sha256
9683 (base32
9684 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9685 (build-system python-build-system)
9686 (native-inputs
9687 `(("python-nose" ,python-nose)))
9688 (arguments
9689 `(#:phases
9690 (modify-phases %standard-phases
9691 (replace 'check
9692 (lambda _ (invoke "nosetests"))))))
9693 (home-page "https://github.com/pexpect/ptyprocess")
9694 (synopsis "Run a subprocess in a pseudo terminal")
9695 (description
9696 "This package provides a Python library used to launch a subprocess in a
9697 pseudo terminal (pty), and interact with both the process and its pty.")
9698 (license license:isc)))
9699
9700 (define-public python2-ptyprocess
9701 (package-with-python2 python-ptyprocess))
9702
9703 (define-public python-cram
9704 (package
9705 (name "python-cram")
9706 (version "0.7")
9707 (home-page "https://bitheap.org/cram/")
9708 (source (origin
9709 (method url-fetch)
9710 (uri (list (string-append home-page "cram-"
9711 version ".tar.gz")
9712 (pypi-uri "cram" version)))
9713 (sha256
9714 (base32
9715 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9716 (arguments
9717 '(#:phases
9718 (modify-phases %standard-phases
9719 (add-after 'unpack 'patch-source
9720 (lambda _
9721 (substitute* (find-files "cram" ".*\\.py$")
9722 ;; Replace default shell path.
9723 (("/bin/sh") (which "sh")))
9724 (substitute* (find-files "tests" ".*\\.t$")
9725 (("md5") "md5sum")
9726 (("/bin/bash") (which "bash"))
9727 (("/bin/sh") (which "sh")))
9728 (substitute* "cram/_test.py"
9729 ;; This hack works around a bug triggered by substituting
9730 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9731 ;; "cram -h", which breaks the output at 80 characters. This
9732 ;; causes the line showing the default shell to break into two
9733 ;; lines, but the test expects a single line...
9734 (("env\\['COLUMNS'\\] = '80'")
9735 "env['COLUMNS'] = '160'"))
9736
9737 (substitute* "Makefile"
9738 ;; Recent versions of python-coverage have caused the test
9739 ;; coverage to decrease (as of version 0.7). Allow that.
9740 (("--fail-under=100")
9741 "--fail-under=90"))
9742
9743 #t))
9744 (replace 'check
9745 ;; The test phase uses the built library and executable.
9746 (lambda* (#:key inputs outputs #:allow-other-keys)
9747 (add-installed-pythonpath inputs outputs)
9748 (setenv "PATH" (string-append (getenv "PATH") ":"
9749 (assoc-ref outputs "out") "/bin"))
9750 (invoke "make" "test"))))))
9751 (build-system python-build-system)
9752 (native-inputs
9753 `(("python-coverage" ,python-coverage)
9754 ("which" ,which)))
9755 (synopsis "Simple testing framework for command line applications")
9756 (description
9757 "Cram is a functional testing framework for command line applications.
9758 Cram tests look like snippets of interactive shell sessions. Cram runs each
9759 command and compares the command output in the test with the command’s actual
9760 output.")
9761 (license license:gpl2+)))
9762
9763 (define-public python2-cram
9764 (package-with-python2 python-cram))
9765
9766 (define-public python-crashtest
9767 (package
9768 (name "python-crashtest")
9769 (version "0.3.1")
9770 (source
9771 (origin
9772 (method url-fetch)
9773 (uri (pypi-uri "crashtest" version))
9774 (sha256
9775 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9776 (build-system python-build-system)
9777 (home-page "https://github.com/sdispater/crashtest")
9778 (synopsis "Manage Python errors with ease")
9779 (description
9780 "Python library that makes exceptions handling and inspection easier.")
9781 (license license:expat)))
9782
9783 (define-public python-stdlib-list
9784 (package
9785 (name "python-stdlib-list")
9786 (version "0.8.0")
9787 (source (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "stdlib-list" version))
9790 (sha256
9791 (base32
9792 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
9793 (build-system python-build-system)
9794 (arguments
9795 `(#:tests? #f)) ; Tests require more dependencies.
9796 (native-inputs
9797 `(("python-sphinx" ,python-sphinx)))
9798 (home-page "https://github.com/jackmaney/python-stdlib-list")
9799 (synopsis "Python Standard Libraries")
9800 (description "This package contains a list of Python Standard Libraries.")
9801 (license license:expat)))
9802
9803 (define-public python-straight-plugin
9804 (package
9805 (name "python-straight-plugin")
9806 (version "1.4.1")
9807 (source
9808 (origin
9809 (method url-fetch)
9810 (uri (pypi-uri "straight.plugin" version))
9811 (sha256
9812 (base32
9813 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9814 (build-system python-build-system)
9815 (home-page "https://github.com/ironfroggy/straight.plugin")
9816 (synopsis "Simple namespaced plugin facility")
9817 (description "Straight Plugin provides a type of plugin you can create from
9818 almost any existing Python modules, and an easy way for outside developers to
9819 add functionality and customization to your projects with their own plugins.")
9820 (license license:expat)))
9821
9822 (define-public python2-straight-plugin
9823 (package-with-python2 python-straight-plugin))
9824
9825 (define-public python-fonttools
9826 (package
9827 (name "python-fonttools")
9828 (version "4.6.0")
9829 (source (origin
9830 (method url-fetch)
9831 (uri (pypi-uri "fonttools" version ".zip"))
9832 (sha256
9833 (base32
9834 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9835 (build-system python-build-system)
9836 (native-inputs
9837 `(("unzip" ,unzip)
9838 ("python-pytest" ,python-pytest)
9839 ("python-pytest-runner" ,python-pytest-runner)))
9840 (home-page "https://github.com/fonttools/fonttools")
9841 (synopsis "Tools to manipulate font files")
9842 (description
9843 "FontTools/TTX is a library to manipulate font files from Python. It
9844 supports reading and writing of TrueType/OpenType fonts, reading and writing
9845 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9846 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9847 from an XML-based format.")
9848 (license license:expat)))
9849
9850 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9851 (define-public python2-fonttools
9852 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9853 (package
9854 (inherit base)
9855 (version "3.44.0")
9856 (source (origin
9857 (method url-fetch)
9858 (uri (pypi-uri "fonttools" version ".zip"))
9859 (sha256
9860 (base32
9861 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9862
9863 (define-public python-ly
9864 (package
9865 (name "python-ly")
9866 (version "0.9.5")
9867 (source
9868 (origin
9869 (method url-fetch)
9870 (uri (pypi-uri name version))
9871 (sha256
9872 (base32
9873 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9874 (build-system python-build-system)
9875 (arguments
9876 ;; FIXME: Some tests need network access.
9877 '(#:tests? #f))
9878 (synopsis "Tool and library for manipulating LilyPond files")
9879 (description "This package provides a Python library to parse, manipulate
9880 or create documents in LilyPond format. A command line program ly is also
9881 provided that can be used to do various manipulations with LilyPond files.")
9882 (home-page "https://pypi.org/project/python-ly/")
9883 (license license:gpl2+)))
9884
9885 (define-public python-appdirs
9886 (package
9887 (name "python-appdirs")
9888 (version "1.4.3")
9889 (source
9890 (origin
9891 (method url-fetch)
9892 (uri (pypi-uri "appdirs" version))
9893 (sha256
9894 (base32
9895 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9896 (build-system python-build-system)
9897 (home-page "https://github.com/ActiveState/appdirs")
9898 (synopsis
9899 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9900 (description
9901 "This module provides a portable way of finding out where user data
9902 should be stored on various operating systems.")
9903 (license license:expat)))
9904
9905 (define-public python2-appdirs
9906 (package-with-python2 python-appdirs))
9907
9908 (define-public python-gorilla
9909 (package
9910 (name "python-gorilla")
9911 (version "0.3.0")
9912 (source (origin
9913 (method url-fetch)
9914 (uri (pypi-uri "gorilla" version))
9915 (sha256
9916 (base32
9917 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9918 (build-system python-build-system)
9919 (home-page "https://github.com/christophercrouzet/gorilla")
9920 (synopsis "Convenient monkey patching with Python")
9921 (description
9922 "Gorilla is a Python library that provides a convenient approach to
9923 monkey patching. Monkey patching is the process of modifying module and
9924 class attributes at runtime with the purpose of replacing or extending
9925 third-party code.")
9926 (license license:expat)))
9927
9928 (define-public python-llfuse
9929 (package
9930 (name "python-llfuse")
9931 (version "1.3.8")
9932 (source (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "llfuse" version))
9935 (sha256
9936 (base32
9937 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9938 (build-system python-build-system)
9939 (inputs
9940 `(("fuse" ,fuse)
9941 ("attr" ,attr)))
9942 (native-inputs
9943 `(("pkg-config" ,pkg-config)))
9944 (synopsis "Python bindings for FUSE")
9945 (description
9946 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9947 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9948 (license license:lgpl2.0+)
9949 (properties `((python2-variant . ,(delay python2-llfuse))))))
9950
9951 (define-public python2-llfuse
9952 (let ((base (package-with-python2
9953 (strip-python2-variant python-llfuse))))
9954 (package/inherit base
9955 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9956
9957 (define-public python-msgpack
9958 (package
9959 (name "python-msgpack")
9960 (version "1.0.0")
9961 (source (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "msgpack" version))
9964 (sha256
9965 (base32
9966 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9967 (build-system python-build-system)
9968 (arguments
9969 `(#:modules ((guix build utils)
9970 (guix build python-build-system)
9971 (ice-9 ftw)
9972 (srfi srfi-1)
9973 (srfi srfi-26))
9974 #:phases
9975 (modify-phases %standard-phases
9976 (replace 'check
9977 (lambda _
9978 (let ((cwd (getcwd)))
9979 (setenv "PYTHONPATH"
9980 (string-append cwd "/build/"
9981 (find (cut string-prefix? "lib" <>)
9982 (scandir (string-append cwd "/build")))
9983 ":"
9984 (getenv "PYTHONPATH")))
9985 (invoke "pytest" "-v" "test")))))))
9986 (native-inputs
9987 `(("python-pytest" ,python-pytest)))
9988 (synopsis "MessagePack (de)serializer")
9989 (description "MessagePack is a fast, compact binary serialization format,
9990 suitable for similar data to JSON. This package provides CPython bindings for
9991 reading and writing MessagePack data.")
9992 (home-page "https://pypi.org/project/msgpack/")
9993 (license license:asl2.0)))
9994
9995 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9996 ;; release 0.5. Some packages like borg still call it by the old name for now.
9997 ;; <https://bugs.gnu.org/30662>
9998 (define-public python-msgpack-transitional
9999 (package
10000 (inherit python-msgpack)
10001 (name "python-msgpack-transitional")
10002 (version "0.5.6")
10003 (source (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "msgpack" version))
10006 (sha256
10007 (base32
10008 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
10009 (arguments
10010 (substitute-keyword-arguments (package-arguments python-msgpack)
10011 ((#:phases phases)
10012 `(modify-phases ,phases
10013 (add-after 'unpack 'configure-transitional
10014 (lambda _
10015 ;; Keep using the old name.
10016 (substitute* "setup.py"
10017 (("TRANSITIONAL = False")
10018 "TRANSITIONAL = 1"))
10019 #t))))))))
10020
10021 (define-public python2-msgpack
10022 (package-with-python2 python-msgpack))
10023
10024 (define-public python-netaddr
10025 (package
10026 (name "python-netaddr")
10027 (version "0.8.0")
10028 (source
10029 (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "netaddr" version))
10032 (sha256
10033 (base32
10034 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
10035 (build-system python-build-system)
10036 (arguments `(#:tests? #f)) ;; No tests.
10037 (home-page "https://github.com/drkjam/netaddr/")
10038 (synopsis "Pythonic manipulation of network addresses")
10039 (description
10040 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
10041 and MAC network addresses.")
10042 (license license:bsd-3)))
10043
10044 (define-public python2-netaddr
10045 (package-with-python2 python-netaddr))
10046
10047 (define-public python2-pyroute2
10048 (package
10049 (name "python2-pyroute2")
10050 (version "0.5.6")
10051 (source
10052 (origin
10053 (method url-fetch)
10054 (uri (pypi-uri "pyroute2" version))
10055 (sha256
10056 (base32
10057 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10058 (build-system python-build-system)
10059 (arguments
10060 `(#:python ,python-2)) ;Python 3.x is not supported
10061 (home-page "https://github.com/svinota/pyroute2")
10062 (synopsis "Python netlink library")
10063 (description
10064 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10065 Supported netlink families and protocols include:
10066 @itemize
10067 @item rtnl, network settings - addresses, routes, traffic controls
10068 @item nfnetlink - netfilter API: ipset, nftables, ...
10069 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10070 @item devlink - manage and monitor devlink-enabled hardware
10071 @item generic - generic netlink families
10072 @itemize
10073 @item nl80211 - wireless functions API (basic support)
10074 @item taskstats - extended process statistics
10075 @item acpi_events - ACPI events monitoring
10076 @item thermal_events - thermal events monitoring
10077 @item VFS_DQUOT - disk quota events monitoring
10078 @end itemize
10079 @end itemize")
10080 (license license:gpl2+)))
10081
10082 (define-public python-wrapt
10083 (package
10084 (name "python-wrapt")
10085 (version "1.11.2")
10086 (source
10087 (origin
10088 (method url-fetch)
10089 (uri (pypi-uri "wrapt" version))
10090 (sha256
10091 (base32
10092 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10093 (build-system python-build-system)
10094 (arguments
10095 ;; Tests are not included in the tarball, they are only available in the
10096 ;; git repository.
10097 `(#:tests? #f))
10098 (home-page "https://github.com/GrahamDumpleton/wrapt")
10099 (synopsis "Module for decorators, wrappers and monkey patching")
10100 (description
10101 "The aim of the wrapt module is to provide a transparent object proxy for
10102 Python, which can be used as the basis for the construction of function
10103 wrappers and decorator functions.")
10104 (license license:bsd-2)))
10105
10106 (define-public python2-wrapt
10107 (package-with-python2 python-wrapt))
10108
10109 (define-public python-commonmark
10110 (package
10111 (name "python-commonmark")
10112 (version "0.9.1")
10113 (source
10114 (origin
10115 (method url-fetch)
10116 (uri (pypi-uri "commonmark" version))
10117 (sha256
10118 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10119 (build-system python-build-system)
10120 (arguments
10121 `(#:phases
10122 (modify-phases %standard-phases
10123 (replace 'check
10124 (lambda* (#:key inputs outputs #:allow-other-keys)
10125 (add-installed-pythonpath inputs outputs)
10126 (invoke "python" "setup.py" "test"))))))
10127 (home-page "https://github.com/readthedocs/commonmark.py")
10128 (synopsis "Python parser for the CommonMark Markdown spec")
10129 (description
10130 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10131 Markdown parser and renderer for the CommonMark specification, using only
10132 native modules.")
10133 (license license:bsd-3)))
10134
10135 (define-public python-xlrd
10136 (package
10137 (name "python-xlrd")
10138 (version "1.2.0")
10139 (source (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "xlrd" version))
10142 (sha256
10143 (base32
10144 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10145 (build-system python-build-system)
10146 (arguments
10147 `(#:phases
10148 (modify-phases %standard-phases
10149 ;; Some tests depend on writing a temporary file to the user's home
10150 ;; directory.
10151 (add-after 'unpack 'fix-tests
10152 (lambda _
10153 (delete-file "tests/test_open_workbook.py")
10154 #t)))))
10155 (home-page "http://www.python-excel.org/")
10156 (synopsis "Library for extracting data from Excel files")
10157 (description "This package provides a library to extract data from
10158 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10159 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10160 Unicode-aware. It is not intended as an end-user tool.")
10161 (license license:bsd-3)))
10162
10163 (define-public python2-xlrd
10164 (package-with-python2 python-xlrd))
10165
10166 (define-public python-immutables
10167 (package
10168 (name "python-immutables")
10169 (version "0.14")
10170 (source
10171 (origin
10172 (method url-fetch)
10173 (uri (pypi-uri "immutables" version))
10174 (sha256
10175 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10176 (build-system python-build-system)
10177 (home-page "https://github.com/MagicStack/immutables")
10178 (synopsis "High-performance immutable mapping type for Python")
10179 (description
10180 "An immutable mapping type for Python. The underlying datastructure is a
10181 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10182 functional languages.")
10183 (license license:asl2.0)))
10184
10185 (define-public python-prettytable
10186 (package
10187 (name "python-prettytable")
10188 (version "0.7.2")
10189 (source
10190 (origin
10191 (method url-fetch)
10192 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10193 (sha256
10194 (base32
10195 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10196 (build-system python-build-system)
10197 (home-page "https://code.google.com/archive/p/prettytable/")
10198 (synopsis "Display tabular data in an ASCII table format")
10199 (description
10200 "A library designed to represent tabular data in visually appealing ASCII
10201 tables. PrettyTable allows for selection of which columns are to be printed,
10202 independent alignment of columns (left or right justified or centred) and
10203 printing of sub-tables by specifying a row range.")
10204 (license license:bsd-3)))
10205
10206 (define-public python2-prettytable
10207 (package-with-python2 python-prettytable))
10208
10209 (define-public python-curio
10210 (package
10211 (name "python-curio")
10212 (version "1.2")
10213 (source
10214 (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "curio" version))
10217 (sha256
10218 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
10219 (build-system python-build-system)
10220 (arguments
10221 `(#:phases
10222 (modify-phases %standard-phases
10223 (replace 'check
10224 (lambda* (#:key inputs outputs #:allow-other-keys)
10225 (add-installed-pythonpath inputs outputs)
10226 (invoke "pytest" "-vv" "-k"
10227 ;; Tries to open an outgoing connection.
10228 "not test_ssl_outgoing"))))))
10229 (native-inputs
10230 `(("python-pytest" ,python-pytest)))
10231 (home-page "https://github.com/dabeaz/curio")
10232 (synopsis "Coroutine-based library for concurrent Python")
10233 (description
10234 "Curio is a coroutine-based library for concurrent Python systems
10235 programming. It provides standard programming abstractions such as as
10236 tasks, sockets, files, locks, and queues.")
10237 (license license:bsd-3)))
10238
10239 (define-public python-tables
10240 (package
10241 (name "python-tables")
10242 (version "3.6.1")
10243 (source
10244 (origin
10245 (method url-fetch)
10246 (uri (pypi-uri "tables" version))
10247 (sha256
10248 (base32
10249 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10250 (modules '((guix build utils)))
10251 (snippet
10252 '(begin
10253 ;; Remove pre-compiled .pyc files from source.
10254 (for-each delete-file-recursively
10255 (find-files "." "__pycache__" #:directories? #t))
10256 (for-each delete-file (find-files "." "\\.pyc$"))
10257 #t))))
10258 (build-system python-build-system)
10259 (arguments
10260 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10261 ;; or "check", so we must override the build and check phases.
10262 #:phases
10263 (modify-phases %standard-phases
10264 (add-after 'unpack 'use-gcc
10265 (lambda _
10266 (substitute* "setup.py"
10267 (("^( +)compiler = new_compiler\\(\\)" line indent)
10268 (string-append line
10269 "\n"
10270 indent
10271 "compiler.set_executables(compiler='gcc',"
10272 "compiler_so='gcc',"
10273 "linker_exe='gcc',"
10274 "linker_so='gcc -shared')")))
10275 #t))
10276 (add-after 'unpack 'disable-tuning
10277 (lambda _
10278 (substitute* "setup.py"
10279 (("cpu_flags = .*")
10280 "cpu_flags = ['sse2']\n"))
10281 #t))
10282 (replace 'build
10283 (lambda* (#:key inputs #:allow-other-keys)
10284 (invoke "python" "setup.py" "build"
10285 (string-append "--hdf5="
10286 (assoc-ref inputs "hdf5")))))
10287 (replace 'check
10288 (lambda* (#:key inputs #:allow-other-keys)
10289 (invoke "python" "setup.py" "check"
10290 (string-append "--hdf5="
10291 (assoc-ref inputs "hdf5"))))))))
10292 (propagated-inputs
10293 `(("python-numexpr" ,python-numexpr)
10294 ("python-numpy" ,python-numpy)))
10295 (native-inputs
10296 `(("python-cython" ,python-cython)
10297 ("pkg-config" ,pkg-config)))
10298 (inputs
10299 `(("hdf5" ,hdf5-1.10)
10300 ("bzip2" ,bzip2)
10301 ("zlib" ,zlib)))
10302 (home-page "https://www.pytables.org/")
10303 (synopsis "Hierarchical datasets for Python")
10304 (description "PyTables is a package for managing hierarchical datasets and
10305 designed to efficiently cope with extremely large amounts of data.")
10306 (license license:bsd-3)))
10307
10308 (define-public python-sniffio
10309 (package
10310 (name "python-sniffio")
10311 (version "1.2.0")
10312 (source
10313 (origin
10314 (method url-fetch)
10315 (uri (pypi-uri "sniffio" version))
10316 (sha256
10317 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10318 (build-system python-build-system)
10319 (arguments
10320 `(#:phases
10321 (modify-phases %standard-phases
10322 (replace 'check
10323 (lambda _
10324 (invoke "pytest" "-vv"))))))
10325 (native-inputs
10326 `(("python-curio" ,python-curio)
10327 ("python-pytest" ,python-pytest)
10328 ("python-pytest-cov" ,python-pytest-cov)))
10329 (home-page "https://github.com/python-trio/sniffio")
10330 (synopsis "Detect which async library a program is running under")
10331 (description "This package detects which async library a program is
10332 running under. It supports multiple async I/O packages, like Trio, and
10333 asyncio.")
10334 ;; Either license applies.
10335 (license (list license:expat license:asl2.0))))
10336
10337 (define-public python-pytest-black
10338 (package
10339 (name "python-pytest-black")
10340 (version "0.3.8")
10341 (source
10342 (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "pytest-black" version))
10345 (sha256
10346 (base32
10347 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
10348 (build-system python-build-system)
10349 (propagated-inputs
10350 `(("python-pytest" ,python-pytest)
10351 ("python-black" ,python-black)
10352 ("python-toml" ,python-toml)))
10353 (native-inputs
10354 `(("python-setuptools-scm" ,python-setuptools-scm)))
10355 (home-page "https://github.com/shopkeep/pytest-black")
10356 (synopsis "Pytest plugin to enable format checking with black")
10357 (description
10358 "This package provides a pytest plugin to enable format checking with the
10359 Python code formatter \"black\".")
10360 (license license:expat)))
10361
10362 (define-public python-get-version
10363 (package
10364 (name "python-get-version")
10365 (version "2.1")
10366 (source
10367 (origin
10368 (method url-fetch)
10369 (uri (pypi-uri "get_version" version))
10370 (sha256
10371 (base32
10372 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
10373 (build-system python-build-system)
10374 (propagated-inputs
10375 `(("python-pygments" ,python-pygments)
10376 ("python-pytest" ,python-pytest)
10377 ("python-pytest-black" ,python-pytest-black)
10378 ("python-pytest-cov" ,python-pytest-cov)
10379 ("python-setuptools" ,python-setuptools)
10380 ("python-testpath" ,python-testpath)))
10381 (home-page "https://github.com/flying-sheep/get_version")
10382 (synopsis "Version helper in the spirit of versioneer")
10383 (description
10384 "This package provides a version helper that lets you automatically use
10385 the latest @code{vX.X.X} Git tag as the version in your Python package. It
10386 also supports getting the version from Python source distributions or, once
10387 your package is installed, via @code{pkg_resources} (part of
10388 @code{setuptools}).")
10389 (license license:gpl3+)))
10390
10391 (define-public python-legacy-api-wrap
10392 (package
10393 (name "python-legacy-api-wrap")
10394 (version "1.2")
10395 (source
10396 (origin
10397 (method url-fetch)
10398 (uri (pypi-uri "legacy-api-wrap" version))
10399 (sha256
10400 (base32
10401 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
10402 (build-system python-build-system)
10403 (propagated-inputs
10404 `(("python-get-version" ,python-get-version)
10405 ("python-pytest" ,python-pytest)
10406 ("python-pytest-black" ,python-pytest-black)
10407 ("python-pytest-cov" ,python-pytest-cov)
10408 ("python-setuptools" ,python-setuptools)))
10409 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
10410 (synopsis "Legacy API wrapper")
10411 (description "This module defines a decorator to wrap legacy APIs. The
10412 primary use case is APIs defined before keyword-only parameters existed.")
10413 (license license:gpl3+)))
10414
10415 (define-public python-pyasn1
10416 (package
10417 (name "python-pyasn1")
10418 (version "0.4.8")
10419 (source
10420 (origin
10421 (method url-fetch)
10422 (uri (pypi-uri "pyasn1" version))
10423 (sha256
10424 (base32
10425 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
10426 (build-system python-build-system)
10427 (home-page "http://pyasn1.sourceforge.net/")
10428 (synopsis "ASN.1 types and codecs")
10429 (description
10430 "This is an implementation of ASN.1 types and codecs in Python. It is
10431 suitable for a wide range of protocols based on the ASN.1 specification.")
10432 (license license:bsd-2)))
10433
10434 (define-public python2-pyasn1
10435 (package-with-python2 python-pyasn1))
10436
10437 (define-public python-pyasn1-modules
10438 (package
10439 (name "python-pyasn1-modules")
10440 (version "0.2.2")
10441 (source
10442 (origin
10443 (method url-fetch)
10444 (uri (pypi-uri "pyasn1-modules" version))
10445 (sha256
10446 (base32
10447 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
10448 (build-system python-build-system)
10449 (propagated-inputs
10450 `(("python-pyasn1" ,python-pyasn1)))
10451 (home-page "https://sourceforge.net/projects/pyasn1/")
10452 (synopsis "ASN.1 codec implementations")
10453 (description
10454 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
10455 implementations of ASN.1-based codecs and protocols.")
10456 (license license:bsd-3)))
10457
10458 (define-public python2-pyasn1-modules
10459 (package-with-python2 python-pyasn1-modules))
10460
10461 (define-public python2-ipaddress
10462 (package
10463 (name "python2-ipaddress")
10464 (version "1.0.23")
10465 (source (origin
10466 (method url-fetch)
10467 (uri (pypi-uri "ipaddress" version))
10468 (sha256
10469 (base32
10470 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
10471 (build-system python-build-system)
10472 (arguments
10473 `(#:python ,python-2))
10474 (home-page "https://github.com/phihag/ipaddress")
10475 (synopsis "IP address manipulation library")
10476 (description
10477 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
10478 in Python. This library is used to create, poke at, and manipulate IPv4 and
10479 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
10480 module to older versions of Python.")
10481 (license license:psfl)))
10482
10483 (define-public python-asn1tools
10484 (package
10485 (name "python-asn1tools")
10486 (version "0.158.0")
10487 (source
10488 (origin
10489 (method url-fetch)
10490 (uri (pypi-uri "asn1tools" version))
10491 (sha256
10492 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
10493 (build-system python-build-system)
10494 (propagated-inputs
10495 `(("python-bitstruct" ,python-bitstruct)
10496 ("python-diskcache" ,python-diskcache)
10497 ("python-prompt-toolkit" ,python-prompt-toolkit)
10498 ("python-pyparsing" ,python-pyparsing)))
10499 (home-page "https://github.com/eerimoq/asn1tools")
10500 (synopsis "ASN.1 parsing, encoding and decoding")
10501 (description "This package provides ASN.1 parsing, encoding and decoding
10502 for Python, including constraints checking. It supports several
10503 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
10504 for OER and UPER.")
10505 (license license:expat)))
10506
10507 (define-public python2-ipaddr
10508 (package
10509 (name "python2-ipaddr")
10510 (version "2.1.11")
10511 (source
10512 (origin
10513 (method url-fetch)
10514 (uri (pypi-uri "ipaddr" version))
10515 (sha256
10516 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
10517 (build-system python-build-system)
10518 (arguments
10519 `(#:python ,python-2 ;version 2 only
10520 #:phases
10521 (modify-phases %standard-phases
10522 (replace 'check
10523 (lambda _ (invoke "python" "ipaddr_test.py"))))))
10524 (home-page "https://github.com/google/ipaddr-py")
10525 (synopsis "IP address manipulation library")
10526 (description
10527 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
10528 IPv6 addresses and networks.
10529
10530 For new implementations you may prefer to use the standard module
10531 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
10532 versions of Python.")
10533 (license license:asl2.0)))
10534
10535 (define-public python-idna
10536 (package
10537 (name "python-idna")
10538 (version "2.10")
10539 (source
10540 (origin
10541 (method url-fetch)
10542 (uri (pypi-uri "idna" version))
10543 (sha256
10544 (base32
10545 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
10546 (build-system python-build-system)
10547 (home-page "https://github.com/kjd/idna")
10548 (synopsis "Internationalized domain names in applications")
10549 (description
10550 "This is a library to support the Internationalised Domain Names in
10551 Applications (IDNA) protocol as specified in RFC 5891. This version of the
10552 protocol is often referred to as “IDNA2008” and can produce different results
10553 from the earlier standard from 2003. The library is also intended to act as a
10554 suitable drop-in replacement for the “encodings.idna” module that comes with
10555 the Python standard library but currently only supports the older 2003
10556 specification.")
10557 (license license:bsd-4)))
10558
10559 (define-public python-idna-2.7
10560 (package (inherit python-idna)
10561 (version "2.7")
10562 (source (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "idna" version))
10565 (sha256
10566 (base32
10567 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
10568
10569
10570 (define-public python2-idna
10571 (package-with-python2 python-idna))
10572
10573 (define-public python-libsass
10574 (package
10575 (name "python-libsass")
10576 (version "0.20.1")
10577 (source
10578 (origin
10579 ;; PyPI tarball is missing some test files.
10580 (method git-fetch)
10581 (uri (git-reference
10582 (url "https://github.com/sass/libsass-python")
10583 (commit version)))
10584 (file-name (git-file-name name version))
10585 (sha256
10586 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10587 (build-system python-build-system)
10588 (arguments
10589 `(#:phases
10590 (modify-phases %standard-phases
10591 ;; Use Guix package of libsass instead of compiling from a checkout.
10592 (add-before 'build 'set-libsass
10593 (lambda _
10594 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10595 #t))
10596 (replace 'check
10597 (lambda* (#:key inputs outputs #:allow-other-keys)
10598 (add-installed-pythonpath inputs outputs)
10599 (invoke "pytest" "sasstests.py"))))))
10600 (native-inputs
10601 `(("python-pytest" ,python-pytest)
10602 ("python-werkzeug" ,python-werkzeug)))
10603 (inputs
10604 `(("libsass" ,libsass)))
10605 (propagated-inputs
10606 `(("python-six" ,python-six)))
10607 (home-page "https://sass.github.io/libsass-python/")
10608 (synopsis "Straightforward binding of libsass for Python")
10609 (description
10610 "This package provides a simple Python extension module @code{sass} which
10611 is binding LibSass.")
10612 (license license:expat)))
10613
10614 (define-public python-idna-ssl
10615 (package
10616 (name "python-idna-ssl")
10617 (version "1.0.1")
10618 (source
10619 (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "idna-ssl" version))
10622 (sha256
10623 (base32
10624 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10625 (build-system python-build-system)
10626 (arguments
10627 `(#:tests? #f)) ;circular dependency with python-aiohttp
10628 (home-page "https://github.com/aio-libs/idna-ssl")
10629 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10630 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10631 domains support.")
10632 (license license:expat)))
10633
10634 (define-public python-pretend
10635 (package
10636 (name "python-pretend")
10637 (version "1.0.9")
10638 (source
10639 (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "pretend" version))
10642 (sha256
10643 (base32
10644 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10645 (build-system python-build-system)
10646 (home-page "https://github.com/alex/pretend")
10647 (synopsis "Library for stubbing in Python")
10648 (description
10649 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10650 technique for writing tests. You may hear the term mixed up with mocks,
10651 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10652 responses, rather than doing any computation.")
10653 (license license:bsd-3)))
10654
10655 (define-public python2-pretend
10656 (package-with-python2 python-pretend))
10657
10658 (define-public python-pip
10659 (package
10660 (name "python-pip")
10661 (version "20.2.4")
10662 (source
10663 (origin
10664 (method url-fetch)
10665 (uri (pypi-uri "pip" version))
10666 (sha256
10667 (base32
10668 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10669 (build-system python-build-system)
10670 (arguments
10671 '(#:tests? #f)) ; there are no tests in the pypi archive.
10672 (home-page "https://pip.pypa.io/")
10673 (synopsis "Package manager for Python software")
10674 (description
10675 "Pip is a package manager for Python software, that finds packages on the
10676 Python Package Index (PyPI).")
10677 (license license:expat)))
10678
10679 (define-public python2-pip
10680 (package-with-python2 python-pip))
10681
10682 (define-public python-tlsh
10683 (package
10684 (name "python-tlsh")
10685 (version "3.4.5")
10686 (home-page "https://github.com/trendmicro/tlsh")
10687 (source
10688 (origin
10689 (method git-fetch)
10690 (uri (git-reference
10691 (url "https://github.com/trendmicro/tlsh")
10692 (commit (string-append "v" version))))
10693 (file-name (git-file-name name version))
10694 (sha256
10695 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10696 (build-system cmake-build-system)
10697 (arguments
10698 '(#:out-of-source? #f
10699 #:phases (modify-phases %standard-phases
10700 (replace
10701 'install
10702 (lambda* (#:key outputs #:allow-other-keys)
10703 ;; Build and install the Python bindings. The underlying
10704 ;; C++ library is apparently not meant to be installed.
10705 (let ((out (assoc-ref outputs "out")))
10706 (with-directory-excursion "py_ext"
10707 (and (system* "python" "setup.py" "build")
10708 (system* "python" "setup.py" "install"
10709 (string-append "--prefix=" out))))))))))
10710 (inputs `(("python" ,python-wrapper))) ;for the bindings
10711 (synopsis "Fuzzy matching library for Python")
10712 (description
10713 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10714 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10715 value which can be used for similarity comparisons. Similar objects have
10716 similar hash values, which allows for the detection of similar objects by
10717 comparing their hash values. The byte stream should have a sufficient amount
10718 of complexity; for example, a byte stream of identical bytes will not generate
10719 a hash value.")
10720 (license license:asl2.0)))
10721
10722 (define-public python2-tlsh
10723 (package/inherit python-tlsh
10724 (name "python2-tlsh")
10725 (inputs `(("python" ,python-2)))))
10726
10727 (define-public python-termcolor
10728 (package
10729 (name "python-termcolor")
10730 (version "1.1.0")
10731 (source
10732 (origin
10733 (method url-fetch)
10734 (uri (pypi-uri "termcolor" version))
10735 (sha256
10736 (base32
10737 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10738 (build-system python-build-system)
10739 (arguments
10740 ;; There are no tests.
10741 `(#:tests? #f))
10742 (home-page "https://pypi.org/project/termcolor/")
10743 (synopsis "ANSII Color formatting for terminal output")
10744 (description
10745 "This package provides ANSII Color formatting for output in terminals.")
10746 (license license:expat)))
10747
10748 (define-public python2-termcolor
10749 (package-with-python2 python-termcolor))
10750
10751 (define-public python-terminaltables
10752 (package
10753 (name "python-terminaltables")
10754 (version "3.1.0")
10755 (source
10756 (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "terminaltables" version))
10759 (sha256
10760 (base32
10761 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10762 (build-system python-build-system)
10763 (home-page "https://github.com/Robpol86/terminaltables")
10764 (synopsis
10765 "Generate simple tables in terminals from a nested list of strings")
10766 (description
10767 "This package makes it easy to draw tables in terminal/console
10768 applications from a list of lists of strings. It supports multi-line rows.")
10769 (license license:expat)))
10770
10771 (define-public python-libarchive-c
10772 (package
10773 (name "python-libarchive-c")
10774 (version "2.9")
10775 (source (origin
10776 (method url-fetch)
10777 (uri (pypi-uri "libarchive-c" version))
10778 (sha256
10779 (base32
10780 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10781 (build-system python-build-system)
10782 (arguments
10783 '(#:phases (modify-phases %standard-phases
10784 (add-before
10785 'build 'reference-libarchive
10786 (lambda* (#:key inputs #:allow-other-keys)
10787 ;; Retain the absolute file name of libarchive.so.
10788 (let ((libarchive (assoc-ref inputs "libarchive")))
10789 (substitute* "libarchive/ffi.py"
10790 (("find_library\\('archive'\\)")
10791 (string-append "'" libarchive
10792 "/lib/libarchive.so'"))))))
10793 (replace 'check
10794 (lambda _ (invoke "pytest" "-vv"))))))
10795 (native-inputs
10796 `(("python-mock" ,python-mock)
10797 ("python-pytest" ,python-pytest)))
10798 (inputs
10799 `(("libarchive" ,libarchive)))
10800 (home-page "https://github.com/Changaco/python-libarchive-c")
10801 (synopsis "Python interface to libarchive")
10802 (description
10803 "This package provides Python bindings to libarchive, a C library to
10804 access possibly compressed archives in many different formats. It uses
10805 Python's @code{ctypes} foreign function interface (FFI).")
10806 (license license:lgpl2.0+)))
10807
10808 (define-public python2-libarchive-c
10809 (package-with-python2 python-libarchive-c))
10810
10811 (define-public python-file
10812 (package/inherit file
10813 (name "python-file")
10814 (build-system python-build-system)
10815 (arguments
10816 '(#:tests? #f ;no tests
10817 #:configure-flags '("--single-version-externally-managed" "--root=/")
10818 #:phases (modify-phases %standard-phases
10819 (add-before 'build 'change-directory
10820 (lambda _
10821 (chdir "python")
10822 #t))
10823 (add-before 'build 'set-library-file-name
10824 (lambda* (#:key inputs #:allow-other-keys)
10825 (let ((file (assoc-ref inputs "file")))
10826 (substitute* "magic.py"
10827 (("find_library\\('magic'\\)")
10828 (string-append "'" file "/lib/libmagic.so'")))
10829 #t))))))
10830 (inputs `(("file" ,file)))
10831 (native-inputs (if (%current-target-system)
10832 `(("self" ,this-package))
10833 '()))
10834 (synopsis "Python bindings to the libmagic file type guesser")
10835 (description "This package provides Python bindings to the libmagic file
10836 type guesser.
10837
10838 Note that this module and the @code{python-magic} module both provide a
10839 @file{magic.py} file; these two modules, which are different and were
10840 developed separately, both serve the same purpose: provide Python bindings for
10841 libmagic.")))
10842
10843 (define-public python2-file
10844 (package-with-python2 python-file))
10845
10846 (define-public python-debian
10847 (package
10848 (name "python-debian")
10849 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10850 (version "0.1.36")
10851 (source
10852 (origin
10853 ;; Use git-fetch, as pypi doesn't include test suite.
10854 (method git-fetch)
10855 (uri (git-reference
10856 (url home-page)
10857 (commit version)))
10858 (file-name (git-file-name name version))
10859 (sha256
10860 (base32
10861 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10862 (build-system python-build-system)
10863 (arguments
10864 `(#:phases (modify-phases %standard-phases
10865 (add-after 'unpack 'remove-debian-specific-tests
10866 ;; python-apt, apt and dpkg are not yet available in guix,
10867 ;; and these tests heavily depend on them.
10868 (lambda _
10869 (delete-file "lib/debian/tests/test_deb822.py")
10870 (delete-file "lib/debian/tests/test_debfile.py")
10871 #t)))))
10872 (propagated-inputs
10873 `(("python-six" ,python-six)
10874 ("python-chardet" ,python-chardet)))
10875 (synopsis "Debian package related modules")
10876 (description
10877 ;; XXX: Use @enumerate instead of @itemize to work around
10878 ;; <http://bugs.gnu.org/21772>.
10879 "This package provides Python modules that abstract many formats of
10880 Debian-related files, such as:
10881
10882 @enumerate
10883 @item Debtags information;
10884 @item @file{debian/changelog} files;
10885 @item packages files, pdiffs;
10886 @item control files of single or multiple RFC822-style paragraphs---e.g.
10887 @file{debian/control}, @file{.changes}, @file{.dsc};
10888 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10889 contained files and meta-information.
10890 @end enumerate\n")
10891
10892 ;; Modules are either GPLv2+ or GPLv3+.
10893 (license license:gpl3+)))
10894
10895 (define-public python-json-spec
10896 (package
10897 (name "python-json-spec")
10898 (version "0.10.1")
10899 (source
10900 (origin
10901 (method url-fetch)
10902 (uri (pypi-uri "json-spec" version))
10903 (sha256
10904 (base32
10905 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
10906 (build-system python-build-system)
10907 (propagated-inputs
10908 `(("python-pathlib" ,python-pathlib)
10909 ("python-six" ,python-six)))
10910 (native-inputs
10911 `(("python-pytest" ,python-pytest)))
10912 (home-page "http://py.errorist.io/json-spec")
10913 (synopsis
10914 "JSON Schema, JSON Pointer and JSON Reference for Python")
10915 (description
10916 "This Python library implements several JSON specs, like JSON Schema,
10917 JSON Reference and JSON Pointer.")
10918 (license license:bsd-3)))
10919
10920 (define-public python-fastjsonschema
10921 (package
10922 (name "python-fastjsonschema")
10923 (version "2.15.1")
10924 (source
10925 (origin
10926 (method url-fetch)
10927 (uri (pypi-uri "fastjsonschema" version))
10928 (sha256
10929 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
10930 (build-system python-build-system)
10931 (arguments
10932 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
10933 #:phases
10934 (modify-phases %standard-phases
10935 (replace 'check
10936 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10937 (when tests?
10938 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
10939 (native-inputs
10940 `(("python-colorama" ,python-colorama)
10941 ("python-json-spec" ,python-json-spec)
10942 ("python-jsonschema" ,python-jsonschema)
10943 ("python-pylint" ,python-pylint)
10944 ("python-pytest" ,python-pytest-6)
10945 ("python-pytest-benchmark"
10946 ,python-pytest-benchmark)
10947 ("python-pytest-cache" ,python-pytest-cache)
10948 ("python-validictory" ,python-validictory)))
10949 (home-page
10950 "https://github.com/horejsek/python-fastjsonschema")
10951 (synopsis
10952 "Fast Python implementation of JSON schema")
10953 (description
10954 "This library implements validation of JSON documents by JSON schema for
10955 drafts 04, 06 and 07.")
10956 (license license:bsd-3)))
10957
10958 (define-public python-nbformat
10959 (package
10960 (name "python-nbformat")
10961 (version "5.1.3")
10962 ;; The PyPi release tarball lacks some test cases and test data.
10963 (source (origin
10964 (method git-fetch)
10965 (uri (git-reference
10966 (url "https://github.com/jupyter/nbformat.git")
10967 (commit version)))
10968 (sha256
10969 (base32
10970 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
10971 (file-name (git-file-name name version))))
10972 (build-system python-build-system)
10973 (arguments
10974 `(#:phases
10975 (modify-phases %standard-phases
10976 (replace 'check
10977 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10978 (when tests?
10979 (invoke "pytest" "-vv")))))))
10980 (propagated-inputs
10981 `(("python-ipython-genutils" ,python-ipython-genutils)
10982 ("python-jsonschema" ,python-jsonschema)
10983 ("python-jupyter-core" ,python-jupyter-core)
10984 ("python-traitlets" ,python-traitlets)))
10985 (native-inputs
10986 `(("python-pytest" ,python-pytest)
10987 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
10988 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
10989 ; testing only.
10990 ("python-testpath" ,python-testpath)))
10991 (home-page "https://jupyter.org")
10992 (synopsis "Jupyter Notebook format")
10993 (description "This package provides the reference implementation of the
10994 Jupyter Notebook format and Python APIs for working with notebooks.")
10995 (license license:bsd-3)))
10996
10997 (define-public python-bleach
10998 (package
10999 (name "python-bleach")
11000 (version "3.1.5")
11001 (source
11002 (origin
11003 (method url-fetch)
11004 (uri (pypi-uri "bleach" version))
11005 (sha256
11006 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
11007 (build-system python-build-system)
11008 (propagated-inputs
11009 `(("python-webencodings" ,python-webencodings)
11010 ("python-six" ,python-six)))
11011 (native-inputs
11012 `(("python-datrie" ,python-datrie)
11013 ("python-genshi" ,python-genshi)
11014 ("python-lxml" ,python-lxml)
11015 ("python-pytest" ,python-pytest)))
11016 (home-page "https://github.com/mozilla/bleach")
11017 (synopsis "Whitelist-based HTML-sanitizing tool")
11018 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
11019 (license license:asl2.0)))
11020
11021 (define-public python2-bleach
11022 (package-with-python2 python-bleach))
11023
11024 (define-public python-entrypoints
11025 (package
11026 (name "python-entrypoints")
11027 (version "0.3")
11028 (source
11029 (origin
11030 (method url-fetch)
11031 (uri (pypi-uri "entrypoints" version))
11032 (sha256
11033 (base32
11034 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11035 (build-system python-build-system)
11036 ;; The package does not come with a setup.py file, so we have to generate
11037 ;; one ourselves.
11038 (arguments
11039 `(#:tests? #f
11040 #:phases
11041 (modify-phases %standard-phases
11042 (add-after 'unpack 'create-setup.py
11043 (lambda _
11044 (call-with-output-file "setup.py"
11045 (lambda (port)
11046 (format port "\
11047 from setuptools import setup
11048 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11049 " ,version))))))))
11050 (home-page "https://github.com/takluyver/entrypoints")
11051 (synopsis "Discover and load entry points from installed Python packages")
11052 (description "Entry points are a way for Python packages to advertise
11053 objects with some common interface. The most common examples are
11054 @code{console_scripts} entry points, which define shell commands by
11055 identifying a Python function to run. The @code{entrypoints} module contains
11056 functions to find and load entry points.")
11057 (license license:expat)))
11058
11059 (define-public python2-entrypoints
11060 (package-with-python2 python-entrypoints))
11061
11062 (define-public python-epc
11063 (package
11064 (name "python-epc")
11065 (version "0.0.5")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "epc" version))
11070 (sha256
11071 (base32
11072 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11073 (build-system python-build-system)
11074 (propagated-inputs
11075 `(("python-sexpdata" ,python-sexpdata)))
11076 (native-inputs
11077 `(("python-nose" ,python-nose)))
11078 (home-page "https://github.com/tkf/python-epc")
11079 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11080 (description
11081 "Python-EPC can call elisp functions from Python and Python functions
11082 from elisp.")
11083 (license license:gpl3)))
11084
11085 (define-public python-forex-python
11086 (package
11087 (name "python-forex-python")
11088 (version "1.5")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "forex-python" version))
11093 (sha256
11094 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11095 (build-system python-build-system)
11096 (arguments
11097 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11098 ;; repository require online data.
11099 `(#:tests? #f))
11100 (propagated-inputs
11101 `(("python-requests" ,python-requests)
11102 ("python-simplejson" ,python-simplejson)))
11103 (home-page "https://github.com/MicroPyramid/forex-python")
11104 (synopsis "Foreign exchange rates and currency conversion")
11105 (description
11106 "@code{python-forex-python} can be used to manipulate foreign
11107 exchange rates and to operate currency conversions.
11108
11109 Features:
11110 @itemize
11111 @item List all currency rates.
11112 @item BitCoin price for all currencies.
11113 @item Converting amount to BitCoins.
11114 @item Get historical rates for any day since 1999.
11115 @item Conversion rate for one currency(ex; USD to INR).
11116 @item Convert amount from one currency to other.('USD 10$' to INR).
11117 @item Currency symbols.
11118 @item Currency names.
11119 @end itemize")
11120 (license license:expat)))
11121
11122 (define-public python-simpleeval
11123 (package
11124 (name "python-simpleeval")
11125 (version "0.9.10")
11126 (source
11127 (origin
11128 (method url-fetch)
11129 (uri (pypi-uri "simpleeval" version))
11130 (sha256
11131 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11132 (build-system python-build-system)
11133 (home-page "https://github.com/danthedeckie/simpleeval")
11134 (synopsis "Simple, safe single expression evaluator library")
11135 (description
11136 "This package provides a quick single file library for easily adding
11137 evaluatable expressions into python projects. Say you want to allow a user
11138 to set an alarm volume, which could depend on the time of day, alarm level,
11139 how many previous alarms had gone off, and if there is music playing at the
11140 time.")
11141 (license license:expat)))
11142
11143 (define-public python-nbconvert
11144 (package
11145 (name "python-nbconvert")
11146 (version "6.0.7")
11147 (source
11148 (origin
11149 (method url-fetch)
11150 (uri (pypi-uri "nbconvert" version))
11151 (sha256
11152 (base32
11153 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11154 (build-system python-build-system)
11155 (arguments
11156 `(#:phases
11157 (modify-phases %standard-phases
11158 (add-after 'unpack 'fix-paths-and-tests
11159 (lambda _
11160 ;; Use pandoc binary from input.
11161 (substitute* "nbconvert/utils/pandoc.py"
11162 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11163 ;; Same for LaTeX.
11164 (substitute* "nbconvert/exporters/pdf.py"
11165 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11166 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11167 ;; Make sure tests are not skipped.
11168 (substitute* (find-files "." "test_.+\\.py$")
11169 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11170 ;; Pandoc is never missing, disable test.
11171 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11172 (("import os" all) (string-append all "\nimport pytest"))
11173 (("(.+)(def test_pandoc_available)" all indent def)
11174 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11175 indent def)))
11176 ;; Not installing pyppeteer, delete test.
11177 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11178 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11179 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11180 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11181 indent def)))))
11182 (replace 'check
11183 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11184 (when tests?
11185 ;; Some tests invoke the installed nbconvert binary.
11186 (add-installed-pythonpath inputs outputs)
11187 ;; Tries to write to this path.
11188 (unsetenv "JUPYTER_CONFIG_DIR")
11189 ;; Tests depend on templates installed to output.
11190 (setenv "JUPYTER_PATH"
11191 (string-append
11192 (assoc-ref outputs "out")
11193 "/share/jupyter:"
11194 (getenv "JUPYTER_PATH")))
11195 ;; Some tests need HOME
11196 (setenv "HOME" "/tmp")
11197 (invoke "pytest" "-vv")))))))
11198 (inputs
11199 `(("pandoc" ,pandoc)
11200 ;; XXX: Disabled, needs substitute*.
11201 ;;("inkscape" ,inkscape)
11202 ))
11203 (native-inputs
11204 `(("python-ipykernel" ,python-ipykernel)
11205 ;; XXX: Disabled, not in guix.
11206 ;;("python-pyppeteer" ,python-pyppeteer)
11207 ("python-pytest" ,python-pytest)
11208 ("python-pytest-cov" ,python-pytest-cov)
11209 ("python-pytest-dependency" ,python-pytest-dependency)
11210 ("texlive" ,(texlive-union (list texlive-adjustbox
11211 texlive-amsfonts/patched
11212 texlive-booktabs
11213 texlive-caption
11214 texlive-eurosym
11215 texlive-fonts-rsfs
11216 texlive-generic-ulem
11217 texlive-iftex
11218 texlive-jknappen
11219 texlive-latex-amsmath
11220 texlive-latex-enumitem
11221 texlive-latex-fancyvrb
11222 texlive-latex-float
11223 texlive-latex-fontspec
11224 texlive-latex-geometry
11225 texlive-latex-hyperref
11226 texlive-latex-jknapltx
11227 texlive-latex-ms
11228 texlive-latex-oberdiek
11229 texlive-latex-parskip
11230 texlive-latex-trimspaces
11231 texlive-latex-upquote
11232 texlive-latex-ucs
11233 texlive-lm
11234 texlive-mathpazo
11235 texlive-tcolorbox
11236 texlive-titling
11237 texlive-tools
11238 texlive-xcolor
11239 texlive-zapfding)))))
11240 (propagated-inputs
11241 `(("python-bleach" ,python-bleach)
11242 ("python-defusedxml" ,python-defusedxml)
11243 ("python-entrypoints" ,python-entrypoints)
11244 ("python-jinja2" ,python-jinja2)
11245 ("python-jupyter-core" ,python-jupyter-core)
11246 ("python-mistune" ,python-mistune)
11247 ("python-nbclient" ,python-nbclient)
11248 ("python-nbformat" ,python-nbformat)
11249 ("python-pandocfilters" ,python-pandocfilters)
11250 ("python-pygments" ,python-pygments)
11251 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11252 ("python-testpath" ,python-testpath)
11253 ("python-traitlets" ,python-traitlets)
11254 ;; Required, even if [serve] is not used.
11255 ("python-tornado" ,python-tornado-6)))
11256 (home-page "https://jupyter.org")
11257 (synopsis "Converting Jupyter Notebooks")
11258 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11259 notebooks to various other formats via Jinja templates. It allows you to
11260 convert an @code{.ipynb} notebook file into various static formats including:
11261
11262 @enumerate
11263 @item HTML
11264 @item LaTeX
11265 @item PDF
11266 @item Reveal JS
11267 @item Markdown (md)
11268 @item ReStructured Text (rst)
11269 @item executable script
11270 @end enumerate\n")
11271 (license license:bsd-3)))
11272
11273 (define-public python-notebook
11274 (package
11275 (name "python-notebook")
11276 (version "6.3.0")
11277 (source (origin
11278 (method url-fetch)
11279 (uri (pypi-uri "notebook" version))
11280 (sha256
11281 (base32
11282 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11283 (build-system python-build-system)
11284 (arguments
11285 `(#:phases
11286 (modify-phases %standard-phases
11287 (replace 'check
11288 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11289 ;; These tests require a browser
11290 (delete-file-recursively "notebook/tests/selenium")
11291 (when tests?
11292 (add-installed-pythonpath inputs outputs)
11293 ;; Some tests do not expect all files to be installed in the
11294 ;; same directory, but JUPYTER_PATH contains multiple entries.
11295 (unsetenv "JUPYTER_PATH")
11296 ;; Some tests need HOME
11297 (setenv "HOME" "/tmp")
11298 (with-directory-excursion "/tmp"
11299 (invoke "pytest" "-vv"
11300 ;; TODO: This tests fails because nbconvert does not
11301 ;; list "python" as a format.
11302 "-k" "not test_list_formats"))))))))
11303 (propagated-inputs
11304 `(("python-argon2-cffi" ,python-argon2-cffi)
11305 ("python-ipykernel" ,python-ipykernel)
11306 ("python-ipython-genutils" ,python-ipython-genutils)
11307 ("python-jinja2" ,python-jinja2)
11308 ("python-jupyter-client" ,python-jupyter-client)
11309 ("python-jupyter-core" ,python-jupyter-core)
11310 ("python-nbconvert" ,python-nbconvert)
11311 ("python-nbformat" ,python-nbformat)
11312 ("python-prometheus-client" ,python-prometheus-client)
11313 ("python-pyzmq" ,python-pyzmq)
11314 ("python-send2trash" ,python-send2trash)
11315 ("python-terminado" ,python-terminado)
11316 ("python-tornado" ,python-tornado-6)
11317 ("python-traitlets" ,python-traitlets)))
11318 (native-inputs
11319 `(("python-coverage" ,python-coverage)
11320 ("python-nbval" ,python-nbval)
11321 ("python-pytest" ,python-pytest)
11322 ("python-pytest-cov" ,python-pytest-cov)
11323 ("python-requests" ,python-requests)
11324 ("python-requests-unixsocket" ,python-requests-unixsocket)))
11325 (home-page "https://jupyter.org/")
11326 (synopsis "Web-based notebook environment for interactive computing")
11327 (description
11328 "The Jupyter HTML notebook is a web-based notebook environment for
11329 interactive computing.")
11330 (license license:bsd-3)))
11331
11332 (define-public python-widgetsnbextension
11333 (package
11334 (name "python-widgetsnbextension")
11335 (version "3.5.1")
11336 (source
11337 (origin
11338 (method url-fetch)
11339 (uri (pypi-uri "widgetsnbextension" version))
11340 (sha256
11341 (base32
11342 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
11343 (build-system python-build-system)
11344 (propagated-inputs
11345 `(("python-notebook" ,python-notebook)))
11346 (home-page "https://ipython.org")
11347 (synopsis "IPython HTML widgets for Jupyter")
11348 (description "This package provides interactive HTML widgets for Jupyter
11349 notebooks.")
11350 (license license:bsd-3)))
11351
11352 (define-public python-ipywidgets
11353 (package
11354 (name "python-ipywidgets")
11355 (version "7.6.3")
11356 (source
11357 (origin
11358 (method url-fetch)
11359 (uri (pypi-uri "ipywidgets" version))
11360 (sha256
11361 (base32
11362 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
11363 (build-system python-build-system)
11364 (propagated-inputs
11365 `(("python-ipykernel" ,python-ipykernel)
11366 ("python-ipython" ,python-ipython)
11367 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
11368 ("python-nbformat" ,python-nbformat)
11369 ("python-traitlets" ,python-traitlets)
11370 ("python-widgetsnbextension" ,python-widgetsnbextension)))
11371 (native-inputs
11372 `(("python-mock" ,python-mock)
11373 ("python-pytest" ,python-pytest)
11374 ("python-pytest-cov" ,python-pytest-cov)))
11375 (home-page "https://ipython.org")
11376 (synopsis "IPython HTML widgets for Jupyter")
11377 (description "Ipywidgets are interactive HTML widgets for Jupyter
11378 notebooks and the IPython kernel. Notebooks come alive when interactive
11379 widgets are used. Users gain control of their data and can visualize changes
11380 in the data.")
11381 (license license:bsd-3)))
11382
11383 (define-public python-jupyter-console
11384 (package
11385 (name "python-jupyter-console")
11386 (version "6.1.0")
11387 (source
11388 (origin
11389 (method url-fetch)
11390 (uri (pypi-uri "jupyter_console" version))
11391 (sha256
11392 (base32
11393 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
11394 (build-system python-build-system)
11395 (propagated-inputs
11396 `(("python-ipykernel" ,python-ipykernel)
11397 ("python-jupyter-client" ,python-jupyter-client)
11398 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
11399 ("python-pygments" ,python-pygments)))
11400 (native-inputs
11401 `(("python-nose" ,python-nose)))
11402 (home-page "https://jupyter.org")
11403 (synopsis "Jupyter terminal console")
11404 (description "This package provides a terminal-based console frontend for
11405 Jupyter kernels. It also allows for console-based interaction with non-Python
11406 Jupyter kernels such as IJulia and IRKernel.")
11407 (license license:bsd-3)))
11408
11409 ;; The python-ipython and python-jupyter-console require each other. To get
11410 ;; the functionality in both packages working, strip down the
11411 ;; python-jupyter-console package when using it as an input to python-ipython.
11412 (define python-jupyter-console-minimal
11413 (package/inherit python-jupyter-console
11414 (name "python-jupyter-console-minimal")
11415 (arguments
11416 (substitute-keyword-arguments
11417 (package-arguments python-jupyter-console)
11418 ((#:phases phases)
11419 `(modify-phases ,phases
11420 (add-after 'install 'delete-bin
11421 (lambda* (#:key outputs #:allow-other-keys)
11422 ;; Delete the bin files, to avoid conflicts in profiles
11423 ;; where python-ipython and python-jupyter-console are
11424 ;; both present.
11425 (delete-file-recursively
11426 (string-append
11427 (assoc-ref outputs "out") "/bin"))))))))
11428 ;; Remove the python-ipython propagated input, to avoid the cycle
11429 (propagated-inputs
11430 (alist-delete
11431 "python-ipython"
11432 (package-propagated-inputs python-jupyter-console)))))
11433
11434 (define-public python-qtconsole
11435 (package
11436 (name "python-qtconsole")
11437 (version "4.4.3")
11438 (source
11439 (origin
11440 (method url-fetch)
11441 (uri (pypi-uri "qtconsole" version))
11442 (sha256
11443 (base32
11444 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
11445 (build-system python-build-system)
11446 (arguments
11447 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
11448 ;; but we only have the LTS version 5.x. This means that there might be
11449 ;; runtime errors, but since this is a dependency of the Jupyter package,
11450 ;; and Jupyter can be used without the qtconsole we can overlook this for
11451 ;; now.
11452 `(#:tests? #f
11453 #:phases
11454 (modify-phases %standard-phases
11455 (add-before 'check 'pre-check
11456 (lambda _
11457 (setenv "QT_QPA_PLATFORM" "offscreen")
11458 #t)))))
11459 (propagated-inputs
11460 `(("python-ipykernel" ,python-ipykernel)
11461 ("python-ipython" ,python-ipython)))
11462 (native-inputs
11463 `(("python-pytest" ,python-pytest)))
11464 (home-page "https://jupyter.org")
11465 (synopsis "Jupyter Qt console")
11466 (description "This package provides a Qt-based console for Jupyter with
11467 support for rich media output.")
11468 (license license:bsd-3)))
11469
11470 (define-public python-jsbeautifier
11471 (package
11472 (name "python-jsbeautifier")
11473 (version "1.10.2")
11474 (home-page "https://github.com/beautify-web/js-beautify")
11475 (source (origin
11476 (method git-fetch)
11477 (uri (git-reference
11478 (url home-page)
11479 (commit (string-append "v" version))))
11480 (file-name (git-file-name name version))
11481 (sha256
11482 (base32
11483 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
11484 (build-system python-build-system)
11485 (arguments
11486 `(#:phases (modify-phases %standard-phases
11487 (add-after 'unpack 'chdir
11488 (lambda _
11489 ;; The upstream Git repository contains all the code,
11490 ;; but this package only builds the python code.
11491 (chdir "python")
11492 #t))
11493 (add-after 'unpack 'patch-python-six-requirements
11494 (lambda _
11495 (substitute* "python/setup.py"
11496 (("six>=1.12.0")
11497 "six>=1.11.0"))
11498 #t)))))
11499 (propagated-inputs
11500 `(("python-editorconfig" ,python-editorconfig)
11501 ("python-six" ,python-six)))
11502 (native-inputs
11503 `(("python-pytest" ,python-pytest)))
11504 (synopsis "JavaScript unobfuscator and beautifier")
11505 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
11506 popular online obfuscators.")
11507 (license license:expat)))
11508
11509 (define-public jupyter
11510 (package
11511 (name "jupyter")
11512 (version "1.0.0")
11513 (source
11514 (origin
11515 (method url-fetch)
11516 (uri (pypi-uri "jupyter" version))
11517 (sha256
11518 (base32
11519 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
11520 (build-system python-build-system)
11521 (arguments '(#:tests? #f)) ; there are none.
11522 (propagated-inputs
11523 `(("python-ipykernel" ,python-ipykernel)
11524 ("python-ipywidgets" ,python-ipywidgets)
11525 ("python-jupyter-console" ,python-jupyter-console)
11526 ("python-nbconvert" ,python-nbconvert)
11527 ("python-notebook" ,python-notebook)
11528 ("python-qtconsole" ,python-qtconsole)))
11529 (home-page "https://jupyter.org")
11530 (synopsis "Web application for interactive documents")
11531 (description
11532 "The Jupyter Notebook is a web application that allows you to create and
11533 share documents that contain live code, equations, visualizations and
11534 explanatory text. Uses include: data cleaning and transformation, numerical
11535 simulation, statistical modeling, machine learning and much more.")
11536 (license license:bsd-3)))
11537
11538 (define-public python-chardet
11539 (package
11540 (name "python-chardet")
11541 (version "3.0.4")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "chardet" version))
11546 (sha256
11547 (base32
11548 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
11549 (native-inputs
11550 `(("python-hypothesis" ,python-hypothesis)
11551 ("python-pytest" ,python-pytest)
11552 ("python-pytest-runner" ,python-pytest-runner)))
11553 (build-system python-build-system)
11554 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
11555 (arguments `(#:tests? #f))
11556 (home-page "https://github.com/chardet/chardet")
11557 (synopsis "Universal encoding detector for Python 2 and 3")
11558 (description
11559 "This package provides @code{chardet}, a Python module that can
11560 automatically detect a wide range of file encodings.")
11561 (license license:lgpl2.1+)))
11562
11563 (define-public python2-chardet
11564 (package-with-python2 python-chardet))
11565
11566 (define-public python-docopt
11567 (package
11568 (name "python-docopt")
11569 (version "0.6.2")
11570 (source
11571 (origin
11572 (method git-fetch)
11573 ;; The release on PyPI does not include tests.
11574 (uri (git-reference
11575 (url "https://github.com/docopt/docopt")
11576 (commit version)))
11577 (file-name (git-file-name name version))
11578 (sha256
11579 (base32
11580 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
11581 (build-system python-build-system)
11582 (native-inputs
11583 `(("python-pytest" ,python-pytest)))
11584 (arguments
11585 `(#:phases
11586 (modify-phases %standard-phases
11587 (replace 'check
11588 (lambda _ (invoke "py.test"))))))
11589 (home-page "http://docopt.org")
11590 (synopsis "Command-line interface description language for Python")
11591 (description "This library allows the user to define a command-line
11592 interface from a program's help message rather than specifying it
11593 programmatically with command-line parsers like @code{getopt} and
11594 @code{argparse}.")
11595 (license license:expat)))
11596
11597 (define-public python2-docopt
11598 (package-with-python2 python-docopt))
11599
11600 (define-public python-pythondialog
11601 (package
11602 (name "python-pythondialog")
11603 (version "3.4.0")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (pypi-uri "pythondialog" version))
11608 (sha256
11609 (base32
11610 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
11611 (build-system python-build-system)
11612 (arguments
11613 `(#:phases
11614 (modify-phases %standard-phases
11615 (add-after 'unpack 'patch-path
11616 (lambda* (#:key inputs #:allow-other-keys)
11617 (let* ((dialog (assoc-ref inputs "dialog")))
11618 ;; Since this library really wants to grovel the search path, we
11619 ;; must hardcode dialog's store path into it.
11620 (substitute* "dialog.py"
11621 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
11622 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
11623 #t))))
11624 #:tests? #f)) ; no test suite
11625 (propagated-inputs
11626 `(("dialog" ,dialog)))
11627 (home-page "http://pythondialog.sourceforge.net/")
11628 (synopsis "Python interface to the UNIX dialog utility")
11629 (description "A Python wrapper for the dialog utility. Its purpose is to
11630 provide an easy to use, pythonic and comprehensive Python interface to dialog.
11631 This allows one to make simple text-mode user interfaces on Unix-like systems")
11632 (license license:lgpl2.1)
11633 (properties `((python2-variant . ,(delay python2-pythondialog))))))
11634
11635 (define-public python2-pythondialog
11636 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
11637 (package
11638 (inherit base)
11639 (version (package-version python-pythondialog))
11640 (source (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "python2-pythondialog" version))
11643 (sha256
11644 (base32
11645 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11646
11647 (define-public python-configobj
11648 (package
11649 (name "python-configobj")
11650 (version "5.0.6")
11651 (source (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "configobj" version))
11654 (sha256
11655 (base32
11656 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11657 ;; Patch setup.py so it looks for python-setuptools, which is
11658 ;; required to parse the keyword 'install_requires' in setup.py.
11659 (patches (search-patches "python-configobj-setuptools.patch"))))
11660 (build-system python-build-system)
11661 (propagated-inputs
11662 `(("python-six" ,python-six)))
11663 (synopsis "Config file reading, writing and validation")
11664 (description "ConfigObj is a simple but powerful config file reader and
11665 writer: an ini file round tripper. Its main feature is that it is very easy to
11666 use, with a straightforward programmer’s interface and a simple syntax for
11667 config files.")
11668 (home-page "https://github.com/DiffSK/configobj")
11669 (license license:bsd-3)))
11670
11671 (define-public python2-configobj
11672 (package-with-python2 python-configobj))
11673
11674 (define-public python-configargparse
11675 (package
11676 (name "python-configargparse")
11677 (version "1.2.3")
11678 (source (origin
11679 (method url-fetch)
11680 (uri (pypi-uri "ConfigArgParse" version))
11681 (sha256
11682 (base32
11683 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11684 (build-system python-build-system)
11685 (native-inputs
11686 `(("python-pyyaml" ,python-pyyaml)))
11687 (arguments
11688 `(#:phases
11689 (modify-phases %standard-phases
11690 (replace 'check
11691 (lambda _
11692 ;; Bypass setuptools-shim because one test relies on "setup.py"
11693 ;; being the first argument passed to the python call.
11694 ;;
11695 ;; NOTE: Many tests do not run because they rely on Python's
11696 ;; built-in test.test_argparse, but we remove the unit tests from
11697 ;; our Python installation.
11698 (invoke "python" "setup.py" "test"))))))
11699 (synopsis "Replacement for argparse")
11700 (description "A drop-in replacement for argparse that allows options to also
11701 be set via config files and/or environment variables.")
11702 (home-page "https://github.com/bw2/ConfigArgParse")
11703 (license license:expat)))
11704
11705 (define-public python-argparse-manpage
11706 (package
11707 (name "python-argparse-manpage")
11708 (version "1.1")
11709 (source
11710 (origin
11711 (method url-fetch)
11712 (uri (pypi-uri "argparse-manpage" version))
11713 (sha256
11714 (base32
11715 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11716 (build-system python-build-system)
11717 (home-page "https://github.com/praiskup/argparse-manpage")
11718 (synopsis "Build manual page from Python's ArgumentParser object")
11719 (description
11720 "This package provides tools to build manual pages from Python's
11721 @code{ArgumentParser} object.")
11722 (license license:asl2.0)))
11723
11724 (define-public python-contextlib2
11725 (package
11726 (name "python-contextlib2")
11727 (version "0.6.0.post1")
11728 (source
11729 (origin
11730 (method url-fetch)
11731 (uri (pypi-uri "contextlib2" version))
11732 (sha256
11733 (base32
11734 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11735 (build-system python-build-system)
11736 (home-page "https://contextlib2.readthedocs.org/")
11737 (synopsis "Tools for decorators and context managers")
11738 (description "This module is primarily a backport of the Python
11739 3.2 contextlib to earlier Python versions. Like contextlib, it
11740 provides utilities for common tasks involving decorators and context
11741 managers. It also contains additional features that are not part of
11742 the standard library.")
11743 (properties `((python2-variant . ,(delay python2-contextlib2))))
11744 (license license:psfl)))
11745
11746 (define-public python2-contextlib2
11747 (let ((base (package-with-python2
11748 (strip-python2-variant python-contextlib2))))
11749 (package/inherit base
11750 (arguments
11751 (substitute-keyword-arguments (package-arguments base)
11752 ((#:phases phases)
11753 `(modify-phases ,phases
11754 (replace 'check
11755 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11756 (native-inputs
11757 `(("python2-unittest2" ,python2-unittest2))))))
11758
11759 ;; This package is used by python2-pytest via python2-importlib-metadata,
11760 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11761 (define-public python2-contextlib2-bootstrap
11762 (hidden-package
11763 (package/inherit
11764 python2-contextlib2
11765 (name "python2-contextlib2-bootstrap")
11766 (arguments
11767 `(#:tests? #f
11768 ,@(package-arguments python2-contextlib2)))
11769 (native-inputs '()))))
11770
11771 (define-public python-texttable
11772 (package
11773 (name "python-texttable")
11774 (version "1.6.2")
11775 (source
11776 (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "texttable" version))
11779 (sha256
11780 (base32
11781 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11782 (build-system python-build-system)
11783 (arguments
11784 `(#:phases
11785 (modify-phases %standard-phases
11786 (replace 'check
11787 (lambda _ (invoke "pytest" "tests.py"))))))
11788 (native-inputs
11789 `(("python-pytest" ,python-pytest)))
11790 (home-page "https://github.com/foutaise/texttable/")
11791 (synopsis "Python module for creating simple ASCII tables")
11792 (description "Texttable is a Python module for creating simple ASCII
11793 tables.")
11794 (license license:expat)))
11795
11796 (define-public python2-texttable
11797 (package-with-python2 python-texttable))
11798
11799 (define-public python-atomicwrites
11800 (package
11801 (name "python-atomicwrites")
11802 (version "1.3.0")
11803 (source (origin
11804 (method url-fetch)
11805 (uri (pypi-uri "atomicwrites" version))
11806 (sha256
11807 (base32
11808 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
11809 (build-system python-build-system)
11810 (synopsis "Atomic file writes in Python")
11811 (description "Library for atomic file writes using platform dependent tools
11812 for atomic file system operations.")
11813 (home-page "https://github.com/untitaker/python-atomicwrites")
11814 (license license:expat)))
11815
11816 (define-public python2-atomicwrites
11817 (package-with-python2 python-atomicwrites))
11818
11819 (define-public python-qstylizer
11820 (package
11821 (name "python-qstylizer")
11822 (version "0.1.10")
11823 (source
11824 (origin
11825 (method git-fetch)
11826 (uri (git-reference
11827 (url "https://github.com/blambright/qstylizer")
11828 (commit version)))
11829 (file-name (git-file-name name version))
11830 (sha256
11831 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
11832 (build-system python-build-system)
11833 (arguments
11834 `(#:test-target "pytest"
11835 #:phases
11836 (modify-phases %standard-phases
11837 (add-before 'build 'set-pbr-version
11838 (lambda _
11839 (setenv "PBR_VERSION" "3.0.1"))))))
11840 (native-inputs
11841 `(("python-pbr" ,python-pbr)
11842 ("python-pytest" ,python-pytest)
11843 ("python-pytest-catchlog" ,python-pytest-catchlog)
11844 ("python-pytest-cov" ,python-pytest-cov)
11845 ("python-pytest-mock" ,python-pytest-mock)
11846 ("python-pytest-runner" ,python-pytest-runner)
11847 ("python-pytest-xdist" ,python-pytest-xdist)))
11848 (propagated-inputs
11849 `(("python-inflection" ,python-inflection)
11850 ("python-tinycss" ,python-tinycss)))
11851 (home-page "https://github.com/blambright/qstylizer")
11852 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
11853 (description "@code{qstylizer} is a Python package designed to help with
11854 the construction of PyQt/PySide stylesheets.")
11855 (license license:expat)))
11856
11857 (define-public python-click-threading
11858 (package
11859 (name "python-click-threading")
11860 (version "0.4.4")
11861 (source (origin
11862 (method url-fetch)
11863 (uri (pypi-uri "click-threading" version))
11864 (sha256
11865 (base32
11866 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11867 (build-system python-build-system)
11868 (propagated-inputs
11869 `(("python-click" ,python-click)))
11870 (synopsis "Utilities for multithreading in Click")
11871 (description "This package provides utilities for multithreading in Click
11872 applications.")
11873 (home-page "https://github.com/click-contrib/click-threading")
11874 (license license:expat)))
11875
11876 (define-public python-click-log
11877 (package
11878 (name "python-click-log")
11879 (version "0.3.2")
11880 (source (origin
11881 (method url-fetch)
11882 (uri (pypi-uri "click-log" version))
11883 (sha256
11884 (base32
11885 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11886 (build-system python-build-system)
11887 (propagated-inputs
11888 `(("python-click" ,python-click)))
11889 (synopsis "Logging for click applications")
11890 (description "This package provides a Python library for logging Click
11891 applications.")
11892 (home-page "https://github.com/click-contrib/click-log")
11893 (license license:expat)))
11894
11895 (define-public python-click-default-group
11896 (package
11897 (name "python-click-default-group")
11898 (version "1.2.2")
11899 (source (origin
11900 (method url-fetch)
11901 (uri (pypi-uri "click-default-group" version))
11902 (sha256
11903 (base32
11904 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11905 (build-system python-build-system)
11906 (arguments
11907 `(#:tests? #f)) ; no target
11908 (propagated-inputs
11909 `(("python-click" ,python-click)))
11910 (synopsis "Extends click.Group")
11911 (description "This package extends click.Group to invoke a command without
11912 explicit subcommand name.")
11913 (home-page "https://github.com/click-contrib/click-default-group")
11914 (license license:bsd-3)))
11915
11916 (define-public python-structlog
11917 (package
11918 (name "python-structlog")
11919 (version "20.2.0")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (pypi-uri "structlog" version))
11924 (sha256
11925 (base32
11926 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11927 (build-system python-build-system)
11928 (arguments
11929 `(#:phases
11930 (modify-phases %standard-phases
11931 (replace 'check
11932 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11933 (when tests?
11934 (add-installed-pythonpath inputs outputs)
11935 (invoke "pytest"))
11936 #t)))))
11937 (native-inputs
11938 `(("python-coverage" ,python-coverage)
11939 ("python-freezegun" ,python-freezegun)
11940 ("python-pretend" ,python-pretend)
11941 ("python-pytest" ,python-pytest)
11942 ("python-pytest-asyncio" ,python-pytest-asyncio)
11943 ("python-simplejson" ,python-simplejson)
11944 ("python-twisted" ,python-twisted)))
11945 (home-page "https://www.structlog.org/")
11946 (synopsis "Structured Logging for Python")
11947 (description "@code{structlog} changes logging in Python by adding structure
11948 to your log entries.")
11949 (license (list license:asl2.0 license:expat))))
11950
11951 (define-public python-apipkg
11952 (package
11953 (name "python-apipkg")
11954 (version "1.5")
11955 (source (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "apipkg" version))
11958 (sha256
11959 (base32
11960 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11961 (build-system python-build-system)
11962 (native-inputs
11963 `(("python-pytest" ,python-pytest)
11964 ("python-setuptools-scm" ,python-setuptools-scm)))
11965 (synopsis "Namespace control and lazy-import mechanism")
11966 (description "With apipkg you can control the exported namespace of a Python
11967 package and greatly reduce the number of imports for your users. It is a small
11968 pure Python module that works on virtually all Python versions.")
11969 (home-page "https://github.com/pytest-dev/apipkg")
11970 (license license:expat)))
11971
11972 (define-public python-execnet
11973 (package
11974 (name "python-execnet")
11975 (version "1.4.1")
11976 (source (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "execnet" version))
11979 (sha256
11980 (base32
11981 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11982 (build-system python-build-system)
11983 (arguments
11984 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11985 ;; The two test failures are caused by the lack of an `ssh` executable.
11986 ;; The test suite can be run with pytest after the 'install' phase.
11987 #:tests? #f))
11988 (native-inputs
11989 `(("python-pytest" ,python-pytest)
11990 ("python-setuptools-scm" ,python-setuptools-scm)))
11991 (propagated-inputs
11992 `(("python-apipkg" ,python-apipkg)))
11993 (synopsis "Rapid multi-Python deployment")
11994 (description "Execnet provides a share-nothing model with
11995 channel-send/receive communication for distributing execution across many
11996 Python interpreters across version, platform and network barriers. It has a
11997 minimal and fast API targeting the following uses:
11998 @enumerate
11999 @item distribute tasks to (many) local or remote CPUs
12000 @item write and deploy hybrid multi-process applications
12001 @item write scripts to administer multiple environments
12002 @end enumerate")
12003 (home-page "https://codespeak.net/execnet/")
12004 (license license:expat)))
12005
12006 (define-public python2-execnet
12007 (package-with-python2 python-execnet))
12008
12009 (define-public python-icalendar
12010 (package
12011 (name "python-icalendar")
12012 (version "4.0.7")
12013 (source (origin
12014 (method url-fetch)
12015 (uri (pypi-uri "icalendar" version))
12016 (sha256
12017 (base32
12018 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
12019 (build-system python-build-system)
12020 (propagated-inputs
12021 `(("python-dateutil" ,python-dateutil)
12022 ("python-pytz" ,python-pytz)))
12023 (synopsis "Python library for parsing iCalendar files")
12024 (description "The icalendar package is a parser/generator of iCalendar
12025 files for use with Python.")
12026 (home-page "https://github.com/collective/icalendar")
12027 (license license:bsd-2)))
12028
12029 (define-public python-args
12030 (package
12031 (name "python-args")
12032 (version "0.1.0")
12033 (source (origin
12034 (method url-fetch)
12035 (uri (pypi-uri "args" version))
12036 (sha256
12037 (base32
12038 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12039 (build-system python-build-system)
12040 (home-page "https://github.com/kennethreitz/args")
12041 (synopsis "Command-line argument parser")
12042 (description
12043 "This library provides a Python module to parse command-line arguments.")
12044 (license license:bsd-3)))
12045
12046 (define-public python2-args
12047 (package-with-python2 python-args))
12048
12049 (define-public python-clint
12050 (package
12051 (name "python-clint")
12052 (version "0.5.1")
12053 (source (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "clint" version))
12056 (sha256
12057 (base32
12058 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12059 (build-system python-build-system)
12060 (arguments
12061 '(#:phases
12062 (modify-phases %standard-phases
12063 (replace 'check
12064 (lambda _ (invoke "py.test" "-v"))))))
12065 (native-inputs
12066 `(("python-pytest" ,python-pytest)))
12067 (propagated-inputs
12068 `(("python-args" ,python-args)))
12069 (home-page "https://github.com/kennethreitz/clint")
12070 (synopsis "Command-line interface tools")
12071 (description
12072 "Clint is a Python module filled with a set of tools for developing
12073 command-line applications, including tools for colored and indented
12074 output, progress bar display, and pipes.")
12075 (license license:isc)))
12076
12077 (define-public python2-clint
12078 (package-with-python2 python-clint))
12079
12080 (define-public python-rply
12081 (package
12082 (name "python-rply")
12083 (version "0.7.8")
12084 (source (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "rply" version))
12087 (sha256
12088 (base32
12089 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12090 (build-system python-build-system)
12091 (propagated-inputs
12092 `(("python-appdirs" ,python-appdirs)))
12093 (home-page "https://github.com/alex/rply")
12094 (synopsis "Parser generator for Python")
12095 (description
12096 "This package provides a pure Python based parser generator, that also
12097 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12098 with a new public API, and RPython support.")
12099 (license license:bsd-3)))
12100
12101 (define-public python2-rply
12102 (package-with-python2 python-rply))
12103
12104 (define-public python-hy
12105 (package
12106 (name "python-hy")
12107 (version "0.18.0")
12108 (source (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "hy" version))
12111 (sha256
12112 (base32
12113 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12114 (build-system python-build-system)
12115 (arguments
12116 '(#:phases
12117 (modify-phases %standard-phases
12118 (add-before 'install 'set-HOME
12119 (lambda _
12120 (setenv "HOME" "/tmp") #t))
12121 (replace 'check
12122 (lambda _
12123 ;; Tests require write access to HOME.
12124 (setenv "HOME" "/tmp")
12125 (invoke "nosetests"))))))
12126 (native-inputs
12127 `(("python-coverage" ,python-coverage)
12128 ("python-nose" ,python-nose)))
12129 (propagated-inputs
12130 `(("python-astor" ,python-astor)
12131 ("python-colorama" ,python-colorama)
12132 ("python-rply" ,python-rply)
12133 ("python-funcparserlib"
12134 ,python-funcparserlib)))
12135 (home-page "http://hylang.org/")
12136 (synopsis "Lisp frontend to Python")
12137 (description
12138 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12139 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12140 Python at your fingertips, in Lisp form.")
12141 (license license:expat)))
12142
12143 (define-public python-hissp
12144 (package
12145 (name "python-hissp")
12146 (version "0.2.0")
12147 (source
12148 (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "hissp" version))
12151 (sha256
12152 (base32
12153 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12154 (build-system python-build-system)
12155 (home-page "https://github.com/gilch/hissp")
12156 (synopsis "It's Python with a Lissp")
12157 (description "Hissp is a modular Lisp implementation that compiles to a
12158 functional subset of Python—Syntactic macro metaprogramming with full access
12159 to the Python ecosystem.")
12160 (license license:asl2.0)))
12161
12162 (define-public python2-functools32
12163 (package
12164 (name "python2-functools32")
12165 (version "3.2.3-2")
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (pypi-uri "functools32" version))
12170 (sha256
12171 (base32
12172 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12173 (build-system python-build-system)
12174 (arguments
12175 `(#:python ,python-2
12176 #:tests? #f)) ; no test target
12177 (home-page "https://github.com/MiCHiLU/python-functools32")
12178 (synopsis
12179 "Backport of the functools module from Python 3.2.3")
12180 (description
12181 "This package is a backport of the @code{functools} module from Python
12182 3.2.3 for use with older versions of Python and PyPy.")
12183 (license license:expat)))
12184
12185 (define-public python2-subprocess32
12186 (package
12187 (name "python2-subprocess32")
12188 (version "3.2.7")
12189 (source (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "subprocess32" version))
12192 (sha256
12193 (base32
12194 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12195 (patches
12196 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12197 (build-system python-build-system)
12198 (arguments
12199 `(#:python ,python-2
12200 ;; The test suite fails with Python > 2.7.13:
12201 ;; import test.support
12202 ;; ImportError: No module named support
12203 #:tests? #f
12204 #:phases
12205 (modify-phases %standard-phases
12206 (add-after 'unpack 'patch-/bin/sh
12207 (lambda _
12208 (substitute* '("subprocess32.py"
12209 "test_subprocess32.py")
12210 (("/bin/sh") (which "sh")))
12211 #t)))))
12212 (home-page "https://github.com/google/python-subprocess32")
12213 (synopsis "Backport of the subprocess module from Python 3.2")
12214 (description
12215 "This is a backport of the @code{subprocess} standard library module
12216 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12217 new features. On POSIX systems it is guaranteed to be reliable when used
12218 in threaded applications. It includes timeout support from Python 3.3 but
12219 otherwise matches 3.2’s API.")
12220 (license license:psfl)))
12221
12222 (define-public python2-futures
12223 (package
12224 (name "python2-futures")
12225 (version "3.2.0")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (pypi-uri "futures" version))
12230 (sha256
12231 (base32
12232 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12233 (build-system python-build-system)
12234 (arguments
12235 `(#:python ,python-2
12236 #:phases
12237 (modify-phases %standard-phases
12238 (replace 'check
12239 (lambda _
12240 (invoke "python" "test_futures.py")
12241 #t)))))
12242 (home-page "https://github.com/agronholm/pythonfutures")
12243 (synopsis
12244 "Backport of the concurrent.futures package from Python 3.2")
12245 (description
12246 "The concurrent.futures module provides a high-level interface for
12247 asynchronously executing callables. This package backports the
12248 concurrent.futures package from Python 3.2")
12249 (license license:bsd-3)))
12250
12251 (define-public python-promise
12252 (package
12253 (name "python-promise")
12254 (version "0.4.2")
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "promise" version))
12259 (sha256
12260 (base32
12261 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12262 (build-system python-build-system)
12263 ;; Tests wants python-futures, which is a python2 only program, and
12264 ;; can't be found by python-promise at test time.
12265 (arguments `(#:tests? #f))
12266 (home-page "https://github.com/syrusakbary/promise")
12267 (synopsis "Promises/A+ implementation for Python")
12268 (description
12269 "Promises/A+ implementation for Python")
12270 (properties `((python2-variant . ,(delay python2-promise))))
12271 (license license:expat)))
12272
12273 (define-public python2-promise
12274 (let ((promise (package-with-python2
12275 (strip-python2-variant python-promise))))
12276 (package/inherit promise
12277 (arguments (substitute-keyword-arguments (package-arguments promise)
12278 ((#:tests? _) #t)))
12279 (native-inputs
12280 `(("python2-futures" ,python2-futures)
12281 ("python2-pytest" ,python2-pytest)
12282 ,@(package-native-inputs promise))))))
12283
12284 (define-public python-progressbar2
12285 (package
12286 (name "python-progressbar2")
12287 (version "3.51.3")
12288 (source
12289 (origin
12290 (method url-fetch)
12291 (uri (pypi-uri "progressbar2" version))
12292 (sha256
12293 (base32
12294 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
12295 (build-system python-build-system)
12296 (propagated-inputs
12297 `(("python-six" ,python-six)
12298 ("python-utils" ,python-utils)))
12299 (native-inputs
12300 `(("python-flake8" ,python-flake8)
12301 ("python-freezegun" ,python-freezegun)
12302 ("python-pycodestyle" ,python-pycodestyle)
12303 ("python-pytest" ,python-pytest)
12304 ("python-pytest-cache" ,python-pytest-cache)
12305 ("python-pytest-cov" ,python-pytest-cov)
12306 ("python-pytest-flakes" ,python-pytest-flakes)
12307 ("python-pytest-pep8" ,python-pytest-pep8)
12308 ("python-sphinx" ,python-sphinx)))
12309 (home-page "https://github.com/WoLpH/python-progressbar")
12310 (synopsis "Text progress bar library for Python")
12311 (description
12312 "This package provides a Python progressbar library to provide
12313 visual (yet text based) progress to long running operations.")
12314 (license license:bsd-3)))
12315
12316 (define-public python-progressbar33
12317 (package
12318 (name "python-progressbar33")
12319 (version "2.4")
12320 (source
12321 (origin
12322 (method url-fetch)
12323 (uri (pypi-uri "progressbar33" version))
12324 (sha256
12325 (base32
12326 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
12327 (build-system python-build-system)
12328 (home-page "https://github.com/germangh/python-progressbar")
12329 (synopsis "Text progress bar library for Python")
12330 (description
12331 "This package provides a text progress bar library for Python. This
12332 version only differs from the original @code{progressbar} package in that it
12333 uses relative package imports instead of absolute imports, which is necessary
12334 for the module to work under Python 3.3.")
12335 ;; Either or both of these licenses may be selected.
12336 (license (list license:lgpl2.1+ license:bsd-3))))
12337
12338 (define-public python-colorama
12339 (package
12340 (name "python-colorama")
12341 (version "0.4.4")
12342 (source
12343 (origin
12344 (method url-fetch)
12345 (uri (pypi-uri "colorama" version))
12346 (sha256
12347 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
12348 (build-system python-build-system)
12349 (synopsis "Colored terminal text rendering for Python")
12350 (description "Colorama is a Python library for rendering colored terminal
12351 text.")
12352 (home-page "https://pypi.org/project/colorama/")
12353 (license license:bsd-3)))
12354
12355 (define-public python2-colorama
12356 (package-with-python2 python-colorama))
12357
12358 (define-public python-moto
12359 (package
12360 (name "python-moto")
12361 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
12362 (version "1.3.16.dev134")
12363 (source (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "moto" version))
12366 (sha256
12367 (base32
12368 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
12369 (build-system python-build-system)
12370 (arguments
12371 `(#:phases (modify-phases %standard-phases
12372 (add-after 'unpack 'patch-hardcoded-executable-names
12373 (lambda _
12374 (substitute* "moto/batch/models.py"
12375 (("/bin/sh")
12376 (which "sh")))
12377 (substitute* (find-files "tests" "\\.py$")
12378 (("#!/bin/bash")
12379 (string-append "#!" (which "bash"))))
12380 #t))
12381 (replace 'check
12382 (lambda _
12383 (setenv "PYTHONPATH" (string-append "./build/lib:"
12384 (getenv "PYTHONPATH")))
12385 (invoke "pytest" "-vv" "-m" "not network"
12386 ;; These tests require Docker.
12387 "-k" "not test_terminate_job \
12388 and not test_invoke_function_from_sqs_exception"))))))
12389 (native-inputs
12390 `(("python-flask" ,python-flask)
12391 ("python-flask-cors" ,python-flask-cors)
12392 ("python-freezegun" ,python-freezegun)
12393 ("python-parameterized" ,python-parameterized)
12394 ("python-pytest" ,python-pytest)
12395 ("python-sure" ,python-sure)))
12396 (propagated-inputs
12397 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
12398 ("python-boto" ,python-boto)
12399 ("python-boto3" ,python-boto3)
12400 ("python-botocore" ,python-botocore)
12401 ("python-cfn-lint" ,python-cfn-lint)
12402 ("python-cryptography" ,python-cryptography)
12403 ("python-dateutil" ,python-dateutil)
12404 ("python-docker" ,python-docker)
12405 ("python-idna" ,python-idna)
12406 ("python-jinja2" ,python-jinja2)
12407 ("python-jose" ,python-jose)
12408 ("python-jsondiff" ,python-jsondiff)
12409 ("python-mock" ,python-mock)
12410 ("python-pytz" ,python-pytz)
12411 ("python-pyyaml" ,python-pyyaml)
12412 ("python-requests" ,python-requests)
12413 ("python-responses" ,python-responses)
12414 ("python-six" ,python-six)
12415 ("python-sshpubkeys" ,python-sshpubkeys)
12416 ("python-werkzeug" ,python-werkzeug)
12417 ("python-xmltodict" ,python-xmltodict)))
12418 (home-page "https://github.com/spulec/moto")
12419 (synopsis "Mock out the boto library")
12420 (description
12421 "@code{moto} is a library designed to easily mock out the
12422 @code{boto} library.")
12423 (license license:asl2.0)))
12424
12425 (define-public python-rsa
12426 (package
12427 (name "python-rsa")
12428 (version "3.4.2")
12429 (source
12430 (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "rsa" version))
12433 (sha256
12434 (base32
12435 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
12436 (build-system python-build-system)
12437 (propagated-inputs
12438 `(("python-pyasn1" ,python-pyasn1)))
12439 (synopsis "Pure-Python RSA implementation")
12440 (description "Python-RSA is a pure-Python RSA implementation. It supports
12441 encryption and decryption, signing and verifying signatures, and key
12442 generation according to PKCS#1 version 1.5. It can be used as a Python
12443 library as well as on the command line.")
12444 (home-page "https://stuvel.eu/rsa")
12445 (license license:asl2.0)))
12446
12447 (define-public python2-rsa
12448 (package-with-python2 python-rsa))
12449
12450 (define-public python-pluggy
12451 (package
12452 (name "python-pluggy")
12453 (version "0.13.1")
12454 (source
12455 (origin
12456 (method url-fetch)
12457 (uri (pypi-uri "pluggy" version))
12458 (sha256
12459 (base32
12460 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
12461 (build-system python-build-system)
12462 (native-inputs
12463 `(("python-setuptools-scm" ,python-setuptools-scm)))
12464 (synopsis "Plugin and hook calling mechanism for Python")
12465 (description "Pluggy is an extraction of the plugin manager as used by
12466 Pytest but stripped of Pytest specific details.")
12467 (home-page "https://pypi.org/project/pluggy/")
12468 (properties `((python2-variant . ,(delay python2-pluggy))))
12469 (license license:expat)))
12470
12471 (define-public python2-pluggy
12472 (let ((base (package-with-python2 (strip-python2-variant
12473 python-pluggy))))
12474 (package/inherit
12475 base
12476 (propagated-inputs
12477 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
12478
12479 ;; This package requires python2-importlib-metadata, but that package
12480 ;; ends up needing python2-pluggy via python2-pytest, so we need this
12481 ;; variant to solve the circular dependency.
12482 (define-public python2-pluggy-bootstrap
12483 (hidden-package
12484 (package/inherit
12485 python2-pluggy
12486 (name "python2-pluggy-bootstrap")
12487 (arguments
12488 `(#:tests? #f
12489 ,@(package-arguments python2-pluggy)))
12490 (propagated-inputs
12491 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
12492
12493 (define-public python-plumbum
12494 (package
12495 (name "python-plumbum")
12496 (version "1.7.0")
12497 (source
12498 (origin
12499 (method url-fetch)
12500 (uri (pypi-uri "plumbum" version))
12501 (sha256
12502 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
12503 (build-system python-build-system)
12504 (arguments
12505 `(#:tests? #f)) ;no tests
12506 (native-inputs
12507 ;; XXX: Not actually used since there are no tests but required for
12508 ;; build.
12509 `(("python-pytest" ,python-pytest)))
12510 (home-page "https://plumbum.readthedocs.io")
12511 (synopsis "Python shell combinators library")
12512 (description
12513 "Plumbum is a library of tools for replacing shell scripts with Python
12514 code.")
12515 (license license:expat)))
12516
12517 (define-public python-deprecation
12518 (package
12519 (name "python-deprecation")
12520 (version "2.1.0")
12521 (source
12522 (origin
12523 (method url-fetch)
12524 (uri (pypi-uri "deprecation" version))
12525 (sha256
12526 (base32
12527 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
12528 (build-system python-build-system)
12529 (propagated-inputs
12530 `(("python-packaging" ,python-packaging)))
12531 (native-inputs
12532 `(("python-unittest2" ,python-unittest2)))
12533 (home-page "https://deprecation.readthedocs.io/")
12534 (synopsis "Python library to handle automated deprecations")
12535 (description
12536 "This is a library that enables automated deprecations. It offers the
12537 @code{deprecated()} decorator to wrap functions, providing proper warnings
12538 both in documentation and via Python’s warnings system, as well as the
12539 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
12540 that deprecated code is eventually removed.")
12541 (license license:asl2.0)))
12542
12543 (define-public python-tox
12544 (package
12545 (name "python-tox")
12546 (version "3.20.0")
12547 (source
12548 (origin
12549 (method url-fetch)
12550 (uri (pypi-uri "tox" version))
12551 (sha256
12552 (base32
12553 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
12554 (build-system python-build-system)
12555 (arguments
12556 ;; FIXME: Tests require pytest-timeout, which itself requires
12557 ;; pytest>=2.8.0 for installation.
12558 '(#:tests? #f))
12559 (propagated-inputs
12560 `(("python-filelock" ,python-filelock)
12561 ("python-packaging" ,python-packaging)
12562 ("python-pluggy" ,python-pluggy)
12563 ("python-py" ,python-py)
12564 ("python-six" ,python-six)
12565 ("python-toml" ,python-toml)
12566 ("python-virtualenv" ,python-virtualenv)))
12567 (native-inputs
12568 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
12569 ("python-pytest" ,python-pytest) ; >= 2.3.5
12570 ("python-setuptools-scm" ,python-setuptools-scm)))
12571 (home-page "https://tox.readthedocs.io")
12572 (synopsis "Virtualenv-based automation of test activities")
12573 (description "Tox is a generic virtualenv management and test command line
12574 tool. It can be used to check that a package installs correctly with
12575 different Python versions and interpreters, or run tests in each type of
12576 supported environment, or act as a frontend to continuous integration
12577 servers.")
12578 (license license:expat)))
12579
12580 (define-public python-jmespath
12581 (package
12582 (name "python-jmespath")
12583 (version "0.9.4")
12584 (source
12585 (origin
12586 (method url-fetch)
12587 (uri (pypi-uri "jmespath" version))
12588 (sha256
12589 (base32
12590 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
12591 (build-system python-build-system)
12592 (native-inputs
12593 `(("python-nose" ,python-nose)))
12594 (synopsis "JSON Matching Expressions")
12595 (description "JMESPath (pronounced “james path”) is a Python library that
12596 allows one to declaratively specify how to extract elements from a JSON
12597 document.")
12598 (home-page "https://github.com/jmespath/jmespath.py")
12599 (license license:expat)))
12600
12601 (define-public python2-jmespath
12602 (package-with-python2 python-jmespath))
12603
12604 (define-public python-symengine
12605 (package
12606 (name "python-symengine")
12607 (version "0.6.1")
12608 (source
12609 (origin
12610 (method url-fetch)
12611 (uri (pypi-uri "symengine" version))
12612 (sha256
12613 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
12614 (build-system python-build-system)
12615 (native-inputs
12616 `(("cmake" ,cmake)
12617 ("python-cython" ,python-cython)))
12618 (inputs
12619 `(("symengine" ,symengine)))
12620 (home-page "https://github.com/symengine/symengine.py")
12621 (synopsis "Python library providing wrappers to SymEngine")
12622 (description
12623 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
12624 manipulation library.")
12625 (license license:expat)))
12626
12627 (define-public python-uncertainties
12628 (package
12629 (name "python-uncertainties")
12630 (version "3.1.5")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "uncertainties" version))
12635 (sha256
12636 (base32
12637 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
12638 (build-system python-build-system)
12639 ;; While there are test files, there is no "tests" directory, so the tests
12640 ;; fail.
12641 (arguments '(#:tests? #false))
12642 (propagated-inputs
12643 `(("python-future" ,python-future)))
12644 (native-inputs
12645 `(("python-nose" ,python-nose)
12646 ("python-numpy" ,python-numpy)))
12647 (home-page "https://uncertainties-python-package.readthedocs.io/")
12648 (synopsis "Calculations with uncertainties")
12649 (description
12650 "The uncertainties package transparently handles calculations with
12651 numbers with uncertainties. It can also yield the derivatives of any
12652 expression.")
12653 (license license:bsd-3)))
12654
12655 (define-public python-asteval
12656 (package
12657 (name "python-asteval")
12658 (version "0.9.23")
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "asteval" version))
12663 (sha256
12664 (base32
12665 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
12666 (build-system python-build-system)
12667 (native-inputs
12668 `(("python-pytest" ,python-pytest)))
12669 (home-page "https://github.com/newville/asteval")
12670 (synopsis "Minimalistic evaluator of Python expressions")
12671 (description
12672 "This package provides a minimalistic evaluator of Python expression
12673 using the @code{ast} module")
12674 (license license:expat)))
12675
12676 (define-public python-lmfit
12677 (package
12678 (name "python-lmfit")
12679 (version "1.0.2")
12680 (source
12681 (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "lmfit" version))
12684 (sha256
12685 (base32
12686 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
12687 (build-system python-build-system)
12688 (propagated-inputs
12689 `(("python-asteval" ,python-asteval)
12690 ("python-numpy" ,python-numpy)
12691 ("python-scipy" ,python-scipy)
12692 ("python-uncertainties" ,python-uncertainties)))
12693 (native-inputs
12694 `(("python-pytest" ,python-pytest)))
12695 (home-page "https://lmfit.github.io/lmfit-py/")
12696 (synopsis "Least-Squares minimization with bounds and constraints")
12697 (description
12698 "Lmfit provides a high-level interface to non-linear optimization and
12699 curve fitting problems for Python. It builds on and extends many of the
12700 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12701 named for) extending the Levenberg-Marquardt method from
12702 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12703 enhancements to optimization and data fitting problems.")
12704 (license license:bsd-3)))
12705
12706 (define-public python-boto
12707 (package
12708 (name "python-boto")
12709 (version "2.49.0")
12710 (source (origin
12711 (method url-fetch)
12712 (uri (pypi-uri "boto" version))
12713 (sha256
12714 (base32
12715 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12716 (build-system python-build-system)
12717 (arguments
12718 ;; XXX: This package is unmaintained and has problems with newer versions
12719 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12720 ;; subset of this library, so keep it around for now, but disable tests.
12721 '(#:tests? #f))
12722 (propagated-inputs
12723 `(("python-paramiko" ,python-paramiko)
12724 ("python-requests" ,python-requests)))
12725 (home-page "https://github.com/boto/boto")
12726 (synopsis "Python interfaces for Amazon Web Services")
12727 (description
12728 "This package provides various facilities for interacting with Amazon
12729 Web Services through Python.
12730
12731 This software is unmaintained, and new projects should use @code{boto3} instead.")
12732 (license license:expat)))
12733
12734 (define-public python-botocore
12735 ;; Note: When updating botocore, also make sure that boto3 and awscli
12736 ;; are compatible.
12737 (package
12738 (name "python-botocore")
12739 (version "1.19.22")
12740 (source
12741 (origin
12742 (method url-fetch)
12743 (uri (pypi-uri "botocore" version))
12744 (sha256
12745 (base32
12746 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12747 (build-system python-build-system)
12748 (arguments
12749 ;; FIXME: Many tests are failing.
12750 '(#:tests? #f))
12751 (propagated-inputs
12752 `(("python-dateutil" ,python-dateutil)
12753 ("python-jmespath" ,python-jmespath)
12754 ("python-urllib3" ,python-urllib3)))
12755 (home-page "https://github.com/boto/botocore")
12756 (synopsis "Low-level interface to AWS")
12757 (description "Botocore is a Python library that provides a low-level
12758 interface to the Amazon Web Services (AWS) API.")
12759 (license license:asl2.0)))
12760
12761 (define-public python2-botocore
12762 (package-with-python2 python-botocore))
12763
12764 (define-public python-boto3
12765 (package
12766 (name "python-boto3")
12767 (version "1.16.22")
12768 (home-page "https://github.com/boto/boto3")
12769 (source (origin
12770 (method git-fetch)
12771 (uri (git-reference (url home-page) (commit version)))
12772 (file-name (git-file-name name version))
12773 (sha256
12774 (base32
12775 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12776 (arguments
12777 `(#:phases
12778 (modify-phases %standard-phases
12779 (add-after 'unpack 'delete-network-tests
12780 ;; Deleting integration tests because they are trying to connect to AWS.
12781 (lambda _
12782 (delete-file-recursively "tests/integration")
12783 #t)))))
12784 (build-system python-build-system)
12785 (native-inputs
12786 `(("python-nose" ,python-nose)
12787 ("python-mock" ,python-mock)))
12788 (propagated-inputs
12789 `(("python-botocore" ,python-botocore)
12790 ("python-jmespath" ,python-jmespath)
12791 ("python-s3transfer" ,python-s3transfer)))
12792 (synopsis "AWS SDK for Python")
12793 (description
12794 "Boto3 is a Python library for writing programs that interact with
12795 @acronym{AWS,Amazon Web Services}.")
12796 (license license:asl2.0)))
12797
12798 (define-public python-pyfiglet
12799 (package
12800 (name "python-pyfiglet")
12801 (version "0.8.post1")
12802 (source
12803 (origin
12804 (method url-fetch)
12805 (uri (pypi-uri "pyfiglet" version))
12806 (sha256
12807 (base32
12808 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12809 (build-system python-build-system)
12810 (home-page "https://github.com/pwaller/pyfiglet")
12811 (synopsis "Draw ASCII art big letters in Python")
12812 (description "This module lets you draw large letter from ordinary characters
12813 in pure Python.")
12814 (license license:expat)))
12815
12816 (define-public python-xdo
12817 (package
12818 (name "python-xdo")
12819 (version "0.3")
12820 (source (origin
12821 (method url-fetch)
12822 (uri (string-append
12823 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12824 "python-xdo_" version ".orig.tar.gz"))
12825 (sha256
12826 (base32
12827 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12828 (build-system python-build-system)
12829 (arguments
12830 '(#:phases
12831 (modify-phases %standard-phases
12832 (add-before 'install 'patch-libxdo-path
12833 ;; Hardcode the path of dynamically loaded libxdo library.
12834 (lambda* (#:key inputs #:allow-other-keys)
12835 (let ((libxdo (string-append
12836 (assoc-ref inputs "xdotool")
12837 "/lib/libxdo.so")))
12838 (substitute* "xdo/_xdo.py"
12839 (("find_library\\(\"xdo\"\\)")
12840 (simple-format #f "\"~a\"" libxdo)))
12841 #t))))
12842 #:tests? #f)) ; no tests provided
12843 (propagated-inputs
12844 `(("python-six" ,python-six)))
12845 (inputs
12846 `(("xdotool" ,xdotool)
12847 ("libX11" ,libx11)))
12848 (home-page "https://tracker.debian.org/pkg/python-xdo")
12849 (synopsis "Python library for simulating X11 keyboard/mouse input")
12850 (description "Provides bindings to libxdo for manipulating X11 via simulated
12851 input. (Note that this is mostly a legacy library; you may wish to look at
12852 python-xdo for newer bindings.)")
12853 (license license:bsd-3)))
12854
12855 (define-public python2-xdo
12856 (package-with-python2 python-xdo))
12857
12858 (define-public python-mako
12859 (package
12860 (name "python-mako")
12861 (version "1.1.3")
12862 (source
12863 (origin
12864 (method url-fetch)
12865 (uri (pypi-uri "Mako" version))
12866 (sha256
12867 (base32
12868 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
12869 (build-system python-build-system)
12870 (arguments
12871 `(#:phases (modify-phases %standard-phases
12872 (replace 'check
12873 (lambda* (#:key tests? #:allow-other-keys)
12874 (if tests?
12875 (invoke "nosetests" "-v")
12876 (format #t "test suite not run~%"))
12877 #t)))))
12878 (propagated-inputs
12879 `(("python-markupsafe" ,python-markupsafe)))
12880 (native-inputs
12881 `(("python-mock" ,python-mock)
12882 ("python-nose" ,python-nose)))
12883 (home-page "https://www.makotemplates.org/")
12884 (synopsis "Templating language for Python")
12885 (description "Mako is a templating language for Python that compiles
12886 templates into Python modules.")
12887 (license license:expat)))
12888
12889 (define-public python2-mako
12890 (package-with-python2 python-mako))
12891
12892 (define-public python-waitress
12893 (package
12894 (name "python-waitress")
12895 (version "1.1.0")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "waitress" version))
12900 (patches (search-patches "python-waitress-fix-tests.patch"))
12901 (sha256
12902 (base32
12903 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12904 (build-system python-build-system)
12905 (home-page "https://github.com/Pylons/waitress")
12906 (synopsis "Waitress WSGI server")
12907 (description "Waitress is meant to be a production-quality pure-Python WSGI
12908 server with very acceptable performance.")
12909 (license license:zpl2.1)))
12910
12911 (define-public python2-waitress
12912 (package-with-python2 python-waitress))
12913
12914 (define-public python-whichcraft
12915 (package
12916 (name "python-whichcraft")
12917 (version "0.6.1")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "whichcraft" version))
12922 (sha256
12923 (base32
12924 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12925 (build-system python-build-system)
12926 (native-inputs
12927 `(("python-pytest" ,python-pytest)))
12928 (home-page "https://github.com/pydanny/whichcraft")
12929 (synopsis "Cross-platform cross-python shutil.which functionality")
12930 (description
12931 "This package provides a shim of the shutil.which function that's
12932 designed to work across multiple versions of Python.")
12933 (license license:bsd-3)))
12934
12935 (define-public python-cookiecutter
12936 (package
12937 (name "python-cookiecutter")
12938 (version "1.7.3")
12939 (source
12940 (origin
12941 (method url-fetch)
12942 (uri (pypi-uri "cookiecutter" version))
12943 (sha256
12944 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
12945 (build-system python-build-system)
12946 (native-inputs
12947 `(("python-freezegun" ,python-freezegun)
12948 ("python-pytest" ,python-pytest)
12949 ("python-pytest-catchlog" ,python-pytest-catchlog)
12950 ("python-pytest-cov" ,python-pytest-cov)
12951 ("python-pytest-mock" ,python-pytest-mock)))
12952 (propagated-inputs
12953 `(("python-binaryornot" ,python-binaryornot)
12954 ("python-click" ,python-click)
12955 ("python-future" ,python-future)
12956 ("python-jinja2" ,python-jinja2)
12957 ("python-jinja2-time" ,python-jinja2-time)
12958 ("python-poyo" ,python-poyo)
12959 ("python-requests" ,python-requests)
12960 ("python-slugify" ,python-slugify)
12961 ("python-text-unidecode" ,python-text-unidecode)
12962 ("python-whichcraft" ,python-whichcraft)))
12963 (home-page "https://github.com/cookiecutter/cookiecutter")
12964 (synopsis
12965 "Command-line utility that creates projects from project templates")
12966 (description
12967 "This package provides a command-line utility that creates projects from
12968 project templates, e.g. creating a Python package project from a Python package
12969 project template.")
12970 (license license:bsd-3)))
12971
12972 (define-public python-pyquery
12973 (package
12974 (name "python-pyquery")
12975 (version "1.2.17")
12976 (source
12977 (origin
12978 (method url-fetch)
12979 (uri (pypi-uri "pyquery" version))
12980 (sha256
12981 (base32
12982 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12983 (build-system python-build-system)
12984 (native-inputs
12985 `(("python-webob" ,python-webob)
12986 ("python-webtest" ,python-webtest)))
12987 (propagated-inputs
12988 `(("python-lxml" ,python-lxml)
12989 ("python-cssselect" ,python-cssselect)))
12990 (home-page "https://github.com/gawel/pyquery")
12991 (synopsis "Make jQuery-like queries on xml documents")
12992 (description "pyquery allows you to make jQuery queries on xml documents.
12993 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12994 fast xml and html manipulation.")
12995 (license license:bsd-3)))
12996
12997 (define-public python-anyjson
12998 (package
12999 (name "python-anyjson")
13000 (version "0.3.3")
13001 (source
13002 (origin
13003 (method url-fetch)
13004 (uri (pypi-uri "anyjson" version))
13005 (sha256
13006 (base32
13007 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
13008 (build-system python-build-system)
13009 (arguments
13010 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
13011 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
13012 ;; whatever) so this transformation needs to be done before the tests
13013 ;; can be run. Maybe we could add a build step to transform beforehand
13014 ;; but it could be annoying/difficult.
13015 ;; We can enable tests for the Python 2 version, though, and do below.
13016 #:tests? #f))
13017 (home-page "https://bitbucket.org/runeh/anyjson/")
13018 (synopsis
13019 "Wraps best available JSON implementation in a common interface")
13020 (description
13021 "Anyjson loads whichever is the fastest JSON module installed
13022 and provides a uniform API regardless of which JSON implementation is used.")
13023 (license license:bsd-3)
13024 (properties `((python2-variant . ,(delay python2-anyjson))))))
13025
13026 (define-public python2-anyjson
13027 (let ((anyjson (package-with-python2
13028 (strip-python2-variant python-anyjson))))
13029 (package/inherit anyjson
13030 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13031 #:tests? #t
13032 ,@(package-arguments anyjson)))
13033 (native-inputs `(("python2-nose" ,python2-nose))))))
13034
13035 (define-public python-amqp
13036 (package
13037 (name "python-amqp")
13038 (version "2.3.2")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 (uri (pypi-uri "amqp" version))
13043 (sha256
13044 (base32
13045 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13046 (build-system python-build-system)
13047 (native-inputs
13048 `(("python-case" ,python-case)
13049 ("python-pytest-sugar" ,python-pytest-sugar)
13050 ("python-mock" ,python-mock)))
13051 (propagated-inputs
13052 `(("python-vine" ,python-vine)))
13053 (home-page "https://github.com/celery/py-amqp")
13054 (synopsis
13055 "Low-level AMQP client for Python (fork of amqplib)")
13056 (description
13057 "This is a fork of amqplib which was originally written by Barry Pederson.
13058 It is maintained by the Celery project, and used by kombu as a pure python
13059 alternative when librabbitmq is not available.")
13060 (license license:lgpl2.1+)
13061 (properties `((python2-variant . ,(delay python2-amqp))))))
13062
13063 (define-public python2-amqp
13064 (let ((amqp (package-with-python2
13065 (strip-python2-variant python-amqp))))
13066 (package/inherit amqp
13067 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13068 ;; unmaintained. Weirdly, does not do this on the python 3
13069 ;; version?
13070 #:tests? #f
13071 ,@(package-arguments amqp))))))
13072
13073 (define-public python-txamqp
13074 (package
13075 (name "python-txamqp")
13076 (version "0.8.2")
13077 (source
13078 (origin
13079 (method url-fetch)
13080 (uri (pypi-uri "txAMQP" version))
13081 (sha256
13082 (base32
13083 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13084 (build-system python-build-system)
13085 (propagated-inputs
13086 `(("python-six" ,python-six)
13087 ("python-twisted" ,python-twisted)))
13088 (home-page "https://github.com/txamqp/txamqp")
13089 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13090 (description
13091 "This package provides a Python library for communicating with AMQP peers
13092 and brokers using the asynchronous networking framework Twisted. It contains
13093 all the necessary code to connect, send and receive messages to/from an
13094 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13095 also includes support for using Thrift RPC over AMQP in Twisted
13096 applications.")
13097 (license license:asl2.0)))
13098
13099 (define-public python2-txamqp
13100 (package-with-python2 python-txamqp))
13101
13102 (define-public python-kombu
13103 (package
13104 (name "python-kombu")
13105 (version "4.2.2")
13106 (source
13107 (origin
13108 (method url-fetch)
13109 (uri (pypi-uri "kombu" version))
13110 (sha256
13111 (base32
13112 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13113 (build-system python-build-system)
13114 (native-inputs
13115 `(("python-mock" ,python-mock)
13116 ("python-case" ,python-case)
13117 ("python-pyro4" ,python-pyro4)
13118 ("python-pytest-sugar" ,python-pytest-sugar)
13119 ("python-pytz" ,python-pytz)))
13120 (propagated-inputs
13121 `(("python-anyjson" ,python-anyjson)
13122 ("python-amqp" ,python-amqp)
13123 ("python-redis" ,python-redis)))
13124 (home-page "https://kombu.readthedocs.io")
13125 (synopsis "Message passing library for Python")
13126 (description "The aim of Kombu is to make messaging in Python as easy as
13127 possible by providing an idiomatic high-level interface for the AMQ protocol,
13128 and also provide proven and tested solutions to common messaging problems.
13129 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13130 message orientation, queuing, routing, reliability and security, for which the
13131 RabbitMQ messaging server is the most popular implementation.")
13132 (license license:bsd-3)
13133 (properties `((python2-variant . ,(delay python2-kombu))))))
13134
13135 (define-public python2-kombu
13136 (let ((kombu (package-with-python2
13137 (strip-python2-variant python-kombu))))
13138 (package/inherit kombu
13139 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13140 ;; It works fine on the python3 variant.
13141 #:tests? #f
13142 ,@(package-arguments kombu)))
13143 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13144 ,@(package-native-inputs kombu))))))
13145
13146 (define-public python-billiard
13147 (package
13148 (name "python-billiard")
13149 (version "3.5.0.5")
13150 (source
13151 (origin
13152 (method url-fetch)
13153 (uri (pypi-uri "billiard" version))
13154 (sha256
13155 (base32
13156 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13157 (build-system python-build-system)
13158 (native-inputs
13159 `(("python-case" ,python-case)
13160 ("python-pytest" ,python-pytest)))
13161 (home-page "https://github.com/celery/billiard")
13162 (synopsis
13163 "Python multiprocessing fork with improvements and bugfixes")
13164 (description
13165 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13166 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13167 pyprocessing package. This standalone variant is intended to be compatible with
13168 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13169 (license license:bsd-3)
13170 (properties `((python2-variant . ,(delay python2-billiard))))))
13171
13172 (define-public python2-billiard
13173 (let ((billiard (package-with-python2
13174 (strip-python2-variant python-billiard))))
13175 (package/inherit billiard
13176 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13177 ("python2-mock" ,python2-mock)
13178 ,@(package-native-inputs billiard))))))
13179
13180 (define-public python-celery
13181 (package
13182 (name "python-celery")
13183 (version "4.2.1")
13184 (source
13185 (origin
13186 (method url-fetch)
13187 (uri (pypi-uri "celery" version))
13188 (sha256
13189 (base32
13190 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13191 (build-system python-build-system)
13192 (arguments
13193 '(;; TODO The tests fail with Python 3.7
13194 ;; https://github.com/celery/celery/issues/4849
13195 #:tests? #f
13196 #:phases
13197 (modify-phases %standard-phases
13198 (add-after 'unpack 'patch-requirements
13199 (lambda _
13200 (substitute* "requirements/test.txt"
13201 (("pytest>=3\\.0,<3\\.3")
13202 "pytest>=3.0"))
13203 #t)))))
13204 (native-inputs
13205 `(("python-case" ,python-case)
13206 ("python-pytest" ,python-pytest)))
13207 (propagated-inputs
13208 `(("python-pytz" ,python-pytz)
13209 ("python-billiard" ,python-billiard)
13210 ("python-kombu" ,python-kombu)))
13211 (home-page "https://celeryproject.org")
13212 (synopsis "Distributed Task Queue")
13213 (description "Celery is an asynchronous task queue/job queue based on
13214 distributed message passing. It is focused on real-time operation, but
13215 supports scheduling as well. The execution units, called tasks, are executed
13216 concurrently on a single or more worker servers using multiprocessing,
13217 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13218 synchronously (wait until ready).")
13219 (license license:bsd-3)
13220 (properties `((python2-variant . ,(delay python2-celery))))))
13221
13222 (define-public python2-celery
13223 (let ((celery (package-with-python2
13224 (strip-python2-variant python-celery))))
13225 (package/inherit celery
13226 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13227 ("python2-mock" ,python2-mock)
13228 ,@(package-native-inputs celery))))))
13229
13230 (define-public python-translitcodec
13231 (package
13232 (name "python-translitcodec")
13233 (version "0.4.0")
13234 (source
13235 (origin
13236 (method url-fetch)
13237 (uri (pypi-uri "translitcodec" version))
13238 (sha256
13239 (base32
13240 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13241 (build-system python-build-system)
13242 (arguments
13243 `(#:tests? #f)) ; no tests provided
13244 (home-page
13245 "https://github.com/claudep/translitcodec")
13246 (synopsis
13247 "Unicode to 8-bit charset transliteration codec")
13248 (description
13249 "This package contains codecs for transliterating ISO 10646 texts into
13250 best-effort representations using smaller coded character sets (ASCII,
13251 ISO 8859, etc.).")
13252 (license license:expat)))
13253
13254 (define-public python2-translitcodec
13255 (package-with-python2 python-translitcodec))
13256
13257 (define-public python-anyqt
13258 (package
13259 (name "python-anyqt")
13260 (version "0.0.11")
13261 (source
13262 (origin
13263 (method url-fetch)
13264 (uri (pypi-uri "AnyQt" version))
13265 (sha256
13266 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13267 (build-system python-build-system)
13268 (arguments
13269 `(#:tests? #f ;there are no tests
13270 #:phases
13271 (modify-phases %standard-phases
13272 (add-after 'unpack 'delete-files
13273 ;; Delete files related to other operating systems.
13274 (lambda _
13275 (delete-file "AnyQt/QtMacExtras.py")
13276 (delete-file "AnyQt/QtWinExtras.py")
13277 #t)))))
13278 (home-page "https://github.com/ales-erjavec/anyqt")
13279 (synopsis "PyQt4/PyQt5 compatibility layer")
13280 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
13281 (license license:gpl3)))
13282
13283 (define-public python-pyqtgraph
13284 (package
13285 (name "python-pyqtgraph")
13286 (version "0.12.1")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 (uri (pypi-uri "pyqtgraph" version))
13291 (sha256
13292 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
13293 (build-system python-build-system)
13294 (arguments
13295 `(#:phases
13296 (modify-phases %standard-phases
13297 (add-before 'check 'set-home-and-qpa
13298 (lambda _
13299 (setenv "HOME" "/tmp")
13300 (setenv "QT_QPA_PLATFORM" "offscreen")
13301 #t))
13302 (replace 'check
13303 (lambda* (#:key inputs outputs #:allow-other-keys)
13304 (add-installed-pythonpath inputs outputs)
13305 (invoke "pytest" "-vv" "-k"
13306 ;; These tests try to download online data.
13307 (string-append "not test_PolyLineROI"
13308 " and not test_getArrayRegion_axisorder"
13309 " and not test_getArrayRegion"
13310 " and not test_PlotCurveItem"
13311 " and not test_NonUniformImage_colormap"
13312 " and not test_NonUniformImage_lut"
13313 " and not test_ImageItem_axisorder"
13314 " and not test_ImageItem")))))))
13315 (native-inputs
13316 `(("python-pytest" ,python-pytest)
13317 ("python-pytest-cov" ,python-pytest-cov)
13318 ("python-pytest-xdist" ,python-pytest-xdist)))
13319 (inputs
13320 `(("qtbase" ,qtbase-5)))
13321 (propagated-inputs
13322 `(("python-h5py" ,python-h5py)
13323 ("python-numpy" ,python-numpy)
13324 ("python-pyopengl" ,python-pyopengl)
13325 ("python-scipy" ,python-scipy)
13326 ("python-pyqt" ,python-pyqt)))
13327 (home-page "http://www.pyqtgraph.org")
13328 (synopsis "Scientific graphics and GUI library for Python")
13329 (description
13330 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
13331 and PySide6. It is intended for use in mathematics, scientific or engineering
13332 applications.")
13333 (license license:expat)))
13334
13335 (define-public python-qasync
13336 (package
13337 (name "python-qasync")
13338 (version "0.15.0")
13339 (source
13340 (origin
13341 ;; There are no tests in the PyPI tarball.
13342 (method git-fetch)
13343 (uri (git-reference
13344 (url "https://github.com/CabbageDevelopment/qasync/")
13345 (commit (string-append "v" version))))
13346 (file-name (git-file-name name version))
13347 (sha256
13348 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
13349 (build-system python-build-system)
13350 (arguments
13351 `(#:test-target "pytest"
13352 #:phases
13353 (modify-phases %standard-phases
13354 (add-before 'check 'set-qpa
13355 (lambda _
13356 (setenv "QT_QPA_PLATFORM" "offscreen")
13357 #t)))))
13358 (native-inputs
13359 `(("python-pytest" ,python-pytest)
13360 ("python-pytest-runner" ,python-pytest-runner)))
13361 (propagated-inputs
13362 `(("python-pyqt" ,python-pyqt)))
13363 (home-page "https://github.com/CabbageDevelopment/qasync")
13364 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
13365 (description
13366 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
13367 by providing an implementation of the PEP 3156 event-loop.")
13368 (license license:bsd-2)))
13369
13370 (define-public python-editor
13371 (package
13372 (name "python-editor")
13373 (version "1.0.4")
13374 (source
13375 (origin
13376 (method url-fetch)
13377 (uri (pypi-uri "python-editor" version))
13378 (sha256
13379 (base32
13380 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
13381 (build-system python-build-system)
13382 (arguments
13383 '(#:tests? #f)) ;XXX: needs a TTY and an editor
13384 (home-page "https://github.com/fmoo/python-editor")
13385 (synopsis "Programmatically open an editor, capture the result")
13386 (description
13387 "python-editor is a library that provides the editor module for
13388 programmatically interfacing with your system's $EDITOR.")
13389 (license license:asl2.0)))
13390
13391 (define-public python2-editor
13392 (package-with-python2 python-editor))
13393
13394 (define-public python-multiprocessing-logging
13395 (package
13396 (name "python-multiprocessing-logging")
13397 (version "0.3.1")
13398 (home-page "https://github.com/jruere/multiprocessing-logging")
13399 (source (origin
13400 (method git-fetch)
13401 (uri (git-reference
13402 (url home-page)
13403 (commit (string-append "v" version))))
13404 (file-name (git-file-name name version))
13405 (sha256
13406 (base32
13407 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
13408 (build-system python-build-system)
13409 (synopsis "Manage logs from multiple processes")
13410 (description
13411 "This Python module implements a multiprocessing-aware @code{Handler}
13412 that, when set on the root @code{Logger}, will tunnel log records to the
13413 main process so that they are handled correctly.")
13414 (license license:lgpl3+)))
13415
13416 (define-public python-vobject
13417 (package
13418 (name "python-vobject")
13419 (version "0.9.6.1")
13420 (source (origin
13421 (method url-fetch)
13422 (uri (pypi-uri "vobject" version))
13423 (sha256
13424 (base32
13425 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
13426 (build-system python-build-system)
13427 (arguments
13428 '(;; The test suite relies on some non-portable Windows interfaces.
13429 #:tests? #f))
13430 (propagated-inputs
13431 `(("python-dateutil" ,python-dateutil)
13432 ("python-pyicu" ,python-pyicu)))
13433 (synopsis "Parse and generate vCard and vCalendar files")
13434 (description "Vobject is intended to be a full featured Python package for
13435 parsing and generating vCard and vCalendar files. Currently, iCalendar files
13436 are supported and well tested. vCard 3.0 files are supported, and all data
13437 should be imported, but only a few components are understood in a sophisticated
13438 way.")
13439 (home-page "https://eventable.github.io/vobject/")
13440 (license license:asl2.0)))
13441
13442 (define-public python2-vobject
13443 (package-with-python2 python-vobject))
13444
13445 (define-public python-munkres
13446 (package
13447 (name "python-munkres")
13448 (version "1.0.8")
13449 (source (origin
13450 (method url-fetch)
13451 (uri (pypi-uri "munkres" version))
13452 (sha256
13453 (base32
13454 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
13455 (build-system python-build-system)
13456 (arguments
13457 '(#:tests? #f)) ; no test suite
13458 (home-page "https://software.clapper.org/munkres/")
13459 (synopsis "Implementation of the Munkres algorithm")
13460 (description "The Munkres module provides an implementation of the Munkres
13461 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
13462 useful for solving the Assignment Problem.")
13463 (license license:bsd-3)))
13464
13465 (define-public python2-munkres
13466 (package-with-python2 python-munkres))
13467
13468 (define-public python-whoosh
13469 (package
13470 (name "python-whoosh")
13471 (version "2.7.4")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "Whoosh" version))
13476 (sha256
13477 (base32
13478 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
13479 (build-system python-build-system)
13480 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
13481 (native-inputs
13482 `(("python-pytest" ,python-pytest)))
13483 (home-page "https://bitbucket.org/mchaput/whoosh")
13484 (synopsis "Full text indexing, search, and spell checking library")
13485 (description
13486 "Whoosh is a fast, pure-Python full text indexing, search, and spell
13487 checking library.")
13488 (license license:bsd-2)))
13489
13490 (define-public python2-whoosh
13491 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
13492 (package/inherit whoosh
13493 (propagated-inputs
13494 `(("python2-backport-ssl-match-hostname"
13495 ,python2-backport-ssl-match-hostname)
13496 ,@(package-propagated-inputs whoosh))))))
13497
13498 (define-public python-pathlib
13499 (package
13500 (name "python-pathlib")
13501 (version "1.0.1")
13502 (source (origin
13503 (method url-fetch)
13504 (uri (pypi-uri "pathlib" version))
13505 (sha256
13506 (base32
13507 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
13508 (build-system python-build-system)
13509 ;; The tests depend on the internal "test" module, which does not provide
13510 ;; a stable interface.
13511 (arguments `(#:tests? #f))
13512 (home-page "https://pathlib.readthedocs.org/")
13513 (synopsis "Object-oriented file system paths")
13514 (description "Pathlib offers a set of classes to handle file system paths.
13515 It offers the following advantages over using string objects:
13516
13517 @enumerate
13518 @item No more cumbersome use of os and os.path functions. Everything can
13519 be done easily through operators, attribute accesses, and method calls.
13520 @item Embodies the semantics of different path types. For example,
13521 comparing Windows paths ignores casing.
13522 @item Well-defined semantics, eliminating any inconsistencies or
13523 ambiguities (forward vs. backward slashes, etc.).
13524 @end enumerate
13525
13526 Note: In Python 3.4, pathlib is now part of the standard library. For other
13527 Python versions please consider python-pathlib2 instead, which tracks the
13528 standard library module. This module (python-pathlib) isn't maintained
13529 anymore.")
13530 (license license:expat)))
13531
13532 (define-public python2-pathlib
13533 (package-with-python2 python-pathlib))
13534
13535 (define-public python2-pathlib2
13536 (package
13537 (name "python2-pathlib2")
13538 (version "2.3.5")
13539 (source (origin
13540 (method url-fetch)
13541 (uri (pypi-uri "pathlib2" version))
13542 (sha256
13543 (base32
13544 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
13545 (build-system python-build-system)
13546 ;; We only need the the Python 2 variant, since for Python 3 our minimum
13547 ;; version is 3.4 which already includes this package as part of the
13548 ;; standard library.
13549 (arguments
13550 `(#:python ,python-2))
13551 (propagated-inputs
13552 `(("python2-scandir" ,python2-scandir)
13553 ("python2-six" ,python2-six)))
13554 (home-page "https://pypi.org/project/pathlib2/")
13555 (synopsis "Object-oriented file system paths - backport of standard
13556 pathlib module")
13557 (description "The goal of pathlib2 is to provide a backport of standard
13558 pathlib module which tracks the standard library module, so all the newest
13559 features of the standard pathlib can be used also on older Python versions.
13560
13561 Pathlib offers a set of classes to handle file system paths. It offers the
13562 following advantages over using string objects:
13563
13564 @enumerate
13565 @item No more cumbersome use of os and os.path functions. Everything can
13566 be done easily through operators, attribute accesses, and method calls.
13567 @item Embodies the semantics of different path types. For example,
13568 comparing Windows paths ignores casing.
13569 @item Well-defined semantics, eliminating any inconsistencies or
13570 ambiguities (forward vs. backward slashes, etc.).
13571 @end enumerate")
13572 (license license:expat)))
13573
13574 (define-public python2-pathlib2-bootstrap
13575 (hidden-package
13576 (package
13577 (inherit python2-pathlib2)
13578 (name "python2-pathlib2-bootstrap")
13579 (propagated-inputs
13580 `(("python2-scandir" ,python2-scandir)
13581 ("python2-six" ,python2-six-bootstrap))))))
13582
13583 (define-public python-jellyfish
13584 (package
13585 (name "python-jellyfish")
13586 (version "0.5.6")
13587 (source (origin
13588 (method url-fetch)
13589 (uri (pypi-uri "jellyfish" version))
13590 (sha256
13591 (base32
13592 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
13593 (build-system python-build-system)
13594 (native-inputs
13595 `(("python-pytest" ,python-pytest)))
13596 (home-page "https://github.com/jamesturk/jellyfish")
13597 (synopsis "Approximate and phonetic matching of strings")
13598 (description "Jellyfish uses a variety of string comparison and phonetic
13599 encoding algorithms to do fuzzy string matching.")
13600 (license license:bsd-2)
13601 (properties `((python2-variant . ,(delay python2-jellyfish))))))
13602
13603 (define-public python2-jellyfish
13604 (let ((jellyfish (package-with-python2
13605 (strip-python2-variant python-jellyfish))))
13606 (package/inherit jellyfish
13607 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
13608 ,@(package-native-inputs jellyfish))))))
13609
13610 (define-public python2-unicodecsv
13611 (package
13612 (name "python2-unicodecsv")
13613 (version "0.14.1")
13614 (source (origin
13615 (method git-fetch)
13616 ;; The test suite is not included in the PyPi release.
13617 ;; https://github.com/jdunck/python-unicodecsv/issues/19
13618 (uri (git-reference
13619 (url "https://github.com/jdunck/python-unicodecsv")
13620 (commit version)))
13621 (file-name (git-file-name name version))
13622 (sha256
13623 (base32
13624 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
13625 (build-system python-build-system)
13626 (arguments
13627 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
13628 #:python ,python-2))
13629 (native-inputs
13630 `(("python2-unittest2" ,python2-unittest2)))
13631 (home-page "https://github.com/jdunck/python-unicodecsv")
13632 (synopsis "Unicode CSV module for Python 2")
13633 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
13634 module, adding support for Unicode strings.")
13635 (license license:bsd-2)))
13636
13637 (define-public python-pdfminer-six
13638 (package
13639 (name "python-pdfminer-six")
13640 (version "20201018")
13641 ;; There are no tests in the PyPI tarball.
13642 (source
13643 (origin
13644 (method git-fetch)
13645 (uri (git-reference
13646 (url "https://github.com/pdfminer/pdfminer.six")
13647 (commit version)))
13648 (file-name (git-file-name name version))
13649 (sha256
13650 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
13651 (build-system python-build-system)
13652 (arguments
13653 `(#:phases
13654 (modify-phases %standard-phases
13655 ;; Tests write to the source tree.
13656 (add-after 'unpack 'make-git-checkout-writable
13657 (lambda _
13658 (for-each make-file-writable (find-files "."))
13659 #t))
13660 (replace 'check
13661 (lambda _
13662 (invoke "make" "test")))
13663 (add-before 'reset-gzip-timestamps 'make-files-writable
13664 (lambda* (#:key outputs #:allow-other-keys)
13665 (let ((out (assoc-ref outputs "out")))
13666 (for-each make-file-writable
13667 (find-files out "\\.gz$"))
13668 #t))))))
13669 (propagated-inputs
13670 `(("python-chardet" ,python-chardet)
13671 ("python-cryptography" ,python-cryptography)
13672 ("python-sortedcontainers" ,python-sortedcontainers)))
13673 (native-inputs
13674 `(("python-nose" ,python-nose)
13675 ("python-tox" ,python-tox)))
13676 (home-page "https://github.com/pdfminer/pdfminer.six")
13677 (synopsis "PDF parser and analyzer")
13678 (description "@code{pdfminer.six} is a community maintained fork of
13679 the original PDFMiner. It is a tool for extracting information from PDF
13680 documents. It focuses on getting and analyzing text data. Pdfminer.six
13681 extracts the text from a page directly from the sourcecode of the PDF. It
13682 can also be used to get the exact location, font or color of the text.")
13683 (license license:expat)))
13684
13685 (define-public python-rarfile
13686 (package
13687 (name "python-rarfile")
13688 (version "2.8")
13689 (source (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "rarfile" version))
13692 (sha256
13693 (base32
13694 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
13695 (build-system python-build-system)
13696 (arguments
13697 '(#:phases
13698 (modify-phases %standard-phases
13699 (replace 'check
13700 ;; Many tests fail, but the installation proceeds.
13701 (lambda _ (invoke "make" "-C" "test" "test"))))))
13702 (native-inputs
13703 `(("which" ,which))) ; required for tests
13704 (propagated-inputs
13705 `(("libarchive" ,libarchive)))
13706 (home-page "https://github.com/markokr/rarfile")
13707 (synopsis "RAR archive reader for Python")
13708 (description "This is Python module for RAR archive reading. The interface
13709 is made as zipfile like as possible.")
13710 (license license:isc)))
13711
13712 (define-public python2-rarfile
13713 (package-with-python2 python-rarfile))
13714
13715 (define-public python-rich
13716 (package
13717 (name "python-rich")
13718 (version "10.2.2")
13719 (source (origin
13720 (method url-fetch)
13721 (uri (pypi-uri "rich" version))
13722 (sha256
13723 (base32
13724 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
13725 (build-system python-build-system)
13726 (arguments
13727 `(#:phases
13728 (modify-phases %standard-phases
13729 (replace 'check
13730 (lambda* (#:key inputs tests? #:allow-other-keys)
13731 (when tests?
13732 (copy-recursively (string-append
13733 (assoc-ref inputs "tests") "/tests")
13734 "tests")
13735 (invoke "python" "-m" "pytest" "-vv")))))))
13736 (propagated-inputs
13737 `(("python-attrs" ,python-attrs)
13738 ("python-colorama" ,python-colorama)
13739 ("python-commonmark" ,python-commonmark)
13740 ("python-ipywidgets" ,python-ipywidgets)
13741 ("python-pygments" ,python-pygments)
13742 ("python-typing-extensions" ,python-typing-extensions)))
13743 (native-inputs
13744 `(("python-pytest" ,python-pytest)
13745 ("tests"
13746 ;; The release on pypi comes without tests. We can't build from this
13747 ;; checkout, though, because installation requires an invocation of
13748 ;; poetry.
13749 ,(origin
13750 (method git-fetch)
13751 (uri (git-reference
13752 (url "https://github.com/willmcgugan/rich")
13753 (commit (string-append "v" version))))
13754 (file-name (git-file-name name version))
13755 (sha256
13756 (base32
13757 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
13758 (home-page "https://github.com/willmcgugan/rich")
13759 (synopsis "Render rich text and more to the terminal")
13760 (description
13761 "This is a Python package for rendering rich text, tables, progress bars,
13762 syntax highlighting, markdown and more to the terminal.")
13763 (license license:expat)))
13764
13765 (define-public python-magic
13766 (package
13767 (name "python-magic")
13768 (version "0.4.15")
13769 (source
13770 (origin
13771 (method url-fetch)
13772 (uri (pypi-uri "python-magic" version))
13773 (sha256
13774 (base32
13775 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
13776 (file-name (string-append name "-" version "-checkout"))))
13777 (build-system python-build-system)
13778 (arguments
13779 ;; The tests are unreliable, so don't run them. The tests fail
13780 ;; under Python3 because they were written for Python2 and
13781 ;; contain import statements that do not work in Python3. One of
13782 ;; the tests fails under Python2 because its assertions are
13783 ;; overly stringent; it relies on comparing output strings which
13784 ;; are brittle and can change depending on the version of
13785 ;; libmagic being used and the system on which the test is
13786 ;; running. In my case, under GuixSD 0.10.0, only one test
13787 ;; failed, and it seems to have failed only because the version
13788 ;; of libmagic that is packaged in Guix outputs a slightly
13789 ;; different (but not wrong) string than the one that the test
13790 ;; expected.
13791 '(#:tests? #f
13792 #:phases (modify-phases %standard-phases
13793 ;; Replace a specific method call with a hard-coded
13794 ;; path to the necessary libmagic.so file in the
13795 ;; store. If we don't do this, then the method call
13796 ;; will fail to find the libmagic.so file, which in
13797 ;; turn will cause any application using
13798 ;; python-magic to fail.
13799 (add-before 'build 'hard-code-path-to-libmagic
13800 (lambda* (#:key inputs #:allow-other-keys)
13801 (let ((file (assoc-ref inputs "file")))
13802 (substitute* "magic.py"
13803 (("ctypes.util.find_library\\('magic'\\)")
13804 (string-append "'" file "/lib/libmagic.so'")))
13805 #t)))
13806 (add-before 'install 'disable-egg-compression
13807 (lambda _
13808 (let ((port (open-file "setup.cfg" "a")))
13809 (display "\n[easy_install]\nzip_ok = 0\n"
13810 port)
13811 (close-port port)
13812 #t))))))
13813 (inputs
13814 ;; python-magic needs to be able to find libmagic.so.
13815 `(("file" ,file)))
13816 (home-page
13817 "https://github.com/ahupp/python-magic")
13818 (synopsis
13819 "File type identification using libmagic")
13820 (description
13821 "This module uses ctypes to access the libmagic file type
13822 identification library. It makes use of the local magic database and
13823 supports both textual and MIME-type output. Note that this module and
13824 the python-file module both provide a \"magic.py\" file; these two
13825 modules, which are different and were developed separately, both serve
13826 the same purpose: to provide Python bindings for libmagic.")
13827 (license license:expat)))
13828
13829 (define-public python2-magic
13830 (package-with-python2 python-magic))
13831
13832 (define-public python2-s3cmd
13833 (package
13834 (name "python2-s3cmd")
13835 (version "1.6.1")
13836 (source
13837 (origin
13838 (method url-fetch)
13839 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
13840 "s3cmd-" version ".tar.gz"))
13841 (sha256
13842 (base32
13843 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
13844 (build-system python-build-system)
13845 (arguments
13846 ;; s3cmd is written for python2 only and contains no tests.
13847 `(#:python ,python-2
13848 #:tests? #f))
13849 (propagated-inputs
13850 `(("python2-dateutil" ,python2-dateutil)
13851 ;; The python-file package also provides a magic.py module.
13852 ;; This is an unfortunate state of affairs; however, s3cmd
13853 ;; fails to install if it cannot find specifically the
13854 ;; python-magic package. Thus we include it, instead of using
13855 ;; python-file. Ironically, s3cmd sometimes works better
13856 ;; without libmagic bindings at all:
13857 ;; https://github.com/s3tools/s3cmd/issues/198
13858 ("python2-magic" ,python2-magic)))
13859 (home-page "https://s3tools.org/s3cmd")
13860 (synopsis "Command line tool for S3-compatible storage services")
13861 (description
13862 "S3cmd is a command line tool for uploading, retrieving and managing data
13863 in storage services that are compatible with the Amazon Simple Storage
13864 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13865 GnuPG encryption, and more. It also supports management of Amazon's
13866 CloudFront content delivery network.")
13867 (license license:gpl2+)))
13868
13869 (define-public python-pkgconfig
13870 (package
13871 (name "python-pkgconfig")
13872 (version "1.3.1")
13873 (source
13874 (origin
13875 (method url-fetch)
13876 (uri (pypi-uri "pkgconfig" version))
13877 (sha256
13878 (base32
13879 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
13880 (build-system python-build-system)
13881 (native-inputs
13882 `(("python-nose" ,python-nose)))
13883 (inputs
13884 `(("pkg-config" ,pkg-config)))
13885 (arguments
13886 `(#:phases
13887 (modify-phases %standard-phases
13888 (add-before 'build 'patch
13889 ;; Hard-code the path to pkg-config.
13890 (lambda _
13891 (substitute* "pkgconfig/pkgconfig.py"
13892 (("cmd = 'pkg-config")
13893 (string-append "cmd = '" (which "pkg-config"))))
13894 #t))
13895 (replace 'check
13896 (lambda _
13897 (invoke "nosetests" "test.py"))))))
13898 (home-page "https://github.com/matze/pkgconfig")
13899 (synopsis "Python interface for pkg-config")
13900 (description "This module provides a Python interface to pkg-config. It
13901 can be used to find all pkg-config packages, check if a package exists,
13902 check if a package meets certain version requirements, query CFLAGS and
13903 LDFLAGS and parse the output to build extensions with setup.py.")
13904 (license license:expat)))
13905
13906 (define-public python2-pkgconfig
13907 (package-with-python2 python-pkgconfig))
13908
13909 (define-public python-bz2file
13910 (package
13911 (name "python-bz2file")
13912 (version "0.98")
13913 (source
13914 (origin
13915 (method url-fetch)
13916 (uri (pypi-uri "bz2file" version))
13917 (sha256
13918 (base32
13919 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
13920 (build-system python-build-system)
13921 (arguments
13922 `(#:tests? #f)) ; Tests use deprecated python modules.
13923 (home-page "https://github.com/nvawda/bz2file")
13924 (synopsis "Read and write bzip2-compressed files")
13925 (description
13926 "Bz2file is a Python library for reading and writing bzip2-compressed
13927 files. It contains a drop-in replacement for the I/O interface in the
13928 standard library's @code{bz2} module, including features from the latest
13929 development version of CPython that are not available in older releases.")
13930 (license license:asl2.0)))
13931
13932 (define-public python2-bz2file
13933 (package-with-python2 python-bz2file))
13934
13935 (define-public python-future
13936 (package
13937 (name "python-future")
13938 (version "0.17.1")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (pypi-uri "future" version))
13943 (sha256
13944 (base32
13945 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
13946 (build-system python-build-system)
13947 ;; Many tests connect to the network or are otherwise flawed.
13948 ;; https://github.com/PythonCharmers/python-future/issues/210
13949 (arguments
13950 `(#:tests? #f))
13951 (home-page "https://python-future.org")
13952 (synopsis "Single-source support for Python 3 and 2")
13953 (description
13954 "@code{python-future} is the missing compatibility layer between Python 2 and
13955 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
13956 to support both Python 2 and Python 3 with minimal overhead.")
13957 (license license:expat)))
13958
13959 (define-public python2-future
13960 (package-with-python2 python-future))
13961
13962 (define-public python-cysignals
13963 (package
13964 (name "python-cysignals")
13965 (version "1.9.0")
13966 (source
13967 (origin
13968 (method url-fetch)
13969 (uri (pypi-uri "cysignals" version))
13970 (sha256
13971 (base32
13972 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
13973 (build-system python-build-system)
13974 (native-inputs
13975 `(("python-cython" ,python-cython)
13976 ("python-sphinx" ,python-sphinx)))
13977 (inputs
13978 `(("pari-gp" ,pari-gp)))
13979 (arguments
13980 `(#:modules ((guix build python-build-system)
13981 ((guix build gnu-build-system) #:prefix gnu:)
13982 (guix build utils))
13983 ;; FIXME: Tests are executed after installation and currently fail
13984 ;; when not installing into standard locations; the author is working
13985 ;; on a fix.
13986 #:tests? #f
13987 #:phases
13988 (modify-phases %standard-phases
13989 (add-before
13990 'build 'configure
13991 (assoc-ref gnu:%standard-phases 'configure)))))
13992 (home-page
13993 "https://github.com/sagemath/cysignals")
13994 (synopsis
13995 "Handling of interrupts and signals for Cython")
13996 (description
13997 "The cysignals package provides mechanisms to handle interrupts (and
13998 other signals and errors) in Cython code, using two related approaches,
13999 for mixed Cython/Python code or external C libraries and pure Cython code,
14000 respectively.")
14001 (license license:lgpl3+)))
14002
14003 (define-public python2-cysignals
14004 (package-with-python2 python-cysignals))
14005
14006 (define-public python2-shedskin
14007 (package
14008 (name "python2-shedskin")
14009 (version "0.9.4")
14010 (source
14011 (origin
14012 (method url-fetch)
14013 (uri (string-append "https://github.com/shedskin/shedskin/"
14014 "releases/download/v" version
14015 "/shedskin-" version ".tgz"))
14016 (sha256
14017 (base32
14018 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
14019 (build-system python-build-system)
14020 (arguments
14021 `(#:python ,python-2
14022 #:phases (modify-phases %standard-phases
14023 (add-after 'unpack 'fix-resulting-include-libs
14024 (lambda* (#:key inputs #:allow-other-keys)
14025 (let ((libgc (assoc-ref inputs "libgc"))
14026 (pcre (assoc-ref inputs "pcre")))
14027 (substitute* "shedskin/makefile.py"
14028 (("variable == 'CCFLAGS':[ ]*")
14029 (string-append "variable == 'CCFLAGS':\n"
14030 " line += ' -I " pcre "/include"
14031 " -I " libgc "/include'"))
14032 (("variable == 'LFLAGS':[ ]*")
14033 (string-append "variable == 'LFLAGS':\n"
14034 " line += ' -L" pcre "/lib"
14035 " -L " libgc "/lib'")))
14036 #t))))))
14037 (inputs `(("pcre" ,pcre)
14038 ("libgc" ,libgc)))
14039 (home-page "https://shedskin.github.io/")
14040 (synopsis "Experimental Python-2 to C++ Compiler")
14041 (description (string-append "This is an experimental compiler for a subset of
14042 Python. It generates C++ code and a Makefile."))
14043 (license (list license:gpl3 license:bsd-3 license:expat))))
14044
14045 (define-public python2-rope
14046 (package
14047 (name "python2-rope")
14048 (version "0.11.0")
14049 (source
14050 (origin
14051 (method url-fetch)
14052 (uri (pypi-uri "rope" version))
14053 (sha256
14054 (base32
14055 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
14056 (arguments
14057 ;; Rope has only partial python3 support, see `python-rope'
14058 `(#:python ,python-2))
14059 (build-system python-build-system)
14060 (native-inputs
14061 `(("python2-unittest2" ,python2-unittest2)))
14062 (home-page "https://github.com/python-rope/rope")
14063 (synopsis "Refactoring library for Python")
14064 (description "Rope is a refactoring library for Python. It facilitates
14065 the renaming, moving and extracting of attributes, functions, modules, fields
14066 and parameters in Python 2 source code. These refactorings can also be applied
14067 to occurrences in strings and comments.")
14068 (license license:gpl2)))
14069
14070 (define-public python-rope
14071 (package/inherit python2-rope
14072 (name "python-rope")
14073 (arguments `(#:python ,python-wrapper
14074 ;; XXX: Only partial python3 support, results in some failing
14075 ;; tests: <https://github.com/python-rope/rope/issues/247>.
14076 #:tests? #f))
14077 (properties `((python2-variant . ,(delay python2-rope))))))
14078
14079 (define-public python-py3status
14080 (package
14081 (name "python-py3status")
14082 (version "3.21")
14083 (source
14084 (origin
14085 (method url-fetch)
14086 (uri (pypi-uri "py3status" version))
14087 (sha256
14088 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14089 (build-system python-build-system)
14090 (inputs
14091 `(("file" ,file)))
14092 (arguments
14093 '(#:phases
14094 (modify-phases %standard-phases
14095 ;; 'file' is used for detection of configuration file encoding
14096 ;; let's make link the dependency to particular input
14097 (add-before 'build 'patch-file-path
14098 (lambda* (#:key inputs #:allow-other-keys)
14099 (let ((file-path (assoc-ref inputs "file")))
14100 (substitute* "py3status/parse_config.py"
14101 (("\\[\"file\", \"-b\"")
14102 (string-append "['" file-path "/bin/file', '-b'")))
14103 #t))))
14104 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14105 (home-page "https://github.com/ultrabug/py3status")
14106 (synopsis "Extensible i3status wrapper written in Python")
14107 (description "py3status is an i3status wrapper which extends i3status
14108 functionality in a modular way, allowing you to extend your panel with your
14109 own code, responding to click events and updating clock every second.")
14110 (license license:bsd-3)))
14111
14112 (define-public python2-selectors2
14113 (package
14114 (name "python2-selectors2")
14115 (version "2.0.1")
14116 (source (origin
14117 (method url-fetch)
14118 (uri (pypi-uri "selectors2" version))
14119 (sha256
14120 (base32
14121 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
14122 (build-system python-build-system)
14123 (arguments
14124 `(#:python ,python-2))
14125 (native-inputs
14126 `(("python2-mock" ,python2-mock)
14127 ("python2-psutil" ,python2-psutil)))
14128 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
14129 (synopsis "Backport of the selectors module from Python 3.5+")
14130 (description
14131 "This package provides a drop-in replacement for the @code{selectors}
14132 module in Python 3.5 and later.")
14133 (license license:expat)))
14134
14135 (define-public python-tblib
14136 (package
14137 (name "python-tblib")
14138 (version "1.6.0")
14139 (source (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "tblib" version))
14142 (sha256
14143 (base32
14144 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14145 (build-system python-build-system)
14146 (arguments
14147 `(#:phases
14148 (modify-phases %standard-phases
14149 (replace 'check
14150 (lambda _
14151 ;; Upstream runs tests after installation and the package itself
14152 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
14153 ;; found.
14154 (setenv "PYTHONPATH"
14155 (string-append (getcwd) "/build/lib:"
14156 (getenv "PYTHONPATH")))
14157 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14158 (native-inputs
14159 `(("python-pytest" ,python-pytest)
14160 ("python-six" ,python-six)))
14161 (home-page "https://github.com/ionelmc/python-tblib")
14162 (synopsis "Traceback serialization library")
14163 (description
14164 "Traceback serialization allows you to:
14165
14166 @enumerate
14167 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14168 different processes. This allows better error handling when running code over
14169 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14170
14171 @item Parse traceback strings and raise with the parsed tracebacks.
14172 @end enumerate\n")
14173 (license license:bsd-3)))
14174
14175 (define-public python2-tblib
14176 (package-with-python2 python-tblib))
14177
14178 (define-public python-greenlet
14179 (package
14180 (name "python-greenlet")
14181 (version "1.0.0")
14182 (source (origin
14183 (method url-fetch)
14184 (uri (pypi-uri "greenlet" version))
14185 (sha256
14186 (base32
14187 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
14188 (build-system python-build-system)
14189 (home-page "https://greenlet.readthedocs.io/")
14190 (synopsis "Lightweight in-process concurrent programming")
14191 (description
14192 "Greenlet package is a spin-off of Stackless, a version of CPython
14193 that supports micro-threads called \"tasklets\". Tasklets run
14194 pseudo-concurrently (typically in a single or a few OS-level threads) and
14195 are synchronized with data exchanges on \"channels\".")
14196 (license (list license:psfl license:expat))))
14197
14198 (define-public python-objgraph
14199 (package
14200 (name "python-objgraph")
14201 (version "3.4.1")
14202 (source
14203 (origin
14204 (method url-fetch)
14205 (uri (pypi-uri "objgraph" version))
14206 (sha256
14207 (base32
14208 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14209 (build-system python-build-system)
14210 (propagated-inputs
14211 `(("python-graphviz" ,python-graphviz)))
14212 (native-inputs
14213 `(("python-mock" ,python-mock)
14214 ("graphviz" ,graphviz)))
14215 (home-page "https://mg.pov.lt/objgraph/")
14216 (synopsis "Draw Python object reference graphs with graphviz")
14217 (description
14218 "This package provides tools to draw Python object reference graphs with
14219 graphviz.")
14220 (license license:expat)))
14221
14222 (define-public python2-objgraph
14223 (package-with-python2 python-objgraph))
14224
14225 (define-public python-gevent
14226 (package
14227 (name "python-gevent")
14228 (version "21.1.2")
14229 (source (origin
14230 (method url-fetch)
14231 (uri (pypi-uri "gevent" version))
14232 (sha256
14233 (base32
14234 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14235 (modules '((guix build utils)))
14236 (snippet
14237 '(begin
14238 ;; unbunding libev and c-ares
14239 (delete-file-recursively "deps")))))
14240 (build-system python-build-system)
14241 (arguments
14242 `(#:modules ((ice-9 ftw)
14243 (ice-9 match)
14244 (srfi srfi-26)
14245 (guix build utils)
14246 (guix build python-build-system))
14247 #:phases (modify-phases %standard-phases
14248 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14249 (lambda _
14250 (substitute* "src/gevent/subprocess.py"
14251 (("/bin/sh") (which "sh")))
14252 (for-each (lambda (file)
14253 (substitute* file
14254 (("/bin/sh") (which "sh"))
14255 (("/bin/true") (which "true"))))
14256 (find-files "src/greentest" "\\.py$"))))
14257 (add-before 'build 'do-not-use-bundled-sources
14258 (lambda _
14259 (setenv "GEVENTSETUP_EMBED" "0")
14260
14261 ;; Prevent building bundled libev.
14262 (substitute* "setup.py"
14263 (("run_make=_BUILDING")
14264 "run_make=False"))))
14265 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14266 (lambda* (#:key inputs #:allow-other-keys)
14267 (let ((greenlet (string-append
14268 (assoc-ref inputs "python-greenlet")
14269 "/include")))
14270 (match (scandir greenlet
14271 (lambda (item)
14272 (string-prefix? "python" item)))
14273 ((python)
14274 (setenv "C_INCLUDE_PATH"
14275 (string-append greenlet "/" python ":"
14276 (or (getenv "C_INCLUDE_PATH")
14277 ""))))))))
14278 (add-before 'check 'pretend-to-be-CI
14279 (lambda _
14280 ;; A few tests are skipped due to network constraints or
14281 ;; get longer timeouts when running in a CI environment.
14282 ;; Piggy-back on that, as we need the same adjustments.
14283 (setenv "TRAVIS" "1")
14284 (setenv "APPVEYOR" "1")))
14285 (add-before 'check 'adjust-tests
14286 (lambda _
14287 (let ((disabled-tests
14288 '(;; These tests relies on networking which is
14289 ;; not available in the build container.
14290 "test__getaddrinfo_import.py"
14291 "test__server_pywsgi.py"
14292 ;; XXX: These tests borrow functionality from the
14293 ;; Python builtin 'test' module, but it is not
14294 ;; installed with the Guix Python distribution.
14295 "test_smtpd.py"
14296 "test_wsgiref.py"
14297 "test_urllib2.py"
14298 "test_thread.py"
14299 "test_threading.py"
14300 "test__threading_2.py"
14301 ;; These tests rely on KeyboardInterrupts which do not
14302 ;; work inside the build container for some reason
14303 ;; (lack of controlling terminal?).
14304 "test_subprocess.py"
14305 "test__issues461_471.py"
14306 ;; TODO: Patch out the tests that use getprotobyname, etc
14307 ;; instead of disabling all the tests from these files.
14308 "test__resolver_dnspython.py"
14309 "test__doctests.py"
14310 "test__all__.py"
14311 "test___config.py"
14312 "test__execmodules.py")))
14313 (call-with-output-file "skipped_tests.txt"
14314 (lambda (port)
14315 (format port "~a~%"
14316 (string-join disabled-tests "\n")))))))
14317 (replace 'check
14318 (lambda _
14319 ;; Make sure the build directory is on PYTHONPATH.
14320 (setenv "PYTHONPATH"
14321 (string-append
14322 (getenv "PYTHONPATH") ":"
14323 (getcwd) "/build/"
14324 (car (scandir "build" (cut string-prefix? "lib." <>)))))
14325
14326 ;; Use the build daemons configured number of workers.
14327 (setenv "NWORKERS" (number->string (parallel-job-count)))
14328
14329 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
14330 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
14331 (propagated-inputs
14332 `(("python-greenlet" ,python-greenlet)
14333 ("python-objgraph" ,python-objgraph)
14334 ("python-zope.event" ,python-zope-event)
14335 ("python-zope.interface" ,python-zope-interface)))
14336 (native-inputs
14337 `(("python-six" ,python-six)
14338
14339 ;; For tests.
14340 ("python-dnspython" ,python-dnspython)
14341 ("python-psutil" ,python-psutil)))
14342 (inputs
14343 `(("c-ares" ,c-ares)
14344 ("libev" ,libev)))
14345 (home-page "https://www.gevent.org/")
14346 (synopsis "Coroutine-based network library")
14347 (description
14348 "@code{gevent} is a coroutine-based Python networking library that uses
14349 @code{greenlet} to provide a high-level synchronous API on top of the
14350 @code{libev} event loop.")
14351 (license license:expat)))
14352
14353 (define-public python-fastimport
14354 (package
14355 (name "python-fastimport")
14356 (version "0.9.9")
14357 (source
14358 (origin
14359 (method url-fetch)
14360 (uri (pypi-uri "fastimport" version))
14361 (sha256
14362 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
14363 (build-system python-build-system)
14364 (home-page "https://github.com/jelmer/python-fastimport")
14365 (synopsis "VCS fastimport parser and generator in Python")
14366 (description "This package provides a parser for and generator of the Git
14367 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
14368 format.")
14369 (license license:gpl2+)))
14370
14371 (define-public python-twisted
14372 (package
14373 (name "python-twisted")
14374 (version "19.7.0")
14375 (source (origin
14376 (method url-fetch)
14377 (uri (pypi-uri "Twisted" version ".tar.bz2"))
14378 (sha256
14379 (base32
14380 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
14381 (build-system python-build-system)
14382 (arguments
14383 '(#:tests? #f)) ; FIXME: some tests fail
14384 (propagated-inputs
14385 `(("python-zope-interface" ,python-zope-interface)
14386 ("python-pyhamcrest" ,python-pyhamcrest)
14387 ("python-incremental" ,python-incremental)
14388 ("python-hyperlink" ,python-hyperlink)
14389 ("python-constantly" ,python-constantly)
14390 ("python-automat" ,python-automat)))
14391 (home-page "https://twistedmatrix.com/")
14392 (synopsis "Asynchronous networking framework written in Python")
14393 (description
14394 "Twisted is an extensible framework for Python programming, with special
14395 focus on event-based network programming and multiprotocol integration.")
14396 (license license:expat)))
14397
14398 (define-public python2-twisted
14399 (package-with-python2 python-twisted))
14400
14401 (define-public python-pika
14402 (package
14403 (name "python-pika")
14404 (version "1.2.0")
14405 (source
14406 (origin
14407 (method git-fetch)
14408 (uri (git-reference
14409 (url "https://github.com/pika/pika")
14410 (commit version)))
14411 (file-name (git-file-name name version))
14412 (sha256
14413 (base32
14414 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
14415 (build-system python-build-system)
14416 (arguments
14417 '(#:phases (modify-phases %standard-phases
14418 (add-before 'check 'disable-live-tests
14419 (lambda _
14420 ;; Disable tests that require RabbitMQ, which is not
14421 ;; yet available in Guix.
14422 (substitute* "setup.cfg"
14423 (("tests/unit,tests/acceptance")
14424 "tests/unit"))
14425 (with-directory-excursion "tests"
14426 (for-each delete-file
14427 '("unit/base_connection_tests.py"
14428 "unit/threaded_test_wrapper_test.py")))))
14429 (replace 'check
14430 (lambda _
14431 (invoke "nosetests"))))))
14432 (native-inputs
14433 `(("python-mock" ,python-mock)
14434 ("python-nose" ,python-nose)
14435
14436 ;; These are optional at runtime, and provided here for tests.
14437 ("python-gevent" ,python-gevent)
14438 ("python-tornado" ,python-tornado)
14439 ("python-twisted" ,python-twisted)))
14440 (home-page "https://pika.readthedocs.org")
14441 (synopsis "Pure Python AMQP Client Library")
14442 (description
14443 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
14444 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
14445 network support library.")
14446 (license license:bsd-3)))
14447
14448 (define-public python-ply
14449 (package
14450 (name "python-ply")
14451 (version "3.11")
14452 (source
14453 (origin
14454 (method url-fetch)
14455 (uri (pypi-uri "ply" version))
14456 (sha256
14457 (base32
14458 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
14459 (build-system python-build-system)
14460 (home-page "http://www.dabeaz.com/ply/")
14461 (synopsis "Python Lex & Yacc")
14462 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
14463 It uses LR parsing and does extensive error checking.")
14464 (license license:bsd-3)))
14465
14466 (define-public python-tabulate
14467 (package
14468 (name "python-tabulate")
14469 (version "0.8.9")
14470 (source (origin
14471 (method url-fetch)
14472 (uri (pypi-uri "tabulate" version))
14473 (sha256
14474 (base32
14475 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
14476 (build-system python-build-system)
14477 (arguments
14478 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
14479 ;; and the latest release is not tagged in the upstream repository.
14480 '(#:tests? #f))
14481 (home-page "https://bitbucket.org/astanin/python-tabulate")
14482 (synopsis "Pretty-print tabular data")
14483 (description
14484 "Tabulate is a library and command-line utility to pretty-print tabular
14485 data in Python.")
14486 (license license:expat)))
14487
14488 (define-public python2-tabulate
14489 (package-with-python2 python-tabulate))
14490
14491 (define-public python-kazoo
14492 (package
14493 (name "python-kazoo")
14494 (version "2.4.0")
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "kazoo" version))
14499 (sha256
14500 (base32
14501 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
14502 (build-system python-build-system)
14503 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
14504 (propagated-inputs
14505 `(("python-six" ,python-six)))
14506 (home-page "https://kazoo.readthedocs.org")
14507 (synopsis "High-level Zookeeper client library")
14508 (description
14509 "Kazoo is a Python client library for the Apache Zookeeper distributed
14510 application service. It is designed to be easy to use and to avoid common
14511 programming errors.")
14512 (license license:asl2.0)))
14513
14514 (define-public python2-kazoo
14515 (package-with-python2 python-kazoo))
14516
14517 (define-public python-pykafka
14518 (package
14519 (name "python-pykafka")
14520 (version "2.4.0")
14521 (source (origin
14522 (method url-fetch)
14523 (uri (pypi-uri "pykafka" version))
14524 (sha256
14525 (base32
14526 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
14527 (build-system python-build-system)
14528 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
14529 (propagated-inputs
14530 `(("python-gevent" ,python-gevent)
14531 ("python-kazoo" ,python-kazoo)
14532 ("python-tabulate" ,python-tabulate)))
14533 (inputs
14534 `(("librdkafka" ,librdkafka)))
14535 (home-page "https://pykafka.readthedocs.io/")
14536 (synopsis "Apache Kafka client for Python")
14537 (description
14538 "PyKafka is a client for the Apache Kafka distributed messaging system.
14539 It includes Python implementations of Kafka producers and consumers, which
14540 are optionally backed by a C extension built on librdkafka.")
14541 (license license:asl2.0)))
14542
14543 (define-public python-wcwidth
14544 (package
14545 (name "python-wcwidth")
14546 (version "0.1.8")
14547 (source (origin
14548 (method url-fetch)
14549 (uri (pypi-uri "wcwidth" version))
14550 (sha256
14551 (base32
14552 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
14553 (build-system python-build-system)
14554 (home-page "https://github.com/jquast/wcwidth")
14555 (synopsis "Measure number of terminal column cells of wide-character codes")
14556 (description "Wcwidth measures the number of terminal column cells of
14557 wide-character codes. It is useful for those implementing a terminal emulator,
14558 or programs that carefully produce output to be interpreted by one. It is a
14559 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
14560 specified in POSIX.1-2001 and POSIX.1-2008.")
14561 (license license:expat)))
14562
14563 (define-public python2-wcwidth
14564 (package-with-python2 python-wcwidth))
14565
14566 (define-public python2-jsonrpclib
14567 (package
14568 (name "python2-jsonrpclib")
14569 (version "0.1.7")
14570 (source (origin
14571 (method url-fetch)
14572 (uri (pypi-uri "jsonrpclib" version))
14573 (sha256
14574 (base32
14575 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
14576 (build-system python-build-system)
14577 (arguments
14578 `(#:tests? #f
14579 #:python ,python-2))
14580 (home-page "https://github.com/joshmarshall/jsonrpclib/")
14581 (synopsis "Implementation of JSON-RPC specification for Python")
14582 (description
14583 "This library is an implementation of the JSON-RPC specification.
14584 It supports both the original 1.0 specification, as well as the
14585 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
14586 etc.")
14587 (license license:asl2.0)))
14588
14589 (define-public python-chai
14590 (package
14591 (name "python-chai")
14592 (version "1.1.2")
14593 (source (origin
14594 (method url-fetch)
14595 (uri (pypi-uri "chai" version))
14596 (sha256
14597 (base32
14598 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
14599 (build-system python-build-system)
14600 (home-page "https://github.com/agoragames/chai")
14601 (synopsis "Mocking framework for Python")
14602 (description
14603 "Chai provides an api for mocking, stubbing and spying your python
14604 objects, patterned after the Mocha library for Ruby.")
14605 (license license:bsd-3)))
14606
14607 (define-public python2-chai
14608 (package-with-python2 python-chai))
14609
14610 (define-public python-inflection
14611 (package
14612 (name "python-inflection")
14613 (version "0.3.1")
14614 (source
14615 (origin (method url-fetch)
14616 (uri (pypi-uri "inflection" version))
14617 (sha256
14618 (base32
14619 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
14620 (build-system python-build-system)
14621 (native-inputs
14622 `(("python-pytest" ,python-pytest)))
14623 (home-page "https://github.com/jpvanhal/inflection")
14624 (synopsis "Python string transformation library")
14625 (description
14626 "Inflection is a string transformation library. It singularizes
14627 and pluralizes English words, and transforms strings from CamelCase to
14628 underscored string.")
14629 (license license:expat)))
14630
14631 (define-public python2-inflection
14632 (package-with-python2 python-inflection))
14633
14634 (define-public python-pylev
14635 (package
14636 (name "python-pylev")
14637 (version "1.3.0")
14638 (source (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "pylev" version))
14641 (sha256
14642 (base32
14643 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
14644 (build-system python-build-system)
14645 (home-page "https://github.com/toastdriven/pylev")
14646 (synopsis "Levenshtein distance implementation in Python")
14647 (description "Pure Python Levenshtein implementation, based off the
14648 Wikipedia code samples at
14649 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
14650 (license license:bsd-3)))
14651
14652 (define-public python2-pylev
14653 (package-with-python2 python-pylev))
14654
14655 (define-public python-cleo
14656 (package
14657 (name "python-cleo")
14658 (version "0.8.1")
14659 (source (origin
14660 (method url-fetch)
14661 (uri (pypi-uri "cleo" version))
14662 (sha256
14663 (base32
14664 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
14665 (build-system python-build-system)
14666 (native-inputs
14667 `( ;; For testing
14668 ("python-mock" ,python-mock)
14669 ("python-pytest-mock" ,python-pytest-mock)
14670 ("python-pytest" ,python-pytest)))
14671 (propagated-inputs
14672 `(("python-backpack" ,python-backpack)
14673 ("python-clikit" ,python-clikit)
14674 ("python-pastel" ,python-pastel)
14675 ("python-pylev" ,python-pylev)))
14676 (home-page "https://github.com/sdispater/cleo")
14677 (synopsis "Command-line arguments library for Python")
14678 (description
14679 "Cleo allows you to create command-line commands with signature in
14680 docstring and colored output.")
14681 (license license:expat)))
14682
14683 (define-public python2-cleo
14684 (package-with-python2 python-cleo))
14685
14686 (define-public python-tomlkit
14687 (package
14688 (name "python-tomlkit")
14689 (version "0.7.0")
14690 (source
14691 (origin
14692 (method url-fetch)
14693 (uri (pypi-uri "tomlkit" version))
14694 (sha256
14695 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
14696 (build-system python-build-system)
14697 (native-inputs
14698 `(("python-pytest" ,python-pytest)
14699 ("python-pyyaml" ,python-pyyaml)))
14700 (home-page "https://github.com/sdispater/tomlkit")
14701 (synopsis "Style-preserving TOML library")
14702 (description
14703 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
14704 preserves all comments, indentations, whitespace and internal element ordering,
14705 and makes them accessible and editable via an intuitive API. It can also
14706 create new TOML documents from scratch using the provided helpers. Part of the
14707 implementation has been adapted, improved, and fixed from Molten.")
14708 (license license:expat)))
14709
14710 (define-public python-shellingham
14711 (package
14712 (name "python-shellingham")
14713 (version "1.3.2")
14714 (source
14715 (origin
14716 (method url-fetch)
14717 (uri (pypi-uri "shellingham" version))
14718 (sha256
14719 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
14720 (build-system python-build-system)
14721 (arguments
14722 `(#:phases
14723 (modify-phases %standard-phases
14724 (add-after 'unpack 'restore-setup.py
14725 ;; setup.py will return in the next release.
14726 ;; <https://github.com/sarugaku/shellingham/issues/33>
14727 (lambda _
14728 (with-output-to-file "setup.py"
14729 (lambda _
14730 (display "from setuptools import setup\nsetup()\n")))
14731 #t)))))
14732 (home-page "https://github.com/sarugaku/shellingham")
14733 (synopsis "Tool to detect surrounding shell")
14734 (description
14735 "Shellingham detects what shell the current Python executable is
14736 running in.")
14737 (license license:isc)))
14738
14739 (define-public python-memcached
14740 (package
14741 (name "python-memcached")
14742 (version "1.59")
14743 (source
14744 (origin
14745 (method url-fetch)
14746 (uri (pypi-uri "python-memcached" version))
14747 (sha256
14748 (base32
14749 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
14750 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
14751 (build-system python-build-system)
14752 (propagated-inputs `(("python-six" ,python-six)))
14753 (home-page
14754 "https://github.com/linsomniac/python-memcached")
14755 (synopsis "Pure python memcached client")
14756 (description
14757 "This software is a pure Python interface to the memcached memory cache
14758 daemon. It is the client side software which allows storing values in one or
14759 more, possibly remote, memcached servers.")
14760 (license license:psfl)))
14761
14762 (define-public python-clikit
14763 (package
14764 (name "python-clikit")
14765 (version "0.6.2")
14766 (source
14767 (origin
14768 (method url-fetch)
14769 (uri (pypi-uri "clikit" version))
14770 (sha256
14771 (base32
14772 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
14773 (build-system python-build-system)
14774 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
14775 (propagated-inputs
14776 `(("python-crashtest" ,python-crashtest)
14777 ("python-pastel" ,python-pastel)
14778 ("python-pylev" ,python-pylev)))
14779 (home-page "https://github.com/sdispater/clikit")
14780 (synopsis "Group of utilities to build command line interfaces")
14781 (description
14782 "CliKit is a group of utilities to build testable command line
14783 interfaces.")
14784 (properties `((python2-variant . ,(delay python2-clikit))))
14785 (license license:expat)))
14786
14787 (define-public python2-clikit
14788 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
14789 (package/inherit
14790 base
14791 (propagated-inputs
14792 `(("python-enum34" ,python2-enum34)
14793 ("python-typing" ,python2-typing)
14794 ,@(package-propagated-inputs base))))))
14795
14796 (define-public python-msgpack-python
14797 (package
14798 (name "python-msgpack-python")
14799 (version "0.5.6")
14800 (source
14801 (origin
14802 (method url-fetch)
14803 (uri (pypi-uri "msgpack-python" version))
14804 (sha256
14805 (base32
14806 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
14807 (build-system python-build-system)
14808 (home-page "https://msgpack.org/")
14809 (synopsis "Package to deserialize messages in MessagePack binary format")
14810 (description
14811 "MessagePack is an efficient binary serialization format. It lets you
14812 exchange data among multiple languages like JSON. But it's faster and
14813 smaller. Small integers are encoded into a single byte, and typical short
14814 strings require only one extra byte in addition to the strings themselves.")
14815 (license license:asl2.0)))
14816
14817 (define-public python-cachy
14818 (package
14819 (name "python-cachy")
14820 (version "0.3.0")
14821 (source
14822 (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "cachy" version))
14825 (sha256
14826 (base32
14827 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
14828 (build-system python-build-system)
14829 (arguments
14830 '(#:phases
14831 (modify-phases %standard-phases
14832 (replace 'check
14833 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
14834 "pytest"))))))
14835 (native-inputs
14836 `(("memcached" ,memcached)
14837 ("python-fakeredis" ,python-fakeredis)
14838 ("python-flexmock" ,python-flexmock)
14839 ("python-pifpaf" ,python-pifpaf)
14840 ("python-pytest" ,python-pytest)))
14841 (propagated-inputs
14842 `(("python-memcached" ,python-memcached)
14843 ("python-msgpack-python" ,python-msgpack-python)
14844 ("python-redis" ,python-redis)))
14845 (home-page "https://github.com/sdispater/cachy")
14846 (synopsis "Simple yet effective caching library")
14847 (description
14848 "Cachy provides a simple yet effective caching library. A simple but
14849 powerful API: thread-safety; decorator syntax; support for memcached, redis,
14850 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
14851 (license license:expat)))
14852
14853 (define-public poetry
14854 (package
14855 (name "poetry")
14856 (version "1.1.5")
14857 ;; Poetry can only be built from source with Poetry.
14858 (source
14859 (origin
14860 (method url-fetch)
14861 (uri (pypi-uri "poetry" version))
14862 (sha256
14863 (base32
14864 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
14865 (build-system python-build-system)
14866 (arguments
14867 `(#:tests? #f ;; Pypi does not have tests.
14868 #:phases
14869 (modify-phases %standard-phases
14870 (add-before 'build 'patch-setup-py
14871 (lambda _
14872 (substitute* "setup.py"
14873 ;; Allow newer versions of python-keyring.
14874 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
14875 ;; TODO: remove after the next release cycle,
14876 ;; when packaging has been updated.
14877 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
14878 #t)))))
14879 (propagated-inputs
14880 `(("python-cachecontrol" ,python-cachecontrol)
14881 ("python-cachy" ,python-cachy)
14882 ("python-cleo" ,python-cleo)
14883 ("python-clikit" ,python-clikit)
14884 ("python-html5lib" ,python-html5lib)
14885 ("python-keyring" ,python-keyring)
14886 ("python-msgpack-transitional" ,python-msgpack-transitional)
14887 ("python-packaging" ,python-packaging)
14888 ("python-pexpect" ,python-pexpect)
14889 ("python-pip" ,python-pip)
14890 ("python-pkginfo" ,python-pkginfo)
14891 ("python-poetry-core" ,python-poetry-core)
14892 ("python-requests" ,python-requests)
14893 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
14894 ("python-shellingham" ,python-shellingham)
14895 ("python-tomlkit" ,python-tomlkit)
14896 ("python-virtualenv" ,python-virtualenv)))
14897 (home-page "https://python-poetry.org")
14898 (synopsis "Python dependency management and packaging made easy")
14899 (description "Poetry is a tool for dependency management and packaging
14900 in Python. It allows you to declare the libraries your project depends on and
14901 it will manage (install/update) them for you.")
14902 (license license:expat)))
14903
14904 (define-public python-lark-parser
14905 (package
14906 (name "python-lark-parser")
14907 (version "0.9.0")
14908 (source (origin
14909 (method url-fetch)
14910 (uri (pypi-uri "lark-parser" version))
14911 (sha256
14912 (base32
14913 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
14914 (build-system python-build-system)
14915 (home-page "https://github.com/lark-parser/lark")
14916 (synopsis "Multi-language parser for Python")
14917 (description
14918 "Lark is a parser built with a focus on ergonomics, performance and
14919 resilience. Lark can parse all context-free languages. That means it is
14920 capable of parsing almost any programming language out there, and to
14921 some degree most natural languages too.")
14922 (license license:expat)))
14923
14924 (define-public python-libcst
14925 (package
14926 (name "python-libcst")
14927 (version "0.3.8")
14928 (source (origin
14929 (method url-fetch)
14930 (uri (pypi-uri "libcst" version))
14931 (sha256
14932 (base32
14933 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
14934 (build-system python-build-system)
14935 (arguments
14936 `(#:phases
14937 (modify-phases %standard-phases
14938 (add-after 'unpack 'remove-failing-tests
14939 (lambda _
14940 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
14941 (delete-file "libcst/tests/test_fuzz.py")
14942 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
14943 (delete-file "libcst/tests/test_pyre_integration.py")
14944 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
14945 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
14946 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
14947 #t))
14948 (add-before 'check 'generate-test-data
14949 (lambda _
14950 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14951 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
14952 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
14953 (replace 'check
14954 (lambda _
14955 (invoke "python" "-m" "unittest")
14956 #t)))))
14957 (native-inputs
14958 `(("python-black" ,python-black)
14959 ("python-isort" ,python-isort)))
14960 (propagated-inputs
14961 `(("python-typing-extensions" ,python-typing-extensions)
14962 ("python-typing-inspect" ,python-typing-inspect)
14963 ("python-pyyaml" ,python-pyyaml)))
14964 (home-page "https://github.com/Instagram/LibCST")
14965 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
14966 (description
14967 "LibCST parses Python source code as a CST tree that keeps all
14968 formatting details (comments, whitespaces, parentheses, etc). It's useful
14969 for building automated refactoring (codemod) applications and linters.
14970 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
14971 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
14972 naming node types and fields, LibCST creates a lossless CST that looks and
14973 feels like an AST.")
14974 (license (list license:expat
14975 ;; Some files unde libcst/_parser/ are under Python Software
14976 ;; Foundation license (see LICENSE file for details)
14977 license:psfl
14978 ;; libcst/_add_slots.py
14979 license:asl2.0))))
14980
14981 (define-public python-typing-inspect
14982 (package
14983 (name "python-typing-inspect")
14984 (version "0.6.0")
14985 (source (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "typing_inspect" version))
14988 (sha256
14989 (base32
14990 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
14991 (build-system python-build-system)
14992 (propagated-inputs
14993 `(("python-mypy-extensions" ,python-mypy-extensions)
14994 ("python-typing-extensions" ,python-typing-extensions)))
14995 (home-page "https://github.com/ilevkivskyi/typing_inspect")
14996 (synopsis "API for inspection of types in the Python @code{typing} module")
14997 (description
14998 "The @code{typing_inspect} module defines experimental API for runtime
14999 inspection of types defined in the Python standard typing module.")
15000 (license license:expat)))
15001
15002 (define-public python-lazy-object-proxy
15003 (package
15004 (name "python-lazy-object-proxy")
15005 (version "1.5.1")
15006 (source (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "lazy-object-proxy" version))
15009 (sha256
15010 (base32
15011 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
15012 (native-inputs
15013 `(("python-setuptools-scm" ,python-setuptools-scm)))
15014 (build-system python-build-system)
15015 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
15016 (synopsis "Lazy object proxy for python")
15017 (description
15018 "Lazy object proxy is an object that wraps a callable but defers the call
15019 until the object is actually required, and caches the result of said call.")
15020 (license license:bsd-2)))
15021
15022 (define-public python2-lazy-object-proxy
15023 (package-with-python2 python-lazy-object-proxy))
15024
15025 (define-public python-dnspython
15026 (package
15027 (name "python-dnspython")
15028 (version "2.1.0")
15029 (source (origin
15030 (method url-fetch)
15031 (uri (pypi-uri "dnspython" version ".zip"))
15032 (sha256
15033 (base32
15034 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15035 (build-system python-build-system)
15036 (native-inputs `(("unzip" ,unzip)))
15037 (arguments '(#:tests? #f)) ; XXX: requires internet access
15038 (home-page "https://www.dnspython.org")
15039 (synopsis "DNS toolkit for Python")
15040 (description
15041 "dnspython is a DNS toolkit for Python. It supports almost all record
15042 types. It can be used for queries, zone transfers, and dynamic updates.
15043 It supports TSIG authenticated messages and EDNS0.")
15044 (license license:expat)))
15045
15046 (define-public python-dnspython-1.16
15047 (package
15048 (inherit python-dnspython)
15049 (version "1.16.0")
15050 (source (origin
15051 (method url-fetch)
15052 (uri (string-append "http://www.dnspython.org/kits/"
15053 version "/dnspython-" version ".tar.gz"))
15054 (sha256
15055 (base32
15056 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15057 (native-inputs '())))
15058
15059 (define-public python2-dnspython-1.16
15060 (package-with-python2 python-dnspython-1.16))
15061
15062 (define-public python-py3dns
15063 (package
15064 (name "python-py3dns")
15065 (version "3.2.1")
15066 (source
15067 (origin
15068 (method url-fetch)
15069 (uri (pypi-uri "py3dns" version))
15070 (sha256
15071 (base32
15072 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15073 (build-system python-build-system)
15074 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15075 ;; removing functionality so we copy from Nix and "just don't build it".
15076 (arguments
15077 `(#:phases
15078 (modify-phases %standard-phases
15079 (add-after 'unpack 'patch-source
15080 (lambda _
15081 (substitute* "setup.py"
15082 (("import DNS") "")
15083 (("DNS.__version__") (string-append "\"" ,version "\"")))
15084 #t)))
15085 #:tests? #f)) ; Also skip the tests.
15086 (home-page "https://launchpad.net/py3dns")
15087 (synopsis "Python 3 DNS library")
15088 (description "This Python 3 module provides a DNS API for looking up DNS
15089 entries from within Python 3 modules and applications. This module is a
15090 simple, lightweight implementation.")
15091 (license license:psfl)))
15092
15093 (define-public python-email-validator
15094 (package
15095 (name "python-email-validator")
15096 (version "1.0.2")
15097 (source
15098 (origin (method url-fetch)
15099 (uri (pypi-uri "email_validator" version))
15100 (sha256
15101 (base32
15102 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15103 (build-system python-build-system)
15104 (arguments
15105 '(#:phases
15106 (modify-phases %standard-phases
15107 (add-before 'build 'use-dnspython
15108 (lambda _
15109 (substitute* "setup.py"
15110 (("dnspython3") "dnspython"))
15111 #t)))))
15112 (propagated-inputs
15113 `(("python-dnspython" ,python-dnspython)
15114 ("python-idna" ,python-idna)))
15115 (home-page "https://github.com/JoshData/python-email-validator")
15116 (synopsis "Email address validation library for Python")
15117 (description
15118 "This library validates email address syntax and deliverability.")
15119 (license license:cc0)))
15120
15121 (define-public python2-email-validator
15122 (package-with-python2 python-email-validator))
15123
15124 (define-public python-ukpostcodeparser
15125 (package
15126 (name "python-ukpostcodeparser")
15127 (version "1.0.3")
15128 (source (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "UkPostcodeParser" version))
15131 (sha256
15132 (base32
15133 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
15134 (build-system python-build-system)
15135 (home-page "https://github.com/hamstah/ukpostcodeparser")
15136 (synopsis "UK Postcode parser for Python")
15137 (description
15138 "This library provides the @code{parse_uk_postcode} function for
15139 parsing UK postcodes.")
15140 (license license:expat)))
15141
15142 (define-public python2-ukpostcodeparser
15143 (package-with-python2 python-ukpostcodeparser))
15144
15145 (define-public python-faker
15146 (package
15147 (name "python-faker")
15148 (version "4.0.2")
15149 (source (origin
15150 (method url-fetch)
15151 (uri (pypi-uri "Faker" version))
15152 (sha256
15153 (base32
15154 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
15155 (build-system python-build-system)
15156 (arguments
15157 '(#:phases
15158 (modify-phases %standard-phases
15159 (replace 'check
15160 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15161 (native-inputs
15162 `(;; For testing
15163 ("python-freezegun" ,python-freezegun)
15164 ("python-pytest" ,python-pytest)
15165 ("python-random2" ,python-random2)
15166 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15167 ("python-validators" ,python-validators)))
15168 (propagated-inputs
15169 `(("python-dateutil" ,python-dateutil)
15170 ("python-text-unidecode" ,python-text-unidecode)))
15171 (home-page "https://github.com/joke2k/faker")
15172 (synopsis "Python package that generates fake data")
15173 (description
15174 "Faker is a Python package that generates fake data such as names,
15175 addresses, and phone numbers.")
15176 (license license:expat)
15177 (properties `((python2-variant . ,(delay python2-faker))))))
15178
15179 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15180 (define-public python2-faker
15181 (let ((base (package-with-python2 (strip-python2-variant
15182 python-faker))))
15183 (package
15184 (inherit base)
15185 (version "3.0.1")
15186 (source (origin
15187 (method url-fetch)
15188 (uri (pypi-uri "Faker" version))
15189 (sha256
15190 (base32
15191 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15192 (native-inputs
15193 `(("python-mock" ,python2-mock)
15194 ,@(package-native-inputs base)))
15195 (propagated-inputs
15196 `(("python2-ipaddress" ,python2-ipaddress)
15197 ("python2-six" ,python2-six)
15198 ,@(package-propagated-inputs base))))))
15199
15200 (define-public python-pyaml
15201 (package
15202 (name "python-pyaml")
15203 (version "18.11.0")
15204 (source (origin
15205 (method url-fetch)
15206 (uri (pypi-uri "pyaml" version))
15207 (sha256
15208 (base32
15209 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15210 (build-system python-build-system)
15211 (native-inputs
15212 `(("python-unidecode" ,python-unidecode)))
15213 (propagated-inputs
15214 `(("python-pyyaml" ,python-pyyaml)))
15215 (home-page "https://github.com/mk-fg/pretty-yaml")
15216 (synopsis "YAML pretty-print library for Python")
15217 (description
15218 "pyaml is a PyYAML based python module to produce pretty and readable
15219 YAML-serialized data.")
15220 (license license:wtfpl2)))
15221
15222 (define-public python2-pyaml
15223 (package-with-python2 python-pyaml))
15224
15225 (define-public python-backpack
15226 (package
15227 (name "python-backpack")
15228 (version "0.1")
15229 (source
15230 (origin
15231 (method url-fetch)
15232 (uri (pypi-uri "backpack" version))
15233 (sha256
15234 (base32
15235 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15236 (build-system python-build-system)
15237 (native-inputs
15238 `(("python-pytest" ,python-pytest)
15239 ("python-nose" ,python-nose)))
15240 (propagated-inputs
15241 `(("python-simplejson" ,python-simplejson)))
15242 (home-page "https://github.com/sdispater/backpack")
15243 (synopsis "Utilities for working with Python collections")
15244 (description "Backpack provides some useful utilities for working with
15245 collections of data.")
15246 (license license:expat)))
15247
15248 (define-public python2-backpack
15249 (package-with-python2 python-backpack))
15250
15251 (define-public python-prompt-toolkit
15252 (package
15253 (name "python-prompt-toolkit")
15254 (version "3.0.18")
15255 (source
15256 (origin
15257 (method url-fetch)
15258 (uri (pypi-uri "prompt_toolkit" version))
15259 (sha256
15260 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15261 (build-system python-build-system)
15262 (arguments
15263 `(#:phases
15264 (modify-phases %standard-phases
15265 (delete 'check)
15266 (add-after 'install 'post-install-check
15267 (lambda* (#:key inputs outputs #:allow-other-keys)
15268 ;; HOME is needed for the test
15269 ;; "test_pathcompleter_can_expanduser".
15270 (setenv "HOME" "/tmp")
15271 (add-installed-pythonpath inputs outputs)
15272 (invoke "py.test"))))))
15273 (propagated-inputs
15274 `(("python-wcwidth" ,python-wcwidth)))
15275 (native-inputs
15276 `(("python-pytest" ,python-pytest)))
15277 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
15278 (synopsis "Library for building command line interfaces in Python")
15279 (description
15280 "Prompt-Toolkit is a library for building interactive command line
15281 interfaces in Python. It's like GNU Readline but it also features syntax
15282 highlighting while typing, out-of-the-box multi-line input editing, advanced
15283 code completion, incremental search, support for Chinese double-width
15284 characters, mouse support, and auto suggestions.")
15285 (license license:bsd-3)
15286 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
15287
15288 (define-public python-prompt-toolkit-2
15289 (package (inherit python-prompt-toolkit)
15290 (name "python-prompt-toolkit")
15291 (version "2.0.7")
15292 (source
15293 (origin
15294 (method url-fetch)
15295 (uri (pypi-uri "prompt_toolkit" version))
15296 (sha256
15297 (base32
15298 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
15299 (propagated-inputs
15300 `(("python-wcwidth" ,python-wcwidth)
15301 ("python-six" ,python-six)
15302 ("python-pygments" ,python-pygments)))
15303 (properties '())))
15304
15305 (define-public python2-prompt-toolkit
15306 (package-with-python2 python-prompt-toolkit-2))
15307
15308 (define-public python-prompt-toolkit-1
15309 (package (inherit python-prompt-toolkit-2)
15310 (version "1.0.15")
15311 (source
15312 (origin
15313 (method url-fetch)
15314 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
15315 (sha256
15316 (base32
15317 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
15318
15319 (define-public python2-prompt-toolkit-1
15320 (package-with-python2 python-prompt-toolkit-1))
15321
15322 (define-public python-jedi
15323 (package
15324 (name "python-jedi")
15325 (version "0.17.2")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "jedi" version))
15330 (sha256
15331 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
15332 (build-system python-build-system)
15333 (arguments
15334 `(#:phases
15335 (modify-phases %standard-phases
15336 (replace 'check
15337 (lambda* (#:key tests? #:allow-other-keys)
15338 (when tests?
15339 (setenv "HOME" "/tmp")
15340 (invoke "python" "-m" "pytest" "-vv"))
15341 #t)))))
15342 (native-inputs
15343 `(("python-pytest" ,python-pytest)
15344 ("python-docopt" ,python-docopt)))
15345 (propagated-inputs
15346 `(("python-parso" ,python-parso)))
15347 (home-page "https://github.com/davidhalter/jedi")
15348 (synopsis "Autocompletion and static analysis library for Python")
15349 (description
15350 "Jedi is a static analysis tool for Python that can be used in Integrated
15351 Development Environments (@dfn{IDE}s) and text editors. It understands Python
15352 on a deeper level than many other static analysis frameworks for Python.
15353
15354 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
15355 well.")
15356 (license license:expat)))
15357
15358 (define-public python2-jedi
15359 (package-with-python2 python-jedi))
15360
15361 (define-public ptpython
15362 (package
15363 (name "ptpython")
15364 (version "3.0.17")
15365 (source (origin
15366 (method url-fetch)
15367 (uri (pypi-uri "ptpython" version))
15368 (sha256
15369 (base32
15370 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
15371 (build-system python-build-system)
15372 (arguments
15373 `(#:tests? #f)) ;there are no tests
15374 (propagated-inputs
15375 `(("python-appdirs" ,python-appdirs)
15376 ("python-black" ,python-black)
15377 ("python-jedi" ,python-jedi)
15378 ("python-prompt-toolkit" ,python-prompt-toolkit)
15379 ("python-pygments" ,python-pygments)))
15380 (home-page "https://github.com/jonathanslenders/ptpython")
15381 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
15382 (description
15383 "ptpython is a Python read-eval-print loop with IDE-like features.
15384 It supports syntax highlighting, multiline editing, autocompletion, mouse,
15385 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
15386 etc.")
15387 (license license:bsd-3)
15388 (properties `((python2-variant . ,(delay ptpython-2))))))
15389
15390 (define-public ptpython-2
15391 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
15392 (package/inherit base
15393 (name "ptpython2"))))
15394
15395 (define-public python-easyprocess
15396 (package
15397 (name "python-easyprocess")
15398 (version "0.3")
15399 (source
15400 (origin
15401 (method url-fetch)
15402 (uri (pypi-uri "EasyProcess" version))
15403 (sha256
15404 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
15405 (build-system python-build-system)
15406 (arguments
15407 ;; Tests require pyvirtualdisplay, which requires this package.
15408 `(#:tests? #f))
15409 (home-page "https://github.com/ponty/easyprocess")
15410 (synopsis "Python subprocess interface")
15411 (description
15412 "@code{easyprocess} is an easy to use Python subprocess interface.")
15413 (license license:bsd-3)))
15414
15415 (define-public python-entrypoint2
15416 (package
15417 (name "python-entrypoint2")
15418 (version "0.2.4")
15419 (source
15420 (origin
15421 (method url-fetch)
15422 (uri (pypi-uri "entrypoint2" version))
15423 (sha256
15424 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
15425 (build-system python-build-system)
15426 (arguments
15427 `(#:test-target "pytest"))
15428 (native-inputs
15429 `(("python-easyprocess" ,python-easyprocess)
15430 ("python-pytest" ,python-pytest)
15431 ("python-pytest-runner" ,python-pytest-runner)))
15432 (home-page "https://github.com/ponty/entrypoint2")
15433 (synopsis "Command-line interface for Python modules")
15434 (description
15435 "@code{entrypoint2} is an easy to use command-line interface for Python
15436 modules based on @code{argparse}. It translates function signature and
15437 documentation to argparse configuration.")
15438 (license license:bsd-3)))
15439
15440 (define-public python-pyvirtualdisplay
15441 (package
15442 (name "python-pyvirtualdisplay")
15443 (version "2.1")
15444 (source
15445 (origin
15446 (method url-fetch)
15447 (uri (pypi-uri "PyVirtualDisplay" version))
15448 (sha256
15449 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
15450 (build-system python-build-system)
15451 (arguments
15452 ;; Tests fail with:
15453 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
15454 `(#:tests? #f))
15455 (native-inputs
15456 `(("python-entrypoint2" ,python-entrypoint2)
15457 ("python-psutil" ,python-psutil)
15458 ("python-pytest" ,python-pytest)
15459 ("python-pytest-runner" ,python-pytest-runner)))
15460 (propagated-inputs
15461 `(("python-easyprocess" ,python-easyprocess)
15462 ("python-pillow" ,python-pillow)))
15463 (home-page "https://github.com/ponty/pyvirtualdisplay")
15464 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
15465 (description
15466 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
15467 (license license:bsd-3)))
15468
15469 (define-public python-stem
15470 (package
15471 (name "python-stem")
15472 (version "1.8.0")
15473 (source
15474 (origin
15475 (method url-fetch)
15476 (uri (pypi-uri "stem" version))
15477 (sha256
15478 (base32
15479 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
15480 (build-system python-build-system)
15481 (arguments
15482 `(#:phases
15483 (modify-phases %standard-phases
15484 (replace 'check
15485 (lambda _
15486 (invoke "./run_tests.py" "--unit")
15487 #t)))))
15488 (native-inputs
15489 `(("python-mock" ,python-mock)
15490 ("python-pycodestyle" ,python-pycodestyle)
15491 ("python-pyflakes" ,python-pyflakes)))
15492 (home-page "https://stem.torproject.org/")
15493 (synopsis
15494 "Python controller library that allows applications to interact with Tor")
15495 (description
15496 "Stem is a Python controller library for Tor. With it you can use Tor's
15497 control protocol to script against the Tor process and read descriptor data
15498 relays publish about themselves.")
15499 (license license:lgpl3)))
15500
15501 (define-public python-pyserial
15502 (package
15503 (name "python-pyserial")
15504 (version "3.5")
15505 (source
15506 (origin
15507 (method url-fetch)
15508 (uri (pypi-uri "pyserial" version))
15509 (sha256
15510 (base32
15511 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
15512 (build-system python-build-system)
15513 (arguments
15514 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
15515 ;; #:phases
15516 ;; (modify-phases %standard-phases
15517 ;; (replace 'check
15518 ;; (lambda _
15519 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
15520 (home-page
15521 "https://github.com/pyserial/pyserial")
15522 (synopsis "Python Serial Port Bindings")
15523 (description "@code{pyserial} provide serial port bindings for Python. It
15524 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
15525 and/or Xon/Xoff. The port is accessed in RAW mode.")
15526 (license license:bsd-3)))
15527
15528 (define-public python2-pyserial
15529 (package-with-python2 python-pyserial))
15530
15531 (define-public python-kivy
15532 (package
15533 (name "python-kivy")
15534 (version "1.10.1")
15535 (source
15536 (origin
15537 (method url-fetch)
15538 (uri (pypi-uri "Kivy" version))
15539 (file-name (string-append name "-" version ".tar.gz"))
15540 (sha256
15541 (base32
15542 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
15543 (build-system python-build-system)
15544 (arguments
15545 `(#:tests? #f ; Tests require many optional packages
15546 #:phases
15547 (modify-phases %standard-phases
15548 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
15549 (lambda* (#:key inputs #:allow-other-keys)
15550 (setenv "KIVY_SDL2_PATH"
15551 (string-append (assoc-ref inputs "sdl-union")
15552 "/include/SDL2"))
15553 #t)))))
15554 (native-inputs
15555 `(("pkg-config" ,pkg-config)
15556 ("python-cython" ,python-cython)))
15557 (inputs
15558 `(("gstreamer" ,gstreamer)
15559 ("mesa" ,mesa)
15560 ("sdl-union"
15561 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
15562 (home-page "https://kivy.org")
15563 (synopsis
15564 "Multitouch application framework")
15565 (description
15566 "A software library for rapid development of
15567 hardware-accelerated multitouch applications.")
15568 (license license:expat)))
15569
15570 (define-public python2-kivy
15571 (package-with-python2 python-kivy))
15572
15573 (define-public python-binaryornot
15574 (package
15575 (name "python-binaryornot")
15576 (version "0.4.4")
15577 (source (origin
15578 (method url-fetch)
15579 (uri (pypi-uri "binaryornot" version))
15580 (sha256
15581 (base32
15582 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
15583 (build-system python-build-system)
15584 (arguments
15585 `(#:phases
15586 (modify-phases %standard-phases
15587 (add-after 'unpack 'patch-tests
15588 (lambda _
15589 ;; TypeError: binary() got an unexpected keyword argument
15590 ;; 'average_size'.
15591 (substitute* "tests/test_check.py"
15592 (("average_size=512") ""))
15593 #t)))))
15594 (propagated-inputs
15595 `(("python-chardet" ,python-chardet)
15596 ("python-hypothesis" ,python-hypothesis)))
15597 (home-page "https://github.com/audreyr/binaryornot")
15598 (synopsis "Package to check if a file is binary or text")
15599 (description "Ultra-lightweight pure Python package to check if a file is
15600 binary or text.")
15601 (license license:bsd-3)
15602 (properties `((python2-variant . ,(delay python2-binaryornot))))))
15603
15604 (define-public python2-binaryornot
15605 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
15606 (package/inherit base
15607 (propagated-inputs
15608 `(("python2-enum34" ,python2-enum34)
15609 ,@(package-propagated-inputs base))))))
15610
15611 (define-public python-binwalk
15612 (package
15613 (name "python-binwalk")
15614 (version "2.2.0")
15615 (source
15616 (origin
15617 (method git-fetch)
15618 (uri (git-reference
15619 (url "https://github.com/ReFirmLabs/binwalk")
15620 (commit (string-append "v" version))))
15621 (file-name (git-file-name name version))
15622 (sha256
15623 (base32
15624 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
15625 (build-system python-build-system)
15626 (arguments
15627 `(#:phases
15628 (modify-phases %standard-phases
15629 (add-before 'check 'set-pythonpath
15630 (lambda _
15631 (setenv "PYTHONPATH"
15632 (string-append
15633 (getcwd) "/src/"
15634 ":" (getenv "PYTHONPATH")))
15635 (setenv "HOME" "")
15636 #t)))))
15637 (native-inputs
15638 `(("python-coverage" ,python-coverage)
15639 ("python-nose" ,python-nose)))
15640 (home-page "https://github.com/ReFirmLabs/binwalk")
15641 (synopsis "Firmware analysis tool")
15642 (description "Binwalk is a tool for analyzing, reverse engineering, and
15643 extracting firmware images")
15644 (license license:expat)))
15645
15646 (define-public python-nltk
15647 (package
15648 (name "python-nltk")
15649 (version "3.6.2")
15650 (source (origin
15651 (method url-fetch)
15652 (uri (pypi-uri "nltk" version ".zip"))
15653 (sha256
15654 (base32
15655 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
15656 (build-system python-build-system)
15657 (arguments
15658 '(;; The tests require some extra resources to be downloaded.
15659 ;; TODO Try packaging these resources.
15660 #:tests? #f))
15661 (propagated-inputs
15662 `(("python-click" ,python-click)
15663 ("python-joblib" ,python-joblib)
15664 ("python-regex" ,python-regex)
15665 ("python-tqdm" ,python-tqdm)))
15666 (native-inputs
15667 `(("unzip" ,unzip)))
15668 (home-page "http://nltk.org/")
15669 (synopsis "Natural Language Toolkit")
15670 (description "It provides interfaces to over 50 corpora and lexical
15671 resources such as WordNet, along with a suite of text processing libraries
15672 for classification, tokenization, stemming, tagging, parsing, and semantic
15673 reasoning, wrappers for natural language processing libraries.")
15674 (license license:asl2.0)))
15675
15676 ;; Versions >=3.5 breaks backward-compatibility,
15677 ;; so we keep version 3.4.x around for a while.
15678 (define-public python-nltk-3.4
15679 (package
15680 (inherit python-nltk)
15681 (version "3.4.5")
15682 (source
15683 (origin
15684 (method url-fetch)
15685 (uri (pypi-uri "nltk" version ".zip"))
15686 (sha256
15687 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
15688 (propagated-inputs `(("python-six" ,python-six)))))
15689
15690 (define-public python2-nltk
15691 (package-with-python2 python-nltk))
15692
15693 (define-public python-pymongo
15694 (package
15695 (name "python-pymongo")
15696 (version "3.7.2")
15697 (source (origin
15698 (method url-fetch)
15699 (uri (pypi-uri "pymongo" version))
15700 (sha256
15701 (base32
15702 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
15703 (build-system python-build-system)
15704 (propagated-inputs
15705 `(("python-certifi" ,python-certifi)))
15706 (home-page "https://github.com/mongodb/mongo-python-driver")
15707 (synopsis "Python driver for MongoDB")
15708 (description "Python driver for MongoDB.")
15709 (license license:asl2.0)))
15710
15711 (define-public python2-pymongo
15712 (package-with-python2 python-pymongo))
15713
15714 (define-public python-consul
15715 (package
15716 (name "python-consul")
15717 (version "0.6.1")
15718 (source
15719 (origin
15720 (method url-fetch)
15721 (uri (pypi-uri "python-consul" version))
15722 (sha256
15723 (base32
15724 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
15725 (build-system python-build-system)
15726 (arguments
15727 '(#:tests? #f)) ; The tests are not distributed
15728 (propagated-inputs
15729 `(("python-requests" ,python-requests)
15730 ("python-six" ,python-six)))
15731 (home-page "https://github.com/cablehead/python-consul")
15732 (synopsis "Python client for Consul")
15733 (description
15734 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
15735 discovery, monitoring and configuration.")
15736 (license license:expat)))
15737
15738 (define-public python2-consul
15739 (package-with-python2 python-consul))
15740
15741 (define-public python-schematics
15742 (package
15743 (name "python-schematics")
15744 (version "1.1.1")
15745 (source
15746 (origin
15747 (method git-fetch)
15748 (uri (git-reference
15749 (url "https://github.com/schematics/schematics")
15750 (commit (string-append "v" version))))
15751 (file-name (git-file-name name version))
15752 (sha256
15753 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
15754 (build-system python-build-system)
15755 (propagated-inputs
15756 `(("python-six" ,python-six)))
15757 (arguments
15758 ;; The tests require a bunch of not very nice packages with fixed
15759 ;; version requirements (e.g. python-coveralls).
15760 `(#:tests? #f))
15761 (home-page "https://github.com/schematics/schematics")
15762 (synopsis "Python Data Structures for Humans")
15763 (description "Python Data Structures for Humans.")
15764 (license license:bsd-3)))
15765
15766 (define-public python2-schematics
15767 (package-with-python2 python-schematics))
15768
15769 (define-public python-odfpy
15770 (package
15771 (name "python-odfpy")
15772 (version "1.4.1")
15773 (source (origin
15774 (method url-fetch)
15775 (uri (pypi-uri "odfpy" version))
15776 (sha256
15777 (base32
15778 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
15779 (arguments
15780 `(#:phases
15781 (modify-phases %standard-phases
15782 (replace 'check
15783 (lambda _
15784 (setenv "PYTHONPATH" (string-append "./build/lib:"
15785 (getenv "PYTHONPATH")))
15786 (invoke "pytest" "-vv"))))))
15787 (build-system python-build-system)
15788 (native-inputs
15789 `(("python-pytest" ,python-pytest)))
15790 (propagated-inputs
15791 `(("python-defusedxml" ,python-defusedxml)))
15792 (home-page "https://github.com/eea/odfpy")
15793 (synopsis "Python API and tools to manipulate OpenDocument files")
15794 (description "Collection of libraries and utility programs written in
15795 Python to manipulate OpenDocument 1.2 files.")
15796 (license
15797 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
15798 ;; number of files with other licenses.
15799 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
15800
15801 (define-public python2-odfpy
15802 (package-with-python2 python-odfpy))
15803
15804 (define-public python-natsort
15805 (package
15806 (name "python-natsort")
15807 (version "7.0.1")
15808 (source (origin
15809 (method url-fetch)
15810 (uri (pypi-uri "natsort" version))
15811 (sha256
15812 (base32
15813 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
15814 (build-system python-build-system)
15815 (arguments
15816 `(#:modules ((guix build utils)
15817 (guix build python-build-system)
15818 (srfi srfi-1)
15819 (srfi srfi-26)
15820 (ice-9 ftw))
15821 #:phases
15822 (modify-phases %standard-phases
15823 (add-before 'check 'set-cachedir
15824 ;; Tests require write access to $HOME by default
15825 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
15826 (replace 'check
15827 (lambda _
15828 (let ((cwd (getcwd)))
15829 (setenv "PYTHONPATH"
15830 (string-append
15831 cwd "/build/"
15832 (find (cut string-prefix? "lib" <>)
15833 (scandir (string-append cwd "/build")))
15834 ":"
15835 (getenv "PYTHONPATH")))
15836 (invoke "pytest" "-v")))))))
15837 (native-inputs
15838 `(("python-hypothesis" ,python-hypothesis)
15839 ("python-pytest-cov" ,python-pytest-cov)
15840 ("python-pytest-mock" ,python-pytest-mock)
15841 ("python-pytest" ,python-pytest)))
15842 (propagated-inputs ; TODO: Add python-fastnumbers.
15843 `(("python-pyicu" ,python-pyicu)))
15844 (home-page "https://github.com/SethMMorton/natsort")
15845 (synopsis "Natural sorting for python and shell")
15846 (description
15847 "Natsort lets you apply natural sorting on lists instead of
15848 lexicographical. If you use the built-in @code{sorted} method in python
15849 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
15850 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
15851 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
15852 identifies numbers and sorts them separately from strings. It can also sort
15853 version numbers, real numbers, mixed types and more, and comes with a shell
15854 command @command{natsort} that exposes this functionality in the command line.")
15855 (license license:expat)
15856 (properties `((python2-variant . ,(delay python2-natsort))))))
15857
15858 ;; Natsort 6.x are the last versions with support for Python 2.
15859 (define-public python2-natsort
15860 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
15861 (package (inherit base)
15862 (version "6.2.1")
15863 (source (origin
15864 (method url-fetch)
15865 (uri (pypi-uri "natsort" version))
15866 (sha256
15867 (base32
15868 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
15869 (native-inputs
15870 `(("python2-pathlib" ,python2-pathlib)
15871 ,@(package-native-inputs base))))))
15872
15873 (define-public glances
15874 (package
15875 (name "glances")
15876 (version "3.1.7")
15877 (source
15878 (origin
15879 (method url-fetch)
15880 (uri (pypi-uri "Glances" version))
15881 (sha256
15882 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
15883 (modules '((guix build utils)))
15884 (snippet
15885 '(begin
15886 ;; Glances phones PyPI for weekly update checks by default.
15887 ;; Disable these. The user can re-enable them if desired.
15888 (substitute* "glances/outdated.py"
15889 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
15890 (string-append indentation
15891 "self.args.disable_check_update = True\n"
15892 line)))
15893 #t))))
15894 (build-system python-build-system)
15895 (propagated-inputs
15896 `(("python-future" ,python-future)
15897 ("python-psutil" ,python-psutil)))
15898 (home-page "https://github.com/nicolargo/glances")
15899 (synopsis "Cross-platform curses-based monitoring tool")
15900 (description
15901 "Glances is a curses-based monitoring tool for a wide variety of platforms.
15902 Glances uses the PsUtil library to get information from your system. It
15903 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
15904 (license license:lgpl3+)))
15905
15906 (define-public python-glances
15907 (deprecated-package "python-glances" glances))
15908
15909 (define-public python-graphql-core
15910 (package
15911 (name "python-graphql-core")
15912 (version "3.1.2")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "graphql-core" version))
15917 (sha256
15918 (base32
15919 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
15920 (build-system python-build-system)
15921 (arguments
15922 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
15923 #:phases
15924 (modify-phases %standard-phases
15925 (add-after 'unpack 'patch-hardcoded-version
15926 (lambda _ (substitute*
15927 "setup.py"
15928 (("'gevent==1.1rc1'") "'gevent'"))
15929 #t)))))
15930 (native-inputs
15931 `(("python-gevent" ,python-gevent)
15932 ("python-mock" ,python-mock)
15933 ("python-pytest-mock" ,python-pytest-mock)))
15934 (propagated-inputs
15935 `(("python-promise" ,python-promise)
15936 ("python-six" ,python-six)))
15937 (home-page "https://github.com/graphql-python/graphql-core")
15938 (synopsis "GraphQL implementation for Python")
15939 (description
15940 "GraphQL implementation for Python. GraphQL is a data query language and
15941 runtime designed and used to request and deliver data to mobile and web apps.
15942 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
15943 to Python.")
15944 (license license:expat)))
15945
15946 (define-public python-graphql-relay
15947 (package
15948 (name "python-graphql-relay")
15949 (version "0.4.5")
15950 (source
15951 (origin
15952 (method url-fetch)
15953 (uri (pypi-uri "graphql-relay" version))
15954 (sha256
15955 (base32
15956 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
15957 (build-system python-build-system)
15958 (arguments
15959 '(#:tests? #f)) ; The tests are not distributed
15960 (propagated-inputs
15961 `(("python-graphql-core" ,python-graphql-core)
15962 ("python-promise" ,python-promise)
15963 ("python-six" ,python-six)))
15964 (home-page "https://github.com/graphql-python/graphql-relay-py")
15965 (synopsis "Relay implementation for Python")
15966 (description
15967 "This is a library to allow the easy creation of Relay-compliant servers
15968 using the GraphQL Python reference implementation of a GraphQL server. It
15969 should be noted that the code is a exact port of the original
15970 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
15971 from Facebook.")
15972 (license license:expat)))
15973
15974 (define-public python-graphene
15975 (package
15976 (name "python-graphene")
15977 (version "0.10.2")
15978 (source
15979 (origin
15980 (method url-fetch)
15981 (uri (pypi-uri "graphene" version))
15982 (sha256
15983 (base32
15984 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
15985 (build-system python-build-system)
15986 (propagated-inputs
15987 `(("python-graphql-core" ,python-graphql-core)
15988 ("python-graphql-relay" ,python-graphql-relay)
15989 ("python-iso8601" ,python-iso8601)
15990 ("python-promise" ,python-promise)
15991 ("python-six" ,python-six)))
15992 (arguments
15993 `(#:tests? #f)) ; no tests/ in the PyPI tarball
15994 (home-page "https://graphene-python.org/")
15995 (synopsis "GraphQL Framework for Python")
15996 (description
15997 "Graphene is a Python library for building GraphQL schemas/types.
15998 A GraphQL schema describes your data model, and provides a GraphQL server
15999 with an associated set of resolve methods that know how to fetch data.")
16000 (license license:expat)))
16001
16002 (define-public python-nautilus
16003 (package
16004 (name "python-nautilus")
16005 (version "0.4.9")
16006 (source
16007 (origin
16008 (method url-fetch)
16009 (uri (pypi-uri "nautilus" version))
16010 (sha256
16011 (base32
16012 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
16013 (build-system python-build-system)
16014 (arguments `(#:tests? #f)) ; fails to import test modules
16015 (propagated-inputs
16016 `(("python-bcrypt" ,python-bcrypt)
16017 ("python-click" ,python-click)
16018 ("python-consul" ,python-consul)
16019 ("python-graphene" ,python-graphene)
16020 ("python-jinja2" ,python-jinja2)
16021 ("python-peewee" ,python-peewee)
16022 ("python-pika" ,python-pika)
16023 ("python-tornado" ,python-tornado)
16024 ("python-wtforms" ,python-wtforms)))
16025 (native-inputs
16026 `(("python-nose2" ,python-nose2)))
16027 (home-page "https://github.com/AlecAivazis/nautilus")
16028 (synopsis "Library for creating microservice applications")
16029 (description
16030 "Nautilus is a framework for flux based microservices that looks to
16031 provide extendible implementations of common aspects of a cloud so that you can
16032 focus on building massively scalable web applications.")
16033 (license license:expat)))
16034
16035 (define-public python-random2
16036 (package
16037 (name "python-random2")
16038 (version "1.0.1")
16039 (source (origin
16040 (method url-fetch)
16041 (uri (pypi-uri "random2" version ".zip"))
16042 (sha256
16043 (base32
16044 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
16045 (build-system python-build-system)
16046 (native-inputs `(("unzip" ,unzip)))
16047 (home-page "http://pypi.python.org/pypi/random2")
16048 (synopsis "Python 3 version of the Python 2 @code{random} module")
16049 (description
16050 "This package provides a Python 3 ported version of Python 2.7’s
16051 @code{random} module. It has also been back-ported to work in Python 2.6.
16052
16053 In Python 3, the implementation of @code{randrange()} was changed, so that
16054 even with the same seed you get different sequences in Python 2 and 3.
16055
16056 This package closes that gap, allowing stable random number generation
16057 between the different Python versions.")
16058 (license license:psfl)))
16059
16060 (define-public python2-random2
16061 (package-with-python2 python-random2))
16062
16063 (define-public python-snowballstemmer
16064 (package
16065 (name "python-snowballstemmer")
16066 (version "2.0.0")
16067 (source (origin
16068 (method url-fetch)
16069 (uri (pypi-uri "snowballstemmer" version))
16070 (sha256
16071 (base32
16072 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16073 (build-system python-build-system)
16074 (arguments
16075 `(;; No tests exist
16076 #:tests? #f))
16077 (home-page "https://github.com/shibukawa/snowball_py")
16078 (synopsis "Snowball stemming library collection for Python")
16079 (description "This package provides 16 word stemmer algorithms generated
16080 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16081 English stemmer.")
16082 (license license:bsd-3)))
16083
16084 (define-public python2-snowballstemmer
16085 (package-with-python2 python-snowballstemmer))
16086
16087 (define-public python-setproctitle
16088 (package
16089 (name "python-setproctitle")
16090 (version "1.1.10")
16091 (source
16092 (origin
16093 (method url-fetch)
16094 (uri (pypi-uri "setproctitle" version))
16095 (sha256
16096 (base32
16097 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16098 (build-system python-build-system)
16099 (arguments
16100 '(#:phases
16101 (modify-phases %standard-phases
16102 (add-before 'check 'patch-Makefile
16103 ;; Stricly this is only required for the python2 variant.
16104 ;; But adding a phase in an inherited package seems to be
16105 ;; cumbersum. So we patch even for python3.
16106 (lambda _
16107 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16108 (when nose
16109 (substitute* "Makefile"
16110 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16111 (string-append nose "/bin/nosetests "))))
16112 #t)))
16113 (replace 'check
16114 (lambda _
16115 (setenv "PYTHON" (or (which "python3") (which "python")))
16116 (setenv "PYCONFIG" (if (which "python3-config")
16117 "python3-config --embed"
16118 "python-config"))
16119 (setenv "CC" "gcc")
16120 ;; No need to extend PYTHONPATH to find the built package, since
16121 ;; the Makefile will build anyway
16122 (invoke "make" "check"))))))
16123 (native-inputs
16124 `(("procps" ,procps))) ; required for tests
16125 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16126 (synopsis
16127 "Setproctitle implementation for Python to customize the process title")
16128 (description "The library allows a process to change its title (as displayed
16129 by system tools such as ps and top).
16130
16131 Changing the title is mostly useful in multi-process systems, for
16132 example when a master process is forked: changing the children's title
16133 allows identifying the task each process is busy with. The technique
16134 is used by PostgreSQL and the OpenSSH Server for example.")
16135 (license license:bsd-3)
16136 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16137
16138 (define-public python2-setproctitle
16139 (let ((base (package-with-python2
16140 (strip-python2-variant python-setproctitle))))
16141 (package/inherit base
16142 (native-inputs `(("python2-nose" ,python2-nose)
16143 ,@(package-native-inputs base))))))
16144
16145 (define-public python-validictory
16146 (package
16147 (name "python-validictory")
16148 (version "1.0.1")
16149 (source
16150 (origin
16151 (method url-fetch)
16152 (uri (pypi-uri "validictory" version))
16153 (sha256
16154 (base32
16155 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16156 (build-system python-build-system)
16157 (arguments
16158 '(#:phases
16159 (modify-phases %standard-phases
16160 (add-after 'unpack 'bootstrap
16161 ;; Move the tests out of the package directory to avoid
16162 ;; packaging them.
16163 (lambda* _
16164 (rename-file "validictory/tests" "tests")
16165 (delete-file "tests/__init__.py")))
16166 (replace 'check
16167 (lambda _
16168 ;; Extend PYTHONPATH so the built package will be found.
16169 (setenv "PYTHONPATH"
16170 (string-append (getcwd) "/build/lib:"
16171 (getenv "PYTHONPATH")))
16172 (invoke "py.test" "-vv" ))))))
16173 (native-inputs
16174 `(("python-pytest" ,python-pytest)))
16175 (home-page
16176 "https://github.com/jamesturk/validictory")
16177 (synopsis "General purpose Python data validator")
16178 (description "It allows validation of arbitrary Python data structures.
16179
16180 The schema format is based on the JSON Schema
16181 proposal (http://json-schema.org), so combined with json the library is also
16182 useful as a validator for JSON data.")
16183 (license license:expat)))
16184
16185 (define-public python2-validictory
16186 (package-with-python2 python-validictory))
16187
16188 (define-public python-pyelftools
16189 (package
16190 (name "python-pyelftools")
16191 (version "0.25")
16192 (source
16193 (origin
16194 (method url-fetch)
16195 (uri (pypi-uri "pyelftools" version))
16196 (sha256
16197 (base32
16198 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
16199 (build-system python-build-system)
16200 (arguments
16201 `(#:phases
16202 (modify-phases %standard-phases
16203 (add-before 'check 'set-pythonpath
16204 (lambda _
16205 (setenv "PYTHONPATH"
16206 (string-append
16207 (getcwd) "/test/"
16208 ":" (getenv "PYTHONPATH")))
16209 #t)))))
16210 (home-page
16211 "https://github.com/eliben/pyelftools")
16212 (synopsis
16213 "Analyze binary and library file information")
16214 (description "This Python library provides interfaces for parsing and
16215 analyzing two binary and library file formats; the Executable and Linking
16216 Format (ELF), and debugging information in the Debugging With Attributed
16217 Record Format (DWARF).")
16218 (license license:public-domain)))
16219
16220 (define-public python-pyev
16221 (package
16222 (name "python-pyev")
16223 (version "0.9.0")
16224 (source
16225 (origin
16226 (method url-fetch)
16227 (uri (pypi-uri "pyev" version))
16228 (sha256
16229 (base32
16230 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
16231 (build-system python-build-system)
16232 (arguments
16233 `(#:tests? #f ; no test suite
16234 #:phases
16235 (modify-phases %standard-phases
16236 (add-after 'unpack 'patch
16237 (lambda* (#:key inputs #:allow-other-keys)
16238 (let ((libev (string-append (assoc-ref inputs "libev")
16239 "/lib/libev.so.4")))
16240 (substitute* "setup.py"
16241 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
16242 (string-append "libev_dll_name = \"" libev "\"")))))))))
16243 (inputs
16244 `(("libev" ,libev)))
16245 (home-page "https://github.com/gabrielfalcao/pyev")
16246 (synopsis "Python libev interface")
16247 (description "Pyev provides a Python interface to libev.")
16248 (license license:gpl3)))
16249
16250 (define-public python2-pyev
16251 (package-with-python2 python-pyev))
16252
16253 (define-public python-imagesize
16254 (package
16255 (name "python-imagesize")
16256 (version "1.2.0")
16257 (source
16258 (origin
16259 (method url-fetch)
16260 (uri (pypi-uri "imagesize" version))
16261 (sha256
16262 (base32
16263 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
16264 (build-system python-build-system)
16265 (home-page "https://github.com/shibukawa/imagesize_py")
16266 (synopsis "Gets image size of files in various formats in Python")
16267 (description
16268 "This package allows determination of image size from
16269 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
16270 (license license:expat)))
16271
16272 (define-public python2-imagesize
16273 (package-with-python2 python-imagesize))
16274
16275 (define-public python-termstyle
16276 (package
16277 (name "python-termstyle")
16278 (version "0.1.11")
16279 (source
16280 (origin
16281 (method url-fetch)
16282 (uri (pypi-uri "termstyle" version))
16283 (sha256
16284 (base32
16285 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
16286 (build-system python-build-system)
16287 (arguments
16288 '(#:phases
16289 (modify-phases %standard-phases
16290 (replace 'check
16291 (lambda _
16292 (invoke "python" "test3.py"))))))
16293 (home-page "https://github.com/gfxmonk/termstyle")
16294 (synopsis "Console text coloring for Python")
16295 (description "This package provides console text coloring for Python.")
16296 (license license:bsd-3)))
16297
16298 (define-public python-argcomplete
16299 (package
16300 (name "python-argcomplete")
16301 (version "1.11.1")
16302 (source
16303 (origin
16304 (method url-fetch)
16305 (uri (pypi-uri "argcomplete" version))
16306 (sha256
16307 (base32
16308 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
16309 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
16310 (build-system python-build-system)
16311 (native-inputs
16312 `(("python-coverage" ,python-coverage)
16313 ("python-flake8" ,python-flake8)
16314 ("python-pexpect" ,python-pexpect)
16315 ("python-wheel" ,python-wheel)
16316 ("tcsh" ,tcsh)
16317 ("fish" ,fish)
16318 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
16319 (home-page "https://github.com/kislyuk/argcomplete")
16320 (synopsis "Shell tab completion for Python argparse")
16321 (description "argcomplete provides extensible command line tab completion
16322 of arguments and options for Python scripts using @code{argparse}. It's
16323 particularly useful for programs with many options or sub-parsers that can
16324 dynamically suggest completions; for example, when browsing resources over the
16325 network.")
16326 (license license:asl2.0)
16327 (properties `((python2-variant . ,(delay python2-argcomplete))))))
16328
16329 (define-public python2-argcomplete
16330 (let ((variant (package-with-python2
16331 (strip-python2-variant python-argcomplete))))
16332 (package/inherit variant
16333 (arguments
16334 (substitute-keyword-arguments (package-arguments variant)
16335 ((#:phases phases '%standard-phases)
16336 `(modify-phases ,phases
16337 (add-after 'unpack 'set-my-HOME
16338 (lambda _ (setenv "HOME" "/tmp")))))))
16339 (native-inputs
16340 `(("python2-importlib-metadata" ,python2-importlib-metadata)
16341 ,@(package-native-inputs variant))))))
16342
16343 (define-public python-csscompressor
16344 (package
16345 (name "python-csscompressor")
16346 (version "0.9.5")
16347 (source
16348 (origin
16349 (method url-fetch)
16350 (uri (pypi-uri "csscompressor" version))
16351 (sha256
16352 (base32
16353 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
16354 (build-system python-build-system)
16355 (arguments
16356 '(#:phases
16357 (modify-phases %standard-phases
16358 (replace 'check
16359 (lambda _
16360 (invoke "py.test"))))))
16361 (native-inputs
16362 `(("python-pytest" ,python-pytest)))
16363 (home-page "https://github.com/sprymix/csscompressor")
16364 (synopsis "Python port of YUI CSS Compressor")
16365 (description
16366 "This package provides a python port of YUI CSS Compressor.")
16367 (license license:bsd-3)))
16368
16369 (define-public python-rcssmin
16370 (package
16371 (name "python-rcssmin")
16372 (version "1.0.6")
16373 (source
16374 (origin
16375 (method url-fetch)
16376 (uri (pypi-uri "rcssmin" version))
16377 (sha256
16378 (base32
16379 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
16380 (build-system python-build-system)
16381 (arguments
16382 '(#:phases
16383 (modify-phases %standard-phases
16384 (replace 'check
16385 (lambda _
16386 (invoke "python" "run_tests.py" "tests"))))))
16387 (home-page "http://opensource.perlig.de/rcssmin/")
16388 (synopsis "CSS Minifier")
16389 (description "The minifier is based on the semantics of the YUI compressor,
16390 which itself is based on the rule list by Isaac Schlueter.")
16391 (license license:asl2.0)))
16392
16393 (define-public python-rjsmin
16394 (package
16395 (name "python-rjsmin")
16396 (version "1.1.0")
16397 (source
16398 (origin
16399 (method url-fetch)
16400 (uri (pypi-uri "rjsmin" version))
16401 (sha256
16402 (base32
16403 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
16404 (modules '((guix build utils)))
16405 (snippet
16406 '(begin
16407 (for-each delete-file (find-files "bench" "\\.js$"))
16408 #t))))
16409 (build-system python-build-system)
16410 (arguments
16411 '(#:tests? #f ; Not all test files included.
16412 #:phases
16413 (modify-phases %standard-phases
16414 (replace 'check
16415 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16416 (add-installed-pythonpath inputs outputs)
16417 (if tests?
16418 (invoke "py.test" "-vv" "tests")
16419 #t))))))
16420 (native-inputs
16421 `(("python-pytest" ,python-pytest)))
16422 (home-page "http://opensource.perlig.de/rjsmin/")
16423 (synopsis "Javascript Minifier")
16424 (description "@code{rJSmin} is a javascript minifier written in Python. The
16425 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
16426 is a re-implementation aiming for speed, so it can be used at runtime (rather
16427 than during a preprocessing step).")
16428 (license license:asl2.0)))
16429
16430 (define-public python-xopen
16431 (package
16432 (name "python-xopen")
16433 (version "0.5.0")
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (pypi-uri "xopen" version))
16438 (sha256
16439 (base32
16440 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
16441 (build-system python-build-system)
16442 (propagated-inputs
16443 `(("python-setuptools-scm" ,python-setuptools-scm)))
16444 (home-page "https://github.com/marcelm/xopen/")
16445 (synopsis "Open compressed files transparently")
16446 (description "This module provides an @code{xopen} function that works like
16447 Python's built-in @code{open} function, but can also deal with compressed files.
16448 Supported compression formats are gzip, bzip2 and, xz, and are automatically
16449 recognized by their file extensions. The focus is on being as efficient as
16450 possible on all supported Python versions.")
16451 (license license:expat)))
16452
16453 (define-public python2-xopen
16454 (let ((base (package-with-python2
16455 (strip-python2-variant python-xopen))))
16456 (package/inherit base
16457 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
16458 ,@(package-propagated-inputs base))))))
16459
16460 (define-public python-cheetah
16461 (package
16462 (name "python-cheetah")
16463 (version "3.2.4")
16464 (source
16465 (origin
16466 (method url-fetch)
16467 (uri (pypi-uri "Cheetah3" version))
16468 (sha256
16469 (base32
16470 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
16471 (build-system python-build-system)
16472 (arguments
16473 `(#:modules ((guix build utils)
16474 (guix build python-build-system)
16475 (ice-9 ftw)
16476 (srfi srfi-1)
16477 (srfi srfi-26))
16478 #:phases (modify-phases %standard-phases
16479 (add-after 'unpack 'use-absolute-python
16480 (lambda _
16481 (substitute* "Cheetah/CheetahWrapper.py"
16482 (("#!/usr/bin/env python")
16483 (string-append "#!" (which "python"))))
16484 #t))
16485 (add-after 'unpack 'fix-tests
16486 (lambda _
16487 (substitute* "Cheetah/Tests/ImportHooks.py"
16488 (("os.path.dirname\\(__file__\\)")
16489 (string-append "'" (getcwd) "/Cheetah/Tests'")))
16490 #t))
16491 (replace 'check
16492 (lambda _
16493 (let ((cwd (getcwd)))
16494 (setenv "PYTHONPATH"
16495 (string-append
16496 cwd "/build/"
16497 (find (cut string-prefix? "lib" <>)
16498 (scandir (string-append cwd "/build")))
16499 ":" (getenv "PYTHONPATH")))
16500 (setenv "PATH"
16501 (string-append (getenv "PATH")
16502 ":" cwd "/bin"))
16503 (setenv "TMPDIR" "/tmp")
16504
16505 (substitute* "Cheetah/Tests/Test.py"
16506 (("unittest.TextTestRunner\\(\\)")
16507 "unittest.TextTestRunner(verbosity=2)"))
16508
16509 (invoke "python" "Cheetah/Tests/Test.py")))))))
16510 (propagated-inputs
16511 `(("python-markdown" ,python-markdown))) ;optional
16512 (home-page "https://cheetahtemplate.org/")
16513 (synopsis "Template engine")
16514 (description "Cheetah is a text-based template engine and Python code
16515 generator.
16516
16517 Cheetah can be used as a standalone templating utility or referenced as
16518 a library from other Python applications. It has many potential uses,
16519 but web developers looking for a viable alternative to ASP, JSP, PHP and
16520 PSP are expected to be its principle user group.
16521
16522 Features:
16523 @enumerate
16524 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
16525 text-based format.
16526 @item Cleanly separates content, graphic design, and program code.
16527 @item Blends the power and flexibility of Python with a simple template language
16528 that non-programmers can understand.
16529 @item Gives template writers full access to any Python data structure, module,
16530 function, object, or method in their templates.
16531 @item Makes code reuse easy by providing an object-orientated interface to
16532 templates that is accessible from Python code or other Cheetah templates.
16533 One template can subclass another and selectively reimplement sections of it.
16534 @item Provides a simple, yet powerful, caching mechanism that can dramatically
16535 improve the performance of a dynamic website.
16536 @item Compiles templates into optimized, yet readable, Python code.
16537 @end enumerate")
16538 (license (license:x11-style "file://LICENSE"))))
16539
16540 (define-public python2-cheetah
16541 (package-with-python2 python-cheetah))
16542
16543 (define-public python-dulwich
16544 (package
16545 (name "python-dulwich")
16546 (version "0.19.16")
16547 (source
16548 (origin
16549 (method url-fetch)
16550 (uri (list (string-append "https://www.dulwich.io/releases/"
16551 "dulwich-" version ".tar.gz")
16552 (pypi-uri "dulwich" version)))
16553 (sha256
16554 (base32
16555 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
16556 (build-system python-build-system)
16557 (arguments
16558 `(#:phases
16559 (modify-phases %standard-phases
16560 (add-before 'check 'fix-tests
16561 (lambda* (#:key inputs #:allow-other-keys)
16562 ;; The tests use Popen with a custom environment which doesn't
16563 ;; include PATH.
16564 (substitute* "dulwich/tests/compat/utils.py"
16565 (("'git'") (string-append "'"
16566 (which "git")
16567 "'")))
16568 (substitute* '("dulwich/tests/test_repository.py"
16569 "dulwich/tests/test_hooks.py")
16570 (("#!/bin/sh") (string-append "#!" (which "sh"))))
16571 (setenv "TEST_RUNNER" "unittest")
16572 (setenv "PYTHONHASHSEED" "random")
16573 #t)))))
16574 (propagated-inputs
16575 `(("python-fastimport" ,python-fastimport)
16576 ("python-urllib3" ,python-urllib3)))
16577 (native-inputs
16578 `(("python-mock" ,python-mock)
16579 ("python-geventhttpclient" ,python-geventhttpclient)
16580 ("git" ,git)))
16581 (home-page "https://www.dulwich.io/")
16582 (synopsis "Git implementation in Python")
16583 (description "Dulwich is an implementation of the Git file formats and
16584 protocols written in pure Python.")
16585 ;; Can be used with either license.
16586 (license (list license:asl2.0 license:gpl2+))))
16587
16588 (define-public python-pbkdf2
16589 (package
16590 (name "python-pbkdf2")
16591 (version "1.3")
16592 (source
16593 (origin
16594 (method url-fetch)
16595 (uri (pypi-uri "pbkdf2" version))
16596 (sha256
16597 (base32
16598 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
16599 (build-system python-build-system)
16600 (arguments
16601 '(#:phases
16602 (modify-phases %standard-phases
16603 (replace 'check
16604 (lambda _
16605 (setenv "PYTHONPATH"
16606 (string-append (getcwd) "/build/lib:"
16607 (getenv "PYTHONPATH")))
16608 (invoke "python" "test/test_pbkdf2.py"))))))
16609 (propagated-inputs
16610 `(("python-pycrypto" ,python-pycrypto))) ; optional
16611 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
16612 (synopsis "Password-based key derivation")
16613 (description "This module implements the password-based key derivation
16614 function, PBKDF2, specified in RSA PKCS#5 v2.0.
16615
16616 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
16617 is part of the RSA Public Key Cryptography Standards series. The provided
16618 implementation takes a password or a passphrase and a salt value (and
16619 optionally a iteration count, a digest module, and a MAC module) and provides
16620 a file-like object from which an arbitrarily-sized key can be read.")
16621 (license license:expat)))
16622
16623 (define-public python2-pbkdf2
16624 (package-with-python2 python-pbkdf2))
16625
16626 (define-public python-qrcode
16627 (package
16628 (name "python-qrcode")
16629 (version "6.1")
16630 (source
16631 (origin
16632 (method url-fetch)
16633 (uri (pypi-uri "qrcode" version))
16634 (sha256
16635 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
16636 (build-system python-build-system)
16637 (arguments
16638 ;; FIXME: Tests require packaging 'pymaging'.
16639 '(#:tests? #f))
16640 (propagated-inputs
16641 `(("python-lxml" ,python-lxml) ; for SVG output
16642 ("python-pillow" ,python-pillow) ; for PNG output
16643 ("python-six" ,python-six)))
16644 (home-page "https://github.com/lincolnloop/python-qrcode")
16645 (synopsis "QR Code image generator")
16646 (description "This package provides a pure Python QR Code generator
16647 module. It uses the Python Imaging Library (PIL) to allow for the generation
16648 of QR Codes.
16649
16650 In addition this package provides a command line tool to generate QR codes and
16651 either write these QR codes to a file or do the output as ascii art at the
16652 console.")
16653 (license license:bsd-3)))
16654
16655 (define-public python2-qrcode
16656 (package-with-python2 python-qrcode))
16657
16658 (define-public python-rst2ansi
16659 (package
16660 (name "python-rst2ansi")
16661 (version "0.1.5")
16662 (source
16663 (origin
16664 (method url-fetch)
16665 (uri (pypi-uri "rst2ansi" version))
16666 (sha256
16667 (base32
16668 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
16669 (build-system python-build-system)
16670 (propagated-inputs
16671 `(("python-docutils" ,python-docutils)))
16672 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
16673 (synopsis "Convert RST to ANSI-decorated console output")
16674 (description
16675 "Python module dedicated to rendering RST (reStructuredText) documents
16676 to ansi-escaped strings suitable for display in a terminal.")
16677 (license license:expat)))
16678
16679 (define-public python-ansi2html
16680 (package
16681 (name "python-ansi2html")
16682 (version "1.2.0")
16683 (source
16684 (origin
16685 (method url-fetch)
16686 (uri (pypi-uri "ansi2html" version))
16687 (sha256
16688 (base32
16689 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
16690 (build-system python-build-system)
16691 (native-inputs
16692 `(("python-mock" ,python-mock)
16693 ("python-nose" ,python-nose)))
16694 (propagated-inputs
16695 `(("python-six" ,python-six)))
16696 (home-page "https://github.com/ralphbean/ansi2html")
16697 (synopsis "Convert ANSI-decorated console output to HTML")
16698 (description
16699 "@command{ansi2html} is a Python library and command line utility for
16700 converting text with ANSI color codes to HTML or LaTeX.")
16701 (license license:gpl3+)))
16702
16703 (define-public python2-ansi2html
16704 (package-with-python2 python-ansi2html))
16705
16706 (define-public python-easy-ansi
16707 (package
16708 (name "python-easy-ansi")
16709 (version "0.3")
16710 (source
16711 (origin
16712 (method git-fetch)
16713 (uri (git-reference
16714 (url "https://gitlab.com/joeysbytes/easy-ansi")
16715 (commit (string-append "v" version))))
16716 (file-name (git-file-name name version))
16717 (sha256
16718 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
16719 (build-system python-build-system)
16720 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
16721 (synopsis "Terminal framework API")
16722 (description
16723 "Easy ANSI is a terminal framework API to give you an easy way to use
16724 colors, cursor control movements, and line/box drawing. It is not meant as a
16725 replacement to more full-featured frameworks (such as curses or urwid), but as
16726 a tool to quickly create nice-looking screens in your terminal window. You
16727 can even create animations with the cursor controls.")
16728 (license license:expat)))
16729
16730 (define-public python-ddt
16731 (package
16732 (name "python-ddt")
16733 (version "1.4.2")
16734 (source
16735 (origin
16736 (method url-fetch)
16737 (uri (pypi-uri "ddt" version))
16738 (sha256
16739 (base32
16740 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
16741 (build-system python-build-system)
16742 (native-inputs
16743 `(("python-pytest" ,python-pytest)))
16744 (propagated-inputs
16745 `(("python-pyyaml" ,python-pyyaml)))
16746 (home-page "https://github.com/datadriventests/ddt")
16747 (synopsis "Data-Driven Tests")
16748 (description
16749 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
16750 running it with different test data, and make it appear as multiple test
16751 cases.")
16752 (license license:expat)))
16753
16754 (define-public python-pycountry
16755 (package
16756 (name "python-pycountry")
16757 (version "18.5.26")
16758 (source
16759 (origin
16760 (method url-fetch)
16761 (uri (pypi-uri "pycountry" version))
16762 (sha256
16763 (base32
16764 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
16765 (build-system python-build-system)
16766 (home-page "https://bitbucket.org/flyingcircus/pycountry")
16767 (synopsis "ISO databases for languages, countries, currencies, etc.")
16768 (description
16769 "@code{pycountry} provides the ISO databases for the standards:
16770 @enumerate
16771 @item 639-3 (Languages)
16772 @item 3166 (Countries)
16773 @item 3166-3 (Deleted Countries)
16774 @item 3166-2 (Subdivisions of countries)
16775 @item 4217 (Currencies)
16776 @item 15924 (Scripts)
16777 @end enumerate
16778 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
16779 through a Python API.")
16780 (license license:lgpl2.1+)))
16781
16782 (define-public python2-pycountry
16783 (package-with-python2 python-pycountry))
16784
16785 (define-public python-pycosat
16786 (package
16787 (name "python-pycosat")
16788 (version "0.6.3")
16789 (source
16790 (origin
16791 (method url-fetch)
16792 (uri (pypi-uri "pycosat" version ".zip"))
16793 (sha256
16794 (base32
16795 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
16796 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
16797 (build-system python-build-system)
16798 (native-inputs
16799 `(("unzip" ,unzip)))
16800 (home-page "https://github.com/ContinuumIO/pycosat")
16801 (synopsis "Bindings to picosat (a SAT solver)")
16802 (description
16803 "This package provides efficient Python bindings to @code{picosat} on
16804 the C level. When importing pycosat, the @code{picosat} solver becomes part
16805 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
16806 Problem} (SAT) solver.")
16807 (license license:expat)))
16808
16809 (define-public python2-pycosat
16810 (package-with-python2 python-pycosat))
16811
16812 (define-public python2-ruamel.ordereddict
16813 (package
16814 (name "python2-ruamel.ordereddict")
16815 (version "0.4.9")
16816 (source
16817 (origin
16818 (method url-fetch)
16819 (uri (pypi-uri "ruamel.ordereddict" version))
16820 (sha256
16821 (base32
16822 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
16823 (build-system python-build-system)
16824 (arguments
16825 `(#:python ,python-2
16826 #:phases
16827 (modify-phases %standard-phases
16828 (delete 'check)
16829 (add-after 'install 'check
16830 (lambda* (#:key inputs outputs #:allow-other-keys)
16831 (add-installed-pythonpath inputs outputs)
16832 (invoke "python" "test/testordereddict.py"))))))
16833 (home-page "https://bitbucket.org/ruamel/ordereddict")
16834 (synopsis "Version of dict that keeps keys in insertion order")
16835 (description
16836 "This is an implementation of an ordered dictionary with @dfn{Key
16837 Insertion Order} (KIO: updates of values do not affect the position of the
16838 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
16839 removed and put at the back). The standard library module @code{OrderedDict},
16840 implemented later, implements a subset of @code{ordereddict} functionality.
16841 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
16842 Order} (KSO, no sorting function can be specified, but a transform can be
16843 specified to apply on the key before comparison (e.g. @code{string.lower})).")
16844 (license license:expat)))
16845
16846 (define-public python-pypeg2
16847 (package
16848 (name "python-pypeg2")
16849 (version "2.15.2")
16850 (source
16851 (origin
16852 (method url-fetch)
16853 (uri (pypi-uri "pyPEG2" version))
16854 (sha256
16855 (base32
16856 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
16857 (build-system python-build-system)
16858 (propagated-inputs `(("python-lxml" ,python-lxml)))
16859 (arguments
16860 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
16861 '(#:tests? #f))
16862 (home-page "https://fdik.org/pyPEG/")
16863 (synopsis "Parsing Expression Grammars in Python")
16864 (description "PyPEG is an intrinsic parser interpreter framework for
16865 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
16866 parse many formal languages.")
16867 (license license:gpl2)))
16868
16869 (define-public python-incremental
16870 (package
16871 (name "python-incremental")
16872 (version "17.5.0")
16873 (source
16874 (origin
16875 (method url-fetch)
16876 (uri (pypi-uri "incremental" version))
16877 (sha256
16878 (base32
16879 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
16880 (build-system python-build-system)
16881 (home-page "https://github.com/hawkowl/incremental")
16882 (synopsis "Library for versioning Python projects")
16883 (description "Incremental is a small library that versions your Python
16884 projects.")
16885 (license license:expat)))
16886
16887 (define-public python2-incremental
16888 (package-with-python2 python-incremental))
16889
16890 (define-public python-invoke
16891 (package
16892 (name "python-invoke")
16893 (home-page "https://www.pyinvoke.org/")
16894 (version "1.5.0")
16895 (source (origin
16896 (method url-fetch)
16897 (uri (pypi-uri "invoke" version))
16898 (sha256
16899 (base32
16900 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
16901 (build-system python-build-system)
16902 (arguments
16903 ;; XXX: Requires many dependencies that are not yet in Guix.
16904 `(#:tests? #f
16905 #:phases
16906 (modify-phases %standard-phases
16907 (add-after 'unpack 'fix-bash-path
16908 (lambda* (#:key inputs #:allow-other-keys)
16909 (let ((bash (assoc-ref inputs "bash")))
16910 (substitute* "invoke/config.py"
16911 (("shell = \"/bin/bash\"")
16912 (string-append "shell = \"" bash "/bin/bash\""))
16913 )
16914 #t))))))
16915 (inputs
16916 `(("bash" ,bash-minimal)))
16917 (synopsis "Pythonic task execution")
16918 (description
16919 "Invoke is a Python task execution tool and library, drawing inspiration
16920 from various sources to arrive at a powerful and clean feature set. It is
16921 evolved from the Fabric project, but focuses on local and abstract concerns
16922 instead of servers and network commands.")
16923 (license license:bsd-3)))
16924
16925 (define-public python2-invoke
16926 (package-with-python2 python-invoke))
16927
16928 (define-public python-automat
16929 (package
16930 (name "python-automat")
16931 (version "20.2.0")
16932 (source (origin
16933 (method url-fetch)
16934 (uri (pypi-uri "Automat" version))
16935 (sha256
16936 (base32
16937 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
16938 (build-system python-build-system)
16939 ;; We disable the tests because they require python-twisted, while
16940 ;; python-twisted depends on python-automat. Twisted is optional, but the
16941 ;; tests fail if it is not available. Also see
16942 ;; <https://github.com/glyph/automat/issues/71>.
16943 (arguments '(#:tests? #f))
16944 (native-inputs
16945 `(("python-m2r" ,python-m2r)
16946 ("python-setuptools-scm" ,python-setuptools-scm)
16947 ("python-graphviz" ,python-graphviz)))
16948 (propagated-inputs
16949 `(("python-six" ,python-six)
16950 ("python-attrs" ,python-attrs)))
16951 (home-page "https://github.com/glyph/Automat")
16952 (synopsis "Self-service finite-state machines")
16953 (description "Automat is a library for concise, idiomatic Python
16954 expression of finite-state automata (particularly deterministic finite-state
16955 transducers).")
16956 (license license:expat)))
16957
16958 (define-public python2-automat
16959 (package-with-python2 python-automat))
16960
16961 (define-public python-m2r
16962 (package
16963 (name "python-m2r")
16964 (version "0.2.1")
16965 (source (origin
16966 (method url-fetch)
16967 (uri (pypi-uri "m2r" version))
16968 (sha256
16969 (base32
16970 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
16971 (build-system python-build-system)
16972 (propagated-inputs
16973 `(("python-docutils" ,python-docutils)
16974 ("python-mistune" ,python-mistune)))
16975 (native-inputs
16976 `(("python-pygments" ,python-pygments)
16977 ("python-mock" ,python-mock)))
16978 (home-page "https://github.com/miyakogi/m2r")
16979 (synopsis "Markdown to reStructuredText converter")
16980 (description "M2R converts a markdown file including reST markups to valid
16981 reST format.")
16982 (license license:expat)))
16983
16984 (define-public python2-m2r
16985 (package-with-python2 python-m2r))
16986
16987 (define-public python-constantly
16988 (package
16989 (name "python-constantly")
16990 (version "15.1.0")
16991 (source (origin
16992 (method url-fetch)
16993 (uri (pypi-uri "constantly" version))
16994 (sha256
16995 (base32
16996 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
16997 (build-system python-build-system)
16998 (home-page "https://github.com/twisted/constantly")
16999 (synopsis "Symbolic constants in Python")
17000 (description "Constantly is a Python library that provides symbolic
17001 constant support. It includes collections and constants with text, numeric,
17002 and bit flag values.")
17003 (license license:expat)))
17004
17005 (define-public python2-constantly
17006 (package-with-python2 python-constantly))
17007
17008 (define-public python-attrs
17009 (package
17010 (name "python-attrs")
17011 (version "21.2.0")
17012 (source (origin
17013 (method url-fetch)
17014 (uri (pypi-uri "attrs" version))
17015 (sha256
17016 (base32
17017 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
17018 (build-system python-build-system)
17019 (arguments
17020 `(#:modules ((guix build utils)
17021 (guix build python-build-system)
17022 (ice-9 ftw)
17023 (srfi srfi-1)
17024 (srfi srfi-26))
17025 #:phases
17026 (modify-phases %standard-phases
17027 (replace 'check
17028 (lambda* (#:key tests? #:allow-other-keys)
17029 (when tests?
17030 (let ((cwd (getcwd)))
17031 (setenv "PYTHONPATH"
17032 (string-append
17033 cwd "/build/"
17034 (find (cut string-prefix? "lib" <>)
17035 (scandir (string-append cwd "/build")))
17036 ":"
17037 (getenv "PYTHONPATH")))
17038 (invoke "python" "-m" "pytest"))))))))
17039 (native-inputs
17040 `(("python-coverage" ,python-coverage)
17041 ("python-hypothesis" ,python-hypothesis)
17042 ("python-pympler" ,python-pympler)
17043 ("python-pytest" ,python-pytest)
17044 ("python-six" ,python-six)
17045 ("python-sphinx" ,python-sphinx)
17046 ("python-zope-interface" ,python-zope-interface)))
17047 (home-page "https://github.com/python-attrs/attrs/")
17048 (synopsis "Attributes without boilerplate")
17049 (description "@code{attrs} is a Python package with class decorators that
17050 ease the chores of implementing the most common attribute-related object
17051 protocols.")
17052 (license license:expat)))
17053
17054 (define-public python2-attrs
17055 (package-with-python2 python-attrs))
17056
17057 (define-public python-attrs-bootstrap
17058 (package
17059 (inherit python-attrs)
17060 (name "python-attrs-bootstrap")
17061 (version "19.3.0")
17062 (source (origin
17063 (method url-fetch)
17064 (uri (pypi-uri "attrs" version))
17065 (sha256
17066 (base32
17067 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
17068 (native-inputs `())
17069 (arguments `(#:tests? #f))))
17070
17071 (define-public python2-attrs-bootstrap
17072 (package-with-python2 python-attrs-bootstrap))
17073
17074 (define-public python-cliapp
17075 (package
17076 (name "python-cliapp")
17077 (version "1.20180812.1")
17078 (source
17079 (origin
17080 (method url-fetch)
17081 (uri (string-append
17082 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17083 version ".tar.gz"))
17084 (sha256
17085 (base32
17086 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17087 (build-system python-build-system)
17088 (arguments
17089 `(;; XXX: The tests only do style and coverage checks, which
17090 ;; fails due to deprecation warnings, etc.
17091 #:tests? #f))
17092 (native-inputs
17093 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17094 ("python-pep8" ,python-pep8)))
17095 (propagated-inputs
17096 `(("python-pyaml" ,python-pyaml)))
17097 (home-page "https://liw.fi/cliapp/")
17098 (synopsis "Python framework for command line programs")
17099 (description "@code{cliapp} is a Python framework for command line
17100 programs. It contains the typical stuff such programs need to do, such
17101 as parsing the command line for options, and iterating over input files.")
17102 (license license:gpl2+)))
17103
17104 (define-public python2-cliapp
17105 (package-with-python2 python-cliapp))
17106
17107 (define-public python-ttystatus
17108 (package
17109 (name "python-ttystatus")
17110 (version "0.38")
17111 (source
17112 (origin
17113 (method git-fetch)
17114 (uri (git-reference
17115 (url "http://git.liw.fi/ttystatus")
17116 ;; There are no tags after ttystatus-0.36.
17117 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17118 (sha256
17119 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17120 (file-name (git-file-name name version))))
17121 (build-system python-build-system)
17122 (native-inputs
17123 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17124 ("python-pep8" ,python-pep8)))
17125 (arguments
17126 `(#:phases
17127 (modify-phases %standard-phases
17128 ;; check phase needs to be run before the build phase. If not,
17129 ;; coverage-test-runner looks for tests for the built source files,
17130 ;; and fails.
17131 (delete 'check)
17132 (add-before 'build 'check
17133 (lambda _ (invoke "make" "check"))))))
17134 (home-page "https://liw.fi/ttystatus/")
17135 (synopsis "Python library for showing progress reporting and
17136 status updates on terminals")
17137 (description "@code{ttystatus} is a Python library for showing progress
17138 reporting and status updates on terminals, for command line programs.
17139 Output is automatically adapted to the width of the terminal: truncated
17140 if it does not fit, and resized if the terminal size changes.")
17141 (license license:gpl3+)))
17142
17143 (define-public python2-ttystatus
17144 (package-with-python2 python-ttystatus))
17145
17146 (define-public python2-tracing
17147 (package
17148 (name "python2-tracing")
17149 (version "0.10")
17150 (source
17151 (origin
17152 (method url-fetch)
17153 (uri (string-append
17154 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17155 version ".tar.gz"))
17156 (sha256
17157 (base32
17158 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17159 (build-system python-build-system)
17160 (arguments
17161 `(#:python ,python-2))
17162 (home-page "https://liw.fi/tracing/")
17163 (synopsis "Python debug logging helper")
17164 (description "@code{python2-tracing} is a python library for
17165 logging debug messages. It provides a way to turn debugging messages
17166 on and off, based on the filename they occur in. It is much faster
17167 than using @code{logging.Filter} to accomplish the same thing, which
17168 matters when code is run in production mode. The actual logging still
17169 happens using the @code{logging} library.")
17170 (license license:gpl3+)))
17171
17172 (define-public python-astroid
17173 (package
17174 (name "python-astroid")
17175 (version "2.4.2")
17176 (source
17177 (origin
17178 (method url-fetch)
17179 (uri (pypi-uri "astroid" version))
17180 (sha256
17181 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
17182 (modules '((guix build utils)))
17183 (snippet
17184 '(begin
17185 ;; Check to see if the version pinning has been removed.
17186 (substitute* "astroid/__pkginfo__.py"
17187 (("==1\\.4\\.\\*") ">=1.4.0"))
17188 #t))))
17189 (build-system python-build-system)
17190 (propagated-inputs
17191 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17192 ("python-six" ,python-six)
17193 ("python-wrapt" ,python-wrapt)))
17194 (native-inputs
17195 `(("python-dateutil" ,python-dateutil)
17196 ("python-pytest" ,python-pytest)
17197 ("python-pytest-runner" ,python-pytest-runner)))
17198 (home-page "https://github.com/PyCQA/astroid")
17199 (synopsis "Common base representation of python source code for pylint and
17200 other projects")
17201 (description "@code{python-astroid} provides a common base representation
17202 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17203
17204 It provides a compatible representation which comes from the _ast module. It
17205 rebuilds the tree generated by the builtin _ast module by recursively walking
17206 down the AST and building an extended ast. The new node classes have
17207 additional methods and attributes for different usages. They include some
17208 support for static inference and local name scopes. Furthermore, astroid
17209 builds partial trees by inspecting living objects.")
17210 (license license:lgpl2.1+)
17211 (properties `((python2-variant . ,(delay python2-astroid))))))
17212
17213 (define-public python2-astroid
17214 (let ((base (package-with-python2
17215 (strip-python2-variant python-astroid))))
17216 (package (inherit base)
17217 ;; Version 2.x removes python2 support.
17218 (version "1.6.5")
17219 (source
17220 (origin
17221 (method url-fetch)
17222 (uri (pypi-uri "astroid" version))
17223 (sha256
17224 (base32
17225 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17226 (arguments
17227 (substitute-keyword-arguments (package-arguments base)
17228 ((#:phases phases)
17229 `(modify-phases ,phases
17230 (add-after 'unpack 'remove-spurious-test
17231 (lambda _
17232 ;; https://github.com/PyCQA/astroid/issues/276
17233 (delete-file "astroid/tests/unittest_brain.py")
17234 #t))
17235 (replace 'check
17236 (lambda _
17237 (invoke"python" "-m" "unittest" "discover"
17238 "-p" "unittest*.py")))))))
17239 (native-inputs `())
17240 (propagated-inputs
17241 `(("python2-backports-functools-lru-cache"
17242 ,python2-backports-functools-lru-cache)
17243 ("python2-enum34" ,python2-enum34)
17244 ("python2-singledispatch" ,python2-singledispatch)
17245 ,@(alist-delete "python-typed-ast"
17246 (package-propagated-inputs base)))))))
17247
17248 (define-public python-isbnlib
17249 (package
17250 (name "python-isbnlib")
17251 (version "3.10.4")
17252 (source
17253 (origin
17254 (method url-fetch)
17255 (uri (pypi-uri "isbnlib" version))
17256 (sha256
17257 (base32
17258 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
17259 (build-system python-build-system)
17260 (arguments '(#:tests? #f)) ; No test
17261 (home-page "https://github.com/xlcnd/isbnlib")
17262 (synopsis "Python library to work with ISBN strings")
17263 (description "@code{python-isbnlib} is a (pure) python library that provides
17264 several useful methods and functions to validate, clean, transform, hyphenate and
17265 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
17266 version, is suitable to be include as a dependency in other projects.")
17267 (license license:lgpl3+)))
17268
17269 (define-public python-isort
17270 (package
17271 (name "python-isort")
17272 (version "4.3.4")
17273 (source
17274 (origin
17275 (method git-fetch)
17276 (uri (git-reference
17277 ;; Tests pass only from the Github sources
17278 (url "https://github.com/timothycrosley/isort")
17279 (commit version)))
17280 (file-name (git-file-name name version))
17281 (sha256
17282 (base32
17283 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
17284 (build-system python-build-system)
17285 (native-inputs
17286 `(("python-mock" ,python-mock)
17287 ("python-pytest" ,python-pytest)))
17288 (home-page "https://github.com/timothycrosley/isort")
17289 (synopsis "Python utility/library to sort python imports")
17290 (description "@code{python-isort} is a python utility/library to sort
17291 imports alphabetically, and automatically separated into sections. It
17292 provides a command line utility, a python library and plugins for various
17293 editors.")
17294 (license license:expat)
17295 (properties `((python2-variant . ,(delay python2-isort))))))
17296
17297 (define-public python2-isort
17298 (let ((base (package-with-python2
17299 (strip-python2-variant python-isort))))
17300 (package/inherit base
17301 (native-inputs
17302 `(("python2-futures" ,python2-futures)
17303 ,@(package-native-inputs base))))))
17304
17305 (define-public python2-backports-functools-lru-cache
17306 (package
17307 (name "python2-backports-functools-lru-cache")
17308 (version "1.6.1")
17309 (source
17310 (origin
17311 (method url-fetch)
17312 ;; only the pypi tarballs contain the necessary metadata
17313 (uri (pypi-uri "backports.functools_lru_cache" version))
17314 (sha256
17315 (base32
17316 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
17317 (build-system python-build-system)
17318 (native-inputs
17319 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
17320 (arguments
17321 `(#:python ,python-2))
17322 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
17323 (synopsis "Backport of functools.lru_cache from Python 3.3")
17324 (description "@code{python2-backports-functools-lru-cache} is a backport
17325 of @code{functools.lru_cache} from python 3.3.")
17326 (license license:expat)))
17327
17328 (define-public python-configparser
17329 (package
17330 (name "python-configparser")
17331 (version "4.0.2")
17332 (source
17333 (origin
17334 (method url-fetch)
17335 (uri (pypi-uri "configparser" version))
17336 (sha256
17337 (base32
17338 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
17339 (native-inputs
17340 `(("python-setuptools_scm" ,python-setuptools-scm)))
17341 (build-system python-build-system)
17342 (home-page "https://github.com/jaraco/configparser/")
17343 (synopsis "Backport of configparser from python 3.5")
17344 (description "@code{python-configparser} is a backport of
17345 @code{configparser} from Python 3.5 so that it can be used directly
17346 in other versions.")
17347 (license license:expat)))
17348
17349 (define-public python2-configparser
17350 (package-with-python2 python-configparser))
17351
17352 (define-public python-iniconfig
17353 (package
17354 (name "python-iniconfig")
17355 (version "1.1.1")
17356 (source
17357 (origin
17358 (method url-fetch)
17359 (uri (pypi-uri "iniconfig" version))
17360 (sha256
17361 (base32
17362 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
17363 (build-system python-build-system)
17364 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
17365 (synopsis "Simple INI-file parser")
17366 (description "The @code{iniconfig} package provides a small and simple
17367 INI-file parser module having a unique set of features; @code{iniconfig}
17368 @itemize
17369 @item maintains the order of sections and entries;
17370 @item supports multi-line values with or without line-continuations;
17371 @item supports \"#\" comments everywhere;
17372 @item raises errors with proper line-numbers;
17373 @item raises an error when two sections have the same name.
17374 @end itemize")
17375 (license license:expat)))
17376
17377 (define-public python-mamba
17378 (package
17379 (name "python-mamba")
17380 (version "0.11.2")
17381 (source (origin
17382 (method url-fetch)
17383 (uri (pypi-uri "mamba" version))
17384 (sha256
17385 (base32
17386 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
17387 (build-system python-build-system)
17388 (arguments `(#:tests? #f)) ; No test
17389 (propagated-inputs
17390 `(("python-clint" ,python-clint)
17391 ("python-coverage" ,python-coverage)))
17392 (home-page "https://nestorsalceda.com/mamba/")
17393 (synopsis "Test runner for Python")
17394 (description
17395 "Mamba is a Behaviour-Driven Development tool for Python developers.
17396 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
17397 (license license:expat)))
17398
17399 (define-public python-mando
17400 (package
17401 (name "python-mando")
17402 (version "0.6.4")
17403 (source (origin
17404 (method url-fetch)
17405 (uri (pypi-uri "mando" version))
17406 (sha256
17407 (base32
17408 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
17409 (build-system python-build-system)
17410 (propagated-inputs
17411 `(("python-rst2ansi" ,python-rst2ansi)
17412 ("python-six" ,python-six)))
17413 (native-inputs
17414 `(("python-pytest" ,python-pytest)))
17415 (home-page "https://mando.readthedocs.org/")
17416 (synopsis
17417 "Wrapper around argparse, allowing creation of complete CLI applications")
17418 (description
17419 "This package is a wrapper around argparse, allowing you to write complete CLI
17420 applications in seconds while maintaining all the flexibility.")
17421 (license license:expat)))
17422
17423 (define-public python2-mando
17424 (package-with-python2 python-mando))
17425
17426 (define-public python2-argparse
17427 (package
17428 (name "python2-argparse")
17429 (version "1.4.0")
17430 (source
17431 (origin
17432 (method url-fetch)
17433 (uri (pypi-uri "argparse" version))
17434 (sha256
17435 (base32
17436 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
17437 (build-system python-build-system)
17438 (arguments
17439 `(#:python ,python-2))
17440 (home-page "https://github.com/ThomasWaldmann/argparse/")
17441 (synopsis "Python command-line parsing library")
17442 (description
17443 "This package is mostly for people who want to have @code{argparse} on
17444 older Pythons because it was not part of the standard library back then.")
17445 (license license:psfl)))
17446
17447 (define-public python-fudge
17448 (package
17449 (name "python-fudge")
17450 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
17451 ;; package, which is currently the only use of this package.
17452 (version "0.9.6")
17453 (source
17454 (origin
17455 (method url-fetch)
17456 (uri (pypi-uri "fudge" version))
17457 (sha256
17458 (base32
17459 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
17460 (build-system python-build-system)
17461 (arguments
17462 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
17463 (home-page "https://github.com/fudge-py/fudge")
17464 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
17465 (description
17466 "Fudge is a Python module for using fake objects (mocks and stubs) to
17467 test real ones.
17468
17469 In readable Python code, you declare the methods available on your fake object
17470 and how they should be called. Then you inject that into your application and
17471 start testing. This declarative approach means you don’t have to record and
17472 playback actions and you don’t have to inspect your fakes after running code.
17473 If the fake object was used incorrectly then you’ll see an informative
17474 exception message with a traceback that points to the culprit.")
17475 (license license:expat)))
17476
17477 (define-public python2-fudge
17478 (package-with-python2 python-fudge))
17479
17480 (define-public python-mwclient
17481 (package
17482 (name "python-mwclient")
17483 (version "0.10.1")
17484 (source
17485 (origin
17486 (method git-fetch)
17487 ;; The PyPI version wouldn't contain tests.
17488 (uri (git-reference
17489 (url "https://github.com/mwclient/mwclient")
17490 (commit (string-append "v" version))))
17491 (file-name (git-file-name name version))
17492 (sha256
17493 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
17494 (build-system python-build-system)
17495 (propagated-inputs
17496 `(("python-requests-oauthlib" ,python-requests-oauthlib)
17497 ("python-six" ,python-six)))
17498 (native-inputs
17499 `(("python-mock" ,python-mock)
17500 ("python-pytest" ,python-pytest)
17501 ("python-pytest-cov" ,python-pytest-cov)
17502 ("python-pytest-runner" ,python-pytest-runner)
17503 ("python-responses" ,python-responses)))
17504 (home-page "https://github.com/btongminh/mwclient")
17505 (synopsis "MediaWiki API client")
17506 (description "This package provides a MediaWiki API client.")
17507 (license license:expat)))
17508
17509 (define-public python-utils
17510 (package
17511 (name "python-utils")
17512 (version "2.4.0")
17513 (source (origin
17514 (method url-fetch)
17515 (uri (pypi-uri "python-utils" version))
17516 (sha256
17517 (base32
17518 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
17519 (build-system python-build-system)
17520 (arguments
17521 `(#:phases
17522 (modify-phases %standard-phases
17523 (replace 'check
17524 (lambda* (#:key inputs outputs #:allow-other-keys)
17525 (add-installed-pythonpath inputs outputs)
17526 (delete-file "pytest.ini")
17527 (invoke "pytest" "-vv"))))))
17528 (native-inputs
17529 `(("pytest-runner" ,python-pytest-runner)
17530 ("pytest" ,python-pytest)
17531 ("six" ,python-six)))
17532 (home-page "https://github.com/WoLpH/python-utils")
17533 (synopsis "Convenient utilities not included with the standard Python install")
17534 (description
17535 "Python Utils is a collection of small Python functions and classes which
17536 make common patterns shorter and easier.")
17537 (license license:bsd-2)))
17538
17539 (define-public python-diff-match-patch
17540 (package
17541 (name "python-diff-match-patch")
17542 (version "20121119")
17543 (source
17544 (origin
17545 (method url-fetch)
17546 (uri (pypi-uri "diff-match-patch" version))
17547 (sha256
17548 (base32
17549 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
17550 (build-system python-build-system)
17551 (home-page "https://code.google.com/p/google-diff-match-patch")
17552 (synopsis "Synchronize plain text")
17553 (description "Diff Match and Patch libraries offer robust algorithms to
17554 perform the operations required for synchronizing plain text.")
17555 (license license:asl2.0)))
17556
17557 (define-public python2-diff-match-patch
17558 (package-with-python2 python-diff-match-patch))
17559
17560 (define-public python-dirsync
17561 (package
17562 (name "python-dirsync")
17563 (version "2.2.5")
17564 (source
17565 (origin
17566 (method url-fetch)
17567 (uri (pypi-uri "dirsync" version))
17568 (sha256
17569 (base32
17570 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
17571 (build-system python-build-system)
17572 (propagated-inputs
17573 `(("six" ,python-six)))
17574 (home-page "https://github.com/tkhyn/dirsync")
17575 (synopsis "Advanced directory tree synchronisation tool")
17576 (description "Advanced directory tree synchronisation tool.")
17577 (license license:expat)))
17578
17579 (define-public python2-dirsync
17580 (package-with-python2 python-dirsync))
17581
17582 (define-public python-levenshtein
17583 (package
17584 (name "python-levenshtein")
17585 (version "0.12.0")
17586 (source
17587 (origin
17588 (method url-fetch)
17589 (uri (pypi-uri "python-Levenshtein" version))
17590 (sha256
17591 (base32
17592 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
17593 (build-system python-build-system)
17594 (home-page "https://github.com/ztane/python-Levenshtein")
17595 (synopsis "Fast computation of Levenshtein distance and string similarity")
17596 (description
17597 "The Levenshtein Python C extension module contains functions for fast computation of
17598 @enumerate
17599 @item Levenshtein (edit) distance, and edit operations
17600 @item string similarity
17601 @item approximate median strings, and generally string averaging
17602 @item string sequence and set similarity
17603 @end enumerate
17604 It supports both normal and Unicode strings.")
17605 (license license:gpl2+)))
17606
17607 (define-public python2-levenshtein
17608 (package-with-python2 python-levenshtein))
17609
17610 (define-public python-scandir
17611 (package
17612 (name "python-scandir")
17613 (version "1.10.0")
17614 (source
17615 (origin
17616 (method url-fetch)
17617 (uri (pypi-uri "scandir" version))
17618 (sha256
17619 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
17620 (build-system python-build-system)
17621 (arguments
17622 `(#:phases (modify-phases %standard-phases
17623 (replace 'check
17624 (lambda _
17625 (invoke "python" "test/run_tests.py"))))))
17626 (home-page "https://github.com/benhoyt/scandir")
17627 (synopsis "Directory iteration function")
17628 (description
17629 "Directory iteration function like os.listdir(), except that instead of
17630 returning a list of bare filenames, it yields DirEntry objects that include
17631 file type and stat information along with the name. Using scandir() increases
17632 the speed of os.walk() by 2-20 times (depending on the platform and file
17633 system) by avoiding unnecessary calls to os.stat() in most cases.
17634
17635 This package is part of the Python standard library since version 3.5.")
17636 (license license:bsd-3)))
17637
17638 (define-public python2-scandir
17639 (package-with-python2 python-scandir))
17640
17641 (define-public python2-stemming
17642 (package
17643 (name "python2-stemming")
17644 (version "1.0.1")
17645 (source
17646 (origin
17647 (method url-fetch)
17648 (uri (pypi-uri "stemming" version))
17649 (sha256
17650 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
17651 (build-system python-build-system)
17652 (arguments
17653 `(#:python ,python-2))
17654 (home-page "https://bitbucket.org/mchaput/stemming/overview")
17655 (synopsis "Python implementations of various stemming algorithms")
17656 (description
17657 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
17658 stemming algorithms for English. These implementations are straightforward and
17659 efficient, unlike some Python versions of the same algorithms available on the
17660 Web. This package is an extraction of the stemming code included in the Whoosh
17661 search engine.")
17662 (license license:public-domain)))
17663
17664 (define-public python-factory-boy
17665 (package
17666 (name "python-factory-boy")
17667 (version "2.8.1")
17668 (source
17669 (origin
17670 (method url-fetch)
17671 (uri (pypi-uri "factory_boy" version))
17672 (sha256
17673 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
17674 (build-system python-build-system)
17675 (arguments
17676 ;; Tests are not included in the tarball.
17677 `(#:tests? #f))
17678 (propagated-inputs
17679 `(("faker" ,python-faker)))
17680 (home-page "https://github.com/benhoyt/scandir")
17681 (synopsis "Versatile test fixtures replacement")
17682 (description
17683 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
17684
17685 As a fixtures replacement tool, it aims to replace static, hard to maintain
17686 fixtures with easy-to-use factories for complex object.
17687
17688 Instead of building an exhaustive test setup with every possible combination
17689 of corner cases, factory_boy allows you to use objects customized for the
17690 current test, while only declaring the test-specific fields")
17691 (license license:expat)))
17692
17693 (define-public python2-factory-boy
17694 (package-with-python2 python-factory-boy))
17695
17696 (define-public python-translate-toolkit
17697 (package
17698 (name "python-translate-toolkit")
17699 (version "2.1.0")
17700 (source
17701 (origin
17702 (method url-fetch)
17703 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
17704 (sha256
17705 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
17706 (build-system python-build-system)
17707 (native-inputs
17708 `(("python-pytest" ,python-pytest)
17709 ("python-sphinx" ,python-sphinx)))
17710 (propagated-inputs
17711 `(("python-babel" ,python-babel)
17712 ("python-beautifulsoup4" ,python-beautifulsoup4)
17713 ("python-chardet" ,python-chardet)
17714 ("python-diff-match-patch" ,python-diff-match-patch)
17715 ("python-levenshtein" ,python-levenshtein)
17716 ("python-lxml" ,python-lxml)
17717 ("python-six" ,python-six)
17718 ("python-vobject" ,python-vobject)
17719 ("python-pyyaml" ,python-pyyaml)))
17720 (arguments
17721 ;; TODO: tests are not run, because they end with
17722 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
17723 ;; 'parse_funcs'
17724 ;; during test setup.
17725 `(#:tests? #f))
17726 (home-page "https://toolkit.translatehouse.org")
17727 (synopsis "Tools and API for translation and localization engineering")
17728 (description
17729 "Tools and API for translation and localization engineering. It contains
17730 several utilities, as well as an API for building localization tools.")
17731 (license license:gpl2+)))
17732
17733 (define-public python2-translate-toolkit
17734 (package-with-python2 python-translate-toolkit))
17735
17736 (define-public python-packaging
17737 (package
17738 (name "python-packaging")
17739 (version "20.0")
17740 (source
17741 (origin
17742 (method url-fetch)
17743 (uri (pypi-uri "packaging" version))
17744 ;; XXX: The URL in the patch file is wrong, it should be
17745 ;; <https://github.com/pypa/packaging/pull/256>.
17746 (patches (search-patches "python-packaging-test-arch.patch"))
17747 (sha256
17748 (base32
17749 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
17750 (build-system python-build-system)
17751 (arguments
17752 `(#:phases (modify-phases %standard-phases
17753 (replace 'check
17754 (lambda* (#:key tests? #:allow-other-keys)
17755 (if tests?
17756 (invoke "py.test" "-vv")
17757 (format #t "test suite not run~%"))
17758 #t)))))
17759 (native-inputs
17760 `(("python-pretend" ,python-pretend)
17761 ("python-pytest" ,python-pytest)))
17762 (propagated-inputs
17763 `(("python-pyparsing" ,python-pyparsing)
17764 ("python-six" ,python-six)))
17765 (home-page "https://github.com/pypa/packaging")
17766 (synopsis "Core utilities for Python packages")
17767 (description "Packaging is a Python module for dealing with Python packages.
17768 It offers an interface for working with package versions, names, and dependency
17769 information.")
17770 ;; From 'LICENSE': This software is made available under the terms of
17771 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
17772 ;; Contributions to this software is made under the terms of *both* these
17773 ;; licenses.
17774 (license (list license:asl2.0 license:bsd-2))))
17775
17776 (define-public python2-packaging
17777 (package-with-python2 python-packaging))
17778
17779 ;; Variants with minimal dependencies, for bootstrapping Pytest.
17780 (define-public python-packaging-bootstrap
17781 (hidden-package
17782 (package/inherit
17783 python-packaging
17784 (name "python-packaging-bootstrap")
17785 (native-inputs '())
17786 (propagated-inputs
17787 `(("python-pyparsing" ,python-pyparsing)))
17788 (arguments '(#:tests? #f)))))
17789
17790 (define-public python2-packaging-bootstrap
17791 (hidden-package
17792 (package/inherit
17793 python2-packaging
17794 (name "python2-packaging-bootstrap")
17795 (native-inputs '())
17796 (propagated-inputs
17797 `(("python-pyparsing" ,python2-pyparsing)))
17798 (arguments
17799 `(#:tests? #f
17800 ,@(package-arguments python2-packaging))))))
17801
17802 (define-public python-relatorio
17803 (package
17804 (name "python-relatorio")
17805 (version "0.8.0")
17806 (source
17807 (origin
17808 (method url-fetch)
17809 (uri (pypi-uri "relatorio" version))
17810 (sha256
17811 (base32
17812 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
17813 (build-system python-build-system)
17814 (propagated-inputs
17815 `(("python-lxml" ,python-lxml)
17816 ("python-genshi" ,python-genshi)))
17817 (native-inputs
17818 `(("python-magic" ,python-magic)))
17819 (home-page "https://relatorio.tryton.org/")
17820 (synopsis "Templating library able to output ODT and PDF files")
17821 (description "Relatorio is a templating library which provides a way to
17822 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
17823 for more filetypes can be easily added by creating plugins for them.")
17824 (license license:gpl3+)))
17825
17826 (define-public python2-relatorio
17827 (package-with-python2 python-relatorio))
17828
17829 (define-public python-radon
17830 (package
17831 (name "python-radon")
17832 (version "4.1.0")
17833 (source
17834 (origin
17835 (method url-fetch)
17836 (uri (pypi-uri "radon" version))
17837 (sha256
17838 (base32
17839 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
17840 (build-system python-build-system)
17841 (arguments
17842 `(#:phases (modify-phases %standard-phases
17843 (replace 'check
17844 (lambda _
17845 (invoke "python" "radon/tests/run.py"))))))
17846 (propagated-inputs
17847 `(("python-colorama" ,python-colorama)
17848 ("python-flake8-polyfill" ,python-flake8-polyfill)
17849 ("python-mando" ,python-mando)))
17850 (native-inputs
17851 `(("python-pytest" ,python-pytest)
17852 ("python-pytest-mock" ,python-pytest-mock)))
17853 (home-page "https://radon.readthedocs.org/")
17854 (synopsis "Code Metrics in Python")
17855 (description "Radon is a Python tool which computes various code metrics.
17856 Supported metrics are:
17857 @itemize @bullet
17858 @item raw metrics: SLOC, comment lines, blank lines, &c.
17859 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
17860 @item Halstead metrics (all of them)
17861 @item the Maintainability Index (a Visual Studio metric)
17862 @end itemize")
17863 (properties `((python2-variant . ,(delay python2-radon))))
17864 (license license:expat)))
17865
17866 (define-public python2-radon
17867 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
17868 (package/inherit base
17869 (propagated-inputs
17870 `(("python-configparser" ,python2-configparser)
17871 ("python-future" ,python2-future)
17872 ,@(package-propagated-inputs base))))))
17873
17874 (define-public python-sure
17875 (package
17876 (name "python-sure")
17877 (version "1.4.11")
17878 (source
17879 (origin
17880 (method url-fetch)
17881 (uri (pypi-uri "sure" version))
17882 (sha256
17883 (base32
17884 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
17885 (build-system python-build-system)
17886 (propagated-inputs
17887 `(("python-mock" ,python-mock)
17888 ("python-six" ,python-six)))
17889 (native-inputs
17890 `(("python-nose" ,python-nose)))
17891 (home-page "https://github.com/gabrielfalcao/sure")
17892 (synopsis "Automated testing library in python for python")
17893 (description
17894 "Sure is a python library that leverages a DSL for writing assertions.
17895 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
17896 (license license:gpl3+)))
17897
17898 (define-public python2-sure
17899 (package-with-python2 python-sure))
17900
17901 (define-public python2-couleur
17902 ;; This package does not seem to support python3 at all, hence,
17903 ;; only the python2 variant definition is provided.
17904 (package
17905 (name "python2-couleur")
17906 (version "0.6.2")
17907 (source
17908 (origin
17909 (method url-fetch)
17910 (uri (pypi-uri "couleur" version))
17911 (sha256
17912 (base32
17913 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
17914 (build-system python-build-system)
17915 (arguments
17916 `(#:python ,python-2))
17917 (home-page "https://github.com/gabrielfalcao/couleur")
17918 (synopsis
17919 "ANSI terminal tool for python, colored shell and other handy fancy features")
17920 (description
17921 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
17922 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
17923 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
17924 ;; https://github.com/gabrielfalcao/couleur/issues/11
17925 (license license:lgpl3+)))
17926
17927 (define-public python-misaka
17928 (package
17929 (name "python-misaka")
17930 (version "2.1.1")
17931 (source
17932 (origin
17933 (method url-fetch)
17934 (uri (pypi-uri "misaka" version))
17935 (sha256
17936 (base32
17937 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
17938 (build-system python-build-system)
17939 (arguments
17940 `(;; Line 37 of setup.py calls self.run_command('develop')
17941 ;; in the 'check' phase. This command seems to be trying
17942 ;; to write to
17943 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
17944 ;; for which it does not have the permission to write.
17945 #:tests? #f))
17946 (propagated-inputs
17947 `(("python-cffi" ,python-cffi)))
17948 (home-page "https://github.com/FSX/misaka")
17949 (synopsis "Python binding for Hoedown")
17950 (description
17951 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
17952 library written in C. It features a fast HTML renderer and functionality to make custom
17953 renderers (e.g. man pages or LaTeX).")
17954 (license license:expat)))
17955
17956 (define-public python2-misaka
17957 (package-with-python2 python-misaka))
17958
17959 (define-public python2-steadymark
17960 ;; This is forced into being a python2 only variant
17961 ;; due to its dependence on couleur that has no support
17962 ;; for python3
17963 (package
17964 (name "python2-steadymark")
17965 (version "0.7.3")
17966 (source
17967 (origin
17968 (method url-fetch)
17969 (uri (pypi-uri "steadymark" version))
17970 (sha256
17971 (base32
17972 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
17973 (build-system python-build-system)
17974 (native-inputs
17975 `(("python-couleur" ,python2-couleur)
17976 ("python-sure" ,python2-sure)
17977 ("python-misaka" ,python2-misaka)))
17978 (arguments
17979 `(#:python ,python-2
17980 #:phases
17981 (modify-phases %standard-phases
17982 (add-before 'build 'patch-setup-py
17983 (lambda _
17984 ;; Update requirements from dependency==version
17985 ;; to dependency>=version
17986 (substitute* "setup.py"
17987 (("==") ">="))
17988 #t)))))
17989 (home-page "https://github.com/gabrielfalcao/steadymark")
17990 (synopsis "Markdown-based test runner for python")
17991 (description
17992 "@code{Steadymark} allows documentation to be written in github-flavoured
17993 markdown. The documentation may contain snippets of code surrounded by python
17994 code blocks and @code{Steadymark} will find these snippets and run them, making
17995 sure that there are no old malfunctional examples in the documentation examples.")
17996 (license license:expat)))
17997
17998 (define-public python-jsonpointer
17999 (package
18000 (name "python-jsonpointer")
18001 (version "1.10")
18002 (source
18003 (origin
18004 (method url-fetch)
18005 (uri (pypi-uri "jsonpointer" version))
18006 (sha256
18007 (base32
18008 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
18009 (build-system python-build-system)
18010 (home-page "https://github.com/stefankoegl/python-json-pointer")
18011 (synopsis "Identify specific nodes in a JSON document")
18012 (description "@code{jsonpointer} allows you to access specific nodes
18013 by path in a JSON document (see RFC 6901).")
18014 (license license:bsd-3)))
18015
18016 (define-public python2-jsonpointer
18017 (package-with-python2 python-jsonpointer))
18018
18019 (define-public python-jsonpatch
18020 (package
18021 (name "python-jsonpatch")
18022 (version "1.16")
18023 (source
18024 (origin
18025 (method git-fetch)
18026 ;; pypi version lacks tests.js
18027 (uri (git-reference
18028 (url "https://github.com/stefankoegl/python-json-patch")
18029 (commit (string-append "v" version))))
18030 (file-name (git-file-name name version))
18031 (sha256
18032 (base32
18033 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18034 (build-system python-build-system)
18035 (propagated-inputs
18036 `(("python-jsonpointer" ,python-jsonpointer)))
18037 (home-page "https://github.com/stefankoegl/python-json-patch")
18038 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18039 (description "@code{jsonpatch} is a library and program that allows
18040 applying JSON Patches according to RFC 6902.")
18041 (license license:bsd-3)))
18042
18043 (define-public python2-jsonpatch
18044 (package-with-python2 python-jsonpatch))
18045
18046 (define-public python-jsonpatch-0.4
18047 (package (inherit python-jsonpatch)
18048 (name "python-jsonpatch")
18049 (version "0.4")
18050 (source
18051 (origin
18052 (method git-fetch)
18053 (uri (git-reference
18054 (url "https://github.com/stefankoegl/python-json-patch")
18055 (commit (string-append "v" version))))
18056 (file-name (git-file-name name version))
18057 (sha256
18058 (base32
18059 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18060
18061 (define-public python2-jsonpatch-0.4
18062 (package-with-python2 python-jsonpatch-0.4))
18063
18064 (define-public python-rfc3986
18065 (package
18066 (name "python-rfc3986")
18067 (version "1.4.0")
18068 (source (origin
18069 (method url-fetch)
18070 (uri (pypi-uri "rfc3986" version))
18071 (sha256
18072 (base32
18073 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18074 (build-system python-build-system)
18075 (arguments
18076 `(#:modules ((guix build utils)
18077 (guix build python-build-system)
18078 (ice-9 ftw)
18079 (srfi srfi-1)
18080 (srfi srfi-26))
18081 #:phases
18082 (modify-phases %standard-phases
18083 (replace 'check
18084 (lambda _
18085 (let ((cwd (getcwd)))
18086 (setenv "PYTHONPATH"
18087 (string-append cwd "/build/"
18088 (find (cut string-prefix? "lib" <>)
18089 (scandir (string-append cwd "/build")))
18090 ":"
18091 (getenv "PYTHONPATH")))
18092 (invoke "pytest" "-v")))))))
18093 (native-inputs
18094 `(("python-pytest" ,python-pytest)))
18095 (home-page "https://rfc3986.readthedocs.io/")
18096 (synopsis "Parse and validate URI references")
18097 (description
18098 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18099 validation and authority parsing. This module also supports RFC@tie{}6874
18100 which adds support for zone identifiers to IPv6 addresses.")
18101 (license license:asl2.0)))
18102
18103 (define-public python2-rfc3986
18104 (package-with-python2 python-rfc3986))
18105
18106 (define-public python-rfc3987
18107 (package
18108 (name "python-rfc3987")
18109 (version "1.3.7")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "rfc3987" version))
18114 (sha256
18115 (base32
18116 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18117 (build-system python-build-system)
18118 (home-page "https://pypi.org/project/rfc3987/")
18119 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18120 (description "@code{rfc3987} provides routines for parsing and
18121 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18122 (license license:gpl3+)))
18123
18124 (define-public python2-rfc3987
18125 (package-with-python2 python-rfc3987))
18126
18127 ;; The latest commit contains fixes for building with both python3 and python2.
18128 (define-public python-rfc6555
18129 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18130 (revision "1"))
18131 (package
18132 (name "python-rfc6555")
18133 (version (git-version "0.0.0" revision commit))
18134 (source (origin
18135 (method git-fetch)
18136 (uri (git-reference
18137 (url "https://github.com/sethmlarson/rfc6555")
18138 (commit commit)))
18139 (file-name (git-file-name name version))
18140 (sha256
18141 (base32
18142 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18143 (build-system python-build-system)
18144 (arguments
18145 '(#:phases
18146 (modify-phases %standard-phases
18147 (replace 'check
18148 (lambda* (#:key tests? #:allow-other-keys)
18149 (if tests?
18150 ;; Other tests require network access.
18151 (invoke "pytest" "tests/test_ipv6.py")
18152 #t))))))
18153 (native-inputs
18154 `(("python-pytest" ,python-pytest)))
18155 (home-page "https://pypi.org/project/rfc6555/")
18156 (synopsis "Python implementation of RFC 6555")
18157 (description
18158 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18159 6555. Provided with a single file and dead-simple API to allow easy vendoring
18160 and integration into other projects.")
18161 (properties `((python2-variant . ,(delay python2-rfc6555))))
18162 (license license:asl2.0))))
18163
18164 (define-public python2-rfc6555
18165 (let ((base (package-with-python2
18166 (strip-python2-variant python-rfc6555))))
18167 (package/inherit base
18168 (propagated-inputs
18169 `(("python2-selectors2" ,python2-selectors2))))))
18170
18171 (define-public python-bagit
18172 (package
18173 (name "python-bagit")
18174 (version "1.7.0")
18175 (source
18176 (origin
18177 (method url-fetch)
18178 (uri (pypi-uri "bagit" version))
18179 (sha256
18180 (base32
18181 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18182 (build-system python-build-system)
18183 (native-inputs
18184 `(("python-setuptools-scm" ,python-setuptools-scm)
18185 ("python-coverage" ,python-coverage)
18186 ("python-mock" ,python-mock)))
18187 (home-page "https://libraryofcongress.github.io/bagit-python/")
18188 (synopsis "Create and validate BagIt packages")
18189 (description "Bagit is a Python library and command line utility for working
18190 with BagIt style packages. BagIt is a minimalist packaging format for digital
18191 preservation.")
18192 (license license:cc0)))
18193
18194 (define-public python-prov
18195 (package
18196 (name "python-prov")
18197 (version "2.0.0")
18198 (source
18199 (origin
18200 (method url-fetch)
18201 (uri (pypi-uri "prov" version))
18202 (sha256
18203 (base32
18204 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18205 (build-system python-build-system)
18206 (propagated-inputs
18207 `(("python-dateutil" ,python-dateutil)
18208 ("python-lxml" ,python-lxml)
18209 ("python-networkx" ,python-networkx)
18210 ("python-rdflib" ,python-rdflib)))
18211 (native-inputs
18212 `(("graphviz" ,graphviz)
18213 ("python-pydot" ,python-pydot)))
18214 (home-page "https://github.com/trungdong/prov")
18215 (synopsis
18216 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18217 (description
18218 "This package provides a library for W3C Provenance Data Model supporting
18219 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18220 (license license:expat)))
18221
18222 (define-public python-arcp
18223 (package
18224 (name "python-arcp")
18225 (version "0.2.1")
18226 (source
18227 (origin
18228 (method url-fetch)
18229 (uri (pypi-uri "arcp" version))
18230 (sha256
18231 (base32
18232 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
18233 (build-system python-build-system)
18234 (native-inputs
18235 `(("python-pytest" ,python-pytest)))
18236 (home-page "http://arcp.readthedocs.io/")
18237 (synopsis
18238 "Archive and Package URI parser and generator")
18239 (description
18240 "@acronym{arcp, Archive and Package} provides functions for creating
18241 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
18242 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
18243 consume or reference hypermedia resources bundled inside a file archive or an
18244 application package, as well as to resolve URIs for archive resources within a
18245 programmatic framework. This URI scheme provides mechanisms to generate a
18246 unique base URI to represent the root of the archive, so that relative URI
18247 references in a bundled resource can be resolved within the archive without
18248 having to extract the archive content on the local file system. An arcp URI can
18249 be used for purposes of isolation (e.g. when consuming multiple archives),
18250 security constraints (avoiding \"climb out\" from the archive), or for
18251 externally identiyfing sub-resources referenced by hypermedia formats.")
18252 (license license:asl2.0)))
18253
18254 (define-public python-shellescape
18255 (package
18256 (name "python-shellescape")
18257 (version "3.8.1")
18258 (source
18259 (origin
18260 (method git-fetch)
18261 (uri (git-reference
18262 (url "https://github.com/chrissimpkins/shellescape")
18263 (commit (string-append "v" version))))
18264 (file-name (git-file-name name version))
18265 (sha256
18266 (base32
18267 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
18268 (build-system python-build-system)
18269 (arguments
18270 '(#:phases
18271 (modify-phases %standard-phases
18272 (replace 'check
18273 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18274 (when tests?
18275 (add-installed-pythonpath inputs outputs)
18276 (invoke "python" "tests/test_shellescape.py"))
18277 #t)))))
18278 (native-inputs
18279 `(("python-pytest" ,python-pytest)))
18280 (home-page "https://github.com/chrissimpkins/shellescape")
18281 (synopsis
18282 "Shell escape a string to safely use it as a token in a shell command")
18283 (description
18284 "The shellescape Python module defines the @code{shellescape.quote()}
18285 function that returns a shell-escaped version of a Python string. This is a
18286 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
18287 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
18288 (license license:expat)))
18289
18290 (define-public python-validators
18291 (package
18292 (name "python-validators")
18293 (version "0.14.2")
18294 (source (origin
18295 (method url-fetch)
18296 (uri (pypi-uri "validators" version))
18297 (sha256
18298 (base32
18299 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
18300 (build-system python-build-system)
18301 (arguments
18302 '(#:phases (modify-phases %standard-phases
18303 (replace 'check
18304 (lambda _
18305 (invoke "pytest" "-vv"))))))
18306 (propagated-inputs
18307 `(("python-decorator" ,python-decorator)
18308 ("python-six" ,python-six)))
18309 (native-inputs
18310 `(("python-flake8" ,python-flake8)
18311 ("python-isort" ,python-isort)
18312 ("python-pytest" ,python-pytest)))
18313 (home-page "https://github.com/kvesteri/validators")
18314 (synopsis "Data validation library")
18315 (description
18316 "This package contains validators for different things such as email
18317 addresses, IP addresses, URLs, hashes and more. It has been designed to
18318 be easy to use and not require defining a schema or form just to validate
18319 some input.")
18320 (license license:expat)))
18321
18322 (define-public python2-validators
18323 (package-with-python2 python-validators))
18324
18325 (define-public python-validate-email
18326 (package
18327 (name "python-validate-email")
18328 (version "1.3")
18329 (source
18330 (origin
18331 (method url-fetch)
18332 (uri (pypi-uri "validate_email" version))
18333 (sha256
18334 (base32
18335 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
18336 (build-system python-build-system)
18337 (home-page "https://github.com/syrusakbary/validate_email")
18338 (synopsis "Verifies if an email address is valid and really exists")
18339 (description "@code{validate_email} can be used to verify if an email
18340 address is valid and really exists.")
18341 (license license:lgpl3+)))
18342
18343 (define-public python2-validate-email
18344 (package-with-python2 python-validate-email))
18345
18346 (define-public python-flex
18347 (package
18348 (name "python-flex")
18349 (version "6.10.0")
18350 (source
18351 (origin
18352 (method url-fetch)
18353 (uri (pypi-uri "flex" version))
18354 (sha256
18355 (base32
18356 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
18357 (build-system python-build-system)
18358 (propagated-inputs
18359 `(("python-click" ,python-click)
18360 ("python-iso8601" ,python-iso8601)
18361 ("python-jsonpointer" ,python-jsonpointer)
18362 ("python-pyyaml" ,python-pyyaml)
18363 ("python-requests" ,python-requests)
18364 ("python-rfc3987" ,python-rfc3987)
18365 ("python-six" ,python-six)
18366 ("python-validate-email" ,python-validate-email)))
18367 (home-page "https://github.com/pipermerriam/flex")
18368 (synopsis "Validates Swagger schemata")
18369 (description "@code{flex} can be used to validate Swagger schemata.")
18370 (license license:bsd-3)))
18371
18372 (define-public python2-flex
18373 (package-with-python2 python-flex))
18374
18375 (define-public python-marshmallow
18376 (package
18377 (name "python-marshmallow")
18378 (version "3.9.1")
18379 (source
18380 (origin
18381 (method url-fetch)
18382 (uri (pypi-uri "marshmallow" version))
18383 (sha256
18384 (base32
18385 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
18386 (build-system python-build-system)
18387 (propagated-inputs
18388 `(("python-dateutil" ,python-dateutil)
18389 ("python-simplejson" ,python-simplejson)))
18390 (native-inputs
18391 `(("python-pytest" ,python-pytest)
18392 ("python-pytz" ,python-pytz)))
18393 (home-page "https://github.com/marshmallow-code/marshmallow")
18394 (synopsis "Convert complex datatypes to and from native
18395 Python datatypes.")
18396 (description "@code{marshmallow} provides a library for converting
18397 complex datatypes to and from native Python datatypes.")
18398 (license license:expat)))
18399
18400 (define-public python-apispec
18401 (package
18402 (name "python-apispec")
18403 (version "4.0.0")
18404 (source
18405 (origin
18406 (method url-fetch)
18407 (uri (pypi-uri "apispec" version))
18408 (sha256
18409 (base32
18410 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
18411 (build-system python-build-system)
18412 (arguments
18413 '(#:phases (modify-phases %standard-phases
18414 (add-after 'unpack 'disable-prance-tests
18415 (lambda _
18416 ;; Disable validation tests since they require the
18417 ;; optional 'prance' library which is not yet in Guix.
18418 (substitute* "tests/test_ext_marshmallow_openapi.py"
18419 (("def test_openapi_tools_validate.*" all)
18420 (string-append "@pytest.mark.xfail\n" all)))))
18421 (replace 'check
18422 (lambda _
18423 (setenv "PYTHONPATH"
18424 (string-append "./build/lib:"
18425 (getenv "PYTHONPATH")))
18426 (invoke "pytest" "-vv"))))))
18427 (propagated-inputs
18428 `(("python-pyyaml" ,python-pyyaml)))
18429 (native-inputs
18430 `(("python-pytest" ,python-pytest)
18431 ("python-marshmallow" ,python-marshmallow)))
18432 (home-page "https://github.com/marshmallow-code/apispec")
18433 (synopsis "Swagger/OpenAPI specification generator")
18434 (description "@code{python-apispec} is a pluggable API specification
18435 generator. It currently supports the OpenAPI specification, formerly known
18436 as Swagger.")
18437 (license license:expat)))
18438
18439 (define-public python-flasgger
18440 (package
18441 (name "python-flasgger")
18442 (version "0.6.3")
18443 (source
18444 (origin
18445 (method git-fetch)
18446 (uri (git-reference
18447 (url "https://github.com/rochacbruno/flasgger")
18448 (commit version)))
18449 (file-name (git-file-name name version))
18450 (sha256
18451 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
18452 (build-system python-build-system)
18453 (arguments
18454 `(#:phases
18455 (modify-phases %standard-phases
18456 (replace 'check
18457 (lambda* (#:key inputs outputs #:allow-other-keys)
18458 (substitute* "Makefile"
18459 (("flake8 flasgger --ignore=F403")
18460 "flake8 flasgger --ignore=E731,F403"))
18461 (setenv "PYTHONPATH" (string-append (getcwd)
18462 ":"
18463 (getenv "PYTHONPATH")))
18464 (invoke "py.test"))))))
18465 (propagated-inputs
18466 `(("python-flask" ,python-flask)
18467 ("python-pyyaml" ,python-pyyaml)
18468 ("python-jsonschema" ,python-jsonschema)
18469 ("python-mistune" ,python-mistune)
18470 ("python-six" ,python-six)))
18471 (native-inputs
18472 `(("python-decorator" ,python-decorator)
18473 ("python-flake8" ,python-flake8)
18474 ("python-flask-restful" ,python-flask-restful)
18475 ("python-flex" ,python-flex)
18476 ("python-pytest" ,python-pytest)
18477 ("python-pytest-cov" ,python-pytest-cov)
18478 ("python-marshmallow" ,python-marshmallow)
18479 ("python-apispec" ,python-apispec)))
18480 (home-page "https://github.com/rochacbruno/flasgger/")
18481 (synopsis "Extract Swagger specs from your Flask project")
18482 (description "@code{python-flasgger} allows extracting Swagger specs
18483 from your Flask project. It is a fork of Flask-Swagger.")
18484 (license license:expat)))
18485
18486 (define-public python-swagger-spec-validator
18487 (package
18488 (name "python-swagger-spec-validator")
18489 (version "2.4.3")
18490 (source
18491 (origin
18492 (method url-fetch)
18493 (uri (pypi-uri "swagger-spec-validator" version))
18494 (sha256
18495 (base32
18496 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
18497 (build-system python-build-system)
18498 (propagated-inputs
18499 `(("python-jsonschema" ,python-jsonschema)
18500 ("python-pyyaml" ,python-pyyaml)
18501 ("python-six" ,python-six)))
18502 (home-page
18503 "https://github.com/Yelp/swagger_spec_validator")
18504 (synopsis "Validation of Swagger specifications")
18505 (description "@code{swagger_spec_validator} provides a library for
18506 validating Swagger API specifications.")
18507 (license license:asl2.0)))
18508
18509 (define-public python2-swagger-spec-validator
18510 (package-with-python2 python-swagger-spec-validator))
18511
18512 (define-public python-apache-libcloud
18513 (package
18514 (name "python-apache-libcloud")
18515 (version "3.1.0")
18516 (source
18517 (origin
18518 (method url-fetch)
18519 (uri (pypi-uri "apache-libcloud" version))
18520 (sha256
18521 (base32
18522 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
18523 (build-system python-build-system)
18524 (arguments
18525 `(#:phases
18526 (modify-phases %standard-phases
18527 (add-after 'unpack 'patch-ssh
18528 (lambda* (#:key inputs #:allow-other-keys)
18529 (substitute* "libcloud/compute/ssh.py"
18530 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
18531 "/bin/ssh" "'")))
18532 #t))
18533 (add-after 'unpack 'patch-tests
18534 (lambda _
18535 (substitute* "libcloud/test/compute/test_ssh_client.py"
18536 (("class ShellOutSSHClientTests")
18537 "@unittest.skip(\"Guix container doesn't have ssh service\")
18538 class ShellOutSSHClientTests"))
18539 #t))
18540 (add-before 'check 'copy-secret
18541 (lambda _
18542 (copy-file "libcloud/test/secrets.py-dist"
18543 "libcloud/test/secrets.py")
18544 #t)))))
18545 (inputs
18546 `(("openssh" ,openssh)))
18547 (propagated-inputs
18548 `(("python-paramiko" ,python-paramiko)
18549 ("python-requests" ,python-requests)))
18550 (native-inputs
18551 `(("python-lockfile" ,python-lockfile)
18552 ("python-mock" ,python-mock)
18553 ("python-pytest" ,python-pytest)
18554 ("python-pytest-runner" ,python-pytest-runner)
18555 ("python-requests-mock" ,python-requests-mock)))
18556 (home-page "https://libcloud.apache.org/")
18557 (synopsis "Unified Cloud API")
18558 (description "@code{libcloud} is a Python library for interacting with
18559 many of the popular cloud service providers using a unified API.")
18560 (license license:asl2.0)))
18561
18562 (define-public python-smmap
18563 (package
18564 (name "python-smmap")
18565 (version "3.0.1")
18566 (source
18567 (origin
18568 (method url-fetch)
18569 (uri (pypi-uri "smmap" version))
18570 (sha256
18571 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
18572 (build-system python-build-system)
18573 (native-inputs
18574 `(("python-nosexcover" ,python-nosexcover)))
18575 (home-page "https://github.com/Byron/smmap")
18576 (synopsis "Python sliding window memory map manager")
18577 (description "@code{smmap} is a pure Python implementation of a sliding
18578 window memory map manager.")
18579 (license license:bsd-3)))
18580
18581 (define-public python-smmap2
18582 (deprecated-package "python-smmap2" python-smmap))
18583
18584 (define-public python2-smmap
18585 (package-with-python2 python-smmap))
18586
18587 (define-public python2-smmap2
18588 (deprecated-package "python2-smmap2" python2-smmap))
18589
18590 (define-public python-regex
18591 (package
18592 (name "python-regex")
18593 (version "2020.6.8")
18594 (source (origin
18595 (method url-fetch)
18596 (uri (pypi-uri "regex" version))
18597 (sha256
18598 (base32
18599 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
18600 (build-system python-build-system)
18601 (arguments
18602 '(#:phases
18603 (modify-phases %standard-phases
18604 (replace 'check
18605 (lambda* (#:key inputs outputs #:allow-other-keys)
18606 (add-installed-pythonpath inputs outputs)
18607 (invoke "python" "-c"
18608 "from regex.test_regex import test_main; test_main()"))))))
18609 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
18610 (synopsis "Alternative regular expression module")
18611 (description "This regular expression implementation is backwards-
18612 compatible with the standard @code{re} module, but offers additional
18613 functionality like full case-folding for case-insensitive matches in Unicode.")
18614 (license license:psfl)))
18615
18616 (define-public python2-regex
18617 (package-with-python2 python-regex))
18618
18619 (define-public python-pyopengl
18620 (package
18621 (name "python-pyopengl")
18622 (version "3.1.5")
18623 (source
18624 (origin
18625 (method url-fetch)
18626 (uri (pypi-uri "PyOpenGL" version))
18627 (sha256
18628 (base32
18629 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
18630 (build-system python-build-system)
18631 (inputs
18632 `(("mesa" ,mesa)
18633 ("freeglut" ,freeglut)
18634 ("glu" ,glu)))
18635 (arguments
18636 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
18637 ;attribute 'OSMesa'
18638 #:phases
18639 (modify-phases %standard-phases
18640 (add-before 'build 'fix-paths
18641 (lambda* (#:key inputs outputs #:allow-other-keys)
18642 (substitute* '("OpenGL/platform/ctypesloader.py")
18643 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
18644 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
18645 (("'GL'")
18646 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
18647 (("'GLU'")
18648 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
18649 (("'glut',")
18650 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
18651 (("'GLESv1_CM'")
18652 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
18653 (("'GLESv2'")
18654 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
18655 ;; Not providing libgle. It seems to be very old.
18656 #t)))))
18657 (home-page "http://pyopengl.sourceforge.net")
18658 (synopsis "Standard OpenGL bindings for Python")
18659 (description
18660 "PyOpenGL is the most common cross platform Python binding to OpenGL and
18661 related APIs. The binding is created using the standard @code{ctypes}
18662 library.")
18663 (license license:bsd-3)))
18664
18665 (define-public python-pyopengl-accelerate
18666 (package
18667 (inherit python-pyopengl)
18668 (name "python-pyopengl-accelerate")
18669 (version "3.1.5")
18670 (source
18671 (origin
18672 (method url-fetch)
18673 (uri (pypi-uri "PyOpenGL-accelerate" version))
18674 (sha256
18675 (base32
18676 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
18677 (inputs
18678 `(("mesa" ,mesa)
18679 ("python-numpy" ,python-numpy))) ; for cython module
18680 ; numpy_formathandler, thus not propagated
18681 (arguments
18682 `(#:tests? #f
18683 #:phases
18684 (modify-phases %standard-phases
18685 (delete 'fix-paths))))
18686 (synopsis "Acceleration code for PyOpenGL")
18687 (description
18688 "This is the Cython-coded accelerator module for PyOpenGL.")))
18689
18690 (define-public python-rencode
18691 (package
18692 (name "python-rencode")
18693 (version "1.0.5")
18694 (source
18695 (origin
18696 (method url-fetch)
18697 (uri (pypi-uri "rencode" version))
18698 (sha256
18699 (base32
18700 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
18701 (build-system python-build-system)
18702 (arguments
18703 `(#:phases
18704 (modify-phases %standard-phases
18705 (add-before 'check 'delete-bogus-test
18706 ;; This test requires /home/aresch/Downloads, which is not provided by
18707 ;; the build environment.
18708 (lambda _
18709 (delete-file "rencode/t.py")
18710 #t)))))
18711 (native-inputs `(("pkg-config" ,pkg-config)
18712 ("python-cython" ,python-cython)))
18713 (home-page "https://github.com/aresch/rencode")
18714 (synopsis "Serialization of heterogeneous data structures")
18715 (description
18716 "The @code{rencode} module is a data structure serialization library,
18717 similar to @code{bencode} from the BitTorrent project. For complex,
18718 heterogeneous data structures with many small elements, r-encoding stake up
18719 significantly less space than b-encodings. This version of rencode is a
18720 complete rewrite in Cython to attempt to increase the performance over the
18721 pure Python module.")
18722 (license license:bsd-3)))
18723
18724 (define-public python2-rencode
18725 (package-with-python2 python-rencode))
18726
18727 (define-public python-xenon
18728 (package
18729 (name "python-xenon")
18730 (version "0.7.0")
18731 (source
18732 (origin
18733 (method url-fetch)
18734 (uri (pypi-uri "xenon" version))
18735 (sha256
18736 (base32
18737 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
18738 (build-system python-build-system)
18739 (native-inputs
18740 `(("python-pyyaml" ,python-pyyaml)
18741 ("python-radon" ,python-radon)
18742 ("python-requests" ,python-requests)
18743 ("python-flake8" ,python-flake8)
18744 ("python-tox" ,python-tox)))
18745 (arguments
18746 `(#:tests? #f ;test suite not shipped with the PyPI archive
18747 #:phases
18748 (modify-phases %standard-phases
18749 (add-before 'build 'patch-test-requirements
18750 (lambda _
18751 ;; Remove httpretty dependency for tests.
18752 (substitute* "setup.py"
18753 (("httpretty") ""))
18754 #t)))))
18755 (home-page "https://xenon.readthedocs.org/")
18756 (synopsis "Monitor code metrics for Python on your CI server")
18757 (description
18758 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
18759 Ideally, @code{xenon} is run every time code is committed. Through command
18760 line options, various thresholds can be set for the complexity of code. It
18761 will fail (i.e. it will exit with a non-zero exit code) when any of these
18762 requirements is not met.")
18763 (license license:expat)))
18764
18765 (define-public python-pysocks
18766 (package
18767 (name "python-pysocks")
18768 (version "1.7.1")
18769 (source
18770 (origin
18771 (method url-fetch)
18772 (uri (pypi-uri "PySocks" version))
18773 (sha256
18774 (base32
18775 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
18776 (build-system python-build-system)
18777 (arguments `(#:tests? #f))
18778 (home-page "https://github.com/Anorov/PySocks")
18779 (synopsis "SOCKS client module")
18780 (description "@code{pysocks} is an updated and semi-actively maintained
18781 version of @code{SocksiPy} with bug fixes and extra features.")
18782 (license license:bsd-3)))
18783
18784 (define-public python2-pysocks
18785 (package-with-python2 python-pysocks))
18786
18787 (define-public python-pydiff
18788 (package
18789 (name "python-pydiff")
18790 (version "0.2")
18791 (source
18792 (origin
18793 (method url-fetch)
18794 (uri (pypi-uri "pydiff" version))
18795 (sha256
18796 (base32
18797 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
18798 (build-system python-build-system)
18799 (home-page "https://github.com/myint/pydiff")
18800 (synopsis "Library to diff two Python files at the bytecode level")
18801 (description
18802 "@code{pydiff} makes it easy to look for actual code changes while
18803 ignoring formatting changes.")
18804 (license license:expat)))
18805
18806 (define-public python2-pydiff
18807 (package-with-python2 python-pydiff))
18808
18809 (define-public python-pydub
18810 (package
18811 (name "python-pydub")
18812 (version "0.24.1")
18813 (source
18814 (origin
18815 (method url-fetch)
18816 (uri (pypi-uri "pydub" version))
18817 (sha256
18818 (base32
18819 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
18820 (build-system python-build-system)
18821 (arguments
18822 `(#:phases
18823 (modify-phases %standard-phases
18824 (add-after 'unpack 'fix-ffmpeg-path
18825 (lambda* (#:key inputs #:allow-other-keys)
18826 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
18827 (substitute* '("pydub/utils.py")
18828 (("return \"ffmpeg\"")
18829 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
18830 (("return \"ffplay\"")
18831 (string-append "return \"" ffmpeg "/bin/ffplay\""))
18832 (("return \"ffprobe\"")
18833 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
18834 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
18835 #t))))))
18836 (home-page "https://pydub.com")
18837 (inputs
18838 `(("ffmpeg" ,ffmpeg)))
18839 (propagated-inputs
18840 `(("python-scipy" ,python-scipy)))
18841 (synopsis "Manipulate audio with a high level interface in Python")
18842 (description
18843 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
18844 @code{ffmpeg} to open various audio formats.")
18845 (license license:expat))) ; MIT license
18846
18847 (define-public python-tqdm
18848 (package
18849 (name "python-tqdm")
18850 (version "4.43.0")
18851 (source
18852 (origin
18853 (method url-fetch)
18854 (uri (pypi-uri "tqdm" version))
18855 (sha256
18856 (base32
18857 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
18858 (build-system python-build-system)
18859 (arguments
18860 '(#:phases (modify-phases %standard-phases
18861 (replace 'check
18862 (lambda* (#:key inputs outputs #:allow-other-keys)
18863 (add-installed-pythonpath inputs outputs)
18864 ;; This invokation is taken from tox.ini.
18865 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
18866 "-d" "-v" "tqdm/"))))))
18867 (native-inputs
18868 `(("python-nose" ,python-nose)))
18869 (home-page "https://github.com/tqdm/tqdm")
18870 (synopsis "Fast, extensible progress meter")
18871 (description
18872 "Make loops show a progress bar on the console by just wrapping any
18873 iterable with @code{|tqdm(iterable)|}. Offers many options to define
18874 design and layout.")
18875 (license (list license:mpl2.0 license:expat))))
18876
18877 (define-public python2-tqdm
18878 (package-with-python2 python-tqdm))
18879
18880 (define-public python-pkginfo
18881 (package
18882 (name "python-pkginfo")
18883 (version "1.7.0")
18884 (source
18885 (origin
18886 (method url-fetch)
18887 (uri (pypi-uri "pkginfo" version))
18888 (sha256
18889 (base32
18890 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
18891 (build-system python-build-system)
18892 (arguments
18893 `(#:phases
18894 (modify-phases %standard-phases
18895 (add-before 'check 'patch-tests
18896 (lambda _
18897 (substitute* "pkginfo/tests/test_installed.py"
18898 (("test_ctor_w_package_no_PKG_INFO")
18899 "_test_ctor_w_package_no_PKG_INFO"))
18900 #t)))))
18901 (home-page
18902 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
18903 (synopsis
18904 "Query metadatdata from sdists, bdists, and installed packages")
18905 (description
18906 "API to query the distutils metadata written in @file{PKG-INFO} inside a
18907 source distriubtion (an sdist) or a binary distribution (e.g., created by
18908 running bdist_egg). It can also query the EGG-INFO directory of an installed
18909 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
18910 created by running @code{python setup.py develop}).")
18911 (license license:expat)))
18912
18913 (define-public python2-pkginfo
18914 (package-with-python2 python-pkginfo))
18915
18916 (define-public python-twine
18917 (package
18918 (name "python-twine")
18919 (version "1.15.0")
18920 (source
18921 (origin
18922 (method url-fetch)
18923 (uri (pypi-uri "twine" version))
18924 (sha256
18925 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
18926 (build-system python-build-system)
18927 (propagated-inputs
18928 `(("python-tqdm" ,python-tqdm)
18929 ("python-packaging" ,python-packaging)
18930 ("python-pkginfo" ,python-pkginfo)
18931 ("python-readme-renderer" ,python-readme-renderer)
18932 ("python-requests" ,python-requests)
18933 ("python-requests-toolbelt" ,python-requests-toolbelt)))
18934 (home-page "https://github.com/pypa/twine")
18935 (synopsis "Collection of utilities for interacting with PyPI")
18936 (description
18937 "@code{twine} currently supports registering projects and uploading
18938 distributions. It authenticates the user over HTTPS, allows them to pre-sign
18939 their files and supports any packaging format (including wheels).")
18940 (license license:asl2.0)))
18941
18942 (define-public python2-twine
18943 (package-with-python2 python-twine))
18944
18945 (define-public python-linecache2
18946 (package
18947 (name "python-linecache2")
18948 (version "1.0.0")
18949 (source
18950 (origin
18951 (method url-fetch)
18952 (uri (pypi-uri "linecache2" version))
18953 (sha256
18954 (base32
18955 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
18956 (build-system python-build-system)
18957 (arguments
18958 `(;; The tests depend on unittest2, and our version is a bit too old.
18959 #:tests? #f))
18960 (native-inputs
18961 `(("python-pbr" ,python-pbr-minimal)))
18962 (home-page
18963 "https://github.com/testing-cabal/linecache2")
18964 (synopsis "Backports of the linecache module")
18965 (description
18966 "The linecache module allows one to get any line from any file, while
18967 attempting to optimize internally, using a cache, the common case where many
18968 lines are read from a single file.")
18969 (license license:psfl)))
18970
18971 (define-public python2-linecache2
18972 (package-with-python2 python-linecache2))
18973
18974 (define-public python-traceback2
18975 (package
18976 (name "python-traceback2")
18977 (version "1.4.0")
18978 (source
18979 (origin
18980 (method url-fetch)
18981 (uri (pypi-uri "traceback2" version))
18982 (sha256
18983 (base32
18984 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
18985 (build-system python-build-system)
18986 (arguments
18987 `(;; python-traceback2 and python-unittest2 depend on one another.
18988 #:tests? #f))
18989 (native-inputs
18990 `(("python-pbr" ,python-pbr-minimal)))
18991 (propagated-inputs
18992 `(("python-linecache2" ,python-linecache2)))
18993 (home-page
18994 "https://github.com/testing-cabal/traceback2")
18995 (synopsis "Backports of the traceback module")
18996 (description
18997 "This module provides a standard interface to extract, format and print
18998 stack traces of Python programs. It exactly mimics the behavior of the Python
18999 interpreter when it prints a stack trace.")
19000 (license license:psfl)))
19001
19002 (define-public python2-traceback2
19003 (package-with-python2 python-traceback2))
19004
19005 (define-public python-ratelimiter
19006 (package
19007 (name "python-ratelimiter")
19008 (version "1.2.0")
19009 (source
19010 (origin
19011 (method url-fetch)
19012 (uri (pypi-uri "ratelimiter" version))
19013 (sha256
19014 (base32
19015 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
19016 (build-system python-build-system)
19017 (arguments
19018 '(#:tests? #f)) ; There are no tests in the pypi archive.
19019 (home-page "https://github.com/RazerM/ratelimiter")
19020 (synopsis "Simple rate limiting object")
19021 (description
19022 "The @code{ratelimiter} module ensures that an operation will not be
19023 executed more than a given number of times during a given period.")
19024 (license license:asl2.0)))
19025
19026 (define-public python2-ratelimiter
19027 (package-with-python2 python-ratelimiter))
19028
19029 (define-public python-dukpy
19030 (package
19031 (name "python-dukpy")
19032 (version "0.3")
19033 (source
19034 (origin
19035 (method git-fetch)
19036 (uri (git-reference
19037 (url "https://github.com/kovidgoyal/dukpy")
19038 (commit (string-append "v" version))))
19039 (file-name (git-file-name name version))
19040 (sha256
19041 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19042 (build-system python-build-system)
19043 (home-page "https://github.com/kovidgoyal/dukpy")
19044 (synopsis "Run JavaScript in python")
19045 (description
19046 "dukpy is a JavaScript runtime environment for Python using the duktape
19047 embeddable JavaScript engine.")
19048 ;; Dukpy is licensed under MIT like the embedded duktape library,
19049 ;; with 'errors.c' as GPL3.
19050 (license (list license:expat license:gpl3))))
19051
19052 (define-public python2-dukpy
19053 (package-with-python2 python-dukpy))
19054
19055 (define-public python-jsonrpclib-pelix
19056 (package
19057 (name "python-jsonrpclib-pelix")
19058 (version "0.3.2")
19059 (source
19060 (origin
19061 (method url-fetch)
19062 (uri (pypi-uri "jsonrpclib-pelix" version))
19063 (sha256
19064 (base32
19065 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19066 (build-system python-build-system)
19067 (arguments
19068 `(#:tests? #f)) ; no tests in PyPI tarball
19069 (home-page "https://github.com/tcalmant/jsonrpclib/")
19070 (synopsis "JSON-RPC 2.0 client library for Python")
19071 (description
19072 "This library implements the JSON-RPC v2.0
19073 specification (backwards-compatible) as a client library for Python. This
19074 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19075 services.")
19076 (license license:asl2.0)))
19077
19078 (define-public python2-jsonrpclib-pelix
19079 (package-with-python2 python-jsonrpclib-pelix))
19080
19081 (define-public python-setuptools-scm-git-archive
19082 (package
19083 (name "python-setuptools-scm-git-archive")
19084 (version "1.0")
19085 (source
19086 (origin
19087 (method url-fetch)
19088 (uri (pypi-uri "setuptools_scm_git_archive" version))
19089 (sha256
19090 (base32
19091 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19092 (build-system python-build-system)
19093 (native-inputs
19094 `(("python-pytest" ,python-pytest)))
19095 (propagated-inputs
19096 `(("python-setuptools-scm" ,python-setuptools-scm)))
19097 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19098 (synopsis "Setuptools_scm plugin for git archives")
19099 (description
19100 "The setuptools_scm_git_archive package is a plugin to
19101 setuptools_scm, which supports obtaining versions from git archives that
19102 belong to tagged versions.")
19103 (license license:expat)))
19104
19105 (define-public python2-setuptools-scm-git-archive
19106 (package-with-python2 python-setuptools-scm-git-archive))
19107
19108 (define-public python-setuptools-git
19109 (package
19110 (name "python-setuptools-git")
19111 (version "1.2")
19112 (source
19113 (origin
19114 (method url-fetch)
19115 (uri (pypi-uri "setuptools-git" version))
19116 (sha256
19117 (base32
19118 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19119 (build-system python-build-system)
19120 (arguments
19121 `(#:phases
19122 (modify-phases %standard-phases
19123 ;; This is needed for tests.
19124 (add-after 'unpack 'configure-git
19125 (lambda _
19126 (setenv "HOME" "/tmp")
19127 (invoke "git" "config" "--global" "user.email" "guix")
19128 (invoke "git" "config" "--global" "user.name" "guix")
19129 #t)))))
19130 (native-inputs
19131 `(("git" ,git-minimal)))
19132 (home-page "https://github.com/msabramo/setuptools-git")
19133 (synopsis "Setuptools revision control system plugin for Git")
19134 (description
19135 "This package provides a plugin for Setuptools for revision control with
19136 Git.")
19137 (license license:bsd-3)))
19138
19139 (define-public python-pyclipper
19140 (package
19141 (name "python-pyclipper")
19142 (version "1.1.0.post3")
19143 (source
19144 (origin
19145 (method url-fetch)
19146 (uri (pypi-uri "pyclipper" version ".zip"))
19147 (sha256
19148 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19149 (modules '((guix build utils)))
19150 (snippet
19151 '(begin
19152 ;; This file is generated by Cython.
19153 (delete-file "pyclipper/pyclipper.cpp") #t))))
19154 (build-system python-build-system)
19155 (arguments
19156 `(#:phases
19157 (modify-phases %standard-phases
19158 (add-before 'build 'cythonize-sources
19159 (lambda _
19160 (with-directory-excursion "pyclipper"
19161 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19162 (propagated-inputs
19163 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19164 (native-inputs
19165 `(("python-cython" ,python-cython)
19166 ("python-pytest" ,python-pytest)
19167 ("python-pytest-runner" ,python-pytest-runner)
19168 ("python-unittest2" ,python-unittest2)
19169 ("unzip" ,unzip)))
19170 (home-page "https://github.com/greginvm/pyclipper")
19171 (synopsis "Wrapper for Angus Johnson's Clipper library")
19172 (description
19173 "Pyclipper is a Cython wrapper for the C++ translation of the
19174 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19175 (license license:expat)))
19176
19177 (define-public python2-pyclipper
19178 (package-with-python2 python-pyclipper))
19179
19180 (define-public python2-booleanoperations
19181 (package
19182 (name "python2-booleanoperations")
19183 (version "0.7.1")
19184 (source
19185 (origin
19186 (method url-fetch)
19187 (uri (pypi-uri "booleanOperations" version ".zip"))
19188 (sha256
19189 (base32
19190 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19191 (build-system python-build-system)
19192 (arguments
19193 `(#:python ,python-2))
19194 (native-inputs
19195 `(("unzip" ,unzip)
19196 ("python2-pytest" ,python2-pytest)
19197 ("python2-pytest-runner" ,python2-pytest-runner)))
19198 (propagated-inputs
19199 `(("python-fonttools" ,python2-fonttools)
19200 ("python-pyclipper" ,python2-pyclipper)
19201 ("python-ufolib" ,python2-ufolib)))
19202 (home-page "https://github.com/typemytype/booleanOperations")
19203 (synopsis "Boolean operations on paths")
19204 (description
19205 "BooleanOperations provides a Python library that enables
19206 boolean operations on paths.")
19207 (license license:expat)))
19208
19209 (define-public python-tempdir
19210 (package
19211 (name "python-tempdir")
19212 (version "0.7.1")
19213 (source
19214 (origin
19215 (method url-fetch)
19216 (uri (pypi-uri "tempdir" version))
19217 (sha256
19218 (base32
19219 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19220 (build-system python-build-system)
19221 (home-page "https://pypi.org/project/tempdir/")
19222 (arguments
19223 ;; the package has no tests
19224 '(#:tests? #f))
19225 (synopsis "Python library for managing temporary directories")
19226 (description
19227 "This library manages temporary directories that are automatically
19228 deleted with all their contents when they are no longer needed. It is
19229 particularly convenient for use in tests.")
19230 (license license:expat)))
19231
19232 (define-public python2-tempdir
19233 (package-with-python2 python-tempdir))
19234
19235 (define-public python-activepapers
19236 (package
19237 (name "python-activepapers")
19238 (version "0.2.2")
19239 (source
19240 (origin
19241 (method url-fetch)
19242 (uri (pypi-uri "ActivePapers.Py" version))
19243 (sha256
19244 (base32
19245 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
19246 (build-system python-build-system)
19247 (arguments
19248 `(#:modules ((ice-9 ftw)
19249 (srfi srfi-1)
19250 (guix build utils)
19251 (guix build python-build-system))
19252
19253 #:phases
19254 (modify-phases %standard-phases
19255 (add-after 'unpack 'delete-python2-code
19256 (lambda _
19257 (for-each delete-file
19258 '("lib/activepapers/builtins2.py"
19259 "lib/activepapers/standardlib2.py"
19260 "lib/activepapers/utility2.py"))))
19261 (replace 'check
19262 (lambda _
19263 ;; Deactivate the test cases that download files
19264 (setenv "NO_NETWORK_ACCESS" "1")
19265 ;; For some strange reason, some tests fail if nosetests runs all
19266 ;; test modules in a single execution. They pass if each test
19267 ;; module is run individually.
19268 (for-each (lambda (filename)
19269 (invoke "nosetests"
19270 (string-append "tests/" filename)))
19271 (scandir "tests"
19272 (lambda (filename)
19273 (string-suffix? ".py" filename)))))))))
19274 (native-inputs
19275 `(("python-tempdir" ,python-tempdir)
19276 ("python-nose" ,python-nose)))
19277 (propagated-inputs
19278 `(("python-h5py" ,python-h5py)))
19279 (home-page "https://www.activepapers.org/")
19280 (synopsis "Executable papers for scientific computing")
19281 (description
19282 "ActivePapers is a tool for working with executable papers, which
19283 combine data, code, and documentation in single-file packages,
19284 suitable for publication as supplementary material or on repositories
19285 such as figshare or Zenodo.")
19286 (properties `((python2-variant . ,(delay python2-activepapers))))
19287 (license license:bsd-3)))
19288
19289 (define-public python2-activepapers
19290 (let ((base (package-with-python2
19291 (strip-python2-variant python-activepapers))))
19292 (package/inherit base
19293 (arguments
19294 (substitute-keyword-arguments (package-arguments base)
19295 ((#:phases phases)
19296 `(modify-phases ,phases
19297 (delete 'delete-python2-code)
19298 (add-after 'unpack 'delete-python3-code
19299 (lambda _
19300 (for-each delete-file
19301 '("lib/activepapers/builtins3.py"
19302 "lib/activepapers/standardlib3.py"
19303 "lib/activepapers/utility3.py")))))))))))
19304
19305 (define-public python-semver
19306 (package
19307 (name "python-semver")
19308 (version "2.9.0")
19309 (source
19310 (origin
19311 (method url-fetch)
19312 (uri (pypi-uri "semver" version))
19313 (sha256
19314 (base32
19315 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
19316 (build-system python-build-system)
19317 (arguments
19318 `(#:phases (modify-phases %standard-phases
19319 (replace 'check
19320 (lambda _
19321 (delete-file "setup.cfg")
19322 (invoke "py.test"))))))
19323 (native-inputs
19324 `(("python-pytest" ,python-pytest)))
19325 (home-page "https://github.com/k-bx/python-semver")
19326 (synopsis "Python helper for Semantic Versioning")
19327 (description "This package provides a Python library for
19328 @url{Semantic Versioning, http://semver.org/}.")
19329 (license license:bsd-3)))
19330
19331 (define-public python2-semver
19332 (package-with-python2 python-semver))
19333
19334 (define-public python-pyro4
19335 (package
19336 (name "python-pyro4")
19337 (version "4.77")
19338 (source
19339 (origin
19340 (method url-fetch)
19341 (uri (pypi-uri "Pyro4" version))
19342 (sha256
19343 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
19344 (build-system python-build-system)
19345 (arguments
19346 '(#:tests? #f)) ;FIXME: Some tests require network access.
19347 (native-inputs
19348 `(("python-cloudpickle" ,python-cloudpickle)
19349 ("python-dill" ,python-dill)
19350 ("python-msgpack" ,python-msgpack)))
19351 (propagated-inputs
19352 `(("python-serpent" ,python-serpent)))
19353 (home-page "https://pyro4.readthedocs.io")
19354 (synopsis "Distributed object middleware for Python")
19355 (description
19356 "Pyro enables you to build applications in which objects can talk to each
19357 other over the network. You can just use normal Python method calls to call
19358 objects on other machines, also known as remote procedure calls (RPC).")
19359 (license license:expat)))
19360
19361 (define-public python2-pyro
19362 (package
19363 (name "python2-pyro")
19364 (version "3.16")
19365 (source
19366 (origin
19367 (method url-fetch)
19368 (uri (pypi-uri "Pyro" version))
19369 (file-name (string-append "Pyro-" version ".tar.gz"))
19370 (sha256
19371 (base32
19372 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
19373 (build-system python-build-system)
19374 (arguments
19375 ;; Pyro is not compatible with Python 3
19376 `(#:python ,python-2
19377 ;; Pyro has no test cases for automatic execution
19378 #:tests? #f))
19379 (home-page "https://pythonhosted.org/Pyro/")
19380 (synopsis "Distributed object manager for Python")
19381 (description "Pyro is a Distributed Object Technology system
19382 written in Python that is designed to be easy to use. It resembles
19383 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
19384 which is a system and language independent Distributed Object Technology
19385 and has much more to offer than Pyro or RMI. Pyro 3.x is no
19386 longer maintained. New projects should use Pyro4 instead, which
19387 is the new Pyro version that is actively developed.")
19388 (license license:expat)))
19389
19390 (define-public python2-scientific
19391 (package
19392 (name "python2-scientific")
19393 (version "2.9.4")
19394 (source
19395 (origin
19396 (method git-fetch)
19397 (uri (git-reference
19398 (url "https://github.com/khinsen/ScientificPython")
19399 (commit (string-append "rel" version))))
19400 (file-name (git-file-name name version))
19401 (sha256
19402 (base32
19403 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
19404 (build-system python-build-system)
19405 (inputs
19406 `(("netcdf" ,netcdf)))
19407 (propagated-inputs
19408 `(("python-numpy" ,python2-numpy-1.8)
19409 ("python-pyro" ,python2-pyro)))
19410 (arguments
19411 ;; ScientificPython is not compatible with Python 3
19412 `(#:python ,python-2
19413 #:tests? #f ; No test suite
19414 #:phases
19415 (modify-phases %standard-phases
19416 (replace 'build
19417 (lambda* (#:key inputs #:allow-other-keys)
19418 (invoke "python" "setup.py" "build"
19419 (string-append "--netcdf_prefix="
19420 (assoc-ref inputs "netcdf"))))))))
19421 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
19422 (synopsis "Python modules for scientific computing")
19423 (description "ScientificPython is a collection of Python modules that are
19424 useful for scientific computing. Most modules are rather general (Geometry,
19425 physical units, automatic derivatives, ...) whereas others are more
19426 domain-specific (e.g. netCDF and PDB support). The library is currently
19427 not actively maintained and works only with Python 2 and NumPy < 1.9.")
19428 (license license:cecill-c)))
19429
19430 (define-public python2-mmtk
19431 (package
19432 (name "python2-mmtk")
19433 (version "2.7.12")
19434 (source
19435 (origin
19436 (method git-fetch)
19437 (uri (git-reference
19438 (url "https://github.com/khinsen/MMTK")
19439 (commit (string-append "rel" version))))
19440 (file-name (git-file-name name version))
19441 (sha256
19442 (base32
19443 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
19444 (build-system python-build-system)
19445 (native-inputs
19446 `(("netcdf" ,netcdf)))
19447 (propagated-inputs
19448 `(("python-scientific" ,python2-scientific)
19449 ("python-tkinter" ,python-2 "tk")))
19450 (arguments
19451 `(#:python ,python-2
19452 #:tests? #f
19453 #:phases
19454 (modify-phases %standard-phases
19455 (add-before 'build 'includes-from-scientific
19456 (lambda* (#:key inputs #:allow-other-keys)
19457 (mkdir-p "Include/Scientific")
19458 (copy-recursively
19459 (string-append
19460 (assoc-ref inputs "python-scientific")
19461 "/include/python2.7/Scientific")
19462 "Include/Scientific"))))))
19463 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
19464 (synopsis "Python library for molecular simulation")
19465 (description "MMTK is a library for molecular simulations with an emphasis
19466 on biomolecules. It provides widely used methods such as Molecular Dynamics
19467 and normal mode analysis, but also basic routines for implementing new methods
19468 for simulation and analysis. The library is currently not actively maintained
19469 and works only with Python 2 and NumPy < 1.9.")
19470 (license license:cecill-c)))
19471
19472 (define-public python-phonenumbers
19473 (package
19474 (name "python-phonenumbers")
19475 (version "8.9.1")
19476 (source
19477 (origin
19478 (method url-fetch)
19479 (uri (pypi-uri "phonenumbers" version))
19480 (sha256
19481 (base32
19482 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
19483 (build-system python-build-system)
19484 (home-page
19485 "https://github.com/daviddrysdale/python-phonenumbers")
19486 (synopsis
19487 "Python library for dealing with international phone numbers")
19488 (description
19489 "This package provides a Python port of Google's libphonenumber library.")
19490 (license license:asl2.0)))
19491
19492 (define-public python2-phonenumbers
19493 (package-with-python2 python-phonenumbers))
19494
19495 (define-public python-send2trash
19496 (package
19497 (name "python-send2trash")
19498 (version "1.5.0")
19499 (source
19500 (origin (method git-fetch)
19501 ;; Source tarball on PyPI doesn't include tests.
19502 (uri (git-reference
19503 (url "https://github.com/hsoft/send2trash")
19504 (commit version)))
19505 (file-name (git-file-name name version))
19506 (sha256
19507 (base32
19508 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
19509 (build-system python-build-system)
19510 (arguments
19511 '(#:phases
19512 (modify-phases %standard-phases
19513 (add-before 'check 'pre-check
19514 (lambda _
19515 (mkdir-p "/tmp/foo")
19516 (setenv "HOME" "/tmp/foo")
19517 #t)))))
19518 (home-page "https://github.com/hsoft/send2trash")
19519 (synopsis "Send files to the user's @file{~/Trash} directory")
19520 (description "This package provides a Python library to send files to the
19521 user's @file{~/Trash} directory.")
19522 (properties `((python2-variant . ,(delay python2-send2trash))))
19523 (license license:bsd-3)))
19524
19525 (define-public python2-send2trash
19526 (let ((base (package-with-python2
19527 (strip-python2-variant python-send2trash))))
19528 (package/inherit base
19529 (arguments
19530 (substitute-keyword-arguments (package-arguments python-send2trash)
19531 ((#:phases phases)
19532 `(modify-phases ,phases
19533 (add-before 'check 'setenv
19534 (lambda _
19535 (setenv "PYTHONPATH"
19536 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19537 #t)))))))))
19538
19539 (define-public python-pyfavicon
19540 (package
19541 (name "python-pyfavicon")
19542 (version "0.1.1")
19543 (source
19544 (origin
19545 (method url-fetch)
19546 (uri (pypi-uri "pyfavicon" version))
19547 (sha256
19548 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
19549 (build-system python-build-system)
19550 (arguments
19551 ;; There are no tests in the PyPI tarball and the tests from the
19552 ;; repository require online data.
19553 '(#:tests? #f))
19554 (propagated-inputs
19555 `(("python-aiohttp" ,python-aiohttp)
19556 ("python-beautifulsoup4" ,python-beautifulsoup4)
19557 ("python-pillow" ,python-pillow)))
19558 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
19559 (synopsis "Async favicon fetcher")
19560 (description
19561 "@code{pyfavicon} is an async favicon fetcher.")
19562 (license license:expat)))
19563
19564 (define-public python-yamllint
19565 (package
19566 (name "python-yamllint")
19567 (version "1.26.1")
19568 (source
19569 (origin
19570 (method url-fetch)
19571 (uri (pypi-uri "yamllint" version))
19572 (sha256
19573 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
19574 (build-system python-build-system)
19575 (propagated-inputs
19576 `(("python-pathspec" ,python-pathspec)
19577 ("python-pyyaml" ,python-pyyaml)
19578 ("python-setuptools" ,python-setuptools)))
19579 (home-page "https://github.com/adrienverge/yamllint")
19580 (synopsis "Linter for YAML files")
19581 (description
19582 "Yamllint is a linter for YAML files. yamllint does not only check for
19583 syntax validity, but for weirdnesses like key repetition and cosmetic problems
19584 such as lines length, trailing spaces, indentation, etc.")
19585 (license license:gpl3+)))
19586
19587 (define-public python-yapf
19588 (package
19589 (name "python-yapf")
19590 (version "0.29.0")
19591 (source
19592 (origin
19593 (method url-fetch)
19594 (uri (pypi-uri "yapf" version))
19595 (sha256
19596 (base32
19597 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
19598 (build-system python-build-system)
19599 (home-page "https://github.com/google/yapf")
19600 (synopsis "Formatter for Python code")
19601 (description "YAPF is a formatter for Python code. It's based off of
19602 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
19603 takes the code and reformats it to the best formatting that conforms to the
19604 style guide, even if the original code didn't violate the style guide.")
19605 (license license:asl2.0)))
19606
19607 (define-public python2-yapf
19608 (package-with-python2 python-yapf))
19609
19610 (define-public python-yq
19611 (package
19612 (name "python-yq")
19613 (version "2.11.1")
19614 (source
19615 (origin
19616 (method url-fetch)
19617 (uri (pypi-uri "yq" version))
19618 (sha256
19619 (base32
19620 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
19621 (build-system python-build-system)
19622 (arguments
19623 '(#:phases
19624 (modify-phases %standard-phases
19625 (add-after 'unpack 'patch
19626 (lambda* (#:key inputs #:allow-other-keys)
19627 (substitute* "yq/__init__.py"
19628 (("Popen\\(\\[\"jq")
19629 (string-append
19630 "Popen([\""
19631 (assoc-ref inputs "jq")
19632 "/bin/jq")))
19633 #t)))))
19634 (inputs
19635 `(("python-argcomplete" ,python-argcomplete)
19636 ("python-pyyaml" ,python-pyyaml)
19637 ("python-xmltodict" ,python-xmltodict)
19638 ("jq" ,jq)))
19639 (native-inputs
19640 `(("python-coverage" ,python-coverage)
19641 ("python-flake8" ,python-flake8)
19642 ("python-wheel" ,python-wheel)))
19643 (home-page "https://github.com/kislyuk/yq")
19644 (synopsis "Command-line YAML/XML processor")
19645 (description
19646 "This package provides @command{yq} and @command{xq} for processing YAML
19647 and XML respectively. The processing is done through @command{jq}, @command{jq}
19648 filters can be used to process the data as it passes through.")
19649 (license license:asl2.0)))
19650
19651 (define-public python-gyp
19652 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
19653 (revision "0"))
19654 (package
19655 (name "python-gyp")
19656 ;; Google does not release versions,
19657 ;; based on second most recent commit date.
19658 (version (git-version "0.0.0" revision commit))
19659 (source
19660 (origin
19661 ;; Google does not release tarballs,
19662 ;; git checkout is needed.
19663 (method git-fetch)
19664 (uri (git-reference
19665 (url "https://chromium.googlesource.com/external/gyp")
19666 (commit commit)))
19667 (file-name (git-file-name name version))
19668 (sha256
19669 (base32
19670 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
19671 (build-system python-build-system)
19672 (home-page "https://gyp.gsrc.io/")
19673 (synopsis "GYP is a Meta-Build system")
19674 (description
19675 "GYP builds build systems for large, cross platform applications.
19676 It can be used to generate XCode projects, Visual Studio projects, Ninja build
19677 files, and Makefiles.")
19678 (license license:bsd-3))))
19679
19680 (define-public python2-gyp
19681 (package-with-python2 python-gyp))
19682
19683 (define-public python-whatever
19684 (package
19685 (name "python-whatever")
19686 (version "0.6")
19687 (source
19688 (origin
19689 (method git-fetch)
19690 (uri (git-reference
19691 (url "https://github.com/Suor/whatever")
19692 (commit version)))
19693 (file-name (git-file-name name version))
19694 (sha256
19695 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
19696 (build-system python-build-system)
19697 (arguments
19698 `(#:phases
19699 (modify-phases %standard-phases
19700 (replace 'check
19701 (lambda _
19702 (invoke "py.test"))))))
19703 (native-inputs
19704 `(("python-pytest" ,python-pytest)))
19705 (home-page "https://github.com/Suor/whatever")
19706 (synopsis "Make anonymous functions by partial application of operators")
19707 (description "@code{whatever} provides an easy way to make anonymous
19708 functions by partial application of operators.")
19709 (license license:bsd-3)))
19710
19711 (define-public python2-whatever
19712 (package-with-python2 python-whatever))
19713
19714 (define-public python-funcy
19715 (package
19716 (name "python-funcy")
19717 (version "1.11")
19718 (source
19719 (origin
19720 (method git-fetch)
19721 (uri (git-reference
19722 (url "https://github.com/Suor/funcy")
19723 (commit version)))
19724 (sha256
19725 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
19726 (file-name (git-file-name name version))))
19727 (build-system python-build-system)
19728 (arguments
19729 `(#:phases
19730 (modify-phases %standard-phases
19731 (replace 'check
19732 (lambda _
19733 (invoke "py.test"))))))
19734 (native-inputs
19735 `(("python-pytest" ,python-pytest)
19736 ("python-whatever" ,python-whatever)))
19737 (home-page "https://github.com/Suor/funcy")
19738 (synopsis "Functional tools")
19739 (description "@code{funcy} is a library that provides functional tools.
19740 Examples are:
19741 @enumerate
19742 @item merge - Merges collections of the same type
19743 @item walk - Type-preserving map
19744 @item select - Selects a part of a collection
19745 @item take - Takes the first n items of a collection
19746 @item first - Takes the first item of a collection
19747 @item remove - Predicated-removes items of a collection
19748 @item concat - Concatenates two collections
19749 @item flatten - Flattens a collection with subcollections
19750 @item distinct - Returns only distinct items
19751 @item split - Predicated-splits a collection
19752 @item split_at - Splits a collection at a given item
19753 @item group_by - Groups items by group
19754 @item pairwise - Pairs off adjacent items
19755 @item partial - Partially-applies a function
19756 @item curry - Curries a function
19757 @item compose - Composes functions
19758 @item complement - Complements a predicate
19759 @item all_fn - \"all\" with predicate
19760 @end enumerate")
19761 (license license:bsd-3)))
19762
19763 (define-public python2-funcy
19764 (package-with-python2 python-funcy))
19765
19766 (define-public python-isoweek
19767 (package
19768 (name "python-isoweek")
19769 (version "1.3.3")
19770 (source
19771 (origin
19772 (method url-fetch)
19773 (uri (pypi-uri "isoweek" version))
19774 (sha256
19775 (base32
19776 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
19777 (build-system python-build-system)
19778 (home-page "https://github.com/gisle/isoweek")
19779 (synopsis "Objects representing a week")
19780 (description "The @code{isoweek} module provide the class Week that
19781 implements the week definition of ISO 8601. This standard also defines
19782 a notation for identifying weeks; yyyyWww (where the W is a literal).
19783 Week instances stringify to this form.")
19784 (license license:bsd-3)))
19785
19786 (define-public python2-isoweek
19787 (package-with-python2 python-isoweek))
19788
19789 (define-public python-pyzbar
19790 (package
19791 (name "python-pyzbar")
19792 (version "0.1.8")
19793 (source
19794 (origin
19795 ;; There's no source tarball on PyPI.
19796 (method git-fetch)
19797 (uri (git-reference
19798 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
19799 (commit (string-append "v" version))))
19800 (file-name (git-file-name name version))
19801 (sha256
19802 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
19803 (build-system python-build-system)
19804 (arguments
19805 `(#:phases
19806 (modify-phases %standard-phases
19807 (add-after 'unpack 'remove-failing-test
19808 (lambda _
19809 ;; This tests if find_library was called once, but we remove
19810 ;; the call in the stage below to make the library find libzbar.
19811 (delete-file "pyzbar/tests/test_zbar_library.py")
19812 #t))
19813 (add-before 'build 'set-library-file-name
19814 (lambda* (#:key inputs #:allow-other-keys)
19815 (let ((libzbar (assoc-ref inputs "zbar")))
19816 (substitute* "pyzbar/zbar_library.py"
19817 (("find_library\\('zbar'\\)")
19818 (string-append "'" libzbar "/lib/libzbar.so.0'")))
19819 #t))))))
19820 (native-inputs
19821 `(("pkg-config" ,pkg-config)
19822 ("python-numpy" ,python-numpy)
19823 ("python-pillow" ,python-pillow)))
19824 (inputs
19825 `(("zbar" ,zbar)))
19826 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
19827 (synopsis "Read one-dimensional barcodes and QR codes")
19828 (description
19829 "Read one-dimensional barcodes and QR codes using the zbar library.
19830
19831 Features:
19832
19833 @itemize
19834 @item Pure python
19835 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
19836 @item Decodes locations of barcodes
19837 @item No dependencies, other than the zbar library itself
19838 @end itemize")
19839 (license license:expat)))
19840
19841 (define-public python-tokenize-rt
19842 (package
19843 (name "python-tokenize-rt")
19844 (version "2.0.1")
19845 (source
19846 (origin
19847 (method url-fetch)
19848 (uri (pypi-uri "tokenize-rt" version))
19849 (sha256
19850 (base32
19851 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
19852 (build-system python-build-system)
19853 (home-page "https://github.com/asottile/tokenize-rt")
19854 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
19855 (description
19856 "This Python library is a wrapper around @code{tokenize} from the Python
19857 standard library. It provides two additional tokens @code{ESCAPED_NL} and
19858 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
19859 and @code{tokens_to_src} to roundtrip.")
19860 (license license:expat)))
19861
19862 (define-public python-future-fstrings
19863 (package
19864 (name "python-future-fstrings")
19865 (version "0.4.1")
19866 (source
19867 (origin
19868 (method url-fetch)
19869 (uri (pypi-uri "future_fstrings" version))
19870 (sha256
19871 (base32
19872 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
19873 (build-system python-build-system)
19874 (propagated-inputs
19875 `(("python-tokenize-rt" ,python-tokenize-rt)))
19876 (home-page "https://github.com/asottile/future-fstrings")
19877 (synopsis "Backport of fstrings to Python < 3.6")
19878 (description
19879 "This package provides a UTF-8 compatible encoding
19880 @code{future_fstrings}, which performs source manipulation. It decodes the
19881 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
19882 @code{f} strings.")
19883 (license license:expat)))
19884
19885 (define-public python-typed-ast
19886 (package
19887 (name "python-typed-ast")
19888 (version "1.4.0")
19889 (source
19890 (origin
19891 (method git-fetch)
19892 (uri (git-reference
19893 (url "https://github.com/python/typed_ast")
19894 (commit version)))
19895 (sha256
19896 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
19897 (file-name (git-file-name name version))))
19898 (build-system python-build-system)
19899 (arguments
19900 `(#:modules ((guix build utils)
19901 (guix build python-build-system)
19902 (ice-9 ftw)
19903 (srfi srfi-1)
19904 (srfi srfi-26))
19905 #:phases
19906 (modify-phases %standard-phases
19907 (replace 'check
19908 (lambda _
19909 (let ((cwd (getcwd)))
19910 (setenv "PYTHONPATH"
19911 (string-append cwd "/build/"
19912 (find (cut string-prefix? "lib" <>)
19913 (scandir (string-append cwd "/build")))
19914 ":"
19915 (getenv "PYTHONPATH"))))
19916 (invoke "pytest")
19917 #t)))))
19918 (native-inputs `(("python-pytest" ,python-pytest)))
19919 (home-page "https://github.com/python/typed_ast")
19920 (synopsis "Fork of Python @code{ast} modules with type comment support")
19921 (description "This package provides a parser similar to the standard
19922 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
19923 include PEP 484 type comments and are independent of the version of Python
19924 under which they are run. The @code{typed_ast} parsers produce the standard
19925 Python AST (plus type comments), and are both fast and correct, as they are
19926 based on the CPython 2.7 and 3.7 parsers.")
19927 ;; See the file "LICENSE" for the details.
19928 (license (list license:psfl
19929 license:asl2.0
19930 license:expat)))) ;ast27/Parser/spark.py
19931
19932 (define-public python-typer
19933 (package
19934 (name "python-typer")
19935 (version "0.3.2")
19936 (source
19937 (origin
19938 ;; Building `python-typer` from the git repository requires the `flit-core`
19939 ;; Python package that is not installed by `python-flit`.
19940 (method url-fetch)
19941 (uri (pypi-uri "typer" version))
19942 (sha256
19943 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
19944 (build-system python-build-system)
19945 (arguments
19946 `(#:phases
19947 (modify-phases %standard-phases
19948 (add-before 'check 'disable-failing-tests
19949 (lambda _
19950 (substitute* "tests/test_completion/test_completion.py"
19951 (("def test_show_completion")
19952 "def _test_show_completion")
19953 (("def test_install_completion")
19954 "def _test_install_completion"))
19955 (substitute* "tests/test_completion/test_completion_install.py"
19956 (("def test_completion_install_bash")
19957 "def _test_completion_install_bash")
19958 (("def test_completion_install_zsh")
19959 "def _test_completion_install_zsh")
19960 (("def test_completion_install_fish")
19961 "def _test_completion_install_fish")
19962 (("def test_completion_install_powershell")
19963 "def _test_completion_install_powershell"))
19964 #t))
19965 (replace 'check
19966 (lambda _
19967 (setenv "PYTHONPATH"
19968 (string-append (getcwd) ":"
19969 (getenv "PYTHONPATH")))
19970 (invoke "python" "-m" "pytest" "tests/")
19971 #t)))))
19972 (propagated-inputs
19973 `(("python-click" ,python-click)))
19974 (native-inputs
19975 `(("python-coverage" ,python-coverage)
19976 ("python-pytest" ,python-pytest)
19977 ("python-shellingham" ,python-shellingham)))
19978 (home-page "https://github.com/tiangolo/typer")
19979 (synopsis
19980 "Typer builds CLI based on Python type hints")
19981 (description
19982 "Typer is a library for building CLI applications. It's based on
19983 Python 3.6+ type hints.")
19984 ;; MIT license
19985 (license license:expat)))
19986
19987 (define-public python-typing
19988 (package
19989 (name "python-typing")
19990 (version "3.7.4.3")
19991 (source
19992 (origin
19993 (method url-fetch)
19994 (uri (pypi-uri "typing" version))
19995 (sha256
19996 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
19997 (build-system python-build-system)
19998 (home-page "https://docs.python.org/3/library/typing.html")
19999 (synopsis "Type hints for Python")
20000 (description "This is a backport of the standard library @code{typing}
20001 module to Python versions older than 3.5. Typing defines a standard notation
20002 for Python function and variable type annotations. The notation can be used
20003 for documenting code in a concise, standard format, and it has been designed
20004 to also be used by static and runtime type checkers, static analyzers, IDEs
20005 and other tools.")
20006 (license license:psfl)))
20007
20008 (define-public python2-typing
20009 (package-with-python2 python-typing))
20010
20011 (define-public python-typing-extensions
20012 (package
20013 (name "python-typing-extensions")
20014 (version "3.7.4.3")
20015 (source
20016 (origin
20017 (method url-fetch)
20018 (uri (pypi-uri "typing_extensions" version))
20019 (sha256
20020 (base32
20021 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20022 (build-system python-build-system)
20023 (home-page
20024 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20025 (synopsis "Experimental type hints for Python")
20026 (description
20027 "The typing_extensions module contains additional @code{typing} hints not
20028 yet present in the of the @code{typing} standard library.
20029 Included are implementations of:
20030 @enumerate
20031 @item ClassVar
20032 @item ContextManager
20033 @item Counter
20034 @item DefaultDict
20035 @item Deque
20036 @item NewType
20037 @item NoReturn
20038 @item overload
20039 @item Protocol
20040 @item runtime
20041 @item Text
20042 @item Type
20043 @item TYPE_CHECKING
20044 @item AsyncGenerator
20045 @end enumerate\n")
20046 (license license:psfl)))
20047
20048 (define-public bpython
20049 (package
20050 (name "bpython")
20051 (version "0.20.1")
20052 (source
20053 (origin
20054 (method url-fetch)
20055 (uri (pypi-uri "bpython" version))
20056 (sha256
20057 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
20058 (build-system python-build-system)
20059 (arguments
20060 `(#:phases
20061 (modify-phases %standard-phases
20062 (add-after 'unpack 'remove-failing-test
20063 (lambda _
20064 ;; Remove failing test. FIXME: make it pass
20065 (delete-file "bpython/test/test_args.py")
20066 #t))
20067 (add-after 'wrap 'add-aliases
20068 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20069 (lambda* (#:key outputs #:allow-other-keys)
20070 (let ((out (assoc-ref outputs "out")))
20071 (for-each
20072 (lambda (old new)
20073 (symlink old (string-append out "/bin/" new)))
20074 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20075 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20076 #t)))))
20077 (propagated-inputs
20078 `(("python-pygments" ,python-pygments)
20079 ("python-requests" ,python-requests)
20080 ("python-curtsies" ,python-curtsies)
20081 ("python-greenlet" ,python-greenlet)
20082 ("python-six" ,python-six)
20083 ("python-wcwidth" ,python-wcwidth)
20084 ;; optional dependencies
20085 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20086 ("python-watchdog" ,python-watchdog)
20087 ("python-jedi" ,python-jedi)))
20088 (native-inputs
20089 `(("python-sphinx" ,python-sphinx)
20090 ("python-mock" ,python-mock)))
20091 (home-page "https://bpython-interpreter.org/")
20092 (synopsis "Fancy interface to the Python interpreter")
20093 (description "Bpython is a fancy interface to the Python
20094 interpreter. bpython's main features are
20095
20096 @enumerate
20097 @item in-line syntax highlighting,
20098 @item readline-like autocomplete with suggestions displayed as you type,
20099 @item expected parameter list for any Python function,
20100 @item \"rewind\" function to pop the last line of code from memory and
20101 re-evaluate,
20102 @item send the code you've entered off to a pastebin,
20103 @item save the code you've entered to a file, and
20104 @item auto-indentation.
20105 @end enumerate")
20106 (license license:expat)))
20107
20108 (define-public python-pyinotify
20109 (package
20110 (name "python-pyinotify")
20111 (version "0.9.6")
20112 (source (origin
20113 (method url-fetch)
20114 (uri (pypi-uri "pyinotify" version))
20115 (sha256
20116 (base32
20117 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20118 (build-system python-build-system)
20119 (arguments `(#:tests? #f)) ;no tests
20120 (home-page "https://github.com/seb-m/pyinotify")
20121 (synopsis "Python library for monitoring inotify events")
20122 (description
20123 "@code{pyinotify} provides a Python interface for monitoring
20124 file system events on Linux.")
20125 (license license:expat)))
20126
20127 (define-public python2-pyinotify
20128 (package-with-python2 python-pyinotify))
20129
20130 ;; Ada parser uses this version.
20131 (define-public python2-quex-0.67.3
20132 (package
20133 (name "python2-quex")
20134 (version "0.67.3")
20135 (source
20136 (origin
20137 (method url-fetch)
20138 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20139 (version-major+minor version)
20140 "/quex-" version ".zip"))
20141 (sha256
20142 (base32
20143 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20144 (build-system python-build-system)
20145 (native-inputs
20146 `(("unzip" ,unzip)))
20147 (arguments
20148 `(#:python ,python-2
20149 #:tests? #f
20150 #:phases
20151 (modify-phases %standard-phases
20152 (delete 'configure)
20153 (delete 'build)
20154 (replace 'install
20155 (lambda* (#:key outputs #:allow-other-keys)
20156 (let* ((out (assoc-ref outputs "out"))
20157 (share/quex (string-append out "/share/quex"))
20158 (bin (string-append out "/bin")))
20159 (copy-recursively "." share/quex)
20160 (mkdir-p bin)
20161 (symlink (string-append share/quex "/quex-exe.py")
20162 (string-append bin "/quex"))
20163 #t))))))
20164 (native-search-paths
20165 (list (search-path-specification
20166 (variable "QUEX_PATH")
20167 (files '("share/quex")))))
20168 (home-page "http://quex.sourceforge.net/")
20169 (synopsis "Lexical analyzer generator in Python")
20170 (description "@code{quex} is a lexical analyzer generator in Python.")
20171 (license license:lgpl2.1+))) ; Non-military
20172
20173 (define-public python2-quex
20174 (package (inherit python2-quex-0.67.3)
20175 (name "python2-quex")
20176 (version "0.68.1")
20177 (source
20178 (origin
20179 (method url-fetch)
20180 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20181 (sha256
20182 (base32
20183 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20184 (file-name (string-append name "-" version ".tar.gz"))))))
20185
20186 (define-public python-more-itertools
20187 (package
20188 (name "python-more-itertools")
20189 (version "8.2.0")
20190 (source
20191 (origin
20192 (method url-fetch)
20193 (uri (pypi-uri "more-itertools" version))
20194 (sha256
20195 (base32
20196 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
20197 (build-system python-build-system)
20198 (home-page "https://github.com/erikrose/more-itertools")
20199 (synopsis "More routines for operating on iterables, beyond itertools")
20200 (description "Python's built-in @code{itertools} module implements a
20201 number of iterator building blocks inspired by constructs from APL, Haskell,
20202 and SML. @code{more-itertools} includes additional building blocks for
20203 working with iterables.")
20204 (properties `((python2-variant . ,(delay python2-more-itertools))))
20205 (license license:expat)))
20206
20207 ;; The 5.x series are the last versions supporting Python 2.7.
20208 (define-public python2-more-itertools
20209 (package
20210 (inherit python-more-itertools)
20211 (name "python2-more-itertools")
20212 (version "5.0.0")
20213 (source (origin
20214 (method url-fetch)
20215 (uri (pypi-uri "more-itertools" version))
20216 (sha256
20217 (base32
20218 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
20219 (arguments
20220 `(#:python ,python-2))
20221 (propagated-inputs
20222 `(("python2-six" ,python2-six-bootstrap)))))
20223
20224 (define-public python-latexcodec
20225 (package
20226 (name "python-latexcodec")
20227 (version "1.0.7")
20228 (source
20229 (origin
20230 (method url-fetch)
20231 (uri (pypi-uri "latexcodec" version))
20232 (sha256
20233 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
20234 (build-system python-build-system)
20235 (inputs
20236 `(("python-six" ,python-six)))
20237 (home-page "https://readthedocs.org/projects/latexcodec/")
20238 (synopsis "Work with LaTeX code in Python")
20239 (description "Lexer and codec to work with LaTeX code in Python.")
20240 (license license:expat)))
20241
20242 (define-public python-pybtex
20243 (package
20244 (name "python-pybtex")
20245 (version "0.22.2")
20246 (source
20247 (origin
20248 (method url-fetch)
20249 (uri (pypi-uri "pybtex" version))
20250 (sha256
20251 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
20252 (build-system python-build-system)
20253 (native-inputs
20254 `(("python-nose" ,python-nose)))
20255 (inputs
20256 `(("python-latexcodec" ,python-latexcodec)
20257 ("python-pyyaml" ,python-pyyaml)
20258 ("python-six" ,python-six)))
20259 (arguments
20260 `(#:test-target "nosetests"))
20261 (home-page "https://pybtex.org/")
20262 (synopsis "BibTeX-compatible bibliography processor")
20263 (description "Pybtex is a BibTeX-compatible bibliography processor written
20264 in Python. You can simply type pybtex instead of bibtex.")
20265 (license license:expat)))
20266
20267 (define-public python-onetimepass
20268 (package
20269 (name "python-onetimepass")
20270 (version "1.0.1")
20271 (source
20272 (origin
20273 (method url-fetch)
20274 (uri (pypi-uri "onetimepass" version))
20275 (sha256
20276 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
20277 (build-system python-build-system)
20278 (propagated-inputs `(("python-six" ,python-six)))
20279 (home-page "https://github.com/tadeck/onetimepass/")
20280 (synopsis "One-time password library")
20281 (description "Python one-time password library for HMAC-based (HOTP) and
20282 time-based (TOTP) passwords.")
20283 (license license:expat)))
20284
20285 (define-public python-parso
20286 (package
20287 (name "python-parso")
20288 (version "0.7.1")
20289 (source
20290 (origin
20291 (method url-fetch)
20292 (uri (pypi-uri "parso" version))
20293 (sha256
20294 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
20295 (native-inputs
20296 `(("python-pytest" ,python-pytest)))
20297 (build-system python-build-system)
20298 (arguments
20299 `(#:phases (modify-phases %standard-phases
20300 (replace 'check
20301 (lambda _ (invoke "pytest" "-vv"))))))
20302 (home-page "https://github.com/davidhalter/parso")
20303 (synopsis "Python Parser")
20304 (description "Parso is a Python parser that supports error recovery and
20305 round-trip parsing for different Python versions (in multiple Python versions).
20306 Parso is also able to list multiple syntax errors in your Python file.")
20307 (license license:expat)))
20308
20309 (define-public python2-parso
20310 (package-with-python2 python-parso))
20311
20312 (define-public python-async-generator
20313 (package
20314 (name "python-async-generator")
20315 (version "1.10")
20316 (source
20317 (origin
20318 (method url-fetch)
20319 (uri (pypi-uri "async_generator" version))
20320 (sha256
20321 (base32
20322 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
20323 (build-system python-build-system)
20324 (native-inputs
20325 `(("python-pytest" ,python-pytest)))
20326 (home-page "https://github.com/python-trio/async_generator")
20327 (synopsis "Async generators and context managers for Python 3.5+")
20328 (description "@code{async_generator} back-ports Python 3.6's native async
20329 generators and Python 3.7's context managers into Python 3.5.")
20330 ;; Dual licensed.
20331 (license (list license:expat license:asl2.0))))
20332
20333 (define-public python-async-timeout
20334 (package
20335 (name "python-async-timeout")
20336 (version "3.0.1")
20337 (source
20338 (origin
20339 (method url-fetch)
20340 (uri (pypi-uri "async-timeout" version))
20341 (sha256
20342 (base32
20343 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
20344 (build-system python-build-system)
20345 (home-page "https://github.com/aio-libs/async_timeout/")
20346 (synopsis "Timeout context manager for asyncio programs")
20347 (description "@code{async-timeout} provides a timeout timeout context
20348 manager compatible with @code{asyncio}.")
20349 (license license:asl2.0)))
20350
20351 (define-public python-glob2
20352 (package
20353 (name "python-glob2")
20354 (version "0.7")
20355 (source
20356 (origin
20357 (method git-fetch)
20358 (uri (git-reference
20359 (url "https://github.com/miracle2k/python-glob2")
20360 (commit (string-append "v" version))))
20361 (file-name (git-file-name name version))
20362 (sha256
20363 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
20364 (build-system python-build-system)
20365 (home-page "https://github.com/miracle2k/python-glob2/")
20366 (synopsis "Extended Version of the python buildin glob module")
20367 (description "This is an extended version of the Python
20368 @url{http://docs.python.org/library/glob.html, built-in glob module} which
20369 adds:
20370
20371 @itemize
20372 @item The ability to capture the text matched by glob patterns, and return
20373 those matches alongside the file names.
20374 @item A recursive @code{**} globbing syntax, akin for example to the
20375 @code{globstar} option of Bash.
20376 @item The ability to replace the file system functions used, in order to glob
20377 on virtual file systems.
20378 @item Compatible with Python 2 and Python 3 (tested with 3.3).
20379 @end itemize
20380
20381 Glob2 currently based on the glob code from Python 3.3.1.")
20382 (license license:bsd-2)))
20383
20384 (define-public python2-glob2
20385 (package-with-python2 python-glob2))
20386
20387 (define-public python-gipc
20388 (package
20389 (name "python-gipc")
20390 (version "0.6.0")
20391 (source
20392 (origin
20393 (method url-fetch)
20394 (uri (pypi-uri "gipc" version ".zip"))
20395 (sha256
20396 (base32
20397 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
20398 (build-system python-build-system)
20399 (native-inputs
20400 `(("unzip" ,unzip)))
20401 (propagated-inputs
20402 `(("python-gevent" ,python-gevent)))
20403 (home-page "https://gehrcke.de/gipc/")
20404 (synopsis "Child process management in the context of gevent")
20405 (description "Usage of Python's multiprocessing package in a
20406 gevent-powered application may raise problems. With @code{gipc},
20407 process-based child processes can safely be created anywhere within a
20408 gevent-powered application.")
20409 (license license:expat)))
20410
20411 (define-public python-beautifultable
20412 (package
20413 (name "python-beautifultable")
20414 (version "1.0.0")
20415 (source
20416 (origin
20417 (method url-fetch)
20418 (uri (pypi-uri "beautifultable" version))
20419 (sha256
20420 (base32
20421 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
20422 (build-system python-build-system)
20423 (propagated-inputs
20424 `(("python-wcwidth" ,python-wcwidth)))
20425 (arguments
20426 `(#:phases
20427 (modify-phases %standard-phases
20428 (add-after 'unpack 'patch-setup.py
20429 (lambda _
20430 (substitute* "setup.py"
20431 (("setup\\(")
20432 "setup(\n test_suite=\"test\",")))))))
20433 (home-page "https://github.com/pri22296/beautifultable")
20434 (synopsis "Print ASCII tables for terminals")
20435 (description "@code{python-beautifultable} provides a class for easily
20436 printing tabular data in a visually appealing ASCII format to a terminal.
20437
20438 Features include, but are not limited to:
20439 @itemize
20440 @item Full customization of the look and feel of the table
20441 @item Row and column accessors.
20442 @item Full support for colors using ANSI sequences or any library.
20443 @item Plenty of predefined styles and option to create custom ones.
20444 @item Support for Unicode characters.
20445 @item Supports streaming table when data is slow to retrieve.
20446 @end itemize")
20447 (license license:expat)))
20448
20449 (define-public python-globber
20450 (package
20451 (name "python-globber")
20452 (version "0.2.1")
20453 (source
20454 (origin
20455 (method git-fetch)
20456 (uri (git-reference
20457 (url "https://github.com/asharov/globber")
20458 (commit version)))
20459 (file-name (git-file-name name version))
20460 (sha256
20461 (base32
20462 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
20463 (build-system python-build-system)
20464 (home-page "https://github.com/asharov/globber")
20465 (synopsis "Library for string matching with glob patterns")
20466 (description
20467 "Globber is a Python library for matching file names against glob patterns.
20468 In contrast to other glob-matching libraries, it matches arbitrary strings and
20469 doesn't require the matched names to be existing files. In addition, it
20470 supports the globstar @code{**} operator to match an arbitrary number of
20471 path components.")
20472 (license license:asl2.0)))
20473
20474 (define-public python-git-hammer
20475 (package
20476 (name "python-git-hammer")
20477 (version "0.3.1")
20478 (source
20479 (origin
20480 (method git-fetch)
20481 (uri (git-reference
20482 (url "https://github.com/asharov/git-hammer")
20483 (commit version)))
20484 (file-name (git-file-name name version))
20485 (sha256
20486 (base32
20487 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
20488 (build-system python-build-system)
20489 (arguments
20490 `(#:phases
20491 (modify-phases %standard-phases
20492 (add-after 'unpack 'patch-setup.py
20493 (lambda _
20494 (substitute* "setup.py"
20495 (("setup\\(")
20496 "setup(\n test_suite=\"test\",")))))))
20497 (propagated-inputs
20498 `(("python-beautifultable" ,python-beautifultable)
20499 ("python-dateutil" ,python-dateutil)
20500 ("python-gitpython" ,python-gitpython)
20501 ("python-globber" ,python-globber)
20502 ("python-matplotlib" ,python-matplotlib)
20503 ("python-sqlalchemy" ,python-sqlalchemy)
20504 ("python-sqlalchemy-utils"
20505 ,python-sqlalchemy-utils)))
20506 (home-page "https://github.com/asharov/git-hammer")
20507 (synopsis "Provide statistics for git repositories")
20508 (description
20509 "Git Hammer is a statistics tool for projects in git repositories.
20510 Its major feature is tracking the number of lines authored by each person for every
20511 commit, but it also includes some other useful statistics.")
20512 (license license:asl2.0)))
20513
20514 (define-public python-fusepy
20515 (package
20516 (name "python-fusepy")
20517 (version "2.0.4")
20518 (source
20519 (origin
20520 (method url-fetch)
20521 (uri (pypi-uri "fusepy" version))
20522 (sha256
20523 (base32
20524 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
20525 (build-system python-build-system)
20526 (arguments
20527 `(#:phases
20528 (modify-phases %standard-phases
20529 (add-before 'build 'set-library-file-name
20530 (lambda* (#:key inputs #:allow-other-keys)
20531 (let ((fuse (assoc-ref inputs "fuse")))
20532 (substitute* "fuse.py"
20533 (("find_library\\('fuse'\\)")
20534 (string-append "'" fuse "/lib/libfuse.so'")))
20535 #t))))))
20536 (propagated-inputs
20537 `(("fuse" ,fuse)))
20538 (home-page "https://github.com/fusepy/fusepy")
20539 (synopsis "Simple ctypes bindings for FUSE")
20540 (description "Python module that provides a simple interface to FUSE and
20541 MacFUSE. The binding is created using the standard @code{ctypes} library.")
20542 (license license:isc)))
20543
20544 (define-public python2-fusepy
20545 (package-with-python2 python-fusepy))
20546
20547 (define-public python-fusepyng
20548 (package
20549 (name "python-fusepyng")
20550 (version "1.0.7")
20551 (source
20552 (origin
20553 (method url-fetch)
20554 (uri (pypi-uri "fusepyng" version))
20555 (sha256
20556 (base32
20557 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
20558 (build-system python-build-system)
20559 (arguments
20560 '(#:phases
20561 (modify-phases %standard-phases
20562 (add-after 'unpack 'set-libfuse-path
20563 (lambda* (#:key inputs #:allow-other-keys)
20564 (let ((fuse (assoc-ref inputs "fuse")))
20565 (substitute* "fusepyng.py"
20566 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
20567 (string-append "\"" fuse "/lib/libfuse.so\""))))
20568 #t)))))
20569 (inputs
20570 `(("fuse" ,fuse)))
20571 (propagated-inputs
20572 `(("python-paramiko" ,python-paramiko)))
20573 (home-page "https://github.com/rianhunter/fusepyng")
20574 (synopsis "Simple ctypes bindings for FUSE")
20575 (description "@code{fusepyng} is a Python module that provides a simple
20576 interface to FUSE on various operating systems. It's just one file and is
20577 implemented using @code{ctypes}.")
20578 (license license:isc)))
20579
20580 (define-public python-userspacefs
20581 (package
20582 (name "python-userspacefs")
20583 (version "2.0.3")
20584 (source
20585 (origin
20586 (method url-fetch)
20587 (uri (pypi-uri "userspacefs" version))
20588 (sha256
20589 (base32
20590 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
20591 (build-system python-build-system)
20592 (propagated-inputs
20593 `(("python-fusepyng" ,python-fusepyng)))
20594 (home-page "https://github.com/rianhunter/userspacefs")
20595 (synopsis "User-space file systems for Python")
20596 (description
20597 "@code{userspacefs} is a library that allows you to easily write
20598 user-space file systems in Python.")
20599 (license license:gpl3+)))
20600
20601 (define-public python-stone
20602 (package
20603 (name "python-stone")
20604 (version "3.2.1")
20605 (source
20606 (origin
20607 (method url-fetch)
20608 (uri (pypi-uri "stone" version))
20609 (sha256
20610 (base32
20611 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
20612 (build-system python-build-system)
20613 (arguments
20614 `(#:phases
20615 (modify-phases %standard-phases
20616 (add-after 'unpack 'change-version-requirements
20617 (lambda _
20618 ;; Match the requirement in test/requirements.txt
20619 (substitute* "setup.py"
20620 (("pytest < 5") "pytest < 7"))
20621 ;; We don't care about a coverage report.
20622 (substitute* "test/requirements.txt"
20623 (("coverage.*") "coverage\n"))
20624 #t))
20625 (replace 'check
20626 (lambda* (#:key tests? #:allow-other-keys)
20627 (when tests?
20628 ;; These tests don't import currectly.
20629 (delete-file "test/test_js_client.py")
20630 (delete-file "test/test_tsd_types.py")
20631 (delete-file "test/test_python_gen.py")
20632 (setenv "PYTHONPATH"
20633 (string-append (getcwd) ":"
20634 (getenv "PYTHONPATH")))
20635 (invoke "pytest"))
20636 #t)))))
20637 (propagated-inputs
20638 `(("python-ply" ,python-ply)
20639 ("python-six" ,python-six)))
20640 (native-inputs
20641 `(("python-coverage" ,python-coverage)
20642 ("python-mock" ,python-mock)
20643 ("python-pytest" ,python-pytest)
20644 ("python-pytest-runner" ,python-pytest-runner)))
20645 (home-page "https://github.com/dropbox/stone")
20646 (synopsis "Official Api Spec Language for Dropbox")
20647 (description
20648 "Stone is an interface description language (IDL) for APIs.")
20649 (license license:expat)))
20650
20651 (define-public pybind11
20652 (package
20653 (name "pybind11")
20654 (version "2.6.2")
20655 (source (origin
20656 (method git-fetch)
20657 (uri (git-reference
20658 (url "https://github.com/pybind/pybind11")
20659 (commit (string-append "v" version))))
20660 (sha256
20661 (base32
20662 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
20663 (file-name (git-file-name name version))))
20664 (build-system cmake-build-system)
20665 (native-inputs
20666 `(("python" ,python-wrapper)
20667
20668 ;; The following dependencies are used for tests.
20669 ("python-pytest" ,python-pytest)
20670 ("catch" ,catch-framework2-1)
20671 ("eigen" ,eigen)))
20672 (arguments
20673 `(#:configure-flags
20674 (list (string-append "-DCATCH_INCLUDE_DIR="
20675 (assoc-ref %build-inputs "catch")
20676 "/include/catch"))
20677
20678 #:phases (modify-phases %standard-phases
20679 (add-after 'install 'install-python
20680 (lambda* (#:key outputs #:allow-other-keys)
20681 (let ((out (assoc-ref outputs "out")))
20682 (with-directory-excursion "../source"
20683 (setenv "PYBIND11_USE_CMAKE" "yes")
20684 (invoke "python" "setup.py" "install"
20685 "--single-version-externally-managed"
20686 "--root=/"
20687 (string-append "--prefix=" out)))))))
20688
20689 #:test-target "check"))
20690 (home-page "https://github.com/pybind/pybind11/")
20691 (synopsis "Seamless operability between C++11 and Python")
20692 (description
20693 "@code{pybind11} is a lightweight header-only library that exposes C++
20694 types in Python and vice versa, mainly to create Python bindings of existing
20695 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
20696 library: to minimize boilerplate code in traditional extension modules by
20697 inferring type information using compile-time introspection.")
20698 (license license:bsd-3)))
20699
20700 (define-public python-pooch
20701 (package
20702 (name "python-pooch")
20703 (version "1.3.0")
20704 (source
20705 (origin
20706 (method url-fetch)
20707 (uri (pypi-uri "pooch" version))
20708 (sha256
20709 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
20710 (build-system python-build-system)
20711 (arguments
20712 `(#:tests? #f)) ;requires online data
20713 (propagated-inputs
20714 `(("python-appdirs" ,python-appdirs)
20715 ("python-packaging" ,python-packaging)
20716 ("python-requests" ,python-requests)))
20717 (home-page "https://github.com/fatiando/pooch")
20718 (synopsis "Manage your Python library's sample data files")
20719 (description
20720 "Pooch manages your Python library's sample data files: it automatically
20721 downloads and stores them in a local directory, with support for versioning
20722 and corruption checks.")
20723 (license license:bsd-3)))
20724
20725 (define-public python-fasteners
20726 (package
20727 (name "python-fasteners")
20728 (version "0.15")
20729 (source
20730 (origin
20731 (method url-fetch)
20732 (uri (pypi-uri "fasteners" version))
20733 (sha256
20734 (base32
20735 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
20736 (build-system python-build-system)
20737 (propagated-inputs
20738 `(("python-monotonic" ,python-monotonic)
20739 ("python-six" ,python-six)))
20740 (native-inputs
20741 `(("python-testtools" ,python-testtools)))
20742 (home-page "https://github.com/harlowja/fasteners")
20743 (synopsis "Python package that provides useful locks")
20744 (description
20745 "This package provides a Python program that provides following locks:
20746
20747 @itemize
20748 @item Locking decorator
20749 @item Reader-writer locks
20750 @item Inter-process locks
20751 @item Generic helpers
20752 @end itemize\n")
20753 (license license:asl2.0)))
20754
20755 (define-public python-requests-file
20756 (package
20757 (name "python-requests-file")
20758 (version "1.4.3")
20759 (source
20760 (origin
20761 (method url-fetch)
20762 (uri (pypi-uri "requests-file" version))
20763 (sha256
20764 (base32
20765 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
20766 (build-system python-build-system)
20767 (propagated-inputs
20768 `(("python-requests" ,python-requests)
20769 ("python-six" ,python-six)))
20770 (home-page
20771 "https://github.com/dashea/requests-file")
20772 (synopsis "File transport adapter for Requests")
20773 (description
20774 "Requests-File is a transport adapter for use with the Requests Python
20775 library to allow local file system access via @code{file://} URLs.")
20776 (license license:asl2.0)))
20777
20778 (define-public python2-requests-file
20779 (package-with-python2 python-requests-file))
20780
20781 (define-public python-identify
20782 (package
20783 (name "python-identify")
20784 (version "1.4.25")
20785 (source
20786 (origin
20787 ;; There are no tests in the PyPI tarball.
20788 (method git-fetch)
20789 (uri (git-reference
20790 (url "https://github.com/chriskuehl/identify")
20791 (commit (string-append "v" version))))
20792 (file-name (git-file-name name version))
20793 (sha256
20794 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
20795 (build-system python-build-system)
20796 (arguments
20797 `(#:phases
20798 (modify-phases %standard-phases
20799 (replace 'check
20800 (lambda _
20801 (invoke "pytest" "-vv"))))))
20802 (native-inputs
20803 `(("python-coverage" ,python-coverage)
20804 ("python-pytest" ,python-pytest)))
20805 (propagated-inputs
20806 `(("python-editdistance" ,python-editdistance)))
20807 (home-page "https://github.com/chriskuehl/identify")
20808 (synopsis "File identification library for Python")
20809 (description
20810 "@code{identify} is a file identification library for Python. Given
20811 a file (or some information about a file), return a set of standardized tags
20812 identifying what the file is.")
20813 (license license:expat)))
20814
20815 (define-public python-tldextract
20816 (package
20817 (name "python-tldextract")
20818 (version "2.2.0")
20819 (source
20820 (origin
20821 (method url-fetch)
20822 (uri (pypi-uri "tldextract" version))
20823 (sha256
20824 (base32
20825 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
20826 (build-system python-build-system)
20827 (native-inputs
20828 `(("python-pytest" ,python-pytest)
20829 ("python-responses" ,python-responses)))
20830 (propagated-inputs
20831 `(("python-idna" ,python-idna)
20832 ("python-requests" ,python-requests)
20833 ("python-requests-file" ,python-requests-file)))
20834 (home-page
20835 "https://github.com/john-kurkowski/tldextract")
20836 (synopsis
20837 "Separate the TLD from the registered domain and subdomains of a URL")
20838 (description
20839 "TLDExtract accurately separates the TLD from the registered domain and
20840 subdomains of a URL, using the Public Suffix List. By default, this includes
20841 the public ICANN TLDs and their exceptions. It can optionally support the
20842 Public Suffix List's private domains as well.")
20843 (license license:bsd-3)))
20844
20845 (define-public python2-tldextract
20846 (package-with-python2 python-tldextract))
20847
20848 (define-public python-nodeenv
20849 (package
20850 (name "python-nodeenv")
20851 (version "1.4.0")
20852 (source
20853 (origin
20854 ;; There's no tarball in PyPI.
20855 (method git-fetch)
20856 (uri (git-reference
20857 (url "https://github.com/ekalinin/nodeenv")
20858 (commit version)))
20859 (file-name (git-file-name name version))
20860 (sha256
20861 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
20862 (build-system python-build-system)
20863 (arguments
20864 `(#:phases
20865 (modify-phases %standard-phases
20866 (replace 'check
20867 (lambda _
20868 ;; This test fails. It tries to open a network socket.
20869 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
20870 (native-inputs
20871 `(("python-coverage" ,python-coverage)
20872 ("python-mock" ,python-mock)
20873 ("python-pytest" ,python-pytest)))
20874 (home-page "https://ekalinin.github.io/nodeenv/")
20875 (synopsis "Create isolated node.js environments")
20876 (description
20877 "Nodeenv (node.js virtual environment) is a tool to create isolated
20878 node.js environments. It creates an environment that has its own installation
20879 directories, that doesn't share libraries with other node.js virtual
20880 environments.")
20881 (license license:bsd-3)))
20882
20883 (define-public python-pynamecheap
20884 (package
20885 (name "python-pynamecheap")
20886 (version "0.0.3")
20887 (source
20888 (origin
20889 (method url-fetch)
20890 (uri (pypi-uri "PyNamecheap" version))
20891 (sha256
20892 (base32
20893 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
20894 (build-system python-build-system)
20895 (propagated-inputs
20896 `(("python-requests" ,python-requests)))
20897 (home-page
20898 "https://github.com/Bemmu/PyNamecheap")
20899 (synopsis
20900 "Namecheap API client in Python")
20901 (description
20902 "PyNamecheap is a Namecheap API client in Python.")
20903 (license license:expat)))
20904
20905 (define-public python2-pynamecheap
20906 (package-with-python2 python-pynamecheap))
20907
20908 (define-public python-dns-lexicon
20909 (package
20910 (name "python-dns-lexicon")
20911 (version "2.4.0")
20912 (source
20913 (origin
20914 (method url-fetch)
20915 (uri (pypi-uri "dns-lexicon" version))
20916 (sha256
20917 (base32
20918 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
20919 (build-system python-build-system)
20920 (arguments
20921 `(#:tests? #f)) ;requires internet access
20922 (propagated-inputs
20923 `(("python-future" ,python-future)
20924 ("python-pynamecheap" ,python-pynamecheap)
20925 ("python-requests" ,python-requests)
20926 ("python-tldextract" ,python-tldextract)
20927 ("python-urllib3" ,python-urllib3)))
20928 (home-page "https://github.com/AnalogJ/lexicon")
20929 (synopsis
20930 "Manipulate DNS records on various DNS providers")
20931 (description
20932 "Lexicon provides a way to manipulate DNS records on multiple DNS
20933 providers in a standardized way. It has a CLI but it can also be used as a
20934 Python library. It was designed to be used in automation, specifically with
20935 Let's Encrypt.")
20936 (license license:expat)))
20937
20938 (define-public python2-dns-lexicon
20939 (package-with-python2 python-dns-lexicon))
20940
20941 (define-public python-cfgv
20942 (package
20943 (name "python-cfgv")
20944 (version "3.1.0")
20945 (source
20946 (origin
20947 ;; There are no tests in the PyPI tarball.
20948 (method git-fetch)
20949 (uri (git-reference
20950 (url "https://github.com/asottile/cfgv")
20951 (commit (string-append "v" version))))
20952 (file-name (git-file-name name version))
20953 (sha256
20954 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
20955 (build-system python-build-system)
20956 (arguments
20957 `(#:phases
20958 (modify-phases %standard-phases
20959 (replace 'check
20960 (lambda _
20961 (invoke "pytest" "-vv"))))))
20962 (native-inputs
20963 `(("python-covdefaults" ,python-covdefaults)
20964 ("python-coverage" ,python-coverage)
20965 ("python-pytest" ,python-pytest)))
20966 (home-page "https://github.com/asottile/cfgv")
20967 (synopsis "Configuration validation library")
20968 (description
20969 "This library helps to validate configuration files and produce human
20970 readable error messages.")
20971 (license license:expat)))
20972
20973 (define-public python-commandlines
20974 (package
20975 (name "python-commandlines")
20976 (version "0.4.1")
20977 (source
20978 (origin
20979 (method url-fetch)
20980 (uri (pypi-uri "commandlines" version))
20981 (sha256
20982 (base32
20983 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
20984 (build-system python-build-system)
20985 (home-page "https://github.com/chrissimpkins/commandlines")
20986 (synopsis "Command line argument to object parsing library")
20987 (description
20988 "@code{Commandlines} is a Python library for command line application
20989 development that supports command line argument parsing, command string
20990 validation testing and application logic.")
20991 (license license:expat)))
20992
20993 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
20994 ;; python-numba. They have a very unflexible relationship.
20995 (define-public python-numba
20996 (package
20997 (name "python-numba")
20998 (version "0.51.2")
20999 (source
21000 (origin
21001 (method url-fetch)
21002 (uri (pypi-uri "numba" version))
21003 (sha256
21004 (base32
21005 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
21006 (build-system python-build-system)
21007 (arguments
21008 `(#:phases
21009 (modify-phases %standard-phases
21010 (add-after 'unpack 'disable-proprietary-features
21011 (lambda _
21012 (setenv "NUMBA_DISABLE_HSA" "1")
21013 (setenv "NUMBA_DISABLE_CUDA" "1")
21014 #t))
21015 (replace 'check
21016 (lambda* (#:key inputs outputs #:allow-other-keys)
21017 (add-installed-pythonpath inputs outputs)
21018 ;; Something is wrong with the PYTHONPATH when running the
21019 ;; tests from the build directory, as it complains about not being
21020 ;; able to import certain modules.
21021 (with-directory-excursion "/tmp"
21022 (setenv "HOME" (getcwd))
21023 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21024 (propagated-inputs
21025 `(("python-llvmlite" ,python-llvmlite)
21026 ("python-numpy" ,python-numpy)
21027 ("python-singledispatch" ,python-singledispatch)))
21028 (native-inputs ;for tests
21029 `(("python-jinja2" ,python-jinja2)
21030 ("python-pygments" ,python-pygments)))
21031 (home-page "https://numba.pydata.org")
21032 (synopsis "Compile Python code using LLVM")
21033 (description "Numba gives you the power to speed up your applications with
21034 high performance functions written directly in Python. With a few
21035 annotations, array-oriented and math-heavy Python code can be just-in-time
21036 compiled to native machine instructions, similar in performance to C, C++ and
21037 Fortran, without having to switch languages or Python interpreters.
21038
21039 Numba works by generating optimized machine code using the LLVM compiler
21040 infrastructure at import time, runtime, or statically (using the included pycc
21041 tool).")
21042 (license license:bsd-3)))
21043
21044 (define-public python-numcodecs
21045 (package
21046 (name "python-numcodecs")
21047 (version "0.6.4")
21048 (source
21049 (origin
21050 (method url-fetch)
21051 (uri (pypi-uri "numcodecs" version))
21052 (sha256
21053 (base32
21054 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21055 (build-system python-build-system)
21056 (propagated-inputs
21057 `(("python-numpy" ,python-numpy)
21058 ("python-msgpack" ,python-msgpack)))
21059 (native-inputs
21060 `(("python-pytest" ,python-pytest)
21061 ("python-setuptools-scm" ,python-setuptools-scm)))
21062 (home-page "https://github.com/zarr-developers/numcodecs")
21063 (synopsis "Buffer compression and transformation codecs")
21064 (description
21065 "This Python package provides buffer compression and transformation
21066 codecs for use in data storage and communication applications.")
21067 (license license:expat)))
21068
21069 (define-public python-asciitree
21070 (package
21071 (name "python-asciitree")
21072 (version "0.3.3")
21073 (source
21074 (origin
21075 (method url-fetch)
21076 (uri (pypi-uri "asciitree" version))
21077 (sha256
21078 (base32
21079 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21080 (build-system python-build-system)
21081 (home-page "https://github.com/mbr/asciitree")
21082 (synopsis "Draws ASCII trees")
21083 (description "This package draws tree structures using characters.")
21084 (license license:expat)))
21085
21086 (define-public python-zarr
21087 (package
21088 (name "python-zarr")
21089 (version "2.4.0")
21090 (source
21091 (origin
21092 (method url-fetch)
21093 (uri (pypi-uri "zarr" version))
21094 (sha256
21095 (base32
21096 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21097 (build-system python-build-system)
21098 (arguments
21099 `(#:phases
21100 (modify-phases %standard-phases
21101 (add-after 'unpack 'disable-service-tests
21102 (lambda _
21103 (setenv "ZARR_TEST_ABS" "0")
21104 (setenv "ZARR_TEST_MONGO" "0")
21105 (setenv "ZARR_TEST_REDIS" "0")
21106 #t))
21107 (replace 'check
21108 (lambda _
21109 (invoke "pytest" "-vv" "-k" "not lmdb")
21110 #t)))))
21111 (propagated-inputs
21112 `(("python-asciitree" ,python-asciitree)
21113 ("python-fasteners" ,python-fasteners)
21114 ("python-numcodecs" ,python-numcodecs)
21115 ("python-numpy" ,python-numpy)))
21116 (native-inputs
21117 `(("python-pytest" ,python-pytest)
21118 ("python-setuptools-scm" ,python-setuptools-scm)))
21119 (home-page "https://github.com/zarr-developers/zarr-python")
21120 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21121 (description
21122 "This package provides an implementation of chunked, compressed,
21123 N-dimensional arrays for Python.")
21124 (license license:expat)))
21125
21126 (define-public python-anndata
21127 (package
21128 (name "python-anndata")
21129 (version "0.7.6")
21130 (source
21131 (origin
21132 (method url-fetch)
21133 (uri (pypi-uri "anndata" version))
21134 (sha256
21135 (base32
21136 "1ch8yp0xmag6z0kl01pljm35lbbwax7lrimfhiclpkd4m6xngk53"))))
21137 (build-system python-build-system)
21138 (arguments
21139 `(#:tests? #f ; The tarball from PyPi doesn't include tests.
21140 #:phases
21141 (modify-phases %standard-phases
21142 (delete 'check)
21143 (add-before 'build 'relax-dependency-requirements
21144 (lambda _
21145 ;; We need to upgrade python-pandas to avoid
21146 ;; https://github.com/pandas-dev/pandas/issues/35446
21147 (substitute* "pyproject.toml"
21148 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21149 (replace 'build
21150 (lambda _
21151 ;; ZIP does not support timestamps before 1980.
21152 (setenv "SOURCE_DATE_EPOCH" "315532800")
21153 (invoke "flit" "build")))
21154 (replace 'install
21155 (lambda* (#:key inputs outputs #:allow-other-keys)
21156 (add-installed-pythonpath inputs outputs)
21157 (let ((out (assoc-ref outputs "out")))
21158 (for-each (lambda (wheel)
21159 (format #true wheel)
21160 (invoke "python" "-m" "pip" "install"
21161 wheel (string-append "--prefix=" out)))
21162 (find-files "dist" "\\.whl$")))
21163 #t)))))
21164 (propagated-inputs
21165 `(("python-h5py" ,python-h5py)
21166 ("python-importlib-metadata" ,python-importlib-metadata)
21167 ("python-natsort" ,python-natsort)
21168 ("python-numcodecs" ,python-numcodecs)
21169 ("python-packaging" ,python-packaging)
21170 ("python-pandas" ,python-pandas)
21171 ("python-scipy" ,python-scipy)
21172 ("python-zarr" ,python-zarr)))
21173 (native-inputs
21174 `(("python-joblib" ,python-joblib)
21175 ("python-pytest" ,python-pytest)
21176 ("python-toml" ,python-toml)
21177 ("python-flit" ,python-flit)
21178 ("python-setuptools-scm" ,python-setuptools-scm)))
21179 (home-page "https://github.com/theislab/anndata")
21180 (synopsis "Annotated data for data analysis pipelines")
21181 (description "Anndata is a package for simple (functional) high-level APIs
21182 for data analysis pipelines. In this context, it provides an efficient,
21183 scalable way of keeping track of data together with learned annotations and
21184 reduces the code overhead typically encountered when using a mostly
21185 object-oriented library such as @code{scikit-learn}.")
21186 (license license:bsd-3)))
21187
21188 (define-public python-dill
21189 (package
21190 (name "python-dill")
21191 (version "0.3.1.1")
21192 (source
21193 (origin
21194 (method url-fetch)
21195 (uri (pypi-uri "dill" version))
21196 (sha256
21197 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
21198 (build-system python-build-system)
21199 (arguments
21200 `(#:phases
21201 (modify-phases %standard-phases
21202 (replace 'check
21203 (lambda _
21204 (with-directory-excursion "/tmp"
21205 (invoke "nosetests" "-v"))
21206 #t)))))
21207 (native-inputs
21208 `(("python-nose" ,python-nose)))
21209 (home-page "https://pypi.org/project/dill/")
21210 (synopsis "Serialize all of Python")
21211 (description "Dill extends Python's @code{pickle} module for serializing
21212 and de-serializing Python objects to the majority of the built-in Python
21213 types. Dill provides the user the same interface as the @code{pickle} module,
21214 and also includes some additional features. In addition to pickling Python
21215 objects, @code{dill} provides the ability to save the state of an interpreter
21216 session in a single command. Hence, it would be feasible to save a
21217 interpreter session, close the interpreter, ship the pickled file to another
21218 computer, open a new interpreter, unpickle the session and thus continue from
21219 the saved state of the original interpreter session.")
21220 (license license:bsd-3)))
21221
21222 (define-public python-multiprocess
21223 (package
21224 (name "python-multiprocess")
21225 (version "0.70.9")
21226 (source
21227 (origin
21228 (method url-fetch)
21229 (uri (pypi-uri "multiprocess" version))
21230 (sha256
21231 (base32
21232 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
21233 (build-system python-build-system)
21234 (arguments
21235 `(#:phases
21236 (modify-phases %standard-phases
21237 (add-after 'unpack 'disable-broken-tests
21238 (lambda _
21239 ;; This test is broken as there is no keyboard interrupt.
21240 (substitute* "py3.7/multiprocess/tests/__init__.py"
21241 (("^(.*)def test_wait_result"
21242 line indent)
21243 (string-append indent
21244 "@unittest.skip(\"Disabled by Guix\")\n"
21245 line)))
21246 #t))
21247 ;; Tests must be run after installation.
21248 (delete 'check)
21249 (add-after 'install 'check
21250 (lambda* (#:key inputs outputs #:allow-other-keys)
21251 (add-installed-pythonpath inputs outputs)
21252 (invoke "python" "-m" "multiprocess.tests")
21253 #t)))))
21254 (propagated-inputs
21255 `(("python-dill" ,python-dill)))
21256 (home-page "https://pypi.org/project/multiprocess/")
21257 (synopsis "Multiprocessing and multithreading in Python")
21258 (description
21259 "This package is a fork of the multiprocessing Python package, a package
21260 which supports the spawning of processes using the API of the standard
21261 library's @code{threading} module.")
21262 (license license:bsd-3)))
21263
21264 (define-public python-toolz
21265 (package
21266 (name "python-toolz")
21267 (version "0.11.1")
21268 (source
21269 (origin
21270 (method url-fetch)
21271 (uri (pypi-uri "toolz" version))
21272 (sha256
21273 (base32
21274 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
21275 (build-system python-build-system)
21276 (arguments
21277 `(#:phases
21278 (modify-phases %standard-phases
21279 (replace 'check
21280 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
21281 (when tests?
21282 (add-installed-pythonpath inputs outputs)
21283 (invoke "python" "-m" "pytest" "--doctest-modules"
21284 "--pyargs" "toolz")))))))
21285 (native-inputs
21286 `(("python-pytest" ,python-pytest)))
21287 (home-page "https://github.com/pytoolz/toolz/")
21288 (synopsis "List processing tools and functional utilities")
21289 (description
21290 "This package provides a set of utility functions for iterators,
21291 functions, and dictionaries.")
21292 (license license:bsd-3)))
21293
21294 (define-public python-cytoolz
21295 (package
21296 (name "python-cytoolz")
21297 (version "0.9.0.1")
21298 (source
21299 (origin
21300 (method url-fetch)
21301 (uri (pypi-uri "cytoolz" version))
21302 (sha256
21303 (base32
21304 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
21305 (build-system python-build-system)
21306 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
21307 ;; 'exceptions'"
21308 (arguments '(#:tests? #f))
21309 (propagated-inputs
21310 `(("python-toolz" ,python-toolz)))
21311 (native-inputs
21312 `(("python-cython" ,python-cython)))
21313 (home-page "https://github.com/pytoolz/cytoolz")
21314 (synopsis "High performance functional utilities")
21315 (description
21316 "The cytoolz package implements the same API as provided by toolz. The
21317 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
21318 that is accessible to other projects developed in Cython.")
21319 (license license:bsd-3)))
21320
21321 (define-public python-sortedcollections
21322 (package
21323 (name "python-sortedcollections")
21324 (version "2.1.0")
21325 (source
21326 (origin
21327 (method url-fetch)
21328 (uri (pypi-uri "sortedcollections" version))
21329 (sha256
21330 (base32
21331 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
21332 (build-system python-build-system)
21333 (propagated-inputs
21334 `(("python-sortedcontainers" ,python-sortedcontainers)))
21335 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
21336 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
21337 (synopsis "Python Sorted Collections")
21338 (description "Sorted Collections is a Python sorted collections library.")
21339 (license license:asl2.0)))
21340
21341 (define-public python-sortedcontainers
21342 (package
21343 (name "python-sortedcontainers")
21344 (version "2.1.0")
21345 (source
21346 (origin
21347 (method url-fetch)
21348 (uri (pypi-uri "sortedcontainers" version))
21349 (sha256
21350 (base32
21351 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
21352 (build-system python-build-system)
21353 (arguments
21354 ;; FIXME: Tests require many extra dependencies, and would introduce
21355 ;; a circular dependency on hypothesis, which uses this package.
21356 '(#:tests? #f))
21357 (propagated-inputs
21358 `(("python-appdirs" ,python-appdirs)
21359 ("python-distlib" ,python-distlib)
21360 ("python-filelock" ,python-filelock)
21361 ("python-six" ,python-six-bootstrap)))
21362 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
21363 (synopsis "Sorted List, Sorted Dict, Sorted Set")
21364 (description
21365 "This package provides a sorted collections library, written in
21366 pure-Python.")
21367 (license license:asl2.0)))
21368
21369 (define-public python2-sortedcontainers
21370 (package-with-python2 python-sortedcontainers))
21371
21372 (define-public python-cloudpickle
21373 (package
21374 (name "python-cloudpickle")
21375 (version "1.3.0")
21376 (source
21377 (origin
21378 (method url-fetch)
21379 (uri (pypi-uri "cloudpickle" version))
21380 (sha256
21381 (base32
21382 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
21383 (build-system python-build-system)
21384 (arguments
21385 '(#:phases (modify-phases %standard-phases
21386 (add-before 'check 'do-not-override-PYTHONPATH
21387 (lambda _
21388 ;; Append to PYTHONPATH instead of overriding it so
21389 ;; that dependencies from Guix can be found.
21390 (substitute* "tests/testutils.py"
21391 (("env\\['PYTHONPATH'\\] = pythonpath")
21392 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
21393 #t))
21394 (replace 'check
21395 (lambda* (#:key tests? #:allow-other-keys)
21396 (if tests?
21397 (invoke "pytest" "-s" "-vv")
21398 (format #t "test suite not run~%"))
21399 #t)))))
21400 (native-inputs
21401 `(;; For tests.
21402 ("python-psutil" ,python-psutil)
21403 ("python-pytest" ,python-pytest)
21404 ("python-tornado" ,python-tornado)))
21405 (home-page "https://github.com/cloudpipe/cloudpickle")
21406 (synopsis "Extended pickling support for Python objects")
21407 (description
21408 "Cloudpickle makes it possible to serialize Python constructs not
21409 supported by the default pickle module from the Python standard library. It
21410 is especially useful for cluster computing where Python expressions are
21411 shipped over the network to execute on remote hosts, possibly close to the
21412 data.")
21413 (properties `((python2-variant . ,(delay python2-cloudpickle))))
21414 (license license:bsd-3)))
21415
21416 (define-public python2-cloudpickle
21417 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
21418 (package/inherit base
21419 (native-inputs
21420 `(("python-mock" ,python2-mock)
21421 ,@(package-native-inputs base)))
21422 (propagated-inputs
21423 `(("python-futures" ,python2-futures)
21424 ,@(package-propagated-inputs base))))))
21425
21426 (define-public python-locket
21427 (package
21428 (name "python-locket")
21429 (version "0.2.0")
21430 (source
21431 (origin
21432 (method url-fetch)
21433 (uri (pypi-uri "locket" version))
21434 (sha256
21435 (base32
21436 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
21437 (build-system python-build-system)
21438 (home-page "https://github.com/mwilliamson/locket.py")
21439 (synopsis "File-based locks for Python")
21440 (description
21441 "Locket implements a lock that can be used by multiple processes provided
21442 they use the same path.")
21443 (license license:bsd-2)))
21444
21445 (define-public python2-locket
21446 (package-with-python2 python-locket))
21447
21448 (define-public python-blosc
21449 (package
21450 (name "python-blosc")
21451 (version "1.5.1")
21452 (source
21453 (origin
21454 (method url-fetch)
21455 (uri (pypi-uri "blosc" version))
21456 (sha256
21457 (base32
21458 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
21459 (build-system python-build-system)
21460 ;; FIXME: all tests pass, but then this error is printed:
21461 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
21462 (arguments '(#:tests? #f))
21463 (propagated-inputs
21464 `(("python-numpy" ,python-numpy)))
21465 (home-page "https://github.com/blosc/python-blosc")
21466 (synopsis "Python wrapper for the Blosc data compressor library")
21467 (description "Blosc is a high performance compressor optimized for binary
21468 data. It has been designed to transmit data to the processor cache faster
21469 than the traditional, non-compressed, direct memory fetch approach via a
21470 @code{memcpy()} system call.
21471
21472 Blosc works well for compressing numerical arrays that contains data with
21473 relatively low entropy, like sparse data, time series, grids with
21474 regular-spaced values, etc.
21475
21476 This Python package wraps the Blosc library.")
21477 (license license:bsd-3)))
21478
21479 (define-public python2-blosc
21480 (package-with-python2 python-blosc))
21481
21482 (define-public python-partd
21483 (package
21484 (name "python-partd")
21485 (version "0.3.9")
21486 (source
21487 (origin
21488 (method url-fetch)
21489 (uri (pypi-uri "partd" version))
21490 (sha256
21491 (base32
21492 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
21493 (build-system python-build-system)
21494 (propagated-inputs
21495 `(("python-blosc" ,python-blosc)
21496 ("python-locket" ,python-locket)
21497 ("python-numpy" ,python-numpy)
21498 ("python-pandas" ,python-pandas)
21499 ("python-pyzmq" ,python-pyzmq)
21500 ("python-toolz" ,python-toolz)))
21501 (home-page "https://github.com/dask/partd/")
21502 (synopsis "Appendable key-value storage")
21503 (description "Partd stores key-value pairs. Values are raw bytes. We
21504 append on old values. Partd excels at shuffling operations.")
21505 (license license:bsd-3)))
21506
21507 (define-public python-fsspec
21508 (package
21509 (name "python-fsspec")
21510 (version "0.6.1")
21511 (source
21512 (origin
21513 (method url-fetch)
21514 (uri (pypi-uri "fsspec" version))
21515 (sha256
21516 (base32
21517 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
21518 (build-system python-build-system)
21519 (arguments '(#:tests? #f)) ; there are none
21520 (home-page "https://github.com/intake/filesystem_spec")
21521 (synopsis "File-system specification")
21522 (description "The purpose of this package is to produce a template or
21523 specification for a file-system interface, that specific implementations
21524 should follow, so that applications making use of them can rely on a common
21525 behavior and not have to worry about the specific internal implementation
21526 decisions with any given backend.")
21527 (license license:bsd-3)))
21528
21529 (define-public python-dask
21530 (package
21531 (name "python-dask")
21532 (version "2.14.0")
21533 (source
21534 (origin
21535 (method url-fetch)
21536 (uri (pypi-uri "dask" version))
21537 (sha256
21538 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
21539 (build-system python-build-system)
21540 (arguments
21541 `(#:phases
21542 (modify-phases %standard-phases
21543 (add-after 'unpack 'disable-broken-tests
21544 (lambda _
21545 ;; This test is marked as xfail when pytest-xdist is used.
21546 (substitute* "dask/tests/test_threaded.py"
21547 (("def test_interrupt\\(\\)" m)
21548 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21549 m)))
21550 ;; This one fails with a type error:
21551 ;; TypeError: Already tz-aware, use tz_convert to convert.
21552 (substitute* "dask/dataframe/tests/test_shuffle.py"
21553 (("def test_set_index_timestamp\\(\\)" m)
21554 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21555 m)))
21556 #t))
21557 (replace 'check
21558 (lambda _ (invoke "pytest" "-vv"))))))
21559 (propagated-inputs
21560 `(("python-cloudpickle" ,python-cloudpickle)
21561 ("python-fsspec" ,python-fsspec)
21562 ("python-numpy" ,python-numpy)
21563 ("python-packaging" ,python-packaging)
21564 ("python-pandas" ,python-pandas)
21565 ("python-partd" ,python-partd)
21566 ("python-toolz" ,python-toolz)
21567 ("python-pyyaml" ,python-pyyaml)))
21568 (native-inputs
21569 `(("python-pytest" ,python-pytest)
21570 ("python-pytest-runner" ,python-pytest-runner)))
21571 (home-page "https://github.com/dask/dask/")
21572 (synopsis "Parallel computing with task scheduling")
21573 (description
21574 "Dask is a flexible parallel computing library for analytics. It
21575 consists of two components: dynamic task scheduling optimized for computation,
21576 and large data collections like parallel arrays, dataframes, and lists that
21577 extend common interfaces like NumPy, Pandas, or Python iterators to
21578 larger-than-memory or distributed environments. These parallel collections
21579 run on top of the dynamic task schedulers. ")
21580 (license license:bsd-3)))
21581
21582 (define-public python-ilinkedlist
21583 (package
21584 (name "python-ilinkedlist")
21585 (version "0.4.0")
21586 (source
21587 (origin
21588 (method url-fetch)
21589 (uri (pypi-uri "ilinkedlist" version))
21590 (sha256
21591 (base32
21592 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
21593 (build-system python-build-system)
21594 (native-inputs `(("python-pytest" ,python-pytest)))
21595 (inputs `(("python" ,python)))
21596 (home-page "https://github.com/luther9/ilinkedlist-py")
21597 (synopsis "Immutable linked list library")
21598 (description
21599 "This is a implementation of immutable linked lists for Python. It
21600 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
21601 Since a linked list is treated as immutable, it is hashable, and its length
21602 can be retrieved in constant time. Some of the terminology is inspired by
21603 LISP. It is possible to create an improper list by creating a @code{Pair}
21604 with a non-list @code{cdr}.")
21605 (license license:gpl3+)))
21606
21607 (define-public python-readlike
21608 (package
21609 (name "python-readlike")
21610 (version "0.1.3")
21611 (source
21612 (origin
21613 (method url-fetch)
21614 (uri (pypi-uri "readlike" version))
21615 (sha256
21616 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
21617 (build-system python-build-system)
21618 (home-page "https://github.com/jangler/readlike")
21619 (synopsis "GNU Readline-like line editing module")
21620 (description
21621 "This Python module provides line editing functions similar to the default
21622 Emacs-style ones of GNU Readline. Unlike the Python standard library's
21623 @code{readline} package, this one allows access to those capabilities in settings
21624 outside of a standard command-line interface. It is especially well-suited to
21625 interfacing with Urwid, due to a shared syntax for describing key inputs.
21626
21627 Currently, all stateless Readline commands are implemented. Yanking and history
21628 are not supported.")
21629 (license license:expat)))
21630
21631 (define-public python2-readlike
21632 (package-with-python2 python-readlike))
21633
21634 (define-public python-reparser
21635 (package
21636 (name "python-reparser")
21637 (version "1.4.3")
21638 (source
21639 (origin
21640 (method url-fetch)
21641 (uri (pypi-uri "ReParser" version))
21642 (sha256
21643 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
21644 (build-system python-build-system)
21645 (home-page "https://github.com/xmikos/reparser")
21646 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
21647 (description
21648 "This Python library provides a simple lexer/parser for inline markup based
21649 on regular expressions.")
21650 (license license:expat)))
21651
21652 (define-public python2-reparser
21653 (let ((reparser (package-with-python2
21654 (strip-python2-variant python-reparser))))
21655 (package/inherit reparser
21656 (propagated-inputs
21657 `(("python2-enum34" ,python2-enum34)
21658 ,@(package-propagated-inputs reparser))))))
21659
21660 (define-public python-retrying
21661 (package
21662 (name "python-retrying")
21663 (version "1.3.3")
21664 (source
21665 (origin
21666 (method git-fetch)
21667 (uri (git-reference
21668 (url "https://github.com/rholder/retrying")
21669 (commit (string-append "v" version))))
21670 (file-name (git-file-name name version))
21671 (sha256
21672 (base32
21673 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
21674 (build-system python-build-system)
21675 (propagated-inputs
21676 `(("python-six" ,python-six)))
21677 (home-page "https://github.com/rholder/retrying")
21678 (synopsis "Library for adding retry behavior")
21679 (description "Retrying is a general-purpose retrying library to simplify
21680 the task of adding retry behavior to just about anything.
21681
21682 Features:
21683
21684 @itemize
21685 @item Generic Decorator API.
21686 @item Specify stop condition (i.e. limit by number of attempts).
21687 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
21688 @item Customize retrying on Exceptions.
21689 @item Customize retrying on expected returned result.
21690 @end itemize")
21691 (license license:asl2.0)))
21692
21693 (define-public python-pre-commit
21694 (package
21695 (name "python-pre-commit")
21696 (version "2.10.0")
21697 (source
21698 (origin
21699 (method url-fetch)
21700 (uri (pypi-uri "pre_commit" version))
21701 (sha256
21702 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
21703 (build-system python-build-system)
21704 (arguments
21705 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
21706 ;; attribute 'empty_template_setup'".
21707 `(#:tests? #false))
21708 (propagated-inputs
21709 `(("python-cfgv" ,python-cfgv)
21710 ("python-identify" ,python-identify)
21711 ("python-importlib-metadata" ,python-importlib-metadata)
21712 ("python-importlib-resources" ,python-importlib-resources)
21713 ("python-nodeenv" ,python-nodeenv)
21714 ("python-pyyaml" ,python-pyyaml)
21715 ("python-toml" ,python-toml)
21716 ("python-virtualenv" ,python-virtualenv)))
21717 (home-page "https://github.com/pre-commit/pre-commit")
21718 (synopsis "Framework for managing multi-language pre-commit hooks")
21719 (description
21720 "This package provides a framework for managing and maintaining
21721 multi-language pre-commit hooks.")
21722 (license license:expat)))
21723
21724 (define-public python-precis-i18n
21725 (package
21726 (name "python-precis-i18n")
21727 (version "1.0.0")
21728 (source
21729 (origin
21730 (method url-fetch)
21731 (uri (pypi-uri "precis_i18n" version))
21732 (sha256
21733 (base32
21734 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
21735 (build-system python-build-system)
21736 (home-page "https://github.com/byllyfish/precis_i18n")
21737 (synopsis "Implementation of the PRECIS framework")
21738 (description
21739 "This module implements the PRECIS Framework as described in RFC 8264,
21740 RFC 8265 and RFC 8266.")
21741 (license license:expat)))
21742
21743 (define-public python-absl-py
21744 (package
21745 (name "python-absl-py")
21746 (version "0.6.1")
21747 (source
21748 (origin
21749 (method url-fetch)
21750 (uri (pypi-uri "absl-py" version))
21751 (sha256
21752 (base32
21753 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
21754 (build-system python-build-system)
21755 (propagated-inputs
21756 `(("python-six" ,python-six)))
21757 (home-page "https://github.com/abseil/abseil-py")
21758 (synopsis "Abseil Python common libraries")
21759 (description
21760 "This package provides the Abseil Python Common Libraries, a collection
21761 of Python libraries for building Python applications.")
21762 (license license:asl2.0)))
21763
21764 (define-public python-astor
21765 (package
21766 (name "python-astor")
21767 (version "0.8.1")
21768 (source
21769 (origin
21770 (method url-fetch)
21771 (uri (pypi-uri "astor" version))
21772 (sha256
21773 (base32
21774 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
21775 (build-system python-build-system)
21776 ;; FIXME: There are two errors and two test failures.
21777 (arguments `(#:tests? #f))
21778 (home-page "https://github.com/berkerpeksag/astor")
21779 (synopsis "Read and write Python ASTs")
21780 (description "Astor is designed to allow easy manipulation of Python
21781 source via the Abstract Syntax Tree.")
21782 (license license:bsd-3)))
21783
21784 (define-public python2-astor
21785 (package-with-python2 python-astor))
21786
21787 (define-public python-astunparse
21788 (package
21789 (name "python-astunparse")
21790 (version "1.6.2")
21791 (source
21792 (origin
21793 (method url-fetch)
21794 (uri (pypi-uri "astunparse" version))
21795 (sha256
21796 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
21797 (build-system python-build-system)
21798 (arguments '(#:tests? #f)) ; there are none
21799 (propagated-inputs
21800 `(("python-six" ,python-six)
21801 ("python-wheel" ,python-wheel)))
21802 (home-page "https://github.com/simonpercivall/astunparse")
21803 (synopsis "AST unparser for Python")
21804 (description "This package provides an AST unparser for Python. It is a
21805 factored out version of @code{unparse} found in the Python source
21806 distribution.")
21807 (license license:bsd-3)))
21808
21809 (define-public python-gast
21810 (package
21811 (name "python-gast")
21812 (version "0.3.3")
21813 (source
21814 (origin
21815 (method url-fetch)
21816 (uri (pypi-uri "gast" version))
21817 (sha256
21818 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
21819 (build-system python-build-system)
21820 (propagated-inputs
21821 `(("python-astunparse" ,python-astunparse)))
21822 (home-page "https://pypi.org/project/gast/")
21823 (synopsis "Generic Python AST that abstracts the underlying Python version")
21824 (description
21825 "GAST provides a compatibility layer between the AST of various Python
21826 versions, as produced by @code{ast.parse} from the standard @code{ast}
21827 module.")
21828 (license license:bsd-3)))
21829
21830 (define-public python-wikidata
21831 (package
21832 (name "python-wikidata")
21833 (version "0.6.1")
21834 (source
21835 (origin
21836 (method url-fetch)
21837 (uri (pypi-uri "Wikidata" version))
21838 (sha256
21839 (base32
21840 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
21841 (build-system python-build-system)
21842 (propagated-inputs
21843 `(("python-babel" ,python-babel)))
21844 (home-page "https://github.com/dahlia/wikidata")
21845 (synopsis "Wikidata client library")
21846 (description
21847 "This package provides a Python interface to
21848 @url{https://www.wikidata.org/, Wikidata}.")
21849 (properties '((upstream-name . "Wikidata")))
21850 (license license:gpl3+)))
21851
21852 (define-public python-doctest-ignore-unicode
21853 (package
21854 (name "python-doctest-ignore-unicode")
21855 (version "0.1.2")
21856 (source
21857 (origin
21858 (method url-fetch)
21859 (uri (pypi-uri "doctest-ignore-unicode" version))
21860 (sha256
21861 (base32
21862 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
21863 (build-system python-build-system)
21864 (native-inputs
21865 `(("python-nose" ,python-nose)))
21866 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
21867 (synopsis "Ignore Unicode literal prefixes in doctests")
21868 (description
21869 "This package adds support for a flag to ignore Unicode literal prefixes
21870 in doctests.")
21871 (license license:asl2.0)))
21872
21873 (define-public python-attr
21874 (package
21875 (name "python-attr")
21876 (version "0.3.1")
21877 (source
21878 (origin
21879 (method url-fetch)
21880 (uri (pypi-uri "attr" version))
21881 (sha256
21882 (base32
21883 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
21884 (build-system python-build-system)
21885 (home-page "https://github.com/denis-ryzhkov/attr")
21886 (synopsis "Decorator for attributes of target function or class")
21887 (description "Simple decorator to set attributes of target function or
21888 class in a @acronym{DRY, Don't Repeat Yourself} way.")
21889 (license license:expat)))
21890
21891 (define-public python-construct
21892 (package
21893 (name "python-construct")
21894 (version "2.10.56")
21895 (source
21896 (origin
21897 (method url-fetch)
21898 (uri (pypi-uri "construct" version))
21899 (sha256
21900 (base32
21901 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
21902 (build-system python-build-system)
21903 (arguments
21904 `(#:tests? #f)) ; No tests exist.
21905 (propagated-inputs
21906 `(("python-extras" ,python-extras)
21907 ("python-arrow" ,python-arrow)
21908 ("python-numpy" ,python-numpy)
21909 ("python-ruamel.yaml" ,python-ruamel.yaml)))
21910 (home-page "https://construct.readthedocs.io")
21911 (synopsis "Declarative and symmetrical parser and builder for binary data")
21912 (description
21913 "This package provides both simple, atomic constructs (such as
21914 integers of various sizes), as well as composite ones which allow you
21915 form hierarchical and sequential structures of increasing complexity.
21916 It features bit and byte granularity, easy debugging and testing, an
21917 easy-to-extend subclass system, and lots of primitive constructs to
21918 make your work easier.")
21919 (license license:expat)))
21920
21921 (define-public python-outcome
21922 (package
21923 (name "python-outcome")
21924 (version "1.0.1")
21925 (source
21926 (origin
21927 (method url-fetch)
21928 (uri (pypi-uri "outcome" version))
21929 (sha256
21930 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
21931 (build-system python-build-system)
21932 (arguments
21933 `(#:phases
21934 (modify-phases %standard-phases
21935 (replace 'check
21936 (lambda* (#:key inputs outputs #:allow-other-keys)
21937 (add-installed-pythonpath inputs outputs)
21938 (invoke "pytest" "-vv"))))))
21939 (native-inputs
21940 `(("python-pytest" ,python-pytest)
21941 ("python-pytest-cov" ,python-pytest-cov)
21942 ("python-pytest-asyncio" ,python-pytest-asyncio)))
21943 (propagated-inputs
21944 `(("python-async-generator" ,python-async-generator)
21945 ("python-attrs" ,python-attrs)))
21946 (home-page "https://github.com/python-trio/outcome")
21947 (synopsis "Capture the outcome of Python function calls")
21948 (description
21949 "Capture the outcome of Python function calls. Extracted from the Trio
21950 project.")
21951 ;; Either license applies.
21952 (license (list license:expat license:asl2.0))))
21953
21954 (define-public python-trio
21955 (package
21956 (name "python-trio")
21957 (version "0.17.0")
21958 (source
21959 (origin
21960 (method url-fetch)
21961 (uri (pypi-uri "trio" version))
21962 (sha256
21963 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
21964 (build-system python-build-system)
21965 (arguments
21966 `(#:phases
21967 (modify-phases %standard-phases
21968 (add-before 'check 'change-home
21969 (lambda _
21970 ;; Tests require a writable home.
21971 (setenv "HOME" "/tmp")
21972 #t))
21973 (replace 'check
21974 (lambda _
21975 (invoke "pytest" "-vv" "-k"
21976 (string-append
21977 ;; This test times out.
21978 "not test_ki_protection_works"
21979 ;; Assertion errors.
21980 " and not test_guest_mode_ki"
21981 " and not test_run_in_trio_thread_ki"
21982 ;; These try to raise KeyboardInterrupt which does not work
21983 ;; in the build environment.
21984 " and not test_ki_self"
21985 " and not test_ki_wakes_us_up"
21986 ;; Failure in name resolution.
21987 " and not test_getnameinfo"
21988 " and not test_SocketType_resolve"
21989 ;; OSError: protocol not found.
21990 " and not test_getprotobyname")))))))
21991 (native-inputs
21992 `(("python-astor" ,python-astor)
21993 ("python-ipython" ,python-ipython)
21994 ("python-jedi" ,python-jedi)
21995 ("python-pylint" ,python-pylint)
21996 ("python-pyopenssl" ,python-pyopenssl)
21997 ("python-pytest" ,python-pytest)
21998 ("python-pytest-cov" ,python-pytest-cov)
21999 ("python-trustme" ,python-trustme)))
22000 (propagated-inputs
22001 `(("python-attrs" ,python-attrs)
22002 ("python-idna" ,python-idna)
22003 ("python-outcome" ,python-outcome)
22004 ("python-sniffio" ,python-sniffio)
22005 ("python-sortedcontainers"
22006 ,python-sortedcontainers)))
22007 (home-page "https://github.com/python-trio/trio")
22008 (synopsis "Friendly Python library for async concurrency and I/O")
22009 (description
22010 "Trio strives to be a production-quality, async/await-native I/O library
22011 for Python. Like all async libraries, its main purpose is to help you write
22012 programs that do multiple things at the same time with parallelized I/O.")
22013 ;; Either license applies.
22014 (license (list license:expat license:asl2.0))))
22015
22016 (define-public python-trio-typing
22017 (package
22018 (name "python-trio-typing")
22019 (version "0.5.0")
22020 (source
22021 (origin
22022 (method url-fetch)
22023 (uri (pypi-uri "trio-typing" version))
22024 (sha256
22025 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22026 (build-system python-build-system)
22027 (arguments
22028 `(#:phases
22029 (modify-phases %standard-phases
22030 (replace 'check
22031 (lambda _
22032 (invoke "pytest" "-vv"))))))
22033 (native-inputs
22034 `(("python-attrs" ,python-attrs)
22035 ("python-pytest" ,python-pytest)))
22036 (propagated-inputs
22037 `(("python-mypy" ,python-mypy)
22038 ("python-mypy-extensions"
22039 ,python-mypy-extensions)
22040 ("python-trio" ,python-trio)
22041 ("python-typing-extensions"
22042 ,python-typing-extensions)))
22043 (home-page "https://github.com/python-trio/trio-typing")
22044 (synopsis "Static type checking support for Trio and related projects")
22045 (description
22046 "This package provides:
22047
22048 @itemize
22049 @item PEP 561 typing stubs packages for the Trio project packages:
22050
22051 @itemize
22052 @item trio (@code{trio-stubs})
22053 @item outcome (@code{outcome-stubs})
22054 @item async_generator (@code{async_generator-stubs})
22055 @end itemize
22056
22057 @item A package @code{trio_typing} containing types that Trio programs often
22058 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22059 a mypy plugin that smooths over some limitations in the basic type hints.
22060 @end itemize")
22061 ;; Either license applies.
22062 (license (list license:expat license:asl2.0))))
22063
22064 (define-public python-humanize
22065 (package
22066 (name "python-humanize")
22067 (version "0.5.1")
22068 (source
22069 (origin
22070 (method url-fetch)
22071 (uri (pypi-uri "humanize" version))
22072 (sha256
22073 (base32
22074 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22075 (arguments
22076 '(#:tests? #f)) ; tests not in pypi archive
22077 (build-system python-build-system)
22078 (home-page "https://github.com/jmoiron/humanize")
22079 (synopsis "Print numerical information in a human-readable form")
22080 (description "This package provides a Python module that displays numbers
22081 and dates in \"human readable\" forms. For example, it would display
22082 \"12345591313\" as \"12.3 billion\".")
22083 (license license:expat)))
22084
22085 (define-public python-txaio
22086 (package
22087 (name "python-txaio")
22088 (version "18.8.1")
22089 (source
22090 (origin
22091 (method url-fetch)
22092 (uri (pypi-uri "txaio" version))
22093 (sha256
22094 (base32
22095 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22096 (build-system python-build-system)
22097 (propagated-inputs
22098 `(("python-twisted" ,python-twisted)
22099 ("python-six" ,python-six)))
22100 (home-page "https://github.com/crossbario/txaio")
22101 (synopsis "Compatibility layer between Python asyncio and Twisted")
22102 (description "Txaio provides a compatibility layer between the Python
22103 @code{asyncio} module and @code{Twisted}.")
22104 (license license:expat)))
22105
22106 (define-public python-toolshed
22107 (package
22108 (name "python-toolshed")
22109 (version "0.4.6")
22110 (source
22111 (origin
22112 (method url-fetch)
22113 (uri (pypi-uri "toolshed" version))
22114 (sha256
22115 (base32
22116 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22117 (build-system python-build-system)
22118 (native-inputs
22119 `(("python-nose" ,python-nose)))
22120 (home-page "https://github.com/brentp/toolshed/")
22121 (synopsis "Collection of modules and functions for working with data")
22122 (description "This is a collection of well-tested, simple modules and
22123 functions that aim to reduce boilerplate when working with data.")
22124 (license license:bsd-2)))
22125
22126 (define-public python-annoy
22127 (package
22128 (name "python-annoy")
22129 (version "1.15.1")
22130 (source
22131 (origin
22132 (method url-fetch)
22133 (uri (pypi-uri "annoy" version))
22134 (sha256
22135 (base32
22136 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
22137 (build-system python-build-system)
22138 (native-inputs
22139 `(("python-nose" ,python-nose)))
22140 (home-page "https://github.com/spotify/annoy/")
22141 (synopsis "Approximate nearest neighbors library")
22142 (description
22143 "Annoy is a C++ library with Python bindings to search for points in
22144 space that are close to a given query point. It also creates large read-only
22145 file-based data structures that are @code{mmap}ped into memory so that many
22146 processes may share the same data.")
22147 (license license:asl2.0)))
22148
22149 (define-public python-croniter
22150 (package
22151 (name "python-croniter")
22152 (version "0.3.34")
22153 (source (origin
22154 (method url-fetch)
22155 (uri (pypi-uri "croniter" version))
22156 (sha256
22157 (base32
22158 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
22159 (build-system python-build-system)
22160 (propagated-inputs
22161 `(("python-dateutil" ,python-dateutil)
22162 ("python-natsort" ,python-natsort)))
22163 (home-page "https://github.com/kiorky/croniter")
22164 (synopsis "Iterate datetime objects with cron-like syntax")
22165 (description
22166 "@code{croniter} provides iteration for datetime object with cron-like
22167 format.")
22168 (license license:expat)))
22169
22170 (define-public python-pylzma
22171 (package
22172 (name "python-pylzma")
22173 (version "0.5.0")
22174 (source
22175 (origin
22176 (method url-fetch)
22177 (uri (pypi-uri "pylzma" version))
22178 (sha256
22179 (base32
22180 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
22181 (build-system python-build-system)
22182 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
22183 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
22184 (description "This package provides Python bindings for the LZMA library
22185 by Igor Pavlov.")
22186 (license license:lgpl2.1+)))
22187
22188 (define-public python2-pylzma
22189 (package-with-python2 python-pylzma))
22190
22191 (define-public python-ifaddr
22192 (package
22193 (name "python-ifaddr")
22194 (version "0.1.7")
22195 (source
22196 (origin
22197 (method url-fetch)
22198 (uri (pypi-uri "ifaddr" version))
22199 (sha256
22200 (base32
22201 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
22202 (build-system python-build-system)
22203 (arguments
22204 `(#:phases
22205 (modify-phases %standard-phases
22206 (replace 'check
22207 (lambda _ (invoke "nosetests"))))))
22208 (native-inputs
22209 `(("python-nose" ,python-nose)))
22210 (home-page "https://github.com/pydron/ifaddr")
22211 (synopsis "Network interface and IP address enumeration library")
22212 (description "This package provides a network interface and IP address
22213 enumeration library in Python.")
22214 (license license:expat)))
22215
22216 (define-public python-zeroconf
22217 (package
22218 (name "python-zeroconf")
22219 (version "0.28.8")
22220 (source
22221 (origin
22222 (method url-fetch)
22223 (uri (pypi-uri "zeroconf" version))
22224 (sha256
22225 (base32
22226 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
22227 (build-system python-build-system)
22228 (native-inputs
22229 `(("python-nose" ,python-nose)))
22230 (propagated-inputs
22231 `(("python-ifaddr" ,python-ifaddr)))
22232 (arguments
22233 `(#:phases
22234 (modify-phases %standard-phases
22235 (replace 'check
22236 (lambda _ ;; Networking isn't available for these tests.
22237 (invoke "nosetests" "-v"
22238 "--exclude" "test_integration_with_listener_ipv6"
22239 "--exclude" "test_launch_and_close_v6_only"
22240 "--exclude" "test_launch_and_close_v4_v6"
22241 "--exclude" "test_launch_and_close"))))))
22242 (home-page "https://github.com/jstasiak/python-zeroconf")
22243 (synopsis "Pure Python mDNS service discovery")
22244 (description
22245 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22246 compatible).")
22247 (license license:lgpl2.1+)))
22248
22249 (define-public python2-zeroconf
22250 (package
22251 (name "python2-zeroconf")
22252
22253 ;; This is the last version that supports Python 2.x.
22254 (version "0.19.1")
22255 (source
22256 (origin
22257 (method url-fetch)
22258 (uri (pypi-uri "zeroconf" version))
22259 (sha256
22260 (base32
22261 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
22262 (build-system python-build-system)
22263 (arguments
22264 `(#:python ,python-2
22265 #:phases
22266 (modify-phases %standard-phases
22267 (add-after 'unpack 'patch-requires
22268 (lambda* (#:key inputs #:allow-other-keys)
22269 (substitute* "setup.py"
22270 (("enum-compat")
22271 "enum34"))
22272 #t)))))
22273 (native-inputs
22274 `(("python2-six" ,python2-six)
22275 ("python2-enum32" ,python2-enum34)
22276 ("python2-netifaces" ,python2-netifaces)
22277 ("python2-typing" ,python2-typing)))
22278 (home-page "https://github.com/jstasiak/python-zeroconf")
22279 (synopsis "Pure Python mDNS service discovery")
22280 (description
22281 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22282 compatible).")
22283 (license license:lgpl2.1+)))
22284
22285 (define-public python-bsddb3
22286 (package
22287 (name "python-bsddb3")
22288 (version "6.2.6")
22289 (source
22290 (origin
22291 (method url-fetch)
22292 (uri (pypi-uri "bsddb3" version))
22293 (sha256
22294 (base32
22295 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
22296 (build-system python-build-system)
22297 (inputs
22298 `(("bdb" ,bdb)))
22299 (arguments
22300 '(#:phases
22301 (modify-phases %standard-phases
22302 (add-after 'unpack 'configure-locations
22303 (lambda* (#:key inputs #:allow-other-keys)
22304 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
22305 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
22306 #t))
22307 (replace 'check
22308 (lambda _
22309 (invoke "python3" "test3.py" "-v"))))))
22310 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
22311 (synopsis "Python bindings for Oracle Berkeley DB")
22312 (description
22313 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
22314 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
22315 Transaction objects, and each of these is exposed as a Python type in the
22316 bsddb3.db module. The database objects can use various access methods: btree,
22317 hash, recno, and queue. Complete support of Berkeley DB distributed
22318 transactions. Complete support for Berkeley DB Replication Manager.
22319 Complete support for Berkeley DB Base Replication. Support for RPC.")
22320 (license license:bsd-3)))
22321
22322 (define-public python-dbfread
22323 (package
22324 (name "python-dbfread")
22325 (version "2.0.7")
22326 (source (origin
22327 (method url-fetch)
22328 (uri (pypi-uri "dbfread" version))
22329 (sha256
22330 (base32
22331 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
22332 (build-system python-build-system)
22333 (native-inputs
22334 `(("python-pytest" ,python-pytest)))
22335 (home-page "https://dbfread.readthedocs.io")
22336 (synopsis "Read DBF Files with Python")
22337 (description
22338 "This library reads DBF files and returns the data as native Python data
22339 types for further processing. It is primarily intended for batch jobs and
22340 one-off scripts.")
22341 (license license:expat)))
22342
22343 (define-public python-cached-property
22344 (package
22345 (name "python-cached-property")
22346 (version "1.5.2")
22347 (source
22348 (origin
22349 (method url-fetch)
22350 (uri (pypi-uri "cached-property" version))
22351 (sha256
22352 (base32
22353 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
22354 (build-system python-build-system)
22355 (arguments
22356 `(#:phases
22357 (modify-phases %standard-phases
22358 ;; https://github.com/pydanny/cached-property/issues/131
22359 ;; recent versions of freezegun break one test
22360 (add-after 'unpack 'disable-broken-test
22361 (lambda _
22362 (substitute* "tests/test_cached_property.py"
22363 (("def test_threads_ttl_expiry\\(self\\)" m)
22364 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
22365 " " m)))
22366 #t)))))
22367 (native-inputs
22368 `(("python-freezegun" ,python-freezegun)))
22369 (home-page
22370 "https://github.com/pydanny/cached-property")
22371 (synopsis
22372 "Decorator for caching properties in classes")
22373 (description
22374 "This package provides a decorator which makes caching
22375 time-or-computationally-expensive properties quick and easy and works in Python
22376 2 or 3.")
22377 (license license:bsd-3)))
22378
22379 (define-public python-folium
22380 (package
22381 (name "python-folium")
22382 (version "0.12.1")
22383 (source
22384 (origin
22385 ;; PyPI has a ".whl" file but not a proper source release.
22386 ;; Thus, fetch code from Git.
22387 (method git-fetch)
22388 (uri (git-reference
22389 (url "https://github.com/python-visualization/folium")
22390 (commit (string-append "v" version))))
22391 (file-name (git-file-name name version))
22392 (sha256
22393 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
22394 (build-system python-build-system)
22395 (propagated-inputs
22396 `(("python-branca" ,python-branca)
22397 ("python-jinja2" ,python-jinja2)
22398 ("python-numpy" ,python-numpy)
22399 ("python-requests" ,python-requests)))
22400 (native-inputs
22401 `(("python-pytest" ,python-pytest)))
22402 (home-page "https://github.com/python-visualization/folium")
22403 (synopsis "Make beautiful maps with Leaflet.js & Python")
22404 (description "@code{folium} makes it easy to visualize data that’s been
22405 manipulated in Python on an interactive leaflet map. It enables both the
22406 binding of data to a map for @code{choropleth} visualizations as well as
22407 passing rich vector/raster/HTML visualizations as markers on the map.
22408
22409 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
22410 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
22411 supports Image, Video, GeoJSON and TopoJSON overlays.")
22412 (license license:expat)))
22413
22414 (define-public jube
22415 (package
22416 ;; This is a command-line tool, so no "python-" prefix.
22417 (name "jube")
22418 (version "2.2.2")
22419 (source (origin
22420 (method url-fetch)
22421 (uri (string-append
22422 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
22423 version))
22424 (sha256
22425 (base32
22426 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
22427 (file-name (string-append "jube-" version ".tar.gz"))))
22428 (build-system python-build-system)
22429 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
22430 (synopsis "Benchmarking environment")
22431 (description
22432 "JUBE helps perform and analyze benchmarks in a systematic way. For each
22433 benchmarked application, benchmark data is stored in a format that allows JUBE
22434 to deduct the desired information. This data can be parsed by automatic pre-
22435 and post-processing scripts that draw information and store it more densely
22436 for manual interpretation.")
22437 (license license:gpl3+)))
22438
22439 (define-public python-pyroutelib3
22440 (package
22441 (name "python-pyroutelib3")
22442 (version "1.3.post1")
22443 (source
22444 (origin
22445 (method url-fetch)
22446 (uri (pypi-uri "pyroutelib3" version))
22447 (sha256
22448 (base32
22449 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
22450 (build-system python-build-system)
22451 (propagated-inputs
22452 `(("python-dateutil" ,python-dateutil)))
22453 (home-page "https://github.com/MKuranowski/pyroutelib3")
22454 (synopsis "Library for simple routing on OSM data")
22455 (description "Library for simple routing on OSM data")
22456 (license license:gpl3+)))
22457
22458 (define-public python-bibtexparser
22459 (package
22460 (name "python-bibtexparser")
22461 (version "1.1.0")
22462 (source
22463 (origin
22464 (method url-fetch)
22465 (uri (pypi-uri "bibtexparser" version))
22466 (sha256
22467 (base32
22468 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
22469 (build-system python-build-system)
22470 (propagated-inputs
22471 `(("python-pyparsing" ,python-pyparsing)))
22472 (native-inputs
22473 `(("python-future" ,python-future)))
22474 (home-page "https://github.com/sciunto-org/python-bibtexparser")
22475 (synopsis "Python library to parse BibTeX files")
22476 (description "BibtexParser is a Python library to parse BibTeX files.")
22477 (license (list license:bsd-3 license:lgpl3))))
22478
22479 (define-public python-distro
22480 (package
22481 (name "python-distro")
22482 (version "1.4.0")
22483 (source
22484 (origin
22485 (method url-fetch)
22486 (uri (pypi-uri "distro" version))
22487 (sha256
22488 (base32
22489 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
22490 (build-system python-build-system)
22491 (native-inputs
22492 `(("python-pytest" ,python-pytest)))
22493 (home-page "https://github.com/nir0s/distro")
22494 (synopsis
22495 "OS platform information API")
22496 (description
22497 "@code{distro} provides information about the OS distribution it runs on,
22498 such as a reliable machine-readable ID, or version information.
22499
22500 It is the recommended replacement for Python's original
22501 `platform.linux_distribution` function (which will be removed in Python 3.8).
22502 @code{distro} also provides a command-line interface to output the platform
22503 information in various formats.")
22504 (license license:asl2.0)))
22505
22506 (define-public python-cairosvg
22507 (package
22508 (name "python-cairosvg")
22509 (version "2.5.0")
22510 (source
22511 (origin
22512 (method url-fetch)
22513 (uri (pypi-uri "CairoSVG" version))
22514 (sha256
22515 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
22516 (build-system python-build-system)
22517 (arguments
22518 `(#:phases
22519 (modify-phases %standard-phases
22520 (replace 'check
22521 (lambda _ (invoke "pytest"))))))
22522 (propagated-inputs
22523 `(("python-cairocffi" ,python-cairocffi)
22524 ("python-cssselect2" ,python-cssselect2)
22525 ("python-defusedxml" ,python-defusedxml)
22526 ("python-pillow" ,python-pillow)
22527 ("python-tinycss2" ,python-tinycss2)))
22528 (native-inputs
22529 `(("python-pytest-flake8" ,python-pytest-flake8)
22530 ("python-pytest-isort" ,python-pytest-isort)
22531 ("python-pytest-runner" ,python-pytest-runner)))
22532 (home-page "https://cairosvg.org/")
22533 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
22534 (description "CairoSVG is a SVG converter based on Cairo. It can export
22535 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
22536 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
22537 parsed, the result is drawn to a Cairo surface that can be exported to
22538 qvarious formats: PDF, PostScript, PNG and even SVG.")
22539 (license license:lgpl3+)))
22540
22541 (define-public python-pyphen
22542 (package
22543 (name "python-pyphen")
22544 (version "0.10.0")
22545 (source
22546 (origin
22547 (method url-fetch)
22548 (uri (pypi-uri "Pyphen" version))
22549 (sha256
22550 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
22551 (build-system python-build-system)
22552 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
22553 ;; embedded set provided by upstream - like Debian does.
22554 (home-page "https://github.com/Kozea/Pyphen")
22555 (synopsis "Pure Python module to hyphenate text")
22556 (description "Pyphen is a pure Python module to hyphenate text using
22557 existing Hunspell hyphenation dictionaries.")
22558 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
22559
22560 (define-public python-intelhex
22561 (package
22562 (name "python-intelhex")
22563 (version "2.2.1")
22564 (source
22565 (origin
22566 (method url-fetch)
22567 (uri (pypi-uri "intelhex" version))
22568 (sha256
22569 (base32
22570 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
22571 (build-system python-build-system)
22572 (arguments '(#:tests? #f)) ;issue with version
22573 (home-page "https://pypi.org/project/IntelHex/")
22574 (synopsis "Python library for Intel HEX files manipulations")
22575 (description "The Intel HEX file format is widely used in microprocessors
22576 and microcontrollers area (embedded systems etc.) as the de facto standard for
22577 representation of code to be programmed into microelectronic devices. This
22578 package provides an intelhex Python library to read, write, create from
22579 scratch and manipulate data from Intel HEX file format. It also includes
22580 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
22581 converters and more, those based on the library itself.")
22582 (license license:bsd-3)))
22583
22584 (define-public python-pykwalify
22585 (package
22586 (name "python-pykwalify")
22587 (version "1.7.0")
22588 (source
22589 (origin
22590 (method url-fetch)
22591 (uri (pypi-uri "pykwalify" version))
22592 (sha256
22593 (base32
22594 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
22595 (build-system python-build-system)
22596 (arguments '(#:tests? #f)) ;missing dependencies
22597 (propagated-inputs
22598 `(("python-dateutil" ,python-dateutil)
22599 ("python-docopt" ,python-docopt)
22600 ("python-pyyaml" ,python-pyyaml)))
22601 (home-page "https://github.com/grokzen/pykwalify")
22602 (synopsis
22603 "Python lib/cli for JSON/YAML schema validation")
22604 (description
22605 "This package provides a parser, schema validator, and data binding tool
22606 for YAML and JSON.")
22607 (license license:expat)))
22608
22609 (define-public python-dbusmock
22610 (package
22611 (name "python-dbusmock")
22612 (version "0.18.3")
22613 (source
22614 (origin
22615 (method url-fetch)
22616 (uri (pypi-uri "python-dbusmock" version))
22617 (sha256
22618 (base32
22619 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
22620 (build-system python-build-system)
22621 (arguments
22622 '(#:phases
22623 (modify-phases %standard-phases
22624 (add-after 'unpack 'patch-shell-path
22625 (lambda _
22626 (substitute* "tests/test_code.py"
22627 (("/bin/bash") (which "bash")))
22628 #t)))))
22629 (native-inputs
22630 `(;; For tests.
22631 ("dbus" ,dbus) ; for dbus-daemon
22632 ("python-nose" ,python-nose)
22633 ("which" ,which)))
22634 (propagated-inputs
22635 `(("python-dbus" ,python-dbus)
22636 ("python-pygobject" ,python-pygobject)))
22637 (home-page "https://github.com/martinpitt/python-dbusmock")
22638 (synopsis "Python library for mock D-Bus objects")
22639 (description "python-dbusmock allows for the easy creation of mock objects on
22640 D-Bus. This is useful for writing tests for software which talks to D-Bus
22641 services such as upower, systemd, logind, gnome-session or others, and it is
22642 hard (or impossible without root privileges) to set the state of the real
22643 services to what you expect in your tests.")
22644 (license license:lgpl3+)))
22645
22646 (define-public python-jsonplus
22647 (package
22648 (name "python-jsonplus")
22649 (version "0.8.0")
22650 (home-page "https://github.com/randomir/jsonplus")
22651 (source (origin
22652 (method url-fetch)
22653 (uri (pypi-uri "jsonplus" version))
22654 (sha256
22655 (base32
22656 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
22657 (build-system python-build-system)
22658 ;; XXX: No tests on PyPI, and the repository has no tags.
22659 (arguments '(#:tests? #f))
22660 (propagated-inputs
22661 `(("python-dateutil" ,python-dateutil)
22662 ("python-simplejson" ,python-simplejson)
22663 ("python-sortedcontainers" ,python-sortedcontainers)))
22664 (synopsis "Serialize Python types to/from JSON")
22665 (description
22666 "This package provides functionality to serialize arbitrary data types
22667 to and from JSON. Common data types are implemented and it is easy to
22668 register custom encoders and decoders.")
22669 (license license:expat)))
22670
22671 (define-public python-ujson
22672 (package
22673 (name "python-ujson")
22674 (version "4.0.2")
22675 (source
22676 (origin
22677 (method url-fetch)
22678 (uri (pypi-uri "ujson" version))
22679 (sha256
22680 (base32
22681 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
22682 (modules '((guix build utils)))
22683 (snippet
22684 '(begin (delete-file-recursively "deps") #t))))
22685 (build-system python-build-system)
22686 (arguments
22687 `(#:phases
22688 (modify-phases %standard-phases
22689 (add-after 'unpack 'link-to-system-double-conversion
22690 (lambda* (#:key inputs #:allow-other-keys)
22691 (let ((d-c (assoc-ref inputs "double-conversion")))
22692 (substitute* "setup.py"
22693 (("./deps/double-conversion/double-conversion\"")
22694 (string-append d-c "/include/double-conversion\""))
22695 (("-lstdc++" stdc)
22696 (string-append "-L" d-c "/lib\","
22697 " \"-ldouble-conversion\","
22698 " \"" stdc)))
22699 #t)))
22700 (replace 'check
22701 (lambda* (#:key inputs outputs #:allow-other-keys)
22702 (add-installed-pythonpath inputs outputs)
22703 (invoke "pytest"))))))
22704 (native-inputs
22705 `(("double-conversion" ,double-conversion)
22706 ("python-setuptools-scm" ,python-setuptools-scm)
22707 ("python-pytest" ,python-pytest)))
22708 (home-page "https://github.com/ultrajson/ultrajson")
22709 (synopsis "Ultra fast JSON encoder and decoder for Python")
22710 (description
22711 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
22712 bindings for Python 3.")
22713 (license license:bsd-3)))
22714
22715 (define-public python-iocapture
22716 ;; The latest release is more than a year older than this commit.
22717 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
22718 (revision "1"))
22719 (package
22720 (name "python-iocapture")
22721 (version "0.1.2")
22722 (source
22723 (origin
22724 (method git-fetch)
22725 (uri (git-reference
22726 (url "https://github.com/oinume/iocapture")
22727 (commit commit)))
22728 (file-name (git-file-name name version))
22729 (sha256
22730 (base32
22731 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
22732 (build-system python-build-system)
22733 (arguments
22734 `(#:phases
22735 (modify-phases %standard-phases
22736 (delete 'check)
22737 (add-after 'install 'check
22738 (lambda* (#:key inputs outputs #:allow-other-keys)
22739 (add-installed-pythonpath inputs outputs)
22740 (invoke "py.test" "-v" "tests")
22741 #t)))))
22742 (propagated-inputs
22743 `(("python-flexmock" ,python-flexmock)
22744 ("python-pytest" ,python-pytest)
22745 ("python-pytest-cov" ,python-pytest-cov)
22746 ("python-six" ,python-six)))
22747 (home-page "https://github.com/oinume/iocapture")
22748 (synopsis "Python capturing tool for stdout and stderr")
22749 (description
22750 "This package helps you to capture the standard out (stdout) and the
22751 standard error channel (stderr) in your program.")
22752 (license license:expat))))
22753
22754 (define-public python-argh
22755 ;; There are 21 commits since the latest release containing important
22756 ;; improvements.
22757 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
22758 (revision "1"))
22759 (package
22760 (name "python-argh")
22761 (version (git-version "0.26.2" revision commit))
22762 (source
22763 (origin
22764 (method git-fetch)
22765 (uri (git-reference
22766 (url "https://github.com/neithere/argh")
22767 (commit commit)))
22768 (file-name (git-file-name name version))
22769 (sha256
22770 (base32
22771 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
22772 (build-system python-build-system)
22773 (propagated-inputs
22774 `(("python-iocapture" ,python-iocapture)
22775 ("python-mock" ,python-mock)
22776 ("python-pytest" ,python-pytest)
22777 ("python-pytest-cov" ,python-pytest-cov)
22778 ("python-pytest-xdist" ,python-pytest-xdist)))
22779 (home-page "https://github.com/neithere/argh/")
22780 (synopsis "Argparse wrapper with natural syntax")
22781 (description
22782 "python-argh is a small library that provides several layers of
22783 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
22784 always possible to declare a command with the highest possible (and least
22785 flexible) layer and then tune the behaviour with any of the lower layers
22786 including the native API of @code{python-argparse}.")
22787 (license license:lgpl3+))))
22788
22789 (define-public python-ppft
22790 (package
22791 (name "python-ppft")
22792 (version "1.6.6.1")
22793 (source
22794 (origin
22795 (method url-fetch)
22796 (uri (pypi-uri "ppft" version))
22797 (sha256
22798 (base32
22799 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
22800 (build-system python-build-system)
22801 (arguments '(#:tests? #f)) ; there are none
22802 (propagated-inputs
22803 `(("python-six" ,python-six)))
22804 (home-page "https://pypi.org/project/ppft/")
22805 (synopsis "Fork of Parallel Python")
22806 (description
22807 "This package is a fork of Parallel Python. The Parallel Python
22808 module (@code{pp}) provides an easy and efficient way to create
22809 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
22810 computers and clusters. It features cross-platform portability and dynamic
22811 load balancing.")
22812 (license license:bsd-3)))
22813
22814 (define-public python-pox
22815 (package
22816 (name "python-pox")
22817 (version "0.2.7")
22818 (source
22819 (origin
22820 (method url-fetch)
22821 (uri (pypi-uri "pox" version))
22822 (sha256
22823 (base32
22824 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
22825 (build-system python-build-system)
22826 (arguments
22827 `(#:phases
22828 (modify-phases %standard-phases
22829 (replace 'check
22830 (lambda _
22831 (mkdir-p "/tmp/guix")
22832 (setenv "SHELL" "bash")
22833 (setenv "USERNAME" "guix")
22834 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
22835 (invoke "py.test" "-vv")
22836 #t)))))
22837 (native-inputs
22838 `(("python-pytest" ,python-pytest)
22839 ("which" ,which)))
22840 (home-page "https://pypi.org/project/pox/")
22841 (synopsis "Python utilities for file system exploration and automated builds")
22842 (description
22843 "Pox provides a collection of utilities for navigating and manipulating
22844 file systems. This module is designed to facilitate some of the low-level
22845 operating system interactions that are useful when exploring a file system on a
22846 remote host. Pox provides Python equivalents of several shell commands such
22847 as @command{which} and @command{find}. These commands allow automated
22848 discovery of what has been installed on an operating system, and where the
22849 essential tools are located.")
22850 (license license:bsd-3)))
22851
22852 (define-public python-pathos
22853 (package
22854 (name "python-pathos")
22855 (version "0.2.5")
22856 (source
22857 (origin
22858 (method url-fetch)
22859 (uri (pypi-uri "pathos" version))
22860 (sha256
22861 (base32
22862 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
22863 (build-system python-build-system)
22864 (arguments
22865 '(#:phases
22866 (modify-phases %standard-phases
22867 (replace 'check
22868 (lambda _
22869 (setenv "PYTHONPATH"
22870 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
22871 (invoke "python" "./tests/__main__.py"))))))
22872 (propagated-inputs
22873 `(("python-dill" ,python-dill)
22874 ("python-multiprocess" ,python-multiprocess)
22875 ("python-pox" ,python-pox)
22876 ("python-ppft" ,python-ppft)))
22877 (native-inputs
22878 `(("python-pytest" ,python-pytest)))
22879 (home-page "https://pypi.org/project/pathos/")
22880 (synopsis
22881 "Parallel graph management and execution in heterogeneous computing")
22882 (description
22883 "Python-pathos is a framework for heterogeneous computing. It provides a
22884 consistent high-level interface for configuring and launching parallel
22885 computations across heterogeneous resources. Python-pathos provides configurable
22886 launchers for parallel and distributed computing, where each launcher contains
22887 the syntactic logic to configure and launch jobs in an execution environment.")
22888 (license license:bsd-3)))
22889
22890 (define-public python-flit
22891 (package
22892 (name "python-flit")
22893 (version "3.2.0")
22894 ;; We fetch the sources via git because on pypi the package is split into
22895 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
22896 (source (origin
22897 (method git-fetch)
22898 (uri (git-reference
22899 (url "https://github.com/takluyver/flit")
22900 (commit version)))
22901 (file-name (git-file-name name version))
22902 (sha256
22903 (base32
22904 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
22905 (build-system python-build-system)
22906 (arguments
22907 `(#:phases
22908 (modify-phases %standard-phases
22909 (add-before 'build 'bootstrap
22910 (lambda* (#:key inputs #:allow-other-keys)
22911 (let ((home (string-append (getcwd) "/home")))
22912 (mkdir-p home)
22913 (setenv "HOME" home))
22914 (for-each make-file-writable (find-files "."))
22915 (copy-recursively (assoc-ref inputs "python-testpath")
22916 (string-append (getcwd) "/testpath"))
22917 (substitute* "pyproject.toml"
22918 (("\"testpath\",") ""))
22919 (invoke "python" "bootstrap_dev.py")))
22920 (replace 'build
22921 (lambda _
22922 ;; A ZIP archive should be generated, but it fails with "ZIP does
22923 ;; not support timestamps before 1980". Luckily,
22924 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
22925 ;; 1980.
22926 (setenv "SOURCE_DATE_EPOCH" "315532800")
22927 (for-each (lambda (toml)
22928 (invoke "python3" "-m" "flit"
22929 "--debug" "--ini-file" toml
22930 "build"))
22931 '("testpath/pyproject.toml"
22932 "pyproject.toml"))
22933 (with-directory-excursion "flit_core"
22934 (invoke "python" "build_dists.py"))))
22935 (replace 'install
22936 (lambda* (#:key inputs outputs #:allow-other-keys)
22937 (add-installed-pythonpath inputs outputs)
22938 (let ((out (assoc-ref outputs "out")))
22939 (delete-file-recursively "./home")
22940 (for-each (lambda (wheel)
22941 (format #true wheel)
22942 (invoke "python" "-m" "pip" "install"
22943 wheel (string-append "--prefix=" out)))
22944 (append
22945 (find-files "flit_core/dist" "\\.whl$")
22946 (find-files "dist" "\\.whl$")))))))
22947 #:tests? #f)) ; XXX: Check requires network access.
22948 (propagated-inputs
22949 `(("python-pytoml" ,python-pytoml)
22950 ("python-toml" ,python-toml)))
22951 (native-inputs
22952 `(("python-docutils" ,python-docutils)
22953 ("python-responses" ,python-responses)
22954 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
22955 ("python-pytest" ,python-pytest)
22956 ("python-pytest-cov" ,python-pytest-cov)
22957 ("python-sphinx" ,python-sphinx)
22958 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
22959 ;; This package needs testpath, but testpath also needs flit...
22960 ("python-testpath"
22961 ,(let ((name "python-testpath")
22962 (version "0.4.4"))
22963 (origin
22964 (method git-fetch)
22965 (uri (git-reference
22966 (url "https://github.com/jupyter/testpath")
22967 (commit version)))
22968 (file-name (git-file-name name version))
22969 (sha256
22970 (base32
22971 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
22972 (home-page "https://flit.readthedocs.io/")
22973 (synopsis
22974 "Simple packaging tool for simple packages")
22975 (description
22976 "Flit is a simple way to put Python packages and modules on PyPI. Flit
22977 packages a single importable module or package at a time, using the import
22978 name as the name on PyPI. All subpackages and data files within a package
22979 are included automatically.")
22980 (license license:bsd-3)))
22981
22982 (define-public python-pathtools
22983 (package
22984 (name "python-pathtools")
22985 (version "0.1.2")
22986 (source
22987 (origin
22988 (method url-fetch)
22989 (uri (pypi-uri "pathtools" version))
22990 (sha256
22991 (base32
22992 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
22993 (build-system python-build-system)
22994 (home-page
22995 "https://github.com/gorakhargosh/pathtools")
22996 (synopsis "Path utilities for Python")
22997 (description "Pattern matching and various utilities for file systems
22998 paths.")
22999 (license license:expat)))
23000
23001 (define-public python-fastentrypoints
23002 (package
23003 (name "python-fastentrypoints")
23004 (version "0.12")
23005 (source
23006 (origin
23007 (method url-fetch)
23008 (uri (pypi-uri "fastentrypoints" version))
23009 (sha256
23010 (base32
23011 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
23012 (build-system python-build-system)
23013 (home-page
23014 "https://github.com/ninjaaron/fast-entry_points")
23015 (synopsis
23016 "Makes entry_points specified in setup.py load more quickly")
23017 (description
23018 "Using entry_points in your setup.py makes scripts that start really
23019 slowly because it imports pkg_resources. This package allows such setup
23020 scripts to load entry points more quickly.")
23021 (license license:bsd-3)))
23022
23023 (define-public python-funcparserlib
23024 (package
23025 (name "python-funcparserlib")
23026 (version "0.3.6")
23027 (source
23028 (origin
23029 (method url-fetch)
23030 (uri (pypi-uri "funcparserlib" version))
23031 (sha256
23032 (base32
23033 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
23034 (native-inputs
23035 `(("python-tox" ,python-tox)))
23036 (arguments
23037 `(#:phases
23038 (modify-phases %standard-phases
23039 (replace 'check
23040 (lambda _
23041 (invoke "tox"))))))
23042 (build-system python-build-system)
23043 (home-page
23044 "https://github.com/vlasovskikh/funcparserlib")
23045 (synopsis
23046 "Recursive descent parsing library based on functional combinators")
23047 (description
23048 "This package is a recursive descent parsing library for Python based on
23049 functional combinators. Parser combinators are just higher-order functions
23050 that take parsers as their arguments and return them as result values.")
23051 (license license:expat)))
23052
23053 (define-public python-speg
23054 (package
23055 (name "python-speg")
23056 (version "0.3")
23057 (source
23058 (origin
23059 (method url-fetch)
23060 (uri (pypi-uri "speg" version ".zip"))
23061 (sha256
23062 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
23063 (arguments
23064 `(#:tests? #f)) ;FIXME: tests fail, not sure why
23065 (native-inputs
23066 `(("unzip" ,unzip)))
23067 (build-system python-build-system)
23068 (home-page "https://github.com/avakar/speg")
23069 (synopsis "PEG-based parser interpreter with memoization")
23070 (description "This package is a PEG-based parser and interpreter with
23071 memoization.")
23072 (license license:expat)))
23073
23074 (define-public python-cson
23075 (package
23076 (name "python-cson")
23077 (version "0.8")
23078 (source
23079 (origin
23080 (method url-fetch)
23081 (uri (pypi-uri "cson" version))
23082 (sha256
23083 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
23084 (build-system python-build-system)
23085 (propagated-inputs
23086 `(("python-speg" ,python-speg)))
23087 (home-page "https://github.com/avakar/pycson")
23088 (synopsis "Parser for Coffeescript Object Notation (CSON)")
23089 (description "This package is a parser for Coffeescript Object
23090 Notation (CSON).")
23091 (license license:expat)))
23092
23093 (define-public python-asynctest
23094 (package
23095 (name "python-asynctest")
23096 (version "0.13.0")
23097 (source
23098 (origin
23099 (method url-fetch)
23100 (uri (pypi-uri "asynctest" version))
23101 (sha256
23102 (base32
23103 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
23104 (build-system python-build-system)
23105 (arguments
23106 '(#:phases
23107 (modify-phases %standard-phases
23108 (replace 'check
23109 (lambda _
23110 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
23111 (add-after 'unpack 'disable-tests
23112 (lambda* _
23113 ;; XXX: 7 tests fail out of 220. Disable them for now.
23114 (substitute* (list "test/test_selector.py"
23115 "test/test_mock.py")
23116 (("def test_events_watched_outside_test_are_ignored")
23117 "@unittest.skip('disabled by guix')
23118 def test_events_watched_outside_test_are_ignored")
23119 (("def test_awaited_from_autospec_mock.*" line)
23120 (string-append line " return True\n"))
23121 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
23122 (string-append line " return True\n"))
23123 (("def test_patch_coroutine_with_multiple_scopes.*" line)
23124 (string-append line " return True\n"))
23125 (("def test_multiple_patches_on_coroutine.*" line)
23126 (string-append line " return True\n"))
23127 (("def test_patch_coroutine_only_when_running.*" line)
23128 (string-append line " return True\n")))
23129 #t)))))
23130 (home-page "https://github.com/Martiusweb/asynctest")
23131 (synopsis "Extension of unittest for testing asyncio libraries")
23132 (description
23133 "The package asynctest is built on top of the standard unittest module
23134 and cuts down boilerplate code when testing libraries for asyncio.")
23135 (license license:asl2.0)))
23136
23137 (define-public python-aionotify
23138 (package
23139 (name "python-aionotify")
23140 (version "0.2.0")
23141 (source
23142 (origin
23143 ;; Source tarball on PyPi lacks tests
23144 (method git-fetch)
23145 (uri (git-reference
23146 (url "https://github.com/rbarrois/aionotify")
23147 (commit (string-append "v" version))))
23148 (file-name (git-file-name name version))
23149 (sha256
23150 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
23151 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
23152 (build-system python-build-system)
23153 (home-page "https://github.com/rbarrois/aionotify")
23154 (synopsis "Asyncio-powered inotify library")
23155 (description
23156 "@code{aionotify} is a simple, asyncio-based inotify library.")
23157 (license license:bsd-3)))
23158
23159 (define-public python-forbiddenfruit
23160 (package
23161 (name "python-forbiddenfruit")
23162 (version "0.1.3")
23163 (source
23164 (origin
23165 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
23166 (method git-fetch)
23167 (uri (git-reference
23168 (url "https://github.com/clarete/forbiddenfruit")
23169 (commit version)))
23170 (file-name (git-file-name name version))
23171 (sha256
23172 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
23173 (build-system python-build-system)
23174 (arguments
23175 '(#:phases
23176 (modify-phases %standard-phases
23177 (replace 'check
23178 (lambda _
23179 (invoke "make" "SKIP_DEPS=1"))))))
23180 (native-inputs
23181 `(("python-nose" ,python-nose)
23182 ("python-coverage" ,python-coverage)))
23183 (home-page "https://github.com/clarete/forbiddenfruit")
23184 (synopsis "Patch python built-in objects")
23185 (description "This project allows Python code to extend built-in types.")
23186 (license (list license:gpl3+ license:expat))))
23187
23188 (define-public python-k5test
23189 (package
23190 (name "python-k5test")
23191 (version "0.9.2")
23192 (source
23193 (origin
23194 (method url-fetch)
23195 (uri (pypi-uri "k5test" version))
23196 (sha256
23197 (base32
23198 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
23199 (build-system python-build-system)
23200 (propagated-inputs
23201 `(("python-six" ,python-six)
23202 ;; `which`, `kadmin.local` binaries called inside library
23203 ("which" ,which)
23204 ("mit-krb5" ,mit-krb5)))
23205 (native-inputs `(("mit-krb5" ,mit-krb5)))
23206 (arguments
23207 '(#:phases
23208 (modify-phases %standard-phases
23209 (add-after 'unpack 'apply-upstream-fixes
23210 (lambda* _
23211 (substitute* "k5test/realm.py"
23212 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
23213 (("'kadmin_local'") "'kadmin.local'")
23214 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
23215 (("\\.stop_daemon") "._stop_daemon")))))))
23216 (home-page "https://github.com/pythongssapi/k5test")
23217 (synopsis "Library for setting up self-contained Kerberos 5 environments")
23218 (description
23219 "@code{k5test} is a library for setting up self-contained Kerberos 5
23220 environments, and running Python unit tests inside those environments. It is
23221 based on the file of the same name found alongside the MIT Kerberos 5 unit
23222 tests.")
23223 (license license:isc)))
23224
23225 (define-public python-gssapi
23226 (package
23227 (name "python-gssapi")
23228 (version "1.6.12")
23229 (source
23230 (origin
23231 (method url-fetch)
23232 (uri (pypi-uri "gssapi" version))
23233 (sha256
23234 (base32
23235 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
23236 (build-system python-build-system)
23237 (propagated-inputs
23238 `(("python-decorator" ,python-decorator)
23239 ("python-six" ,python-six)))
23240 (inputs
23241 `(("mit-krb5" ,mit-krb5)))
23242 ;; for tests
23243 (native-inputs
23244 `(("python-parameterized" ,python-parameterized)
23245 ("python-k5test" ,python-k5test)
23246 ("python-nose" ,python-nose)))
23247 (home-page "https://github.com/pythongssapi/python-gssapi")
23248 (synopsis "Python GSSAPI Wrapper")
23249 (description
23250 "Python-GSSAPI provides both low-level and high level wrappers around the
23251 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
23252 also be usable with other GSSAPI mechanisms.")
23253 (license license:isc)))
23254
23255 (define-public python-check-manifest
23256 (package
23257 (name "python-check-manifest")
23258 (version "0.37")
23259 (source
23260 (origin
23261 (method url-fetch)
23262 (uri (pypi-uri "check-manifest" version))
23263 (sha256
23264 (base32
23265 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
23266 (build-system python-build-system)
23267 (native-inputs
23268 `(("python-mock" ,python-mock)
23269 ("git" ,git)))
23270 (home-page "https://github.com/mgedmin/check-manifest")
23271 (synopsis "Check MANIFEST.in in a Python source package for completeness")
23272 (description "Python package can include a MANIFEST.in file to help with
23273 sending package files to the Python Package Index. This package checks that
23274 file to ensure it completely and accurately describes your project.")
23275 (license license:expat)))
23276
23277 (define-public python-android-stringslib
23278 (package
23279 (name "python-android-stringslib")
23280 (version "0.1.2")
23281 (source
23282 (origin
23283 (method git-fetch)
23284 (uri (git-reference
23285 (url "https://framagit.org/tyreunom/python-android-strings-lib")
23286 (commit (string-append "v" version))))
23287 (file-name (git-file-name name version))
23288 (sha256
23289 (base32
23290 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
23291 (build-system python-build-system)
23292 (arguments
23293 `(#:tests? #f))
23294 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
23295 (synopsis "Android strings.xml support")
23296 (description "Android Strings Lib provides support for android's strings.xml
23297 files. These files are used to translate strings in android apps.")
23298 (license license:expat)))
23299
23300 (define-public python-watchdog
23301 (package
23302 (name "python-watchdog")
23303 (version "0.9.0")
23304 (source
23305 (origin
23306 (method url-fetch)
23307 (uri (pypi-uri "watchdog" version))
23308 (sha256
23309 (base32
23310 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
23311 (build-system python-build-system)
23312 (arguments
23313 `(#:phases
23314 (modify-phases %standard-phases
23315 (add-before 'check 'remove-failing
23316 (lambda _
23317 (delete-file "tests/test_inotify_buffer.py")
23318 (delete-file "tests/test_snapshot_diff.py")
23319 #t)))))
23320 (propagated-inputs
23321 `(("python-argh" ,python-argh)
23322 ("python-pathtools" ,python-pathtools)
23323 ("python-pyyaml" ,python-pyyaml)))
23324 (native-inputs
23325 `(("python-pytest-cov" ,python-pytest-cov)
23326 ("python-pytest-timeout" ,python-pytest-timeout)))
23327 (home-page "https://github.com/gorakhargosh/watchdog")
23328 (synopsis "File system events monitoring")
23329 (description "This package provides a way to monitor file system events
23330 such as a file modification and trigger an action. This is similar to inotify,
23331 but portable.")
23332 (license license:asl2.0)))
23333
23334 (define-public python-watchgod
23335 (package
23336 (name "python-watchgod")
23337 (version "0.6")
23338 (source
23339 (origin
23340 ;; There are no tests in the PyPI tarball.
23341 (method git-fetch)
23342 (uri (git-reference
23343 (url "https://github.com/samuelcolvin/watchgod")
23344 (commit (string-append "v" version))))
23345 (file-name (git-file-name name version))
23346 (sha256
23347 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
23348 (build-system python-build-system)
23349 (arguments
23350 `(#:phases
23351 (modify-phases %standard-phases
23352 (replace 'check
23353 (lambda* (#:key tests? #:allow-other-keys)
23354 (when tests?
23355 (invoke "pytest" "-vv")))))))
23356 (native-inputs
23357 `(("python-coverage" ,python-coverage)
23358 ("python-docutils" ,python-docutils)
23359 ("python-flake8" ,python-flake8)
23360 ("python-isort" ,python-isort)
23361 ("python-pycodestyle" ,python-pycodestyle)
23362 ("python-pyflakes" ,python-pyflakes)
23363 ("python-pygments" ,python-pygments)
23364 ("python-pytest" ,python-pytest)
23365 ("python-pytest-cov" ,python-pytest-cov)
23366 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
23367 ("python-pytest-mock" ,python-pytest-mock)
23368 ("python-pytest-sugar" ,python-pytest-sugar)
23369 ("python-pytest-toolbox" ,python-pytest-toolbox)))
23370 (home-page "https://github.com/samuelcolvin/watchgod")
23371 (synopsis "Simple, modern file watching and code reload in Python")
23372 (description
23373 "Simple, modern file watching and code reload in Python inspired by
23374 @code{watchdog}. Among the differences are a unified approach for each
23375 operating systems and an elegant approach to concurrency using threading.")
23376 (license license:expat)))
23377
23378 (define-public python-wget
23379 (package
23380 (name "python-wget")
23381 (version "3.2")
23382 (source
23383 (origin
23384 (method url-fetch)
23385 (uri (pypi-uri "wget" version ".zip"))
23386 (sha256
23387 (base32
23388 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
23389 (build-system python-build-system)
23390 (native-inputs `(("unzip" ,unzip)))
23391 (home-page "https://bitbucket.org/techtonik/python-wget/")
23392 (synopsis "Pure Python download utility")
23393 (description "The python-wget library provides an API to download files
23394 with features similar to the @command{wget} utility.")
23395 (license license:unlicense)))
23396
23397 (define-public offlate
23398 (package
23399 (name "offlate")
23400 (version "0.5")
23401 (source
23402 (origin
23403 (method git-fetch)
23404 (uri (git-reference
23405 (url "https://framagit.org/tyreunom/offlate")
23406 (commit version)))
23407 (file-name (git-file-name name version))
23408 (sha256
23409 (base32
23410 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
23411 (build-system python-build-system)
23412 (arguments
23413 ;; No tests
23414 `(#:tests? #f))
23415 (propagated-inputs
23416 `(("python-android-stringslib" ,python-android-stringslib)
23417 ("python-dateutil" ,python-dateutil)
23418 ("python-gitlab" ,python-gitlab)
23419 ("python-lxml" ,python-lxml)
23420 ("python-polib" ,python-polib)
23421 ("python-pyenchant" ,python-pyenchant)
23422 ("python-pygit2" ,python-pygit2)
23423 ("python-pygithub" ,python-pygithub)
23424 ("python-pyqt" ,python-pyqt)
23425 ("python-requests" ,python-requests)
23426 ("python-ruamel.yaml" ,python-ruamel.yaml)
23427 ("python-translation-finder" ,python-translation-finder)
23428 ("python-watchdog" ,python-watchdog)))
23429 (native-inputs
23430 `(("qttools" ,qttools)))
23431 (home-page "https://framagit.org/tyreunom/offlate")
23432 (synopsis "Offline translation interface for online translation tools")
23433 (description "Offlate offers a unified interface for different translation
23434 file formats, as well as many different online translation platforms. You can
23435 use it to get work from online platforms, specialized such as the Translation
23436 Project, or not such a gitlab instance when your upstream doesn't use any
23437 dedicated platform. The tool proposes a unified interface for any format and
23438 an upload option to send your work back to the platform.")
23439 (license license:gpl3+)))
23440
23441 (define-public python-titlecase
23442 (package
23443 (name "python-titlecase")
23444 (version "0.12.0")
23445 (source
23446 (origin
23447 (method url-fetch)
23448 (uri (pypi-uri "titlecase" version))
23449 (sha256
23450 (base32
23451 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
23452 (build-system python-build-system)
23453 (native-inputs
23454 `(("python-nose" ,python-nose)))
23455 (home-page "https://github.com/ppannuto/python-titlecase")
23456 (synopsis "Capitalize strings similar to book titles")
23457 (description
23458 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
23459 It capitalizes (predominantly English) strings in a way that is similar to
23460 book titles, using the New York Times Manual of Style to leave certain words
23461 lowercase.")
23462 (license license:expat)))
23463
23464 (define-public python-pypng
23465 (package
23466 (name "python-pypng")
23467 (version "0.0.20")
23468 (source
23469 (origin
23470 (method url-fetch)
23471 (uri (pypi-uri "pypng" version))
23472 (sha256
23473 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
23474 (build-system python-build-system)
23475 (home-page "https://github.com/drj11/pypng")
23476 (synopsis "Pure Python PNG image encoder/decoder")
23477 (description
23478 "The PyPNG module implements support for PNG images. It reads and writes
23479 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
23480 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
23481 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
23482 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
23483 A number of optional chunks can be specified (when writing) and
23484 understood (when reading): tRNS, bKGD, gAMA.
23485
23486 PyPNG is not a high level toolkit for image processing (like PIL) and does not
23487 aim at being a replacement or competitor. Its strength lies in fine-grained
23488 extensive support of PNG features. It can also read and write Netpbm PAM
23489 files, with a focus on its use as an intermediate format for implementing
23490 custom PNG processing.")
23491 (license license:expat)))
23492
23493 (define-public python-fuzzywuzzy
23494 (package
23495 (name "python-fuzzywuzzy")
23496 (version "0.18.0")
23497 (source
23498 (origin
23499 (method url-fetch)
23500 (uri (pypi-uri "fuzzywuzzy" version))
23501 (sha256
23502 (base32
23503 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
23504 (build-system python-build-system)
23505 (native-inputs
23506 `(("python-hypothesis" ,python-hypothesis)
23507 ("python-pycodestyle" ,python-pycodestyle)
23508 ("python-pytest" ,python-pytest)))
23509 (propagated-inputs
23510 `(("python-levenshtein" ,python-levenshtein)))
23511 (home-page "https://github.com/seatgeek/fuzzywuzzy")
23512 (synopsis "Fuzzy string matching in Python")
23513 (description "Approximate string matching using
23514 @emph{Levenshtein Distance} to calculate the differences between
23515 sequences.")
23516 (license license:gpl2)))
23517
23518 (define-public python2-fuzzywuzzy
23519 (package-with-python2 python-fuzzywuzzy))
23520
23521 (define-public python-block-tracing
23522 (package
23523 (name "python-block-tracing")
23524 (version "1.0.1")
23525 (source
23526 (origin
23527 (method url-fetch)
23528 (uri (pypi-uri "block_tracing" version))
23529 (sha256
23530 (base32
23531 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
23532 (build-system python-build-system)
23533 (arguments '(#:tests? #f)) ; no tests
23534 (home-page "https://github.com/rianhunter/block_tracing")
23535 (synopsis "Protect process memory")
23536 (description
23537 "@code{block_tracing} is a tiny Python library that can be used to
23538 prevent debuggers and other applications from inspecting the memory within
23539 your process.")
23540 (license license:expat)))
23541
23542 (define-public python-gcovr
23543 (package
23544 (name "python-gcovr")
23545 (version "4.2")
23546 (source
23547 (origin
23548 (method url-fetch)
23549 (uri (pypi-uri "gcovr" version))
23550 (sha256
23551 (base32
23552 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
23553 (build-system python-build-system)
23554 (propagated-inputs
23555 `(("python-lxml" ,python-lxml)
23556 ("python-jinja2" ,python-jinja2)))
23557 (home-page "https://gcovr.com/")
23558 (synopsis "Utility for generating code coverage results")
23559 (description
23560 "Gcovr provides a utility for managing the use of the GNU gcov
23561 utility and generating summarized code coverage results. It is inspired
23562 by the Python coverage.py package, which provides a similar utility for
23563 Python.")
23564 (license license:bsd-3)))
23565
23566 (define-public python-owslib
23567 (package
23568 (name "python-owslib")
23569 (version "0.19.2")
23570 (source
23571 (origin
23572 (method url-fetch)
23573 (uri (pypi-uri "OWSLib" version))
23574 (sha256
23575 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
23576 (build-system python-build-system)
23577 (arguments
23578 '(#:tests? #f)) ; TODO: package dependencies required for tests.
23579 (synopsis "Interface for Open Geospatial Consortium web service")
23580 (description
23581 "OWSLib is a Python package for client programming with Open Geospatial
23582 Consortium (OGC) web service (hence OWS) interface standards, and their related
23583 content models.")
23584 (home-page "https://geopython.github.io/OWSLib/")
23585 (license license:bsd-3)))
23586
23587 (define-public python-docusign-esign
23588 (package
23589 (name "python-docusign-esign")
23590 (version "3.1.0")
23591 (source (origin
23592 (method url-fetch)
23593 (uri (pypi-uri "docusign_esign" version))
23594 (sha256
23595 (base32
23596 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
23597 (build-system python-build-system)
23598 ;; Testing requires undocumented setup changes, and so testing is disabled here.
23599 (arguments `(#:tests? #f))
23600 (propagated-inputs
23601 `(("python-certifi" ,python-certifi)
23602 ("python-six" ,python-six)
23603 ("python-dateutil" ,python-dateutil)
23604 ("python-urllib3" ,python-urllib3)
23605 ("python-pyjwt" ,python-pyjwt)
23606 ("python-cryptography" ,python-cryptography)
23607 ("python-nose" ,python-nose)))
23608 (synopsis "DocuSign Python Client")
23609 (description "The Official DocuSign Python Client Library used to interact
23610 with the eSign REST API. Send, sign, and approve documents using this client.")
23611 (home-page "https://www.docusign.com/devcenter")
23612 (license license:expat)))
23613
23614 (define-public python-xattr
23615 (package
23616 (name "python-xattr")
23617 (version "0.9.7")
23618 (source
23619 (origin
23620 (method url-fetch)
23621 (uri (pypi-uri "xattr" version))
23622 (sha256
23623 (base32
23624 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
23625 (build-system python-build-system)
23626 (propagated-inputs
23627 `(("python-cffi" ,python-cffi)))
23628 (home-page "https://github.com/xattr/xattr")
23629 (synopsis
23630 "Python wrapper for extended file system attributes")
23631 (description "This package provides a Python wrapper for using extended
23632 file system attributes. Extended attributes extend the basic attributes of files
23633 and directories in the file system. They are stored as name:data pairs
23634 associated with file system objects (files, directories, symlinks, etc).")
23635 (license license:expat)))
23636
23637 (define-public python-json-logger
23638 (package
23639 (name "python-json-logger")
23640 (version "0.1.11")
23641 (source
23642 (origin
23643 (method url-fetch)
23644 (uri (pypi-uri "python-json-logger" version))
23645 (sha256
23646 (base32
23647 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
23648 (build-system python-build-system)
23649 (home-page
23650 "https://github.com/madzak/python-json-logger")
23651 (synopsis "JSON log formatter in Python")
23652 (description "This library allows standard Python logging to output log data
23653 as JSON objects. With JSON we can make our logs more readable by machines and
23654 we can stop writing custom parsers for syslog-type records.")
23655 (license license:bsd-3)))
23656
23657 (define-public python-daiquiri
23658 (package
23659 (name "python-daiquiri")
23660 (version "2.1.1")
23661 (source
23662 (origin
23663 (method url-fetch)
23664 (uri (pypi-uri "daiquiri" version))
23665 (sha256
23666 (base32
23667 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
23668 (build-system python-build-system)
23669 (propagated-inputs
23670 `(("python-json-logger" ,python-json-logger)))
23671 (native-inputs
23672 `(("python-mock" ,python-mock)
23673 ("python-pytest" ,python-pytest)
23674 ("python-setuptools-scm" ,python-setuptools-scm)
23675 ("python-six" ,python-six)))
23676 (home-page "https://github.com/jd/daiquiri")
23677 (synopsis
23678 "Library to configure Python logging easily")
23679 (description "The daiquiri library provides an easy way to configure
23680 logging in Python. It also provides some custom formatters and handlers.")
23681 (license license:asl2.0)))
23682
23683 (define-public python-pifpaf
23684 (package
23685 (name "python-pifpaf")
23686 (version "2.5.0")
23687 (source
23688 (origin
23689 (method url-fetch)
23690 (uri (pypi-uri "pifpaf" version))
23691 (sha256
23692 (base32
23693 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
23694 (build-system python-build-system)
23695 (arguments
23696 '(#:phases
23697 (modify-phases %standard-phases
23698 (replace 'check
23699 (lambda _
23700 (invoke "python" "setup.py" "testr" "--slowest"
23701 "--testr-args=until-failure"))))))
23702 (propagated-inputs
23703 `(("python-click" ,python-click)
23704 ("python-daiquiri" ,python-daiquiri)
23705 ("python-fixtures" ,python-fixtures)
23706 ("python-jinja2" ,python-jinja2)
23707 ("python-pbr" ,python-pbr)
23708 ("python-psutil" ,python-psutil)
23709 ("python-six" ,python-six)
23710 ("python-xattr" ,python-xattr)))
23711 (native-inputs
23712 `(("python-mock" ,python-mock)
23713 ("python-os-testr" ,python-os-testr)
23714 ("python-requests" ,python-requests)
23715 ("python-testrepository" ,python-testrepository)
23716 ("python-testtools" ,python-testtools)))
23717 (home-page "https://github.com/jd/pifpaf")
23718 (synopsis "Tools and fixtures to manage daemons for testing in Python")
23719 (description "Pifpaf is a suite of fixtures and a command-line tool that
23720 starts and stops daemons for a quick throw-away usage. This is typically
23721 useful when needing these daemons to run integration testing. It originally
23722 evolved from its precursor @code{overtest}.")
23723 (license license:asl2.0)))
23724
23725 (define-public python-pytest-check-links
23726 (package
23727 (name "python-pytest-check-links")
23728 (version "0.3.0")
23729 (source
23730 (origin
23731 (method url-fetch)
23732 ;; URI uses underscores
23733 (uri (pypi-uri "pytest_check_links" version))
23734 (sha256
23735 (base32
23736 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
23737 (build-system python-build-system)
23738 (propagated-inputs
23739 `(("python-docutils" ,python-docutils)
23740 ("python-html5lib" ,python-html5lib)
23741 ("python-nbconvert" ,python-nbconvert)
23742 ("python-nbformat" ,python-nbformat)
23743 ("python-pytest" ,python-pytest)
23744 ("python-six" ,python-six)))
23745 (native-inputs
23746 `(("python-pbr-minimal" ,python-pbr-minimal)))
23747 (home-page "https://github.com/minrk/pytest-check-links")
23748 (synopsis "Check links in files")
23749 (description "This package provides a pytest plugin that checks URLs for
23750 HTML-containing files.")
23751 (license license:bsd-3)))
23752
23753 (define-public python-json5
23754 (package
23755 (name "python-json5")
23756 (version "0.8.5")
23757 (source
23758 (origin
23759 ;; sample.json5 is missing from PyPi source tarball
23760 (method git-fetch)
23761 (uri (git-reference
23762 (url "https://github.com/dpranke/pyjson5")
23763 (commit (string-append "v" version))))
23764 (file-name (git-file-name name version))
23765 (sha256
23766 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
23767 (build-system python-build-system)
23768 (home-page "https://github.com/dpranke/pyjson5")
23769 (synopsis
23770 "Python implementation of the JSON5 data format")
23771 (description
23772 "JSON5 extends the JSON data interchange format to make it slightly more
23773 usable as a configuration language. This Python package implements parsing and
23774 dumping of JSON5 data structures.")
23775 (license license:asl2.0)))
23776
23777 (define-public python-frozendict
23778 (package
23779 (name "python-frozendict")
23780 (version "1.2")
23781 (source
23782 (origin
23783 (method url-fetch)
23784 (uri (pypi-uri "frozendict" version))
23785 (sha256
23786 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
23787 (build-system python-build-system)
23788 (home-page "https://github.com/slezica/python-frozendict")
23789 (synopsis "Simple immutable mapping for Python")
23790 (description
23791 "@dfn{frozendict} is an immutable wrapper around dictionaries that
23792 implements the complete mapping interface. It can be used as a drop-in
23793 replacement for dictionaries where immutability is desired.")
23794 (license license:expat)))
23795
23796 (define-public python-unpaddedbase64
23797 (package
23798 (name "python-unpaddedbase64")
23799 (version "1.1.0")
23800 (source
23801 (origin
23802 (method git-fetch)
23803 (uri (git-reference
23804 (url "https://github.com/matrix-org/python-unpaddedbase64")
23805 (commit (string-append "v" version))))
23806 (file-name (git-file-name name version))
23807 (sha256
23808 (base32
23809 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
23810 (build-system python-build-system)
23811 (home-page "https://pypi.org/project/unpaddedbase64/")
23812 (synopsis "Encode and decode Base64 without “=” padding")
23813 (description
23814 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
23815 using “=” characters. However this conveys no benefit so many protocols
23816 choose to use Base64 without the “=” padding.")
23817 (license license:asl2.0)))
23818
23819 (define-public python-py-cpuinfo
23820 (package
23821 (name "python-py-cpuinfo")
23822 (version "5.0.0")
23823 (source
23824 (origin
23825 (method url-fetch)
23826 (uri (pypi-uri "py-cpuinfo" version))
23827 (sha256
23828 (base32
23829 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
23830 (build-system python-build-system)
23831 (home-page "https://github.com/workhorsy/py-cpuinfo")
23832 (synopsis "Get CPU info with Python")
23833 (description
23834 "This Python module returns the CPU info by using the best sources of
23835 information for your operating system.")
23836 (license license:expat)))
23837
23838 (define-public python-canonicaljson
23839 (package
23840 (name "python-canonicaljson")
23841 (version "1.4.0")
23842 (source
23843 (origin
23844 (method url-fetch)
23845 (uri (pypi-uri "canonicaljson" version))
23846 (sha256
23847 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
23848 (build-system python-build-system)
23849 (propagated-inputs
23850 `(("python-six" ,python-six)
23851 ("python-frozendict" ,python-frozendict)
23852 ("python-simplejson" ,python-simplejson)))
23853 (home-page "https://github.com/matrix-org/python-canonicaljson")
23854 (synopsis "Canonical JSON")
23855 (description
23856 "Deterministically encode JSON.
23857
23858 @itemize
23859 @item Encodes objects and arrays as RFC 7159 JSON.
23860 @item Sorts object keys so that you get the same result each time.
23861 @item Has no insignificant whitespace to make the output as small as possible.
23862 @item Escapes only the characters that must be escaped, U+0000 to
23863 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
23864 @item Uses the shortest escape sequence for each escaped character.
23865 @item Encodes the JSON as UTF-8.
23866 @item Can encode frozendict immutable dictionaries.
23867 @end itemize")
23868 (license license:asl2.0)))
23869
23870 (define-public python-signedjson
23871 (package
23872 (name "python-signedjson")
23873 (version "1.1.1")
23874 (source
23875 (origin
23876 (method url-fetch)
23877 (uri (pypi-uri "signedjson" version))
23878 (sha256
23879 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
23880 (build-system python-build-system)
23881 (propagated-inputs
23882 `(("python-canonicaljson" ,python-canonicaljson)
23883 ("python-importlib-metadata" ,python-importlib-metadata)
23884 ("python-pynacl" ,python-pynacl)
23885 ("python-typing-extensions" ,python-typing-extensions)
23886 ("python-unpaddedbase64" ,python-unpaddedbase64)))
23887 (native-inputs
23888 `(("python-setuptools-scm" ,python-setuptools-scm)))
23889 (home-page "https://github.com/matrix-org/python-signedjson")
23890 (synopsis "Sign JSON objects with ED25519 signatures")
23891 (description
23892 "Sign JSON objects with ED25519 signatures.
23893
23894 @itemize
23895 @item More than one entity can sign the same object.
23896 @item Each entity can sign the object with more than one key making it easier to
23897 rotate keys
23898 @item ED25519 can be replaced with a different algorithm.
23899 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
23900 key.
23901 @end itemize")
23902 (license license:asl2.0)))
23903
23904 (define-public python-daemonize
23905 (package
23906 (name "python-daemonize")
23907 (version "2.5.0")
23908 (source
23909 (origin
23910 (method url-fetch)
23911 (uri (pypi-uri "daemonize" version))
23912 (sha256
23913 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
23914 (build-system python-build-system)
23915 (home-page "https://github.com/thesharp/daemonize")
23916 (synopsis "Library for writing system daemons in Python")
23917 (description "Daemonize is a library for writing system daemons in Python.")
23918 (license license:expat)))
23919
23920 (define-public python-pymacaroons
23921 (package
23922 (name "python-pymacaroons")
23923 (version "0.13.0")
23924 (source
23925 (origin
23926 (method url-fetch)
23927 (uri (pypi-uri "pymacaroons" version))
23928 (sha256
23929 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
23930 (build-system python-build-system)
23931 (propagated-inputs
23932 `(("python-six" ,python-six)
23933 ("python-pynacl" ,python-pynacl)))
23934 (home-page "https://github.com/ecordell/pymacaroons")
23935 (synopsis "Python Macaroon Library")
23936 (description
23937 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
23938 tokens, macaroons embed caveats that define specific authorization
23939 requirements for the target service, the service that issued the root macaroon
23940 and which is capable of verifying the integrity of macaroons it receives.
23941
23942 Macaroons allow for delegation and attenuation of authorization. They are
23943 simple and fast to verify, and decouple authorization policy from the
23944 enforcement of that policy.")
23945 (license license:expat)))
23946
23947 (define-public python-ldap3
23948 (package
23949 (name "python-ldap3")
23950 (version "2.7")
23951 (home-page "https://github.com/cannatag/ldap3")
23952 (source
23953 (origin
23954 (method git-fetch)
23955 (uri (git-reference (url home-page)
23956 (commit (string-append "v" version))))
23957 (file-name (git-file-name name version))
23958 (sha256
23959 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
23960 (build-system python-build-system)
23961 (arguments
23962 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
23963 #:phases (modify-phases %standard-phases
23964 (replace 'check
23965 (lambda* (#:key tests? #:allow-other-keys)
23966 (when tests?
23967 (invoke "nosetests" "-s" "test"))
23968 #t)))))
23969 (native-inputs
23970 `(("python-nose" ,python-nose)))
23971 (propagated-inputs
23972 `(("python-gssapi" ,python-gssapi)
23973 ("python-pyasn1" ,python-pyasn1)))
23974 (synopsis "Python LDAP client")
23975 (description
23976 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
23977 library.")
23978 (license license:lgpl3+)))
23979
23980 (define-public python-boltons
23981 (package
23982 (name "python-boltons")
23983 (version "20.0.0")
23984 (source
23985 (origin
23986 (method url-fetch)
23987 (uri (pypi-uri "boltons" version))
23988 (sha256
23989 (base32
23990 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
23991 (build-system python-build-system)
23992 (home-page "https://github.com/mahmoud/boltons")
23993 (synopsis "Extensions to the Python standard library")
23994 (description
23995 "Boltons is a set of over 230 pure-Python utilities in the same spirit
23996 as — and yet conspicuously missing from — the standard library, including:
23997
23998 @itemize
23999 @item Atomic file saving, bolted on with fileutils
24000 @item A highly-optimized OrderedMultiDict, in dictutils
24001 @item Two types of PriorityQueue, in queueutils
24002 @item Chunked and windowed iteration, in iterutils
24003 @item Recursive data structure iteration and merging, with iterutils.remap
24004 @item Exponential backoff functionality, including jitter, through
24005 iterutils.backoff
24006 @item A full-featured TracebackInfo type, for representing stack traces, in
24007 tbutils
24008 @end itemize")
24009 (license license:bsd-3)))
24010
24011 (define-public python-eliot
24012 (package
24013 (name "python-eliot")
24014 (version "1.12.0")
24015 (source
24016 (origin
24017 (method url-fetch)
24018 (uri (pypi-uri "eliot" version))
24019 (sha256
24020 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
24021 (build-system python-build-system)
24022 (arguments
24023 `(#:phases
24024 (modify-phases %standard-phases
24025 (add-after 'unpack 'remove-journald-support
24026 (lambda _
24027 (for-each delete-file
24028 '("eliot/tests/test_journald.py"
24029 "eliot/journald.py"))
24030 #t))
24031 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
24032 ;; remove command-line tool's tests. TODO eliot-prettyprint should
24033 ;; be installed and these tests should pass.
24034 (lambda _
24035 (delete-file "eliot/tests/test_prettyprint.py")
24036 #t)))))
24037 (propagated-inputs
24038 `(("python-boltons" ,python-boltons)
24039 ("python-pyrsistent" ,python-pyrsistent)
24040 ("python-six" ,python-six)
24041 ("python-zope-interface" ,python-zope-interface)))
24042 (native-inputs
24043 `(("python-black" ,python-black)
24044 ("python-coverage" ,python-coverage)
24045 ("python-dask" ,python-dask)
24046 ("python-flake8" ,python-flake8)
24047 ("python-hypothesis" ,python-hypothesis)
24048 ("python-pytest" ,python-pytest)
24049 ("python-setuptools" ,python-setuptools)
24050 ("python-sphinx" ,python-sphinx)
24051 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24052 ("python-testtools" ,python-testtools)
24053 ("python-twine" ,python-twine)
24054 ("python-twisted" ,python-twisted)))
24055 (home-page "https://github.com/itamarst/eliot/")
24056 (synopsis "Eliot: the logging system that tells you why it happened")
24057 (description
24058 "@dfn{eliot} is a Python logging system that outputs causal chains of
24059 actions: actions can spawn other actions, and eventually they either succeed
24060 or fail. The resulting logs tell you the story of what your software did: what
24061 happened, and what caused it.")
24062 (license license:asl2.0)))
24063
24064 (define-public python-pem
24065 (package
24066 (name "python-pem")
24067 (version "20.1.0")
24068 (source
24069 (origin
24070 (method url-fetch)
24071 (uri (pypi-uri "pem" version))
24072 (sha256
24073 (base32
24074 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
24075 (build-system python-build-system)
24076 (native-inputs
24077 `(("python-certifi" ,python-certifi)
24078 ("python-coverage" ,python-coverage)
24079 ("python-pretend" ,python-pretend)
24080 ("python-pyopenssl" ,python-pyopenssl)
24081 ("python-pytest" ,python-pytest)
24082 ("python-sphinx" ,python-sphinx)
24083 ("python-twisted" ,python-twisted)))
24084 (home-page "https://pem.readthedocs.io/")
24085 (synopsis "Easy PEM file parsing in Python")
24086 (description
24087 "This package provides a Python module for parsing and splitting PEM files.")
24088 (license license:expat)))
24089
24090 (define-public python-txsni
24091 ;; We need a few commits on top of 0.1.9 for compatibility with newer
24092 ;; Python and OpenSSL.
24093 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
24094 (revision "0"))
24095 (package
24096 (name "python-txsni")
24097 (version (git-version "0.1.9" revision commit))
24098 (home-page "https://github.com/glyph/txsni")
24099 (source
24100 (origin
24101 (method git-fetch)
24102 (uri (git-reference (url home-page) (commit commit)))
24103 (file-name (git-file-name name version))
24104 (sha256
24105 (base32
24106 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
24107 (build-system python-build-system)
24108 (propagated-inputs
24109 `(("python-pyopenssl" ,python-pyopenssl)
24110 ("python-service-identity" ,python-service-identity)
24111 ("python-twisted" ,python-twisted)))
24112 (synopsis "Run TLS servers with Twisted")
24113 (description
24114 "This package provides an easy-to-use SNI endpoint for use
24115 with the Twisted web framework.")
24116 (license license:expat))))
24117
24118 (define-public python-txacme
24119 (package
24120 (name "python-txacme")
24121 (version "0.9.2")
24122 (source
24123 (origin
24124 (method url-fetch)
24125 (uri (pypi-uri "txacme" version))
24126 (sha256
24127 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
24128 (build-system python-build-system)
24129 (propagated-inputs
24130 `(("python-acme" ,python-acme)
24131 ("python-attrs" ,python-attrs)
24132 ("python-eliot" ,python-eliot)
24133 ("python-josepy" ,python-josepy)
24134 ("python-pem" ,python-pem)
24135 ("python-treq" ,python-treq)
24136 ("python-twisted" ,python-twisted)
24137 ("python-txsni" ,python-txsni)))
24138 (native-inputs
24139 `(("python-fixtures" ,python-fixtures)
24140 ("python-hypothesis" ,python-hypothesis)
24141 ("python-mock" ,python-mock)
24142 ("python-service-identity"
24143 ,python-service-identity)
24144 ("python-testrepository" ,python-testrepository)
24145 ("python-testscenarios" ,python-testscenarios)
24146 ("python-testtools" ,python-testtools)))
24147 (home-page "https://github.com/twisted/txacme")
24148 (synopsis "Twisted implexmentation of the ACME protocol")
24149 (description
24150 "ACME is Automatic Certificate Management Environment, a protocol that
24151 allows clients and certificate authorities to automate verification and
24152 certificate issuance. The ACME protocol is used by the free Let's Encrypt
24153 Certificate Authority.
24154
24155 txacme is an implementation of the protocol for Twisted, the event-driven
24156 networking engine for Python.")
24157 (license license:expat)))
24158
24159 (define-public python-pysaml2
24160 (package
24161 (name "python-pysaml2")
24162 (version "6.5.1")
24163 (source
24164 (origin
24165 (method url-fetch)
24166 (uri (pypi-uri "pysaml2" version))
24167 (sha256
24168 (base32
24169 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
24170 (build-system python-build-system)
24171 (propagated-inputs
24172 `(("python-cryptography" ,python-cryptography)
24173 ("python-dateutil" ,python-dateutil)
24174 ("python-defusedxml" ,python-defusedxml)
24175 ("python-importlib-resources"
24176 ,python-importlib-resources)
24177 ("python-pyopenssl" ,python-pyopenssl)
24178 ("python-pytz" ,python-pytz)
24179 ("python-requests" ,python-requests)
24180 ("python-six" ,python-six)
24181 ("python-xmlschema" ,python-xmlschema)))
24182 (home-page "https://idpy.org")
24183 (synopsis "Python implementation of SAML Version 2 Standard")
24184 (description
24185 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
24186 It contains all necessary pieces for building a SAML2 service provider or
24187 an identity provider. The distribution contains examples of both.
24188
24189 This package was originally written to work in a WSGI environment, but
24190 there are extensions that allow you to use it with other frameworks.")
24191 (license license:asl2.0)))
24192
24193 (define-public python-click-plugins
24194 (package
24195 (name "python-click-plugins")
24196 (version "1.1.1")
24197 (source
24198 (origin
24199 (method url-fetch)
24200 (uri (pypi-uri "click-plugins" version))
24201 (sha256
24202 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
24203 (build-system python-build-system)
24204 (native-inputs
24205 `(("python-pytest" ,python-pytest)))
24206 (propagated-inputs
24207 `(("python-click" ,python-click)))
24208 (synopsis "Extension for Click to register external CLI commands")
24209 (description "This package provides n extension module for Click to
24210 register external CLI commands via setuptools entry-points.")
24211 (home-page "https://github.com/click-contrib/click-plugins")
24212 (license license:bsd-3)))
24213
24214 (define-public python-diceware
24215 (package
24216 (name "python-diceware")
24217 (version "0.9.6")
24218 (source
24219 (origin
24220 (method url-fetch)
24221 (uri (pypi-uri "diceware" version))
24222 (sha256
24223 (base32
24224 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
24225 (build-system python-build-system)
24226 (native-inputs
24227 `(("python-coverage" ,python-coverage)
24228 ("python-pytest" ,python-pytest)
24229 ("python-pytest-runner" ,python-pytest-runner)))
24230 (home-page "https://github.com/ulif/diceware/")
24231 (synopsis "Generates memorable passphrases")
24232 (description "This package generates passphrases by concatenating words
24233 randomly picked from wordlists. It supports several sources of
24234 randomness (including real life dice) and different wordlists (including
24235 cryptographically signed ones).")
24236 (license license:gpl3+)))
24237
24238 (define-public python-dictdiffer
24239 (package
24240 (name "python-dictdiffer")
24241 (version "0.8.1")
24242 (source (origin
24243 (method url-fetch)
24244 (uri (pypi-uri "dictdiffer" version))
24245 (sha256
24246 (base32
24247 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
24248 (build-system python-build-system)
24249 (native-inputs
24250 `(("python-check-manifest" ,python-check-manifest)
24251 ("python-coverage" ,python-coverage)
24252 ("python-isort" ,python-isort)
24253 ("python-mock" ,python-mock)
24254 ("python-pydoctstyle" ,python-pydocstyle)
24255 ("python-pytest-cache" ,python-pytest-cache)
24256 ("python-pytest-cov" ,python-pytest-cov)
24257 ("python-pytest-pep8" ,python-pytest-pep8)
24258 ("python-pytest-runner" ,python-pytest-runner)
24259 ("python-pytest" ,python-pytest)
24260 ("python-setuptools-scm" ,python-setuptools-scm)
24261 ("python-tox" ,python-tox)))
24262 (home-page "https://github.com/inveniosoftware/dictdiffer")
24263 (synopsis "Diff and patch Python dictionary objects")
24264 (description
24265 "Dictdiffer is a Python module that helps you to diff and patch
24266 dictionaries.")
24267 (license license:expat)))
24268
24269 (define-public pyzo
24270 (package
24271 (name "pyzo")
24272 (version "4.11.2")
24273 (source
24274 (origin
24275 (method url-fetch)
24276 (uri (pypi-uri "pyzo" version))
24277 (sha256
24278 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
24279 (build-system python-build-system)
24280 (arguments
24281 `(#:phases
24282 (modify-phases %standard-phases
24283 (add-before 'check 'fix-home-directory
24284 (lambda _
24285 ;; Tests fail with "Permission denied: '/homeless-shelter'".
24286 (setenv "HOME" "/tmp")
24287 #t)))
24288 ;; Tests fail with "Uncaught Python exception: python: undefined
24289 ;; symbol: objc_getClass".
24290 #:tests? #f))
24291 (propagated-inputs
24292 `(("python-pyqt" ,python-pyqt)))
24293 (home-page "https://pyzo.org")
24294 (synopsis
24295 "Python IDE for scientific computing")
24296 (description
24297 "Pyzo is a Python IDE focused on interactivity and introspection,
24298 which makes it very suitable for scientific computing. Its practical
24299 design is aimed at simplicity and efficiency.
24300
24301 It consists of two main components, the editor and the shell, and uses
24302 a set of pluggable tools to help the programmer in various ways. Some
24303 example tools are source structure, project manager, interactive help,
24304 workspace...")
24305 (license license:bsd-2)))
24306
24307 (define-public python-osc
24308 (package
24309 (name "python-osc")
24310 (version "1.7.4")
24311 (source
24312 (origin
24313 (method url-fetch)
24314 (uri (pypi-uri "python-osc" version))
24315 (sha256
24316 (base32
24317 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
24318 (build-system python-build-system)
24319 (home-page "https://github.com/attwad/python-osc")
24320 (synopsis "Open Sound Control server and client implementations")
24321 (description
24322 "@code{python-osc} is a pure Python library with no external
24323 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
24324 Open Sound Control 1.0} specification.")
24325 (license license:unlicense)))
24326
24327 (define-public python-voluptuous
24328 (package
24329 (name "python-voluptuous")
24330 (version "0.11.7")
24331 (source
24332 (origin
24333 (method url-fetch)
24334 (uri (pypi-uri "voluptuous" version))
24335 (sha256
24336 (base32
24337 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
24338 (build-system python-build-system)
24339 (native-inputs
24340 `(("python-nose" ,python-nose)))
24341 (home-page "https://github.com/alecthomas/voluptuous")
24342 (synopsis "Python data validation library")
24343 (description
24344 "Voluptuous is a Python data validation library. It is primarily
24345 intended for validating data coming into Python as JSON, YAML, etc.")
24346 (license license:bsd-3)))
24347
24348 (define-public python-cmd2
24349 (package
24350 (name "python-cmd2")
24351 (version "1.0.2")
24352 (source
24353 (origin
24354 (method url-fetch)
24355 (uri (pypi-uri "cmd2" version))
24356 (sha256
24357 (base32
24358 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
24359 (build-system python-build-system)
24360 (propagated-inputs
24361 `(("python-attrs" ,python-attrs)
24362 ("python-colorama" ,python-colorama)
24363 ("python-pyperclip" ,python-pyperclip)
24364 ("python-wcwidth" ,python-wcwidth)))
24365 (native-inputs
24366 `(("python-codecov" ,python-codecov)
24367 ("python-coverage" ,python-coverage)
24368 ("python-doc8" ,python-doc8)
24369 ("python-flake8" ,python-flake8)
24370 ("python-invoke" ,python-invoke)
24371 ("python-mock" ,python-mock)
24372 ("python-pytest" ,python-pytest)
24373 ("python-pytest-cov" ,python-pytest-cov)
24374 ("python-pytest-mock" ,python-pytest-mock)
24375 ("python-setuptools-scm" ,python-setuptools-scm)
24376 ("python-sphinx" ,python-sphinx)
24377 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
24378 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24379 ("python-tox" ,python-tox)
24380 ("python-twine" ,python-twine)
24381 ("which" ,which)))
24382 (home-page "https://github.com/python-cmd2/cmd2")
24383 (synopsis "Tool for building interactive command line applications")
24384 (description
24385 "Cmd2 is a tool for building interactive command line applications in
24386 Python. Its goal is to make it quick and easy for developers to build
24387 feature-rich and user-friendly interactive command line applications. It
24388 provides a simple API which is an extension of Python's built-in @code{cmd}
24389 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
24390 make your life easier and eliminates much of the boilerplate code which would
24391 be necessary when using @code{cmd}.")
24392 (license license:expat)))
24393
24394 (define-public python-pytidylib
24395 (package
24396 (name "python-pytidylib")
24397 (version "0.3.2")
24398 (source (origin
24399 (method url-fetch)
24400 (uri (pypi-uri "pytidylib" version))
24401 (sha256
24402 (base32
24403 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
24404 (build-system python-build-system)
24405 (arguments
24406 '(#:phases
24407 (modify-phases %standard-phases
24408 (add-before 'build 'qualify-libtidy
24409 (lambda* (#:key inputs #:allow-other-keys)
24410 (let ((libtidy (string-append (assoc-ref inputs "tidy")
24411 "/lib/libtidy.so")))
24412 (substitute* "tidylib/tidy.py"
24413 (("ctypes\\.util\\.find_library\\('tidy'\\)")
24414 (format #f "'~a'" libtidy)))
24415 #t))))))
24416 (inputs `(("tidy" ,tidy)))
24417 (home-page "https://github.com/countergram/pytidylib")
24418 (synopsis "Python wrapper for HTML Tidy library")
24419 (description
24420 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
24421 allows you, from Python code, to “fix” invalid (X)HTML markup.")
24422 (license license:expat)))
24423
24424 (define-public python2-pytidylib
24425 (package-with-python2 python-pytidylib))
24426
24427 (define-public python-mujson
24428 (package
24429 (name "python-mujson")
24430 (version "1.4")
24431 (source
24432 (origin
24433 (method url-fetch)
24434 (uri (pypi-uri "mujson" version))
24435 (sha256
24436 (base32
24437 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
24438 (build-system python-build-system)
24439 (home-page "https://github.com/mattgiles/mujson")
24440 (synopsis "Use the fastest JSON functions available at import time")
24441 (description "This package selects the fastest JSON functions available
24442 at import time.")
24443 (license license:expat)))
24444
24445 (define-public python-bashlex
24446 (package
24447 (name "python-bashlex")
24448 (version "0.14")
24449 (source
24450 (origin
24451 (method url-fetch)
24452 (uri (pypi-uri "bashlex" version))
24453 (sha256
24454 (base32
24455 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
24456 (build-system python-build-system)
24457 (arguments
24458 `(#:phases
24459 (modify-phases %standard-phases
24460 (add-before 'build 'pregenerate-yacc-tables
24461 (lambda _
24462 ;; parser.py caches tables, which attempts to write to site lib
24463 ;; see https://github.com/idank/bashlex/issues/51
24464 (invoke "python" "-c" "import bashlex"))))))
24465 (home-page
24466 "https://github.com/idank/bashlex")
24467 (synopsis "Python parser for bash")
24468 (description "@code{bashlex} is a Python port of the parser used
24469 internally by GNU bash.
24470
24471 For the most part it's transliterated from C, the major differences are:
24472
24473 @itemize
24474 @item it does not execute anything
24475 @item it is reentrant
24476 @item it generates a complete AST
24477 @end itemize
24478 ")
24479 (license license:gpl3+)))
24480
24481 (define-public python-jinxed
24482 (package
24483 (name "python-jinxed")
24484 (version "1.0.0")
24485 (source
24486 (origin
24487 (method url-fetch)
24488 (uri (pypi-uri "jinxed" version))
24489 (sha256
24490 (base32
24491 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
24492 (build-system python-build-system)
24493 (arguments
24494 '(#:phases
24495 (modify-phases %standard-phases
24496 (add-before 'check 'set-environment-variables
24497 (lambda* (#:key inputs #:allow-other-keys)
24498 (let ((ncurses (assoc-ref inputs "ncurses")))
24499 (setenv "TERM" "LINUX")
24500 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
24501 #t))))
24502 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
24503 (native-inputs
24504 `(("ncurses" ,ncurses)))
24505 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
24506 (synopsis "Jinxed Terminal Library")
24507 (description
24508 "Jinxed is an implementation of a subset of the Python curses library.")
24509 (license license:mpl2.0)))
24510
24511 (define-public python-blessed
24512 (package
24513 (name "python-blessed")
24514 (version "1.17.8")
24515 (source
24516 (origin
24517 (method url-fetch)
24518 (uri (pypi-uri "blessed" version))
24519 (sha256
24520 (base32
24521 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
24522 (modules '((guix build utils)))
24523 (snippet
24524 '(begin
24525 ;; Don't get hung up on Windows test failures.
24526 (delete-file "blessed/win_terminal.py") #t))))
24527 (build-system python-build-system)
24528 (propagated-inputs
24529 `(("python-jinxed" ,python-jinxed)
24530 ("python-six" ,python-six)
24531 ("python-wcwidth" ,python-wcwidth)))
24532 (native-inputs
24533 `(("python-mock" ,python-mock)
24534 ("python-pytest" ,python-pytest)))
24535 (home-page "https://github.com/jquast/blessed")
24536 (synopsis "Wrapper around terminal capabilities")
24537 (description
24538 "Blessed is a thin, practical wrapper around terminal styling, screen
24539 positioning, and keyboard input.")
24540 (license license:expat)))
24541
24542 (define-public python-readme-renderer
24543 (package
24544 (name "python-readme-renderer")
24545 (version "26.0")
24546 (source
24547 (origin
24548 (method url-fetch)
24549 (uri (pypi-uri "readme_renderer" version))
24550 (sha256
24551 (base32
24552 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
24553 (build-system python-build-system)
24554 (propagated-inputs
24555 `(("python-bleach" ,python-bleach)
24556 ("python-docutils" ,python-docutils)
24557 ("python-pygments" ,python-pygments)
24558 ("python-six" ,python-six)))
24559 (native-inputs
24560 `(("python-mock" ,python-mock)
24561 ("python-pytest" ,python-pytest)))
24562 (home-page "https://github.com/pypa/readme_renderer")
24563 (synopsis "Render README files in Warehouse")
24564 (description
24565 "Readme Renderer is a library that will safely render arbitrary README
24566 files into HTML. It is designed to be used in Warehouse to render the
24567 @code{long_description} for packages. It can handle Markdown, reStructuredText,
24568 and plain text.")
24569 (license license:asl2.0)))
24570
24571 (define-public python-lazr-delegates
24572 (package
24573 (name "python-lazr-delegates")
24574 (version "2.0.4")
24575 (source
24576 (origin
24577 (method url-fetch)
24578 (uri (pypi-uri "lazr.delegates" version))
24579 (sha256
24580 (base32
24581 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
24582 (build-system python-build-system)
24583 (arguments
24584 '(#:phases
24585 (modify-phases %standard-phases
24586 (replace 'check
24587 (lambda _
24588 (invoke "python" "setup.py" "nosetests"))))))
24589 (native-inputs
24590 `(("python-nose" ,python-nose)))
24591 (propagated-inputs
24592 `(("python-zope-interface" ,python-zope-interface)))
24593 (home-page "https://launchpad.net/lazr.delegates")
24594 (synopsis "Easily write objects that delegate behavior")
24595 (description
24596 "The @code{lazr.delegates} package makes it easy to write objects that
24597 delegate behavior to another object. The new object adds some property or
24598 behavior on to the other object, while still providing the underlying interface,
24599 and delegating behavior.")
24600 (license license:lgpl3)))
24601
24602 (define-public python-lazr-config
24603 (package
24604 (name "python-lazr-config")
24605 (version "2.2.2")
24606 (source
24607 (origin
24608 (method url-fetch)
24609 (uri (pypi-uri "lazr.config" version))
24610 (sha256
24611 (base32
24612 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
24613 (build-system python-build-system)
24614 (arguments
24615 '(#:phases
24616 (modify-phases %standard-phases
24617 (replace 'check
24618 (lambda _
24619 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
24620 (native-inputs
24621 `(("python-nose" ,python-nose)))
24622 (propagated-inputs
24623 `(("python-lazr-delegates" ,python-lazr-delegates)
24624 ("python-zope-interface" ,python-zope-interface)))
24625 (home-page "https://launchpad.net/lazr.config")
24626 (synopsis "Create configuration schemas and process and validate configurations")
24627 (description
24628 "The LAZR config system is typically used to manage process configuration.
24629 Process configuration is for saying how things change when we run systems on
24630 different machines, or under different circumstances. This system uses ini-like
24631 file format of section, keys, and values. The config file supports inheritance
24632 to minimize duplication of information across files. The format supports schema
24633 validation.")
24634 (license license:lgpl3)))
24635
24636 (define-public python-flufl-bounce
24637 (package
24638 (name "python-flufl-bounce")
24639 (version "3.0.1")
24640 (source
24641 (origin
24642 (method url-fetch)
24643 (uri (pypi-uri "flufl.bounce" version))
24644 (sha256
24645 (base32
24646 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
24647 (build-system python-build-system)
24648 (propagated-inputs
24649 `(("python-atpublic" ,python-atpublic)
24650 ("python-zope-interface" ,python-zope-interface)))
24651 (native-inputs
24652 `(("python-nose2" ,python-nose2)))
24653 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
24654 (synopsis "Email bounce detectors")
24655 (description "The @code{flufl.bounce} library provides a set of heuristics
24656 and an API for detecting the original bouncing email addresses from a bounce
24657 message. Many formats found in the wild are supported, as are VERP and
24658 RFC 3464.")
24659 (license (list license:asl2.0
24660 license:lgpl3)))) ; only for setup_headers.py
24661
24662 (define-public python-flufl-i18n
24663 (package
24664 (name "python-flufl-i18n")
24665 (version "3.0")
24666 (source
24667 (origin
24668 (method url-fetch)
24669 (uri (pypi-uri "flufl.i18n" version))
24670 (sha256
24671 (base32
24672 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
24673 (build-system python-build-system)
24674 (propagated-inputs
24675 `(("python-atpublic" ,python-atpublic)))
24676 (home-page "https://flufli18n.readthedocs.io")
24677 (synopsis "API for Python internationalization")
24678 (description
24679 "This package provides a high-level, convenient API for managing
24680 internationalization/translation contexts in Python applications. There is a
24681 simple API for single-context applications, such as command line scripts which
24682 only need to translate into one language during the entire course of their
24683 execution. There is a more flexible, but still convenient API for multi-context
24684 applications, such as servers, which may need to switch language contexts for
24685 different tasks.")
24686 (license license:asl2.0)))
24687
24688 (define-public python-flufl-lock
24689 (package
24690 (name "python-flufl-lock")
24691 (version "4.0")
24692 (source
24693 (origin
24694 (method url-fetch)
24695 (uri (pypi-uri "flufl.lock" version))
24696 (sha256
24697 (base32
24698 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
24699 (build-system python-build-system)
24700 (propagated-inputs
24701 `(("python-atpublic" ,python-atpublic)
24702 ("python-psutil" ,python-psutil)))
24703 (home-page "https://flufllock.readthedocs.io")
24704 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
24705 (description
24706 "The @dfn{flufl.lock} package provides NFS-safe file locking with
24707 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
24708 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
24709 and have a maximum lifetime built-in.")
24710 (license (list license:asl2.0
24711 license:lgpl3)))) ; only for setup_helpers.py
24712
24713 (define-public python-flufl-testing
24714 (package
24715 (name "python-flufl-testing")
24716 (version "0.8")
24717 (source
24718 (origin
24719 (method url-fetch)
24720 (uri (pypi-uri "flufl.testing" version))
24721 (sha256
24722 (base32
24723 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
24724 (build-system python-build-system)
24725 (native-inputs
24726 `(("python-nose2" ,python-nose2)))
24727 (home-page "https://gitlab.com/warsaw/flufl.testing")
24728 (synopsis "Collection of test tool plugins")
24729 (description
24730 "This package contains a small collection of test tool plugins for
24731 @code{nose2} and @code{flake8}.")
24732 (license license:asl2.0)))
24733
24734 (define-public python-devtools
24735 (package
24736 (name "python-devtools")
24737 (version "0.6")
24738 (source
24739 (origin
24740 (method git-fetch)
24741 (uri (git-reference
24742 (url "https://github.com/samuelcolvin/python-devtools")
24743 (commit (string-append "v" version))))
24744 (file-name (git-file-name name version))
24745 (sha256
24746 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
24747 (build-system python-build-system)
24748 (native-inputs
24749 `(("python-pytest" ,python-pytest)
24750 ("python-pytest-mock" ,python-pytest-mock)))
24751 (propagated-inputs
24752 `(("python-pygments" ,python-pygments)))
24753 (arguments
24754 `(#:phases (modify-phases %standard-phases
24755 (replace 'check
24756 (lambda _
24757 (invoke "pytest")
24758 #t)))))
24759 (home-page "https://github.com/samuelcolvin/python-devtools")
24760 (synopsis "Debug command and development tools")
24761 (description
24762 "This package provides a debug print command and other development tools.
24763 It adds a simple and readable way to print stuff during development.")
24764 (license license:expat)))
24765
24766 (define-public python-dateparser
24767 (package
24768 (name "python-dateparser")
24769 (version "0.7.6")
24770 (source
24771 (origin
24772 (method url-fetch)
24773 (uri (pypi-uri "dateparser" version))
24774 (sha256
24775 (base32
24776 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
24777 (build-system python-build-system)
24778 (propagated-inputs
24779 `(("python-dateutil" ,python-dateutil)
24780 ("python-pytz" ,python-pytz)
24781 ("python-regex" ,python-regex)
24782 ("python-ruamel.yaml" ,python-ruamel.yaml)
24783 ("python-tzlocal" ,python-tzlocal)))
24784 (native-inputs
24785 `(("python-mock" ,python-mock)
24786 ("python-parameterized" ,python-parameterized)
24787 ("tzdata" ,tzdata-for-tests)))
24788 (arguments
24789 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
24790 #:tests? #f
24791 #:phases
24792 (modify-phases %standard-phases
24793 (add-before 'check 'set-check-environment
24794 (lambda* (#:key inputs #:allow-other-keys)
24795 (setenv "TZ" "UTC")
24796 (setenv "TZDIR"
24797 (string-append (assoc-ref inputs "tzdata")
24798 "/share/zoneinfo"))
24799 #t)))))
24800 (home-page "https://github.com/scrapinghub/dateparser")
24801 (synopsis
24802 "Date parsing library designed to parse dates from HTML pages")
24803 (description
24804 "@code{python-dateparser} provides modules to easily parse localized
24805 dates in almost any string formats commonly found on web pages.")
24806 (license license:bsd-3)))
24807
24808 (define-public python-dparse
24809 (package
24810 (name "python-dparse")
24811 (version "0.5.1")
24812 (source
24813 (origin
24814 (method url-fetch)
24815 (uri (pypi-uri "dparse" version))
24816 (sha256
24817 (base32
24818 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
24819 (build-system python-build-system)
24820 (native-inputs
24821 `(("python-pytest" ,python-pytest)))
24822 (propagated-inputs
24823 `(("python-packaging" ,python-packaging)
24824 ("python-pyyaml" ,python-pyyaml)
24825 ("python-toml" ,python-toml)))
24826 (home-page "https://github.com/pyupio/dparse")
24827 (synopsis "Parser for Python dependency files")
24828 (description "This package provides a parser for Python dependency files.")
24829 (license license:expat)))
24830
24831 (define-public python-dpath
24832 (package
24833 (name "python-dpath")
24834 (version "2.0.1")
24835 (source
24836 (origin
24837 (method url-fetch)
24838 (uri (pypi-uri "dpath" version))
24839 (sha256
24840 (base32
24841 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
24842 (build-system python-build-system)
24843 (native-inputs
24844 `(("python-hypothesis" ,python-hypothesis)
24845 ("python-mock" ,python-mock)
24846 ("python-nose" ,python-nose)))
24847 (arguments
24848 '(#:phases
24849 (modify-phases %standard-phases
24850 (replace 'check
24851 (lambda* (#:key inputs outputs #:allow-other-keys)
24852 (add-installed-pythonpath inputs outputs)
24853 ;; This invokation is taken from tox.ini.
24854 (invoke "nosetests" "-d" "-v" "tests/"))))))
24855 (home-page "https://github.com/akesterson/dpath-python")
24856 (synopsis "File-system-like pathing and searching for dictionaries")
24857 (description
24858 "@code{python-dpath} is a library for accessing and searching
24859 dictionaries via /slashed/paths ala xpath.
24860
24861 Basically it lets you glob over a dictionary as if it were a file system. It
24862 allows you to specify globs (ala the bash eglob syntax, through some advanced
24863 fnmatch.fnmatch magic) to access dictionary elements, and provides some
24864 facility for filtering those results.")
24865 (license license:expat)))
24866
24867 (define-public python-safety
24868 (package
24869 (name "python-safety")
24870 (version "1.9.0")
24871 (source
24872 (origin
24873 (method url-fetch)
24874 (uri (pypi-uri "safety" version))
24875 (sha256
24876 (base32
24877 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
24878 (build-system python-build-system)
24879 (arguments
24880 `(#:phases
24881 (modify-phases %standard-phases
24882 (add-after 'unpack 'disable-tests
24883 (lambda _
24884 (substitute* "tests/test_safety.py"
24885 ;; requires network
24886 (("def test_check_live") "def _test_check_live"))
24887 #t)))))
24888 (propagated-inputs
24889 `(("python-click" ,python-click)
24890 ("python-dparse" ,python-dparse)
24891 ("python-packaging" ,python-packaging)
24892 ("python-requests" ,python-requests)))
24893 (home-page "https://github.com/pyupio/safety")
24894 (synopsis "Check installed dependencies for known vulnerabilities")
24895 (description "Safety checks installed dependencies for known vulnerabilities.
24896 By default it uses the open Python vulnerability database Safety DB.")
24897 (license license:expat)))
24898
24899 (define-public python-pypandoc
24900 (package
24901 (name "python-pypandoc")
24902 (version "1.5")
24903 (source
24904 (origin
24905 (method url-fetch)
24906 (uri (pypi-uri "pypandoc" version))
24907 (sha256
24908 (base32
24909 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
24910 (build-system python-build-system)
24911 (inputs
24912 `(("pandoc" ,pandoc)
24913 ("pandoc-citeproc" ,pandoc-citeproc)))
24914 (propagated-inputs
24915 `(("wheel" ,python-wheel)))
24916 (native-inputs
24917 `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
24918 texlive-fonts-ec
24919 texlive-latex-hyperref
24920 texlive-latex-oberdiek
24921 texlive-lm
24922 texlive-xcolor)))))
24923 (arguments
24924 `(#:phases
24925 (modify-phases %standard-phases
24926 (add-before 'check 'disable-tests
24927 (lambda _
24928 ;; Disable test requiring network access
24929 (substitute* "tests.py"
24930 (("test_basic_conversion_from_http_url")
24931 "skip_test_basic_conversion_from_http_url"))
24932 ;; Needed by texlive-union to generate fonts
24933 (setenv "HOME" "/tmp")
24934 #t)))))
24935 (home-page "https://github.com/bebraw/pypandoc")
24936 (synopsis "Python wrapper for pandoc")
24937 (description "pypandoc is a thin Python wrapper around pandoc
24938 and pandoc-citeproc.")
24939 (license license:expat)))
24940
24941 (define-public python-rnc2rng
24942 (package
24943 (name "python-rnc2rng")
24944 (version "2.6.4")
24945 (source
24946 (origin
24947 (method url-fetch)
24948 (uri (pypi-uri "rnc2rng" version))
24949 (sha256
24950 (base32
24951 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
24952 (build-system python-build-system)
24953 (propagated-inputs
24954 `(("python-rply" ,python-rply)))
24955 (arguments
24956 `(#:phases (modify-phases %standard-phases
24957 (replace 'check
24958 (lambda _
24959 (invoke "python" "test.py"))))))
24960 (home-page "https://github.com/djc/rnc2rng")
24961 (synopsis "Convert RELAX NG Compact to regular syntax")
24962 (description
24963 "This package provides the @command{rnc2rng} command-line tool as well as
24964 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
24965 equivalent schemata in the XML-based default RELAX NG syntax.")
24966 (license license:expat)))
24967
24968 (define-public python-telethon
24969 (package
24970 (name "python-telethon")
24971 (version "1.17.5")
24972 (source
24973 (origin
24974 (method git-fetch)
24975 (uri (git-reference
24976 (url "https://github.com/LonamiWebs/Telethon")
24977 (commit (string-append "v" version))))
24978 (file-name (git-file-name name version))
24979 (sha256
24980 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
24981 (build-system python-build-system)
24982 (arguments
24983 '(#:phases
24984 (modify-phases %standard-phases
24985 (replace 'check
24986 (lambda* (#:key tests? #:allow-other-keys)
24987 (when tests?
24988 (invoke "py.test" "-v"))
24989 #t)))))
24990 (propagated-inputs
24991 `(("python-rsa" ,python-rsa)
24992 ("python-pyaes" ,python-pyaes)))
24993 (native-inputs
24994 `(("python-pytest" ,python-pytest)
24995 ("python-pytest-asyncio" ,python-pytest-asyncio)
24996 ("python-pytest-trio" ,python-pytest-trio)))
24997 (home-page "https://docs.telethon.dev")
24998 (synopsis "Full-featured Telegram client library for Python 3")
24999 (description "This library is designed to make it easy to write Python
25000 programs that can interact with Telegram.")
25001 (license license:expat)))
25002
25003 (define-public python-citeproc-py
25004 (package
25005 (name "python-citeproc-py")
25006 (version "0.5.1")
25007 (source
25008 (origin
25009 (method url-fetch)
25010 (uri (pypi-uri "citeproc-py" version))
25011 (sha256
25012 (base32
25013 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
25014 (build-system python-build-system)
25015 (propagated-inputs
25016 `(("python-lxml" ,python-lxml)
25017 ("python-rnc2rng" ,python-rnc2rng)))
25018 (home-page
25019 "https://github.com/brechtm/citeproc-py")
25020 (synopsis "Citations and bibliography formatter")
25021 (description
25022 "Citeproc-py is a CSL processor for Python. It aims to implement the
25023 CSL 1.0.1 specification. citeproc-py can output styled citations and
25024 bibliographies in a number of different output formats. Currently supported
25025 are plain text, reStructuredText and HTML.")
25026 (license license:bsd-2)))
25027
25028 (define-public python-inform
25029 (package
25030 (name "python-inform")
25031 (version "1.23.0")
25032 (source
25033 (origin
25034 (method url-fetch)
25035 (uri (pypi-uri "inform" version))
25036 (sha256
25037 (base32
25038 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
25039 (build-system python-build-system)
25040 (arguments
25041 `(#:tests? #f)) ; PyPI tarball lacks tests
25042 (native-inputs
25043 `(("python-hypothesis" ,python-hypothesis)
25044 ("python-pytest-cov" ,python-pytest-cov)
25045 ("python-pytest-runner" ,python-pytest-runner)))
25046 (propagated-inputs
25047 `(("python-arrow" ,python-arrow)
25048 ("python-six" ,python-six)))
25049 (home-page "https://inform.readthedocs.io")
25050 (synopsis "Print & logging utilities for communicating with user")
25051 (description
25052 "Inform is designed to display messages from programs that are typically run from
25053 a console. It provides a collection of ‘print’ functions that allow you to simply and
25054 cleanly print different types of messages.")
25055 (license license:gpl3+)))
25056
25057 (define-public python-nestedtext
25058 (package
25059 (name "python-nestedtext")
25060 (version "1.0.0")
25061 (source
25062 (origin
25063 (method url-fetch)
25064 (uri (pypi-uri "nestedtext" version))
25065 (sha256
25066 (base32
25067 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
25068 (build-system python-build-system)
25069 (arguments
25070 `(#:tests? #f)) ; PyPI tarball lacks tests
25071 (propagated-inputs
25072 `(("python-inform" ,python-inform)))
25073 (home-page "https://nestedtext.org")
25074 (synopsis "Human readable and writable data interchange format")
25075 (description
25076 "NestedText is a file format for holding data that is to be entered, edited, or
25077 viewed by people. It allows data to be organized into a nested collection of
25078 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
25079 without the complexity and risk of YAML and without the syntactic clutter of JSON.
25080 NestedText is both simple and natural. Only a small number of concepts and rules must
25081 be kept in mind when creating it. It is easily created, modified, or viewed with
25082 a text editor and easily understood and used by both programmers and non-programmers.")
25083 (license license:expat))) ; MIT license
25084
25085 (define-public python-nest-asyncio
25086 (package
25087 (name "python-nest-asyncio")
25088 (version "1.5.1")
25089 (source
25090 (origin
25091 (method url-fetch)
25092 (uri (pypi-uri "nest_asyncio" version))
25093 (sha256
25094 (base32
25095 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
25096 (build-system python-build-system)
25097 (home-page "https://github.com/erdewit/nest_asyncio")
25098 (synopsis "Patch asyncio to allow nested event loops")
25099 (description
25100 "By design @code{asyncio} does not allow its event loop to be nested.
25101 This presents a practical problem: when in an environment where the event loop
25102 is already running it's impossible to run tasks and wait for the result. This
25103 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
25104 @code{loop.run_until_complete}.")
25105 (license license:bsd-3)))
25106
25107 (define-public python-simpervisor
25108 (package
25109 (name "python-simpervisor")
25110 (version "0.4")
25111 (source
25112 (origin
25113 ;; Tests not included in release.
25114 (method git-fetch)
25115 (uri (git-reference
25116 (url "https://github.com/yuvipanda/simpervisor")
25117 (commit (string-append "v" version))))
25118 (file-name (git-file-name name version))
25119 (sha256
25120 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
25121 (build-system python-build-system)
25122 (arguments
25123 `(#:tests? #f ; Test suite can't find aiohttp.
25124 #:phases
25125 (modify-phases %standard-phases
25126 (replace 'check
25127 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25128 (when tests?
25129 (add-installed-pythonpath inputs outputs)
25130 (invoke "pytest" "--maxfail" "3" "--verbose"))
25131 #t)))))
25132 (native-inputs
25133 `(("python-aiohttp" ,python-aiohttp)
25134 ("python-pytest" ,python-pytest)
25135 ("python-pytest-asyncio" ,python-pytest-asyncio)))
25136 (home-page "https://github.com/yuvipanda/simpervisor")
25137 (synopsis "Simple async process supervisor")
25138 (description
25139 "This package provides a simple async process supervisor in Python.")
25140 (license license:bsd-3)))
25141
25142 (define-public python-parallel
25143 (package
25144 (name "python-parallel")
25145 (version "1.6.4.4")
25146 (source
25147 (origin
25148 (method url-fetch)
25149 (uri (string-append
25150 "https://www.parallelpython.com/downloads/pp/pp-"
25151 version ".zip"))
25152 (sha256
25153 (base32
25154 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
25155 (native-inputs
25156 `(("unzip" ,unzip)))
25157 (build-system python-build-system)
25158 (arguments '(#:tests? #f)) ; No test suite.
25159 (home-page "https://www.parallelpython.com")
25160 (synopsis "Parallel and distributed programming for Python")
25161 (description "Parallel Python module (PP) provides an easy and efficient
25162 way to create parallel-enabled applications for SMP computers and clusters.
25163 PP module features cross-platform portability and dynamic load balancing.
25164 Thus applications written with PP will parallelize efficiently even on
25165 heterogeneous and multi-platform clusters (including clusters running other
25166 applications with variable CPU loads).")
25167 (license license:bsd-3)))
25168
25169 (define-public python2-parallel
25170 (package-with-python2 python-parallel))
25171
25172 (define-public python-djvulibre
25173 (package
25174 (name "python-djvulibre")
25175 (version "0.8.6")
25176 (source
25177 (origin
25178 (method url-fetch)
25179 (uri (pypi-uri "python-djvulibre" version))
25180 (sha256
25181 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
25182 (build-system python-build-system)
25183 (native-inputs
25184 `(("ghostscript" ,ghostscript)
25185 ("pkg-config" ,pkg-config)
25186 ("python-nose" ,python-nose)))
25187 (inputs
25188 `(("djvulibre" ,djvulibre)
25189 ("python-cython" ,python-cython)))
25190 (arguments
25191 `(#:phases
25192 (modify-phases %standard-phases
25193 (add-after 'unpack 'fix-tests
25194 (lambda _
25195 ;; Unit tests try to load the 'dllpath.py' and fail, because it
25196 ;; doesn't make sense on GNU/Linux.
25197 (delete-file "djvu/dllpath.py")
25198 #t)))))
25199 (synopsis "Python bindings for DjVuLibre")
25200 (description "This is a set of Python bindings for the DjVuLibre library.")
25201 (home-page "https://jwilk.net/software/python-djvulibre")
25202 (license license:gpl2)))
25203
25204 (define-public python2-djvulibre
25205 (package-with-python2 python-djvulibre))
25206
25207 (define-public python-versioneer
25208 (package
25209 (name "python-versioneer")
25210 (version "0.19")
25211 (source
25212 (origin
25213 (method url-fetch)
25214 (uri (pypi-uri "versioneer" version))
25215 (sha256
25216 (base32
25217 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
25218 (build-system python-build-system)
25219 (home-page
25220 "https://github.com/python-versioneer/python-versioneer")
25221 (synopsis
25222 "Version-string management for VCS-controlled trees")
25223 (description
25224 "@code{versioneer} is a tool for managing a recorded version number in
25225 distutils-based python projects. The goal is to remove the tedious and
25226 error-prone \"update the embedded version string\" step from your release
25227 process.")
25228 (license license:public-domain)))
25229
25230 (define-public python2-gamera
25231 (package
25232 (name "python2-gamera")
25233 (version "3.4.4")
25234 (source
25235 (origin
25236 (method url-fetch)
25237 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
25238 "gamera-" version ".tar.gz"))
25239 (sha256
25240 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
25241 (modules '((guix build utils)))
25242 (snippet
25243 '(begin
25244 ;; Remove bundled libraries.
25245 (for-each delete-file-recursively
25246 '("src/libpng-1.2.5"
25247 "src/libtiff"
25248 "src/zlib-1.2.8"))))))
25249 (build-system python-build-system)
25250 (inputs
25251 `(("libpng" ,libpng)
25252 ("libtiff" ,libtiff)
25253 ("python2-wxpython" ,python2-wxpython)
25254 ("zlib" ,zlib)))
25255 (arguments
25256 `(#:python ,python-2))
25257 (synopsis "Framework for building document analysis applications")
25258 (description
25259 "Gamera is a toolkit for building document image recognition systems.")
25260 (home-page "https://gamera.informatik.hsnr.de/")
25261 (license license:gpl2+)))
25262
25263 (define-public python-contextvars
25264 (package
25265 (name "python-contextvars")
25266 (version "2.4")
25267 (source
25268 (origin
25269 (method url-fetch)
25270 (uri (pypi-uri "contextvars" version))
25271 (sha256
25272 (base32
25273 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
25274 (build-system python-build-system)
25275 (propagated-inputs
25276 `(("python-immutables" ,python-immutables)))
25277 (home-page
25278 "https://github.com/MagicStack/contextvars")
25279 (synopsis "PEP 567 Backport")
25280 (description "This package implements a backport of Python 3.7
25281 @code{contextvars} module (see PEP 567) for Python 3.6.")
25282 (license license:asl2.0)))
25283
25284 (define-public python-aiofiles
25285 (package
25286 (name "python-aiofiles")
25287 (version "0.6.0")
25288 (source
25289 (origin
25290 (method url-fetch)
25291 (uri (pypi-uri "aiofiles" version))
25292 (sha256
25293 (base32
25294 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
25295 (build-system python-build-system)
25296 (home-page "https://github.com/Tinche/aiofiles")
25297 (synopsis "File support for @code{asyncio}")
25298 (description "@code{python-aiofiles} is a library for handling local
25299 disk files in asyncio applications.")
25300 (license license:asl2.0)))
25301
25302 (define-public python-pyre-extensions
25303 (package
25304 (name "python-pyre-extensions")
25305 (version "0.0.18")
25306 (source
25307 (origin
25308 (method url-fetch)
25309 (uri (pypi-uri "pyre-extensions" version))
25310 (sha256
25311 (base32
25312 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
25313 (build-system python-build-system)
25314 (propagated-inputs
25315 `(("python-typing-extensions"
25316 ,python-typing-extensions)
25317 ("python-typing-inspect" ,python-typing-inspect)))
25318 (home-page "https://pyre-check.org")
25319 (synopsis
25320 "Type system extensions for use with @code{python-pyre}")
25321 (description
25322 "@code{python-pyre-extensions} defines extensions to the standard
25323 @code{typing} module that are supported by the Pyre typechecker.")
25324 (license license:expat)))
25325
25326 (define-public python-dataclasses
25327 (package
25328 (name "python-dataclasses")
25329 (version "0.8")
25330 (source
25331 (origin
25332 (method url-fetch)
25333 (uri (pypi-uri "dataclasses" version))
25334 (sha256
25335 (base32
25336 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
25337 (build-system python-build-system)
25338 (home-page
25339 "https://github.com/ericvsmith/dataclasses")
25340 (synopsis
25341 "Backport of the @code{dataclasses} module for Python 3.6")
25342 (description
25343 "This is an implementation of PEP 557, Data Classes. It is a
25344 backport of the @code{dataclasses} module for Python 3.6.")
25345 (license license:asl2.0)))
25346
25347 (define-public python-pywatchman
25348 (package
25349 (name "python-pywatchman")
25350 (version "1.4.1")
25351 (source
25352 (origin
25353 (method url-fetch)
25354 (uri (pypi-uri "pywatchman" version))
25355 (sha256
25356 (base32
25357 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
25358 (build-system python-build-system)
25359 (arguments
25360 `(#:tests? #f)) ;there are none
25361 (home-page
25362 "https://facebook.github.io/watchman/")
25363 (synopsis "Watchman client for python")
25364 (description "@code{python-pywatchman} is a library to connect and
25365 query Watchman to discover file changes.")
25366 (license license:bsd-3)))
25367
25368 (define-public python-helpdev
25369 (package
25370 (name "python-helpdev")
25371 (version "0.7.1")
25372 (source
25373 (origin
25374 (method url-fetch)
25375 (uri (pypi-uri "helpdev" version))
25376 (sha256
25377 (base32
25378 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
25379 (build-system python-build-system)
25380 (arguments
25381 `(#:phases
25382 (modify-phases %standard-phases
25383 (replace 'check
25384 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25385 (when tests?
25386 (add-installed-pythonpath inputs outputs)
25387 (invoke "pytest" "tests"))
25388 #t)))))
25389 (propagated-inputs
25390 `(("python-importlib-metadata" ,python-importlib-metadata)))
25391 (native-inputs
25392 `(("python-pytest" ,python-pytest)))
25393 (home-page "https://gitlab.com/dpizetta/helpdev")
25394 (synopsis
25395 "Extract information about the Python environment easily")
25396 (description
25397 "Helpdev is a library to easily extract information about the Python
25398 environment.")
25399 (license license:expat)))
25400
25401 (define-public python-logutils
25402 (package
25403 (name "python-logutils")
25404 (version "0.3.5")
25405 (source
25406 (origin
25407 (method url-fetch)
25408 (uri (pypi-uri "logutils" version))
25409 (sha256
25410 (base32
25411 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
25412 (build-system python-build-system)
25413 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
25414 (synopsis "Logging utilities")
25415 (description "This package provides a set of handlers for the Python
25416 standard library logging package. Some of these handlers are out-of-scope
25417 for the standard library, and so they are packaged here. Others are updated
25418 versions which have appeared in recent Python releases, but are usable with
25419 older versions of Python and so are packaged here.")
25420 (license license:bsd-3)))
25421
25422 (define-public python-helper
25423 (package
25424 (name "python-helper")
25425 (version "2.5.0")
25426 (source (origin
25427 (method url-fetch)
25428 (uri (pypi-uri "helper" version))
25429 (sha256
25430 (base32
25431 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
25432 (build-system python-build-system)
25433 (native-inputs
25434 `(("python-mock" ,python-mock)))
25435 (propagated-inputs
25436 `(("python-logutils" ,python-logutils)
25437 ("python-pyyaml" ,python-pyyaml)))
25438 (home-page "https://github.com/gmr/helper")
25439 (synopsis "Library for writing configurable applications and daemons")
25440 (description
25441 "This package provides procedures for quickly writing configurable
25442 applications and daemons.")
25443 (license license:bsd-3)))
25444
25445 (define-public python-qtsass
25446 (package
25447 (name "python-qtsass")
25448 (version "0.3.0")
25449 (source
25450 (origin
25451 ;; There are no tests in the PyPI tarball.
25452 (method git-fetch)
25453 (uri (git-reference
25454 (url "https://github.com/spyder-ide/qtsass/")
25455 (commit (string-append "v" version))))
25456 (file-name (git-file-name name version))
25457 (sha256
25458 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
25459 (build-system python-build-system)
25460 (arguments
25461 `(#:test-target "pytest"
25462 #:phases
25463 (modify-phases %standard-phases
25464 ;; Tests need to read and write files.
25465 (add-before 'check 'make-git-checkout-writable
25466 (lambda _
25467 (for-each make-file-writable (find-files "."))
25468 #t)))))
25469 (native-inputs
25470 `(("python-pytest" ,python-pytest)
25471 ("python-pytest-cov" ,python-pytest-cov)
25472 ("python-pytest-runner" ,python-pytest-runner)))
25473 (propagated-inputs
25474 `(("python-libsass" ,python-libsass)))
25475 (home-page "https://github.com/spyder-ide/qtsass")
25476 (synopsis "Compile SCSS files to valid Qt stylesheets")
25477 (description
25478 "Besides being used in web development, CSS is also the way to stylize
25479 Qt-based desktop applications. However, Qt's CSS has a few variations that
25480 prevent the direct use of SASS compiler.
25481
25482 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
25483 handling those variations.")
25484 (license license:expat)))
25485
25486 (define-public python-qdarkstyle
25487 (package
25488 (name "python-qdarkstyle")
25489 (version "2.8.1")
25490 (source
25491 (origin
25492 (method url-fetch)
25493 (uri (pypi-uri "QDarkStyle" version))
25494 (sha256
25495 (base32
25496 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
25497 (build-system python-build-system)
25498 (arguments
25499 `(;; Fails unable to detect valid Qt bindings even when
25500 ;; added as native-inputs.
25501 #:tests? #f))
25502 (propagated-inputs
25503 `(("python-helpdev" ,python-helpdev)
25504 ("python-qtpy" ,python-qtpy)))
25505 (home-page
25506 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
25507 (synopsis
25508 "Complete dark stylesheet for Python and Qt applications")
25509 (description "QDarkStyle is the most complete dark stylesheet for Python and
25510 Qt applications.")
25511 (license license:expat)))
25512
25513 (define-public python-bitstring
25514 (package
25515 (name "python-bitstring")
25516 (version "3.1.7")
25517 (source
25518 (origin
25519 (method url-fetch)
25520 (uri (pypi-uri "bitstring" version))
25521 (sha256
25522 (base32
25523 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
25524 (build-system python-build-system)
25525 (arguments
25526 `(#:phases
25527 (modify-phases %standard-phases
25528 (replace 'check
25529 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25530 (when tests?
25531 (add-installed-pythonpath inputs outputs)
25532 (with-directory-excursion "test"
25533 (invoke "pytest")))
25534 #t)))))
25535 (native-inputs
25536 `(("python-pytest" ,python-pytest)))
25537 (home-page "https://github.com/scott-griffiths/bitstring")
25538 (synopsis
25539 "Simple construction, analysis and modification of binary data")
25540 (description
25541 "Bitstring is a library for simple construction, analysis and modification
25542 of binary data.")
25543 (license license:expat)))
25544
25545 (define-public python-confuse
25546 (package
25547 (name "python-confuse")
25548 (version "1.4.0")
25549 (source
25550 (origin
25551 (method url-fetch)
25552 (uri (pypi-uri "confuse" version))
25553 (sha256
25554 (base32
25555 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
25556 (build-system python-build-system)
25557 (propagated-inputs
25558 `(("python-pathlib" ,python-pathlib)
25559 ("python-pyyaml" ,python-pyyaml)))
25560 (home-page "https://github.com/beetbox/confuse")
25561 (synopsis "Painless YAML configuration.")
25562 (description "Confuse is a configuration library for Python that uses
25563 YAML. It takes care of defaults, overrides, type checking, command-line
25564 integration, human-readable errors, and standard OS-specific locations.")
25565 (license license:expat)))
25566
25567 (define-public python-reflink
25568 (package
25569 (name "python-reflink")
25570 (version "0.2.1")
25571 (source
25572 (origin
25573 (method url-fetch)
25574 (uri (pypi-uri "reflink" version))
25575 (sha256
25576 (base32
25577 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
25578 (build-system python-build-system)
25579 (arguments
25580 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
25581 (propagated-inputs
25582 `(("python-cffi" ,python-cffi)))
25583 (native-inputs
25584 `(("python-pytest" ,python-pytest)
25585 ("python-pytest-runner" ,python-pytest-runner)))
25586 (home-page "https://gitlab.com/rubdos/pyreflink")
25587 (synopsis "Python wrapper around reflink system call")
25588 (description
25589 "Python reflink wraps around platform specific @code{reflink}
25590 implementations.")
25591 (license license:expat)))
25592
25593 (define-public python-pivy
25594 (package
25595 (name "python-pivy")
25596 (version "0.6.5")
25597 (source
25598 (origin
25599 (method git-fetch)
25600 (uri (git-reference
25601 (url "https://github.com/coin3d/pivy")
25602 (commit version)))
25603 (file-name (git-file-name name version))
25604 (sha256
25605 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
25606 (build-system python-build-system)
25607 (arguments
25608 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
25609 #:tests? #f
25610 #:phases
25611 (modify-phases %standard-phases
25612 (add-after 'unpack 'patch-cmake-include-dirs
25613 (lambda _
25614 ;; Patch buildsystem to respect Coin3D include directory
25615 (substitute* "CMakeLists.txt"
25616 (("\\$\\{SoQt_INCLUDE_DIRS}")
25617 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
25618 #t)))))
25619 (native-inputs
25620 `(("cmake" ,cmake)
25621 ("swig" ,swig)))
25622 (inputs
25623 `(("python-wrapper" ,python-wrapper)
25624 ("qtbase" ,qtbase-5)
25625 ("libxi" ,libxi)
25626 ("libice" ,libice)
25627 ("soqt" ,soqt)
25628 ("glew" ,glew)
25629 ("coin3D" ,coin3D-4)))
25630 (home-page "https://github.com/coin3d/pivy")
25631 (synopsis "Python bindings to Coin3D")
25632 (description
25633 "Pivy provides python bindings for Coin, a 3D graphics library with an
25634 Application Programming Interface based on the Open Inventor 2.1 API.")
25635 (license license:isc)))
25636
25637 (define-public python-crayons
25638 (package
25639 (name "python-crayons")
25640 (version "0.4.0")
25641 (source
25642 (origin
25643 (method url-fetch)
25644 (uri (pypi-uri "crayons" version))
25645 (sha256
25646 (base32
25647 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
25648 (build-system python-build-system)
25649 (propagated-inputs
25650 `(("python-colorama" ,python-colorama)))
25651 (home-page "https://github.com/MasterOdin/crayons")
25652 (synopsis "TextUI colors for Python")
25653 (description "This package gives you colored strings for the terminal.
25654 Crayons automatically wraps a given string in the foreground color and
25655 restores the original state after the string is printed.")
25656 (license license:expat)))
25657
25658 (define-public python-sane
25659 (package
25660 (name "python-sane")
25661 (version "2.9.1")
25662 (source
25663 (origin
25664 (method url-fetch)
25665 (uri (pypi-uri name version))
25666 (sha256
25667 (base32
25668 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
25669 (build-system python-build-system)
25670 (native-inputs
25671 `(("python-pytest" ,python-pytest)))
25672 (inputs
25673 `(("sane-backends" ,sane-backends)))
25674 (home-page "https://github.com/python-pillow/Sane")
25675 (synopsis "Python interface to the SANE scanner")
25676 (description "This package provides Python interface to the SANE scanner
25677 and frame grabber interface.")
25678 (license (license:non-copyleft
25679 ;; Yet another variant of the X/MIT license.
25680 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
25681
25682 (define-public python-screenkey
25683 (package
25684 (name "python-screenkey")
25685 (version "1.4")
25686 (source
25687 (origin
25688 (method git-fetch)
25689 (uri (git-reference
25690 (url "https://gitlab.com/screenkey/screenkey")
25691 (commit (string-append "v" version))))
25692 (file-name (git-file-name name version))
25693 (sha256
25694 (base32
25695 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
25696 (build-system python-build-system)
25697 (arguments
25698 `(#:phases
25699 (modify-phases %standard-phases
25700 (add-after 'unpack 'fix-dlopen-paths
25701 (lambda* (#:key inputs outputs #:allow-other-keys)
25702 (let* ((x11 (assoc-ref inputs "libx11"))
25703 (xtst (assoc-ref inputs "libxtst")))
25704 (substitute* "Screenkey/xlib.py"
25705 (("libX11.so.6")
25706 (string-append x11 "/lib/libX11.so.6")))
25707 (substitute* "Screenkey/xlib.py"
25708 (("libXtst.so.6")
25709 (string-append xtst "/lib/libXtst.so.6")))
25710 #t)))
25711 (add-after 'install 'wrap-screenkey
25712 (lambda* (#:key outputs #:allow-other-keys)
25713 (wrap-program
25714 (string-append (assoc-ref outputs "out") "/bin/screenkey")
25715 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
25716 `("GI_TYPELIB_PATH"
25717 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
25718 #t)))))
25719 (inputs
25720 `(("python-distutils-extra" ,python-distutils-extra)
25721 ("python-tokenize-rt" ,python-tokenize-rt)
25722 ("libx11" ,libx11)
25723 ("libxtst" ,libxtst)
25724 ("gtk+" ,gtk+)
25725 ("python-pygobject" ,python-pygobject)
25726 ("python-pycairo" ,python-pycairo)
25727 ("python-setuptools-git" ,python-setuptools-git)
25728 ("python-babel" ,python-babel)))
25729 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
25730 (synopsis
25731 "Screencast tool to display pressed keys")
25732 (description
25733 "A screencast tool to display your keys inspired by Screenflick.")
25734 (license license:gpl3+)))
25735
25736 (define-public python-jinja2-cli
25737 (package
25738 (name "python-jinja2-cli")
25739 (version "0.7.0")
25740 (source
25741 (origin
25742 (method url-fetch)
25743 (uri (pypi-uri "jinja2-cli" version))
25744 (sha256
25745 (base32
25746 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
25747 (build-system python-build-system)
25748 (propagated-inputs
25749 `(("python-jinja2" ,python-jinja2)))
25750 (native-inputs
25751 `(("python-flake8" ,python-flake8)
25752 ("python-jinja2" ,python-jinja2)
25753 ("python-pytest" ,python-pytest)))
25754 (home-page "https://github.com/mattrobenolt/jinja2-cli")
25755 (synopsis "Command-line interface to Jinja2")
25756 (description
25757 "This package provides a command-line interface (CLI) to the Jinja2
25758 template engine.")
25759 (license license:bsd-3)))
25760
25761 (define-public python-readability
25762 (package
25763 (name "python-readability")
25764 (version "0.3.1")
25765 (source
25766 (origin
25767 (method url-fetch)
25768 (uri (pypi-uri "readability" version))
25769 (sha256
25770 (base32
25771 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
25772 (build-system python-build-system)
25773 (home-page
25774 "https://github.com/andreasvc/readability/")
25775 (synopsis
25776 "Measure the readability of a given text using surface
25777 characteristics")
25778 (description
25779 "This package provides a Python library that is an implementation of
25780 traditional readability measures based on simple surface
25781 characteristics. These measures are basically linear regressions based on the
25782 number of words, syllables, and sentences.")
25783 (license license:asl2.0)))
25784
25785 (define-public python-listparser
25786 (package
25787 (name "python-listparser")
25788 (version "0.18")
25789 (source
25790 (origin
25791 (method url-fetch)
25792 (uri (pypi-uri "listparser" version))
25793 (sha256
25794 (base32
25795 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
25796 (build-system python-build-system)
25797 (home-page
25798 "https://github.com/kurtmckee/listparser")
25799 (synopsis
25800 "Parse subscription lists in Python")
25801 (description
25802 "This package provides a Python library that can parse OPML, FOAF, and
25803 iGoogle subscription lists.")
25804 (license license:expat)))
25805
25806 (define-public python-smartypants
25807 (package
25808 (name "python-smartypants")
25809 (version "2.0.1")
25810 (source
25811 (origin
25812 ;; There's no source tarball for 2.0.1 on PyPI.
25813 (method git-fetch)
25814 (uri (git-reference
25815 (url "https://github.com/leohemsted/smartypants.py")
25816 (commit (string-append "v" version))))
25817 (file-name (git-file-name name version))
25818 (sha256
25819 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
25820 (build-system python-build-system)
25821 (arguments
25822 '(#:phases
25823 (modify-phases %standard-phases
25824 (replace 'check
25825 ;; Its `setup.py test` doesn't report failure with exit status, so
25826 ;; we use `nose` instead.
25827 (lambda _
25828 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
25829 (native-inputs
25830 ;; For tests.
25831 `(("python-docutils" ,python-docutils)
25832 ("python-nose" ,python-nose)
25833 ("python-pygments" ,python-pygments)))
25834 (home-page "https://github.com/leohemsted/smartypants.py")
25835 (synopsis "Translate punctuation characters into smart quotes")
25836 (description
25837 "@command{smartpants} can perform the following transformations:
25838 @enumerate
25839 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
25840 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
25841 entities
25842 @item Dashes (-- and ---) into en- and em-dash entities
25843 @item Three consecutive dots (... or . . .) into an ellipsis entity
25844 @end enumerate")
25845 (license license:bsd-3)))
25846
25847 (define-public python-typogrify
25848 (package
25849 (name "python-typogrify")
25850 (version "2.0.7")
25851 (source (origin
25852 (method url-fetch)
25853 (uri (pypi-uri "typogrify" version))
25854 (sha256
25855 (base32
25856 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
25857 (build-system python-build-system)
25858 (arguments
25859 '(#:phases
25860 (modify-phases %standard-phases
25861 (replace 'check
25862 (lambda _
25863 (invoke "nosetests" "-v"))))))
25864 (propagated-inputs
25865 `(("python-smartypants" ,python-smartypants)))
25866 (native-inputs
25867 ;; For tests.
25868 `(("python-nose" ,python-nose)))
25869 (home-page "https://github.com/mintchaos/typogrify")
25870 (synopsis "Filters to transform text into typographically-improved HTML")
25871 (description
25872 "@code{typogrify} provides a set of custom filters that automatically
25873 apply various transformations to plain text in order to yield
25874 typographically-improved HTML. While often used in conjunction with Jinja and
25875 Django template systems, the filters can be used in any environment.")
25876 (license license:bsd-3)))
25877
25878 (define-public python-ld
25879 (package
25880 (name "python-ld")
25881 (version "0.5.0")
25882 (source
25883 (origin
25884 (method url-fetch)
25885 (uri (pypi-uri "ld" version))
25886 (sha256
25887 (base32
25888 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
25889 (build-system python-build-system)
25890 (propagated-inputs
25891 `(("python-six" ,python-six)))
25892 (home-page "https://github.com/nir0s/ld")
25893 (synopsis "OS platform information API")
25894 (description
25895 "The ld package provides information about the GNU/Linux distribution it
25896 runs on, such as a reliable machine-readable ID, or version information.")
25897 (license license:asl2.0)))
25898
25899 (define-public python-quicktions
25900 (package
25901 (name "python-quicktions")
25902 (version "1.11")
25903 (source
25904 (origin
25905 (method url-fetch)
25906 (uri (pypi-uri "quicktions" version))
25907 (sha256
25908 (base32
25909 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
25910 (modules '((guix build utils)))
25911 (snippet
25912 '(begin
25913 ;; This file is generated by Cython.
25914 (delete-file "src/quicktions.c") #t))))
25915 (build-system python-build-system)
25916 (arguments
25917 `(#:phases
25918 (modify-phases %standard-phases
25919 (add-before 'build 'cythonize-sources
25920 (lambda _
25921 (with-directory-excursion "src"
25922 (invoke "cython" "quicktions.pyx"))))
25923 (replace 'check
25924 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25925 (when tests?
25926 (add-installed-pythonpath inputs outputs)
25927 (invoke "pytest"))
25928 #t)))))
25929 (native-inputs
25930 `(("python-cython" ,python-cython)
25931 ("python-pytest" ,python-pytest)))
25932 (home-page "https://github.com/scoder/quicktions")
25933 (synopsis "Fast fractions data type for rational numbers")
25934 (description
25935 "This package provides fast fractions data type for rational numbers. It
25936 is the cythonized version of @code{fractions.Fraction}.")
25937 (license license:psfl)))
25938
25939 (define-public python-pathvalidate
25940 (package
25941 (name "python-pathvalidate")
25942 (version "2.4.1")
25943 (source
25944 (origin
25945 (method url-fetch)
25946 (uri (pypi-uri "pathvalidate" version))
25947 (sha256
25948 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
25949 (build-system python-build-system)
25950 (arguments
25951 '(#:tests? #f))
25952 ;; Tests disabled because of circular dependencies.
25953 ;; pathvalidate tests depend on pytest-md-report, which
25954 ;; depends on pathvalidate.
25955 (native-inputs
25956 `(("python-allpairspy" ,python-allpairspy)
25957 ("python-click" ,python-click)
25958 ("python-faker" ,python-faker)
25959 ("python-pytest" ,python-pytest)))
25960 (home-page "https://github.com/thombashi/pathvalidate")
25961 (synopsis "Sanitize strings representing paths")
25962 (description
25963 "@code{pathvalidate} is a Python library to sanitize/validate strings
25964 representing paths or filenames.")
25965 (license license:expat)))