gnu: Move search path JUPYTER_PATH.
[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 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 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 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 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 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 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.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 ;;;
103 ;;; This file is part of GNU Guix.
104 ;;;
105 ;;; GNU Guix is free software; you can redistribute it and/or modify it
106 ;;; under the terms of the GNU General Public License as published by
107 ;;; the Free Software Foundation; either version 3 of the License, or (at
108 ;;; your option) any later version.
109 ;;;
110 ;;; GNU Guix is distributed in the hope that it will be useful, but
111 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
112 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
113 ;;; GNU General Public License for more details.
114 ;;;
115 ;;; You should have received a copy of the GNU General Public License
116 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
117
118 (define-module (gnu packages python-xyz)
119 #:use-module ((guix licenses) #:prefix license:)
120 #:use-module (gnu packages)
121 #:use-module (gnu packages algebra)
122 #:use-module (gnu packages adns)
123 #:use-module (gnu packages aidc)
124 #:use-module (gnu packages attr)
125 #:use-module (gnu packages backup)
126 #:use-module (gnu packages bash)
127 #:use-module (gnu packages check)
128 #:use-module (gnu packages cmake)
129 #:use-module (gnu packages compression)
130 #:use-module (gnu packages crypto)
131 #:use-module (gnu packages databases)
132 #:use-module (gnu packages dbm)
133 #:use-module (gnu packages djvu)
134 #:use-module (gnu packages docker)
135 #:use-module (gnu packages enchant)
136 #:use-module (gnu packages file)
137 #:use-module (gnu packages fontutils)
138 #:use-module (gnu packages gcc)
139 #:use-module (gnu packages geo)
140 #:use-module (gnu packages ghostscript)
141 #:use-module (gnu packages gl)
142 #:use-module (gnu packages glib)
143 #:use-module (gnu packages gnome)
144 #:use-module (gnu packages gnupg)
145 #:use-module (gnu packages graphviz)
146 #:use-module (gnu packages graphics)
147 #:use-module (gnu packages gsasl)
148 #:use-module (gnu packages gstreamer)
149 #:use-module (gnu packages gtk)
150 #:use-module (gnu packages haskell-xyz)
151 #:use-module (gnu packages icu4c)
152 #:use-module (gnu packages image)
153 #:use-module (gnu packages imagemagick)
154 #:use-module (gnu packages jupyter)
155 #:use-module (gnu packages kerberos)
156 #:use-module (gnu packages libevent)
157 #:use-module (gnu packages libffi)
158 #:use-module (gnu packages libidn)
159 #:use-module (gnu packages linux)
160 #:use-module (gnu packages llvm)
161 #:use-module (gnu packages man)
162 #:use-module (gnu packages markup)
163 #:use-module (gnu packages maths)
164 #:use-module (gnu packages monitoring)
165 #:use-module (gnu packages multiprecision)
166 #:use-module (gnu packages networking)
167 #:use-module (gnu packages ncurses)
168 #:use-module (gnu packages openstack)
169 #:use-module (gnu packages pcre)
170 #:use-module (gnu packages pdf)
171 #:use-module (gnu packages perl)
172 #:use-module (gnu packages photo)
173 #:use-module (gnu packages pkg-config)
174 #:use-module (gnu packages python)
175 #:use-module (gnu packages python-build)
176 #:use-module (gnu packages python-check)
177 #:use-module (gnu packages python-compression)
178 #:use-module (gnu packages python-crypto)
179 #:use-module (gnu packages python-science)
180 #:use-module (gnu packages python-web)
181 #:use-module (gnu packages qt)
182 #:use-module (gnu packages rdf)
183 #:use-module (gnu packages readline)
184 #:use-module (gnu packages sdl)
185 #:use-module (gnu packages search)
186 #:use-module (gnu packages scanner)
187 #:use-module (gnu packages shells)
188 #:use-module (gnu packages sphinx)
189 #:use-module (gnu packages ssh)
190 #:use-module (gnu packages swig)
191 #:use-module (gnu packages terminals)
192 #:use-module (gnu packages tex)
193 #:use-module (gnu packages texinfo)
194 #:use-module (gnu packages textutils)
195 #:use-module (gnu packages time)
196 #:use-module (gnu packages tls)
197 #:use-module (gnu packages version-control)
198 #:use-module (gnu packages video)
199 #:use-module (gnu packages web)
200 #:use-module (gnu packages wxwidgets)
201 #:use-module (gnu packages base)
202 #:use-module (gnu packages xml)
203 #:use-module (gnu packages xorg)
204 #:use-module (gnu packages xdisorg)
205 #:use-module (gnu packages tcl)
206 #:use-module (gnu packages bdw-gc)
207 #:use-module (gnu packages serialization)
208 #:use-module (guix packages)
209 #:use-module (guix download)
210 #:use-module (guix git-download)
211 #:use-module (guix hg-download)
212 #:use-module (guix utils)
213 #:use-module (guix build-system gnu)
214 #:use-module (guix build-system cmake)
215 #:use-module (guix build-system python)
216 #:use-module (guix build-system trivial)
217 #:use-module (srfi srfi-1)
218 #:use-module (srfi srfi-26))
219
220 (define-public python-slixmpp
221 (package
222 (name "python-slixmpp")
223 (version "1.5.2")
224 (source
225 (origin
226 (method git-fetch)
227 (uri
228 (git-reference
229 (url "https://lab.louiz.org/poezio/slixmpp.git")
230 (commit
231 (string-append "slix-" version))))
232 (file-name
233 (git-file-name name version))
234 (sha256
235 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
236 (build-system python-build-system)
237 (arguments
238 `(#:phases
239 (modify-phases %standard-phases
240 (add-after 'unpack 'patch
241 (lambda _
242 (substitute* "setup.py"
243 (("'CC', 'cc'")
244 "'CC', 'gcc'"))
245 #t)))))
246 (native-inputs
247 `(("cython" ,python-cython)
248 ("gnupg" ,gnupg)
249 ("pkg-config" ,pkg-config)))
250 (propagated-inputs
251 `(("python-aiodns" ,python-aiodns)
252 ("python-aiohttp" ,python-aiohttp)
253 ("python-pyasn1" ,python-pyasn1)
254 ("python-pyasn1-modules" ,python-pyasn1-modules)))
255 (inputs
256 `(("libidn" ,libidn)
257 ("python" ,python))) ; We are building a Python extension.
258 (synopsis "XMPP library without threads")
259 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
260 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
261 socket handling, the timers, the events dispatching) in order to remove all
262 threads.")
263 (home-page "https://lab.louiz.org/poezio/slixmpp")
264 (license license:expat)))
265
266 (define-public python-tenacity
267 (package
268 (name "python-tenacity")
269 (version "6.1.0")
270 (source (origin
271 (method url-fetch)
272 (uri (pypi-uri "tenacity" version))
273 (sha256
274 (base32
275 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
276 (build-system python-build-system)
277 (native-inputs
278 `(("python-setuptools-scm" ,python-setuptools-scm)
279 ("python-sphinx" ,python-sphinx)
280 ("python-tornado" ,python-tornado)
281 ("python-pytest" ,python-pytest)))
282 (propagated-inputs
283 `(("python-six" ,python-six)))
284 (arguments
285 `(#:phases (modify-phases %standard-phases
286 (replace 'check
287 (lambda _
288 (invoke "pytest")
289 #t)))))
290 (home-page "https://github.com/jd/tenacity")
291 (synopsis "Retrying library for python")
292 (description "Tenacity is a general-purpose python library to simplify the
293 task of adding retry behavior to just about anything.")
294 (license license:asl2.0)))
295
296 (define-public python-pytelegrambotapi
297 (package
298 (name "python-pytelegrambotapi")
299 (version "3.7.4")
300 (source
301 (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/eternnoir/pyTelegramBotAPI")
305 (commit version)))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
309 (build-system python-build-system)
310 (arguments
311 `(#:phases
312 (modify-phases %standard-phases
313 (replace 'check
314 (lambda* (#:key tests? #:allow-other-keys)
315 (when tests?
316 (with-directory-excursion "tests"
317 (invoke "py.test")))
318 #t)))))
319 (propagated-inputs
320 `(("python-requests" ,python-requests)))
321 (native-inputs
322 `(("python-pytest" ,python-pytest)))
323 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
324 (synopsis "Python Telegram bot api")
325 (description "This package provides a simple, but extensible Python
326 implementation for the Telegram Bot API.")
327 (license license:gpl2)))
328
329 (define-public python-colorlog
330 (package
331 (name "python-colorlog")
332 (version "4.1.0")
333 (source (origin
334 (method url-fetch)
335 (uri (pypi-uri "colorlog" version))
336 (sha256
337 (base32
338 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
339 (build-system python-build-system)
340 (native-inputs
341 `(("python-pytest" ,python-pytest)))
342 (arguments
343 `(#:phases (modify-phases %standard-phases
344 (replace 'check
345 (lambda _
346 ;; Extend PYTHONPATH so the built package will be found.
347 (setenv "PYTHONPATH"
348 (string-append (getcwd) "/build/lib:"
349 (getenv "PYTHONPATH")))
350 (invoke "pytest" "-p" "no:logging")
351 #t)))))
352 (home-page "https://github.com/borntyping/python-colorlog")
353 (synopsis "Log formatting with colors for python")
354 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
355 with Python's logging module that outputs records using terminal colors.")
356 (license license:expat)))
357
358 (define-public python-pyprind
359 (package
360 (name "python-pyprind")
361 (version "2.11.2")
362 (source (origin
363 (method url-fetch)
364 (uri (pypi-uri "PyPrind" version))
365 (sha256
366 (base32
367 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
368 (build-system python-build-system)
369 (propagated-inputs
370 `(("python-psutil" ,python-psutil)))
371 (home-page "https://github.com/rasbt/pyprind")
372 (synopsis "Python Progress Bar and Percent Indicator Utility")
373 (description "The PyPrind (Python Progress Indicator) module provides a
374 progress bar and a percentage indicator object that let you track the progress
375 of a loop structure or other iterative computation.")
376 (license license:bsd-3)))
377
378 (define-public python-gphoto2
379 (package
380 (name "python-gphoto2")
381 (version "2.2.1")
382 (source (origin
383 (method url-fetch)
384 (uri (pypi-uri "gphoto2" version))
385 (sha256
386 (base32
387 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
388 (build-system python-build-system)
389 (native-inputs
390 `(("pkg-config" ,pkg-config)))
391 (inputs
392 `(("libgphoto2" ,libgphoto2)))
393 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
394 (synopsis "Python interface to libgphoto2")
395 (description "@code{python-gphoto2} is a comprehensive Python interface
396 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
397 automatically generate the interface code.")
398 (license license:gpl3+)))
399
400 (define-public python-colour
401 (package
402 (name "python-colour")
403 (version "0.1.5")
404 (source (origin
405 (method url-fetch)
406 (uri (pypi-uri "colour" version))
407 (sha256
408 (base32
409 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
410 (build-system python-build-system)
411 (native-inputs
412 `(("python-d2to1" ,python-d2to1)))
413 (home-page "https://github.com/vaab/colour")
414 (synopsis "Convert and manipulate various color representations")
415 (description "Pythonic way to manipulate color representations (HSL, RVB,
416 web, X11, ...).")
417 (license license:expat)))
418
419 (define-public python-d2to1
420 (package
421 (name "python-d2to1")
422 (version "0.2.12.post1")
423 (source (origin
424 (method url-fetch)
425 (uri (pypi-uri "d2to1" version))
426 (sha256
427 (base32
428 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
429 (build-system python-build-system)
430 (native-inputs
431 `(("python-nose" ,python-nose)))
432 (home-page "https://github.com/embray/d2to1")
433 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
434 in python")
435 (description "The python package d2to1 (the d is for distutils) allows
436 using distutils2-like setup.cfg files for a package's metadata with a
437 distribute/setuptools setup.py script.")
438 (license license:bsd-2)))
439
440 (define-public python-rawkit
441 (package
442 (name "python-rawkit")
443 (version "0.6.0")
444 (source (origin
445 (method url-fetch)
446 (uri (pypi-uri "rawkit" version))
447 (sha256
448 (base32
449 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
450 (build-system python-build-system)
451 (native-inputs
452 `(("python-pytest" ,python-pytest)
453 ("python-mock" ,python-mock)))
454 (inputs
455 `(("libraw" ,libraw)))
456 (home-page "https://rawkit.readthedocs.io")
457 (synopsis "Ctypes-based LibRaw binding for Python")
458 (description "The rawkit package provides two modules: rawkit and libraw.
459 The rawkit module provides a high-level Pythonic interface for developing raw
460 photos, while the libraw module provides a CTypes based interface for
461 interacting with the low-level LibRaw C APIs.")
462 (license license:expat)))
463
464 (define-public python-easygui
465 (package
466 (name "python-easygui")
467 (version "0.98.1")
468 (source (origin
469 (method url-fetch)
470 (uri (pypi-uri "easygui" version))
471 (sha256
472 (base32
473 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
474 (build-system python-build-system)
475 (propagated-inputs
476 `(("python-tkinter" ,python "tk")))
477 (home-page "https://github.com/robertlugg/easygui")
478 (synopsis "GUI programming module for Python")
479 (description "EasyGUI is a module for very simple, very easy GUI
480 programming in Python. EasyGUI is different from other GUI generators in that
481 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
482 simple function calls.")
483 (license license:bsd-3)))
484
485 (define-public python-pymd4c
486 (package
487 (name "python-pymd4c")
488 (version "0.4.6.0b1")
489 (source
490 (origin
491 (method url-fetch)
492 (uri (pypi-uri "pymd4c" version))
493 (sha256
494 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
495 (build-system python-build-system)
496 (inputs
497 `(("md4c" ,md4c)))
498 (native-inputs
499 `(("python-flake8" ,python-flake8)
500 ("python-pkgconfig" ,python-pkgconfig)
501 ("pkg-config" ,pkg-config)))
502 (home-page "https://github.com/dominickpastore/pymd4c")
503 (synopsis "Python bindings for MD4C")
504 (description
505 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
506 to CommonMark.")
507 (license license:expat)))
508
509 (define-public python-pymediainfo
510 (package
511 (name "python-pymediainfo")
512 (version "4.1")
513 (source
514 (origin
515 (method url-fetch)
516 (uri (pypi-uri "pymediainfo" version))
517 (sha256
518 (base32
519 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
520 (build-system python-build-system)
521 (native-inputs
522 `(("python-setuptools-scm" ,python-setuptools-scm)
523 ("python-pytest" ,python-pytest)))
524 (inputs
525 `(("libmediainfo" ,libmediainfo)))
526 (arguments
527 `(#:phases
528 (modify-phases %standard-phases
529 (add-after 'unpack 'patch-libmediainfo
530 (lambda _
531 (substitute* "pymediainfo/__init__.py"
532 (("libmediainfo.so.0")
533 (string-append (assoc-ref %build-inputs "libmediainfo")
534 "/lib/libmediainfo.so.0")))
535 #t))
536 (replace 'check
537 (lambda _
538 ;; Extend PYTHONPATH so the built package will be found.
539 (setenv "PYTHONPATH"
540 (string-append (getcwd) "/build/lib:"
541 (getenv "PYTHONPATH")))
542 ;; Skip the only failing test "test_parse_url"
543 (invoke "pytest" "-vv" "-k" "not test_parse_url")
544 #t)))))
545 (home-page
546 "https://github.com/sbraz/pymediainfo")
547 (synopsis
548 "Python wrapper for the mediainfo library")
549 (description
550 "Python wrapper for the mediainfo library to access the technical and tag
551 data for video and audio files.")
552 (license license:expat)))
553
554 (define-public python-psutil
555 (package
556 (name "python-psutil")
557 (version "5.8.0")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "psutil" version))
562 (sha256
563 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
564 (build-system python-build-system)
565 (arguments
566 ;; FIXME: some tests do not return and time out. Some tests fail because
567 ;; some processes survive kill().
568 '(#:tests? #f))
569 (home-page "https://github.com/giampaolo/psutil")
570 (synopsis "Library for retrieving information on running processes")
571 (description
572 "@code{psutil} (Python system and process utilities) is a library for
573 retrieving information on running processes and system utilization (CPU,
574 memory, disks, network) in Python. It is useful mainly for system monitoring,
575 profiling and limiting process resources and management of running processes.
576 It implements many functionalities offered by command line tools such as: ps,
577 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
578 iotop, uptime, pidof, tty, taskset, pmap.")
579 (properties `((python2-variant . ,(delay python2-psutil))))
580 (license license:bsd-3)))
581
582 (define-public python2-psutil
583 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
584 (package/inherit base
585 (propagated-inputs
586 `(("python2-enum34" ,python2-enum34) ;optional
587 ,@(package-propagated-inputs base))))))
588
589 (define-public python-shapely
590 (package
591 (name "python-shapely")
592 (version "1.7.1")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (pypi-uri "Shapely" version))
597 (sha256
598 (base32
599 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
600 (modules '((guix build utils)))
601 (snippet
602 '(begin
603 (delete-file "shapely/speedups/_speedups.c")
604 (delete-file "shapely/vectorized/_vectorized.c")
605 #t))))
606 (build-system python-build-system)
607 (native-inputs
608 `(("python-cython" ,python-cython)
609 ("python-matplotlib" ,python-matplotlib)
610 ("python-pytest" ,python-pytest)
611 ("python-pytest-cov" ,python-pytest-cov)))
612 (inputs
613 `(("geos" ,geos)))
614 (propagated-inputs
615 `(("python-numpy" ,python-numpy)))
616 (arguments
617 `(#:phases
618 (modify-phases %standard-phases
619 (add-after 'unpack 'patch-geos-path
620 (lambda* (#:key inputs #:allow-other-keys)
621 (let ((geos (assoc-ref inputs "geos"))
622 (glibc (assoc-ref inputs ,(if (%current-target-system)
623 "cross-libc" "libc"))))
624 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
625 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
626 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
627 geos "/lib/libgeos_c.so'])"))
628 (("free = load_dll\\('c'\\)\\.free")
629 (string-append "free = load_dll('c', fallbacks=['"
630 glibc "/lib/libc.so.6']).free"))
631 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
632 (string-append "free = load_dll('c', fallbacks=['"
633 glibc "/lib/libc.so.6']).free"))))
634 #t)))))
635 (home-page "https://github.com/Toblerity/Shapely")
636 (synopsis "Library for the manipulation and analysis of geometric objects")
637 (description "Shapely is a Python package for manipulation and analysis of
638 planar geometric objects. It is based on the @code{GEOS} library.")
639 (license license:bsd-3)))
640
641 (define-public python-shortuuid
642 (package
643 (name "python-shortuuid")
644 (version "0.5.0")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "shortuuid" version))
649 (sha256
650 (base32
651 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
652 (build-system python-build-system)
653 (native-inputs
654 `(("python-pep8" ,python-pep8)))
655 (home-page "https://github.com/skorokithakis/shortuuid")
656 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
657 (description
658 "@code{shortuuid} is a Python library for generating concise, unambiguous
659 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
660 module and then similar looking characters are removed.")
661 (license license:bsd-3)))
662
663 (define-public python-logwrap
664 (package
665 (name "python-logwrap")
666 (version "8.2.0.post0")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "logwrap" version))
671 (sha256
672 (base32
673 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
674 (build-system python-build-system)
675 (arguments
676 `(#:tests? #f ; Tests not included in pypi release.
677 #:phases
678 (modify-phases %standard-phases
679 (replace 'check
680 (lambda* (#:key tests? #:allow-other-keys)
681 (when tests?
682 (invoke "pytest"))
683 #t)))))
684 (native-inputs
685 `(("python-cython" ,python-cython)
686 ("python-pytest" ,python-pytest)
687 ("python-setuptools-scm" ,python-setuptools-scm)
688 ("python-toml" ,python-toml)
689 ("python-wheel" ,python-wheel)))
690 (home-page "https://github.com/python-useful-helpers/logwrap")
691 (synopsis "Decorator for logging function arguments")
692 (description "This package provides a decorator to log function arguments
693 and function call return values in a human-readable way.")
694 (license license:asl2.0)))
695
696 (define-public python2-shapely
697 (package-with-python2 python-shapely))
698
699 (define-public python-clyent
700 (package
701 (name "python-clyent")
702 (version "1.2.1")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "clyent" version))
707 (sha256
708 (base32
709 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
710 (build-system python-build-system)
711 (native-inputs
712 `(("python-mock" ,python-mock)))
713 (home-page "https://github.com/Anaconda-Platform/clyent")
714 (synopsis "Command line client library")
715 (description "Clyent is a Python command line utility library. It is used
716 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
717 (license license:bsd-3)))
718
719 (define-public python2-clyent
720 (package-with-python2 python-clyent))
721
722 (define-public python-babel
723 (package
724 (name "python-babel")
725 (version "2.9.0")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "Babel" version))
730 (sha256
731 (base32
732 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
733 (build-system python-build-system)
734 (native-inputs
735 `(("python-freezegun" ,python-freezegun)
736 ("python-pytest" ,python-pytest)))
737 (propagated-inputs
738 `(("python-pytz" ,python-pytz)))
739 (arguments
740 `(#:phases (modify-phases %standard-phases
741 (replace 'check
742 (lambda _
743 (invoke "pytest" "-vv"))))))
744 (home-page "http://babel.pocoo.org/")
745 (synopsis
746 "Tools for internationalizing Python applications")
747 (description
748 "Babel is composed of two major parts:
749 - tools to build and work with gettext message catalogs
750 - a Python interface to the CLDR (Common Locale Data Repository), providing
751 access to various locale display names, localized number and date formatting,
752 etc. ")
753 (license license:bsd-3)))
754
755 (define-public python2-babel
756 (package-with-python2 python-babel))
757
758 (define-public python2-backport-ssl-match-hostname
759 (package
760 (name "python2-backport-ssl-match-hostname")
761 (version "3.5.0.1")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri "backports.ssl_match_hostname" version))
766 (sha256
767 (base32
768 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
769 (build-system python-build-system)
770 (arguments
771 `(#:python ,python-2
772 #:tests? #f)) ; no test target
773 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
774 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
775 (description
776 "This backport brings the ssl.match_hostname() function to users of
777 earlier versions of Python. The function checks the hostname in the
778 certificate returned by the server to which a connection has been established,
779 and verifies that it matches the intended target hostname.")
780 (license license:psfl)))
781
782 (define-public python-bidict
783 (package
784 (name "python-bidict")
785 (version "0.21.2")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "bidict" version))
790 (sha256
791 (base32
792 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
793 (build-system python-build-system)
794 (native-inputs
795 `(("python-coverage" ,python-coverage)
796 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
797 ("python-pre-commit" ,python-pre-commit)
798 ("python-py" ,python-py)
799 ("python-pytest" ,python-pytest)
800 ("python-pytest-benchmark" ,python-pytest-benchmark)
801 ("python-pytest-cov" ,python-pytest-cov)
802 ("python-setuptools-scm" ,python-setuptools-scm)
803 ("python-sortedcollections" ,python-sortedcollections)
804 ("python-sortedcontainers" ,python-sortedcontainers)
805 ("python-sphinx" ,python-sphinx)
806 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
807 ("python-tox" ,python-tox)))
808 (arguments
809 `(#:phases (modify-phases %standard-phases
810 (add-after 'unpack 'relax-reqs
811 (lambda _
812 (substitute* "setup.py"
813 (("sortedcollections < 2") "sortedcollections"))
814 #t))
815 (replace 'check
816 (lambda _ (invoke "./run_tests.py"))))))
817 (home-page "https://bidict.readthedocs.io")
818 (synopsis "Bidirectional mapping library")
819 (description "The @code{bidict} library provides several data structures
820 for working with bidirectional mappings in Python.")
821 (license license:mpl2.0)))
822
823 (define-public python-bitarray
824 (package
825 (name "python-bitarray")
826 (version "1.4.0")
827 (source (origin
828 (method url-fetch)
829 (uri (pypi-uri "bitarray" version))
830 (sha256
831 (base32
832 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
833 (build-system python-build-system)
834 (home-page "https://github.com/ilanschnell/bitarray")
835 (synopsis "Efficient arrays of booleans")
836 (description "This package provides an object type which efficiently
837 represents an array of booleans. Bitarrays are sequence types and behave very
838 much like usual lists. Eight bits are represented by one byte in a contiguous
839 block of memory. The user can select between two representations:
840 little-endian and big-endian. All of the functionality is implemented in C.
841 Methods for accessing the machine representation are provided. This can be
842 useful when bit level access to binary files is required, such as portable
843 bitmap image files. Also, when dealing with compressed data which uses
844 variable bit length encoding, you may find this module useful.")
845 (license license:psfl)))
846
847 (define-public python-boolean.py
848 (package
849 (name "python-boolean.py")
850 (version "3.6")
851 (source
852 (origin
853 ;; There's no source tarball on PyPI.
854 (method git-fetch)
855 (uri (git-reference
856 (url "https://github.com/bastikr/boolean.py")
857 (commit (string-append "v" version))))
858 (file-name (git-file-name name version))
859 (sha256
860 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
861 (build-system python-build-system)
862 (home-page "https://github.com/bastikr/boolean.py")
863 (synopsis "Boolean algebra in one Python module")
864 (description
865 "This is a small Python library that implements boolean algebra.
866 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
867 @code{Symbol} class that can take on one of these two values. Calculations
868 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
869 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
870 Expressions are constructed from parsed strings or directly in Python.")
871 (license license:bsd-2)))
872
873 (define-public python-hdf4
874 (package
875 (name "python-hdf4")
876 (version "0.9")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri name version))
881 (sha256
882 (base32
883 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
884 (build-system python-build-system)
885 (native-inputs `(("nose" ,python-nose)))
886 (propagated-inputs `(("numpy" ,python-numpy)))
887 (inputs
888 `(("hdf4" ,hdf4)
889 ("libjpeg" ,libjpeg-turbo)
890 ("zlib" ,zlib)))
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (replace 'check
895 (lambda _
896 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
897 ;; on to import numpy. Somehow this works on their CI system.
898 ;; Let's just manage PYTHONPATH here instead.
899 (substitute* "runexamples.sh"
900 (("export PYTHONPATH=.*") ""))
901 (setenv "PYTHONPATH"
902 (string-append (getcwd) ":"
903 (getenv "PYTHONPATH")))
904 (invoke "./runexamples.sh")
905 (invoke "nosetests" "-v"))))))
906 (home-page "https://github.com/fhs/python-hdf4")
907 (synopsis "Python interface to the NCSA HDF4 library")
908 (description
909 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
910 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
911 NetCDF files can also be read and modified. Python-HDF4 is a fork of
912 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
913 (license license:expat)))
914
915 (define-public python2-hdf4
916 (package-with-python2 python-hdf4))
917
918 (define-public python-h5py
919 (package
920 (name "python-h5py")
921 (version "2.10.0")
922 (source
923 (origin
924 (method url-fetch)
925 (uri (pypi-uri "h5py" version))
926 (sha256
927 (base32
928 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
929 (build-system python-build-system)
930 (arguments
931 `(#:tests? #f ; no test target
932 #:phases
933 (modify-phases %standard-phases
934 (add-after 'unpack 'fix-hdf5-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 (let ((prefix (assoc-ref inputs "hdf5")))
937 (substitute* "setup_build.py"
938 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
939 (string-append "['" prefix "/lib" "']"))
940 (("'/opt/local/include', '/usr/local/include'")
941 (string-append "'" prefix "/include" "'")))
942 (substitute* "setup_configure.py"
943 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
944 (string-append "['" prefix "/lib" "']")))
945 #t))))))
946 (propagated-inputs
947 `(("python-six" ,python-six)
948 ("python-numpy" ,python-numpy)))
949 (inputs
950 `(("hdf5" ,hdf5-1.10)))
951 (native-inputs
952 `(("python-cython" ,python-cython)
953 ("python-pkgconfig" ,python-pkgconfig)
954 ("pkg-config" ,pkg-config)))
955 (home-page "https://www.h5py.org/")
956 (synopsis "Read and write HDF5 files from Python")
957 (description
958 "The h5py package provides both a high- and low-level interface to the
959 HDF5 library from Python. The low-level interface is intended to be a
960 complete wrapping of the HDF5 API, while the high-level component supports
961 access to HDF5 files, datasets and groups using established Python and NumPy
962 concepts.")
963 (license license:bsd-3)))
964
965 (define-public python2-h5py
966 (package-with-python2 python-h5py))
967
968 (define-public python-sh
969 (package
970 (name "python-sh")
971 (version "1.12.14")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "sh" version))
976 (sha256
977 (base32
978 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
979 (build-system python-build-system)
980 (arguments
981 '(#:phases
982 (modify-phases %standard-phases
983 (replace 'check
984 (lambda _
985 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
986 (setenv "HOME" "/tmp")
987 (invoke "python" "sh.py" "test"))))))
988 (native-inputs
989 `(("python-coverage" ,python-coverage)))
990 (home-page "https://github.com/amoffat/sh")
991 (synopsis "Python subprocess replacement")
992 (description "This package provides a replacement for Python's
993 @code{subprocess} feature.")
994 (license license:expat)))
995
996 (define-public python-cftime
997 (package
998 (name "python-cftime")
999 (version "1.0.4.2")
1000 (source
1001 (origin
1002 (method url-fetch)
1003 (uri (pypi-uri "cftime" version))
1004 (sha256
1005 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1006 (build-system python-build-system)
1007 (propagated-inputs
1008 `(("python-numpy" ,python-numpy)))
1009 (native-inputs
1010 `(("python-coveralls" ,python-coveralls)
1011 ("python-cython" ,python-cython)
1012 ("python-pytest-cov" ,python-pytest-cov)))
1013 (home-page "https://github.com/Unidata/cftime")
1014 (synopsis "Library for time handling")
1015 (description
1016 "This package provides time-handling functionality that used to be part
1017 of the netcdf4 package before.")
1018 ;; This package claims to include code under the GPLv3 but is released
1019 ;; under ISC.
1020 (license (list license:isc license:gpl3+))))
1021
1022 (define-public python-netcdf4
1023 (package
1024 (name "python-netcdf4")
1025 (version "1.5.3")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (pypi-uri "netCDF4" version))
1030 (sha256
1031 (base32
1032 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1033 (build-system python-build-system)
1034 (arguments
1035 '(#:phases
1036 (modify-phases %standard-phases
1037 (add-after 'unpack 'configure-locations
1038 (lambda* (#:key inputs #:allow-other-keys)
1039 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1040 #t)))))
1041 (native-inputs
1042 `(("python-cython" ,python-cython)))
1043 (propagated-inputs
1044 `(("python-numpy" ,python-numpy)
1045 ("python-cftime" ,python-cftime)))
1046 (inputs
1047 `(("netcdf" ,netcdf)
1048 ("hdf4" ,hdf4)
1049 ("hdf5" ,hdf5)))
1050 (home-page "https://github.com/Unidata/netcdf4-python")
1051 (synopsis "Python/numpy interface to the netCDF library")
1052 (description "Netcdf4-python is a Python interface to the netCDF C
1053 library. netCDF version 4 has many features not found in earlier
1054 versions of the library and is implemented on top of HDF5. This module
1055 can read and write files in both the new netCDF 4 and the old netCDF 3
1056 format, and can create files that are readable by HDF5 clients. The
1057 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1058 to users of that module.")
1059 ;; The software is mainly ISC, but includes some files covered
1060 ;; by the Expat license.
1061 (license (list license:isc license:expat))))
1062
1063 (define-public python-license-expression
1064 (package
1065 (name "python-license-expression")
1066 (version "1.2")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "license-expression" version))
1071 (sha256
1072 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1073 (build-system python-build-system)
1074 (propagated-inputs
1075 `(("python-boolean.py" ,python-boolean.py)))
1076 (home-page "https://github.com/nexB/license-expression")
1077 (synopsis "Apply boolean logic to license expressions")
1078 (description
1079 "This Python module defines a tiny language to evaluate and compare
1080 license expressions using boolean logic. Logical combinations of licenses can
1081 be tested for equality, containment, and equivalence. They can be normalised
1082 and simplified. It supports SPDX license expressions as well as other naming
1083 conventions and aliases in the same expression.")
1084 (license license:gpl2+)))
1085
1086 (define-public python-lockfile
1087 (package
1088 (name "python-lockfile")
1089 (version "0.12.2")
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "lockfile" version))
1094 (sha256
1095 (base32
1096 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1097 (build-system python-build-system)
1098 (arguments '(#:test-target "check"))
1099 (native-inputs
1100 `(("python-pbr" ,python-pbr)))
1101 (home-page "https://launchpad.net/pylockfile")
1102 (synopsis "Platform-independent file locking module")
1103 (description
1104 "The lockfile package exports a LockFile class which provides a simple
1105 API for locking files.")
1106 (license license:expat)))
1107
1108 (define-public python-filelock
1109 (package
1110 (name "python-filelock")
1111 (version "3.0.12")
1112 (source
1113 (origin
1114 (method url-fetch)
1115 (uri (pypi-uri "filelock" version))
1116 (sha256
1117 (base32
1118 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1119 (build-system python-build-system)
1120 (home-page
1121 "https://github.com/benediktschmitt/py-filelock")
1122 (synopsis "Platform independent file lock")
1123 (description "@code{filelock} contains a single module implementing
1124 a platform independent file lock in Python, which provides a simple way of
1125 inter-process communication.")
1126 (license license:unlicense)))
1127
1128 (define-public python-semantic-version
1129 (package
1130 (name "python-semantic-version")
1131 (version "2.8.5")
1132 (source
1133 (origin
1134 (method url-fetch)
1135 (uri (pypi-uri "semantic_version" version))
1136 (sha256
1137 (base32
1138 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1139 (build-system python-build-system)
1140 (home-page "https://github.com/rbarrois/python-semanticversion")
1141 (synopsis "Semantic versioning module for Python")
1142 (description
1143 "The @code{semantic_version} class is a small library for handling
1144 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1145
1146 It can compare versions, generate a new version that represents a bump in one of
1147 the version levels, and check whether any given string is a proper semantic
1148 version identifier.")
1149 (license license:bsd-3)))
1150
1151 (define-public python2-semantic-version
1152 (package-with-python2 python-semantic-version))
1153
1154 (define-public python-serpent
1155 (package
1156 (name "python-serpent")
1157 (version "1.28")
1158 (source
1159 (origin
1160 (method url-fetch)
1161 (uri (pypi-uri "serpent" version))
1162 (sha256
1163 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1164 (build-system python-build-system)
1165 (native-inputs
1166 `(("python-attrs" ,python-attrs)
1167 ("python-pytz" ,python-pytz)))
1168 (home-page "https://github.com/irmen/Serpent")
1169 (synopsis "Serializer for literal Python expressions")
1170 (description
1171 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1172 serialization. It serializes an object tree into bytes (an utf-8 encoded
1173 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1174 to rebuild the original object tree.
1175
1176 Because only safe literals are encoded, it is safe to send serpent data to
1177 other machines, such as over the network.")
1178 (properties `((python2-variant . ,(delay python2-serpent))))
1179 (license license:expat)))
1180
1181 (define-public python2-serpent
1182 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1183 (package/inherit base
1184 (propagated-inputs
1185 `(("python-enum34" ,python2-enum34)
1186 ,@(package-propagated-inputs base))))))
1187
1188 (define-public python-setuptools
1189 (package
1190 (name "python-setuptools")
1191 (version "52.0.0")
1192 (source
1193 (origin
1194 (method url-fetch)
1195 (uri (pypi-uri "setuptools" version))
1196 (sha256
1197 (base32
1198 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1199 (modules '((guix build utils)))
1200 (snippet
1201 '(begin
1202 ;; Remove included binaries which are used to build self-extracting
1203 ;; installers for Windows.
1204 ;; TODO: Find some way to build them ourself so we can include them.
1205 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1206 #t))))
1207 (build-system python-build-system)
1208 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1209 ;; One could bootstrap with an internal untested setuptools.
1210 (arguments
1211 `(#:tests? #f))
1212 (home-page "https://pypi.org/project/setuptools/")
1213 (synopsis
1214 "Library designed to facilitate packaging Python projects")
1215 (description
1216 "Setuptools is a fully-featured, stable library designed to facilitate
1217 packaging Python projects, where packaging includes:
1218 Python package and module definitions,
1219 distribution package metadata,
1220 test hooks,
1221 project installation,
1222 platform-specific details,
1223 Python 3 support.")
1224 ;; TODO: setuptools now bundles the following libraries:
1225 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1226 (license (list license:psfl ; setuptools itself
1227 license:expat ; six, appdirs, pyparsing
1228 license:asl2.0 ; packaging is dual ASL2/BSD-2
1229 license:bsd-2))
1230 (properties `((python2-variant . ,(delay python2-setuptools))))))
1231
1232 ;; Newer versions of setuptools no longer support Python 2.
1233 (define-public python2-setuptools
1234 (package
1235 (name "python2-setuptools")
1236 (version "41.0.1")
1237 (source
1238 (origin
1239 (method url-fetch)
1240 (uri (pypi-uri "setuptools" version ".zip"))
1241 (sha256
1242 (base32
1243 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1244 (modules '((guix build utils)))
1245 (snippet
1246 '(begin
1247 ;; Remove included binaries which are used to build self-extracting
1248 ;; installers for Windows.
1249 ;; TODO: Find some way to build them ourself so we can include them.
1250 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1251 #t))))
1252 (build-system python-build-system)
1253 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1254 ;; One could bootstrap with an internal untested setuptools.
1255 (arguments
1256 `(#:tests? #f))
1257 (native-inputs
1258 `(("unzip" ,unzip)))
1259 (home-page "https://pypi.org/project/setuptools/")
1260 (synopsis
1261 "Library designed to facilitate packaging Python projects")
1262 (description
1263 "Setuptools is a fully-featured, stable library designed to facilitate
1264 packaging Python projects, where packaging includes:
1265 Python package and module definitions,
1266 distribution package metadata,
1267 test hooks,
1268 project installation,
1269 platform-specific details,
1270 Python 3 support.")
1271 ;; TODO: setuptools now bundles the following libraries:
1272 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1273 (license (list license:psfl ; setuptools itself
1274 license:expat ; six, appdirs, pyparsing
1275 license:asl2.0 ; packaging is dual ASL2/BSD-2
1276 license:bsd-2))))
1277
1278 (define-public python-setuptools-declarative-requirements
1279 (package
1280 (name "python-setuptools-declarative-requirements")
1281 (version "1.2.0")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (pypi-uri
1286 "setuptools-declarative-requirements"
1287 version))
1288 (sha256
1289 (base32
1290 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1291 (build-system python-build-system)
1292 (native-inputs
1293 `(("python-pytest" ,python-pytest)
1294 ("python-setuptools-scm" ,python-setuptools-scm)))
1295 (propagated-inputs
1296 `(("python-toml" ,python-toml)
1297 ("python-wheel" ,python-wheel)))
1298 (home-page
1299 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1300 (synopsis "File support for setuptools declarative setup.cfg")
1301 (description
1302 "This package provides file support for setuptools declarative
1303 @code{setup.cfg}.")
1304 (license license:asl2.0)))
1305
1306 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1307 (define-public python-setuptools-for-tensorflow
1308 (hidden-package
1309 (package
1310 (inherit python-setuptools)
1311 (version "39.1.0")
1312 (source (origin
1313 (inherit (package-source python-setuptools))
1314 (uri (pypi-uri "setuptools" version ".zip"))
1315 (sha256
1316 (base32
1317 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1318
1319 (define-public python-uniseg
1320 (package
1321 (name "python-uniseg")
1322 (version "0.7.1")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (pypi-uri "uniseg" version ".zip"))
1327 (sha256
1328 (base32
1329 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1330 (build-system python-build-system)
1331 (arguments
1332 '(#:tests? #f)) ; The test suite requires network access.
1333 (native-inputs
1334 `(("unzip" ,unzip)))
1335 (home-page
1336 "https://bitbucket.org/emptypage/uniseg-python")
1337 (synopsis
1338 "Python library to determine Unicode text segmentations")
1339 (description
1340 "Uniseg is a Python package used to determine Unicode text segmentations.
1341 Supported segmentations include:
1342 @enumerate
1343 @item @dfn{Code point} (any value in the Unicode codespace)
1344 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1345 multiple Unicode code points, e.g. \"G\" + acute-accent)
1346 @item Word break
1347 @item Sentence break
1348 @item Line break
1349 @end enumerate")
1350 (license license:expat)))
1351
1352 (define-public python2-uniseg
1353 (package-with-python2 python-uniseg))
1354
1355 (define-public python-humanfriendly
1356 (package
1357 (name "python-humanfriendly")
1358 (version "8.2")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (pypi-uri "humanfriendly" version))
1363 (sha256
1364 (base32
1365 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1366 (build-system python-build-system)
1367 (arguments
1368 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1369 #:tests? #f))
1370 (home-page "https://humanfriendly.readthedocs.io")
1371 (synopsis "Human-friendly input and output in Python")
1372 (description
1373 "The functions and classes in @code{humanfriendly} can be used to make
1374 text interfaces more user-friendly. It includes tools to parse and format
1375 numbers, file sizes, and timespans, timers for long-running operations, menus
1376 to allow the user to choose from a list of options, and terminal interaction
1377 helpers.")
1378 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1379 (license license:expat)))
1380
1381 (define-public python2-humanfriendly
1382 (let ((base (package-with-python2
1383 (strip-python2-variant python-humanfriendly))))
1384 (package/inherit base
1385 (propagated-inputs
1386 `(("python2-monotonic" ,python2-monotonic)
1387 ,@(package-propagated-inputs base))))))
1388
1389 (define-public python-textparser
1390 (package
1391 (name "python-textparser")
1392 (version "0.23.0")
1393 (source
1394 (origin
1395 (method url-fetch)
1396 (uri (pypi-uri "textparser" version))
1397 (sha256
1398 (base32
1399 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1400 (build-system python-build-system)
1401 (home-page "https://github.com/eerimoq/textparser")
1402 (synopsis "Fast text parser for Python")
1403 (description "This library provides a text parser written in the Python
1404 language. It aims to be fast.")
1405 (license license:expat)))
1406
1407 (define-public python-aenum
1408 (package
1409 (name "python-aenum")
1410 (version "2.2.4")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (pypi-uri "aenum" version))
1415 (sha256
1416 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1417 (build-system python-build-system)
1418 (arguments
1419 `(#:phases (modify-phases %standard-phases
1420 (replace 'check
1421 (lambda _
1422 (format #t "current working dir ~s~%" (getcwd))
1423 (setenv "PYTHONPATH"
1424 (string-append ".:" (getenv "PYTHONPATH")))
1425 ;; We must run the test suite module directly, as it
1426 ;; fails to define the 'tempdir' variable in scope for
1427 ;; the tests otherwise
1428 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1429 ;; issues/32/running-tests-with-python-setuppy-test).
1430 (invoke "python3" "aenum/test.py")
1431 ;; This one fails with "NameError: name
1432 ;; 'test_pickle_dump_load' is not defined" (see:
1433 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1434 ;; /error-running-the-test_v3py-test-suite).
1435 ;; (invoke "python3" "aenum/test_v3.py")
1436 #t)))))
1437 (home-page "https://bitbucket.org/stoneleaf/aenum")
1438 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1439 (description "The aenum library includes an @code{Enum} base class, a
1440 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1441 class.")
1442 (license license:bsd-3)))
1443
1444 (define-public python-can
1445 (package
1446 (name "python-can")
1447 (version "3.3.3")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (pypi-uri "python-can" version))
1452 (sha256
1453 (base32
1454 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1455 (build-system python-build-system)
1456 (arguments
1457 `(#:phases (modify-phases %standard-phases
1458 (add-after 'unpack 'relax-version-requirements
1459 (lambda _
1460 (substitute* "setup.py"
1461 (("mock~=2\\.0") "mock")
1462 (("coverage<5") "coverage")
1463 (("pytest~=4\\.3") "pytest")
1464 (("hypothesis~=4\\.56") "hypothesis"))
1465 #t))
1466 (add-after 'unpack 'fix-broken-tests
1467 ;; The tests try to run two scripts it expects should be
1468 ;; in PATH, but they aren't at this time (see:
1469 ;; https://github.com/hardbyte/python-can/issues/805).
1470 (lambda _
1471 (substitute* "test/test_scripts.py"
1472 (("\"can_logger\\.py --help\"") "")
1473 (("\"can_player\\.py --help\"") ""))
1474 #t)))))
1475 (propagated-inputs
1476 `(("python-aenum" ,python-aenum)
1477 ("python-wrapt" ,python-wrapt)))
1478 (native-inputs
1479 `(("python-codecov" ,python-codecov)
1480 ("python-coverage" ,python-coverage)
1481 ("python-future" ,python-future)
1482 ("python-hypothesis" ,python-hypothesis)
1483 ("python-mock" ,python-mock)
1484 ("python-pyserial" ,python-pyserial)
1485 ("python-pytest" ,python-pytest)
1486 ("python-pytest-cov" ,python-pytest-cov)
1487 ("python-pytest-runner" ,python-pytest-runner)
1488 ("python-pytest-timeout" ,python-pytest-timeout)))
1489 (home-page "https://github.com/hardbyte/python-can")
1490 (synopsis "Controller Area Network (CAN) interface module for Python")
1491 (description "This package defines the @code{can} module, which provides
1492 controller area network (CAN) support for Python developers; providing common
1493 abstractions to different hardware devices, and a suite of utilities for
1494 sending and receiving messages on a CAN bus.")
1495 (license license:lgpl3+)))
1496
1497 (define-public python-caniusepython3
1498 (package
1499 (name "python-caniusepython3")
1500 (version "7.2.0")
1501 (source
1502 (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "caniusepython3" version))
1505 (sha256
1506 (base32
1507 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1508 (build-system python-build-system)
1509 (arguments
1510 `(#:phases (modify-phases %standard-phases
1511 (add-after 'unpack 'relax-requirements
1512 (lambda _
1513 (substitute* "setup.py"
1514 ;; These are for compatibility with Python 2.
1515 ((".*'argparse', 'backports.functools_lru_cache',.*")
1516 ""))
1517 (substitute* "dev_requirements.txt"
1518 ((".*pylint.*") "")) ;not actually required
1519 #t))
1520 (replace 'check
1521 (lambda _
1522 (invoke "py.test" "-k" "not NetworkTests"))))))
1523 (propagated-inputs
1524 `(("python-distlib" ,python-distlib)
1525 ("python-packaging" ,python-packaging)
1526 ("python-requests" ,python-requests)))
1527 (native-inputs
1528 `(("python-mock" ,python-mock)
1529 ("python-pytest" ,python-pytest)))
1530 (home-page "https://github.com/brettcannon/caniusepython3")
1531 (synopsis "Check for Python 3-incompatible Python libraries")
1532 (description "The @command{caniusepython3} command scans your project and
1533 reports the Python 3-incompatible libraries it found. It can also be used as
1534 a library.")
1535 (license license:asl2.0)))
1536
1537 (define-public python-diskcache
1538 (package
1539 (name "python-diskcache")
1540 (version "4.1.0")
1541 (source
1542 (origin
1543 (method url-fetch)
1544 (uri (pypi-uri "diskcache" version))
1545 (sha256
1546 (base32
1547 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1548 (build-system python-build-system)
1549 (arguments
1550 `(#:tests? #f)) ;test suite not included in the release
1551 (home-page "http://www.grantjenks.com/docs/diskcache/")
1552 (synopsis "Disk and file backed cache library")
1553 (description "DiskCache is a disk and file backed persistent cache.")
1554 (license license:asl2.0)))
1555
1556 (define-public python-bitstruct
1557 (package
1558 (name "python-bitstruct")
1559 (version "8.9.0")
1560 (source
1561 (origin
1562 (method url-fetch)
1563 (uri (pypi-uri "bitstruct" version))
1564 (sha256
1565 (base32
1566 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1567 (build-system python-build-system)
1568 (home-page "https://github.com/eerimoq/bitstruct")
1569 (synopsis "Python values to and C bit field structs converter")
1570 (description "This module performs conversions between Python values and C
1571 bit field structs represented as Python byte strings. It is intended to have
1572 a similar interface as the @code{struct} module from Python, but working on
1573 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1574 (license license:expat)))
1575
1576 (define-public python-cantools
1577 (package
1578 (name "python-cantools")
1579 (version "33.1.1")
1580 (source
1581 (origin
1582 ;; We take the sources from the Git repository as the documentation is
1583 ;; not included with the PyPI archive.
1584 (method git-fetch)
1585 (uri (git-reference
1586 (url "https://github.com/eerimoq/cantools")
1587 (commit version)))
1588 (file-name (git-file-name name version))
1589 (sha256
1590 (base32
1591 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1592 (build-system python-build-system)
1593 (arguments
1594 `(#:phases
1595 (modify-phases %standard-phases
1596 (add-after 'build 'build-doc
1597 (lambda _
1598 ;; See: https://github.com/eerimoq/cantools/issues/190.
1599 (substitute* "README.rst"
1600 (("https://github.com/eerimoq/cantools/raw/master\
1601 /docs/monitor.png")
1602 "monitor.png"))
1603 (with-directory-excursion "docs"
1604 (invoke "make" "man" "info"))))
1605 (add-after 'install 'install-doc
1606 (lambda* (#:key outputs #:allow-other-keys)
1607 (let* ((out (assoc-ref outputs "out"))
1608 (info (string-append out "/share/info"))
1609 (man1 (string-append out "/share/man/man1")))
1610 (format #t "CWD: ~s~%" (getcwd))
1611 (install-file "docs/_build/texinfo/cantools.info" info)
1612 (install-file "docs/_build/man/cantools.1" man1)
1613 #t))))))
1614 (native-inputs
1615 `(("sphinx" ,python-sphinx)
1616 ("texinfo" ,texinfo)))
1617 (propagated-inputs
1618 `(("python-bitstruct" ,python-bitstruct)
1619 ("python-can" ,python-can)
1620 ("python-diskcache" ,python-diskcache)
1621 ("python-textparser" ,python-textparser)))
1622 (home-page "https://github.com/eerimoq/cantools")
1623 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1624 (description "This package includes Controller Area Network (CAN) related
1625 tools that can be used to:
1626 @itemize
1627 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1628 @item encode and decode CAN messages
1629 @item multiplex simple and extended signals
1630 @item diagnose DID encoding and decoding
1631 @item dump the CAN decoder output
1632 @item test CAN nodes
1633 @item generate C source code
1634 @item monitor the CAN bus
1635 @end itemize")
1636 (license license:expat)))
1637
1638 (define-public python-capturer
1639 (package
1640 (name "python-capturer")
1641 (version "2.4")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "capturer" version))
1646 (sha256
1647 (base32
1648 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1649 (build-system python-build-system)
1650 (arguments
1651 `(#:tests? #f))
1652 (propagated-inputs
1653 `(("python-humanfriendly" ,python-humanfriendly)))
1654 (home-page "https://capturer.readthedocs.io")
1655 (synopsis "Capture stdout and stderr streams of the current process")
1656 (description
1657 "The capturer package makes it easy to capture the stdout and stderr
1658 streams of the current process and subprocesses. Output can be relayed
1659 to the terminal in real time but is also available to the Python program
1660 for additional processing.")
1661 (license license:expat)))
1662
1663 (define-public python2-capturer
1664 (package-with-python2 python-capturer))
1665
1666 (define-public python-case
1667 (package
1668 (name "python-case")
1669 (version "1.5.3")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "case" version))
1674 (sha256
1675 (base32
1676 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1677 (build-system python-build-system)
1678 (propagated-inputs
1679 `(("python-mock" ,python-mock)
1680 ("python-nose" ,python-nose)
1681 ("python-six" ,python-six)
1682 ("python-unittest2" ,python-unittest2)))
1683 (native-inputs
1684 `(("python-coverage" ,python-coverage)))
1685 (home-page "https://github.com/celery/case")
1686 (synopsis "Unittest utilities and convenience methods")
1687 (description
1688 "The @code{case} package provides utilities on top of unittest, including
1689 some helpful Python 2 compatibility convenience methods.")
1690 (license license:bsd-3)))
1691
1692 (define-public python-verboselogs
1693 (package
1694 (name "python-verboselogs")
1695 (version "1.7")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (pypi-uri "verboselogs" version))
1700 (sha256
1701 (base32
1702 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1703 (build-system python-build-system)
1704 (arguments
1705 `(#:phases
1706 (modify-phases %standard-phases
1707 (replace 'check
1708 (lambda _
1709 ;; Do not run pylint plugin test, as astroid is an old
1710 ;; unsupported version.
1711 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1712 "verboselogs/tests.py"))))))
1713 (native-inputs
1714 `(("python-mock" ,python-mock)
1715 ("python-pytest" ,python-pytest)))
1716 (home-page "https://verboselogs.readthedocs.io")
1717 (synopsis "Verbose logging level for Python's logging module")
1718 (description
1719 "The @code{verboselogs} package extends Python's @code{logging} module to
1720 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1721 (license license:expat)))
1722
1723 (define-public python2-verboselogs
1724 (package-with-python2 python-verboselogs))
1725
1726 (define-public python-coloredlogs
1727 (package
1728 (name "python-coloredlogs")
1729 (version "10.0")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "coloredlogs" version))
1734 (sha256
1735 (base32
1736 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1737 (build-system python-build-system)
1738 (arguments
1739 `(;Tests require some updated modules
1740 #:tests? #f))
1741 (propagated-inputs
1742 `(("python-capturer" ,python-capturer)))
1743 (home-page "https://coloredlogs.readthedocs.io")
1744 (synopsis "Colored stream handler for Python's logging module")
1745 (description
1746 "The @code{coloredlogs} package enables colored terminal output for
1747 Python's logging module. The @code{ColoredFormatter} class inherits from
1748 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1749 messages in color.")
1750 (license license:expat)))
1751
1752 (define-public python2-coloredlogs
1753 (package-with-python2 python-coloredlogs))
1754
1755 (define-public python-editorconfig
1756 (package
1757 (name "python-editorconfig")
1758 (version "0.12.2")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "EditorConfig" version))
1763 (sha256
1764 (base32
1765 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1766 (build-system python-build-system)
1767 (home-page "https://editorconfig.org/")
1768 (synopsis "EditorConfig bindings for python")
1769 (description "The EditorConfig project consists of a file format for
1770 defining coding styles and a collection of text editor plugins that enable
1771 editors to read the file format and adhere to defined styles. EditorConfig
1772 files are easily readable and they work nicely with version control systems.")
1773 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1774 (license (list license:bsd-2 license:psfl))))
1775
1776 (define-public dosage
1777 (package
1778 (name "dosage")
1779 (version "2.17")
1780 (source
1781 (origin
1782 (method url-fetch)
1783 (uri (pypi-uri "dosage" version))
1784 (sha256
1785 (base32
1786 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1787 (build-system python-build-system)
1788 (propagated-inputs
1789 `(("python2-backports-functools-lru-cache"
1790 ,python2-backports-functools-lru-cache)
1791 ("python2-backports-shutil-get-terminal-size"
1792 ,python2-backports-shutil-get-terminal-size)
1793 ("python-cached-property" ,python-cached-property)
1794 ("python-colorama" ,python-colorama)
1795 ("python-imagesize" ,python-imagesize)
1796 ("python-importlib-metadata" ,python-importlib-metadata)
1797 ("python-lxml" ,python-lxml)
1798 ("python-requests" ,python-requests)
1799 ("python-six" ,python-six)))
1800 (native-inputs
1801 `(("python-pytest-cov" ,python-pytest-cov)
1802 ("python-pytest-xdist" ,python-pytest-xdist)
1803 ("python-responses" ,python-responses)
1804 ("python-setuptools-scm" ,python-setuptools-scm)))
1805 (home-page "https://github.com/webcomics/dosage")
1806 (synopsis "Comic strip downloader and archiver")
1807 (description "Dosage is designed to keep a local copy of specific webcomics and other
1808 picture-based content such as Picture of the Day sites. With the @command{dosage}
1809 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1810 downloaded, or download a strip for a particular date or index, if possible.")
1811 (license license:expat)))
1812
1813 (define-public python-et-xmlfile
1814 (package
1815 (name "python-et-xmlfile")
1816 (version "1.0.1")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (pypi-uri "et_xmlfile" version))
1821 (sha256
1822 (base32
1823 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1824 (build-system python-build-system)
1825 (arguments
1826 `(#:phases (modify-phases %standard-phases
1827 (replace 'check
1828 (lambda _
1829 (invoke "pytest"))))))
1830 (native-inputs
1831 `(("python-pytest" ,python-pytest)
1832 ("python-lxml" ,python-lxml))) ;used for the tests
1833 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1834 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1835 (description "This Python library is based upon the @code{xmlfile} module
1836 from @code{lxml}. It aims to provide a low memory, compatible implementation
1837 of @code{xmlfile}.")
1838 (license license:expat)))
1839
1840 (define-public python2-et-xmlfile
1841 (package-with-python2 python-et-xmlfile))
1842
1843 (define-public python-openpyxl
1844 (package
1845 (name "python-openpyxl")
1846 (version "3.0.5")
1847 (source
1848 (origin
1849 ;; We use the upstream repository, as the tests are not included in the
1850 ;; PyPI releases.
1851 (method hg-fetch)
1852 (uri (hg-reference
1853 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1854 (changeset version)))
1855 (file-name (string-append name "-" version "-checkout"))
1856 (sha256
1857 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1858 (build-system python-build-system)
1859 (arguments
1860 `(#:phases (modify-phases %standard-phases
1861 (replace 'check
1862 (lambda _
1863 (invoke "pytest"))))))
1864 (native-inputs
1865 ;; For the test suite.
1866 `(("python-lxml" ,python-lxml)
1867 ("python-pillow" ,python-pillow)
1868 ("python-pytest" ,python-pytest)))
1869 (propagated-inputs
1870 `(("python-et-xmlfile" ,python-et-xmlfile)
1871 ("python-jdcal" ,python-jdcal)))
1872 (home-page "https://openpyxl.readthedocs.io")
1873 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1874 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1875 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1876 standard.")
1877 (properties `((python2-variant . ,(delay python2-openpyxl))))
1878 (license license:expat)))
1879
1880 (define-public python2-openpyxl
1881 (let ((base (package-with-python2
1882 (strip-python2-variant python-openpyxl))))
1883 (package
1884 (inherit base)
1885 ;; This is the latest version that has python2 support
1886 (version "2.6.4")
1887 (source
1888 (origin
1889 (method url-fetch)
1890 (uri (pypi-uri "openpyxl" version))
1891 (sha256
1892 (base32
1893 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1894 (arguments '(#:tests? #f))))) ; No test suite.
1895
1896 (define-public python-eventlet
1897 (package
1898 (name "python-eventlet")
1899 (version "0.25.1")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "eventlet" version))
1904 (sha256
1905 (base32
1906 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1907 (build-system python-build-system)
1908 (propagated-inputs
1909 `(("python-dnspython" ,python-dnspython)
1910 ("python-greenlet" ,python-greenlet)
1911 ("python-monotonic" ,python-monotonic)))
1912 (arguments
1913 ;; TODO: Requires unpackaged 'enum-compat'.
1914 '(#:tests? #f))
1915 (home-page "https://eventlet.net")
1916 (synopsis "Concurrent networking library for Python")
1917 (description
1918 "Eventlet is a concurrent networking library for Python that
1919 allows you to change how you run your code, not how you write it.
1920 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1921 Coroutines ensure that the developer uses a blocking style of programming
1922 that is similar to threading, but provide the benefits of non-blocking I/O.
1923 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1924 from the Python interpreter, or as a small part of a larger application.")
1925 (license license:expat)))
1926
1927 (define-public python-six
1928 (package
1929 (name "python-six")
1930 (version "1.14.0")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "six" version))
1935 (sha256
1936 (base32
1937 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1938 (build-system python-build-system)
1939 (arguments
1940 `(#:phases
1941 (modify-phases %standard-phases
1942 (replace 'check
1943 (lambda _
1944 (invoke "py.test" "-v"))))))
1945 (native-inputs
1946 `(("python-pytest" ,python-pytest-bootstrap)))
1947 (home-page "https://pypi.org/project/six/")
1948 (synopsis "Python 2 and 3 compatibility utilities")
1949 (description
1950 "Six is a Python 2 and 3 compatibility library. It provides utility
1951 functions for smoothing over the differences between the Python versions with
1952 the goal of writing Python code that is compatible on both Python versions.
1953 Six supports every Python version since 2.5. It is contained in only one
1954 Python file, so it can be easily copied into your project.")
1955 (license license:x11)))
1956
1957 (define-public python2-six
1958 (package-with-python2 python-six))
1959
1960 (define-public python-six-bootstrap
1961 (package
1962 (inherit python-six)
1963 (name "python-six-bootstrap")
1964 (native-inputs `())
1965 (arguments `(#:tests? #f))))
1966
1967 (define-public python2-six-bootstrap
1968 (package-with-python2 python-six-bootstrap))
1969
1970 (define-public python-schedule
1971 (package
1972 (name "python-schedule")
1973 (version "0.4.3")
1974 (source
1975 (origin
1976 (method url-fetch)
1977 (uri (pypi-uri "schedule" version))
1978 (sha256
1979 (base32
1980 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1981 (build-system python-build-system)
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)
1984 ("python-mock" ,python-mock)))
1985 (home-page "https://github.com/dbader/schedule")
1986 (synopsis "Schedule periodic function calls in Python")
1987 (description
1988 "Schedule is an in-process scheduler for periodic jobs that uses the
1989 builder pattern for configuration. Schedule lets you run Python functions (or
1990 any other callable) periodically at pre-determined intervals using a simple,
1991 human-friendly syntax.")
1992 (license license:expat)))
1993
1994 (define-public python2-schedule
1995 (package-with-python2 python-schedule))
1996
1997 (define-public python-scour
1998 (package
1999 (name "python-scour")
2000 (version "038.1")
2001 (source
2002 (origin
2003 (method git-fetch)
2004 (uri
2005 (git-reference
2006 (url "https://github.com/scour-project/scour")
2007 (commit
2008 (string-append "v" version))))
2009 (file-name (git-file-name name version))
2010 (sha256
2011 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
2012 (propagated-inputs
2013 `(("python-six" ,python-six)))
2014 (build-system python-build-system)
2015 (home-page "https://github.com/scour-project/scour")
2016 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2017 (description "The goal of Scour is to output a file that renders
2018 identically at a fraction of the size by removing a lot of redundant
2019 information created by most SVG editors. Optimization options are typically
2020 lossless but can be tweaked for more aggressive cleaning.")
2021 (license license:asl2.0)))
2022
2023 (define-public python-mappy
2024 (package
2025 (name "python-mappy")
2026 (version "2.18")
2027 (source (origin
2028 (method url-fetch)
2029 (uri (pypi-uri "mappy" version))
2030 (sha256
2031 (base32
2032 "1a05p7rkmxa6qhm108na8flzj2v45jab06drk59kzk1ip2sgvzqq"))))
2033 (build-system python-build-system)
2034 (native-inputs
2035 `(("python-cython" ,python-cython)))
2036 (inputs
2037 `(("zlib" ,zlib)))
2038 (home-page "https://github.com/lh3/minimap2")
2039 (synopsis "Python binding for minimap2")
2040 (description "This package provides a convenient interface to minimap2,
2041 a fast and accurate C program to align genomic and transcribe nucleotide
2042 sequences.")
2043 (license license:expat)))
2044
2045 (define-public python-mechanize
2046 (package
2047 (name "python-mechanize")
2048 (version "0.4.5")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (pypi-uri "mechanize" version))
2053 (sha256
2054 (base32
2055 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2056 (build-system python-build-system)
2057 (propagated-inputs
2058 `(("python-html5lib" ,python-html5lib)))
2059 (home-page "https://github.com/python-mechanize/mechanize")
2060 (synopsis
2061 "Stateful programmatic web browsing in Python")
2062 (description
2063 "Mechanize implements stateful programmatic web browsing in Python,
2064 after Andy Lester’s Perl module WWW::Mechanize.")
2065 (license license:bsd-3)))
2066
2067 (define-public python2-mechanize
2068 (package-with-python2 python-mechanize))
2069
2070 (define-public python-simpleaudio
2071 (package
2072 (name "python-simpleaudio")
2073 (version "1.0.4")
2074 (source
2075 (origin
2076 (method url-fetch)
2077 (uri (pypi-uri "simpleaudio" version))
2078 (sha256
2079 (base32
2080 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2081 (build-system python-build-system)
2082 (arguments
2083 `(#:tests? #f))
2084 (inputs
2085 `(("alsa-lib" ,alsa-lib)))
2086 (home-page
2087 "https://github.com/hamiltron/py-simple-audio")
2088 (synopsis "Simple, asynchronous audio playback for Python 3")
2089 (description
2090 "The @code{simplaudio} package provides cross-platform, dependency-free
2091 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2092 (license license:expat))) ; MIT license
2093
2094 (define-public python-simplejson
2095 (package
2096 (name "python-simplejson")
2097 (version "3.17.0")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "simplejson" version))
2102 (sha256
2103 (base32
2104 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2105 (build-system python-build-system)
2106 (home-page "http://simplejson.readthedocs.org/en/latest/")
2107 (synopsis
2108 "Json library for Python")
2109 (description
2110 "JSON (JavaScript Object Notation) is a subset of JavaScript
2111 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2112 format.
2113
2114 Simplejson exposes an API familiar to users of the standard library marshal
2115 and pickle modules. It is the externally maintained version of the json
2116 library contained in Python 2.6, but maintains compatibility with Python 2.5
2117 and (currently) has significant performance advantages, even without using
2118 the optional C extension for speedups. Simplejson is also supported on
2119 Python 3.3+.")
2120 (license license:x11)))
2121
2122 (define-public python2-simplejson
2123 (package-with-python2 python-simplejson))
2124
2125
2126 (define-public python-pyicu
2127 (package
2128 (name "python-pyicu")
2129 (version "2.4.3")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "PyICU" version))
2134 (sha256
2135 (base32
2136 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2137 (build-system python-build-system)
2138 (inputs
2139 `(("icu4c" ,icu4c)))
2140 (native-inputs
2141 `(("python-pytest" ,python-pytest)
2142 ("python-six" ,python-six)))
2143 (home-page "https://github.com/ovalhub/pyicu")
2144 (synopsis "Python extension wrapping the ICU C++ API")
2145 (description
2146 "PyICU is a python extension wrapping the ICU C++ API.")
2147 (license license:x11)))
2148
2149 (define-public python2-pyicu
2150 (package-with-python2 python-pyicu))
2151
2152 (define-public python-dogtail
2153 (package
2154 (name "python-dogtail")
2155 (version "0.9.11")
2156 (source (origin
2157 (method url-fetch)
2158 (uri
2159 (string-append
2160 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2161 "dogtail-" version ".tar.gz"))
2162 (sha256
2163 (base32
2164 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2165 (build-system python-build-system)
2166 (arguments
2167 `(#:tests? #f ; TODO Launching dbus for the tests
2168 ; fails
2169 #:phases
2170 (modify-phases %standard-phases
2171 (replace 'check
2172 (lambda* (#:key tests? #:allow-other-keys)
2173 (when tests?
2174 (system "Xvfb :1 &")
2175 (setenv "DISPLAY" ":1")
2176 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2177 #t)))))
2178 (propagated-inputs
2179 `(("python-pygobject" ,python-pygobject)
2180 ("python-pycairo" ,python-pycairo)
2181 ("python-pyatspi" ,python-pyatspi)))
2182 (native-inputs
2183 `(("python-nose" ,python-nose)
2184 ("gtk+" ,gtk+)
2185 ("xvfb" ,xorg-server)
2186 ("dbus" ,dbus)
2187 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2188 ("gobject-introspection" ,gobject-introspection)))
2189 (home-page "https://gitlab.com/dogtail/dogtail/")
2190 (synopsis "GUI test tool and automation framework written in Python")
2191 (description
2192 "Dogtail is a GUI test tool and automation framework written in Python.
2193 It uses Accessibility (a11y) technologies to communicate with desktop
2194 applications. dogtail scripts are written in Python and executed like any
2195 other Python program.")
2196 (license license:gpl2+)))
2197
2198 (define-public python2-dogtail
2199 (package-with-python2 python-dogtail))
2200
2201 (define-public python-empy
2202 (package
2203 (name "python-empy")
2204 (version "3.3.3")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2208 version ".tar.gz"))
2209 (sha256
2210 (base32
2211 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2212 (build-system python-build-system)
2213 (arguments
2214 `(#:tests? #f)) ; python2 only
2215 (home-page "http://www.alcyone.com/software/empy/")
2216 (synopsis "Templating system for Python")
2217 (description
2218 "EmPy is a system for embedding Python expressions and statements in
2219 template text; it takes an EmPy source file, processes it, and produces
2220 output. This is accomplished via expansions, which are special signals to the
2221 EmPy system and are set off by a special prefix (by default the at sign, @@).
2222 EmPy can expand arbitrary Python expressions and statements in this way, as
2223 well as a variety of special forms. Textual data not explicitly delimited in
2224 this way is sent unaffected to the output, allowing Python to be used in
2225 effect as a markup language. Also supported are callbacks via hooks,
2226 recording and playback via diversions, and dynamic, chainable filters. The
2227 system is highly configurable via command line options and embedded
2228 commands.")
2229 (license license:lgpl2.1+)))
2230
2231 (define-public python2-empy
2232 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2233 (package/inherit base
2234 (arguments `(,@(package-arguments base)
2235 #:tests? #t)))))
2236
2237 (define-public python2-element-tree
2238 (package
2239 (name "python2-element-tree")
2240 (version "1.2.6")
2241 (source (origin
2242 (method url-fetch)
2243 (uri (string-append
2244 "http://effbot.org/media/downloads/elementtree-"
2245 version "-20050316.tar.gz"))
2246 (sha256
2247 (base32
2248 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2249 (build-system python-build-system)
2250 (arguments
2251 `(#:python ,python-2 ; seems to be part of Python 3
2252 #:tests? #f)) ; no 'test' sub-command
2253 (synopsis "Toolkit for XML processing in Python")
2254 (description
2255 "ElementTree is a Python library supporting lightweight XML processing.")
2256 (home-page "https://effbot.org/zone/element-index.htm")
2257 (license (license:x11-style
2258 "http://docs.python.org/2/license.html"
2259 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2260
2261 (define-public python2-pybugz
2262 (package
2263 (name "python2-pybugz")
2264 (version "0.6.11")
2265 (source (origin
2266 (method url-fetch)
2267 (uri (string-append
2268 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2269 version ".tar.gz"))
2270 (sha256
2271 (base32
2272 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2273 (patches (search-patches "pybugz-stty.patch"
2274 "pybugz-encode-error.patch"))))
2275 (build-system python-build-system)
2276 (arguments
2277 `(#:python ,python-2 ; SyntaxError with Python 3
2278 #:tests? #f)) ; no 'test' sub-command
2279 (propagated-inputs
2280 `(("element-tree" ,python2-element-tree)))
2281 (synopsis "Python and command-line interface to Bugzilla")
2282 (description
2283 "PyBugz is a Python library and command-line tool to query the Bugzilla
2284 bug tracking system. It is meant as an aid to speed up interaction with the
2285 bug tracker.")
2286 (home-page "http://www.liquidx.net/pybugz/")
2287 (license license:gpl2)))
2288
2289 (define-public python2-enum
2290 (package
2291 (name "python2-enum")
2292 (version "0.4.6")
2293 (source (origin
2294 (method url-fetch)
2295 (uri (pypi-uri "enum" version))
2296 (sha256
2297 (base32
2298 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2299 (build-system python-build-system)
2300 (arguments
2301 `(#:python ,python-2))
2302 (home-page "https://pypi.org/project/enum/")
2303 (synopsis "Robust enumerated type support in Python")
2304 (description
2305 "This provides a module for robust enumerations in Python. It has
2306 been superseded by the Python standard library and is provided only for
2307 compatibility.")
2308 ;; Choice of either license.
2309 (license (list license:gpl3+ license:psfl))))
2310
2311 (define-public python-enum34
2312 (package
2313 (name "python-enum34")
2314 (version "1.1.6")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (pypi-uri "enum34" version))
2319 (sha256
2320 (base32
2321 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2322 (build-system python-build-system)
2323 (home-page "https://pypi.org/project/enum34/")
2324 (synopsis "Backported Python 3.4 Enum")
2325 (description
2326 "Enum34 is the new Python stdlib enum module available in Python 3.4
2327 backported for previous versions of Python from 2.4 to 3.3.")
2328 (license license:bsd-3)))
2329
2330 (define-public python2-enum34
2331 (package-with-python2 python-enum34))
2332
2333 (define-public python-parse-type
2334 (package
2335 (name "python-parse-type")
2336 (version "0.4.2")
2337 (source
2338 (origin
2339 (method url-fetch)
2340 (uri (pypi-uri "parse_type" version))
2341 (sha256
2342 (base32
2343 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2344 (build-system python-build-system)
2345 (propagated-inputs
2346 `(("python-six" ,python-six)
2347 ("python-parse" ,python-parse)))
2348 (native-inputs
2349 `(("python-pytest" ,python-pytest)
2350 ("python-pytest-runner" ,python-pytest-runner)))
2351 (home-page "https://github.com/jenisys/parse_type")
2352 (synopsis "Extended parse module")
2353 (description
2354 "Parse_type extends the python parse module.")
2355 (properties
2356 `((python2-variant . ,(delay python2-parse-type))))
2357 (license license:bsd-3)))
2358
2359 (define-public python2-parse-type
2360 (let ((base (package-with-python2
2361 (strip-python2-variant python-parse-type))))
2362 (package/inherit base
2363 (propagated-inputs
2364 `(("python2-enum34" ,python2-enum34)
2365 ,@(package-propagated-inputs base))))))
2366
2367 (define-public python-parse
2368 (package
2369 (name "python-parse")
2370 (version "1.18.0")
2371 (source
2372 (origin
2373 (method url-fetch)
2374 (uri (pypi-uri "parse" version))
2375 (sha256
2376 (base32
2377 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2378 (build-system python-build-system)
2379 (arguments
2380 `(#:phases
2381 (modify-phases %standard-phases
2382 (replace 'check
2383 (lambda _ (invoke "python" "test_parse.py"))))))
2384 (home-page "https://github.com/r1chardj0n3s/parse")
2385 (synopsis "Parse strings")
2386 (description
2387 "Parse strings using a specification based on the Python @code{format()}
2388 syntax.")
2389 (license license:x11)))
2390
2391 (define-public python-polib
2392 (package
2393 (name "python-polib")
2394 (version "1.1.0")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "polib" version))
2398 (sha256
2399 (base32
2400 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2401 (build-system python-build-system)
2402 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2403 (synopsis "Manipulate, create and modify gettext files")
2404 (description "Polib can manipulate any gettext format (po, pot and mo)
2405 files. It can be used to create po files from scratch or to modify
2406 existing ones.")
2407 (license license:expat)))
2408
2409 (define-public python2-polib
2410 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2411 (package/inherit base
2412 (arguments `(,@(package-arguments base)
2413 ;; Tests don't work with python2.
2414 #:tests? #f)))))
2415
2416 (define-public python-poyo
2417 (package
2418 (name "python-poyo")
2419 (version "0.5.0")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "poyo" version))
2424 (sha256
2425 (base32
2426 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2427 (build-system python-build-system)
2428 (home-page "https://github.com/hackebrot/poyo")
2429 (synopsis "Lightweight YAML Parser for Python")
2430 (description
2431 "This package provides a lightweight YAML Parser for Python. It supports
2432 only a chosen subset of the YAML format that is required to parse cookiecutter
2433 user configuration files. It does not have support for serializing into YAML
2434 and is not compatible with JSON.")
2435 (license license:expat)))
2436
2437 (define-public scons
2438 (package
2439 (name "scons")
2440 (version "3.0.4")
2441 (source (origin
2442 (method git-fetch)
2443 (uri (git-reference
2444 (url "https://github.com/SCons/scons")
2445 (commit version)))
2446 (file-name (git-file-name name version))
2447 (sha256
2448 (base32
2449 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2450 (build-system python-build-system)
2451 (arguments
2452 `(#:use-setuptools? #f ; still relies on distutils
2453 #:tests? #f ; no 'python setup.py test' command
2454 #:phases
2455 (modify-phases %standard-phases
2456 (add-before 'build 'bootstrap
2457 (lambda _
2458 (substitute* "src/engine/SCons/compat/__init__.py"
2459 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2460 "sys.modules[new] = __import__(old)"))
2461 (substitute* "src/engine/SCons/Platform/__init__.py"
2462 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2463 "mod = __import__(full_name)"))
2464 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2465 (chdir "build/scons")
2466 #t)))))
2467 (home-page "https://scons.org/")
2468 (synopsis "Software construction tool written in Python")
2469 (description
2470 "SCons is a software construction tool. Think of SCons as an improved,
2471 cross-platform substitute for the classic Make utility with integrated
2472 functionality similar to autoconf/automake and compiler caches such as ccache.
2473 In short, SCons is an easier, more reliable and faster way to build
2474 software.")
2475 (license license:x11)))
2476
2477 (define-public scons-python2
2478 (package
2479 (inherit (package-with-python2 scons))
2480 (name "scons-python2")))
2481
2482 (define-public python-extension-helpers
2483 (package
2484 (name "python-extension-helpers")
2485 (version "0.1")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "extension-helpers" version))
2490 (sha256
2491 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2492 (build-system python-build-system)
2493 (native-inputs
2494 `(("coverage" ,python-coverage)
2495 ("pytest" ,python-pytest-astropy)
2496 ("pytest-cov" ,python-pytest-cov)
2497 ("setuptools-scm" ,python-setuptools-scm)))
2498 (home-page "https://github.com/astropy/astropy-helpers")
2499 (synopsis
2500 "Utilities for building and installing packages in the Astropy ecosystem")
2501 (description
2502 "The extension-helpers package includes many build, installation, and
2503 documentation-related tools used by the Astropy project.")
2504 (license license:bsd-3)))
2505
2506 (define-public python-extras
2507 (package
2508 (name "python-extras")
2509 (version "1.0.0")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "extras" version))
2514 (sha256
2515 (base32
2516 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2517 (build-system python-build-system)
2518 (arguments
2519 ;; FIXME: Circular dependency on testtools.
2520 '(#:tests? #f))
2521 (home-page "https://github.com/testing-cabal/extras")
2522 (synopsis "Useful extensions to the Python standard library")
2523 (description
2524 "Extras is a set of extensions to the Python standard library.")
2525 (license license:expat)))
2526
2527 (define-public python2-extras
2528 (package-with-python2 python-extras))
2529
2530 (define-public python-mimeparse
2531 (package
2532 (name "python-mimeparse")
2533 (version "1.6.0")
2534 (source
2535 (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "python-mimeparse" version))
2538 (sha256
2539 (base32
2540 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2541 (build-system python-build-system)
2542 (arguments
2543 '(#:phases
2544 (modify-phases %standard-phases
2545 (replace 'check
2546 (lambda _
2547 (invoke "./mimeparse_test.py"))))))
2548 (home-page
2549 "https://github.com/dbtsai/python-mimeparse")
2550 (synopsis "Python library for parsing MIME types")
2551 (description
2552 "Mimeparse provides basic functions for parsing MIME type names and
2553 matching them against a list of media-ranges.")
2554 (license license:expat)))
2555
2556 (define-public python2-mimeparse
2557 (package-with-python2 python-mimeparse))
2558
2559 (define-public python-miniboa
2560 (package
2561 (name "python-miniboa")
2562 (version "1.0.7")
2563 (source
2564 (origin
2565 (method url-fetch)
2566 (uri (pypi-uri "miniboa" version))
2567 (sha256
2568 (base32
2569 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2570 (build-system python-build-system)
2571 (home-page "https://github.com/shmup/miniboa")
2572 (synopsis "Simple, single-threaded Telnet server")
2573 (description
2574 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2575 server.")
2576 (license license:asl2.0)))
2577
2578 (define-public python2-miniboa
2579 (package-with-python2 python-miniboa))
2580
2581 (define-public python-pafy
2582 (package
2583 (name "python-pafy")
2584 (version "0.5.3.1")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "pafy" version))
2589 (sha256
2590 (base32
2591 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2592 (build-system python-build-system)
2593 (arguments
2594 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2595 (propagated-inputs
2596 ;; Youtube-dl is a python package which is imported in the file
2597 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2598 `(("youtube-dl" ,youtube-dl)))
2599 (home-page "https://np1.github.io/pafy/")
2600 (synopsis "Retrieve YouTube content and metadata")
2601 (description
2602 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2603 (license license:lgpl3+)))
2604
2605 (define-public python2-funcsigs
2606 (package
2607 (name "python2-funcsigs")
2608 (version "1.0.2")
2609 (source (origin
2610 (method url-fetch)
2611 (uri (pypi-uri "funcsigs" version))
2612 (sha256
2613 (base32
2614 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2615 (build-system python-build-system)
2616 (arguments
2617 `(#:python ,python-2))
2618 (native-inputs
2619 `(("python2-unittest2" ,python2-unittest2)))
2620 (home-page "http://funcsigs.readthedocs.org")
2621 (synopsis "Python function signatures from PEP362")
2622 (description
2623 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2624 (license license:asl2.0)))
2625
2626 (define-public python2-funcsigs-bootstrap
2627 (package
2628 (inherit python2-funcsigs)
2629 (name "python2-funcsigs-bootstrap")
2630 (native-inputs `())
2631 (arguments
2632 `(#:tests? #f
2633 ,@(package-arguments python2-funcsigs)))))
2634
2635 (define-public python-py
2636 (package
2637 (name "python-py")
2638 (version "1.8.1")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "py" version))
2643 (sha256
2644 (base32
2645 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2646 (build-system python-build-system)
2647 (arguments
2648 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2649 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2650 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2651 ;; Is this module globally installed?"
2652 '(#:tests? #f))
2653 (native-inputs
2654 `(("python-setuptools-scm" ,python-setuptools-scm)))
2655 (home-page "https://github.com/pytest-dev/py")
2656 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2657 (description
2658 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2659 code introspection, and logging.")
2660 (license license:expat)))
2661
2662 (define-public python-py-next
2663 (package
2664 (inherit python-py)
2665 (version "1.9.0")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "py" version))
2670 (sha256
2671 (base32
2672 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2673
2674 (define-public python2-py
2675 (package-with-python2 python-py))
2676
2677 ;; Recent versions of python-fixtures and python-testrepository need
2678 ;; python-pbr for packaging, which itself needs these two packages for
2679 ;; testing.
2680 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2681 ;; same source, just without any test dependencies and with tests disabled.
2682 ;; python-pbr-minmal is then used to package python-fixtures and
2683 ;; python-testrepository.
2684 ;; Strictly speaking we currently could remove the test-requirements from the
2685 ;; normal python-pbr package (and save this package) since test are disabled
2686 ;; there anyway. But this may change in future.
2687 (define-public python-pbr-minimal
2688 (package
2689 (name "python-pbr-minimal")
2690 (version "3.0.1")
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "pbr" version))
2695 (sha256
2696 (base32
2697 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2698 (build-system python-build-system)
2699 (arguments
2700 `(#:tests? #f))
2701 (home-page "https://docs.openstack.org/pbr/latest/")
2702 (synopsis "Minimal build of python-pbr used for bootstrapping")
2703 (description
2704 "Used only for bootstrapping python2-pbr, you should not need this.")
2705 (license license:asl2.0)))
2706
2707 (define-public python-pbr
2708 (package
2709 (inherit python-pbr-minimal)
2710 (name "python-pbr")
2711 (arguments
2712 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2713 (propagated-inputs
2714 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2715 (native-inputs
2716 `(("python-fixtures" ,python-fixtures-bootstrap)
2717 ;; discover, coverage, hacking, subunit
2718 ("python-mock" ,python-mock)
2719 ("python-six" ,python-six)
2720 ("python-sphinx" ,python-sphinx)
2721 ("python-testrepository" ,python-testrepository-bootstrap)
2722 ("python-testresources" ,python-testresources-bootstrap)
2723 ("python-testscenarios" ,python-testscenarios-bootstrap)
2724 ("python-testtools" ,python-testtools-bootstrap)
2725 ("python-virtualenv" ,python-virtualenv)))
2726 (synopsis "Enhance the default behavior of Python’s setuptools")
2727 (description
2728 "Python Build Reasonableness (PBR) is a library that injects some useful
2729 and sensible default behaviors into your setuptools run. It will set
2730 versions, process requirements files and generate AUTHORS and ChangeLog file
2731 from git information.
2732 ")))
2733
2734 (define-public python-pyrsistent
2735 (package
2736 (name "python-pyrsistent")
2737 (version "0.16.0")
2738 (home-page "https://github.com/tobgu/pyrsistent")
2739 (source (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "pyrsistent" version))
2742 (sha256
2743 (base32
2744 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2745 (build-system python-build-system)
2746 (arguments
2747 '(#:phases (modify-phases %standard-phases
2748 ;; The package works fine with newer Pytest and Hypothesis, but
2749 ;; has pinned older versions to stay compatible with Python 2.
2750 (add-before 'check 'loosen-pytest-requirement
2751 (lambda _
2752 (substitute* "setup.py"
2753 (("pytest<5") "pytest")
2754 (("hypothesis<5") "hypothesis"))
2755 #t)))))
2756 (native-inputs
2757 `(("python-hypothesis" ,python-hypothesis)
2758 ("python-pytest" ,python-pytest)
2759 ("python-pytest-runner" ,python-pytest-runner)))
2760 (propagated-inputs
2761 `(("python-six" ,python-six)))
2762 (synopsis "Persistent data structures for Python")
2763 (description
2764 "Pyrsistent is a number of persistent collections (by some referred to as
2765 functional data structures). Persistent in the sense that they are immutable.
2766
2767 All methods on a data structure that would normally mutate it instead return a
2768 new copy of the structure containing the requested updates. The original
2769 structure is left untouched.")
2770 (license license:expat)))
2771
2772 (define-public python2-pyrsistent
2773 (package-with-python2 python-pyrsistent))
2774
2775 (define-public python-exif-read
2776 (package
2777 (name "python-exif-read")
2778 (version "2.1.2")
2779 (source (origin
2780 (method url-fetch)
2781 (uri (pypi-uri "ExifRead" version))
2782 (sha256
2783 (base32
2784 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2785 (build-system python-build-system)
2786 (arguments `(#:tests? #f)) ; no tests
2787 (home-page "https://github.com/ianare/exif-py")
2788 (synopsis "Python library to extract EXIF data from image files")
2789 (description
2790 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2791 files.")
2792 (license license:bsd-3)))
2793
2794 (define-public python2-exif-read
2795 (package-with-python2 python-exif-read))
2796
2797 (define-public python-pyld
2798 (package
2799 (name "python-pyld")
2800 (version "1.0.5")
2801 (source (origin
2802 (method url-fetch)
2803 (uri (pypi-uri "PyLD" version))
2804 (sha256
2805 (base32
2806 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2807 (build-system python-build-system)
2808 (home-page "https://github.com/digitalbazaar/pyld")
2809 (synopsis "Python implementation of the JSON-LD specification")
2810 (description
2811 "PyLD is an implementation of the JSON-LD specification.")
2812 (license license:bsd-3)))
2813
2814 (define-public python2-pyld
2815 (package-with-python2 python-pyld))
2816
2817 (define-public python-cli-helpers
2818 (package
2819 (name "python-cli-helpers")
2820 (version "2.0.1")
2821 (source
2822 (origin
2823 ;; There's no source tarball on PyPI.
2824 (method git-fetch)
2825 (uri (git-reference
2826 (url "https://github.com/dbcli/cli_helpers")
2827 (commit (string-append "v" version))))
2828 (file-name (git-file-name name version))
2829 (sha256
2830 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2831 (build-system python-build-system)
2832 (native-inputs
2833 `(("python-pytest" ,python-pytest)))
2834 (propagated-inputs
2835 `(("python-wcwidth" ,python-wcwidth)
2836 ("python-configobj" ,python-configobj)
2837 ("python-tabulate" ,python-tabulate)
2838 ("python-terminaltables" ,python-terminaltables)))
2839 (home-page "https://github.com/dbcli/cli_helpers")
2840 (synopsis "Helpers for building command-line apps")
2841 (description
2842 "CLI Helpers is a Python package that makes it easy to perform common
2843 tasks when building command-line apps. It's a helper library for command-line
2844 interfaces.")
2845 (license license:bsd-3)))
2846
2847 (define-public python-click
2848 (package
2849 (name "python-click")
2850 (version "7.1.2")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (pypi-uri "click" version))
2855 (sha256
2856 (base32
2857 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2858 (build-system python-build-system)
2859 (arguments
2860 `(#:phases
2861 (modify-phases %standard-phases
2862 (add-after 'unpack 'fix-paths
2863 (lambda* (#:key inputs #:allow-other-keys)
2864 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2865 "cross-libc" "libc"))))
2866 (substitute* "src/click/_unicodefun.py"
2867 (("'locale'")
2868 (string-append "'" glibc "/bin/locale'"))))
2869 #t))
2870 (replace 'check
2871 (lambda _
2872 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2873 (invoke "python" "-m" "pytest"))))))
2874 (native-inputs
2875 `(("python-pytest" ,python-pytest)))
2876 (home-page "https://palletsprojects.com/p/click/")
2877 (synopsis "Command line library for Python")
2878 (description
2879 "Click is a Python package for creating command line interfaces in a
2880 composable way with as little code as necessary. Its name stands for
2881 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2882 with sensible defaults out of the box.")
2883 (license license:bsd-3)))
2884
2885 (define-public python2-click
2886 (package-with-python2 python-click))
2887
2888 (define-public python-click-5
2889 (package (inherit python-click)
2890 (name "python-click")
2891 (version "5.1")
2892 (source
2893 (origin
2894 (method url-fetch)
2895 (uri (pypi-uri "click" version))
2896 (sha256
2897 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2898 (arguments `())))
2899
2900 (define-public python-vcversioner
2901 (package
2902 (name "python-vcversioner")
2903 (version "2.16.0.0")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "vcversioner" version))
2908 (sha256
2909 (base32
2910 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2911 (build-system python-build-system)
2912 (synopsis "Python library for version number discovery")
2913 (description "Vcversioner is a Python library that inspects tagging
2914 information in a variety of version control systems in order to discover
2915 version numbers.")
2916 (home-page "https://github.com/habnabit/vcversioner")
2917 (license license:isc)))
2918
2919 (define-public python2-vcversioner
2920 (package-with-python2 python-vcversioner))
2921
2922 (define-public python-jdcal
2923 (package
2924 (name "python-jdcal")
2925 (version "1.4")
2926 (source
2927 (origin
2928 (method url-fetch)
2929 (uri (pypi-uri "jdcal" version))
2930 (sha256
2931 (base32
2932 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2933 (build-system python-build-system)
2934 (arguments
2935 `(#:phases (modify-phases %standard-phases
2936 (replace 'check
2937 (lambda _
2938 (invoke "pytest"))))))
2939 (native-inputs
2940 `(("python-pytest" ,python-pytest)))
2941 (home-page "https://github.com/phn/jdcal")
2942 (synopsis "Functions to convert between Julian dates Gregorian dates")
2943 (description "This Python library provides functions for converting
2944 between Julian dates and Gregorian dates.")
2945 (license license:bsd-2)))
2946
2947 (define-public python2-jdcal
2948 (package-with-python2 python-jdcal))
2949
2950 (define-public python-jsondiff
2951 (package
2952 (name "python-jsondiff")
2953 (version "1.2.0")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "jsondiff" version))
2958 (sha256
2959 (base32
2960 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2961 (build-system python-build-system)
2962 (native-inputs
2963 `(("python-nose" ,python-nose)
2964 ("python-nose-random" ,python-nose-random)))
2965 (home-page
2966 "https://github.com/fzumstein/jsondiff")
2967 (synopsis "Compare JSON and JSON-like structures in Python")
2968 (description "@code{jsondiff} is a Python library which lets you
2969 compare, diff, and patch JSON and JSON-like structures in Python.")
2970 (license license:expat)))
2971
2972 (define-public python-jsonschema
2973 (package
2974 (name "python-jsonschema")
2975 (version "3.2.0")
2976 (source (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "jsonschema" version))
2979 (sha256
2980 (base32
2981 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2982 (build-system python-build-system)
2983 (arguments
2984 '(#:phases
2985 (modify-phases %standard-phases
2986 (replace 'check
2987 (lambda* (#:key inputs outputs #:allow-other-keys)
2988 (add-installed-pythonpath inputs outputs)
2989 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2990 (invoke "trial" "jsonschema"))))))
2991 (native-inputs
2992 `(("python-setuptools_scm" ,python-setuptools-scm)
2993 ("python-twisted" ,python-twisted)))
2994 (propagated-inputs
2995 `(("python-attrs" ,python-attrs)
2996 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2997 ("python-pyrsistent" ,python-pyrsistent)
2998 ("python-six" ,python-six)))
2999 (home-page "https://github.com/Julian/jsonschema")
3000 (synopsis "Implementation of JSON Schema for Python")
3001 (description
3002 "Jsonschema is an implementation of JSON Schema for Python.")
3003 (license license:expat)
3004 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3005
3006 (define-public python2-jsonschema
3007 (let ((jsonschema (package-with-python2
3008 (strip-python2-variant python-jsonschema))))
3009 (package/inherit jsonschema
3010 (propagated-inputs
3011 `(("python2-functools32" ,python2-functools32)
3012 ,@(package-propagated-inputs jsonschema))))))
3013
3014 (define-public python-schema
3015 (package
3016 (name "python-schema")
3017 (version "0.6.6")
3018 (source
3019 (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "schema" version))
3022 (sha256
3023 (base32
3024 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3025 (build-system python-build-system)
3026 (native-inputs
3027 `(("python-pytest" ,python-pytest)))
3028 (home-page "https://github.com/keleshev/schema")
3029 (synopsis "Simple data validation library")
3030 (description
3031 "@code{python-schema} is a library for validating Python data
3032 structures, such as those obtained from config-files, forms, external
3033 services or command-line parsing, converted from JSON/YAML (or
3034 something else) to Python data-types.")
3035 (license license:psfl)))
3036
3037 (define-public python2-schema
3038 (package-with-python2 python-schema))
3039
3040 (define-public python-schema-0.5
3041 (package (inherit python-schema)
3042 (version "0.5.0")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (pypi-uri "schema" version))
3047 (sha256
3048 (base32
3049 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3050
3051 (define-public python2-schema-0.5
3052 (package-with-python2 python-schema-0.5))
3053
3054 (define-public python-kitchen
3055 (package
3056 (name "python-kitchen")
3057 (version "1.2.5")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "kitchen" version))
3062 (sha256
3063 (base32
3064 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3065 (build-system python-build-system)
3066 (propagated-inputs
3067 `(("python-chardet" ,python-chardet)))
3068 (home-page "https://github.com/fedora-infra/kitchen")
3069 (synopsis "Python API for snippets")
3070 (description "@code{kitchen} module provides a python API for all sorts of
3071 little useful snippets of code that everybody ends up writing for their projects
3072 but never seem big enough to build an independent release. Use kitchen and stop
3073 cutting and pasting that code over and over.")
3074 (license (list license:lgpl2.1+
3075 ;; subprocess.py, test_subprocess.py,
3076 ;; kitchen/pycompat25/defaultdict.py:
3077 license:psfl))))
3078
3079 (define-public python2-kitchen
3080 (package-with-python2 python-kitchen))
3081
3082 (define-public python-roman
3083 (package
3084 (name "python-roman")
3085 (version "3.3")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "roman" version))
3090 (sha256
3091 (base32
3092 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3093 (build-system python-build-system)
3094 (home-page "https://github.com/zopefoundation/roman")
3095 (synopsis "Integer to Roman numerals converter")
3096 (description
3097 "This package provides a small helper library to convert Arabic Numbers
3098 to Roman Numerals.")
3099 (license license:psfl)))
3100
3101 (define-public python-unidecode
3102 (package
3103 (name "python-unidecode")
3104 (version "1.1.1")
3105 (source (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "Unidecode" version))
3108 (sha256
3109 (base32
3110 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3111 (build-system python-build-system)
3112 (home-page "https://pypi.org/project/Unidecode/")
3113 (synopsis "ASCII transliterations of Unicode text")
3114 (description
3115 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3116 useful when integrating with legacy code that doesn't support Unicode, or for
3117 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3118 machine identifiers from human-readable Unicode strings that should still be
3119 somewhat intelligible.")
3120 (license license:gpl2+)))
3121
3122 (define-public python2-unidecode
3123 (package-with-python2 python-unidecode))
3124
3125 (define-public python-text-unidecode
3126 (package
3127 (name "python-text-unidecode")
3128 (version "1.3")
3129 (source (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "text-unidecode" version))
3132 (sha256
3133 (base32
3134 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3135 (build-system python-build-system)
3136 (arguments
3137 '(#:phases (modify-phases %standard-phases
3138 (replace 'check
3139 (lambda _
3140 (setenv "PYTHONPATH"
3141 (string-append "./build/lib:"
3142 (getenv "PYTHONPATH")))
3143 (invoke "pytest" "-vv"))))))
3144 (native-inputs
3145 `(("python-pytest" ,python-pytest)))
3146 (home-page "https://github.com/kmike/text-unidecode/")
3147 (synopsis "Decode Unicode data")
3148 (description
3149 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3150 Perl library. It can create ASCII representations of Unicode data. In general
3151 users should prefer the @code{python-unidecode} package which offers better
3152 memory usage and transliteration quality.")
3153 ;; The user can choose either license.
3154 (license (list license:clarified-artistic license:gpl2+))))
3155
3156 (define-public python2-text-unidecode
3157 (package-with-python2 python-text-unidecode))
3158
3159 (define-public python-pyjwt
3160 (package
3161 (name "python-pyjwt")
3162 (version "1.7.1")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (pypi-uri "PyJWT" version))
3167 (sha256
3168 (base32
3169 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3170 (modules '((guix build utils)))
3171 (snippet
3172 '(begin
3173 (for-each delete-file-recursively
3174 (find-files "." "\\.pyc$"))
3175 #t))))
3176 (build-system python-build-system)
3177 (arguments
3178 '(#:phases (modify-phases %standard-phases
3179 (replace 'check
3180 (lambda _
3181 ;; Mimic upstream commit 3a20892442b34c7 to get
3182 ;; rid of dependency on pytest-runner < 5.0.
3183 ;; Remove substitution for PyJWT > 1.7.1.
3184 (substitute* "setup.py"
3185 ((".*pytest-runner.*")
3186 ""))
3187 (invoke "pytest" "-vv"))))))
3188 (native-inputs
3189 `(("python-pytest" ,python-pytest)
3190 ("python-pytest-cov" ,python-pytest-cov)))
3191 (home-page "https://github.com/progrium/pyjwt")
3192 (synopsis "JSON Web Token implementation in Python")
3193 (description
3194 "PyJWT is a JSON Web Token implementation written in Python.")
3195 (license license:expat)))
3196
3197 (define-public python2-pyjwt
3198 (package-with-python2 python-pyjwt))
3199
3200 (define-public python-pykka
3201 (package
3202 (name "python-pykka")
3203 (version "1.2.1")
3204 (source
3205 (origin
3206 (method url-fetch)
3207 (uri (pypi-uri "Pykka" version))
3208 (sha256
3209 (base32
3210 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3211 (build-system python-build-system)
3212 (native-inputs
3213 `(("python-mock" ,python-mock)
3214 ("python-nose" ,python-nose)
3215 ("python-gevent" ,python-gevent)
3216 ("python-eventlet" ,python-eventlet)))
3217 (home-page "https://www.pykka.org/")
3218 (synopsis "Pykka is a Python implementation of the actor model")
3219 (description
3220 "Pykka is a Python implementation of the actor model.
3221 The actor model introduces some simple rules to control the sharing
3222 of state and cooperation between execution units, which makes it
3223 easier to build concurrent applications.")
3224 (license license:asl2.0)))
3225
3226 (define-public python-pymsgbox
3227 (package
3228 (name "python-pymsgbox")
3229 (version "1.0.6")
3230 (source
3231 (origin
3232 (method git-fetch)
3233 (uri (git-reference
3234 ;; LICENSE.txt is not present on pypi
3235 (url "https://github.com/asweigart/PyMsgBox")
3236 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3237 (file-name (git-file-name name version))
3238 (sha256
3239 (base32
3240 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3241 (arguments
3242 ;; Circular dependency to run tests:
3243 ;; Tests need pyautogui, which depends on pymsgbox.
3244 '(#:tests? #f))
3245 (build-system python-build-system)
3246 (home-page "https://github.com/asweigart/PyMsgBox")
3247 (synopsis "Python module for JavaScript-like message boxes")
3248 (description
3249 "PyMsgBox is a simple, cross-platform, pure Python module for
3250 JavaScript-like message boxes. Types of dialog boxes include:
3251 @enumerate
3252 @item alert
3253 @item confirm
3254 @item prompt
3255 @item password
3256 @end enumerate
3257 ")
3258 (license license:bsd-3)))
3259
3260 (define-public python-pympler
3261 (package
3262 (name "python-pympler")
3263 (home-page "https://pythonhosted.org/Pympler/")
3264 (version "0.8")
3265 (source (origin
3266 (method url-fetch)
3267 (uri (pypi-uri "Pympler" version))
3268 (sha256
3269 (base32
3270 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3271 (build-system python-build-system)
3272 (arguments
3273 `(#:phases (modify-phases %standard-phases
3274 (delete 'check)
3275 (add-after 'install 'check
3276 (lambda* (#:key inputs outputs #:allow-other-keys)
3277 (add-installed-pythonpath inputs outputs)
3278 (invoke "python" "setup.py" "test"))))))
3279 (synopsis "Measure, monitor and analyze memory behavior")
3280 (description
3281 "Pympler is a development tool to measure, monitor and analyze
3282 the memory behavior of Python objects in a running Python application.
3283
3284 By pympling a Python application, detailed insight in the size and the
3285 lifetime of Python objects can be obtained. Undesirable or unexpected
3286 runtime behavior like memory bloat and other @samp{pymples} can easily
3287 be identified.
3288
3289 A web profiling frontend exposes process statistics, garbage
3290 visualisation and class tracker statistics.")
3291 (license license:asl2.0)))
3292
3293 (define-public python2-pympler
3294 (package-with-python2 python-pympler))
3295
3296 (define-public python-itsdangerous
3297 (package
3298 (name "python-itsdangerous")
3299 (version "1.1.0")
3300 (source
3301 (origin
3302 (method url-fetch)
3303 (uri (pypi-uri "itsdangerous" version))
3304 (sha256
3305 (base32
3306 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3307 (build-system python-build-system)
3308 (home-page "https://palletsprojects.com/p/itsdangerous/")
3309 (synopsis "Python library for passing data to/from untrusted environments")
3310 (description
3311 "Itsdangerous provides various helpers to pass trusted data to untrusted
3312 environments and back.")
3313 (license license:bsd-3)))
3314
3315 (define-public python2-itsdangerous
3316 (package-with-python2 python-itsdangerous))
3317
3318 (define-public python-pyyaml
3319 (package
3320 (name "python-pyyaml")
3321 (version "5.3.1")
3322 (source
3323 (origin
3324 (method url-fetch)
3325 (uri (pypi-uri "PyYAML" version))
3326 (sha256
3327 (base32
3328 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3329 (build-system python-build-system)
3330 (inputs
3331 `(("libyaml" ,libyaml)))
3332 (home-page "https://pyyaml.org")
3333 (synopsis "YAML parser and emitter for Python")
3334 (description
3335 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3336 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3337 API, and sensible error messages. PyYAML supports standard YAML tags and
3338 provides Python-specific tags that represent an arbitrary Python object.")
3339 (license license:expat)))
3340
3341 (define-public python2-pyyaml
3342 (package-with-python2 python-pyyaml))
3343
3344 (define-public python-vine
3345 (package
3346 (name "python-vine")
3347 (version "1.1.4")
3348 (source
3349 (origin
3350 (method url-fetch)
3351 (uri (pypi-uri "vine" version))
3352 (sha256
3353 (base32
3354 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3355 (build-system python-build-system)
3356 (native-inputs
3357 `(("python-pytest" ,python-pytest)
3358 ("python-case" ,python-case)))
3359 (home-page "https://github.com/celery/vine")
3360 (synopsis "Promises for Python")
3361 (description
3362 "@code{vine} provides a special implementation of promises in that it can
3363 be used both for \"promise of a value\" and lazy evaluation. The biggest
3364 upside for this is that everything in a promise can also be a promise,
3365 e.g. filters, callbacks and errbacks can all be promises.")
3366 (license license:bsd-3)))
3367
3368 (define-public python-virtualenv
3369 (package
3370 (name "python-virtualenv")
3371 (version "20.2.1")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (pypi-uri "virtualenv" version))
3376 (sha256
3377 (base32
3378 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3379 (build-system python-build-system)
3380 (native-inputs
3381 `(("python-mock" ,python-mock)
3382 ("python-pytest" ,python-pytest)
3383 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3384 ;; be an input at all". However, removing the input makes the build error:
3385 ;; File "setup.py", line 4, in <module>
3386 ;; raise RuntimeError("setuptools >= 41 required to build")
3387 ("python-setuptools" ,python-setuptools)
3388 ("python-setuptools-scm" ,python-setuptools-scm)))
3389 (propagated-inputs
3390 `(("python-appdirs" ,python-appdirs)
3391 ("python-distlib" ,python-distlib/next)
3392 ("python-filelock" ,python-filelock)
3393 ("python-six" ,python-six)
3394 ("python-importlib-metadata" ,python-importlib-metadata)))
3395 (home-page "https://virtualenv.pypa.io/")
3396 (synopsis "Virtual Python environment builder")
3397 (description
3398 "Virtualenv is a tool to create isolated Python environments.")
3399 (license license:expat)))
3400
3401 (define-public python-markupsafe
3402 (package
3403 (name "python-markupsafe")
3404 (version "1.1.1")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "MarkupSafe" version))
3409 (sha256
3410 (base32
3411 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3412 (build-system python-build-system)
3413 (arguments
3414 `(#:modules ((ice-9 ftw)
3415 (srfi srfi-1)
3416 (srfi srfi-26)
3417 (guix build utils)
3418 (guix build python-build-system))
3419 #:phases (modify-phases %standard-phases
3420 (replace 'check
3421 (lambda _
3422 (let ((cwd (getcwd))
3423 (libdir (find (cut string-prefix? "lib." <>)
3424 (scandir "build"))))
3425 (setenv "PYTHONPATH"
3426 (string-append cwd "/build/" libdir ":"
3427 (getenv "PYTHONPATH")))
3428 (invoke "pytest" "-vv")))))))
3429 (native-inputs
3430 `(("python-pytest" ,python-pytest)))
3431 (home-page "https://github.com/mitsuhiko/markupsafe")
3432 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3433 (description
3434 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3435 for Python.")
3436 (license license:bsd-3)))
3437
3438 (define-public python2-markupsafe
3439 (package-with-python2 python-markupsafe))
3440
3441 (define-public python-jinja2
3442 (package
3443 (name "python-jinja2")
3444 (version "2.11.2")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (pypi-uri "Jinja2" version))
3449 (sha256
3450 (base32
3451 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3452 (build-system python-build-system)
3453 (arguments
3454 '(#:phases (modify-phases %standard-phases
3455 (replace 'check
3456 (lambda* (#:key tests? #:allow-other-keys)
3457 (if tests?
3458 (begin
3459 (setenv "PYTHONPATH"
3460 (string-append "./build/lib:"
3461 (getenv "PYTHONPATH")))
3462 (invoke "pytest" "-vv"))
3463 (format #t "test suite not run~%"))
3464 #t)))))
3465 (native-inputs
3466 `(("python-pytest" ,python-pytest)))
3467 (propagated-inputs
3468 `(("python-markupsafe" ,python-markupsafe)))
3469 (home-page "http://jinja.pocoo.org/")
3470 (synopsis "Python template engine")
3471 (description
3472 "Jinja2 is a small but fast and easy to use stand-alone template engine
3473 written in pure Python.")
3474 (license license:bsd-3)))
3475
3476 (define-public python2-jinja2
3477 (package-with-python2 python-jinja2))
3478
3479 (define-public python-jinja2-time
3480 (package
3481 (name "python-jinja2-time")
3482 (version "0.2.0")
3483 (source
3484 (origin
3485 (method url-fetch)
3486 (uri (pypi-uri "jinja2-time" version))
3487 (sha256
3488 (base32
3489 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3490 (build-system python-build-system)
3491 (propagated-inputs
3492 `(("python-arrow" ,python-arrow)
3493 ("python-jinja2" ,python-jinja2)))
3494 (home-page
3495 "https://github.com/hackebrot/jinja2-time")
3496 (synopsis "Jinja2 Extension for Dates and Times")
3497 (description
3498 "This package provides an extension for the template engine Jinja2. It
3499 adds a 'now' tag providing a convenient access to the arrow.now() API from
3500 templates. A format string can be provided to control the output.")
3501 (license license:expat)))
3502
3503 (define-public python-pystache
3504 (package
3505 (name "python-pystache")
3506 (version "0.5.4")
3507 (source (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "pystache" version))
3510 (sha256
3511 (base32
3512 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3513 (build-system python-build-system)
3514 (arguments
3515 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3516 (home-page "http://defunkt.io/pystache/")
3517 (synopsis "Python logic-less template engine")
3518 (description
3519 "Pystache is a Python implementation of the framework agnostic,
3520 logic-free templating system Mustache.")
3521 (license license:expat)
3522 (properties `((python2-variant . ,(delay python2-pystache))))))
3523
3524 (define-public python2-pystache
3525 (let ((base (package-with-python2
3526 (strip-python2-variant python-pystache))))
3527 (package/inherit base
3528 (arguments
3529 `(#:python ,python-2
3530 #:phases
3531 (modify-phases %standard-phases
3532 (replace 'check
3533 (lambda _
3534 (invoke "python" "test_pystache.py")))))))))
3535
3536 (define-public python-joblib
3537 (package
3538 (name "python-joblib")
3539 (version "0.14.1")
3540 (source (origin
3541 (method url-fetch)
3542 (uri (pypi-uri "joblib" version))
3543 (sha256
3544 (base32
3545 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3546 (build-system python-build-system)
3547 (arguments
3548 `(#:phases
3549 (modify-phases %standard-phases
3550 (replace 'check
3551 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3552 (native-inputs
3553 `(("python-pytest" ,python-pytest)))
3554 (home-page "https://joblib.readthedocs.io/")
3555 (synopsis "Using Python functions as pipeline jobs")
3556 (description
3557 "Joblib is a set of tools to provide lightweight pipelining in Python.
3558 In particular, joblib offers: transparent disk-caching of the output values
3559 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3560 logging and tracing of the execution.")
3561 (license license:bsd-3)))
3562
3563 (define-public python2-joblib
3564 (package-with-python2 python-joblib))
3565
3566 (define-public python-daemon
3567 (package
3568 (name "python-daemon")
3569 (version "2.2.3")
3570 (source
3571 (origin
3572 (method url-fetch)
3573 (uri (pypi-uri "python-daemon" version))
3574 (sha256
3575 (base32
3576 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3577 (build-system python-build-system)
3578 (arguments
3579 `(#:phases
3580 (modify-phases %standard-phases
3581 (add-before 'check 'disable-tests
3582 (lambda _
3583 ;; FIXME: Determine why test fails
3584 (substitute* "test/test_daemon.py"
3585 (("test_detaches_process_context")
3586 "skip_test_detaches_process_context"))
3587 #t)))))
3588 (propagated-inputs
3589 `(("python-lockfile" ,python-lockfile)))
3590 (native-inputs
3591 `(("python-unittest2" ,python-unittest2)
3592 ("python-testtools" ,python-testtools)
3593 ("python-testscenarios" ,python-testscenarios)
3594 ("python-mock" ,python-mock)
3595 ("python-docutils" ,python-docutils)))
3596 (home-page "https://pagure.io/python-daemon/")
3597 (synopsis "Python library for making a Unix daemon process")
3598 (description "Python-daemon is a library that assists a Python program to
3599 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3600
3601 This library provides a @code{DaemonContext} class that manages the following
3602 important tasks for becoming a daemon process:
3603 @enumerate
3604 @item Detach the process into its own process group.
3605 @item Set process environment appropriate for running inside a chroot.
3606 @item Renounce suid and sgid privileges.
3607 @item Close all open file descriptors.
3608 @item Change the working directory, uid, gid, and umask.
3609 @item Set appropriate signal handlers.
3610 @item Open new file descriptors for stdin, stdout, and stderr.
3611 @item Manage a specified PID lock file.
3612 @item Register cleanup functions for at-exit processing.
3613 @end enumerate")
3614 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3615 (license (list license:asl2.0 license:gpl3+))))
3616
3617 (define-public python-anytree
3618 (package
3619 (name "python-anytree")
3620 (version "2.8.0")
3621 (source (origin
3622 (method url-fetch)
3623 (uri (pypi-uri "anytree" version))
3624 (sha256
3625 (base32
3626 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3627 (build-system python-build-system)
3628 (propagated-inputs
3629 `(("python-six" ,python-six)))
3630 (native-inputs
3631 `(;; For tests.
3632 ("graphviz" ,graphviz) ;for 'dot'
3633 ("python-nose" ,python-nose)))
3634 (home-page "https://github.com/c0fec0de/anytree")
3635 (synopsis "Lightweight tree data library")
3636 (description
3637 "@code{anytree} is a simple, lightweight, and extensible tree data
3638 structure for Python.")
3639 (license license:asl2.0)))
3640
3641 (define-public python-docutils
3642 (package
3643 (name "python-docutils")
3644 (version "0.16")
3645 (source
3646 (origin
3647 (method url-fetch)
3648 (uri (pypi-uri "docutils" version))
3649 (sha256
3650 (base32
3651 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3652 (build-system python-build-system)
3653 (arguments
3654 '(#:phases (modify-phases %standard-phases
3655 (replace 'check
3656 (lambda* (#:key tests? #:allow-other-keys)
3657 (if tests?
3658 (invoke "python" "test/alltests.py")
3659 (format #t "test suite not run~%"))
3660 #t)))))
3661 (home-page "http://docutils.sourceforge.net/")
3662 (synopsis "Python Documentation Utilities")
3663 (description
3664 "Docutils is a modular system for processing documentation into useful
3665 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3666 easy to use markup language, for input.
3667
3668 This package provides tools for converting @file{.rst} files to other formats
3669 via commands such as @command{rst2man}, as well as supporting Python code.")
3670 ;; Most of the source code is public domain, but some source files are
3671 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3672 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3673
3674 (define-public python2-docutils
3675 (package-with-python2 python-docutils))
3676
3677 ;; python2-sphinx fails its test suite with newer versions.
3678 (define-public python2-docutils-0.14
3679 (package
3680 (inherit python2-docutils)
3681 (version "0.14")
3682 (source (origin
3683 (method url-fetch)
3684 (uri (pypi-uri "docutils" version))
3685 (sha256
3686 (base32
3687 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3688
3689 (define-public python-restructuredtext-lint
3690 (package
3691 (name "python-restructuredtext-lint")
3692 (version "1.3.0")
3693 (source
3694 (origin
3695 (method url-fetch)
3696 (uri (pypi-uri "restructuredtext-lint" version))
3697 (sha256
3698 (base32
3699 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3700 (build-system python-build-system)
3701 (arguments
3702 `(#:phases
3703 (modify-phases %standard-phases
3704 (delete 'check)
3705 (add-after 'install 'check
3706 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3707 (when tests?
3708 (add-installed-pythonpath inputs outputs)
3709 (invoke "nosetests" "-v"))
3710 #t)))))
3711 (propagated-inputs
3712 `(("python-docutils" ,python-docutils)))
3713 (native-inputs
3714 `(("python-nose" ,python-nose)))
3715 (home-page "https://github.com/twolfson/restructuredtext-lint")
3716 (synopsis "reStructuredText linter")
3717 (description "This package provides a linter for the reStructuredText
3718 format.")
3719 (license license:unlicense)))
3720
3721 (define-public python-doc8
3722 (package
3723 (name "python-doc8")
3724 (version "0.8.0")
3725 (source
3726 (origin
3727 (method url-fetch)
3728 (uri (pypi-uri "doc8" version))
3729 (sha256
3730 (base32
3731 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3732 (build-system python-build-system)
3733 (arguments
3734 `(#:phases
3735 (modify-phases %standard-phases
3736 (delete 'check)
3737 (add-after 'install 'check
3738 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3739 (when tests?
3740 (add-installed-pythonpath inputs outputs)
3741 (invoke "pytest" "-v"))
3742 #t)))))
3743 (propagated-inputs
3744 `(("python-chardet" ,python-chardet)
3745 ("python-docutils" ,python-docutils)
3746 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3747 ("python-six" ,python-six)
3748 ("python-stevedore" ,python-stevedore)))
3749 (native-inputs
3750 `(("python-testtools" ,python-testtools)
3751 ("python-pytest" ,python-pytest)))
3752 (home-page "https://launchpad.net/doc8")
3753 (synopsis
3754 "Style checker for Sphinx (or other) RST documentation")
3755 (description
3756 "Doc8 is an opinionated style checker for reStructured Text and plain
3757 text styles of documentation.")
3758 (license license:asl2.0)))
3759
3760 (define-public python-pygments
3761 (package
3762 (name "python-pygments")
3763 (version "2.7.3")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "Pygments" version))
3768 (sha256
3769 (base32
3770 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
3771 (replacement python-pygments/fixed)
3772 (build-system python-build-system)
3773 (arguments
3774 ;; FIXME: Tests require sphinx, which depends on this.
3775 '(#:tests? #f))
3776 (home-page "https://pygments.org/")
3777 (synopsis "Syntax highlighting")
3778 (description
3779 "Pygments is a syntax highlighting package written in Python.")
3780 (license license:bsd-2)
3781 (properties `((python2-variant . ,(delay python2-pygments))))))
3782
3783 (define python-pygments/fixed
3784 (package/inherit python-pygments
3785 (version "2.7.4")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "Pygments" version))
3790 (sha256
3791 (base32
3792 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
3793
3794 ;; Pygments 2.6 and later does not support Python 2.
3795 (define-public python2-pygments
3796 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3797 (package
3798 (inherit base)
3799 (version "2.5.2")
3800 (source (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "Pygments" version))
3803 (sha256
3804 (base32
3805 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3806
3807 (define-public python-pygments-github-lexers
3808 (package
3809 (name "python-pygments-github-lexers")
3810 (version "0.0.5")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "pygments-github-lexers" version))
3815 (sha256
3816 (base32
3817 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
3818 (build-system python-build-system)
3819 (propagated-inputs
3820 `(("python-pygments" ,python-pygments)))
3821 (home-page "https://github.com/liluo/pygments-github-lexers")
3822 (synopsis "Pygments Github custom lexers")
3823 (description "This package installs Github custom lexers to Pygments.")
3824 (license license:bsd-3)))
3825
3826 (define-public python-bump2version
3827 (package
3828 (name "python-bump2version")
3829 (version "1.0.1")
3830 (source
3831 (origin
3832 (method url-fetch)
3833 (uri (pypi-uri "bump2version" version))
3834 (sha256
3835 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
3836 (build-system python-build-system)
3837 (arguments
3838 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
3839 ;; required: --new-version".
3840 `(#:tests? #false))
3841 (home-page "https://github.com/c4urself/bump2version")
3842 (synopsis "Version-bump your software with a single command!")
3843 (description
3844 "This package provides a small command line tool to simplify releasing
3845 software by updating all version strings in your source code by the correct
3846 increment. It also creates commits and tags.")
3847 (license license:expat)))
3848
3849 (define-public python-bumpversion
3850 (package
3851 (name "python-bumpversion")
3852 (version "0.5.3")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "bumpversion" version))
3857 (sha256
3858 (base32
3859 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3860 (build-system python-build-system)
3861 (home-page "https://github.com/peritus/bumpversion")
3862 (synopsis "Tool to bump software version")
3863 (description "This tool provides a command-line interface (CLI) to bump a
3864 software version simply.")
3865 (license license:expat)))
3866
3867 (define-public python-deprecated
3868 (package
3869 (name "python-deprecated")
3870 (version "1.2.5")
3871 (source
3872 (origin
3873 (method git-fetch)
3874 (uri (git-reference
3875 (url "https://github.com/tantale/deprecated")
3876 (commit (string-append "v" version))))
3877 (file-name (git-file-name name version))
3878 (sha256
3879 (base32
3880 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3881 (build-system python-build-system)
3882 (arguments
3883 `(#:phases (modify-phases %standard-phases
3884 (replace 'check
3885 (lambda _
3886 (invoke "pytest"))))))
3887 (propagated-inputs
3888 `(("python-wrapt" ,python-wrapt)))
3889 (native-inputs
3890 `(("python-bumpversion" ,python-bumpversion)
3891 ("python-pytest" ,python-pytest)
3892 ("python-pytest-cov" ,python-pytest-cov)
3893 ("python-sphinx" ,python-sphinx)
3894 ("python-tox" ,python-tox)))
3895 (home-page "https://github.com/tantale/deprecated")
3896 (synopsis "Python decorator to deprecate classes, functions or methods")
3897 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3898 to deprecate classes, functions or methods.")
3899 (license license:expat)))
3900
3901 (define-public python-pygithub
3902 (package
3903 (name "python-pygithub")
3904 (version "1.54.1")
3905 (source
3906 ;; We fetch from the Git repo because there are no tests in the PyPI
3907 ;; archive.
3908 (origin
3909 (method git-fetch)
3910 (uri (git-reference
3911 (url "https://github.com/PyGithub/PyGithub")
3912 (commit (string-append "v" version))))
3913 (file-name (git-file-name name version))
3914 (sha256
3915 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
3916 (build-system python-build-system)
3917 (arguments
3918 `(#:phases
3919 (modify-phases %standard-phases
3920 (replace 'check
3921 (lambda* (#:key tests? #:allow-other-keys)
3922 (when tests?
3923 (invoke "pytest"))
3924 #t)))))
3925 (propagated-inputs
3926 `(("python-cryptography" ,python-cryptography)
3927 ("python-deprecated" ,python-deprecated)
3928 ("python-pyjwt" ,python-pyjwt)
3929 ("python-requests" ,python-requests)))
3930 (native-inputs
3931 `(("python-httpretty" ,python-httpretty)
3932 ("python-pytest" ,python-pytest)))
3933 (home-page "https://pygithub.readthedocs.io/en/latest/")
3934 (synopsis "Python library for the GitHub API")
3935 (description "This library allows managing GitHub resources such as
3936 repositories, user profiles, and organizations in your Python applications,
3937 using version 3 of the GitHub application programming interface (API).")
3938 (license license:lgpl3+)))
3939
3940 (define-public python-rellu
3941 (package
3942 (name "python-rellu")
3943 (version "0.7")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (pypi-uri "rellu" version))
3948 (sha256
3949 (base32
3950 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3951 (build-system python-build-system)
3952 (propagated-inputs
3953 `(("python-invoke" ,python-invoke)
3954 ("python-pygithub" ,python-pygithub)))
3955 (home-page "https://github.com/robotframework/rellu")
3956 (synopsis "Utilities to create PyPI releases")
3957 (description "This collection of utilities contains tooling and templates
3958 to assist in creating releases on GitHub and publishing them on PyPI. It is
3959 designed to be used by Robot Framework and tools and libraries in its
3960 ecosystem, but can naturally be used also by other projects.")
3961 (license license:asl2.0)))
3962
3963 (define-public python-robotframework
3964 (package
3965 (name "python-robotframework")
3966 (version "3.2.2")
3967 ;; There are no tests in the PyPI archive.
3968 (source
3969 (origin
3970 (method git-fetch)
3971 (uri (git-reference
3972 (url "https://github.com/robotframework/robotframework")
3973 (commit (string-append "v" version))))
3974 (file-name (git-file-name name version))
3975 (sha256
3976 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3977 (patches (search-patches
3978 "python-robotframework-source-date-epoch.patch"))))
3979 (build-system python-build-system)
3980 (arguments
3981 `(#:phases (modify-phases %standard-phases
3982 (add-before 'build 'build-and-install-doc
3983 (lambda* (#:key outputs #:allow-other-keys)
3984 (let* ((doc-output (assoc-ref outputs "doc"))
3985 (doc (string-append doc-output "/share/"
3986 ,name "-" ,version "/")))
3987 (invoke "invoke" "library-docs" "all")
3988 (mkdir-p doc)
3989 (copy-recursively "doc/libraries"
3990 (string-append doc "/libraries"))
3991 #t)))
3992 (replace 'check
3993 (lambda* (#:key inputs #:allow-other-keys)
3994 ;; Some tests require timezone data. Otherwise, they
3995 ;; look up /etc/localtime, which doesn't exist, and fail
3996 ;; with:
3997 ;;
3998 ;; OverflowError: mktime argument out of range
3999 (setenv "TZDIR"
4000 (string-append (assoc-ref inputs "tzdata")
4001 "/share/zoneinfo"))
4002 (setenv "TZ" "Europe/Paris")
4003
4004 (invoke "python" "utest/run.py"))))))
4005 (native-inputs
4006 `(("python-invoke" ,python-invoke)
4007 ("python-rellu" ,python-rellu)
4008 ("python:tk" ,python "tk") ;used when building the HTML doc
4009 ("tzdata" ,tzdata-for-tests)))
4010 (outputs '("out" "doc"))
4011 (home-page "https://robotframework.org")
4012 (synopsis "Generic automation framework")
4013 (description "Robot Framework is a generic automation framework for
4014 acceptance testing, acceptance test driven development (ATDD), and robotic
4015 process automation (RPA).")
4016 (license license:asl2.0)))
4017
4018 (define-public python-robotframework-lint
4019 ;; There is no properly tagged release; the commit below seems to correspond
4020 ;; to the 0.9 stable release available from PyPI. The tests are not
4021 ;; included in the PyPI archive, so we fetch the sources from the upstream
4022 ;; Git repo.
4023 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4024 (revision "0"))
4025 (package
4026 (name "python-robotframework-lint")
4027 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4028 revision commit))
4029 (source
4030 (origin
4031 (method git-fetch)
4032 (uri (git-reference
4033 (url "https://github.com/boakley/robotframework-lint")
4034 (commit commit)))
4035 (file-name (git-file-name name version))
4036 (sha256
4037 (base32
4038 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4039 (build-system python-build-system)
4040 (arguments
4041 `(#:phases
4042 (modify-phases %standard-phases
4043 (replace 'check
4044 (lambda _
4045 (invoke "python" "-m" "robot" "-A"
4046 "tests/conf/default.args" "tests"))))))
4047 (propagated-inputs
4048 `(("python-robotframework" ,python-robotframework)))
4049 (home-page "https://github.com/boakley/robotframework-lint/")
4050 (synopsis "Static analysis tool (linter) for Robot Framework")
4051 (description "This package provides the @code{rflint} command-line
4052 utility, a static analysis tool (linter) for Robot Framework source files.")
4053 (license license:asl2.0))))
4054
4055 (define-public python-robotframework-sshlibrary
4056 (package
4057 (name "python-robotframework-sshlibrary")
4058 (version "3.3.0")
4059 ;; There are no tests in the PyPI archive.
4060 (source
4061 (origin
4062 (method git-fetch)
4063 (uri (git-reference
4064 (url "https://github.com/robotframework/SSHLibrary")
4065 (commit (string-append "v" version))))
4066 (file-name (git-file-name name version))
4067 (sha256
4068 (base32
4069 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4070 (build-system python-build-system)
4071 (arguments
4072 `(#:phases
4073 (modify-phases %standard-phases
4074 (add-before 'build 'build-and-install-doc
4075 (lambda* (#:key outputs #:allow-other-keys)
4076 (let* ((doc-output (assoc-ref outputs "doc"))
4077 (doc (string-append doc-output "/share/"
4078 ,name "-" ,version "/")))
4079 (invoke "chmod" "-R" "+w" "docs")
4080 (invoke "invoke" "kw-docs" "project-docs")
4081 (mkdir-p doc)
4082 (for-each delete-file (find-files "docs" "\\.rst"))
4083 (copy-recursively "docs" doc)
4084 #t)))
4085 (replace 'check
4086 (lambda _
4087 ;; Some tests require an SSH server; we remove them.
4088 (delete-file "utest/test_client_api.py")
4089 (delete-file "utest/test_scp.py")
4090 (invoke "python" "utest/run.py"))))))
4091 (propagated-inputs
4092 `(("python-robotframework" ,python-robotframework)
4093 ("python-paramiko" ,python-paramiko)
4094 ("python-scp" ,python-scp)))
4095 (native-inputs
4096 `(("openssh" ,openssh)
4097 ("which" ,which)
4098 ;; To generate the documentation
4099 ("python-docutils" ,python-docutils)
4100 ("python-invoke" ,python-invoke)
4101 ("python-pygments" ,python-pygments)
4102 ("python-rellu" ,python-rellu)))
4103 (outputs '("out" "doc"))
4104 (home-page "https://github.com/robotframework/SSHLibrary")
4105 (synopsis "Robot Framework library for SSH and SFTP")
4106 (description "SSHLibrary is a Robot Framework library providing support
4107 for SSH and SFTP. It has the following main usages:
4108 @itemize @bullet
4109 @item Executing commands on the remote machine, either blocking or non-blocking.
4110 @item Writing and reading in an interactive shell.
4111 @item Transferring files and directories over SFTP.
4112 @item Ensuring that files and directories exist on the remote machine.
4113 @end itemize")
4114 (license license:asl2.0)))
4115
4116 (define-public python-rstr
4117 (package
4118 (name "python-rstr")
4119 (version "2.2.6")
4120 (source
4121 (origin
4122 (method url-fetch)
4123 (uri (pypi-uri "rstr" version))
4124 (sha256
4125 (base32
4126 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4127 (build-system python-build-system)
4128 (home-page "https://github.com/leapfrogonline/rstr")
4129 (synopsis "Generate random strings in Python")
4130 (description "This package provides a python module for generating
4131 random strings of various types. It could be useful for fuzz testing,
4132 generating dummy data, or other applications. It has no dependencies
4133 outside the standard library.")
4134 (license license:bsd-3)))
4135
4136 (define-public python-scp
4137 (package
4138 (name "python-scp")
4139 (version "0.13.3")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "scp" version))
4144 (sha256
4145 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4146 (build-system python-build-system)
4147 (arguments
4148 '(#:tests? #f)) ;tests require an SSH server
4149 (propagated-inputs
4150 `(("python-paramiko" ,python-paramiko)))
4151 (home-page "https://github.com/jbardin/scp.py")
4152 (synopsis "SCP protocol module for Python and Paramiko")
4153 (description "The scp module extends the Paramiko library to send and
4154 receive files via the SCP1 protocol, as implemented by the OpenSSH
4155 @command{scp} program.")
4156 (license license:gpl2+)))
4157
4158 (define-public python-rst.linker
4159 (package
4160 (name "python-rst.linker")
4161 (version "1.11")
4162 (source
4163 (origin
4164 (method url-fetch)
4165 (uri (pypi-uri "rst.linker" version))
4166 (sha256
4167 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4168 (build-system python-build-system)
4169 (propagated-inputs
4170 `(("python-dateutil" ,python-dateutil)
4171 ("python-six" ,python-six)))
4172 (native-inputs
4173 `(("python-setuptools-scm" ,python-setuptools-scm)))
4174 ;; Test would require path.py, which would introduce a cyclic dependence.
4175 (arguments `(#:tests? #f))
4176 ;; Note: As of version 1.7 the documentation is not worth building.
4177 (home-page "https://github.com/jaraco/rst.linker")
4178 (synopsis "Sphinx plugin to add links and timestamps")
4179 (description "rst.linker automatically replaces text by a
4180 reStructuredText external reference or timestamps. It's primary purpose is to
4181 augment the changelog, but it can be used for other documents, too.")
4182 (license license:expat)))
4183
4184 (define-public python2-rst.linker
4185 (package-with-python2 python-rst.linker))
4186
4187 (define-public python-sshpubkeys
4188 (package
4189 (name "python-sshpubkeys")
4190 (version "3.1.0")
4191 (home-page "https://github.com/ojarva/python-sshpubkeys")
4192 (source (origin
4193 (method git-fetch)
4194 (uri (git-reference
4195 (url home-page)
4196 (commit (string-append "v" version))))
4197 (file-name (git-file-name name version))
4198 (sha256
4199 (base32
4200 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4201 (build-system python-build-system)
4202 (propagated-inputs
4203 `(("python-cryptography" ,python-cryptography)
4204 ("python-ecdsa" ,python-ecdsa)))
4205 (synopsis "OpenSSH public key parser")
4206 (description
4207 "This package provides a library for parsing and validating OpenSSH
4208 public key files.")
4209 (license license:bsd-3)))
4210
4211 (define-public python-feedgenerator
4212 (package
4213 (name "python-feedgenerator")
4214 (version "1.9")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "feedgenerator" version))
4219 (sha256
4220 (base32
4221 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4222 (modules '((guix build utils)))
4223 (snippet
4224 '(begin
4225 ;; Remove pre-compiled .pyc files from source.
4226 (for-each delete-file-recursively
4227 (find-files "." "__pycache__" #:directories? #t))
4228 (for-each delete-file (find-files "." "\\.pyc$"))
4229 #t))))
4230 (build-system python-build-system)
4231 (propagated-inputs
4232 `(("python-pytz" ,python-pytz)
4233 ("python-six" ,python-six)))
4234 (home-page "https://github.com/getpelican/feedgenerator")
4235 (synopsis
4236 "Standalone version of Django's Atom/RSS feed generator")
4237 (description
4238 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4239 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4240 (license license:bsd-3)))
4241
4242 (define-public python2-feedgenerator
4243 (package-with-python2 python-feedgenerator))
4244
4245 (define-public python-jsonrpc-server
4246 (package
4247 (name "python-jsonrpc-server")
4248 (version "0.4.0")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "python-jsonrpc-server" version))
4253 (sha256
4254 (base32
4255 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4256 (build-system python-build-system)
4257 (propagated-inputs
4258 `(("python-mock" ,python-mock)
4259 ("python-pytest" ,python-pytest)
4260 ("python-ujson" ,python-ujson)))
4261 (home-page
4262 "https://github.com/palantir/python-jsonrpc-server")
4263 (synopsis "JSON RPC 2.0 server library")
4264 (description
4265 "This package provides a JSON RPC 2.0 server library for Python.")
4266 (license license:expat)))
4267
4268 (define-public python-pydantic
4269 (package
4270 (name "python-pydantic")
4271 (version "1.6.1")
4272 (source
4273 (origin
4274 (method git-fetch)
4275 (uri (git-reference
4276 (url "https://github.com/samuelcolvin/pydantic")
4277 (commit (string-append "v" version))))
4278 (file-name (git-file-name name version))
4279 (sha256
4280 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4281 (build-system python-build-system)
4282 (arguments
4283 '(#:phases
4284 (modify-phases %standard-phases
4285 ;; Reported upstream:
4286 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4287 ;; Disable the faulty test as the fix is unclear.
4288 (add-before 'check 'disable-test
4289 (lambda _
4290 (substitute* "tests/test_validators.py"
4291 (("test_assert_raises_validation_error")
4292 "_test_assert_raises_validation_error"))
4293 #t))
4294 (replace 'check
4295 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4296 (native-inputs
4297 `(("python-pytest" ,python-pytest)))
4298 (home-page "https://github.com/samuelcolvin/pydantic")
4299 (synopsis "Python data validation and settings management")
4300 (description
4301 "Pydantic enforces type hints at runtime, and provides user friendly
4302 errors when data is invalid.")
4303 (license license:expat)))
4304
4305 (define-public python-pydocstyle
4306 (package
4307 (name "python-pydocstyle")
4308 (version "3.0.0")
4309 (source
4310 (origin
4311 (method url-fetch)
4312 (uri (pypi-uri "pydocstyle" version))
4313 (sha256
4314 (base32
4315 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4316 (build-system python-build-system)
4317 (propagated-inputs
4318 `(("python-six" ,python-six)
4319 ("python-snowballstemmer" ,python-snowballstemmer)))
4320 (home-page
4321 "https://github.com/PyCQA/pydocstyle/")
4322 (synopsis "Python docstring style checker")
4323 (description
4324 "This package provides a style checker for the Python Language
4325 Server (PLS).")
4326 (license license:expat)))
4327
4328 (define-public python-language-server
4329 (package
4330 (name "python-language-server")
4331 (version "0.36.2")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "python-language-server" version))
4336 (sha256
4337 (base32
4338 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4339 (build-system python-build-system)
4340 (propagated-inputs
4341 `(("python-autopep8" ,python-autopep8)
4342 ("python-configparser" ,python-configparser)
4343 ("python-pydocstyle" ,python-pydocstyle)
4344 ("python-future" ,python-future)
4345 ("python-jedi" ,python-jedi)
4346 ("python-jsonrpc-server" ,python-jsonrpc-server)
4347 ("python-pluggy" ,python-pluggy)
4348 ("python-pycodestyle" ,python-pycodestyle)
4349 ("python-pyflakes" ,python-pyflakes)
4350 ("python-rope" ,python-rope)
4351 ("python-ujson" ,python-ujson)
4352 ("python-yapf" ,python-yapf)))
4353 (native-inputs
4354 `(("python-coverage" ,python-coverage)
4355 ("python-flaky" ,python-flaky)
4356 ("python-matplotlib" ,python-matplotlib)
4357 ("python-mock" ,python-mock)
4358 ("python-numpy" ,python-numpy)
4359 ("python-pandas" ,python-pandas)
4360 ("python-pylint" ,python-pylint)
4361 ("python-pytest" ,python-pytest)
4362 ("python-pytest-cov" ,python-pytest-cov)
4363 ("python-versioneer" ,python-versioneer)))
4364 (home-page "https://github.com/palantir/python-language-server")
4365 (synopsis "Python implementation of the Language Server Protocol")
4366 (description
4367 "The Python Language Server (pyls) is an implementation of the Python 3
4368 language specification for the Language Server Protocol (LSP). This tool is
4369 used in text editing environments to provide a complete and integrated
4370 feature-set for programming Python effectively.")
4371 (license license:expat)))
4372
4373 (define-public python-pathspec
4374 (package
4375 (name "python-pathspec")
4376 (version "0.7.0")
4377 (source
4378 (origin
4379 (method url-fetch)
4380 (uri (pypi-uri "pathspec" version))
4381 (sha256
4382 (base32
4383 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4384 (build-system python-build-system)
4385 (home-page "https://github.com/cpburnz/python-path-specification")
4386 (synopsis "Utility library for gitignore style pattern matching of file paths")
4387 (description
4388 "This package provides a utility library for gitignore style pattern
4389 matching of file paths.")
4390 (license license:mpl2.0)))
4391
4392 (define-public python-black
4393 (package
4394 (name "python-black")
4395 (version "20.8b1")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "black" version))
4400 (sha256
4401 (base32
4402 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4403 (build-system python-build-system)
4404 (arguments
4405 `(#:phases
4406 (modify-phases %standard-phases
4407 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4408 (lambda _
4409 (let ((python3 (which "python3")))
4410 (substitute* '("tests/data/fmtonoff.py"
4411 "tests/data/string_prefixes.py"
4412 "tests/data/function.py"
4413 "tests/data/python37.py")
4414 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4415 (string-append "#!" python3 (if (string? minor-version)
4416 minor-version
4417 "")))))
4418 #t))
4419 (add-after 'unpack 'disable-broken-tests
4420 (lambda* (#:key outputs inputs #:allow-other-keys)
4421 ;; Make installed package available for running the tests
4422 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4423 ":" (getenv "PATH")))
4424
4425 ;; These tests are supposed to be skipped when the blackd
4426 ;; dependencies are missing, but this doesn't quite work.
4427 (substitute* "tests/test_black.py"
4428 (("( *)class BlackDTestCase.*" match indent)
4429 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4430 indent "class BlackDTestCase(unittest.TestCase):\n"))
4431 (("web.Application") "False")
4432 (("@unittest_run_loop") ""))
4433
4434 ;; Patching the above file breaks the self test
4435 (substitute* "tests/test_black.py"
4436 (("( *)def test_self" match indent)
4437 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4438
4439 (substitute* "tests/test_black.py"
4440 (("( *)def test_python38" match indent)
4441 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4442 #t)))))
4443 (propagated-inputs
4444 `(("python-click" ,python-click)
4445 ("python-attrs" ,python-attrs)
4446 ("python-appdirs" ,python-appdirs)
4447 ("python-pathspec" ,python-pathspec)
4448 ("python-mypy-extensions" ,python-mypy-extensions)
4449 ("python-regex" ,python-regex)
4450 ("python-toml" ,python-toml)
4451 ("python-typed-ast" ,python-typed-ast)
4452 ("python-typing-extensions" ,python-typing-extensions)))
4453 (native-inputs
4454 `(("python-setuptools-scm" ,python-setuptools-scm)))
4455 (home-page "https://github.com/ambv/black")
4456 (synopsis "The uncompromising code formatter")
4457 (description "Black is the uncompromising Python code formatter.")
4458 (license license:expat)))
4459
4460 (define-public python-black-macchiato
4461 (package
4462 (name "python-black-macchiato")
4463 (version "1.3.0")
4464 (source
4465 (origin
4466 (method url-fetch)
4467 (uri (pypi-uri "black-macchiato" version))
4468 (sha256
4469 (base32
4470 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4471 (build-system python-build-system)
4472 (propagated-inputs
4473 `(("python-black" ,python-black)))
4474 (home-page "https://github.com/wbolster/black-macchiato")
4475 (synopsis "Partial @code{python-black} formatting")
4476 (description
4477 "This package is built on top the @{python-black} code formatter to
4478 enable formatting of partial files.")
4479 (license license:bsd-3)))
4480
4481 (define-public python-blinker
4482 (package
4483 (name "python-blinker")
4484 (version "1.4")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "blinker" version))
4489 (sha256
4490 (base32
4491 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4492 (build-system python-build-system)
4493 (home-page "https://pythonhosted.org/blinker/")
4494 (synopsis "Fast, simple object-to-object and broadcast signaling")
4495 (description
4496 "Blinker provides a fast dispatching system that allows any number of
4497 interested parties to subscribe to events, or \"signals\".")
4498 (license license:expat)))
4499
4500 (define-public python2-blinker
4501 (package-with-python2 python-blinker))
4502
4503 (define-public pelican
4504 (package
4505 (name "pelican")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (pypi-uri "pelican" version))
4511 (sha256
4512 (base32
4513 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4514 (build-system python-build-system)
4515 (propagated-inputs
4516 `(("python-blinker" ,python-blinker)
4517 ("python-dateutil" ,python-dateutil)
4518 ("python-docutils" ,python-docutils)
4519 ("python-feedgenerator" ,python-feedgenerator)
4520 ("python-jinja2" ,python-jinja2)
4521 ("python-markdown" ,python-markdown)
4522 ("python-pygments" ,python-pygments)
4523 ("python-pytz" ,python-pytz)
4524 ("python-six" ,python-six)
4525 ("python-unidecode" ,python-unidecode)))
4526 (home-page "https://getpelican.com/")
4527 (arguments
4528 `(;; XXX Requires a lot more packages to do unit tests :P
4529 #:tests? #f))
4530 (synopsis "Python-based static site publishing system")
4531 (description
4532 "Pelican is a tool to generate a static blog from reStructuredText,
4533 Markdown input files, and more. Pelican uses Jinja2 for templating
4534 and is very extensible.")
4535 (license license:agpl3+)))
4536
4537 (define-public mallard-ducktype
4538 (package
4539 (name "mallard-ducktype")
4540 (version "1.0.2")
4541 (source
4542 (origin
4543 (method git-fetch)
4544 ;; git-reference because tests are not included in pypi source tarball
4545 ;; https://issues.guix.gnu.org/issue/36755#2
4546 (uri (git-reference
4547 (url "https://github.com/projectmallard/mallard-ducktype")
4548 (commit version)))
4549 (file-name (git-file-name name version))
4550 (sha256
4551 (base32
4552 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4553 (build-system python-build-system)
4554 (arguments
4555 '(#:phases
4556 (modify-phases %standard-phases
4557 (replace 'check
4558 (lambda _
4559 (with-directory-excursion "tests"
4560 (invoke "sh" "runtests")))))))
4561 (home-page "http://projectmallard.org")
4562 (synopsis "Convert Ducktype to Mallard documentation markup")
4563 (description
4564 "Ducktype is a lightweight syntax that can represent all the semantics
4565 of the Mallard XML documentation system. Ducktype files can be converted to
4566 Mallard using the @command{ducktype} tool. The yelp-tools package
4567 provides additional functionality on the produced Mallard documents.")
4568 (license license:expat)))
4569
4570 (define-public python-cython
4571 (package
4572 (name "python-cython")
4573 (version "0.29.22")
4574 (source
4575 (origin
4576 (method url-fetch)
4577 (uri (pypi-uri "Cython" version))
4578 (sha256
4579 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4580 (build-system python-build-system)
4581 ;; we need the full python package and not just the python-wrapper
4582 ;; because we need libpython3.3m.so
4583 (inputs
4584 `(("python" ,python)))
4585 (arguments
4586 `(#:phases
4587 (modify-phases %standard-phases
4588 (add-before 'check 'set-HOME
4589 ;; some tests require access to "$HOME/.cython"
4590 (lambda _ (setenv "HOME" "/tmp") #t))
4591 (replace 'check
4592 (lambda _
4593 ;; Disable compiler optimizations to greatly reduce the running
4594 ;; time of the test suite.
4595 (setenv "CFLAGS" "-O0")
4596
4597 (invoke "python" "runtests.py" "-vv"
4598 "-j" (number->string (parallel-job-count))
4599 ;; XXX: On 32-bit architectures, running the parallel tests
4600 ;; fails on many-core systems, see
4601 ;; <https://github.com/cython/cython/issues/2807>.
4602 ,@(if (not (target-64bit?))
4603 '("-x" "run.parallel")
4604 '())))))))
4605 (home-page "https://cython.org/")
4606 (synopsis "C extensions for Python")
4607 (description "Cython is an optimising static compiler for both the Python
4608 programming language and the extended Cython programming language. It makes
4609 writing C extensions for Python as easy as Python itself.")
4610 (license license:asl2.0)
4611 (properties `((python2-variant . ,(delay python2-cython))))))
4612
4613 (define-public python2-cython
4614 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4615 (package/inherit base
4616 (name "python2-cython")
4617 (inputs
4618 `(("python-2" ,python-2))) ;this is not automatically changed
4619 (arguments
4620 (substitute-keyword-arguments (package-arguments base)
4621 ((#:phases phases)
4622 `(modify-phases ,phases
4623 (add-before 'check 'adjust-test_embed
4624 (lambda _
4625 (substitute* "runtests.py"
4626 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4627 ;; so it can give the right -L flag to GCC when embedding static
4628 ;; builds of Python. It is unaware that the Python "config"
4629 ;; directory (where the static library lives) was renamed in
4630 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4631 ;; which works fine, because that is where the shared library is.
4632 ;;
4633 ;; It also appears to be unaware that the Makefile in Demos/embed
4634 ;; already unconditionally pass the static library location to GCC,
4635 ;; after checking sysconfig.get_config_var('LIBPL).
4636 ;;
4637 ;; The effect is that the linker is unable to resolve libexpat
4638 ;; symbols when building for Python 2, because neither the Python 2
4639 ;; shared library nor Expat is available. To fix it, we can either
4640 ;; add Expat as an input and make it visible to the linker, or just
4641 ;; prevent it from overriding the Python shared library location.
4642 ;; The end result is identical, so we take the easy route.
4643 ((" or libname not in os\\.listdir\\(libdir\\)")
4644 ""))
4645 #t)))))))))
4646
4647 ;; The RPython toolchain currently does not support Python 3.
4648 (define-public python2-rpython
4649 (package
4650 (name "python2-rpython")
4651 (version "0.2.1")
4652 (source
4653 (origin
4654 (method url-fetch)
4655 (uri (pypi-uri "rpython" version))
4656 (sha256
4657 (base32
4658 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4659 (build-system python-build-system)
4660 (arguments `(#:python ,python-2))
4661 (native-inputs
4662 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4663 (home-page "https://rpython.readthedocs.org")
4664 (synopsis "Framework for implementing interpreters and virtual machines")
4665 (description "RPython is a translation and support framework for
4666 producing implementations of dynamic languages, emphasizing a clean separation
4667 between language specification and implementation aspects.")
4668 (license license:expat)))
4669
4670 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4671 ;; python-scipy still build, as these three packages are often used together.
4672 (define-public python-numpy
4673 (package
4674 (name "python-numpy")
4675 (version "1.17.3")
4676 (source
4677 (origin
4678 (method url-fetch)
4679 (uri (string-append
4680 "https://github.com/numpy/numpy/releases/download/v"
4681 version "/numpy-" version ".tar.gz"))
4682 (sha256
4683 (base32
4684 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4685 (build-system python-build-system)
4686 (inputs
4687 `(("openblas" ,openblas)
4688 ("lapack" ,lapack)))
4689 (native-inputs
4690 `(("python-cython" ,python-cython)
4691 ("python-pytest" ,python-pytest)
4692 ("gfortran" ,gfortran)))
4693 (arguments
4694 `(#:phases
4695 (modify-phases %standard-phases
4696 (add-before 'build 'configure-blas-lapack
4697 (lambda* (#:key inputs #:allow-other-keys)
4698 (call-with-output-file "site.cfg"
4699 (lambda (port)
4700 (format port
4701 "[openblas]
4702 libraries = openblas
4703 library_dirs = ~a/lib
4704 include_dirs = ~a/include
4705
4706 # backslash-n to make emacs happy
4707 \n[lapack]
4708 lapack_libs = lapack
4709 library_dirs = ~a/lib
4710 include_dirs = ~a/include
4711 "
4712 (assoc-ref inputs "openblas")
4713 (assoc-ref inputs "openblas")
4714 (assoc-ref inputs "lapack")
4715 (assoc-ref inputs "lapack"))))
4716 #t))
4717 (add-before 'build 'fix-executable-paths
4718 (lambda* (#:key inputs #:allow-other-keys)
4719 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4720 ;; instead of /bin/sh.
4721 (substitute* "numpy/distutils/exec_command.py"
4722 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4723 (string-append match-start (assoc-ref inputs "bash") match-end)))
4724 ;; Use "gcc" executable, not "cc".
4725 (substitute* "numpy/distutils/system_info.py"
4726 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4727 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4728 #t))
4729 ;; Tests can only be run after the library has been installed and not
4730 ;; within the source directory.
4731 (delete 'check)
4732 (add-after 'install 'check
4733 (lambda* (#:key outputs inputs #:allow-other-keys)
4734 ;; Make installed package available for running the tests
4735 (add-installed-pythonpath inputs outputs)
4736 ;; Make sure "f2py" etc is found.
4737 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4738 ":" (getenv "PATH")))
4739 (with-directory-excursion "/tmp"
4740 (invoke "python" "-c"
4741 "import numpy; numpy.test(verbose=2)")))))))
4742 (home-page "https://numpy.org")
4743 (synopsis "Fundamental package for scientific computing with Python")
4744 (description "NumPy is the fundamental package for scientific computing
4745 with Python. It contains among other things: a powerful N-dimensional array
4746 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4747 and Fortran code, useful linear algebra, Fourier transform, and random number
4748 capabilities.")
4749 (properties `((python2-variant . ,(delay python2-numpy))))
4750 (license license:bsd-3)))
4751
4752 ;; Numpy 1.16.x are the last versions that support Python 2.
4753 (define-public python2-numpy
4754 (let ((numpy (package-with-python2
4755 (strip-python2-variant python-numpy))))
4756 (package/inherit
4757 numpy
4758 (version "1.16.5")
4759 (source (origin
4760 (method url-fetch)
4761 (uri (string-append
4762 "https://github.com/numpy/numpy/releases/download/v"
4763 version "/numpy-" version ".tar.gz"))
4764 (sha256
4765 (base32
4766 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4767
4768 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4769 ;; interest only for legacy code going back to NumPy's predecessor
4770 ;; Numeric.
4771 (define-public python2-numpy-1.8
4772 (package (inherit python2-numpy)
4773 (version "1.8.2")
4774 (source
4775 (origin
4776 (method git-fetch)
4777 (uri (git-reference
4778 (url "https://github.com/numpy/numpy")
4779 (commit (string-append "v" version))))
4780 (file-name (git-file-name "numpy" version))
4781 (sha256
4782 (base32
4783 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4784 (arguments
4785 (substitute-keyword-arguments (package-arguments python2-numpy)
4786 ((#:phases phases)
4787 `(modify-phases ,phases
4788 (replace 'configure-blas-lapack
4789 (lambda* (#:key inputs #:allow-other-keys)
4790 (call-with-output-file "site.cfg"
4791 (lambda (port)
4792 (format port
4793 "[openblas]
4794 libraries = openblas,lapack
4795 library_dirs = ~a/lib:~a/lib
4796 include_dirs = ~a/include:~a/include
4797 "
4798 (assoc-ref inputs "openblas")
4799 (assoc-ref inputs "lapack")
4800 (assoc-ref inputs "openblas")
4801 (assoc-ref inputs "lapack"))))
4802 #t))))))
4803 (native-inputs
4804 `(("python2-nose" ,python2-nose)))
4805 (description "NumPy is the fundamental package for scientific computing
4806 with Python. It contains among other things: a powerful N-dimensional array
4807 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4808 and Fortran code, useful linear algebra, Fourier transform, and random number
4809 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4810 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4811 Numeric.")
4812 (license license:bsd-3)))
4813
4814 (define-public python-munch
4815 (package
4816 (name "python-munch")
4817 (version "2.0.4")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri (pypi-uri "munch" version))
4822 (sha256
4823 (base32
4824 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4825 (build-system python-build-system)
4826 (home-page "https://github.com/Infinidat/munch")
4827 (synopsis "Dot-accessible dictionary")
4828 (description "Munch is a dot-accessible dictionary similar to JavaScript
4829 objects.")
4830 (license license:expat)))
4831
4832 (define-public python2-munch
4833 (package-with-python2 python-munch))
4834
4835 (define-public python-colormath
4836 (package
4837 (name "python-colormath")
4838 (version "3.0.0")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (pypi-uri "colormath" version))
4843 (sha256
4844 (base32
4845 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4846 (build-system python-build-system)
4847 (propagated-inputs
4848 `(("python-networkx" ,python-networkx)
4849 ("python-numpy" ,python-numpy)))
4850 (home-page "https://github.com/gtaylor/python-colormath")
4851 (synopsis "Color math and conversion library")
4852 (description
4853 "This is a Python library for color math and conversions.")
4854 (license license:bsd-3)))
4855
4856 (define-public python2-colormath
4857 (package-with-python2 python-colormath))
4858
4859 (define-public python-spectra
4860 (package
4861 (name "python-spectra")
4862 (version "0.0.11")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri (pypi-uri "spectra" version))
4867 (sha256
4868 (base32
4869 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4870 (build-system python-build-system)
4871 (arguments
4872 `(#:phases
4873 (modify-phases %standard-phases
4874 (replace 'check
4875 (lambda _ (invoke "nosetests" "-v"))))))
4876 (propagated-inputs
4877 `(("python-colormath" ,python-colormath)))
4878 (native-inputs
4879 `(("python-nose" ,python-nose)))
4880 (home-page "https://github.com/jsvine/spectra")
4881 (synopsis "Color scales and color conversion")
4882 (description
4883 "This package provides a Python library intended to make color math,
4884 color scales, and color space conversion easy. It has support for:
4885
4886 @enumerate
4887 @item Color scales
4888 @item Color ranges
4889 @item Color blending
4890 @item Brightening/darkening colors
4891 @item Saturating/desaturating colors
4892 @item Conversion to/from multiple color spaces.
4893 @end enumerate\n")
4894 (license license:expat)))
4895
4896 (define-public python2-spectra
4897 (package-with-python2 python-spectra))
4898
4899 (define-public python-numpy-documentation
4900 (package
4901 (name "python-numpy-documentation")
4902 (version (package-version python-numpy))
4903 (source (package-source python-numpy))
4904 (build-system python-build-system)
4905 (native-inputs
4906 `(("python-matplotlib" ,python-matplotlib)
4907 ("python-numpy" ,python-numpy)
4908 ("pkg-config" ,pkg-config)
4909 ("python-sphinx" ,python-sphinx)
4910 ("python-numpydoc" ,python-numpydoc)
4911 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4912 texlive-fonts-ec
4913 texlive-generic-ifxetex
4914 texlive-generic-pdftex
4915 texlive-amsfonts
4916 texlive-latex-capt-of
4917 texlive-latex-cmap
4918 texlive-latex-environ
4919 texlive-latex-eqparbox
4920 texlive-latex-etoolbox
4921 texlive-latex-expdlist
4922 texlive-latex-fancyhdr
4923 texlive-latex-fancyvrb
4924 texlive-latex-fncychap
4925 texlive-latex-float
4926 texlive-latex-framed
4927 texlive-latex-geometry
4928 texlive-latex-graphics
4929 texlive-latex-hyperref
4930 texlive-latex-mdwtools
4931 texlive-latex-multirow
4932 texlive-latex-needspace
4933 texlive-latex-oberdiek
4934 texlive-latex-parskip
4935 texlive-latex-preview
4936 texlive-latex-tabulary
4937 texlive-latex-threeparttable
4938 texlive-latex-titlesec
4939 texlive-latex-trimspaces
4940 texlive-latex-ucs
4941 texlive-latex-upquote
4942 texlive-latex-url
4943 texlive-latex-varwidth
4944 texlive-latex-wrapfig)))
4945 ("texinfo" ,texinfo)
4946 ("perl" ,perl)
4947 ("scipy-sphinx-theme"
4948 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
4949 (origin ;the build script expects scipy-sphinx-theme as a git submodule
4950 (method git-fetch)
4951 (uri (git-reference
4952 (url "https://github.com/scipy/scipy-sphinx-theme")
4953 (commit commit)))
4954 (file-name (git-file-name "python-scipy-sphinx-theme"
4955 (string-take commit 7)))
4956 (sha256
4957 (base32
4958 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
4959 ,@(package-native-inputs python-numpy)))
4960 (arguments
4961 `(#:tests? #f ; we're only generating the documentation
4962 #:phases
4963 (modify-phases %standard-phases
4964 (delete 'build)
4965 (replace 'install
4966 (lambda* (#:key inputs outputs #:allow-other-keys)
4967 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4968 (doc (string-append
4969 data "/doc/" ,name "-"
4970 ,(package-version python-numpy)))
4971 (info-reader (string-append data "/info"))
4972 (html (string-append doc "/html"))
4973 (scipy-sphinx-theme "scipy-sphinx-theme")
4974 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4975 (pyver ,(string-append "PYVER=")))
4976
4977 ;; FIXME: this is needed to for texlive-union to generate
4978 ;; fonts, which are not found.
4979 (setenv "HOME" "/tmp")
4980
4981 (with-directory-excursion "doc"
4982 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4983 (mkdir-p html)
4984 (invoke "make" "html" pyver)
4985 (invoke "make" "latex" "PAPER=a4" pyver)
4986 (invoke "make" "-C" "build/latex"
4987 "all-pdf" "PAPER=a4" pyver)
4988 ;; FIXME: Generation of the info file fails.
4989 ;; (invoke "make" "info" pyver)
4990 ;; (mkdir-p info)
4991 ;; (copy-file "build/texinfo/numpy.info"
4992 ;; (string-append info "/numpy.info"))
4993 (for-each (lambda (file)
4994 (copy-file (string-append "build/latex" file)
4995 (string-append doc file)))
4996 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4997 (with-directory-excursion "build/html"
4998 (for-each (lambda (file)
4999 (let* ((dir (dirname file))
5000 (tgt-dir (string-append html "/" dir)))
5001 (unless (equal? "." dir)
5002 (mkdir-p tgt-dir))
5003 (install-file file html)))
5004 (find-files "." ".*")))))
5005 #t)))))
5006 (home-page (package-home-page python-numpy))
5007 (synopsis "Documentation for the python-numpy package")
5008 (description (package-description python-numpy))
5009 (license (package-license python-numpy))))
5010
5011 (define-public python2-numpy-documentation
5012 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
5013 (package
5014 (inherit numpy-documentation)
5015 (native-inputs `(("python2-functools32" ,python2-functools32)
5016 ,@(package-native-inputs numpy-documentation))))))
5017
5018 (define-public python-pygit2
5019 (package
5020 (name "python-pygit2")
5021 (version "1.4.0")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "pygit2" version))
5026 (sha256
5027 (base32 "1j71iskvirkm8jzfmwdm79v69878m9iix8a8cn4xidgr3nmkisyb"))))
5028 (build-system python-build-system)
5029 (arguments
5030 '(#:tests? #f)) ; tests don't run correctly in our environment
5031 (propagated-inputs
5032 `(("python-cached-property" ,python-cached-property)
5033 ("python-cffi" ,python-cffi)
5034 ("libgit2" ,libgit2)))
5035 (native-inputs
5036 `(("python-pytest" ,python-pytest)))
5037 (home-page "https://github.com/libgit2/pygit2")
5038 (synopsis "Python bindings for libgit2")
5039 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5040 library, libgit2 implements Git plumbing.")
5041 ;; GPL2.0 only, with linking exception.
5042 (license license:gpl2)))
5043
5044 (define-public python-patiencediff
5045 (package
5046 (name "python-patiencediff")
5047 (version "0.2.0")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "patiencediff" version))
5052 (sha256
5053 (base32
5054 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5055 (build-system python-build-system)
5056 (home-page "https://www.breezy-vcs.org/")
5057 (synopsis "Python implementation of the patiencediff algorithm")
5058 (description
5059 "This package contains a Python implementation of the @code{patiencediff}
5060 algorithm. Patiencediff provides a good balance of performance, nice output for
5061 humans, and implementation simplicity.")
5062 (license license:gpl2)))
5063
5064 (define-public python-pdftotext
5065 (package
5066 (name "python-pdftotext")
5067 (version "2.1.5")
5068 (source
5069 (origin
5070 (method url-fetch)
5071 (uri (pypi-uri "pdftotext" version))
5072 (sha256
5073 (base32
5074 "19la1cw1hmkcr8big04gm2dd5fw0y0z97g930aiy29s1gaqbiblq"))))
5075 (build-system python-build-system)
5076 (inputs
5077 `(("poppler" ,poppler)))
5078 (home-page "https://github.com/jalan/pdftotext")
5079 (synopsis "Simple PDF text extraction")
5080 (description "Pdftotext is a Python library of PDF text extraction.")
5081 (license license:expat)))
5082
5083 (define-public python-pyparsing
5084 (package
5085 (name "python-pyparsing")
5086 (version "2.4.6")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (pypi-uri "pyparsing" version))
5091 (sha256
5092 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5093 (build-system python-build-system)
5094 (outputs '("out" "doc"))
5095 (arguments
5096 `(#:tests? #f ; no test target
5097 #:phases
5098 (modify-phases %standard-phases
5099 (add-after 'install 'install-doc
5100 (lambda* (#:key outputs #:allow-other-keys)
5101 (let* ((doc (string-append (assoc-ref outputs "doc")
5102 "/share/doc/" ,name "-" ,version))
5103 (html-doc (string-append doc "/html"))
5104 (examples (string-append doc "/examples")))
5105 (mkdir-p html-doc)
5106 (mkdir-p examples)
5107 (for-each
5108 (lambda (dir tgt)
5109 (map (lambda (file)
5110 (install-file file tgt))
5111 (find-files dir ".*")))
5112 (list "docs" "htmldoc" "examples")
5113 (list doc html-doc examples))
5114 #t))))))
5115 (home-page "https://github.com/pyparsing/pyparsing")
5116 (synopsis "Python parsing class library")
5117 (description
5118 "The pyparsing module is an alternative approach to creating and
5119 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5120 of regular expressions. The pyparsing module provides a library of classes
5121 that client code uses to construct the grammar directly in Python code.")
5122 (license license:expat)))
5123
5124 (define-public python2-pyparsing
5125 (package-with-python2 python-pyparsing))
5126
5127 (define-public python-pyparsing-2.4.7
5128 (package
5129 (inherit python-pyparsing)
5130 (version "2.4.7")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (pypi-uri "pyparsing" version))
5135 (sha256
5136 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5137
5138 (define-public python-numpydoc
5139 (package
5140 (name "python-numpydoc")
5141 (version "0.8.0")
5142 (source
5143 (origin
5144 (method url-fetch)
5145 (uri (pypi-uri "numpydoc" version))
5146 (sha256
5147 (base32
5148 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5149 (build-system python-build-system)
5150 (propagated-inputs
5151 `(("python-sphinx" ,python-sphinx)))
5152 (native-inputs
5153 `(("python-nose" ,python-nose)))
5154 (home-page "https://pypi.org/project/numpydoc/")
5155 (synopsis
5156 "Numpy's Sphinx extensions")
5157 (description
5158 "Sphinx extension to support docstrings in Numpy format.")
5159 (license license:bsd-2)
5160 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5161
5162 (define-public python2-numpydoc
5163 (let ((base (package-with-python2
5164 (strip-python2-variant python-numpydoc))))
5165 (package/inherit base
5166 (propagated-inputs
5167 `(("python2-jinja2" ,python2-jinja2)
5168 ,@(package-propagated-inputs base))))))
5169
5170 (define-public python-numexpr
5171 (package
5172 (name "python-numexpr")
5173 (version "2.6.5")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "numexpr" version))
5178 (sha256
5179 (base32
5180 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5181 (build-system python-build-system)
5182 (arguments `(#:tests? #f)) ; no tests included
5183 (propagated-inputs
5184 `(("python-numpy" ,python-numpy)))
5185 (home-page "https://github.com/pydata/numexpr")
5186 (synopsis "Fast numerical expression evaluator for NumPy")
5187 (description
5188 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5189 expressions that operate on arrays are accelerated and use less memory than
5190 doing the same calculation in Python. In addition, its multi-threaded
5191 capabilities can make use of all your cores, which may accelerate
5192 computations, most specially if they are not memory-bounded (e.g. those using
5193 transcendental functions).")
5194 (license license:expat)))
5195
5196 (define-public python2-numexpr
5197 (package-with-python2 python-numexpr))
5198
5199 (define-public python-cycler
5200 (package
5201 (name "python-cycler")
5202 (version "0.10.0")
5203 (source (origin
5204 (method url-fetch)
5205 (uri (pypi-uri "cycler" version))
5206 (sha256
5207 (base32
5208 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5209 (build-system python-build-system)
5210 (arguments
5211 ;; XXX: The current version requires 'coveralls' which we don't have.
5212 ;; Enable this for the next release which uses 'python-pytest'.
5213 '(#:tests? #f))
5214 (propagated-inputs
5215 `(("python-six" ,python-six)))
5216 (home-page "https://matplotlib.org/cycler/")
5217 (synopsis "Composable keyword argument iterator")
5218 (description
5219 "When using @code{matplotlib} and plotting more than one line, it is
5220 common to want to be able to want to be able to cycle over one or more artist
5221 styles; but the plotting logic can quickly become involved.
5222 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5223 @code{Cycler} class was developed.")
5224 (license license:bsd-3)))
5225
5226 (define-public python2-cycler
5227 (package-with-python2 python-cycler))
5228
5229 (define-public python-colorspacious
5230 (package
5231 (name "python-colorspacious")
5232 (version "1.1.2")
5233 (source
5234 (origin
5235 (method git-fetch)
5236 (uri (git-reference
5237 (url "https://github.com/njsmith/colorspacious")
5238 (commit (string-append "v" version))))
5239 (file-name (git-file-name name version))
5240 (sha256
5241 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5242 (build-system python-build-system)
5243 (propagated-inputs
5244 `(("python-numpy" ,python-numpy)))
5245 (native-inputs
5246 `(("python-nose" ,python-nose)))
5247 (arguments
5248 `(#:phases
5249 (modify-phases %standard-phases
5250 (replace 'check
5251 (lambda _
5252 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5253 (home-page "https://github.com/njsmith/colorspacious")
5254 (synopsis "Python library for colorspace conversions")
5255 (description "@code{colorspacious} is a Python library that lets you
5256 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5257 (license license:expat)))
5258
5259 (define-public python2-colorspacious
5260 (package-with-python2 python-colorspacious))
5261
5262 (define-public python-matplotlib
5263 (package
5264 (name "python-matplotlib")
5265 (version "3.1.2")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "matplotlib" version))
5270 (sha256
5271 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5272 (patches
5273 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5274 (build-system python-build-system)
5275 (propagated-inputs ; the following packages are all needed at run time
5276 `(("python-cycler" ,python-cycler)
5277 ("python-kiwisolver" ,python-kiwisolver)
5278 ("python-pyparsing" ,python-pyparsing)
5279 ("python-pygobject" ,python-pygobject)
5280 ("gobject-introspection" ,gobject-introspection)
5281 ("python-tkinter" ,python "tk")
5282 ("python-dateutil" ,python-dateutil)
5283 ("python-numpy" ,python-numpy)
5284 ("python-pillow" ,python-pillow)
5285 ("python-pytz" ,python-pytz)
5286 ("python-six" ,python-six)
5287 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5288 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5289 ;; object. For this reason we need to import both libraries.
5290 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5291 ("python-pycairo" ,python-pycairo)
5292 ("python-cairocffi" ,python-cairocffi)))
5293 (inputs
5294 `(("libpng" ,libpng)
5295 ("freetype" ,freetype)
5296 ("cairo" ,cairo)
5297 ("glib" ,glib)
5298 ;; FIXME: Add backends when available.
5299 ;("python-wxpython" ,python-wxpython)
5300 ("tcl" ,tcl)
5301 ("tk" ,tk)))
5302 (native-inputs
5303 `(("pkg-config" ,pkg-config)
5304 ("python-pytest" ,python-pytest)
5305 ("python-mock" ,python-mock)
5306 ("unzip" ,unzip)
5307 ("jquery-ui"
5308 ,(origin
5309 (method url-fetch)
5310 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5311 (sha256
5312 (base32
5313 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5314 (arguments
5315 `(#:phases
5316 (modify-phases %standard-phases
5317 ;; XXX We disable all image comparison tests because we're using a
5318 ;; newer version of FreeType than matplotlib expects. This leads to
5319 ;; minor differences throughout the tests.
5320 (add-after 'unpack 'fix-and-disable-failing-tests
5321 (lambda _
5322 (substitute* (append (find-files "lib/matplotlib/tests/"
5323 "test_.*\\.py$")
5324 (find-files "lib/mpl_toolkits/tests"
5325 "test_.*\\.py$"))
5326 (("^from matplotlib" match)
5327 (string-append "import pytest\n" match))
5328 (("( *)@image_comparison" match indent)
5329 (string-append indent
5330 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5331 match)))
5332 (substitute* "lib/matplotlib/tests/test_animation.py"
5333 (("/bin/sh") (which "sh")))
5334 (for-each delete-file
5335 ;; test_normal_axes, test_get_tightbbox_polar
5336 '("lib/matplotlib/tests/test_axes.py"
5337 ;; We don't use the webagg backend and this test forces it.
5338 "lib/matplotlib/tests/test_backend_webagg.py"
5339 ;; test_outward_ticks
5340 "lib/matplotlib/tests/test_tightlayout.py"
5341 ;; test_hidden_axes fails with minor extent
5342 ;; differences, possibly due to the use of a
5343 ;; different version of FreeType.
5344 "lib/matplotlib/tests/test_constrainedlayout.py"
5345 ;; Fontconfig returns no fonts.
5346 "lib/matplotlib/tests/test_font_manager.py"))
5347 #t))
5348 (add-before 'install 'install-jquery-ui
5349 (lambda* (#:key outputs inputs #:allow-other-keys)
5350 (let ((dir (string-append (assoc-ref outputs "out")
5351 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5352 (mkdir-p dir)
5353 (invoke "unzip"
5354 (assoc-ref inputs "jquery-ui")
5355 "-d" dir))
5356 #t))
5357 (replace 'check
5358 (lambda* (#:key outputs inputs #:allow-other-keys)
5359 (add-installed-pythonpath inputs outputs)
5360 (invoke "python" "tests.py" "-v"
5361 "-m" "not network and not webagg")))
5362 (add-before 'build 'configure-environment
5363 (lambda* (#:key outputs inputs #:allow-other-keys)
5364 (let ((cairo (assoc-ref inputs "cairo")))
5365 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5366 ;; has not effect.
5367 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5368 (setenv "HOME" (getcwd))
5369 ;; Fix rounding errors when using the x87 FPU.
5370 (when (string-prefix? "i686" ,(%current-system))
5371 (setenv "CFLAGS" "-ffloat-store"))
5372 (call-with-output-file "setup.cfg"
5373 (lambda (port)
5374 (format port "[directories]~%
5375 basedirlist = ~a,~a~%
5376 [packages]~%
5377 tests = True~%"
5378 (assoc-ref inputs "tcl")
5379 (assoc-ref inputs "tk")))))
5380 #t)))))
5381 (home-page "https://matplotlib.org/")
5382 (synopsis "2D plotting library for Python")
5383 (description
5384 "Matplotlib is a Python 2D plotting library which produces publication
5385 quality figures in a variety of hardcopy formats and interactive environments
5386 across platforms. Matplotlib can be used in Python scripts, the python and
5387 ipython shell, web application servers, and six graphical user interface
5388 toolkits.")
5389 (license license:psfl)
5390 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5391
5392 (define-public python2-matplotlib
5393 (let ((matplotlib (package-with-python2
5394 (strip-python2-variant python-matplotlib))))
5395 (package (inherit matplotlib)
5396 (version "2.2.4")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (pypi-uri "matplotlib" version))
5401 (sha256
5402 (base32
5403 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5404 (arguments
5405 (substitute-keyword-arguments (package-arguments matplotlib)
5406 ((#:phases phases)
5407 `(modify-phases ,phases
5408 (replace 'install-jquery-ui
5409 (lambda* (#:key outputs inputs #:allow-other-keys)
5410 (let ((dir (string-append (assoc-ref outputs "out")
5411 "/lib/python2.7/site-packages/"
5412 "matplotlib/backends/web_backend/")))
5413 (mkdir-p dir)
5414 (invoke "unzip"
5415 (assoc-ref inputs "jquery-ui")
5416 "-d" dir))
5417 #t))
5418 (delete 'fix-and-disable-failing-tests)
5419 (delete 'check))))) ; These tests weren't run the the past.
5420 ;; Make sure to use special packages for Python 2 instead
5421 ;; of those automatically rewritten by package-with-python2.
5422 (propagated-inputs
5423 `(("python2-pycairo" ,python2-pycairo)
5424 ("python2-backports-functools-lru-cache"
5425 ,python2-backports-functools-lru-cache)
5426 ("python2-functools32" ,python2-functools32)
5427 ("python2-pygobject-2" ,python2-pygobject-2)
5428 ("python2-subprocess32" ,python2-subprocess32)
5429 ("python2-tkinter" ,python-2 "tk")
5430 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5431 '("python-cairocffi"
5432 "python-pycairo"
5433 "python-pygobject"
5434 "python-tkinter")))))))
5435
5436 (define-public python-matplotlib-documentation
5437 (package
5438 (name "python-matplotlib-documentation")
5439 (version (package-version python-matplotlib))
5440 (source (package-source python-matplotlib))
5441 (build-system python-build-system)
5442 (native-inputs
5443 `(("python-matplotlib" ,python-matplotlib)
5444 ("python-colorspacious" ,python-colorspacious)
5445 ("python-sphinx" ,python-sphinx)
5446 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5447 ("python-sphinx-gallery" ,python-sphinx-gallery)
5448 ("python-numpydoc" ,python-numpydoc)
5449 ("python-ipython" ,python-ipython)
5450 ("python-ipykernel" ,python-ipykernel)
5451 ("python-mock" ,python-mock)
5452 ("graphviz" ,graphviz)
5453 ("texlive" ,(texlive-union (list texlive-amsfonts
5454 texlive-latex-amsmath
5455 texlive-latex-enumitem
5456 texlive-latex-expdlist
5457 texlive-latex-geometry
5458 texlive-latex-preview
5459 texlive-latex-type1cm
5460 texlive-latex-ucs
5461
5462 texlive-generic-pdftex
5463
5464 texlive-fonts-ec
5465 texlive-fonts-adobe-times
5466 texlive-fonts-txfonts)))
5467 ("texinfo" ,texinfo)
5468 ,@(package-native-inputs python-matplotlib)))
5469 (arguments
5470 `(#:tests? #f ; we're only generating documentation
5471 #:phases
5472 (modify-phases %standard-phases
5473 ;; The tests in python-matplotlib are run after the install phase, so
5474 ;; we need to delete the extra phase here.
5475 (delete 'check)
5476 (replace 'build
5477 (lambda _
5478 (chdir "doc")
5479 (setenv "PYTHONPATH"
5480 (string-append (getenv "PYTHONPATH")
5481 ":" (getcwd) "/../examples/units"))
5482 (substitute* "conf.py"
5483 ;; Don't use git.
5484 (("^SHA = check_output.*")
5485 (string-append "SHA = \"" ,version "\"\n"))
5486 ;; Don't fetch intersphinx files from the Internet
5487 (("^explicit_order_folders" m)
5488 (string-append "intersphinx_mapping = {}\n" m))
5489 (("'sphinx.ext.intersphinx',") "")
5490 ;; Disable URL embedding which requires internet access.
5491 (("'https://docs.scipy.org/doc/numpy'") "None")
5492 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5493 (invoke "make"
5494 "SPHINXBUILD=sphinx-build"
5495 "SPHINXOPTS=" ; don't abort on warnings
5496 "html" "texinfo")))
5497 (replace 'install
5498 (lambda* (#:key inputs outputs #:allow-other-keys)
5499 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5500 (doc (string-append data "/doc/python-matplotlib-" ,version))
5501 (info (string-append data "/info"))
5502 (html (string-append doc "/html")))
5503 (mkdir-p html)
5504 (mkdir-p info)
5505 (copy-recursively "build/html" html)
5506 (symlink (string-append html "/_images")
5507 (string-append info "/matplotlib-figures"))
5508 (with-directory-excursion "build/texinfo"
5509 (substitute* "matplotlib.texi"
5510 (("@image\\{([^,]*)" all file)
5511 (string-append "@image{matplotlib-figures/" file)))
5512 (symlink (string-append html "/_images")
5513 "./matplotlib-figures")
5514 (invoke "makeinfo" "--no-split"
5515 "-o" "matplotlib.info" "matplotlib.texi"))
5516 (install-file "build/texinfo/matplotlib.info" info))
5517 #t)))))
5518 (home-page (package-home-page python-matplotlib))
5519 (synopsis "Documentation for the python-matplotlib package")
5520 (description (package-description python-matplotlib))
5521 (license (package-license python-matplotlib))))
5522
5523 (define-public python-matplotlib-venn
5524 (package
5525 (name "python-matplotlib-venn")
5526 (version "0.11.5")
5527 (source
5528 (origin
5529 (method url-fetch)
5530 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5531 (sha256
5532 (base32
5533 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5534 (build-system python-build-system)
5535 (arguments '(#:tests? #f)) ; tests are not included
5536 (propagated-inputs
5537 `(("python-matplotlib" ,python-matplotlib)
5538 ("python-numpy" ,python-numpy)
5539 ("python-scipy" ,python-scipy)))
5540 (native-inputs
5541 `(("unzip" ,unzip)))
5542 (home-page "https://github.com/konstantint/matplotlib-venn")
5543 (synopsis "Plot area-proportional Venn diagrams")
5544 (description
5545 "This package provides tools for plotting area-proportional two- and
5546 three-way Venn diagrams in @code{matplotlib}.")
5547 (license license:expat)))
5548
5549 (define-public python-pysnptools
5550 (package
5551 (name "python-pysnptools")
5552 (version "0.4.11")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "pysnptools" version))
5557 (sha256
5558 (base32
5559 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5560 (build-system python-build-system)
5561 (arguments
5562 `(#:tests? #f ; no test data are included
5563 #:phases
5564 (modify-phases %standard-phases
5565 (replace 'check
5566 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5567 (if tests?
5568 (begin
5569 (add-installed-pythonpath inputs outputs)
5570 (invoke "python3" "pysnptools/test.py"))
5571 #t))))))
5572 (propagated-inputs
5573 `(("python-dill" ,python-dill)
5574 ("python-h5py" ,python-h5py)
5575 ("python-numpy" ,python-numpy)
5576 ("python-pandas" ,python-pandas)
5577 ("python-psutil" ,python-psutil)
5578 ("python-scipy" ,python-scipy)))
5579 (native-inputs
5580 `(("python-cython" ,python-cython)))
5581 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5582 (synopsis "Library for reading and manipulating genetic data")
5583 (description
5584 "PySnpTools is a library for reading and manipulating genetic data. It
5585 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5586 those files. It can also efficiently manipulate ranges of integers using set
5587 operators such as union, intersection, and difference.")
5588 (license license:asl2.0)))
5589
5590 (define-public python2-pysnptools
5591 (package-with-python2 python-pysnptools))
5592
5593 (define-public python-wurlitzer
5594 (package
5595 (name "python-wurlitzer")
5596 (version "2.0.1")
5597 (source
5598 (origin
5599 (method url-fetch)
5600 (uri (pypi-uri "wurlitzer" version))
5601 (sha256
5602 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5603 (build-system python-build-system)
5604 (arguments
5605 '(#:phases
5606 (modify-phases %standard-phases
5607 (replace 'check
5608 (lambda _
5609 (invoke "pytest" "-vv" "test.py"))))))
5610 (native-inputs
5611 `(("python-mock" ,python-mock)
5612 ("python-pytest" ,python-pytest)))
5613 (home-page "https://github.com/minrk/wurlitzer")
5614 (synopsis "Capture C-level output in context managers")
5615 (description
5616 "This library helps to redirect @code{sys.stdout} to a stream or a file
5617 while executing some piece of code, including C code running within a Python
5618 process.")
5619 (license license:expat)))
5620
5621 (define-public python-socksipy-branch
5622 (package
5623 (name "python-socksipy-branch")
5624 (version "1.01")
5625 (source
5626 (origin
5627 (method url-fetch)
5628 (uri (pypi-uri "SocksiPy-branch" version))
5629 (sha256
5630 (base32
5631 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5632 (build-system python-build-system)
5633 (arguments
5634 `(#:tests? #f)) ; There are no tests
5635 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5636 (synopsis "Python SOCKS module")
5637 (description
5638 "SocksiPy - A Python SOCKS client module. It provides a
5639 socket-like interface that supports connections to any TCP
5640 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5641 The original version was developed by Dan Haim, this is a
5642 branch created by Mario Vilas to address some open issues,
5643 as the original project seems to have been abandoned circa 2007.")
5644 (license license:bsd-3)))
5645
5646 (define-public python2-socksipy-branch
5647 (package-with-python2 python-socksipy-branch))
5648
5649 (define-public python-socksipychain
5650 (package
5651 (name "python-socksipychain")
5652 (version "2.1.2")
5653 (source
5654 (origin
5655 (method git-fetch)
5656 (uri (git-reference
5657 (url "https://github.com/pagekite/PySocksipyChain")
5658 (commit (string-append "v" version))))
5659 (file-name (git-file-name name version))
5660 (sha256
5661 (base32
5662 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5663 (build-system python-build-system)
5664 (arguments
5665 `(#:tests? #f)) ; Tests try to access the network.
5666 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5667 (synopsis "Python SOCKS module with chained proxies support")
5668 (description
5669 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5670 adds support for arbitrary chaining of proxy servers and various modes of
5671 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5672 a simple netcat replacement with chaining support.")
5673 (license license:bsd-3)))
5674
5675 (define-public python-pycodestyle
5676 (package
5677 (name "python-pycodestyle")
5678 (version "2.7.0")
5679 (source
5680 (origin
5681 (method url-fetch)
5682 (uri (pypi-uri "pycodestyle" version))
5683 (sha256
5684 (base32
5685 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
5686 (build-system python-build-system)
5687 (arguments
5688 `(#:phases
5689 (modify-phases %standard-phases
5690 (replace 'check
5691 (lambda _
5692 (invoke "pytest" "-vv"))))))
5693 (native-inputs
5694 `(("python-pytest" ,python-pytest)))
5695 (home-page "https://pycodestyle.readthedocs.io/")
5696 (synopsis "Python style guide checker")
5697 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5698 Python code against some of the style conventions in
5699 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5700 (license license:expat)))
5701
5702 (define-public python2-pycodestyle
5703 (package-with-python2 python-pycodestyle))
5704
5705 (define-public python-multidict
5706 (package
5707 (name "python-multidict")
5708 (version "4.7.5")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "multidict" version))
5713 (sha256
5714 (base32
5715 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5716 (build-system python-build-system)
5717 (arguments
5718 '(#:modules ((ice-9 ftw)
5719 (srfi srfi-1)
5720 (srfi srfi-26)
5721 (guix build utils)
5722 (guix build python-build-system))
5723 #:phases (modify-phases %standard-phases
5724 (replace 'check
5725 (lambda* (#:key tests? #:allow-other-keys)
5726 (if tests?
5727 (begin
5728 (let ((libdir (find (cut string-prefix? "lib." <>)
5729 (scandir "build"))))
5730 (setenv "PYTHONPATH"
5731 (string-append "./build/" libdir ":"
5732 (getenv "PYTHONPATH")))
5733 (invoke "pytest" "-vv")))
5734 (format #t "test suite not run~%"))
5735 #t)))))
5736 (native-inputs
5737 `(("python-pytest" ,python-pytest)
5738 ("python-pytest-cov" ,python-pytest-cov)))
5739 (home-page "https://github.com/aio-libs/multidict/")
5740 (synopsis "Multidict implementation")
5741 (description "Multidict is dict-like collection of key-value pairs
5742 where key might be occurred more than once in the container.")
5743 (license license:asl2.0)))
5744
5745 (define-public python-orderedmultidict
5746 (package
5747 (name "python-orderedmultidict")
5748 (version "1.0")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (pypi-uri "orderedmultidict" version))
5753 (sha256
5754 (base32
5755 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5756 (build-system python-build-system)
5757 (arguments
5758 `(#:phases
5759 (modify-phases %standard-phases
5760 (add-after 'unpack 'fix-tests
5761 (lambda _
5762 ;; The package uses nosetest for running the tests.
5763 ;; Adding this initfile allows to run the test suite
5764 ;; without requiring nosetest.
5765 (with-output-to-file "tests/__init__.py" newline)
5766 #t)))))
5767 (propagated-inputs
5768 `(("python-six" ,python-six)))
5769 (native-inputs
5770 `(("python-pycodestyle" ,python-pycodestyle)))
5771 (home-page "https://github.com/gruns/orderedmultidict")
5772 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5773 (description "This package contains a library for ordered multivalue
5774 dictionaries. A multivalue dictionary is a dictionary that can store
5775 multiple values for the same key. An ordered multivalue dictionary is a
5776 multivalue dictionary that retains the order of insertions and deletions.")
5777 (license license:unlicense)))
5778
5779 (define-public python2-orderedmultidict
5780 (package-with-python2 python-orderedmultidict))
5781
5782 (define-public python-autopep8
5783 (package
5784 (name "python-autopep8")
5785 (version "1.5.3")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (pypi-uri "autopep8" version))
5790 (sha256
5791 (base32
5792 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5793 (build-system python-build-system)
5794 (propagated-inputs
5795 `(("python-pycodestyle" ,python-pycodestyle)
5796 ("python-toml" ,python-toml)))
5797 (home-page "https://github.com/hhatto/autopep8")
5798 (synopsis "Format Python code according to the PEP 8 style guide")
5799 (description
5800 "@code{autopep8} automatically formats Python code to conform to
5801 the PEP 8 style guide. It uses the pycodestyle utility to determine
5802 what parts of the code needs to be formatted. @code{autopep8} is
5803 capable of fixing most of the formatting issues that can be reported
5804 by pycodestyle.")
5805 (license (license:non-copyleft
5806 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5807
5808 (define-public python2-autopep8
5809 (package-with-python2 python-autopep8))
5810
5811 (define-public python-distlib
5812 (package
5813 (name "python-distlib")
5814 (version "0.3.0")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "distlib" version ".zip"))
5819 (sha256
5820 (base32
5821 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5822 (build-system python-build-system)
5823 (arguments
5824 `(#:phases
5825 (modify-phases %standard-phases
5826 (add-before 'build 'no-/bin/sh
5827 (lambda _
5828 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5829 (("/bin/sh") (which "sh")))
5830 #t))
5831 (add-before 'check 'prepare-test-env
5832 (lambda _
5833 (setenv "HOME" "/tmp")
5834 ;; NOTE: Any value works, the variable just has to be present.
5835 (setenv "SKIP_ONLINE" "1")
5836 #t)))))
5837 (native-inputs `(("unzip" ,unzip)))
5838 (home-page "https://bitbucket.org/pypa/distlib")
5839 (synopsis "Distribution utilities")
5840 (description "Distlib is a library which implements low-level functions that
5841 relate to packaging and distribution of Python software. It is intended to be
5842 used as the basis for third-party packaging tools.")
5843 (license license:psfl)))
5844
5845 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5846 (define-public python-distlib/next
5847 (package
5848 (inherit python-distlib)
5849 (version "0.3.1")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "distlib" version ".zip"))
5854 (sha256
5855 (base32
5856 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5857
5858 (define-public python-distutils-extra
5859 (package
5860 (name "python-distutils-extra")
5861 (version "2.38")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5866 version "/+download/python-distutils-extra-"
5867 version ".tar.gz"))
5868 (sha256
5869 (base32
5870 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5871 (build-system python-build-system)
5872 (home-page "https://launchpad.net/python-distutils-extra/")
5873 (synopsis "Enhancements to Python's distutils")
5874 (description
5875 "The python-distutils-extra module enables you to easily integrate
5876 gettext support, themed icons, and scrollkeeper-based documentation into
5877 Python's distutils.")
5878 (license license:gpl2)))
5879
5880 (define-public python2-distutils-extra
5881 (package-with-python2 python-distutils-extra))
5882
5883 (define-public python2-elib.intl
5884 (package
5885 (name "python2-elib.intl")
5886 (version "0.0.3")
5887 (source
5888 (origin
5889 ;; This project doesn't tag releases or publish tarballs, so we take
5890 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5891 (method git-fetch)
5892 (uri (git-reference
5893 (url "https://github.com/dieterv/elib.intl")
5894 (commit "d09997cfef")))
5895 (file-name (string-append name "-" version "-checkout"))
5896 (sha256
5897 (base32
5898 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5899 (build-system python-build-system)
5900 (arguments
5901 ;; incompatible with Python 3 (exception syntax)
5902 `(#:python ,python-2
5903 #:tests? #f))
5904 (home-page "https://github.com/dieterv/elib.intl")
5905 (synopsis "Enhanced internationalization for Python")
5906 (description
5907 "The elib.intl module provides enhanced internationalization (I18N)
5908 services for your Python modules and applications.")
5909 (license license:lgpl3+)))
5910
5911 (define-public python-olefile
5912 (package
5913 (name "python-olefile")
5914 (version "0.46")
5915 (source
5916 (origin
5917 (method url-fetch)
5918 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5919 "download/v" version "/olefile-" version ".tar.gz"))
5920 (file-name (string-append name "-" version ".tar.gz"))
5921 (sha256
5922 (base32
5923 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5924 (build-system python-build-system)
5925 (home-page "https://www.decalage.info/python/olefileio")
5926 (synopsis "Read and write Microsoft OLE2 files.")
5927 (description
5928 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5929 Storage or Compound Document, Microsoft Office). It is an improved version of
5930 the OleFileIO module from PIL, the Python Image Library.")
5931 (license license:bsd-3)))
5932
5933 (define-public python2-olefile
5934 (package-with-python2 python-olefile))
5935
5936 (define-public python-pikepdf
5937 (package
5938 (name "python-pikepdf")
5939 (version "2.10.0")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "pikepdf" version))
5944 (sha256
5945 (base32 "09wfj1hjvj3r9gv7ywrqd7h3d0bz64bvils8sm3ghj90jhalb03s"))))
5946 (build-system python-build-system)
5947 (arguments
5948 `(#:tests? #false)) ;require python-xmp-toolkit
5949 (native-inputs
5950 `(("pybind11" ,pybind11)
5951 ("python-setuptools" ,python-setuptools)
5952 ("python-setuptools-scm" ,python-setuptools-scm/next)
5953 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
5954 ("python-toml" ,python-toml)
5955 ("python-wheel" ,python-wheel)))
5956 (inputs
5957 `(("qpdf" ,qpdf)))
5958 (propagated-inputs
5959 `(("python-lxml" ,python-lxml)
5960 ("python-pillow" ,python-pillow)))
5961 (home-page "https://github.com/pikepdf/pikepdf")
5962 (synopsis "Read and write PDFs with Python")
5963 (description
5964 "pikepdf is a Python library for reading and writing PDF files.")
5965 (license license:mpl2.0)))
5966
5967 (define-public python-pillow
5968 (package
5969 (name "python-pillow")
5970 (version "8.1.1")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "Pillow" version))
5975 (sha256
5976 (base32
5977 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
5978 (build-system python-build-system)
5979 (native-inputs
5980 `(("python-pytest" ,python-pytest)))
5981 (inputs
5982 `(("freetype" ,freetype)
5983 ("lcms" ,lcms)
5984 ("libjpeg" ,libjpeg-turbo)
5985 ("libtiff" ,libtiff)
5986 ("libwebp" ,libwebp)
5987 ("openjpeg" ,openjpeg)
5988 ("zlib" ,zlib)))
5989 (propagated-inputs
5990 `(("python-olefile" ,python-olefile)))
5991 (arguments
5992 `(#:phases
5993 (modify-phases %standard-phases
5994 (add-after 'unpack 'patch-ldconfig
5995 (lambda _
5996 (substitute* "setup.py"
5997 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5998 (replace 'check
5999 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6000 (if tests?
6001 (begin
6002 (setenv "HOME" (getcwd))
6003 ;; Make installed package available for running the tests.
6004 (add-installed-pythonpath inputs outputs)
6005 (invoke "python" "selftest.py" "--installed")
6006 (invoke "python" "-m" "pytest" "-vv"))
6007 #t))))))
6008 (home-page "https://python-pillow.org")
6009 (synopsis "Fork of the Python Imaging Library")
6010 (description
6011 "The Python Imaging Library adds image processing capabilities to your
6012 Python interpreter. This library provides extensive file format support, an
6013 efficient internal representation, and fairly powerful image processing
6014 capabilities. The core image library is designed for fast access to data
6015 stored in a few basic pixel formats. It should provide a solid foundation for
6016 a general image processing tool.")
6017 (properties `((python2-variant . ,(delay python2-pillow))))
6018 (license (license:x11-style
6019 "http://www.pythonware.com/products/pil/license.htm"
6020 "The PIL Software License"))))
6021
6022 (define-public python2-pillow
6023 (package-with-python2
6024 (package
6025 (inherit (strip-python2-variant python-pillow))
6026 ;; Version 6 is the last series with Python 2 support.
6027 (version "6.2.2")
6028 (source
6029 (origin
6030 (method url-fetch)
6031 (uri (pypi-uri "Pillow" version))
6032 (sha256
6033 (base32
6034 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6035
6036 (define-public python-pillow-2.9
6037 (package
6038 (inherit python-pillow)
6039 (version "2.9.0")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (pypi-uri "Pillow" version))
6044 (sha256
6045 (base32
6046 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6047 (arguments
6048 (substitute-keyword-arguments (package-arguments python-pillow)
6049 ((#:tests? _ #f) #f)))
6050 (properties '((hidden? #t)))))
6051
6052 (define-public python-pillow-simd
6053 (package
6054 (inherit python-pillow)
6055 (name "python-pillow-simd")
6056 (version "7.1.2")
6057 ;; The PyPI tarball does not include test files.
6058 (source
6059 (origin
6060 (method git-fetch)
6061 (uri (git-reference
6062 (url "https://github.com/uploadcare/pillow-simd")
6063 (commit version)))
6064 (file-name (git-file-name name version))
6065 (sha256
6066 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6067 (arguments
6068 (substitute-keyword-arguments
6069 (package-arguments python-pillow)
6070 ((#:phases phases)
6071 `(modify-phases ,phases
6072 (add-after 'unpack 'make-tests-writable
6073 (lambda _
6074 (for-each make-file-writable (find-files "Tests"))
6075 #t))))))
6076 (inputs
6077 `(("libraqm" ,libraqm)
6078 ("libimagequant" ,libimagequant)
6079 ,@(package-inputs python-pillow)))
6080 (home-page "https://github.com/uploadcare/pillow-simd")
6081 (synopsis "Fork of the Python Imaging Library (Pillow)")
6082 (description "This package is a fork of Pillow which adds support for SIMD
6083 parallelism.")))
6084
6085 (define-public python-imagecodecs
6086 (package
6087 (name "python-imagecodecs")
6088 (version "2021.3.31")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "imagecodecs" version))
6093 (sha256
6094 (base32
6095 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6096 (modules '((guix build utils)))
6097 (snippet
6098 '(begin
6099 ;; Unbundle 3rd party modules.
6100 (delete-file-recursively "3rdparty")
6101 ;; Delete pre-generated Cython files.
6102 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6103 #t))))
6104 (build-system python-build-system)
6105 (arguments
6106 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6107 #:phases
6108 (modify-phases %standard-phases
6109 (add-after 'unpack 'create-configuration
6110 (lambda* (#:key inputs #:allow-other-keys)
6111 ;; By default everything is enabled. We can selectively disable
6112 ;; extensions (and thus dependencies) by deleting them from the
6113 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6114 (call-with-output-file "imagecodecs_distributor_setup.py"
6115 (lambda (port)
6116 (format port "\
6117 def customize_build(EXTENSIONS, OPTIONS):
6118 del EXTENSIONS['aec']
6119 del EXTENSIONS['avif']
6120 del EXTENSIONS['bitshuffle']
6121 del EXTENSIONS['deflate']
6122 del EXTENSIONS['jpeg2k']
6123 del EXTENSIONS['jpeg12']
6124 del EXTENSIONS['jpegls']
6125 del EXTENSIONS['jpegxl']
6126 del EXTENSIONS['jpegxr']
6127 del EXTENSIONS['lerc']
6128 del EXTENSIONS['ljpeg']
6129 del EXTENSIONS['lzf']
6130 del EXTENSIONS['zfp']
6131 del EXTENSIONS['zopfli']
6132 OPTIONS['cythonize']
6133 ")))
6134 #t)))))
6135 (inputs
6136 `(("c-blosc" ,c-blosc)
6137 ("giflib" ,giflib)
6138 ("google-brotli" ,google-brotli)
6139 ("libjpeg-turbo" ,libjpeg-turbo)
6140 ("libpng" ,libpng)
6141 ("libtiff" ,libtiff)
6142 ("libwebp" ,libwebp)
6143 ("lz4" ,lz4)
6144 ("snappy" ,snappy)
6145 ("xz" ,xz)
6146 ("zlib" ,zlib)
6147 ("zstd" ,zstd "lib")))
6148 (propagated-inputs
6149 `(("python-numpy" ,python-numpy)))
6150 (native-inputs
6151 ;; For building.
6152 `(("python-cython" ,python-cython)
6153 ;; For testing. Incomplete.
6154 ;("python-numcodecs" ,python-numcodecs)
6155 ;("python-zarr" ,python-zarr)
6156 ;("python-pytest" ,python-pytest)
6157 ))
6158 (home-page "https://www.lfd.uci.edu/~gohlke/")
6159 (synopsis
6160 "Image transformation, compression, and decompression codecs")
6161 (description
6162 "Imagecodecs is a Python library that provides block-oriented, in-memory
6163 buffer transformation, compression, and decompression functions for use in the
6164 tifffile, czifile, and other scientific image input/output modules.")
6165 (license license:bsd-3)))
6166
6167 (define-public python-roifile
6168 (package
6169 (name "python-roifile")
6170 (version "2020.11.28")
6171 (source
6172 (origin
6173 (method url-fetch)
6174 (uri (pypi-uri "roifile" version))
6175 (sha256
6176 (base32
6177 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6178 (build-system python-build-system)
6179 (arguments `(#:tests? #f)) ; there are none
6180 (propagated-inputs
6181 `(("python-numpy" ,python-numpy)))
6182 (home-page "https://www.lfd.uci.edu/~gohlke/")
6183 (synopsis "Read and write ImageJ ROI format")
6184 (description "Roifile is a Python library to read, write, create, and plot
6185 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6186 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6187 (license license:bsd-3)))
6188
6189 (define-public python-tifffile
6190 (package
6191 (name "python-tifffile")
6192 (version "2021.4.8")
6193 (source
6194 (origin
6195 (method url-fetch)
6196 (uri (pypi-uri "tifffile" version))
6197 (sha256
6198 (base32
6199 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6200 (build-system python-build-system)
6201 ;; Tests require lfdfiles, which depends on tifffile
6202 (arguments `(#:tests? #f))
6203 (propagated-inputs
6204 `(("python-numpy" ,python-numpy)
6205 ("python-imagecodecs" ,python-imagecodecs)))
6206 (home-page "https://www.lfd.uci.edu/~gohlke/")
6207 (synopsis "Read and write TIFF(r) files")
6208 (description "This package lets you read image and metadata from many
6209 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6210 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6211 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6212 (license license:bsd-3)))
6213
6214 (define-public python-lfdfiles
6215 (package
6216 (name "python-lfdfiles")
6217 (version "2021.2.22")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "lfdfiles" version))
6222 (sha256
6223 (base32
6224 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6225 (modules '((guix build utils)))
6226 (snippet
6227 '(begin
6228 ;; Delete pre-generated Cython files.
6229 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6230 #t))))
6231 (build-system python-build-system)
6232 (arguments
6233 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6234 (propagated-inputs
6235 `(("python-click" ,python-click)
6236 ("python-numpy" ,python-numpy)
6237 ("python-tifffile" ,python-tifffile)))
6238 (native-inputs `(("python-cython" ,python-cython)))
6239 (home-page "https://www.lfd.uci.edu/~gohlke/")
6240 (synopsis "Work with LFD data files")
6241 (description
6242 "Lfdfiles is a Python library and console script for reading, writing,
6243 converting, and viewing many of the proprietary file formats used to store
6244 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6245 (license license:bsd-3)))
6246
6247 (define-public python-imageio
6248 (package
6249 (name "python-imageio")
6250 (version "2.8.0")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "imageio" version))
6255 (sha256
6256 (base32
6257 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6258 (build-system python-build-system)
6259 (arguments
6260 `(#:tests? #f ; many tests require online data
6261 #:phases
6262 (modify-phases %standard-phases
6263 (replace 'check
6264 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6265 (if tests?
6266 (begin
6267 ;; Make installed package available for running the tests.
6268 (add-installed-pythonpath inputs outputs)
6269 (invoke "pytest" "-vv"))
6270 #t))))))
6271 (propagated-inputs
6272 `(("python-numpy" ,python-numpy)
6273 ("python-pillow" ,python-pillow)
6274 ("python-psutil" ,python-psutil)))
6275 (native-inputs
6276 `(("python-pytest" ,python-pytest)))
6277 (home-page "https://imageio.github.io/")
6278 (synopsis "Library for reading and writing a wide range of image data")
6279 (description
6280 "Imageio is a Python library that provides an easy interface to read and
6281 write a wide range of image data, including animated images, video, volumetric
6282 data, and scientific formats.")
6283 (license license:bsd-2)))
6284
6285 (define-public python-pycparser
6286 (package
6287 (name "python-pycparser")
6288 (version "2.20")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "pycparser" version))
6293 (sha256
6294 (base32
6295 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6296 (outputs '("out" "doc"))
6297 (build-system python-build-system)
6298 (native-inputs
6299 `(("pkg-config" ,pkg-config)))
6300 (arguments
6301 `(#:phases
6302 (modify-phases %standard-phases
6303 (replace 'check
6304 (lambda _
6305 (with-directory-excursion "tests"
6306 (invoke "python" "all_tests.py"))
6307 #t))
6308 (add-after 'install 'install-doc
6309 (lambda* (#:key outputs #:allow-other-keys)
6310 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6311 (doc (string-append data "/doc/" ,name "-" ,version))
6312 (examples (string-append doc "/examples")))
6313 (mkdir-p examples)
6314 (for-each (lambda (file)
6315 (copy-file (string-append "." file)
6316 (string-append doc file)))
6317 '("/README.rst" "/CHANGES" "/LICENSE"))
6318 (copy-recursively "examples" examples)
6319 #t))))))
6320 (home-page "https://github.com/eliben/pycparser")
6321 (synopsis "C parser in Python")
6322 (description
6323 "Pycparser is a complete parser of the C language, written in pure Python
6324 using the PLY parsing library. It parses C code into an AST and can serve as
6325 a front-end for C compilers or analysis tools.")
6326 (license license:bsd-3)))
6327
6328 (define-public python2-pycparser
6329 (package-with-python2 python-pycparser))
6330
6331 (define-public python-xlsxwriter
6332 (package
6333 (name "python-xlsxwriter")
6334 (version "1.3.9")
6335 (source
6336 (origin
6337 ;; There are no tests in the PyPI tarball.
6338 (method git-fetch)
6339 (uri (git-reference
6340 (url "https://github.com/jmcnamara/XlsxWriter")
6341 (commit (string-append "RELEASE_" version))))
6342 (file-name (git-file-name name version))
6343 (sha256
6344 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6345 (build-system python-build-system)
6346 (home-page "https://github.com/jmcnamara/XlsxWriter")
6347 (synopsis "Python module for creating Excel XLSX files")
6348 (description
6349 "XlsxWriter is a Python module that can be used to write text, numbers,
6350 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6351 (license license:bsd-2)))
6352
6353 (define-public python-pywavelets
6354 (package
6355 (name "python-pywavelets")
6356 (version "1.1.1")
6357 (home-page "https://github.com/PyWavelets/pywt")
6358 (source (origin
6359 (method url-fetch)
6360 (uri (pypi-uri "PyWavelets" version))
6361 (sha256
6362 (base32
6363 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6364 (build-system python-build-system)
6365 (arguments
6366 '(#:modules ((ice-9 ftw)
6367 (srfi srfi-1)
6368 (srfi srfi-26)
6369 (guix build utils)
6370 (guix build python-build-system))
6371 #:phases
6372 (modify-phases %standard-phases
6373 (replace 'check
6374 (lambda _
6375 (let ((cwd (getcwd))
6376 (libdir (find (cut string-prefix? "lib." <>)
6377 (scandir "build"))))
6378 (with-directory-excursion (string-append cwd "/build/" libdir)
6379 (invoke "pytest" "-vv"))))))))
6380 (native-inputs
6381 `(("python-matplotlib" ,python-matplotlib) ;for tests
6382 ("python-pytest" ,python-pytest)))
6383 (propagated-inputs
6384 `(("python-numpy" ,python-numpy)))
6385 (synopsis "Wavelet transforms in Python")
6386 (description
6387 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6388 mathematical basis functions that are localized in both time and frequency.
6389 Wavelet transforms are time-frequency transforms employing wavelets. They are
6390 similar to Fourier transforms, the difference being that Fourier transforms are
6391 localized only in frequency instead of in time and frequency.")
6392 (license license:expat)))
6393
6394 (define-public python-pywal
6395 (package
6396 (name "python-pywal")
6397 (version "3.3.0")
6398 (source
6399 (origin
6400 (method git-fetch)
6401 (uri (git-reference
6402 (url "https://github.com/dylanaraps/pywal")
6403 (commit version)))
6404 (file-name (git-file-name name version))
6405 (sha256
6406 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6407 (build-system python-build-system)
6408 (arguments
6409 `(#:phases
6410 (modify-phases %standard-phases
6411 (add-before 'check 'fix-home-directory
6412 (lambda _
6413 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6414 (setenv "HOME" "/tmp")
6415 #t)))))
6416 (inputs
6417 `(("imagemagick" ,imagemagick)))
6418 (home-page "https://github.com/dylanaraps/pywal")
6419 (synopsis "Color palette generator and applicator")
6420 (description
6421 "Pywal is a tool that generates a color palette from the dominant colors
6422 in an image. It then applies the colors system-wide and on-the-fly in all of
6423 your favourite programs.")
6424 (license license:expat)))
6425
6426 (define-public python-pywinrm
6427 (package
6428 (name "python-pywinrm")
6429 (version "0.4.1")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (pypi-uri "pywinrm" version))
6434 (sha256
6435 (base32
6436 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6437 (build-system python-build-system)
6438 (propagated-inputs
6439 `(("python-six" ,python-six)
6440 ("python-requests_ntlm" ,python-requests_ntlm)
6441 ("python-xmltodict" ,python-xmltodict)
6442 ("python-kerberos" ,python-kerberos)))
6443 (native-inputs
6444 `(("python-mock" ,python-mock)
6445 ("python-pytest" ,python-pytest)))
6446 (home-page "https://github.com/diyan/pywinrm/")
6447 (synopsis
6448 "Python library for Windows Remote Management (WinRM)")
6449 (description
6450 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6451 service. It allows you to invoke commands on target Windows machines from
6452 any machine that can run Python.")
6453 (license license:expat)))
6454
6455 (define-public python-xcffib
6456 (package
6457 (name "python-xcffib")
6458 (version "0.6.0")
6459 (source
6460 (origin
6461 (method url-fetch)
6462 (uri (pypi-uri "xcffib" version))
6463 (sha256
6464 (base32
6465 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6466 (build-system python-build-system)
6467 (inputs
6468 `(("libxcb" ,libxcb)))
6469 (propagated-inputs
6470 `(("python-cffi" ,python-cffi) ; used at run time
6471 ("python-six" ,python-six)))
6472 (arguments
6473 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6474 #:tests? #f
6475 #:phases
6476 (modify-phases %standard-phases
6477 (add-after 'unpack 'fix-libxcb-path
6478 (lambda* (#:key inputs #:allow-other-keys)
6479 (let ((libxcb (assoc-ref inputs "libxcb")))
6480 (substitute* '("xcffib/__init__.py")
6481 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6482 #t)))
6483 (add-after 'install 'install-doc
6484 (lambda* (#:key outputs #:allow-other-keys)
6485 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6486 "/doc/" ,name "-" ,version)))
6487 (mkdir-p doc)
6488 (copy-file "README.md"
6489 (string-append doc "/README.md"))
6490 #t))))))
6491 (home-page "https://github.com/tych0/xcffib")
6492 (synopsis "XCB Python bindings")
6493 (description
6494 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6495 support for Python 3 and PyPy. It is based on cffi.")
6496 (license license:expat)))
6497
6498 (define-public python2-xcffib
6499 (package-with-python2 python-xcffib))
6500
6501 (define-public python-cairocffi
6502 (package
6503 (name "python-cairocffi")
6504 (version "1.2.0")
6505 (source
6506 (origin
6507 ;; The PyPI archive does not include the documentation, so use Git.
6508 (method git-fetch)
6509 (uri (git-reference
6510 (url "https://github.com/Kozea/cairocffi")
6511 (commit (string-append "v" version))))
6512 (file-name (git-file-name name version))
6513 (sha256
6514 (base32
6515 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6516 (build-system python-build-system)
6517 (outputs '("out" "doc"))
6518 (inputs
6519 `(("glib" ,glib)
6520 ("gtk+" ,gtk+)
6521 ("gdk-pixbuf" ,gdk-pixbuf)
6522 ("cairo" ,cairo)))
6523 (native-inputs
6524 `(("python-numpy" ,python-numpy)
6525 ("python-pytest" ,python-pytest)
6526 ("python-pytest-cov" ,python-pytest-cov)
6527 ("python-pytest-runner" ,python-pytest-runner)
6528 ("python-sphinx" ,python-sphinx)
6529 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6530 (propagated-inputs
6531 `(("python-xcffib" ,python-xcffib))) ; used at run time
6532 (arguments
6533 `(#:phases
6534 (modify-phases %standard-phases
6535 (add-after 'unpack 'patch-paths
6536 (lambda* (#:key inputs #:allow-other-keys)
6537 (substitute* "cairocffi/__init__.py"
6538 ;; Hack the dynamic library loading mechanism.
6539 (("find_library\\(library_name\\)")
6540 "\"found\"")
6541 (("filenames = \\(library_filename,\\) \\+ filenames")
6542 "pass")
6543 (("libcairo.so.2")
6544 (string-append (assoc-ref inputs "cairo")
6545 "/lib/libcairo.so.2")))
6546 (substitute* "cairocffi/pixbuf.py"
6547 (("libgdk_pixbuf-2.0.so.0")
6548 (string-append (assoc-ref inputs "gdk-pixbuf")
6549 "/lib/libgdk_pixbuf-2.0.so.0"))
6550 (("libgobject-2.0.so.0")
6551 (string-append (assoc-ref inputs "glib")
6552 "/lib/libgobject-2.0.so.0"))
6553 (("libglib-2.0.so.0")
6554 (string-append (assoc-ref inputs "glib")
6555 "/lib/libglib-2.0.so.0"))
6556 (("libgdk-3.so.0")
6557 (string-append (assoc-ref inputs "gtk+")
6558 "/lib/libgdk-3.so.0")))
6559 #t))
6560 (add-after 'unpack 'disable-linters
6561 ;; Their check fails; none of our business.
6562 (lambda _
6563 (substitute* "setup.cfg"
6564 ((".*pytest-flake8.*") "")
6565 ((".*pytest-isort.*") "")
6566 (("--flake8") "")
6567 (("--isort") ""))
6568 #t))
6569 (add-after 'install 'install-doc
6570 (lambda* (#:key inputs outputs #:allow-other-keys)
6571 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6572 (doc (string-append data "/doc/" ,name "-" ,version))
6573 (html (string-append doc "/html")))
6574 (setenv "LD_LIBRARY_PATH"
6575 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6576 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6577 (setenv "LANG" "en_US.UTF-8")
6578 (mkdir-p html)
6579 (for-each (lambda (file)
6580 (copy-file (string-append "." file)
6581 (string-append doc file)))
6582 '("/README.rst" "/NEWS.rst"))
6583 (system* "python" "setup.py" "build_sphinx")
6584 (copy-recursively "docs/_build/html" html)
6585 #t))))))
6586 (home-page "https://github.com/Kozea/cairocffi")
6587 (synopsis "Python bindings and object-oriented API for Cairo")
6588 (description
6589 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6590 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6591 graphics library with support for multiple backends including image buffers,
6592 PNG, PostScript, PDF, and SVG file output.")
6593 (license license:bsd-3)))
6594
6595 (define-public python-decorator
6596 (package
6597 (name "python-decorator")
6598 (version "4.3.0")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "decorator" version))
6603 (sha256
6604 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6605 (build-system python-build-system)
6606 (home-page "https://pypi.org/project/decorator/")
6607 (synopsis "Python module to simplify usage of decorators")
6608 (description
6609 "The aim of the decorator module is to simplify the usage of decorators
6610 for the average programmer, and to popularize decorators usage giving examples
6611 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6612 etc. The core of this module is a decorator factory.")
6613 (license license:expat)))
6614
6615 (define-public python2-decorator
6616 (package-with-python2 python-decorator))
6617
6618 (define-public python-drmaa
6619 (package
6620 (name "python-drmaa")
6621 (version "0.7.7")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "drmaa" version))
6626 (sha256
6627 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6628 (build-system python-build-system)
6629 ;; The test suite requires libdrmaa which is provided by the cluster
6630 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6631 ;; should be set to the path of the libdrmaa library.
6632 (arguments '(#:tests? #f))
6633 (native-inputs
6634 `(("python-nose" ,python-nose)))
6635 (home-page "https://pypi.org/project/drmaa/")
6636 (synopsis "Python bindings for the DRMAA library")
6637 (description
6638 "A Python package for Distributed Resource Management (DRM) job
6639 submission and control. This package is an implementation of the DRMAA 1.0
6640 Python language binding specification.")
6641 (license license:bsd-3)))
6642
6643 (define-public python2-drmaa
6644 (package-with-python2 python-drmaa))
6645
6646 (define-public python-grako
6647 (package
6648 (name "python-grako")
6649 (version "3.99.9")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri
6654 (pypi-uri "grako" version ".zip"))
6655 (sha256
6656 (base32
6657 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6658 (build-system python-build-system)
6659 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6660 (native-inputs
6661 `(("unzip" ,unzip)
6662 ("python-pytest" ,python-pytest)
6663 ("python-pytest-runner" ,python-pytest-runner)))
6664 (home-page "https://bitbucket.org/neogeny/grako")
6665 (synopsis "EBNF parser generator")
6666 (description
6667 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6668 memoizing PEG/Packrat parser in Python.")
6669 (license license:bsd-3)))
6670
6671 (define-public python2-grako
6672 (package-with-python2 python-grako))
6673
6674 (define-public python-grandalf
6675 (package
6676 (name "python-grandalf")
6677 (version "0.7")
6678 (source
6679 (origin
6680 ;; There's no source tarball on PyPI.
6681 (method git-fetch)
6682 (uri (git-reference
6683 (url "https://github.com/bdcht/grandalf")
6684 (commit (string-append "v" version))))
6685 (file-name (git-file-name name version))
6686 (sha256
6687 (base32
6688 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6689 (build-system python-build-system)
6690 (arguments
6691 '(#:phases
6692 (modify-phases %standard-phases
6693 (replace 'check
6694 (lambda _
6695 (invoke "python" "setup.py" "pytest"))))))
6696 (native-inputs
6697 `(("python-pytest" ,python-pytest)
6698 ("python-pytest-runner" ,python-pytest-runner)))
6699 (propagated-inputs
6700 `(("python-numpy" ,python-numpy)
6701 ("python-ply" ,python-ply)))
6702 (home-page "https://github.com/bdcht/grandalf")
6703 (synopsis "Graph and drawing algorithms framework")
6704 (description
6705 "Grandalf is a Python package made for experimentations with graphs
6706 drawing algorithms. It is written in pure Python, and currently implements
6707 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6708 minimization approach. While not as fast or featured as graphviz or other
6709 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6710 than thousands of nodes, while keeping the source code simple enough to tweak
6711 and hack any part of it for experimental purpose. With a total of about 1500
6712 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6713 in less than 600 lines. The energy minimization approach is comprised of only
6714 250 lines!
6715
6716 Grandalf does only 2 not-so-simple things:
6717 @itemize
6718 @item computing the nodes (x,y) coordinates (based on provided nodes
6719 dimensions, and a chosen layout)
6720 @item routing the edges with lines or nurbs
6721 @end itemize
6722
6723 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6724 will help you find where to draw things like nodes and edges, but it’s up to
6725 you to actually draw things with your favorite toolkit.")
6726 ;; The user can choose either license.
6727 (license (list license:gpl2 license:epl1.0))))
6728
6729 (define-public python-gridmap
6730 (package
6731 (name "python-gridmap")
6732 (version "0.14.0")
6733 (source
6734 (origin
6735 (method git-fetch)
6736 (uri (git-reference
6737 (url "https://github.com/pygridtools/gridmap")
6738 (commit (string-append "v" version))))
6739 (file-name (git-file-name name version))
6740 (sha256
6741 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6742 (build-system python-build-system)
6743 (arguments
6744 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6745 (propagated-inputs
6746 `(("python-psutil" ,python-psutil)
6747 ("python-drmaa" ,python-drmaa)
6748 ("python-pyzmq" ,python-pyzmq)))
6749 (home-page "https://github.com/pygridtools/gridmap")
6750 (synopsis "Create jobs on a cluster directly from Python")
6751 (description
6752 "Gridmap is a Python package to allow you to easily create jobs on the
6753 cluster directly from Python. You can directly map Python functions onto the
6754 cluster without needing to write any wrapper code yourself.")
6755 (license license:gpl3+)))
6756
6757 (define-public python2-gridmap
6758 (package-with-python2 python-gridmap))
6759
6760 (define-public python-honcho
6761 (package
6762 (name "python-honcho")
6763 (version "1.0.1")
6764 (source
6765 (origin
6766 (method git-fetch)
6767 (uri (git-reference
6768 (url "https://github.com/nickstenning/honcho")
6769 (commit (string-append "v" version))))
6770 (file-name (git-file-name name version))
6771 (sha256
6772 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6773 (build-system python-build-system)
6774 (native-inputs
6775 `(("python-pytest" ,python-pytest)
6776 ("python-mock" ,python-mock)
6777 ("python-tox" ,python-tox)
6778 ("which" ,which))) ;for tests
6779 (propagated-inputs
6780 `(("python-jinja2" ,python-jinja2)))
6781 (arguments
6782 `(#:phases
6783 (modify-phases %standard-phases
6784 (delete 'check)
6785 (add-after 'install 'check
6786 (lambda* (#:key outputs inputs #:allow-other-keys)
6787 ;; fix honcho path in testsuite
6788 (substitute* "tests/conftest.py"
6789 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6790 "/bin/honcho" "'")))
6791 ;; It's easier to run tests after install.
6792 ;; Make installed package available for running the tests
6793 (add-installed-pythonpath inputs outputs)
6794 (invoke "py.test" "-v"))))))
6795 (home-page "https://github.com/nickstenning/honcho")
6796 (synopsis "Manage Procfile-based applications")
6797 (description
6798 "A Procfile is a file which describes how to run an application
6799 consisting of several processes. honcho starts all listed processes.
6800 The output of all running processes is collected by honcho and
6801 displayed.")
6802 (license license:expat)))
6803
6804 (define-public python-pexpect
6805 (package
6806 (name "python-pexpect")
6807 (version "4.8.0")
6808 (source
6809 (origin
6810 (method url-fetch)
6811 (uri (pypi-uri "pexpect" version))
6812 (sha256
6813 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6814 (build-system python-build-system)
6815 (arguments
6816 `(#:phases
6817 (modify-phases %standard-phases
6818 (add-before 'check 'prepare-tests
6819 (lambda _
6820 (substitute* (find-files "tests")
6821 (("/bin/ls") (which "ls"))
6822 (("/bin/echo") (which "echo"))
6823 (("/bin/which") (which "which"))
6824 ;; Many tests try to use the /bin directory which
6825 ;; is not present in the build environment.
6826 ;; Use one that's non-empty and unlikely to change.
6827 (("/bin'") "/dev'")
6828 ;; Disable failing test. See upstream bug report
6829 ;; https://github.com/pexpect/pexpect/issues/568
6830 (("def test_bash") "def _test_bash"))
6831 ;; XXX: Socket connection test gets "Connection reset by peer".
6832 ;; Why does it not work? Delete for now.
6833 (delete-file "tests/test_socket.py")
6834 #t))
6835 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6836 (native-inputs
6837 `(("python-nose" ,python-nose)
6838 ("python-pytest" ,python-pytest)
6839 ("man-db" ,man-db)
6840 ("which" ,which)
6841 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6842 (propagated-inputs
6843 `(("python-ptyprocess" ,python-ptyprocess)))
6844 (home-page "http://pexpect.readthedocs.org/")
6845 (synopsis "Controlling interactive console applications")
6846 (description
6847 "Pexpect is a pure Python module for spawning child applications;
6848 controlling them; and responding to expected patterns in their output.
6849 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6850 child application and control it as if a human were typing commands.")
6851 (license license:isc)))
6852
6853 (define-public python2-pexpect
6854 (package-with-python2 python-pexpect))
6855
6856 (define-public python-setuptools-scm
6857 (package
6858 (name "python-setuptools-scm")
6859 (version "3.4.3")
6860 (source (origin
6861 (method url-fetch)
6862 (uri (pypi-uri "setuptools_scm" version))
6863 (sha256
6864 (base32
6865 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6866 (build-system python-build-system)
6867 (home-page "https://github.com/pypa/setuptools_scm/")
6868 (synopsis "Manage Python package versions in SCM metadata")
6869 (description
6870 "Setuptools_scm handles managing your Python package versions in
6871 @dfn{software configuration management} (SCM) metadata instead of declaring
6872 them as the version argument or in a SCM managed file.")
6873 (license license:expat)))
6874
6875 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
6876 (define-public python-setuptools-scm/next
6877 (package
6878 (inherit python-setuptools-scm)
6879 (version "5.0.1")
6880 (source
6881 (origin
6882 (method url-fetch)
6883 (uri (pypi-uri "setuptools_scm" version))
6884 (sha256
6885 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
6886
6887 (define-public python2-setuptools-scm
6888 (package-with-python2 python-setuptools-scm))
6889
6890 (define-public python-sexpdata
6891 (package
6892 (name "python-sexpdata")
6893 (version "0.0.3")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (pypi-uri "sexpdata" version))
6898 (sha256
6899 (base32
6900 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6901 (build-system python-build-system)
6902 (home-page "https://github.com/jd-boyd/sexpdata")
6903 (synopsis "S-expression parser for Python")
6904 (description
6905 "Sexpdata is an S-expression parser/serializer. It has load and dump
6906 functions like pickle, json or PyYAML module.")
6907 (license license:bsd-3)))
6908
6909 (define-public python-pathlib2
6910 (package
6911 (name "python-pathlib2")
6912 (version "2.3.3")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 (uri (pypi-uri "pathlib2" version))
6917 (sha256
6918 (base32
6919 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6920 (build-system python-build-system)
6921 (propagated-inputs
6922 `(("python-scandir" ,python-scandir)
6923 ("python-six" ,python-six)))
6924 (home-page "https://pypi.org/project/pathlib2/")
6925 (synopsis "Object-oriented file system paths")
6926 (description "The goal of pathlib2 is to provide a backport of the
6927 standard @code{pathlib} module which tracks the standard library module, so
6928 all the newest features of the standard @code{pathlib} can be used also on
6929 older Python versions.")
6930 (license license:expat)))
6931
6932 (define-public python-importlib-resources
6933 (package
6934 (name "python-importlib-resources")
6935 (version "3.0.0")
6936 (source
6937 (origin
6938 (method url-fetch)
6939 (uri (pypi-uri "importlib_resources" version))
6940 (sha256
6941 (base32
6942 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6943 (build-system python-build-system)
6944 (native-inputs
6945 `(("python-setuptools-scm" ,python-setuptools-scm)
6946 ("python-toml" ,python-toml)))
6947 (home-page "http://importlib-resources.readthedocs.io/")
6948 (synopsis "Read resources from Python packages")
6949 (description
6950 "@code{importlib_resources} is a backport of Python 3's standard library
6951 @code{importlib.resources} module for Python 2.7, and Python 3.")
6952 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6953 (license license:asl2.0)))
6954
6955 (define-public python2-importlib-resources
6956 (package
6957 (name "python2-importlib-resources")
6958 (version "1.0.2")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (pypi-uri "importlib_resources" version))
6962 (sha256
6963 (base32
6964 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6965 (build-system python-build-system)
6966 (arguments
6967 `(#:python ,python-2
6968 #:phases (modify-phases %standard-phases
6969 ;; The build system tests for python-wheel, but it is
6970 ;; not required for Guix nor the test suite. Just drop
6971 ;; it to make bootstrapping pytest easier.
6972 (add-after 'unpack 'drop-wheel-dependency
6973 (lambda _
6974 (substitute* "setup.cfg"
6975 (("^[[:blank:]]+wheel")
6976 ""))
6977 #t)))))
6978 (propagated-inputs
6979 `(("python-pathlib2" ,python2-pathlib2)
6980 ("python-typing" ,python2-typing)))
6981 (home-page "https://gitlab.com/python-devs/importlib_resources")
6982 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6983 (description
6984 "This package provides an implementation of @code{importlib.resources}
6985 for older versions of Python.")
6986 (license license:asl2.0)))
6987
6988 ;; For importlib-metadata-bootstrap below.
6989 (define-public python2-importlib-resources-bootstrap
6990 (hidden-package
6991 (package/inherit
6992 python2-importlib-resources
6993 (name "python2-importlib-resources-bootstrap")
6994 (propagated-inputs
6995 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6996 ("python-typing" ,python2-typing))))))
6997
6998 (define-public python-importlib-metadata
6999 (package
7000 (name "python-importlib-metadata")
7001 (version "1.5.0")
7002 (source
7003 (origin
7004 (method url-fetch)
7005 (uri (pypi-uri "importlib_metadata" version))
7006 (sha256
7007 (base32
7008 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7009 (build-system python-build-system)
7010 (propagated-inputs
7011 `(("python-zipp" ,python-zipp)))
7012 (native-inputs
7013 `(("python-setuptools-scm" ,python-setuptools-scm)
7014 ("python-pyfakefs" ,python-pyfakefs)
7015 ("python-packaging" ,python-packaging)))
7016 (home-page "https://importlib-metadata.readthedocs.io/")
7017 (synopsis "Read metadata from Python packages")
7018 (description
7019 "@code{importlib_metadata} is a library which provides an API for
7020 accessing an installed Python package's metadata, such as its entry points or
7021 its top-level name. This functionality intends to replace most uses of
7022 @code{pkg_resources} entry point API and metadata API. Along with
7023 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7024 need to use the older and less efficient @code{pkg_resources} package.")
7025 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7026 (license license:asl2.0)))
7027
7028 (define-public python2-importlib-metadata
7029 (let ((base (package-with-python2 (strip-python2-variant
7030 python-importlib-metadata))))
7031 (package/inherit
7032 base
7033 (name "python2-importlib-metadata")
7034 (native-inputs
7035 `(("python-setuptools-scm" ,python2-setuptools-scm)
7036 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7037 ("python-packaging" ,python2-packaging-bootstrap)))
7038 (propagated-inputs
7039 `(("python-configparser" ,python2-configparser)
7040 ("python-contextlib2" ,python2-contextlib2)
7041 ("python-importlib-resources" ,python2-importlib-resources)
7042 ("python-pathlib2" ,python2-pathlib2)
7043 ,@(package-propagated-inputs base))))))
7044
7045 ;; This package is used by python2-pytest, and thus must not depend on it.
7046 (define-public python2-importlib-metadata-bootstrap
7047 (hidden-package
7048 (package/inherit
7049 python2-importlib-metadata
7050 (name "python2-importlib-metadata-bootstrap")
7051 (arguments
7052 `(#:tests? #f
7053 ,@(package-arguments python2-importlib-metadata)))
7054 (propagated-inputs
7055 `(("python-zipp" ,python2-zipp-bootstrap)
7056 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7057 ("python-configparser" ,python2-configparser)
7058 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7059 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7060
7061 (define-public python-importmagic
7062 (package
7063 (name "python-importmagic")
7064 (version "0.1.7")
7065 (source
7066 (origin
7067 (method url-fetch)
7068 (uri (pypi-uri "importmagic" version))
7069 (sha256
7070 (base32
7071 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7072 (build-system python-build-system)
7073 (home-page "https://github.com/alecthomas/importmagic")
7074 (synopsis "Library for adding, removing and managing Python imports")
7075 (description
7076 "Importmagic is a Python library for automatically managing imports by
7077 finding unresolved symbols in Python code and their corresponding imports.")
7078 (license license:bsd-3)))
7079
7080 (define-public python-inotify-simple
7081 (package
7082 (name "python-inotify-simple")
7083 (version "1.3.5")
7084 (source
7085 (origin
7086 (method git-fetch)
7087 (uri (git-reference
7088 (url "https://github.com/chrisjbillington/inotify_simple")
7089 (commit version)))
7090 (file-name (git-file-name name version))
7091 (sha256
7092 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7093 (build-system python-build-system)
7094 (home-page
7095 "https://github.com/chrisjbillington/inotify_simple")
7096 (synopsis "Simple wrapper around inotify library")
7097 (description
7098 "@code{inotify-simple} is a simple wrapper around inotify library.")
7099 (license license:bsd-3)))
7100
7101 (define-public python-jaraco-packaging
7102 (package
7103 (name "python-jaraco-packaging")
7104 (version "6.1")
7105 (source
7106 (origin
7107 (method url-fetch)
7108 (uri (pypi-uri "jaraco.packaging" version))
7109 (sha256
7110 (base32
7111 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7112 (build-system python-build-system)
7113 (propagated-inputs
7114 `(("python-pytest" ,python-pytest)
7115 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7116 ("python-pytest-flake8" ,python-pytest-flake8)
7117 ("python-rst.linker" ,python-rst.linker)
7118 ("python-setuptools" ,python-setuptools)
7119 ("python-setuptools-scm" ,python-setuptools-scm)
7120 ("python-six" ,python-six)
7121 ("python-sphinx" ,python-sphinx)))
7122 (home-page "https://github.com/jaraco/jaraco.packaging")
7123 (synopsis "Tools to supplement packaging Python releases")
7124 (description
7125 "This package provides various tools to supplement packaging Python
7126 releases.")
7127 (license license:expat)))
7128
7129 (define-public python-pathpy
7130 (package
7131 (name "python-pathpy")
7132 (version "11.5.1")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "path.py" version))
7137 (sha256
7138 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7139 (outputs '("out" "doc"))
7140 (build-system python-build-system)
7141 (propagated-inputs
7142 `(("python-appdirs" ,python-appdirs)
7143 ("python-importlib-metadata" ,python-importlib-metadata)))
7144 (native-inputs
7145 `(("python-setuptools-scm" ,python-setuptools-scm)
7146 ("python-sphinx" ,python-sphinx)
7147 ("python-rst.linker" ,python-rst.linker)
7148 ("python-pytest" ,python-pytest)
7149 ("python-pytest-runner" ,python-pytest-runner)
7150 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7151 (arguments
7152 `(#:phases
7153 (modify-phases %standard-phases
7154 (add-after 'build 'build-doc
7155 (lambda _
7156 (setenv "LANG" "en_US.UTF-8")
7157 (invoke "python" "setup.py" "build_sphinx")))
7158 (add-after 'install 'install-doc
7159 (lambda* (#:key outputs #:allow-other-keys)
7160 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7161 (doc (string-append data "/doc/" ,name "-" ,version))
7162 (html (string-append doc "/html")))
7163 (mkdir-p html)
7164 (for-each (lambda (file)
7165 (copy-file file (string-append doc "/" file)))
7166 '("README.rst" "CHANGES.rst"))
7167 (copy-recursively "build/sphinx/html" html)
7168 #t)))
7169 (replace 'check
7170 (lambda _
7171 ;; The import time test aborts if an import takes longer than
7172 ;; 100ms. It may very well take a little longer than that.
7173 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7174 (home-page "https://github.com/jaraco/path.py")
7175 (synopsis "Python module wrapper for built-in os.path")
7176 (description
7177 "@code{path.py} implements path objects as first-class entities, allowing
7178 common operations on files to be invoked on those path objects directly.")
7179 (license license:expat)))
7180
7181 (define-public python-simplegeneric
7182 (package
7183 (name "python-simplegeneric")
7184 (version "0.8.1")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "simplegeneric" version ".zip"))
7189 (sha256
7190 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7191 (build-system python-build-system)
7192 (native-inputs
7193 `(("unzip" ,unzip)))
7194 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7195 (synopsis "Python module for simple generic functions")
7196 (description
7197 "The simplegeneric module lets you define simple single-dispatch generic
7198 functions, akin to Python’s built-in generic functions like @code{len()},
7199 @code{iter()} and so on. However, instead of using specially-named methods,
7200 these generic functions use simple lookup tables, akin to those used by
7201 e.g. @code{pickle.dump()} and other generic functions found in the Python
7202 standard library.")
7203 (license license:zpl2.1)))
7204
7205 (define-public python2-simplegeneric
7206 (package-with-python2 python-simplegeneric))
7207
7208 (define-public python-ipython-genutils
7209 ;; TODO: This package is retired, check if can be removed, see description.
7210 (package
7211 (name "python-ipython-genutils")
7212 (version "0.1.0")
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (pypi-uri "ipython_genutils" version))
7217 (sha256
7218 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7219 (build-system python-build-system)
7220 (arguments `(#:tests? #f)) ; no tests
7221 (home-page "https://ipython.org")
7222 (synopsis "Vestigial utilities from IPython")
7223 (description
7224 "This package provides retired utilities from IPython. No packages
7225 outside IPython/Jupyter should depend on it.
7226
7227 This package shouldn't exist. It contains some common utilities shared by
7228 Jupyter and IPython projects during The Big Split. As soon as possible, those
7229 packages will remove their dependency on this, and this package will go
7230 away.")
7231 (license license:bsd-3)))
7232
7233 (define-public python2-ipython-genutils
7234 (package-with-python2 python-ipython-genutils))
7235
7236 (define-public python-ipyparallel
7237 (package
7238 (name "python-ipyparallel")
7239 (version "6.2.4")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "ipyparallel" version))
7244 (sha256
7245 (base32
7246 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7247 (build-system python-build-system)
7248 (arguments
7249 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7250 #:phases
7251 (modify-phases %standard-phases
7252 (add-before 'check 'prepare-for-tests
7253 (lambda _
7254 (setenv "HOME" (getcwd))
7255 #t)))))
7256 (propagated-inputs
7257 `(("python-dateutil" ,python-dateutil)
7258 ("python-decorator" ,python-decorator)
7259 ("python-ipykernel" ,python-ipykernel)
7260 ("python-ipython" ,python-ipython)
7261 ("python-ipython-genutils" ,python-ipython-genutils)
7262 ("python-jupyter-client" ,python-jupyter-client)
7263 ("python-pyzmq" ,python-pyzmq)
7264 ("python-tornado" ,python-tornado)
7265 ("python-traitlets" ,python-traitlets)))
7266 (native-inputs
7267 `(("python-ipython" ,python-ipython)
7268 ("python-mock" ,python-mock)
7269 ("python-nose" ,python-nose)
7270 ("python-pytest" ,python-pytest)
7271 ("python-pytest-cov" ,python-pytest-cov)
7272 ("python-testpath" ,python-testpath)))
7273 (home-page "https://ipython.org/")
7274 (synopsis "Interactive Parallel Computing with IPython")
7275 (description
7276 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7277 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7278 CLI scripts:
7279 @enumerate
7280 @item ipcluster - start/stop a cluster
7281 @item ipcontroller - start a scheduler
7282 @item ipengine - start an engine
7283 @end enumerate")
7284 (license license:bsd-3)))
7285
7286 (define-public python-ipython-cluster-helper
7287 (package
7288 (name "python-ipython-cluster-helper")
7289 (version "0.6.4")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "ipython-cluster-helper" version))
7294 (sha256
7295 (base32
7296 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7297 (modules '((guix build utils)))
7298 (snippet
7299 '(begin (substitute* "requirements.txt"
7300 (("ipython.*") "ipython\n"))
7301 #t))))
7302 (build-system python-build-system)
7303 (arguments
7304 `(#:tests? #f ; Test suite can't find IPython.
7305 #:phases
7306 (modify-phases %standard-phases
7307 (replace 'check
7308 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7309 (if tests?
7310 (begin
7311 (setenv "HOME" (getcwd))
7312 (add-installed-pythonpath inputs outputs)
7313 (invoke "python" "example/example.py" "--local"))
7314 #t))))))
7315 (propagated-inputs
7316 `(("python-ipyparallel" ,python-ipyparallel)
7317 ("python-ipython" ,python-ipython)
7318 ("python-netifaces" ,python-netifaces)
7319 ("python-pyzmq" ,python-pyzmq)
7320 ("python-setuptools" ,python-setuptools)
7321 ("python-six" ,python-six)))
7322 (home-page "https://github.com/roryk/ipython-cluster-helper")
7323 (synopsis
7324 "Simplify IPython cluster start up and use for multiple schedulers")
7325 (description
7326 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7327 profile, launches a cluster and returns a view. On program exit it shuts the
7328 cluster down and deletes the throwaway profile.")
7329 (license license:expat)))
7330
7331 (define-public python2-ipython-cluster-helper
7332 (package-with-python2 python-ipython-cluster-helper))
7333
7334 (define-public python-traitlets
7335 (package
7336 (name "python-traitlets")
7337 (version "4.3.3")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (pypi-uri "traitlets" version))
7342 (sha256
7343 (base32
7344 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7345 (build-system python-build-system)
7346 (arguments
7347 `(#:phases
7348 (modify-phases %standard-phases
7349 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7350 (propagated-inputs
7351 `(("python-ipython-genutils" ,python-ipython-genutils)
7352 ("python-decorator" ,python-decorator)
7353 ("python-six" ,python-six)))
7354 (native-inputs
7355 `(("python-pytest" ,python-pytest)))
7356 (properties `((python2-variant . ,(delay python2-traitlets))))
7357 (home-page "https://ipython.org")
7358 (synopsis "Configuration system for Python applications")
7359 (description
7360 "Traitlets is a framework that lets Python classes have attributes with
7361 type checking, dynamically calculated default values, and ‘on change’
7362 callbacks. The package also includes a mechanism to use traitlets for
7363 configuration, loading values from files or from command line arguments. This
7364 is a distinct layer on top of traitlets, so you can use traitlets in your code
7365 without using the configuration machinery.")
7366 (license license:bsd-3)))
7367
7368 (define-public python2-traitlets
7369 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7370 (package/inherit traitlets
7371 (propagated-inputs
7372 `(("python2-enum34" ,python2-enum34)
7373 ,@(package-propagated-inputs traitlets))))))
7374
7375 (define-public python-jupyter-core
7376 (package
7377 (name "python-jupyter-core")
7378 (version "4.7.1")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (string-append (pypi-uri "jupyter_core" version)))
7383 (sha256
7384 (base32
7385 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7386 (build-system python-build-system)
7387 ;; FIXME: not sure how to run the tests
7388 (arguments `(#:tests? #f))
7389 (propagated-inputs
7390 `(("python-traitlets" ,python-traitlets)))
7391 ;; This package provides the `jupyter` binary and thus also exports the
7392 ;; search paths.
7393 (native-search-paths
7394 (list (search-path-specification
7395 (variable "JUPYTER_CONFIG_DIR")
7396 (files '("etc/jupyter")))
7397 (search-path-specification
7398 (variable "JUPYTER_PATH")
7399 (files '("share/jupyter")))))
7400 (home-page "https://jupyter.org/")
7401 (synopsis "Jupyter base package")
7402 (description
7403 "Jupyter core is the base package on which Jupyter projects rely.")
7404 (license license:bsd-3)))
7405
7406 (define-public python-jupyter-client
7407 (package
7408 (name "python-jupyter-client")
7409 (version "6.1.12")
7410 (source
7411 (origin
7412 (method url-fetch)
7413 (uri (pypi-uri "jupyter_client" version))
7414 (sha256
7415 (base32
7416 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7417 (build-system python-build-system)
7418 ;; Tests fail because of missing native python kernel which I assume is
7419 ;; provided by the ipython package, which we cannot use because it would
7420 ;; cause a dependency cycle.
7421 (arguments
7422 `(#:tests? #f
7423 #:phases (modify-phases %standard-phases
7424 (add-after 'unpack 'set-tool-file-names
7425 (lambda* (#:key inputs #:allow-other-keys)
7426 (let ((iproute (assoc-ref inputs "iproute")))
7427 (substitute* "jupyter_client/localinterfaces.py"
7428 (("'ip'")
7429 (string-append "'" iproute "/sbin/ip'")))
7430 #t))))))
7431 (inputs
7432 `(("iproute" ,iproute)))
7433 (propagated-inputs
7434 `(("python-dateutil" ,python-dateutil)
7435 ("python-jupyter-core" ,python-jupyter-core)
7436 ("python-pyzmq" ,python-pyzmq)
7437 ("python-tornado" ,python-tornado-6)
7438 ("python-traitlets" ,python-traitlets)))
7439 (native-inputs
7440 `(("python-pytest" ,python-pytest)))
7441 (home-page "https://jupyter.org/")
7442 (synopsis "Jupyter protocol implementation and client libraries")
7443 (description
7444 "The @code{jupyter_client} package contains the reference implementation
7445 of the Jupyter protocol. It also provides client and kernel management APIs
7446 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7447 installing @code{kernelspec}s for use with Jupyter frontends.")
7448 (license license:bsd-3)))
7449
7450 (define-public python2-jupyter-client
7451 (package-with-python2 python-jupyter-client))
7452
7453 (define-public python-ipykernel
7454 (package
7455 (name "python-ipykernel")
7456 (version "5.5.3")
7457 (source
7458 (origin
7459 (method url-fetch)
7460 (uri (pypi-uri "ipykernel" version))
7461 (sha256
7462 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7463 (build-system python-build-system)
7464 (arguments
7465 `(#:phases
7466 (modify-phases %standard-phases
7467 (replace 'check
7468 (lambda _
7469 (setenv "HOME" "/tmp")
7470 (invoke "pytest" "-v")
7471 #t))
7472 (add-after 'install 'set-python-file-name
7473 (lambda* (#:key outputs #:allow-other-keys)
7474 ;; Record the absolute file name of the 'python' executable in
7475 ;; 'kernel.json'.
7476 (let ((out (assoc-ref outputs "out")))
7477 (substitute* (string-append out "/share/jupyter"
7478 "/kernels/python3/kernel.json")
7479 (("\"python\"")
7480 (string-append "\"" (which "python") "\"")))
7481 #t))))))
7482 (propagated-inputs
7483 `(("python-ipython" ,python-ipython)
7484 ;; imported at runtime during connect
7485 ("python-jupyter-client" ,python-jupyter-client)))
7486 (native-inputs
7487 `(("python-flaky" ,python-flaky)
7488 ("python-nose" ,python-nose)
7489 ("python-pytest" ,python-pytest)))
7490 (home-page "https://ipython.org")
7491 (synopsis "IPython Kernel for Jupyter")
7492 (description
7493 "This package provides the IPython kernel for Jupyter.")
7494 (license license:bsd-3)))
7495
7496 (define-public python-pari-jupyter
7497 (package
7498 (name "python-pari-jupyter")
7499 (version "1.3.2")
7500 (source
7501 (origin
7502 (method url-fetch)
7503 (uri (pypi-uri "pari_jupyter" version))
7504 (sha256
7505 (base32
7506 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7507 (build-system python-build-system)
7508 (propagated-inputs
7509 `(("python-ipykernel" ,python-ipykernel)))
7510 (inputs
7511 `(("pari-gp" ,pari-gp)
7512 ("readline" ,readline)))
7513 (arguments
7514 `(#:tests? #f)) ; no test suite
7515 (home-page
7516 "https://github.com/jdemeyer/pari_jupyter")
7517 (synopsis "A Jupyter kernel for PARI/GP")
7518 (description "The package provides a PARI/GP kernel for Jupyter.")
7519 (license license:gpl3+)))
7520
7521 (define-public python-backcall
7522 (package
7523 (name "python-backcall")
7524 (version "0.2.0")
7525 (source
7526 (origin
7527 (method url-fetch)
7528 (uri (pypi-uri "backcall" version))
7529 (sha256
7530 (base32
7531 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7532 (build-system python-build-system)
7533 (home-page "https://github.com/takluyver/backcall/")
7534 (synopsis "Specifications for callback functions passed in to an API")
7535 (description
7536 "If your code lets other people supply callback functions, it's important
7537 to specify the function signature you expect, and check that functions support
7538 that. Adding extra parameters later would break other peoples code unless
7539 you're careful. The @code{backcall} package provides a way of specifying the
7540 callback signature using a prototype function.")
7541 (license license:bsd-3)))
7542
7543 (define-public python-ipython
7544 (package
7545 (name "python-ipython")
7546 (version "7.9.0")
7547 (source
7548 (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "ipython" version ".tar.gz"))
7551 (sha256
7552 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7553 (build-system python-build-system)
7554 (propagated-inputs
7555 `(("python-backcall" ,python-backcall)
7556 ("python-pyzmq" ,python-pyzmq)
7557 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7558 ("python-terminado" ,python-terminado)
7559 ("python-matplotlib" ,python-matplotlib)
7560 ("python-numpy" ,python-numpy)
7561 ("python-numpydoc" ,python-numpydoc)
7562 ("python-jedi" ,python-jedi)
7563 ("python-jinja2" ,python-jinja2)
7564 ("python-mistune" ,python-mistune)
7565 ("python-pexpect" ,python-pexpect)
7566 ("python-pickleshare" ,python-pickleshare)
7567 ("python-simplegeneric" ,python-simplegeneric)
7568 ("python-jsonschema" ,python-jsonschema)
7569 ("python-traitlets" ,python-traitlets)
7570 ("python-nbformat" ,python-nbformat)
7571 ("python-pygments" ,python-pygments)))
7572 (inputs
7573 `(("readline" ,readline)
7574 ("which" ,which)))
7575 (native-inputs
7576 `(("graphviz" ,graphviz)
7577 ("pkg-config" ,pkg-config)
7578 ("python-requests" ,python-requests) ;; for tests
7579 ("python-testpath" ,python-testpath)
7580 ("python-nose" ,python-nose)))
7581 (arguments
7582 `(#:phases
7583 (modify-phases %standard-phases
7584 (add-after 'unpack 'make-docs-reproducible
7585 (lambda _
7586 (substitute* "IPython/sphinxext/ipython_directive.py"
7587 ((".*import datetime") "")
7588 ((".*datetime.datetime.now\\(\\)") "")
7589 (("%timeit") "# %timeit"))
7590 #t))
7591 ;; Tests can only be run after the library has been installed and not
7592 ;; within the source directory.
7593 (delete 'check)
7594 (add-after 'install 'check
7595 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7596 (if tests?
7597 (begin
7598 ;; Make installed package available for running the tests
7599 (add-installed-pythonpath inputs outputs)
7600 (setenv "HOME" "/tmp/") ;; required by a test
7601 ;; We only test the core because one of the other tests
7602 ;; tries to import ipykernel.
7603 (invoke "python" "IPython/testing/iptest.py"
7604 "-v" "IPython/core/tests"))
7605 #t)))
7606 (add-before 'check 'fix-tests
7607 (lambda* (#:key inputs #:allow-other-keys)
7608 (substitute* "./IPython/utils/_process_posix.py"
7609 (("/usr/bin/env', 'which") (which "which")))
7610 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7611 (("#!/usr/bin/env python")
7612 (string-append "#!" (which "python"))))
7613 ;; This test introduces a circular dependency on ipykernel
7614 ;; (which depends on ipython).
7615 (delete-file "IPython/core/tests/test_display.py")
7616 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7617 (delete-file "IPython/core/tests/test_interactiveshell.py")
7618 #t)))))
7619 (home-page "https://ipython.org")
7620 (synopsis "IPython is a tool for interactive computing in Python")
7621 (description
7622 "IPython provides a rich architecture for interactive computing with:
7623 Powerful interactive shells, a browser-based notebook, support for interactive
7624 data visualization, embeddable interpreters and tools for parallel
7625 computing.")
7626 (properties `((python2-variant . ,(delay python2-ipython))))
7627 (license license:bsd-3)))
7628
7629 ;; This is the latest release of the LTS version of ipython with support for
7630 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7631 ;; dropped support for Python 2.7.
7632 (define-public python2-ipython
7633 (package
7634 (name "python2-ipython")
7635 (version "5.8.0")
7636 (source
7637 (origin
7638 (method url-fetch)
7639 (uri (pypi-uri "ipython" version ".tar.gz"))
7640 (sha256
7641 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7642 (build-system python-build-system)
7643 (propagated-inputs
7644 `(("python2-backports-shutil-get-terminal-size"
7645 ,python2-backports-shutil-get-terminal-size)
7646 ("python2-pathlib2" ,python2-pathlib2)
7647 ("python2-pyzmq" ,python2-pyzmq)
7648 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7649 ("python2-terminado" ,python2-terminado)
7650 ("python2-matplotlib" ,python2-matplotlib)
7651 ("python2-numpy" ,python2-numpy)
7652 ("python2-numpydoc" ,python2-numpydoc)
7653 ("python2-jinja2" ,python2-jinja2)
7654 ("python2-mistune" ,python2-mistune)
7655 ("python2-pexpect" ,python2-pexpect)
7656 ("python2-pickleshare" ,python2-pickleshare)
7657 ("python2-simplegeneric" ,python2-simplegeneric)
7658 ("python2-jsonschema" ,python2-jsonschema)
7659 ("python2-traitlets" ,python2-traitlets)
7660 ("python2-nbformat" ,python2-nbformat)
7661 ("python2-pygments" ,python2-pygments)))
7662 (inputs
7663 `(("readline" ,readline)
7664 ("which" ,which)))
7665 (native-inputs
7666 `(("graphviz" ,graphviz)
7667 ("pkg-config" ,pkg-config)
7668 ("python2-requests" ,python2-requests) ;; for tests
7669 ("python2-testpath" ,python2-testpath)
7670 ("python2-mock" ,python2-mock)
7671 ("python2-nose" ,python2-nose)))
7672 (arguments
7673 `(#:python ,python-2
7674 #:phases
7675 (modify-phases %standard-phases
7676 (add-before 'check 'delete-broken-tests
7677 (lambda* (#:key inputs #:allow-other-keys)
7678 ;; These tests throw errors for unknown reasons.
7679 (delete-file "IPython/core/tests/test_displayhook.py")
7680 (delete-file "IPython/core/tests/test_magic_terminal.py")
7681 (delete-file "IPython/core/tests/test_profile.py")
7682 #t)))))
7683 (home-page "https://ipython.org")
7684 (synopsis "IPython is a tool for interactive computing in Python")
7685 (description
7686 "IPython provides a rich architecture for interactive computing with:
7687 Powerful interactive shells, a browser-based notebook, support for interactive
7688 data visualization, embeddable interpreters and tools for parallel
7689 computing.")
7690 (license license:bsd-3)))
7691
7692 (define-public python-ipython-documentation
7693 (package
7694 (inherit python-ipython)
7695 (name "python-ipython-documentation")
7696 (version (package-version python-ipython))
7697 (arguments
7698 `(#:phases
7699 (modify-phases %standard-phases
7700 (delete 'build)
7701 (delete 'check)
7702 (replace 'install
7703 (lambda* (#:key outputs #:allow-other-keys)
7704 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7705 (doc (string-append data "/doc/" ,name "-" ,version))
7706 (html (string-append doc "/html"))
7707 (man1 (string-append data "/man/man1"))
7708 (info (string-append data "/info"))
7709 (examples (string-append doc "/examples"))
7710 (python-arg (string-append "PYTHON=" (which "python"))))
7711 (setenv "LANG" "en_US.utf8")
7712 (with-directory-excursion "docs"
7713 ;; FIXME: pdf fails to build
7714 ;;(system* "make" "pdf" "PAPER=a4")
7715 (system* "make" python-arg "html")
7716 ;; FIXME: the generated texi file contains ^@^@, which trips
7717 ;; up the parser.
7718 ;; (system* "make" python-arg "info")
7719 )
7720 (copy-recursively "docs/man" man1)
7721 (copy-recursively "examples" examples)
7722 (copy-recursively "docs/build/html" html)
7723 ;; (copy-file "docs/build/latex/ipython.pdf"
7724 ;; (string-append doc "/ipython.pdf"))
7725 (mkdir-p info)
7726 ;; (copy-file "docs/build/texinfo/ipython.info"
7727 ;; (string-append info "/ipython.info"))
7728 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7729 #t)))))
7730 (inputs
7731 `(("python-ipython" ,python-ipython)
7732 ("python-ipykernel" ,python-ipykernel)))
7733 (native-inputs
7734 `(("python-sphinx" ,python-sphinx)
7735 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7736 ;; FIXME: It's possible that a smaller union would work just as well.
7737 ("texlive" ,(texlive-union (list texlive-amsfonts
7738 texlive-fonts-ec
7739 texlive-generic-ifxetex
7740 texlive-generic-pdftex
7741 texlive-latex-capt-of
7742 texlive-latex-cmap
7743 texlive-latex-environ
7744 texlive-latex-eqparbox
7745 texlive-latex-etoolbox
7746 texlive-latex-expdlist
7747 texlive-latex-fancyhdr
7748 texlive-latex-fancyvrb
7749 texlive-latex-fncychap
7750 texlive-latex-float
7751 texlive-latex-framed
7752 texlive-latex-geometry
7753 texlive-latex-graphics
7754 texlive-latex-hyperref
7755 texlive-latex-mdwtools
7756 texlive-latex-multirow
7757 texlive-latex-needspace
7758 texlive-latex-oberdiek
7759 texlive-latex-parskip
7760 texlive-latex-preview
7761 texlive-latex-tabulary
7762 texlive-latex-threeparttable
7763 texlive-latex-titlesec
7764 texlive-latex-trimspaces
7765 texlive-latex-ucs
7766 texlive-latex-upquote
7767 texlive-latex-url
7768 texlive-latex-varwidth
7769 texlive-latex-wrapfig)))
7770 ("texinfo" ,texinfo)))))
7771
7772 (define-public python-urwid
7773 (package
7774 (name "python-urwid")
7775 (version "2.1.2")
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (pypi-uri "urwid" version))
7780 (sha256
7781 (base32
7782 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
7783 (build-system python-build-system)
7784 (home-page "http://urwid.org")
7785 (synopsis "Console user interface library for Python")
7786 (description
7787 "Urwid is a curses-based UI/widget library for Python. It includes many
7788 features useful for text console applications.")
7789 (properties `((python2-variant . ,(delay python2-urwid))))
7790 (license license:lgpl2.1+)))
7791
7792 (define-public python2-urwid
7793 (let ((base (package-with-python2
7794 (strip-python2-variant python-urwid))))
7795 (package/inherit base
7796 (version "2.1.0")
7797 (source
7798 (origin
7799 (method url-fetch)
7800 (uri (pypi-uri "urwid" version))
7801 (sha256
7802 (base32
7803 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
7804
7805 (define-public python-urwid-readline
7806 (package
7807 (name "python-urwid-readline")
7808 (version "0.12")
7809 (source
7810 (origin
7811 (method git-fetch)
7812 (uri (git-reference
7813 (url "https://github.com/rr-/urwid_readline")
7814 (commit version)))
7815 (file-name (git-file-name name version))
7816 (sha256
7817 (base32
7818 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
7819 (build-system python-build-system)
7820 (arguments
7821 `(#:phases
7822 (modify-phases %standard-phases
7823 (replace 'check
7824 (lambda* (#:key tests? #:allow-other-keys)
7825 (when tests?
7826 (invoke "python" "-m" "pytest"))
7827 #t)))))
7828 (propagated-inputs
7829 `(("python-urwid" ,python-urwid)))
7830 (native-inputs
7831 `(("python-pytest" ,python-pytest)))
7832 (home-page "https://github.com/rr-/urwid_readline")
7833 (synopsis "Text input widget for urwid that supports readline shortcuts")
7834 (description
7835 "This package provides a textbox edit widget for @code{python-urwid} that
7836 supports @code{readline} shortcuts.")
7837 (license license:expat)))
7838
7839 (define-public python-urwidtrees
7840 (package
7841 (name "python-urwidtrees")
7842 (version "1.0.2")
7843 (source
7844 (origin
7845 (method git-fetch)
7846 ;; package author intends on distributing via github rather than pypi:
7847 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7848 (uri (git-reference
7849 (url "https://github.com/pazz/urwidtrees")
7850 (commit version)))
7851 (file-name (git-file-name name version))
7852 (sha256
7853 (base32
7854 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7855 (build-system python-build-system)
7856 (arguments
7857 '(#:use-setuptools? #f
7858 #:tests? #f)) ; no tests
7859 (propagated-inputs `(("python-urwid" ,python-urwid)))
7860 (home-page "https://github.com/pazz/urwidtrees")
7861 (synopsis "Tree widgets for urwid")
7862 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7863 toolkit. Use it to build trees of widgets.")
7864 (license license:gpl3+)))
7865
7866 (define-public python2-urwidtrees
7867 (package-with-python2 python-urwidtrees))
7868
7869 (define-public python-ua-parser
7870 (package
7871 (name "python-ua-parser")
7872 (version "0.8.0")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "ua-parser" version))
7877 (sha256
7878 (base32
7879 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7880 (build-system python-build-system)
7881 (arguments
7882 `(#:tests? #f)) ;no test suite in release
7883 (native-inputs
7884 `(("python-pyyaml" ,python-pyyaml)))
7885 (home-page "https://github.com/ua-parser/uap-python")
7886 (synopsis "User agent parser")
7887 (description
7888 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7889 (license license:asl2.0)))
7890
7891 (define-public python2-ua-parser
7892 (package-with-python2 python-ua-parser))
7893
7894 (define-public python-user-agents
7895 (package
7896 (name "python-user-agents")
7897 (version "1.1.0")
7898 (source
7899 (origin
7900 (method url-fetch)
7901 (uri (pypi-uri "user-agents" version))
7902 (sha256
7903 (base32
7904 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7905 (build-system python-build-system)
7906 (arguments
7907 `(#:tests? #f)) ;missing devices.json test file in release
7908 (propagated-inputs
7909 `(("python-ua-parser" ,python-ua-parser)))
7910 (home-page "https://github.com/selwin/python-user-agents")
7911 (synopsis "User Agent strings parsing library")
7912 (description
7913 "A library to identify devices (phones, tablets) and their capabilities by
7914 parsing (browser/HTTP) user agent strings.")
7915 (license license:expat)))
7916
7917 (define-public python2-user-agents
7918 (package-with-python2 python-user-agents))
7919
7920 (define-public python-dbus
7921 (package
7922 (name "python-dbus")
7923 (version "1.2.16")
7924 (source
7925 (origin
7926 (method url-fetch)
7927 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7928 "dbus-python-" version ".tar.gz"))
7929 (sha256
7930 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7931 (build-system gnu-build-system)
7932 (native-inputs
7933 `(("pkg-config" ,pkg-config)))
7934 (inputs
7935 `(("python" ,python-wrapper)
7936 ("dbus-glib" ,dbus-glib)))
7937 (synopsis "Python bindings for D-bus")
7938 (description "python-dbus provides bindings for libdbus, the reference
7939 implementation of D-Bus.")
7940 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7941 (license license:expat)))
7942
7943 (define-public python2-dbus
7944 (package/inherit python-dbus
7945 (name "python2-dbus")
7946 (inputs `(("python" ,python-2)
7947 ,@(alist-delete "python"
7948 (package-inputs python-dbus)
7949 equal?)))))
7950
7951 (define-public python-notify2
7952 (package
7953 (name "python-notify2")
7954 (version "0.3.1")
7955 (source
7956 (origin
7957 (method url-fetch)
7958 (uri (pypi-uri "notify2" version))
7959 (sha256
7960 (base32
7961 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7962 (build-system python-build-system)
7963 (arguments `(#:tests? #f)) ; tests depend on system state
7964 (native-inputs
7965 `(("python-dbus" ,python-dbus)))
7966 (home-page "https://bitbucket.org/takluyver/pynotify2")
7967 (synopsis "Python interface to D-Bus notifications")
7968 (description
7969 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7970 It is a reimplementation of pynotify in pure Python, and an alternative to
7971 the GObject Introspection bindings to libnotify for non-GTK applications.")
7972 (license (list license:bsd-2
7973 license:lgpl2.1+))))
7974
7975 (define-public python2-notify2
7976 (package-with-python2 python-notify2))
7977
7978 ;; beautifulsoup4 has a totally different namespace than 3.x,
7979 ;; and pypi seems to put it under its own name, so I guess we should too
7980 (define-public python-beautifulsoup4
7981 (package
7982 (name "python-beautifulsoup4")
7983 (version "4.9.3")
7984 (source
7985 (origin
7986 (method url-fetch)
7987 (uri (pypi-uri "beautifulsoup4" version))
7988 (sha256
7989 (base32
7990 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
7991 (build-system python-build-system)
7992 (arguments
7993 `(#:phases
7994 (modify-phases %standard-phases
7995 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7996 ;; must use this conversion script when building with Python 3. The
7997 ;; conversion script also runs the tests.
7998 ;; For more information, see the file 'convert-py3k' in the source
7999 ;; distribution.
8000 (replace 'check
8001 (lambda _ (invoke "./convert-py3k"))))))
8002 (propagated-inputs
8003 `(("python-soupsieve" ,python-soupsieve)))
8004 (home-page
8005 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8006 (synopsis
8007 "Python screen-scraping library")
8008 (description
8009 "Beautiful Soup is a Python library designed for rapidly setting up
8010 screen-scraping projects. It offers Pythonic idioms for navigating,
8011 searching, and modifying a parse tree, providing a toolkit for
8012 dissecting a document and extracting what you need. It automatically
8013 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8014 (license license:expat)
8015 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8016
8017 (define-public python2-beautifulsoup4
8018 (let ((base (package-with-python2
8019 (strip-python2-variant python-beautifulsoup4))))
8020 (package/inherit base
8021 (arguments `(#:python ,python-2)))))
8022
8023 (define-public python-soupsieve
8024 (package
8025 (name "python-soupsieve")
8026 (version "2.2.1")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "soupsieve" version))
8031 (sha256
8032 (base32
8033 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8034 (build-system python-build-system)
8035 (arguments `(#:tests? #f))
8036 ;;XXX: 2 tests fail currently despite claming they were to be
8037 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8038 ;;don't want to create a circular dependency.
8039 (home-page "https://github.com/facelessuser/soupsieve")
8040 (synopsis "CSS selector library")
8041 (description
8042 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8043 Soup 4. It aims to provide selecting, matching, and filtering using modern
8044 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8045 specifications up through the latest CSS level 4 drafts and beyond (though
8046 some are not yet implemented).")
8047 (properties `((python2-variant . ,(delay python2-soupsieve))))
8048 (license license:expat)))
8049
8050 ;; This is the last version that supports python-2
8051 (define-public python2-soupsieve
8052 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8053 (package
8054 (inherit base)
8055 (version "1.9.6")
8056 (source
8057 (origin
8058 (method url-fetch)
8059 (uri (pypi-uri "soupsieve" version))
8060 (sha256
8061 (base32
8062 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8063 (propagated-inputs
8064 `(("python2-backports-functools-lru-cache"
8065 ,python2-backports-functools-lru-cache)
8066 ,@(package-propagated-inputs base))))))
8067
8068 (define-public python-netifaces
8069 (package
8070 (name "python-netifaces")
8071 (version "0.10.9")
8072 (source
8073 (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "netifaces" version))
8076 (sha256
8077 (base32
8078 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8079 (build-system python-build-system)
8080 (home-page "https://github.com/al45tair/netifaces")
8081 (synopsis
8082 "Python module for portable network interface information")
8083 (description
8084 "Netifaces is a Python module providing information on network
8085 interfaces in an easy and portable manner.")
8086 (license license:expat)))
8087
8088 (define-public python2-netifaces
8089 (package-with-python2 python-netifaces))
8090
8091 (define-public python-networkx
8092 (package
8093 (name "python-networkx")
8094 (version "2.5")
8095 (source
8096 (origin
8097 (method url-fetch)
8098 (uri (pypi-uri "networkx" version))
8099 (sha256
8100 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
8101 (build-system python-build-system)
8102 (arguments
8103 '(#:phases (modify-phases %standard-phases
8104 (replace 'check
8105 (lambda* (#:key tests? #:allow-other-keys)
8106 (if tests?
8107 (invoke "pytest" "-vv" "--pyargs" "networkx")
8108 (format #t "test suite not run~%"))
8109 #t)))))
8110 ;; python-decorator is needed at runtime.
8111 (propagated-inputs
8112 `(("python-decorator" ,python-decorator)))
8113 (native-inputs
8114 `(("python-pytest" ,python-pytest)))
8115 (home-page "https://networkx.github.io/")
8116 (synopsis "Python module for creating and manipulating graphs and networks")
8117 (description
8118 "NetworkX is a Python package for the creation, manipulation, and study
8119 of the structure, dynamics, and functions of complex networks.")
8120 (properties `((python2-variant . ,(delay python2-networkx))))
8121 (license license:bsd-3)))
8122
8123 ;; NetworkX 2.2 is the last version with support for Python 2.
8124 (define-public python2-networkx
8125 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8126 (package
8127 (inherit base)
8128 (version "2.2")
8129 (source (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "networkx" version ".zip"))
8132 (sha256
8133 (base32
8134 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8135 (arguments
8136 `(#:python ,python-2))
8137 (native-inputs
8138 `(("python-nose" ,python2-nose)
8139 ("unzip" ,unzip))))))
8140
8141 (define-public python-datrie
8142 (package
8143 (name "python-datrie")
8144 (version "0.8.2")
8145 (source
8146 (origin
8147 (method url-fetch)
8148 (uri (pypi-uri "datrie" version))
8149 (sha256
8150 (base32
8151 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8152 (build-system python-build-system)
8153 (native-inputs
8154 `(("python-cython" ,python-cython)
8155 ("python-hypothesis" ,python-hypothesis)
8156 ("python-pytest" ,python-pytest)
8157 ("python-pytest-runner" ,python-pytest-runner)))
8158 (home-page "https://github.com/kmike/datrie")
8159 (synopsis "Fast, efficiently stored trie for Python")
8160 (description
8161 "This package provides a fast, efficiently stored trie implementation for
8162 Python.")
8163 (license license:lgpl2.1+)))
8164
8165 (define-public python-amply
8166 (package
8167 (name "python-amply")
8168 (version "0.1.4")
8169 (source
8170 (origin
8171 (method url-fetch)
8172 (uri (pypi-uri "amply" version))
8173 (sha256
8174 (base32
8175 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8176 (build-system python-build-system)
8177 (propagated-inputs
8178 `(("python-docutils" ,python-docutils)
8179 ("python-pyparsing" ,python-pyparsing)))
8180 (native-inputs
8181 `(("python-setuptools-scm" ,python-setuptools-scm)))
8182 (home-page "https://github.com/willu47/amply")
8183 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8184 (description
8185 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8186 structures.")
8187 (license license:epl1.0)))
8188
8189 (define-public python-pulp
8190 (package
8191 (name "python-pulp")
8192 (version "2.4")
8193 (source
8194 (origin
8195 (method url-fetch)
8196 (uri (pypi-uri "PuLP" version))
8197 (sha256
8198 (base32
8199 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8200 (build-system python-build-system)
8201 (propagated-inputs
8202 `(("python-amply" ,python-amply)))
8203 (home-page "https://github.com/coin-or/pulp")
8204 (synopsis "Linear Programming modeler")
8205 (description
8206 "PuLP is a Linear Programming modeler written in Python. PuLP can
8207 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8208 solve linear problems.")
8209 (license license:expat)))
8210
8211 (define-public python-toposort
8212 (package
8213 (name "python-toposort")
8214 (version "1.6")
8215 (source
8216 (origin
8217 (method url-fetch)
8218 (uri (pypi-uri "toposort" version))
8219 (sha256
8220 (base32
8221 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8222 (build-system python-build-system)
8223 (home-page "https://gitlab.com/ericvsmith/toposort")
8224 (synopsis "Topological sort algorithm")
8225 (description
8226 "This package provides an implementation of a topological sort
8227 algorithm.")
8228 (license license:asl2.0)))
8229
8230 (define-public snakemake
8231 (package
8232 (name "snakemake")
8233 (version "5.32.2")
8234 (source
8235 (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "snakemake" version))
8238 (sha256
8239 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8240 (build-system python-build-system)
8241 (arguments
8242 ;; TODO: Package missing test dependencies.
8243 '(#:tests? #f
8244 #:phases
8245 (modify-phases %standard-phases
8246 ;; For cluster execution Snakemake will call Python. Since there is
8247 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8248 ;; this by calling the snakemake wrapper instead.
8249 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8250 (lambda* (#:key outputs #:allow-other-keys)
8251 (substitute* "snakemake/executors/__init__.py"
8252 (("\\{sys.executable\\} -m snakemake")
8253 (string-append (assoc-ref outputs "out")
8254 "/bin/snakemake")))
8255 #t)))))
8256 (propagated-inputs
8257 `(("python-appdirs" ,python-appdirs)
8258 ("python-configargparse" ,python-configargparse)
8259 ("python-datrie" ,python-datrie)
8260 ("python-docutils" ,python-docutils)
8261 ("python-gitpython" ,python-gitpython)
8262 ("python-jinja2" ,python-jinja2)
8263 ("python-jsonschema" ,python-jsonschema)
8264 ("python-nbformat" ,python-nbformat)
8265 ("python-networkx" ,python-networkx)
8266 ("python-psutil" ,python-psutil)
8267 ("python-pulp" ,python-pulp)
8268 ("python-pyyaml" ,python-pyyaml)
8269 ("python-ratelimiter" ,python-ratelimiter)
8270 ("python-requests" ,python-requests)
8271 ("python-toposort" ,python-toposort)
8272 ("python-wrapt" ,python-wrapt)))
8273 (home-page "https://snakemake.readthedocs.io")
8274 (synopsis "Python-based execution environment for make-like workflows")
8275 (description
8276 "Snakemake aims to reduce the complexity of creating workflows by
8277 providing a clean and modern domain specific specification language (DSL) in
8278 Python style, together with a fast and comfortable execution environment.")
8279 (license license:expat)))
8280
8281 (define-public python-pyqrcode
8282 (package
8283 (name "python-pyqrcode")
8284 (version "1.2.1")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "PyQRCode" version))
8289 (sha256
8290 (base32
8291 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8292 (build-system python-build-system)
8293 (home-page
8294 "https://github.com/mnooner256/pyqrcode")
8295 (synopsis "QR code generator")
8296 (description
8297 "Pyqrcode is a QR code generator written purely in Python with
8298 SVG, EPS, PNG and terminal output.")
8299 (license license:bsd-3)))
8300
8301 (define-public python-seaborn
8302 (package
8303 (name "python-seaborn")
8304 (version "0.10.0")
8305 (source
8306 (origin
8307 (method url-fetch)
8308 (uri (pypi-uri "seaborn" version))
8309 (sha256
8310 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8311 (build-system python-build-system)
8312 (arguments
8313 `(#:phases
8314 (modify-phases %standard-phases
8315 (add-before 'check 'start-xserver
8316 (lambda* (#:key inputs #:allow-other-keys)
8317 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8318 ;; There must be a running X server and make check doesn't
8319 ;; start one. Therefore we must do it.
8320 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8321 (setenv "DISPLAY" ":1")
8322 #t)))
8323 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8324 (propagated-inputs
8325 `(("python-pandas" ,python-pandas)
8326 ("python-matplotlib" ,python-matplotlib)
8327 ("python-numpy" ,python-numpy)
8328 ("python-scipy" ,python-scipy)))
8329 (native-inputs
8330 `(("python-pytest" ,python-pytest)
8331 ("xorg-server" ,xorg-server-for-tests)))
8332 (home-page "https://seaborn.pydata.org/")
8333 (synopsis "Statistical data visualization")
8334 (description
8335 "Seaborn is a library for making attractive and informative statistical
8336 graphics in Python. It is built on top of matplotlib and tightly integrated
8337 with the PyData stack, including support for numpy and pandas data structures
8338 and statistical routines from scipy and statsmodels.")
8339 (properties `((python2-variant . ,(delay python2-seaborn))))
8340 (license license:bsd-3)))
8341
8342 ;; 0.9.1 is the last release with support for Python 2.
8343 (define-public python2-seaborn
8344 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8345 (package
8346 (inherit base)
8347 (version "0.9.1")
8348 (source (origin
8349 (method url-fetch)
8350 (uri (pypi-uri "seaborn" version))
8351 (sha256
8352 (base32
8353 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8354
8355 (define-public python-mpmath
8356 (package
8357 (name "python-mpmath")
8358 (version "1.1.0")
8359 (source (origin
8360 (method url-fetch)
8361 (uri (pypi-uri "mpmath" version))
8362 (file-name (git-file-name name version))
8363 (sha256
8364 (base32
8365 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8366 (build-system python-build-system)
8367 (native-inputs
8368 `(("python-pytest" ,python-pytest)))
8369 (arguments
8370 '(#:phases
8371 (modify-phases %standard-phases
8372 (replace 'check
8373 (lambda _
8374 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8375 (home-page "https://mpmath.org")
8376 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8377 (description
8378 "@code{mpmath} can be used as an arbitrary-precision substitute for
8379 Python's float/complex types and math/cmath modules, but also does much
8380 more advanced mathematics.")
8381 (license license:bsd-3)))
8382
8383 (define-public python2-mpmath
8384 (package-with-python2 python-mpmath))
8385
8386 (define-public python-bigfloat
8387 (package
8388 (name "python-bigfloat")
8389 (version "0.3.0")
8390 (source
8391 (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "bigfloat" version))
8394 (sha256
8395 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8396 (build-system python-build-system)
8397 (inputs
8398 `(("mpfr" ,mpfr)))
8399 (home-page "https://github.com/mdickinson/bigfloat")
8400 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8401 (description
8402 "This package provides a Python interface to the MPFR library for
8403 multiprecision arithmetic.")
8404 (license license:lgpl3+)))
8405
8406 (define-public python2-bigfloat
8407 (package-with-python2 python-bigfloat))
8408
8409 (define-public python-sympy
8410 (package
8411 (name "python-sympy")
8412 (version "1.7.1")
8413 (source
8414 (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "sympy" version))
8417 (sha256
8418 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8419 (build-system python-build-system)
8420 (arguments
8421 `(#:phases
8422 (modify-phases %standard-phases
8423 (replace 'check
8424 (lambda* (#:key outputs #:allow-other-keys)
8425 (invoke
8426 (or (which "python3") (which "python"))
8427 "-c" "import sympy; sympy.test(\"/core\")"))))))
8428 (propagated-inputs
8429 `(("python-mpmath" ,python-mpmath)))
8430 (home-page "https://www.sympy.org/")
8431 (synopsis "Python library for symbolic mathematics")
8432 (description
8433 "SymPy is a Python library for symbolic mathematics. It aims to become a
8434 full-featured computer algebra system (CAS) while keeping the code as simple
8435 as possible in order to be comprehensible and easily extensible.")
8436 (license license:bsd-3)))
8437
8438 (define-public python2-sympy
8439 (package
8440 (inherit (package-with-python2 python-sympy))
8441 (version "1.5.1") ; last release for python2
8442 (source
8443 (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "sympy" version))
8446 (sha256
8447 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8448
8449 (define-public python-q
8450 (package
8451 (name "python-q")
8452 (version "2.6")
8453 (source
8454 (origin
8455 (method url-fetch)
8456 (uri (pypi-uri "q" version))
8457 (sha256
8458 (base32
8459 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8460 (build-system python-build-system)
8461 (home-page "https://github.com/zestyping/q")
8462 (synopsis "Quick-and-dirty debugging output for tired programmers")
8463 (description
8464 "q is a Python module for \"print\" style of debugging Python code. It
8465 provides convenient short API for print out of values, tracebacks, and
8466 falling into the Python interpreter.")
8467 (license license:asl2.0)))
8468
8469 (define-public python2-q
8470 (package-with-python2 python-q))
8471
8472 (define-public python-xlib
8473 (package
8474 (name "python-xlib")
8475 (version "0.29")
8476 (source
8477 (origin
8478 (method git-fetch)
8479 (uri (git-reference
8480 (url "https://github.com/python-xlib/python-xlib")
8481 (commit version)))
8482 (file-name (git-file-name name version))
8483 (sha256
8484 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8485 (build-system python-build-system)
8486 (arguments
8487 `(#:phases
8488 (modify-phases %standard-phases
8489 (add-before 'check 'start-xserver
8490 (lambda* (#:key inputs #:allow-other-keys)
8491 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8492 ;; There must be a running X server and make check doesn't
8493 ;; start one. Therefore we must do it.
8494 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8495 (setenv "DISPLAY" ":1")
8496 #t))))))
8497 (native-inputs
8498 `(("python-mock" ,python-mock)
8499 ("python-setuptools-scm" ,python-setuptools-scm)
8500 ("xorg-server" ,xorg-server)))
8501 (propagated-inputs
8502 `(("python-six" ,python-six)))
8503 (home-page "https://github.com/python-xlib/python-xlib")
8504 (synopsis "Python X11 client library")
8505 (description
8506 "The Python X Library is intended to be a fully functional
8507 X client library for Python programs. It is useful to implement
8508 low-level X clients. It is written entirely in Python.")
8509 (license license:gpl2+)))
8510
8511 (define-public python2-xlib
8512 (package-with-python2 python-xlib))
8513
8514 (define-public python-singledispatch
8515 (package
8516 (name "python-singledispatch")
8517 (version "3.4.0.3")
8518 (source
8519 (origin
8520 (method url-fetch)
8521 (uri (pypi-uri "singledispatch" version))
8522 (sha256
8523 (base32
8524 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8525 (build-system python-build-system)
8526 (native-inputs
8527 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8528 (home-page
8529 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8530 (synopsis "Backport of singledispatch feature from Python 3.4")
8531 (description
8532 "This library brings functools.singledispatch from Python 3.4 to Python
8533 2.6-3.3.")
8534 (license license:expat)))
8535
8536 (define-public python2-singledispatch
8537 (package-with-python2 python-singledispatch))
8538
8539 ;; the python- version can be removed with python-3.5
8540 (define-public python-backports-abc
8541 (package
8542 (name "python-backports-abc")
8543 (version "0.5")
8544 (source
8545 (origin
8546 (method url-fetch)
8547 (uri (pypi-uri "backports_abc" version))
8548 (sha256
8549 (base32
8550 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8551 (build-system python-build-system)
8552 (home-page "https://github.com/cython/backports_abc")
8553 (synopsis "Backport of additions to the 'collections.abc' module")
8554 (description
8555 "Python-backports-abc provides a backport of additions to the
8556 @code{collections.abc} module in Python-3.5.")
8557 (license license:psfl)))
8558
8559 (define-public python2-backports-abc
8560 (package-with-python2 python-backports-abc))
8561
8562 (define-public python-backports-csv
8563 (package
8564 (name "python-backports-csv")
8565 (version "1.0.7")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "backports.csv" version))
8570 (sha256
8571 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8572 (build-system python-build-system)
8573 (home-page "https://github.com/ryanhiebert/backports.csv")
8574 (synopsis "Backport of Python 3's csv module for Python 2")
8575 (description
8576 "Provides a backport of Python 3's @code{csv} module for parsing
8577 comma separated values. The API of the @code{csv} module in Python 2
8578 is drastically different from the @code{csv} module in Python 3.
8579 This is due, for the most part, to the difference between str in
8580 Python 2 and Python 3.")
8581 (license license:psfl)))
8582
8583 (define-public python2-backports-csv
8584 (package-with-python2 python-backports-csv))
8585
8586 (define-public python2-backports-shutil-get-terminal-size
8587 (package
8588 (name "python2-backports-shutil-get-terminal-size")
8589 (version "1.0.0")
8590 (source
8591 (origin
8592 (method url-fetch)
8593 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8594 (sha256
8595 (base32
8596 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8597 (build-system python-build-system)
8598 (arguments
8599 `(#:python ,python-2
8600 #:phases
8601 (modify-phases %standard-phases
8602 (replace 'check
8603 (lambda _
8604 (setenv "PYTHONPATH" (string-append "./build/lib:"
8605 (getenv "PYTHONPATH")))
8606 (invoke "py.test" "-v"))))))
8607 (native-inputs
8608 `(("python2-pytest" ,python2-pytest)))
8609 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8610 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8611 (description
8612 "This package provides a backport of the @code{get_terminal_size
8613 function} from Python 3.3's @code{shutil}.
8614 Unlike the original version it is written in pure Python rather than C,
8615 so it might be a tiny bit slower.")
8616 (license license:expat)))
8617
8618 (define-public python-waf
8619 (package
8620 (name "python-waf")
8621 (version "2.0.19")
8622 (source (origin
8623 (method url-fetch)
8624 (uri (string-append "https://waf.io/"
8625 "waf-" version ".tar.bz2"))
8626 (sha256
8627 (base32
8628 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8629 (build-system python-build-system)
8630 (arguments
8631 '(#:phases
8632 (modify-phases %standard-phases
8633 (replace 'build
8634 (lambda _
8635 ;; XXX: Find a way to add all extra tools.
8636 (let ((tools '("gccdeps"
8637 "clang_compilation_database")))
8638 (invoke "python" "waf-light" "configure" "build"
8639 (string-append "--tools="
8640 (string-join tools ","))))))
8641 (replace 'check
8642 (lambda _
8643 (invoke "python" "waf" "--version")))
8644 (replace 'install
8645 (lambda* (#:key outputs #:allow-other-keys)
8646 (let ((out (assoc-ref outputs "out")))
8647 (install-file "waf" (string-append out "/bin")))
8648 #t))
8649 ;; waf breaks when it is wrapped.
8650 (delete 'wrap))))
8651 (home-page "https://waf.io/")
8652 (synopsis "Python-based build system")
8653 (description
8654 "Waf is a Python-based framework for configuring, compiling and installing
8655 applications.")
8656 (license license:bsd-3)))
8657
8658 (define-public python2-waf
8659 (package-with-python2 python-waf))
8660
8661 (define-public python-pyzmq
8662 (package
8663 (name "python-pyzmq")
8664 (version "22.0.3")
8665 (source
8666 (origin
8667 (method url-fetch)
8668 (uri (pypi-uri "pyzmq" version))
8669 (sha256
8670 (base32 "0bgrn65cxfz1c1sjrgyq5dy1mkhppxxbizd5wvrl03cq4zhkrxpp"))))
8671 (build-system python-build-system)
8672 (arguments
8673 `(#:configure-flags
8674 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8675 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8676 ;; --inplace' for 'python setup.py test' to work.
8677 #:tests? #f))
8678 (inputs
8679 `(("zeromq" ,zeromq)))
8680 (native-inputs
8681 `(("pkg-config" ,pkg-config)
8682 ("python-nose" ,python-nose)))
8683 (home-page "https://github.com/zeromq/pyzmq")
8684 (synopsis "Python bindings for 0MQ")
8685 (description
8686 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8687 (license license:bsd-4)))
8688
8689 (define-public python2-pyzmq
8690 (package-with-python2 python-pyzmq))
8691
8692 (define-public python-pep8
8693 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8694 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8695 ;; some dependents' test suites, and nothing more.
8696 (package
8697 (name "python-pep8")
8698 (version "1.7.0")
8699 (source
8700 (origin
8701 (method url-fetch)
8702 (uri (pypi-uri "pep8" version))
8703 (sha256
8704 (base32
8705 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8706 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8707 (build-system python-build-system)
8708 (home-page "https://pep8.readthedocs.org/")
8709 (synopsis "Python style guide checker")
8710 (description
8711 "This tools checks Python code against some of the style conventions in
8712 PEP 8.")
8713 (license license:expat)))
8714
8715 (define-public python2-pep8
8716 (package-with-python2 python-pep8))
8717
8718 (define-public python-pep517
8719 (package
8720 (inherit python-pep517-bootstrap)
8721 (name "python-pep517")
8722 (arguments
8723 '(#:phases
8724 (modify-phases %standard-phases
8725 (replace 'check
8726 (lambda* (#:key tests? #:allow-other-keys)
8727 (delete-file "pytest.ini")
8728 ;; This test tries to connect to the internet
8729 (delete-file "tests/test_meta.py")
8730 (if tests?
8731 (invoke "pytest")
8732 #t))))))
8733 (native-inputs
8734 `(("python-mock" ,python-mock)
8735 ("python-pytest" ,python-pytest)
8736 ("python-testpath" ,python-testpath)))
8737 (properties `((python2-variant . ,(delay python2-pep517))))))
8738
8739 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8740 (define-public python2-pep517
8741 (let ((base (package-with-python2
8742 (strip-python2-variant python-pep517))))
8743 (package/inherit base
8744 (name "python2-pep517")
8745 (arguments
8746 `(#:tests? #f
8747 ,@(package-arguments base)))
8748 (native-inputs `()))))
8749
8750 (define-public python-pyflakes
8751 (package
8752 (name "python-pyflakes")
8753 (version "2.3.1")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "pyflakes" version))
8758 (sha256
8759 (base32
8760 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
8761 (build-system python-build-system)
8762 (home-page
8763 "https://github.com/pyflakes/pyflakes")
8764 (synopsis "Passive checker of Python programs")
8765 (description
8766 "Pyflakes statically checks Python source code for common errors.")
8767 (license license:expat)))
8768
8769 (define-public python2-pyflakes
8770 (package-with-python2 python-pyflakes))
8771
8772 (define-public python-mccabe
8773 (package
8774 (name "python-mccabe")
8775 (version "0.6.1")
8776 (source
8777 (origin
8778 (method url-fetch)
8779 (uri (pypi-uri "mccabe" version))
8780 (sha256
8781 (base32
8782 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8783 (build-system python-build-system)
8784 (native-inputs
8785 `(("python-pytest" ,python-pytest-bootstrap)
8786 ("python-pytest-runner" ,python-pytest-runner)))
8787 (home-page "https://github.com/flintwork/mccabe")
8788 (synopsis "McCabe checker, plugin for flake8")
8789 (description
8790 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8791 complexity of Python source code.")
8792 (license license:expat)))
8793
8794 (define-public python2-mccabe
8795 (package-with-python2 python-mccabe))
8796
8797 (define-public python-flake8
8798 (package
8799 (name "python-flake8")
8800 (version "3.9.0")
8801 (source (origin
8802 (method url-fetch)
8803 (uri (pypi-uri "flake8" version))
8804 (sha256
8805 (base32
8806 "1w65iyjnrwipv4dbcqxh725ri7mdx01d6pjyggd97c0j5cvkx1vq"))))
8807 (build-system python-build-system)
8808 (arguments
8809 `(#:phases
8810 (modify-phases %standard-phases
8811 (delete 'check)
8812 (add-after 'install 'check
8813 (lambda* (#:key inputs outputs #:allow-other-keys)
8814 (add-installed-pythonpath inputs outputs)
8815 (invoke "pytest" "-v")
8816 #t)))))
8817 (propagated-inputs
8818 `(("python-pycodestyle" ,python-pycodestyle)
8819 ("python-entrypoints" ,python-entrypoints)
8820 ("python-pyflakes" ,python-pyflakes)
8821 ("python-mccabe" ,python-mccabe)))
8822 (native-inputs
8823 `(("python-mock" ,python-mock)
8824 ("python-pytest" ,python-pytest-bootstrap)))
8825 (home-page "https://gitlab.com/pycqa/flake8")
8826 (synopsis
8827 "The modular source code checker: pep8, pyflakes and co")
8828 (description
8829 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8830 (properties `((python2-variant . ,(delay python2-flake8))))
8831 (license license:expat)))
8832
8833 (define-public python2-flake8
8834 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8835 (package/inherit base
8836 (propagated-inputs
8837 `(("python2-configparser" ,python2-configparser)
8838 ("python2-enum34" ,python2-enum34)
8839 ("python2-functools32" ,python2-functools32)
8840 ("python2-typing" ,python2-typing)
8841 ,@(package-propagated-inputs base))))))
8842
8843 (define-public python-flake8-bugbear
8844 (package
8845 (name "python-flake8-bugbear")
8846 (version "20.1.4")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "flake8-bugbear" version))
8851 (sha256
8852 (base32
8853 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8854 (build-system python-build-system)
8855 (arguments
8856 '(#:phases
8857 (modify-phases %standard-phases
8858 (add-before 'check 'disable-test
8859 (lambda _
8860 ;; This test fails on slow computers.
8861 (substitute* "tests/test_bugbear.py"
8862 (("def test_does_not_crash_on_any_valid_code")
8863 "def _test_does_not_crash_on_any_valid_code")))))))
8864 (native-inputs
8865 `(("python-hypothesis" ,python-hypothesis)
8866 ("python-hypothesmith" ,python-hypothesmith)))
8867 (propagated-inputs
8868 `(("python-attrs" ,python-attrs)
8869 ("python-flake8" ,python-flake8)))
8870 (home-page "https://github.com/PyCQA/flake8-bugbear")
8871 (synopsis
8872 "Flake8 plugin for finding likely bugs and design problems in your program")
8873 (description
8874 "This package contains a plugin for Flake8 finding likely bugs and
8875 design problems in your program. It contains warnings that don't belong
8876 in pyflakes and pycodestyle.")
8877 (license license:expat)))
8878
8879 (define-public python-flake8-continuation
8880 (package
8881 (name "python-flake8-continuation")
8882 (version "1.0.5")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "flake8-continuation" version))
8887 (sha256
8888 (base32
8889 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
8890 (build-system python-build-system)
8891 (propagated-inputs
8892 `(("python-flake8" ,python-flake8)
8893 ("python-pycodestyle" ,python-pycodestyle)
8894 ("python-six" ,python-six)))
8895 (home-page "https://github.com/planetlabs/flake8-continuation")
8896 (synopsis "Flake8 Line Continuation Plugin")
8897 (description "A Flake8 plugin that checks for the line continuation
8898 style to be in the preferred method according to PEP-8, specifically:
8899 @quotation
8900 The preferred way of wrapping long lines is by using Python's implied
8901 line continuation inside parentheses, brackets and braces. Long lines
8902 can be broken over multiple lines by wrapping expressions in parentheses.
8903 These should be used in preference to using a backslash for line continuation.
8904 @end quotation")
8905 (license license:asl2.0)))
8906
8907 (define-public python-flake8-implicit-str-concat
8908 (package
8909 (name "python-flake8-implicit-str-concat")
8910 (version "0.2.0")
8911 (source
8912 (origin
8913 (method url-fetch)
8914 (uri (pypi-uri "flake8_implicit_str_concat" version))
8915 (sha256
8916 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
8917 (build-system python-build-system)
8918 (propagated-inputs
8919 `(("python-attrs" ,python-attrs)
8920 ("python-more-itertools" ,python-more-itertools)))
8921 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
8922 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
8923 (description
8924 "This is a plugin for the Python code checking tool Flake8 to encourage
8925 correct string literal concatenation.
8926
8927 It looks for style problems like implicitly concatenated string literals on
8928 the same line (which can be introduced by the code formatting tool Black), or
8929 unnecessary plus operators for explicit string literal concatenation.")
8930 (license license:expat)))
8931
8932 (define-public python-flake8-polyfill
8933 (package
8934 (name "python-flake8-polyfill")
8935 (version "1.0.2")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "flake8-polyfill" version))
8940 (sha256
8941 (base32
8942 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8943 (build-system python-build-system)
8944 (arguments
8945 '(#:phases
8946 (modify-phases %standard-phases
8947 (replace 'check
8948 (lambda _
8949 ;; Be compatible with Pytest 4:
8950 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8951 (substitute* "setup.cfg"
8952 (("\\[pytest\\]")
8953 "[tool:pytest]"))
8954
8955 (setenv "PYTHONPATH"
8956 (string-append (getcwd) "/build/lib:"
8957 (getenv "PYTHONPATH")))
8958 (invoke "py.test" "-v"))))))
8959 (native-inputs
8960 `(("python-flake8" ,python-flake8)
8961 ("python-mock" ,python-mock)
8962 ("python-pep8" ,python-pep8)
8963 ("python-pycodestyle" ,python-pycodestyle)
8964 ("python-pytest" ,python-pytest)))
8965 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8966 (synopsis "Polyfill package for Flake8 plugins")
8967 (description
8968 "This package that provides some compatibility helpers for Flake8
8969 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8970 (license license:expat)))
8971
8972 (define-public python2-flake8-polyfill
8973 (package-with-python2 python-flake8-polyfill))
8974
8975 (define-public python-flake8-print
8976 (package
8977 (name "python-flake8-print")
8978 (version "4.0.0")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (pypi-uri "flake8-print" version))
8983 (sha256
8984 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
8985 (build-system python-build-system)
8986 (propagated-inputs
8987 `(("python-flake8" ,python-flake8)
8988 ("python-pycodestyle" ,python-pycodestyle)
8989 ("python-six" ,python-six)))
8990 (home-page "https://github.com/jbkahn/flake8-print")
8991 (synopsis "Print statement checker plugin for Flake8")
8992 (description
8993 "This plugin for Flake8 checks for @code{print} statements in Python
8994 files.")
8995 (license license:expat)))
8996
8997 (define-public python-flake8-pyi
8998 (package
8999 (name "python-flake8-pyi")
9000 (version "20.5.0")
9001 (source
9002 (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "flake8-pyi" version))
9005 (sha256
9006 (base32
9007 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
9008 (build-system python-build-system)
9009 (propagated-inputs
9010 `(("python-attrs" ,python-attrs)
9011 ("python-flake8" ,python-flake8)
9012 ("python-pyflakes" ,python-pyflakes)))
9013 (home-page "https://github.com/ambv/flake8-pyi")
9014 (synopsis
9015 "Flake8 plugin that provides specializations for type hinting stub files")
9016 (description
9017 "This package contains a plugin that provides specializations for
9018 type hinting stub files, especially interesting for linting typeshed. It
9019 adds the @file{.pyi} extension to the default value of the @code{--filename}
9020 command-line argument to Flake8. This means stubs are linted by default with
9021 this plugin enabled, without needing to explicitly list every file. It
9022 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9023 expressions after the entire file has been read. This enables support for
9024 first-class forward references that stub files use.")
9025 (license license:expat)))
9026
9027 (define-public python-flake8-pie
9028 (package
9029 (name "python-flake8-pie")
9030 (version "0.5.0")
9031 (source
9032 (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "flake8-pie" version))
9035 (sha256
9036 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9037 (build-system python-build-system)
9038 (home-page "https://github.com/sbdchd/flake8-pie")
9039 (synopsis "Flake8 extension that implements lints")
9040 (description
9041 "This package provides a flake8 extension that implements miscellaneous
9042 lints.")
9043 (license license:bsd-2)))
9044
9045 (define-public python-flake8-quotes
9046 (package
9047 (name "python-flake8-quotes")
9048 (version "3.2.0")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "flake8-quotes" version))
9053 (sha256
9054 (base32
9055 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9056 (build-system python-build-system)
9057 (propagated-inputs
9058 `(("python-flake8" ,python-flake8)))
9059 (home-page "https://github.com/zheller/flake8-quotes/")
9060 (synopsis "Flake8 lint for quotes")
9061 (description "This package provides a Flake8 lint for quotes.")
9062 (license license:expat)))
9063
9064 (define-public python-autoflake
9065 (package
9066 (name "python-autoflake")
9067 (version "1.3.1")
9068 (source
9069 (origin
9070 (method url-fetch)
9071 (uri (pypi-uri "autoflake" version))
9072 (sha256
9073 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9074 (build-system python-build-system)
9075 (propagated-inputs
9076 `(("python-pyflakes" ,python-pyflakes)))
9077 (home-page "https://github.com/myint/autoflake")
9078 (synopsis "Removes unused imports and unused variables")
9079 (description
9080 "@code{autoflake} removes unused imports and unused variables from Python
9081 code as reported by @code{pyflakes}.
9082
9083 By default, it only removes unused imports for modules that are part of the
9084 standard library. Removal of unused variables is also disabled by default.
9085 It also removes useless @code{pass} statements.")
9086 (license license:expat)))
9087
9088 (define-public python-mistune
9089 (package
9090 (name "python-mistune")
9091 (version "0.8.4")
9092 (source
9093 (origin
9094 (method url-fetch)
9095 (uri (pypi-uri "mistune" version))
9096 (sha256
9097 (base32
9098 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9099 (build-system python-build-system)
9100 (native-inputs
9101 `(("python-nose" ,python-nose)
9102 ("python-cython" ,python-cython)))
9103 (home-page "https://github.com/lepture/mistune")
9104 (synopsis "Markdown parser in pure Python")
9105 (description "This package provides a fast markdown parser in pure
9106 Python.")
9107 (license license:bsd-3)))
9108
9109 (define-public python2-mistune
9110 (package-with-python2 python-mistune))
9111
9112 (define-public python-markdown
9113 (package
9114 (name "python-markdown")
9115 (version "3.3.4")
9116 (source
9117 (origin
9118 (method url-fetch)
9119 (uri (pypi-uri "Markdown" version))
9120 (sha256
9121 (base32
9122 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9123 (build-system python-build-system)
9124 (native-inputs
9125 `(("python-nose" ,python-nose)
9126 ("python-pyyaml" ,python-pyyaml)))
9127 (home-page "https://python-markdown.github.io/")
9128 (synopsis "Python implementation of Markdown")
9129 (description
9130 "This package provides a Python implementation of John Gruber's
9131 Markdown. The library features international input, various Markdown
9132 extensions, and several HTML output formats. A command line wrapper
9133 markdown_py is also provided to convert Markdown files to HTML.")
9134 (properties `((python2-variant . ,(delay python2-markdown))))
9135 (license license:bsd-3)))
9136
9137 ;; Markdown 3.2 dropped support for Python 2.
9138 (define-public python2-markdown
9139 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9140 (package/inherit
9141 base
9142 (version "3.1.1")
9143 (source (origin
9144 (method url-fetch)
9145 (uri (pypi-uri "Markdown" version))
9146 (sha256
9147 (base32
9148 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9149
9150 (define-public python-ptyprocess
9151 (package
9152 (name "python-ptyprocess")
9153 (version "0.5.2")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "ptyprocess" version))
9158 (sha256
9159 (base32
9160 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9161 (build-system python-build-system)
9162 (native-inputs
9163 `(("python-nose" ,python-nose)))
9164 (arguments
9165 `(#:phases
9166 (modify-phases %standard-phases
9167 (replace 'check
9168 (lambda _ (invoke "nosetests"))))))
9169 (home-page "https://github.com/pexpect/ptyprocess")
9170 (synopsis "Run a subprocess in a pseudo terminal")
9171 (description
9172 "This package provides a Python library used to launch a subprocess in a
9173 pseudo terminal (pty), and interact with both the process and its pty.")
9174 (license license:isc)))
9175
9176 (define-public python2-ptyprocess
9177 (package-with-python2 python-ptyprocess))
9178
9179 (define-public python-cram
9180 (package
9181 (name "python-cram")
9182 (version "0.7")
9183 (home-page "https://bitheap.org/cram/")
9184 (source (origin
9185 (method url-fetch)
9186 (uri (list (string-append home-page "cram-"
9187 version ".tar.gz")
9188 (pypi-uri "cram" version)))
9189 (sha256
9190 (base32
9191 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9192 (arguments
9193 '(#:phases
9194 (modify-phases %standard-phases
9195 (add-after 'unpack 'patch-source
9196 (lambda _
9197 (substitute* (find-files "cram" ".*\\.py$")
9198 ;; Replace default shell path.
9199 (("/bin/sh") (which "sh")))
9200 (substitute* (find-files "tests" ".*\\.t$")
9201 (("md5") "md5sum")
9202 (("/bin/bash") (which "bash"))
9203 (("/bin/sh") (which "sh")))
9204 (substitute* "cram/_test.py"
9205 ;; This hack works around a bug triggered by substituting
9206 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9207 ;; "cram -h", which breaks the output at 80 characters. This
9208 ;; causes the line showing the default shell to break into two
9209 ;; lines, but the test expects a single line...
9210 (("env\\['COLUMNS'\\] = '80'")
9211 "env['COLUMNS'] = '160'"))
9212
9213 (substitute* "Makefile"
9214 ;; Recent versions of python-coverage have caused the test
9215 ;; coverage to decrease (as of version 0.7). Allow that.
9216 (("--fail-under=100")
9217 "--fail-under=90"))
9218
9219 #t))
9220 (replace 'check
9221 ;; The test phase uses the built library and executable.
9222 (lambda* (#:key inputs outputs #:allow-other-keys)
9223 (add-installed-pythonpath inputs outputs)
9224 (setenv "PATH" (string-append (getenv "PATH") ":"
9225 (assoc-ref outputs "out") "/bin"))
9226 (invoke "make" "test"))))))
9227 (build-system python-build-system)
9228 (native-inputs
9229 `(("python-coverage" ,python-coverage)
9230 ("which" ,which)))
9231 (synopsis "Simple testing framework for command line applications")
9232 (description
9233 "Cram is a functional testing framework for command line applications.
9234 Cram tests look like snippets of interactive shell sessions. Cram runs each
9235 command and compares the command output in the test with the command’s actual
9236 output.")
9237 (license license:gpl2+)))
9238
9239 (define-public python2-cram
9240 (package-with-python2 python-cram))
9241
9242 (define-public python-crashtest
9243 (package
9244 (name "python-crashtest")
9245 (version "0.3.1")
9246 (source
9247 (origin
9248 (method url-fetch)
9249 (uri (pypi-uri "crashtest" version))
9250 (sha256
9251 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9252 (build-system python-build-system)
9253 (home-page "https://github.com/sdispater/crashtest")
9254 (synopsis "Manage Python errors with ease")
9255 (description
9256 "Python library that makes exceptions handling and inspection easier.")
9257 (license license:expat)))
9258
9259 (define-public python-straight-plugin
9260 (package
9261 (name "python-straight-plugin")
9262 (version "1.4.1")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "straight.plugin" version))
9267 (sha256
9268 (base32
9269 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9270 (build-system python-build-system)
9271 (home-page "https://github.com/ironfroggy/straight.plugin")
9272 (synopsis "Simple namespaced plugin facility")
9273 (description "Straight Plugin provides a type of plugin you can create from
9274 almost any existing Python modules, and an easy way for outside developers to
9275 add functionality and customization to your projects with their own plugins.")
9276 (license license:expat)))
9277
9278 (define-public python2-straight-plugin
9279 (package-with-python2 python-straight-plugin))
9280
9281 (define-public python-fonttools
9282 (package
9283 (name "python-fonttools")
9284 (version "4.6.0")
9285 (source (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "fonttools" version ".zip"))
9288 (sha256
9289 (base32
9290 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9291 (build-system python-build-system)
9292 (native-inputs
9293 `(("unzip" ,unzip)
9294 ("python-pytest" ,python-pytest)
9295 ("python-pytest-runner" ,python-pytest-runner)))
9296 (home-page "https://github.com/fonttools/fonttools")
9297 (synopsis "Tools to manipulate font files")
9298 (description
9299 "FontTools/TTX is a library to manipulate font files from Python. It
9300 supports reading and writing of TrueType/OpenType fonts, reading and writing
9301 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9302 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9303 from an XML-based format.")
9304 (license license:expat)))
9305
9306 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9307 (define-public python2-fonttools
9308 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9309 (package/inherit
9310 base
9311 (version "3.44.0")
9312 (source (origin
9313 (method url-fetch)
9314 (uri (pypi-uri "fonttools" version ".zip"))
9315 (sha256
9316 (base32
9317 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9318
9319 (define-public python-ly
9320 (package
9321 (name "python-ly")
9322 (version "0.9.5")
9323 (source
9324 (origin
9325 (method url-fetch)
9326 (uri (pypi-uri name version))
9327 (sha256
9328 (base32
9329 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9330 (build-system python-build-system)
9331 (arguments
9332 ;; FIXME: Some tests need network access.
9333 '(#:tests? #f))
9334 (synopsis "Tool and library for manipulating LilyPond files")
9335 (description "This package provides a Python library to parse, manipulate
9336 or create documents in LilyPond format. A command line program ly is also
9337 provided that can be used to do various manipulations with LilyPond files.")
9338 (home-page "https://pypi.org/project/python-ly/")
9339 (license license:gpl2+)))
9340
9341 (define-public python-appdirs
9342 (package
9343 (name "python-appdirs")
9344 (version "1.4.3")
9345 (source
9346 (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "appdirs" version))
9349 (sha256
9350 (base32
9351 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9352 (build-system python-build-system)
9353 (home-page "https://github.com/ActiveState/appdirs")
9354 (synopsis
9355 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9356 (description
9357 "This module provides a portable way of finding out where user data
9358 should be stored on various operating systems.")
9359 (license license:expat)))
9360
9361 (define-public python2-appdirs
9362 (package-with-python2 python-appdirs))
9363
9364 (define-public python-gorilla
9365 (package
9366 (name "python-gorilla")
9367 (version "0.3.0")
9368 (source (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "gorilla" version))
9371 (sha256
9372 (base32
9373 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9374 (build-system python-build-system)
9375 (home-page "https://github.com/christophercrouzet/gorilla")
9376 (synopsis "Convenient monkey patching with Python")
9377 (description
9378 "Gorilla is a Python library that provides a convenient approach to
9379 monkey patching. Monkey patching is the process of modifying module and
9380 class attributes at runtime with the purpose of replacing or extending
9381 third-party code.")
9382 (license license:expat)))
9383
9384 (define-public python-llfuse
9385 (package
9386 (name "python-llfuse")
9387 (version "1.3.8")
9388 (source (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "llfuse" version))
9391 (sha256
9392 (base32
9393 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9394 (build-system python-build-system)
9395 (inputs
9396 `(("fuse" ,fuse)
9397 ("attr" ,attr)))
9398 (native-inputs
9399 `(("pkg-config" ,pkg-config)))
9400 (synopsis "Python bindings for FUSE")
9401 (description
9402 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9403 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9404 (license license:lgpl2.0+)
9405 (properties `((python2-variant . ,(delay python2-llfuse))))))
9406
9407 (define-public python2-llfuse
9408 (let ((base (package-with-python2
9409 (strip-python2-variant python-llfuse))))
9410 (package/inherit base
9411 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9412
9413 (define-public python-msgpack
9414 (package
9415 (name "python-msgpack")
9416 (version "1.0.0")
9417 (source (origin
9418 (method url-fetch)
9419 (uri (pypi-uri "msgpack" version))
9420 (sha256
9421 (base32
9422 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9423 (build-system python-build-system)
9424 (arguments
9425 `(#:modules ((guix build utils)
9426 (guix build python-build-system)
9427 (ice-9 ftw)
9428 (srfi srfi-1)
9429 (srfi srfi-26))
9430 #:phases
9431 (modify-phases %standard-phases
9432 (replace 'check
9433 (lambda _
9434 (let ((cwd (getcwd)))
9435 (setenv "PYTHONPATH"
9436 (string-append cwd "/build/"
9437 (find (cut string-prefix? "lib" <>)
9438 (scandir (string-append cwd "/build")))
9439 ":"
9440 (getenv "PYTHONPATH")))
9441 (invoke "pytest" "-v" "test")))))))
9442 (native-inputs
9443 `(("python-pytest" ,python-pytest)))
9444 (synopsis "MessagePack (de)serializer")
9445 (description "MessagePack is a fast, compact binary serialization format,
9446 suitable for similar data to JSON. This package provides CPython bindings for
9447 reading and writing MessagePack data.")
9448 (home-page "https://pypi.org/project/msgpack/")
9449 (license license:asl2.0)))
9450
9451 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9452 ;; release 0.5. Some packages like borg still call it by the old name for now.
9453 ;; <https://bugs.gnu.org/30662>
9454 (define-public python-msgpack-transitional
9455 (package
9456 (inherit python-msgpack)
9457 (name "python-msgpack-transitional")
9458 (version "0.5.6")
9459 (source (origin
9460 (method url-fetch)
9461 (uri (pypi-uri "msgpack" version))
9462 (sha256
9463 (base32
9464 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9465 (arguments
9466 (substitute-keyword-arguments (package-arguments python-msgpack)
9467 ((#:phases phases)
9468 `(modify-phases ,phases
9469 (add-after 'unpack 'configure-transitional
9470 (lambda _
9471 ;; Keep using the old name.
9472 (substitute* "setup.py"
9473 (("TRANSITIONAL = False")
9474 "TRANSITIONAL = 1"))
9475 #t))))))))
9476
9477 (define-public python2-msgpack
9478 (package-with-python2 python-msgpack))
9479
9480 (define-public python-netaddr
9481 (package
9482 (name "python-netaddr")
9483 (version "0.7.19")
9484 (source
9485 (origin
9486 (method url-fetch)
9487 (uri (pypi-uri "netaddr" version))
9488 (sha256
9489 (base32
9490 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
9491 (build-system python-build-system)
9492 (arguments `(#:tests? #f)) ;; No tests.
9493 (home-page "https://github.com/drkjam/netaddr/")
9494 (synopsis "Pythonic manipulation of network addresses")
9495 (description
9496 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9497 and MAC network addresses.")
9498 (license license:bsd-3)))
9499
9500 (define-public python2-netaddr
9501 (package-with-python2 python-netaddr))
9502
9503 (define-public python2-pyroute2
9504 (package
9505 (name "python2-pyroute2")
9506 (version "0.5.6")
9507 (source
9508 (origin
9509 (method url-fetch)
9510 (uri (pypi-uri "pyroute2" version))
9511 (sha256
9512 (base32
9513 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
9514 (build-system python-build-system)
9515 (arguments
9516 `(#:python ,python-2)) ;Python 3.x is not supported
9517 (home-page "https://github.com/svinota/pyroute2")
9518 (synopsis "Python netlink library")
9519 (description
9520 "Pyroute2 is a pure Python netlink library with minimal dependencies.
9521 Supported netlink families and protocols include:
9522 @itemize
9523 @item rtnl, network settings - addresses, routes, traffic controls
9524 @item nfnetlink - netfilter API: ipset, nftables, ...
9525 @item ipq - simplest userspace packet filtering, iptables QUEUE target
9526 @item devlink - manage and monitor devlink-enabled hardware
9527 @item generic - generic netlink families
9528 @itemize
9529 @item nl80211 - wireless functions API (basic support)
9530 @item taskstats - extended process statistics
9531 @item acpi_events - ACPI events monitoring
9532 @item thermal_events - thermal events monitoring
9533 @item VFS_DQUOT - disk quota events monitoring
9534 @end itemize
9535 @end itemize")
9536 (license license:gpl2+)))
9537
9538 (define-public python-wrapt
9539 (package
9540 (name "python-wrapt")
9541 (version "1.11.2")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "wrapt" version))
9546 (sha256
9547 (base32
9548 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
9549 (build-system python-build-system)
9550 (arguments
9551 ;; Tests are not included in the tarball, they are only available in the
9552 ;; git repository.
9553 `(#:tests? #f))
9554 (home-page "https://github.com/GrahamDumpleton/wrapt")
9555 (synopsis "Module for decorators, wrappers and monkey patching")
9556 (description
9557 "The aim of the wrapt module is to provide a transparent object proxy for
9558 Python, which can be used as the basis for the construction of function
9559 wrappers and decorator functions.")
9560 (license license:bsd-2)))
9561
9562 (define-public python2-wrapt
9563 (package-with-python2 python-wrapt))
9564
9565 (define-public python-commonmark
9566 (package
9567 (name "python-commonmark")
9568 (version "0.9.1")
9569 (source
9570 (origin
9571 (method url-fetch)
9572 (uri (pypi-uri "commonmark" version))
9573 (sha256
9574 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9575 (build-system python-build-system)
9576 (arguments
9577 `(#:phases
9578 (modify-phases %standard-phases
9579 (replace 'check
9580 (lambda* (#:key inputs outputs #:allow-other-keys)
9581 (add-installed-pythonpath inputs outputs)
9582 (invoke "python" "setup.py" "test"))))))
9583 (home-page "https://github.com/readthedocs/commonmark.py")
9584 (synopsis "Python parser for the CommonMark Markdown spec")
9585 (description
9586 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9587 Markdown parser and renderer for the CommonMark specification, using only
9588 native modules.")
9589 (license license:bsd-3)))
9590
9591 (define-public python-xlrd
9592 (package
9593 (name "python-xlrd")
9594 (version "1.2.0")
9595 (source (origin
9596 (method url-fetch)
9597 (uri (pypi-uri "xlrd" version))
9598 (sha256
9599 (base32
9600 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9601 (build-system python-build-system)
9602 (arguments
9603 `(#:phases
9604 (modify-phases %standard-phases
9605 ;; Some tests depend on writing a temporary file to the user's home
9606 ;; directory.
9607 (add-after 'unpack 'fix-tests
9608 (lambda _
9609 (delete-file "tests/test_open_workbook.py")
9610 #t)))))
9611 (home-page "http://www.python-excel.org/")
9612 (synopsis "Library for extracting data from Excel files")
9613 (description "This package provides a library to extract data from
9614 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9615 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9616 Unicode-aware. It is not intended as an end-user tool.")
9617 (license license:bsd-3)))
9618
9619 (define-public python2-xlrd
9620 (package-with-python2 python-xlrd))
9621
9622 (define-public python-immutables
9623 (package
9624 (name "python-immutables")
9625 (version "0.14")
9626 (source
9627 (origin
9628 (method url-fetch)
9629 (uri (pypi-uri "immutables" version))
9630 (sha256
9631 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9632 (build-system python-build-system)
9633 (home-page "https://github.com/MagicStack/immutables")
9634 (synopsis "High-performance immutable mapping type for Python")
9635 (description
9636 "An immutable mapping type for Python. The underlying datastructure is a
9637 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9638 functional languages.")
9639 (license license:asl2.0)))
9640
9641 (define-public python-prettytable
9642 (package
9643 (name "python-prettytable")
9644 (version "0.7.2")
9645 (source
9646 (origin
9647 (method url-fetch)
9648 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9649 (sha256
9650 (base32
9651 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9652 (build-system python-build-system)
9653 (home-page "https://code.google.com/archive/p/prettytable/")
9654 (synopsis "Display tabular data in an ASCII table format")
9655 (description
9656 "A library designed to represent tabular data in visually appealing ASCII
9657 tables. PrettyTable allows for selection of which columns are to be printed,
9658 independent alignment of columns (left or right justified or centred) and
9659 printing of sub-tables by specifying a row range.")
9660 (license license:bsd-3)))
9661
9662 (define-public python2-prettytable
9663 (package-with-python2 python-prettytable))
9664
9665 (define-public python-curio
9666 (package
9667 (name "python-curio")
9668 (version "1.2")
9669 (source
9670 (origin
9671 (method url-fetch)
9672 (uri (pypi-uri "curio" version))
9673 (sha256
9674 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9675 (build-system python-build-system)
9676 (arguments
9677 `(#:phases
9678 (modify-phases %standard-phases
9679 (replace 'check
9680 (lambda* (#:key inputs outputs #:allow-other-keys)
9681 (add-installed-pythonpath inputs outputs)
9682 (invoke "pytest" "-vv" "-k"
9683 ;; Tries to open an outgoing connection.
9684 "not test_ssl_outgoing"))))))
9685 (native-inputs
9686 `(("python-pytest" ,python-pytest)))
9687 (home-page "https://github.com/dabeaz/curio")
9688 (synopsis "Coroutine-based library for concurrent Python")
9689 (description
9690 "Curio is a coroutine-based library for concurrent Python systems
9691 programming. It provides standard programming abstractions such as as
9692 tasks, sockets, files, locks, and queues.")
9693 (license license:bsd-3)))
9694
9695 (define-public python-tables
9696 (package
9697 (name "python-tables")
9698 (version "3.6.1")
9699 (source
9700 (origin
9701 (method url-fetch)
9702 (uri (pypi-uri "tables" version))
9703 (sha256
9704 (base32
9705 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9706 (modules '((guix build utils)))
9707 (snippet
9708 '(begin
9709 ;; Remove pre-compiled .pyc files from source.
9710 (for-each delete-file-recursively
9711 (find-files "." "__pycache__" #:directories? #t))
9712 (for-each delete-file (find-files "." "\\.pyc$"))
9713 #t))))
9714 (build-system python-build-system)
9715 (arguments
9716 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9717 ;; or "check", so we must override the build and check phases.
9718 #:phases
9719 (modify-phases %standard-phases
9720 (add-after 'unpack 'use-gcc
9721 (lambda _
9722 (substitute* "setup.py"
9723 (("^( +)compiler = new_compiler\\(\\)" line indent)
9724 (string-append line
9725 "\n"
9726 indent
9727 "compiler.set_executables(compiler='gcc',"
9728 "compiler_so='gcc',"
9729 "linker_exe='gcc',"
9730 "linker_so='gcc -shared')")))
9731 #t))
9732 (add-after 'unpack 'disable-tuning
9733 (lambda _
9734 (substitute* "setup.py"
9735 (("cpu_flags = .*")
9736 "cpu_flags = ['sse2']\n"))
9737 #t))
9738 (replace 'build
9739 (lambda* (#:key inputs #:allow-other-keys)
9740 (invoke "python" "setup.py" "build"
9741 (string-append "--hdf5="
9742 (assoc-ref inputs "hdf5")))))
9743 (replace 'check
9744 (lambda* (#:key inputs #:allow-other-keys)
9745 (invoke "python" "setup.py" "check"
9746 (string-append "--hdf5="
9747 (assoc-ref inputs "hdf5"))))))))
9748 (propagated-inputs
9749 `(("python-numexpr" ,python-numexpr)
9750 ("python-numpy" ,python-numpy)))
9751 (native-inputs
9752 `(("python-cython" ,python-cython)
9753 ("pkg-config" ,pkg-config)))
9754 (inputs
9755 `(("hdf5" ,hdf5-1.10)
9756 ("bzip2" ,bzip2)
9757 ("zlib" ,zlib)))
9758 (home-page "https://www.pytables.org/")
9759 (synopsis "Hierarchical datasets for Python")
9760 (description "PyTables is a package for managing hierarchical datasets and
9761 designed to efficiently cope with extremely large amounts of data.")
9762 (license license:bsd-3)))
9763
9764 (define-public python-sniffio
9765 (package
9766 (name "python-sniffio")
9767 (version "1.1.0")
9768 (source
9769 (origin
9770 (method url-fetch)
9771 (uri (pypi-uri "sniffio" version))
9772 (sha256
9773 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9774 (build-system python-build-system)
9775 (arguments
9776 `(#:phases
9777 (modify-phases %standard-phases
9778 (replace 'check
9779 (lambda _
9780 (invoke "pytest" "-vv"))))))
9781 (native-inputs
9782 `(("python-curio" ,python-curio)
9783 ("python-pytest" ,python-pytest)
9784 ("python-pytest-cov" ,python-pytest-cov)))
9785 (home-page "https://github.com/python-trio/sniffio")
9786 (synopsis "Detect which async library a program is running under")
9787 (description "This package detects which async library a program is
9788 running under. It supports multiple async I/O packages, like Trio, and
9789 asyncio.")
9790 ;; Either license applies.
9791 (license (list license:expat license:asl2.0))))
9792
9793 (define-public python-pytest-black
9794 (package
9795 (name "python-pytest-black")
9796 (version "0.3.8")
9797 (source
9798 (origin
9799 (method url-fetch)
9800 (uri (pypi-uri "pytest-black" version))
9801 (sha256
9802 (base32
9803 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9804 (build-system python-build-system)
9805 (propagated-inputs
9806 `(("python-pytest" ,python-pytest)
9807 ("python-black" ,python-black)
9808 ("python-toml" ,python-toml)))
9809 (native-inputs
9810 `(("python-setuptools-scm" ,python-setuptools-scm)))
9811 (home-page "https://github.com/shopkeep/pytest-black")
9812 (synopsis "Pytest plugin to enable format checking with black")
9813 (description
9814 "This package provides a pytest plugin to enable format checking with the
9815 Python code formatter \"black\".")
9816 (license license:expat)))
9817
9818 (define-public python-get-version
9819 (package
9820 (name "python-get-version")
9821 (version "2.1")
9822 (source
9823 (origin
9824 (method url-fetch)
9825 (uri (pypi-uri "get_version" version))
9826 (sha256
9827 (base32
9828 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9829 (build-system python-build-system)
9830 (propagated-inputs
9831 `(("python-pygments" ,python-pygments)
9832 ("python-pytest" ,python-pytest)
9833 ("python-pytest-black" ,python-pytest-black)
9834 ("python-pytest-cov" ,python-pytest-cov)
9835 ("python-setuptools" ,python-setuptools)
9836 ("python-testpath" ,python-testpath)))
9837 (home-page "https://github.com/flying-sheep/get_version")
9838 (synopsis "Version helper in the spirit of versioneer")
9839 (description
9840 "This package provides a version helper that lets you automatically use
9841 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9842 also supports getting the version from Python source distributions or, once
9843 your package is installed, via @code{pkg_resources} (part of
9844 @code{setuptools}).")
9845 (license license:gpl3+)))
9846
9847 (define-public python-legacy-api-wrap
9848 (package
9849 (name "python-legacy-api-wrap")
9850 (version "1.2")
9851 (source
9852 (origin
9853 (method url-fetch)
9854 (uri (pypi-uri "legacy-api-wrap" version))
9855 (sha256
9856 (base32
9857 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9858 (build-system python-build-system)
9859 (propagated-inputs
9860 `(("python-get-version" ,python-get-version)
9861 ("python-pytest" ,python-pytest)
9862 ("python-pytest-black" ,python-pytest-black)
9863 ("python-pytest-cov" ,python-pytest-cov)
9864 ("python-setuptools" ,python-setuptools)))
9865 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9866 (synopsis "Legacy API wrapper")
9867 (description "This module defines a decorator to wrap legacy APIs. The
9868 primary use case is APIs defined before keyword-only parameters existed.")
9869 (license license:gpl3+)))
9870
9871 (define-public python-pyasn1
9872 (package
9873 (name "python-pyasn1")
9874 (version "0.4.8")
9875 (source
9876 (origin
9877 (method url-fetch)
9878 (uri (pypi-uri "pyasn1" version))
9879 (sha256
9880 (base32
9881 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9882 (build-system python-build-system)
9883 (home-page "http://pyasn1.sourceforge.net/")
9884 (synopsis "ASN.1 types and codecs")
9885 (description
9886 "This is an implementation of ASN.1 types and codecs in Python. It is
9887 suitable for a wide range of protocols based on the ASN.1 specification.")
9888 (license license:bsd-2)))
9889
9890 (define-public python2-pyasn1
9891 (package-with-python2 python-pyasn1))
9892
9893 (define-public python-pyasn1-modules
9894 (package
9895 (name "python-pyasn1-modules")
9896 (version "0.2.2")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "pyasn1-modules" version))
9901 (sha256
9902 (base32
9903 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9904 (build-system python-build-system)
9905 (propagated-inputs
9906 `(("python-pyasn1" ,python-pyasn1)))
9907 (home-page "https://sourceforge.net/projects/pyasn1/")
9908 (synopsis "ASN.1 codec implementations")
9909 (description
9910 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9911 implementations of ASN.1-based codecs and protocols.")
9912 (license license:bsd-3)))
9913
9914 (define-public python2-pyasn1-modules
9915 (package-with-python2 python-pyasn1-modules))
9916
9917 (define-public python-ipaddress
9918 (package
9919 (name "python-ipaddress")
9920 (version "1.0.23")
9921 (source (origin
9922 (method url-fetch)
9923 (uri (pypi-uri "ipaddress" version))
9924 (sha256
9925 (base32
9926 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
9927 (build-system python-build-system)
9928 (home-page "https://github.com/phihag/ipaddress")
9929 (synopsis "IP address manipulation library")
9930 (description
9931 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9932 in Python. This library is used to create, poke at, and manipulate IPv4 and
9933 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9934 module to older versions of Python.")
9935 (license license:psfl)))
9936
9937 (define-public python2-ipaddress
9938 (package-with-python2 python-ipaddress))
9939
9940 (define-public python2-ipaddr
9941 (package
9942 (name "python2-ipaddr")
9943 (version "2.1.11")
9944 (source
9945 (origin
9946 (method url-fetch)
9947 (uri (pypi-uri "ipaddr" version))
9948 (sha256
9949 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9950 (build-system python-build-system)
9951 (arguments
9952 `(#:python ,python-2 ;version 2 only
9953 #:phases
9954 (modify-phases %standard-phases
9955 (replace 'check
9956 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9957 (home-page "https://github.com/google/ipaddr-py")
9958 (synopsis "IP address manipulation library")
9959 (description
9960 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9961 IPv6 addresses and networks.
9962
9963 For new implementations you may prefer to use the standard module
9964 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9965 versions of Python.")
9966 (license license:asl2.0)))
9967
9968 (define-public python-idna
9969 (package
9970 (name "python-idna")
9971 (version "2.10")
9972 (source
9973 (origin
9974 (method url-fetch)
9975 (uri (pypi-uri "idna" version))
9976 (sha256
9977 (base32
9978 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9979 (build-system python-build-system)
9980 (home-page "https://github.com/kjd/idna")
9981 (synopsis "Internationalized domain names in applications")
9982 (description
9983 "This is a library to support the Internationalised Domain Names in
9984 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9985 protocol is often referred to as “IDNA2008” and can produce different results
9986 from the earlier standard from 2003. The library is also intended to act as a
9987 suitable drop-in replacement for the “encodings.idna” module that comes with
9988 the Python standard library but currently only supports the older 2003
9989 specification.")
9990 (license license:bsd-4)))
9991
9992 (define-public python-idna-2.7
9993 (package (inherit python-idna)
9994 (version "2.7")
9995 (source (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "idna" version))
9998 (sha256
9999 (base32
10000 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
10001
10002
10003 (define-public python2-idna
10004 (package-with-python2 python-idna))
10005
10006 (define-public python-libsass
10007 (package
10008 (name "python-libsass")
10009 (version "0.20.1")
10010 (source
10011 (origin
10012 ;; PyPI tarball is missing some test files.
10013 (method git-fetch)
10014 (uri (git-reference
10015 (url "https://github.com/sass/libsass-python")
10016 (commit version)))
10017 (file-name (git-file-name name version))
10018 (sha256
10019 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10020 (build-system python-build-system)
10021 (arguments
10022 `(#:phases
10023 (modify-phases %standard-phases
10024 ;; Use Guix package of libsass instead of compiling from a checkout.
10025 (add-before 'build 'set-libsass
10026 (lambda _
10027 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10028 #t))
10029 (replace 'check
10030 (lambda* (#:key inputs outputs #:allow-other-keys)
10031 (add-installed-pythonpath inputs outputs)
10032 (invoke "pytest" "sasstests.py"))))))
10033 (native-inputs
10034 `(("python-pytest" ,python-pytest)
10035 ("python-werkzeug" ,python-werkzeug)))
10036 (inputs
10037 `(("libsass" ,libsass)))
10038 (propagated-inputs
10039 `(("python-six" ,python-six)))
10040 (home-page "https://sass.github.io/libsass-python/")
10041 (synopsis "Straightforward binding of libsass for Python")
10042 (description
10043 "This package provides a simple Python extension module @code{sass} which
10044 is binding LibSass.")
10045 (license license:expat)))
10046
10047 (define-public python-idna-ssl
10048 (package
10049 (name "python-idna-ssl")
10050 (version "1.0.1")
10051 (source
10052 (origin
10053 (method url-fetch)
10054 (uri (pypi-uri "idna-ssl" version))
10055 (sha256
10056 (base32
10057 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10058 (build-system python-build-system)
10059 (arguments
10060 `(#:tests? #f)) ;circular dependency with python-aiohttp
10061 (home-page "https://github.com/aio-libs/idna-ssl")
10062 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10063 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10064 domains support.")
10065 (license license:expat)))
10066
10067 (define-public python-pretend
10068 (package
10069 (name "python-pretend")
10070 (version "1.0.9")
10071 (source
10072 (origin
10073 (method url-fetch)
10074 (uri (pypi-uri "pretend" version))
10075 (sha256
10076 (base32
10077 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10078 (build-system python-build-system)
10079 (home-page "https://github.com/alex/pretend")
10080 (synopsis "Library for stubbing in Python")
10081 (description
10082 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10083 technique for writing tests. You may hear the term mixed up with mocks,
10084 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10085 responses, rather than doing any computation.")
10086 (license license:bsd-3)))
10087
10088 (define-public python2-pretend
10089 (package-with-python2 python-pretend))
10090
10091 (define-public python-pip
10092 (package
10093 (name "python-pip")
10094 (version "20.2.4")
10095 (source
10096 (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "pip" version))
10099 (sha256
10100 (base32
10101 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10102 (build-system python-build-system)
10103 (arguments
10104 '(#:tests? #f)) ; there are no tests in the pypi archive.
10105 (home-page "https://pip.pypa.io/")
10106 (synopsis "Package manager for Python software")
10107 (description
10108 "Pip is a package manager for Python software, that finds packages on the
10109 Python Package Index (PyPI).")
10110 (license license:expat)))
10111
10112 (define-public python2-pip
10113 (package-with-python2 python-pip))
10114
10115 (define-public python-tlsh
10116 (package
10117 (name "python-tlsh")
10118 (version "3.4.5")
10119 (home-page "https://github.com/trendmicro/tlsh")
10120 (source
10121 (origin
10122 (method git-fetch)
10123 (uri (git-reference
10124 (url "https://github.com/trendmicro/tlsh")
10125 (commit (string-append "v" version))))
10126 (file-name (git-file-name name version))
10127 (sha256
10128 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10129 (build-system cmake-build-system)
10130 (arguments
10131 '(#:out-of-source? #f
10132 #:phases (modify-phases %standard-phases
10133 (replace
10134 'install
10135 (lambda* (#:key outputs #:allow-other-keys)
10136 ;; Build and install the Python bindings. The underlying
10137 ;; C++ library is apparently not meant to be installed.
10138 (let ((out (assoc-ref outputs "out")))
10139 (with-directory-excursion "py_ext"
10140 (and (system* "python" "setup.py" "build")
10141 (system* "python" "setup.py" "install"
10142 (string-append "--prefix=" out))))))))))
10143 (inputs `(("python" ,python-wrapper))) ;for the bindings
10144 (synopsis "Fuzzy matching library for Python")
10145 (description
10146 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10147 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10148 value which can be used for similarity comparisons. Similar objects have
10149 similar hash values, which allows for the detection of similar objects by
10150 comparing their hash values. The byte stream should have a sufficient amount
10151 of complexity; for example, a byte stream of identical bytes will not generate
10152 a hash value.")
10153 (license license:asl2.0)))
10154
10155 (define-public python2-tlsh
10156 (package/inherit python-tlsh
10157 (name "python2-tlsh")
10158 (inputs `(("python" ,python-2)))))
10159
10160 (define-public python-termcolor
10161 (package
10162 (name "python-termcolor")
10163 (version "1.1.0")
10164 (source
10165 (origin
10166 (method url-fetch)
10167 (uri (pypi-uri "termcolor" version))
10168 (sha256
10169 (base32
10170 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10171 (build-system python-build-system)
10172 (arguments
10173 ;; There are no tests.
10174 `(#:tests? #f))
10175 (home-page "https://pypi.org/project/termcolor/")
10176 (synopsis "ANSII Color formatting for terminal output")
10177 (description
10178 "This package provides ANSII Color formatting for output in terminals.")
10179 (license license:expat)))
10180
10181 (define-public python2-termcolor
10182 (package-with-python2 python-termcolor))
10183
10184 (define-public python-terminaltables
10185 (package
10186 (name "python-terminaltables")
10187 (version "3.1.0")
10188 (source
10189 (origin
10190 (method url-fetch)
10191 (uri (pypi-uri "terminaltables" version))
10192 (sha256
10193 (base32
10194 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10195 (build-system python-build-system)
10196 (home-page "https://github.com/Robpol86/terminaltables")
10197 (synopsis
10198 "Generate simple tables in terminals from a nested list of strings")
10199 (description
10200 "This package makes it easy to draw tables in terminal/console
10201 applications from a list of lists of strings. It supports multi-line rows.")
10202 (license license:expat)))
10203
10204 (define-public python-libarchive-c
10205 (package
10206 (name "python-libarchive-c")
10207 (version "2.9")
10208 (source (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "libarchive-c" version))
10211 (sha256
10212 (base32
10213 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10214 (build-system python-build-system)
10215 (arguments
10216 '(#:phases (modify-phases %standard-phases
10217 (add-before
10218 'build 'reference-libarchive
10219 (lambda* (#:key inputs #:allow-other-keys)
10220 ;; Retain the absolute file name of libarchive.so.
10221 (let ((libarchive (assoc-ref inputs "libarchive")))
10222 (substitute* "libarchive/ffi.py"
10223 (("find_library\\('archive'\\)")
10224 (string-append "'" libarchive
10225 "/lib/libarchive.so'"))))))
10226 (replace 'check
10227 (lambda _ (invoke "pytest" "-vv"))))))
10228 (native-inputs
10229 `(("python-mock" ,python-mock)
10230 ("python-pytest" ,python-pytest)))
10231 (inputs
10232 `(("libarchive" ,libarchive)))
10233 (home-page "https://github.com/Changaco/python-libarchive-c")
10234 (synopsis "Python interface to libarchive")
10235 (description
10236 "This package provides Python bindings to libarchive, a C library to
10237 access possibly compressed archives in many different formats. It uses
10238 Python's @code{ctypes} foreign function interface (FFI).")
10239 (license license:lgpl2.0+)))
10240
10241 (define-public python2-libarchive-c
10242 (package-with-python2 python-libarchive-c))
10243
10244 (define-public python-file
10245 (package/inherit file
10246 (name "python-file")
10247 (build-system python-build-system)
10248 (arguments
10249 '(#:tests? #f ;no tests
10250 #:configure-flags '("--single-version-externally-managed" "--root=/")
10251 #:phases (modify-phases %standard-phases
10252 (add-before 'build 'change-directory
10253 (lambda _
10254 (chdir "python")
10255 #t))
10256 (add-before 'build 'set-library-file-name
10257 (lambda* (#:key inputs #:allow-other-keys)
10258 (let ((file (assoc-ref inputs "file")))
10259 (substitute* "magic.py"
10260 (("find_library\\('magic'\\)")
10261 (string-append "'" file "/lib/libmagic.so'")))
10262 #t))))))
10263 (inputs `(("file" ,file)))
10264 (native-inputs (if (%current-target-system)
10265 `(("self" ,this-package))
10266 '()))
10267 (synopsis "Python bindings to the libmagic file type guesser")
10268 (description "This package provides Python bindings to the libmagic file
10269 type guesser.
10270
10271 Note that this module and the @code{python-magic} module both provide a
10272 @file{magic.py} file; these two modules, which are different and were
10273 developed separately, both serve the same purpose: provide Python bindings for
10274 libmagic.")))
10275
10276 (define-public python2-file
10277 (package-with-python2 python-file))
10278
10279 (define-public python-debian
10280 (package
10281 (name "python-debian")
10282 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10283 (version "0.1.36")
10284 (source
10285 (origin
10286 ;; Use git-fetch, as pypi doesn't include test suite.
10287 (method git-fetch)
10288 (uri (git-reference
10289 (url home-page)
10290 (commit version)))
10291 (file-name (git-file-name name version))
10292 (sha256
10293 (base32
10294 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10295 (build-system python-build-system)
10296 (arguments
10297 `(#:phases (modify-phases %standard-phases
10298 (add-after 'unpack 'remove-debian-specific-tests
10299 ;; python-apt, apt and dpkg are not yet available in guix,
10300 ;; and these tests heavily depend on them.
10301 (lambda _
10302 (delete-file "lib/debian/tests/test_deb822.py")
10303 (delete-file "lib/debian/tests/test_debfile.py")
10304 #t)))))
10305 (propagated-inputs
10306 `(("python-six" ,python-six)
10307 ("python-chardet" ,python-chardet)))
10308 (synopsis "Debian package related modules")
10309 (description
10310 ;; XXX: Use @enumerate instead of @itemize to work around
10311 ;; <http://bugs.gnu.org/21772>.
10312 "This package provides Python modules that abstract many formats of
10313 Debian-related files, such as:
10314
10315 @enumerate
10316 @item Debtags information;
10317 @item @file{debian/changelog} files;
10318 @item packages files, pdiffs;
10319 @item control files of single or multiple RFC822-style paragraphs---e.g.
10320 @file{debian/control}, @file{.changes}, @file{.dsc};
10321 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10322 contained files and meta-information.
10323 @end enumerate\n")
10324
10325 ;; Modules are either GPLv2+ or GPLv3+.
10326 (license license:gpl3+)))
10327
10328 (define-public python-nbformat
10329 (package
10330 (name "python-nbformat")
10331 (version "5.1.3")
10332 (source
10333 (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "nbformat" version))
10336 (sha256
10337 (base32
10338 "1j6idwsw59cslsssvlkg2bkfpvd6ri7kghbp14jwcw87sy57h5mm"))))
10339 (build-system python-build-system)
10340 (propagated-inputs
10341 `(("python-ipython-genutils" ,python-ipython-genutils)
10342 ("python-jsonschema" ,python-jsonschema)
10343 ("python-jupyter-core" ,python-jupyter-core)
10344 ("python-traitlets" ,python-traitlets)))
10345 (native-inputs
10346 `(("python-pytest" ,python-pytest)))
10347 (home-page "https://jupyter.org")
10348 (synopsis "Jupyter Notebook format")
10349 (description "This package provides the reference implementation of the
10350 Jupyter Notebook format and Python APIs for working with notebooks.")
10351 (properties `((python2-variant . ,(delay python2-nbformat))))
10352 (license license:bsd-3)))
10353
10354 (define-public python2-nbformat
10355 (let ((parent (package-with-python2
10356 (strip-python2-variant python-nbformat))))
10357 (package
10358 (inherit parent)
10359 (version "4.4.0")
10360 (source
10361 (origin
10362 (method url-fetch)
10363 (uri (pypi-uri "nbformat" version))
10364 (sha256
10365 (base32
10366 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))))))
10367
10368 (define-public python-bleach
10369 (package
10370 (name "python-bleach")
10371 (version "3.1.5")
10372 (source
10373 (origin
10374 (method url-fetch)
10375 (uri (pypi-uri "bleach" version))
10376 (sha256
10377 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10378 (build-system python-build-system)
10379 (propagated-inputs
10380 `(("python-webencodings" ,python-webencodings)
10381 ("python-six" ,python-six)))
10382 (native-inputs
10383 `(("python-datrie" ,python-datrie)
10384 ("python-genshi" ,python-genshi)
10385 ("python-lxml" ,python-lxml)
10386 ("python-pytest" ,python-pytest)))
10387 (home-page "https://github.com/mozilla/bleach")
10388 (synopsis "Whitelist-based HTML-sanitizing tool")
10389 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10390 (license license:asl2.0)))
10391
10392 (define-public python2-bleach
10393 (package-with-python2 python-bleach))
10394
10395 (define-public python-entrypoints
10396 (package
10397 (name "python-entrypoints")
10398 (version "0.3")
10399 (source
10400 (origin
10401 (method url-fetch)
10402 (uri (pypi-uri "entrypoints" version))
10403 (sha256
10404 (base32
10405 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
10406 (build-system python-build-system)
10407 ;; The package does not come with a setup.py file, so we have to generate
10408 ;; one ourselves.
10409 (arguments
10410 `(#:tests? #f
10411 #:phases
10412 (modify-phases %standard-phases
10413 (add-after 'unpack 'create-setup.py
10414 (lambda _
10415 (call-with-output-file "setup.py"
10416 (lambda (port)
10417 (format port "\
10418 from setuptools import setup
10419 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
10420 " ,version))))))))
10421 (home-page "https://github.com/takluyver/entrypoints")
10422 (synopsis "Discover and load entry points from installed Python packages")
10423 (description "Entry points are a way for Python packages to advertise
10424 objects with some common interface. The most common examples are
10425 @code{console_scripts} entry points, which define shell commands by
10426 identifying a Python function to run. The @code{entrypoints} module contains
10427 functions to find and load entry points.")
10428 (license license:expat)))
10429
10430 (define-public python2-entrypoints
10431 (package-with-python2 python-entrypoints))
10432
10433 (define-public python-epc
10434 (package
10435 (name "python-epc")
10436 (version "0.0.5")
10437 (source
10438 (origin
10439 (method url-fetch)
10440 (uri (pypi-uri "epc" version))
10441 (sha256
10442 (base32
10443 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
10444 (build-system python-build-system)
10445 (propagated-inputs
10446 `(("python-sexpdata" ,python-sexpdata)))
10447 (native-inputs
10448 `(("python-nose" ,python-nose)))
10449 (home-page "https://github.com/tkf/python-epc")
10450 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
10451 (description
10452 "Python-EPC can call elisp functions from Python and Python functions
10453 from elisp.")
10454 (license license:gpl3)))
10455
10456 (define-public python-forex-python
10457 (package
10458 (name "python-forex-python")
10459 (version "1.5")
10460 (source
10461 (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "forex-python" version))
10464 (sha256
10465 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
10466 (build-system python-build-system)
10467 (arguments
10468 ;; Tests are not included in the PyPI tarball. Also, the tests in the
10469 ;; repository require online data.
10470 `(#:tests? #f))
10471 (propagated-inputs
10472 `(("python-requests" ,python-requests)
10473 ("python-simplejson" ,python-simplejson)))
10474 (home-page "https://github.com/MicroPyramid/forex-python")
10475 (synopsis "Foreign exchange rates and currency conversion")
10476 (description
10477 "@code{python-forex-python} can be used to manipulate foreign
10478 exchange rates and to operate currency conversions.
10479
10480 Features:
10481 @itemize
10482 @item List all currency rates.
10483 @item BitCoin price for all currencies.
10484 @item Converting amount to BitCoins.
10485 @item Get historical rates for any day since 1999.
10486 @item Conversion rate for one currency(ex; USD to INR).
10487 @item Convert amount from one currency to other.('USD 10$' to INR).
10488 @item Currency symbols.
10489 @item Currency names.
10490 @end itemize")
10491 (license license:expat)))
10492
10493 (define-public python-simpleeval
10494 (package
10495 (name "python-simpleeval")
10496 (version "0.9.10")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "simpleeval" version))
10501 (sha256
10502 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
10503 (build-system python-build-system)
10504 (home-page "https://github.com/danthedeckie/simpleeval")
10505 (synopsis "Simple, safe single expression evaluator library")
10506 (description
10507 "This package provides a quick single file library for easily adding
10508 evaluatable expressions into python projects. Say you want to allow a user
10509 to set an alarm volume, which could depend on the time of day, alarm level,
10510 how many previous alarms had gone off, and if there is music playing at the
10511 time.")
10512 (license license:expat)))
10513
10514 (define-public python-nbconvert
10515 (package
10516 (name "python-nbconvert")
10517 (version "6.0.7")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "nbconvert" version))
10522 (sha256
10523 (base32
10524 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
10525 (build-system python-build-system)
10526 (arguments
10527 `(#:phases
10528 (modify-phases %standard-phases
10529 (replace 'check
10530 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10531 (when tests?
10532 (add-installed-pythonpath inputs outputs)
10533
10534 ;; This seems to require Chromium.
10535 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
10536
10537 ;; This depends on the python3 kernel, which is provided by a
10538 ;; package that depends on nbconvert.
10539 (delete-file "nbconvert/preprocessors/tests/test_execute.py")
10540
10541 ;; Most of these tests fail because nbconvert fails to execute
10542 ;; itself.
10543 (delete-file "nbconvert/tests/test_nbconvertapp.py")
10544
10545 ;; One test here fails with an unclear error. It looks like
10546 ;; "%%pylabprint" is supposed to be expanded to some other
10547 ;; code, but isn't.
10548 (delete-file "nbconvert/filters/tests/test_strings.py")
10549
10550 ;; Some tests need HOME
10551 (setenv "HOME" "/tmp")
10552 (invoke "pytest")))))))
10553 (native-inputs
10554 `(("python-pytest" ,python-pytest)))
10555 (propagated-inputs
10556 `(("python-bleach" ,python-bleach)
10557 ("python-defusedxml" ,python-defusedxml)
10558 ("python-entrypoints" ,python-entrypoints)
10559 ("python-jinja2" ,python-jinja2)
10560 ("python-jupyter-core" ,python-jupyter-core)
10561 ("python-mistune" ,python-mistune)
10562 ("python-nbclient" ,python-nbclient)
10563 ("python-nbformat" ,python-nbformat)
10564 ("python-pandocfilters" ,python-pandocfilters)
10565 ("python-pygments" ,python-pygments)
10566 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
10567 ("python-testpath" ,python-testpath)
10568 ("python-traitlets" ,python-traitlets)))
10569 (home-page "https://jupyter.org")
10570 (synopsis "Converting Jupyter Notebooks")
10571 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
10572 notebooks to various other formats via Jinja templates. It allows you to
10573 convert an @code{.ipynb} notebook file into various static formats including:
10574
10575 @enumerate
10576 @item HTML
10577 @item LaTeX
10578 @item PDF
10579 @item Reveal JS
10580 @item Markdown (md)
10581 @item ReStructured Text (rst)
10582 @item executable script
10583 @end enumerate\n")
10584 (license license:bsd-3)
10585 (properties `((python2-variant . ,(delay python2-nbconvert))))))
10586
10587 (define-public python2-nbconvert
10588 (let ((parent
10589 (package-with-python2
10590 (strip-python2-variant python-nbconvert))))
10591 (package
10592 (inherit parent)
10593 (version "5.0.0b1")
10594 (source
10595 (origin
10596 (method url-fetch)
10597 (uri (pypi-uri "nbconvert" version))
10598 (sha256
10599 (base32
10600 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
10601 (arguments
10602 `(;; The "bdist_egg" target is disabled by default, causing the installation
10603 ;; to fail.
10604 #:configure-flags (list "bdist_egg")
10605 ;; FIXME: 5 failures, 40 errors.
10606 #:tests? #f))
10607 (propagated-inputs
10608 `(("python-bleach" ,python-bleach)
10609 ("python-entrypoints" ,python-entrypoints)
10610 ("python-jinja2" ,python-jinja2)
10611 ("python-jupyter-core" ,python-jupyter-core)
10612 ("python-mistune" ,python-mistune)
10613 ("python-nbformat" ,python-nbformat)
10614 ("python-pygments" ,python-pygments)
10615 ("python-traitlets" ,python-traitlets))))))
10616
10617 (define-public python-notebook
10618 (package
10619 (name "python-notebook")
10620 (version "6.3.0")
10621 (source (origin
10622 (method url-fetch)
10623 (uri (pypi-uri "notebook" version))
10624 (sha256
10625 (base32
10626 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
10627 (build-system python-build-system)
10628 (arguments
10629 `(#:phases
10630 (modify-phases %standard-phases
10631 (replace 'check
10632 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
10633 ;; These tests require a browser
10634 (delete-file-recursively "notebook/tests/selenium")
10635 (when tests?
10636 (add-installed-pythonpath inputs outputs)
10637 ;; Some tests need HOME
10638 (setenv "HOME" "/tmp")
10639 (with-directory-excursion "/tmp"
10640 (invoke "pytest" "-vv"
10641 ;; TODO: This tests fails because nbconvert does not
10642 ;; list "python" as a format.
10643 "-k" "not test_list_formats"))))))))
10644 (propagated-inputs
10645 `(("python-argon2-cffi" ,python-argon2-cffi)
10646 ("python-ipykernel" ,python-ipykernel)
10647 ("python-ipython-genutils" ,python-ipython-genutils)
10648 ("python-jinja2" ,python-jinja2)
10649 ("python-jupyter-client" ,python-jupyter-client)
10650 ("python-jupyter-core" ,python-jupyter-core)
10651 ("python-nbconvert" ,python-nbconvert)
10652 ("python-nbformat" ,python-nbformat)
10653 ("python-prometheus-client" ,python-prometheus-client)
10654 ("python-pyzmq" ,python-pyzmq)
10655 ("python-send2trash" ,python-send2trash)
10656 ("python-terminado" ,python-terminado)
10657 ("python-tornado" ,python-tornado-6)
10658 ("python-traitlets" ,python-traitlets)))
10659 (native-inputs
10660 `(("python-coverage" ,python-coverage)
10661 ("python-nbval" ,python-nbval)
10662 ("python-pytest" ,python-pytest)
10663 ("python-pytest-cov" ,python-pytest-cov)
10664 ("python-requests" ,python-requests)
10665 ("python-requests-unixsocket" ,python-requests-unixsocket)))
10666 (home-page "https://jupyter.org/")
10667 (synopsis "Web-based notebook environment for interactive computing")
10668 (description
10669 "The Jupyter HTML notebook is a web-based notebook environment for
10670 interactive computing.")
10671 (properties `((python2-variant . ,(delay python2-notebook))))
10672 (license license:bsd-3)))
10673
10674 (define-public python2-notebook
10675 (let ((base (package-with-python2
10676 (strip-python2-variant python-notebook))))
10677 (package/inherit base
10678 (native-inputs
10679 `(("python2-mock" ,python2-mock)
10680 ,@(package-native-inputs base)))
10681 (arguments
10682 (substitute-keyword-arguments (package-arguments base)
10683 ((#:phases phases)
10684 `(modify-phases ,phases
10685 (add-before 'check 'disable-test-case
10686 ;; The test requires network access to localhost. Curiously it
10687 ;; fails with Python 2 only. Simply make the test-case return
10688 ;; immediately.
10689 (lambda _
10690 (substitute*
10691 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10692 (("formats = self.nbconvert_api") "return #")))))))))))
10693
10694 (define-public python-widgetsnbextension
10695 (package
10696 (name "python-widgetsnbextension")
10697 (version "3.5.1")
10698 (source
10699 (origin
10700 (method url-fetch)
10701 (uri (pypi-uri "widgetsnbextension" version))
10702 (sha256
10703 (base32
10704 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10705 (build-system python-build-system)
10706 (propagated-inputs
10707 `(("python-notebook" ,python-notebook)))
10708 (home-page "https://ipython.org")
10709 (synopsis "IPython HTML widgets for Jupyter")
10710 (description "This package provides interactive HTML widgets for Jupyter
10711 notebooks.")
10712 (license license:bsd-3)))
10713
10714 (define-public python-ipywidgets
10715 (package
10716 (name "python-ipywidgets")
10717 (version "7.6.3")
10718 (source
10719 (origin
10720 (method url-fetch)
10721 (uri (pypi-uri "ipywidgets" version))
10722 (sha256
10723 (base32
10724 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
10725 (build-system python-build-system)
10726 (propagated-inputs
10727 `(("python-ipykernel" ,python-ipykernel)
10728 ("python-ipython" ,python-ipython)
10729 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
10730 ("python-nbformat" ,python-nbformat)
10731 ("python-traitlets" ,python-traitlets)
10732 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10733 (native-inputs
10734 `(("python-mock" ,python-mock)
10735 ("python-pytest" ,python-pytest)
10736 ("python-pytest-cov" ,python-pytest-cov)))
10737 (home-page "https://ipython.org")
10738 (synopsis "IPython HTML widgets for Jupyter")
10739 (description "Ipywidgets are interactive HTML widgets for Jupyter
10740 notebooks and the IPython kernel. Notebooks come alive when interactive
10741 widgets are used. Users gain control of their data and can visualize changes
10742 in the data.")
10743 (license license:bsd-3)))
10744
10745 (define-public python-jupyter-console
10746 (package
10747 (name "python-jupyter-console")
10748 (version "6.1.0")
10749 (source
10750 (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "jupyter_console" version))
10753 (sha256
10754 (base32
10755 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10756 (build-system python-build-system)
10757 (propagated-inputs
10758 `(("python-ipykernel" ,python-ipykernel)
10759 ("python-jupyter-client" ,python-jupyter-client)
10760 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10761 ("python-pygments" ,python-pygments)))
10762 (native-inputs
10763 `(("python-nose" ,python-nose)))
10764 (home-page "https://jupyter.org")
10765 (synopsis "Jupyter terminal console")
10766 (description "This package provides a terminal-based console frontend for
10767 Jupyter kernels. It also allows for console-based interaction with non-Python
10768 Jupyter kernels such as IJulia and IRKernel.")
10769 (license license:bsd-3)))
10770
10771 ;; The python-ipython and python-jupyter-console require each other. To get
10772 ;; the functionality in both packages working, strip down the
10773 ;; python-jupyter-console package when using it as an input to python-ipython.
10774 (define python-jupyter-console-minimal
10775 (package/inherit python-jupyter-console
10776 (name "python-jupyter-console-minimal")
10777 (arguments
10778 (substitute-keyword-arguments
10779 (package-arguments python-jupyter-console)
10780 ((#:phases phases)
10781 `(modify-phases ,phases
10782 (add-after 'install 'delete-bin
10783 (lambda* (#:key outputs #:allow-other-keys)
10784 ;; Delete the bin files, to avoid conflicts in profiles
10785 ;; where python-ipython and python-jupyter-console are
10786 ;; both present.
10787 (delete-file-recursively
10788 (string-append
10789 (assoc-ref outputs "out") "/bin"))))))))
10790 ;; Remove the python-ipython propagated input, to avoid the cycle
10791 (propagated-inputs
10792 (alist-delete
10793 "python-ipython"
10794 (package-propagated-inputs python-jupyter-console)))))
10795
10796 (define-public python-qtconsole
10797 (package
10798 (name "python-qtconsole")
10799 (version "4.4.3")
10800 (source
10801 (origin
10802 (method url-fetch)
10803 (uri (pypi-uri "qtconsole" version))
10804 (sha256
10805 (base32
10806 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10807 (build-system python-build-system)
10808 (arguments
10809 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10810 ;; but we only have the LTS version 5.x. This means that there might be
10811 ;; runtime errors, but since this is a dependency of the Jupyter package,
10812 ;; and Jupyter can be used without the qtconsole we can overlook this for
10813 ;; now.
10814 `(#:tests? #f
10815 #:phases
10816 (modify-phases %standard-phases
10817 (add-before 'check 'pre-check
10818 (lambda _
10819 (setenv "QT_QPA_PLATFORM" "offscreen")
10820 #t)))))
10821 (propagated-inputs
10822 `(("python-ipykernel" ,python-ipykernel)
10823 ("python-ipython" ,python-ipython)))
10824 (native-inputs
10825 `(("python-pytest" ,python-pytest)))
10826 (home-page "https://jupyter.org")
10827 (synopsis "Jupyter Qt console")
10828 (description "This package provides a Qt-based console for Jupyter with
10829 support for rich media output.")
10830 (license license:bsd-3)))
10831
10832 (define-public python-jsbeautifier
10833 (package
10834 (name "python-jsbeautifier")
10835 (version "1.10.2")
10836 (home-page "https://github.com/beautify-web/js-beautify")
10837 (source (origin
10838 (method git-fetch)
10839 (uri (git-reference
10840 (url home-page)
10841 (commit (string-append "v" version))))
10842 (file-name (git-file-name name version))
10843 (sha256
10844 (base32
10845 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10846 (build-system python-build-system)
10847 (arguments
10848 `(#:phases (modify-phases %standard-phases
10849 (add-after 'unpack 'chdir
10850 (lambda _
10851 ;; The upstream Git repository contains all the code,
10852 ;; but this package only builds the python code.
10853 (chdir "python")
10854 #t))
10855 (add-after 'unpack 'patch-python-six-requirements
10856 (lambda _
10857 (substitute* "python/setup.py"
10858 (("six>=1.12.0")
10859 "six>=1.11.0"))
10860 #t)))))
10861 (propagated-inputs
10862 `(("python-editorconfig" ,python-editorconfig)
10863 ("python-six" ,python-six)))
10864 (native-inputs
10865 `(("python-pytest" ,python-pytest)))
10866 (synopsis "JavaScript unobfuscator and beautifier")
10867 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10868 popular online obfuscators.")
10869 (license license:expat)))
10870
10871 (define-public jupyter
10872 (package
10873 (name "jupyter")
10874 (version "1.0.0")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "jupyter" version))
10879 (sha256
10880 (base32
10881 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10882 (build-system python-build-system)
10883 (arguments '(#:tests? #f)) ; there are none.
10884 (propagated-inputs
10885 `(("python-ipykernel" ,python-ipykernel)
10886 ("python-ipywidgets" ,python-ipywidgets)
10887 ("python-jupyter-console" ,python-jupyter-console)
10888 ("python-nbconvert" ,python-nbconvert)
10889 ("python-notebook" ,python-notebook)
10890 ("python-qtconsole" ,python-qtconsole)))
10891 (home-page "https://jupyter.org")
10892 (synopsis "Web application for interactive documents")
10893 (description
10894 "The Jupyter Notebook is a web application that allows you to create and
10895 share documents that contain live code, equations, visualizations and
10896 explanatory text. Uses include: data cleaning and transformation, numerical
10897 simulation, statistical modeling, machine learning and much more.")
10898 (license license:bsd-3)))
10899
10900 (define-public python-chardet
10901 (package
10902 (name "python-chardet")
10903 (version "3.0.4")
10904 (source
10905 (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "chardet" version))
10908 (sha256
10909 (base32
10910 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10911 (native-inputs
10912 `(("python-hypothesis" ,python-hypothesis)
10913 ("python-pytest" ,python-pytest)
10914 ("python-pytest-runner" ,python-pytest-runner)))
10915 (build-system python-build-system)
10916 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10917 (arguments `(#:tests? #f))
10918 (home-page "https://github.com/chardet/chardet")
10919 (synopsis "Universal encoding detector for Python 2 and 3")
10920 (description
10921 "This package provides @code{chardet}, a Python module that can
10922 automatically detect a wide range of file encodings.")
10923 (license license:lgpl2.1+)))
10924
10925 (define-public python2-chardet
10926 (package-with-python2 python-chardet))
10927
10928 (define-public python-docopt
10929 (package
10930 (name "python-docopt")
10931 (version "0.6.2")
10932 (source
10933 (origin
10934 (method git-fetch)
10935 ;; The release on PyPI does not include tests.
10936 (uri (git-reference
10937 (url "https://github.com/docopt/docopt")
10938 (commit version)))
10939 (file-name (git-file-name name version))
10940 (sha256
10941 (base32
10942 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10943 (build-system python-build-system)
10944 (native-inputs
10945 `(("python-pytest" ,python-pytest)))
10946 (arguments
10947 `(#:phases
10948 (modify-phases %standard-phases
10949 (replace 'check
10950 (lambda _ (invoke "py.test"))))))
10951 (home-page "http://docopt.org")
10952 (synopsis "Command-line interface description language for Python")
10953 (description "This library allows the user to define a command-line
10954 interface from a program's help message rather than specifying it
10955 programmatically with command-line parsers like @code{getopt} and
10956 @code{argparse}.")
10957 (license license:expat)))
10958
10959 (define-public python2-docopt
10960 (package-with-python2 python-docopt))
10961
10962 (define-public python-pythondialog
10963 (package
10964 (name "python-pythondialog")
10965 (version "3.4.0")
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "pythondialog" version))
10970 (sha256
10971 (base32
10972 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10973 (build-system python-build-system)
10974 (arguments
10975 `(#:phases
10976 (modify-phases %standard-phases
10977 (add-after 'unpack 'patch-path
10978 (lambda* (#:key inputs #:allow-other-keys)
10979 (let* ((dialog (assoc-ref inputs "dialog")))
10980 ;; Since this library really wants to grovel the search path, we
10981 ;; must hardcode dialog's store path into it.
10982 (substitute* "dialog.py"
10983 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10984 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10985 #t))))
10986 #:tests? #f)) ; no test suite
10987 (propagated-inputs
10988 `(("dialog" ,dialog)))
10989 (home-page "http://pythondialog.sourceforge.net/")
10990 (synopsis "Python interface to the UNIX dialog utility")
10991 (description "A Python wrapper for the dialog utility. Its purpose is to
10992 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10993 This allows one to make simple text-mode user interfaces on Unix-like systems")
10994 (license license:lgpl2.1)
10995 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10996
10997 (define-public python2-pythondialog
10998 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10999 (package
11000 (inherit base)
11001 (version (package-version python-pythondialog))
11002 (source (origin
11003 (method url-fetch)
11004 (uri (pypi-uri "python2-pythondialog" version))
11005 (sha256
11006 (base32
11007 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11008
11009 (define-public python-configobj
11010 (package
11011 (name "python-configobj")
11012 (version "5.0.6")
11013 (source (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "configobj" version))
11016 (sha256
11017 (base32
11018 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11019 ;; Patch setup.py so it looks for python-setuptools, which is
11020 ;; required to parse the keyword 'install_requires' in setup.py.
11021 (patches (search-patches "python-configobj-setuptools.patch"))))
11022 (build-system python-build-system)
11023 (propagated-inputs
11024 `(("python-six" ,python-six)))
11025 (synopsis "Config file reading, writing and validation")
11026 (description "ConfigObj is a simple but powerful config file reader and
11027 writer: an ini file round tripper. Its main feature is that it is very easy to
11028 use, with a straightforward programmer’s interface and a simple syntax for
11029 config files.")
11030 (home-page "https://github.com/DiffSK/configobj")
11031 (license license:bsd-3)))
11032
11033 (define-public python2-configobj
11034 (package-with-python2 python-configobj))
11035
11036 (define-public python-configargparse
11037 (package
11038 (name "python-configargparse")
11039 (version "1.2.3")
11040 (source (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "ConfigArgParse" version))
11043 (sha256
11044 (base32
11045 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11046 (build-system python-build-system)
11047 (native-inputs
11048 `(("python-pyyaml" ,python-pyyaml)))
11049 (arguments
11050 `(#:phases
11051 (modify-phases %standard-phases
11052 (replace 'check
11053 (lambda _
11054 ;; Bypass setuptools-shim because one test relies on "setup.py"
11055 ;; being the first argument passed to the python call.
11056 ;;
11057 ;; NOTE: Many tests do not run because they rely on Python's
11058 ;; built-in test.test_argparse, but we remove the unit tests from
11059 ;; our Python installation.
11060 (invoke "python" "setup.py" "test"))))))
11061 (synopsis "Replacement for argparse")
11062 (description "A drop-in replacement for argparse that allows options to also
11063 be set via config files and/or environment variables.")
11064 (home-page "https://github.com/bw2/ConfigArgParse")
11065 (license license:expat)))
11066
11067 (define-public python-argparse-manpage
11068 (package
11069 (name "python-argparse-manpage")
11070 (version "1.1")
11071 (source
11072 (origin
11073 (method url-fetch)
11074 (uri (pypi-uri "argparse-manpage" version))
11075 (sha256
11076 (base32
11077 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11078 (build-system python-build-system)
11079 (home-page "https://github.com/praiskup/argparse-manpage")
11080 (synopsis "Build manual page from Python's ArgumentParser object")
11081 (description
11082 "This package provides tools to build manual pages from Python's
11083 @code{ArgumentParser} object.")
11084 (license license:asl2.0)))
11085
11086 (define-public python-contextlib2
11087 (package
11088 (name "python-contextlib2")
11089 (version "0.6.0.post1")
11090 (source
11091 (origin
11092 (method url-fetch)
11093 (uri (pypi-uri "contextlib2" version))
11094 (sha256
11095 (base32
11096 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11097 (build-system python-build-system)
11098 (home-page "https://contextlib2.readthedocs.org/")
11099 (synopsis "Tools for decorators and context managers")
11100 (description "This module is primarily a backport of the Python
11101 3.2 contextlib to earlier Python versions. Like contextlib, it
11102 provides utilities for common tasks involving decorators and context
11103 managers. It also contains additional features that are not part of
11104 the standard library.")
11105 (properties `((python2-variant . ,(delay python2-contextlib2))))
11106 (license license:psfl)))
11107
11108 (define-public python2-contextlib2
11109 (let ((base (package-with-python2
11110 (strip-python2-variant python-contextlib2))))
11111 (package/inherit base
11112 (arguments
11113 (substitute-keyword-arguments (package-arguments base)
11114 ((#:phases phases)
11115 `(modify-phases ,phases
11116 (replace 'check
11117 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11118 (native-inputs
11119 `(("python2-unittest2" ,python2-unittest2))))))
11120
11121 ;; This package is used by python2-pytest via python2-importlib-metadata,
11122 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11123 (define-public python2-contextlib2-bootstrap
11124 (hidden-package
11125 (package/inherit
11126 python2-contextlib2
11127 (name "python2-contextlib2-bootstrap")
11128 (arguments
11129 `(#:tests? #f
11130 ,@(package-arguments python2-contextlib2)))
11131 (native-inputs '()))))
11132
11133 (define-public python-texttable
11134 (package
11135 (name "python-texttable")
11136 (version "1.6.2")
11137 (source
11138 (origin
11139 (method url-fetch)
11140 (uri (pypi-uri "texttable" version))
11141 (sha256
11142 (base32
11143 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11144 (build-system python-build-system)
11145 (arguments
11146 `(#:phases
11147 (modify-phases %standard-phases
11148 (replace 'check
11149 (lambda _ (invoke "pytest" "tests.py"))))))
11150 (native-inputs
11151 `(("python-pytest" ,python-pytest)))
11152 (home-page "https://github.com/foutaise/texttable/")
11153 (synopsis "Python module for creating simple ASCII tables")
11154 (description "Texttable is a Python module for creating simple ASCII
11155 tables.")
11156 (license license:expat)))
11157
11158 (define-public python2-texttable
11159 (package-with-python2 python-texttable))
11160
11161 (define-public python-atomicwrites
11162 (package
11163 (name "python-atomicwrites")
11164 (version "1.3.0")
11165 (source (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "atomicwrites" version))
11168 (sha256
11169 (base32
11170 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
11171 (build-system python-build-system)
11172 (synopsis "Atomic file writes in Python")
11173 (description "Library for atomic file writes using platform dependent tools
11174 for atomic file system operations.")
11175 (home-page "https://github.com/untitaker/python-atomicwrites")
11176 (license license:expat)))
11177
11178 (define-public python2-atomicwrites
11179 (package-with-python2 python-atomicwrites))
11180
11181 (define-public python-click-threading
11182 (package
11183 (name "python-click-threading")
11184 (version "0.4.4")
11185 (source (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "click-threading" version))
11188 (sha256
11189 (base32
11190 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11191 (build-system python-build-system)
11192 (propagated-inputs
11193 `(("python-click" ,python-click)))
11194 (synopsis "Utilities for multithreading in Click")
11195 (description "This package provides utilities for multithreading in Click
11196 applications.")
11197 (home-page "https://github.com/click-contrib/click-threading")
11198 (license license:expat)))
11199
11200 (define-public python-click-log
11201 (package
11202 (name "python-click-log")
11203 (version "0.3.2")
11204 (source (origin
11205 (method url-fetch)
11206 (uri (pypi-uri "click-log" version))
11207 (sha256
11208 (base32
11209 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11210 (build-system python-build-system)
11211 (propagated-inputs
11212 `(("python-click" ,python-click)))
11213 (synopsis "Logging for click applications")
11214 (description "This package provides a Python library for logging Click
11215 applications.")
11216 (home-page "https://github.com/click-contrib/click-log")
11217 (license license:expat)))
11218
11219 (define-public python-click-default-group
11220 (package
11221 (name "python-click-default-group")
11222 (version "1.2.2")
11223 (source (origin
11224 (method url-fetch)
11225 (uri (pypi-uri "click-default-group" version))
11226 (sha256
11227 (base32
11228 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11229 (build-system python-build-system)
11230 (arguments
11231 `(#:tests? #f)) ; no target
11232 (propagated-inputs
11233 `(("python-click" ,python-click)))
11234 (synopsis "Extends click.Group")
11235 (description "This package extends click.Group to invoke a command without
11236 explicit subcommand name.")
11237 (home-page "https://github.com/click-contrib/click-default-group")
11238 (license license:bsd-3)))
11239
11240 (define-public python-structlog
11241 (package
11242 (name "python-structlog")
11243 (version "20.2.0")
11244 (source
11245 (origin
11246 (method url-fetch)
11247 (uri (pypi-uri "structlog" version))
11248 (sha256
11249 (base32
11250 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11251 (build-system python-build-system)
11252 (arguments
11253 `(#:phases
11254 (modify-phases %standard-phases
11255 (replace 'check
11256 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11257 (when tests?
11258 (add-installed-pythonpath inputs outputs)
11259 (invoke "pytest"))
11260 #t)))))
11261 (native-inputs
11262 `(("python-coverage" ,python-coverage)
11263 ("python-freezegun" ,python-freezegun)
11264 ("python-pretend" ,python-pretend)
11265 ("python-pytest" ,python-pytest)
11266 ("python-pytest-asyncio" ,python-pytest-asyncio)
11267 ("python-simplejson" ,python-simplejson)
11268 ("python-twisted" ,python-twisted)))
11269 (home-page "https://www.structlog.org/")
11270 (synopsis "Structured Logging for Python")
11271 (description "@code{structlog} changes logging in Python by adding structure
11272 to your log entries.")
11273 (license (list license:asl2.0 license:expat))))
11274
11275 (define-public python-apipkg
11276 (package
11277 (name "python-apipkg")
11278 (version "1.5")
11279 (source (origin
11280 (method url-fetch)
11281 (uri (pypi-uri "apipkg" version))
11282 (sha256
11283 (base32
11284 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11285 (build-system python-build-system)
11286 (native-inputs
11287 `(("python-pytest" ,python-pytest)
11288 ("python-setuptools-scm" ,python-setuptools-scm)))
11289 (synopsis "Namespace control and lazy-import mechanism")
11290 (description "With apipkg you can control the exported namespace of a Python
11291 package and greatly reduce the number of imports for your users. It is a small
11292 pure Python module that works on virtually all Python versions.")
11293 (home-page "https://github.com/pytest-dev/apipkg")
11294 (license license:expat)))
11295
11296 (define-public python-execnet
11297 (package
11298 (name "python-execnet")
11299 (version "1.4.1")
11300 (source (origin
11301 (method url-fetch)
11302 (uri (pypi-uri "execnet" version))
11303 (sha256
11304 (base32
11305 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11306 (build-system python-build-system)
11307 (arguments
11308 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11309 ;; The two test failures are caused by the lack of an `ssh` executable.
11310 ;; The test suite can be run with pytest after the 'install' phase.
11311 #:tests? #f))
11312 (native-inputs
11313 `(("python-pytest" ,python-pytest)
11314 ("python-setuptools-scm" ,python-setuptools-scm)))
11315 (propagated-inputs
11316 `(("python-apipkg" ,python-apipkg)))
11317 (synopsis "Rapid multi-Python deployment")
11318 (description "Execnet provides a share-nothing model with
11319 channel-send/receive communication for distributing execution across many
11320 Python interpreters across version, platform and network barriers. It has a
11321 minimal and fast API targeting the following uses:
11322 @enumerate
11323 @item distribute tasks to (many) local or remote CPUs
11324 @item write and deploy hybrid multi-process applications
11325 @item write scripts to administer multiple environments
11326 @end enumerate")
11327 (home-page "https://codespeak.net/execnet/")
11328 (license license:expat)))
11329
11330 (define-public python2-execnet
11331 (package-with-python2 python-execnet))
11332
11333 (define-public python-icalendar
11334 (package
11335 (name "python-icalendar")
11336 (version "4.0.7")
11337 (source (origin
11338 (method url-fetch)
11339 (uri (pypi-uri "icalendar" version))
11340 (sha256
11341 (base32
11342 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
11343 (build-system python-build-system)
11344 (propagated-inputs
11345 `(("python-dateutil" ,python-dateutil)
11346 ("python-pytz" ,python-pytz)))
11347 (synopsis "Python library for parsing iCalendar files")
11348 (description "The icalendar package is a parser/generator of iCalendar
11349 files for use with Python.")
11350 (home-page "https://github.com/collective/icalendar")
11351 (license license:bsd-2)))
11352
11353 (define-public python-args
11354 (package
11355 (name "python-args")
11356 (version "0.1.0")
11357 (source (origin
11358 (method url-fetch)
11359 (uri (pypi-uri "args" version))
11360 (sha256
11361 (base32
11362 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
11363 (build-system python-build-system)
11364 (home-page "https://github.com/kennethreitz/args")
11365 (synopsis "Command-line argument parser")
11366 (description
11367 "This library provides a Python module to parse command-line arguments.")
11368 (license license:bsd-3)))
11369
11370 (define-public python2-args
11371 (package-with-python2 python-args))
11372
11373 (define-public python-clint
11374 (package
11375 (name "python-clint")
11376 (version "0.5.1")
11377 (source (origin
11378 (method url-fetch)
11379 (uri (pypi-uri "clint" version))
11380 (sha256
11381 (base32
11382 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
11383 (build-system python-build-system)
11384 (arguments
11385 '(#:phases
11386 (modify-phases %standard-phases
11387 (replace 'check
11388 (lambda _ (invoke "py.test" "-v"))))))
11389 (native-inputs
11390 `(("python-pytest" ,python-pytest)))
11391 (propagated-inputs
11392 `(("python-args" ,python-args)))
11393 (home-page "https://github.com/kennethreitz/clint")
11394 (synopsis "Command-line interface tools")
11395 (description
11396 "Clint is a Python module filled with a set of tools for developing
11397 command-line applications, including tools for colored and indented
11398 output, progress bar display, and pipes.")
11399 (license license:isc)))
11400
11401 (define-public python2-clint
11402 (package-with-python2 python-clint))
11403
11404 (define-public python-rply
11405 (package
11406 (name "python-rply")
11407 (version "0.7.5")
11408 (source (origin
11409 (method url-fetch)
11410 (uri (pypi-uri "rply" version))
11411 (sha256
11412 (base32
11413 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
11414 (build-system python-build-system)
11415 (propagated-inputs
11416 `(("python-appdirs" ,python-appdirs)))
11417 (home-page "https://github.com/alex/rply")
11418 (synopsis "Parser generator for Python")
11419 (description
11420 "This package provides a pure Python based parser generator, that also
11421 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
11422 with a new public API, and RPython support.")
11423 (license license:bsd-3)))
11424
11425 (define-public python2-rply
11426 (package-with-python2 python-rply))
11427
11428 (define-public python-hy
11429 (package
11430 (name "python-hy")
11431 (version "0.18.0")
11432 (source (origin
11433 (method url-fetch)
11434 (uri (pypi-uri "hy" version))
11435 (sha256
11436 (base32
11437 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
11438 (build-system python-build-system)
11439 (arguments
11440 '(#:phases
11441 (modify-phases %standard-phases
11442 (add-before 'install 'set-HOME
11443 (lambda _
11444 (setenv "HOME" "/tmp") #t))
11445 (replace 'check
11446 (lambda _
11447 ;; Tests require write access to HOME.
11448 (setenv "HOME" "/tmp")
11449 (invoke "nosetests"))))))
11450 (native-inputs
11451 `(("python-coverage" ,python-coverage)
11452 ("python-nose" ,python-nose)))
11453 (propagated-inputs
11454 `(("python-astor" ,python-astor)
11455 ("python-colorama" ,python-colorama)
11456 ("python-rply" ,python-rply)
11457 ("python-funcparserlib"
11458 ,python-funcparserlib)))
11459 (home-page "http://hylang.org/")
11460 (synopsis "Lisp frontend to Python")
11461 (description
11462 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
11463 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
11464 Python at your fingertips, in Lisp form.")
11465 (license license:expat)))
11466
11467 (define-public python2-functools32
11468 (package
11469 (name "python2-functools32")
11470 (version "3.2.3-2")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "functools32" version))
11475 (sha256
11476 (base32
11477 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
11478 (build-system python-build-system)
11479 (arguments
11480 `(#:python ,python-2
11481 #:tests? #f)) ; no test target
11482 (home-page "https://github.com/MiCHiLU/python-functools32")
11483 (synopsis
11484 "Backport of the functools module from Python 3.2.3")
11485 (description
11486 "This package is a backport of the @code{functools} module from Python
11487 3.2.3 for use with older versions of Python and PyPy.")
11488 (license license:expat)))
11489
11490 (define-public python2-subprocess32
11491 (package
11492 (name "python2-subprocess32")
11493 (version "3.2.7")
11494 (source (origin
11495 (method url-fetch)
11496 (uri (pypi-uri "subprocess32" version))
11497 (sha256
11498 (base32
11499 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
11500 (patches
11501 (search-patches "python2-subprocess32-disable-input-test.patch"))))
11502 (build-system python-build-system)
11503 (arguments
11504 `(#:python ,python-2
11505 ;; The test suite fails with Python > 2.7.13:
11506 ;; import test.support
11507 ;; ImportError: No module named support
11508 #:tests? #f
11509 #:phases
11510 (modify-phases %standard-phases
11511 (add-after 'unpack 'patch-/bin/sh
11512 (lambda _
11513 (substitute* '("subprocess32.py"
11514 "test_subprocess32.py")
11515 (("/bin/sh") (which "sh")))
11516 #t)))))
11517 (home-page "https://github.com/google/python-subprocess32")
11518 (synopsis "Backport of the subprocess module from Python 3.2")
11519 (description
11520 "This is a backport of the @code{subprocess} standard library module
11521 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
11522 new features. On POSIX systems it is guaranteed to be reliable when used
11523 in threaded applications. It includes timeout support from Python 3.3 but
11524 otherwise matches 3.2’s API.")
11525 (license license:psfl)))
11526
11527 (define-public python2-futures
11528 (package
11529 (name "python2-futures")
11530 (version "3.2.0")
11531 (source
11532 (origin
11533 (method url-fetch)
11534 (uri (pypi-uri "futures" version))
11535 (sha256
11536 (base32
11537 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
11538 (build-system python-build-system)
11539 (arguments
11540 `(#:python ,python-2
11541 #:phases
11542 (modify-phases %standard-phases
11543 (replace 'check
11544 (lambda _
11545 (invoke "python" "test_futures.py")
11546 #t)))))
11547 (home-page "https://github.com/agronholm/pythonfutures")
11548 (synopsis
11549 "Backport of the concurrent.futures package from Python 3.2")
11550 (description
11551 "The concurrent.futures module provides a high-level interface for
11552 asynchronously executing callables. This package backports the
11553 concurrent.futures package from Python 3.2")
11554 (license license:bsd-3)))
11555
11556 (define-public python-promise
11557 (package
11558 (name "python-promise")
11559 (version "0.4.2")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "promise" version))
11564 (sha256
11565 (base32
11566 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
11567 (build-system python-build-system)
11568 ;; Tests wants python-futures, which is a python2 only program, and
11569 ;; can't be found by python-promise at test time.
11570 (arguments `(#:tests? #f))
11571 (home-page "https://github.com/syrusakbary/promise")
11572 (synopsis "Promises/A+ implementation for Python")
11573 (description
11574 "Promises/A+ implementation for Python")
11575 (properties `((python2-variant . ,(delay python2-promise))))
11576 (license license:expat)))
11577
11578 (define-public python2-promise
11579 (let ((promise (package-with-python2
11580 (strip-python2-variant python-promise))))
11581 (package/inherit promise
11582 (arguments (substitute-keyword-arguments (package-arguments promise)
11583 ((#:tests? _) #t)))
11584 (native-inputs
11585 `(("python2-futures" ,python2-futures)
11586 ("python2-pytest" ,python2-pytest)
11587 ,@(package-native-inputs promise))))))
11588
11589 (define-public python-progressbar2
11590 (package
11591 (name "python-progressbar2")
11592 (version "3.51.3")
11593 (source
11594 (origin
11595 (method url-fetch)
11596 (uri (pypi-uri "progressbar2" version))
11597 (sha256
11598 (base32
11599 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
11600 (build-system python-build-system)
11601 (propagated-inputs
11602 `(("python-six" ,python-six)
11603 ("python-utils" ,python-utils)))
11604 (native-inputs
11605 `(("python-flake8" ,python-flake8)
11606 ("python-freezegun" ,python-freezegun)
11607 ("python-pycodestyle" ,python-pycodestyle)
11608 ("python-pytest" ,python-pytest)
11609 ("python-pytest-cache" ,python-pytest-cache)
11610 ("python-pytest-cov" ,python-pytest-cov)
11611 ("python-pytest-flakes" ,python-pytest-flakes)
11612 ("python-pytest-pep8" ,python-pytest-pep8)
11613 ("python-sphinx" ,python-sphinx)))
11614 (home-page "https://github.com/WoLpH/python-progressbar")
11615 (synopsis "Text progress bar library for Python")
11616 (description
11617 "This package provides a Python progressbar library to provide
11618 visual (yet text based) progress to long running operations.")
11619 (license license:bsd-3)))
11620
11621 (define-public python-progressbar33
11622 (package
11623 (name "python-progressbar33")
11624 (version "2.4")
11625 (source
11626 (origin
11627 (method url-fetch)
11628 (uri (pypi-uri "progressbar33" version))
11629 (sha256
11630 (base32
11631 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
11632 (build-system python-build-system)
11633 (home-page "https://github.com/germangh/python-progressbar")
11634 (synopsis "Text progress bar library for Python")
11635 (description
11636 "This package provides a text progress bar library for Python. This
11637 version only differs from the original @code{progressbar} package in that it
11638 uses relative package imports instead of absolute imports, which is necessary
11639 for the module to work under Python 3.3.")
11640 ;; Either or both of these licenses may be selected.
11641 (license (list license:lgpl2.1+ license:bsd-3))))
11642
11643 (define-public python-colorama
11644 (package
11645 (name "python-colorama")
11646 (version "0.4.4")
11647 (source
11648 (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "colorama" version))
11651 (sha256
11652 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11653 (build-system python-build-system)
11654 (synopsis "Colored terminal text rendering for Python")
11655 (description "Colorama is a Python library for rendering colored terminal
11656 text.")
11657 (home-page "https://pypi.org/project/colorama/")
11658 (license license:bsd-3)))
11659
11660 (define-public python2-colorama
11661 (package-with-python2 python-colorama))
11662
11663 (define-public python-moto
11664 (package
11665 (name "python-moto")
11666 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11667 (version "1.3.16.dev134")
11668 (source (origin
11669 (method url-fetch)
11670 (uri (pypi-uri "moto" version))
11671 (sha256
11672 (base32
11673 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11674 (build-system python-build-system)
11675 (arguments
11676 `(#:phases (modify-phases %standard-phases
11677 (add-after 'unpack 'patch-hardcoded-executable-names
11678 (lambda _
11679 (substitute* "moto/batch/models.py"
11680 (("/bin/sh")
11681 (which "sh")))
11682 (substitute* (find-files "tests" "\\.py$")
11683 (("#!/bin/bash")
11684 (string-append "#!" (which "bash"))))
11685 #t))
11686 (replace 'check
11687 (lambda _
11688 (setenv "PYTHONPATH" (string-append "./build/lib:"
11689 (getenv "PYTHONPATH")))
11690 (invoke "pytest" "-vv" "-m" "not network"
11691 ;; These tests require Docker.
11692 "-k" "not test_terminate_job \
11693 and not test_invoke_function_from_sqs_exception"))))))
11694 (native-inputs
11695 `(("python-flask" ,python-flask)
11696 ("python-flask-cors" ,python-flask-cors)
11697 ("python-freezegun" ,python-freezegun)
11698 ("python-parameterized" ,python-parameterized)
11699 ("python-pytest" ,python-pytest)
11700 ("python-sure" ,python-sure)))
11701 (propagated-inputs
11702 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11703 ("python-boto" ,python-boto)
11704 ("python-boto3" ,python-boto3)
11705 ("python-botocore" ,python-botocore)
11706 ("python-cfn-lint" ,python-cfn-lint)
11707 ("python-cryptography" ,python-cryptography)
11708 ("python-dateutil" ,python-dateutil)
11709 ("python-docker" ,python-docker)
11710 ("python-idna" ,python-idna)
11711 ("python-jinja2" ,python-jinja2)
11712 ("python-jose" ,python-jose)
11713 ("python-jsondiff" ,python-jsondiff)
11714 ("python-mock" ,python-mock)
11715 ("python-pytz" ,python-pytz)
11716 ("python-pyyaml" ,python-pyyaml)
11717 ("python-requests" ,python-requests)
11718 ("python-responses" ,python-responses)
11719 ("python-six" ,python-six)
11720 ("python-sshpubkeys" ,python-sshpubkeys)
11721 ("python-werkzeug" ,python-werkzeug)
11722 ("python-xmltodict" ,python-xmltodict)))
11723 (home-page "https://github.com/spulec/moto")
11724 (synopsis "Mock out the boto library")
11725 (description
11726 "@code{moto} is a library designed to easily mock out the
11727 @code{boto} library.")
11728 (license license:asl2.0)))
11729
11730 (define-public python-rsa
11731 (package
11732 (name "python-rsa")
11733 (version "3.4.2")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (pypi-uri "rsa" version))
11738 (sha256
11739 (base32
11740 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11741 (build-system python-build-system)
11742 (propagated-inputs
11743 `(("python-pyasn1" ,python-pyasn1)))
11744 (synopsis "Pure-Python RSA implementation")
11745 (description "Python-RSA is a pure-Python RSA implementation. It supports
11746 encryption and decryption, signing and verifying signatures, and key
11747 generation according to PKCS#1 version 1.5. It can be used as a Python
11748 library as well as on the command line.")
11749 (home-page "https://stuvel.eu/rsa")
11750 (license license:asl2.0)))
11751
11752 (define-public python2-rsa
11753 (package-with-python2 python-rsa))
11754
11755 (define-public python-pluggy
11756 (package
11757 (name "python-pluggy")
11758 (version "0.13.1")
11759 (source
11760 (origin
11761 (method url-fetch)
11762 (uri (pypi-uri "pluggy" version))
11763 (sha256
11764 (base32
11765 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11766 (build-system python-build-system)
11767 (native-inputs
11768 `(("python-setuptools-scm" ,python-setuptools-scm)))
11769 (synopsis "Plugin and hook calling mechanism for Python")
11770 (description "Pluggy is an extraction of the plugin manager as used by
11771 Pytest but stripped of Pytest specific details.")
11772 (home-page "https://pypi.org/project/pluggy/")
11773 (properties `((python2-variant . ,(delay python2-pluggy))))
11774 (license license:expat)))
11775
11776 (define-public python2-pluggy
11777 (let ((base (package-with-python2 (strip-python2-variant
11778 python-pluggy))))
11779 (package/inherit
11780 base
11781 (propagated-inputs
11782 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11783
11784 ;; This package requires python2-importlib-metadata, but that package
11785 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11786 ;; variant to solve the circular dependency.
11787 (define-public python2-pluggy-bootstrap
11788 (hidden-package
11789 (package/inherit
11790 python2-pluggy
11791 (name "python2-pluggy-bootstrap")
11792 (arguments
11793 `(#:tests? #f
11794 ,@(package-arguments python2-pluggy)))
11795 (propagated-inputs
11796 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11797
11798 (define-public python-plumbum
11799 (package
11800 (name "python-plumbum")
11801 (version "1.7.0")
11802 (source
11803 (origin
11804 (method url-fetch)
11805 (uri (pypi-uri "plumbum" version))
11806 (sha256
11807 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
11808 (build-system python-build-system)
11809 (arguments
11810 `(#:tests? #f)) ;no tests
11811 (native-inputs
11812 ;; XXX: Not actually used since there are no tests but required for
11813 ;; build.
11814 `(("python-pytest" ,python-pytest)))
11815 (home-page "https://plumbum.readthedocs.io")
11816 (synopsis "Python shell combinators library")
11817 (description
11818 "Plumbum is a library of tools for replacing shell scripts with Python
11819 code.")
11820 (license license:expat)))
11821
11822 (define-public python-deprecation
11823 (package
11824 (name "python-deprecation")
11825 (version "2.1.0")
11826 (source
11827 (origin
11828 (method url-fetch)
11829 (uri (pypi-uri "deprecation" version))
11830 (sha256
11831 (base32
11832 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
11833 (build-system python-build-system)
11834 (propagated-inputs
11835 `(("python-packaging" ,python-packaging)))
11836 (native-inputs
11837 `(("python-unittest2" ,python-unittest2)))
11838 (home-page "https://deprecation.readthedocs.io/")
11839 (synopsis "Python library to handle automated deprecations")
11840 (description
11841 "This is a library that enables automated deprecations. It offers the
11842 @code{deprecated()} decorator to wrap functions, providing proper warnings
11843 both in documentation and via Python’s warnings system, as well as the
11844 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
11845 that deprecated code is eventually removed.")
11846 (license license:asl2.0)))
11847
11848 (define-public python-tox
11849 (package
11850 (name "python-tox")
11851 (version "3.20.0")
11852 (source
11853 (origin
11854 (method url-fetch)
11855 (uri (pypi-uri "tox" version))
11856 (sha256
11857 (base32
11858 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11859 (build-system python-build-system)
11860 (arguments
11861 ;; FIXME: Tests require pytest-timeout, which itself requires
11862 ;; pytest>=2.8.0 for installation.
11863 '(#:tests? #f))
11864 (propagated-inputs
11865 `(("python-filelock" ,python-filelock)
11866 ("python-packaging" ,python-packaging)
11867 ("python-pluggy" ,python-pluggy)
11868 ("python-py" ,python-py)
11869 ("python-six" ,python-six)
11870 ("python-toml" ,python-toml)
11871 ("python-virtualenv" ,python-virtualenv)))
11872 (native-inputs
11873 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11874 ("python-pytest" ,python-pytest) ; >= 2.3.5
11875 ("python-setuptools-scm" ,python-setuptools-scm)))
11876 (home-page "https://tox.readthedocs.io")
11877 (synopsis "Virtualenv-based automation of test activities")
11878 (description "Tox is a generic virtualenv management and test command line
11879 tool. It can be used to check that a package installs correctly with
11880 different Python versions and interpreters, or run tests in each type of
11881 supported environment, or act as a frontend to continuous integration
11882 servers.")
11883 (license license:expat)))
11884
11885 (define-public python-jmespath
11886 (package
11887 (name "python-jmespath")
11888 (version "0.9.4")
11889 (source
11890 (origin
11891 (method url-fetch)
11892 (uri (pypi-uri "jmespath" version))
11893 (sha256
11894 (base32
11895 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11896 (build-system python-build-system)
11897 (native-inputs
11898 `(("python-nose" ,python-nose)))
11899 (synopsis "JSON Matching Expressions")
11900 (description "JMESPath (pronounced “james path”) is a Python library that
11901 allows one to declaratively specify how to extract elements from a JSON
11902 document.")
11903 (home-page "https://github.com/jmespath/jmespath.py")
11904 (license license:expat)))
11905
11906 (define-public python2-jmespath
11907 (package-with-python2 python-jmespath))
11908
11909 (define-public python-symengine
11910 (package
11911 (name "python-symengine")
11912 (version "0.6.1")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "symengine" version))
11917 (sha256
11918 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11919 (build-system python-build-system)
11920 (native-inputs
11921 `(("cmake" ,cmake)
11922 ("python-cython" ,python-cython)))
11923 (inputs
11924 `(("symengine" ,symengine)))
11925 (home-page "https://github.com/symengine/symengine.py")
11926 (synopsis "Python library providing wrappers to SymEngine")
11927 (description
11928 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11929 manipulation library.")
11930 (license license:expat)))
11931
11932 (define-public python-uncertainties
11933 (package
11934 (name "python-uncertainties")
11935 (version "3.1.5")
11936 (source
11937 (origin
11938 (method url-fetch)
11939 (uri (pypi-uri "uncertainties" version))
11940 (sha256
11941 (base32
11942 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
11943 (build-system python-build-system)
11944 ;; While there are test files, there is no "tests" directory, so the tests
11945 ;; fail.
11946 (arguments '(#:tests? #false))
11947 (propagated-inputs
11948 `(("python-future" ,python-future)))
11949 (native-inputs
11950 `(("python-nose" ,python-nose)
11951 ("python-numpy" ,python-numpy)))
11952 (home-page "https://uncertainties-python-package.readthedocs.io/")
11953 (synopsis "Calculations with uncertainties")
11954 (description
11955 "The uncertainties package transparently handles calculations with
11956 numbers with uncertainties. It can also yield the derivatives of any
11957 expression.")
11958 (license license:bsd-3)))
11959
11960 (define-public python-asteval
11961 (package
11962 (name "python-asteval")
11963 (version "0.9.23")
11964 (source
11965 (origin
11966 (method url-fetch)
11967 (uri (pypi-uri "asteval" version))
11968 (sha256
11969 (base32
11970 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
11971 (build-system python-build-system)
11972 (native-inputs
11973 `(("python-pytest" ,python-pytest)))
11974 (home-page "https://github.com/newville/asteval")
11975 (synopsis "Minimalistic evaluator of Python expressions")
11976 (description
11977 "This package provides a minimalistic evaluator of Python expression
11978 using the @code{ast} module")
11979 (license license:expat)))
11980
11981 (define-public python-lmfit
11982 (package
11983 (name "python-lmfit")
11984 (version "1.0.2")
11985 (source
11986 (origin
11987 (method url-fetch)
11988 (uri (pypi-uri "lmfit" version))
11989 (sha256
11990 (base32
11991 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
11992 (build-system python-build-system)
11993 (propagated-inputs
11994 `(("python-asteval" ,python-asteval)
11995 ("python-numpy" ,python-numpy)
11996 ("python-scipy" ,python-scipy)
11997 ("python-uncertainties" ,python-uncertainties)))
11998 (native-inputs
11999 `(("python-pytest" ,python-pytest)))
12000 (home-page "https://lmfit.github.io/lmfit-py/")
12001 (synopsis "Least-Squares minimization with bounds and constraints")
12002 (description
12003 "Lmfit provides a high-level interface to non-linear optimization and
12004 curve fitting problems for Python. It builds on and extends many of the
12005 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12006 named for) extending the Levenberg-Marquardt method from
12007 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12008 enhancements to optimization and data fitting problems.")
12009 (license license:bsd-3)))
12010
12011 (define-public python-boto
12012 (package
12013 (name "python-boto")
12014 (version "2.49.0")
12015 (source (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "boto" version))
12018 (sha256
12019 (base32
12020 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12021 (build-system python-build-system)
12022 (arguments
12023 ;; XXX: This package is unmaintained and has problems with newer versions
12024 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12025 ;; subset of this library, so keep it around for now, but disable tests.
12026 '(#:tests? #f))
12027 (propagated-inputs
12028 `(("python-paramiko" ,python-paramiko)
12029 ("python-requests" ,python-requests)))
12030 (home-page "https://github.com/boto/boto")
12031 (synopsis "Python interfaces for Amazon Web Services")
12032 (description
12033 "This package provides various facilities for interacting with Amazon
12034 Web Services through Python.
12035
12036 This software is unmaintained, and new projects should use @code{boto3} instead.")
12037 (license license:expat)))
12038
12039 (define-public python-botocore
12040 ;; Note: When updating botocore, also make sure that boto3 and awscli
12041 ;; are compatible.
12042 (package
12043 (name "python-botocore")
12044 (version "1.19.22")
12045 (source
12046 (origin
12047 (method url-fetch)
12048 (uri (pypi-uri "botocore" version))
12049 (sha256
12050 (base32
12051 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12052 (build-system python-build-system)
12053 (arguments
12054 ;; FIXME: Many tests are failing.
12055 '(#:tests? #f))
12056 (propagated-inputs
12057 `(("python-dateutil" ,python-dateutil)
12058 ("python-jmespath" ,python-jmespath)
12059 ("python-urllib3" ,python-urllib3)))
12060 (home-page "https://github.com/boto/botocore")
12061 (synopsis "Low-level interface to AWS")
12062 (description "Botocore is a Python library that provides a low-level
12063 interface to the Amazon Web Services (AWS) API.")
12064 (license license:asl2.0)))
12065
12066 (define-public python2-botocore
12067 (package-with-python2 python-botocore))
12068
12069 (define-public python-boto3
12070 (package
12071 (name "python-boto3")
12072 (version "1.16.22")
12073 (home-page "https://github.com/boto/boto3")
12074 (source (origin
12075 (method git-fetch)
12076 (uri (git-reference (url home-page) (commit version)))
12077 (file-name (git-file-name name version))
12078 (sha256
12079 (base32
12080 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12081 (arguments
12082 `(#:phases
12083 (modify-phases %standard-phases
12084 (add-after 'unpack 'delete-network-tests
12085 ;; Deleting integration tests because they are trying to connect to AWS.
12086 (lambda _
12087 (delete-file-recursively "tests/integration")
12088 #t)))))
12089 (build-system python-build-system)
12090 (native-inputs
12091 `(("python-nose" ,python-nose)
12092 ("python-mock" ,python-mock)))
12093 (propagated-inputs
12094 `(("python-botocore" ,python-botocore)
12095 ("python-jmespath" ,python-jmespath)
12096 ("python-s3transfer" ,python-s3transfer)))
12097 (synopsis "AWS SDK for Python")
12098 (description
12099 "Boto3 is a Python library for writing programs that interact with
12100 @acronym{AWS,Amazon Web Services}.")
12101 (license license:asl2.0)))
12102
12103 (define-public python-pyfiglet
12104 (package
12105 (name "python-pyfiglet")
12106 (version "0.8.post1")
12107 (source
12108 (origin
12109 (method url-fetch)
12110 (uri (pypi-uri "pyfiglet" version))
12111 (sha256
12112 (base32
12113 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12114 (build-system python-build-system)
12115 (home-page "https://github.com/pwaller/pyfiglet")
12116 (synopsis "Draw ASCII art big letters in Python")
12117 (description "This module lets you draw large letter from ordinary characters
12118 in pure Python.")
12119 (license license:expat)))
12120
12121 (define-public python-xdo
12122 (package
12123 (name "python-xdo")
12124 (version "0.3")
12125 (source (origin
12126 (method url-fetch)
12127 (uri (string-append
12128 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12129 "python-xdo_" version ".orig.tar.gz"))
12130 (sha256
12131 (base32
12132 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12133 (build-system python-build-system)
12134 (arguments
12135 '(#:phases
12136 (modify-phases %standard-phases
12137 (add-before 'install 'patch-libxdo-path
12138 ;; Hardcode the path of dynamically loaded libxdo library.
12139 (lambda* (#:key inputs #:allow-other-keys)
12140 (let ((libxdo (string-append
12141 (assoc-ref inputs "xdotool")
12142 "/lib/libxdo.so")))
12143 (substitute* "xdo/_xdo.py"
12144 (("find_library\\(\"xdo\"\\)")
12145 (simple-format #f "\"~a\"" libxdo)))
12146 #t))))
12147 #:tests? #f)) ; no tests provided
12148 (propagated-inputs
12149 `(("python-six" ,python-six)))
12150 (inputs
12151 `(("xdotool" ,xdotool)
12152 ("libX11" ,libx11)))
12153 (home-page "https://tracker.debian.org/pkg/python-xdo")
12154 (synopsis "Python library for simulating X11 keyboard/mouse input")
12155 (description "Provides bindings to libxdo for manipulating X11 via simulated
12156 input. (Note that this is mostly a legacy library; you may wish to look at
12157 python-xdo for newer bindings.)")
12158 (license license:bsd-3)))
12159
12160 (define-public python2-xdo
12161 (package-with-python2 python-xdo))
12162
12163 (define-public python-mako
12164 (package
12165 (name "python-mako")
12166 (version "1.1.3")
12167 (source
12168 (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "Mako" version))
12171 (sha256
12172 (base32
12173 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
12174 (build-system python-build-system)
12175 (arguments
12176 `(#:phases (modify-phases %standard-phases
12177 (replace 'check
12178 (lambda* (#:key tests? #:allow-other-keys)
12179 (if tests?
12180 (invoke "nosetests" "-v")
12181 (format #t "test suite not run~%"))
12182 #t)))))
12183 (propagated-inputs
12184 `(("python-markupsafe" ,python-markupsafe)))
12185 (native-inputs
12186 `(("python-mock" ,python-mock)
12187 ("python-nose" ,python-nose)))
12188 (home-page "https://www.makotemplates.org/")
12189 (synopsis "Templating language for Python")
12190 (description "Mako is a templating language for Python that compiles
12191 templates into Python modules.")
12192 (license license:expat)))
12193
12194 (define-public python2-mako
12195 (package-with-python2 python-mako))
12196
12197 (define-public python-waitress
12198 (package
12199 (name "python-waitress")
12200 (version "1.1.0")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "waitress" version))
12205 (patches (search-patches "python-waitress-fix-tests.patch"))
12206 (sha256
12207 (base32
12208 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12209 (build-system python-build-system)
12210 (home-page "https://github.com/Pylons/waitress")
12211 (synopsis "Waitress WSGI server")
12212 (description "Waitress is meant to be a production-quality pure-Python WSGI
12213 server with very acceptable performance.")
12214 (license license:zpl2.1)))
12215
12216 (define-public python2-waitress
12217 (package-with-python2 python-waitress))
12218
12219 (define-public python-whichcraft
12220 (package
12221 (name "python-whichcraft")
12222 (version "0.6.1")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "whichcraft" version))
12227 (sha256
12228 (base32
12229 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12230 (build-system python-build-system)
12231 (native-inputs
12232 `(("python-pytest" ,python-pytest)))
12233 (home-page "https://github.com/pydanny/whichcraft")
12234 (synopsis "Cross-platform cross-python shutil.which functionality")
12235 (description
12236 "This package provides a shim of the shutil.which function that's
12237 designed to work across multiple versions of Python.")
12238 (license license:bsd-3)))
12239
12240 (define-public python-cookiecutter
12241 (package
12242 (name "python-cookiecutter")
12243 (version "1.7.2")
12244 (source
12245 (origin
12246 (method url-fetch)
12247 (uri (pypi-uri "cookiecutter" version))
12248 (sha256
12249 (base32
12250 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
12251 (build-system python-build-system)
12252 (native-inputs
12253 `(("python-freezegun" ,python-freezegun)
12254 ("python-pytest" ,python-pytest)
12255 ("python-pytest-catchlog" ,python-pytest-catchlog)
12256 ("python-pytest-cov" ,python-pytest-cov)
12257 ("python-pytest-mock" ,python-pytest-mock)))
12258 (propagated-inputs
12259 `(("python-binaryornot" ,python-binaryornot)
12260 ("python-click" ,python-click)
12261 ("python-future" ,python-future)
12262 ("python-jinja2" ,python-jinja2)
12263 ("python-jinja2-time" ,python-jinja2-time)
12264 ("python-poyo" ,python-poyo)
12265 ("python-requests" ,python-requests)
12266 ("python-slugify" ,python-slugify)
12267 ("python-text-unidecode" ,python-text-unidecode)
12268 ("python-whichcraft" ,python-whichcraft)))
12269 (home-page "https://github.com/cookiecutter/cookiecutter")
12270 (synopsis
12271 "Command-line utility that creates projects from project templates")
12272 (description
12273 "This package provides a command-line utility that creates projects from
12274 project templates, e.g. creating a Python package project from a Python package
12275 project template.")
12276 (license license:bsd-3)))
12277
12278 (define-public python-pyquery
12279 (package
12280 (name "python-pyquery")
12281 (version "1.2.17")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "pyquery" version))
12286 (sha256
12287 (base32
12288 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12289 (build-system python-build-system)
12290 (native-inputs
12291 `(("python-webob" ,python-webob)
12292 ("python-webtest" ,python-webtest)))
12293 (propagated-inputs
12294 `(("python-lxml" ,python-lxml)
12295 ("python-cssselect" ,python-cssselect)))
12296 (home-page "https://github.com/gawel/pyquery")
12297 (synopsis "Make jQuery-like queries on xml documents")
12298 (description "pyquery allows you to make jQuery queries on xml documents.
12299 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12300 fast xml and html manipulation.")
12301 (license license:bsd-3)))
12302
12303 (define-public python-anyjson
12304 (package
12305 (name "python-anyjson")
12306 (version "0.3.3")
12307 (source
12308 (origin
12309 (method url-fetch)
12310 (uri (pypi-uri "anyjson" version))
12311 (sha256
12312 (base32
12313 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12314 (build-system python-build-system)
12315 (arguments
12316 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12317 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12318 ;; whatever) so this transformation needs to be done before the tests
12319 ;; can be run. Maybe we could add a build step to transform beforehand
12320 ;; but it could be annoying/difficult.
12321 ;; We can enable tests for the Python 2 version, though, and do below.
12322 #:tests? #f))
12323 (home-page "https://bitbucket.org/runeh/anyjson/")
12324 (synopsis
12325 "Wraps best available JSON implementation in a common interface")
12326 (description
12327 "Anyjson loads whichever is the fastest JSON module installed
12328 and provides a uniform API regardless of which JSON implementation is used.")
12329 (license license:bsd-3)
12330 (properties `((python2-variant . ,(delay python2-anyjson))))))
12331
12332 (define-public python2-anyjson
12333 (let ((anyjson (package-with-python2
12334 (strip-python2-variant python-anyjson))))
12335 (package/inherit anyjson
12336 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
12337 #:tests? #t
12338 ,@(package-arguments anyjson)))
12339 (native-inputs `(("python2-nose" ,python2-nose))))))
12340
12341 (define-public python-amqp
12342 (package
12343 (name "python-amqp")
12344 (version "2.3.2")
12345 (source
12346 (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "amqp" version))
12349 (sha256
12350 (base32
12351 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
12352 (build-system python-build-system)
12353 (native-inputs
12354 `(("python-case" ,python-case)
12355 ("python-pytest-sugar" ,python-pytest-sugar)
12356 ("python-mock" ,python-mock)))
12357 (propagated-inputs
12358 `(("python-vine" ,python-vine)))
12359 (home-page "https://github.com/celery/py-amqp")
12360 (synopsis
12361 "Low-level AMQP client for Python (fork of amqplib)")
12362 (description
12363 "This is a fork of amqplib which was originally written by Barry Pederson.
12364 It is maintained by the Celery project, and used by kombu as a pure python
12365 alternative when librabbitmq is not available.")
12366 (license license:lgpl2.1+)
12367 (properties `((python2-variant . ,(delay python2-amqp))))))
12368
12369 (define-public python2-amqp
12370 (let ((amqp (package-with-python2
12371 (strip-python2-variant python-amqp))))
12372 (package/inherit amqp
12373 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
12374 ;; unmaintained. Weirdly, does not do this on the python 3
12375 ;; version?
12376 #:tests? #f
12377 ,@(package-arguments amqp))))))
12378
12379 (define-public python-txamqp
12380 (package
12381 (name "python-txamqp")
12382 (version "0.8.2")
12383 (source
12384 (origin
12385 (method url-fetch)
12386 (uri (pypi-uri "txAMQP" version))
12387 (sha256
12388 (base32
12389 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
12390 (build-system python-build-system)
12391 (propagated-inputs
12392 `(("python-six" ,python-six)
12393 ("python-twisted" ,python-twisted)))
12394 (home-page "https://github.com/txamqp/txamqp")
12395 (synopsis "Communicate with AMQP peers and brokers using Twisted")
12396 (description
12397 "This package provides a Python library for communicating with AMQP peers
12398 and brokers using the asynchronous networking framework Twisted. It contains
12399 all the necessary code to connect, send and receive messages to/from an
12400 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
12401 also includes support for using Thrift RPC over AMQP in Twisted
12402 applications.")
12403 (license license:asl2.0)))
12404
12405 (define-public python2-txamqp
12406 (package-with-python2 python-txamqp))
12407
12408 (define-public python-kombu
12409 (package
12410 (name "python-kombu")
12411 (version "4.2.2")
12412 (source
12413 (origin
12414 (method url-fetch)
12415 (uri (pypi-uri "kombu" version))
12416 (sha256
12417 (base32
12418 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
12419 (build-system python-build-system)
12420 (native-inputs
12421 `(("python-mock" ,python-mock)
12422 ("python-case" ,python-case)
12423 ("python-pyro4" ,python-pyro4)
12424 ("python-pytest-sugar" ,python-pytest-sugar)
12425 ("python-pytz" ,python-pytz)))
12426 (propagated-inputs
12427 `(("python-anyjson" ,python-anyjson)
12428 ("python-amqp" ,python-amqp)
12429 ("python-redis" ,python-redis)))
12430 (home-page "https://kombu.readthedocs.io")
12431 (synopsis "Message passing library for Python")
12432 (description "The aim of Kombu is to make messaging in Python as easy as
12433 possible by providing an idiomatic high-level interface for the AMQ protocol,
12434 and also provide proven and tested solutions to common messaging problems.
12435 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
12436 message orientation, queuing, routing, reliability and security, for which the
12437 RabbitMQ messaging server is the most popular implementation.")
12438 (license license:bsd-3)
12439 (properties `((python2-variant . ,(delay python2-kombu))))))
12440
12441 (define-public python2-kombu
12442 (let ((kombu (package-with-python2
12443 (strip-python2-variant python-kombu))))
12444 (package/inherit kombu
12445 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
12446 ;; It works fine on the python3 variant.
12447 #:tests? #f
12448 ,@(package-arguments kombu)))
12449 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12450 ,@(package-native-inputs kombu))))))
12451
12452 (define-public python-billiard
12453 (package
12454 (name "python-billiard")
12455 (version "3.5.0.5")
12456 (source
12457 (origin
12458 (method url-fetch)
12459 (uri (pypi-uri "billiard" version))
12460 (sha256
12461 (base32
12462 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
12463 (build-system python-build-system)
12464 (native-inputs
12465 `(("python-case" ,python-case)
12466 ("python-pytest" ,python-pytest)))
12467 (home-page "https://github.com/celery/billiard")
12468 (synopsis
12469 "Python multiprocessing fork with improvements and bugfixes")
12470 (description
12471 "Billiard is a fork of the Python 2.7 multiprocessing package. The
12472 multiprocessing package itself is a renamed and updated version of R Oudkerk's
12473 pyprocessing package. This standalone variant is intended to be compatible with
12474 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
12475 (license license:bsd-3)
12476 (properties `((python2-variant . ,(delay python2-billiard))))))
12477
12478 (define-public python2-billiard
12479 (let ((billiard (package-with-python2
12480 (strip-python2-variant python-billiard))))
12481 (package/inherit billiard
12482 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12483 ("python2-mock" ,python2-mock)
12484 ,@(package-native-inputs billiard))))))
12485
12486 (define-public python-celery
12487 (package
12488 (name "python-celery")
12489 (version "4.2.1")
12490 (source
12491 (origin
12492 (method url-fetch)
12493 (uri (pypi-uri "celery" version))
12494 (sha256
12495 (base32
12496 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
12497 (build-system python-build-system)
12498 (arguments
12499 '(;; TODO The tests fail with Python 3.7
12500 ;; https://github.com/celery/celery/issues/4849
12501 #:tests? #f
12502 #:phases
12503 (modify-phases %standard-phases
12504 (add-after 'unpack 'patch-requirements
12505 (lambda _
12506 (substitute* "requirements/test.txt"
12507 (("pytest>=3\\.0,<3\\.3")
12508 "pytest>=3.0"))
12509 #t)))))
12510 (native-inputs
12511 `(("python-case" ,python-case)
12512 ("python-pytest" ,python-pytest)))
12513 (propagated-inputs
12514 `(("python-pytz" ,python-pytz)
12515 ("python-billiard" ,python-billiard)
12516 ("python-kombu" ,python-kombu)))
12517 (home-page "https://celeryproject.org")
12518 (synopsis "Distributed Task Queue")
12519 (description "Celery is an asynchronous task queue/job queue based on
12520 distributed message passing. It is focused on real-time operation, but
12521 supports scheduling as well. The execution units, called tasks, are executed
12522 concurrently on a single or more worker servers using multiprocessing,
12523 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
12524 synchronously (wait until ready).")
12525 (license license:bsd-3)
12526 (properties `((python2-variant . ,(delay python2-celery))))))
12527
12528 (define-public python2-celery
12529 (let ((celery (package-with-python2
12530 (strip-python2-variant python-celery))))
12531 (package/inherit celery
12532 (native-inputs `(("python2-unittest2" ,python2-unittest2)
12533 ("python2-mock" ,python2-mock)
12534 ,@(package-native-inputs celery))))))
12535
12536 (define-public python-translitcodec
12537 (package
12538 (name "python-translitcodec")
12539 (version "0.4.0")
12540 (source
12541 (origin
12542 (method url-fetch)
12543 (uri (pypi-uri "translitcodec" version))
12544 (sha256
12545 (base32
12546 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
12547 (build-system python-build-system)
12548 (arguments
12549 `(#:tests? #f)) ; no tests provided
12550 (home-page
12551 "https://github.com/claudep/translitcodec")
12552 (synopsis
12553 "Unicode to 8-bit charset transliteration codec")
12554 (description
12555 "This package contains codecs for transliterating ISO 10646 texts into
12556 best-effort representations using smaller coded character sets (ASCII,
12557 ISO 8859, etc.).")
12558 (license license:expat)))
12559
12560 (define-public python2-translitcodec
12561 (package-with-python2 python-translitcodec))
12562
12563 (define-public python-anyqt
12564 (package
12565 (name "python-anyqt")
12566 (version "0.0.11")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (pypi-uri "AnyQt" version))
12571 (sha256
12572 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
12573 (build-system python-build-system)
12574 (arguments
12575 `(#:tests? #f ;there are no tests
12576 #:phases
12577 (modify-phases %standard-phases
12578 (add-after 'unpack 'delete-files
12579 ;; Delete files related to other operating systems.
12580 (lambda _
12581 (delete-file "AnyQt/QtMacExtras.py")
12582 (delete-file "AnyQt/QtWinExtras.py")
12583 #t)))))
12584 (home-page "https://github.com/ales-erjavec/anyqt")
12585 (synopsis "PyQt4/PyQt5 compatibility layer")
12586 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
12587 (license license:gpl3)))
12588
12589 (define-public python-pyqtgraph
12590 (package
12591 (name "python-pyqtgraph")
12592 (version "0.12.1")
12593 (source
12594 (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "pyqtgraph" version))
12597 (sha256
12598 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
12599 (build-system python-build-system)
12600 (arguments
12601 `(#:phases
12602 (modify-phases %standard-phases
12603 (add-before 'check 'set-home-and-qpa
12604 (lambda _
12605 (setenv "HOME" "/tmp")
12606 (setenv "QT_QPA_PLATFORM" "offscreen")
12607 #t))
12608 (replace 'check
12609 (lambda* (#:key inputs outputs #:allow-other-keys)
12610 (add-installed-pythonpath inputs outputs)
12611 (invoke "pytest" "-vv" "-k"
12612 ;; These tests try to download online data.
12613 (string-append "not test_PolyLineROI"
12614 " and not test_getArrayRegion_axisorder"
12615 " and not test_getArrayRegion"
12616 " and not test_PlotCurveItem"
12617 " and not test_NonUniformImage_colormap"
12618 " and not test_NonUniformImage_lut"
12619 " and not test_ImageItem_axisorder"
12620 " and not test_ImageItem")))))))
12621 (native-inputs
12622 `(("python-pytest" ,python-pytest)
12623 ("python-pytest-cov" ,python-pytest-cov)
12624 ("python-pytest-xdist" ,python-pytest-xdist)))
12625 (inputs
12626 `(("qtbase" ,qtbase)))
12627 (propagated-inputs
12628 `(("python-h5py" ,python-h5py)
12629 ("python-numpy" ,python-numpy)
12630 ("python-pyopengl" ,python-pyopengl)
12631 ("python-scipy" ,python-scipy)
12632 ("python-pyqt" ,python-pyqt)))
12633 (home-page "http://www.pyqtgraph.org")
12634 (synopsis "Scientific graphics and GUI library for Python")
12635 (description
12636 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
12637 and PySide6. It is intended for use in mathematics, scientific or engineering
12638 applications.")
12639 (license license:expat)))
12640
12641 (define-public python-qasync
12642 (package
12643 (name "python-qasync")
12644 (version "0.15.0")
12645 (source
12646 (origin
12647 ;; There are no tests in the PyPI tarball.
12648 (method git-fetch)
12649 (uri (git-reference
12650 (url "https://github.com/CabbageDevelopment/qasync/")
12651 (commit (string-append "v" version))))
12652 (file-name (git-file-name name version))
12653 (sha256
12654 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
12655 (build-system python-build-system)
12656 (arguments
12657 `(#:test-target "pytest"
12658 #:phases
12659 (modify-phases %standard-phases
12660 (add-before 'check 'set-qpa
12661 (lambda _
12662 (setenv "QT_QPA_PLATFORM" "offscreen")
12663 #t)))))
12664 (native-inputs
12665 `(("python-pytest" ,python-pytest)
12666 ("python-pytest-runner" ,python-pytest-runner)))
12667 (propagated-inputs
12668 `(("python-pyqt" ,python-pyqt)))
12669 (home-page "https://github.com/CabbageDevelopment/qasync")
12670 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
12671 (description
12672 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
12673 by providing an implementation of the PEP 3156 event-loop.")
12674 (license license:bsd-2)))
12675
12676 (define-public python-editor
12677 (package
12678 (name "python-editor")
12679 (version "1.0.4")
12680 (source
12681 (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "python-editor" version))
12684 (sha256
12685 (base32
12686 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
12687 (build-system python-build-system)
12688 (arguments
12689 '(#:tests? #f)) ;XXX: needs a TTY and an editor
12690 (home-page "https://github.com/fmoo/python-editor")
12691 (synopsis "Programmatically open an editor, capture the result")
12692 (description
12693 "python-editor is a library that provides the editor module for
12694 programmatically interfacing with your system's $EDITOR.")
12695 (license license:asl2.0)))
12696
12697 (define-public python2-editor
12698 (package-with-python2 python-editor))
12699
12700 (define-public python-multiprocessing-logging
12701 (package
12702 (name "python-multiprocessing-logging")
12703 (version "0.3.1")
12704 (home-page "https://github.com/jruere/multiprocessing-logging")
12705 (source (origin
12706 (method git-fetch)
12707 (uri (git-reference
12708 (url home-page)
12709 (commit (string-append "v" version))))
12710 (file-name (git-file-name name version))
12711 (sha256
12712 (base32
12713 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
12714 (build-system python-build-system)
12715 (synopsis "Manage logs from multiple processes")
12716 (description
12717 "This Python module implements a multiprocessing-aware @code{Handler}
12718 that, when set on the root @code{Logger}, will tunnel log records to the
12719 main process so that they are handled correctly.")
12720 (license license:lgpl3+)))
12721
12722 (define-public python-vobject
12723 (package
12724 (name "python-vobject")
12725 (version "0.9.6.1")
12726 (source (origin
12727 (method url-fetch)
12728 (uri (pypi-uri "vobject" version))
12729 (sha256
12730 (base32
12731 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
12732 (build-system python-build-system)
12733 (arguments
12734 '(;; The test suite relies on some non-portable Windows interfaces.
12735 #:tests? #f))
12736 (propagated-inputs
12737 `(("python-dateutil" ,python-dateutil)
12738 ("python-pyicu" ,python-pyicu)))
12739 (synopsis "Parse and generate vCard and vCalendar files")
12740 (description "Vobject is intended to be a full featured Python package for
12741 parsing and generating vCard and vCalendar files. Currently, iCalendar files
12742 are supported and well tested. vCard 3.0 files are supported, and all data
12743 should be imported, but only a few components are understood in a sophisticated
12744 way.")
12745 (home-page "https://eventable.github.io/vobject/")
12746 (license license:asl2.0)))
12747
12748 (define-public python2-vobject
12749 (package-with-python2 python-vobject))
12750
12751 (define-public python-munkres
12752 (package
12753 (name "python-munkres")
12754 (version "1.0.8")
12755 (source (origin
12756 (method url-fetch)
12757 (uri (pypi-uri "munkres" version))
12758 (sha256
12759 (base32
12760 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
12761 (build-system python-build-system)
12762 (arguments
12763 '(#:tests? #f)) ; no test suite
12764 (home-page "https://software.clapper.org/munkres/")
12765 (synopsis "Implementation of the Munkres algorithm")
12766 (description "The Munkres module provides an implementation of the Munkres
12767 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
12768 useful for solving the Assignment Problem.")
12769 (license license:bsd-3)))
12770
12771 (define-public python2-munkres
12772 (package-with-python2 python-munkres))
12773
12774 (define-public python-whoosh
12775 (package
12776 (name "python-whoosh")
12777 (version "2.7.4")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "Whoosh" version))
12782 (sha256
12783 (base32
12784 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
12785 (build-system python-build-system)
12786 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
12787 (native-inputs
12788 `(("python-pytest" ,python-pytest)))
12789 (home-page "https://bitbucket.org/mchaput/whoosh")
12790 (synopsis "Full text indexing, search, and spell checking library")
12791 (description
12792 "Whoosh is a fast, pure-Python full text indexing, search, and spell
12793 checking library.")
12794 (license license:bsd-2)))
12795
12796 (define-public python2-whoosh
12797 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
12798 (package/inherit whoosh
12799 (propagated-inputs
12800 `(("python2-backport-ssl-match-hostname"
12801 ,python2-backport-ssl-match-hostname)
12802 ,@(package-propagated-inputs whoosh))))))
12803
12804 (define-public python-pathlib
12805 (package
12806 (name "python-pathlib")
12807 (version "1.0.1")
12808 (source (origin
12809 (method url-fetch)
12810 (uri (pypi-uri "pathlib" version))
12811 (sha256
12812 (base32
12813 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
12814 (build-system python-build-system)
12815 ;; The tests depend on the internal "test" module, which does not provide
12816 ;; a stable interface.
12817 (arguments `(#:tests? #f))
12818 (home-page "https://pathlib.readthedocs.org/")
12819 (synopsis "Object-oriented file system paths")
12820 (description "Pathlib offers a set of classes to handle file system paths.
12821 It offers the following advantages over using string objects:
12822
12823 @enumerate
12824 @item No more cumbersome use of os and os.path functions. Everything can
12825 be done easily through operators, attribute accesses, and method calls.
12826 @item Embodies the semantics of different path types. For example,
12827 comparing Windows paths ignores casing.
12828 @item Well-defined semantics, eliminating any inconsistencies or
12829 ambiguities (forward vs. backward slashes, etc.).
12830 @end enumerate
12831
12832 Note: In Python 3.4, pathlib is now part of the standard library. For other
12833 Python versions please consider python-pathlib2 instead, which tracks the
12834 standard library module. This module (python-pathlib) isn't maintained
12835 anymore.")
12836 (license license:expat)))
12837
12838 (define-public python2-pathlib
12839 (package-with-python2 python-pathlib))
12840
12841 (define-public python2-pathlib2
12842 (package
12843 (name "python2-pathlib2")
12844 (version "2.3.5")
12845 (source (origin
12846 (method url-fetch)
12847 (uri (pypi-uri "pathlib2" version))
12848 (sha256
12849 (base32
12850 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
12851 (build-system python-build-system)
12852 ;; We only need the the Python 2 variant, since for Python 3 our minimum
12853 ;; version is 3.4 which already includes this package as part of the
12854 ;; standard library.
12855 (arguments
12856 `(#:python ,python-2))
12857 (propagated-inputs
12858 `(("python2-scandir" ,python2-scandir)
12859 ("python2-six" ,python2-six)))
12860 (home-page "https://pypi.org/project/pathlib2/")
12861 (synopsis "Object-oriented file system paths - backport of standard
12862 pathlib module")
12863 (description "The goal of pathlib2 is to provide a backport of standard
12864 pathlib module which tracks the standard library module, so all the newest
12865 features of the standard pathlib can be used also on older Python versions.
12866
12867 Pathlib offers a set of classes to handle file system paths. It offers the
12868 following advantages over using string objects:
12869
12870 @enumerate
12871 @item No more cumbersome use of os and os.path functions. Everything can
12872 be done easily through operators, attribute accesses, and method calls.
12873 @item Embodies the semantics of different path types. For example,
12874 comparing Windows paths ignores casing.
12875 @item Well-defined semantics, eliminating any inconsistencies or
12876 ambiguities (forward vs. backward slashes, etc.).
12877 @end enumerate")
12878 (license license:expat)))
12879
12880 (define-public python2-pathlib2-bootstrap
12881 (hidden-package
12882 (package
12883 (inherit python2-pathlib2)
12884 (name "python2-pathlib2-bootstrap")
12885 (propagated-inputs
12886 `(("python2-scandir" ,python2-scandir)
12887 ("python2-six" ,python2-six-bootstrap))))))
12888
12889 (define-public python-jellyfish
12890 (package
12891 (name "python-jellyfish")
12892 (version "0.5.6")
12893 (source (origin
12894 (method url-fetch)
12895 (uri (pypi-uri "jellyfish" version))
12896 (sha256
12897 (base32
12898 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12899 (build-system python-build-system)
12900 (native-inputs
12901 `(("python-pytest" ,python-pytest)))
12902 (home-page "https://github.com/jamesturk/jellyfish")
12903 (synopsis "Approximate and phonetic matching of strings")
12904 (description "Jellyfish uses a variety of string comparison and phonetic
12905 encoding algorithms to do fuzzy string matching.")
12906 (license license:bsd-2)
12907 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12908
12909 (define-public python2-jellyfish
12910 (let ((jellyfish (package-with-python2
12911 (strip-python2-variant python-jellyfish))))
12912 (package/inherit jellyfish
12913 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12914 ,@(package-native-inputs jellyfish))))))
12915
12916 (define-public python2-unicodecsv
12917 (package
12918 (name "python2-unicodecsv")
12919 (version "0.14.1")
12920 (source (origin
12921 (method git-fetch)
12922 ;; The test suite is not included in the PyPi release.
12923 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12924 (uri (git-reference
12925 (url "https://github.com/jdunck/python-unicodecsv")
12926 (commit version)))
12927 (file-name (git-file-name name version))
12928 (sha256
12929 (base32
12930 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12931 (build-system python-build-system)
12932 (arguments
12933 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12934 #:python ,python-2))
12935 (native-inputs
12936 `(("python2-unittest2" ,python2-unittest2)))
12937 (home-page "https://github.com/jdunck/python-unicodecsv")
12938 (synopsis "Unicode CSV module for Python 2")
12939 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12940 module, adding support for Unicode strings.")
12941 (license license:bsd-2)))
12942
12943 (define-public python-pdfminer-six
12944 (package
12945 (name "python-pdfminer-six")
12946 (version "20201018")
12947 ;; There are no tests in the PyPI tarball.
12948 (source
12949 (origin
12950 (method git-fetch)
12951 (uri (git-reference
12952 (url "https://github.com/pdfminer/pdfminer.six")
12953 (commit version)))
12954 (file-name (git-file-name name version))
12955 (sha256
12956 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
12957 (build-system python-build-system)
12958 (arguments
12959 `(#:phases
12960 (modify-phases %standard-phases
12961 ;; Tests write to the source tree.
12962 (add-after 'unpack 'make-git-checkout-writable
12963 (lambda _
12964 (for-each make-file-writable (find-files "."))
12965 #t))
12966 (replace 'check
12967 (lambda _
12968 (invoke "make" "test")))
12969 (add-before 'reset-gzip-timestamps 'make-files-writable
12970 (lambda* (#:key outputs #:allow-other-keys)
12971 (let ((out (assoc-ref outputs "out")))
12972 (for-each make-file-writable
12973 (find-files out "\\.gz$"))
12974 #t))))))
12975 (propagated-inputs
12976 `(("python-chardet" ,python-chardet)
12977 ("python-cryptography" ,python-cryptography)
12978 ("python-sortedcontainers" ,python-sortedcontainers)))
12979 (native-inputs
12980 `(("python-nose" ,python-nose)
12981 ("python-tox" ,python-tox)))
12982 (home-page "https://github.com/pdfminer/pdfminer.six")
12983 (synopsis "PDF parser and analyzer")
12984 (description "@code{pdfminer.six} is a community maintained fork of
12985 the original PDFMiner. It is a tool for extracting information from PDF
12986 documents. It focuses on getting and analyzing text data. Pdfminer.six
12987 extracts the text from a page directly from the sourcecode of the PDF. It
12988 can also be used to get the exact location, font or color of the text.")
12989 (license license:expat)))
12990
12991 (define-public python-rarfile
12992 (package
12993 (name "python-rarfile")
12994 (version "2.8")
12995 (source (origin
12996 (method url-fetch)
12997 (uri (pypi-uri "rarfile" version))
12998 (sha256
12999 (base32
13000 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
13001 (build-system python-build-system)
13002 (arguments
13003 '(#:phases
13004 (modify-phases %standard-phases
13005 (replace 'check
13006 ;; Many tests fail, but the installation proceeds.
13007 (lambda _ (invoke "make" "-C" "test" "test"))))))
13008 (native-inputs
13009 `(("which" ,which))) ; required for tests
13010 (propagated-inputs
13011 `(("libarchive" ,libarchive)))
13012 (home-page "https://github.com/markokr/rarfile")
13013 (synopsis "RAR archive reader for Python")
13014 (description "This is Python module for RAR archive reading. The interface
13015 is made as zipfile like as possible.")
13016 (license license:isc)))
13017
13018 (define-public python2-rarfile
13019 (package-with-python2 python-rarfile))
13020
13021 (define-public python-magic
13022 (package
13023 (name "python-magic")
13024 (version "0.4.15")
13025 (source
13026 (origin
13027 (method url-fetch)
13028 (uri (pypi-uri "python-magic" version))
13029 (sha256
13030 (base32
13031 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
13032 (file-name (string-append name "-" version "-checkout"))))
13033 (build-system python-build-system)
13034 (arguments
13035 ;; The tests are unreliable, so don't run them. The tests fail
13036 ;; under Python3 because they were written for Python2 and
13037 ;; contain import statements that do not work in Python3. One of
13038 ;; the tests fails under Python2 because its assertions are
13039 ;; overly stringent; it relies on comparing output strings which
13040 ;; are brittle and can change depending on the version of
13041 ;; libmagic being used and the system on which the test is
13042 ;; running. In my case, under GuixSD 0.10.0, only one test
13043 ;; failed, and it seems to have failed only because the version
13044 ;; of libmagic that is packaged in Guix outputs a slightly
13045 ;; different (but not wrong) string than the one that the test
13046 ;; expected.
13047 '(#:tests? #f
13048 #:phases (modify-phases %standard-phases
13049 ;; Replace a specific method call with a hard-coded
13050 ;; path to the necessary libmagic.so file in the
13051 ;; store. If we don't do this, then the method call
13052 ;; will fail to find the libmagic.so file, which in
13053 ;; turn will cause any application using
13054 ;; python-magic to fail.
13055 (add-before 'build 'hard-code-path-to-libmagic
13056 (lambda* (#:key inputs #:allow-other-keys)
13057 (let ((file (assoc-ref inputs "file")))
13058 (substitute* "magic.py"
13059 (("ctypes.util.find_library\\('magic'\\)")
13060 (string-append "'" file "/lib/libmagic.so'")))
13061 #t)))
13062 (add-before 'install 'disable-egg-compression
13063 (lambda _
13064 (let ((port (open-file "setup.cfg" "a")))
13065 (display "\n[easy_install]\nzip_ok = 0\n"
13066 port)
13067 (close-port port)
13068 #t))))))
13069 (inputs
13070 ;; python-magic needs to be able to find libmagic.so.
13071 `(("file" ,file)))
13072 (home-page
13073 "https://github.com/ahupp/python-magic")
13074 (synopsis
13075 "File type identification using libmagic")
13076 (description
13077 "This module uses ctypes to access the libmagic file type
13078 identification library. It makes use of the local magic database and
13079 supports both textual and MIME-type output. Note that this module and
13080 the python-file module both provide a \"magic.py\" file; these two
13081 modules, which are different and were developed separately, both serve
13082 the same purpose: to provide Python bindings for libmagic.")
13083 (license license:expat)))
13084
13085 (define-public python2-magic
13086 (package-with-python2 python-magic))
13087
13088 (define-public python2-s3cmd
13089 (package
13090 (name "python2-s3cmd")
13091 (version "1.6.1")
13092 (source
13093 (origin
13094 (method url-fetch)
13095 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
13096 "s3cmd-" version ".tar.gz"))
13097 (sha256
13098 (base32
13099 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
13100 (build-system python-build-system)
13101 (arguments
13102 ;; s3cmd is written for python2 only and contains no tests.
13103 `(#:python ,python-2
13104 #:tests? #f))
13105 (propagated-inputs
13106 `(("python2-dateutil" ,python2-dateutil)
13107 ;; The python-file package also provides a magic.py module.
13108 ;; This is an unfortunate state of affairs; however, s3cmd
13109 ;; fails to install if it cannot find specifically the
13110 ;; python-magic package. Thus we include it, instead of using
13111 ;; python-file. Ironically, s3cmd sometimes works better
13112 ;; without libmagic bindings at all:
13113 ;; https://github.com/s3tools/s3cmd/issues/198
13114 ("python2-magic" ,python2-magic)))
13115 (home-page "https://s3tools.org/s3cmd")
13116 (synopsis "Command line tool for S3-compatible storage services")
13117 (description
13118 "S3cmd is a command line tool for uploading, retrieving and managing data
13119 in storage services that are compatible with the Amazon Simple Storage
13120 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13121 GnuPG encryption, and more. It also supports management of Amazon's
13122 CloudFront content delivery network.")
13123 (license license:gpl2+)))
13124
13125 (define-public python-pkgconfig
13126 (package
13127 (name "python-pkgconfig")
13128 (version "1.3.1")
13129 (source
13130 (origin
13131 (method url-fetch)
13132 (uri (pypi-uri "pkgconfig" version))
13133 (sha256
13134 (base32
13135 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
13136 (build-system python-build-system)
13137 (native-inputs
13138 `(("python-nose" ,python-nose)))
13139 (inputs
13140 `(("pkg-config" ,pkg-config)))
13141 (arguments
13142 `(#:phases
13143 (modify-phases %standard-phases
13144 (add-before 'build 'patch
13145 ;; Hard-code the path to pkg-config.
13146 (lambda _
13147 (substitute* "pkgconfig/pkgconfig.py"
13148 (("cmd = 'pkg-config")
13149 (string-append "cmd = '" (which "pkg-config"))))
13150 #t))
13151 (replace 'check
13152 (lambda _
13153 (invoke "nosetests" "test.py"))))))
13154 (home-page "https://github.com/matze/pkgconfig")
13155 (synopsis "Python interface for pkg-config")
13156 (description "This module provides a Python interface to pkg-config. It
13157 can be used to find all pkg-config packages, check if a package exists,
13158 check if a package meets certain version requirements, query CFLAGS and
13159 LDFLAGS and parse the output to build extensions with setup.py.")
13160 (license license:expat)))
13161
13162 (define-public python2-pkgconfig
13163 (package-with-python2 python-pkgconfig))
13164
13165 (define-public python-bz2file
13166 (package
13167 (name "python-bz2file")
13168 (version "0.98")
13169 (source
13170 (origin
13171 (method url-fetch)
13172 (uri (pypi-uri "bz2file" version))
13173 (sha256
13174 (base32
13175 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
13176 (build-system python-build-system)
13177 (arguments
13178 `(#:tests? #f)) ; Tests use deprecated python modules.
13179 (home-page "https://github.com/nvawda/bz2file")
13180 (synopsis "Read and write bzip2-compressed files")
13181 (description
13182 "Bz2file is a Python library for reading and writing bzip2-compressed
13183 files. It contains a drop-in replacement for the I/O interface in the
13184 standard library's @code{bz2} module, including features from the latest
13185 development version of CPython that are not available in older releases.")
13186 (license license:asl2.0)))
13187
13188 (define-public python2-bz2file
13189 (package-with-python2 python-bz2file))
13190
13191 (define-public python-future
13192 (package
13193 (name "python-future")
13194 (version "0.17.1")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "future" version))
13199 (sha256
13200 (base32
13201 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
13202 (build-system python-build-system)
13203 ;; Many tests connect to the network or are otherwise flawed.
13204 ;; https://github.com/PythonCharmers/python-future/issues/210
13205 (arguments
13206 `(#:tests? #f))
13207 (home-page "https://python-future.org")
13208 (synopsis "Single-source support for Python 3 and 2")
13209 (description
13210 "@code{python-future} is the missing compatibility layer between Python 2 and
13211 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
13212 to support both Python 2 and Python 3 with minimal overhead.")
13213 (license license:expat)))
13214
13215 (define-public python2-future
13216 (package-with-python2 python-future))
13217
13218 (define-public python-cysignals
13219 (package
13220 (name "python-cysignals")
13221 (version "1.9.0")
13222 (source
13223 (origin
13224 (method url-fetch)
13225 (uri (pypi-uri "cysignals" version))
13226 (sha256
13227 (base32
13228 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
13229 (build-system python-build-system)
13230 (native-inputs
13231 `(("python-cython" ,python-cython)
13232 ("python-sphinx" ,python-sphinx)))
13233 (inputs
13234 `(("pari-gp" ,pari-gp)))
13235 (arguments
13236 `(#:modules ((guix build python-build-system)
13237 ((guix build gnu-build-system) #:prefix gnu:)
13238 (guix build utils))
13239 ;; FIXME: Tests are executed after installation and currently fail
13240 ;; when not installing into standard locations; the author is working
13241 ;; on a fix.
13242 #:tests? #f
13243 #:phases
13244 (modify-phases %standard-phases
13245 (add-before
13246 'build 'configure
13247 (assoc-ref gnu:%standard-phases 'configure)))))
13248 (home-page
13249 "https://github.com/sagemath/cysignals")
13250 (synopsis
13251 "Handling of interrupts and signals for Cython")
13252 (description
13253 "The cysignals package provides mechanisms to handle interrupts (and
13254 other signals and errors) in Cython code, using two related approaches,
13255 for mixed Cython/Python code or external C libraries and pure Cython code,
13256 respectively.")
13257 (license license:lgpl3+)))
13258
13259 (define-public python2-cysignals
13260 (package-with-python2 python-cysignals))
13261
13262 (define-public python2-shedskin
13263 (package
13264 (name "python2-shedskin")
13265 (version "0.9.4")
13266 (source
13267 (origin
13268 (method url-fetch)
13269 (uri (string-append "https://github.com/shedskin/shedskin/"
13270 "releases/download/v" version
13271 "/shedskin-" version ".tgz"))
13272 (sha256
13273 (base32
13274 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
13275 (build-system python-build-system)
13276 (arguments
13277 `(#:python ,python-2
13278 #:phases (modify-phases %standard-phases
13279 (add-after 'unpack 'fix-resulting-include-libs
13280 (lambda* (#:key inputs #:allow-other-keys)
13281 (let ((libgc (assoc-ref inputs "libgc"))
13282 (pcre (assoc-ref inputs "pcre")))
13283 (substitute* "shedskin/makefile.py"
13284 (("variable == 'CCFLAGS':[ ]*")
13285 (string-append "variable == 'CCFLAGS':\n"
13286 " line += ' -I " pcre "/include"
13287 " -I " libgc "/include'"))
13288 (("variable == 'LFLAGS':[ ]*")
13289 (string-append "variable == 'LFLAGS':\n"
13290 " line += ' -L" pcre "/lib"
13291 " -L " libgc "/lib'")))
13292 #t))))))
13293 (inputs `(("pcre" ,pcre)
13294 ("libgc" ,libgc)))
13295 (home-page "https://shedskin.github.io/")
13296 (synopsis "Experimental Python-2 to C++ Compiler")
13297 (description (string-append "This is an experimental compiler for a subset of
13298 Python. It generates C++ code and a Makefile."))
13299 (license (list license:gpl3 license:bsd-3 license:expat))))
13300
13301 (define-public python2-rope
13302 (package
13303 (name "python2-rope")
13304 (version "0.11.0")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 (uri (pypi-uri "rope" version))
13309 (sha256
13310 (base32
13311 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
13312 (arguments
13313 ;; Rope has only partial python3 support, see `python-rope'
13314 `(#:python ,python-2))
13315 (build-system python-build-system)
13316 (native-inputs
13317 `(("python2-unittest2" ,python2-unittest2)))
13318 (home-page "https://github.com/python-rope/rope")
13319 (synopsis "Refactoring library for Python")
13320 (description "Rope is a refactoring library for Python. It facilitates
13321 the renaming, moving and extracting of attributes, functions, modules, fields
13322 and parameters in Python 2 source code. These refactorings can also be applied
13323 to occurrences in strings and comments.")
13324 (license license:gpl2)))
13325
13326 (define-public python-rope
13327 (package/inherit python2-rope
13328 (name "python-rope")
13329 (arguments `(#:python ,python-wrapper
13330 ;; XXX: Only partial python3 support, results in some failing
13331 ;; tests: <https://github.com/python-rope/rope/issues/247>.
13332 #:tests? #f))
13333 (properties `((python2-variant . ,(delay python2-rope))))))
13334
13335 (define-public python-py3status
13336 (package
13337 (name "python-py3status")
13338 (version "3.21")
13339 (source
13340 (origin
13341 (method url-fetch)
13342 (uri (pypi-uri "py3status" version))
13343 (sha256
13344 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
13345 (build-system python-build-system)
13346 (inputs
13347 `(("file" ,file)))
13348 (arguments
13349 '(#:phases
13350 (modify-phases %standard-phases
13351 ;; 'file' is used for detection of configuration file encoding
13352 ;; let's make link the dependency to particular input
13353 (add-before 'build 'patch-file-path
13354 (lambda* (#:key inputs #:allow-other-keys)
13355 (let ((file-path (assoc-ref inputs "file")))
13356 (substitute* "py3status/parse_config.py"
13357 (("\\[\"file\", \"-b\"")
13358 (string-append "['" file-path "/bin/file', '-b'")))
13359 #t))))
13360 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
13361 (home-page "https://github.com/ultrabug/py3status")
13362 (synopsis "Extensible i3status wrapper written in Python")
13363 (description "py3status is an i3status wrapper which extends i3status
13364 functionality in a modular way, allowing you to extend your panel with your
13365 own code, responding to click events and updating clock every second.")
13366 (license license:bsd-3)))
13367
13368 (define-public python2-selectors2
13369 (package
13370 (name "python2-selectors2")
13371 (version "2.0.1")
13372 (source (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "selectors2" version))
13375 (sha256
13376 (base32
13377 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
13378 (build-system python-build-system)
13379 (arguments
13380 `(#:python ,python-2))
13381 (native-inputs
13382 `(("python2-mock" ,python2-mock)
13383 ("python2-psutil" ,python2-psutil)))
13384 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
13385 (synopsis "Backport of the selectors module from Python 3.5+")
13386 (description
13387 "This package provides a drop-in replacement for the @code{selectors}
13388 module in Python 3.5 and later.")
13389 (license license:expat)))
13390
13391 (define-public python-tblib
13392 (package
13393 (name "python-tblib")
13394 (version "1.6.0")
13395 (source (origin
13396 (method url-fetch)
13397 (uri (pypi-uri "tblib" version))
13398 (sha256
13399 (base32
13400 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
13401 (build-system python-build-system)
13402 (arguments
13403 `(#:phases
13404 (modify-phases %standard-phases
13405 (replace 'check
13406 (lambda _
13407 ;; Upstream runs tests after installation and the package itself
13408 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
13409 ;; found.
13410 (setenv "PYTHONPATH"
13411 (string-append (getcwd) "/build/lib:"
13412 (getenv "PYTHONPATH")))
13413 (invoke "py.test" "-vv" "tests" "README.rst"))))))
13414 (native-inputs
13415 `(("python-pytest" ,python-pytest)
13416 ("python-six" ,python-six)))
13417 (home-page "https://github.com/ionelmc/python-tblib")
13418 (synopsis "Traceback serialization library")
13419 (description
13420 "Traceback serialization allows you to:
13421
13422 @enumerate
13423 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
13424 different processes. This allows better error handling when running code over
13425 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
13426
13427 @item Parse traceback strings and raise with the parsed tracebacks.
13428 @end enumerate\n")
13429 (license license:bsd-3)))
13430
13431 (define-public python2-tblib
13432 (package-with-python2 python-tblib))
13433
13434 (define-public python-greenlet
13435 (package
13436 (name "python-greenlet")
13437 (version "1.0.0")
13438 (source (origin
13439 (method url-fetch)
13440 (uri (pypi-uri "greenlet" version))
13441 (sha256
13442 (base32
13443 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
13444 (build-system python-build-system)
13445 (home-page "https://greenlet.readthedocs.io/")
13446 (synopsis "Lightweight in-process concurrent programming")
13447 (description
13448 "Greenlet package is a spin-off of Stackless, a version of CPython
13449 that supports micro-threads called \"tasklets\". Tasklets run
13450 pseudo-concurrently (typically in a single or a few OS-level threads) and
13451 are synchronized with data exchanges on \"channels\".")
13452 (license (list license:psfl license:expat))))
13453
13454 (define-public python-objgraph
13455 (package
13456 (name "python-objgraph")
13457 (version "3.4.1")
13458 (source
13459 (origin
13460 (method url-fetch)
13461 (uri (pypi-uri "objgraph" version))
13462 (sha256
13463 (base32
13464 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
13465 (build-system python-build-system)
13466 (propagated-inputs
13467 `(("python-graphviz" ,python-graphviz)))
13468 (native-inputs
13469 `(("python-mock" ,python-mock)
13470 ("graphviz" ,graphviz)))
13471 (home-page "https://mg.pov.lt/objgraph/")
13472 (synopsis "Draw Python object reference graphs with graphviz")
13473 (description
13474 "This package provides tools to draw Python object reference graphs with
13475 graphviz.")
13476 (license license:expat)))
13477
13478 (define-public python2-objgraph
13479 (package-with-python2 python-objgraph))
13480
13481 (define-public python-gevent
13482 (package
13483 (name "python-gevent")
13484 (version "21.1.2")
13485 (source (origin
13486 (method url-fetch)
13487 (uri (pypi-uri "gevent" version))
13488 (sha256
13489 (base32
13490 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
13491 (modules '((guix build utils)))
13492 (snippet
13493 '(begin
13494 ;; unbunding libev and c-ares
13495 (delete-file-recursively "deps")))))
13496 (build-system python-build-system)
13497 (arguments
13498 `(#:modules ((ice-9 ftw)
13499 (ice-9 match)
13500 (srfi srfi-26)
13501 (guix build utils)
13502 (guix build python-build-system))
13503 #:phases (modify-phases %standard-phases
13504 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
13505 (lambda _
13506 (substitute* "src/gevent/subprocess.py"
13507 (("/bin/sh") (which "sh")))
13508 (for-each (lambda (file)
13509 (substitute* file
13510 (("/bin/sh") (which "sh"))
13511 (("/bin/true") (which "true"))))
13512 (find-files "src/greentest" "\\.py$"))))
13513 (add-before 'build 'do-not-use-bundled-sources
13514 (lambda _
13515 (setenv "GEVENTSETUP_EMBED" "0")
13516
13517 ;; Prevent building bundled libev.
13518 (substitute* "setup.py"
13519 (("run_make=_BUILDING")
13520 "run_make=False"))))
13521 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
13522 (lambda* (#:key inputs #:allow-other-keys)
13523 (let ((greenlet (string-append
13524 (assoc-ref inputs "python-greenlet")
13525 "/include")))
13526 (match (scandir greenlet
13527 (lambda (item)
13528 (string-prefix? "python" item)))
13529 ((python)
13530 (setenv "C_INCLUDE_PATH"
13531 (string-append greenlet "/" python ":"
13532 (or (getenv "C_INCLUDE_PATH")
13533 ""))))))))
13534 (add-before 'check 'pretend-to-be-CI
13535 (lambda _
13536 ;; A few tests are skipped due to network constraints or
13537 ;; get longer timeouts when running in a CI environment.
13538 ;; Piggy-back on that, as we need the same adjustments.
13539 (setenv "TRAVIS" "1")
13540 (setenv "APPVEYOR" "1")))
13541 (add-before 'check 'adjust-tests
13542 (lambda _
13543 (let ((disabled-tests
13544 '(;; These tests relies on networking which is
13545 ;; not available in the build container.
13546 "test__getaddrinfo_import.py"
13547 "test__server_pywsgi.py"
13548 ;; XXX: These tests borrow functionality from the
13549 ;; Python builtin 'test' module, but it is not
13550 ;; installed with the Guix Python distribution.
13551 "test_smtpd.py"
13552 "test_wsgiref.py"
13553 "test_urllib2.py"
13554 "test_thread.py"
13555 "test_threading.py"
13556 "test__threading_2.py"
13557 ;; These tests rely on KeyboardInterrupts which do not
13558 ;; work inside the build container for some reason
13559 ;; (lack of controlling terminal?).
13560 "test_subprocess.py"
13561 "test__issues461_471.py"
13562 ;; TODO: Patch out the tests that use getprotobyname, etc
13563 ;; instead of disabling all the tests from these files.
13564 "test__resolver_dnspython.py"
13565 "test__doctests.py"
13566 "test__all__.py"
13567 "test___config.py"
13568 "test__execmodules.py")))
13569 (call-with-output-file "skipped_tests.txt"
13570 (lambda (port)
13571 (format port "~a~%"
13572 (string-join disabled-tests "\n")))))))
13573 (replace 'check
13574 (lambda _
13575 ;; Make sure the build directory is on PYTHONPATH.
13576 (setenv "PYTHONPATH"
13577 (string-append
13578 (getenv "PYTHONPATH") ":"
13579 (getcwd) "/build/"
13580 (car (scandir "build" (cut string-prefix? "lib." <>)))))
13581
13582 ;; Use the build daemons configured number of workers.
13583 (setenv "NWORKERS" (number->string (parallel-job-count)))
13584
13585 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
13586 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
13587 (propagated-inputs
13588 `(("python-greenlet" ,python-greenlet)
13589 ("python-objgraph" ,python-objgraph)
13590 ("python-zope.event" ,python-zope-event)
13591 ("python-zope.interface" ,python-zope-interface)))
13592 (native-inputs
13593 `(("python-six" ,python-six)
13594
13595 ;; For tests.
13596 ("python-dnspython" ,python-dnspython)
13597 ("python-psutil" ,python-psutil)))
13598 (inputs
13599 `(("c-ares" ,c-ares)
13600 ("libev" ,libev)))
13601 (home-page "https://www.gevent.org/")
13602 (synopsis "Coroutine-based network library")
13603 (description
13604 "@code{gevent} is a coroutine-based Python networking library that uses
13605 @code{greenlet} to provide a high-level synchronous API on top of the
13606 @code{libev} event loop.")
13607 (license license:expat)))
13608
13609 (define-public python-fastimport
13610 (package
13611 (name "python-fastimport")
13612 (version "0.9.9")
13613 (source
13614 (origin
13615 (method url-fetch)
13616 (uri (pypi-uri "fastimport" version))
13617 (sha256
13618 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
13619 (build-system python-build-system)
13620 (home-page "https://github.com/jelmer/python-fastimport")
13621 (synopsis "VCS fastimport parser and generator in Python")
13622 (description "This package provides a parser for and generator of the Git
13623 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
13624 format.")
13625 (license license:gpl2+)))
13626
13627 (define-public python2-fastimport
13628 (package-with-python2 python-fastimport))
13629
13630 (define-public python-twisted
13631 (package
13632 (name "python-twisted")
13633 (version "19.7.0")
13634 (source (origin
13635 (method url-fetch)
13636 (uri (pypi-uri "Twisted" version ".tar.bz2"))
13637 (sha256
13638 (base32
13639 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
13640 (build-system python-build-system)
13641 (arguments
13642 '(#:tests? #f)) ; FIXME: some tests fail
13643 (propagated-inputs
13644 `(("python-zope-interface" ,python-zope-interface)
13645 ("python-pyhamcrest" ,python-pyhamcrest)
13646 ("python-incremental" ,python-incremental)
13647 ("python-hyperlink" ,python-hyperlink)
13648 ("python-constantly" ,python-constantly)
13649 ("python-automat" ,python-automat)))
13650 (home-page "https://twistedmatrix.com/")
13651 (synopsis "Asynchronous networking framework written in Python")
13652 (description
13653 "Twisted is an extensible framework for Python programming, with special
13654 focus on event-based network programming and multiprotocol integration.")
13655 (license license:expat)))
13656
13657 (define-public python2-twisted
13658 (package-with-python2 python-twisted))
13659
13660 (define-public python-pika
13661 (package
13662 (name "python-pika")
13663 (version "0.12.0")
13664 (source
13665 (origin
13666 (method url-fetch)
13667 (uri (pypi-uri "pika" version))
13668 (sha256
13669 (base32
13670 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
13671 (build-system python-build-system)
13672 (native-inputs
13673 `(("python-pyev" ,python-pyev)
13674 ("python-tornado" ,python-tornado)
13675 ("python-twisted" ,python-twisted)))
13676 (home-page "https://pika.readthedocs.org")
13677 (synopsis "Pure Python AMQP Client Library")
13678 (description
13679 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
13680 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
13681 network support library.")
13682 (license license:bsd-3)))
13683
13684 (define-public python2-pika
13685 (package-with-python2 python-pika))
13686
13687 (define-public python-ply
13688 (package
13689 (name "python-ply")
13690 (version "3.11")
13691 (source
13692 (origin
13693 (method url-fetch)
13694 (uri (pypi-uri "ply" version))
13695 (sha256
13696 (base32
13697 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
13698 (build-system python-build-system)
13699 (home-page "http://www.dabeaz.com/ply/")
13700 (synopsis "Python Lex & Yacc")
13701 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
13702 It uses LR parsing and does extensive error checking.")
13703 (license license:bsd-3)))
13704
13705 (define-public python-tabulate
13706 (package
13707 (name "python-tabulate")
13708 (version "0.8.9")
13709 (source (origin
13710 (method url-fetch)
13711 (uri (pypi-uri "tabulate" version))
13712 (sha256
13713 (base32
13714 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
13715 (build-system python-build-system)
13716 (arguments
13717 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
13718 ;; and the latest release is not tagged in the upstream repository.
13719 '(#:tests? #f))
13720 (home-page "https://bitbucket.org/astanin/python-tabulate")
13721 (synopsis "Pretty-print tabular data")
13722 (description
13723 "Tabulate is a library and command-line utility to pretty-print tabular
13724 data in Python.")
13725 (license license:expat)))
13726
13727 (define-public python2-tabulate
13728 (package-with-python2 python-tabulate))
13729
13730 (define-public python-kazoo
13731 (package
13732 (name "python-kazoo")
13733 (version "2.4.0")
13734 (source
13735 (origin
13736 (method url-fetch)
13737 (uri (pypi-uri "kazoo" version))
13738 (sha256
13739 (base32
13740 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
13741 (build-system python-build-system)
13742 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
13743 (propagated-inputs
13744 `(("python-six" ,python-six)))
13745 (home-page "https://kazoo.readthedocs.org")
13746 (synopsis "High-level Zookeeper client library")
13747 (description
13748 "Kazoo is a Python client library for the Apache Zookeeper distributed
13749 application service. It is designed to be easy to use and to avoid common
13750 programming errors.")
13751 (license license:asl2.0)))
13752
13753 (define-public python2-kazoo
13754 (package-with-python2 python-kazoo))
13755
13756 (define-public python-pykafka
13757 (package
13758 (name "python-pykafka")
13759 (version "2.4.0")
13760 (source (origin
13761 (method url-fetch)
13762 (uri (pypi-uri "pykafka" version))
13763 (sha256
13764 (base32
13765 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
13766 (build-system python-build-system)
13767 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
13768 (propagated-inputs
13769 `(("python-gevent" ,python-gevent)
13770 ("python-kazoo" ,python-kazoo)
13771 ("python-tabulate" ,python-tabulate)))
13772 (inputs
13773 `(("librdkafka" ,librdkafka)))
13774 (home-page "https://pykafka.readthedocs.io/")
13775 (synopsis "Apache Kafka client for Python")
13776 (description
13777 "PyKafka is a client for the Apache Kafka distributed messaging system.
13778 It includes Python implementations of Kafka producers and consumers, which
13779 are optionally backed by a C extension built on librdkafka.")
13780 (license license:asl2.0)))
13781
13782 (define-public python-wcwidth
13783 (package
13784 (name "python-wcwidth")
13785 (version "0.1.8")
13786 (source (origin
13787 (method url-fetch)
13788 (uri (pypi-uri "wcwidth" version))
13789 (sha256
13790 (base32
13791 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
13792 (build-system python-build-system)
13793 (home-page "https://github.com/jquast/wcwidth")
13794 (synopsis "Measure number of terminal column cells of wide-character codes")
13795 (description "Wcwidth measures the number of terminal column cells of
13796 wide-character codes. It is useful for those implementing a terminal emulator,
13797 or programs that carefully produce output to be interpreted by one. It is a
13798 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
13799 specified in POSIX.1-2001 and POSIX.1-2008.")
13800 (license license:expat)))
13801
13802 (define-public python2-wcwidth
13803 (package-with-python2 python-wcwidth))
13804
13805 (define-public python2-jsonrpclib
13806 (package
13807 (name "python2-jsonrpclib")
13808 (version "0.1.7")
13809 (source (origin
13810 (method url-fetch)
13811 (uri (pypi-uri "jsonrpclib" version))
13812 (sha256
13813 (base32
13814 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
13815 (build-system python-build-system)
13816 (arguments
13817 `(#:tests? #f
13818 #:python ,python-2))
13819 (home-page "https://github.com/joshmarshall/jsonrpclib/")
13820 (synopsis "Implementation of JSON-RPC specification for Python")
13821 (description
13822 "This library is an implementation of the JSON-RPC specification.
13823 It supports both the original 1.0 specification, as well as the
13824 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
13825 etc.")
13826 (license license:asl2.0)))
13827
13828 (define-public python-chai
13829 (package
13830 (name "python-chai")
13831 (version "1.1.2")
13832 (source (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "chai" version))
13835 (sha256
13836 (base32
13837 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
13838 (build-system python-build-system)
13839 (home-page "https://github.com/agoragames/chai")
13840 (synopsis "Mocking framework for Python")
13841 (description
13842 "Chai provides an api for mocking, stubbing and spying your python
13843 objects, patterned after the Mocha library for Ruby.")
13844 (license license:bsd-3)))
13845
13846 (define-public python2-chai
13847 (package-with-python2 python-chai))
13848
13849 (define-public python-inflection
13850 (package
13851 (name "python-inflection")
13852 (version "0.3.1")
13853 (source
13854 (origin (method url-fetch)
13855 (uri (pypi-uri "inflection" version))
13856 (sha256
13857 (base32
13858 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
13859 (build-system python-build-system)
13860 (native-inputs
13861 `(("python-pytest" ,python-pytest)))
13862 (home-page "https://github.com/jpvanhal/inflection")
13863 (synopsis "Python string transformation library")
13864 (description
13865 "Inflection is a string transformation library. It singularizes
13866 and pluralizes English words, and transforms strings from CamelCase to
13867 underscored string.")
13868 (license license:expat)))
13869
13870 (define-public python2-inflection
13871 (package-with-python2 python-inflection))
13872
13873 (define-public python-pylev
13874 (package
13875 (name "python-pylev")
13876 (version "1.3.0")
13877 (source (origin
13878 (method url-fetch)
13879 (uri (pypi-uri "pylev" version))
13880 (sha256
13881 (base32
13882 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
13883 (build-system python-build-system)
13884 (home-page "https://github.com/toastdriven/pylev")
13885 (synopsis "Levenshtein distance implementation in Python")
13886 (description "Pure Python Levenshtein implementation, based off the
13887 Wikipedia code samples at
13888 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
13889 (license license:bsd-3)))
13890
13891 (define-public python2-pylev
13892 (package-with-python2 python-pylev))
13893
13894 (define-public python-cleo
13895 (package
13896 (name "python-cleo")
13897 (version "0.8.1")
13898 (source (origin
13899 (method url-fetch)
13900 (uri (pypi-uri "cleo" version))
13901 (sha256
13902 (base32
13903 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13904 (build-system python-build-system)
13905 (native-inputs
13906 `( ;; For testing
13907 ("python-mock" ,python-mock)
13908 ("python-pytest-mock" ,python-pytest-mock)
13909 ("python-pytest" ,python-pytest)))
13910 (propagated-inputs
13911 `(("python-backpack" ,python-backpack)
13912 ("python-clikit" ,python-clikit)
13913 ("python-pastel" ,python-pastel)
13914 ("python-pylev" ,python-pylev)))
13915 (home-page "https://github.com/sdispater/cleo")
13916 (synopsis "Command-line arguments library for Python")
13917 (description
13918 "Cleo allows you to create command-line commands with signature in
13919 docstring and colored output.")
13920 (license license:expat)))
13921
13922 (define-public python2-cleo
13923 (package-with-python2 python-cleo))
13924
13925 (define-public python-tomlkit
13926 (package
13927 (name "python-tomlkit")
13928 (version "0.7.0")
13929 (source
13930 (origin
13931 (method url-fetch)
13932 (uri (pypi-uri "tomlkit" version))
13933 (sha256
13934 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13935 (build-system python-build-system)
13936 (native-inputs
13937 `(("python-pytest" ,python-pytest)
13938 ("python-pyyaml" ,python-pyyaml)))
13939 (home-page "https://github.com/sdispater/tomlkit")
13940 (synopsis "Style-preserving TOML library")
13941 (description
13942 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13943 preserves all comments, indentations, whitespace and internal element ordering,
13944 and makes them accessible and editable via an intuitive API. It can also
13945 create new TOML documents from scratch using the provided helpers. Part of the
13946 implementation has been adapted, improved, and fixed from Molten.")
13947 (license license:expat)))
13948
13949 (define-public python-shellingham
13950 (package
13951 (name "python-shellingham")
13952 (version "1.3.2")
13953 (source
13954 (origin
13955 (method url-fetch)
13956 (uri (pypi-uri "shellingham" version))
13957 (sha256
13958 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13959 (build-system python-build-system)
13960 (arguments
13961 `(#:phases
13962 (modify-phases %standard-phases
13963 (add-after 'unpack 'restore-setup.py
13964 ;; setup.py will return in the next release.
13965 ;; <https://github.com/sarugaku/shellingham/issues/33>
13966 (lambda _
13967 (with-output-to-file "setup.py"
13968 (lambda _
13969 (display "from setuptools import setup\nsetup()\n")))
13970 #t)))))
13971 (home-page "https://github.com/sarugaku/shellingham")
13972 (synopsis "Tool to detect surrounding shell")
13973 (description
13974 "Shellingham detects what shell the current Python executable is
13975 running in.")
13976 (license license:isc)))
13977
13978 (define-public python-memcached
13979 (package
13980 (name "python-memcached")
13981 (version "1.59")
13982 (source
13983 (origin
13984 (method url-fetch)
13985 (uri (pypi-uri "python-memcached" version))
13986 (sha256
13987 (base32
13988 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13989 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13990 (build-system python-build-system)
13991 (propagated-inputs `(("python-six" ,python-six)))
13992 (home-page
13993 "https://github.com/linsomniac/python-memcached")
13994 (synopsis "Pure python memcached client")
13995 (description
13996 "This software is a pure Python interface to the memcached memory cache
13997 daemon. It is the client side software which allows storing values in one or
13998 more, possibly remote, memcached servers.")
13999 (license license:psfl)))
14000
14001 (define-public python-clikit
14002 (package
14003 (name "python-clikit")
14004 (version "0.6.2")
14005 (source
14006 (origin
14007 (method url-fetch)
14008 (uri (pypi-uri "clikit" version))
14009 (sha256
14010 (base32
14011 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
14012 (build-system python-build-system)
14013 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
14014 (propagated-inputs
14015 `(("python-crashtest" ,python-crashtest)
14016 ("python-pastel" ,python-pastel)
14017 ("python-pylev" ,python-pylev)))
14018 (home-page "https://github.com/sdispater/clikit")
14019 (synopsis "Group of utilities to build command line interfaces")
14020 (description
14021 "CliKit is a group of utilities to build testable command line
14022 interfaces.")
14023 (properties `((python2-variant . ,(delay python2-clikit))))
14024 (license license:expat)))
14025
14026 (define-public python2-clikit
14027 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
14028 (package/inherit
14029 base
14030 (propagated-inputs
14031 `(("python-enum34" ,python2-enum34)
14032 ("python-typing" ,python2-typing)
14033 ,@(package-propagated-inputs base))))))
14034
14035 (define-public python-msgpack-python
14036 (package
14037 (name "python-msgpack-python")
14038 (version "0.5.6")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "msgpack-python" version))
14043 (sha256
14044 (base32
14045 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
14046 (build-system python-build-system)
14047 (home-page "https://msgpack.org/")
14048 (synopsis "Package to deserialize messages in MessagePack binary format")
14049 (description
14050 "MessagePack is an efficient binary serialization format. It lets you
14051 exchange data among multiple languages like JSON. But it's faster and
14052 smaller. Small integers are encoded into a single byte, and typical short
14053 strings require only one extra byte in addition to the strings themselves.")
14054 (license license:asl2.0)))
14055
14056 (define-public python-cachy
14057 (package
14058 (name "python-cachy")
14059 (version "0.3.0")
14060 (source
14061 (origin
14062 (method url-fetch)
14063 (uri (pypi-uri "cachy" version))
14064 (sha256
14065 (base32
14066 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
14067 (build-system python-build-system)
14068 (arguments
14069 '(#:phases
14070 (modify-phases %standard-phases
14071 (replace 'check
14072 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
14073 "pytest"))))))
14074 (native-inputs
14075 `(("memcached" ,memcached)
14076 ("python-fakeredis" ,python-fakeredis)
14077 ("python-flexmock" ,python-flexmock)
14078 ("python-pifpaf" ,python-pifpaf)
14079 ("python-pytest" ,python-pytest)))
14080 (propagated-inputs
14081 `(("python-memcached" ,python-memcached)
14082 ("python-msgpack-python" ,python-msgpack-python)
14083 ("python-redis" ,python-redis)))
14084 (home-page "https://github.com/sdispater/cachy")
14085 (synopsis "Simple yet effective caching library")
14086 (description
14087 "Cachy provides a simple yet effective caching library. A simple but
14088 powerful API: thread-safety; decorator syntax; support for memcached, redis,
14089 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
14090 (license license:expat)))
14091
14092 (define-public poetry
14093 (package
14094 (name "poetry")
14095 (version "1.1.5")
14096 ;; Poetry can only be built from source with Poetry.
14097 (source
14098 (origin
14099 (method url-fetch)
14100 (uri (pypi-uri "poetry" version))
14101 (sha256
14102 (base32
14103 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
14104 (build-system python-build-system)
14105 (arguments
14106 `(#:tests? #f ;; Pypi does not have tests.
14107 #:phases
14108 (modify-phases %standard-phases
14109 (add-before 'build 'patch-setup-py
14110 (lambda _
14111 (substitute* "setup.py"
14112 ;; Allow newer versions of python-keyring.
14113 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
14114 ;; TODO: remove after the next release cycle,
14115 ;; when packaging has been updated.
14116 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
14117 #t)))))
14118 (propagated-inputs
14119 `(("python-cachecontrol" ,python-cachecontrol)
14120 ("python-cachy" ,python-cachy)
14121 ("python-cleo" ,python-cleo)
14122 ("python-clikit" ,python-clikit)
14123 ("python-html5lib" ,python-html5lib)
14124 ("python-keyring" ,python-keyring)
14125 ("python-msgpack-transitional" ,python-msgpack-transitional)
14126 ("python-packaging" ,python-packaging)
14127 ("python-pexpect" ,python-pexpect)
14128 ("python-pip" ,python-pip)
14129 ("python-pkginfo" ,python-pkginfo)
14130 ("python-poetry-core" ,python-poetry-core)
14131 ("python-requests" ,python-requests)
14132 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
14133 ("python-shellingham" ,python-shellingham)
14134 ("python-tomlkit" ,python-tomlkit)
14135 ("python-virtualenv" ,python-virtualenv)))
14136 (home-page "https://python-poetry.org")
14137 (synopsis "Python dependency management and packaging made easy")
14138 (description "Poetry is a tool for dependency management and packaging
14139 in Python. It allows you to declare the libraries your project depends on and
14140 it will manage (install/update) them for you.")
14141 (license license:expat)))
14142
14143 (define-public python-lark-parser
14144 (package
14145 (name "python-lark-parser")
14146 (version "0.9.0")
14147 (source (origin
14148 (method url-fetch)
14149 (uri (pypi-uri "lark-parser" version))
14150 (sha256
14151 (base32
14152 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
14153 (build-system python-build-system)
14154 (home-page "https://github.com/lark-parser/lark")
14155 (synopsis "Multi-language parser for Python")
14156 (description
14157 "Lark is a parser built with a focus on ergonomics, performance and
14158 resilience. Lark can parse all context-free languages. That means it is
14159 capable of parsing almost any programming language out there, and to
14160 some degree most natural languages too.")
14161 (license license:expat)))
14162
14163 (define-public python-libcst
14164 (package
14165 (name "python-libcst")
14166 (version "0.3.8")
14167 (source (origin
14168 (method url-fetch)
14169 (uri (pypi-uri "libcst" version))
14170 (sha256
14171 (base32
14172 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
14173 (build-system python-build-system)
14174 (arguments
14175 `(#:phases
14176 (modify-phases %standard-phases
14177 (add-after 'unpack 'remove-failing-tests
14178 (lambda _
14179 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
14180 (delete-file "libcst/tests/test_fuzz.py")
14181 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
14182 (delete-file "libcst/tests/test_pyre_integration.py")
14183 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
14184 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
14185 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
14186 #t))
14187 (add-before 'check 'generate-test-data
14188 (lambda _
14189 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14190 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
14191 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
14192 (replace 'check
14193 (lambda _
14194 (invoke "python" "-m" "unittest")
14195 #t)))))
14196 (native-inputs
14197 `(("python-black" ,python-black)
14198 ("python-isort" ,python-isort)))
14199 (propagated-inputs
14200 `(("python-typing-extensions" ,python-typing-extensions)
14201 ("python-typing-inspect" ,python-typing-inspect)
14202 ("python-pyyaml" ,python-pyyaml)))
14203 (home-page "https://github.com/Instagram/LibCST")
14204 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
14205 (description
14206 "LibCST parses Python source code as a CST tree that keeps all
14207 formatting details (comments, whitespaces, parentheses, etc). It's useful
14208 for building automated refactoring (codemod) applications and linters.
14209 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
14210 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
14211 naming node types and fields, LibCST creates a lossless CST that looks and
14212 feels like an AST.")
14213 (license (list license:expat
14214 ;; Some files unde libcst/_parser/ are under Python Software
14215 ;; Foundation license (see LICENSE file for details)
14216 license:psfl
14217 ;; libcst/_add_slots.py
14218 license:asl2.0))))
14219
14220 (define-public python-typing-inspect
14221 (package
14222 (name "python-typing-inspect")
14223 (version "0.6.0")
14224 (source (origin
14225 (method url-fetch)
14226 (uri (pypi-uri "typing_inspect" version))
14227 (sha256
14228 (base32
14229 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
14230 (build-system python-build-system)
14231 (propagated-inputs
14232 `(("python-mypy-extensions" ,python-mypy-extensions)
14233 ("python-typing-extensions" ,python-typing-extensions)))
14234 (home-page "https://github.com/ilevkivskyi/typing_inspect")
14235 (synopsis "API for inspection of types in the Python @code{typing} module")
14236 (description
14237 "The @code{typing_inspect} module defines experimental API for runtime
14238 inspection of types defined in the Python standard typing module.")
14239 (license license:expat)))
14240
14241 (define-public python-lazy-object-proxy
14242 (package
14243 (name "python-lazy-object-proxy")
14244 (version "1.5.1")
14245 (source (origin
14246 (method url-fetch)
14247 (uri (pypi-uri "lazy-object-proxy" version))
14248 (sha256
14249 (base32
14250 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
14251 (native-inputs
14252 `(("python-setuptools-scm" ,python-setuptools-scm)))
14253 (build-system python-build-system)
14254 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
14255 (synopsis "Lazy object proxy for python")
14256 (description
14257 "Lazy object proxy is an object that wraps a callable but defers the call
14258 until the object is actually required, and caches the result of said call.")
14259 (license license:bsd-2)))
14260
14261 (define-public python2-lazy-object-proxy
14262 (package-with-python2 python-lazy-object-proxy))
14263
14264 (define-public python-dnspython
14265 (package
14266 (name "python-dnspython")
14267 (version "2.0.0")
14268 (source (origin
14269 (method url-fetch)
14270 (uri (pypi-uri "dnspython" version ".zip"))
14271 (sha256
14272 (base32
14273 "1dyip5ygqqhrgcaiy7qzjpndl9xciip186paxqwkm726fj9z0jh4"))))
14274 (build-system python-build-system)
14275 (native-inputs `(("unzip" ,unzip)))
14276 (arguments '(#:tests? #f)) ; XXX: requires internet access
14277 (home-page "https://www.dnspython.org")
14278 (synopsis "DNS toolkit for Python")
14279 (description
14280 "dnspython is a DNS toolkit for Python. It supports almost all record
14281 types. It can be used for queries, zone transfers, and dynamic updates.
14282 It supports TSIG authenticated messages and EDNS0.")
14283 (license license:expat)))
14284
14285 (define-public python-dnspython-1.16
14286 (package
14287 (inherit python-dnspython)
14288 (version "1.16.0")
14289 (source (origin
14290 (method url-fetch)
14291 (uri (string-append "http://www.dnspython.org/kits/"
14292 version "/dnspython-" version ".tar.gz"))
14293 (sha256
14294 (base32
14295 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
14296 (native-inputs '())))
14297
14298 (define-public python2-dnspython-1.16
14299 (package-with-python2 python-dnspython-1.16))
14300
14301 (define-public python-py3dns
14302 (package
14303 (name "python-py3dns")
14304 (version "3.2.1")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "py3dns" version))
14309 (sha256
14310 (base32
14311 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
14312 (build-system python-build-system)
14313 ;; This package wants to read /etc/resolv.conf. We can't patch it without
14314 ;; removing functionality so we copy from Nix and "just don't build it".
14315 (arguments
14316 `(#:phases
14317 (modify-phases %standard-phases
14318 (add-after 'unpack 'patch-source
14319 (lambda _
14320 (substitute* "setup.py"
14321 (("import DNS") "")
14322 (("DNS.__version__") (string-append "\"" ,version "\"")))
14323 #t)))
14324 #:tests? #f)) ; Also skip the tests.
14325 (home-page "https://launchpad.net/py3dns")
14326 (synopsis "Python 3 DNS library")
14327 (description "This Python 3 module provides a DNS API for looking up DNS
14328 entries from within Python 3 modules and applications. This module is a
14329 simple, lightweight implementation.")
14330 (license license:psfl)))
14331
14332 (define-public python-email-validator
14333 (package
14334 (name "python-email-validator")
14335 (version "1.0.2")
14336 (source
14337 (origin (method url-fetch)
14338 (uri (pypi-uri "email_validator" version))
14339 (sha256
14340 (base32
14341 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
14342 (build-system python-build-system)
14343 (arguments
14344 '(#:phases
14345 (modify-phases %standard-phases
14346 (add-before 'build 'use-dnspython
14347 (lambda _
14348 (substitute* "setup.py"
14349 (("dnspython3") "dnspython"))
14350 #t)))))
14351 (propagated-inputs
14352 `(("python-dnspython" ,python-dnspython)
14353 ("python-idna" ,python-idna)))
14354 (home-page "https://github.com/JoshData/python-email-validator")
14355 (synopsis "Email address validation library for Python")
14356 (description
14357 "This library validates email address syntax and deliverability.")
14358 (license license:cc0)))
14359
14360 (define-public python2-email-validator
14361 (package-with-python2 python-email-validator))
14362
14363 (define-public python-ukpostcodeparser
14364 (package
14365 (name "python-ukpostcodeparser")
14366 (version "1.0.3")
14367 (source (origin
14368 (method url-fetch)
14369 (uri (pypi-uri "UkPostcodeParser" version))
14370 (sha256
14371 (base32
14372 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
14373 (build-system python-build-system)
14374 (home-page "https://github.com/hamstah/ukpostcodeparser")
14375 (synopsis "UK Postcode parser for Python")
14376 (description
14377 "This library provides the @code{parse_uk_postcode} function for
14378 parsing UK postcodes.")
14379 (license license:expat)))
14380
14381 (define-public python2-ukpostcodeparser
14382 (package-with-python2 python-ukpostcodeparser))
14383
14384 (define-public python-faker
14385 (package
14386 (name "python-faker")
14387 (version "4.0.2")
14388 (source (origin
14389 (method url-fetch)
14390 (uri (pypi-uri "Faker" version))
14391 (sha256
14392 (base32
14393 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
14394 (build-system python-build-system)
14395 (arguments
14396 '(#:phases
14397 (modify-phases %standard-phases
14398 (replace 'check
14399 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
14400 (native-inputs
14401 `(;; For testing
14402 ("python-freezegun" ,python-freezegun)
14403 ("python-pytest" ,python-pytest)
14404 ("python-random2" ,python-random2)
14405 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
14406 ("python-validators" ,python-validators)))
14407 (propagated-inputs
14408 `(("python-dateutil" ,python-dateutil)
14409 ("python-text-unidecode" ,python-text-unidecode)))
14410 (home-page "https://github.com/joke2k/faker")
14411 (synopsis "Python package that generates fake data")
14412 (description
14413 "Faker is a Python package that generates fake data such as names,
14414 addresses, and phone numbers.")
14415 (license license:expat)
14416 (properties `((python2-variant . ,(delay python2-faker))))))
14417
14418 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
14419 (define-public python2-faker
14420 (let ((base (package-with-python2 (strip-python2-variant
14421 python-faker))))
14422 (package
14423 (inherit base)
14424 (version "3.0.1")
14425 (source (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "Faker" version))
14428 (sha256
14429 (base32
14430 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
14431 (native-inputs
14432 `(("python-mock" ,python2-mock)
14433 ,@(package-native-inputs base)))
14434 (propagated-inputs
14435 `(("python2-ipaddress" ,python2-ipaddress)
14436 ("python2-six" ,python2-six)
14437 ,@(package-propagated-inputs base))))))
14438
14439 (define-public python-pyaml
14440 (package
14441 (name "python-pyaml")
14442 (version "18.11.0")
14443 (source (origin
14444 (method url-fetch)
14445 (uri (pypi-uri "pyaml" version))
14446 (sha256
14447 (base32
14448 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
14449 (build-system python-build-system)
14450 (native-inputs
14451 `(("python-unidecode" ,python-unidecode)))
14452 (propagated-inputs
14453 `(("python-pyyaml" ,python-pyyaml)))
14454 (home-page "https://github.com/mk-fg/pretty-yaml")
14455 (synopsis "YAML pretty-print library for Python")
14456 (description
14457 "pyaml is a PyYAML based python module to produce pretty and readable
14458 YAML-serialized data.")
14459 (license license:wtfpl2)))
14460
14461 (define-public python2-pyaml
14462 (package-with-python2 python-pyaml))
14463
14464 (define-public python-backpack
14465 (package
14466 (name "python-backpack")
14467 (version "0.1")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "backpack" version))
14472 (sha256
14473 (base32
14474 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
14475 (build-system python-build-system)
14476 (native-inputs
14477 `(("python-pytest" ,python-pytest)
14478 ("python-nose" ,python-nose)))
14479 (propagated-inputs
14480 `(("python-simplejson" ,python-simplejson)))
14481 (home-page "https://github.com/sdispater/backpack")
14482 (synopsis "Utilities for working with Python collections")
14483 (description "Backpack provides some useful utilities for working with
14484 collections of data.")
14485 (license license:expat)))
14486
14487 (define-public python2-backpack
14488 (package-with-python2 python-backpack))
14489
14490 (define-public python-prompt-toolkit
14491 (package
14492 (name "python-prompt-toolkit")
14493 (version "3.0.9")
14494 (source
14495 (origin
14496 (method url-fetch)
14497 (uri (pypi-uri "prompt_toolkit" version))
14498 (sha256
14499 (base32 "0bvjp62cs6aj9lrh7njzxdjgg8pjfw3qgmr551243d9ivmcapvn5"))))
14500 (build-system python-build-system)
14501 (arguments
14502 `(#:phases
14503 (modify-phases %standard-phases
14504 (delete 'check)
14505 (add-after 'install 'post-install-check
14506 (lambda* (#:key inputs outputs #:allow-other-keys)
14507 ;; HOME is needed for the test
14508 ;; "test_pathcompleter_can_expanduser".
14509 (setenv "HOME" "/tmp")
14510 (add-installed-pythonpath inputs outputs)
14511 (invoke "py.test"))))))
14512 (propagated-inputs
14513 `(("python-wcwidth" ,python-wcwidth)))
14514 (native-inputs
14515 `(("python-pytest" ,python-pytest)))
14516 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
14517 (synopsis "Library for building command line interfaces in Python")
14518 (description
14519 "Prompt-Toolkit is a library for building interactive command line
14520 interfaces in Python. It's like GNU Readline but it also features syntax
14521 highlighting while typing, out-of-the-box multi-line input editing, advanced
14522 code completion, incremental search, support for Chinese double-width
14523 characters, mouse support, and auto suggestions.")
14524 (license license:bsd-3)
14525 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
14526
14527 (define-public python-prompt-toolkit-2
14528 (package (inherit python-prompt-toolkit)
14529 (name "python-prompt-toolkit")
14530 (version "2.0.7")
14531 (source
14532 (origin
14533 (method url-fetch)
14534 (uri (pypi-uri "prompt_toolkit" version))
14535 (sha256
14536 (base32
14537 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
14538 (propagated-inputs
14539 `(("python-wcwidth" ,python-wcwidth)
14540 ("python-six" ,python-six)
14541 ("python-pygments" ,python-pygments)))
14542 (properties '())))
14543
14544 (define-public python2-prompt-toolkit
14545 (package-with-python2 python-prompt-toolkit-2))
14546
14547 (define-public python-prompt-toolkit-1
14548 (package (inherit python-prompt-toolkit-2)
14549 (version "1.0.15")
14550 (source
14551 (origin
14552 (method url-fetch)
14553 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
14554 (sha256
14555 (base32
14556 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
14557
14558 (define-public python2-prompt-toolkit-1
14559 (package-with-python2 python-prompt-toolkit-1))
14560
14561 (define-public python-jedi
14562 (package
14563 (name "python-jedi")
14564 (version "0.17.2")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "jedi" version))
14569 (sha256
14570 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
14571 (build-system python-build-system)
14572 (arguments
14573 `(#:phases
14574 (modify-phases %standard-phases
14575 (replace 'check
14576 (lambda* (#:key tests? #:allow-other-keys)
14577 (when tests?
14578 (setenv "HOME" "/tmp")
14579 (invoke "python" "-m" "pytest" "-vv"))
14580 #t)))))
14581 (native-inputs
14582 `(("python-pytest" ,python-pytest)
14583 ("python-docopt" ,python-docopt)))
14584 (propagated-inputs
14585 `(("python-parso" ,python-parso)))
14586 (home-page "https://github.com/davidhalter/jedi")
14587 (synopsis "Autocompletion and static analysis library for Python")
14588 (description
14589 "Jedi is a static analysis tool for Python that can be used in Integrated
14590 Development Environments (@dfn{IDE}s) and text editors. It understands Python
14591 on a deeper level than many other static analysis frameworks for Python.
14592
14593 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
14594 well.")
14595 (license license:expat)))
14596
14597 (define-public python2-jedi
14598 (package-with-python2 python-jedi))
14599
14600 (define-public ptpython
14601 (package
14602 (name "ptpython")
14603 (version "3.0.5")
14604 (source (origin
14605 (method url-fetch)
14606 (uri (pypi-uri "ptpython" version))
14607 (sha256
14608 (base32
14609 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
14610 (build-system python-build-system)
14611 (arguments
14612 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
14613 (propagated-inputs
14614 `(("python-appdirs" ,python-appdirs)
14615 ("python-jedi" ,python-jedi)
14616 ("python-prompt-toolkit" ,python-prompt-toolkit)
14617 ("python-pygments" ,python-pygments)))
14618 (home-page "https://github.com/jonathanslenders/ptpython")
14619 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
14620 (description
14621 "ptpython is a Python read-eval-print loop with IDE-like features.
14622 It supports syntax highlighting, multiline editing, autocompletion, mouse,
14623 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
14624 etc.")
14625 (license license:bsd-3)
14626 (properties `((python2-variant . ,(delay ptpython-2))))))
14627
14628 (define-public ptpython-2
14629 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
14630 (package/inherit base
14631 (name "ptpython2"))))
14632
14633 (define-public python-stem
14634 (package
14635 (name "python-stem")
14636 (version "1.8.0")
14637 (source
14638 (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "stem" version))
14641 (sha256
14642 (base32
14643 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
14644 (build-system python-build-system)
14645 (arguments
14646 `(#:phases
14647 (modify-phases %standard-phases
14648 (replace 'check
14649 (lambda _
14650 (invoke "./run_tests.py" "--unit")
14651 #t)))))
14652 (native-inputs
14653 `(("python-mock" ,python-mock)
14654 ("python-pycodestyle" ,python-pycodestyle)
14655 ("python-pyflakes" ,python-pyflakes)))
14656 (home-page "https://stem.torproject.org/")
14657 (synopsis
14658 "Python controller library that allows applications to interact with Tor")
14659 (description
14660 "Stem is a Python controller library for Tor. With it you can use Tor's
14661 control protocol to script against the Tor process and read descriptor data
14662 relays publish about themselves.")
14663 (license license:lgpl3)))
14664
14665 (define-public python-pyserial
14666 (package
14667 (name "python-pyserial")
14668 (version "3.5")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (pypi-uri "pyserial" version))
14673 (sha256
14674 (base32
14675 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
14676 (build-system python-build-system)
14677 (arguments
14678 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
14679 ;; #:phases
14680 ;; (modify-phases %standard-phases
14681 ;; (replace 'check
14682 ;; (lambda _
14683 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
14684 (home-page
14685 "https://github.com/pyserial/pyserial")
14686 (synopsis "Python Serial Port Bindings")
14687 (description "@code{pyserial} provide serial port bindings for Python. It
14688 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
14689 and/or Xon/Xoff. The port is accessed in RAW mode.")
14690 (license license:bsd-3)))
14691
14692 (define-public python2-pyserial
14693 (package-with-python2 python-pyserial))
14694
14695 (define-public python-kivy
14696 (package
14697 (name "python-kivy")
14698 (version "1.10.1")
14699 (source
14700 (origin
14701 (method url-fetch)
14702 (uri (pypi-uri "Kivy" version))
14703 (file-name (string-append name "-" version ".tar.gz"))
14704 (sha256
14705 (base32
14706 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
14707 (build-system python-build-system)
14708 (arguments
14709 `(#:tests? #f ; Tests require many optional packages
14710 #:phases
14711 (modify-phases %standard-phases
14712 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
14713 (lambda* (#:key inputs #:allow-other-keys)
14714 (setenv "KIVY_SDL2_PATH"
14715 (string-append (assoc-ref inputs "sdl-union")
14716 "/include/SDL2"))
14717 #t)))))
14718 (native-inputs
14719 `(("pkg-config" ,pkg-config)
14720 ("python-cython" ,python-cython)))
14721 (inputs
14722 `(("gstreamer" ,gstreamer)
14723 ("mesa" ,mesa)
14724 ("sdl-union"
14725 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
14726 (home-page "https://kivy.org")
14727 (synopsis
14728 "Multitouch application framework")
14729 (description
14730 "A software library for rapid development of
14731 hardware-accelerated multitouch applications.")
14732 (license license:expat)))
14733
14734 (define-public python2-kivy
14735 (package-with-python2 python-kivy))
14736
14737 (define-public python-binaryornot
14738 (package
14739 (name "python-binaryornot")
14740 (version "0.4.4")
14741 (source (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "binaryornot" version))
14744 (sha256
14745 (base32
14746 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
14747 (build-system python-build-system)
14748 (arguments
14749 `(#:phases
14750 (modify-phases %standard-phases
14751 (add-after 'unpack 'patch-tests
14752 (lambda _
14753 ;; TypeError: binary() got an unexpected keyword argument
14754 ;; 'average_size'.
14755 (substitute* "tests/test_check.py"
14756 (("average_size=512") ""))
14757 #t)))))
14758 (propagated-inputs
14759 `(("python-chardet" ,python-chardet)
14760 ("python-hypothesis" ,python-hypothesis)))
14761 (home-page "https://github.com/audreyr/binaryornot")
14762 (synopsis "Package to check if a file is binary or text")
14763 (description "Ultra-lightweight pure Python package to check if a file is
14764 binary or text.")
14765 (license license:bsd-3)
14766 (properties `((python2-variant . ,(delay python2-binaryornot))))))
14767
14768 (define-public python2-binaryornot
14769 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
14770 (package/inherit base
14771 (propagated-inputs
14772 `(("python2-enum34" ,python2-enum34)
14773 ,@(package-propagated-inputs base))))))
14774
14775 (define-public python-binwalk
14776 (package
14777 (name "python-binwalk")
14778 (version "2.2.0")
14779 (source
14780 (origin
14781 (method git-fetch)
14782 (uri (git-reference
14783 (url "https://github.com/ReFirmLabs/binwalk")
14784 (commit (string-append "v" version))))
14785 (file-name (git-file-name name version))
14786 (sha256
14787 (base32
14788 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
14789 (build-system python-build-system)
14790 (arguments
14791 `(#:phases
14792 (modify-phases %standard-phases
14793 (add-before 'check 'set-pythonpath
14794 (lambda _
14795 (setenv "PYTHONPATH"
14796 (string-append
14797 (getcwd) "/src/"
14798 ":" (getenv "PYTHONPATH")))
14799 (setenv "HOME" "")
14800 #t)))))
14801 (native-inputs
14802 `(("python-coverage" ,python-coverage)
14803 ("python-nose" ,python-nose)))
14804 (home-page "https://github.com/ReFirmLabs/binwalk")
14805 (synopsis "Firmware analysis tool")
14806 (description "Binwalk is a tool for analyzing, reverse engineering, and
14807 extracting firmware images")
14808 (license license:expat)))
14809
14810 (define-public python-nltk
14811 (package
14812 (name "python-nltk")
14813 (version "3.2.1")
14814 (source (origin
14815 (method url-fetch)
14816 (uri (pypi-uri "nltk" version))
14817 (sha256
14818 (base32
14819 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
14820 (build-system python-build-system)
14821 (arguments
14822 '(;; The tests require some extra resources to be downloaded.
14823 ;; TODO Try packaging these resources.
14824 #:tests? #f))
14825 (home-page "http://nltk.org/")
14826 (synopsis "Natural Language Toolkit")
14827 (description "It provides interfaces to over 50 corpora and lexical
14828 resources such as WordNet, along with a suite of text processing libraries
14829 for classification, tokenization, stemming, tagging, parsing, and semantic
14830 reasoning, wrappers for natural language processing libraries.")
14831 (license license:asl2.0)))
14832
14833 (define-public python2-nltk
14834 (package-with-python2 python-nltk))
14835
14836 (define-public python-pymongo
14837 (package
14838 (name "python-pymongo")
14839 (version "3.7.2")
14840 (source (origin
14841 (method url-fetch)
14842 (uri (pypi-uri "pymongo" version))
14843 (sha256
14844 (base32
14845 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
14846 (build-system python-build-system)
14847 (propagated-inputs
14848 `(("python-certifi" ,python-certifi)))
14849 (home-page "https://github.com/mongodb/mongo-python-driver")
14850 (synopsis "Python driver for MongoDB")
14851 (description "Python driver for MongoDB.")
14852 (license license:asl2.0)))
14853
14854 (define-public python2-pymongo
14855 (package-with-python2 python-pymongo))
14856
14857 (define-public python-consul
14858 (package
14859 (name "python-consul")
14860 (version "0.6.1")
14861 (source
14862 (origin
14863 (method url-fetch)
14864 (uri (pypi-uri "python-consul" version))
14865 (sha256
14866 (base32
14867 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
14868 (build-system python-build-system)
14869 (arguments
14870 '(#:tests? #f)) ; The tests are not distributed
14871 (propagated-inputs
14872 `(("python-requests" ,python-requests)
14873 ("python-six" ,python-six)))
14874 (home-page "https://github.com/cablehead/python-consul")
14875 (synopsis "Python client for Consul")
14876 (description
14877 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
14878 discovery, monitoring and configuration.")
14879 (license license:expat)))
14880
14881 (define-public python2-consul
14882 (package-with-python2 python-consul))
14883
14884 (define-public python-schematics
14885 (package
14886 (name "python-schematics")
14887 (version "1.1.1")
14888 (source
14889 (origin
14890 (method git-fetch)
14891 (uri (git-reference
14892 (url "https://github.com/schematics/schematics")
14893 (commit (string-append "v" version))))
14894 (file-name (git-file-name name version))
14895 (sha256
14896 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14897 (build-system python-build-system)
14898 (propagated-inputs
14899 `(("python-six" ,python-six)))
14900 (arguments
14901 ;; The tests require a bunch of not very nice packages with fixed
14902 ;; version requirements (e.g. python-coveralls).
14903 `(#:tests? #f))
14904 (home-page "https://github.com/schematics/schematics")
14905 (synopsis "Python Data Structures for Humans")
14906 (description "Python Data Structures for Humans.")
14907 (license license:bsd-3)))
14908
14909 (define-public python2-schematics
14910 (package-with-python2 python-schematics))
14911
14912 (define-public python-odfpy
14913 (package
14914 (name "python-odfpy")
14915 (version "1.4.1")
14916 (source (origin
14917 (method url-fetch)
14918 (uri (pypi-uri "odfpy" version))
14919 (sha256
14920 (base32
14921 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14922 (arguments
14923 `(#:phases
14924 (modify-phases %standard-phases
14925 (replace 'check
14926 (lambda _
14927 (setenv "PYTHONPATH" (string-append "./build/lib:"
14928 (getenv "PYTHONPATH")))
14929 (invoke "pytest" "-vv"))))))
14930 (build-system python-build-system)
14931 (native-inputs
14932 `(("python-pytest" ,python-pytest)))
14933 (propagated-inputs
14934 `(("python-defusedxml" ,python-defusedxml)))
14935 (home-page "https://github.com/eea/odfpy")
14936 (synopsis "Python API and tools to manipulate OpenDocument files")
14937 (description "Collection of libraries and utility programs written in
14938 Python to manipulate OpenDocument 1.2 files.")
14939 (license
14940 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14941 ;; number of files with other licenses.
14942 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14943
14944 (define-public python2-odfpy
14945 (package-with-python2 python-odfpy))
14946
14947 (define-public python-natsort
14948 (package
14949 (name "python-natsort")
14950 (version "7.0.1")
14951 (source (origin
14952 (method url-fetch)
14953 (uri (pypi-uri "natsort" version))
14954 (sha256
14955 (base32
14956 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14957 (build-system python-build-system)
14958 (arguments
14959 `(#:modules ((guix build utils)
14960 (guix build python-build-system)
14961 (srfi srfi-1)
14962 (srfi srfi-26)
14963 (ice-9 ftw))
14964 #:phases
14965 (modify-phases %standard-phases
14966 (add-before 'check 'set-cachedir
14967 ;; Tests require write access to $HOME by default
14968 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14969 (replace 'check
14970 (lambda _
14971 (let ((cwd (getcwd)))
14972 (setenv "PYTHONPATH"
14973 (string-append
14974 cwd "/build/"
14975 (find (cut string-prefix? "lib" <>)
14976 (scandir (string-append cwd "/build")))
14977 ":"
14978 (getenv "PYTHONPATH")))
14979 (invoke "pytest" "-v")))))))
14980 (native-inputs
14981 `(("python-hypothesis" ,python-hypothesis)
14982 ("python-pytest-cov" ,python-pytest-cov)
14983 ("python-pytest-mock" ,python-pytest-mock)
14984 ("python-pytest" ,python-pytest)))
14985 (propagated-inputs ; TODO: Add python-fastnumbers.
14986 `(("python-pyicu" ,python-pyicu)))
14987 (home-page "https://github.com/SethMMorton/natsort")
14988 (synopsis "Natural sorting for python and shell")
14989 (description
14990 "Natsort lets you apply natural sorting on lists instead of
14991 lexicographical. If you use the built-in @code{sorted} method in python
14992 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14993 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14994 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14995 identifies numbers and sorts them separately from strings. It can also sort
14996 version numbers, real numbers, mixed types and more, and comes with a shell
14997 command @command{natsort} that exposes this functionality in the command line.")
14998 (license license:expat)
14999 (properties `((python2-variant . ,(delay python2-natsort))))))
15000
15001 ;; Natsort 6.x are the last versions with support for Python 2.
15002 (define-public python2-natsort
15003 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
15004 (package (inherit base)
15005 (version "6.2.1")
15006 (source (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "natsort" version))
15009 (sha256
15010 (base32
15011 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
15012 (native-inputs
15013 `(("python2-pathlib" ,python2-pathlib)
15014 ,@(package-native-inputs base))))))
15015
15016 (define-public glances
15017 (package
15018 (name "glances")
15019 (version "3.1.6")
15020 (source
15021 (origin
15022 (method url-fetch)
15023 (uri (pypi-uri "Glances" version))
15024 (sha256
15025 (base32 "11xbm8jgcxha191ly7q76nab1ilabiz14mqf6i3y6aw5xvgg017c"))
15026 (modules '((guix build utils)))
15027 (snippet
15028 '(begin
15029 ;; Glances phones PyPI for weekly update checks by default.
15030 ;; Disable these. The user can re-enable them if desired.
15031 (substitute* "glances/outdated.py"
15032 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
15033 (string-append indentation
15034 "self.args.disable_check_update = True\n"
15035 line)))
15036 #t))))
15037 (build-system python-build-system)
15038 (propagated-inputs
15039 `(("python-future" ,python-future)
15040 ("python-psutil" ,python-psutil)))
15041 (home-page "https://github.com/nicolargo/glances")
15042 (synopsis "Cross-platform curses-based monitoring tool")
15043 (description
15044 "Glances is a curses-based monitoring tool for a wide variety of platforms.
15045 Glances uses the PsUtil library to get information from your system. It
15046 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
15047 (license license:lgpl3+)))
15048
15049 (define-public python-glances
15050 (deprecated-package "python-glances" glances))
15051
15052 (define-public python-graphql-core
15053 (package
15054 (name "python-graphql-core")
15055 (version "3.1.2")
15056 (source
15057 (origin
15058 (method url-fetch)
15059 (uri (pypi-uri "graphql-core" version))
15060 (sha256
15061 (base32
15062 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
15063 (build-system python-build-system)
15064 (arguments
15065 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
15066 #:phases
15067 (modify-phases %standard-phases
15068 (add-after 'unpack 'patch-hardcoded-version
15069 (lambda _ (substitute*
15070 "setup.py"
15071 (("'gevent==1.1rc1'") "'gevent'"))
15072 #t)))))
15073 (native-inputs
15074 `(("python-gevent" ,python-gevent)
15075 ("python-mock" ,python-mock)
15076 ("python-pytest-mock" ,python-pytest-mock)))
15077 (propagated-inputs
15078 `(("python-promise" ,python-promise)
15079 ("python-six" ,python-six)))
15080 (home-page "https://github.com/graphql-python/graphql-core")
15081 (synopsis "GraphQL implementation for Python")
15082 (description
15083 "GraphQL implementation for Python. GraphQL is a data query language and
15084 runtime designed and used to request and deliver data to mobile and web apps.
15085 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
15086 to Python.")
15087 (license license:expat)))
15088
15089 (define-public python-graphql-relay
15090 (package
15091 (name "python-graphql-relay")
15092 (version "0.4.5")
15093 (source
15094 (origin
15095 (method url-fetch)
15096 (uri (pypi-uri "graphql-relay" version))
15097 (sha256
15098 (base32
15099 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
15100 (build-system python-build-system)
15101 (arguments
15102 '(#:tests? #f)) ; The tests are not distributed
15103 (propagated-inputs
15104 `(("python-graphql-core" ,python-graphql-core)
15105 ("python-promise" ,python-promise)
15106 ("python-six" ,python-six)))
15107 (home-page "https://github.com/graphql-python/graphql-relay-py")
15108 (synopsis "Relay implementation for Python")
15109 (description
15110 "This is a library to allow the easy creation of Relay-compliant servers
15111 using the GraphQL Python reference implementation of a GraphQL server. It
15112 should be noted that the code is a exact port of the original
15113 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
15114 from Facebook.")
15115 (license license:expat)))
15116
15117 (define-public python-graphene
15118 (package
15119 (name "python-graphene")
15120 (version "0.10.2")
15121 (source
15122 (origin
15123 (method url-fetch)
15124 (uri (pypi-uri "graphene" version))
15125 (sha256
15126 (base32
15127 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
15128 (build-system python-build-system)
15129 (propagated-inputs
15130 `(("python-graphql-core" ,python-graphql-core)
15131 ("python-graphql-relay" ,python-graphql-relay)
15132 ("python-iso8601" ,python-iso8601)
15133 ("python-promise" ,python-promise)
15134 ("python-six" ,python-six)))
15135 (arguments
15136 `(#:tests? #f)) ; no tests/ in the PyPI tarball
15137 (home-page "https://graphene-python.org/")
15138 (synopsis "GraphQL Framework for Python")
15139 (description
15140 "Graphene is a Python library for building GraphQL schemas/types.
15141 A GraphQL schema describes your data model, and provides a GraphQL server
15142 with an associated set of resolve methods that know how to fetch data.")
15143 (license license:expat)))
15144
15145 (define-public python-nautilus
15146 (package
15147 (name "python-nautilus")
15148 (version "0.4.9")
15149 (source
15150 (origin
15151 (method url-fetch)
15152 (uri (pypi-uri "nautilus" version))
15153 (sha256
15154 (base32
15155 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
15156 (build-system python-build-system)
15157 (arguments `(#:tests? #f)) ; fails to import test modules
15158 (propagated-inputs
15159 `(("python-bcrypt" ,python-bcrypt)
15160 ("python-click" ,python-click)
15161 ("python-consul" ,python-consul)
15162 ("python-graphene" ,python-graphene)
15163 ("python-jinja2" ,python-jinja2)
15164 ("python-peewee" ,python-peewee)
15165 ("python-pika" ,python-pika)
15166 ("python-tornado" ,python-tornado)
15167 ("python-wtforms" ,python-wtforms)))
15168 (native-inputs
15169 `(("python-nose2" ,python-nose2)))
15170 (home-page "https://github.com/AlecAivazis/nautilus")
15171 (synopsis "Library for creating microservice applications")
15172 (description
15173 "Nautilus is a framework for flux based microservices that looks to
15174 provide extendible implementations of common aspects of a cloud so that you can
15175 focus on building massively scalable web applications.")
15176 (license license:expat)))
15177
15178 (define-public python-random2
15179 (package
15180 (name "python-random2")
15181 (version "1.0.1")
15182 (source (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "random2" version ".zip"))
15185 (sha256
15186 (base32
15187 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
15188 (build-system python-build-system)
15189 (native-inputs `(("unzip" ,unzip)))
15190 (home-page "http://pypi.python.org/pypi/random2")
15191 (synopsis "Python 3 version of the Python 2 @code{random} module")
15192 (description
15193 "This package provides a Python 3 ported version of Python 2.7’s
15194 @code{random} module. It has also been back-ported to work in Python 2.6.
15195
15196 In Python 3, the implementation of @code{randrange()} was changed, so that
15197 even with the same seed you get different sequences in Python 2 and 3.
15198
15199 This package closes that gap, allowing stable random number generation
15200 between the different Python versions.")
15201 (license license:psfl)))
15202
15203 (define-public python2-random2
15204 (package-with-python2 python-random2))
15205
15206 (define-public python-snowballstemmer
15207 (package
15208 (name "python-snowballstemmer")
15209 (version "2.0.0")
15210 (source (origin
15211 (method url-fetch)
15212 (uri (pypi-uri "snowballstemmer" version))
15213 (sha256
15214 (base32
15215 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
15216 (build-system python-build-system)
15217 (arguments
15218 `(;; No tests exist
15219 #:tests? #f))
15220 (home-page "https://github.com/shibukawa/snowball_py")
15221 (synopsis "Snowball stemming library collection for Python")
15222 (description "This package provides 16 word stemmer algorithms generated
15223 from Snowball algorithms. It includes the 15 original ones plus the Poerter
15224 English stemmer.")
15225 (license license:bsd-3)))
15226
15227 (define-public python2-snowballstemmer
15228 (package-with-python2 python-snowballstemmer))
15229
15230 (define-public python-setproctitle
15231 (package
15232 (name "python-setproctitle")
15233 (version "1.1.10")
15234 (source
15235 (origin
15236 (method url-fetch)
15237 (uri (pypi-uri "setproctitle" version))
15238 (sha256
15239 (base32
15240 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
15241 (build-system python-build-system)
15242 (arguments
15243 '(#:phases
15244 (modify-phases %standard-phases
15245 (add-before 'check 'patch-Makefile
15246 ;; Stricly this is only required for the python2 variant.
15247 ;; But adding a phase in an inherited package seems to be
15248 ;; cumbersum. So we patch even for python3.
15249 (lambda _
15250 (let ((nose (assoc-ref %build-inputs "python2-nose")))
15251 (when nose
15252 (substitute* "Makefile"
15253 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
15254 (string-append nose "/bin/nosetests "))))
15255 #t)))
15256 (replace 'check
15257 (lambda _
15258 (setenv "PYTHON" (or (which "python3") (which "python")))
15259 (setenv "PYCONFIG" (if (which "python3-config")
15260 "python3-config --embed"
15261 "python-config"))
15262 (setenv "CC" "gcc")
15263 ;; No need to extend PYTHONPATH to find the built package, since
15264 ;; the Makefile will build anyway
15265 (invoke "make" "check"))))))
15266 (native-inputs
15267 `(("procps" ,procps))) ; required for tests
15268 (home-page "https://github.com/dvarrazzo/py-setproctitle")
15269 (synopsis
15270 "Setproctitle implementation for Python to customize the process title")
15271 (description "The library allows a process to change its title (as displayed
15272 by system tools such as ps and top).
15273
15274 Changing the title is mostly useful in multi-process systems, for
15275 example when a master process is forked: changing the children's title
15276 allows identifying the task each process is busy with. The technique
15277 is used by PostgreSQL and the OpenSSH Server for example.")
15278 (license license:bsd-3)
15279 (properties `((python2-variant . ,(delay python2-setproctitle))))))
15280
15281 (define-public python2-setproctitle
15282 (let ((base (package-with-python2
15283 (strip-python2-variant python-setproctitle))))
15284 (package/inherit base
15285 (native-inputs `(("python2-nose" ,python2-nose)
15286 ,@(package-native-inputs base))))))
15287
15288 (define-public python-validictory
15289 (package
15290 (name "python-validictory")
15291 (version "1.0.1")
15292 (source
15293 (origin
15294 (method url-fetch)
15295 (uri (pypi-uri "validictory" version))
15296 (sha256
15297 (base32
15298 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
15299 (build-system python-build-system)
15300 (arguments
15301 '(#:phases
15302 (modify-phases %standard-phases
15303 (add-after 'unpack 'bootstrap
15304 ;; Move the tests out of the package directory to avoid
15305 ;; packaging them.
15306 (lambda* _
15307 (rename-file "validictory/tests" "tests")
15308 (delete-file "tests/__init__.py")))
15309 (replace 'check
15310 (lambda _
15311 ;; Extend PYTHONPATH so the built package will be found.
15312 (setenv "PYTHONPATH"
15313 (string-append (getcwd) "/build/lib:"
15314 (getenv "PYTHONPATH")))
15315 (invoke "py.test" "-vv" ))))))
15316 (native-inputs
15317 `(("python-pytest" ,python-pytest)))
15318 (home-page
15319 "https://github.com/jamesturk/validictory")
15320 (synopsis "General purpose Python data validator")
15321 (description "It allows validation of arbitrary Python data structures.
15322
15323 The schema format is based on the JSON Schema
15324 proposal (http://json-schema.org), so combined with json the library is also
15325 useful as a validator for JSON data.")
15326 (license license:expat)))
15327
15328 (define-public python2-validictory
15329 (package-with-python2 python-validictory))
15330
15331 (define-public python-pyelftools
15332 (package
15333 (name "python-pyelftools")
15334 (version "0.25")
15335 (source
15336 (origin
15337 (method url-fetch)
15338 (uri (pypi-uri "pyelftools" version))
15339 (sha256
15340 (base32
15341 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
15342 (build-system python-build-system)
15343 (arguments
15344 `(#:phases
15345 (modify-phases %standard-phases
15346 (add-before 'check 'set-pythonpath
15347 (lambda _
15348 (setenv "PYTHONPATH"
15349 (string-append
15350 (getcwd) "/test/"
15351 ":" (getenv "PYTHONPATH")))
15352 #t)))))
15353 (home-page
15354 "https://github.com/eliben/pyelftools")
15355 (synopsis
15356 "Analyze binary and library file information")
15357 (description "This Python library provides interfaces for parsing and
15358 analyzing two binary and library file formats; the Executable and Linking
15359 Format (ELF), and debugging information in the Debugging With Attributed
15360 Record Format (DWARF).")
15361 (license license:public-domain)))
15362
15363 (define-public python-pyev
15364 (package
15365 (name "python-pyev")
15366 (version "0.9.0")
15367 (source
15368 (origin
15369 (method url-fetch)
15370 (uri (pypi-uri "pyev" version))
15371 (sha256
15372 (base32
15373 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
15374 (build-system python-build-system)
15375 (arguments
15376 `(#:tests? #f ; no test suite
15377 #:phases
15378 (modify-phases %standard-phases
15379 (add-after 'unpack 'patch
15380 (lambda* (#:key inputs #:allow-other-keys)
15381 (let ((libev (string-append (assoc-ref inputs "libev")
15382 "/lib/libev.so.4")))
15383 (substitute* "setup.py"
15384 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
15385 (string-append "libev_dll_name = \"" libev "\"")))))))))
15386 (inputs
15387 `(("libev" ,libev)))
15388 (home-page "https://github.com/gabrielfalcao/pyev")
15389 (synopsis "Python libev interface")
15390 (description "Pyev provides a Python interface to libev.")
15391 (license license:gpl3)))
15392
15393 (define-public python2-pyev
15394 (package-with-python2 python-pyev))
15395
15396 (define-public python-imagesize
15397 (package
15398 (name "python-imagesize")
15399 (version "1.2.0")
15400 (source
15401 (origin
15402 (method url-fetch)
15403 (uri (pypi-uri "imagesize" version))
15404 (sha256
15405 (base32
15406 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
15407 (build-system python-build-system)
15408 (home-page "https://github.com/shibukawa/imagesize_py")
15409 (synopsis "Gets image size of files in various formats in Python")
15410 (description
15411 "This package allows determination of image size from
15412 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
15413 (license license:expat)))
15414
15415 (define-public python2-imagesize
15416 (package-with-python2 python-imagesize))
15417
15418 (define-public python-termstyle
15419 (package
15420 (name "python-termstyle")
15421 (version "0.1.11")
15422 (source
15423 (origin
15424 (method url-fetch)
15425 (uri (pypi-uri "termstyle" version))
15426 (sha256
15427 (base32
15428 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
15429 (build-system python-build-system)
15430 (arguments
15431 '(#:phases
15432 (modify-phases %standard-phases
15433 (replace 'check
15434 (lambda _
15435 (invoke "python" "test3.py"))))))
15436 (home-page "https://github.com/gfxmonk/termstyle")
15437 (synopsis "Console text coloring for Python")
15438 (description "This package provides console text coloring for Python.")
15439 (license license:bsd-3)))
15440
15441 (define-public python-argcomplete
15442 (package
15443 (name "python-argcomplete")
15444 (version "1.11.1")
15445 (source
15446 (origin
15447 (method url-fetch)
15448 (uri (pypi-uri "argcomplete" version))
15449 (sha256
15450 (base32
15451 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
15452 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
15453 (build-system python-build-system)
15454 (native-inputs
15455 `(("python-coverage" ,python-coverage)
15456 ("python-flake8" ,python-flake8)
15457 ("python-pexpect" ,python-pexpect)
15458 ("python-wheel" ,python-wheel)
15459 ("tcsh" ,tcsh)
15460 ("fish" ,fish)
15461 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
15462 (home-page "https://github.com/kislyuk/argcomplete")
15463 (synopsis "Shell tab completion for Python argparse")
15464 (description "argcomplete provides extensible command line tab completion
15465 of arguments and options for Python scripts using @code{argparse}. It's
15466 particularly useful for programs with many options or sub-parsers that can
15467 dynamically suggest completions; for example, when browsing resources over the
15468 network.")
15469 (license license:asl2.0)
15470 (properties `((python2-variant . ,(delay python2-argcomplete))))))
15471
15472 (define-public python2-argcomplete
15473 (let ((variant (package-with-python2
15474 (strip-python2-variant python-argcomplete))))
15475 (package/inherit variant
15476 (arguments
15477 (substitute-keyword-arguments (package-arguments variant)
15478 ((#:phases phases '%standard-phases)
15479 `(modify-phases ,phases
15480 (add-after 'unpack 'set-my-HOME
15481 (lambda _ (setenv "HOME" "/tmp")))))))
15482 (native-inputs
15483 `(("python2-importlib-metadata" ,python2-importlib-metadata)
15484 ,@(package-native-inputs variant))))))
15485
15486 (define-public python-csscompressor
15487 (package
15488 (name "python-csscompressor")
15489 (version "0.9.5")
15490 (source
15491 (origin
15492 (method url-fetch)
15493 (uri (pypi-uri "csscompressor" version))
15494 (sha256
15495 (base32
15496 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
15497 (build-system python-build-system)
15498 (arguments
15499 '(#:phases
15500 (modify-phases %standard-phases
15501 (replace 'check
15502 (lambda _
15503 (invoke "py.test"))))))
15504 (native-inputs
15505 `(("python-pytest" ,python-pytest)))
15506 (home-page "https://github.com/sprymix/csscompressor")
15507 (synopsis "Python port of YUI CSS Compressor")
15508 (description
15509 "This package provides a python port of YUI CSS Compressor.")
15510 (license license:bsd-3)))
15511
15512 (define-public python-rcssmin
15513 (package
15514 (name "python-rcssmin")
15515 (version "1.0.6")
15516 (source
15517 (origin
15518 (method url-fetch)
15519 (uri (pypi-uri "rcssmin" version))
15520 (sha256
15521 (base32
15522 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
15523 (build-system python-build-system)
15524 (arguments
15525 '(#:phases
15526 (modify-phases %standard-phases
15527 (replace 'check
15528 (lambda _
15529 (invoke "python" "run_tests.py" "tests"))))))
15530 (home-page "http://opensource.perlig.de/rcssmin/")
15531 (synopsis "CSS Minifier")
15532 (description "The minifier is based on the semantics of the YUI compressor,
15533 which itself is based on the rule list by Isaac Schlueter.")
15534 (license license:asl2.0)))
15535
15536 (define-public python-rjsmin
15537 (package
15538 (name "python-rjsmin")
15539 (version "1.1.0")
15540 (source
15541 (origin
15542 (method url-fetch)
15543 (uri (pypi-uri "rjsmin" version))
15544 (sha256
15545 (base32
15546 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
15547 (modules '((guix build utils)))
15548 (snippet
15549 '(begin
15550 (for-each delete-file (find-files "bench" "\\.js$"))
15551 #t))))
15552 (build-system python-build-system)
15553 (arguments
15554 '(#:tests? #f ; Not all test files included.
15555 #:phases
15556 (modify-phases %standard-phases
15557 (replace 'check
15558 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
15559 (add-installed-pythonpath inputs outputs)
15560 (if tests?
15561 (invoke "py.test" "-vv" "tests")
15562 #t))))))
15563 (native-inputs
15564 `(("python-pytest" ,python-pytest)))
15565 (home-page "http://opensource.perlig.de/rjsmin/")
15566 (synopsis "Javascript Minifier")
15567 (description "@code{rJSmin} is a javascript minifier written in Python. The
15568 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
15569 is a re-implementation aiming for speed, so it can be used at runtime (rather
15570 than during a preprocessing step).")
15571 (license license:asl2.0)))
15572
15573 (define-public python-xopen
15574 (package
15575 (name "python-xopen")
15576 (version "0.5.0")
15577 (source
15578 (origin
15579 (method url-fetch)
15580 (uri (pypi-uri "xopen" version))
15581 (sha256
15582 (base32
15583 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
15584 (build-system python-build-system)
15585 (propagated-inputs
15586 `(("python-setuptools-scm" ,python-setuptools-scm)))
15587 (home-page "https://github.com/marcelm/xopen/")
15588 (synopsis "Open compressed files transparently")
15589 (description "This module provides an @code{xopen} function that works like
15590 Python's built-in @code{open} function, but can also deal with compressed files.
15591 Supported compression formats are gzip, bzip2 and, xz, and are automatically
15592 recognized by their file extensions. The focus is on being as efficient as
15593 possible on all supported Python versions.")
15594 (license license:expat)))
15595
15596 (define-public python2-xopen
15597 (let ((base (package-with-python2
15598 (strip-python2-variant python-xopen))))
15599 (package/inherit base
15600 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
15601 ,@(package-propagated-inputs base))))))
15602
15603 (define-public python-cheetah
15604 (package
15605 (name "python-cheetah")
15606 (version "3.2.4")
15607 (source
15608 (origin
15609 (method url-fetch)
15610 (uri (pypi-uri "Cheetah3" version))
15611 (sha256
15612 (base32
15613 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
15614 (build-system python-build-system)
15615 (arguments
15616 `(#:modules ((guix build utils)
15617 (guix build python-build-system)
15618 (ice-9 ftw)
15619 (srfi srfi-1)
15620 (srfi srfi-26))
15621 #:phases (modify-phases %standard-phases
15622 (add-after 'unpack 'use-absolute-python
15623 (lambda _
15624 (substitute* "Cheetah/CheetahWrapper.py"
15625 (("#!/usr/bin/env python")
15626 (string-append "#!" (which "python"))))
15627 #t))
15628 (add-after 'unpack 'fix-tests
15629 (lambda _
15630 (substitute* "Cheetah/Tests/ImportHooks.py"
15631 (("os.path.dirname\\(__file__\\)")
15632 (string-append "'" (getcwd) "/Cheetah/Tests'")))
15633 #t))
15634 (replace 'check
15635 (lambda _
15636 (let ((cwd (getcwd)))
15637 (setenv "PYTHONPATH"
15638 (string-append
15639 cwd "/build/"
15640 (find (cut string-prefix? "lib" <>)
15641 (scandir (string-append cwd "/build")))
15642 ":" (getenv "PYTHONPATH")))
15643 (setenv "PATH"
15644 (string-append (getenv "PATH")
15645 ":" cwd "/bin"))
15646 (setenv "TMPDIR" "/tmp")
15647
15648 (substitute* "Cheetah/Tests/Test.py"
15649 (("unittest.TextTestRunner\\(\\)")
15650 "unittest.TextTestRunner(verbosity=2)"))
15651
15652 (invoke "python" "Cheetah/Tests/Test.py")))))))
15653 (propagated-inputs
15654 `(("python-markdown" ,python-markdown))) ;optional
15655 (home-page "https://cheetahtemplate.org/")
15656 (synopsis "Template engine")
15657 (description "Cheetah is a text-based template engine and Python code
15658 generator.
15659
15660 Cheetah can be used as a standalone templating utility or referenced as
15661 a library from other Python applications. It has many potential uses,
15662 but web developers looking for a viable alternative to ASP, JSP, PHP and
15663 PSP are expected to be its principle user group.
15664
15665 Features:
15666 @enumerate
15667 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
15668 text-based format.
15669 @item Cleanly separates content, graphic design, and program code.
15670 @item Blends the power and flexibility of Python with a simple template language
15671 that non-programmers can understand.
15672 @item Gives template writers full access to any Python data structure, module,
15673 function, object, or method in their templates.
15674 @item Makes code reuse easy by providing an object-orientated interface to
15675 templates that is accessible from Python code or other Cheetah templates.
15676 One template can subclass another and selectively reimplement sections of it.
15677 @item Provides a simple, yet powerful, caching mechanism that can dramatically
15678 improve the performance of a dynamic website.
15679 @item Compiles templates into optimized, yet readable, Python code.
15680 @end enumerate")
15681 (license (license:x11-style "file://LICENSE"))))
15682
15683 (define-public python2-cheetah
15684 (package-with-python2 python-cheetah))
15685
15686 (define-public python-dulwich
15687 (package
15688 (name "python-dulwich")
15689 (version "0.19.16")
15690 (source
15691 (origin
15692 (method url-fetch)
15693 (uri (list (string-append "https://www.dulwich.io/releases/"
15694 "dulwich-" version ".tar.gz")
15695 (pypi-uri "dulwich" version)))
15696 (sha256
15697 (base32
15698 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
15699 (build-system python-build-system)
15700 (arguments
15701 `(#:phases
15702 (modify-phases %standard-phases
15703 (add-before 'check 'fix-tests
15704 (lambda* (#:key inputs #:allow-other-keys)
15705 ;; The tests use Popen with a custom environment which doesn't
15706 ;; include PATH.
15707 (substitute* "dulwich/tests/compat/utils.py"
15708 (("'git'") (string-append "'"
15709 (which "git")
15710 "'")))
15711 (substitute* '("dulwich/tests/test_repository.py"
15712 "dulwich/tests/test_hooks.py")
15713 (("#!/bin/sh") (string-append "#!" (which "sh"))))
15714 (setenv "TEST_RUNNER" "unittest")
15715 (setenv "PYTHONHASHSEED" "random")
15716 #t)))))
15717 (propagated-inputs
15718 `(("python-fastimport" ,python-fastimport)
15719 ("python-urllib3" ,python-urllib3)))
15720 (native-inputs
15721 `(("python-mock" ,python-mock)
15722 ("python-geventhttpclient" ,python-geventhttpclient)
15723 ("git" ,git)))
15724 (home-page "https://www.dulwich.io/")
15725 (synopsis "Git implementation in Python")
15726 (description "Dulwich is an implementation of the Git file formats and
15727 protocols written in pure Python.")
15728 ;; Can be used with either license.
15729 (license (list license:asl2.0 license:gpl2+))))
15730
15731 (define-public python-pbkdf2
15732 (package
15733 (name "python-pbkdf2")
15734 (version "1.3")
15735 (source
15736 (origin
15737 (method url-fetch)
15738 (uri (pypi-uri "pbkdf2" version))
15739 (sha256
15740 (base32
15741 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
15742 (build-system python-build-system)
15743 (arguments
15744 '(#:phases
15745 (modify-phases %standard-phases
15746 (replace 'check
15747 (lambda _
15748 (setenv "PYTHONPATH"
15749 (string-append (getcwd) "/build/lib:"
15750 (getenv "PYTHONPATH")))
15751 (invoke "python" "test/test_pbkdf2.py"))))))
15752 (propagated-inputs
15753 `(("python-pycrypto" ,python-pycrypto))) ; optional
15754 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
15755 (synopsis "Password-based key derivation")
15756 (description "This module implements the password-based key derivation
15757 function, PBKDF2, specified in RSA PKCS#5 v2.0.
15758
15759 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
15760 is part of the RSA Public Key Cryptography Standards series. The provided
15761 implementation takes a password or a passphrase and a salt value (and
15762 optionally a iteration count, a digest module, and a MAC module) and provides
15763 a file-like object from which an arbitrarily-sized key can be read.")
15764 (license license:expat)))
15765
15766 (define-public python2-pbkdf2
15767 (package-with-python2 python-pbkdf2))
15768
15769 (define-public python-qrcode
15770 (package
15771 (name "python-qrcode")
15772 (version "6.1")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "qrcode" version))
15777 (sha256
15778 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
15779 (build-system python-build-system)
15780 (arguments
15781 ;; FIXME: Tests require packaging 'pymaging'.
15782 '(#:tests? #f))
15783 (propagated-inputs
15784 `(("python-lxml" ,python-lxml) ; for SVG output
15785 ("python-pillow" ,python-pillow) ; for PNG output
15786 ("python-six" ,python-six)))
15787 (home-page "https://github.com/lincolnloop/python-qrcode")
15788 (synopsis "QR Code image generator")
15789 (description "This package provides a pure Python QR Code generator
15790 module. It uses the Python Imaging Library (PIL) to allow for the generation
15791 of QR Codes.
15792
15793 In addition this package provides a command line tool to generate QR codes and
15794 either write these QR codes to a file or do the output as ascii art at the
15795 console.")
15796 (license license:bsd-3)))
15797
15798 (define-public python2-qrcode
15799 (package-with-python2 python-qrcode))
15800
15801 (define-public python-rst2ansi
15802 (package
15803 (name "python-rst2ansi")
15804 (version "0.1.5")
15805 (source
15806 (origin
15807 (method url-fetch)
15808 (uri (pypi-uri "rst2ansi" version))
15809 (sha256
15810 (base32
15811 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
15812 (build-system python-build-system)
15813 (propagated-inputs
15814 `(("python-docutils" ,python-docutils)))
15815 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
15816 (synopsis "Convert RST to ANSI-decorated console output")
15817 (description
15818 "Python module dedicated to rendering RST (reStructuredText) documents
15819 to ansi-escaped strings suitable for display in a terminal.")
15820 (license license:expat)))
15821
15822 (define-public python-ansi2html
15823 (package
15824 (name "python-ansi2html")
15825 (version "1.2.0")
15826 (source
15827 (origin
15828 (method url-fetch)
15829 (uri (pypi-uri "ansi2html" version))
15830 (sha256
15831 (base32
15832 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
15833 (build-system python-build-system)
15834 (native-inputs
15835 `(("python-mock" ,python-mock)
15836 ("python-nose" ,python-nose)))
15837 (propagated-inputs
15838 `(("python-six" ,python-six)))
15839 (home-page "https://github.com/ralphbean/ansi2html")
15840 (synopsis "Convert ANSI-decorated console output to HTML")
15841 (description
15842 "@command{ansi2html} is a Python library and command line utility for
15843 converting text with ANSI color codes to HTML or LaTeX.")
15844 (license license:gpl3+)))
15845
15846 (define-public python2-ansi2html
15847 (package-with-python2 python-ansi2html))
15848
15849 (define-public python-ddt
15850 (package
15851 (name "python-ddt")
15852 (version "1.4.1")
15853 (source
15854 (origin
15855 (method url-fetch)
15856 (uri (pypi-uri "ddt" version))
15857 (sha256
15858 (base32
15859 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
15860 (build-system python-build-system)
15861 (native-inputs
15862 `(("python-pytest" ,python-pytest)))
15863 (propagated-inputs
15864 `(("python-pyyaml" ,python-pyyaml)))
15865 (home-page "https://github.com/datadriventests/ddt")
15866 (synopsis "Data-Driven Tests")
15867 (description
15868 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
15869 running it with different test data, and make it appear as multiple test
15870 cases.")
15871 (license license:expat)))
15872
15873 (define-public python-pycountry
15874 (package
15875 (name "python-pycountry")
15876 (version "18.5.26")
15877 (source
15878 (origin
15879 (method url-fetch)
15880 (uri (pypi-uri "pycountry" version))
15881 (sha256
15882 (base32
15883 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
15884 (build-system python-build-system)
15885 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15886 (synopsis "ISO databases for languages, countries, currencies, etc.")
15887 (description
15888 "@code{pycountry} provides the ISO databases for the standards:
15889 @enumerate
15890 @item 639-3 (Languages)
15891 @item 3166 (Countries)
15892 @item 3166-3 (Deleted Countries)
15893 @item 3166-2 (Subdivisions of countries)
15894 @item 4217 (Currencies)
15895 @item 15924 (Scripts)
15896 @end enumerate
15897 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15898 through a Python API.")
15899 (license license:lgpl2.1+)))
15900
15901 (define-public python2-pycountry
15902 (package-with-python2 python-pycountry))
15903
15904 (define-public python-pycosat
15905 (package
15906 (name "python-pycosat")
15907 (version "0.6.3")
15908 (source
15909 (origin
15910 (method url-fetch)
15911 (uri (pypi-uri "pycosat" version ".zip"))
15912 (sha256
15913 (base32
15914 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15915 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15916 (build-system python-build-system)
15917 (native-inputs
15918 `(("unzip" ,unzip)))
15919 (home-page "https://github.com/ContinuumIO/pycosat")
15920 (synopsis "Bindings to picosat (a SAT solver)")
15921 (description
15922 "This package provides efficient Python bindings to @code{picosat} on
15923 the C level. When importing pycosat, the @code{picosat} solver becomes part
15924 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15925 Problem} (SAT) solver.")
15926 (license license:expat)))
15927
15928 (define-public python2-pycosat
15929 (package-with-python2 python-pycosat))
15930
15931 (define-public python2-ruamel.ordereddict
15932 (package
15933 (name "python2-ruamel.ordereddict")
15934 (version "0.4.9")
15935 (source
15936 (origin
15937 (method url-fetch)
15938 (uri (pypi-uri "ruamel.ordereddict" version))
15939 (sha256
15940 (base32
15941 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15942 (build-system python-build-system)
15943 (arguments
15944 `(#:python ,python-2
15945 #:phases
15946 (modify-phases %standard-phases
15947 (delete 'check)
15948 (add-after 'install 'check
15949 (lambda* (#:key inputs outputs #:allow-other-keys)
15950 (add-installed-pythonpath inputs outputs)
15951 (invoke "python" "test/testordereddict.py"))))))
15952 (home-page "https://bitbucket.org/ruamel/ordereddict")
15953 (synopsis "Version of dict that keeps keys in insertion order")
15954 (description
15955 "This is an implementation of an ordered dictionary with @dfn{Key
15956 Insertion Order} (KIO: updates of values do not affect the position of the
15957 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15958 removed and put at the back). The standard library module @code{OrderedDict},
15959 implemented later, implements a subset of @code{ordereddict} functionality.
15960 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15961 Order} (KSO, no sorting function can be specified, but a transform can be
15962 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15963 (license license:expat)))
15964
15965 (define-public python-pypeg2
15966 (package
15967 (name "python-pypeg2")
15968 (version "2.15.2")
15969 (source
15970 (origin
15971 (method url-fetch)
15972 (uri (pypi-uri "pyPEG2" version))
15973 (sha256
15974 (base32
15975 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15976 (build-system python-build-system)
15977 (propagated-inputs `(("python-lxml" ,python-lxml)))
15978 (arguments
15979 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15980 '(#:tests? #f))
15981 (home-page "https://fdik.org/pyPEG/")
15982 (synopsis "Parsing Expression Grammars in Python")
15983 (description "PyPEG is an intrinsic parser interpreter framework for
15984 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15985 parse many formal languages.")
15986 (license license:gpl2)))
15987
15988 (define-public python-incremental
15989 (package
15990 (name "python-incremental")
15991 (version "17.5.0")
15992 (source
15993 (origin
15994 (method url-fetch)
15995 (uri (pypi-uri "incremental" version))
15996 (sha256
15997 (base32
15998 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15999 (build-system python-build-system)
16000 (home-page "https://github.com/hawkowl/incremental")
16001 (synopsis "Library for versioning Python projects")
16002 (description "Incremental is a small library that versions your Python
16003 projects.")
16004 (license license:expat)))
16005
16006 (define-public python2-incremental
16007 (package-with-python2 python-incremental))
16008
16009 (define-public python-invoke
16010 (package
16011 (name "python-invoke")
16012 (home-page "https://www.pyinvoke.org/")
16013 (version "1.5.0")
16014 (source (origin
16015 (method url-fetch)
16016 (uri (pypi-uri "invoke" version))
16017 (sha256
16018 (base32
16019 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
16020 (build-system python-build-system)
16021 (arguments
16022 ;; XXX: Requires many dependencies that are not yet in Guix.
16023 `(#:tests? #f
16024 #:phases
16025 (modify-phases %standard-phases
16026 (add-after 'unpack 'fix-bash-path
16027 (lambda* (#:key inputs #:allow-other-keys)
16028 (let ((bash (assoc-ref inputs "bash")))
16029 (substitute* "invoke/config.py"
16030 (("shell = \"/bin/bash\"")
16031 (string-append "shell = \"" bash "/bin/bash\""))
16032 )
16033 #t))))))
16034 (inputs
16035 `(("bash" ,bash-minimal)))
16036 (synopsis "Pythonic task execution")
16037 (description
16038 "Invoke is a Python task execution tool and library, drawing inspiration
16039 from various sources to arrive at a powerful and clean feature set. It is
16040 evolved from the Fabric project, but focuses on local and abstract concerns
16041 instead of servers and network commands.")
16042 (license license:bsd-3)))
16043
16044 (define-public python2-invoke
16045 (package-with-python2 python-invoke))
16046
16047 (define-public python-automat
16048 (package
16049 (name "python-automat")
16050 (version "20.2.0")
16051 (source (origin
16052 (method url-fetch)
16053 (uri (pypi-uri "Automat" version))
16054 (sha256
16055 (base32
16056 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
16057 (build-system python-build-system)
16058 ;; We disable the tests because they require python-twisted, while
16059 ;; python-twisted depends on python-automat. Twisted is optional, but the
16060 ;; tests fail if it is not available. Also see
16061 ;; <https://github.com/glyph/automat/issues/71>.
16062 (arguments '(#:tests? #f))
16063 (native-inputs
16064 `(("python-m2r" ,python-m2r)
16065 ("python-setuptools-scm" ,python-setuptools-scm)
16066 ("python-graphviz" ,python-graphviz)))
16067 (propagated-inputs
16068 `(("python-six" ,python-six)
16069 ("python-attrs" ,python-attrs)))
16070 (home-page "https://github.com/glyph/Automat")
16071 (synopsis "Self-service finite-state machines")
16072 (description "Automat is a library for concise, idiomatic Python
16073 expression of finite-state automata (particularly deterministic finite-state
16074 transducers).")
16075 (license license:expat)))
16076
16077 (define-public python2-automat
16078 (package-with-python2 python-automat))
16079
16080 (define-public python-m2r
16081 (package
16082 (name "python-m2r")
16083 (version "0.2.1")
16084 (source (origin
16085 (method url-fetch)
16086 (uri (pypi-uri "m2r" version))
16087 (sha256
16088 (base32
16089 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
16090 (build-system python-build-system)
16091 (propagated-inputs
16092 `(("python-docutils" ,python-docutils)
16093 ("python-mistune" ,python-mistune)))
16094 (native-inputs
16095 `(("python-pygments" ,python-pygments)
16096 ("python-mock" ,python-mock)))
16097 (home-page "https://github.com/miyakogi/m2r")
16098 (synopsis "Markdown to reStructuredText converter")
16099 (description "M2R converts a markdown file including reST markups to valid
16100 reST format.")
16101 (license license:expat)))
16102
16103 (define-public python2-m2r
16104 (package-with-python2 python-m2r))
16105
16106 (define-public python-constantly
16107 (package
16108 (name "python-constantly")
16109 (version "15.1.0")
16110 (source (origin
16111 (method url-fetch)
16112 (uri (pypi-uri "constantly" version))
16113 (sha256
16114 (base32
16115 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
16116 (build-system python-build-system)
16117 (home-page "https://github.com/twisted/constantly")
16118 (synopsis "Symbolic constants in Python")
16119 (description "Constantly is a Python library that provides symbolic
16120 constant support. It includes collections and constants with text, numeric,
16121 and bit flag values.")
16122 (license license:expat)))
16123
16124 (define-public python2-constantly
16125 (package-with-python2 python-constantly))
16126
16127 (define-public python-attrs
16128 (package
16129 (name "python-attrs")
16130 (version "19.3.0")
16131 (source (origin
16132 (method url-fetch)
16133 (uri (pypi-uri "attrs" version))
16134 (sha256
16135 (base32
16136 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
16137 (build-system python-build-system)
16138 (arguments
16139 `(#:modules ((guix build utils)
16140 (guix build python-build-system)
16141 (ice-9 ftw)
16142 (srfi srfi-1)
16143 (srfi srfi-26))
16144 #:phases (modify-phases %standard-phases
16145 (replace 'check
16146 (lambda _
16147 (let ((cwd (getcwd)))
16148 (setenv "PYTHONPATH"
16149 (string-append
16150 cwd "/build/"
16151 (find (cut string-prefix? "lib" <>)
16152 (scandir (string-append cwd "/build")))
16153 ":"
16154 (getenv "PYTHONPATH")))
16155 (invoke "python" "-m" "pytest")))))))
16156 (native-inputs
16157 `(("python-coverage" ,python-coverage)
16158 ("python-hypothesis" ,python-hypothesis)
16159 ("python-pympler" ,python-pympler)
16160 ("python-pytest" ,python-pytest)
16161 ("python-six" ,python-six)
16162 ("python-sphinx" ,python-sphinx)
16163 ("python-zope-interface" ,python-zope-interface)))
16164 (home-page "https://github.com/python-attrs/attrs/")
16165 (synopsis "Attributes without boilerplate")
16166 (description "@code{attrs} is a Python package with class decorators that
16167 ease the chores of implementing the most common attribute-related object
16168 protocols.")
16169 (license license:expat)))
16170
16171 (define-public python2-attrs
16172 (package-with-python2 python-attrs))
16173
16174 (define-public python-attrs-bootstrap
16175 (package
16176 (inherit python-attrs)
16177 (name "python-attrs-bootstrap")
16178 (native-inputs `())
16179 (arguments `(#:tests? #f))))
16180
16181 (define-public python2-attrs-bootstrap
16182 (package-with-python2 python-attrs-bootstrap))
16183
16184 (define-public python2-cliapp
16185 (package
16186 (name "python2-cliapp")
16187 (version "1.20180812.1")
16188 (source
16189 (origin
16190 (method url-fetch)
16191 (uri (string-append
16192 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
16193 version ".tar.gz"))
16194 (sha256
16195 (base32
16196 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
16197 (build-system python-build-system)
16198 (arguments
16199 `(#:python ,python-2
16200 #:phases
16201 (modify-phases %standard-phases
16202 ;; check phase needs to be run before the build phase. If not,
16203 ;; coverage-test-runner looks for tests for the built source files,
16204 ;; and fails.
16205 (delete 'check)
16206 (add-before 'build 'check
16207 (lambda _
16208 ;; Disable python3 tests
16209 (substitute* "check"
16210 (("python3") "# python3"))
16211 (invoke "./check"))))))
16212 (native-inputs
16213 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
16214 ("python2-pep8" ,python2-pep8)))
16215 (propagated-inputs
16216 `(("python2-pyaml" ,python2-pyaml)))
16217 (home-page "https://liw.fi/cliapp/")
16218 (synopsis "Python framework for command line programs")
16219 (description "@code{python2-cliapp} is a python framework for
16220 command line programs. It contains the typical stuff such programs
16221 need to do, such as parsing the command line for options, and
16222 iterating over input files.")
16223 (license license:gpl2+)))
16224
16225 (define-public python2-ttystatus
16226 (package
16227 (name "python2-ttystatus")
16228 (version "0.38")
16229 (source
16230 (origin
16231 (method git-fetch)
16232 (uri (git-reference
16233 (url "http://git.liw.fi/ttystatus")
16234 ;; There are no tags after ttystatus-0.36.
16235 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
16236 (sha256
16237 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
16238 (file-name (git-file-name name version))))
16239 (build-system python-build-system)
16240 (native-inputs
16241 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
16242 ("python2-pep8" ,python2-pep8)))
16243 (arguments
16244 `(#:python ,python-2
16245 #:phases
16246 (modify-phases %standard-phases
16247 ;; check phase needs to be run before the build phase. If not,
16248 ;; coverage-test-runner looks for tests for the built source files,
16249 ;; and fails.
16250 (delete 'check)
16251 (add-before 'build 'check
16252 (lambda _ (invoke "make" "check"))))))
16253 (home-page "https://liw.fi/ttystatus/")
16254 (synopsis "Python library for showing progress reporting and
16255 status updates on terminals")
16256 (description "@code{python2-ttystatus} is a python library for
16257 showing progress reporting and status updates on terminals, for
16258 command line programs. Output is automatically adapted to the width
16259 of the terminal: truncated if it does not fit, and resized if the
16260 terminal size changes.")
16261 (license license:gpl3+)))
16262
16263 (define-public python2-tracing
16264 (package
16265 (name "python2-tracing")
16266 (version "0.10")
16267 (source
16268 (origin
16269 (method url-fetch)
16270 (uri (string-append
16271 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
16272 version ".tar.gz"))
16273 (sha256
16274 (base32
16275 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
16276 (build-system python-build-system)
16277 (arguments
16278 `(#:python ,python-2))
16279 (home-page "https://liw.fi/tracing/")
16280 (synopsis "Python debug logging helper")
16281 (description "@code{python2-tracing} is a python library for
16282 logging debug messages. It provides a way to turn debugging messages
16283 on and off, based on the filename they occur in. It is much faster
16284 than using @code{logging.Filter} to accomplish the same thing, which
16285 matters when code is run in production mode. The actual logging still
16286 happens using the @code{logging} library.")
16287 (license license:gpl3+)))
16288
16289 (define-public python2-larch
16290 (package
16291 (name "python2-larch")
16292 (version "1.20151025")
16293 (source
16294 (origin
16295 (method url-fetch)
16296 (uri (string-append
16297 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
16298 version ".tar.gz"))
16299 (patches (search-patches
16300 "python2-larch-coverage-4.0a6-compatibility.patch"))
16301 (sha256
16302 (base32
16303 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
16304 (build-system python-build-system)
16305 (arguments
16306 `(#:python ,python-2
16307 #:phases
16308 (modify-phases %standard-phases
16309 ;; check phase needs to be run before the build phase. If not,
16310 ;; coverage-test-runner looks for tests for the built source files,
16311 ;; and fails.
16312 (delete 'check)
16313 (add-before 'build 'check
16314 (lambda _ (invoke "make" "check"))))))
16315 (native-inputs
16316 `(("cmdtest" ,cmdtest)
16317 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
16318 (propagated-inputs
16319 `(("python2-tracing" ,python2-tracing)))
16320 (home-page "https://liw.fi/larch/")
16321 (synopsis "Python copy-on-write B-tree library")
16322 (description "@code{python2-larch} is an implementation of
16323 particular kind of B-tree, based on research by Ohad Rodeh. See
16324 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
16325 on the data structure.
16326
16327 The distinctive feature of this B-tree is that a node is never
16328 (conceptually) modified. Instead, all updates are done by
16329 copy-on-write. This makes it easy to clone a tree, and modify only the
16330 clone, while other processes access the original tree.")
16331 (license license:gpl3+)))
16332
16333 (define-public python-astroid
16334 (package
16335 (name "python-astroid")
16336 (version "2.4.2")
16337 (source
16338 (origin
16339 (method url-fetch)
16340 (uri (pypi-uri "astroid" version))
16341 (sha256
16342 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
16343 (modules '((guix build utils)))
16344 (snippet
16345 '(begin
16346 ;; Check to see if the version pinning has been removed.
16347 (substitute* "astroid/__pkginfo__.py"
16348 (("==1\\.4\\.\\*") ">=1.4.0"))
16349 #t))))
16350 (build-system python-build-system)
16351 (propagated-inputs
16352 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
16353 ("python-six" ,python-six)
16354 ("python-wrapt" ,python-wrapt)))
16355 (native-inputs
16356 `(("python-dateutil" ,python-dateutil)
16357 ("python-pytest" ,python-pytest)
16358 ("python-pytest-runner" ,python-pytest-runner)))
16359 (home-page "https://github.com/PyCQA/astroid")
16360 (synopsis "Common base representation of python source code for pylint and
16361 other projects")
16362 (description "@code{python-astroid} provides a common base representation
16363 of python source code for projects such as pychecker, pyreverse, pylint, etc.
16364
16365 It provides a compatible representation which comes from the _ast module. It
16366 rebuilds the tree generated by the builtin _ast module by recursively walking
16367 down the AST and building an extended ast. The new node classes have
16368 additional methods and attributes for different usages. They include some
16369 support for static inference and local name scopes. Furthermore, astroid
16370 builds partial trees by inspecting living objects.")
16371 (license license:lgpl2.1+)
16372 (properties `((python2-variant . ,(delay python2-astroid))))))
16373
16374 (define-public python2-astroid
16375 (let ((base (package-with-python2
16376 (strip-python2-variant python-astroid))))
16377 (package (inherit base)
16378 ;; Version 2.x removes python2 support.
16379 (version "1.6.5")
16380 (source
16381 (origin
16382 (method url-fetch)
16383 (uri (pypi-uri "astroid" version))
16384 (sha256
16385 (base32
16386 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
16387 (arguments
16388 (substitute-keyword-arguments (package-arguments base)
16389 ((#:phases phases)
16390 `(modify-phases ,phases
16391 (add-after 'unpack 'remove-spurious-test
16392 (lambda _
16393 ;; https://github.com/PyCQA/astroid/issues/276
16394 (delete-file "astroid/tests/unittest_brain.py")
16395 #t))
16396 (replace 'check
16397 (lambda _
16398 (invoke"python" "-m" "unittest" "discover"
16399 "-p" "unittest*.py")))))))
16400 (native-inputs `())
16401 (propagated-inputs
16402 `(("python2-backports-functools-lru-cache"
16403 ,python2-backports-functools-lru-cache)
16404 ("python2-enum34" ,python2-enum34)
16405 ("python2-singledispatch" ,python2-singledispatch)
16406 ,@(alist-delete "python-typed-ast"
16407 (package-propagated-inputs base)))))))
16408
16409 (define-public python-isbnlib
16410 (package
16411 (name "python-isbnlib")
16412 (version "3.10.4")
16413 (source
16414 (origin
16415 (method url-fetch)
16416 (uri (pypi-uri "isbnlib" version))
16417 (sha256
16418 (base32
16419 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
16420 (build-system python-build-system)
16421 (arguments '(#:tests? #f)) ; No test
16422 (home-page "https://github.com/xlcnd/isbnlib")
16423 (synopsis "Python library to work with ISBN strings")
16424 (description "@code{python-isbnlib} is a (pure) python library that provides
16425 several useful methods and functions to validate, clean, transform, hyphenate and
16426 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
16427 version, is suitable to be include as a dependency in other projects.")
16428 (license license:lgpl3+)))
16429
16430 (define-public python-isort
16431 (package
16432 (name "python-isort")
16433 (version "4.3.4")
16434 (source
16435 (origin
16436 (method git-fetch)
16437 (uri (git-reference
16438 ;; Tests pass only from the Github sources
16439 (url "https://github.com/timothycrosley/isort")
16440 (commit version)))
16441 (file-name (git-file-name name version))
16442 (sha256
16443 (base32
16444 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
16445 (build-system python-build-system)
16446 (native-inputs
16447 `(("python-mock" ,python-mock)
16448 ("python-pytest" ,python-pytest)))
16449 (home-page "https://github.com/timothycrosley/isort")
16450 (synopsis "Python utility/library to sort python imports")
16451 (description "@code{python-isort} is a python utility/library to sort
16452 imports alphabetically, and automatically separated into sections. It
16453 provides a command line utility, a python library and plugins for various
16454 editors.")
16455 (license license:expat)
16456 (properties `((python2-variant . ,(delay python2-isort))))))
16457
16458 (define-public python2-isort
16459 (let ((base (package-with-python2
16460 (strip-python2-variant python-isort))))
16461 (package/inherit base
16462 (native-inputs
16463 `(("python2-futures" ,python2-futures)
16464 ,@(package-native-inputs base))))))
16465
16466 (define-public python2-backports-functools-lru-cache
16467 (package
16468 (name "python2-backports-functools-lru-cache")
16469 (version "1.6.1")
16470 (source
16471 (origin
16472 (method url-fetch)
16473 ;; only the pypi tarballs contain the necessary metadata
16474 (uri (pypi-uri "backports.functools_lru_cache" version))
16475 (sha256
16476 (base32
16477 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
16478 (build-system python-build-system)
16479 (native-inputs
16480 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
16481 (arguments
16482 `(#:python ,python-2))
16483 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
16484 (synopsis "Backport of functools.lru_cache from Python 3.3")
16485 (description "@code{python2-backports-functools-lru-cache} is a backport
16486 of @code{functools.lru_cache} from python 3.3.")
16487 (license license:expat)))
16488
16489 (define-public python-configparser
16490 (package
16491 (name "python-configparser")
16492 (version "4.0.2")
16493 (source
16494 (origin
16495 (method url-fetch)
16496 (uri (pypi-uri "configparser" version))
16497 (sha256
16498 (base32
16499 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
16500 (native-inputs
16501 `(("python-setuptools_scm" ,python-setuptools-scm)))
16502 (build-system python-build-system)
16503 (home-page "https://github.com/jaraco/configparser/")
16504 (synopsis "Backport of configparser from python 3.5")
16505 (description "@code{python-configparser} is a backport of
16506 @code{configparser} from Python 3.5 so that it can be used directly
16507 in other versions.")
16508 (license license:expat)))
16509
16510 (define-public python2-configparser
16511 (package-with-python2 python-configparser))
16512
16513 (define-public python-iniconfig
16514 (package
16515 (name "python-iniconfig")
16516 (version "1.1.1")
16517 (source
16518 (origin
16519 (method url-fetch)
16520 (uri (pypi-uri "iniconfig" version))
16521 (sha256
16522 (base32
16523 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
16524 (build-system python-build-system)
16525 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
16526 (synopsis "Simple INI-file parser")
16527 (description "The @code{iniconfig} package provides a small and simple
16528 INI-file parser module having a unique set of features; @code{iniconfig}
16529 @itemize
16530 @item maintains the order of sections and entries;
16531 @item supports multi-line values with or without line-continuations;
16532 @item supports \"#\" comments everywhere;
16533 @item raises errors with proper line-numbers;
16534 @item raises an error when two sections have the same name.
16535 @end itemize")
16536 (license license:expat)))
16537
16538 (define-public python-mamba
16539 (package
16540 (name "python-mamba")
16541 (version "0.11.2")
16542 (source (origin
16543 (method url-fetch)
16544 (uri (pypi-uri "mamba" version))
16545 (sha256
16546 (base32
16547 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
16548 (build-system python-build-system)
16549 (arguments `(#:tests? #f)) ; No test
16550 (propagated-inputs
16551 `(("python-clint" ,python-clint)
16552 ("python-coverage" ,python-coverage)))
16553 (home-page "https://nestorsalceda.com/mamba/")
16554 (synopsis "Test runner for Python")
16555 (description
16556 "Mamba is a Behaviour-Driven Development tool for Python developers.
16557 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
16558 (license license:expat)))
16559
16560 (define-public python-mando
16561 (package
16562 (name "python-mando")
16563 (version "0.6.4")
16564 (source (origin
16565 (method url-fetch)
16566 (uri (pypi-uri "mando" version))
16567 (sha256
16568 (base32
16569 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
16570 (build-system python-build-system)
16571 (propagated-inputs
16572 `(("python-rst2ansi" ,python-rst2ansi)
16573 ("python-six" ,python-six)))
16574 (native-inputs
16575 `(("python-pytest" ,python-pytest)))
16576 (home-page "https://mando.readthedocs.org/")
16577 (synopsis
16578 "Wrapper around argparse, allowing creation of complete CLI applications")
16579 (description
16580 "This package is a wrapper around argparse, allowing you to write complete CLI
16581 applications in seconds while maintaining all the flexibility.")
16582 (license license:expat)))
16583
16584 (define-public python2-mando
16585 (package-with-python2 python-mando))
16586
16587 (define-public python2-argparse
16588 (package
16589 (name "python2-argparse")
16590 (version "1.4.0")
16591 (source
16592 (origin
16593 (method url-fetch)
16594 (uri (pypi-uri "argparse" version))
16595 (sha256
16596 (base32
16597 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
16598 (build-system python-build-system)
16599 (arguments
16600 `(#:python ,python-2))
16601 (home-page "https://github.com/ThomasWaldmann/argparse/")
16602 (synopsis "Python command-line parsing library")
16603 (description
16604 "This package is mostly for people who want to have @code{argparse} on
16605 older Pythons because it was not part of the standard library back then.")
16606 (license license:psfl)))
16607
16608 (define-public python-fudge
16609 (package
16610 (name "python-fudge")
16611 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
16612 ;; package, which is currently the only use of this package.
16613 (version "0.9.6")
16614 (source
16615 (origin
16616 (method url-fetch)
16617 (uri (pypi-uri "fudge" version))
16618 (sha256
16619 (base32
16620 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
16621 (build-system python-build-system)
16622 (arguments
16623 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
16624 (home-page "https://github.com/fudge-py/fudge")
16625 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
16626 (description
16627 "Fudge is a Python module for using fake objects (mocks and stubs) to
16628 test real ones.
16629
16630 In readable Python code, you declare the methods available on your fake object
16631 and how they should be called. Then you inject that into your application and
16632 start testing. This declarative approach means you don’t have to record and
16633 playback actions and you don’t have to inspect your fakes after running code.
16634 If the fake object was used incorrectly then you’ll see an informative
16635 exception message with a traceback that points to the culprit.")
16636 (license license:expat)))
16637
16638 (define-public python2-fudge
16639 (package-with-python2 python-fudge))
16640
16641 (define-public python-mwclient
16642 (package
16643 (name "python-mwclient")
16644 (version "0.10.1")
16645 (source
16646 (origin
16647 (method git-fetch)
16648 ;; The PyPI version wouldn't contain tests.
16649 (uri (git-reference
16650 (url "https://github.com/mwclient/mwclient")
16651 (commit (string-append "v" version))))
16652 (file-name (git-file-name name version))
16653 (sha256
16654 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
16655 (build-system python-build-system)
16656 (propagated-inputs
16657 `(("python-requests-oauthlib" ,python-requests-oauthlib)
16658 ("python-six" ,python-six)))
16659 (native-inputs
16660 `(("python-mock" ,python-mock)
16661 ("python-pytest" ,python-pytest)
16662 ("python-pytest-cov" ,python-pytest-cov)
16663 ("python-pytest-runner" ,python-pytest-runner)
16664 ("python-responses" ,python-responses)))
16665 (home-page "https://github.com/btongminh/mwclient")
16666 (synopsis "MediaWiki API client")
16667 (description "This package provides a MediaWiki API client.")
16668 (license license:expat)))
16669
16670 (define-public python-utils
16671 (package
16672 (name "python-utils")
16673 (version "2.4.0")
16674 (source (origin
16675 (method url-fetch)
16676 (uri (pypi-uri "python-utils" version))
16677 (sha256
16678 (base32
16679 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
16680 (build-system python-build-system)
16681 (arguments
16682 `(#:phases
16683 (modify-phases %standard-phases
16684 (replace 'check
16685 (lambda* (#:key inputs outputs #:allow-other-keys)
16686 (add-installed-pythonpath inputs outputs)
16687 (delete-file "pytest.ini")
16688 (invoke "pytest" "-vv"))))))
16689 (native-inputs
16690 `(("pytest-runner" ,python-pytest-runner)
16691 ("pytest" ,python-pytest)
16692 ("six" ,python-six)))
16693 (home-page "https://github.com/WoLpH/python-utils")
16694 (synopsis "Convenient utilities not included with the standard Python install")
16695 (description
16696 "Python Utils is a collection of small Python functions and classes which
16697 make common patterns shorter and easier.")
16698 (license license:bsd-2)))
16699
16700 (define-public python-diff-match-patch
16701 (package
16702 (name "python-diff-match-patch")
16703 (version "20121119")
16704 (source
16705 (origin
16706 (method url-fetch)
16707 (uri (pypi-uri "diff-match-patch" version))
16708 (sha256
16709 (base32
16710 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
16711 (build-system python-build-system)
16712 (home-page "https://code.google.com/p/google-diff-match-patch")
16713 (synopsis "Synchronize plain text")
16714 (description "Diff Match and Patch libraries offer robust algorithms to
16715 perform the operations required for synchronizing plain text.")
16716 (license license:asl2.0)))
16717
16718 (define-public python2-diff-match-patch
16719 (package-with-python2 python-diff-match-patch))
16720
16721 (define-public python-dirsync
16722 (package
16723 (name "python-dirsync")
16724 (version "2.2.5")
16725 (source
16726 (origin
16727 (method url-fetch)
16728 (uri (pypi-uri "dirsync" version))
16729 (sha256
16730 (base32
16731 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
16732 (build-system python-build-system)
16733 (propagated-inputs
16734 `(("six" ,python-six)))
16735 (home-page "https://github.com/tkhyn/dirsync")
16736 (synopsis "Advanced directory tree synchronisation tool")
16737 (description "Advanced directory tree synchronisation tool.")
16738 (license license:expat)))
16739
16740 (define-public python2-dirsync
16741 (package-with-python2 python-dirsync))
16742
16743 (define-public python-levenshtein
16744 (package
16745 (name "python-levenshtein")
16746 (version "0.12.0")
16747 (source
16748 (origin
16749 (method url-fetch)
16750 (uri (pypi-uri "python-Levenshtein" version))
16751 (sha256
16752 (base32
16753 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
16754 (build-system python-build-system)
16755 (home-page "https://github.com/ztane/python-Levenshtein")
16756 (synopsis "Fast computation of Levenshtein distance and string similarity")
16757 (description
16758 "The Levenshtein Python C extension module contains functions for fast computation of
16759 @enumerate
16760 @item Levenshtein (edit) distance, and edit operations
16761 @item string similarity
16762 @item approximate median strings, and generally string averaging
16763 @item string sequence and set similarity
16764 @end enumerate
16765 It supports both normal and Unicode strings.")
16766 (license license:gpl2+)))
16767
16768 (define-public python2-levenshtein
16769 (package-with-python2 python-levenshtein))
16770
16771 (define-public python-scandir
16772 (package
16773 (name "python-scandir")
16774 (version "1.10.0")
16775 (source
16776 (origin
16777 (method url-fetch)
16778 (uri (pypi-uri "scandir" version))
16779 (sha256
16780 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
16781 (build-system python-build-system)
16782 (arguments
16783 `(#:phases (modify-phases %standard-phases
16784 (replace 'check
16785 (lambda _
16786 (invoke "python" "test/run_tests.py"))))))
16787 (home-page "https://github.com/benhoyt/scandir")
16788 (synopsis "Directory iteration function")
16789 (description
16790 "Directory iteration function like os.listdir(), except that instead of
16791 returning a list of bare filenames, it yields DirEntry objects that include
16792 file type and stat information along with the name. Using scandir() increases
16793 the speed of os.walk() by 2-20 times (depending on the platform and file
16794 system) by avoiding unnecessary calls to os.stat() in most cases.
16795
16796 This package is part of the Python standard library since version 3.5.")
16797 (license license:bsd-3)))
16798
16799 (define-public python2-scandir
16800 (package-with-python2 python-scandir))
16801
16802 (define-public python2-stemming
16803 (package
16804 (name "python2-stemming")
16805 (version "1.0.1")
16806 (source
16807 (origin
16808 (method url-fetch)
16809 (uri (pypi-uri "stemming" version))
16810 (sha256
16811 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
16812 (build-system python-build-system)
16813 (arguments
16814 `(#:python ,python-2))
16815 (home-page "https://bitbucket.org/mchaput/stemming/overview")
16816 (synopsis "Python implementations of various stemming algorithms")
16817 (description
16818 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
16819 stemming algorithms for English. These implementations are straightforward and
16820 efficient, unlike some Python versions of the same algorithms available on the
16821 Web. This package is an extraction of the stemming code included in the Whoosh
16822 search engine.")
16823 (license license:public-domain)))
16824
16825 (define-public python-factory-boy
16826 (package
16827 (name "python-factory-boy")
16828 (version "2.8.1")
16829 (source
16830 (origin
16831 (method url-fetch)
16832 (uri (pypi-uri "factory_boy" version))
16833 (sha256
16834 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
16835 (build-system python-build-system)
16836 (arguments
16837 ;; Tests are not included in the tarball.
16838 `(#:tests? #f))
16839 (propagated-inputs
16840 `(("faker" ,python-faker)))
16841 (home-page "https://github.com/benhoyt/scandir")
16842 (synopsis "Versatile test fixtures replacement")
16843 (description
16844 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
16845
16846 As a fixtures replacement tool, it aims to replace static, hard to maintain
16847 fixtures with easy-to-use factories for complex object.
16848
16849 Instead of building an exhaustive test setup with every possible combination
16850 of corner cases, factory_boy allows you to use objects customized for the
16851 current test, while only declaring the test-specific fields")
16852 (license license:expat)))
16853
16854 (define-public python2-factory-boy
16855 (package-with-python2 python-factory-boy))
16856
16857 (define-public python-translate-toolkit
16858 (package
16859 (name "python-translate-toolkit")
16860 (version "2.1.0")
16861 (source
16862 (origin
16863 (method url-fetch)
16864 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
16865 (sha256
16866 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
16867 (build-system python-build-system)
16868 (native-inputs
16869 `(("python-pytest" ,python-pytest)
16870 ("python-sphinx" ,python-sphinx)))
16871 (propagated-inputs
16872 `(("python-babel" ,python-babel)
16873 ("python-beautifulsoup4" ,python-beautifulsoup4)
16874 ("python-chardet" ,python-chardet)
16875 ("python-diff-match-patch" ,python-diff-match-patch)
16876 ("python-levenshtein" ,python-levenshtein)
16877 ("python-lxml" ,python-lxml)
16878 ("python-six" ,python-six)
16879 ("python-vobject" ,python-vobject)
16880 ("python-pyyaml" ,python-pyyaml)))
16881 (arguments
16882 ;; TODO: tests are not run, because they end with
16883 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
16884 ;; 'parse_funcs'
16885 ;; during test setup.
16886 `(#:tests? #f))
16887 (home-page "https://toolkit.translatehouse.org")
16888 (synopsis "Tools and API for translation and localization engineering")
16889 (description
16890 "Tools and API for translation and localization engineering. It contains
16891 several utilities, as well as an API for building localization tools.")
16892 (license license:gpl2+)))
16893
16894 (define-public python2-translate-toolkit
16895 (package-with-python2 python-translate-toolkit))
16896
16897 (define-public python-packaging
16898 (package
16899 (name "python-packaging")
16900 (version "20.0")
16901 (source
16902 (origin
16903 (method url-fetch)
16904 (uri (pypi-uri "packaging" version))
16905 ;; XXX: The URL in the patch file is wrong, it should be
16906 ;; <https://github.com/pypa/packaging/pull/256>.
16907 (patches (search-patches "python-packaging-test-arch.patch"))
16908 (sha256
16909 (base32
16910 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16911 (build-system python-build-system)
16912 (arguments
16913 `(#:phases (modify-phases %standard-phases
16914 (replace 'check
16915 (lambda* (#:key tests? #:allow-other-keys)
16916 (if tests?
16917 (invoke "py.test" "-vv")
16918 (format #t "test suite not run~%"))
16919 #t)))))
16920 (native-inputs
16921 `(("python-pretend" ,python-pretend)
16922 ("python-pytest" ,python-pytest)))
16923 (propagated-inputs
16924 `(("python-pyparsing" ,python-pyparsing)
16925 ("python-six" ,python-six)))
16926 (home-page "https://github.com/pypa/packaging")
16927 (synopsis "Core utilities for Python packages")
16928 (description "Packaging is a Python module for dealing with Python packages.
16929 It offers an interface for working with package versions, names, and dependency
16930 information.")
16931 ;; From 'LICENSE': This software is made available under the terms of
16932 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16933 ;; Contributions to this software is made under the terms of *both* these
16934 ;; licenses.
16935 (license (list license:asl2.0 license:bsd-2))))
16936
16937 (define-public python2-packaging
16938 (package-with-python2 python-packaging))
16939
16940 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16941 (define-public python-packaging-bootstrap
16942 (hidden-package
16943 (package/inherit
16944 python-packaging
16945 (name "python-packaging-bootstrap")
16946 (native-inputs '())
16947 (propagated-inputs
16948 `(("python-pyparsing" ,python-pyparsing)))
16949 (arguments '(#:tests? #f)))))
16950
16951 (define-public python2-packaging-bootstrap
16952 (hidden-package
16953 (package/inherit
16954 python2-packaging
16955 (name "python2-packaging-bootstrap")
16956 (native-inputs '())
16957 (propagated-inputs
16958 `(("python-pyparsing" ,python2-pyparsing)))
16959 (arguments
16960 `(#:tests? #f
16961 ,@(package-arguments python2-packaging))))))
16962
16963 (define-public python-relatorio
16964 (package
16965 (name "python-relatorio")
16966 (version "0.8.0")
16967 (source
16968 (origin
16969 (method url-fetch)
16970 (uri (pypi-uri "relatorio" version))
16971 (sha256
16972 (base32
16973 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16974 (build-system python-build-system)
16975 (propagated-inputs
16976 `(("python-lxml" ,python-lxml)
16977 ("python-genshi" ,python-genshi)))
16978 (native-inputs
16979 `(("python-magic" ,python-magic)))
16980 (home-page "https://relatorio.tryton.org/")
16981 (synopsis "Templating library able to output ODT and PDF files")
16982 (description "Relatorio is a templating library which provides a way to
16983 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16984 for more filetypes can be easily added by creating plugins for them.")
16985 (license license:gpl3+)))
16986
16987 (define-public python2-relatorio
16988 (package-with-python2 python-relatorio))
16989
16990 (define-public python-radon
16991 (package
16992 (name "python-radon")
16993 (version "4.1.0")
16994 (source
16995 (origin
16996 (method url-fetch)
16997 (uri (pypi-uri "radon" version))
16998 (sha256
16999 (base32
17000 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
17001 (build-system python-build-system)
17002 (arguments
17003 `(#:phases (modify-phases %standard-phases
17004 (replace 'check
17005 (lambda _
17006 (invoke "python" "radon/tests/run.py"))))))
17007 (propagated-inputs
17008 `(("python-colorama" ,python-colorama)
17009 ("python-flake8-polyfill" ,python-flake8-polyfill)
17010 ("python-mando" ,python-mando)))
17011 (native-inputs
17012 `(("python-pytest" ,python-pytest)
17013 ("python-pytest-mock" ,python-pytest-mock)))
17014 (home-page "https://radon.readthedocs.org/")
17015 (synopsis "Code Metrics in Python")
17016 (description "Radon is a Python tool which computes various code metrics.
17017 Supported metrics are:
17018 @itemize @bullet
17019 @item raw metrics: SLOC, comment lines, blank lines, &c.
17020 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
17021 @item Halstead metrics (all of them)
17022 @item the Maintainability Index (a Visual Studio metric)
17023 @end itemize")
17024 (properties `((python2-variant . ,(delay python2-radon))))
17025 (license license:expat)))
17026
17027 (define-public python2-radon
17028 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
17029 (package/inherit base
17030 (propagated-inputs
17031 `(("python-configparser" ,python2-configparser)
17032 ("python-future" ,python2-future)
17033 ,@(package-propagated-inputs base))))))
17034
17035 (define-public python-sure
17036 (package
17037 (name "python-sure")
17038 (version "1.4.11")
17039 (source
17040 (origin
17041 (method url-fetch)
17042 (uri (pypi-uri "sure" version))
17043 (sha256
17044 (base32
17045 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
17046 (build-system python-build-system)
17047 (propagated-inputs
17048 `(("python-mock" ,python-mock)
17049 ("python-six" ,python-six)))
17050 (native-inputs
17051 `(("python-nose" ,python-nose)))
17052 (home-page "https://github.com/gabrielfalcao/sure")
17053 (synopsis "Automated testing library in python for python")
17054 (description
17055 "Sure is a python library that leverages a DSL for writing assertions.
17056 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
17057 (license license:gpl3+)))
17058
17059 (define-public python2-sure
17060 (package-with-python2 python-sure))
17061
17062 (define-public python2-couleur
17063 ;; This package does not seem to support python3 at all, hence,
17064 ;; only the python2 variant definition is provided.
17065 (package
17066 (name "python2-couleur")
17067 (version "0.6.2")
17068 (source
17069 (origin
17070 (method url-fetch)
17071 (uri (pypi-uri "couleur" version))
17072 (sha256
17073 (base32
17074 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
17075 (build-system python-build-system)
17076 (arguments
17077 `(#:python ,python-2))
17078 (home-page "https://github.com/gabrielfalcao/couleur")
17079 (synopsis
17080 "ANSI terminal tool for python, colored shell and other handy fancy features")
17081 (description
17082 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
17083 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
17084 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
17085 ;; https://github.com/gabrielfalcao/couleur/issues/11
17086 (license license:lgpl3+)))
17087
17088 (define-public python-misaka
17089 (package
17090 (name "python-misaka")
17091 (version "2.1.1")
17092 (source
17093 (origin
17094 (method url-fetch)
17095 (uri (pypi-uri "misaka" version))
17096 (sha256
17097 (base32
17098 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
17099 (build-system python-build-system)
17100 (arguments
17101 `(;; Line 37 of setup.py calls self.run_command('develop')
17102 ;; in the 'check' phase. This command seems to be trying
17103 ;; to write to
17104 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
17105 ;; for which it does not have the permission to write.
17106 #:tests? #f))
17107 (propagated-inputs
17108 `(("python-cffi" ,python-cffi)))
17109 (home-page "https://github.com/FSX/misaka")
17110 (synopsis "Python binding for Hoedown")
17111 (description
17112 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
17113 library written in C. It features a fast HTML renderer and functionality to make custom
17114 renderers (e.g. man pages or LaTeX).")
17115 (license license:expat)))
17116
17117 (define-public python2-misaka
17118 (package-with-python2 python-misaka))
17119
17120 (define-public python2-steadymark
17121 ;; This is forced into being a python2 only variant
17122 ;; due to its dependence on couleur that has no support
17123 ;; for python3
17124 (package
17125 (name "python2-steadymark")
17126 (version "0.7.3")
17127 (source
17128 (origin
17129 (method url-fetch)
17130 (uri (pypi-uri "steadymark" version))
17131 (sha256
17132 (base32
17133 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
17134 (build-system python-build-system)
17135 (native-inputs
17136 `(("python-couleur" ,python2-couleur)
17137 ("python-sure" ,python2-sure)
17138 ("python-misaka" ,python2-misaka)))
17139 (arguments
17140 `(#:python ,python-2
17141 #:phases
17142 (modify-phases %standard-phases
17143 (add-before 'build 'patch-setup-py
17144 (lambda _
17145 ;; Update requirements from dependency==version
17146 ;; to dependency>=version
17147 (substitute* "setup.py"
17148 (("==") ">="))
17149 #t)))))
17150 (home-page "https://github.com/gabrielfalcao/steadymark")
17151 (synopsis "Markdown-based test runner for python")
17152 (description
17153 "@code{Steadymark} allows documentation to be written in github-flavoured
17154 markdown. The documentation may contain snippets of code surrounded by python
17155 code blocks and @code{Steadymark} will find these snippets and run them, making
17156 sure that there are no old malfunctional examples in the documentation examples.")
17157 (license license:expat)))
17158
17159 (define-public python-jsonpointer
17160 (package
17161 (name "python-jsonpointer")
17162 (version "1.10")
17163 (source
17164 (origin
17165 (method url-fetch)
17166 (uri (pypi-uri "jsonpointer" version))
17167 (sha256
17168 (base32
17169 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
17170 (build-system python-build-system)
17171 (home-page "https://github.com/stefankoegl/python-json-pointer")
17172 (synopsis "Identify specific nodes in a JSON document")
17173 (description "@code{jsonpointer} allows you to access specific nodes
17174 by path in a JSON document (see RFC 6901).")
17175 (license license:bsd-3)))
17176
17177 (define-public python2-jsonpointer
17178 (package-with-python2 python-jsonpointer))
17179
17180 (define-public python-jsonpatch
17181 (package
17182 (name "python-jsonpatch")
17183 (version "1.16")
17184 (source
17185 (origin
17186 (method git-fetch)
17187 ;; pypi version lacks tests.js
17188 (uri (git-reference
17189 (url "https://github.com/stefankoegl/python-json-patch")
17190 (commit (string-append "v" version))))
17191 (file-name (git-file-name name version))
17192 (sha256
17193 (base32
17194 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
17195 (build-system python-build-system)
17196 (propagated-inputs
17197 `(("python-jsonpointer" ,python-jsonpointer)))
17198 (home-page "https://github.com/stefankoegl/python-json-patch")
17199 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
17200 (description "@code{jsonpatch} is a library and program that allows
17201 applying JSON Patches according to RFC 6902.")
17202 (license license:bsd-3)))
17203
17204 (define-public python2-jsonpatch
17205 (package-with-python2 python-jsonpatch))
17206
17207 (define-public python-jsonpatch-0.4
17208 (package (inherit python-jsonpatch)
17209 (name "python-jsonpatch")
17210 (version "0.4")
17211 (source
17212 (origin
17213 (method git-fetch)
17214 (uri (git-reference
17215 (url "https://github.com/stefankoegl/python-json-patch")
17216 (commit (string-append "v" version))))
17217 (file-name (git-file-name name version))
17218 (sha256
17219 (base32
17220 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
17221
17222 (define-public python2-jsonpatch-0.4
17223 (package-with-python2 python-jsonpatch-0.4))
17224
17225 (define-public python-rfc3986
17226 (package
17227 (name "python-rfc3986")
17228 (version "1.4.0")
17229 (source (origin
17230 (method url-fetch)
17231 (uri (pypi-uri "rfc3986" version))
17232 (sha256
17233 (base32
17234 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
17235 (build-system python-build-system)
17236 (arguments
17237 `(#:modules ((guix build utils)
17238 (guix build python-build-system)
17239 (ice-9 ftw)
17240 (srfi srfi-1)
17241 (srfi srfi-26))
17242 #:phases
17243 (modify-phases %standard-phases
17244 (replace 'check
17245 (lambda _
17246 (let ((cwd (getcwd)))
17247 (setenv "PYTHONPATH"
17248 (string-append cwd "/build/"
17249 (find (cut string-prefix? "lib" <>)
17250 (scandir (string-append cwd "/build")))
17251 ":"
17252 (getenv "PYTHONPATH")))
17253 (invoke "pytest" "-v")))))))
17254 (native-inputs
17255 `(("python-pytest" ,python-pytest)))
17256 (home-page "https://rfc3986.readthedocs.io/")
17257 (synopsis "Parse and validate URI references")
17258 (description
17259 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
17260 validation and authority parsing. This module also supports RFC@tie{}6874
17261 which adds support for zone identifiers to IPv6 addresses.")
17262 (license license:asl2.0)))
17263
17264 (define-public python2-rfc3986
17265 (package-with-python2 python-rfc3986))
17266
17267 (define-public python-rfc3987
17268 (package
17269 (name "python-rfc3987")
17270 (version "1.3.7")
17271 (source
17272 (origin
17273 (method url-fetch)
17274 (uri (pypi-uri "rfc3987" version))
17275 (sha256
17276 (base32
17277 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
17278 (build-system python-build-system)
17279 (home-page "https://pypi.org/project/rfc3987/")
17280 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
17281 (description "@code{rfc3987} provides routines for parsing and
17282 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
17283 (license license:gpl3+)))
17284
17285 (define-public python2-rfc3987
17286 (package-with-python2 python-rfc3987))
17287
17288 ;; The latest commit contains fixes for building with both python3 and python2.
17289 (define-public python-rfc6555
17290 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
17291 (revision "1"))
17292 (package
17293 (name "python-rfc6555")
17294 (version (git-version "0.0.0" revision commit))
17295 (source (origin
17296 (method git-fetch)
17297 (uri (git-reference
17298 (url "https://github.com/sethmlarson/rfc6555")
17299 (commit commit)))
17300 (file-name (git-file-name name version))
17301 (sha256
17302 (base32
17303 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
17304 (build-system python-build-system)
17305 (arguments
17306 '(#:phases
17307 (modify-phases %standard-phases
17308 (replace 'check
17309 (lambda* (#:key tests? #:allow-other-keys)
17310 (if tests?
17311 ;; Other tests require network access.
17312 (invoke "pytest" "tests/test_ipv6.py")
17313 #t))))))
17314 (native-inputs
17315 `(("python-pytest" ,python-pytest)))
17316 (home-page "https://pypi.org/project/rfc6555/")
17317 (synopsis "Python implementation of RFC 6555")
17318 (description
17319 "Python implementation of the Happy Eyeballs Algorithm described in RFC
17320 6555. Provided with a single file and dead-simple API to allow easy vendoring
17321 and integration into other projects.")
17322 (properties `((python2-variant . ,(delay python2-rfc6555))))
17323 (license license:asl2.0))))
17324
17325 (define-public python2-rfc6555
17326 (let ((base (package-with-python2
17327 (strip-python2-variant python-rfc6555))))
17328 (package/inherit base
17329 (propagated-inputs
17330 `(("python2-selectors2" ,python2-selectors2))))))
17331
17332 (define-public python-bagit
17333 (package
17334 (name "python-bagit")
17335 (version "1.7.0")
17336 (source
17337 (origin
17338 (method url-fetch)
17339 (uri (pypi-uri "bagit" version))
17340 (sha256
17341 (base32
17342 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
17343 (build-system python-build-system)
17344 (native-inputs
17345 `(("python-setuptools-scm" ,python-setuptools-scm)
17346 ("python-coverage" ,python-coverage)
17347 ("python-mock" ,python-mock)))
17348 (home-page "https://libraryofcongress.github.io/bagit-python/")
17349 (synopsis "Create and validate BagIt packages")
17350 (description "Bagit is a Python library and command line utility for working
17351 with BagIt style packages. BagIt is a minimalist packaging format for digital
17352 preservation.")
17353 (license license:cc0)))
17354
17355 (define-public python-prov
17356 (package
17357 (name "python-prov")
17358 (version "2.0.0")
17359 (source
17360 (origin
17361 (method url-fetch)
17362 (uri (pypi-uri "prov" version))
17363 (sha256
17364 (base32
17365 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
17366 (build-system python-build-system)
17367 (propagated-inputs
17368 `(("python-dateutil" ,python-dateutil)
17369 ("python-lxml" ,python-lxml)
17370 ("python-networkx" ,python-networkx)
17371 ("python-rdflib" ,python-rdflib)))
17372 (native-inputs
17373 `(("graphviz" ,graphviz)
17374 ("python-pydot" ,python-pydot)))
17375 (home-page "https://github.com/trungdong/prov")
17376 (synopsis
17377 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
17378 (description
17379 "This package provides a library for W3C Provenance Data Model supporting
17380 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
17381 (license license:expat)))
17382
17383 (define-public python-arcp
17384 (package
17385 (name "python-arcp")
17386 (version "0.2.1")
17387 (source
17388 (origin
17389 (method url-fetch)
17390 (uri (pypi-uri "arcp" version))
17391 (sha256
17392 (base32
17393 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
17394 (build-system python-build-system)
17395 (native-inputs
17396 `(("python-pytest" ,python-pytest)))
17397 (home-page "http://arcp.readthedocs.io/")
17398 (synopsis
17399 "Archive and Package URI parser and generator")
17400 (description
17401 "@acronym{arcp, Archive and Package} provides functions for creating
17402 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
17403 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
17404 consume or reference hypermedia resources bundled inside a file archive or an
17405 application package, as well as to resolve URIs for archive resources within a
17406 programmatic framework. This URI scheme provides mechanisms to generate a
17407 unique base URI to represent the root of the archive, so that relative URI
17408 references in a bundled resource can be resolved within the archive without
17409 having to extract the archive content on the local file system. An arcp URI can
17410 be used for purposes of isolation (e.g. when consuming multiple archives),
17411 security constraints (avoiding \"climb out\" from the archive), or for
17412 externally identiyfing sub-resources referenced by hypermedia formats.")
17413 (license license:asl2.0)))
17414
17415 (define-public python-shellescape
17416 (package
17417 (name "python-shellescape")
17418 (version "3.8.1")
17419 (source
17420 (origin
17421 (method git-fetch)
17422 (uri (git-reference
17423 (url "https://github.com/chrissimpkins/shellescape")
17424 (commit (string-append "v" version))))
17425 (file-name (git-file-name name version))
17426 (sha256
17427 (base32
17428 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
17429 (build-system python-build-system)
17430 (arguments
17431 '(#:phases
17432 (modify-phases %standard-phases
17433 (replace 'check
17434 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
17435 (when tests?
17436 (add-installed-pythonpath inputs outputs)
17437 (invoke "python" "tests/test_shellescape.py"))
17438 #t)))))
17439 (native-inputs
17440 `(("python-pytest" ,python-pytest)))
17441 (home-page "https://github.com/chrissimpkins/shellescape")
17442 (synopsis
17443 "Shell escape a string to safely use it as a token in a shell command")
17444 (description
17445 "The shellescape Python module defines the @code{shellescape.quote()}
17446 function that returns a shell-escaped version of a Python string. This is a
17447 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
17448 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
17449 (license license:expat)))
17450
17451 (define-public python-validators
17452 (package
17453 (name "python-validators")
17454 (version "0.14.2")
17455 (source (origin
17456 (method url-fetch)
17457 (uri (pypi-uri "validators" version))
17458 (sha256
17459 (base32
17460 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
17461 (build-system python-build-system)
17462 (arguments
17463 '(#:phases (modify-phases %standard-phases
17464 (replace 'check
17465 (lambda _
17466 (invoke "pytest" "-vv"))))))
17467 (propagated-inputs
17468 `(("python-decorator" ,python-decorator)
17469 ("python-six" ,python-six)))
17470 (native-inputs
17471 `(("python-flake8" ,python-flake8)
17472 ("python-isort" ,python-isort)
17473 ("python-pytest" ,python-pytest)))
17474 (home-page "https://github.com/kvesteri/validators")
17475 (synopsis "Data validation library")
17476 (description
17477 "This package contains validators for different things such as email
17478 addresses, IP addresses, URLs, hashes and more. It has been designed to
17479 be easy to use and not require defining a schema or form just to validate
17480 some input.")
17481 (license license:expat)))
17482
17483 (define-public python2-validators
17484 (package-with-python2 python-validators))
17485
17486 (define-public python-validate-email
17487 (package
17488 (name "python-validate-email")
17489 (version "1.3")
17490 (source
17491 (origin
17492 (method url-fetch)
17493 (uri (pypi-uri "validate_email" version))
17494 (sha256
17495 (base32
17496 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
17497 (build-system python-build-system)
17498 (home-page "https://github.com/syrusakbary/validate_email")
17499 (synopsis "Verifies if an email address is valid and really exists")
17500 (description "@code{validate_email} can be used to verify if an email
17501 address is valid and really exists.")
17502 (license license:lgpl3+)))
17503
17504 (define-public python2-validate-email
17505 (package-with-python2 python-validate-email))
17506
17507 (define-public python-flex
17508 (package
17509 (name "python-flex")
17510 (version "6.10.0")
17511 (source
17512 (origin
17513 (method url-fetch)
17514 (uri (pypi-uri "flex" version))
17515 (sha256
17516 (base32
17517 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
17518 (build-system python-build-system)
17519 (propagated-inputs
17520 `(("python-click" ,python-click)
17521 ("python-iso8601" ,python-iso8601)
17522 ("python-jsonpointer" ,python-jsonpointer)
17523 ("python-pyyaml" ,python-pyyaml)
17524 ("python-requests" ,python-requests)
17525 ("python-rfc3987" ,python-rfc3987)
17526 ("python-six" ,python-six)
17527 ("python-validate-email" ,python-validate-email)))
17528 (home-page "https://github.com/pipermerriam/flex")
17529 (synopsis "Validates Swagger schemata")
17530 (description "@code{flex} can be used to validate Swagger schemata.")
17531 (license license:bsd-3)))
17532
17533 (define-public python2-flex
17534 (package-with-python2 python-flex))
17535
17536 (define-public python-marshmallow
17537 (package
17538 (name "python-marshmallow")
17539 (version "3.9.1")
17540 (source
17541 (origin
17542 (method url-fetch)
17543 (uri (pypi-uri "marshmallow" version))
17544 (sha256
17545 (base32
17546 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
17547 (build-system python-build-system)
17548 (propagated-inputs
17549 `(("python-dateutil" ,python-dateutil)
17550 ("python-simplejson" ,python-simplejson)))
17551 (native-inputs
17552 `(("python-pytest" ,python-pytest)
17553 ("python-pytz" ,python-pytz)))
17554 (home-page "https://github.com/marshmallow-code/marshmallow")
17555 (synopsis "Convert complex datatypes to and from native
17556 Python datatypes.")
17557 (description "@code{marshmallow} provides a library for converting
17558 complex datatypes to and from native Python datatypes.")
17559 (license license:expat)))
17560
17561 (define-public python-apispec
17562 (package
17563 (name "python-apispec")
17564 (version "4.0.0")
17565 (source
17566 (origin
17567 (method url-fetch)
17568 (uri (pypi-uri "apispec" version))
17569 (sha256
17570 (base32
17571 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
17572 (build-system python-build-system)
17573 (arguments
17574 '(#:phases (modify-phases %standard-phases
17575 (add-after 'unpack 'disable-prance-tests
17576 (lambda _
17577 ;; Disable validation tests since they require the
17578 ;; optional 'prance' library which is not yet in Guix.
17579 (substitute* "tests/test_ext_marshmallow_openapi.py"
17580 (("def test_openapi_tools_validate.*" all)
17581 (string-append "@pytest.mark.xfail\n" all)))))
17582 (replace 'check
17583 (lambda _
17584 (setenv "PYTHONPATH"
17585 (string-append "./build/lib:"
17586 (getenv "PYTHONPATH")))
17587 (invoke "pytest" "-vv"))))))
17588 (propagated-inputs
17589 `(("python-pyyaml" ,python-pyyaml)))
17590 (native-inputs
17591 `(("python-pytest" ,python-pytest)
17592 ("python-marshmallow" ,python-marshmallow)))
17593 (home-page "https://github.com/marshmallow-code/apispec")
17594 (synopsis "Swagger/OpenAPI specification generator")
17595 (description "@code{python-apispec} is a pluggable API specification
17596 generator. It currently supports the OpenAPI specification, formerly known
17597 as Swagger.")
17598 (license license:expat)))
17599
17600 (define-public python-flasgger
17601 (package
17602 (name "python-flasgger")
17603 (version "0.6.3")
17604 (source
17605 (origin
17606 (method git-fetch)
17607 (uri (git-reference
17608 (url "https://github.com/rochacbruno/flasgger")
17609 (commit version)))
17610 (file-name (git-file-name name version))
17611 (sha256
17612 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
17613 (build-system python-build-system)
17614 (arguments
17615 `(#:phases
17616 (modify-phases %standard-phases
17617 (replace 'check
17618 (lambda* (#:key inputs outputs #:allow-other-keys)
17619 (substitute* "Makefile"
17620 (("flake8 flasgger --ignore=F403")
17621 "flake8 flasgger --ignore=E731,F403"))
17622 (setenv "PYTHONPATH" (string-append (getcwd)
17623 ":"
17624 (getenv "PYTHONPATH")))
17625 (invoke "py.test"))))))
17626 (propagated-inputs
17627 `(("python-flask" ,python-flask)
17628 ("python-pyyaml" ,python-pyyaml)
17629 ("python-jsonschema" ,python-jsonschema)
17630 ("python-mistune" ,python-mistune)
17631 ("python-six" ,python-six)))
17632 (native-inputs
17633 `(("python-decorator" ,python-decorator)
17634 ("python-flake8" ,python-flake8)
17635 ("python-flask-restful" ,python-flask-restful)
17636 ("python-flex" ,python-flex)
17637 ("python-pytest" ,python-pytest)
17638 ("python-pytest-cov" ,python-pytest-cov)
17639 ("python-marshmallow" ,python-marshmallow)
17640 ("python-apispec" ,python-apispec)))
17641 (home-page "https://github.com/rochacbruno/flasgger/")
17642 (synopsis "Extract Swagger specs from your Flask project")
17643 (description "@code{python-flasgger} allows extracting Swagger specs
17644 from your Flask project. It is a fork of Flask-Swagger.")
17645 (license license:expat)))
17646
17647 (define-public python-swagger-spec-validator
17648 (package
17649 (name "python-swagger-spec-validator")
17650 (version "2.4.3")
17651 (source
17652 (origin
17653 (method url-fetch)
17654 (uri (pypi-uri "swagger-spec-validator" version))
17655 (sha256
17656 (base32
17657 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
17658 (build-system python-build-system)
17659 (propagated-inputs
17660 `(("python-jsonschema" ,python-jsonschema)
17661 ("python-pyyaml" ,python-pyyaml)
17662 ("python-six" ,python-six)))
17663 (home-page
17664 "https://github.com/Yelp/swagger_spec_validator")
17665 (synopsis "Validation of Swagger specifications")
17666 (description "@code{swagger_spec_validator} provides a library for
17667 validating Swagger API specifications.")
17668 (license license:asl2.0)))
17669
17670 (define-public python2-swagger-spec-validator
17671 (package-with-python2 python-swagger-spec-validator))
17672
17673 (define-public python-apache-libcloud
17674 (package
17675 (name "python-apache-libcloud")
17676 (version "3.1.0")
17677 (source
17678 (origin
17679 (method url-fetch)
17680 (uri (pypi-uri "apache-libcloud" version))
17681 (sha256
17682 (base32
17683 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
17684 (build-system python-build-system)
17685 (arguments
17686 `(#:phases
17687 (modify-phases %standard-phases
17688 (add-after 'unpack 'patch-ssh
17689 (lambda* (#:key inputs #:allow-other-keys)
17690 (substitute* "libcloud/compute/ssh.py"
17691 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
17692 "/bin/ssh" "'")))
17693 #t))
17694 (add-after 'unpack 'patch-tests
17695 (lambda _
17696 (substitute* "libcloud/test/compute/test_ssh_client.py"
17697 (("class ShellOutSSHClientTests")
17698 "@unittest.skip(\"Guix container doesn't have ssh service\")
17699 class ShellOutSSHClientTests"))
17700 #t))
17701 (add-before 'check 'copy-secret
17702 (lambda _
17703 (copy-file "libcloud/test/secrets.py-dist"
17704 "libcloud/test/secrets.py")
17705 #t)))))
17706 (inputs
17707 `(("openssh" ,openssh)))
17708 (propagated-inputs
17709 `(("python-paramiko" ,python-paramiko)
17710 ("python-requests" ,python-requests)))
17711 (native-inputs
17712 `(("python-lockfile" ,python-lockfile)
17713 ("python-mock" ,python-mock)
17714 ("python-pytest" ,python-pytest)
17715 ("python-pytest-runner" ,python-pytest-runner)
17716 ("python-requests-mock" ,python-requests-mock)))
17717 (home-page "https://libcloud.apache.org/")
17718 (synopsis "Unified Cloud API")
17719 (description "@code{libcloud} is a Python library for interacting with
17720 many of the popular cloud service providers using a unified API.")
17721 (license license:asl2.0)))
17722
17723 (define-public python-smmap
17724 (package
17725 (name "python-smmap")
17726 (version "3.0.1")
17727 (source
17728 (origin
17729 (method url-fetch)
17730 (uri (pypi-uri "smmap" version))
17731 (sha256
17732 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
17733 (build-system python-build-system)
17734 (native-inputs
17735 `(("python-nosexcover" ,python-nosexcover)))
17736 (home-page "https://github.com/Byron/smmap")
17737 (synopsis "Python sliding window memory map manager")
17738 (description "@code{smmap} is a pure Python implementation of a sliding
17739 window memory map manager.")
17740 (license license:bsd-3)))
17741
17742 (define-public python-smmap2
17743 (deprecated-package "python-smmap2" python-smmap))
17744
17745 (define-public python2-smmap
17746 (package-with-python2 python-smmap))
17747
17748 (define-public python2-smmap2
17749 (deprecated-package "python2-smmap2" python2-smmap))
17750
17751 (define-public python-regex
17752 (package
17753 (name "python-regex")
17754 (version "2020.6.8")
17755 (source (origin
17756 (method url-fetch)
17757 (uri (pypi-uri "regex" version))
17758 (sha256
17759 (base32
17760 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
17761 (build-system python-build-system)
17762 (arguments
17763 '(#:phases
17764 (modify-phases %standard-phases
17765 (replace 'check
17766 (lambda* (#:key inputs outputs #:allow-other-keys)
17767 (add-installed-pythonpath inputs outputs)
17768 (invoke "python" "-c"
17769 "from regex.test_regex import test_main; test_main()"))))))
17770 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
17771 (synopsis "Alternative regular expression module")
17772 (description "This regular expression implementation is backwards-
17773 compatible with the standard @code{re} module, but offers additional
17774 functionality like full case-folding for case-insensitive matches in Unicode.")
17775 (license license:psfl)))
17776
17777 (define-public python2-regex
17778 (package-with-python2 python-regex))
17779
17780 (define-public python-pyopengl
17781 (package
17782 (name "python-pyopengl")
17783 (version "3.1.5")
17784 (source
17785 (origin
17786 (method url-fetch)
17787 (uri (pypi-uri "PyOpenGL" version))
17788 (sha256
17789 (base32
17790 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
17791 (build-system python-build-system)
17792 (inputs
17793 `(("mesa" ,mesa)
17794 ("freeglut" ,freeglut)
17795 ("glu" ,glu)))
17796 (arguments
17797 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
17798 ;attribute 'OSMesa'
17799 #:phases
17800 (modify-phases %standard-phases
17801 (add-before 'build 'fix-paths
17802 (lambda* (#:key inputs outputs #:allow-other-keys)
17803 (substitute* '("OpenGL/platform/ctypesloader.py")
17804 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
17805 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
17806 (("'GL'")
17807 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
17808 (("'GLU'")
17809 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
17810 (("'glut',")
17811 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
17812 (("'GLESv1_CM'")
17813 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
17814 (("'GLESv2'")
17815 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
17816 ;; Not providing libgle. It seems to be very old.
17817 #t)))))
17818 (home-page "http://pyopengl.sourceforge.net")
17819 (synopsis "Standard OpenGL bindings for Python")
17820 (description
17821 "PyOpenGL is the most common cross platform Python binding to OpenGL and
17822 related APIs. The binding is created using the standard @code{ctypes}
17823 library.")
17824 (license license:bsd-3)))
17825
17826 (define-public python-pyopengl-accelerate
17827 (package
17828 (inherit python-pyopengl)
17829 (name "python-pyopengl-accelerate")
17830 (version "3.1.5")
17831 (source
17832 (origin
17833 (method url-fetch)
17834 (uri (pypi-uri "PyOpenGL-accelerate" version))
17835 (sha256
17836 (base32
17837 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
17838 (inputs
17839 `(("mesa" ,mesa)
17840 ("python-numpy" ,python-numpy))) ; for cython module
17841 ; numpy_formathandler, thus not propagated
17842 (arguments
17843 `(#:tests? #f
17844 #:phases
17845 (modify-phases %standard-phases
17846 (delete 'fix-paths))))
17847 (synopsis "Acceleration code for PyOpenGL")
17848 (description
17849 "This is the Cython-coded accelerator module for PyOpenGL.")))
17850
17851 (define-public python-rencode
17852 (package
17853 (name "python-rencode")
17854 (version "1.0.5")
17855 (source
17856 (origin
17857 (method url-fetch)
17858 (uri (pypi-uri "rencode" version))
17859 (sha256
17860 (base32
17861 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
17862 (build-system python-build-system)
17863 (arguments
17864 `(#:phases
17865 (modify-phases %standard-phases
17866 (add-before 'check 'delete-bogus-test
17867 ;; This test requires /home/aresch/Downloads, which is not provided by
17868 ;; the build environment.
17869 (lambda _
17870 (delete-file "rencode/t.py")
17871 #t)))))
17872 (native-inputs `(("pkg-config" ,pkg-config)
17873 ("python-cython" ,python-cython)))
17874 (home-page "https://github.com/aresch/rencode")
17875 (synopsis "Serialization of heterogeneous data structures")
17876 (description
17877 "The @code{rencode} module is a data structure serialization library,
17878 similar to @code{bencode} from the BitTorrent project. For complex,
17879 heterogeneous data structures with many small elements, r-encoding stake up
17880 significantly less space than b-encodings. This version of rencode is a
17881 complete rewrite in Cython to attempt to increase the performance over the
17882 pure Python module.")
17883 (license license:bsd-3)))
17884
17885 (define-public python2-rencode
17886 (package-with-python2 python-rencode))
17887
17888 (define-public python-xenon
17889 (package
17890 (name "python-xenon")
17891 (version "0.7.0")
17892 (source
17893 (origin
17894 (method url-fetch)
17895 (uri (pypi-uri "xenon" version))
17896 (sha256
17897 (base32
17898 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17899 (build-system python-build-system)
17900 (native-inputs
17901 `(("python-pyyaml" ,python-pyyaml)
17902 ("python-radon" ,python-radon)
17903 ("python-requests" ,python-requests)
17904 ("python-flake8" ,python-flake8)
17905 ("python-tox" ,python-tox)))
17906 (arguments
17907 `(#:tests? #f ;test suite not shipped with the PyPI archive
17908 #:phases
17909 (modify-phases %standard-phases
17910 (add-before 'build 'patch-test-requirements
17911 (lambda _
17912 ;; Remove httpretty dependency for tests.
17913 (substitute* "setup.py"
17914 (("httpretty") ""))
17915 #t)))))
17916 (home-page "https://xenon.readthedocs.org/")
17917 (synopsis "Monitor code metrics for Python on your CI server")
17918 (description
17919 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17920 Ideally, @code{xenon} is run every time code is committed. Through command
17921 line options, various thresholds can be set for the complexity of code. It
17922 will fail (i.e. it will exit with a non-zero exit code) when any of these
17923 requirements is not met.")
17924 (license license:expat)))
17925
17926 (define-public python-pysocks
17927 (package
17928 (name "python-pysocks")
17929 (version "1.7.1")
17930 (source
17931 (origin
17932 (method url-fetch)
17933 (uri (pypi-uri "PySocks" version))
17934 (sha256
17935 (base32
17936 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17937 (build-system python-build-system)
17938 (arguments `(#:tests? #f))
17939 (home-page "https://github.com/Anorov/PySocks")
17940 (synopsis "SOCKS client module")
17941 (description "@code{pysocks} is an updated and semi-actively maintained
17942 version of @code{SocksiPy} with bug fixes and extra features.")
17943 (license license:bsd-3)))
17944
17945 (define-public python2-pysocks
17946 (package-with-python2 python-pysocks))
17947
17948 (define-public python-pydiff
17949 (package
17950 (name "python-pydiff")
17951 (version "0.2")
17952 (source
17953 (origin
17954 (method url-fetch)
17955 (uri (pypi-uri "pydiff" version))
17956 (sha256
17957 (base32
17958 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17959 (build-system python-build-system)
17960 (home-page "https://github.com/myint/pydiff")
17961 (synopsis "Library to diff two Python files at the bytecode level")
17962 (description
17963 "@code{pydiff} makes it easy to look for actual code changes while
17964 ignoring formatting changes.")
17965 (license license:expat)))
17966
17967 (define-public python2-pydiff
17968 (package-with-python2 python-pydiff))
17969
17970 (define-public python-pydub
17971 (package
17972 (name "python-pydub")
17973 (version "0.24.1")
17974 (source
17975 (origin
17976 (method url-fetch)
17977 (uri (pypi-uri "pydub" version))
17978 (sha256
17979 (base32
17980 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17981 (build-system python-build-system)
17982 (arguments
17983 `(#:phases
17984 (modify-phases %standard-phases
17985 (add-after 'unpack 'fix-ffmpeg-path
17986 (lambda* (#:key inputs #:allow-other-keys)
17987 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17988 (substitute* '("pydub/utils.py")
17989 (("return \"ffmpeg\"")
17990 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17991 (("return \"ffplay\"")
17992 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17993 (("return \"ffprobe\"")
17994 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17995 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17996 #t))))))
17997 (home-page "https://pydub.com")
17998 (inputs
17999 `(("ffmpeg" ,ffmpeg)))
18000 (propagated-inputs
18001 `(("python-scipy" ,python-scipy)))
18002 (synopsis "Manipulate audio with a high level interface in Python")
18003 (description
18004 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
18005 @code{ffmpeg} to open various audio formats.")
18006 (license license:expat))) ; MIT license
18007
18008 (define-public python-tqdm
18009 (package
18010 (name "python-tqdm")
18011 (version "4.43.0")
18012 (source
18013 (origin
18014 (method url-fetch)
18015 (uri (pypi-uri "tqdm" version))
18016 (sha256
18017 (base32
18018 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
18019 (build-system python-build-system)
18020 (arguments
18021 '(#:phases (modify-phases %standard-phases
18022 (replace 'check
18023 (lambda* (#:key inputs outputs #:allow-other-keys)
18024 (add-installed-pythonpath inputs outputs)
18025 ;; This invokation is taken from tox.ini.
18026 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
18027 "-d" "-v" "tqdm/"))))))
18028 (native-inputs
18029 `(("python-nose" ,python-nose)))
18030 (home-page "https://github.com/tqdm/tqdm")
18031 (synopsis "Fast, extensible progress meter")
18032 (description
18033 "Make loops show a progress bar on the console by just wrapping any
18034 iterable with @code{|tqdm(iterable)|}. Offers many options to define
18035 design and layout.")
18036 (license (list license:mpl2.0 license:expat))))
18037
18038 (define-public python2-tqdm
18039 (package-with-python2 python-tqdm))
18040
18041 (define-public python-pkginfo
18042 (package
18043 (name "python-pkginfo")
18044 (version "1.7.0")
18045 (source
18046 (origin
18047 (method url-fetch)
18048 (uri (pypi-uri "pkginfo" version))
18049 (sha256
18050 (base32
18051 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
18052 (build-system python-build-system)
18053 (arguments
18054 `(#:phases
18055 (modify-phases %standard-phases
18056 (add-before 'check 'patch-tests
18057 (lambda _
18058 (substitute* "pkginfo/tests/test_installed.py"
18059 (("test_ctor_w_package_no_PKG_INFO")
18060 "_test_ctor_w_package_no_PKG_INFO"))
18061 #t)))))
18062 (home-page
18063 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
18064 (synopsis
18065 "Query metadatdata from sdists, bdists, and installed packages")
18066 (description
18067 "API to query the distutils metadata written in @file{PKG-INFO} inside a
18068 source distriubtion (an sdist) or a binary distribution (e.g., created by
18069 running bdist_egg). It can also query the EGG-INFO directory of an installed
18070 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
18071 created by running @code{python setup.py develop}).")
18072 (license license:expat)))
18073
18074 (define-public python2-pkginfo
18075 (package-with-python2 python-pkginfo))
18076
18077 (define-public python-twine
18078 (package
18079 (name "python-twine")
18080 (version "1.15.0")
18081 (source
18082 (origin
18083 (method url-fetch)
18084 (uri (pypi-uri "twine" version))
18085 (sha256
18086 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
18087 (build-system python-build-system)
18088 (propagated-inputs
18089 `(("python-tqdm" ,python-tqdm)
18090 ("python-packaging" ,python-packaging)
18091 ("python-pkginfo" ,python-pkginfo)
18092 ("python-readme-renderer" ,python-readme-renderer)
18093 ("python-requests" ,python-requests)
18094 ("python-requests-toolbelt" ,python-requests-toolbelt)))
18095 (home-page "https://github.com/pypa/twine")
18096 (synopsis "Collection of utilities for interacting with PyPI")
18097 (description
18098 "@code{twine} currently supports registering projects and uploading
18099 distributions. It authenticates the user over HTTPS, allows them to pre-sign
18100 their files and supports any packaging format (including wheels).")
18101 (license license:asl2.0)))
18102
18103 (define-public python2-twine
18104 (package-with-python2 python-twine))
18105
18106 (define-public python-linecache2
18107 (package
18108 (name "python-linecache2")
18109 (version "1.0.0")
18110 (source
18111 (origin
18112 (method url-fetch)
18113 (uri (pypi-uri "linecache2" version))
18114 (sha256
18115 (base32
18116 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
18117 (build-system python-build-system)
18118 (arguments
18119 `(;; The tests depend on unittest2, and our version is a bit too old.
18120 #:tests? #f))
18121 (native-inputs
18122 `(("python-pbr" ,python-pbr-minimal)))
18123 (home-page
18124 "https://github.com/testing-cabal/linecache2")
18125 (synopsis "Backports of the linecache module")
18126 (description
18127 "The linecache module allows one to get any line from any file, while
18128 attempting to optimize internally, using a cache, the common case where many
18129 lines are read from a single file.")
18130 (license license:psfl)))
18131
18132 (define-public python2-linecache2
18133 (package-with-python2 python-linecache2))
18134
18135 (define-public python-traceback2
18136 (package
18137 (name "python-traceback2")
18138 (version "1.4.0")
18139 (source
18140 (origin
18141 (method url-fetch)
18142 (uri (pypi-uri "traceback2" version))
18143 (sha256
18144 (base32
18145 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
18146 (build-system python-build-system)
18147 (arguments
18148 `(;; python-traceback2 and python-unittest2 depend on one another.
18149 #:tests? #f))
18150 (native-inputs
18151 `(("python-pbr" ,python-pbr-minimal)))
18152 (propagated-inputs
18153 `(("python-linecache2" ,python-linecache2)))
18154 (home-page
18155 "https://github.com/testing-cabal/traceback2")
18156 (synopsis "Backports of the traceback module")
18157 (description
18158 "This module provides a standard interface to extract, format and print
18159 stack traces of Python programs. It exactly mimics the behavior of the Python
18160 interpreter when it prints a stack trace.")
18161 (license license:psfl)))
18162
18163 (define-public python2-traceback2
18164 (package-with-python2 python-traceback2))
18165
18166 (define-public python-ratelimiter
18167 (package
18168 (name "python-ratelimiter")
18169 (version "1.2.0")
18170 (source
18171 (origin
18172 (method url-fetch)
18173 (uri (pypi-uri "ratelimiter" version))
18174 (sha256
18175 (base32
18176 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
18177 (build-system python-build-system)
18178 (arguments
18179 '(#:tests? #f)) ; There are no tests in the pypi archive.
18180 (home-page "https://github.com/RazerM/ratelimiter")
18181 (synopsis "Simple rate limiting object")
18182 (description
18183 "The @code{ratelimiter} module ensures that an operation will not be
18184 executed more than a given number of times during a given period.")
18185 (license license:asl2.0)))
18186
18187 (define-public python2-ratelimiter
18188 (package-with-python2 python-ratelimiter))
18189
18190 (define-public python-dukpy
18191 (package
18192 (name "python-dukpy")
18193 (version "0.3")
18194 (source
18195 (origin
18196 (method git-fetch)
18197 (uri (git-reference
18198 (url "https://github.com/kovidgoyal/dukpy")
18199 (commit (string-append "v" version))))
18200 (file-name (git-file-name name version))
18201 (sha256
18202 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
18203 (build-system python-build-system)
18204 (home-page "https://github.com/kovidgoyal/dukpy")
18205 (synopsis "Run JavaScript in python")
18206 (description
18207 "dukpy is a JavaScript runtime environment for Python using the duktape
18208 embeddable JavaScript engine.")
18209 ;; Dukpy is licensed under MIT like the embedded duktape library,
18210 ;; with 'errors.c' as GPL3.
18211 (license (list license:expat license:gpl3))))
18212
18213 (define-public python2-dukpy
18214 (package-with-python2 python-dukpy))
18215
18216 (define-public python-jsonrpclib-pelix
18217 (package
18218 (name "python-jsonrpclib-pelix")
18219 (version "0.3.2")
18220 (source
18221 (origin
18222 (method url-fetch)
18223 (uri (pypi-uri "jsonrpclib-pelix" version))
18224 (sha256
18225 (base32
18226 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
18227 (build-system python-build-system)
18228 (arguments
18229 `(#:tests? #f)) ; no tests in PyPI tarball
18230 (home-page "https://github.com/tcalmant/jsonrpclib/")
18231 (synopsis "JSON-RPC 2.0 client library for Python")
18232 (description
18233 "This library implements the JSON-RPC v2.0
18234 specification (backwards-compatible) as a client library for Python. This
18235 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
18236 services.")
18237 (license license:asl2.0)))
18238
18239 (define-public python2-jsonrpclib-pelix
18240 (package-with-python2 python-jsonrpclib-pelix))
18241
18242 (define-public python-setuptools-scm-git-archive
18243 (package
18244 (name "python-setuptools-scm-git-archive")
18245 (version "1.0")
18246 (source
18247 (origin
18248 (method url-fetch)
18249 (uri (pypi-uri "setuptools_scm_git_archive" version))
18250 (sha256
18251 (base32
18252 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
18253 (build-system python-build-system)
18254 (native-inputs
18255 `(("python-pytest" ,python-pytest)))
18256 (propagated-inputs
18257 `(("python-setuptools-scm" ,python-setuptools-scm)))
18258 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
18259 (synopsis "Setuptools_scm plugin for git archives")
18260 (description
18261 "The setuptools_scm_git_archive package is a plugin to
18262 setuptools_scm, which supports obtaining versions from git archives that
18263 belong to tagged versions.")
18264 (license license:expat)))
18265
18266 (define-public python2-setuptools-scm-git-archive
18267 (package-with-python2 python-setuptools-scm-git-archive))
18268
18269 (define-public python-setuptools-git
18270 (package
18271 (name "python-setuptools-git")
18272 (version "1.2")
18273 (source
18274 (origin
18275 (method url-fetch)
18276 (uri (pypi-uri "setuptools-git" version))
18277 (sha256
18278 (base32
18279 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
18280 (build-system python-build-system)
18281 (arguments
18282 `(#:phases
18283 (modify-phases %standard-phases
18284 ;; This is needed for tests.
18285 (add-after 'unpack 'configure-git
18286 (lambda _
18287 (setenv "HOME" "/tmp")
18288 (invoke "git" "config" "--global" "user.email" "guix")
18289 (invoke "git" "config" "--global" "user.name" "guix")
18290 #t)))))
18291 (native-inputs
18292 `(("git" ,git-minimal)))
18293 (home-page "https://github.com/msabramo/setuptools-git")
18294 (synopsis "Setuptools revision control system plugin for Git")
18295 (description
18296 "This package provides a plugin for Setuptools for revision control with
18297 Git.")
18298 (license license:bsd-3)))
18299
18300 (define-public python-pyclipper
18301 (package
18302 (name "python-pyclipper")
18303 (version "1.1.0.post3")
18304 (source
18305 (origin
18306 (method url-fetch)
18307 (uri (pypi-uri "pyclipper" version ".zip"))
18308 (sha256
18309 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
18310 (modules '((guix build utils)))
18311 (snippet
18312 '(begin
18313 ;; This file is generated by Cython.
18314 (delete-file "pyclipper/pyclipper.cpp") #t))))
18315 (build-system python-build-system)
18316 (arguments
18317 `(#:phases
18318 (modify-phases %standard-phases
18319 (add-before 'build 'cythonize-sources
18320 (lambda _
18321 (with-directory-excursion "pyclipper"
18322 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
18323 (propagated-inputs
18324 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
18325 (native-inputs
18326 `(("python-cython" ,python-cython)
18327 ("python-pytest" ,python-pytest)
18328 ("python-pytest-runner" ,python-pytest-runner)
18329 ("python-unittest2" ,python-unittest2)
18330 ("unzip" ,unzip)))
18331 (home-page "https://github.com/greginvm/pyclipper")
18332 (synopsis "Wrapper for Angus Johnson's Clipper library")
18333 (description
18334 "Pyclipper is a Cython wrapper for the C++ translation of the
18335 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
18336 (license license:expat)))
18337
18338 (define-public python2-pyclipper
18339 (package-with-python2 python-pyclipper))
18340
18341 (define-public python2-booleanoperations
18342 (package
18343 (name "python2-booleanoperations")
18344 (version "0.7.1")
18345 (source
18346 (origin
18347 (method url-fetch)
18348 (uri (pypi-uri "booleanOperations" version ".zip"))
18349 (sha256
18350 (base32
18351 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
18352 (build-system python-build-system)
18353 (arguments
18354 `(#:python ,python-2))
18355 (native-inputs
18356 `(("unzip" ,unzip)
18357 ("python2-pytest" ,python2-pytest)
18358 ("python2-pytest-runner" ,python2-pytest-runner)))
18359 (propagated-inputs
18360 `(("python-fonttools" ,python2-fonttools)
18361 ("python-pyclipper" ,python2-pyclipper)
18362 ("python-ufolib" ,python2-ufolib)))
18363 (home-page "https://github.com/typemytype/booleanOperations")
18364 (synopsis "Boolean operations on paths")
18365 (description
18366 "BooleanOperations provides a Python library that enables
18367 boolean operations on paths.")
18368 (license license:expat)))
18369
18370 (define-public python-tempdir
18371 (package
18372 (name "python-tempdir")
18373 (version "0.7.1")
18374 (source
18375 (origin
18376 (method url-fetch)
18377 (uri (pypi-uri "tempdir" version))
18378 (sha256
18379 (base32
18380 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
18381 (build-system python-build-system)
18382 (home-page "https://pypi.org/project/tempdir/")
18383 (arguments
18384 ;; the package has no tests
18385 '(#:tests? #f))
18386 (synopsis "Python library for managing temporary directories")
18387 (description
18388 "This library manages temporary directories that are automatically
18389 deleted with all their contents when they are no longer needed. It is
18390 particularly convenient for use in tests.")
18391 (license license:expat)))
18392
18393 (define-public python2-tempdir
18394 (package-with-python2 python-tempdir))
18395
18396 (define-public python-activepapers
18397 (package
18398 (name "python-activepapers")
18399 (version "0.2.2")
18400 (source
18401 (origin
18402 (method url-fetch)
18403 (uri (pypi-uri "ActivePapers.Py" version))
18404 (sha256
18405 (base32
18406 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
18407 (build-system python-build-system)
18408 (arguments
18409 `(#:modules ((ice-9 ftw)
18410 (srfi srfi-1)
18411 (guix build utils)
18412 (guix build python-build-system))
18413
18414 #:phases
18415 (modify-phases %standard-phases
18416 (add-after 'unpack 'delete-python2-code
18417 (lambda _
18418 (for-each delete-file
18419 '("lib/activepapers/builtins2.py"
18420 "lib/activepapers/standardlib2.py"
18421 "lib/activepapers/utility2.py"))))
18422 (replace 'check
18423 (lambda _
18424 ;; Deactivate the test cases that download files
18425 (setenv "NO_NETWORK_ACCESS" "1")
18426 ;; For some strange reason, some tests fail if nosetests runs all
18427 ;; test modules in a single execution. They pass if each test
18428 ;; module is run individually.
18429 (for-each (lambda (filename)
18430 (invoke "nosetests"
18431 (string-append "tests/" filename)))
18432 (scandir "tests"
18433 (lambda (filename)
18434 (string-suffix? ".py" filename)))))))))
18435 (native-inputs
18436 `(("python-tempdir" ,python-tempdir)
18437 ("python-nose" ,python-nose)))
18438 (propagated-inputs
18439 `(("python-h5py" ,python-h5py)))
18440 (home-page "https://www.activepapers.org/")
18441 (synopsis "Executable papers for scientific computing")
18442 (description
18443 "ActivePapers is a tool for working with executable papers, which
18444 combine data, code, and documentation in single-file packages,
18445 suitable for publication as supplementary material or on repositories
18446 such as figshare or Zenodo.")
18447 (properties `((python2-variant . ,(delay python2-activepapers))))
18448 (license license:bsd-3)))
18449
18450 (define-public python2-activepapers
18451 (let ((base (package-with-python2
18452 (strip-python2-variant python-activepapers))))
18453 (package/inherit base
18454 (arguments
18455 (substitute-keyword-arguments (package-arguments base)
18456 ((#:phases phases)
18457 `(modify-phases ,phases
18458 (delete 'delete-python2-code)
18459 (add-after 'unpack 'delete-python3-code
18460 (lambda _
18461 (for-each delete-file
18462 '("lib/activepapers/builtins3.py"
18463 "lib/activepapers/standardlib3.py"
18464 "lib/activepapers/utility3.py")))))))))))
18465
18466 (define-public python-semver
18467 (package
18468 (name "python-semver")
18469 (version "2.9.0")
18470 (source
18471 (origin
18472 (method url-fetch)
18473 (uri (pypi-uri "semver" version))
18474 (sha256
18475 (base32
18476 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
18477 (build-system python-build-system)
18478 (arguments
18479 `(#:phases (modify-phases %standard-phases
18480 (replace 'check
18481 (lambda _
18482 (delete-file "setup.cfg")
18483 (invoke "py.test"))))))
18484 (native-inputs
18485 `(("python-pytest" ,python-pytest)))
18486 (home-page "https://github.com/k-bx/python-semver")
18487 (synopsis "Python helper for Semantic Versioning")
18488 (description "This package provides a Python library for
18489 @url{Semantic Versioning, http://semver.org/}.")
18490 (license license:bsd-3)))
18491
18492 (define-public python2-semver
18493 (package-with-python2 python-semver))
18494
18495 (define-public python-pyro4
18496 (package
18497 (name "python-pyro4")
18498 (version "4.77")
18499 (source
18500 (origin
18501 (method url-fetch)
18502 (uri (pypi-uri "Pyro4" version))
18503 (sha256
18504 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
18505 (build-system python-build-system)
18506 (arguments
18507 '(#:tests? #f)) ;FIXME: Some tests require network access.
18508 (native-inputs
18509 `(("python-cloudpickle" ,python-cloudpickle)
18510 ("python-dill" ,python-dill)
18511 ("python-msgpack" ,python-msgpack)))
18512 (propagated-inputs
18513 `(("python-serpent" ,python-serpent)))
18514 (home-page "https://pyro4.readthedocs.io")
18515 (synopsis "Distributed object middleware for Python")
18516 (description
18517 "Pyro enables you to build applications in which objects can talk to each
18518 other over the network. You can just use normal Python method calls to call
18519 objects on other machines, also known as remote procedure calls (RPC).")
18520 (license license:expat)))
18521
18522 (define-public python2-pyro
18523 (package
18524 (name "python2-pyro")
18525 (version "3.16")
18526 (source
18527 (origin
18528 (method url-fetch)
18529 (uri (pypi-uri "Pyro" version))
18530 (file-name (string-append "Pyro-" version ".tar.gz"))
18531 (sha256
18532 (base32
18533 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
18534 (build-system python-build-system)
18535 (arguments
18536 ;; Pyro is not compatible with Python 3
18537 `(#:python ,python-2
18538 ;; Pyro has no test cases for automatic execution
18539 #:tests? #f))
18540 (home-page "https://pythonhosted.org/Pyro/")
18541 (synopsis "Distributed object manager for Python")
18542 (description "Pyro is a Distributed Object Technology system
18543 written in Python that is designed to be easy to use. It resembles
18544 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
18545 which is a system and language independent Distributed Object Technology
18546 and has much more to offer than Pyro or RMI. Pyro 3.x is no
18547 longer maintained. New projects should use Pyro4 instead, which
18548 is the new Pyro version that is actively developed.")
18549 (license license:expat)))
18550
18551 (define-public python2-scientific
18552 (package
18553 (name "python2-scientific")
18554 (version "2.9.4")
18555 (source
18556 (origin
18557 (method git-fetch)
18558 (uri (git-reference
18559 (url "https://github.com/khinsen/ScientificPython")
18560 (commit (string-append "rel" version))))
18561 (file-name (git-file-name name version))
18562 (sha256
18563 (base32
18564 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
18565 (build-system python-build-system)
18566 (inputs
18567 `(("netcdf" ,netcdf)))
18568 (propagated-inputs
18569 `(("python-numpy" ,python2-numpy-1.8)
18570 ("python-pyro" ,python2-pyro)))
18571 (arguments
18572 ;; ScientificPython is not compatible with Python 3
18573 `(#:python ,python-2
18574 #:tests? #f ; No test suite
18575 #:phases
18576 (modify-phases %standard-phases
18577 (replace 'build
18578 (lambda* (#:key inputs #:allow-other-keys)
18579 (invoke "python" "setup.py" "build"
18580 (string-append "--netcdf_prefix="
18581 (assoc-ref inputs "netcdf"))))))))
18582 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
18583 (synopsis "Python modules for scientific computing")
18584 (description "ScientificPython is a collection of Python modules that are
18585 useful for scientific computing. Most modules are rather general (Geometry,
18586 physical units, automatic derivatives, ...) whereas others are more
18587 domain-specific (e.g. netCDF and PDB support). The library is currently
18588 not actively maintained and works only with Python 2 and NumPy < 1.9.")
18589 (license license:cecill-c)))
18590
18591 (define-public python2-mmtk
18592 (package
18593 (name "python2-mmtk")
18594 (version "2.7.12")
18595 (source
18596 (origin
18597 (method git-fetch)
18598 (uri (git-reference
18599 (url "https://github.com/khinsen/MMTK")
18600 (commit (string-append "rel" version))))
18601 (file-name (git-file-name name version))
18602 (sha256
18603 (base32
18604 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
18605 (build-system python-build-system)
18606 (native-inputs
18607 `(("netcdf" ,netcdf)))
18608 (propagated-inputs
18609 `(("python-scientific" ,python2-scientific)
18610 ("python-tkinter" ,python-2 "tk")))
18611 (arguments
18612 `(#:python ,python-2
18613 #:tests? #f
18614 #:phases
18615 (modify-phases %standard-phases
18616 (add-before 'build 'includes-from-scientific
18617 (lambda* (#:key inputs #:allow-other-keys)
18618 (mkdir-p "Include/Scientific")
18619 (copy-recursively
18620 (string-append
18621 (assoc-ref inputs "python-scientific")
18622 "/include/python2.7/Scientific")
18623 "Include/Scientific"))))))
18624 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
18625 (synopsis "Python library for molecular simulation")
18626 (description "MMTK is a library for molecular simulations with an emphasis
18627 on biomolecules. It provides widely used methods such as Molecular Dynamics
18628 and normal mode analysis, but also basic routines for implementing new methods
18629 for simulation and analysis. The library is currently not actively maintained
18630 and works only with Python 2 and NumPy < 1.9.")
18631 (license license:cecill-c)))
18632
18633 (define-public python-phonenumbers
18634 (package
18635 (name "python-phonenumbers")
18636 (version "8.9.1")
18637 (source
18638 (origin
18639 (method url-fetch)
18640 (uri (pypi-uri "phonenumbers" version))
18641 (sha256
18642 (base32
18643 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
18644 (build-system python-build-system)
18645 (home-page
18646 "https://github.com/daviddrysdale/python-phonenumbers")
18647 (synopsis
18648 "Python library for dealing with international phone numbers")
18649 (description
18650 "This package provides a Python port of Google's libphonenumber library.")
18651 (license license:asl2.0)))
18652
18653 (define-public python2-phonenumbers
18654 (package-with-python2 python-phonenumbers))
18655
18656 (define-public python-send2trash
18657 (package
18658 (name "python-send2trash")
18659 (version "1.5.0")
18660 (source
18661 (origin (method git-fetch)
18662 ;; Source tarball on PyPI doesn't include tests.
18663 (uri (git-reference
18664 (url "https://github.com/hsoft/send2trash")
18665 (commit version)))
18666 (file-name (git-file-name name version))
18667 (sha256
18668 (base32
18669 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
18670 (build-system python-build-system)
18671 (arguments
18672 '(#:phases
18673 (modify-phases %standard-phases
18674 (add-before 'check 'pre-check
18675 (lambda _
18676 (mkdir-p "/tmp/foo")
18677 (setenv "HOME" "/tmp/foo")
18678 #t)))))
18679 (home-page "https://github.com/hsoft/send2trash")
18680 (synopsis "Send files to the user's @file{~/Trash} directory")
18681 (description "This package provides a Python library to send files to the
18682 user's @file{~/Trash} directory.")
18683 (properties `((python2-variant . ,(delay python2-send2trash))))
18684 (license license:bsd-3)))
18685
18686 (define-public python2-send2trash
18687 (let ((base (package-with-python2
18688 (strip-python2-variant python-send2trash))))
18689 (package/inherit base
18690 (arguments
18691 (substitute-keyword-arguments (package-arguments python-send2trash)
18692 ((#:phases phases)
18693 `(modify-phases ,phases
18694 (add-before 'check 'setenv
18695 (lambda _
18696 (setenv "PYTHONPATH"
18697 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
18698 #t)))))))))
18699
18700 (define-public python-pyfavicon
18701 (package
18702 (name "python-pyfavicon")
18703 (version "0.1.1")
18704 (source
18705 (origin
18706 (method url-fetch)
18707 (uri (pypi-uri "pyfavicon" version))
18708 (sha256
18709 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
18710 (build-system python-build-system)
18711 (arguments
18712 ;; There are no tests in the PyPI tarball and the tests from the
18713 ;; repository require online data.
18714 '(#:tests? #f))
18715 (propagated-inputs
18716 `(("python-aiohttp" ,python-aiohttp)
18717 ("python-beautifulsoup4" ,python-beautifulsoup4)
18718 ("python-pillow" ,python-pillow)))
18719 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
18720 (synopsis "Async favicon fetcher")
18721 (description
18722 "@code{pyfavicon} is an async favicon fetcher.")
18723 (license license:expat)))
18724
18725 (define-public python-yamllint
18726 (package
18727 (name "python-yamllint")
18728 (version "1.26.1")
18729 (source
18730 (origin
18731 (method url-fetch)
18732 (uri (pypi-uri "yamllint" version))
18733 (sha256
18734 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
18735 (build-system python-build-system)
18736 (propagated-inputs
18737 `(("python-pathspec" ,python-pathspec)
18738 ("python-pyyaml" ,python-pyyaml)
18739 ("python-setuptools" ,python-setuptools)))
18740 (home-page "https://github.com/adrienverge/yamllint")
18741 (synopsis "Linter for YAML files")
18742 (description
18743 "Yamllint is a linter for YAML files. yamllint does not only check for
18744 syntax validity, but for weirdnesses like key repetition and cosmetic problems
18745 such as lines length, trailing spaces, indentation, etc.")
18746 (license license:gpl3+)))
18747
18748 (define-public python-yapf
18749 (package
18750 (name "python-yapf")
18751 (version "0.29.0")
18752 (source
18753 (origin
18754 (method url-fetch)
18755 (uri (pypi-uri "yapf" version))
18756 (sha256
18757 (base32
18758 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
18759 (build-system python-build-system)
18760 (home-page "https://github.com/google/yapf")
18761 (synopsis "Formatter for Python code")
18762 (description "YAPF is a formatter for Python code. It's based off of
18763 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
18764 takes the code and reformats it to the best formatting that conforms to the
18765 style guide, even if the original code didn't violate the style guide.")
18766 (license license:asl2.0)))
18767
18768 (define-public python2-yapf
18769 (package-with-python2 python-yapf))
18770
18771 (define-public python-yq
18772 (package
18773 (name "python-yq")
18774 (version "2.11.1")
18775 (source
18776 (origin
18777 (method url-fetch)
18778 (uri (pypi-uri "yq" version))
18779 (sha256
18780 (base32
18781 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
18782 (build-system python-build-system)
18783 (arguments
18784 '(#:phases
18785 (modify-phases %standard-phases
18786 (add-after 'unpack 'patch
18787 (lambda* (#:key inputs #:allow-other-keys)
18788 (substitute* "yq/__init__.py"
18789 (("Popen\\(\\[\"jq")
18790 (string-append
18791 "Popen([\""
18792 (assoc-ref inputs "jq")
18793 "/bin/jq")))
18794 #t)))))
18795 (inputs
18796 `(("python-argcomplete" ,python-argcomplete)
18797 ("python-pyyaml" ,python-pyyaml)
18798 ("python-xmltodict" ,python-xmltodict)
18799 ("jq" ,jq)))
18800 (native-inputs
18801 `(("python-coverage" ,python-coverage)
18802 ("python-flake8" ,python-flake8)
18803 ("python-wheel" ,python-wheel)))
18804 (home-page "https://github.com/kislyuk/yq")
18805 (synopsis "Command-line YAML/XML processor")
18806 (description
18807 "This package provides @command{yq} and @command{xq} for processing YAML
18808 and XML respectively. The processing is done through @command{jq}, @command{jq}
18809 filters can be used to process the data as it passes through.")
18810 (license license:asl2.0)))
18811
18812 (define-public python-gyp
18813 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
18814 (revision "0"))
18815 (package
18816 (name "python-gyp")
18817 ;; Google does not release versions,
18818 ;; based on second most recent commit date.
18819 (version (git-version "0.0.0" revision commit))
18820 (source
18821 (origin
18822 ;; Google does not release tarballs,
18823 ;; git checkout is needed.
18824 (method git-fetch)
18825 (uri (git-reference
18826 (url "https://chromium.googlesource.com/external/gyp")
18827 (commit commit)))
18828 (file-name (git-file-name name version))
18829 (sha256
18830 (base32
18831 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
18832 (build-system python-build-system)
18833 (home-page "https://gyp.gsrc.io/")
18834 (synopsis "GYP is a Meta-Build system")
18835 (description
18836 "GYP builds build systems for large, cross platform applications.
18837 It can be used to generate XCode projects, Visual Studio projects, Ninja build
18838 files, and Makefiles.")
18839 (license license:bsd-3))))
18840
18841 (define-public python2-gyp
18842 (package-with-python2 python-gyp))
18843
18844 (define-public python-whatever
18845 (package
18846 (name "python-whatever")
18847 (version "0.6")
18848 (source
18849 (origin
18850 (method git-fetch)
18851 (uri (git-reference
18852 (url "https://github.com/Suor/whatever")
18853 (commit version)))
18854 (file-name (git-file-name name version))
18855 (sha256
18856 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
18857 (build-system python-build-system)
18858 (arguments
18859 `(#:phases
18860 (modify-phases %standard-phases
18861 (replace 'check
18862 (lambda _
18863 (invoke "py.test"))))))
18864 (native-inputs
18865 `(("python-pytest" ,python-pytest)))
18866 (home-page "https://github.com/Suor/whatever")
18867 (synopsis "Make anonymous functions by partial application of operators")
18868 (description "@code{whatever} provides an easy way to make anonymous
18869 functions by partial application of operators.")
18870 (license license:bsd-3)))
18871
18872 (define-public python2-whatever
18873 (package-with-python2 python-whatever))
18874
18875 (define-public python-funcy
18876 (package
18877 (name "python-funcy")
18878 (version "1.11")
18879 (source
18880 (origin
18881 (method git-fetch)
18882 (uri (git-reference
18883 (url "https://github.com/Suor/funcy")
18884 (commit version)))
18885 (sha256
18886 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
18887 (file-name (git-file-name name version))))
18888 (build-system python-build-system)
18889 (arguments
18890 `(#:phases
18891 (modify-phases %standard-phases
18892 (replace 'check
18893 (lambda _
18894 (invoke "py.test"))))))
18895 (native-inputs
18896 `(("python-pytest" ,python-pytest)
18897 ("python-whatever" ,python-whatever)))
18898 (home-page "https://github.com/Suor/funcy")
18899 (synopsis "Functional tools")
18900 (description "@code{funcy} is a library that provides functional tools.
18901 Examples are:
18902 @enumerate
18903 @item merge - Merges collections of the same type
18904 @item walk - Type-preserving map
18905 @item select - Selects a part of a collection
18906 @item take - Takes the first n items of a collection
18907 @item first - Takes the first item of a collection
18908 @item remove - Predicated-removes items of a collection
18909 @item concat - Concatenates two collections
18910 @item flatten - Flattens a collection with subcollections
18911 @item distinct - Returns only distinct items
18912 @item split - Predicated-splits a collection
18913 @item split_at - Splits a collection at a given item
18914 @item group_by - Groups items by group
18915 @item pairwise - Pairs off adjacent items
18916 @item partial - Partially-applies a function
18917 @item curry - Curries a function
18918 @item compose - Composes functions
18919 @item complement - Complements a predicate
18920 @item all_fn - \"all\" with predicate
18921 @end enumerate")
18922 (license license:bsd-3)))
18923
18924 (define-public python2-funcy
18925 (package-with-python2 python-funcy))
18926
18927 (define-public python-isoweek
18928 (package
18929 (name "python-isoweek")
18930 (version "1.3.3")
18931 (source
18932 (origin
18933 (method url-fetch)
18934 (uri (pypi-uri "isoweek" version))
18935 (sha256
18936 (base32
18937 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18938 (build-system python-build-system)
18939 (home-page "https://github.com/gisle/isoweek")
18940 (synopsis "Objects representing a week")
18941 (description "The @code{isoweek} module provide the class Week that
18942 implements the week definition of ISO 8601. This standard also defines
18943 a notation for identifying weeks; yyyyWww (where the W is a literal).
18944 Week instances stringify to this form.")
18945 (license license:bsd-3)))
18946
18947 (define-public python2-isoweek
18948 (package-with-python2 python-isoweek))
18949
18950 (define-public python-pyzbar
18951 (package
18952 (name "python-pyzbar")
18953 (version "0.1.8")
18954 (source
18955 (origin
18956 ;; There's no source tarball on PyPI.
18957 (method git-fetch)
18958 (uri (git-reference
18959 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18960 (commit (string-append "v" version))))
18961 (file-name (git-file-name name version))
18962 (sha256
18963 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18964 (build-system python-build-system)
18965 (arguments
18966 `(#:phases
18967 (modify-phases %standard-phases
18968 (add-after 'unpack 'remove-failing-test
18969 (lambda _
18970 ;; This tests if find_library was called once, but we remove
18971 ;; the call in the stage below to make the library find libzbar.
18972 (delete-file "pyzbar/tests/test_zbar_library.py")
18973 #t))
18974 (add-before 'build 'set-library-file-name
18975 (lambda* (#:key inputs #:allow-other-keys)
18976 (let ((libzbar (assoc-ref inputs "zbar")))
18977 (substitute* "pyzbar/zbar_library.py"
18978 (("find_library\\('zbar'\\)")
18979 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18980 #t))))))
18981 (native-inputs
18982 `(("pkg-config" ,pkg-config)
18983 ("python-numpy" ,python-numpy)
18984 ("python-pillow" ,python-pillow)))
18985 (inputs
18986 `(("zbar" ,zbar)))
18987 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18988 (synopsis "Read one-dimensional barcodes and QR codes")
18989 (description
18990 "Read one-dimensional barcodes and QR codes using the zbar library.
18991
18992 Features:
18993
18994 @itemize
18995 @item Pure python
18996 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18997 @item Decodes locations of barcodes
18998 @item No dependencies, other than the zbar library itself
18999 @end itemize")
19000 (license license:expat)))
19001
19002 (define-public python-tokenize-rt
19003 (package
19004 (name "python-tokenize-rt")
19005 (version "2.0.1")
19006 (source
19007 (origin
19008 (method url-fetch)
19009 (uri (pypi-uri "tokenize-rt" version))
19010 (sha256
19011 (base32
19012 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
19013 (build-system python-build-system)
19014 (home-page "https://github.com/asottile/tokenize-rt")
19015 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
19016 (description
19017 "This Python library is a wrapper around @code{tokenize} from the Python
19018 standard library. It provides two additional tokens @code{ESCAPED_NL} and
19019 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
19020 and @code{tokens_to_src} to roundtrip.")
19021 (license license:expat)))
19022
19023 (define-public python-future-fstrings
19024 (package
19025 (name "python-future-fstrings")
19026 (version "0.4.1")
19027 (source
19028 (origin
19029 (method url-fetch)
19030 (uri (pypi-uri "future_fstrings" version))
19031 (sha256
19032 (base32
19033 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
19034 (build-system python-build-system)
19035 (propagated-inputs
19036 `(("python-tokenize-rt" ,python-tokenize-rt)))
19037 (home-page "https://github.com/asottile/future-fstrings")
19038 (synopsis "Backport of fstrings to Python < 3.6")
19039 (description
19040 "This package provides a UTF-8 compatible encoding
19041 @code{future_fstrings}, which performs source manipulation. It decodes the
19042 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
19043 @code{f} strings.")
19044 (license license:expat)))
19045
19046 (define-public python-typed-ast
19047 (package
19048 (name "python-typed-ast")
19049 (version "1.4.0")
19050 (source
19051 (origin
19052 (method git-fetch)
19053 (uri (git-reference
19054 (url "https://github.com/python/typed_ast")
19055 (commit version)))
19056 (sha256
19057 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
19058 (file-name (git-file-name name version))))
19059 (build-system python-build-system)
19060 (arguments
19061 `(#:modules ((guix build utils)
19062 (guix build python-build-system)
19063 (ice-9 ftw)
19064 (srfi srfi-1)
19065 (srfi srfi-26))
19066 #:phases
19067 (modify-phases %standard-phases
19068 (replace 'check
19069 (lambda _
19070 (let ((cwd (getcwd)))
19071 (setenv "PYTHONPATH"
19072 (string-append cwd "/build/"
19073 (find (cut string-prefix? "lib" <>)
19074 (scandir (string-append cwd "/build")))
19075 ":"
19076 (getenv "PYTHONPATH"))))
19077 (invoke "pytest")
19078 #t)))))
19079 (native-inputs `(("python-pytest" ,python-pytest)))
19080 (home-page "https://github.com/python/typed_ast")
19081 (synopsis "Fork of Python @code{ast} modules with type comment support")
19082 (description "This package provides a parser similar to the standard
19083 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
19084 include PEP 484 type comments and are independent of the version of Python
19085 under which they are run. The @code{typed_ast} parsers produce the standard
19086 Python AST (plus type comments), and are both fast and correct, as they are
19087 based on the CPython 2.7 and 3.7 parsers.")
19088 ;; See the file "LICENSE" for the details.
19089 (license (list license:psfl
19090 license:asl2.0
19091 license:expat)))) ;ast27/Parser/spark.py
19092
19093 (define-public python-typer
19094 (package
19095 (name "python-typer")
19096 (version "0.3.2")
19097 (source
19098 (origin
19099 ;; Building `python-typer` from the git repository requires the `flit-core`
19100 ;; Python package that is not installed by `python-flit`.
19101 (method url-fetch)
19102 (uri (pypi-uri "typer" version))
19103 (sha256
19104 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
19105 (build-system python-build-system)
19106 (arguments
19107 `(#:phases
19108 (modify-phases %standard-phases
19109 (add-before 'check 'disable-failing-tests
19110 (lambda _
19111 (substitute* "tests/test_completion/test_completion.py"
19112 (("def test_show_completion")
19113 "def _test_show_completion")
19114 (("def test_install_completion")
19115 "def _test_install_completion"))
19116 (substitute* "tests/test_completion/test_completion_install.py"
19117 (("def test_completion_install_bash")
19118 "def _test_completion_install_bash")
19119 (("def test_completion_install_zsh")
19120 "def _test_completion_install_zsh")
19121 (("def test_completion_install_fish")
19122 "def _test_completion_install_fish")
19123 (("def test_completion_install_powershell")
19124 "def _test_completion_install_powershell"))
19125 #t))
19126 (replace 'check
19127 (lambda _
19128 (setenv "PYTHONPATH"
19129 (string-append (getcwd) ":"
19130 (getenv "PYTHONPATH")))
19131 (invoke "python" "-m" "pytest" "tests/")
19132 #t)))))
19133 (propagated-inputs
19134 `(("python-click" ,python-click)))
19135 (native-inputs
19136 `(("python-coverage" ,python-coverage)
19137 ("python-pytest" ,python-pytest)
19138 ("python-shellingham" ,python-shellingham)))
19139 (home-page "https://github.com/tiangolo/typer")
19140 (synopsis
19141 "Typer builds CLI based on Python type hints")
19142 (description
19143 "Typer is a library for building CLI applications. It's based on
19144 Python 3.6+ type hints.")
19145 ;; MIT license
19146 (license license:expat)))
19147
19148 (define-public python-typing
19149 (package
19150 (name "python-typing")
19151 (version "3.7.4.3")
19152 (source
19153 (origin
19154 (method url-fetch)
19155 (uri (pypi-uri "typing" version))
19156 (sha256
19157 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
19158 (build-system python-build-system)
19159 (home-page "https://docs.python.org/3/library/typing.html")
19160 (synopsis "Type hints for Python")
19161 (description "This is a backport of the standard library @code{typing}
19162 module to Python versions older than 3.5. Typing defines a standard notation
19163 for Python function and variable type annotations. The notation can be used
19164 for documenting code in a concise, standard format, and it has been designed
19165 to also be used by static and runtime type checkers, static analyzers, IDEs
19166 and other tools.")
19167 (license license:psfl)))
19168
19169 (define-public python2-typing
19170 (package-with-python2 python-typing))
19171
19172 (define-public python-typing-extensions
19173 (package
19174 (name "python-typing-extensions")
19175 (version "3.7.4.3")
19176 (source
19177 (origin
19178 (method url-fetch)
19179 (uri (pypi-uri "typing_extensions" version))
19180 (sha256
19181 (base32
19182 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
19183 (build-system python-build-system)
19184 (home-page
19185 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
19186 (synopsis "Experimental type hints for Python")
19187 (description
19188 "The typing_extensions module contains additional @code{typing} hints not
19189 yet present in the of the @code{typing} standard library.
19190 Included are implementations of:
19191 @enumerate
19192 @item ClassVar
19193 @item ContextManager
19194 @item Counter
19195 @item DefaultDict
19196 @item Deque
19197 @item NewType
19198 @item NoReturn
19199 @item overload
19200 @item Protocol
19201 @item runtime
19202 @item Text
19203 @item Type
19204 @item TYPE_CHECKING
19205 @item AsyncGenerator
19206 @end enumerate\n")
19207 (license license:psfl)))
19208
19209 (define-public bpython
19210 (package
19211 (name "bpython")
19212 (version "0.20.1")
19213 (source
19214 (origin
19215 (method url-fetch)
19216 (uri (pypi-uri "bpython" version))
19217 (sha256
19218 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
19219 (build-system python-build-system)
19220 (arguments
19221 `(#:phases
19222 (modify-phases %standard-phases
19223 (add-after 'unpack 'remove-failing-test
19224 (lambda _
19225 ;; Remove failing test. FIXME: make it pass
19226 (delete-file "bpython/test/test_args.py")
19227 #t))
19228 (add-after 'wrap 'add-aliases
19229 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
19230 (lambda* (#:key outputs #:allow-other-keys)
19231 (let ((out (assoc-ref outputs "out")))
19232 (for-each
19233 (lambda (old new)
19234 (symlink old (string-append out "/bin/" new)))
19235 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
19236 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
19237 #t)))))
19238 (propagated-inputs
19239 `(("python-pygments" ,python-pygments)
19240 ("python-requests" ,python-requests)
19241 ("python-curtsies" ,python-curtsies)
19242 ("python-greenlet" ,python-greenlet)
19243 ("python-six" ,python-six)
19244 ("python-wcwidth" ,python-wcwidth)
19245 ;; optional dependencies
19246 ("python-urwid" ,python-urwid) ; for bpython-urwid only
19247 ("python-watchdog" ,python-watchdog)
19248 ("python-jedi" ,python-jedi)))
19249 (native-inputs
19250 `(("python-sphinx" ,python-sphinx)
19251 ("python-mock" ,python-mock)))
19252 (home-page "https://bpython-interpreter.org/")
19253 (synopsis "Fancy interface to the Python interpreter")
19254 (description "Bpython is a fancy interface to the Python
19255 interpreter. bpython's main features are
19256
19257 @enumerate
19258 @item in-line syntax highlighting,
19259 @item readline-like autocomplete with suggestions displayed as you type,
19260 @item expected parameter list for any Python function,
19261 @item \"rewind\" function to pop the last line of code from memory and
19262 re-evaluate,
19263 @item send the code you've entered off to a pastebin,
19264 @item save the code you've entered to a file, and
19265 @item auto-indentation.
19266 @end enumerate")
19267 (license license:expat)))
19268
19269 (define-public python-pyinotify
19270 (package
19271 (name "python-pyinotify")
19272 (version "0.9.6")
19273 (source (origin
19274 (method url-fetch)
19275 (uri (pypi-uri "pyinotify" version))
19276 (sha256
19277 (base32
19278 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
19279 (build-system python-build-system)
19280 (arguments `(#:tests? #f)) ;no tests
19281 (home-page "https://github.com/seb-m/pyinotify")
19282 (synopsis "Python library for monitoring inotify events")
19283 (description
19284 "@code{pyinotify} provides a Python interface for monitoring
19285 file system events on Linux.")
19286 (license license:expat)))
19287
19288 (define-public python2-pyinotify
19289 (package-with-python2 python-pyinotify))
19290
19291 ;; Ada parser uses this version.
19292 (define-public python2-quex-0.67.3
19293 (package
19294 (name "python2-quex")
19295 (version "0.67.3")
19296 (source
19297 (origin
19298 (method url-fetch)
19299 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
19300 (version-major+minor version)
19301 "/quex-" version ".zip"))
19302 (sha256
19303 (base32
19304 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
19305 (build-system python-build-system)
19306 (native-inputs
19307 `(("unzip" ,unzip)))
19308 (arguments
19309 `(#:python ,python-2
19310 #:tests? #f
19311 #:phases
19312 (modify-phases %standard-phases
19313 (delete 'configure)
19314 (delete 'build)
19315 (replace 'install
19316 (lambda* (#:key outputs #:allow-other-keys)
19317 (let* ((out (assoc-ref outputs "out"))
19318 (share/quex (string-append out "/share/quex"))
19319 (bin (string-append out "/bin")))
19320 (copy-recursively "." share/quex)
19321 (mkdir-p bin)
19322 (symlink (string-append share/quex "/quex-exe.py")
19323 (string-append bin "/quex"))
19324 #t))))))
19325 (native-search-paths
19326 (list (search-path-specification
19327 (variable "QUEX_PATH")
19328 (files '("share/quex")))))
19329 (home-page "http://quex.sourceforge.net/")
19330 (synopsis "Lexical analyzer generator in Python")
19331 (description "@code{quex} is a lexical analyzer generator in Python.")
19332 (license license:lgpl2.1+))) ; Non-military
19333
19334 (define-public python2-quex
19335 (package (inherit python2-quex-0.67.3)
19336 (name "python2-quex")
19337 (version "0.68.1")
19338 (source
19339 (origin
19340 (method url-fetch)
19341 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
19342 (sha256
19343 (base32
19344 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
19345 (file-name (string-append name "-" version ".tar.gz"))))))
19346
19347 (define-public python-more-itertools
19348 (package
19349 (name "python-more-itertools")
19350 (version "8.2.0")
19351 (source
19352 (origin
19353 (method url-fetch)
19354 (uri (pypi-uri "more-itertools" version))
19355 (sha256
19356 (base32
19357 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
19358 (build-system python-build-system)
19359 (home-page "https://github.com/erikrose/more-itertools")
19360 (synopsis "More routines for operating on iterables, beyond itertools")
19361 (description "Python's built-in @code{itertools} module implements a
19362 number of iterator building blocks inspired by constructs from APL, Haskell,
19363 and SML. @code{more-itertools} includes additional building blocks for
19364 working with iterables.")
19365 (properties `((python2-variant . ,(delay python2-more-itertools))))
19366 (license license:expat)))
19367
19368 ;; The 5.x series are the last versions supporting Python 2.7.
19369 (define-public python2-more-itertools
19370 (package
19371 (inherit python-more-itertools)
19372 (name "python2-more-itertools")
19373 (version "5.0.0")
19374 (source (origin
19375 (method url-fetch)
19376 (uri (pypi-uri "more-itertools" version))
19377 (sha256
19378 (base32
19379 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
19380 (arguments
19381 `(#:python ,python-2))
19382 (propagated-inputs
19383 `(("python2-six" ,python2-six-bootstrap)))))
19384
19385 (define-public python-latexcodec
19386 (package
19387 (name "python-latexcodec")
19388 (version "1.0.7")
19389 (source
19390 (origin
19391 (method url-fetch)
19392 (uri (pypi-uri "latexcodec" version))
19393 (sha256
19394 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
19395 (build-system python-build-system)
19396 (inputs
19397 `(("python-six" ,python-six)))
19398 (home-page "https://readthedocs.org/projects/latexcodec/")
19399 (synopsis "Work with LaTeX code in Python")
19400 (description "Lexer and codec to work with LaTeX code in Python.")
19401 (license license:expat)))
19402
19403 (define-public python-pybtex
19404 (package
19405 (name "python-pybtex")
19406 (version "0.22.2")
19407 (source
19408 (origin
19409 (method url-fetch)
19410 (uri (pypi-uri "pybtex" version))
19411 (sha256
19412 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
19413 (build-system python-build-system)
19414 (native-inputs
19415 `(("python-nose" ,python-nose)))
19416 (inputs
19417 `(("python-latexcodec" ,python-latexcodec)
19418 ("python-pyyaml" ,python-pyyaml)
19419 ("python-six" ,python-six)))
19420 (arguments
19421 `(#:test-target "nosetests"))
19422 (home-page "https://pybtex.org/")
19423 (synopsis "BibTeX-compatible bibliography processor")
19424 (description "Pybtex is a BibTeX-compatible bibliography processor written
19425 in Python. You can simply type pybtex instead of bibtex.")
19426 (license license:expat)))
19427
19428 (define-public python-onetimepass
19429 (package
19430 (name "python-onetimepass")
19431 (version "1.0.1")
19432 (source
19433 (origin
19434 (method url-fetch)
19435 (uri (pypi-uri "onetimepass" version))
19436 (sha256
19437 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
19438 (build-system python-build-system)
19439 (propagated-inputs `(("python-six" ,python-six)))
19440 (home-page "https://github.com/tadeck/onetimepass/")
19441 (synopsis "One-time password library")
19442 (description "Python one-time password library for HMAC-based (HOTP) and
19443 time-based (TOTP) passwords.")
19444 (license license:expat)))
19445
19446 (define-public python-parso
19447 (package
19448 (name "python-parso")
19449 (version "0.7.1")
19450 (source
19451 (origin
19452 (method url-fetch)
19453 (uri (pypi-uri "parso" version))
19454 (sha256
19455 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
19456 (native-inputs
19457 `(("python-pytest" ,python-pytest)))
19458 (build-system python-build-system)
19459 (arguments
19460 `(#:phases (modify-phases %standard-phases
19461 (replace 'check
19462 (lambda _ (invoke "pytest" "-vv"))))))
19463 (home-page "https://github.com/davidhalter/parso")
19464 (synopsis "Python Parser")
19465 (description "Parso is a Python parser that supports error recovery and
19466 round-trip parsing for different Python versions (in multiple Python versions).
19467 Parso is also able to list multiple syntax errors in your Python file.")
19468 (license license:expat)))
19469
19470 (define-public python2-parso
19471 (package-with-python2 python-parso))
19472
19473 (define-public python-async-generator
19474 (package
19475 (name "python-async-generator")
19476 (version "1.10")
19477 (source
19478 (origin
19479 (method url-fetch)
19480 (uri (pypi-uri "async_generator" version))
19481 (sha256
19482 (base32
19483 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
19484 (build-system python-build-system)
19485 (native-inputs
19486 `(("python-pytest" ,python-pytest)))
19487 (home-page "https://github.com/python-trio/async_generator")
19488 (synopsis "Async generators and context managers for Python 3.5+")
19489 (description "@code{async_generator} back-ports Python 3.6's native async
19490 generators and Python 3.7's context managers into Python 3.5.")
19491 ;; Dual licensed.
19492 (license (list license:expat license:asl2.0))))
19493
19494 (define-public python-async-timeout
19495 (package
19496 (name "python-async-timeout")
19497 (version "3.0.1")
19498 (source
19499 (origin
19500 (method url-fetch)
19501 (uri (pypi-uri "async-timeout" version))
19502 (sha256
19503 (base32
19504 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
19505 (build-system python-build-system)
19506 (home-page "https://github.com/aio-libs/async_timeout/")
19507 (synopsis "Timeout context manager for asyncio programs")
19508 (description "@code{async-timeout} provides a timeout timeout context
19509 manager compatible with @code{asyncio}.")
19510 (license license:asl2.0)))
19511
19512 (define-public python-glob2
19513 (package
19514 (name "python-glob2")
19515 (version "0.7")
19516 (source
19517 (origin
19518 (method git-fetch)
19519 (uri (git-reference
19520 (url "https://github.com/miracle2k/python-glob2")
19521 (commit (string-append "v" version))))
19522 (file-name (git-file-name name version))
19523 (sha256
19524 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
19525 (build-system python-build-system)
19526 (home-page "https://github.com/miracle2k/python-glob2/")
19527 (synopsis "Extended Version of the python buildin glob module")
19528 (description "This is an extended version of the Python
19529 @url{http://docs.python.org/library/glob.html, built-in glob module} which
19530 adds:
19531
19532 @itemize
19533 @item The ability to capture the text matched by glob patterns, and return
19534 those matches alongside the file names.
19535 @item A recursive @code{**} globbing syntax, akin for example to the
19536 @code{globstar} option of Bash.
19537 @item The ability to replace the file system functions used, in order to glob
19538 on virtual file systems.
19539 @item Compatible with Python 2 and Python 3 (tested with 3.3).
19540 @end itemize
19541
19542 Glob2 currently based on the glob code from Python 3.3.1.")
19543 (license license:bsd-2)))
19544
19545 (define-public python2-glob2
19546 (package-with-python2 python-glob2))
19547
19548 (define-public python-gipc
19549 (package
19550 (name "python-gipc")
19551 (version "0.6.0")
19552 (source
19553 (origin
19554 (method url-fetch)
19555 (uri (pypi-uri "gipc" version ".zip"))
19556 (sha256
19557 (base32
19558 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
19559 (build-system python-build-system)
19560 (native-inputs
19561 `(("unzip" ,unzip)))
19562 (propagated-inputs
19563 `(("python-gevent" ,python-gevent)))
19564 (home-page "https://gehrcke.de/gipc/")
19565 (synopsis "Child process management in the context of gevent")
19566 (description "Usage of Python's multiprocessing package in a
19567 gevent-powered application may raise problems. With @code{gipc},
19568 process-based child processes can safely be created anywhere within a
19569 gevent-powered application.")
19570 (license license:expat)))
19571
19572 (define-public python-beautifultable
19573 (package
19574 (name "python-beautifultable")
19575 (version "1.0.0")
19576 (source
19577 (origin
19578 (method url-fetch)
19579 (uri (pypi-uri "beautifultable" version))
19580 (sha256
19581 (base32
19582 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
19583 (build-system python-build-system)
19584 (propagated-inputs
19585 `(("python-wcwidth" ,python-wcwidth)))
19586 (arguments
19587 `(#:phases
19588 (modify-phases %standard-phases
19589 (add-after 'unpack 'patch-setup.py
19590 (lambda _
19591 (substitute* "setup.py"
19592 (("setup\\(")
19593 "setup(\n test_suite=\"test\",")))))))
19594 (home-page "https://github.com/pri22296/beautifultable")
19595 (synopsis "Print ASCII tables for terminals")
19596 (description "@code{python-beautifultable} provides a class for easily
19597 printing tabular data in a visually appealing ASCII format to a terminal.
19598
19599 Features include, but are not limited to:
19600 @itemize
19601 @item Full customization of the look and feel of the table
19602 @item Row and column accessors.
19603 @item Full support for colors using ANSI sequences or any library.
19604 @item Plenty of predefined styles and option to create custom ones.
19605 @item Support for Unicode characters.
19606 @item Supports streaming table when data is slow to retrieve.
19607 @end itemize")
19608 (license license:expat)))
19609
19610 (define-public python-globber
19611 (package
19612 (name "python-globber")
19613 (version "0.2.1")
19614 (source
19615 (origin
19616 (method git-fetch)
19617 (uri (git-reference
19618 (url "https://github.com/asharov/globber")
19619 (commit version)))
19620 (file-name (git-file-name name version))
19621 (sha256
19622 (base32
19623 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
19624 (build-system python-build-system)
19625 (home-page "https://github.com/asharov/globber")
19626 (synopsis "Library for string matching with glob patterns")
19627 (description
19628 "Globber is a Python library for matching file names against glob patterns.
19629 In contrast to other glob-matching libraries, it matches arbitrary strings and
19630 doesn't require the matched names to be existing files. In addition, it
19631 supports the globstar @code{**} operator to match an arbitrary number of
19632 path components.")
19633 (license license:asl2.0)))
19634
19635 (define-public python-git-hammer
19636 (package
19637 (name "python-git-hammer")
19638 (version "0.3.1")
19639 (source
19640 (origin
19641 (method git-fetch)
19642 (uri (git-reference
19643 (url "https://github.com/asharov/git-hammer")
19644 (commit version)))
19645 (file-name (git-file-name name version))
19646 (sha256
19647 (base32
19648 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
19649 (build-system python-build-system)
19650 (arguments
19651 `(#:phases
19652 (modify-phases %standard-phases
19653 (add-after 'unpack 'patch-setup.py
19654 (lambda _
19655 (substitute* "setup.py"
19656 (("setup\\(")
19657 "setup(\n test_suite=\"test\",")))))))
19658 (propagated-inputs
19659 `(("python-beautifultable" ,python-beautifultable)
19660 ("python-dateutil" ,python-dateutil)
19661 ("python-gitpython" ,python-gitpython)
19662 ("python-globber" ,python-globber)
19663 ("python-matplotlib" ,python-matplotlib)
19664 ("python-sqlalchemy" ,python-sqlalchemy)
19665 ("python-sqlalchemy-utils"
19666 ,python-sqlalchemy-utils)))
19667 (home-page "https://github.com/asharov/git-hammer")
19668 (synopsis "Provide statistics for git repositories")
19669 (description
19670 "Git Hammer is a statistics tool for projects in git repositories.
19671 Its major feature is tracking the number of lines authored by each person for every
19672 commit, but it also includes some other useful statistics.")
19673 (license license:asl2.0)))
19674
19675 (define-public python-fusepy
19676 (package
19677 (name "python-fusepy")
19678 (version "2.0.4")
19679 (source
19680 (origin
19681 (method url-fetch)
19682 (uri (pypi-uri "fusepy" version))
19683 (sha256
19684 (base32
19685 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
19686 (build-system python-build-system)
19687 (arguments
19688 `(#:phases
19689 (modify-phases %standard-phases
19690 (add-before 'build 'set-library-file-name
19691 (lambda* (#:key inputs #:allow-other-keys)
19692 (let ((fuse (assoc-ref inputs "fuse")))
19693 (substitute* "fuse.py"
19694 (("find_library\\('fuse'\\)")
19695 (string-append "'" fuse "/lib/libfuse.so'")))
19696 #t))))))
19697 (propagated-inputs
19698 `(("fuse" ,fuse)))
19699 (home-page "https://github.com/fusepy/fusepy")
19700 (synopsis "Simple ctypes bindings for FUSE")
19701 (description "Python module that provides a simple interface to FUSE and
19702 MacFUSE. The binding is created using the standard @code{ctypes} library.")
19703 (license license:isc)))
19704
19705 (define-public python2-fusepy
19706 (package-with-python2 python-fusepy))
19707
19708 (define-public python-fusepyng
19709 (package
19710 (name "python-fusepyng")
19711 (version "1.0.7")
19712 (source
19713 (origin
19714 (method url-fetch)
19715 (uri (pypi-uri "fusepyng" version))
19716 (sha256
19717 (base32
19718 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
19719 (build-system python-build-system)
19720 (arguments
19721 '(#:phases
19722 (modify-phases %standard-phases
19723 (add-after 'unpack 'set-libfuse-path
19724 (lambda* (#:key inputs #:allow-other-keys)
19725 (let ((fuse (assoc-ref inputs "fuse")))
19726 (substitute* "fusepyng.py"
19727 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
19728 (string-append "\"" fuse "/lib/libfuse.so\""))))
19729 #t)))))
19730 (inputs
19731 `(("fuse" ,fuse)))
19732 (propagated-inputs
19733 `(("python-paramiko" ,python-paramiko)))
19734 (home-page "https://github.com/rianhunter/fusepyng")
19735 (synopsis "Simple ctypes bindings for FUSE")
19736 (description "@code{fusepyng} is a Python module that provides a simple
19737 interface to FUSE on various operating systems. It's just one file and is
19738 implemented using @code{ctypes}.")
19739 (license license:isc)))
19740
19741 (define-public python-userspacefs
19742 (package
19743 (name "python-userspacefs")
19744 (version "2.0.3")
19745 (source
19746 (origin
19747 (method url-fetch)
19748 (uri (pypi-uri "userspacefs" version))
19749 (sha256
19750 (base32
19751 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
19752 (build-system python-build-system)
19753 (propagated-inputs
19754 `(("python-fusepyng" ,python-fusepyng)))
19755 (home-page "https://github.com/rianhunter/userspacefs")
19756 (synopsis "User-space file systems for Python")
19757 (description
19758 "@code{userspacefs} is a library that allows you to easily write
19759 user-space file systems in Python.")
19760 (license license:gpl3+)))
19761
19762 (define-public python-stone
19763 (package
19764 (name "python-stone")
19765 (version "3.2.1")
19766 (source
19767 (origin
19768 (method url-fetch)
19769 (uri (pypi-uri "stone" version))
19770 (sha256
19771 (base32
19772 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
19773 (build-system python-build-system)
19774 (arguments
19775 `(#:phases
19776 (modify-phases %standard-phases
19777 (add-after 'unpack 'change-version-requirements
19778 (lambda _
19779 ;; Match the requirement in test/requirements.txt
19780 (substitute* "setup.py"
19781 (("pytest < 5") "pytest < 7"))
19782 ;; We don't care about a coverage report.
19783 (substitute* "test/requirements.txt"
19784 (("coverage.*") "coverage\n"))
19785 #t))
19786 (replace 'check
19787 (lambda* (#:key tests? #:allow-other-keys)
19788 (when tests?
19789 ;; These tests don't import currectly.
19790 (delete-file "test/test_js_client.py")
19791 (delete-file "test/test_tsd_types.py")
19792 (delete-file "test/test_python_gen.py")
19793 (setenv "PYTHONPATH"
19794 (string-append (getcwd) ":"
19795 (getenv "PYTHONPATH")))
19796 (invoke "pytest"))
19797 #t)))))
19798 (propagated-inputs
19799 `(("python-ply" ,python-ply)
19800 ("python-six" ,python-six)))
19801 (native-inputs
19802 `(("python-coverage" ,python-coverage)
19803 ("python-mock" ,python-mock)
19804 ("python-pytest" ,python-pytest)
19805 ("python-pytest-runner" ,python-pytest-runner)))
19806 (home-page "https://github.com/dropbox/stone")
19807 (synopsis "Official Api Spec Language for Dropbox")
19808 (description
19809 "Stone is an interface description language (IDL) for APIs.")
19810 (license license:expat)))
19811
19812 (define-public pybind11
19813 (package
19814 (name "pybind11")
19815 (version "2.6.1")
19816 (source (origin
19817 (method git-fetch)
19818 (uri (git-reference
19819 (url "https://github.com/pybind/pybind11")
19820 (commit (string-append "v" version))))
19821 (sha256
19822 (base32
19823 "1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
19824 (file-name (git-file-name name version))))
19825 (build-system cmake-build-system)
19826 (native-inputs
19827 `(("python" ,python-wrapper)
19828
19829 ;; The following dependencies are used for tests.
19830 ("python-pytest" ,python-pytest)
19831 ("catch" ,catch-framework2-1)
19832 ("eigen" ,eigen)))
19833 (arguments
19834 `(#:configure-flags
19835 (list (string-append "-DCATCH_INCLUDE_DIR="
19836 (assoc-ref %build-inputs "catch")
19837 "/include/catch"))
19838
19839 #:phases (modify-phases %standard-phases
19840 (add-after 'install 'install-python
19841 (lambda* (#:key outputs #:allow-other-keys)
19842 (let ((out (assoc-ref outputs "out")))
19843 (with-directory-excursion "../source"
19844 (setenv "PYBIND11_USE_CMAKE" "yes")
19845 (invoke "python" "setup.py" "install"
19846 "--single-version-externally-managed"
19847 "--root=/"
19848 (string-append "--prefix=" out)))))))
19849
19850 #:test-target "check"))
19851 (home-page "https://github.com/pybind/pybind11/")
19852 (synopsis "Seamless operability between C++11 and Python")
19853 (description
19854 "@code{pybind11} is a lightweight header-only library that exposes C++
19855 types in Python and vice versa, mainly to create Python bindings of existing
19856 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
19857 library: to minimize boilerplate code in traditional extension modules by
19858 inferring type information using compile-time introspection.")
19859 (license license:bsd-3)))
19860
19861 (define-public python-pooch
19862 (package
19863 (name "python-pooch")
19864 (version "1.3.0")
19865 (source
19866 (origin
19867 (method url-fetch)
19868 (uri (pypi-uri "pooch" version))
19869 (sha256
19870 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
19871 (build-system python-build-system)
19872 (arguments
19873 `(#:tests? #f)) ;requires online data
19874 (propagated-inputs
19875 `(("python-appdirs" ,python-appdirs)
19876 ("python-packaging" ,python-packaging)
19877 ("python-requests" ,python-requests)))
19878 (home-page "https://github.com/fatiando/pooch")
19879 (synopsis "Manage your Python library's sample data files")
19880 (description
19881 "Pooch manages your Python library's sample data files: it automatically
19882 downloads and stores them in a local directory, with support for versioning
19883 and corruption checks.")
19884 (license license:bsd-3)))
19885
19886 (define-public python-fasteners
19887 (package
19888 (name "python-fasteners")
19889 (version "0.15")
19890 (source
19891 (origin
19892 (method url-fetch)
19893 (uri (pypi-uri "fasteners" version))
19894 (sha256
19895 (base32
19896 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
19897 (build-system python-build-system)
19898 (propagated-inputs
19899 `(("python-monotonic" ,python-monotonic)
19900 ("python-six" ,python-six)))
19901 (native-inputs
19902 `(("python-testtools" ,python-testtools)))
19903 (home-page "https://github.com/harlowja/fasteners")
19904 (synopsis "Python package that provides useful locks")
19905 (description
19906 "This package provides a Python program that provides following locks:
19907
19908 @itemize
19909 @item Locking decorator
19910 @item Reader-writer locks
19911 @item Inter-process locks
19912 @item Generic helpers
19913 @end itemize\n")
19914 (license license:asl2.0)))
19915
19916 (define-public python-requests-file
19917 (package
19918 (name "python-requests-file")
19919 (version "1.4.3")
19920 (source
19921 (origin
19922 (method url-fetch)
19923 (uri (pypi-uri "requests-file" version))
19924 (sha256
19925 (base32
19926 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
19927 (build-system python-build-system)
19928 (propagated-inputs
19929 `(("python-requests" ,python-requests)
19930 ("python-six" ,python-six)))
19931 (home-page
19932 "https://github.com/dashea/requests-file")
19933 (synopsis "File transport adapter for Requests")
19934 (description
19935 "Requests-File is a transport adapter for use with the Requests Python
19936 library to allow local file system access via @code{file://} URLs.")
19937 (license license:asl2.0)))
19938
19939 (define-public python2-requests-file
19940 (package-with-python2 python-requests-file))
19941
19942 (define-public python-identify
19943 (package
19944 (name "python-identify")
19945 (version "1.4.25")
19946 (source
19947 (origin
19948 ;; There are no tests in the PyPI tarball.
19949 (method git-fetch)
19950 (uri (git-reference
19951 (url "https://github.com/chriskuehl/identify")
19952 (commit (string-append "v" version))))
19953 (file-name (git-file-name name version))
19954 (sha256
19955 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
19956 (build-system python-build-system)
19957 (arguments
19958 `(#:phases
19959 (modify-phases %standard-phases
19960 (replace 'check
19961 (lambda _
19962 (invoke "pytest" "-vv"))))))
19963 (native-inputs
19964 `(("python-coverage" ,python-coverage)
19965 ("python-pytest" ,python-pytest)))
19966 (propagated-inputs
19967 `(("python-editdistance" ,python-editdistance)))
19968 (home-page "https://github.com/chriskuehl/identify")
19969 (synopsis "File identification library for Python")
19970 (description
19971 "@code{identify} is a file identification library for Python. Given
19972 a file (or some information about a file), return a set of standardized tags
19973 identifying what the file is.")
19974 (license license:expat)))
19975
19976 (define-public python-tldextract
19977 (package
19978 (name "python-tldextract")
19979 (version "2.2.0")
19980 (source
19981 (origin
19982 (method url-fetch)
19983 (uri (pypi-uri "tldextract" version))
19984 (sha256
19985 (base32
19986 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19987 (build-system python-build-system)
19988 (native-inputs
19989 `(("python-pytest" ,python-pytest)
19990 ("python-responses" ,python-responses)))
19991 (propagated-inputs
19992 `(("python-idna" ,python-idna)
19993 ("python-requests" ,python-requests)
19994 ("python-requests-file" ,python-requests-file)))
19995 (home-page
19996 "https://github.com/john-kurkowski/tldextract")
19997 (synopsis
19998 "Separate the TLD from the registered domain and subdomains of a URL")
19999 (description
20000 "TLDExtract accurately separates the TLD from the registered domain and
20001 subdomains of a URL, using the Public Suffix List. By default, this includes
20002 the public ICANN TLDs and their exceptions. It can optionally support the
20003 Public Suffix List's private domains as well.")
20004 (license license:bsd-3)))
20005
20006 (define-public python2-tldextract
20007 (package-with-python2 python-tldextract))
20008
20009 (define-public python-nodeenv
20010 (package
20011 (name "python-nodeenv")
20012 (version "1.4.0")
20013 (source
20014 (origin
20015 ;; There's no tarball in PyPI.
20016 (method git-fetch)
20017 (uri (git-reference
20018 (url "https://github.com/ekalinin/nodeenv")
20019 (commit version)))
20020 (file-name (git-file-name name version))
20021 (sha256
20022 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
20023 (build-system python-build-system)
20024 (arguments
20025 `(#:phases
20026 (modify-phases %standard-phases
20027 (replace 'check
20028 (lambda _
20029 ;; This test fails. It tries to open a network socket.
20030 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
20031 (native-inputs
20032 `(("python-coverage" ,python-coverage)
20033 ("python-mock" ,python-mock)
20034 ("python-pytest" ,python-pytest)))
20035 (home-page "https://ekalinin.github.io/nodeenv/")
20036 (synopsis "Create isolated node.js environments")
20037 (description
20038 "Nodeenv (node.js virtual environment) is a tool to create isolated
20039 node.js environments. It creates an environment that has its own installation
20040 directories, that doesn't share libraries with other node.js virtual
20041 environments.")
20042 (license license:bsd-3)))
20043
20044 (define-public python-pynamecheap
20045 (package
20046 (name "python-pynamecheap")
20047 (version "0.0.3")
20048 (source
20049 (origin
20050 (method url-fetch)
20051 (uri (pypi-uri "PyNamecheap" version))
20052 (sha256
20053 (base32
20054 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
20055 (build-system python-build-system)
20056 (propagated-inputs
20057 `(("python-requests" ,python-requests)))
20058 (home-page
20059 "https://github.com/Bemmu/PyNamecheap")
20060 (synopsis
20061 "Namecheap API client in Python")
20062 (description
20063 "PyNamecheap is a Namecheap API client in Python.")
20064 (license license:expat)))
20065
20066 (define-public python2-pynamecheap
20067 (package-with-python2 python-pynamecheap))
20068
20069 (define-public python-dns-lexicon
20070 (package
20071 (name "python-dns-lexicon")
20072 (version "2.4.0")
20073 (source
20074 (origin
20075 (method url-fetch)
20076 (uri (pypi-uri "dns-lexicon" version))
20077 (sha256
20078 (base32
20079 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
20080 (build-system python-build-system)
20081 (arguments
20082 `(#:tests? #f)) ;requires internet access
20083 (propagated-inputs
20084 `(("python-future" ,python-future)
20085 ("python-pynamecheap" ,python-pynamecheap)
20086 ("python-requests" ,python-requests)
20087 ("python-tldextract" ,python-tldextract)
20088 ("python-urllib3" ,python-urllib3)))
20089 (home-page "https://github.com/AnalogJ/lexicon")
20090 (synopsis
20091 "Manipulate DNS records on various DNS providers")
20092 (description
20093 "Lexicon provides a way to manipulate DNS records on multiple DNS
20094 providers in a standardized way. It has a CLI but it can also be used as a
20095 Python library. It was designed to be used in automation, specifically with
20096 Let's Encrypt.")
20097 (license license:expat)))
20098
20099 (define-public python2-dns-lexicon
20100 (package-with-python2 python-dns-lexicon))
20101
20102 (define-public python-cfgv
20103 (package
20104 (name "python-cfgv")
20105 (version "3.1.0")
20106 (source
20107 (origin
20108 ;; There are no tests in the PyPI tarball.
20109 (method git-fetch)
20110 (uri (git-reference
20111 (url "https://github.com/asottile/cfgv")
20112 (commit (string-append "v" version))))
20113 (file-name (git-file-name name version))
20114 (sha256
20115 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
20116 (build-system python-build-system)
20117 (arguments
20118 `(#:phases
20119 (modify-phases %standard-phases
20120 (replace 'check
20121 (lambda _
20122 (invoke "pytest" "-vv"))))))
20123 (native-inputs
20124 `(("python-covdefaults" ,python-covdefaults)
20125 ("python-coverage" ,python-coverage)
20126 ("python-pytest" ,python-pytest)))
20127 (home-page "https://github.com/asottile/cfgv")
20128 (synopsis "Configuration validation library")
20129 (description
20130 "This library helps to validate configuration files and produce human
20131 readable error messages.")
20132 (license license:expat)))
20133
20134 (define-public python-commandlines
20135 (package
20136 (name "python-commandlines")
20137 (version "0.4.1")
20138 (source
20139 (origin
20140 (method url-fetch)
20141 (uri (pypi-uri "commandlines" version))
20142 (sha256
20143 (base32
20144 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
20145 (build-system python-build-system)
20146 (home-page "https://github.com/chrissimpkins/commandlines")
20147 (synopsis "Command line argument to object parsing library")
20148 (description
20149 "@code{Commandlines} is a Python library for command line application
20150 development that supports command line argument parsing, command string
20151 validation testing and application logic.")
20152 (license license:expat)))
20153
20154 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
20155 ;; python-numba. They have a very unflexible relationship.
20156 (define-public python-numba
20157 (package
20158 (name "python-numba")
20159 (version "0.51.2")
20160 (source
20161 (origin
20162 (method url-fetch)
20163 (uri (pypi-uri "numba" version))
20164 (sha256
20165 (base32
20166 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
20167 (build-system python-build-system)
20168 (arguments
20169 `(#:phases
20170 (modify-phases %standard-phases
20171 (add-after 'unpack 'disable-proprietary-features
20172 (lambda _
20173 (setenv "NUMBA_DISABLE_HSA" "1")
20174 (setenv "NUMBA_DISABLE_CUDA" "1")
20175 #t))
20176 (replace 'check
20177 (lambda* (#:key inputs outputs #:allow-other-keys)
20178 (add-installed-pythonpath inputs outputs)
20179 ;; Something is wrong with the PYTHONPATH when running the
20180 ;; tests from the build directory, as it complains about not being
20181 ;; able to import certain modules.
20182 (with-directory-excursion "/tmp"
20183 (setenv "HOME" (getcwd))
20184 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
20185 (propagated-inputs
20186 `(("python-llvmlite" ,python-llvmlite)
20187 ("python-numpy" ,python-numpy)
20188 ("python-singledispatch" ,python-singledispatch)))
20189 (native-inputs ;for tests
20190 `(("python-jinja2" ,python-jinja2)
20191 ("python-pygments" ,python-pygments)))
20192 (home-page "https://numba.pydata.org")
20193 (synopsis "Compile Python code using LLVM")
20194 (description "Numba gives you the power to speed up your applications with
20195 high performance functions written directly in Python. With a few
20196 annotations, array-oriented and math-heavy Python code can be just-in-time
20197 compiled to native machine instructions, similar in performance to C, C++ and
20198 Fortran, without having to switch languages or Python interpreters.
20199
20200 Numba works by generating optimized machine code using the LLVM compiler
20201 infrastructure at import time, runtime, or statically (using the included pycc
20202 tool).")
20203 (license license:bsd-3)))
20204
20205 (define-public python-numcodecs
20206 (package
20207 (name "python-numcodecs")
20208 (version "0.6.4")
20209 (source
20210 (origin
20211 (method url-fetch)
20212 (uri (pypi-uri "numcodecs" version))
20213 (sha256
20214 (base32
20215 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
20216 (build-system python-build-system)
20217 (propagated-inputs
20218 `(("python-numpy" ,python-numpy)
20219 ("python-msgpack" ,python-msgpack)))
20220 (native-inputs
20221 `(("python-pytest" ,python-pytest)
20222 ("python-setuptools-scm" ,python-setuptools-scm)))
20223 (home-page "https://github.com/zarr-developers/numcodecs")
20224 (synopsis "Buffer compression and transformation codecs")
20225 (description
20226 "This Python package provides buffer compression and transformation
20227 codecs for use in data storage and communication applications.")
20228 (license license:expat)))
20229
20230 (define-public python-asciitree
20231 (package
20232 (name "python-asciitree")
20233 (version "0.3.3")
20234 (source
20235 (origin
20236 (method url-fetch)
20237 (uri (pypi-uri "asciitree" version))
20238 (sha256
20239 (base32
20240 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
20241 (build-system python-build-system)
20242 (home-page "https://github.com/mbr/asciitree")
20243 (synopsis "Draws ASCII trees")
20244 (description "This package draws tree structures using characters.")
20245 (license license:expat)))
20246
20247 (define-public python-zarr
20248 (package
20249 (name "python-zarr")
20250 (version "2.4.0")
20251 (source
20252 (origin
20253 (method url-fetch)
20254 (uri (pypi-uri "zarr" version))
20255 (sha256
20256 (base32
20257 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
20258 (build-system python-build-system)
20259 (arguments
20260 `(#:phases
20261 (modify-phases %standard-phases
20262 (add-after 'unpack 'disable-service-tests
20263 (lambda _
20264 (setenv "ZARR_TEST_ABS" "0")
20265 (setenv "ZARR_TEST_MONGO" "0")
20266 (setenv "ZARR_TEST_REDIS" "0")
20267 #t))
20268 (replace 'check
20269 (lambda _
20270 (invoke "pytest" "-vv" "-k" "not lmdb")
20271 #t)))))
20272 (propagated-inputs
20273 `(("python-asciitree" ,python-asciitree)
20274 ("python-fasteners" ,python-fasteners)
20275 ("python-numcodecs" ,python-numcodecs)
20276 ("python-numpy" ,python-numpy)))
20277 (native-inputs
20278 `(("python-pytest" ,python-pytest)
20279 ("python-setuptools-scm" ,python-setuptools-scm)))
20280 (home-page "https://github.com/zarr-developers/zarr-python")
20281 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
20282 (description
20283 "This package provides an implementation of chunked, compressed,
20284 N-dimensional arrays for Python.")
20285 (license license:expat)))
20286
20287 (define-public python-anndata
20288 (package
20289 (name "python-anndata")
20290 (version "0.7.1")
20291 (source
20292 (origin
20293 (method url-fetch)
20294 (uri (pypi-uri "anndata" version))
20295 (sha256
20296 (base32
20297 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
20298 (build-system python-build-system)
20299 (arguments
20300 `(#:phases
20301 (modify-phases %standard-phases
20302 (add-after 'unpack 'delete-inconvenient-tests
20303 (lambda _
20304 ;; This test depends on python-scikit-learn.
20305 (delete-file "anndata/tests/test_inplace_subset.py")
20306 #t))
20307 (delete 'check)
20308 (add-after 'install 'check
20309 (lambda* (#:key inputs outputs #:allow-other-keys)
20310 (add-installed-pythonpath inputs outputs)
20311 (invoke "pytest" "-vv"))))))
20312 (propagated-inputs
20313 `(("python-h5py" ,python-h5py)
20314 ("python-importlib-metadata" ,python-importlib-metadata)
20315 ("python-natsort" ,python-natsort)
20316 ("python-numcodecs" ,python-numcodecs)
20317 ("python-packaging" ,python-packaging)
20318 ("python-pandas" ,python-pandas)
20319 ("python-scipy" ,python-scipy)
20320 ("python-zarr" ,python-zarr)))
20321 (native-inputs
20322 `(("python-joblib" ,python-joblib)
20323 ("python-pytest" ,python-pytest)
20324 ("python-setuptools-scm" ,python-setuptools-scm)))
20325 (home-page "https://github.com/theislab/anndata")
20326 (synopsis "Annotated data for data analysis pipelines")
20327 (description "Anndata is a package for simple (functional) high-level APIs
20328 for data analysis pipelines. In this context, it provides an efficient,
20329 scalable way of keeping track of data together with learned annotations and
20330 reduces the code overhead typically encountered when using a mostly
20331 object-oriented library such as @code{scikit-learn}.")
20332 (license license:bsd-3)))
20333
20334 (define-public python-dill
20335 (package
20336 (name "python-dill")
20337 (version "0.3.1.1")
20338 (source
20339 (origin
20340 (method url-fetch)
20341 (uri (pypi-uri "dill" version))
20342 (sha256
20343 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
20344 (build-system python-build-system)
20345 (arguments
20346 `(#:phases
20347 (modify-phases %standard-phases
20348 (replace 'check
20349 (lambda _
20350 (with-directory-excursion "/tmp"
20351 (invoke "nosetests" "-v"))
20352 #t)))))
20353 (native-inputs
20354 `(("python-nose" ,python-nose)))
20355 (home-page "https://pypi.org/project/dill/")
20356 (synopsis "Serialize all of Python")
20357 (description "Dill extends Python's @code{pickle} module for serializing
20358 and de-serializing Python objects to the majority of the built-in Python
20359 types. Dill provides the user the same interface as the @code{pickle} module,
20360 and also includes some additional features. In addition to pickling Python
20361 objects, @code{dill} provides the ability to save the state of an interpreter
20362 session in a single command. Hence, it would be feasible to save a
20363 interpreter session, close the interpreter, ship the pickled file to another
20364 computer, open a new interpreter, unpickle the session and thus continue from
20365 the saved state of the original interpreter session.")
20366 (license license:bsd-3)))
20367
20368 (define-public python-multiprocess
20369 (package
20370 (name "python-multiprocess")
20371 (version "0.70.9")
20372 (source
20373 (origin
20374 (method url-fetch)
20375 (uri (pypi-uri "multiprocess" version))
20376 (sha256
20377 (base32
20378 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
20379 (build-system python-build-system)
20380 (arguments
20381 `(#:phases
20382 (modify-phases %standard-phases
20383 (add-after 'unpack 'disable-broken-tests
20384 (lambda _
20385 ;; This test is broken as there is no keyboard interrupt.
20386 (substitute* "py3.7/multiprocess/tests/__init__.py"
20387 (("^(.*)def test_wait_result"
20388 line indent)
20389 (string-append indent
20390 "@unittest.skip(\"Disabled by Guix\")\n"
20391 line)))
20392 #t))
20393 ;; Tests must be run after installation.
20394 (delete 'check)
20395 (add-after 'install 'check
20396 (lambda* (#:key inputs outputs #:allow-other-keys)
20397 (add-installed-pythonpath inputs outputs)
20398 (invoke "python" "-m" "multiprocess.tests")
20399 #t)))))
20400 (propagated-inputs
20401 `(("python-dill" ,python-dill)))
20402 (home-page "https://pypi.org/project/multiprocess/")
20403 (synopsis "Multiprocessing and multithreading in Python")
20404 (description
20405 "This package is a fork of the multiprocessing Python package, a package
20406 which supports the spawning of processes using the API of the standard
20407 library's @code{threading} module.")
20408 (license license:bsd-3)))
20409
20410 (define-public python-toolz
20411 (package
20412 (name "python-toolz")
20413 (version "0.9.0")
20414 (source
20415 (origin
20416 (method url-fetch)
20417 (uri (pypi-uri "toolz" version))
20418 (sha256
20419 (base32
20420 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
20421 (build-system python-build-system)
20422 ;; FIXME: tests cannot be computed: "Can't perform this operation for
20423 ;; unregistered loader type"
20424 (arguments '(#:tests? #f))
20425 (home-page "https://github.com/pytoolz/toolz/")
20426 (synopsis "List processing tools and functional utilities")
20427 (description
20428 "This package provides a set of utility functions for iterators,
20429 functions, and dictionaries.")
20430 (license license:bsd-3)))
20431
20432 (define-public python2-toolz
20433 (package-with-python2 python-toolz))
20434
20435 (define-public python-cytoolz
20436 (package
20437 (name "python-cytoolz")
20438 (version "0.9.0.1")
20439 (source
20440 (origin
20441 (method url-fetch)
20442 (uri (pypi-uri "cytoolz" version))
20443 (sha256
20444 (base32
20445 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
20446 (build-system python-build-system)
20447 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
20448 ;; 'exceptions'"
20449 (arguments '(#:tests? #f))
20450 (propagated-inputs
20451 `(("python-toolz" ,python-toolz)))
20452 (native-inputs
20453 `(("python-cython" ,python-cython)))
20454 (home-page "https://github.com/pytoolz/cytoolz")
20455 (synopsis "High performance functional utilities")
20456 (description
20457 "The cytoolz package implements the same API as provided by toolz. The
20458 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
20459 that is accessible to other projects developed in Cython.")
20460 (license license:bsd-3)))
20461
20462 (define-public python-sortedcollections
20463 (package
20464 (name "python-sortedcollections")
20465 (version "2.1.0")
20466 (source
20467 (origin
20468 (method url-fetch)
20469 (uri (pypi-uri "sortedcollections" version))
20470 (sha256
20471 (base32
20472 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
20473 (build-system python-build-system)
20474 (propagated-inputs
20475 `(("python-sortedcontainers" ,python-sortedcontainers)))
20476 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
20477 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
20478 (synopsis "Python Sorted Collections")
20479 (description "Sorted Collections is a Python sorted collections library.")
20480 (license license:asl2.0)))
20481
20482 (define-public python-sortedcontainers
20483 (package
20484 (name "python-sortedcontainers")
20485 (version "2.1.0")
20486 (source
20487 (origin
20488 (method url-fetch)
20489 (uri (pypi-uri "sortedcontainers" version))
20490 (sha256
20491 (base32
20492 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
20493 (build-system python-build-system)
20494 (arguments
20495 ;; FIXME: Tests require many extra dependencies, and would introduce
20496 ;; a circular dependency on hypothesis, which uses this package.
20497 '(#:tests? #f))
20498 (propagated-inputs
20499 `(("python-appdirs" ,python-appdirs)
20500 ("python-distlib" ,python-distlib)
20501 ("python-filelock" ,python-filelock)
20502 ("python-six" ,python-six-bootstrap)))
20503 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
20504 (synopsis "Sorted List, Sorted Dict, Sorted Set")
20505 (description
20506 "This package provides a sorted collections library, written in
20507 pure-Python.")
20508 (license license:asl2.0)))
20509
20510 (define-public python2-sortedcontainers
20511 (package-with-python2 python-sortedcontainers))
20512
20513 (define-public python-cloudpickle
20514 (package
20515 (name "python-cloudpickle")
20516 (version "1.3.0")
20517 (source
20518 (origin
20519 (method url-fetch)
20520 (uri (pypi-uri "cloudpickle" version))
20521 (sha256
20522 (base32
20523 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
20524 (build-system python-build-system)
20525 (arguments
20526 '(#:phases (modify-phases %standard-phases
20527 (add-before 'check 'do-not-override-PYTHONPATH
20528 (lambda _
20529 ;; Append to PYTHONPATH instead of overriding it so
20530 ;; that dependencies from Guix can be found.
20531 (substitute* "tests/testutils.py"
20532 (("env\\['PYTHONPATH'\\] = pythonpath")
20533 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
20534 #t))
20535 (replace 'check
20536 (lambda* (#:key tests? #:allow-other-keys)
20537 (if tests?
20538 (invoke "pytest" "-s" "-vv")
20539 (format #t "test suite not run~%"))
20540 #t)))))
20541 (native-inputs
20542 `(;; For tests.
20543 ("python-psutil" ,python-psutil)
20544 ("python-pytest" ,python-pytest)
20545 ("python-tornado" ,python-tornado)))
20546 (home-page "https://github.com/cloudpipe/cloudpickle")
20547 (synopsis "Extended pickling support for Python objects")
20548 (description
20549 "Cloudpickle makes it possible to serialize Python constructs not
20550 supported by the default pickle module from the Python standard library. It
20551 is especially useful for cluster computing where Python expressions are
20552 shipped over the network to execute on remote hosts, possibly close to the
20553 data.")
20554 (properties `((python2-variant . ,(delay python2-cloudpickle))))
20555 (license license:bsd-3)))
20556
20557 (define-public python2-cloudpickle
20558 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
20559 (package/inherit base
20560 (native-inputs
20561 `(("python-mock" ,python2-mock)
20562 ,@(package-native-inputs base)))
20563 (propagated-inputs
20564 `(("python-futures" ,python2-futures)
20565 ,@(package-propagated-inputs base))))))
20566
20567 (define-public python-locket
20568 (package
20569 (name "python-locket")
20570 (version "0.2.0")
20571 (source
20572 (origin
20573 (method url-fetch)
20574 (uri (pypi-uri "locket" version))
20575 (sha256
20576 (base32
20577 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
20578 (build-system python-build-system)
20579 (home-page "https://github.com/mwilliamson/locket.py")
20580 (synopsis "File-based locks for Python")
20581 (description
20582 "Locket implements a lock that can be used by multiple processes provided
20583 they use the same path.")
20584 (license license:bsd-2)))
20585
20586 (define-public python2-locket
20587 (package-with-python2 python-locket))
20588
20589 (define-public python-blosc
20590 (package
20591 (name "python-blosc")
20592 (version "1.5.1")
20593 (source
20594 (origin
20595 (method url-fetch)
20596 (uri (pypi-uri "blosc" version))
20597 (sha256
20598 (base32
20599 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
20600 (build-system python-build-system)
20601 ;; FIXME: all tests pass, but then this error is printed:
20602 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
20603 (arguments '(#:tests? #f))
20604 (propagated-inputs
20605 `(("python-numpy" ,python-numpy)))
20606 (home-page "https://github.com/blosc/python-blosc")
20607 (synopsis "Python wrapper for the Blosc data compressor library")
20608 (description "Blosc is a high performance compressor optimized for binary
20609 data. It has been designed to transmit data to the processor cache faster
20610 than the traditional, non-compressed, direct memory fetch approach via a
20611 @code{memcpy()} system call.
20612
20613 Blosc works well for compressing numerical arrays that contains data with
20614 relatively low entropy, like sparse data, time series, grids with
20615 regular-spaced values, etc.
20616
20617 This Python package wraps the Blosc library.")
20618 (license license:bsd-3)))
20619
20620 (define-public python2-blosc
20621 (package-with-python2 python-blosc))
20622
20623 (define-public python-partd
20624 (package
20625 (name "python-partd")
20626 (version "0.3.9")
20627 (source
20628 (origin
20629 (method url-fetch)
20630 (uri (pypi-uri "partd" version))
20631 (sha256
20632 (base32
20633 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
20634 (build-system python-build-system)
20635 (propagated-inputs
20636 `(("python-blosc" ,python-blosc)
20637 ("python-locket" ,python-locket)
20638 ("python-numpy" ,python-numpy)
20639 ("python-pandas" ,python-pandas)
20640 ("python-pyzmq" ,python-pyzmq)
20641 ("python-toolz" ,python-toolz)))
20642 (home-page "https://github.com/dask/partd/")
20643 (synopsis "Appendable key-value storage")
20644 (description "Partd stores key-value pairs. Values are raw bytes. We
20645 append on old values. Partd excels at shuffling operations.")
20646 (license license:bsd-3)))
20647
20648 (define-public python2-partd
20649 (package-with-python2 python-partd))
20650
20651 (define-public python-fsspec
20652 (package
20653 (name "python-fsspec")
20654 (version "0.6.1")
20655 (source
20656 (origin
20657 (method url-fetch)
20658 (uri (pypi-uri "fsspec" version))
20659 (sha256
20660 (base32
20661 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
20662 (build-system python-build-system)
20663 (arguments '(#:tests? #f)) ; there are none
20664 (home-page "https://github.com/intake/filesystem_spec")
20665 (synopsis "File-system specification")
20666 (description "The purpose of this package is to produce a template or
20667 specification for a file-system interface, that specific implementations
20668 should follow, so that applications making use of them can rely on a common
20669 behavior and not have to worry about the specific internal implementation
20670 decisions with any given backend.")
20671 (license license:bsd-3)))
20672
20673 (define-public python-dask
20674 (package
20675 (name "python-dask")
20676 (version "2.14.0")
20677 (source
20678 (origin
20679 (method url-fetch)
20680 (uri (pypi-uri "dask" version))
20681 (sha256
20682 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
20683 (build-system python-build-system)
20684 (arguments
20685 `(#:phases
20686 (modify-phases %standard-phases
20687 (add-after 'unpack 'disable-broken-tests
20688 (lambda _
20689 ;; This test is marked as xfail when pytest-xdist is used.
20690 (substitute* "dask/tests/test_threaded.py"
20691 (("def test_interrupt\\(\\)" m)
20692 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20693 m)))
20694 ;; This one fails with a type error:
20695 ;; TypeError: Already tz-aware, use tz_convert to convert.
20696 (substitute* "dask/dataframe/tests/test_shuffle.py"
20697 (("def test_set_index_timestamp\\(\\)" m)
20698 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
20699 m)))
20700 #t))
20701 (replace 'check
20702 (lambda _ (invoke "pytest" "-vv"))))))
20703 (propagated-inputs
20704 `(("python-cloudpickle" ,python-cloudpickle)
20705 ("python-fsspec" ,python-fsspec)
20706 ("python-numpy" ,python-numpy)
20707 ("python-packaging" ,python-packaging)
20708 ("python-pandas" ,python-pandas)
20709 ("python-partd" ,python-partd)
20710 ("python-toolz" ,python-toolz)
20711 ("python-pyyaml" ,python-pyyaml)))
20712 (native-inputs
20713 `(("python-pytest" ,python-pytest)
20714 ("python-pytest-runner" ,python-pytest-runner)))
20715 (home-page "https://github.com/dask/dask/")
20716 (synopsis "Parallel computing with task scheduling")
20717 (description
20718 "Dask is a flexible parallel computing library for analytics. It
20719 consists of two components: dynamic task scheduling optimized for computation,
20720 and large data collections like parallel arrays, dataframes, and lists that
20721 extend common interfaces like NumPy, Pandas, or Python iterators to
20722 larger-than-memory or distributed environments. These parallel collections
20723 run on top of the dynamic task schedulers. ")
20724 (license license:bsd-3)))
20725
20726 (define-public python-ilinkedlist
20727 (package
20728 (name "python-ilinkedlist")
20729 (version "0.4.0")
20730 (source
20731 (origin
20732 (method url-fetch)
20733 (uri (pypi-uri "ilinkedlist" version))
20734 (sha256
20735 (base32
20736 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
20737 (build-system python-build-system)
20738 (native-inputs `(("python-pytest" ,python-pytest)))
20739 (inputs `(("python" ,python)))
20740 (home-page "https://github.com/luther9/ilinkedlist-py")
20741 (synopsis "Immutable linked list library")
20742 (description
20743 "This is a implementation of immutable linked lists for Python. It
20744 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
20745 Since a linked list is treated as immutable, it is hashable, and its length
20746 can be retrieved in constant time. Some of the terminology is inspired by
20747 LISP. It is possible to create an improper list by creating a @code{Pair}
20748 with a non-list @code{cdr}.")
20749 (license license:gpl3+)))
20750
20751 (define-public python-readlike
20752 (package
20753 (name "python-readlike")
20754 (version "0.1.3")
20755 (source
20756 (origin
20757 (method url-fetch)
20758 (uri (pypi-uri "readlike" version))
20759 (sha256
20760 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
20761 (build-system python-build-system)
20762 (home-page "https://github.com/jangler/readlike")
20763 (synopsis "GNU Readline-like line editing module")
20764 (description
20765 "This Python module provides line editing functions similar to the default
20766 Emacs-style ones of GNU Readline. Unlike the Python standard library's
20767 @code{readline} package, this one allows access to those capabilities in settings
20768 outside of a standard command-line interface. It is especially well-suited to
20769 interfacing with Urwid, due to a shared syntax for describing key inputs.
20770
20771 Currently, all stateless Readline commands are implemented. Yanking and history
20772 are not supported.")
20773 (license license:expat)))
20774
20775 (define-public python2-readlike
20776 (package-with-python2 python-readlike))
20777
20778 (define-public python-reparser
20779 (package
20780 (name "python-reparser")
20781 (version "1.4.3")
20782 (source
20783 (origin
20784 (method url-fetch)
20785 (uri (pypi-uri "ReParser" version))
20786 (sha256
20787 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
20788 (build-system python-build-system)
20789 (home-page "https://github.com/xmikos/reparser")
20790 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
20791 (description
20792 "This Python library provides a simple lexer/parser for inline markup based
20793 on regular expressions.")
20794 (license license:expat)))
20795
20796 (define-public python2-reparser
20797 (let ((reparser (package-with-python2
20798 (strip-python2-variant python-reparser))))
20799 (package/inherit reparser
20800 (propagated-inputs
20801 `(("python2-enum34" ,python2-enum34)
20802 ,@(package-propagated-inputs reparser))))))
20803
20804 (define-public python-retrying
20805 (package
20806 (name "python-retrying")
20807 (version "1.3.3")
20808 (source
20809 (origin
20810 (method git-fetch)
20811 (uri (git-reference
20812 (url "https://github.com/rholder/retrying")
20813 (commit (string-append "v" version))))
20814 (file-name (git-file-name name version))
20815 (sha256
20816 (base32
20817 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
20818 (build-system python-build-system)
20819 (propagated-inputs
20820 `(("python-six" ,python-six)))
20821 (home-page "https://github.com/rholder/retrying")
20822 (synopsis "Library for adding retry behavior")
20823 (description "Retrying is a general-purpose retrying library to simplify
20824 the task of adding retry behavior to just about anything.
20825
20826 Features:
20827
20828 @itemize
20829 @item Generic Decorator API.
20830 @item Specify stop condition (i.e. limit by number of attempts).
20831 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
20832 @item Customize retrying on Exceptions.
20833 @item Customize retrying on expected returned result.
20834 @end itemize")
20835 (license license:asl2.0)))
20836
20837 (define-public python-pre-commit
20838 (package
20839 (name "python-pre-commit")
20840 (version "2.10.0")
20841 (source
20842 (origin
20843 (method url-fetch)
20844 (uri (pypi-uri "pre_commit" version))
20845 (sha256
20846 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
20847 (build-system python-build-system)
20848 (arguments
20849 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
20850 ;; attribute 'empty_template_setup'".
20851 `(#:tests? #false))
20852 (propagated-inputs
20853 `(("python-cfgv" ,python-cfgv)
20854 ("python-identify" ,python-identify)
20855 ("python-importlib-metadata" ,python-importlib-metadata)
20856 ("python-importlib-resources" ,python-importlib-resources)
20857 ("python-nodeenv" ,python-nodeenv)
20858 ("python-pyyaml" ,python-pyyaml)
20859 ("python-toml" ,python-toml)
20860 ("python-virtualenv" ,python-virtualenv)))
20861 (home-page "https://github.com/pre-commit/pre-commit")
20862 (synopsis "Framework for managing multi-language pre-commit hooks")
20863 (description
20864 "This package provides a framework for managing and maintaining
20865 multi-language pre-commit hooks.")
20866 (license license:expat)))
20867
20868 (define-public python-precis-i18n
20869 (package
20870 (name "python-precis-i18n")
20871 (version "1.0.0")
20872 (source
20873 (origin
20874 (method url-fetch)
20875 (uri (pypi-uri "precis_i18n" version))
20876 (sha256
20877 (base32
20878 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
20879 (build-system python-build-system)
20880 (home-page "https://github.com/byllyfish/precis_i18n")
20881 (synopsis "Implementation of the PRECIS framework")
20882 (description
20883 "This module implements the PRECIS Framework as described in RFC 8264,
20884 RFC 8265 and RFC 8266.")
20885 (license license:expat)))
20886
20887 (define-public python-absl-py
20888 (package
20889 (name "python-absl-py")
20890 (version "0.6.1")
20891 (source
20892 (origin
20893 (method url-fetch)
20894 (uri (pypi-uri "absl-py" version))
20895 (sha256
20896 (base32
20897 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
20898 (build-system python-build-system)
20899 (propagated-inputs
20900 `(("python-six" ,python-six)))
20901 (home-page "https://github.com/abseil/abseil-py")
20902 (synopsis "Abseil Python common libraries")
20903 (description
20904 "This package provides the Abseil Python Common Libraries, a collection
20905 of Python libraries for building Python applications.")
20906 (license license:asl2.0)))
20907
20908 (define-public python-astor
20909 (package
20910 (name "python-astor")
20911 (version "0.8.1")
20912 (source
20913 (origin
20914 (method url-fetch)
20915 (uri (pypi-uri "astor" version))
20916 (sha256
20917 (base32
20918 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
20919 (build-system python-build-system)
20920 ;; FIXME: There are two errors and two test failures.
20921 (arguments `(#:tests? #f))
20922 (home-page "https://github.com/berkerpeksag/astor")
20923 (synopsis "Read and write Python ASTs")
20924 (description "Astor is designed to allow easy manipulation of Python
20925 source via the Abstract Syntax Tree.")
20926 (license license:bsd-3)))
20927
20928 (define-public python2-astor
20929 (package-with-python2 python-astor))
20930
20931 (define-public python-astunparse
20932 (package
20933 (name "python-astunparse")
20934 (version "1.6.2")
20935 (source
20936 (origin
20937 (method url-fetch)
20938 (uri (pypi-uri "astunparse" version))
20939 (sha256
20940 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
20941 (build-system python-build-system)
20942 (arguments '(#:tests? #f)) ; there are none
20943 (propagated-inputs
20944 `(("python-six" ,python-six)
20945 ("python-wheel" ,python-wheel)))
20946 (home-page "https://github.com/simonpercivall/astunparse")
20947 (synopsis "AST unparser for Python")
20948 (description "This package provides an AST unparser for Python. It is a
20949 factored out version of @code{unparse} found in the Python source
20950 distribution.")
20951 (license license:bsd-3)))
20952
20953 (define-public python-gast
20954 (package
20955 (name "python-gast")
20956 (version "0.3.3")
20957 (source
20958 (origin
20959 (method url-fetch)
20960 (uri (pypi-uri "gast" version))
20961 (sha256
20962 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
20963 (build-system python-build-system)
20964 (propagated-inputs
20965 `(("python-astunparse" ,python-astunparse)))
20966 (home-page "https://pypi.org/project/gast/")
20967 (synopsis "Generic Python AST that abstracts the underlying Python version")
20968 (description
20969 "GAST provides a compatibility layer between the AST of various Python
20970 versions, as produced by @code{ast.parse} from the standard @code{ast}
20971 module.")
20972 (license license:bsd-3)))
20973
20974 (define-public python-wikidata
20975 (package
20976 (name "python-wikidata")
20977 (version "0.6.1")
20978 (source
20979 (origin
20980 (method url-fetch)
20981 (uri (pypi-uri "Wikidata" version))
20982 (sha256
20983 (base32
20984 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
20985 (build-system python-build-system)
20986 (propagated-inputs
20987 `(("python-babel" ,python-babel)))
20988 (home-page "https://github.com/dahlia/wikidata")
20989 (synopsis "Wikidata client library")
20990 (description
20991 "This package provides a Python interface to
20992 @url{https://www.wikidata.org/, Wikidata}.")
20993 (properties '((upstream-name . "Wikidata")))
20994 (license license:gpl3+)))
20995
20996 (define-public python-doctest-ignore-unicode
20997 (package
20998 (name "python-doctest-ignore-unicode")
20999 (version "0.1.2")
21000 (source
21001 (origin
21002 (method url-fetch)
21003 (uri (pypi-uri "doctest-ignore-unicode" version))
21004 (sha256
21005 (base32
21006 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
21007 (build-system python-build-system)
21008 (native-inputs
21009 `(("python-nose" ,python-nose)))
21010 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
21011 (synopsis "Ignore Unicode literal prefixes in doctests")
21012 (description
21013 "This package adds support for a flag to ignore Unicode literal prefixes
21014 in doctests.")
21015 (license license:asl2.0)))
21016
21017 (define-public python-attr
21018 (package
21019 (name "python-attr")
21020 (version "0.3.1")
21021 (source
21022 (origin
21023 (method url-fetch)
21024 (uri (pypi-uri "attr" version))
21025 (sha256
21026 (base32
21027 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
21028 (build-system python-build-system)
21029 (home-page "https://github.com/denis-ryzhkov/attr")
21030 (synopsis "Decorator for attributes of target function or class")
21031 (description "Simple decorator to set attributes of target function or
21032 class in a @acronym{DRY, Don't Repeat Yourself} way.")
21033 (license license:expat)))
21034
21035 (define-public python-construct
21036 (package
21037 (name "python-construct")
21038 (version "2.10.56")
21039 (source
21040 (origin
21041 (method url-fetch)
21042 (uri (pypi-uri "construct" version))
21043 (sha256
21044 (base32
21045 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
21046 (build-system python-build-system)
21047 (arguments
21048 `(#:tests? #f)) ; No tests exist.
21049 (propagated-inputs
21050 `(("python-extras" ,python-extras)
21051 ("python-arrow" ,python-arrow)
21052 ("python-numpy" ,python-numpy)
21053 ("python-ruamel.yaml" ,python-ruamel.yaml)))
21054 (home-page "https://construct.readthedocs.io")
21055 (synopsis "Declarative and symmetrical parser and builder for binary data")
21056 (description
21057 "This package provides both simple, atomic constructs (such as
21058 integers of various sizes), as well as composite ones which allow you
21059 form hierarchical and sequential structures of increasing complexity.
21060 It features bit and byte granularity, easy debugging and testing, an
21061 easy-to-extend subclass system, and lots of primitive constructs to
21062 make your work easier.")
21063 (license license:expat)))
21064
21065 (define-public python-outcome
21066 (package
21067 (name "python-outcome")
21068 (version "1.0.1")
21069 (source
21070 (origin
21071 (method url-fetch)
21072 (uri (pypi-uri "outcome" version))
21073 (sha256
21074 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
21075 (build-system python-build-system)
21076 (arguments
21077 `(#:phases
21078 (modify-phases %standard-phases
21079 (replace 'check
21080 (lambda* (#:key inputs outputs #:allow-other-keys)
21081 (add-installed-pythonpath inputs outputs)
21082 (invoke "pytest" "-vv"))))))
21083 (native-inputs
21084 `(("python-pytest" ,python-pytest)
21085 ("python-pytest-cov" ,python-pytest-cov)
21086 ("python-pytest-asyncio" ,python-pytest-asyncio)))
21087 (propagated-inputs
21088 `(("python-async-generator" ,python-async-generator)
21089 ("python-attrs" ,python-attrs)))
21090 (home-page "https://github.com/python-trio/outcome")
21091 (synopsis "Capture the outcome of Python function calls")
21092 (description
21093 "Capture the outcome of Python function calls. Extracted from the Trio
21094 project.")
21095 ;; Either license applies.
21096 (license (list license:expat license:asl2.0))))
21097
21098 (define-public python-trio
21099 (package
21100 (name "python-trio")
21101 (version "0.17.0")
21102 (source
21103 (origin
21104 (method url-fetch)
21105 (uri (pypi-uri "trio" version))
21106 (sha256
21107 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
21108 (build-system python-build-system)
21109 (arguments
21110 `(#:phases
21111 (modify-phases %standard-phases
21112 (add-before 'check 'change-home
21113 (lambda _
21114 ;; Tests require a writable home.
21115 (setenv "HOME" "/tmp")
21116 #t))
21117 (replace 'check
21118 (lambda _
21119 (invoke "pytest" "-vv" "-k"
21120 (string-append
21121 ;; This test times out.
21122 "not test_ki_protection_works"
21123 ;; Assertion errors.
21124 " and not test_guest_mode_ki"
21125 " and not test_run_in_trio_thread_ki"
21126 ;; These try to raise KeyboardInterrupt which does not work
21127 ;; in the build environment.
21128 " and not test_ki_self"
21129 " and not test_ki_wakes_us_up"
21130 ;; Failure in name resolution.
21131 " and not test_getnameinfo"
21132 " and not test_SocketType_resolve"
21133 ;; OSError: protocol not found.
21134 " and not test_getprotobyname")))))))
21135 (native-inputs
21136 `(("python-astor" ,python-astor)
21137 ("python-ipython" ,python-ipython)
21138 ("python-jedi" ,python-jedi)
21139 ("python-pylint" ,python-pylint)
21140 ("python-pyopenssl" ,python-pyopenssl)
21141 ("python-pytest" ,python-pytest)
21142 ("python-pytest-cov" ,python-pytest-cov)
21143 ("python-trustme" ,python-trustme)))
21144 (propagated-inputs
21145 `(("python-attrs" ,python-attrs)
21146 ("python-idna" ,python-idna)
21147 ("python-outcome" ,python-outcome)
21148 ("python-sniffio" ,python-sniffio)
21149 ("python-sortedcontainers"
21150 ,python-sortedcontainers)))
21151 (home-page "https://github.com/python-trio/trio")
21152 (synopsis "Friendly Python library for async concurrency and I/O")
21153 (description
21154 "Trio strives to be a production-quality, async/await-native I/O library
21155 for Python. Like all async libraries, its main purpose is to help you write
21156 programs that do multiple things at the same time with parallelized I/O.")
21157 ;; Either license applies.
21158 (license (list license:expat license:asl2.0))))
21159
21160 (define-public python-trio-typing
21161 (package
21162 (name "python-trio-typing")
21163 (version "0.5.0")
21164 (source
21165 (origin
21166 (method url-fetch)
21167 (uri (pypi-uri "trio-typing" version))
21168 (sha256
21169 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
21170 (build-system python-build-system)
21171 (arguments
21172 `(#:phases
21173 (modify-phases %standard-phases
21174 (replace 'check
21175 (lambda _
21176 (invoke "pytest" "-vv"))))))
21177 (native-inputs
21178 `(("python-attrs" ,python-attrs)
21179 ("python-pytest" ,python-pytest)))
21180 (propagated-inputs
21181 `(("python-mypy" ,python-mypy)
21182 ("python-mypy-extensions"
21183 ,python-mypy-extensions)
21184 ("python-trio" ,python-trio)
21185 ("python-typing-extensions"
21186 ,python-typing-extensions)))
21187 (home-page "https://github.com/python-trio/trio-typing")
21188 (synopsis "Static type checking support for Trio and related projects")
21189 (description
21190 "This package provides:
21191
21192 @itemize
21193 @item PEP 561 typing stubs packages for the Trio project packages:
21194
21195 @itemize
21196 @item trio (@code{trio-stubs})
21197 @item outcome (@code{outcome-stubs})
21198 @item async_generator (@code{async_generator-stubs})
21199 @end itemize
21200
21201 @item A package @code{trio_typing} containing types that Trio programs often
21202 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
21203 a mypy plugin that smooths over some limitations in the basic type hints.
21204 @end itemize")
21205 ;; Either license applies.
21206 (license (list license:expat license:asl2.0))))
21207
21208 (define-public python-humanize
21209 (package
21210 (name "python-humanize")
21211 (version "0.5.1")
21212 (source
21213 (origin
21214 (method url-fetch)
21215 (uri (pypi-uri "humanize" version))
21216 (sha256
21217 (base32
21218 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
21219 (arguments
21220 '(#:tests? #f)) ; tests not in pypi archive
21221 (build-system python-build-system)
21222 (home-page "https://github.com/jmoiron/humanize")
21223 (synopsis "Print numerical information in a human-readable form")
21224 (description "This package provides a Python module that displays numbers
21225 and dates in \"human readable\" forms. For example, it would display
21226 \"12345591313\" as \"12.3 billion\".")
21227 (license license:expat)))
21228
21229 (define-public python-txaio
21230 (package
21231 (name "python-txaio")
21232 (version "18.8.1")
21233 (source
21234 (origin
21235 (method url-fetch)
21236 (uri (pypi-uri "txaio" version))
21237 (sha256
21238 (base32
21239 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
21240 (build-system python-build-system)
21241 (propagated-inputs
21242 `(("python-twisted" ,python-twisted)
21243 ("python-six" ,python-six)))
21244 (home-page "https://github.com/crossbario/txaio")
21245 (synopsis "Compatibility layer between Python asyncio and Twisted")
21246 (description "Txaio provides a compatibility layer between the Python
21247 @code{asyncio} module and @code{Twisted}.")
21248 (license license:expat)))
21249
21250 (define-public python-toolshed
21251 (package
21252 (name "python-toolshed")
21253 (version "0.4.6")
21254 (source
21255 (origin
21256 (method url-fetch)
21257 (uri (pypi-uri "toolshed" version))
21258 (sha256
21259 (base32
21260 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
21261 (build-system python-build-system)
21262 (native-inputs
21263 `(("python-nose" ,python-nose)))
21264 (home-page "https://github.com/brentp/toolshed/")
21265 (synopsis "Collection of modules and functions for working with data")
21266 (description "This is a collection of well-tested, simple modules and
21267 functions that aim to reduce boilerplate when working with data.")
21268 (license license:bsd-2)))
21269
21270 (define-public python-annoy
21271 (package
21272 (name "python-annoy")
21273 (version "1.15.1")
21274 (source
21275 (origin
21276 (method url-fetch)
21277 (uri (pypi-uri "annoy" version))
21278 (sha256
21279 (base32
21280 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
21281 (build-system python-build-system)
21282 (native-inputs
21283 `(("python-nose" ,python-nose)))
21284 (home-page "https://github.com/spotify/annoy/")
21285 (synopsis "Approximate nearest neighbors library")
21286 (description
21287 "Annoy is a C++ library with Python bindings to search for points in
21288 space that are close to a given query point. It also creates large read-only
21289 file-based data structures that are @code{mmap}ped into memory so that many
21290 processes may share the same data.")
21291 (license license:asl2.0)))
21292
21293 (define-public python-croniter
21294 (package
21295 (name "python-croniter")
21296 (version "0.3.34")
21297 (source (origin
21298 (method url-fetch)
21299 (uri (pypi-uri "croniter" version))
21300 (sha256
21301 (base32
21302 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
21303 (build-system python-build-system)
21304 (propagated-inputs
21305 `(("python-dateutil" ,python-dateutil)
21306 ("python-natsort" ,python-natsort)))
21307 (home-page "https://github.com/kiorky/croniter")
21308 (synopsis "Iterate datetime objects with cron-like syntax")
21309 (description
21310 "@code{croniter} provides iteration for datetime object with cron-like
21311 format.")
21312 (license license:expat)))
21313
21314 (define-public python-pylzma
21315 (package
21316 (name "python-pylzma")
21317 (version "0.5.0")
21318 (source
21319 (origin
21320 (method url-fetch)
21321 (uri (pypi-uri "pylzma" version))
21322 (sha256
21323 (base32
21324 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
21325 (build-system python-build-system)
21326 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
21327 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
21328 (description "This package provides Python bindings for the LZMA library
21329 by Igor Pavlov.")
21330 (license license:lgpl2.1+)))
21331
21332 (define-public python2-pylzma
21333 (package-with-python2 python-pylzma))
21334
21335 (define-public python-ifaddr
21336 (package
21337 (name "python-ifaddr")
21338 (version "0.1.7")
21339 (source
21340 (origin
21341 (method url-fetch)
21342 (uri (pypi-uri "ifaddr" version))
21343 (sha256
21344 (base32
21345 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
21346 (build-system python-build-system)
21347 (arguments
21348 `(#:phases
21349 (modify-phases %standard-phases
21350 (replace 'check
21351 (lambda _ (invoke "nosetests"))))))
21352 (native-inputs
21353 `(("python-nose" ,python-nose)))
21354 (home-page "https://github.com/pydron/ifaddr")
21355 (synopsis "Network interface and IP address enumeration library")
21356 (description "This package provides a network interface and IP address
21357 enumeration library in Python.")
21358 (license license:expat)))
21359
21360 (define-public python-zeroconf
21361 (package
21362 (name "python-zeroconf")
21363 (version "0.28.8")
21364 (source
21365 (origin
21366 (method url-fetch)
21367 (uri (pypi-uri "zeroconf" version))
21368 (sha256
21369 (base32
21370 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
21371 (build-system python-build-system)
21372 (native-inputs
21373 `(("python-nose" ,python-nose)))
21374 (propagated-inputs
21375 `(("python-ifaddr" ,python-ifaddr)))
21376 (arguments
21377 `(#:phases
21378 (modify-phases %standard-phases
21379 (replace 'check
21380 (lambda _ ;; Networking isn't available for these tests.
21381 (invoke "nosetests" "-v"
21382 "--exclude" "test_integration_with_listener_ipv6"
21383 "--exclude" "test_launch_and_close_v6_only"
21384 "--exclude" "test_launch_and_close_v4_v6"
21385 "--exclude" "test_launch_and_close"))))))
21386 (home-page "https://github.com/jstasiak/python-zeroconf")
21387 (synopsis "Pure Python mDNS service discovery")
21388 (description
21389 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21390 compatible).")
21391 (license license:lgpl2.1+)))
21392
21393 (define-public python2-zeroconf
21394 (package
21395 (name "python2-zeroconf")
21396
21397 ;; This is the last version that supports Python 2.x.
21398 (version "0.19.1")
21399 (source
21400 (origin
21401 (method url-fetch)
21402 (uri (pypi-uri "zeroconf" version))
21403 (sha256
21404 (base32
21405 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
21406 (build-system python-build-system)
21407 (arguments
21408 `(#:python ,python-2
21409 #:phases
21410 (modify-phases %standard-phases
21411 (add-after 'unpack 'patch-requires
21412 (lambda* (#:key inputs #:allow-other-keys)
21413 (substitute* "setup.py"
21414 (("enum-compat")
21415 "enum34"))
21416 #t)))))
21417 (native-inputs
21418 `(("python2-six" ,python2-six)
21419 ("python2-enum32" ,python2-enum34)
21420 ("python2-netifaces" ,python2-netifaces)
21421 ("python2-typing" ,python2-typing)))
21422 (home-page "https://github.com/jstasiak/python-zeroconf")
21423 (synopsis "Pure Python mDNS service discovery")
21424 (description
21425 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
21426 compatible).")
21427 (license license:lgpl2.1+)))
21428
21429 (define-public python-bsddb3
21430 (package
21431 (name "python-bsddb3")
21432 (version "6.2.6")
21433 (source
21434 (origin
21435 (method url-fetch)
21436 (uri (pypi-uri "bsddb3" version))
21437 (sha256
21438 (base32
21439 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
21440 (build-system python-build-system)
21441 (inputs
21442 `(("bdb" ,bdb)))
21443 (arguments
21444 '(#:phases
21445 (modify-phases %standard-phases
21446 (add-after 'unpack 'configure-locations
21447 (lambda* (#:key inputs #:allow-other-keys)
21448 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
21449 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
21450 #t))
21451 (replace 'check
21452 (lambda _
21453 (invoke "python3" "test3.py" "-v"))))))
21454 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
21455 (synopsis "Python bindings for Oracle Berkeley DB")
21456 (description
21457 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
21458 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
21459 Transaction objects, and each of these is exposed as a Python type in the
21460 bsddb3.db module. The database objects can use various access methods: btree,
21461 hash, recno, and queue. Complete support of Berkeley DB distributed
21462 transactions. Complete support for Berkeley DB Replication Manager.
21463 Complete support for Berkeley DB Base Replication. Support for RPC.")
21464 (license license:bsd-3)))
21465
21466 (define-public python-dbfread
21467 (package
21468 (name "python-dbfread")
21469 (version "2.0.7")
21470 (source (origin
21471 (method url-fetch)
21472 (uri (pypi-uri "dbfread" version))
21473 (sha256
21474 (base32
21475 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
21476 (build-system python-build-system)
21477 (native-inputs
21478 `(("python-pytest" ,python-pytest)))
21479 (home-page "https://dbfread.readthedocs.io")
21480 (synopsis "Read DBF Files with Python")
21481 (description
21482 "This library reads DBF files and returns the data as native Python data
21483 types for further processing. It is primarily intended for batch jobs and
21484 one-off scripts.")
21485 (license license:expat)))
21486
21487 (define-public python-cached-property
21488 (package
21489 (name "python-cached-property")
21490 (version "1.5.1")
21491 (source
21492 (origin
21493 (method url-fetch)
21494 (uri (pypi-uri "cached-property" version))
21495 (sha256
21496 (base32
21497 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
21498 (build-system python-build-system)
21499 (arguments
21500 `(#:phases
21501 (modify-phases %standard-phases
21502 ;; https://github.com/pydanny/cached-property/issues/131
21503 ;; recent versions of freezegun break one test
21504 (add-after 'unpack 'disable-broken-test
21505 (lambda _
21506 (substitute* "tests/test_cached_property.py"
21507 (("def test_threads_ttl_expiry\\(self\\)" m)
21508 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
21509 " " m)))
21510 #t)))))
21511 (native-inputs
21512 `(("python-freezegun" ,python-freezegun)))
21513 (home-page
21514 "https://github.com/pydanny/cached-property")
21515 (synopsis
21516 "Decorator for caching properties in classes")
21517 (description
21518 "This package provides a decorator which makes caching
21519 time-or-computationally-expensive properties quick and easy and works in Python
21520 2 or 3.")
21521 (license license:bsd-3)))
21522
21523 (define-public python-folium
21524 (package
21525 (name "python-folium")
21526 (version "0.12.1")
21527 (source
21528 (origin
21529 ;; PyPI has a ".whl" file but not a proper source release.
21530 ;; Thus, fetch code from Git.
21531 (method git-fetch)
21532 (uri (git-reference
21533 (url "https://github.com/python-visualization/folium")
21534 (commit (string-append "v" version))))
21535 (file-name (git-file-name name version))
21536 (sha256
21537 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
21538 (build-system python-build-system)
21539 (propagated-inputs
21540 `(("python-branca" ,python-branca)
21541 ("python-jinja2" ,python-jinja2)
21542 ("python-numpy" ,python-numpy)
21543 ("python-requests" ,python-requests)))
21544 (native-inputs
21545 `(("python-pytest" ,python-pytest)))
21546 (home-page "https://github.com/python-visualization/folium")
21547 (synopsis "Make beautiful maps with Leaflet.js & Python")
21548 (description "@code{folium} makes it easy to visualize data that’s been
21549 manipulated in Python on an interactive leaflet map. It enables both the
21550 binding of data to a map for @code{choropleth} visualizations as well as
21551 passing rich vector/raster/HTML visualizations as markers on the map.
21552
21553 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
21554 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
21555 supports Image, Video, GeoJSON and TopoJSON overlays.")
21556 (license license:expat)))
21557
21558 (define-public jube
21559 (package
21560 ;; This is a command-line tool, so no "python-" prefix.
21561 (name "jube")
21562 (version "2.2.2")
21563 (source (origin
21564 (method url-fetch)
21565 (uri (string-append
21566 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
21567 version))
21568 (sha256
21569 (base32
21570 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
21571 (file-name (string-append "jube-" version ".tar.gz"))))
21572 (build-system python-build-system)
21573 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
21574 (synopsis "Benchmarking environment")
21575 (description
21576 "JUBE helps perform and analyze benchmarks in a systematic way. For each
21577 benchmarked application, benchmark data is stored in a format that allows JUBE
21578 to deduct the desired information. This data can be parsed by automatic pre-
21579 and post-processing scripts that draw information and store it more densely
21580 for manual interpretation.")
21581 (license license:gpl3+)))
21582
21583 (define-public python-pyroutelib3
21584 (package
21585 (name "python-pyroutelib3")
21586 (version "1.3.post1")
21587 (source
21588 (origin
21589 (method url-fetch)
21590 (uri (pypi-uri "pyroutelib3" version))
21591 (sha256
21592 (base32
21593 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
21594 (build-system python-build-system)
21595 (propagated-inputs
21596 `(("python-dateutil" ,python-dateutil)))
21597 (home-page "https://github.com/MKuranowski/pyroutelib3")
21598 (synopsis "Library for simple routing on OSM data")
21599 (description "Library for simple routing on OSM data")
21600 (license license:gpl3+)))
21601
21602 (define-public python-bibtexparser
21603 (package
21604 (name "python-bibtexparser")
21605 (version "1.1.0")
21606 (source
21607 (origin
21608 (method url-fetch)
21609 (uri (pypi-uri "bibtexparser" version))
21610 (sha256
21611 (base32
21612 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
21613 (build-system python-build-system)
21614 (propagated-inputs
21615 `(("python-pyparsing" ,python-pyparsing)))
21616 (native-inputs
21617 `(("python-future" ,python-future)))
21618 (home-page "https://github.com/sciunto-org/python-bibtexparser")
21619 (synopsis "Python library to parse BibTeX files")
21620 (description "BibtexParser is a Python library to parse BibTeX files.")
21621 (license (list license:bsd-3 license:lgpl3))))
21622
21623 (define-public python-distro
21624 (package
21625 (name "python-distro")
21626 (version "1.4.0")
21627 (source
21628 (origin
21629 (method url-fetch)
21630 (uri (pypi-uri "distro" version))
21631 (sha256
21632 (base32
21633 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
21634 (build-system python-build-system)
21635 (native-inputs
21636 `(("python-pytest" ,python-pytest)))
21637 (home-page "https://github.com/nir0s/distro")
21638 (synopsis
21639 "OS platform information API")
21640 (description
21641 "@code{distro} provides information about the OS distribution it runs on,
21642 such as a reliable machine-readable ID, or version information.
21643
21644 It is the recommended replacement for Python's original
21645 `platform.linux_distribution` function (which will be removed in Python 3.8).
21646 @code{distro} also provides a command-line interface to output the platform
21647 information in various formats.")
21648 (license license:asl2.0)))
21649
21650 (define-public python-cairosvg
21651 (package
21652 (name "python-cairosvg")
21653 (version "2.5.0")
21654 (source
21655 (origin
21656 (method url-fetch)
21657 (uri (pypi-uri "CairoSVG" version))
21658 (sha256
21659 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
21660 (build-system python-build-system)
21661 (arguments
21662 `(#:phases
21663 (modify-phases %standard-phases
21664 (replace 'check
21665 (lambda _ (invoke "pytest"))))))
21666 (propagated-inputs
21667 `(("python-cairocffi" ,python-cairocffi)
21668 ("python-cssselect2" ,python-cssselect2)
21669 ("python-defusedxml" ,python-defusedxml)
21670 ("python-pillow" ,python-pillow)
21671 ("python-tinycss2" ,python-tinycss2)))
21672 (native-inputs
21673 `(("python-pytest-flake8" ,python-pytest-flake8)
21674 ("python-pytest-isort" ,python-pytest-isort)
21675 ("python-pytest-runner" ,python-pytest-runner)))
21676 (home-page "https://cairosvg.org/")
21677 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
21678 (description "CairoSVG is a SVG converter based on Cairo. It can export
21679 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
21680 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
21681 parsed, the result is drawn to a Cairo surface that can be exported to
21682 qvarious formats: PDF, PostScript, PNG and even SVG.")
21683 (license license:lgpl3+)))
21684
21685 (define-public python-pyphen
21686 (package
21687 (name "python-pyphen")
21688 (version "0.10.0")
21689 (source
21690 (origin
21691 (method url-fetch)
21692 (uri (pypi-uri "Pyphen" version))
21693 (sha256
21694 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
21695 (build-system python-build-system)
21696 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
21697 ;; embedded set provided by upstream - like Debian does.
21698 (home-page "https://github.com/Kozea/Pyphen")
21699 (synopsis "Pure Python module to hyphenate text")
21700 (description "Pyphen is a pure Python module to hyphenate text using
21701 existing Hunspell hyphenation dictionaries.")
21702 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
21703
21704 (define-public python-intelhex
21705 (package
21706 (name "python-intelhex")
21707 (version "2.2.1")
21708 (source
21709 (origin
21710 (method url-fetch)
21711 (uri (pypi-uri "intelhex" version))
21712 (sha256
21713 (base32
21714 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
21715 (build-system python-build-system)
21716 (arguments '(#:tests? #f)) ;issue with version
21717 (home-page "https://pypi.org/project/IntelHex/")
21718 (synopsis "Python library for Intel HEX files manipulations")
21719 (description "The Intel HEX file format is widely used in microprocessors
21720 and microcontrollers area (embedded systems etc.) as the de facto standard for
21721 representation of code to be programmed into microelectronic devices. This
21722 package provides an intelhex Python library to read, write, create from
21723 scratch and manipulate data from Intel HEX file format. It also includes
21724 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
21725 converters and more, those based on the library itself.")
21726 (license license:bsd-3)))
21727
21728 (define-public python-pykwalify
21729 (package
21730 (name "python-pykwalify")
21731 (version "1.7.0")
21732 (source
21733 (origin
21734 (method url-fetch)
21735 (uri (pypi-uri "pykwalify" version))
21736 (sha256
21737 (base32
21738 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
21739 (build-system python-build-system)
21740 (arguments '(#:tests? #f)) ;missing dependencies
21741 (propagated-inputs
21742 `(("python-dateutil" ,python-dateutil)
21743 ("python-docopt" ,python-docopt)
21744 ("python-pyyaml" ,python-pyyaml)))
21745 (home-page "https://github.com/grokzen/pykwalify")
21746 (synopsis
21747 "Python lib/cli for JSON/YAML schema validation")
21748 (description
21749 "This package provides a parser, schema validator, and data binding tool
21750 for YAML and JSON.")
21751 (license license:expat)))
21752
21753 (define-public python-dbusmock
21754 (package
21755 (name "python-dbusmock")
21756 (version "0.18.3")
21757 (source
21758 (origin
21759 (method url-fetch)
21760 (uri (pypi-uri "python-dbusmock" version))
21761 (sha256
21762 (base32
21763 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
21764 (build-system python-build-system)
21765 (arguments
21766 '(#:phases
21767 (modify-phases %standard-phases
21768 (add-after 'unpack 'patch-shell-path
21769 (lambda _
21770 (substitute* "tests/test_code.py"
21771 (("/bin/bash") (which "bash")))
21772 #t)))))
21773 (native-inputs
21774 `(;; For tests.
21775 ("dbus" ,dbus) ; for dbus-daemon
21776 ("python-nose" ,python-nose)
21777 ("which" ,which)))
21778 (propagated-inputs
21779 `(("python-dbus" ,python-dbus)
21780 ("python-pygobject" ,python-pygobject)))
21781 (home-page "https://github.com/martinpitt/python-dbusmock")
21782 (synopsis "Python library for mock D-Bus objects")
21783 (description "python-dbusmock allows for the easy creation of mock objects on
21784 D-Bus. This is useful for writing tests for software which talks to D-Bus
21785 services such as upower, systemd, logind, gnome-session or others, and it is
21786 hard (or impossible without root privileges) to set the state of the real
21787 services to what you expect in your tests.")
21788 (license license:lgpl3+)))
21789
21790 (define-public python-jsonplus
21791 (package
21792 (name "python-jsonplus")
21793 (version "0.8.0")
21794 (home-page "https://github.com/randomir/jsonplus")
21795 (source (origin
21796 (method url-fetch)
21797 (uri (pypi-uri "jsonplus" version))
21798 (sha256
21799 (base32
21800 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
21801 (build-system python-build-system)
21802 ;; XXX: No tests on PyPI, and the repository has no tags.
21803 (arguments '(#:tests? #f))
21804 (propagated-inputs
21805 `(("python-dateutil" ,python-dateutil)
21806 ("python-simplejson" ,python-simplejson)
21807 ("python-sortedcontainers" ,python-sortedcontainers)))
21808 (synopsis "Serialize Python types to/from JSON")
21809 (description
21810 "This package provides functionality to serialize arbitrary data types
21811 to and from JSON. Common data types are implemented and it is easy to
21812 register custom encoders and decoders.")
21813 (license license:expat)))
21814
21815 (define-public python-ujson
21816 (package
21817 (name "python-ujson")
21818 (version "4.0.2")
21819 (source
21820 (origin
21821 (method url-fetch)
21822 (uri (pypi-uri "ujson" version))
21823 (sha256
21824 (base32
21825 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
21826 (modules '((guix build utils)))
21827 (snippet
21828 '(begin (delete-file-recursively "deps") #t))))
21829 (build-system python-build-system)
21830 (arguments
21831 `(#:phases
21832 (modify-phases %standard-phases
21833 (add-after 'unpack 'link-to-system-double-conversion
21834 (lambda* (#:key inputs #:allow-other-keys)
21835 (let ((d-c (assoc-ref inputs "double-conversion")))
21836 (substitute* "setup.py"
21837 (("./deps/double-conversion/double-conversion\"")
21838 (string-append d-c "/include/double-conversion\""))
21839 (("-lstdc++" stdc)
21840 (string-append "-L" d-c "/lib\","
21841 " \"-ldouble-conversion\","
21842 " \"" stdc)))
21843 #t)))
21844 (replace 'check
21845 (lambda* (#:key inputs outputs #:allow-other-keys)
21846 (add-installed-pythonpath inputs outputs)
21847 (invoke "pytest"))))))
21848 (native-inputs
21849 `(("double-conversion" ,double-conversion)
21850 ("python-setuptools-scm" ,python-setuptools-scm)
21851 ("python-pytest" ,python-pytest)))
21852 (home-page "https://github.com/ultrajson/ultrajson")
21853 (synopsis "Ultra fast JSON encoder and decoder for Python")
21854 (description
21855 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
21856 bindings for Python 3.")
21857 (license license:bsd-3)))
21858
21859 (define-public python-iocapture
21860 ;; The latest release is more than a year older than this commit.
21861 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
21862 (revision "1"))
21863 (package
21864 (name "python-iocapture")
21865 (version "0.1.2")
21866 (source
21867 (origin
21868 (method git-fetch)
21869 (uri (git-reference
21870 (url "https://github.com/oinume/iocapture")
21871 (commit commit)))
21872 (file-name (git-file-name name version))
21873 (sha256
21874 (base32
21875 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
21876 (build-system python-build-system)
21877 (arguments
21878 `(#:phases
21879 (modify-phases %standard-phases
21880 (delete 'check)
21881 (add-after 'install 'check
21882 (lambda* (#:key inputs outputs #:allow-other-keys)
21883 (add-installed-pythonpath inputs outputs)
21884 (invoke "py.test" "-v" "tests")
21885 #t)))))
21886 (propagated-inputs
21887 `(("python-flexmock" ,python-flexmock)
21888 ("python-pytest" ,python-pytest)
21889 ("python-pytest-cov" ,python-pytest-cov)
21890 ("python-six" ,python-six)))
21891 (home-page "https://github.com/oinume/iocapture")
21892 (synopsis "Python capturing tool for stdout and stderr")
21893 (description
21894 "This package helps you to capture the standard out (stdout) and the
21895 standard error channel (stderr) in your program.")
21896 (license license:expat))))
21897
21898 (define-public python-argh
21899 ;; There are 21 commits since the latest release containing important
21900 ;; improvements.
21901 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
21902 (revision "1"))
21903 (package
21904 (name "python-argh")
21905 (version (git-version "0.26.2" revision commit))
21906 (source
21907 (origin
21908 (method git-fetch)
21909 (uri (git-reference
21910 (url "https://github.com/neithere/argh")
21911 (commit commit)))
21912 (file-name (git-file-name name version))
21913 (sha256
21914 (base32
21915 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
21916 (build-system python-build-system)
21917 (propagated-inputs
21918 `(("python-iocapture" ,python-iocapture)
21919 ("python-mock" ,python-mock)
21920 ("python-pytest" ,python-pytest)
21921 ("python-pytest-cov" ,python-pytest-cov)
21922 ("python-pytest-xdist" ,python-pytest-xdist)
21923 ("python-tox" ,python-tox)))
21924 (home-page "https://github.com/neithere/argh/")
21925 (synopsis "Argparse wrapper with natural syntax")
21926 (description
21927 "python-argh is a small library that provides several layers of
21928 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
21929 always possible to declare a command with the highest possible (and least
21930 flexible) layer and then tune the behaviour with any of the lower layers
21931 including the native API of @code{python-argparse}.")
21932 (license license:lgpl3+))))
21933
21934 (define-public python-ppft
21935 (package
21936 (name "python-ppft")
21937 (version "1.6.6.1")
21938 (source
21939 (origin
21940 (method url-fetch)
21941 (uri (pypi-uri "ppft" version))
21942 (sha256
21943 (base32
21944 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
21945 (build-system python-build-system)
21946 (arguments '(#:tests? #f)) ; there are none
21947 (propagated-inputs
21948 `(("python-six" ,python-six)))
21949 (home-page "https://pypi.org/project/ppft/")
21950 (synopsis "Fork of Parallel Python")
21951 (description
21952 "This package is a fork of Parallel Python. The Parallel Python
21953 module (@code{pp}) provides an easy and efficient way to create
21954 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
21955 computers and clusters. It features cross-platform portability and dynamic
21956 load balancing.")
21957 (license license:bsd-3)))
21958
21959 (define-public python-pox
21960 (package
21961 (name "python-pox")
21962 (version "0.2.7")
21963 (source
21964 (origin
21965 (method url-fetch)
21966 (uri (pypi-uri "pox" version))
21967 (sha256
21968 (base32
21969 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
21970 (build-system python-build-system)
21971 (arguments
21972 `(#:phases
21973 (modify-phases %standard-phases
21974 (replace 'check
21975 (lambda _
21976 (mkdir-p "/tmp/guix")
21977 (setenv "SHELL" "bash")
21978 (setenv "USERNAME" "guix")
21979 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
21980 (invoke "py.test" "-vv")
21981 #t)))))
21982 (native-inputs
21983 `(("python-pytest" ,python-pytest)
21984 ("which" ,which)))
21985 (home-page "https://pypi.org/project/pox/")
21986 (synopsis "Python utilities for file system exploration and automated builds")
21987 (description
21988 "Pox provides a collection of utilities for navigating and manipulating
21989 file systems. This module is designed to facilitate some of the low-level
21990 operating system interactions that are useful when exploring a file system on a
21991 remote host. Pox provides Python equivalents of several shell commands such
21992 as @command{which} and @command{find}. These commands allow automated
21993 discovery of what has been installed on an operating system, and where the
21994 essential tools are located.")
21995 (license license:bsd-3)))
21996
21997 (define-public python-pathos
21998 (package
21999 (name "python-pathos")
22000 (version "0.2.5")
22001 (source
22002 (origin
22003 (method url-fetch)
22004 (uri (pypi-uri "pathos" version))
22005 (sha256
22006 (base32
22007 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
22008 (build-system python-build-system)
22009 (arguments
22010 '(#:phases
22011 (modify-phases %standard-phases
22012 (replace 'check
22013 (lambda _
22014 (setenv "PYTHONPATH"
22015 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
22016 (invoke "python" "./tests/__main__.py"))))))
22017 (propagated-inputs
22018 `(("python-dill" ,python-dill)
22019 ("python-multiprocess" ,python-multiprocess)
22020 ("python-pox" ,python-pox)
22021 ("python-ppft" ,python-ppft)))
22022 (native-inputs
22023 `(("python-pytest" ,python-pytest)))
22024 (home-page "https://pypi.org/project/pathos/")
22025 (synopsis
22026 "Parallel graph management and execution in heterogeneous computing")
22027 (description
22028 "Python-pathos is a framework for heterogeneous computing. It provides a
22029 consistent high-level interface for configuring and launching parallel
22030 computations across heterogeneous resources. Python-pathos provides configurable
22031 launchers for parallel and distributed computing, where each launcher contains
22032 the syntactic logic to configure and launch jobs in an execution environment.")
22033 (license license:bsd-3)))
22034
22035 (define-public python-flit
22036 (package
22037 (name "python-flit")
22038 (version "3.2.0")
22039 ;; We fetch the sources via git because on pypi the package is split into
22040 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
22041 (source (origin
22042 (method git-fetch)
22043 (uri (git-reference
22044 (url "https://github.com/takluyver/flit")
22045 (commit version)))
22046 (file-name (git-file-name name version))
22047 (sha256
22048 (base32
22049 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
22050 (build-system python-build-system)
22051 (arguments
22052 `(#:phases
22053 (modify-phases %standard-phases
22054 (add-before 'build 'bootstrap
22055 (lambda* (#:key inputs #:allow-other-keys)
22056 (let ((home (string-append (getcwd) "/home")))
22057 (mkdir-p home)
22058 (setenv "HOME" home))
22059 (for-each make-file-writable (find-files "."))
22060 (copy-recursively (assoc-ref inputs "python-testpath")
22061 (string-append (getcwd) "/testpath"))
22062 (substitute* "pyproject.toml"
22063 (("\"testpath\",") ""))
22064 (invoke "python" "bootstrap_dev.py")))
22065 (replace 'build
22066 (lambda _
22067 ;; A ZIP archive should be generated, but it fails with "ZIP does
22068 ;; not support timestamps before 1980". Luckily,
22069 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
22070 ;; 1980.
22071 (setenv "SOURCE_DATE_EPOCH" "315532800")
22072 (for-each (lambda (toml)
22073 (invoke "python3" "-m" "flit"
22074 "--debug" "--ini-file" toml
22075 "build"))
22076 '("testpath/pyproject.toml"
22077 "pyproject.toml"))
22078 (with-directory-excursion "flit_core"
22079 (invoke "python" "build_dists.py"))))
22080 (replace 'install
22081 (lambda* (#:key inputs outputs #:allow-other-keys)
22082 (add-installed-pythonpath inputs outputs)
22083 (let ((out (assoc-ref outputs "out")))
22084 (delete-file-recursively "./home")
22085 (for-each (lambda (wheel)
22086 (format #true wheel)
22087 (invoke "python" "-m" "pip" "install"
22088 wheel (string-append "--prefix=" out)))
22089 (append
22090 (find-files "flit_core/dist" "\\.whl$")
22091 (find-files "dist" "\\.whl$")))))))
22092 #:tests? #f)) ; XXX: Check requires network access.
22093 (propagated-inputs
22094 `(("python-pytoml" ,python-pytoml)
22095 ("python-toml" ,python-toml)))
22096 (native-inputs
22097 `(("python-docutils" ,python-docutils)
22098 ("python-responses" ,python-responses)
22099 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
22100 ("python-pytest" ,python-pytest)
22101 ("python-pytest-cov" ,python-pytest-cov)
22102 ("python-sphinx" ,python-sphinx)
22103 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
22104 ;; This package needs testpath, but testpath also needs flit...
22105 ("python-testpath"
22106 ,(let ((name "python-testpath")
22107 (version "0.4.4"))
22108 (origin
22109 (method git-fetch)
22110 (uri (git-reference
22111 (url "https://github.com/jupyter/testpath")
22112 (commit version)))
22113 (file-name (git-file-name name version))
22114 (sha256
22115 (base32
22116 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
22117 (home-page "https://flit.readthedocs.io/")
22118 (synopsis
22119 "Simple packaging tool for simple packages")
22120 (description
22121 "Flit is a simple way to put Python packages and modules on PyPI. Flit
22122 packages a single importable module or package at a time, using the import
22123 name as the name on PyPI. All subpackages and data files within a package
22124 are included automatically.")
22125 (license license:bsd-3)))
22126
22127 (define-public python-pathtools
22128 (package
22129 (name "python-pathtools")
22130 (version "0.1.2")
22131 (source
22132 (origin
22133 (method url-fetch)
22134 (uri (pypi-uri "pathtools" version))
22135 (sha256
22136 (base32
22137 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
22138 (build-system python-build-system)
22139 (home-page
22140 "https://github.com/gorakhargosh/pathtools")
22141 (synopsis "Path utilities for Python")
22142 (description "Pattern matching and various utilities for file systems
22143 paths.")
22144 (license license:expat)))
22145
22146 (define-public python-fastentrypoints
22147 (package
22148 (name "python-fastentrypoints")
22149 (version "0.12")
22150 (source
22151 (origin
22152 (method url-fetch)
22153 (uri (pypi-uri "fastentrypoints" version))
22154 (sha256
22155 (base32
22156 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
22157 (build-system python-build-system)
22158 (home-page
22159 "https://github.com/ninjaaron/fast-entry_points")
22160 (synopsis
22161 "Makes entry_points specified in setup.py load more quickly")
22162 (description
22163 "Using entry_points in your setup.py makes scripts that start really
22164 slowly because it imports pkg_resources. This package allows such setup
22165 scripts to load entry points more quickly.")
22166 (license license:bsd-3)))
22167
22168 (define-public python-funcparserlib
22169 (package
22170 (name "python-funcparserlib")
22171 (version "0.3.6")
22172 (source
22173 (origin
22174 (method url-fetch)
22175 (uri (pypi-uri "funcparserlib" version))
22176 (sha256
22177 (base32
22178 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
22179 (native-inputs
22180 `(("python-tox" ,python-tox)))
22181 (arguments
22182 `(#:phases
22183 (modify-phases %standard-phases
22184 (replace 'check
22185 (lambda _
22186 (invoke "tox"))))))
22187 (build-system python-build-system)
22188 (home-page
22189 "https://github.com/vlasovskikh/funcparserlib")
22190 (synopsis
22191 "Recursive descent parsing library based on functional combinators")
22192 (description
22193 "This package is a recursive descent parsing library for Python based on
22194 functional combinators. Parser combinators are just higher-order functions
22195 that take parsers as their arguments and return them as result values.")
22196 (license license:expat)))
22197
22198 (define-public python-speg
22199 (package
22200 (name "python-speg")
22201 (version "0.3")
22202 (source
22203 (origin
22204 (method url-fetch)
22205 (uri (pypi-uri "speg" version ".zip"))
22206 (sha256
22207 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
22208 (arguments
22209 `(#:tests? #f)) ;FIXME: tests fail, not sure why
22210 (native-inputs
22211 `(("unzip" ,unzip)))
22212 (build-system python-build-system)
22213 (home-page "https://github.com/avakar/speg")
22214 (synopsis "PEG-based parser interpreter with memoization")
22215 (description "This package is a PEG-based parser and interpreter with
22216 memoization.")
22217 (license license:expat)))
22218
22219 (define-public python-cson
22220 (package
22221 (name "python-cson")
22222 (version "0.8")
22223 (source
22224 (origin
22225 (method url-fetch)
22226 (uri (pypi-uri "cson" version))
22227 (sha256
22228 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
22229 (build-system python-build-system)
22230 (propagated-inputs
22231 `(("python-speg" ,python-speg)))
22232 (home-page "https://github.com/avakar/pycson")
22233 (synopsis "Parser for Coffeescript Object Notation (CSON)")
22234 (description "This package is a parser for Coffeescript Object
22235 Notation (CSON).")
22236 (license license:expat)))
22237
22238 (define-public python-asynctest
22239 (package
22240 (name "python-asynctest")
22241 (version "0.13.0")
22242 (source
22243 (origin
22244 (method url-fetch)
22245 (uri (pypi-uri "asynctest" version))
22246 (sha256
22247 (base32
22248 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
22249 (build-system python-build-system)
22250 (arguments
22251 '(#:phases
22252 (modify-phases %standard-phases
22253 (replace 'check
22254 (lambda _
22255 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
22256 (add-after 'unpack 'disable-tests
22257 (lambda* _
22258 ;; XXX: 7 tests fail out of 220. Disable them for now.
22259 (substitute* (list "test/test_selector.py"
22260 "test/test_mock.py")
22261 (("def test_events_watched_outside_test_are_ignored")
22262 "@unittest.skip('disabled by guix')
22263 def test_events_watched_outside_test_are_ignored")
22264 (("def test_awaited_from_autospec_mock.*" line)
22265 (string-append line " return True\n"))
22266 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
22267 (string-append line " return True\n"))
22268 (("def test_patch_coroutine_with_multiple_scopes.*" line)
22269 (string-append line " return True\n"))
22270 (("def test_multiple_patches_on_coroutine.*" line)
22271 (string-append line " return True\n"))
22272 (("def test_patch_coroutine_only_when_running.*" line)
22273 (string-append line " return True\n")))
22274 #t)))))
22275 (home-page "https://github.com/Martiusweb/asynctest")
22276 (synopsis "Extension of unittest for testing asyncio libraries")
22277 (description
22278 "The package asynctest is built on top of the standard unittest module
22279 and cuts down boilerplate code when testing libraries for asyncio.")
22280 (license license:asl2.0)))
22281
22282 (define-public python-aionotify
22283 (package
22284 (name "python-aionotify")
22285 (version "0.2.0")
22286 (source
22287 (origin
22288 ;; Source tarball on PyPi lacks tests
22289 (method git-fetch)
22290 (uri (git-reference
22291 (url "https://github.com/rbarrois/aionotify")
22292 (commit (string-append "v" version))))
22293 (file-name (git-file-name name version))
22294 (sha256
22295 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
22296 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
22297 (build-system python-build-system)
22298 (home-page "https://github.com/rbarrois/aionotify")
22299 (synopsis "Asyncio-powered inotify library")
22300 (description
22301 "@code{aionotify} is a simple, asyncio-based inotify library.")
22302 (license license:bsd-3)))
22303
22304 (define-public python-forbiddenfruit
22305 (package
22306 (name "python-forbiddenfruit")
22307 (version "0.1.3")
22308 (source
22309 (origin
22310 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
22311 (method git-fetch)
22312 (uri (git-reference
22313 (url "https://github.com/clarete/forbiddenfruit")
22314 (commit version)))
22315 (file-name (git-file-name name version))
22316 (sha256
22317 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
22318 (build-system python-build-system)
22319 (arguments
22320 '(#:phases
22321 (modify-phases %standard-phases
22322 (replace 'check
22323 (lambda _
22324 (invoke "make" "SKIP_DEPS=1"))))))
22325 (native-inputs
22326 `(("python-nose" ,python-nose)
22327 ("python-coverage" ,python-coverage)))
22328 (home-page "https://github.com/clarete/forbiddenfruit")
22329 (synopsis "Patch python built-in objects")
22330 (description "This project allows Python code to extend built-in types.")
22331 (license (list license:gpl3+ license:expat))))
22332
22333 (define-public python-k5test
22334 (package
22335 (name "python-k5test")
22336 (version "0.9.2")
22337 (source
22338 (origin
22339 (method url-fetch)
22340 (uri (pypi-uri "k5test" version))
22341 (sha256
22342 (base32
22343 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
22344 (build-system python-build-system)
22345 (propagated-inputs
22346 `(("python-six" ,python-six)
22347 ;; `which`, `kadmin.local` binaries called inside library
22348 ("which" ,which)
22349 ("mit-krb5" ,mit-krb5)))
22350 (native-inputs `(("mit-krb5" ,mit-krb5)))
22351 (arguments
22352 '(#:phases
22353 (modify-phases %standard-phases
22354 (add-after 'unpack 'patch-paths
22355 (lambda* _
22356 (substitute* "k5test/realm.py"
22357 (("'kadmin_local'") "'kadmin.local'")))))))
22358 (home-page "https://github.com/pythongssapi/k5test")
22359 (synopsis "Library for setting up self-contained Kerberos 5 environments")
22360 (description
22361 "@code{k5test} is a library for setting up self-contained Kerberos 5
22362 environments, and running Python unit tests inside those environments. It is
22363 based on the file of the same name found alongside the MIT Kerberos 5 unit
22364 tests.")
22365 (license license:isc)))
22366
22367 (define-public python-gssapi
22368 (package
22369 (name "python-gssapi")
22370 (version "1.6.12")
22371 (source
22372 (origin
22373 (method url-fetch)
22374 (uri (pypi-uri "gssapi" version))
22375 (sha256
22376 (base32
22377 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
22378 (build-system python-build-system)
22379 (propagated-inputs
22380 `(("python-decorator" ,python-decorator)
22381 ("python-six" ,python-six)))
22382 (inputs
22383 `(("mit-krb5" ,mit-krb5)))
22384 ;; for tests
22385 (native-inputs
22386 `(("python-parameterized" ,python-parameterized)
22387 ("python-k5test" ,python-k5test)
22388 ("python-nose" ,python-nose)))
22389 (home-page "https://github.com/pythongssapi/python-gssapi")
22390 (synopsis "Python GSSAPI Wrapper")
22391 (description
22392 "Python-GSSAPI provides both low-level and high level wrappers around the
22393 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
22394 also be usable with other GSSAPI mechanisms.")
22395 (license license:isc)))
22396
22397 (define-public python-check-manifest
22398 (package
22399 (name "python-check-manifest")
22400 (version "0.37")
22401 (source
22402 (origin
22403 (method url-fetch)
22404 (uri (pypi-uri "check-manifest" version))
22405 (sha256
22406 (base32
22407 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
22408 (build-system python-build-system)
22409 (native-inputs
22410 `(("python-mock" ,python-mock)
22411 ("git" ,git)))
22412 (home-page "https://github.com/mgedmin/check-manifest")
22413 (synopsis "Check MANIFEST.in in a Python source package for completeness")
22414 (description "Python package can include a MANIFEST.in file to help with
22415 sending package files to the Python Package Index. This package checks that
22416 file to ensure it completely and accurately describes your project.")
22417 (license license:expat)))
22418
22419 (define-public python-android-stringslib
22420 (package
22421 (name "python-android-stringslib")
22422 (version "0.1.2")
22423 (source
22424 (origin
22425 (method git-fetch)
22426 (uri (git-reference
22427 (url "https://framagit.org/tyreunom/python-android-strings-lib")
22428 (commit (string-append "v" version))))
22429 (file-name (git-file-name name version))
22430 (sha256
22431 (base32
22432 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
22433 (build-system python-build-system)
22434 (arguments
22435 `(#:tests? #f))
22436 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
22437 (synopsis "Android strings.xml support")
22438 (description "Android Strings Lib provides support for android's strings.xml
22439 files. These files are used to translate strings in android apps.")
22440 (license license:expat)))
22441
22442 (define-public python-watchdog
22443 (package
22444 (name "python-watchdog")
22445 (version "0.9.0")
22446 (source
22447 (origin
22448 (method url-fetch)
22449 (uri (pypi-uri "watchdog" version))
22450 (sha256
22451 (base32
22452 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
22453 (build-system python-build-system)
22454 (arguments
22455 `(#:phases
22456 (modify-phases %standard-phases
22457 (add-before 'check 'remove-failing
22458 (lambda _
22459 (delete-file "tests/test_inotify_buffer.py")
22460 (delete-file "tests/test_snapshot_diff.py")
22461 #t)))))
22462 (propagated-inputs
22463 `(("python-argh" ,python-argh)
22464 ("python-pathtools" ,python-pathtools)
22465 ("python-pyyaml" ,python-pyyaml)))
22466 (native-inputs
22467 `(("python-pytest-cov" ,python-pytest-cov)
22468 ("python-pytest-timeout" ,python-pytest-timeout)))
22469 (home-page "https://github.com/gorakhargosh/watchdog")
22470 (synopsis "File system events monitoring")
22471 (description "This package provides a way to monitor file system events
22472 such as a file modification and trigger an action. This is similar to inotify,
22473 but portable.")
22474 (license license:asl2.0)))
22475
22476 (define-public python-watchgod
22477 (package
22478 (name "python-watchgod")
22479 (version "0.6")
22480 (source
22481 (origin
22482 ;; There are no tests in the PyPI tarball.
22483 (method git-fetch)
22484 (uri (git-reference
22485 (url "https://github.com/samuelcolvin/watchgod")
22486 (commit (string-append "v" version))))
22487 (file-name (git-file-name name version))
22488 (sha256
22489 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
22490 (build-system python-build-system)
22491 (arguments
22492 `(#:phases
22493 (modify-phases %standard-phases
22494 (replace 'check
22495 (lambda _
22496 (invoke "pytest" "-vv"))))))
22497 (native-inputs
22498 `(("python-coverage" ,python-coverage)
22499 ("python-docutils" ,python-docutils)
22500 ("python-flake8" ,python-flake8)
22501 ("python-isort" ,python-isort)
22502 ("python-pycodestyle" ,python-pycodestyle)
22503 ("python-pyflakes" ,python-pyflakes)
22504 ("python-pygments" ,python-pygments)
22505 ("python-pytest" ,python-pytest)
22506 ("python-pytest-cov" ,python-pytest-cov)
22507 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
22508 ("python-pytest-mock" ,python-pytest-mock)
22509 ("python-pytest-sugar" ,python-pytest-sugar)
22510 ("python-pytest-toolbox" ,python-pytest-toolbox)))
22511 (home-page "https://github.com/samuelcolvin/watchgod")
22512 (synopsis "Simple, modern file watching and code reload in Python")
22513 (description
22514 "Simple, modern file watching and code reload in Python inspired by
22515 @code{watchdog}. Among the differences are a unified approach for each
22516 operating systems and an elegant approach to concurrency using threading.")
22517 (license license:expat)))
22518
22519 (define-public python-wget
22520 (package
22521 (name "python-wget")
22522 (version "3.2")
22523 (source
22524 (origin
22525 (method url-fetch)
22526 (uri (pypi-uri "wget" version ".zip"))
22527 (sha256
22528 (base32
22529 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
22530 (build-system python-build-system)
22531 (native-inputs `(("unzip" ,unzip)))
22532 (home-page "https://bitbucket.org/techtonik/python-wget/")
22533 (synopsis "Pure Python download utility")
22534 (description "The python-wget library provides an API to download files
22535 with features similar to the @command{wget} utility.")
22536 (license license:unlicense)))
22537
22538 (define-public offlate
22539 (package
22540 (name "offlate")
22541 (version "0.5")
22542 (source
22543 (origin
22544 (method git-fetch)
22545 (uri (git-reference
22546 (url "https://framagit.org/tyreunom/offlate")
22547 (commit version)))
22548 (file-name (git-file-name name version))
22549 (sha256
22550 (base32
22551 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
22552 (build-system python-build-system)
22553 (arguments
22554 ;; No tests
22555 `(#:tests? #f))
22556 (propagated-inputs
22557 `(("python-android-stringslib" ,python-android-stringslib)
22558 ("python-dateutil" ,python-dateutil)
22559 ("python-gitlab" ,python-gitlab)
22560 ("python-lxml" ,python-lxml)
22561 ("python-polib" ,python-polib)
22562 ("python-pyenchant" ,python-pyenchant)
22563 ("python-pygit2" ,python-pygit2)
22564 ("python-pygithub" ,python-pygithub)
22565 ("python-pyqt" ,python-pyqt)
22566 ("python-requests" ,python-requests)
22567 ("python-ruamel.yaml" ,python-ruamel.yaml)
22568 ("python-translation-finder" ,python-translation-finder)
22569 ("python-watchdog" ,python-watchdog)))
22570 (native-inputs
22571 `(("qttools" ,qttools)))
22572 (home-page "https://framagit.org/tyreunom/offlate")
22573 (synopsis "Offline translation interface for online translation tools")
22574 (description "Offlate offers a unified interface for different translation
22575 file formats, as well as many different online translation platforms. You can
22576 use it to get work from online platforms, specialized such as the Translation
22577 Project, or not such a gitlab instance when your upstream doesn't use any
22578 dedicated platform. The tool proposes a unified interface for any format and
22579 an upload option to send your work back to the platform.")
22580 (license license:gpl3+)))
22581
22582 (define-public python-titlecase
22583 (package
22584 (name "python-titlecase")
22585 (version "0.12.0")
22586 (source
22587 (origin
22588 (method url-fetch)
22589 (uri (pypi-uri "titlecase" version))
22590 (sha256
22591 (base32
22592 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
22593 (build-system python-build-system)
22594 (native-inputs
22595 `(("python-nose" ,python-nose)))
22596 (home-page "https://github.com/ppannuto/python-titlecase")
22597 (synopsis "Capitalize strings similar to book titles")
22598 (description
22599 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
22600 It capitalizes (predominantly English) strings in a way that is similar to
22601 book titles, using the New York Times Manual of Style to leave certain words
22602 lowercase.")
22603 (license license:expat)))
22604
22605 (define-public python-pypng
22606 (package
22607 (name "python-pypng")
22608 (version "0.0.20")
22609 (source
22610 (origin
22611 (method url-fetch)
22612 (uri (pypi-uri "pypng" version))
22613 (sha256
22614 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
22615 (build-system python-build-system)
22616 (home-page "https://github.com/drj11/pypng")
22617 (synopsis "Pure Python PNG image encoder/decoder")
22618 (description
22619 "The PyPNG module implements support for PNG images. It reads and writes
22620 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
22621 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
22622 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
22623 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
22624 A number of optional chunks can be specified (when writing) and
22625 understood (when reading): tRNS, bKGD, gAMA.
22626
22627 PyPNG is not a high level toolkit for image processing (like PIL) and does not
22628 aim at being a replacement or competitor. Its strength lies in fine-grained
22629 extensive support of PNG features. It can also read and write Netpbm PAM
22630 files, with a focus on its use as an intermediate format for implementing
22631 custom PNG processing.")
22632 (license license:expat)))
22633
22634 (define-public python-fuzzywuzzy
22635 (package
22636 (name "python-fuzzywuzzy")
22637 (version "0.18.0")
22638 (source
22639 (origin
22640 (method url-fetch)
22641 (uri (pypi-uri "fuzzywuzzy" version))
22642 (sha256
22643 (base32
22644 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
22645 (build-system python-build-system)
22646 (native-inputs
22647 `(("python-hypothesis" ,python-hypothesis)
22648 ("python-pycodestyle" ,python-pycodestyle)
22649 ("python-pytest" ,python-pytest)))
22650 (propagated-inputs
22651 `(("python-levenshtein" ,python-levenshtein)))
22652 (home-page "https://github.com/seatgeek/fuzzywuzzy")
22653 (synopsis "Fuzzy string matching in Python")
22654 (description "Approximate string matching using
22655 @emph{Levenshtein Distance} to calculate the differences between
22656 sequences.")
22657 (license license:gpl2)))
22658
22659 (define-public python2-fuzzywuzzy
22660 (package-with-python2 python-fuzzywuzzy))
22661
22662 (define-public python-block-tracing
22663 (package
22664 (name "python-block-tracing")
22665 (version "1.0.1")
22666 (source
22667 (origin
22668 (method url-fetch)
22669 (uri (pypi-uri "block_tracing" version))
22670 (sha256
22671 (base32
22672 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
22673 (build-system python-build-system)
22674 (arguments '(#:tests? #f)) ; no tests
22675 (home-page "https://github.com/rianhunter/block_tracing")
22676 (synopsis "Protect process memory")
22677 (description
22678 "@code{block_tracing} is a tiny Python library that can be used to
22679 prevent debuggers and other applications from inspecting the memory within
22680 your process.")
22681 (license license:expat)))
22682
22683 (define-public python-gcovr
22684 (package
22685 (name "python-gcovr")
22686 (version "4.2")
22687 (source
22688 (origin
22689 (method url-fetch)
22690 (uri (pypi-uri "gcovr" version))
22691 (sha256
22692 (base32
22693 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
22694 (build-system python-build-system)
22695 (propagated-inputs
22696 `(("python-lxml" ,python-lxml)
22697 ("python-jinja2" ,python-jinja2)))
22698 (home-page "https://gcovr.com/")
22699 (synopsis "Utility for generating code coverage results")
22700 (description
22701 "Gcovr provides a utility for managing the use of the GNU gcov
22702 utility and generating summarized code coverage results. It is inspired
22703 by the Python coverage.py package, which provides a similar utility for
22704 Python.")
22705 (license license:bsd-3)))
22706
22707 (define-public python-owslib
22708 (package
22709 (name "python-owslib")
22710 (version "0.19.2")
22711 (source
22712 (origin
22713 (method url-fetch)
22714 (uri (pypi-uri "OWSLib" version))
22715 (sha256
22716 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
22717 (build-system python-build-system)
22718 (arguments
22719 '(#:tests? #f)) ; TODO: package dependencies required for tests.
22720 (synopsis "Interface for Open Geospatial Consortium web service")
22721 (description
22722 "OWSLib is a Python package for client programming with Open Geospatial
22723 Consortium (OGC) web service (hence OWS) interface standards, and their related
22724 content models.")
22725 (home-page "https://geopython.github.io/OWSLib/")
22726 (license license:bsd-3)))
22727
22728 (define-public python-docusign-esign
22729 (package
22730 (name "python-docusign-esign")
22731 (version "3.1.0")
22732 (source (origin
22733 (method url-fetch)
22734 (uri (pypi-uri "docusign_esign" version))
22735 (sha256
22736 (base32
22737 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
22738 (build-system python-build-system)
22739 ;; Testing requires undocumented setup changes, and so testing is disabled here.
22740 (arguments `(#:tests? #f))
22741 (propagated-inputs
22742 `(("python-certifi" ,python-certifi)
22743 ("python-six" ,python-six)
22744 ("python-dateutil" ,python-dateutil)
22745 ("python-urllib3" ,python-urllib3)
22746 ("python-pyjwt" ,python-pyjwt)
22747 ("python-cryptography" ,python-cryptography)
22748 ("python-nose" ,python-nose)))
22749 (synopsis "DocuSign Python Client")
22750 (description "The Official DocuSign Python Client Library used to interact
22751 with the eSign REST API. Send, sign, and approve documents using this client.")
22752 (home-page "https://www.docusign.com/devcenter")
22753 (license license:expat)))
22754
22755 (define-public python-xattr
22756 (package
22757 (name "python-xattr")
22758 (version "0.9.7")
22759 (source
22760 (origin
22761 (method url-fetch)
22762 (uri (pypi-uri "xattr" version))
22763 (sha256
22764 (base32
22765 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
22766 (build-system python-build-system)
22767 (propagated-inputs
22768 `(("python-cffi" ,python-cffi)))
22769 (home-page "https://github.com/xattr/xattr")
22770 (synopsis
22771 "Python wrapper for extended file system attributes")
22772 (description "This package provides a Python wrapper for using extended
22773 file system attributes. Extended attributes extend the basic attributes of files
22774 and directories in the file system. They are stored as name:data pairs
22775 associated with file system objects (files, directories, symlinks, etc).")
22776 (license license:expat)))
22777
22778 (define-public python-json-logger
22779 (package
22780 (name "python-json-logger")
22781 (version "0.1.11")
22782 (source
22783 (origin
22784 (method url-fetch)
22785 (uri (pypi-uri "python-json-logger" version))
22786 (sha256
22787 (base32
22788 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
22789 (build-system python-build-system)
22790 (home-page
22791 "https://github.com/madzak/python-json-logger")
22792 (synopsis "JSON log formatter in Python")
22793 (description "This library allows standard Python logging to output log data
22794 as JSON objects. With JSON we can make our logs more readable by machines and
22795 we can stop writing custom parsers for syslog-type records.")
22796 (license license:bsd-3)))
22797
22798 (define-public python-daiquiri
22799 (package
22800 (name "python-daiquiri")
22801 (version "2.1.1")
22802 (source
22803 (origin
22804 (method url-fetch)
22805 (uri (pypi-uri "daiquiri" version))
22806 (sha256
22807 (base32
22808 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
22809 (build-system python-build-system)
22810 (propagated-inputs
22811 `(("python-json-logger" ,python-json-logger)))
22812 (native-inputs
22813 `(("python-mock" ,python-mock)
22814 ("python-pytest" ,python-pytest)
22815 ("python-setuptools-scm" ,python-setuptools-scm)
22816 ("python-six" ,python-six)))
22817 (home-page "https://github.com/jd/daiquiri")
22818 (synopsis
22819 "Library to configure Python logging easily")
22820 (description "The daiquiri library provides an easy way to configure
22821 logging in Python. It also provides some custom formatters and handlers.")
22822 (license license:asl2.0)))
22823
22824 (define-public python-pifpaf
22825 (package
22826 (name "python-pifpaf")
22827 (version "2.5.0")
22828 (source
22829 (origin
22830 (method url-fetch)
22831 (uri (pypi-uri "pifpaf" version))
22832 (sha256
22833 (base32
22834 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
22835 (build-system python-build-system)
22836 (arguments
22837 '(#:phases
22838 (modify-phases %standard-phases
22839 (replace 'check
22840 (lambda _
22841 (invoke "python" "setup.py" "testr" "--slowest"
22842 "--testr-args=until-failure"))))))
22843 (propagated-inputs
22844 `(("python-click" ,python-click)
22845 ("python-daiquiri" ,python-daiquiri)
22846 ("python-fixtures" ,python-fixtures)
22847 ("python-jinja2" ,python-jinja2)
22848 ("python-pbr" ,python-pbr)
22849 ("python-psutil" ,python-psutil)
22850 ("python-six" ,python-six)
22851 ("python-xattr" ,python-xattr)))
22852 (native-inputs
22853 `(("python-mock" ,python-mock)
22854 ("python-os-testr" ,python-os-testr)
22855 ("python-requests" ,python-requests)
22856 ("python-testrepository" ,python-testrepository)
22857 ("python-testtools" ,python-testtools)))
22858 (home-page "https://github.com/jd/pifpaf")
22859 (synopsis "Tools and fixtures to manage daemons for testing in Python")
22860 (description "Pifpaf is a suite of fixtures and a command-line tool that
22861 starts and stops daemons for a quick throw-away usage. This is typically
22862 useful when needing these daemons to run integration testing. It originally
22863 evolved from its precursor @code{overtest}.")
22864 (license license:asl2.0)))
22865
22866 (define-public python-pytest-check-links
22867 (package
22868 (name "python-pytest-check-links")
22869 (version "0.3.0")
22870 (source
22871 (origin
22872 (method url-fetch)
22873 ;; URI uses underscores
22874 (uri (pypi-uri "pytest_check_links" version))
22875 (sha256
22876 (base32
22877 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
22878 (build-system python-build-system)
22879 (propagated-inputs
22880 `(("python-docutils" ,python-docutils)
22881 ("python-html5lib" ,python-html5lib)
22882 ("python-nbconvert" ,python-nbconvert)
22883 ("python-nbformat" ,python-nbformat)
22884 ("python-pytest" ,python-pytest)
22885 ("python-six" ,python-six)))
22886 (native-inputs
22887 `(("python-pbr-minimal" ,python-pbr-minimal)))
22888 (home-page "https://github.com/minrk/pytest-check-links")
22889 (synopsis "Check links in files")
22890 (description "This package provides a pytest plugin that checks URLs for
22891 HTML-containing files.")
22892 (license license:bsd-3)))
22893
22894 (define-public python-json5
22895 (package
22896 (name "python-json5")
22897 (version "0.8.5")
22898 (source
22899 (origin
22900 ;; sample.json5 is missing from PyPi source tarball
22901 (method git-fetch)
22902 (uri (git-reference
22903 (url "https://github.com/dpranke/pyjson5")
22904 (commit (string-append "v" version))))
22905 (file-name (git-file-name name version))
22906 (sha256
22907 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
22908 (build-system python-build-system)
22909 (home-page "https://github.com/dpranke/pyjson5")
22910 (synopsis
22911 "Python implementation of the JSON5 data format")
22912 (description
22913 "JSON5 extends the JSON data interchange format to make it slightly more
22914 usable as a configuration language. This Python package implements parsing and
22915 dumping of JSON5 data structures.")
22916 (license license:asl2.0)))
22917
22918 (define-public python-frozendict
22919 (package
22920 (name "python-frozendict")
22921 (version "1.2")
22922 (source
22923 (origin
22924 (method url-fetch)
22925 (uri (pypi-uri "frozendict" version))
22926 (sha256
22927 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
22928 (build-system python-build-system)
22929 (home-page "https://github.com/slezica/python-frozendict")
22930 (synopsis "Simple immutable mapping for Python")
22931 (description
22932 "@dfn{frozendict} is an immutable wrapper around dictionaries that
22933 implements the complete mapping interface. It can be used as a drop-in
22934 replacement for dictionaries where immutability is desired.")
22935 (license license:expat)))
22936
22937 (define-public python-unpaddedbase64
22938 (package
22939 (name "python-unpaddedbase64")
22940 (version "1.1.0")
22941 (source
22942 (origin
22943 (method git-fetch)
22944 (uri (git-reference
22945 (url "https://github.com/matrix-org/python-unpaddedbase64")
22946 (commit (string-append "v" version))))
22947 (file-name (git-file-name name version))
22948 (sha256
22949 (base32
22950 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
22951 (build-system python-build-system)
22952 (home-page "https://pypi.org/project/unpaddedbase64/")
22953 (synopsis "Encode and decode Base64 without “=” padding")
22954 (description
22955 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
22956 using “=” characters. However this conveys no benefit so many protocols
22957 choose to use Base64 without the “=” padding.")
22958 (license license:asl2.0)))
22959
22960 (define-public python-py-cpuinfo
22961 (package
22962 (name "python-py-cpuinfo")
22963 (version "5.0.0")
22964 (source
22965 (origin
22966 (method url-fetch)
22967 (uri (pypi-uri "py-cpuinfo" version))
22968 (sha256
22969 (base32
22970 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
22971 (build-system python-build-system)
22972 (home-page "https://github.com/workhorsy/py-cpuinfo")
22973 (synopsis "Get CPU info with Python")
22974 (description
22975 "This Python module returns the CPU info by using the best sources of
22976 information for your operating system.")
22977 (license license:expat)))
22978
22979 (define-public python-canonicaljson
22980 (package
22981 (name "python-canonicaljson")
22982 (version "1.4.0")
22983 (source
22984 (origin
22985 (method url-fetch)
22986 (uri (pypi-uri "canonicaljson" version))
22987 (sha256
22988 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
22989 (build-system python-build-system)
22990 (propagated-inputs
22991 `(("python-six" ,python-six)
22992 ("python-frozendict" ,python-frozendict)
22993 ("python-simplejson" ,python-simplejson)))
22994 (home-page "https://github.com/matrix-org/python-canonicaljson")
22995 (synopsis "Canonical JSON")
22996 (description
22997 "Deterministically encode JSON.
22998
22999 @itemize
23000 @item Encodes objects and arrays as RFC 7159 JSON.
23001 @item Sorts object keys so that you get the same result each time.
23002 @item Has no insignificant whitespace to make the output as small as possible.
23003 @item Escapes only the characters that must be escaped, U+0000 to
23004 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
23005 @item Uses the shortest escape sequence for each escaped character.
23006 @item Encodes the JSON as UTF-8.
23007 @item Can encode frozendict immutable dictionaries.
23008 @end itemize")
23009 (license license:asl2.0)))
23010
23011 (define-public python-signedjson
23012 (package
23013 (name "python-signedjson")
23014 (version "1.1.1")
23015 (source
23016 (origin
23017 (method url-fetch)
23018 (uri (pypi-uri "signedjson" version))
23019 (sha256
23020 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
23021 (build-system python-build-system)
23022 (propagated-inputs
23023 `(("python-canonicaljson" ,python-canonicaljson)
23024 ("python-importlib-metadata" ,python-importlib-metadata)
23025 ("python-pynacl" ,python-pynacl)
23026 ("python-typing-extensions" ,python-typing-extensions)
23027 ("python-unpaddedbase64" ,python-unpaddedbase64)))
23028 (native-inputs
23029 `(("python-setuptools-scm" ,python-setuptools-scm)))
23030 (home-page "https://github.com/matrix-org/python-signedjson")
23031 (synopsis "Sign JSON objects with ED25519 signatures")
23032 (description
23033 "Sign JSON objects with ED25519 signatures.
23034
23035 @itemize
23036 @item More than one entity can sign the same object.
23037 @item Each entity can sign the object with more than one key making it easier to
23038 rotate keys
23039 @item ED25519 can be replaced with a different algorithm.
23040 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
23041 key.
23042 @end itemize")
23043 (license license:asl2.0)))
23044
23045 (define-public python-daemonize
23046 (package
23047 (name "python-daemonize")
23048 (version "2.5.0")
23049 (source
23050 (origin
23051 (method url-fetch)
23052 (uri (pypi-uri "daemonize" version))
23053 (sha256
23054 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
23055 (build-system python-build-system)
23056 (home-page "https://github.com/thesharp/daemonize")
23057 (synopsis "Library for writing system daemons in Python")
23058 (description "Daemonize is a library for writing system daemons in Python.")
23059 (license license:expat)))
23060
23061 (define-public python-pymacaroons
23062 (package
23063 (name "python-pymacaroons")
23064 (version "0.13.0")
23065 (source
23066 (origin
23067 (method url-fetch)
23068 (uri (pypi-uri "pymacaroons" version))
23069 (sha256
23070 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
23071 (build-system python-build-system)
23072 (propagated-inputs
23073 `(("python-six" ,python-six)
23074 ("python-pynacl" ,python-pynacl)))
23075 (home-page "https://github.com/ecordell/pymacaroons")
23076 (synopsis "Python Macaroon Library")
23077 (description
23078 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
23079 tokens, macaroons embed caveats that define specific authorization
23080 requirements for the target service, the service that issued the root macaroon
23081 and which is capable of verifying the integrity of macaroons it receives.
23082
23083 Macaroons allow for delegation and attenuation of authorization. They are
23084 simple and fast to verify, and decouple authorization policy from the
23085 enforcement of that policy.")
23086 (license license:expat)))
23087
23088 (define-public python-ldap3
23089 (package
23090 (name "python-ldap3")
23091 (version "2.7")
23092 (home-page "https://github.com/cannatag/ldap3")
23093 (source
23094 (origin
23095 (method git-fetch)
23096 (uri (git-reference (url home-page)
23097 (commit (string-append "v" version))))
23098 (file-name (git-file-name name version))
23099 (sha256
23100 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
23101 (build-system python-build-system)
23102 (arguments
23103 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
23104 #:phases (modify-phases %standard-phases
23105 (replace 'check
23106 (lambda* (#:key tests? #:allow-other-keys)
23107 (when tests?
23108 (invoke "nosetests" "-s" "test"))
23109 #t)))))
23110 (native-inputs
23111 `(("python-nose" ,python-nose)))
23112 (propagated-inputs
23113 `(("python-gssapi" ,python-gssapi)
23114 ("python-pyasn1" ,python-pyasn1)))
23115 (synopsis "Python LDAP client")
23116 (description
23117 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
23118 library.")
23119 (license license:lgpl3+)))
23120
23121 (define-public python-boltons
23122 (package
23123 (name "python-boltons")
23124 (version "20.0.0")
23125 (source
23126 (origin
23127 (method url-fetch)
23128 (uri (pypi-uri "boltons" version))
23129 (sha256
23130 (base32
23131 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
23132 (build-system python-build-system)
23133 (home-page "https://github.com/mahmoud/boltons")
23134 (synopsis "Extensions to the Python standard library")
23135 (description
23136 "Boltons is a set of over 230 pure-Python utilities in the same spirit
23137 as — and yet conspicuously missing from — the standard library, including:
23138
23139 @itemize
23140 @item Atomic file saving, bolted on with fileutils
23141 @item A highly-optimized OrderedMultiDict, in dictutils
23142 @item Two types of PriorityQueue, in queueutils
23143 @item Chunked and windowed iteration, in iterutils
23144 @item Recursive data structure iteration and merging, with iterutils.remap
23145 @item Exponential backoff functionality, including jitter, through
23146 iterutils.backoff
23147 @item A full-featured TracebackInfo type, for representing stack traces, in
23148 tbutils
23149 @end itemize")
23150 (license license:bsd-3)))
23151
23152 (define-public python-eliot
23153 (package
23154 (name "python-eliot")
23155 (version "1.12.0")
23156 (source
23157 (origin
23158 (method url-fetch)
23159 (uri (pypi-uri "eliot" version))
23160 (sha256
23161 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
23162 (build-system python-build-system)
23163 (arguments
23164 `(#:phases
23165 (modify-phases %standard-phases
23166 (add-after 'unpack 'remove-journald-support
23167 (lambda _
23168 (for-each delete-file
23169 '("eliot/tests/test_journald.py"
23170 "eliot/journald.py"))
23171 #t))
23172 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
23173 ;; remove command-line tool's tests. TODO eliot-prettyprint should
23174 ;; be installed and these tests should pass.
23175 (lambda _
23176 (delete-file "eliot/tests/test_prettyprint.py")
23177 #t)))))
23178 (propagated-inputs
23179 `(("python-boltons" ,python-boltons)
23180 ("python-pyrsistent" ,python-pyrsistent)
23181 ("python-six" ,python-six)
23182 ("python-zope-interface" ,python-zope-interface)))
23183 (native-inputs
23184 `(("python-black" ,python-black)
23185 ("python-coverage" ,python-coverage)
23186 ("python-dask" ,python-dask)
23187 ("python-flake8" ,python-flake8)
23188 ("python-hypothesis" ,python-hypothesis)
23189 ("python-pytest" ,python-pytest)
23190 ("python-setuptools" ,python-setuptools)
23191 ("python-sphinx" ,python-sphinx)
23192 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23193 ("python-testtools" ,python-testtools)
23194 ("python-twine" ,python-twine)
23195 ("python-twisted" ,python-twisted)))
23196 (home-page "https://github.com/itamarst/eliot/")
23197 (synopsis "Eliot: the logging system that tells you why it happened")
23198 (description
23199 "@dfn{eliot} is a Python logging system that outputs causal chains of
23200 actions: actions can spawn other actions, and eventually they either succeed
23201 or fail. The resulting logs tell you the story of what your software did: what
23202 happened, and what caused it.")
23203 (license license:asl2.0)))
23204
23205 (define-public python-pem
23206 (package
23207 (name "python-pem")
23208 (version "20.1.0")
23209 (source
23210 (origin
23211 (method url-fetch)
23212 (uri (pypi-uri "pem" version))
23213 (sha256
23214 (base32
23215 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
23216 (build-system python-build-system)
23217 (native-inputs
23218 `(("python-certifi" ,python-certifi)
23219 ("python-coverage" ,python-coverage)
23220 ("python-pretend" ,python-pretend)
23221 ("python-pyopenssl" ,python-pyopenssl)
23222 ("python-pytest" ,python-pytest)
23223 ("python-sphinx" ,python-sphinx)
23224 ("python-twisted" ,python-twisted)))
23225 (home-page "https://pem.readthedocs.io/")
23226 (synopsis "Easy PEM file parsing in Python")
23227 (description
23228 "This package provides a Python module for parsing and splitting PEM files.")
23229 (license license:expat)))
23230
23231 (define-public python-txsni
23232 ;; We need a few commits on top of 0.1.9 for compatibility with newer
23233 ;; Python and OpenSSL.
23234 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
23235 (revision "0"))
23236 (package
23237 (name "python-txsni")
23238 (version (git-version "0.1.9" revision commit))
23239 (home-page "https://github.com/glyph/txsni")
23240 (source
23241 (origin
23242 (method git-fetch)
23243 (uri (git-reference (url home-page) (commit commit)))
23244 (file-name (git-file-name name version))
23245 (sha256
23246 (base32
23247 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
23248 (build-system python-build-system)
23249 (propagated-inputs
23250 `(("python-pyopenssl" ,python-pyopenssl)
23251 ("python-service-identity" ,python-service-identity)
23252 ("python-twisted" ,python-twisted)))
23253 (synopsis "Run TLS servers with Twisted")
23254 (description
23255 "This package provides an easy-to-use SNI endpoint for use
23256 with the Twisted web framework.")
23257 (license license:expat))))
23258
23259 (define-public python-txacme
23260 (package
23261 (name "python-txacme")
23262 (version "0.9.2")
23263 (source
23264 (origin
23265 (method url-fetch)
23266 (uri (pypi-uri "txacme" version))
23267 (sha256
23268 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
23269 (build-system python-build-system)
23270 (propagated-inputs
23271 `(("python-acme" ,python-acme)
23272 ("python-attrs" ,python-attrs)
23273 ("python-eliot" ,python-eliot)
23274 ("python-josepy" ,python-josepy)
23275 ("python-pem" ,python-pem)
23276 ("python-treq" ,python-treq)
23277 ("python-twisted" ,python-twisted)
23278 ("python-txsni" ,python-txsni)))
23279 (native-inputs
23280 `(("python-fixtures" ,python-fixtures)
23281 ("python-hypothesis" ,python-hypothesis)
23282 ("python-mock" ,python-mock)
23283 ("python-service-identity"
23284 ,python-service-identity)
23285 ("python-testrepository" ,python-testrepository)
23286 ("python-testscenarios" ,python-testscenarios)
23287 ("python-testtools" ,python-testtools)))
23288 (home-page "https://github.com/twisted/txacme")
23289 (synopsis "Twisted implexmentation of the ACME protocol")
23290 (description
23291 "ACME is Automatic Certificate Management Environment, a protocol that
23292 allows clients and certificate authorities to automate verification and
23293 certificate issuance. The ACME protocol is used by the free Let's Encrypt
23294 Certificate Authority.
23295
23296 txacme is an implementation of the protocol for Twisted, the event-driven
23297 networking engine for Python.")
23298 (license license:expat)))
23299
23300 (define-public python-pysaml2
23301 (package
23302 (name "python-pysaml2")
23303 (version "6.5.1")
23304 (source
23305 (origin
23306 (method url-fetch)
23307 (uri (pypi-uri "pysaml2" version))
23308 (sha256
23309 (base32
23310 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
23311 (build-system python-build-system)
23312 (propagated-inputs
23313 `(("python-cryptography" ,python-cryptography)
23314 ("python-dateutil" ,python-dateutil)
23315 ("python-defusedxml" ,python-defusedxml)
23316 ("python-importlib-resources"
23317 ,python-importlib-resources)
23318 ("python-pyopenssl" ,python-pyopenssl)
23319 ("python-pytz" ,python-pytz)
23320 ("python-requests" ,python-requests)
23321 ("python-six" ,python-six)
23322 ("python-xmlschema" ,python-xmlschema)))
23323 (home-page "https://idpy.org")
23324 (synopsis "Python implementation of SAML Version 2 Standard")
23325 (description
23326 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
23327 It contains all necessary pieces for building a SAML2 service provider or
23328 an identity provider. The distribution contains examples of both.
23329
23330 This package was originally written to work in a WSGI environment, but
23331 there are extensions that allow you to use it with other frameworks.")
23332 (license license:asl2.0)))
23333
23334 (define-public python-click-plugins
23335 (package
23336 (name "python-click-plugins")
23337 (version "1.1.1")
23338 (source
23339 (origin
23340 (method url-fetch)
23341 (uri (pypi-uri "click-plugins" version))
23342 (sha256
23343 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
23344 (build-system python-build-system)
23345 (native-inputs
23346 `(("python-pytest" ,python-pytest)))
23347 (propagated-inputs
23348 `(("python-click" ,python-click)))
23349 (synopsis "Extension for Click to register external CLI commands")
23350 (description "This package provides n extension module for Click to
23351 register external CLI commands via setuptools entry-points.")
23352 (home-page "https://github.com/click-contrib/click-plugins")
23353 (license license:bsd-3)))
23354
23355 (define-public python-diceware
23356 (package
23357 (name "python-diceware")
23358 (version "0.9.6")
23359 (source
23360 (origin
23361 (method url-fetch)
23362 (uri (pypi-uri "diceware" version))
23363 (sha256
23364 (base32
23365 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
23366 (build-system python-build-system)
23367 (native-inputs
23368 `(("python-coverage" ,python-coverage)
23369 ("python-pytest" ,python-pytest)
23370 ("python-pytest-runner" ,python-pytest-runner)))
23371 (home-page "https://github.com/ulif/diceware/")
23372 (synopsis "Generates memorable passphrases")
23373 (description "This package generates passphrases by concatenating words
23374 randomly picked from wordlists. It supports several sources of
23375 randomness (including real life dice) and different wordlists (including
23376 cryptographically signed ones).")
23377 (license license:gpl3+)))
23378
23379 (define-public python-dictdiffer
23380 (package
23381 (name "python-dictdiffer")
23382 (version "0.8.1")
23383 (source (origin
23384 (method url-fetch)
23385 (uri (pypi-uri "dictdiffer" version))
23386 (sha256
23387 (base32
23388 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
23389 (build-system python-build-system)
23390 (native-inputs
23391 `(("python-check-manifest" ,python-check-manifest)
23392 ("python-coverage" ,python-coverage)
23393 ("python-isort" ,python-isort)
23394 ("python-mock" ,python-mock)
23395 ("python-pydoctstyle" ,python-pydocstyle)
23396 ("python-pytest-cache" ,python-pytest-cache)
23397 ("python-pytest-cov" ,python-pytest-cov)
23398 ("python-pytest-pep8" ,python-pytest-pep8)
23399 ("python-pytest-runner" ,python-pytest-runner)
23400 ("python-pytest" ,python-pytest)
23401 ("python-setuptools-scm" ,python-setuptools-scm)
23402 ("python-tox" ,python-tox)))
23403 (home-page "https://github.com/inveniosoftware/dictdiffer")
23404 (synopsis "Diff and patch Python dictionary objects")
23405 (description
23406 "Dictdiffer is a Python module that helps you to diff and patch
23407 dictionaries.")
23408 (license license:expat)))
23409
23410 (define-public pyzo
23411 (package
23412 (name "pyzo")
23413 (version "4.11.2")
23414 (source
23415 (origin
23416 (method url-fetch)
23417 (uri (pypi-uri "pyzo" version))
23418 (sha256
23419 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
23420 (build-system python-build-system)
23421 (arguments
23422 `(#:phases
23423 (modify-phases %standard-phases
23424 (add-before 'check 'fix-home-directory
23425 (lambda _
23426 ;; Tests fail with "Permission denied: '/homeless-shelter'".
23427 (setenv "HOME" "/tmp")
23428 #t)))
23429 ;; Tests fail with "Uncaught Python exception: python: undefined
23430 ;; symbol: objc_getClass".
23431 #:tests? #f))
23432 (propagated-inputs
23433 `(("python-pyqt" ,python-pyqt)))
23434 (home-page "https://pyzo.org")
23435 (synopsis
23436 "Python IDE for scientific computing")
23437 (description
23438 "Pyzo is a Python IDE focused on interactivity and introspection,
23439 which makes it very suitable for scientific computing. Its practical
23440 design is aimed at simplicity and efficiency.
23441
23442 It consists of two main components, the editor and the shell, and uses
23443 a set of pluggable tools to help the programmer in various ways. Some
23444 example tools are source structure, project manager, interactive help,
23445 workspace...")
23446 (license license:bsd-2)))
23447
23448 (define-public python-osc
23449 (package
23450 (name "python-osc")
23451 (version "1.7.4")
23452 (source
23453 (origin
23454 (method url-fetch)
23455 (uri (pypi-uri "python-osc" version))
23456 (sha256
23457 (base32
23458 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
23459 (build-system python-build-system)
23460 (home-page "https://github.com/attwad/python-osc")
23461 (synopsis "Open Sound Control server and client implementations")
23462 (description
23463 "@code{python-osc} is a pure Python library with no external
23464 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
23465 Open Sound Control 1.0} specification.")
23466 (license license:unlicense)))
23467
23468 (define-public python-voluptuous
23469 (package
23470 (name "python-voluptuous")
23471 (version "0.11.7")
23472 (source
23473 (origin
23474 (method url-fetch)
23475 (uri (pypi-uri "voluptuous" version))
23476 (sha256
23477 (base32
23478 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
23479 (build-system python-build-system)
23480 (native-inputs
23481 `(("python-nose" ,python-nose)))
23482 (home-page "https://github.com/alecthomas/voluptuous")
23483 (synopsis "Python data validation library")
23484 (description
23485 "Voluptuous is a Python data validation library. It is primarily
23486 intended for validating data coming into Python as JSON, YAML, etc.")
23487 (license license:bsd-3)))
23488
23489 (define-public python-cmd2
23490 (package
23491 (name "python-cmd2")
23492 (version "1.0.2")
23493 (source
23494 (origin
23495 (method url-fetch)
23496 (uri (pypi-uri "cmd2" version))
23497 (sha256
23498 (base32
23499 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
23500 (build-system python-build-system)
23501 (propagated-inputs
23502 `(("python-attrs" ,python-attrs)
23503 ("python-colorama" ,python-colorama)
23504 ("python-pyperclip" ,python-pyperclip)
23505 ("python-wcwidth" ,python-wcwidth)))
23506 (native-inputs
23507 `(("python-codecov" ,python-codecov)
23508 ("python-coverage" ,python-coverage)
23509 ("python-doc8" ,python-doc8)
23510 ("python-flake8" ,python-flake8)
23511 ("python-invoke" ,python-invoke)
23512 ("python-mock" ,python-mock)
23513 ("python-pytest" ,python-pytest)
23514 ("python-pytest-cov" ,python-pytest-cov)
23515 ("python-pytest-mock" ,python-pytest-mock)
23516 ("python-setuptools-scm" ,python-setuptools-scm)
23517 ("python-sphinx" ,python-sphinx)
23518 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
23519 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
23520 ("python-tox" ,python-tox)
23521 ("python-twine" ,python-twine)
23522 ("which" ,which)))
23523 (home-page "https://github.com/python-cmd2/cmd2")
23524 (synopsis "Tool for building interactive command line applications")
23525 (description
23526 "Cmd2 is a tool for building interactive command line applications in
23527 Python. Its goal is to make it quick and easy for developers to build
23528 feature-rich and user-friendly interactive command line applications. It
23529 provides a simple API which is an extension of Python's built-in @code{cmd}
23530 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
23531 make your life easier and eliminates much of the boilerplate code which would
23532 be necessary when using @code{cmd}.")
23533 (license license:expat)))
23534
23535 (define-public python-pytidylib
23536 (package
23537 (name "python-pytidylib")
23538 (version "0.3.2")
23539 (source (origin
23540 (method url-fetch)
23541 (uri (pypi-uri "pytidylib" version))
23542 (sha256
23543 (base32
23544 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
23545 (build-system python-build-system)
23546 (arguments
23547 '(#:phases
23548 (modify-phases %standard-phases
23549 (add-before 'build 'qualify-libtidy
23550 (lambda* (#:key inputs #:allow-other-keys)
23551 (let ((libtidy (string-append (assoc-ref inputs "tidy")
23552 "/lib/libtidy.so")))
23553 (substitute* "tidylib/tidy.py"
23554 (("ctypes\\.util\\.find_library\\('tidy'\\)")
23555 (format #f "'~a'" libtidy)))
23556 #t))))))
23557 (inputs `(("tidy" ,tidy)))
23558 (home-page "https://github.com/countergram/pytidylib")
23559 (synopsis "Python wrapper for HTML Tidy library")
23560 (description
23561 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
23562 allows you, from Python code, to “fix” invalid (X)HTML markup.")
23563 (license license:expat)))
23564
23565 (define-public python2-pytidylib
23566 (package-with-python2 python-pytidylib))
23567
23568 (define-public python-mujson
23569 (package
23570 (name "python-mujson")
23571 (version "1.4")
23572 (source
23573 (origin
23574 (method url-fetch)
23575 (uri (pypi-uri "mujson" version))
23576 (sha256
23577 (base32
23578 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
23579 (build-system python-build-system)
23580 (home-page "https://github.com/mattgiles/mujson")
23581 (synopsis "Use the fastest JSON functions available at import time")
23582 (description "This package selects the fastest JSON functions available
23583 at import time.")
23584 (license license:expat)))
23585
23586 (define-public python-bashlex
23587 (package
23588 (name "python-bashlex")
23589 (version "0.14")
23590 (source
23591 (origin
23592 (method url-fetch)
23593 (uri (pypi-uri "bashlex" version))
23594 (sha256
23595 (base32
23596 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
23597 (build-system python-build-system)
23598 (arguments
23599 `(#:phases
23600 (modify-phases %standard-phases
23601 (add-before 'build 'pregenerate-yacc-tables
23602 (lambda _
23603 ;; parser.py caches tables, which attempts to write to site lib
23604 ;; see https://github.com/idank/bashlex/issues/51
23605 (invoke "python" "-c" "import bashlex"))))))
23606 (home-page
23607 "https://github.com/idank/bashlex")
23608 (synopsis "Python parser for bash")
23609 (description "@code{bashlex} is a Python port of the parser used
23610 internally by GNU bash.
23611
23612 For the most part it's transliterated from C, the major differences are:
23613
23614 @itemize
23615 @item it does not execute anything
23616 @item it is reentrant
23617 @item it generates a complete AST
23618 @end itemize
23619 ")
23620 (license license:gpl3+)))
23621
23622 (define-public python-jinxed
23623 (package
23624 (name "python-jinxed")
23625 (version "1.0.0")
23626 (source
23627 (origin
23628 (method url-fetch)
23629 (uri (pypi-uri "jinxed" version))
23630 (sha256
23631 (base32
23632 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
23633 (build-system python-build-system)
23634 (arguments
23635 '(#:phases
23636 (modify-phases %standard-phases
23637 (add-before 'check 'set-environment-variables
23638 (lambda* (#:key inputs #:allow-other-keys)
23639 (let ((ncurses (assoc-ref inputs "ncurses")))
23640 (setenv "TERM" "LINUX")
23641 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
23642 #t))))
23643 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
23644 (native-inputs
23645 `(("ncurses" ,ncurses)))
23646 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
23647 (synopsis "Jinxed Terminal Library")
23648 (description
23649 "Jinxed is an implementation of a subset of the Python curses library.")
23650 (license license:mpl2.0)))
23651
23652 (define-public python-blessed
23653 (package
23654 (name "python-blessed")
23655 (version "1.17.8")
23656 (source
23657 (origin
23658 (method url-fetch)
23659 (uri (pypi-uri "blessed" version))
23660 (sha256
23661 (base32
23662 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
23663 (modules '((guix build utils)))
23664 (snippet
23665 '(begin
23666 ;; Don't get hung up on Windows test failures.
23667 (delete-file "blessed/win_terminal.py") #t))))
23668 (build-system python-build-system)
23669 (propagated-inputs
23670 `(("python-jinxed" ,python-jinxed)
23671 ("python-six" ,python-six)
23672 ("python-wcwidth" ,python-wcwidth)))
23673 (native-inputs
23674 `(("python-mock" ,python-mock)
23675 ("python-pytest" ,python-pytest)))
23676 (home-page "https://github.com/jquast/blessed")
23677 (synopsis "Wrapper around terminal capabilities")
23678 (description
23679 "Blessed is a thin, practical wrapper around terminal styling, screen
23680 positioning, and keyboard input.")
23681 (license license:expat)))
23682
23683 (define-public python-readme-renderer
23684 (package
23685 (name "python-readme-renderer")
23686 (version "26.0")
23687 (source
23688 (origin
23689 (method url-fetch)
23690 (uri (pypi-uri "readme_renderer" version))
23691 (sha256
23692 (base32
23693 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
23694 (build-system python-build-system)
23695 (propagated-inputs
23696 `(("python-bleach" ,python-bleach)
23697 ("python-docutils" ,python-docutils)
23698 ("python-pygments" ,python-pygments)
23699 ("python-six" ,python-six)))
23700 (native-inputs
23701 `(("python-mock" ,python-mock)
23702 ("python-pytest" ,python-pytest)))
23703 (home-page "https://github.com/pypa/readme_renderer")
23704 (synopsis "Render README files in Warehouse")
23705 (description
23706 "Readme Renderer is a library that will safely render arbitrary README
23707 files into HTML. It is designed to be used in Warehouse to render the
23708 @code{long_description} for packages. It can handle Markdown, reStructuredText,
23709 and plain text.")
23710 (license license:asl2.0)))
23711
23712 (define-public python-lazr-delegates
23713 (package
23714 (name "python-lazr-delegates")
23715 (version "2.0.4")
23716 (source
23717 (origin
23718 (method url-fetch)
23719 (uri (pypi-uri "lazr.delegates" version))
23720 (sha256
23721 (base32
23722 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
23723 (build-system python-build-system)
23724 (arguments
23725 '(#:phases
23726 (modify-phases %standard-phases
23727 (replace 'check
23728 (lambda _
23729 (invoke "python" "setup.py" "nosetests"))))))
23730 (native-inputs
23731 `(("python-nose" ,python-nose)))
23732 (propagated-inputs
23733 `(("python-zope-interface" ,python-zope-interface)))
23734 (home-page "https://launchpad.net/lazr.delegates")
23735 (synopsis "Easily write objects that delegate behavior")
23736 (description
23737 "The @code{lazr.delegates} package makes it easy to write objects that
23738 delegate behavior to another object. The new object adds some property or
23739 behavior on to the other object, while still providing the underlying interface,
23740 and delegating behavior.")
23741 (license license:lgpl3)))
23742
23743 (define-public python-lazr-config
23744 (package
23745 (name "python-lazr-config")
23746 (version "2.2.2")
23747 (source
23748 (origin
23749 (method url-fetch)
23750 (uri (pypi-uri "lazr.config" version))
23751 (sha256
23752 (base32
23753 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
23754 (build-system python-build-system)
23755 (arguments
23756 '(#:phases
23757 (modify-phases %standard-phases
23758 (replace 'check
23759 (lambda _
23760 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
23761 (native-inputs
23762 `(("python-nose" ,python-nose)))
23763 (propagated-inputs
23764 `(("python-lazr-delegates" ,python-lazr-delegates)
23765 ("python-zope-interface" ,python-zope-interface)))
23766 (home-page "https://launchpad.net/lazr.config")
23767 (synopsis "Create configuration schemas and process and validate configurations")
23768 (description
23769 "The LAZR config system is typically used to manage process configuration.
23770 Process configuration is for saying how things change when we run systems on
23771 different machines, or under different circumstances. This system uses ini-like
23772 file format of section, keys, and values. The config file supports inheritance
23773 to minimize duplication of information across files. The format supports schema
23774 validation.")
23775 (license license:lgpl3)))
23776
23777 (define-public python-flufl-bounce
23778 (package
23779 (name "python-flufl-bounce")
23780 (version "3.0.1")
23781 (source
23782 (origin
23783 (method url-fetch)
23784 (uri (pypi-uri "flufl.bounce" version))
23785 (sha256
23786 (base32
23787 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
23788 (build-system python-build-system)
23789 (propagated-inputs
23790 `(("python-atpublic" ,python-atpublic)
23791 ("python-zope-interface" ,python-zope-interface)))
23792 (native-inputs
23793 `(("python-nose2" ,python-nose2)))
23794 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
23795 (synopsis "Email bounce detectors")
23796 (description "The @code{flufl.bounce} library provides a set of heuristics
23797 and an API for detecting the original bouncing email addresses from a bounce
23798 message. Many formats found in the wild are supported, as are VERP and
23799 RFC 3464.")
23800 (license (list license:asl2.0
23801 license:lgpl3)))) ; only for setup_headers.py
23802
23803 (define-public python-flufl-i18n
23804 (package
23805 (name "python-flufl-i18n")
23806 (version "3.0")
23807 (source
23808 (origin
23809 (method url-fetch)
23810 (uri (pypi-uri "flufl.i18n" version))
23811 (sha256
23812 (base32
23813 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
23814 (build-system python-build-system)
23815 (propagated-inputs
23816 `(("python-atpublic" ,python-atpublic)))
23817 (home-page "https://flufli18n.readthedocs.io")
23818 (synopsis "API for Python internationalization")
23819 (description
23820 "This package provides a high-level, convenient API for managing
23821 internationalization/translation contexts in Python applications. There is a
23822 simple API for single-context applications, such as command line scripts which
23823 only need to translate into one language during the entire course of their
23824 execution. There is a more flexible, but still convenient API for multi-context
23825 applications, such as servers, which may need to switch language contexts for
23826 different tasks.")
23827 (license license:asl2.0)))
23828
23829 (define-public python-flufl-lock
23830 (package
23831 (name "python-flufl-lock")
23832 (version "4.0")
23833 (source
23834 (origin
23835 (method url-fetch)
23836 (uri (pypi-uri "flufl.lock" version))
23837 (sha256
23838 (base32
23839 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
23840 (build-system python-build-system)
23841 (propagated-inputs
23842 `(("python-atpublic" ,python-atpublic)
23843 ("python-psutil" ,python-psutil)))
23844 (home-page "https://flufllock.readthedocs.io")
23845 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
23846 (description
23847 "The @dfn{flufl.lock} package provides NFS-safe file locking with
23848 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
23849 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
23850 and have a maximum lifetime built-in.")
23851 (license (list license:asl2.0
23852 license:lgpl3)))) ; only for setup_helpers.py
23853
23854 (define-public python-flufl-testing
23855 (package
23856 (name "python-flufl-testing")
23857 (version "0.8")
23858 (source
23859 (origin
23860 (method url-fetch)
23861 (uri (pypi-uri "flufl.testing" version))
23862 (sha256
23863 (base32
23864 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
23865 (build-system python-build-system)
23866 (native-inputs
23867 `(("python-nose2" ,python-nose2)))
23868 (home-page "https://gitlab.com/warsaw/flufl.testing")
23869 (synopsis "Collection of test tool plugins")
23870 (description
23871 "This package contains a small collection of test tool plugins for
23872 @code{nose2} and @code{flake8}.")
23873 (license license:asl2.0)))
23874
23875 (define-public python-devtools
23876 (package
23877 (name "python-devtools")
23878 (version "0.6")
23879 (source
23880 (origin
23881 (method git-fetch)
23882 (uri (git-reference
23883 (url "https://github.com/samuelcolvin/python-devtools")
23884 (commit (string-append "v" version))))
23885 (file-name (git-file-name name version))
23886 (sha256
23887 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
23888 (build-system python-build-system)
23889 (native-inputs
23890 `(("python-pytest" ,python-pytest)
23891 ("python-pytest-mock" ,python-pytest-mock)))
23892 (propagated-inputs
23893 `(("python-pygments" ,python-pygments)))
23894 (arguments
23895 `(#:phases (modify-phases %standard-phases
23896 (replace 'check
23897 (lambda _
23898 (invoke "pytest")
23899 #t)))))
23900 (home-page "https://github.com/samuelcolvin/python-devtools")
23901 (synopsis "Debug command and development tools")
23902 (description
23903 "This package provides a debug print command and other development tools.
23904 It adds a simple and readable way to print stuff during development.")
23905 (license license:expat)))
23906
23907 (define-public python-dateparser
23908 (package
23909 (name "python-dateparser")
23910 (version "0.7.6")
23911 (source
23912 (origin
23913 (method url-fetch)
23914 (uri (pypi-uri "dateparser" version))
23915 (sha256
23916 (base32
23917 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
23918 (build-system python-build-system)
23919 (propagated-inputs
23920 `(("python-dateutil" ,python-dateutil)
23921 ("python-pytz" ,python-pytz)
23922 ("python-regex" ,python-regex)
23923 ("python-ruamel.yaml" ,python-ruamel.yaml)
23924 ("python-tzlocal" ,python-tzlocal)))
23925 (native-inputs
23926 `(("python-mock" ,python-mock)
23927 ("python-parameterized" ,python-parameterized)
23928 ("tzdata" ,tzdata-for-tests)))
23929 (arguments
23930 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
23931 #:tests? #f
23932 #:phases
23933 (modify-phases %standard-phases
23934 (add-before 'check 'set-check-environment
23935 (lambda* (#:key inputs #:allow-other-keys)
23936 (setenv "TZ" "UTC")
23937 (setenv "TZDIR"
23938 (string-append (assoc-ref inputs "tzdata")
23939 "/share/zoneinfo"))
23940 #t)))))
23941 (home-page "https://github.com/scrapinghub/dateparser")
23942 (synopsis
23943 "Date parsing library designed to parse dates from HTML pages")
23944 (description
23945 "@code{python-dateparser} provides modules to easily parse localized
23946 dates in almost any string formats commonly found on web pages.")
23947 (license license:bsd-3)))
23948
23949 (define-public python-dparse
23950 (package
23951 (name "python-dparse")
23952 (version "0.5.1")
23953 (source
23954 (origin
23955 (method url-fetch)
23956 (uri (pypi-uri "dparse" version))
23957 (sha256
23958 (base32
23959 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
23960 (build-system python-build-system)
23961 (native-inputs
23962 `(("python-pytest" ,python-pytest)))
23963 (propagated-inputs
23964 `(("python-packaging" ,python-packaging)
23965 ("python-pyyaml" ,python-pyyaml)
23966 ("python-toml" ,python-toml)))
23967 (home-page "https://github.com/pyupio/dparse")
23968 (synopsis "Parser for Python dependency files")
23969 (description "This package provides a parser for Python dependency files.")
23970 (license license:expat)))
23971
23972 (define-public python-dpath
23973 (package
23974 (name "python-dpath")
23975 (version "2.0.1")
23976 (source
23977 (origin
23978 (method url-fetch)
23979 (uri (pypi-uri "dpath" version))
23980 (sha256
23981 (base32
23982 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
23983 (build-system python-build-system)
23984 (native-inputs
23985 `(("python-hypothesis" ,python-hypothesis)
23986 ("python-mock" ,python-mock)
23987 ("python-nose" ,python-nose)))
23988 (arguments
23989 '(#:phases
23990 (modify-phases %standard-phases
23991 (replace 'check
23992 (lambda* (#:key inputs outputs #:allow-other-keys)
23993 (add-installed-pythonpath inputs outputs)
23994 ;; This invokation is taken from tox.ini.
23995 (invoke "nosetests" "-d" "-v" "tests/"))))))
23996 (home-page "https://github.com/akesterson/dpath-python")
23997 (synopsis "File-system-like pathing and searching for dictionaries")
23998 (description
23999 "@code{python-dpath} is a library for accessing and searching
24000 dictionaries via /slashed/paths ala xpath.
24001
24002 Basically it lets you glob over a dictionary as if it were a file system. It
24003 allows you to specify globs (ala the bash eglob syntax, through some advanced
24004 fnmatch.fnmatch magic) to access dictionary elements, and provides some
24005 facility for filtering those results.")
24006 (license license:expat)))
24007
24008 (define-public python-safety
24009 (package
24010 (name "python-safety")
24011 (version "1.9.0")
24012 (source
24013 (origin
24014 (method url-fetch)
24015 (uri (pypi-uri "safety" version))
24016 (sha256
24017 (base32
24018 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
24019 (build-system python-build-system)
24020 (arguments
24021 `(#:phases
24022 (modify-phases %standard-phases
24023 (add-after 'unpack 'disable-tests
24024 (lambda _
24025 (substitute* "tests/test_safety.py"
24026 ;; requires network
24027 (("def test_check_live") "def _test_check_live"))
24028 #t)))))
24029 (propagated-inputs
24030 `(("python-click" ,python-click)
24031 ("python-dparse" ,python-dparse)
24032 ("python-packaging" ,python-packaging)
24033 ("python-requests" ,python-requests)))
24034 (home-page "https://github.com/pyupio/safety")
24035 (synopsis "Check installed dependencies for known vulnerabilities")
24036 (description "Safety checks installed dependencies for known vulnerabilities.
24037 By default it uses the open Python vulnerability database Safety DB.")
24038 (license license:expat)))
24039
24040 (define-public python-pypandoc
24041 (package
24042 (name "python-pypandoc")
24043 (version "1.5")
24044 (source
24045 (origin
24046 (method url-fetch)
24047 (uri (pypi-uri "pypandoc" version))
24048 (sha256
24049 (base32
24050 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
24051 (build-system python-build-system)
24052 (inputs
24053 `(("pandoc" ,pandoc)
24054 ("pandoc-citeproc" ,pandoc-citeproc)))
24055 (propagated-inputs
24056 `(("wheel" ,python-wheel)))
24057 (native-inputs
24058 `(("texlive" ,(texlive-union (list texlive-amsfonts
24059 texlive-fonts-ec
24060 texlive-latex-hyperref
24061 texlive-latex-oberdiek
24062 texlive-lm
24063 texlive-xcolor)))))
24064 (arguments
24065 `(#:phases
24066 (modify-phases %standard-phases
24067 (add-before 'check 'disable-tests
24068 (lambda _
24069 ;; Disable test requiring network access
24070 (substitute* "tests.py"
24071 (("test_basic_conversion_from_http_url")
24072 "skip_test_basic_conversion_from_http_url"))
24073 ;; Needed by texlive-union to generate fonts
24074 (setenv "HOME" "/tmp")
24075 #t)))))
24076 (home-page "https://github.com/bebraw/pypandoc")
24077 (synopsis "Python wrapper for pandoc")
24078 (description "pypandoc is a thin Python wrapper around pandoc
24079 and pandoc-citeproc.")
24080 (license license:expat)))
24081
24082 (define-public python-rnc2rng
24083 (package
24084 (name "python-rnc2rng")
24085 (version "2.6.4")
24086 (source
24087 (origin
24088 (method url-fetch)
24089 (uri (pypi-uri "rnc2rng" version))
24090 (sha256
24091 (base32
24092 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
24093 (build-system python-build-system)
24094 (propagated-inputs
24095 `(("python-rply" ,python-rply)))
24096 (arguments
24097 `(#:phases (modify-phases %standard-phases
24098 (replace 'check
24099 (lambda _
24100 (invoke "python" "test.py"))))))
24101 (home-page "https://github.com/djc/rnc2rng")
24102 (synopsis "Convert RELAX NG Compact to regular syntax")
24103 (description
24104 "This package provides the @command{rnc2rng} command-line tool as well as
24105 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
24106 equivalent schemata in the XML-based default RELAX NG syntax.")
24107 (license license:expat)))
24108
24109 (define-public python-telethon
24110 (package
24111 (name "python-telethon")
24112 (version "1.17.5")
24113 (source
24114 (origin
24115 (method git-fetch)
24116 (uri (git-reference
24117 (url "https://github.com/LonamiWebs/Telethon")
24118 (commit (string-append "v" version))))
24119 (file-name (git-file-name name version))
24120 (sha256
24121 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
24122 (build-system python-build-system)
24123 (arguments
24124 '(#:phases
24125 (modify-phases %standard-phases
24126 (replace 'check
24127 (lambda* (#:key tests? #:allow-other-keys)
24128 (when tests?
24129 (invoke "py.test" "-v"))
24130 #t)))))
24131 (propagated-inputs
24132 `(("python-rsa" ,python-rsa)
24133 ("python-pyaes" ,python-pyaes)))
24134 (native-inputs
24135 `(("python-pytest" ,python-pytest)
24136 ("python-pytest-asyncio" ,python-pytest-asyncio)
24137 ("python-pytest-trio" ,python-pytest-trio)))
24138 (home-page "https://docs.telethon.dev")
24139 (synopsis "Full-featured Telegram client library for Python 3")
24140 (description "This library is designed to make it easy to write Python
24141 programs that can interact with Telegram.")
24142 (license license:expat)))
24143
24144 (define-public python-citeproc-py
24145 (package
24146 (name "python-citeproc-py")
24147 (version "0.5.1")
24148 (source
24149 (origin
24150 (method url-fetch)
24151 (uri (pypi-uri "citeproc-py" version))
24152 (sha256
24153 (base32
24154 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
24155 (build-system python-build-system)
24156 (propagated-inputs
24157 `(("python-lxml" ,python-lxml)
24158 ("python-rnc2rng" ,python-rnc2rng)))
24159 (home-page
24160 "https://github.com/brechtm/citeproc-py")
24161 (synopsis "Citations and bibliography formatter")
24162 (description
24163 "Citeproc-py is a CSL processor for Python. It aims to implement the
24164 CSL 1.0.1 specification. citeproc-py can output styled citations and
24165 bibliographies in a number of different output formats. Currently supported
24166 are plain text, reStructuredText and HTML.")
24167 (license license:bsd-2)))
24168
24169 (define-public python-inform
24170 (package
24171 (name "python-inform")
24172 (version "1.23.0")
24173 (source
24174 (origin
24175 (method url-fetch)
24176 (uri (pypi-uri "inform" version))
24177 (sha256
24178 (base32
24179 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
24180 (build-system python-build-system)
24181 (arguments
24182 `(#:tests? #f)) ; PyPI tarball lacks tests
24183 (native-inputs
24184 `(("python-hypothesis" ,python-hypothesis)
24185 ("python-pytest-cov" ,python-pytest-cov)
24186 ("python-pytest-runner" ,python-pytest-runner)))
24187 (propagated-inputs
24188 `(("python-arrow" ,python-arrow)
24189 ("python-six" ,python-six)))
24190 (home-page "https://inform.readthedocs.io")
24191 (synopsis "Print & logging utilities for communicating with user")
24192 (description
24193 "Inform is designed to display messages from programs that are typically run from
24194 a console. It provides a collection of ‘print’ functions that allow you to simply and
24195 cleanly print different types of messages.")
24196 (license license:gpl3+)))
24197
24198 (define-public python-nestedtext
24199 (package
24200 (name "python-nestedtext")
24201 (version "1.0.0")
24202 (source
24203 (origin
24204 (method url-fetch)
24205 (uri (pypi-uri "nestedtext" version))
24206 (sha256
24207 (base32
24208 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
24209 (build-system python-build-system)
24210 (arguments
24211 `(#:tests? #f)) ; PyPI tarball lacks tests
24212 (propagated-inputs
24213 `(("python-inform" ,python-inform)))
24214 (home-page "https://nestedtext.org")
24215 (synopsis "Human readable and writable data interchange format")
24216 (description
24217 "NestedText is a file format for holding data that is to be entered, edited, or
24218 viewed by people. It allows data to be organized into a nested collection of
24219 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
24220 without the complexity and risk of YAML and without the syntactic clutter of JSON.
24221 NestedText is both simple and natural. Only a small number of concepts and rules must
24222 be kept in mind when creating it. It is easily created, modified, or viewed with
24223 a text editor and easily understood and used by both programmers and non-programmers.")
24224 (license license:expat))) ; MIT license
24225
24226 (define-public python-nest-asyncio
24227 (package
24228 (name "python-nest-asyncio")
24229 (version "1.5.1")
24230 (source
24231 (origin
24232 (method url-fetch)
24233 (uri (pypi-uri "nest_asyncio" version))
24234 (sha256
24235 (base32
24236 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
24237 (build-system python-build-system)
24238 (home-page "https://github.com/erdewit/nest_asyncio")
24239 (synopsis "Patch asyncio to allow nested event loops")
24240 (description
24241 "By design @code{asyncio} does not allow its event loop to be nested.
24242 This presents a practical problem: when in an environment where the event loop
24243 is already running it's impossible to run tasks and wait for the result. This
24244 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
24245 @code{loop.run_until_complete}.")
24246 (license license:bsd-3)))
24247
24248 (define-public python-parallel
24249 (package
24250 (name "python-parallel")
24251 (version "1.6.4.4")
24252 (source
24253 (origin
24254 (method url-fetch)
24255 (uri (string-append
24256 "https://www.parallelpython.com/downloads/pp/pp-"
24257 version ".zip"))
24258 (sha256
24259 (base32
24260 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
24261 (native-inputs
24262 `(("unzip" ,unzip)))
24263 (build-system python-build-system)
24264 (arguments '(#:tests? #f)) ; No test suite.
24265 (home-page "https://www.parallelpython.com")
24266 (synopsis "Parallel and distributed programming for Python")
24267 (description "Parallel Python module (PP) provides an easy and efficient
24268 way to create parallel-enabled applications for SMP computers and clusters.
24269 PP module features cross-platform portability and dynamic load balancing.
24270 Thus applications written with PP will parallelize efficiently even on
24271 heterogeneous and multi-platform clusters (including clusters running other
24272 applications with variable CPU loads).")
24273 (license license:bsd-3)))
24274
24275 (define-public python2-parallel
24276 (package-with-python2 python-parallel))
24277
24278 (define-public python-djvulibre
24279 (package
24280 (name "python-djvulibre")
24281 (version "0.8.6")
24282 (source
24283 (origin
24284 (method url-fetch)
24285 (uri (pypi-uri "python-djvulibre" version))
24286 (sha256
24287 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
24288 (build-system python-build-system)
24289 (native-inputs
24290 `(("ghostscript" ,ghostscript)
24291 ("pkg-config" ,pkg-config)
24292 ("python-nose" ,python-nose)))
24293 (inputs
24294 `(("djvulibre" ,djvulibre)
24295 ("python-cython" ,python-cython)))
24296 (arguments
24297 `(#:phases
24298 (modify-phases %standard-phases
24299 (add-after 'unpack 'fix-tests
24300 (lambda _
24301 ;; Unit tests try to load the 'dllpath.py' and fail, because it
24302 ;; doesn't make sense on GNU/Linux.
24303 (delete-file "djvu/dllpath.py")
24304 #t)))))
24305 (synopsis "Python bindings for DjVuLibre")
24306 (description "This is a set of Python bindings for the DjVuLibre library.")
24307 (home-page "https://jwilk.net/software/python-djvulibre")
24308 (license license:gpl2)))
24309
24310 (define-public python2-djvulibre
24311 (package-with-python2 python-djvulibre))
24312
24313 (define-public python-versioneer
24314 (package
24315 (name "python-versioneer")
24316 (version "0.19")
24317 (source
24318 (origin
24319 (method url-fetch)
24320 (uri (pypi-uri "versioneer" version))
24321 (sha256
24322 (base32
24323 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
24324 (build-system python-build-system)
24325 (home-page
24326 "https://github.com/python-versioneer/python-versioneer")
24327 (synopsis
24328 "Version-string management for VCS-controlled trees")
24329 (description
24330 "@code{versioneer} is a tool for managing a recorded version number in
24331 distutils-based python projects. The goal is to remove the tedious and
24332 error-prone \"update the embedded version string\" step from your release
24333 process.")
24334 (license license:public-domain)))
24335
24336 (define-public python2-gamera
24337 (package
24338 (name "python2-gamera")
24339 (version "3.4.4")
24340 (source
24341 (origin
24342 (method url-fetch)
24343 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
24344 "gamera-" version ".tar.gz"))
24345 (sha256
24346 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
24347 (modules '((guix build utils)))
24348 (snippet
24349 '(begin
24350 ;; Remove bundled libraries.
24351 (for-each delete-file-recursively
24352 '("src/libpng-1.2.5"
24353 "src/libtiff"
24354 "src/zlib-1.2.8"))))))
24355 (build-system python-build-system)
24356 (inputs
24357 `(("libpng" ,libpng)
24358 ("libtiff" ,libtiff)
24359 ("python2-wxpython" ,python2-wxpython)
24360 ("zlib" ,zlib)))
24361 (arguments
24362 `(#:python ,python-2))
24363 (synopsis "Framework for building document analysis applications")
24364 (description
24365 "Gamera is a toolkit for building document image recognition systems.")
24366 (home-page "https://gamera.informatik.hsnr.de/")
24367 (license license:gpl2+)))
24368
24369 (define-public python-contextvars
24370 (package
24371 (name "python-contextvars")
24372 (version "2.4")
24373 (source
24374 (origin
24375 (method url-fetch)
24376 (uri (pypi-uri "contextvars" version))
24377 (sha256
24378 (base32
24379 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
24380 (build-system python-build-system)
24381 (propagated-inputs
24382 `(("python-immutables" ,python-immutables)))
24383 (home-page
24384 "https://github.com/MagicStack/contextvars")
24385 (synopsis "PEP 567 Backport")
24386 (description "This package implements a backport of Python 3.7
24387 @code{contextvars} module (see PEP 567) for Python 3.6.")
24388 (license license:asl2.0)))
24389
24390 (define-public python-aiofiles
24391 (package
24392 (name "python-aiofiles")
24393 (version "0.6.0")
24394 (source
24395 (origin
24396 (method url-fetch)
24397 (uri (pypi-uri "aiofiles" version))
24398 (sha256
24399 (base32
24400 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
24401 (build-system python-build-system)
24402 (home-page "https://github.com/Tinche/aiofiles")
24403 (synopsis "File support for @code{asyncio}")
24404 (description "@code{python-aiofiles} is a library for handling local
24405 disk files in asyncio applications.")
24406 (license license:asl2.0)))
24407
24408 (define-public python-pyre-extensions
24409 (package
24410 (name "python-pyre-extensions")
24411 (version "0.0.18")
24412 (source
24413 (origin
24414 (method url-fetch)
24415 (uri (pypi-uri "pyre-extensions" version))
24416 (sha256
24417 (base32
24418 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
24419 (build-system python-build-system)
24420 (propagated-inputs
24421 `(("python-typing-extensions"
24422 ,python-typing-extensions)
24423 ("python-typing-inspect" ,python-typing-inspect)))
24424 (home-page "https://pyre-check.org")
24425 (synopsis
24426 "Type system extensions for use with @code{python-pyre}")
24427 (description
24428 "@code{python-pyre-extensions} defines extensions to the standard
24429 @code{typing} module that are supported by the Pyre typechecker.")
24430 (license license:expat)))
24431
24432 (define-public python-dataclasses
24433 (package
24434 (name "python-dataclasses")
24435 (version "0.7")
24436 (source
24437 (origin
24438 (method url-fetch)
24439 (uri (pypi-uri "dataclasses" version))
24440 (sha256
24441 (base32
24442 "1rh8111fbws2vxyf2qy2zw3x6p6cq1jfz8pf904gig5qwg56sjj9"))))
24443 (build-system python-build-system)
24444 (home-page
24445 "https://github.com/ericvsmith/dataclasses")
24446 (synopsis
24447 "Backport of the @code{dataclasses} module for Python 3.6")
24448 (description
24449 "This is an implementation of PEP 557, Data Classes. It is a
24450 backport of the @code{dataclasses} module for Python 3.6.")
24451 (license license:asl2.0)))
24452
24453 (define-public python-pywatchman
24454 (package
24455 (name "python-pywatchman")
24456 (version "1.4.1")
24457 (source
24458 (origin
24459 (method url-fetch)
24460 (uri (pypi-uri "pywatchman" version))
24461 (sha256
24462 (base32
24463 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
24464 (build-system python-build-system)
24465 (arguments
24466 `(#:tests? #f)) ;there are none
24467 (home-page
24468 "https://facebook.github.io/watchman/")
24469 (synopsis "Watchman client for python")
24470 (description "@code{python-pywatchman} is a library to connect and
24471 query Watchman to discover file changes.")
24472 (license license:bsd-3)))
24473
24474 (define-public python-helpdev
24475 (package
24476 (name "python-helpdev")
24477 (version "0.7.1")
24478 (source
24479 (origin
24480 (method url-fetch)
24481 (uri (pypi-uri "helpdev" version))
24482 (sha256
24483 (base32
24484 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
24485 (build-system python-build-system)
24486 (arguments
24487 `(#:phases
24488 (modify-phases %standard-phases
24489 (replace 'check
24490 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
24491 (when tests?
24492 (add-installed-pythonpath inputs outputs)
24493 (invoke "pytest" "tests"))
24494 #t)))))
24495 (propagated-inputs
24496 `(("python-importlib-metadata" ,python-importlib-metadata)))
24497 (native-inputs
24498 `(("python-pytest" ,python-pytest)))
24499 (home-page "https://gitlab.com/dpizetta/helpdev")
24500 (synopsis
24501 "Extract information about the Python environment easily")
24502 (description
24503 "Helpdev is a library to easily extract information about the Python
24504 environment.")
24505 (license license:expat)))
24506
24507 (define-public python-qdarkstyle
24508 (package
24509 (name "python-qdarkstyle")
24510 (version "2.8.1")
24511 (source
24512 (origin
24513 (method url-fetch)
24514 (uri (pypi-uri "QDarkStyle" version))
24515 (sha256
24516 (base32
24517 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
24518 (build-system python-build-system)
24519 (arguments
24520 `(;; Fails unable to detect valid Qt bindings even when
24521 ;; added as native-inputs.
24522 #:tests? #f))
24523 (propagated-inputs
24524 `(("python-helpdev" ,python-helpdev)
24525 ("python-qtpy" ,python-qtpy)))
24526 (home-page
24527 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
24528 (synopsis
24529 "Complete dark stylesheet for Python and Qt applications")
24530 (description "QDarkStyle is the most complete dark stylesheet for Python and
24531 Qt applications.")
24532 (license license:expat)))
24533
24534 (define-public python-bitstring
24535 (package
24536 (name "python-bitstring")
24537 (version "3.1.7")
24538 (source
24539 (origin
24540 (method url-fetch)
24541 (uri (pypi-uri "bitstring" version))
24542 (sha256
24543 (base32
24544 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
24545 (build-system python-build-system)
24546 (arguments
24547 `(#:phases
24548 (modify-phases %standard-phases
24549 (replace 'check
24550 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24551 (when tests?
24552 (add-installed-pythonpath inputs outputs)
24553 (with-directory-excursion "test"
24554 (invoke "pytest")))
24555 #t)))))
24556 (native-inputs
24557 `(("python-pytest" ,python-pytest)))
24558 (home-page "https://github.com/scott-griffiths/bitstring")
24559 (synopsis
24560 "Simple construction, analysis and modification of binary data")
24561 (description
24562 "Bitstring is a library for simple construction, analysis and modification
24563 of binary data.")
24564 (license license:expat)))
24565
24566 (define-public python-confuse
24567 (package
24568 (name "python-confuse")
24569 (version "1.4.0")
24570 (source
24571 (origin
24572 (method url-fetch)
24573 (uri (pypi-uri "confuse" version))
24574 (sha256
24575 (base32
24576 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
24577 (build-system python-build-system)
24578 (propagated-inputs
24579 `(("python-pathlib" ,python-pathlib)
24580 ("python-pyyaml" ,python-pyyaml)))
24581 (home-page "https://github.com/beetbox/confuse")
24582 (synopsis "Painless YAML configuration.")
24583 (description "Confuse is a configuration library for Python that uses
24584 YAML. It takes care of defaults, overrides, type checking, command-line
24585 integration, human-readable errors, and standard OS-specific locations.")
24586 (license license:expat)))
24587
24588 (define-public python-reflink
24589 (package
24590 (name "python-reflink")
24591 (version "0.2.1")
24592 (source
24593 (origin
24594 (method url-fetch)
24595 (uri (pypi-uri "reflink" version))
24596 (sha256
24597 (base32
24598 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
24599 (build-system python-build-system)
24600 (arguments
24601 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
24602 (propagated-inputs
24603 `(("python-cffi" ,python-cffi)))
24604 (native-inputs
24605 `(("python-pytest" ,python-pytest)
24606 ("python-pytest-runner" ,python-pytest-runner)))
24607 (home-page "https://gitlab.com/rubdos/pyreflink")
24608 (synopsis "Python wrapper around reflink system call")
24609 (description
24610 "Python reflink wraps around platform specific @code{reflink}
24611 implementations.")
24612 (license license:expat)))
24613
24614 (define-public python-pivy
24615 (package
24616 (name "python-pivy")
24617 (version "0.6.5")
24618 (source
24619 (origin
24620 (method git-fetch)
24621 (uri (git-reference
24622 (url "https://github.com/coin3d/pivy")
24623 (commit version)))
24624 (file-name (git-file-name name version))
24625 (sha256
24626 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
24627 (build-system python-build-system)
24628 (arguments
24629 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
24630 #:tests? #f
24631 #:phases
24632 (modify-phases %standard-phases
24633 (add-after 'unpack 'patch-cmake-include-dirs
24634 (lambda _
24635 ;; Patch buildsystem to respect Coin3D include directory
24636 (substitute* "CMakeLists.txt"
24637 (("\\$\\{SoQt_INCLUDE_DIRS}")
24638 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
24639 #t)))))
24640 (native-inputs
24641 `(("cmake" ,cmake)
24642 ("swig" ,swig)))
24643 (inputs
24644 `(("python-wrapper" ,python-wrapper)
24645 ("qtbase" ,qtbase)
24646 ("libxi" ,libxi)
24647 ("libice" ,libice)
24648 ("soqt" ,soqt)
24649 ("glew" ,glew)
24650 ("coin3D" ,coin3D-4)))
24651 (home-page "https://github.com/coin3d/pivy")
24652 (synopsis "Python bindings to Coin3D")
24653 (description
24654 "Pivy provides python bindings for Coin, a 3D graphics library with an
24655 Application Programming Interface based on the Open Inventor 2.1 API.")
24656 (license license:isc)))
24657
24658 (define-public python-crayons
24659 (package
24660 (name "python-crayons")
24661 (version "0.4.0")
24662 (source
24663 (origin
24664 (method url-fetch)
24665 (uri (pypi-uri "crayons" version))
24666 (sha256
24667 (base32
24668 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
24669 (build-system python-build-system)
24670 (propagated-inputs
24671 `(("python-colorama" ,python-colorama)))
24672 (home-page "https://github.com/MasterOdin/crayons")
24673 (synopsis "TextUI colors for Python")
24674 (description "This package gives you colored strings for the terminal.
24675 Crayons automatically wraps a given string in the foreground color and
24676 restores the original state after the string is printed.")
24677 (license license:expat)))
24678
24679 (define-public python-sane
24680 (package
24681 (name "python-sane")
24682 (version "2.9.1")
24683 (source
24684 (origin
24685 (method url-fetch)
24686 (uri (pypi-uri name version))
24687 (sha256
24688 (base32
24689 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
24690 (build-system python-build-system)
24691 (native-inputs
24692 `(("python-pytest" ,python-pytest)))
24693 (inputs
24694 `(("sane-backends" ,sane-backends)))
24695 (home-page "https://github.com/python-pillow/Sane")
24696 (synopsis "Python interface to the SANE scanner")
24697 (description "This package provides Python interface to the SANE scanner
24698 and frame grabber interface.")
24699 (license (license:non-copyleft
24700 ;; Yet another variant of the X/MIT license.
24701 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
24702
24703 (define-public python-screenkey
24704 (package
24705 (name "python-screenkey")
24706 (version "1.4")
24707 (source
24708 (origin
24709 (method git-fetch)
24710 (uri (git-reference
24711 (url "https://gitlab.com/screenkey/screenkey")
24712 (commit (string-append "v" version))))
24713 (file-name (git-file-name name version))
24714 (sha256
24715 (base32
24716 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
24717 (build-system python-build-system)
24718 (arguments
24719 `(#:phases
24720 (modify-phases %standard-phases
24721 (add-after 'unpack 'fix-dlopen-paths
24722 (lambda* (#:key inputs outputs #:allow-other-keys)
24723 (let* ((x11 (assoc-ref inputs "libx11"))
24724 (xtst (assoc-ref inputs "libxtst")))
24725 (substitute* "Screenkey/xlib.py"
24726 (("libX11.so.6")
24727 (string-append x11 "/lib/libX11.so.6")))
24728 (substitute* "Screenkey/xlib.py"
24729 (("libXtst.so.6")
24730 (string-append xtst "/lib/libXtst.so.6")))
24731 #t)))
24732 (add-after 'install 'wrap-screenkey
24733 (lambda* (#:key outputs #:allow-other-keys)
24734 (wrap-program
24735 (string-append (assoc-ref outputs "out") "/bin/screenkey")
24736 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
24737 `("GI_TYPELIB_PATH"
24738 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
24739 #t)))))
24740 (inputs
24741 `(("python-distutils-extra" ,python-distutils-extra)
24742 ("python-tokenize-rt" ,python-tokenize-rt)
24743 ("libx11" ,libx11)
24744 ("libxtst" ,libxtst)
24745 ("gtk+" ,gtk+)
24746 ("python-pygobject" ,python-pygobject)
24747 ("python-pycairo" ,python-pycairo)
24748 ("python-setuptools-git" ,python-setuptools-git)
24749 ("python-babel" ,python-babel)))
24750 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
24751 (synopsis
24752 "Screencast tool to display pressed keys")
24753 (description
24754 "A screencast tool to display your keys inspired by Screenflick.")
24755 (license license:gpl3+)))
24756
24757 (define-public python-jinja2-cli
24758 (package
24759 (name "python-jinja2-cli")
24760 (version "0.7.0")
24761 (source
24762 (origin
24763 (method url-fetch)
24764 (uri (pypi-uri "jinja2-cli" version))
24765 (sha256
24766 (base32
24767 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
24768 (build-system python-build-system)
24769 (propagated-inputs
24770 `(("python-jinja2" ,python-jinja2)))
24771 (native-inputs
24772 `(("python-flake8" ,python-flake8)
24773 ("python-jinja2" ,python-jinja2)
24774 ("python-pytest" ,python-pytest)))
24775 (home-page "https://github.com/mattrobenolt/jinja2-cli")
24776 (synopsis "Command-line interface to Jinja2")
24777 (description
24778 "This package provides a command-line interface (CLI) to the Jinja2
24779 template engine.")
24780 (license license:bsd-3)))
24781
24782 (define-public python-readability
24783 (package
24784 (name "python-readability")
24785 (version "0.3.1")
24786 (source
24787 (origin
24788 (method url-fetch)
24789 (uri (pypi-uri "readability" version))
24790 (sha256
24791 (base32
24792 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
24793 (build-system python-build-system)
24794 (home-page
24795 "https://github.com/andreasvc/readability/")
24796 (synopsis
24797 "Measure the readability of a given text using surface
24798 characteristics")
24799 (description
24800 "This package provides a Python library that is an implementation of
24801 traditional readability measures based on simple surface
24802 characteristics. These measures are basically linear regressions based on the
24803 number of words, syllables, and sentences.")
24804 (license license:asl2.0)))
24805
24806 (define-public python-listparser
24807 (package
24808 (name "python-listparser")
24809 (version "0.18")
24810 (source
24811 (origin
24812 (method url-fetch)
24813 (uri (pypi-uri "listparser" version))
24814 (sha256
24815 (base32
24816 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
24817 (build-system python-build-system)
24818 (home-page
24819 "https://github.com/kurtmckee/listparser")
24820 (synopsis
24821 "Parse subscription lists in Python")
24822 (description
24823 "This package provides a Python library that can parse OPML, FOAF, and
24824 iGoogle subscription lists.")
24825 (license license:expat)))
24826
24827 (define-public python-smartypants
24828 (package
24829 (name "python-smartypants")
24830 (version "2.0.1")
24831 (source
24832 (origin
24833 ;; There's no source tarball for 2.0.1 on PyPI.
24834 (method git-fetch)
24835 (uri (git-reference
24836 (url "https://github.com/leohemsted/smartypants.py")
24837 (commit (string-append "v" version))))
24838 (file-name (git-file-name name version))
24839 (sha256
24840 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
24841 (build-system python-build-system)
24842 (arguments
24843 '(#:phases
24844 (modify-phases %standard-phases
24845 (replace 'check
24846 ;; Its `setup.py test` doesn't report failure with exit status, so
24847 ;; we use `nose` instead.
24848 (lambda _
24849 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
24850 (native-inputs
24851 ;; For tests.
24852 `(("python-docutils" ,python-docutils)
24853 ("python-nose" ,python-nose)
24854 ("python-pygments" ,python-pygments)))
24855 (home-page "https://github.com/leohemsted/smartypants.py")
24856 (synopsis "Translate punctuation characters into smart quotes")
24857 (description
24858 "@command{smartpants} can perform the following transformations:
24859 @enumerate
24860 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
24861 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
24862 entities
24863 @item Dashes (-- and ---) into en- and em-dash entities
24864 @item Three consecutive dots (... or . . .) into an ellipsis entity
24865 @end enumerate")
24866 (license license:bsd-3)))
24867
24868 (define-public python-typogrify
24869 (package
24870 (name "python-typogrify")
24871 (version "2.0.7")
24872 (source (origin
24873 (method url-fetch)
24874 (uri (pypi-uri "typogrify" version))
24875 (sha256
24876 (base32
24877 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
24878 (build-system python-build-system)
24879 (arguments
24880 '(#:phases
24881 (modify-phases %standard-phases
24882 (replace 'check
24883 (lambda _
24884 (invoke "nosetests" "-v"))))))
24885 (propagated-inputs
24886 `(("python-smartypants" ,python-smartypants)))
24887 (native-inputs
24888 ;; For tests.
24889 `(("python-nose" ,python-nose)))
24890 (home-page "https://github.com/mintchaos/typogrify")
24891 (synopsis "Filters to transform text into typographically-improved HTML")
24892 (description
24893 "@code{typogrify} provides a set of custom filters that automatically
24894 apply various transformations to plain text in order to yield
24895 typographically-improved HTML. While often used in conjunction with Jinja and
24896 Django template systems, the filters can be used in any environment.")
24897 (license license:bsd-3)))
24898
24899 (define-public python-ld
24900 (package
24901 (name "python-ld")
24902 (version "0.5.0")
24903 (source
24904 (origin
24905 (method url-fetch)
24906 (uri (pypi-uri "ld" version))
24907 (sha256
24908 (base32
24909 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
24910 (build-system python-build-system)
24911 (propagated-inputs
24912 `(("python-six" ,python-six)))
24913 (home-page "https://github.com/nir0s/ld")
24914 (synopsis "OS platform information API")
24915 (description
24916 "The ld package provides information about the GNU/Linux distribution it
24917 runs on, such as a reliable machine-readable ID, or version information.")
24918 (license license:asl2.0)))
24919
24920 (define-public python-quicktions
24921 (package
24922 (name "python-quicktions")
24923 (version "1.11")
24924 (source
24925 (origin
24926 (method url-fetch)
24927 (uri (pypi-uri "quicktions" version))
24928 (sha256
24929 (base32
24930 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
24931 (modules '((guix build utils)))
24932 (snippet
24933 '(begin
24934 ;; This file is generated by Cython.
24935 (delete-file "src/quicktions.c") #t))))
24936 (build-system python-build-system)
24937 (arguments
24938 `(#:phases
24939 (modify-phases %standard-phases
24940 (add-before 'build 'cythonize-sources
24941 (lambda _
24942 (with-directory-excursion "src"
24943 (invoke "cython" "quicktions.pyx"))))
24944 (replace 'check
24945 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
24946 (when tests?
24947 (add-installed-pythonpath inputs outputs)
24948 (invoke "pytest"))
24949 #t)))))
24950 (native-inputs
24951 `(("python-cython" ,python-cython)
24952 ("python-pytest" ,python-pytest)))
24953 (home-page "https://github.com/scoder/quicktions")
24954 (synopsis "Fast fractions data type for rational numbers")
24955 (description
24956 "This package provides fast fractions data type for rational numbers. It
24957 is the cythonized version of @code{fractions.Fraction}.")
24958 (license license:psfl)))
24959
24960 (define-public python-pathvalidate
24961 (package
24962 (name "python-pathvalidate")
24963 (version "2.4.1")
24964 (source
24965 (origin
24966 (method url-fetch)
24967 (uri (pypi-uri "pathvalidate" version))
24968 (sha256
24969 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
24970 (build-system python-build-system)
24971 (arguments
24972 '(#:tests? #f))
24973 ;; Tests disabled because of circular dependencies.
24974 ;; pathvalidate tests depend on pytest-md-report, which
24975 ;; depends on pathvalidate.
24976 (native-inputs
24977 `(("python-allpairspy" ,python-allpairspy)
24978 ("python-click" ,python-click)
24979 ("python-faker" ,python-faker)
24980 ("python-pytest" ,python-pytest)))
24981 (home-page "https://github.com/thombashi/pathvalidate")
24982 (synopsis "Sanitize strings representing paths")
24983 (description
24984 "@code{pathvalidate} is a Python library to sanitize/validate strings
24985 representing paths or filenames.")
24986 (license license:expat)))